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