@coopenomics/extension-kit 2026.9.30 → 2026.10.14-1
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 +1321 -348
- package/dist/index.d.cts +707 -169
- package/dist/index.d.mts +707 -169
- package/dist/index.d.ts +707 -169
- package/dist/index.mjs +1260 -329
- package/dist/shared/extension-kit.9c3dd9f1.d.cts +196 -0
- package/dist/shared/extension-kit.9c3dd9f1.d.mts +196 -0
- package/dist/shared/extension-kit.9c3dd9f1.d.ts +196 -0
- package/dist/shared/extension-kit.d5437cba.mjs +398 -0
- package/dist/shared/extension-kit.e25d0843.cjs +424 -0
- package/dist/sync/index.cjs +170 -633
- package/dist/sync/index.d.cts +70 -312
- package/dist/sync/index.d.mts +70 -312
- package/dist/sync/index.d.ts +70 -312
- package/dist/sync/index.mjs +170 -633
- package/package.json +9 -9
package/dist/index.mjs
CHANGED
|
@@ -1,13 +1,16 @@
|
|
|
1
|
-
import { HttpException, HttpStatus, BadGatewayException, ServiceUnavailableException, BadRequestException, UnauthorizedException, ForbiddenException, NotFoundException, ConflictException, UnprocessableEntityException, InternalServerErrorException, createParamDecorator,
|
|
1
|
+
import { HttpException, HttpStatus, BadGatewayException, ServiceUnavailableException, BadRequestException, UnauthorizedException, ForbiddenException, NotFoundException, ConflictException, UnprocessableEntityException, InternalServerErrorException, createParamDecorator, Injectable, SetMetadata, Inject, Logger } from '@nestjs/common';
|
|
2
2
|
import { GqlExecutionContext, Directive, Field, InputType, registerEnumType, Int, IntersectionType, OmitType, ObjectType } from '@nestjs/graphql';
|
|
3
3
|
import { te, t } from '@coopenomics/i18n/server';
|
|
4
|
-
import { Reflector } from '@nestjs/core';
|
|
5
4
|
import { AuthGuard } from '@nestjs/passport';
|
|
6
5
|
import { timingSafeEqual } from 'node:crypto';
|
|
6
|
+
import { createMongoAbility, subject } from '@casl/ability';
|
|
7
|
+
import { Reflector } from '@nestjs/core';
|
|
7
8
|
import { z } from 'zod';
|
|
8
|
-
import { IsNumber, IsString, IsArray, ArrayMinSize, ValidateNested, IsEnum, IsInt, IsOptional, Matches, IsNotEmpty, IsIn, IsObject, registerDecorator } from 'class-validator';
|
|
9
|
+
import { IsNumber, IsString, IsArray, ArrayMinSize, ValidateNested, IsEnum, IsInt, IsOptional, Matches, IsNotEmpty, IsIn, MaxLength, IsDate, Min, Max, IsObject, registerDecorator } from 'class-validator';
|
|
9
10
|
import { Type } from 'class-transformer';
|
|
10
|
-
import { GraphQLJSON } from 'graphql-type-json';
|
|
11
|
+
import GraphQLJSON$1, { GraphQLJSON } from 'graphql-type-json';
|
|
12
|
+
import { o as oneOf } from './shared/extension-kit.d5437cba.mjs';
|
|
13
|
+
export { K as KYSELY, M as MAIN_DATABASE, S as SqlBuilder, T as TableStore, d as affectedCount, t as bindNamed, c as camelRow, k as configureLocalChangePublisher, j as contains, h as ilike, q as inTransaction, i as isNull, f as lessOrEqual, l as lessThan, g as moreOrEqual, m as moreThan, e as notEqual, n as notNull, p as pendingLocalChanges, r as rawQuery, b as snakeRow, s as sortColumn, a as sortDirection, w as within } from './shared/extension-kit.d5437cba.mjs';
|
|
11
14
|
import { Classes } from '@coopenomics/sdk';
|
|
12
15
|
import { Name } from '@wharfkit/antelope';
|
|
13
16
|
import moment from 'moment';
|
|
@@ -15,6 +18,8 @@ import crypto, { createHash } from 'crypto';
|
|
|
15
18
|
import moment$1 from 'moment-timezone';
|
|
16
19
|
import 'moment/locale/ru';
|
|
17
20
|
import { _Common } from 'cooptypes';
|
|
21
|
+
import 'kysely';
|
|
22
|
+
import 'node:async_hooks';
|
|
18
23
|
|
|
19
24
|
const DOMAIN_ERROR = Symbol.for("@coopenomics/extension-kit/DomainError");
|
|
20
25
|
function domainErrorMessage(code, params = {}) {
|
|
@@ -160,17 +165,9 @@ function validationMessage(key, params = {}) {
|
|
|
160
165
|
return (args) => t(key, { property: args.property, value: String(args.value ?? ""), ...params });
|
|
161
166
|
}
|
|
162
167
|
|
|
163
|
-
|
|
164
|
-
const
|
|
165
|
-
|
|
166
|
-
const self = options.self ?? [];
|
|
167
|
-
const args = self.length ? `roles: ${JSON.stringify(roles)}, self: ${JSON.stringify(self)}` : `roles: ${JSON.stringify(roles)}`;
|
|
168
|
-
const decorators = [SetMetadata("roles", roles), Directive(`@auth(${args})`)];
|
|
169
|
-
if (options.allowSelf === false)
|
|
170
|
-
decorators.push(SetMetadata(ROLES_DENY_SELF_KEY, true));
|
|
171
|
-
if (options.anyStatus === true)
|
|
172
|
-
decorators.push(SetMetadata(ROLES_ANY_STATUS_KEY, true));
|
|
173
|
-
return applyDecorators(...decorators);
|
|
168
|
+
function CouncilField(self = []) {
|
|
169
|
+
const council = 'roles: ["chairman", "member"]';
|
|
170
|
+
return Directive(`@auth(${self.length ? `${council}, self: ${JSON.stringify(self)}` : council})`);
|
|
174
171
|
}
|
|
175
172
|
const CurrentUser = createParamDecorator((data, context) => {
|
|
176
173
|
const ctx = GqlExecutionContext.create(context);
|
|
@@ -202,20 +199,18 @@ function hasServerSecret(headers) {
|
|
|
202
199
|
return a.length === b.length && timingSafeEqual(a, b);
|
|
203
200
|
}
|
|
204
201
|
|
|
205
|
-
var __defProp$
|
|
206
|
-
var __getOwnPropDesc$
|
|
207
|
-
var __decorateClass$
|
|
208
|
-
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$
|
|
202
|
+
var __defProp$q = Object.defineProperty;
|
|
203
|
+
var __getOwnPropDesc$q = Object.getOwnPropertyDescriptor;
|
|
204
|
+
var __decorateClass$q = (decorators, target, key, kind) => {
|
|
205
|
+
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$q(target, key) : target;
|
|
209
206
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
210
207
|
if (decorator = decorators[i])
|
|
211
208
|
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
212
209
|
if (kind && result)
|
|
213
|
-
__defProp$
|
|
210
|
+
__defProp$q(target, key, result);
|
|
214
211
|
return result;
|
|
215
212
|
};
|
|
216
|
-
var __decorateParam = (index, decorator) => (target, key) => decorator(target, key, index);
|
|
217
213
|
const ACTIVE_USER_STATUS = "active";
|
|
218
|
-
const PARTICIPANT_ROLE = "user";
|
|
219
214
|
let GqlJwtAuthGuard = class extends AuthGuard("jwt") {
|
|
220
215
|
getRequest(context) {
|
|
221
216
|
const ctx = GqlExecutionContext.create(context);
|
|
@@ -237,7 +232,7 @@ let GqlJwtAuthGuard = class extends AuthGuard("jwt") {
|
|
|
237
232
|
return super.canActivate(context);
|
|
238
233
|
}
|
|
239
234
|
};
|
|
240
|
-
GqlJwtAuthGuard = __decorateClass$
|
|
235
|
+
GqlJwtAuthGuard = __decorateClass$q([
|
|
241
236
|
Injectable()
|
|
242
237
|
], GqlJwtAuthGuard);
|
|
243
238
|
function hasAuthorizationHeader(headers) {
|
|
@@ -262,7 +257,7 @@ let OptionalGqlJwtAuthGuard = class extends AuthGuard("jwt") {
|
|
|
262
257
|
throw DomainError.unauthorized("KIT_SESSION_ENDED");
|
|
263
258
|
}
|
|
264
259
|
};
|
|
265
|
-
OptionalGqlJwtAuthGuard = __decorateClass$
|
|
260
|
+
OptionalGqlJwtAuthGuard = __decorateClass$q([
|
|
266
261
|
Injectable()
|
|
267
262
|
], OptionalGqlJwtAuthGuard);
|
|
268
263
|
let HttpJwtAuthGuard = class extends AuthGuard("jwt") {
|
|
@@ -277,49 +272,9 @@ let HttpJwtAuthGuard = class extends AuthGuard("jwt") {
|
|
|
277
272
|
return super.canActivate(context);
|
|
278
273
|
}
|
|
279
274
|
};
|
|
280
|
-
HttpJwtAuthGuard = __decorateClass$
|
|
275
|
+
HttpJwtAuthGuard = __decorateClass$q([
|
|
281
276
|
Injectable()
|
|
282
277
|
], HttpJwtAuthGuard);
|
|
283
|
-
let RolesGuard = class {
|
|
284
|
-
// Токен указан явно: пакет собирается esbuild'ом, а он не умеет
|
|
285
|
-
// `emitDecoratorMetadata`. Без `@Inject` Nest не увидел бы `design:paramtypes`,
|
|
286
|
-
// построил бы гард без аргументов, и `reflector` оказался бы `undefined` —
|
|
287
|
-
// отказ приходил бы не отказом, а 500 на первом же запросе с ролями.
|
|
288
|
-
constructor(reflector) {
|
|
289
|
-
this.reflector = reflector;
|
|
290
|
-
}
|
|
291
|
-
canActivate(context) {
|
|
292
|
-
const ctx = GqlExecutionContext.create(context);
|
|
293
|
-
const request = ctx.getContext().req;
|
|
294
|
-
if (hasServerSecret(request?.headers)) {
|
|
295
|
-
return true;
|
|
296
|
-
}
|
|
297
|
-
const allowedRoles = this.reflector.get("roles", context.getHandler());
|
|
298
|
-
if (!allowedRoles) {
|
|
299
|
-
return true;
|
|
300
|
-
}
|
|
301
|
-
const { user } = request;
|
|
302
|
-
const args = ctx.getArgs();
|
|
303
|
-
const data = args.data;
|
|
304
|
-
const filter = args.filter;
|
|
305
|
-
const denySelf = this.reflector.get(ROLES_DENY_SELF_KEY, context.getHandler()) === true;
|
|
306
|
-
if (!denySelf && (data && data.username && user.username === data.username || filter && filter.username && user.username === filter.username || args.username && user.username === args.username)) {
|
|
307
|
-
return true;
|
|
308
|
-
}
|
|
309
|
-
if (allowedRoles.includes(user.role)) {
|
|
310
|
-
const anyStatus = this.reflector.get(ROLES_ANY_STATUS_KEY, context.getHandler()) === true;
|
|
311
|
-
if (user.role === PARTICIPANT_ROLE && !anyStatus && user.status !== ACTIVE_USER_STATUS) {
|
|
312
|
-
throw DomainError.forbidden("KIT_MEMBERS_ONLY");
|
|
313
|
-
}
|
|
314
|
-
return true;
|
|
315
|
-
}
|
|
316
|
-
throw DomainError.unauthorized("KIT_INSUFFICIENT_RIGHTS");
|
|
317
|
-
}
|
|
318
|
-
};
|
|
319
|
-
RolesGuard = __decorateClass$g([
|
|
320
|
-
Injectable(),
|
|
321
|
-
__decorateParam(0, Inject(Reflector))
|
|
322
|
-
], RolesGuard);
|
|
323
278
|
let ActiveUserStatusGuard = class {
|
|
324
279
|
canActivate(context) {
|
|
325
280
|
const ctx = GqlExecutionContext.create(context);
|
|
@@ -337,19 +292,383 @@ let ActiveUserStatusGuard = class {
|
|
|
337
292
|
return true;
|
|
338
293
|
}
|
|
339
294
|
};
|
|
340
|
-
ActiveUserStatusGuard = __decorateClass$
|
|
295
|
+
ActiveUserStatusGuard = __decorateClass$q([
|
|
341
296
|
Injectable()
|
|
342
297
|
], ActiveUserStatusGuard);
|
|
343
298
|
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
299
|
+
const NARROW_SCOPES = /* @__PURE__ */ new Set(["own", "own-KU", "chaired-KU", "to-self"]);
|
|
300
|
+
function rightMatches(actions, action) {
|
|
301
|
+
if (actions.includes(action))
|
|
302
|
+
return true;
|
|
303
|
+
const colon = action.lastIndexOf(":");
|
|
304
|
+
if (colon > 0 && NARROW_SCOPES.has(action.slice(colon + 1))) {
|
|
305
|
+
return actions.includes(`${action.slice(0, colon)}:all`);
|
|
306
|
+
}
|
|
307
|
+
return false;
|
|
308
|
+
}
|
|
309
|
+
function rightConditions(table, roles, resource, action) {
|
|
310
|
+
const out = [];
|
|
311
|
+
for (const role of roles) {
|
|
312
|
+
for (const group of table[role] ?? []) {
|
|
313
|
+
const actions = group.rights[resource];
|
|
314
|
+
if (actions && rightMatches(actions, action))
|
|
315
|
+
out.push(group.when);
|
|
316
|
+
}
|
|
317
|
+
}
|
|
318
|
+
return out;
|
|
319
|
+
}
|
|
320
|
+
function rightGrants(table, roles, resource, action) {
|
|
321
|
+
const out = [];
|
|
322
|
+
for (const role of roles) {
|
|
323
|
+
for (const group of table[role] ?? []) {
|
|
324
|
+
const actions = group.rights[resource];
|
|
325
|
+
if (!actions)
|
|
326
|
+
continue;
|
|
327
|
+
if (!rightMatches(actions, action))
|
|
328
|
+
continue;
|
|
329
|
+
const colon = action.lastIndexOf(":");
|
|
330
|
+
const narrow = colon > 0 && NARROW_SCOPES.has(action.slice(colon + 1));
|
|
331
|
+
out.push({ when: group.when, wide: narrow && actions.includes(`${action.slice(0, colon)}:all`) });
|
|
332
|
+
}
|
|
333
|
+
}
|
|
334
|
+
return out;
|
|
335
|
+
}
|
|
336
|
+
function rightsHeld(table, roles, held) {
|
|
337
|
+
const set = /* @__PURE__ */ new Set();
|
|
338
|
+
for (const role of roles) {
|
|
339
|
+
for (const group of table[role] ?? []) {
|
|
340
|
+
if (!group.when.every((condition) => held.has(condition)))
|
|
341
|
+
continue;
|
|
342
|
+
for (const [resource, actions] of Object.entries(group.rights)) {
|
|
343
|
+
for (const action of actions)
|
|
344
|
+
set.add(`${resource}:${action}`);
|
|
345
|
+
}
|
|
346
|
+
}
|
|
347
|
+
}
|
|
348
|
+
return [...set];
|
|
349
|
+
}
|
|
350
|
+
function rightsByRole(table) {
|
|
351
|
+
const out = {};
|
|
352
|
+
for (const role of Object.keys(table)) {
|
|
353
|
+
const merged = {};
|
|
354
|
+
for (const group of table[role]) {
|
|
355
|
+
for (const [resource, actions] of Object.entries(group.rights)) {
|
|
356
|
+
merged[resource] = [...merged[resource] ?? [], ...actions];
|
|
357
|
+
}
|
|
358
|
+
}
|
|
359
|
+
out[role] = merged;
|
|
360
|
+
}
|
|
361
|
+
return out;
|
|
362
|
+
}
|
|
363
|
+
function expandRights(rights) {
|
|
364
|
+
const set = /* @__PURE__ */ new Set();
|
|
365
|
+
for (const right of rights) {
|
|
366
|
+
set.add(right);
|
|
367
|
+
const colon = right.lastIndexOf(":");
|
|
368
|
+
if (colon > 0 && right.slice(colon + 1) === "all") {
|
|
369
|
+
for (const scope of NARROW_SCOPES)
|
|
370
|
+
set.add(`${right.slice(0, colon)}:${scope}`);
|
|
371
|
+
}
|
|
372
|
+
}
|
|
373
|
+
return [...set];
|
|
374
|
+
}
|
|
375
|
+
const RIGHT_METADATA_KEY = "required_right";
|
|
376
|
+
const SELF = { self: true };
|
|
377
|
+
const RequireRight = (resource, action, source) => SetMetadata(RIGHT_METADATA_KEY, { resource, action, source });
|
|
378
|
+
function scopeOfRight(resource, action, implied = {}) {
|
|
379
|
+
const colon = action.lastIndexOf(":");
|
|
380
|
+
const tail = colon > 0 ? action.slice(colon + 1) : "";
|
|
381
|
+
if (tail === "all" || NARROW_SCOPES.has(tail))
|
|
382
|
+
return tail;
|
|
383
|
+
return implied[`${resource}:${action}`] ?? null;
|
|
384
|
+
}
|
|
385
|
+
function scopeConditions(scope, actor) {
|
|
386
|
+
switch (scope) {
|
|
387
|
+
case "own":
|
|
388
|
+
return { owner: actor.username };
|
|
389
|
+
case "to-self":
|
|
390
|
+
return { recipient: actor.username };
|
|
391
|
+
case "own-KU":
|
|
392
|
+
return { ku: { $in: [...actor.kus] } };
|
|
393
|
+
case "chaired-KU":
|
|
394
|
+
return { ku: { $in: [...actor.chairedKus] } };
|
|
395
|
+
}
|
|
396
|
+
}
|
|
397
|
+
function scopesMatched(resource, scopes, actor, facts) {
|
|
398
|
+
return scopes.filter((scope) => {
|
|
399
|
+
const ability = createMongoAbility([{ action: "act", subject: resource, conditions: scopeConditions(scope, actor) }]);
|
|
400
|
+
return ability.can("act", subject(resource, { ...facts }));
|
|
401
|
+
});
|
|
402
|
+
}
|
|
403
|
+
const SCOPE_DENIALS = {
|
|
404
|
+
own: "KIT_RIGHT_SCOPE_OWN",
|
|
405
|
+
"own-KU": "KIT_RIGHT_SCOPE_OWN_KU",
|
|
406
|
+
"chaired-KU": "KIT_RIGHT_SCOPE_CHAIRED_KU",
|
|
407
|
+
"to-self": "KIT_RIGHT_SCOPE_TO_SELF"
|
|
408
|
+
};
|
|
409
|
+
function readPath$1(args, path) {
|
|
410
|
+
let value = args;
|
|
411
|
+
for (const key of path.split(".")) {
|
|
412
|
+
if (value === null || typeof value !== "object")
|
|
413
|
+
return void 0;
|
|
414
|
+
value = value[key];
|
|
415
|
+
}
|
|
416
|
+
return value;
|
|
417
|
+
}
|
|
418
|
+
function unique(items) {
|
|
419
|
+
return [...new Set(items)];
|
|
420
|
+
}
|
|
421
|
+
async function checkRightScope(input) {
|
|
422
|
+
const sources = Array.isArray(input.source) ? input.source : [input.source];
|
|
423
|
+
let merged;
|
|
424
|
+
for (const source of sources) {
|
|
425
|
+
const one = await checkScopeOfSource(input, source);
|
|
426
|
+
if (!one.allowed)
|
|
427
|
+
return one;
|
|
428
|
+
merged = merged ? { scopes: unique([...merged.scopes, ...one.scope.scopes]), kus: one.scope.kus !== void 0 ? one.scope.kus : merged.kus } : one.scope;
|
|
429
|
+
}
|
|
430
|
+
return { allowed: true, scope: merged ?? { scopes: [] } };
|
|
431
|
+
}
|
|
432
|
+
async function checkScopeOfSource(input, source) {
|
|
433
|
+
const { resource, args } = input;
|
|
434
|
+
const scopes = unique(
|
|
435
|
+
input.granted.map((grant) => grant.wide ? "all" : scopeOfRight(resource, grant.action, input.implied)).filter(
|
|
436
|
+
(scope) => scope !== null
|
|
437
|
+
)
|
|
438
|
+
);
|
|
439
|
+
const wide = scopes.includes("all") || input.granted.some((grant) => !grant.wide && scopeOfRight(resource, grant.action, input.implied) === null);
|
|
440
|
+
const narrow = scopes.filter((scope) => scope !== "all");
|
|
441
|
+
const pass = (scope) => ({ allowed: true, scope });
|
|
442
|
+
const deny = (scope = narrow[0]) => ({ allowed: false, denial: SCOPE_DENIALS[scope], scope: { scopes: [] } });
|
|
443
|
+
if (!source || "self" in source)
|
|
444
|
+
return pass({ scopes });
|
|
445
|
+
const actor = async () => ({
|
|
446
|
+
username: input.username,
|
|
447
|
+
kus: narrow.includes("own-KU") ? await input.kus() : [],
|
|
448
|
+
chairedKus: narrow.includes("chaired-KU") ? await input.chairedKus() : []
|
|
449
|
+
});
|
|
450
|
+
if ("list" in source) {
|
|
451
|
+
const value = source.list === null ? null : readPath$1(args, source.list);
|
|
452
|
+
const requested = value === void 0 || value === null || value === "" ? null : String(value);
|
|
453
|
+
if (wide)
|
|
454
|
+
return pass({ scopes, kus: requested ? [requested] : null });
|
|
455
|
+
const kuScope = narrow.find((scope) => scope === "own-KU" || scope === "chaired-KU");
|
|
456
|
+
if (!kuScope)
|
|
457
|
+
return pass({ scopes });
|
|
458
|
+
const { kus, chairedKus } = await actor();
|
|
459
|
+
const own = unique([...kus, ...chairedKus]);
|
|
460
|
+
if (requested && !own.includes(requested))
|
|
461
|
+
return deny(kuScope);
|
|
462
|
+
return pass({ scopes, kus: requested ? [requested] : own });
|
|
463
|
+
}
|
|
464
|
+
if (wide)
|
|
465
|
+
return pass({ scopes });
|
|
466
|
+
let facts;
|
|
467
|
+
if ("owner" in source) {
|
|
468
|
+
const value = readPath$1(args, source.owner);
|
|
469
|
+
facts = [value === void 0 || value === null || value === "" ? {} : { owner: String(value) }];
|
|
470
|
+
} else if ("ku" in source) {
|
|
471
|
+
const value = readPath$1(args, source.ku);
|
|
472
|
+
facts = value === void 0 || value === null ? [] : [{ ku: String(value) }];
|
|
473
|
+
} else {
|
|
474
|
+
const value = readPath$1(args, source.id);
|
|
475
|
+
const ids = (Array.isArray(value) ? value : [value]).filter((id) => id !== void 0 && id !== null).map(String);
|
|
476
|
+
facts = ids.length > 0 ? await input.locate(source.of, ids) : [];
|
|
477
|
+
}
|
|
478
|
+
if (facts.length === 0)
|
|
479
|
+
return pass({ scopes: [] });
|
|
480
|
+
const who = await actor();
|
|
481
|
+
const matched = facts.map((one) => scopesMatched(resource, narrow, who, one));
|
|
482
|
+
const any = "of" in source && source.match === "any";
|
|
483
|
+
const allowed = any ? matched.some((list) => list.length > 0) : matched.every((list) => list.length > 0);
|
|
484
|
+
if (!allowed)
|
|
485
|
+
return deny();
|
|
486
|
+
return pass({ scopes: unique(matched.flat()) });
|
|
487
|
+
}
|
|
488
|
+
const GRANTED_SCOPE_KEY = "grantedScope";
|
|
489
|
+
const GrantedScope = createParamDecorator((_data, context) => {
|
|
490
|
+
const request = GqlExecutionContext.create(context).getContext().req;
|
|
491
|
+
return request?.[GRANTED_SCOPE_KEY] ?? { scopes: [] };
|
|
492
|
+
});
|
|
493
|
+
|
|
494
|
+
var __defProp$p = Object.defineProperty;
|
|
495
|
+
var __getOwnPropDesc$p = Object.getOwnPropertyDescriptor;
|
|
496
|
+
var __decorateClass$p = (decorators, target, key, kind) => {
|
|
497
|
+
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$p(target, key) : target;
|
|
348
498
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
349
499
|
if (decorator = decorators[i])
|
|
350
500
|
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
351
501
|
if (kind && result)
|
|
352
|
-
__defProp$
|
|
502
|
+
__defProp$p(target, key, result);
|
|
503
|
+
return result;
|
|
504
|
+
};
|
|
505
|
+
var __decorateParam = (index, decorator) => (target, key) => decorator(target, key, index);
|
|
506
|
+
const APP_RIGHTS = Symbol("APP_RIGHTS");
|
|
507
|
+
function councilRolesOf(role) {
|
|
508
|
+
const core = String(role ?? "").toLowerCase();
|
|
509
|
+
if (core === "chairman")
|
|
510
|
+
return ["council", "chairman"];
|
|
511
|
+
if (core === "member")
|
|
512
|
+
return ["council"];
|
|
513
|
+
return [];
|
|
514
|
+
}
|
|
515
|
+
const ACCEPTED_STATUS = "active";
|
|
516
|
+
function memberRolesOf(caller) {
|
|
517
|
+
const accepted = caller.status === ACCEPTED_STATUS ? ["participant"] : [];
|
|
518
|
+
return [...accepted, ...councilRolesOf(caller.role)];
|
|
519
|
+
}
|
|
520
|
+
const NO_RIGHT = "KIT_INSUFFICIENT_RIGHTS";
|
|
521
|
+
function conditionOrder(def) {
|
|
522
|
+
return Object.keys(def.conditionDenials ?? {});
|
|
523
|
+
}
|
|
524
|
+
async function grantedActions(def, caller, roles, resource, actions) {
|
|
525
|
+
const lazy = new Set(def.lazyConditions ?? []);
|
|
526
|
+
const held = /* @__PURE__ */ new Set();
|
|
527
|
+
const read = /* @__PURE__ */ new Set();
|
|
528
|
+
const resolve = async (wanted) => {
|
|
529
|
+
const fresh = wanted.filter((condition) => !read.has(condition));
|
|
530
|
+
if (fresh.length === 0 || !def.conditions)
|
|
531
|
+
return;
|
|
532
|
+
fresh.forEach((condition) => read.add(condition));
|
|
533
|
+
for (const condition of await def.conditions(caller, roles, fresh))
|
|
534
|
+
held.add(condition);
|
|
535
|
+
};
|
|
536
|
+
const granted = [];
|
|
537
|
+
const unmet = [];
|
|
538
|
+
for (const action of actions) {
|
|
539
|
+
const rows = rightGrants(def.table, roles, resource, action);
|
|
540
|
+
if (rows.length === 0)
|
|
541
|
+
continue;
|
|
542
|
+
const satisfied = () => rows.filter((row) => row.when.every((condition) => held.has(condition)));
|
|
543
|
+
const settled = rows.some((row) => row.when.length === 0) && !rows.some((row) => row.wide);
|
|
544
|
+
if (!settled) {
|
|
545
|
+
await resolve(rows.flatMap((row) => row.when).filter((condition) => !lazy.has(condition)));
|
|
546
|
+
if (satisfied().length === 0) {
|
|
547
|
+
const worth = rows.filter((row) => row.when.every((condition) => lazy.has(condition) || held.has(condition)));
|
|
548
|
+
await resolve(worth.flatMap((row) => row.when).filter((condition) => lazy.has(condition)));
|
|
549
|
+
}
|
|
550
|
+
}
|
|
551
|
+
const ok = satisfied();
|
|
552
|
+
if (ok.length > 0)
|
|
553
|
+
granted.push({ action, wide: ok.some((row) => row.wide) });
|
|
554
|
+
else
|
|
555
|
+
unmet.push(...rows.map((row) => row.when.filter((condition) => !held.has(condition))));
|
|
556
|
+
}
|
|
557
|
+
if (granted.length > 0 || unmet.length === 0)
|
|
558
|
+
return { granted };
|
|
559
|
+
const nearest = [...unmet].sort((a, b) => a.length - b.length)[0];
|
|
560
|
+
const order = conditionOrder(def);
|
|
561
|
+
return { granted, missing: order.find((condition) => nearest.includes(condition)) ?? nearest[0] };
|
|
562
|
+
}
|
|
563
|
+
async function checkRight(def, caller, roles, requirement, args) {
|
|
564
|
+
const actions = Array.isArray(requirement.action) ? requirement.action : [requirement.action];
|
|
565
|
+
const { granted, missing } = await grantedActions(def, caller, roles, requirement.resource, actions);
|
|
566
|
+
if (granted.length === 0) {
|
|
567
|
+
if (missing === void 0)
|
|
568
|
+
return { allowed: false, reason: "right", denial: def.noRightDenial ?? NO_RIGHT };
|
|
569
|
+
return { allowed: false, reason: "condition", denial: def.conditionDenials?.[missing] ?? def.noRightDenial ?? NO_RIGHT };
|
|
570
|
+
}
|
|
571
|
+
const scope = await checkRightScope({
|
|
572
|
+
resource: requirement.resource,
|
|
573
|
+
granted,
|
|
574
|
+
source: requirement.source,
|
|
575
|
+
implied: def.impliedScopes,
|
|
576
|
+
args,
|
|
577
|
+
username: caller.username,
|
|
578
|
+
kus: async () => def.kus ? def.kus(caller.username) : [],
|
|
579
|
+
chairedKus: async () => def.chairedKus ? def.chairedKus(caller.username) : [],
|
|
580
|
+
locate: async (kind, ids) => def.locate ? def.locate(kind, ids) : []
|
|
581
|
+
});
|
|
582
|
+
if (!scope.allowed)
|
|
583
|
+
return { allowed: false, reason: "scope", denial: scope.denial ?? NO_RIGHT };
|
|
584
|
+
return { allowed: true, scope: scope.scope };
|
|
585
|
+
}
|
|
586
|
+
function allConditions(table) {
|
|
587
|
+
const out = /* @__PURE__ */ new Set();
|
|
588
|
+
for (const groups of Object.values(table))
|
|
589
|
+
for (const group of groups)
|
|
590
|
+
group.when.forEach((condition) => out.add(condition));
|
|
591
|
+
return [...out];
|
|
592
|
+
}
|
|
593
|
+
async function desktopGrants(def, caller, config) {
|
|
594
|
+
const roles = await def.roles(caller);
|
|
595
|
+
if (roles.length === 0)
|
|
596
|
+
return [];
|
|
597
|
+
const wanted = allConditions(def.table);
|
|
598
|
+
const held = def.conditions && wanted.length > 0 ? await def.conditions(caller, roles, wanted, config) : /* @__PURE__ */ new Set();
|
|
599
|
+
const grants = new Set(expandRights(rightsHeld(def.table, roles, held)));
|
|
600
|
+
for (const extra of def.extraGrants?.(caller, roles, held) ?? [])
|
|
601
|
+
grants.add(extra);
|
|
602
|
+
return [...grants];
|
|
603
|
+
}
|
|
604
|
+
function desktopGrantsOf(def) {
|
|
605
|
+
return {
|
|
606
|
+
extensionName: def.extensionName,
|
|
607
|
+
resolveGrants: async (ctx) => {
|
|
608
|
+
const open = def.publicGrants ?? [];
|
|
609
|
+
if (!ctx.username)
|
|
610
|
+
return [...open];
|
|
611
|
+
const held = await desktopGrants(def, { username: ctx.username, role: ctx.userRole, status: ctx.userStatus }, ctx.config ?? null);
|
|
612
|
+
return open.length > 0 ? [.../* @__PURE__ */ new Set([...open, ...held])] : held;
|
|
613
|
+
}
|
|
614
|
+
};
|
|
615
|
+
}
|
|
616
|
+
let RightsGuard = class {
|
|
617
|
+
constructor(reflector, def) {
|
|
618
|
+
this.reflector = reflector;
|
|
619
|
+
this.def = def;
|
|
620
|
+
this.logger = new Logger(RightsGuard.name);
|
|
621
|
+
}
|
|
622
|
+
async canActivate(context) {
|
|
623
|
+
const requirement = this.reflector.getAllAndOverride(RIGHT_METADATA_KEY, [
|
|
624
|
+
context.getHandler(),
|
|
625
|
+
context.getClass()
|
|
626
|
+
]);
|
|
627
|
+
const gql = GqlExecutionContext.create(context);
|
|
628
|
+
const request = gql.getContext()?.req;
|
|
629
|
+
const user = request?.user;
|
|
630
|
+
const signedIn = user?.username ? { username: user.username, role: user.role, status: user.status } : null;
|
|
631
|
+
if (this.def.onRequest)
|
|
632
|
+
await this.def.onRequest(signedIn, request);
|
|
633
|
+
if (!requirement)
|
|
634
|
+
return true;
|
|
635
|
+
if (hasServerSecret(request?.headers)) {
|
|
636
|
+
const everything = { scopes: ["all"], kus: null };
|
|
637
|
+
if (request)
|
|
638
|
+
request[GRANTED_SCOPE_KEY] = everything;
|
|
639
|
+
return true;
|
|
640
|
+
}
|
|
641
|
+
if (!signedIn && !this.def.guestRoles)
|
|
642
|
+
throw DomainError.unauthorized("KIT_USER_NOT_AUTHORIZED");
|
|
643
|
+
const caller = signedIn ?? { username: "" };
|
|
644
|
+
const roles = signedIn ? await this.def.roles(caller, request) : [...this.def.guestRoles ?? []];
|
|
645
|
+
const outcome = await checkRight(this.def, caller, roles, requirement, gql.getArgs() ?? {});
|
|
646
|
+
if (!outcome.allowed) {
|
|
647
|
+
const actions = Array.isArray(requirement.action) ? requirement.action.join("|") : requirement.action;
|
|
648
|
+
this.logger.warn(
|
|
649
|
+
`forbidden-attempt: member=${caller.username || "guest"} extension=${this.def.extensionName} operation=${context.getClass()?.name}.${context.getHandler()?.name} right=${requirement.resource}:${actions} reason=${outcome.reason} denial=${outcome.denial} roles=[${roles.join(", ")}]`
|
|
650
|
+
);
|
|
651
|
+
throw DomainError.forbidden(outcome.denial);
|
|
652
|
+
}
|
|
653
|
+
request[GRANTED_SCOPE_KEY] = outcome.scope;
|
|
654
|
+
return true;
|
|
655
|
+
}
|
|
656
|
+
};
|
|
657
|
+
RightsGuard = __decorateClass$p([
|
|
658
|
+
Injectable(),
|
|
659
|
+
__decorateParam(0, Inject(Reflector)),
|
|
660
|
+
__decorateParam(1, Inject(APP_RIGHTS))
|
|
661
|
+
], RightsGuard);
|
|
662
|
+
|
|
663
|
+
var __defProp$o = Object.defineProperty;
|
|
664
|
+
var __getOwnPropDesc$o = Object.getOwnPropertyDescriptor;
|
|
665
|
+
var __decorateClass$o = (decorators, target, key, kind) => {
|
|
666
|
+
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$o(target, key) : target;
|
|
667
|
+
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
668
|
+
if (decorator = decorators[i])
|
|
669
|
+
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
670
|
+
if (kind && result)
|
|
671
|
+
__defProp$o(target, key, result);
|
|
353
672
|
return result;
|
|
354
673
|
};
|
|
355
674
|
let BaseExtensionModule = class {
|
|
@@ -360,34 +679,34 @@ let BaseExtensionModule = class {
|
|
|
360
679
|
async onModuleInit() {
|
|
361
680
|
}
|
|
362
681
|
};
|
|
363
|
-
BaseExtensionModule = __decorateClass$
|
|
682
|
+
BaseExtensionModule = __decorateClass$o([
|
|
364
683
|
Injectable()
|
|
365
684
|
], BaseExtensionModule);
|
|
366
685
|
|
|
367
|
-
var __defProp$
|
|
368
|
-
var __getOwnPropDesc$
|
|
369
|
-
var __decorateClass$
|
|
370
|
-
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$
|
|
686
|
+
var __defProp$n = Object.defineProperty;
|
|
687
|
+
var __getOwnPropDesc$n = Object.getOwnPropertyDescriptor;
|
|
688
|
+
var __decorateClass$n = (decorators, target, key, kind) => {
|
|
689
|
+
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$n(target, key) : target;
|
|
371
690
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
372
691
|
if (decorator = decorators[i])
|
|
373
692
|
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
374
693
|
if (kind && result)
|
|
375
|
-
__defProp$
|
|
694
|
+
__defProp$n(target, key, result);
|
|
376
695
|
return result;
|
|
377
696
|
};
|
|
378
697
|
let PaymentProvider = class extends BaseExtensionModule {
|
|
379
698
|
};
|
|
380
|
-
PaymentProvider = __decorateClass$
|
|
699
|
+
PaymentProvider = __decorateClass$n([
|
|
381
700
|
Injectable()
|
|
382
701
|
], PaymentProvider);
|
|
383
702
|
let PollingProvider = class extends PaymentProvider {
|
|
384
703
|
};
|
|
385
|
-
PollingProvider = __decorateClass$
|
|
704
|
+
PollingProvider = __decorateClass$n([
|
|
386
705
|
Injectable()
|
|
387
706
|
], PollingProvider);
|
|
388
707
|
let IPNProvider = class extends PaymentProvider {
|
|
389
708
|
};
|
|
390
|
-
IPNProvider = __decorateClass$
|
|
709
|
+
IPNProvider = __decorateClass$n([
|
|
391
710
|
Injectable()
|
|
392
711
|
], IPNProvider);
|
|
393
712
|
|
|
@@ -446,48 +765,48 @@ function bucketProvidersFor(fileStoragePortToken, consumers) {
|
|
|
446
765
|
});
|
|
447
766
|
}
|
|
448
767
|
|
|
449
|
-
var __defProp$
|
|
450
|
-
var __getOwnPropDesc$
|
|
451
|
-
var __decorateClass$
|
|
452
|
-
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$
|
|
768
|
+
var __defProp$m = Object.defineProperty;
|
|
769
|
+
var __getOwnPropDesc$m = Object.getOwnPropertyDescriptor;
|
|
770
|
+
var __decorateClass$m = (decorators, target, key, kind) => {
|
|
771
|
+
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$m(target, key) : target;
|
|
453
772
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
454
773
|
if (decorator = decorators[i])
|
|
455
774
|
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
456
775
|
if (kind && result)
|
|
457
|
-
__defProp$
|
|
776
|
+
__defProp$m(target, key, result);
|
|
458
777
|
return result;
|
|
459
778
|
};
|
|
460
779
|
let SignatureInfoInputDTO = class {
|
|
461
780
|
};
|
|
462
|
-
__decorateClass$
|
|
781
|
+
__decorateClass$m([
|
|
463
782
|
Field(() => Number, { description: "\u0418\u0434\u0435\u043D\u0442\u0438\u0444\u0438\u043A\u0430\u0442\u043E\u0440 \u043D\u043E\u043C\u0435\u0440\u0430 \u043F\u043E\u0434\u043F\u0438\u0441\u0438" }),
|
|
464
783
|
IsNumber()
|
|
465
784
|
], SignatureInfoInputDTO.prototype, "id", 2);
|
|
466
|
-
__decorateClass$
|
|
785
|
+
__decorateClass$m([
|
|
467
786
|
Field(() => String, { description: "\u0410\u043A\u043A\u0430\u0443\u043D\u0442 \u043F\u043E\u0434\u043F\u0438\u0441\u0430\u0432\u0448\u0435\u0433\u043E" }),
|
|
468
787
|
IsString()
|
|
469
788
|
], SignatureInfoInputDTO.prototype, "signer", 2);
|
|
470
|
-
__decorateClass$
|
|
789
|
+
__decorateClass$m([
|
|
471
790
|
Field(() => String, { description: "\u041F\u0443\u0431\u043B\u0438\u0447\u043D\u044B\u0439 \u043A\u043B\u044E\u0447" }),
|
|
472
791
|
IsString()
|
|
473
792
|
], SignatureInfoInputDTO.prototype, "public_key", 2);
|
|
474
|
-
__decorateClass$
|
|
793
|
+
__decorateClass$m([
|
|
475
794
|
Field(() => String, { description: "\u041F\u043E\u0434\u043F\u0438\u0441\u044C \u0445\u044D\u0448\u0430" }),
|
|
476
795
|
IsString()
|
|
477
796
|
], SignatureInfoInputDTO.prototype, "signature", 2);
|
|
478
|
-
__decorateClass$
|
|
797
|
+
__decorateClass$m([
|
|
479
798
|
Field(() => String, { description: "\u0412\u0440\u0435\u043C\u044F \u043F\u043E\u0434\u043F\u0438\u0441\u0430\u043D\u0438\u044F" }),
|
|
480
799
|
IsString()
|
|
481
800
|
], SignatureInfoInputDTO.prototype, "signed_at", 2);
|
|
482
|
-
__decorateClass$
|
|
801
|
+
__decorateClass$m([
|
|
483
802
|
Field(() => String, { description: "\u041F\u043E\u0434\u043F\u0438\u0441\u0430\u043D\u043D\u044B\u0439 \u0445\u044D\u0448" }),
|
|
484
803
|
IsString()
|
|
485
804
|
], SignatureInfoInputDTO.prototype, "signed_hash", 2);
|
|
486
|
-
__decorateClass$
|
|
805
|
+
__decorateClass$m([
|
|
487
806
|
Field(() => String, { description: "\u041C\u0435\u0442\u0430-\u0434\u0430\u043D\u043D\u044B\u0435 \u043F\u043E\u0434\u043F\u0438\u0441\u0438" }),
|
|
488
807
|
IsString()
|
|
489
808
|
], SignatureInfoInputDTO.prototype, "meta", 2);
|
|
490
|
-
SignatureInfoInputDTO = __decorateClass$
|
|
809
|
+
SignatureInfoInputDTO = __decorateClass$m([
|
|
491
810
|
InputType("SignatureInfoInput")
|
|
492
811
|
], SignatureInfoInputDTO);
|
|
493
812
|
let SignedDigitalDocumentInputDTO = class {
|
|
@@ -508,33 +827,33 @@ let SignedDigitalDocumentInputDTO = class {
|
|
|
508
827
|
};
|
|
509
828
|
}
|
|
510
829
|
};
|
|
511
|
-
__decorateClass$
|
|
830
|
+
__decorateClass$m([
|
|
512
831
|
Field(() => String, { description: "\u0412\u0435\u0440\u0441\u0438\u044F \u0441\u0442\u0430\u043D\u0434\u0430\u0440\u0442\u0430 \u0434\u043E\u043A\u0443\u043C\u0435\u043D\u0442\u0430" }),
|
|
513
832
|
IsString()
|
|
514
833
|
], SignedDigitalDocumentInputDTO.prototype, "version", 2);
|
|
515
|
-
__decorateClass$
|
|
834
|
+
__decorateClass$m([
|
|
516
835
|
Field(() => String, { description: "\u041E\u0431\u0449\u0438\u0439 \u0445\u044D\u0448 (doc_hash + meta_hash)" }),
|
|
517
836
|
IsString()
|
|
518
837
|
], SignedDigitalDocumentInputDTO.prototype, "hash", 2);
|
|
519
|
-
__decorateClass$
|
|
838
|
+
__decorateClass$m([
|
|
520
839
|
Field(() => String, { description: "\u0425\u044D\u0448 \u0441\u043E\u0434\u0435\u0440\u0436\u0438\u043C\u043E\u0433\u043E \u0434\u043E\u043A\u0443\u043C\u0435\u043D\u0442\u0430" }),
|
|
521
840
|
IsString()
|
|
522
841
|
], SignedDigitalDocumentInputDTO.prototype, "doc_hash", 2);
|
|
523
|
-
__decorateClass$
|
|
842
|
+
__decorateClass$m([
|
|
524
843
|
Field(() => String, { description: "\u0425\u044D\u0448 \u043C\u0435\u0442\u0430-\u0434\u0430\u043D\u043D\u044B\u0445" }),
|
|
525
844
|
IsString()
|
|
526
845
|
], SignedDigitalDocumentInputDTO.prototype, "meta_hash", 2);
|
|
527
|
-
__decorateClass$
|
|
846
|
+
__decorateClass$m([
|
|
528
847
|
Field(() => GraphQLJSON, { description: "\u041C\u0435\u0442\u0430\u0438\u043D\u0444\u043E\u0440\u043C\u0430\u0446\u0438\u044F \u0434\u043E\u043A\u0443\u043C\u0435\u043D\u0442\u0430" })
|
|
529
848
|
], SignedDigitalDocumentInputDTO.prototype, "meta", 2);
|
|
530
|
-
__decorateClass$
|
|
849
|
+
__decorateClass$m([
|
|
531
850
|
Field(() => [SignatureInfoInputDTO], { description: "\u0412\u0435\u043A\u0442\u043E\u0440 \u043F\u043E\u0434\u043F\u0438\u0441\u0435\u0439" }),
|
|
532
851
|
IsArray(),
|
|
533
852
|
ArrayMinSize(1),
|
|
534
853
|
ValidateNested({ each: true }),
|
|
535
854
|
Type(() => SignatureInfoInputDTO)
|
|
536
855
|
], SignedDigitalDocumentInputDTO.prototype, "signatures", 2);
|
|
537
|
-
SignedDigitalDocumentInputDTO = __decorateClass$
|
|
856
|
+
SignedDigitalDocumentInputDTO = __decorateClass$m([
|
|
538
857
|
InputType("SignedDigitalDocumentInput")
|
|
539
858
|
], SignedDigitalDocumentInputDTO);
|
|
540
859
|
|
|
@@ -547,186 +866,186 @@ registerEnumType(LangType, {
|
|
|
547
866
|
description: "\u042F\u0437\u044B\u043A \u0434\u043E\u043A\u0443\u043C\u0435\u043D\u0442\u0430"
|
|
548
867
|
});
|
|
549
868
|
|
|
550
|
-
var __defProp$
|
|
551
|
-
var __getOwnPropDesc$
|
|
552
|
-
var __decorateClass$
|
|
553
|
-
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$
|
|
869
|
+
var __defProp$l = Object.defineProperty;
|
|
870
|
+
var __getOwnPropDesc$l = Object.getOwnPropertyDescriptor;
|
|
871
|
+
var __decorateClass$l = (decorators, target, key, kind) => {
|
|
872
|
+
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$l(target, key) : target;
|
|
554
873
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
555
874
|
if (decorator = decorators[i])
|
|
556
875
|
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
557
876
|
if (kind && result)
|
|
558
|
-
__defProp$
|
|
877
|
+
__defProp$l(target, key, result);
|
|
559
878
|
return result;
|
|
560
879
|
};
|
|
561
880
|
let MetaDocumentInputDTO = class {
|
|
562
881
|
};
|
|
563
|
-
__decorateClass$
|
|
882
|
+
__decorateClass$l([
|
|
564
883
|
Field(() => String, { description: "\u041D\u0430\u0437\u0432\u0430\u043D\u0438\u0435 \u0434\u043E\u043A\u0443\u043C\u0435\u043D\u0442\u0430" }),
|
|
565
884
|
IsString()
|
|
566
885
|
], MetaDocumentInputDTO.prototype, "title", 2);
|
|
567
|
-
__decorateClass$
|
|
886
|
+
__decorateClass$l([
|
|
568
887
|
Field(() => Int, { description: "ID \u0434\u043E\u043A\u0443\u043C\u0435\u043D\u0442\u0430 \u0432 \u0440\u0435\u0435\u0441\u0442\u0440\u0435" }),
|
|
569
888
|
IsNumber()
|
|
570
889
|
], MetaDocumentInputDTO.prototype, "registry_id", 2);
|
|
571
|
-
__decorateClass$
|
|
890
|
+
__decorateClass$l([
|
|
572
891
|
Field(() => String, { description: "\u042F\u0437\u044B\u043A \u0434\u043E\u043A\u0443\u043C\u0435\u043D\u0442\u0430" }),
|
|
573
892
|
IsEnum(LangType)
|
|
574
893
|
], MetaDocumentInputDTO.prototype, "lang", 2);
|
|
575
|
-
__decorateClass$
|
|
894
|
+
__decorateClass$l([
|
|
576
895
|
Field(() => String, { description: "\u0418\u043C\u044F \u0433\u0435\u043D\u0435\u0440\u0430\u0442\u043E\u0440\u0430, \u0438\u0441\u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u043D\u043D\u043E\u0433\u043E \u0434\u043B\u044F \u0441\u043E\u0437\u0434\u0430\u043D\u0438\u044F \u0434\u043E\u043A\u0443\u043C\u0435\u043D\u0442\u0430" }),
|
|
577
896
|
IsString()
|
|
578
897
|
], MetaDocumentInputDTO.prototype, "generator", 2);
|
|
579
|
-
__decorateClass$
|
|
898
|
+
__decorateClass$l([
|
|
580
899
|
Field(() => String, { description: "\u0412\u0435\u0440\u0441\u0438\u044F \u0433\u0435\u043D\u0435\u0440\u0430\u0442\u043E\u0440\u0430, \u0438\u0441\u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u043D\u043D\u043E\u0433\u043E \u0434\u043B\u044F \u0441\u043E\u0437\u0434\u0430\u043D\u0438\u044F \u0434\u043E\u043A\u0443\u043C\u0435\u043D\u0442\u0430" }),
|
|
581
900
|
IsString()
|
|
582
901
|
], MetaDocumentInputDTO.prototype, "version", 2);
|
|
583
|
-
__decorateClass$
|
|
902
|
+
__decorateClass$l([
|
|
584
903
|
Field(() => String, { description: "\u041D\u0430\u0437\u0432\u0430\u043D\u0438\u0435 \u043A\u043E\u043E\u043F\u0435\u0440\u0430\u0442\u0438\u0432\u0430, \u0441\u0432\u044F\u0437\u0430\u043D\u043D\u043E\u0435 \u0441 \u0434\u043E\u043A\u0443\u043C\u0435\u043D\u0442\u043E\u043C" }),
|
|
585
904
|
IsString()
|
|
586
905
|
], MetaDocumentInputDTO.prototype, "coopname", 2);
|
|
587
|
-
__decorateClass$
|
|
906
|
+
__decorateClass$l([
|
|
588
907
|
Field(() => String, { description: "\u0418\u043C\u044F \u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u0435\u043B\u044F, \u0441\u043E\u0437\u0434\u0430\u0432\u0448\u0435\u0433\u043E \u0434\u043E\u043A\u0443\u043C\u0435\u043D\u0442" }),
|
|
589
908
|
IsString()
|
|
590
909
|
], MetaDocumentInputDTO.prototype, "username", 2);
|
|
591
|
-
__decorateClass$
|
|
910
|
+
__decorateClass$l([
|
|
592
911
|
Field(() => String, { description: "\u0414\u0430\u0442\u0430 \u0438 \u0432\u0440\u0435\u043C\u044F \u0441\u043E\u0437\u0434\u0430\u043D\u0438\u044F \u0434\u043E\u043A\u0443\u043C\u0435\u043D\u0442\u0430" }),
|
|
593
912
|
IsString()
|
|
594
913
|
], MetaDocumentInputDTO.prototype, "created_at", 2);
|
|
595
|
-
__decorateClass$
|
|
914
|
+
__decorateClass$l([
|
|
596
915
|
Field(() => Int, { description: "\u041D\u043E\u043C\u0435\u0440 \u0431\u043B\u043E\u043A\u0430, \u043D\u0430 \u043A\u043E\u0442\u043E\u0440\u043E\u043C \u0431\u044B\u043B \u0441\u043E\u0437\u0434\u0430\u043D \u0434\u043E\u043A\u0443\u043C\u0435\u043D\u0442" }),
|
|
597
916
|
IsInt()
|
|
598
917
|
], MetaDocumentInputDTO.prototype, "block_num", 2);
|
|
599
|
-
__decorateClass$
|
|
918
|
+
__decorateClass$l([
|
|
600
919
|
Field(() => String, { description: "\u0427\u0430\u0441\u043E\u0432\u043E\u0439 \u043F\u043E\u044F\u0441, \u0432 \u043A\u043E\u0442\u043E\u0440\u043E\u043C \u0431\u044B\u043B \u0441\u043E\u0437\u0434\u0430\u043D \u0434\u043E\u043A\u0443\u043C\u0435\u043D\u0442" }),
|
|
601
920
|
IsString()
|
|
602
921
|
], MetaDocumentInputDTO.prototype, "timezone", 2);
|
|
603
|
-
__decorateClass$
|
|
922
|
+
__decorateClass$l([
|
|
604
923
|
Field(() => [String], { description: "\u0421\u0441\u044B\u043B\u043A\u0438, \u0441\u0432\u044F\u0437\u0430\u043D\u043D\u044B\u0435 \u0441 \u0434\u043E\u043A\u0443\u043C\u0435\u043D\u0442\u043E\u043C" }),
|
|
605
924
|
IsArray(),
|
|
606
925
|
IsString({ each: true })
|
|
607
926
|
], MetaDocumentInputDTO.prototype, "links", 2);
|
|
608
|
-
MetaDocumentInputDTO = __decorateClass$
|
|
927
|
+
MetaDocumentInputDTO = __decorateClass$l([
|
|
609
928
|
InputType("MetaDocumentInput")
|
|
610
929
|
], MetaDocumentInputDTO);
|
|
611
930
|
|
|
612
|
-
var __defProp$
|
|
613
|
-
var __getOwnPropDesc$
|
|
614
|
-
var __decorateClass$
|
|
615
|
-
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$
|
|
931
|
+
var __defProp$k = Object.defineProperty;
|
|
932
|
+
var __getOwnPropDesc$k = Object.getOwnPropertyDescriptor;
|
|
933
|
+
var __decorateClass$k = (decorators, target, key, kind) => {
|
|
934
|
+
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$k(target, key) : target;
|
|
616
935
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
617
936
|
if (decorator = decorators[i])
|
|
618
937
|
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
619
938
|
if (kind && result)
|
|
620
|
-
__defProp$
|
|
939
|
+
__defProp$k(target, key, result);
|
|
621
940
|
return result;
|
|
622
941
|
};
|
|
623
942
|
let GenerateMetaDocumentInputDTO = class {
|
|
624
943
|
};
|
|
625
|
-
__decorateClass$
|
|
944
|
+
__decorateClass$k([
|
|
626
945
|
Field(() => String, { description: "\u041D\u0430\u0437\u0432\u0430\u043D\u0438\u0435 \u0434\u043E\u043A\u0443\u043C\u0435\u043D\u0442\u0430", nullable: true }),
|
|
627
946
|
IsOptional(),
|
|
628
947
|
IsString()
|
|
629
948
|
], GenerateMetaDocumentInputDTO.prototype, "title", 2);
|
|
630
|
-
__decorateClass$
|
|
949
|
+
__decorateClass$k([
|
|
631
950
|
Field(() => Int, { description: "ID \u0434\u043E\u043A\u0443\u043C\u0435\u043D\u0442\u0430 \u0432 \u0440\u0435\u0435\u0441\u0442\u0440\u0435" }),
|
|
632
951
|
IsNumber()
|
|
633
952
|
], GenerateMetaDocumentInputDTO.prototype, "registry_id", 2);
|
|
634
|
-
__decorateClass$
|
|
953
|
+
__decorateClass$k([
|
|
635
954
|
Field(() => String, { description: "\u041D\u0430\u0437\u0432\u0430\u043D\u0438\u0435 \u043A\u043E\u043E\u043F\u0435\u0440\u0430\u0442\u0438\u0432\u0430, \u0441\u0432\u044F\u0437\u0430\u043D\u043D\u043E\u0435 \u0441 \u0434\u043E\u043A\u0443\u043C\u0435\u043D\u0442\u043E\u043C" }),
|
|
636
955
|
IsString()
|
|
637
956
|
], GenerateMetaDocumentInputDTO.prototype, "coopname", 2);
|
|
638
|
-
__decorateClass$
|
|
957
|
+
__decorateClass$k([
|
|
639
958
|
Field(() => String, { description: "\u0418\u043C\u044F \u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u0435\u043B\u044F, \u0441\u043E\u0437\u0434\u0430\u0432\u0448\u0435\u0433\u043E \u0434\u043E\u043A\u0443\u043C\u0435\u043D\u0442" }),
|
|
640
959
|
IsString()
|
|
641
960
|
], GenerateMetaDocumentInputDTO.prototype, "username", 2);
|
|
642
|
-
__decorateClass$
|
|
961
|
+
__decorateClass$k([
|
|
643
962
|
Field(() => String, { description: "\u042F\u0437\u044B\u043A \u0434\u043E\u043A\u0443\u043C\u0435\u043D\u0442\u0430", nullable: true }),
|
|
644
963
|
IsOptional(),
|
|
645
964
|
IsEnum(LangType)
|
|
646
965
|
], GenerateMetaDocumentInputDTO.prototype, "lang", 2);
|
|
647
|
-
__decorateClass$
|
|
966
|
+
__decorateClass$k([
|
|
648
967
|
Field(() => String, { description: "\u0418\u043C\u044F \u0433\u0435\u043D\u0435\u0440\u0430\u0442\u043E\u0440\u0430, \u0438\u0441\u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u043D\u043D\u043E\u0433\u043E \u0434\u043B\u044F \u0441\u043E\u0437\u0434\u0430\u043D\u0438\u044F \u0434\u043E\u043A\u0443\u043C\u0435\u043D\u0442\u0430", nullable: true }),
|
|
649
968
|
IsOptional(),
|
|
650
969
|
IsString()
|
|
651
970
|
], GenerateMetaDocumentInputDTO.prototype, "generator", 2);
|
|
652
|
-
__decorateClass$
|
|
971
|
+
__decorateClass$k([
|
|
653
972
|
Field(() => String, { description: "\u0412\u0435\u0440\u0441\u0438\u044F \u0433\u0435\u043D\u0435\u0440\u0430\u0442\u043E\u0440\u0430, \u0438\u0441\u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u043D\u043D\u043E\u0433\u043E \u0434\u043B\u044F \u0441\u043E\u0437\u0434\u0430\u043D\u0438\u044F \u0434\u043E\u043A\u0443\u043C\u0435\u043D\u0442\u0430", nullable: true }),
|
|
654
973
|
IsOptional(),
|
|
655
974
|
IsString()
|
|
656
975
|
], GenerateMetaDocumentInputDTO.prototype, "version", 2);
|
|
657
|
-
__decorateClass$
|
|
976
|
+
__decorateClass$k([
|
|
658
977
|
Field(() => String, { description: "\u0414\u0430\u0442\u0430 \u0438 \u0432\u0440\u0435\u043C\u044F \u0441\u043E\u0437\u0434\u0430\u043D\u0438\u044F \u0434\u043E\u043A\u0443\u043C\u0435\u043D\u0442\u0430", nullable: true }),
|
|
659
978
|
IsOptional()
|
|
660
979
|
], GenerateMetaDocumentInputDTO.prototype, "created_at", 2);
|
|
661
|
-
__decorateClass$
|
|
980
|
+
__decorateClass$k([
|
|
662
981
|
Field(() => Int, { description: "\u041D\u043E\u043C\u0435\u0440 \u0431\u043B\u043E\u043A\u0430, \u043D\u0430 \u043A\u043E\u0442\u043E\u0440\u043E\u043C \u0431\u044B\u043B \u0441\u043E\u0437\u0434\u0430\u043D \u0434\u043E\u043A\u0443\u043C\u0435\u043D\u0442", nullable: true }),
|
|
663
982
|
IsOptional(),
|
|
664
983
|
IsInt()
|
|
665
984
|
], GenerateMetaDocumentInputDTO.prototype, "block_num", 2);
|
|
666
|
-
__decorateClass$
|
|
985
|
+
__decorateClass$k([
|
|
667
986
|
Field(() => String, { description: "\u0427\u0430\u0441\u043E\u0432\u043E\u0439 \u043F\u043E\u044F\u0441, \u0432 \u043A\u043E\u0442\u043E\u0440\u043E\u043C \u0431\u044B\u043B \u0441\u043E\u0437\u0434\u0430\u043D \u0434\u043E\u043A\u0443\u043C\u0435\u043D\u0442", nullable: true }),
|
|
668
987
|
IsOptional(),
|
|
669
988
|
IsString()
|
|
670
989
|
], GenerateMetaDocumentInputDTO.prototype, "timezone", 2);
|
|
671
|
-
__decorateClass$
|
|
990
|
+
__decorateClass$k([
|
|
672
991
|
Field(() => [String], { description: "\u0421\u0441\u044B\u043B\u043A\u0438, \u0441\u0432\u044F\u0437\u0430\u043D\u043D\u044B\u0435 \u0441 \u0434\u043E\u043A\u0443\u043C\u0435\u043D\u0442\u043E\u043C", nullable: true }),
|
|
673
992
|
IsOptional(),
|
|
674
993
|
IsArray(),
|
|
675
994
|
IsString({ each: true })
|
|
676
995
|
], GenerateMetaDocumentInputDTO.prototype, "links", 2);
|
|
677
|
-
GenerateMetaDocumentInputDTO = __decorateClass$
|
|
996
|
+
GenerateMetaDocumentInputDTO = __decorateClass$k([
|
|
678
997
|
InputType("GenerateMetaDocumentInput")
|
|
679
998
|
], GenerateMetaDocumentInputDTO);
|
|
680
999
|
|
|
681
|
-
var __defProp$
|
|
682
|
-
var __getOwnPropDesc$
|
|
683
|
-
var __decorateClass$
|
|
684
|
-
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$
|
|
1000
|
+
var __defProp$j = Object.defineProperty;
|
|
1001
|
+
var __getOwnPropDesc$j = Object.getOwnPropertyDescriptor;
|
|
1002
|
+
var __decorateClass$j = (decorators, target, key, kind) => {
|
|
1003
|
+
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$j(target, key) : target;
|
|
685
1004
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
686
1005
|
if (decorator = decorators[i])
|
|
687
1006
|
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
688
1007
|
if (kind && result)
|
|
689
|
-
__defProp$
|
|
1008
|
+
__defProp$j(target, key, result);
|
|
690
1009
|
return result;
|
|
691
1010
|
};
|
|
692
1011
|
let ExpenseProposalItemInputDTO = class {
|
|
693
1012
|
};
|
|
694
|
-
__decorateClass$
|
|
1013
|
+
__decorateClass$j([
|
|
695
1014
|
Field(() => String, { description: "\u041F\u043E\u0440\u044F\u0434\u043A\u043E\u0432\u044B\u0439 \u043D\u043E\u043C\u0435\u0440 \u0441\u0442\u0440\u043E\u043A\u0438" }),
|
|
696
1015
|
IsString()
|
|
697
1016
|
], ExpenseProposalItemInputDTO.prototype, "number", 2);
|
|
698
|
-
__decorateClass$
|
|
1017
|
+
__decorateClass$j([
|
|
699
1018
|
Field(() => String, { description: "\u041E\u043F\u0438\u0441\u0430\u043D\u0438\u0435 \u0440\u0430\u0441\u0445\u043E\u0434\u0430" }),
|
|
700
1019
|
IsString()
|
|
701
1020
|
], ExpenseProposalItemInputDTO.prototype, "description", 2);
|
|
702
|
-
__decorateClass$
|
|
1021
|
+
__decorateClass$j([
|
|
703
1022
|
Field(() => String, { description: "\u0421\u0443\u043C\u043C\u0430 \u0441\u0442\u0440\u043E\u043A\u0438" }),
|
|
704
1023
|
IsString()
|
|
705
1024
|
], ExpenseProposalItemInputDTO.prototype, "amount", 2);
|
|
706
|
-
__decorateClass$
|
|
1025
|
+
__decorateClass$j([
|
|
707
1026
|
Field(() => String, { description: "\u0422\u0438\u043F \u043F\u043E\u043B\u0443\u0447\u0430\u0442\u0435\u043B\u044F (SELF / MEMBER / ORG)" }),
|
|
708
1027
|
IsString()
|
|
709
1028
|
], ExpenseProposalItemInputDTO.prototype, "recipient_type", 2);
|
|
710
|
-
__decorateClass$
|
|
1029
|
+
__decorateClass$j([
|
|
711
1030
|
Field(() => String, { description: "\u0421\u043F\u043E\u0441\u043E\u0431 \u043E\u043F\u043B\u0430\u0442\u044B (ADVANCE / DIRECT)" }),
|
|
712
1031
|
IsString()
|
|
713
1032
|
], ExpenseProposalItemInputDTO.prototype, "mechanics", 2);
|
|
714
|
-
__decorateClass$
|
|
1033
|
+
__decorateClass$j([
|
|
715
1034
|
Field(() => String, { description: "\u0418\u043C\u044F \u043F\u043E\u043B\u0443\u0447\u0430\u0442\u0435\u043B\u044F", nullable: true }),
|
|
716
1035
|
IsOptional(),
|
|
717
1036
|
IsString()
|
|
718
1037
|
], ExpenseProposalItemInputDTO.prototype, "recipient_name", 2);
|
|
719
|
-
__decorateClass$
|
|
1038
|
+
__decorateClass$j([
|
|
720
1039
|
Field(() => String, { description: "\u0420\u0435\u043A\u0432\u0438\u0437\u0438\u0442\u044B \u043F\u043E\u043B\u0443\u0447\u0430\u0442\u0435\u043B\u044F", nullable: true }),
|
|
721
1040
|
IsOptional(),
|
|
722
1041
|
IsString()
|
|
723
1042
|
], ExpenseProposalItemInputDTO.prototype, "requisites", 2);
|
|
724
|
-
__decorateClass$
|
|
1043
|
+
__decorateClass$j([
|
|
725
1044
|
Field(() => String, { description: "\u041D\u0430\u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435 \u043F\u043B\u0430\u0442\u0435\u0436\u0430 \u2014 \u043E\u0442\u0434\u0435\u043B\u044C\u043D\u043E\u0439 \u0441\u0442\u0440\u043E\u043A\u043E\u0439 \u043F\u043E\u0441\u043B\u0435 \u0440\u0435\u043A\u0432\u0438\u0437\u0438\u0442\u043E\u0432", nullable: true }),
|
|
726
1045
|
IsOptional(),
|
|
727
1046
|
IsString()
|
|
728
1047
|
], ExpenseProposalItemInputDTO.prototype, "payment_purpose", 2);
|
|
729
|
-
__decorateClass$
|
|
1048
|
+
__decorateClass$j([
|
|
730
1049
|
Field(() => String, {
|
|
731
1050
|
description: "\u0418\u0434\u0435\u043D\u0442\u0438\u0444\u0438\u043A\u0430\u0442\u043E\u0440 \u0441\u043E\u0445\u0440\u0430\u043D\u0451\u043D\u043D\u044B\u0445 \u0440\u0435\u043A\u0432\u0438\u0437\u0438\u0442\u043E\u0432 \u043F\u043E\u043B\u0443\u0447\u0430\u0442\u0435\u043B\u044F-\u043F\u0430\u0439\u0449\u0438\u043A\u0430 \u2014 \u0441\u0435\u0440\u0432\u0435\u0440 \u043F\u043E\u0434\u0441\u0442\u0430\u0432\u0438\u0442 \u043F\u043E\u043B\u043D\u044B\u0435 \u0440\u0435\u043A\u0432\u0438\u0437\u0438\u0442\u044B \u0432 \u0434\u043E\u043A\u0443\u043C\u0435\u043D\u0442.",
|
|
732
1051
|
nullable: true
|
|
@@ -734,7 +1053,7 @@ __decorateClass$a([
|
|
|
734
1053
|
IsOptional(),
|
|
735
1054
|
IsString()
|
|
736
1055
|
], ExpenseProposalItemInputDTO.prototype, "payment_method_id", 2);
|
|
737
|
-
__decorateClass$
|
|
1056
|
+
__decorateClass$j([
|
|
738
1057
|
Field(() => String, {
|
|
739
1058
|
description: "\u0418\u043C\u044F \u0430\u043A\u043A\u0430\u0443\u043D\u0442\u0430 \u043F\u043E\u043B\u0443\u0447\u0430\u0442\u0435\u043B\u044F-\u043F\u0430\u0439\u0449\u0438\u043A\u0430 (\u0432\u043B\u0430\u0434\u0435\u043B\u0435\u0446 \u0440\u0435\u043A\u0432\u0438\u0437\u0438\u0442\u043E\u0432).",
|
|
740
1059
|
nullable: true
|
|
@@ -742,60 +1061,60 @@ __decorateClass$a([
|
|
|
742
1061
|
IsOptional(),
|
|
743
1062
|
IsString()
|
|
744
1063
|
], ExpenseProposalItemInputDTO.prototype, "recipient_username", 2);
|
|
745
|
-
ExpenseProposalItemInputDTO = __decorateClass$
|
|
1064
|
+
ExpenseProposalItemInputDTO = __decorateClass$j([
|
|
746
1065
|
InputType("ExpenseProposalItemInput")
|
|
747
1066
|
], ExpenseProposalItemInputDTO);
|
|
748
1067
|
let ExpenseProposalSignedItemInputDTO = class {
|
|
749
1068
|
};
|
|
750
|
-
__decorateClass$
|
|
1069
|
+
__decorateClass$j([
|
|
751
1070
|
Field(() => String, { description: "\u041F\u043E\u0440\u044F\u0434\u043A\u043E\u0432\u044B\u0439 \u043D\u043E\u043C\u0435\u0440 \u0441\u0442\u0440\u043E\u043A\u0438" }),
|
|
752
1071
|
IsString()
|
|
753
1072
|
], ExpenseProposalSignedItemInputDTO.prototype, "number", 2);
|
|
754
|
-
__decorateClass$
|
|
1073
|
+
__decorateClass$j([
|
|
755
1074
|
Field(() => String, { description: "\u041E\u043F\u0438\u0441\u0430\u043D\u0438\u0435 \u0440\u0430\u0441\u0445\u043E\u0434\u0430" }),
|
|
756
1075
|
IsString()
|
|
757
1076
|
], ExpenseProposalSignedItemInputDTO.prototype, "description", 2);
|
|
758
|
-
__decorateClass$
|
|
1077
|
+
__decorateClass$j([
|
|
759
1078
|
Field(() => String, { description: "\u0421\u0443\u043C\u043C\u0430 \u0441\u0442\u0440\u043E\u043A\u0438" }),
|
|
760
1079
|
IsString()
|
|
761
1080
|
], ExpenseProposalSignedItemInputDTO.prototype, "amount", 2);
|
|
762
|
-
__decorateClass$
|
|
1081
|
+
__decorateClass$j([
|
|
763
1082
|
Field(() => String, { description: "\u0422\u0438\u043F \u043F\u043E\u043B\u0443\u0447\u0430\u0442\u0435\u043B\u044F (SELF / MEMBER / ORG)" }),
|
|
764
1083
|
IsString()
|
|
765
1084
|
], ExpenseProposalSignedItemInputDTO.prototype, "recipient_type", 2);
|
|
766
|
-
__decorateClass$
|
|
1085
|
+
__decorateClass$j([
|
|
767
1086
|
Field(() => String, { description: "\u0421\u043F\u043E\u0441\u043E\u0431 \u043E\u043F\u043B\u0430\u0442\u044B (ADVANCE / DIRECT)" }),
|
|
768
1087
|
IsString()
|
|
769
1088
|
], ExpenseProposalSignedItemInputDTO.prototype, "mechanics", 2);
|
|
770
|
-
ExpenseProposalSignedItemInputDTO = __decorateClass$
|
|
1089
|
+
ExpenseProposalSignedItemInputDTO = __decorateClass$j([
|
|
771
1090
|
InputType("ExpenseProposalSignedItemInput")
|
|
772
1091
|
], ExpenseProposalSignedItemInputDTO);
|
|
773
1092
|
let ExpenseProposalHeaderInputDTO = class {
|
|
774
1093
|
};
|
|
775
|
-
__decorateClass$
|
|
1094
|
+
__decorateClass$j([
|
|
776
1095
|
Field(() => String, { description: "\u041E\u043F\u0438\u0441\u0430\u043D\u0438\u0435 \u0446\u0435\u043B\u0438 \u0440\u0430\u0441\u0445\u043E\u0434\u043E\u0432" }),
|
|
777
1096
|
IsString()
|
|
778
1097
|
], ExpenseProposalHeaderInputDTO.prototype, "description", 2);
|
|
779
|
-
__decorateClass$
|
|
1098
|
+
__decorateClass$j([
|
|
780
1099
|
Field(() => String, { description: "\u0418\u0442\u043E\u0433\u043E\u0432\u0430\u044F \u0441\u0443\u043C\u043C\u0430 \u0440\u0430\u0441\u0445\u043E\u0434\u043E\u0432" }),
|
|
781
1100
|
IsString()
|
|
782
1101
|
], ExpenseProposalHeaderInputDTO.prototype, "total_amount", 2);
|
|
783
|
-
__decorateClass$
|
|
1102
|
+
__decorateClass$j([
|
|
784
1103
|
Field(() => Int, { description: "\u041A\u043E\u043B\u0438\u0447\u0435\u0441\u0442\u0432\u043E \u043F\u043E\u0437\u0438\u0446\u0438\u0439" }),
|
|
785
1104
|
IsInt()
|
|
786
1105
|
], ExpenseProposalHeaderInputDTO.prototype, "items_count", 2);
|
|
787
|
-
__decorateClass$
|
|
1106
|
+
__decorateClass$j([
|
|
788
1107
|
Field(() => String, { description: "\u041A\u043E\u0448\u0435\u043B\u0451\u043A-\u0438\u0441\u0442\u043E\u0447\u043D\u0438\u043A" }),
|
|
789
1108
|
IsString()
|
|
790
1109
|
], ExpenseProposalHeaderInputDTO.prototype, "source_wallet", 2);
|
|
791
|
-
__decorateClass$
|
|
1110
|
+
__decorateClass$j([
|
|
792
1111
|
Field(() => String, { description: "\u0421\u0440\u043E\u043A \u0438\u0441\u043F\u043E\u043B\u043D\u0435\u043D\u0438\u044F (\xAB\u0432 \u0441\u0440\u043E\u043A \u0434\u043E\xBB), \u0444\u043E\u0440\u043C\u0430\u0442 DD.MM.YYYY" }),
|
|
793
1112
|
IsString(),
|
|
794
1113
|
Matches(/^\d{2}\.\d{2}\.\d{4}$/, {
|
|
795
1114
|
message: validationMessage("kit.expenseStatement.dueDateFormat")
|
|
796
1115
|
})
|
|
797
1116
|
], ExpenseProposalHeaderInputDTO.prototype, "deadline", 2);
|
|
798
|
-
__decorateClass$
|
|
1117
|
+
__decorateClass$j([
|
|
799
1118
|
Field(() => String, {
|
|
800
1119
|
description: "\u0424\u043E\u043D\u0434 \u0441\u043F\u0438\u0441\u0430\u043D\u0438\u044F \u2014 \u043F\u043E\u0434\u0441\u0442\u0430\u0432\u043B\u044F\u0435\u0442\u0441\u044F \u0441\u0435\u0440\u0432\u0435\u0440\u043E\u043C \u0438\u0437 \u043F\u0430\u0440\u0430\u043C\u0435\u0442\u0440\u043E\u0432 \u0448\u0430\u0441\u0441\u0438 \u0440\u0430\u0441\u0445\u043E\u0434\u043E\u0432, \u043F\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u0442\u044C \u043D\u0435 \u043D\u0443\u0436\u043D\u043E",
|
|
801
1120
|
nullable: true
|
|
@@ -803,56 +1122,56 @@ __decorateClass$a([
|
|
|
803
1122
|
IsOptional(),
|
|
804
1123
|
IsString()
|
|
805
1124
|
], ExpenseProposalHeaderInputDTO.prototype, "fund_name", 2);
|
|
806
|
-
ExpenseProposalHeaderInputDTO = __decorateClass$
|
|
1125
|
+
ExpenseProposalHeaderInputDTO = __decorateClass$j([
|
|
807
1126
|
InputType("ExpenseProposalHeaderInput")
|
|
808
1127
|
], ExpenseProposalHeaderInputDTO);
|
|
809
1128
|
let BaseExpenseProposalStatementGenerateMetaDocumentInputDTO = class {
|
|
810
1129
|
};
|
|
811
|
-
__decorateClass$
|
|
1130
|
+
__decorateClass$j([
|
|
812
1131
|
Field(() => String, { description: "\u0425\u0435\u0448 \u0441\u043C\u0435\u0442\u044B \u0440\u0430\u0441\u0445\u043E\u0434\u0430 (\u0434\u0435\u0442\u0435\u0440\u043C\u0438\u043D\u0438\u0440\u043E\u0432\u0430\u043D\u043D\u044B\u0439)" }),
|
|
813
1132
|
IsString(),
|
|
814
1133
|
IsNotEmpty()
|
|
815
1134
|
], BaseExpenseProposalStatementGenerateMetaDocumentInputDTO.prototype, "proposal_hash", 2);
|
|
816
|
-
__decorateClass$
|
|
1135
|
+
__decorateClass$j([
|
|
817
1136
|
Field(() => ExpenseProposalHeaderInputDTO, { description: "\u0428\u0430\u043F\u043A\u0430 \u0421\u0417" }),
|
|
818
1137
|
ValidateNested(),
|
|
819
1138
|
Type(() => ExpenseProposalHeaderInputDTO)
|
|
820
1139
|
], BaseExpenseProposalStatementGenerateMetaDocumentInputDTO.prototype, "proposal", 2);
|
|
821
|
-
__decorateClass$
|
|
1140
|
+
__decorateClass$j([
|
|
822
1141
|
Field(() => [ExpenseProposalItemInputDTO], { description: "\u041F\u043E\u0437\u0438\u0446\u0438\u0438 \u0440\u0430\u0441\u0445\u043E\u0434\u0430" }),
|
|
823
1142
|
IsArray(),
|
|
824
1143
|
ArrayMinSize(1),
|
|
825
1144
|
ValidateNested({ each: true }),
|
|
826
1145
|
Type(() => ExpenseProposalItemInputDTO)
|
|
827
1146
|
], BaseExpenseProposalStatementGenerateMetaDocumentInputDTO.prototype, "items", 2);
|
|
828
|
-
BaseExpenseProposalStatementGenerateMetaDocumentInputDTO = __decorateClass$
|
|
1147
|
+
BaseExpenseProposalStatementGenerateMetaDocumentInputDTO = __decorateClass$j([
|
|
829
1148
|
InputType("BaseExpenseProposalStatementGenerateMetaDocumentInput")
|
|
830
1149
|
], BaseExpenseProposalStatementGenerateMetaDocumentInputDTO);
|
|
831
1150
|
let BaseExpenseProposalStatementSignedMetaDocumentInputDTO = class {
|
|
832
1151
|
};
|
|
833
|
-
__decorateClass$
|
|
1152
|
+
__decorateClass$j([
|
|
834
1153
|
Field(() => String, { description: "\u0425\u0435\u0448 \u0441\u043C\u0435\u0442\u044B \u0440\u0430\u0441\u0445\u043E\u0434\u0430 (\u0434\u0435\u0442\u0435\u0440\u043C\u0438\u043D\u0438\u0440\u043E\u0432\u0430\u043D\u043D\u044B\u0439)" }),
|
|
835
1154
|
IsString(),
|
|
836
1155
|
IsNotEmpty()
|
|
837
1156
|
], BaseExpenseProposalStatementSignedMetaDocumentInputDTO.prototype, "proposal_hash", 2);
|
|
838
|
-
__decorateClass$
|
|
1157
|
+
__decorateClass$j([
|
|
839
1158
|
Field(() => ExpenseProposalHeaderInputDTO, { description: "\u0428\u0430\u043F\u043A\u0430 \u0421\u0417" }),
|
|
840
1159
|
ValidateNested(),
|
|
841
1160
|
Type(() => ExpenseProposalHeaderInputDTO)
|
|
842
1161
|
], BaseExpenseProposalStatementSignedMetaDocumentInputDTO.prototype, "proposal", 2);
|
|
843
|
-
__decorateClass$
|
|
1162
|
+
__decorateClass$j([
|
|
844
1163
|
Field(() => [ExpenseProposalSignedItemInputDTO], { description: "\u041F\u0443\u0431\u043B\u0438\u0447\u043D\u044B\u0435 \u043F\u043E\u0437\u0438\u0446\u0438\u0438 \u0440\u0430\u0441\u0445\u043E\u0434\u0430 (\u0431\u0435\u0437 \u0440\u0435\u043A\u0432\u0438\u0437\u0438\u0442\u043E\u0432)" }),
|
|
845
1164
|
IsArray(),
|
|
846
1165
|
ArrayMinSize(1),
|
|
847
1166
|
ValidateNested({ each: true }),
|
|
848
1167
|
Type(() => ExpenseProposalSignedItemInputDTO)
|
|
849
1168
|
], BaseExpenseProposalStatementSignedMetaDocumentInputDTO.prototype, "items", 2);
|
|
850
|
-
__decorateClass$
|
|
1169
|
+
__decorateClass$j([
|
|
851
1170
|
Field(() => String, { description: "\u0418\u0434\u0435\u043D\u0442\u0438\u0444\u0438\u043A\u0430\u0442\u043E\u0440 \u043F\u0440\u0438\u0432\u0430\u0442\u043D\u044B\u0445 \u0434\u0430\u043D\u043D\u044B\u0445 \u0434\u043E\u043A\u0443\u043C\u0435\u043D\u0442\u0430 off-chain (\u0440\u0435\u043A\u0432\u0438\u0437\u0438\u0442\u044B/\u0438\u043C\u044F/\u043D\u0430\u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435)" }),
|
|
852
1171
|
IsString(),
|
|
853
1172
|
IsNotEmpty()
|
|
854
1173
|
], BaseExpenseProposalStatementSignedMetaDocumentInputDTO.prototype, "doc_data_hash", 2);
|
|
855
|
-
BaseExpenseProposalStatementSignedMetaDocumentInputDTO = __decorateClass$
|
|
1174
|
+
BaseExpenseProposalStatementSignedMetaDocumentInputDTO = __decorateClass$j([
|
|
856
1175
|
InputType("BaseExpenseProposalStatementSignedMetaDocumentInput")
|
|
857
1176
|
], BaseExpenseProposalStatementSignedMetaDocumentInputDTO);
|
|
858
1177
|
let ExpenseProposalStatementGenerateDocumentInputDTO = class extends IntersectionType(
|
|
@@ -860,7 +1179,7 @@ let ExpenseProposalStatementGenerateDocumentInputDTO = class extends Intersectio
|
|
|
860
1179
|
OmitType(GenerateMetaDocumentInputDTO, ["registry_id"])
|
|
861
1180
|
) {
|
|
862
1181
|
};
|
|
863
|
-
ExpenseProposalStatementGenerateDocumentInputDTO = __decorateClass$
|
|
1182
|
+
ExpenseProposalStatementGenerateDocumentInputDTO = __decorateClass$j([
|
|
864
1183
|
InputType("ExpenseProposalStatementGenerateDocumentInput")
|
|
865
1184
|
], ExpenseProposalStatementGenerateDocumentInputDTO);
|
|
866
1185
|
let ExpenseProposalStatementSignedMetaDocumentInputDTO = class extends IntersectionType(
|
|
@@ -868,29 +1187,29 @@ let ExpenseProposalStatementSignedMetaDocumentInputDTO = class extends Intersect
|
|
|
868
1187
|
MetaDocumentInputDTO
|
|
869
1188
|
) {
|
|
870
1189
|
};
|
|
871
|
-
ExpenseProposalStatementSignedMetaDocumentInputDTO = __decorateClass$
|
|
1190
|
+
ExpenseProposalStatementSignedMetaDocumentInputDTO = __decorateClass$j([
|
|
872
1191
|
InputType("ExpenseProposalStatementSignedMetaDocumentInput")
|
|
873
1192
|
], ExpenseProposalStatementSignedMetaDocumentInputDTO);
|
|
874
1193
|
let ExpenseProposalStatementSignedDocumentInputDTO = class extends SignedDigitalDocumentInputDTO {
|
|
875
1194
|
};
|
|
876
|
-
__decorateClass$
|
|
1195
|
+
__decorateClass$j([
|
|
877
1196
|
Field(() => ExpenseProposalStatementSignedMetaDocumentInputDTO, {
|
|
878
1197
|
description: "\u041C\u0435\u0442\u0430\u0438\u043D\u0444\u043E\u0440\u043C\u0430\u0446\u0438\u044F \u0421\u0417-\u0437\u0430\u044F\u0432\u043B\u0435\u043D\u0438\u044F"
|
|
879
1198
|
})
|
|
880
1199
|
], ExpenseProposalStatementSignedDocumentInputDTO.prototype, "meta", 2);
|
|
881
|
-
ExpenseProposalStatementSignedDocumentInputDTO = __decorateClass$
|
|
1200
|
+
ExpenseProposalStatementSignedDocumentInputDTO = __decorateClass$j([
|
|
882
1201
|
InputType("ExpenseProposalStatementSignedDocumentInput")
|
|
883
1202
|
], ExpenseProposalStatementSignedDocumentInputDTO);
|
|
884
1203
|
|
|
885
|
-
var __defProp$
|
|
886
|
-
var __getOwnPropDesc$
|
|
887
|
-
var __decorateClass$
|
|
888
|
-
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$
|
|
1204
|
+
var __defProp$i = Object.defineProperty;
|
|
1205
|
+
var __getOwnPropDesc$i = Object.getOwnPropertyDescriptor;
|
|
1206
|
+
var __decorateClass$i = (decorators, target, key, kind) => {
|
|
1207
|
+
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$i(target, key) : target;
|
|
889
1208
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
890
1209
|
if (decorator = decorators[i])
|
|
891
1210
|
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
892
1211
|
if (kind && result)
|
|
893
|
-
__defProp$
|
|
1212
|
+
__defProp$i(target, key, result);
|
|
894
1213
|
return result;
|
|
895
1214
|
};
|
|
896
1215
|
var CandidateStatus = /* @__PURE__ */ ((CandidateStatus2) => {
|
|
@@ -904,63 +1223,63 @@ registerEnumType(CandidateStatus, {
|
|
|
904
1223
|
});
|
|
905
1224
|
let CandidateOutputDTO = class {
|
|
906
1225
|
};
|
|
907
|
-
__decorateClass$
|
|
1226
|
+
__decorateClass$i([
|
|
908
1227
|
Field(() => String)
|
|
909
1228
|
], CandidateOutputDTO.prototype, "username", 2);
|
|
910
|
-
__decorateClass$
|
|
1229
|
+
__decorateClass$i([
|
|
911
1230
|
Field(() => String, { nullable: true })
|
|
912
1231
|
], CandidateOutputDTO.prototype, "username_display_name", 2);
|
|
913
|
-
__decorateClass$
|
|
1232
|
+
__decorateClass$i([
|
|
914
1233
|
Field(() => String)
|
|
915
1234
|
], CandidateOutputDTO.prototype, "coopname", 2);
|
|
916
|
-
__decorateClass$
|
|
1235
|
+
__decorateClass$i([
|
|
917
1236
|
Field(() => String, { nullable: true })
|
|
918
1237
|
], CandidateOutputDTO.prototype, "braname", 2);
|
|
919
|
-
__decorateClass$
|
|
1238
|
+
__decorateClass$i([
|
|
920
1239
|
Field(() => CandidateStatus)
|
|
921
1240
|
], CandidateOutputDTO.prototype, "status", 2);
|
|
922
|
-
__decorateClass$
|
|
1241
|
+
__decorateClass$i([
|
|
923
1242
|
Field(() => String)
|
|
924
1243
|
], CandidateOutputDTO.prototype, "type", 2);
|
|
925
|
-
__decorateClass$
|
|
1244
|
+
__decorateClass$i([
|
|
926
1245
|
Field(() => Date)
|
|
927
1246
|
], CandidateOutputDTO.prototype, "created_at", 2);
|
|
928
|
-
__decorateClass$
|
|
1247
|
+
__decorateClass$i([
|
|
929
1248
|
Field(() => Date, { nullable: true })
|
|
930
1249
|
], CandidateOutputDTO.prototype, "registered_at", 2);
|
|
931
|
-
__decorateClass$
|
|
1250
|
+
__decorateClass$i([
|
|
932
1251
|
Field(() => String, { nullable: true })
|
|
933
1252
|
], CandidateOutputDTO.prototype, "referer", 2);
|
|
934
|
-
__decorateClass$
|
|
1253
|
+
__decorateClass$i([
|
|
935
1254
|
Field(() => String, { nullable: true })
|
|
936
1255
|
], CandidateOutputDTO.prototype, "referer_display_name", 2);
|
|
937
|
-
__decorateClass$
|
|
1256
|
+
__decorateClass$i([
|
|
938
1257
|
Field(() => String)
|
|
939
1258
|
], CandidateOutputDTO.prototype, "public_key", 2);
|
|
940
|
-
__decorateClass$
|
|
1259
|
+
__decorateClass$i([
|
|
941
1260
|
Field(() => String, { nullable: true })
|
|
942
1261
|
], CandidateOutputDTO.prototype, "program_key", 2);
|
|
943
|
-
CandidateOutputDTO = __decorateClass$
|
|
1262
|
+
CandidateOutputDTO = __decorateClass$i([
|
|
944
1263
|
ObjectType("Candidate")
|
|
945
1264
|
], CandidateOutputDTO);
|
|
946
1265
|
|
|
947
|
-
var __defProp$
|
|
948
|
-
var __getOwnPropDesc$
|
|
949
|
-
var __decorateClass$
|
|
950
|
-
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$
|
|
1266
|
+
var __defProp$h = Object.defineProperty;
|
|
1267
|
+
var __getOwnPropDesc$h = Object.getOwnPropertyDescriptor;
|
|
1268
|
+
var __decorateClass$h = (decorators, target, key, kind) => {
|
|
1269
|
+
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$h(target, key) : target;
|
|
951
1270
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
952
1271
|
if (decorator = decorators[i])
|
|
953
1272
|
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
954
1273
|
if (kind && result)
|
|
955
|
-
__defProp$
|
|
1274
|
+
__defProp$h(target, key, result);
|
|
956
1275
|
return result;
|
|
957
1276
|
};
|
|
958
1277
|
let CandidateFilterInputDTO = class {
|
|
959
1278
|
};
|
|
960
|
-
__decorateClass$
|
|
1279
|
+
__decorateClass$h([
|
|
961
1280
|
Field(() => String, { nullable: true })
|
|
962
1281
|
], CandidateFilterInputDTO.prototype, "referer", 2);
|
|
963
|
-
CandidateFilterInputDTO = __decorateClass$
|
|
1282
|
+
CandidateFilterInputDTO = __decorateClass$h([
|
|
964
1283
|
InputType("CandidateFilterInput")
|
|
965
1284
|
], CandidateFilterInputDTO);
|
|
966
1285
|
|
|
@@ -1015,23 +1334,6 @@ function isExtensionAvailable(availability, isMainnet) {
|
|
|
1015
1334
|
}
|
|
1016
1335
|
}
|
|
1017
1336
|
|
|
1018
|
-
let entities;
|
|
1019
|
-
function registerExtensionEntities(list) {
|
|
1020
|
-
if (entities) {
|
|
1021
|
-
throw new Error(
|
|
1022
|
-
// i18n-ignore: ошибка сборки приложения при старте, до пайщика не доходит
|
|
1023
|
-
"\u0421\u043E\u0441\u0442\u0430\u0432 \u0442\u0430\u0431\u043B\u0438\u0446 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043D\u0438\u0439 \u0443\u0436\u0435 \u043E\u0431\u044A\u044F\u0432\u043B\u0435\u043D: registerExtensionEntities() \u0432\u044B\u0437\u044B\u0432\u0430\u0435\u0442\u0441\u044F \u043E\u0434\u0438\u043D \u0440\u0430\u0437 \u043F\u0440\u0438 \u0441\u0442\u0430\u0440\u0442\u0435"
|
|
1024
|
-
);
|
|
1025
|
-
}
|
|
1026
|
-
entities = [...list];
|
|
1027
|
-
}
|
|
1028
|
-
function extensionEntities() {
|
|
1029
|
-
return entities ?? [];
|
|
1030
|
-
}
|
|
1031
|
-
function resetExtensionEntities() {
|
|
1032
|
-
entities = void 0;
|
|
1033
|
-
}
|
|
1034
|
-
|
|
1035
1337
|
let migrations;
|
|
1036
1338
|
function registerExtensionDatabaseMigrations(list) {
|
|
1037
1339
|
if (migrations) {
|
|
@@ -1049,32 +1351,59 @@ function resetExtensionDatabaseMigrations() {
|
|
|
1049
1351
|
migrations = void 0;
|
|
1050
1352
|
}
|
|
1051
1353
|
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1354
|
+
async function attachOne(records, related, property, keys) {
|
|
1355
|
+
if (records.length === 0)
|
|
1356
|
+
return;
|
|
1357
|
+
const pairs = Object.entries(keys);
|
|
1358
|
+
const read = (record, field) => record[field];
|
|
1359
|
+
const where = {};
|
|
1360
|
+
for (const [relatedField, ownField] of pairs) {
|
|
1361
|
+
const values = [...new Set(records.map((record) => read(record, ownField)).filter((value) => value !== null && value !== void 0))];
|
|
1362
|
+
if (values.length === 0)
|
|
1363
|
+
return;
|
|
1364
|
+
where[relatedField] = oneOf(values);
|
|
1365
|
+
}
|
|
1366
|
+
const found = await related.find(where);
|
|
1367
|
+
const signature = (record, side) => pairs.map((pair) => String(read(record, pair[side]))).join("\0");
|
|
1368
|
+
const index = /* @__PURE__ */ new Map();
|
|
1369
|
+
for (const candidate of found) {
|
|
1370
|
+
const key = signature(candidate, 0);
|
|
1371
|
+
if (!index.has(key))
|
|
1372
|
+
index.set(key, candidate);
|
|
1373
|
+
}
|
|
1374
|
+
for (const record of records) {
|
|
1375
|
+
const match = index.get(signature(record, 1));
|
|
1376
|
+
if (match)
|
|
1377
|
+
record[property] = match;
|
|
1378
|
+
}
|
|
1379
|
+
}
|
|
1380
|
+
|
|
1381
|
+
var __defProp$g = Object.defineProperty;
|
|
1382
|
+
var __getOwnPropDesc$g = Object.getOwnPropertyDescriptor;
|
|
1383
|
+
var __decorateClass$g = (decorators, target, key, kind) => {
|
|
1384
|
+
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$g(target, key) : target;
|
|
1056
1385
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
1057
1386
|
if (decorator = decorators[i])
|
|
1058
1387
|
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
1059
1388
|
if (kind && result)
|
|
1060
|
-
__defProp$
|
|
1389
|
+
__defProp$g(target, key, result);
|
|
1061
1390
|
return result;
|
|
1062
1391
|
};
|
|
1063
1392
|
const SORT_FIELD_PATTERN = /^([A-Za-z_][A-Za-z0-9_]*(:(asc|desc))?)?$/i;
|
|
1064
1393
|
let PaginationInputDTO = class {
|
|
1065
1394
|
};
|
|
1066
|
-
__decorateClass$
|
|
1395
|
+
__decorateClass$g([
|
|
1067
1396
|
Field(() => Int, { description: "\u041D\u043E\u043C\u0435\u0440 \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u044B", defaultValue: 1 })
|
|
1068
1397
|
], PaginationInputDTO.prototype, "page", 2);
|
|
1069
|
-
__decorateClass$
|
|
1398
|
+
__decorateClass$g([
|
|
1070
1399
|
Field(() => Int, { description: "\u041A\u043E\u043B\u0438\u0447\u0435\u0441\u0442\u0432\u043E \u044D\u043B\u0435\u043C\u0435\u043D\u0442\u043E\u0432 \u043D\u0430 \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u0435", defaultValue: 10 })
|
|
1071
1400
|
], PaginationInputDTO.prototype, "limit", 2);
|
|
1072
|
-
__decorateClass$
|
|
1401
|
+
__decorateClass$g([
|
|
1073
1402
|
Field(() => String, { nullable: true, description: '\u041A\u043B\u044E\u0447 \u0441\u043E\u0440\u0442\u0438\u0440\u043E\u0432\u043A\u0438 (\u043D\u0430\u043F\u0440\u0438\u043C\u0435\u0440, "name")' }),
|
|
1074
1403
|
IsOptional(),
|
|
1075
1404
|
Matches(SORT_FIELD_PATTERN, { message: validationMessage("kit.pagination.invalidSortField") })
|
|
1076
1405
|
], PaginationInputDTO.prototype, "sortBy", 2);
|
|
1077
|
-
__decorateClass$
|
|
1406
|
+
__decorateClass$g([
|
|
1078
1407
|
Field(() => String, {
|
|
1079
1408
|
description: '\u041D\u0430\u043F\u0440\u0430\u0432\u043B\u0435\u043D\u0438\u0435 \u0441\u043E\u0440\u0442\u0438\u0440\u043E\u0432\u043A\u0438 ("ASC" \u0438\u043B\u0438 "DESC")',
|
|
1080
1409
|
defaultValue: "ASC"
|
|
@@ -1082,7 +1411,7 @@ __decorateClass$7([
|
|
|
1082
1411
|
IsOptional(),
|
|
1083
1412
|
IsIn(["ASC", "DESC"], { message: validationMessage("kit.pagination.invalidSortOrder") })
|
|
1084
1413
|
], PaginationInputDTO.prototype, "sortOrder", 2);
|
|
1085
|
-
PaginationInputDTO = __decorateClass$
|
|
1414
|
+
PaginationInputDTO = __decorateClass$g([
|
|
1086
1415
|
InputType("PaginationInput")
|
|
1087
1416
|
], PaginationInputDTO);
|
|
1088
1417
|
class PaginationResult {
|
|
@@ -1090,19 +1419,19 @@ class PaginationResult {
|
|
|
1090
1419
|
function createPaginationResult(ItemType, name) {
|
|
1091
1420
|
let PaginationResult2 = class {
|
|
1092
1421
|
};
|
|
1093
|
-
__decorateClass$
|
|
1422
|
+
__decorateClass$g([
|
|
1094
1423
|
Field(() => [ItemType], { description: "\u042D\u043B\u0435\u043C\u0435\u043D\u0442\u044B \u0442\u0435\u043A\u0443\u0449\u0435\u0439 \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u044B" })
|
|
1095
1424
|
], PaginationResult2.prototype, "items", 2);
|
|
1096
|
-
__decorateClass$
|
|
1425
|
+
__decorateClass$g([
|
|
1097
1426
|
Field(() => Int, { description: "\u041E\u0431\u0449\u0435\u0435 \u043A\u043E\u043B\u0438\u0447\u0435\u0441\u0442\u0432\u043E \u044D\u043B\u0435\u043C\u0435\u043D\u0442\u043E\u0432" })
|
|
1098
1427
|
], PaginationResult2.prototype, "totalCount", 2);
|
|
1099
|
-
__decorateClass$
|
|
1428
|
+
__decorateClass$g([
|
|
1100
1429
|
Field(() => Int, { description: "\u041E\u0431\u0449\u0435\u0435 \u043A\u043E\u043B\u0438\u0447\u0435\u0441\u0442\u0432\u043E \u0441\u0442\u0440\u0430\u043D\u0438\u0446" })
|
|
1101
1430
|
], PaginationResult2.prototype, "totalPages", 2);
|
|
1102
|
-
__decorateClass$
|
|
1431
|
+
__decorateClass$g([
|
|
1103
1432
|
Field(() => Int, { description: "\u0422\u0435\u043A\u0443\u0449\u0430\u044F \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u0430" })
|
|
1104
1433
|
], PaginationResult2.prototype, "currentPage", 2);
|
|
1105
|
-
PaginationResult2 = __decorateClass$
|
|
1434
|
+
PaginationResult2 = __decorateClass$g([
|
|
1106
1435
|
ObjectType(`${name}PaginationResult`, { isAbstract: true })
|
|
1107
1436
|
], PaginationResult2);
|
|
1108
1437
|
return PaginationResult2;
|
|
@@ -1179,42 +1508,701 @@ function paginationInputToOffset(options) {
|
|
|
1179
1508
|
};
|
|
1180
1509
|
}
|
|
1181
1510
|
|
|
1182
|
-
var __defProp$
|
|
1183
|
-
var __getOwnPropDesc$
|
|
1184
|
-
var __decorateClass$
|
|
1185
|
-
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$
|
|
1511
|
+
var __defProp$f = Object.defineProperty;
|
|
1512
|
+
var __getOwnPropDesc$f = Object.getOwnPropertyDescriptor;
|
|
1513
|
+
var __decorateClass$f = (decorators, target, key, kind) => {
|
|
1514
|
+
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$f(target, key) : target;
|
|
1186
1515
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
1187
1516
|
if (decorator = decorators[i])
|
|
1188
1517
|
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
1189
1518
|
if (kind && result)
|
|
1190
|
-
__defProp$
|
|
1519
|
+
__defProp$f(target, key, result);
|
|
1191
1520
|
return result;
|
|
1192
1521
|
};
|
|
1193
|
-
let
|
|
1522
|
+
let Ledger2AccountDTO = class {
|
|
1194
1523
|
};
|
|
1195
|
-
__decorateClass$
|
|
1196
|
-
Field(() =>
|
|
1197
|
-
],
|
|
1198
|
-
__decorateClass$
|
|
1199
|
-
Field(() =>
|
|
1200
|
-
],
|
|
1201
|
-
__decorateClass$
|
|
1202
|
-
Field(() =>
|
|
1203
|
-
],
|
|
1204
|
-
__decorateClass$
|
|
1205
|
-
Field(() =>
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
})
|
|
1209
|
-
],
|
|
1210
|
-
__decorateClass$
|
|
1211
|
-
Field(() =>
|
|
1212
|
-
],
|
|
1213
|
-
__decorateClass$
|
|
1214
|
-
|
|
1215
|
-
],
|
|
1216
|
-
|
|
1217
|
-
|
|
1524
|
+
__decorateClass$f([
|
|
1525
|
+
Field(() => Int, { description: "ID \u0441\u0447\u0451\u0442\u0430 (\xD71000 offset): 51000/80000/86000/..." })
|
|
1526
|
+
], Ledger2AccountDTO.prototype, "id", 2);
|
|
1527
|
+
__decorateClass$f([
|
|
1528
|
+
Field(() => String, { description: "\u0420\u0443\u0441\u0441\u043A\u043E\u0435 \u043D\u0430\u0437\u0432\u0430\u043D\u0438\u0435 \u0441\u0447\u0451\u0442\u0430 \u0438\u0437 \u043F\u043B\u0430\u043D\u0430" })
|
|
1529
|
+
], Ledger2AccountDTO.prototype, "name", 2);
|
|
1530
|
+
__decorateClass$f([
|
|
1531
|
+
Field(() => String, { description: '\u0421\u0430\u043B\u044C\u0434\u043E (EOSIO asset: "7000.0000 RUB")' })
|
|
1532
|
+
], Ledger2AccountDTO.prototype, "balance", 2);
|
|
1533
|
+
__decorateClass$f([
|
|
1534
|
+
Field(() => String, { description: "\u0414\u0435\u0431\u0435\u0442\u043E\u0432\u044B\u0439 \u043E\u0431\u043E\u0440\u043E\u0442" })
|
|
1535
|
+
], Ledger2AccountDTO.prototype, "debitBalance", 2);
|
|
1536
|
+
__decorateClass$f([
|
|
1537
|
+
Field(() => String, { description: "\u041A\u0440\u0435\u0434\u0438\u0442\u043E\u0432\u044B\u0439 \u043E\u0431\u043E\u0440\u043E\u0442" })
|
|
1538
|
+
], Ledger2AccountDTO.prototype, "creditBalance", 2);
|
|
1539
|
+
__decorateClass$f([
|
|
1540
|
+
Field(() => Int, { description: "0 = active (\u0434\u0435\u0431\u0435\u0442\u043E\u0432\u044B\u0439), 1 = passive (\u043A\u0440\u0435\u0434\u0438\u0442\u043E\u0432\u044B\u0439)" })
|
|
1541
|
+
], Ledger2AccountDTO.prototype, "accountType", 2);
|
|
1542
|
+
Ledger2AccountDTO = __decorateClass$f([
|
|
1543
|
+
ObjectType("Ledger2Account")
|
|
1544
|
+
], Ledger2AccountDTO);
|
|
1545
|
+
|
|
1546
|
+
var __defProp$e = Object.defineProperty;
|
|
1547
|
+
var __getOwnPropDesc$e = Object.getOwnPropertyDescriptor;
|
|
1548
|
+
var __decorateClass$e = (decorators, target, key, kind) => {
|
|
1549
|
+
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$e(target, key) : target;
|
|
1550
|
+
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
1551
|
+
if (decorator = decorators[i])
|
|
1552
|
+
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
1553
|
+
if (kind && result)
|
|
1554
|
+
__defProp$e(target, key, result);
|
|
1555
|
+
return result;
|
|
1556
|
+
};
|
|
1557
|
+
let Ledger2WalletDTO = class {
|
|
1558
|
+
};
|
|
1559
|
+
__decorateClass$e([
|
|
1560
|
+
Field(() => String, { description: "eosio::name-\u0438\u0434\u0435\u043D\u0442\u0438\u0444\u0438\u043A\u0430\u0442\u043E\u0440 \u043A\u043E\u0448\u0435\u043B\u044C\u043A\u0430 (w.<contract>.<waltype>)" })
|
|
1561
|
+
], Ledger2WalletDTO.prototype, "id", 2);
|
|
1562
|
+
__decorateClass$e([
|
|
1563
|
+
Field(() => String, { description: "\u041D\u0430\u0437\u0432\u0430\u043D\u0438\u0435 \u043A\u043E\u0448\u0435\u043B\u044C\u043A\u0430" })
|
|
1564
|
+
], Ledger2WalletDTO.prototype, "name", 2);
|
|
1565
|
+
__decorateClass$e([
|
|
1566
|
+
Field(() => String, { description: "\u0414\u043E\u0441\u0442\u0443\u043F\u043D\u044B\u0439 \u0431\u0430\u043B\u0430\u043D\u0441" })
|
|
1567
|
+
], Ledger2WalletDTO.prototype, "available", 2);
|
|
1568
|
+
Ledger2WalletDTO = __decorateClass$e([
|
|
1569
|
+
ObjectType("Ledger2Wallet")
|
|
1570
|
+
], Ledger2WalletDTO);
|
|
1571
|
+
|
|
1572
|
+
var __defProp$d = Object.defineProperty;
|
|
1573
|
+
var __getOwnPropDesc$d = Object.getOwnPropertyDescriptor;
|
|
1574
|
+
var __decorateClass$d = (decorators, target, key, kind) => {
|
|
1575
|
+
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$d(target, key) : target;
|
|
1576
|
+
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
1577
|
+
if (decorator = decorators[i])
|
|
1578
|
+
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
1579
|
+
if (kind && result)
|
|
1580
|
+
__defProp$d(target, key, result);
|
|
1581
|
+
return result;
|
|
1582
|
+
};
|
|
1583
|
+
let Ledger2OperationDTO = class {
|
|
1584
|
+
};
|
|
1585
|
+
__decorateClass$d([
|
|
1586
|
+
Field(() => String, {
|
|
1587
|
+
description: "global_sequence \u0431\u043B\u043E\u043A\u0447\u0435\u0439\u043D\u0430 (\u0441\u0442\u0440\u043E\u043A\u0430 \u2014 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u044F \u0434\u043E 2^53 overflow)"
|
|
1588
|
+
})
|
|
1589
|
+
], Ledger2OperationDTO.prototype, "globalSequence", 2);
|
|
1590
|
+
__decorateClass$d([
|
|
1591
|
+
Field(() => Int)
|
|
1592
|
+
], Ledger2OperationDTO.prototype, "blockNum", 2);
|
|
1593
|
+
__decorateClass$d([
|
|
1594
|
+
Field(() => String)
|
|
1595
|
+
], Ledger2OperationDTO.prototype, "coopname", 2);
|
|
1596
|
+
__decorateClass$d([
|
|
1597
|
+
Field(() => String, {
|
|
1598
|
+
description: "apply | walletop | debit | credit"
|
|
1599
|
+
})
|
|
1600
|
+
], Ledger2OperationDTO.prototype, "action", 2);
|
|
1601
|
+
__decorateClass$d([
|
|
1602
|
+
Field(() => String, {
|
|
1603
|
+
nullable: true,
|
|
1604
|
+
description: "\u0414\u043B\u044F apply: OPERATION_REGISTRY code (o.cap.lend / o.wal.depcpl / ...)"
|
|
1605
|
+
})
|
|
1606
|
+
], Ledger2OperationDTO.prototype, "operationCode", 2);
|
|
1607
|
+
__decorateClass$d([
|
|
1608
|
+
Field(() => String, { nullable: true, description: "process_hash (32-hex)" })
|
|
1609
|
+
], Ledger2OperationDTO.prototype, "processHash", 2);
|
|
1610
|
+
__decorateClass$d([
|
|
1611
|
+
Field(() => String, { nullable: true })
|
|
1612
|
+
], Ledger2OperationDTO.prototype, "username", 2);
|
|
1613
|
+
__decorateClass$d([
|
|
1614
|
+
Field(() => Int, { nullable: true, description: "ID \u0441\u0447\u0451\u0442\u0430/\u043A\u043E\u0448\u0435\u043B\u044C\u043A\u0430 (\xD71000)" })
|
|
1615
|
+
], Ledger2OperationDTO.prototype, "accountId", 2);
|
|
1616
|
+
__decorateClass$d([
|
|
1617
|
+
Field(() => String, { nullable: true, description: "walletop: wallet_from (eosio::name w.<contract>.<waltype>)" })
|
|
1618
|
+
], Ledger2OperationDTO.prototype, "walletFrom", 2);
|
|
1619
|
+
__decorateClass$d([
|
|
1620
|
+
Field(() => String, { nullable: true, description: "walletop: wallet_to (eosio::name w.<contract>.<waltype>)" })
|
|
1621
|
+
], Ledger2OperationDTO.prototype, "walletTo", 2);
|
|
1622
|
+
__decorateClass$d([
|
|
1623
|
+
Field(() => String, { nullable: true, description: 'Asset "100.0000 RUB"' })
|
|
1624
|
+
], Ledger2OperationDTO.prototype, "quantity", 2);
|
|
1625
|
+
__decorateClass$d([
|
|
1626
|
+
Field(() => String, { nullable: true })
|
|
1627
|
+
], Ledger2OperationDTO.prototype, "memo", 2);
|
|
1628
|
+
__decorateClass$d([
|
|
1629
|
+
Field(() => String, {
|
|
1630
|
+
nullable: true,
|
|
1631
|
+
description: "global_sequence \u0440\u043E\u0434\u0438\u0442\u0435\u043B\u044C\u0441\u043A\u043E\u0433\u043E apply (parser2: transaction_id + action_ordinal=this.creator_action_ordinal) \u2014 \u0434\u043B\u044F \u0442\u043E\u0447\u0435\u0447\u043D\u043E\u0433\u043E cross-link \u043D\u0430 \u043A\u043E\u043D\u043A\u0440\u0435\u0442\u043D\u0443\u044E \u043E\u043F\u0435\u0440\u0430\u0446\u0438\u044E."
|
|
1632
|
+
})
|
|
1633
|
+
], Ledger2OperationDTO.prototype, "parentApplyGlobalSequence", 2);
|
|
1634
|
+
__decorateClass$d([
|
|
1635
|
+
Field(() => Date)
|
|
1636
|
+
], Ledger2OperationDTO.prototype, "createdAt", 2);
|
|
1637
|
+
Ledger2OperationDTO = __decorateClass$d([
|
|
1638
|
+
ObjectType("Ledger2Operation")
|
|
1639
|
+
], Ledger2OperationDTO);
|
|
1640
|
+
let Ledger2HistoryResponseDTO = class {
|
|
1641
|
+
};
|
|
1642
|
+
__decorateClass$d([
|
|
1643
|
+
Field(() => [Ledger2OperationDTO])
|
|
1644
|
+
], Ledger2HistoryResponseDTO.prototype, "items", 2);
|
|
1645
|
+
__decorateClass$d([
|
|
1646
|
+
Field(() => Int)
|
|
1647
|
+
], Ledger2HistoryResponseDTO.prototype, "totalCount", 2);
|
|
1648
|
+
__decorateClass$d([
|
|
1649
|
+
Field(() => Int)
|
|
1650
|
+
], Ledger2HistoryResponseDTO.prototype, "totalPages", 2);
|
|
1651
|
+
__decorateClass$d([
|
|
1652
|
+
Field(() => Int)
|
|
1653
|
+
], Ledger2HistoryResponseDTO.prototype, "currentPage", 2);
|
|
1654
|
+
Ledger2HistoryResponseDTO = __decorateClass$d([
|
|
1655
|
+
ObjectType("Ledger2HistoryResponse")
|
|
1656
|
+
], Ledger2HistoryResponseDTO);
|
|
1657
|
+
|
|
1658
|
+
var __defProp$c = Object.defineProperty;
|
|
1659
|
+
var __getOwnPropDesc$c = Object.getOwnPropertyDescriptor;
|
|
1660
|
+
var __decorateClass$c = (decorators, target, key, kind) => {
|
|
1661
|
+
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$c(target, key) : target;
|
|
1662
|
+
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
1663
|
+
if (decorator = decorators[i])
|
|
1664
|
+
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
1665
|
+
if (kind && result)
|
|
1666
|
+
__defProp$c(target, key, result);
|
|
1667
|
+
return result;
|
|
1668
|
+
};
|
|
1669
|
+
let Ledger2PostingDTO = class {
|
|
1670
|
+
};
|
|
1671
|
+
__decorateClass$c([
|
|
1672
|
+
Field(() => String, { description: "\u0421\u0442\u0430\u0431\u0438\u043B\u044C\u043D\u044B\u0439 \u043A\u043B\u044E\u0447 \u0434\u043B\u044F UI: debitSeq_creditSeq" })
|
|
1673
|
+
], Ledger2PostingDTO.prototype, "key", 2);
|
|
1674
|
+
__decorateClass$c([
|
|
1675
|
+
Field(() => Int)
|
|
1676
|
+
], Ledger2PostingDTO.prototype, "blockNum", 2);
|
|
1677
|
+
__decorateClass$c([
|
|
1678
|
+
Field(() => String, { nullable: true, description: "process_hash (32-hex)" })
|
|
1679
|
+
], Ledger2PostingDTO.prototype, "processHash", 2);
|
|
1680
|
+
__decorateClass$c([
|
|
1681
|
+
Field(() => String, {
|
|
1682
|
+
nullable: true,
|
|
1683
|
+
description: "OPERATION_REGISTRY \u043A\u043E\u0434 \u0438\u0437 parent apply (`o.cap.lend` / `o.wal.depcpl` / ...)"
|
|
1684
|
+
})
|
|
1685
|
+
], Ledger2PostingDTO.prototype, "operationCode", 2);
|
|
1686
|
+
__decorateClass$c([
|
|
1687
|
+
Field(() => String, {
|
|
1688
|
+
nullable: true,
|
|
1689
|
+
description: "global_sequence parent apply (\u0434\u043B\u044F cross-link \u0432 \u0440\u0435\u0435\u0441\u0442\u0440 \u043E\u043F\u0435\u0440\u0430\u0446\u0438\u0439)"
|
|
1690
|
+
})
|
|
1691
|
+
], Ledger2PostingDTO.prototype, "parentApplyGlobalSequence", 2);
|
|
1692
|
+
__decorateClass$c([
|
|
1693
|
+
Field(() => String, { nullable: true, description: "global_sequence debit-action" })
|
|
1694
|
+
], Ledger2PostingDTO.prototype, "debitGlobalSequence", 2);
|
|
1695
|
+
__decorateClass$c([
|
|
1696
|
+
Field(() => Int, { nullable: true, description: "id \u0431\u0443\u0445.\u0441\u0447\u0451\u0442\u0430 debit (\xD71000)" })
|
|
1697
|
+
], Ledger2PostingDTO.prototype, "debitAccountId", 2);
|
|
1698
|
+
__decorateClass$c([
|
|
1699
|
+
Field(() => String, { nullable: true, description: "global_sequence credit-action" })
|
|
1700
|
+
], Ledger2PostingDTO.prototype, "creditGlobalSequence", 2);
|
|
1701
|
+
__decorateClass$c([
|
|
1702
|
+
Field(() => Int, { nullable: true, description: "id \u0431\u0443\u0445.\u0441\u0447\u0451\u0442\u0430 credit (\xD71000)" })
|
|
1703
|
+
], Ledger2PostingDTO.prototype, "creditAccountId", 2);
|
|
1704
|
+
__decorateClass$c([
|
|
1705
|
+
Field(() => String, { nullable: true, description: 'Asset "100.0000 RUB"' })
|
|
1706
|
+
], Ledger2PostingDTO.prototype, "quantity", 2);
|
|
1707
|
+
__decorateClass$c([
|
|
1708
|
+
Field(() => String, { nullable: true })
|
|
1709
|
+
], Ledger2PostingDTO.prototype, "memo", 2);
|
|
1710
|
+
__decorateClass$c([
|
|
1711
|
+
Field(() => String, { nullable: true })
|
|
1712
|
+
], Ledger2PostingDTO.prototype, "username", 2);
|
|
1713
|
+
__decorateClass$c([
|
|
1714
|
+
Field(() => Date)
|
|
1715
|
+
], Ledger2PostingDTO.prototype, "createdAt", 2);
|
|
1716
|
+
Ledger2PostingDTO = __decorateClass$c([
|
|
1717
|
+
ObjectType("Ledger2Posting")
|
|
1718
|
+
], Ledger2PostingDTO);
|
|
1719
|
+
let Ledger2PostingsResponseDTO = class {
|
|
1720
|
+
};
|
|
1721
|
+
__decorateClass$c([
|
|
1722
|
+
Field(() => [Ledger2PostingDTO])
|
|
1723
|
+
], Ledger2PostingsResponseDTO.prototype, "items", 2);
|
|
1724
|
+
__decorateClass$c([
|
|
1725
|
+
Field(() => Int)
|
|
1726
|
+
], Ledger2PostingsResponseDTO.prototype, "totalCount", 2);
|
|
1727
|
+
__decorateClass$c([
|
|
1728
|
+
Field(() => Int)
|
|
1729
|
+
], Ledger2PostingsResponseDTO.prototype, "totalPages", 2);
|
|
1730
|
+
__decorateClass$c([
|
|
1731
|
+
Field(() => Int)
|
|
1732
|
+
], Ledger2PostingsResponseDTO.prototype, "currentPage", 2);
|
|
1733
|
+
Ledger2PostingsResponseDTO = __decorateClass$c([
|
|
1734
|
+
ObjectType("Ledger2PostingsResponse")
|
|
1735
|
+
], Ledger2PostingsResponseDTO);
|
|
1736
|
+
|
|
1737
|
+
var __defProp$b = Object.defineProperty;
|
|
1738
|
+
var __getOwnPropDesc$b = Object.getOwnPropertyDescriptor;
|
|
1739
|
+
var __decorateClass$b = (decorators, target, key, kind) => {
|
|
1740
|
+
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$b(target, key) : target;
|
|
1741
|
+
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
1742
|
+
if (decorator = decorators[i])
|
|
1743
|
+
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
1744
|
+
if (kind && result)
|
|
1745
|
+
__defProp$b(target, key, result);
|
|
1746
|
+
return result;
|
|
1747
|
+
};
|
|
1748
|
+
let GetLedger2HistoryInputDTO = class {
|
|
1749
|
+
};
|
|
1750
|
+
__decorateClass$b([
|
|
1751
|
+
Field(() => String),
|
|
1752
|
+
IsString()
|
|
1753
|
+
], GetLedger2HistoryInputDTO.prototype, "coopname", 2);
|
|
1754
|
+
__decorateClass$b([
|
|
1755
|
+
Field(() => Int, { nullable: true, description: "\u0411\u0443\u0445.\u0441\u0447\u0451\u0442 (\xD71000): 51000/80000/86000 \u2014 \u0434\u043B\u044F debit/credit \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0439." }),
|
|
1756
|
+
IsOptional(),
|
|
1757
|
+
IsInt()
|
|
1758
|
+
], GetLedger2HistoryInputDTO.prototype, "accountId", 2);
|
|
1759
|
+
__decorateClass$b([
|
|
1760
|
+
Field(() => String, {
|
|
1761
|
+
nullable: true,
|
|
1762
|
+
description: "eosio::name \u043A\u043E\u0448\u0435\u043B\u044C\u043A\u0430 (`w.<contract>.<waltype>`) \u2014 \u0434\u043B\u044F walletop \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0439."
|
|
1763
|
+
}),
|
|
1764
|
+
IsOptional(),
|
|
1765
|
+
IsString(),
|
|
1766
|
+
MaxLength(13)
|
|
1767
|
+
], GetLedger2HistoryInputDTO.prototype, "walletName", 2);
|
|
1768
|
+
__decorateClass$b([
|
|
1769
|
+
Field(() => [String], {
|
|
1770
|
+
nullable: true,
|
|
1771
|
+
description: "\u0418\u043C\u0435\u043D\u0430 blockchain-\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0439: apply | walletop | debit | credit"
|
|
1772
|
+
}),
|
|
1773
|
+
IsOptional(),
|
|
1774
|
+
IsArray(),
|
|
1775
|
+
IsString({ each: true })
|
|
1776
|
+
], GetLedger2HistoryInputDTO.prototype, "actionNames", 2);
|
|
1777
|
+
__decorateClass$b([
|
|
1778
|
+
Field(() => [String], {
|
|
1779
|
+
nullable: true,
|
|
1780
|
+
description: "OPERATION_REGISTRY \u043A\u043E\u0434\u044B: o.cap.lend, o.wal.depcpl, o.mig.minshr \u0438 \u0442.\u0434."
|
|
1781
|
+
}),
|
|
1782
|
+
IsOptional(),
|
|
1783
|
+
IsArray(),
|
|
1784
|
+
IsString({ each: true })
|
|
1785
|
+
], GetLedger2HistoryInputDTO.prototype, "operationCodes", 2);
|
|
1786
|
+
__decorateClass$b([
|
|
1787
|
+
Field(() => String, { nullable: true }),
|
|
1788
|
+
IsOptional(),
|
|
1789
|
+
IsString(),
|
|
1790
|
+
MaxLength(64)
|
|
1791
|
+
], GetLedger2HistoryInputDTO.prototype, "username", 2);
|
|
1792
|
+
__decorateClass$b([
|
|
1793
|
+
Field(() => String, { nullable: true, description: "process_hash (hex-64) \u0434\u043B\u044F \u0432\u044B\u0431\u043E\u0440\u043A\u0438 \u0432\u0441\u0435\u0445 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0439 \u043E\u0434\u043D\u043E\u0439 \u043E\u043F\u0435\u0440\u0430\u0446\u0438\u0438" }),
|
|
1794
|
+
IsOptional(),
|
|
1795
|
+
IsString(),
|
|
1796
|
+
MaxLength(66),
|
|
1797
|
+
Matches(/^[0-9a-fA-F]{64}$/, {
|
|
1798
|
+
message: validationMessage("ledger2.getLedger2HistoryInput.processHashInvalidFormat")
|
|
1799
|
+
})
|
|
1800
|
+
], GetLedger2HistoryInputDTO.prototype, "processHash", 2);
|
|
1801
|
+
__decorateClass$b([
|
|
1802
|
+
Field(() => String, {
|
|
1803
|
+
nullable: true,
|
|
1804
|
+
description: "global_sequence \u0440\u043E\u0434\u0438\u0442\u0435\u043B\u044C\u0441\u043A\u043E\u0433\u043E apply: \u0432\u043E\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0442\u043E\u043B\u044C\u043A\u043E inline-\u0441\u0438\u0431\u0441\u043E\u0432 (walletop/debit/credit) \u044D\u0442\u043E\u0433\u043E apply \u0447\u0435\u0440\u0435\u0437 \u0442\u043E\u0447\u0435\u0447\u043D\u0443\u044E \u0441\u0432\u044F\u0437\u044C parser2 (transaction_id + creator_action_ordinal=apply.action_ordinal)."
|
|
1805
|
+
}),
|
|
1806
|
+
IsOptional(),
|
|
1807
|
+
IsString(),
|
|
1808
|
+
MaxLength(24)
|
|
1809
|
+
], GetLedger2HistoryInputDTO.prototype, "parentApplyGlobalSequence", 2);
|
|
1810
|
+
__decorateClass$b([
|
|
1811
|
+
Field(() => String, {
|
|
1812
|
+
nullable: true,
|
|
1813
|
+
description: "\u2116 \u043E\u043F\u0435\u0440\u0430\u0446\u0438\u0438 = apply.global_sequence. \u0422\u043E\u0447\u0435\u0447\u043D\u0430\u044F \u0430\u0434\u0440\u0435\u0441\u0430\u0446\u0438\u044F \u043E\u0434\u043D\u043E\u0439 apply-\u0433\u0440\u0443\u043F\u043F\u044B (apply + walletop/debit/credit)."
|
|
1814
|
+
}),
|
|
1815
|
+
IsOptional(),
|
|
1816
|
+
IsString(),
|
|
1817
|
+
MaxLength(24)
|
|
1818
|
+
], GetLedger2HistoryInputDTO.prototype, "applyGlobalSequence", 2);
|
|
1819
|
+
__decorateClass$b([
|
|
1820
|
+
Field(() => String, {
|
|
1821
|
+
nullable: true,
|
|
1822
|
+
description: "\u2116 \u0434\u0432\u0438\u0436\u0435\u043D\u0438\u044F \u043F\u043E \u043A\u043E\u0448\u0435\u043B\u044C\u043A\u0443 = walletop.global_sequence. \u0423\u043D\u0438\u043A\u0430\u043B\u0435\u043D."
|
|
1823
|
+
}),
|
|
1824
|
+
IsOptional(),
|
|
1825
|
+
IsString(),
|
|
1826
|
+
MaxLength(24)
|
|
1827
|
+
], GetLedger2HistoryInputDTO.prototype, "walletopGlobalSequence", 2);
|
|
1828
|
+
__decorateClass$b([
|
|
1829
|
+
Field(() => Date, { nullable: true }),
|
|
1830
|
+
IsOptional(),
|
|
1831
|
+
IsDate(),
|
|
1832
|
+
Type(() => Date)
|
|
1833
|
+
], GetLedger2HistoryInputDTO.prototype, "dateFrom", 2);
|
|
1834
|
+
__decorateClass$b([
|
|
1835
|
+
Field(() => Date, { nullable: true }),
|
|
1836
|
+
IsOptional(),
|
|
1837
|
+
IsDate(),
|
|
1838
|
+
Type(() => Date)
|
|
1839
|
+
], GetLedger2HistoryInputDTO.prototype, "dateTo", 2);
|
|
1840
|
+
__decorateClass$b([
|
|
1841
|
+
Field(() => Int, { nullable: true, defaultValue: 1 }),
|
|
1842
|
+
IsOptional(),
|
|
1843
|
+
IsInt(),
|
|
1844
|
+
Min(1)
|
|
1845
|
+
], GetLedger2HistoryInputDTO.prototype, "page", 2);
|
|
1846
|
+
__decorateClass$b([
|
|
1847
|
+
Field(() => Int, { nullable: true, defaultValue: 50 }),
|
|
1848
|
+
IsOptional(),
|
|
1849
|
+
IsInt(),
|
|
1850
|
+
Min(1),
|
|
1851
|
+
Max(500)
|
|
1852
|
+
], GetLedger2HistoryInputDTO.prototype, "limit", 2);
|
|
1853
|
+
__decorateClass$b([
|
|
1854
|
+
Field(() => String, { nullable: true, defaultValue: "DESC" }),
|
|
1855
|
+
IsOptional(),
|
|
1856
|
+
IsIn(["ASC", "DESC"])
|
|
1857
|
+
], GetLedger2HistoryInputDTO.prototype, "sortOrder", 2);
|
|
1858
|
+
GetLedger2HistoryInputDTO = __decorateClass$b([
|
|
1859
|
+
InputType("GetLedger2HistoryInput")
|
|
1860
|
+
], GetLedger2HistoryInputDTO);
|
|
1861
|
+
|
|
1862
|
+
var __defProp$a = Object.defineProperty;
|
|
1863
|
+
var __getOwnPropDesc$a = Object.getOwnPropertyDescriptor;
|
|
1864
|
+
var __decorateClass$a = (decorators, target, key, kind) => {
|
|
1865
|
+
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$a(target, key) : target;
|
|
1866
|
+
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
1867
|
+
if (decorator = decorators[i])
|
|
1868
|
+
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
1869
|
+
if (kind && result)
|
|
1870
|
+
__defProp$a(target, key, result);
|
|
1871
|
+
return result;
|
|
1872
|
+
};
|
|
1873
|
+
let GetLedger2PostingsInputDTO = class {
|
|
1874
|
+
};
|
|
1875
|
+
__decorateClass$a([
|
|
1876
|
+
Field(() => String),
|
|
1877
|
+
IsString()
|
|
1878
|
+
], GetLedger2PostingsInputDTO.prototype, "coopname", 2);
|
|
1879
|
+
__decorateClass$a([
|
|
1880
|
+
Field(() => Int, {
|
|
1881
|
+
nullable: true,
|
|
1882
|
+
description: "\u0411\u0443\u0445.\u0441\u0447\u0451\u0442 (\xD71000) \u2014 \u043F\u043E\u043F\u0430\u0434\u0430\u043D\u0438\u0435 \u0432 debit \u0418\u041B\u0418 credit \u043D\u043E\u0433\u0435 \u043F\u0440\u043E\u0432\u043E\u0434\u043A\u0438."
|
|
1883
|
+
}),
|
|
1884
|
+
IsOptional(),
|
|
1885
|
+
IsInt()
|
|
1886
|
+
], GetLedger2PostingsInputDTO.prototype, "accountId", 2);
|
|
1887
|
+
__decorateClass$a([
|
|
1888
|
+
Field(() => String, { nullable: true }),
|
|
1889
|
+
IsOptional(),
|
|
1890
|
+
IsString(),
|
|
1891
|
+
MaxLength(64)
|
|
1892
|
+
], GetLedger2PostingsInputDTO.prototype, "username", 2);
|
|
1893
|
+
__decorateClass$a([
|
|
1894
|
+
Field(() => String, { nullable: true, description: "process_hash \u0434\u043B\u044F \u0432\u044B\u0431\u043E\u0440\u043A\u0438 \u0432\u0441\u0435\u0445 \u043F\u0440\u043E\u0432\u043E\u0434\u043E\u043A \u043E\u0434\u043D\u043E\u0439 \u043E\u043F\u0435\u0440\u0430\u0446\u0438\u0438" }),
|
|
1895
|
+
IsOptional(),
|
|
1896
|
+
IsString(),
|
|
1897
|
+
MaxLength(66)
|
|
1898
|
+
], GetLedger2PostingsInputDTO.prototype, "processHash", 2);
|
|
1899
|
+
__decorateClass$a([
|
|
1900
|
+
Field(() => String, {
|
|
1901
|
+
nullable: true,
|
|
1902
|
+
description: "\u2116 \u043F\u0440\u043E\u0432\u043E\u0434\u043A\u0438 = debit.global_sequence (unique). \u041F\u0430\u0440\u043D\u044B\u0439 credit \u043F\u043E\u0434\u0442\u044F\u043D\u0435\u0442\u0441\u044F \u0430\u0432\u0442\u043E\u043C\u0430\u0442\u0438\u0447\u0435\u0441\u043A\u0438."
|
|
1903
|
+
}),
|
|
1904
|
+
IsOptional(),
|
|
1905
|
+
IsString(),
|
|
1906
|
+
MaxLength(24)
|
|
1907
|
+
], GetLedger2PostingsInputDTO.prototype, "debitGlobalSequence", 2);
|
|
1908
|
+
__decorateClass$a([
|
|
1909
|
+
Field(() => String, {
|
|
1910
|
+
nullable: true,
|
|
1911
|
+
description: "\u2116 \u043E\u043F\u0435\u0440\u0430\u0446\u0438\u0438 = apply.global_sequence. \u0412\u043E\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u043F\u0440\u043E\u0432\u043E\u0434\u043A\u0438 \u0440\u043E\u0432\u043D\u043E \u044D\u0442\u043E\u0439 apply-\u0433\u0440\u0443\u043F\u043F\u044B."
|
|
1912
|
+
}),
|
|
1913
|
+
IsOptional(),
|
|
1914
|
+
IsString(),
|
|
1915
|
+
MaxLength(24)
|
|
1916
|
+
], GetLedger2PostingsInputDTO.prototype, "applyGlobalSequence", 2);
|
|
1917
|
+
__decorateClass$a([
|
|
1918
|
+
Field(() => Date, { nullable: true }),
|
|
1919
|
+
IsOptional(),
|
|
1920
|
+
IsDate(),
|
|
1921
|
+
Type(() => Date)
|
|
1922
|
+
], GetLedger2PostingsInputDTO.prototype, "dateFrom", 2);
|
|
1923
|
+
__decorateClass$a([
|
|
1924
|
+
Field(() => Date, { nullable: true }),
|
|
1925
|
+
IsOptional(),
|
|
1926
|
+
IsDate(),
|
|
1927
|
+
Type(() => Date)
|
|
1928
|
+
], GetLedger2PostingsInputDTO.prototype, "dateTo", 2);
|
|
1929
|
+
__decorateClass$a([
|
|
1930
|
+
Field(() => Int, { nullable: true, defaultValue: 1 }),
|
|
1931
|
+
IsOptional(),
|
|
1932
|
+
IsInt(),
|
|
1933
|
+
Min(1)
|
|
1934
|
+
], GetLedger2PostingsInputDTO.prototype, "page", 2);
|
|
1935
|
+
__decorateClass$a([
|
|
1936
|
+
Field(() => Int, { nullable: true, defaultValue: 50 }),
|
|
1937
|
+
IsOptional(),
|
|
1938
|
+
IsInt(),
|
|
1939
|
+
Min(1),
|
|
1940
|
+
Max(500)
|
|
1941
|
+
], GetLedger2PostingsInputDTO.prototype, "limit", 2);
|
|
1942
|
+
__decorateClass$a([
|
|
1943
|
+
Field(() => String, { nullable: true, defaultValue: "DESC" }),
|
|
1944
|
+
IsOptional(),
|
|
1945
|
+
IsIn(["ASC", "DESC"])
|
|
1946
|
+
], GetLedger2PostingsInputDTO.prototype, "sortOrder", 2);
|
|
1947
|
+
GetLedger2PostingsInputDTO = __decorateClass$a([
|
|
1948
|
+
InputType("GetLedger2PostingsInput")
|
|
1949
|
+
], GetLedger2PostingsInputDTO);
|
|
1950
|
+
|
|
1951
|
+
var __defProp$9 = Object.defineProperty;
|
|
1952
|
+
var __getOwnPropDesc$9 = Object.getOwnPropertyDescriptor;
|
|
1953
|
+
var __decorateClass$9 = (decorators, target, key, kind) => {
|
|
1954
|
+
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$9(target, key) : target;
|
|
1955
|
+
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
1956
|
+
if (decorator = decorators[i])
|
|
1957
|
+
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
1958
|
+
if (kind && result)
|
|
1959
|
+
__defProp$9(target, key, result);
|
|
1960
|
+
return result;
|
|
1961
|
+
};
|
|
1962
|
+
let ProcessesFilterInput = class {
|
|
1963
|
+
};
|
|
1964
|
+
__decorateClass$9([
|
|
1965
|
+
Field(() => String)
|
|
1966
|
+
], ProcessesFilterInput.prototype, "coopname", 2);
|
|
1967
|
+
__decorateClass$9([
|
|
1968
|
+
Field(() => String, { nullable: true })
|
|
1969
|
+
], ProcessesFilterInput.prototype, "processType", 2);
|
|
1970
|
+
__decorateClass$9([
|
|
1971
|
+
Field(() => String, { nullable: true })
|
|
1972
|
+
], ProcessesFilterInput.prototype, "username", 2);
|
|
1973
|
+
__decorateClass$9([
|
|
1974
|
+
Field(() => String, { nullable: true, description: "\u0418\u0434\u0435\u043D\u0442\u0438\u0444\u0438\u043A\u0430\u0442\u043E\u0440 \u043F\u0440\u043E\u0446\u0435\u0441\u0441\u0430 \u2014 \u0442\u043E\u0447\u0435\u0447\u043D\u0430\u044F \u0430\u0434\u0440\u0435\u0441\u0430\u0446\u0438\u044F \u043E\u0434\u043D\u043E\u0433\u043E \u043F\u0440\u043E\u0446\u0435\u0441\u0441\u0430 \u043F\u043E \u0435\u0433\u043E \u0445\u044D\u0448\u0443" })
|
|
1975
|
+
], ProcessesFilterInput.prototype, "processHash", 2);
|
|
1976
|
+
__decorateClass$9([
|
|
1977
|
+
Field(() => Int, { nullable: true })
|
|
1978
|
+
], ProcessesFilterInput.prototype, "fromBlock", 2);
|
|
1979
|
+
__decorateClass$9([
|
|
1980
|
+
Field(() => Int, { nullable: true })
|
|
1981
|
+
], ProcessesFilterInput.prototype, "toBlock", 2);
|
|
1982
|
+
ProcessesFilterInput = __decorateClass$9([
|
|
1983
|
+
InputType("ProcessesFilter")
|
|
1984
|
+
], ProcessesFilterInput);
|
|
1985
|
+
|
|
1986
|
+
var __defProp$8 = Object.defineProperty;
|
|
1987
|
+
var __getOwnPropDesc$8 = Object.getOwnPropertyDescriptor;
|
|
1988
|
+
var __decorateClass$8 = (decorators, target, key, kind) => {
|
|
1989
|
+
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$8(target, key) : target;
|
|
1990
|
+
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
1991
|
+
if (decorator = decorators[i])
|
|
1992
|
+
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
1993
|
+
if (kind && result)
|
|
1994
|
+
__defProp$8(target, key, result);
|
|
1995
|
+
return result;
|
|
1996
|
+
};
|
|
1997
|
+
let ProcessSummaryDTO = class {
|
|
1998
|
+
// actionCount/deltaCount/documentCount удалены: N+1 counters на каждой
|
|
1999
|
+
// странице listProcesses были запросы 300+ на request. UI читает
|
|
2000
|
+
// getProcess(hash) при раскрытии — там счётчики выводимы из массивов.
|
|
2001
|
+
};
|
|
2002
|
+
__decorateClass$8([
|
|
2003
|
+
Field(() => String)
|
|
2004
|
+
], ProcessSummaryDTO.prototype, "processType", 2);
|
|
2005
|
+
__decorateClass$8([
|
|
2006
|
+
Field(() => String)
|
|
2007
|
+
], ProcessSummaryDTO.prototype, "processHash", 2);
|
|
2008
|
+
__decorateClass$8([
|
|
2009
|
+
Field(() => String)
|
|
2010
|
+
], ProcessSummaryDTO.prototype, "coopname", 2);
|
|
2011
|
+
__decorateClass$8([
|
|
2012
|
+
Field(() => String, { nullable: true })
|
|
2013
|
+
], ProcessSummaryDTO.prototype, "username", 2);
|
|
2014
|
+
__decorateClass$8([
|
|
2015
|
+
Field(() => Date)
|
|
2016
|
+
], ProcessSummaryDTO.prototype, "firstSeenAt", 2);
|
|
2017
|
+
__decorateClass$8([
|
|
2018
|
+
Field(() => Date)
|
|
2019
|
+
], ProcessSummaryDTO.prototype, "lastSeenAt", 2);
|
|
2020
|
+
__decorateClass$8([
|
|
2021
|
+
Field(() => String, { nullable: true, description: "\u0421\u0443\u043C\u043C\u0430 \u0433\u043B\u0430\u0432\u043D\u043E\u0439 \u043E\u043F\u0435\u0440\u0430\u0446\u0438\u0438 \u043F\u0440\u043E\u0446\u0435\u0441\u0441\u0430 \u2014 \u043D\u0430\u0438\u0431\u043E\u043B\u044C\u0448\u0430\u044F \u0441\u0440\u0435\u0434\u0438 \u0435\u0433\u043E \u043E\u043F\u0435\u0440\u0430\u0446\u0438\u0439" })
|
|
2022
|
+
], ProcessSummaryDTO.prototype, "amount", 2);
|
|
2023
|
+
__decorateClass$8([
|
|
2024
|
+
Field(() => String, { nullable: true, description: "\u041D\u0430\u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435 \u0433\u043B\u0430\u0432\u043D\u043E\u0439 \u043E\u043F\u0435\u0440\u0430\u0446\u0438\u0438 \u043F\u0440\u043E\u0446\u0435\u0441\u0441\u0430" })
|
|
2025
|
+
], ProcessSummaryDTO.prototype, "memo", 2);
|
|
2026
|
+
ProcessSummaryDTO = __decorateClass$8([
|
|
2027
|
+
ObjectType("ProcessSummary")
|
|
2028
|
+
], ProcessSummaryDTO);
|
|
2029
|
+
const PaginatedProcessSummary = createPaginationResult(ProcessSummaryDTO, "ProcessSummary");
|
|
2030
|
+
|
|
2031
|
+
var __defProp$7 = Object.defineProperty;
|
|
2032
|
+
var __getOwnPropDesc$7 = Object.getOwnPropertyDescriptor;
|
|
2033
|
+
var __decorateClass$7 = (decorators, target, key, kind) => {
|
|
2034
|
+
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$7(target, key) : target;
|
|
2035
|
+
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
2036
|
+
if (decorator = decorators[i])
|
|
2037
|
+
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
2038
|
+
if (kind && result)
|
|
2039
|
+
__defProp$7(target, key, result);
|
|
2040
|
+
return result;
|
|
2041
|
+
};
|
|
2042
|
+
let ProcessActionDTO = class {
|
|
2043
|
+
};
|
|
2044
|
+
__decorateClass$7([
|
|
2045
|
+
Field(() => String)
|
|
2046
|
+
], ProcessActionDTO.prototype, "id", 2);
|
|
2047
|
+
__decorateClass$7([
|
|
2048
|
+
Field(() => String)
|
|
2049
|
+
], ProcessActionDTO.prototype, "account", 2);
|
|
2050
|
+
__decorateClass$7([
|
|
2051
|
+
Field(() => String)
|
|
2052
|
+
], ProcessActionDTO.prototype, "name", 2);
|
|
2053
|
+
__decorateClass$7([
|
|
2054
|
+
Field(() => GraphQLJSON$1, { nullable: true })
|
|
2055
|
+
], ProcessActionDTO.prototype, "data", 2);
|
|
2056
|
+
__decorateClass$7([
|
|
2057
|
+
Field(() => Number)
|
|
2058
|
+
], ProcessActionDTO.prototype, "block_num", 2);
|
|
2059
|
+
__decorateClass$7([
|
|
2060
|
+
Field(() => String)
|
|
2061
|
+
], ProcessActionDTO.prototype, "block_id", 2);
|
|
2062
|
+
__decorateClass$7([
|
|
2063
|
+
Field(() => String)
|
|
2064
|
+
], ProcessActionDTO.prototype, "global_sequence", 2);
|
|
2065
|
+
__decorateClass$7([
|
|
2066
|
+
Field(() => String)
|
|
2067
|
+
], ProcessActionDTO.prototype, "transaction_id", 2);
|
|
2068
|
+
__decorateClass$7([
|
|
2069
|
+
Field(() => Date)
|
|
2070
|
+
], ProcessActionDTO.prototype, "created_at", 2);
|
|
2071
|
+
ProcessActionDTO = __decorateClass$7([
|
|
2072
|
+
ObjectType("ProcessAction")
|
|
2073
|
+
], ProcessActionDTO);
|
|
2074
|
+
let ProcessDeltaDTO = class {
|
|
2075
|
+
};
|
|
2076
|
+
__decorateClass$7([
|
|
2077
|
+
Field(() => String)
|
|
2078
|
+
], ProcessDeltaDTO.prototype, "id", 2);
|
|
2079
|
+
__decorateClass$7([
|
|
2080
|
+
Field(() => String)
|
|
2081
|
+
], ProcessDeltaDTO.prototype, "code", 2);
|
|
2082
|
+
__decorateClass$7([
|
|
2083
|
+
Field(() => String)
|
|
2084
|
+
], ProcessDeltaDTO.prototype, "scope", 2);
|
|
2085
|
+
__decorateClass$7([
|
|
2086
|
+
Field(() => String)
|
|
2087
|
+
], ProcessDeltaDTO.prototype, "table", 2);
|
|
2088
|
+
__decorateClass$7([
|
|
2089
|
+
Field(() => String)
|
|
2090
|
+
], ProcessDeltaDTO.prototype, "primary_key", 2);
|
|
2091
|
+
__decorateClass$7([
|
|
2092
|
+
Field(() => Boolean)
|
|
2093
|
+
], ProcessDeltaDTO.prototype, "present", 2);
|
|
2094
|
+
__decorateClass$7([
|
|
2095
|
+
Field(() => GraphQLJSON$1, { nullable: true })
|
|
2096
|
+
], ProcessDeltaDTO.prototype, "value", 2);
|
|
2097
|
+
__decorateClass$7([
|
|
2098
|
+
Field(() => Number)
|
|
2099
|
+
], ProcessDeltaDTO.prototype, "block_num", 2);
|
|
2100
|
+
__decorateClass$7([
|
|
2101
|
+
Field(() => Date)
|
|
2102
|
+
], ProcessDeltaDTO.prototype, "created_at", 2);
|
|
2103
|
+
ProcessDeltaDTO = __decorateClass$7([
|
|
2104
|
+
ObjectType("ProcessDelta")
|
|
2105
|
+
], ProcessDeltaDTO);
|
|
2106
|
+
let ProcessDocumentSourceDTO = class {
|
|
2107
|
+
};
|
|
2108
|
+
__decorateClass$7([
|
|
2109
|
+
Field(() => String)
|
|
2110
|
+
], ProcessDocumentSourceDTO.prototype, "code", 2);
|
|
2111
|
+
__decorateClass$7([
|
|
2112
|
+
Field(() => String)
|
|
2113
|
+
], ProcessDocumentSourceDTO.prototype, "table", 2);
|
|
2114
|
+
__decorateClass$7([
|
|
2115
|
+
Field(() => String)
|
|
2116
|
+
], ProcessDocumentSourceDTO.prototype, "field", 2);
|
|
2117
|
+
__decorateClass$7([
|
|
2118
|
+
Field(() => String)
|
|
2119
|
+
], ProcessDocumentSourceDTO.prototype, "primary_key", 2);
|
|
2120
|
+
ProcessDocumentSourceDTO = __decorateClass$7([
|
|
2121
|
+
ObjectType("ProcessDocumentSource")
|
|
2122
|
+
], ProcessDocumentSourceDTO);
|
|
2123
|
+
let ProcessDocumentDTO = class {
|
|
2124
|
+
};
|
|
2125
|
+
__decorateClass$7([
|
|
2126
|
+
Field(() => String)
|
|
2127
|
+
], ProcessDocumentDTO.prototype, "hash", 2);
|
|
2128
|
+
__decorateClass$7([
|
|
2129
|
+
Field(() => ProcessDocumentSourceDTO)
|
|
2130
|
+
], ProcessDocumentDTO.prototype, "source", 2);
|
|
2131
|
+
__decorateClass$7([
|
|
2132
|
+
Field(() => GraphQLJSON$1)
|
|
2133
|
+
], ProcessDocumentDTO.prototype, "document", 2);
|
|
2134
|
+
__decorateClass$7([
|
|
2135
|
+
Field(() => GraphQLJSON$1, { nullable: true })
|
|
2136
|
+
], ProcessDocumentDTO.prototype, "raw", 2);
|
|
2137
|
+
ProcessDocumentDTO = __decorateClass$7([
|
|
2138
|
+
ObjectType("ProcessDocument")
|
|
2139
|
+
], ProcessDocumentDTO);
|
|
2140
|
+
let ProcessViewDTO = class {
|
|
2141
|
+
};
|
|
2142
|
+
__decorateClass$7([
|
|
2143
|
+
Field(() => String)
|
|
2144
|
+
], ProcessViewDTO.prototype, "process_type", 2);
|
|
2145
|
+
__decorateClass$7([
|
|
2146
|
+
Field(() => String)
|
|
2147
|
+
], ProcessViewDTO.prototype, "process_hash", 2);
|
|
2148
|
+
__decorateClass$7([
|
|
2149
|
+
Field(() => String)
|
|
2150
|
+
], ProcessViewDTO.prototype, "coopname", 2);
|
|
2151
|
+
__decorateClass$7([
|
|
2152
|
+
Field(() => Date)
|
|
2153
|
+
], ProcessViewDTO.prototype, "first_seen_at", 2);
|
|
2154
|
+
__decorateClass$7([
|
|
2155
|
+
Field(() => Date)
|
|
2156
|
+
], ProcessViewDTO.prototype, "last_seen_at", 2);
|
|
2157
|
+
__decorateClass$7([
|
|
2158
|
+
Field(() => [ProcessActionDTO])
|
|
2159
|
+
], ProcessViewDTO.prototype, "actions", 2);
|
|
2160
|
+
__decorateClass$7([
|
|
2161
|
+
Field(() => [ProcessDeltaDTO])
|
|
2162
|
+
], ProcessViewDTO.prototype, "delta_history", 2);
|
|
2163
|
+
__decorateClass$7([
|
|
2164
|
+
Field(() => [ProcessDocumentDTO])
|
|
2165
|
+
], ProcessViewDTO.prototype, "documents", 2);
|
|
2166
|
+
ProcessViewDTO = __decorateClass$7([
|
|
2167
|
+
ObjectType("ProcessView")
|
|
2168
|
+
], ProcessViewDTO);
|
|
2169
|
+
|
|
2170
|
+
var __defProp$6 = Object.defineProperty;
|
|
2171
|
+
var __getOwnPropDesc$6 = Object.getOwnPropertyDescriptor;
|
|
2172
|
+
var __decorateClass$6 = (decorators, target, key, kind) => {
|
|
2173
|
+
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$6(target, key) : target;
|
|
2174
|
+
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
2175
|
+
if (decorator = decorators[i])
|
|
2176
|
+
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
2177
|
+
if (kind && result)
|
|
2178
|
+
__defProp$6(target, key, result);
|
|
2179
|
+
return result;
|
|
2180
|
+
};
|
|
2181
|
+
let TransactionDTO = class {
|
|
2182
|
+
};
|
|
2183
|
+
__decorateClass$6([
|
|
2184
|
+
Field(() => GraphQLJSON, { description: "\u0411\u043B\u043E\u043A\u0447\u0435\u0439\u043D, \u043A\u043E\u0442\u043E\u0440\u044B\u0439 \u0438\u0441\u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u043B\u0441\u044F", nullable: true })
|
|
2185
|
+
], TransactionDTO.prototype, "chain", 2);
|
|
2186
|
+
__decorateClass$6([
|
|
2187
|
+
Field(() => GraphQLJSON, { description: "\u0417\u0430\u043F\u0440\u043E\u0441 \u043D\u0430 \u043F\u043E\u0434\u043F\u0438\u0441\u0430\u043D\u0438\u0435 \u0442\u0440\u0430\u043D\u0437\u0430\u043A\u0446\u0438\u0438", nullable: true })
|
|
2188
|
+
], TransactionDTO.prototype, "request", 2);
|
|
2189
|
+
__decorateClass$6([
|
|
2190
|
+
Field(() => GraphQLJSON, { description: "\u0420\u0430\u0437\u0440\u0435\u0448\u0435\u043D\u043D\u044B\u0439 \u0437\u0430\u043F\u0440\u043E\u0441 \u043D\u0430 \u043F\u043E\u0434\u043F\u0438\u0441\u0430\u043D\u0438\u0435 \u0442\u0440\u0430\u043D\u0437\u0430\u043A\u0446\u0438\u0438", nullable: true })
|
|
2191
|
+
], TransactionDTO.prototype, "resolved", 2);
|
|
2192
|
+
__decorateClass$6([
|
|
2193
|
+
Field(() => GraphQLJSON, {
|
|
2194
|
+
description: "\u041E\u0442\u0432\u0435\u0442 \u043E\u0442 API \u043F\u043E\u0441\u043B\u0435 \u043E\u0442\u043F\u0440\u0430\u0432\u043A\u0438 \u0442\u0440\u0430\u043D\u0437\u0430\u043A\u0446\u0438\u0438 (\u0435\u0441\u043B\u0438 \u0431\u044B\u043B \u0432\u044B\u043F\u043E\u043B\u043D\u0435\u043D \u0431\u0440\u043E\u0434\u043A\u0430\u0441\u0442)",
|
|
2195
|
+
nullable: true
|
|
2196
|
+
})
|
|
2197
|
+
], TransactionDTO.prototype, "response", 2);
|
|
2198
|
+
__decorateClass$6([
|
|
2199
|
+
Field(() => GraphQLJSON, { description: "\u0412\u043E\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u043C\u044B\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u044F \u043F\u043E\u0441\u043B\u0435 \u0432\u044B\u043F\u043E\u043B\u043D\u0435\u043D\u0438\u044F \u0442\u0440\u0430\u043D\u0437\u0430\u043A\u0446\u0438\u0438", nullable: true })
|
|
2200
|
+
], TransactionDTO.prototype, "returns", 2);
|
|
2201
|
+
__decorateClass$6([
|
|
2202
|
+
Field(() => GraphQLJSON, { description: "\u0420\u0435\u0432\u0438\u0437\u0438\u0438 \u0442\u0440\u0430\u043D\u0437\u0430\u043A\u0446\u0438\u0438, \u0438\u0437\u043C\u0435\u043D\u0435\u043D\u043D\u044B\u0435 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043D\u0438\u044F\u043C\u0438 \u0432 ESR \u0444\u043E\u0440\u043C\u0430\u0442\u0435", nullable: true })
|
|
2203
|
+
], TransactionDTO.prototype, "revisions", 2);
|
|
2204
|
+
__decorateClass$6([
|
|
2205
|
+
Field(() => GraphQLJSON, { description: "\u041F\u043E\u0434\u043F\u0438\u0441\u0438 \u0442\u0440\u0430\u043D\u0437\u0430\u043A\u0446\u0438\u0438", nullable: true })
|
|
1218
2206
|
], TransactionDTO.prototype, "signatures", 2);
|
|
1219
2207
|
__decorateClass$6([
|
|
1220
2208
|
Field(() => GraphQLJSON, { description: "\u0410\u0432\u0442\u043E\u0440\u0438\u0437\u043E\u0432\u0430\u043D\u043D\u044B\u0439 \u043F\u043E\u0434\u043F\u0438\u0441\u0430\u043D\u0442", nullable: true })
|
|
@@ -2082,72 +3070,6 @@ function sanitizeUserText(value) {
|
|
|
2082
3070
|
return _Common.Text.sanitizeEditorMarkdown(value);
|
|
2083
3071
|
}
|
|
2084
3072
|
|
|
2085
|
-
function resolveSortColumn(repository, sortBy, fallback) {
|
|
2086
|
-
if (!sortBy)
|
|
2087
|
-
return fallback;
|
|
2088
|
-
const isKnownColumn = repository.metadata.columns.some(
|
|
2089
|
-
(column) => column.propertyName === sortBy || column.databaseName === sortBy
|
|
2090
|
-
);
|
|
2091
|
-
return isKnownColumn ? sortBy : fallback;
|
|
2092
|
-
}
|
|
2093
|
-
|
|
2094
|
-
class LocalChangesCollector {
|
|
2095
|
-
constructor(isWatched, publish) {
|
|
2096
|
-
this.isWatched = isWatched;
|
|
2097
|
-
this.publish = publish;
|
|
2098
|
-
this.pending = /* @__PURE__ */ new WeakMap();
|
|
2099
|
-
}
|
|
2100
|
-
afterInsert(event) {
|
|
2101
|
-
this.collect(event.metadata, event.queryRunner, event.entity);
|
|
2102
|
-
}
|
|
2103
|
-
afterUpdate(event) {
|
|
2104
|
-
this.collect(event.metadata, event.queryRunner, { ...event.databaseEntity ?? {}, ...event.entity ?? {} });
|
|
2105
|
-
}
|
|
2106
|
-
afterRemove(event) {
|
|
2107
|
-
const row = event.databaseEntity ?? event.entity;
|
|
2108
|
-
this.collect(event.metadata, event.queryRunner, row, event.entityId);
|
|
2109
|
-
}
|
|
2110
|
-
afterTransactionCommit(event) {
|
|
2111
|
-
const changes = this.pending.get(event.queryRunner);
|
|
2112
|
-
if (!changes)
|
|
2113
|
-
return;
|
|
2114
|
-
this.pending.delete(event.queryRunner);
|
|
2115
|
-
changes.forEach((c) => void this.publish(c.table, c.primary_key, c.row));
|
|
2116
|
-
}
|
|
2117
|
-
afterTransactionRollback(event) {
|
|
2118
|
-
this.pending.delete(event.queryRunner);
|
|
2119
|
-
}
|
|
2120
|
-
collect(metadata, queryRunner, row, entityId) {
|
|
2121
|
-
const table = metadata.tableName;
|
|
2122
|
-
if (!this.isWatched(table))
|
|
2123
|
-
return;
|
|
2124
|
-
const change = { table, primary_key: primaryKeyOf(metadata, row, entityId), row };
|
|
2125
|
-
if (queryRunner?.isTransactionActive) {
|
|
2126
|
-
const list = this.pending.get(queryRunner) ?? [];
|
|
2127
|
-
list.push(change);
|
|
2128
|
-
this.pending.set(queryRunner, list);
|
|
2129
|
-
return;
|
|
2130
|
-
}
|
|
2131
|
-
void this.publish(change.table, change.primary_key, change.row);
|
|
2132
|
-
}
|
|
2133
|
-
}
|
|
2134
|
-
function primaryKeyOf(metadata, row, entityId) {
|
|
2135
|
-
if (row) {
|
|
2136
|
-
const ids = metadata.primaryColumns.map((c) => c.getEntityValue(row)).filter((v) => v !== void 0 && v !== null);
|
|
2137
|
-
if (ids.length)
|
|
2138
|
-
return ids.map(String).join(":");
|
|
2139
|
-
}
|
|
2140
|
-
if (entityId !== void 0 && entityId !== null) {
|
|
2141
|
-
return typeof entityId === "object" ? Object.values(entityId).map(String).join(":") : String(entityId);
|
|
2142
|
-
}
|
|
2143
|
-
return "";
|
|
2144
|
-
}
|
|
2145
|
-
|
|
2146
|
-
const numericColumnTransformer = {
|
|
2147
|
-
to: (value) => value,
|
|
2148
|
-
from: (value) => value === null || value === void 0 ? value : Number(value)
|
|
2149
|
-
};
|
|
2150
|
-
|
|
2151
3073
|
function SafeMarkup(validationOptions) {
|
|
2152
3074
|
return function(object, propertyName) {
|
|
2153
3075
|
registerDecorator({
|
|
@@ -2164,6 +3086,15 @@ function SafeMarkup(validationOptions) {
|
|
|
2164
3086
|
};
|
|
2165
3087
|
}
|
|
2166
3088
|
|
|
3089
|
+
function pickDefined(source, keys) {
|
|
3090
|
+
const picked = {};
|
|
3091
|
+
for (const key of keys) {
|
|
3092
|
+
if (source[key] !== void 0)
|
|
3093
|
+
picked[key] = source[key];
|
|
3094
|
+
}
|
|
3095
|
+
return picked;
|
|
3096
|
+
}
|
|
3097
|
+
|
|
2167
3098
|
class HttpApiError extends HttpException {
|
|
2168
3099
|
constructor(statusCode, message, isOperational = true, stack, subcode) {
|
|
2169
3100
|
super(message, statusCode);
|
|
@@ -2220,4 +3151,4 @@ function rethrowChainError(error) {
|
|
|
2220
3151
|
throw DomainError.badRequest(code ?? "CHAIN_ASSERT", { message: text });
|
|
2221
3152
|
}
|
|
2222
3153
|
|
|
2223
|
-
export { ActiveUserStatusGuard, AmountFormatterUtils, AssetUtils,
|
|
3154
|
+
export { APP_RIGHTS, ActiveUserStatusGuard, AmountFormatterUtils, AssetUtils, BaseExtensionModule, BucketRegistry, CandidateFilterInputDTO, CandidateOutputDTO, CandidateStatus, CouncilField, CurrencyValidationUtil, CurrentUser, DEFAULT_DOCUMENT_VERSION, DateUtils, DocumentAggregateDTO, DomainError, DomainToBlockchainUtils, EMPTY_HASH, EXTENSION_APP_TERMINATE_EVENT, EXTENSION_REPOSITORY, EXTENSION_SECRET_SET, EXTENSION_SECRET_UNSET, ExpenseProposalStatementGenerateDocumentInputDTO, ExpenseProposalStatementSignedDocumentInputDTO, ExpenseProposalStatementSignedMetaDocumentInputDTO, ExtensionAvailability, ExtensionConfigSuppliedBy, ExtensionDomainEntity, GRANTED_SCOPE_KEY, GenerateDocumentInputDTO, GenerateDocumentOptionsInputDTO, GenerateMetaDocumentInputDTO, GeneratedDocumentDTO, GetLedger2HistoryInputDTO, GetLedger2PostingsInputDTO, GqlJwtAuthGuard, GrantedScope, HttpApiError, HttpJwtAuthGuard, IPNProvider, InjectBucket, LOG_EXTENSION_REPOSITORY, LangType, Ledger2AccountDTO, Ledger2HistoryResponseDTO, Ledger2OperationDTO, Ledger2PostingDTO, Ledger2PostingsResponseDTO, Ledger2WalletDTO, LogExtensionDomainEntity, MetaDocumentInputDTO, ONBOARDING_EXPIRY_DAYS, ONBOARDING_EXPIRY_MS, OptionalCurrentUser, OptionalGqlJwtAuthGuard, PaginatedProcessSummary, PaginationInputDTO, PaginationResult, PaginationUtils, PaymentProvider, PollingProvider, ProcessActionDTO, ProcessDeltaDTO, ProcessDocumentDTO, ProcessDocumentSourceDTO, ProcessSummaryDTO, ProcessViewDTO, ProcessesFilterInput, QuantityUtils, RIGHT_METADATA_KEY, RequireRight, RightsGuard, SCOPE_DENIALS, SELF, SORT_FIELD_PATTERN, SafeMarkup, SignatureInfoDTO, SignatureInfoInputDTO, SignedDigitalDocumentDTO, SignedDigitalDocumentInputDTO, TransactionDTO, UseBucket, attachOne, bucketProvidersFor, bucketTokenFor, buildPaginationResult, chainErrorCode, chainRefusalOf, chainTextDigest, checkPaymentAmount, checkPaymentSymbol, checkRight, checkRightScope, computeOnboardingExpiresAt, configureExtensionAuth, configurePlatformSettings, councilRolesOf, createPaginationResult, desktopGrants, desktopGrantsOf, domainErrorMessage, expandRights, extensionDatabaseMigrations, generateHashFromString, generateRandomHash, generateUniqueHash, getAmountPlusFee, getAppliedBlockNum, hasServerSecret, isChainTextDigest, isChainTextOf, isExtensionAvailable, memberRolesOf, mergeSecretConfig, oneOf, paginationInputToOffset, parseChainAssert, pickDefined, platformSettings, providerSuppliedPaths, redactSecretConfig, registerExtensionDatabaseMigrations, resetExtensionDatabaseMigrations, resolveChainText, rethrowChainError, rightConditions, rightGrants, rightMatches, rightsByRole, rightsHeld, sanitizeUserText, scopeConditions, scopeOfRight, scopesMatched, validationMessage, verifySignedDocumentAgainstStoredDraft, waitForEvent };
|