@coopenomics/extension-kit 2026.9.24-3 → 2026.10.11
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 +1375 -305
- package/dist/index.d.cts +744 -156
- package/dist/index.d.mts +744 -156
- package/dist/index.d.ts +744 -156
- package/dist/index.mjs +1311 -288
- 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,380 @@ 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: NO_RIGHT };
|
|
577
|
+
return { allowed: false, reason: "condition", denial: def.conditionDenials?.[missing] ?? 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
|
+
if (!requirement)
|
|
636
|
+
return true;
|
|
637
|
+
const gql = graphql.GqlExecutionContext.create(context);
|
|
638
|
+
const request = gql.getContext()?.req;
|
|
639
|
+
if (hasServerSecret(request?.headers)) {
|
|
640
|
+
const everything = { scopes: ["all"], kus: null };
|
|
641
|
+
if (request)
|
|
642
|
+
request[GRANTED_SCOPE_KEY] = everything;
|
|
643
|
+
return true;
|
|
644
|
+
}
|
|
645
|
+
const user = request?.user;
|
|
646
|
+
if (!user?.username)
|
|
647
|
+
throw DomainError.unauthorized("KIT_USER_NOT_AUTHORIZED");
|
|
648
|
+
const caller = { username: user.username, role: user.role, status: user.status };
|
|
649
|
+
const roles = await this.def.roles(caller, request);
|
|
650
|
+
const outcome = await checkRight(this.def, caller, roles, requirement, gql.getArgs() ?? {});
|
|
651
|
+
if (!outcome.allowed) {
|
|
652
|
+
const actions = Array.isArray(requirement.action) ? requirement.action.join("|") : requirement.action;
|
|
653
|
+
this.logger.warn(
|
|
654
|
+
`forbidden-attempt: member=${caller.username} extension=${this.def.extensionName} operation=${context.getClass()?.name}.${context.getHandler()?.name} right=${requirement.resource}:${actions} reason=${outcome.reason} denial=${outcome.denial} roles=[${roles.join(", ")}]`
|
|
655
|
+
);
|
|
656
|
+
throw DomainError.forbidden(outcome.denial);
|
|
657
|
+
}
|
|
658
|
+
request[GRANTED_SCOPE_KEY] = outcome.scope;
|
|
659
|
+
return true;
|
|
660
|
+
}
|
|
661
|
+
};
|
|
662
|
+
exports.RightsGuard = __decorateClass$p([
|
|
663
|
+
common.Injectable(),
|
|
664
|
+
__decorateParam(0, common.Inject(core.Reflector)),
|
|
665
|
+
__decorateParam(1, common.Inject(APP_RIGHTS))
|
|
666
|
+
], exports.RightsGuard);
|
|
667
|
+
|
|
668
|
+
var __defProp$o = Object.defineProperty;
|
|
669
|
+
var __getOwnPropDesc$o = Object.getOwnPropertyDescriptor;
|
|
670
|
+
var __decorateClass$o = (decorators, target, key, kind) => {
|
|
671
|
+
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$o(target, key) : target;
|
|
672
|
+
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
673
|
+
if (decorator = decorators[i])
|
|
674
|
+
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
675
|
+
if (kind && result)
|
|
676
|
+
__defProp$o(target, key, result);
|
|
361
677
|
return result;
|
|
362
678
|
};
|
|
363
679
|
exports.BaseExtensionModule = class BaseExtensionModule {
|
|
@@ -368,34 +684,34 @@ exports.BaseExtensionModule = class BaseExtensionModule {
|
|
|
368
684
|
async onModuleInit() {
|
|
369
685
|
}
|
|
370
686
|
};
|
|
371
|
-
exports.BaseExtensionModule = __decorateClass$
|
|
687
|
+
exports.BaseExtensionModule = __decorateClass$o([
|
|
372
688
|
common.Injectable()
|
|
373
689
|
], exports.BaseExtensionModule);
|
|
374
690
|
|
|
375
|
-
var __defProp$
|
|
376
|
-
var __getOwnPropDesc$
|
|
377
|
-
var __decorateClass$
|
|
378
|
-
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$
|
|
691
|
+
var __defProp$n = Object.defineProperty;
|
|
692
|
+
var __getOwnPropDesc$n = Object.getOwnPropertyDescriptor;
|
|
693
|
+
var __decorateClass$n = (decorators, target, key, kind) => {
|
|
694
|
+
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$n(target, key) : target;
|
|
379
695
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
380
696
|
if (decorator = decorators[i])
|
|
381
697
|
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
382
698
|
if (kind && result)
|
|
383
|
-
__defProp$
|
|
699
|
+
__defProp$n(target, key, result);
|
|
384
700
|
return result;
|
|
385
701
|
};
|
|
386
702
|
exports.PaymentProvider = class PaymentProvider extends exports.BaseExtensionModule {
|
|
387
703
|
};
|
|
388
|
-
exports.PaymentProvider = __decorateClass$
|
|
704
|
+
exports.PaymentProvider = __decorateClass$n([
|
|
389
705
|
common.Injectable()
|
|
390
706
|
], exports.PaymentProvider);
|
|
391
707
|
exports.PollingProvider = class PollingProvider extends exports.PaymentProvider {
|
|
392
708
|
};
|
|
393
|
-
exports.PollingProvider = __decorateClass$
|
|
709
|
+
exports.PollingProvider = __decorateClass$n([
|
|
394
710
|
common.Injectable()
|
|
395
711
|
], exports.PollingProvider);
|
|
396
712
|
exports.IPNProvider = class IPNProvider extends exports.PaymentProvider {
|
|
397
713
|
};
|
|
398
|
-
exports.IPNProvider = __decorateClass$
|
|
714
|
+
exports.IPNProvider = __decorateClass$n([
|
|
399
715
|
common.Injectable()
|
|
400
716
|
], exports.IPNProvider);
|
|
401
717
|
|
|
@@ -454,48 +770,48 @@ function bucketProvidersFor(fileStoragePortToken, consumers) {
|
|
|
454
770
|
});
|
|
455
771
|
}
|
|
456
772
|
|
|
457
|
-
var __defProp$
|
|
458
|
-
var __getOwnPropDesc$
|
|
459
|
-
var __decorateClass$
|
|
460
|
-
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$
|
|
773
|
+
var __defProp$m = Object.defineProperty;
|
|
774
|
+
var __getOwnPropDesc$m = Object.getOwnPropertyDescriptor;
|
|
775
|
+
var __decorateClass$m = (decorators, target, key, kind) => {
|
|
776
|
+
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$m(target, key) : target;
|
|
461
777
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
462
778
|
if (decorator = decorators[i])
|
|
463
779
|
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
464
780
|
if (kind && result)
|
|
465
|
-
__defProp$
|
|
781
|
+
__defProp$m(target, key, result);
|
|
466
782
|
return result;
|
|
467
783
|
};
|
|
468
784
|
exports.SignatureInfoInputDTO = class SignatureInfoInputDTO {
|
|
469
785
|
};
|
|
470
|
-
__decorateClass$
|
|
786
|
+
__decorateClass$m([
|
|
471
787
|
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
788
|
classValidator.IsNumber()
|
|
473
789
|
], exports.SignatureInfoInputDTO.prototype, "id", 2);
|
|
474
|
-
__decorateClass$
|
|
790
|
+
__decorateClass$m([
|
|
475
791
|
graphql.Field(() => String, { description: "\u0410\u043A\u043A\u0430\u0443\u043D\u0442 \u043F\u043E\u0434\u043F\u0438\u0441\u0430\u0432\u0448\u0435\u0433\u043E" }),
|
|
476
792
|
classValidator.IsString()
|
|
477
793
|
], exports.SignatureInfoInputDTO.prototype, "signer", 2);
|
|
478
|
-
__decorateClass$
|
|
794
|
+
__decorateClass$m([
|
|
479
795
|
graphql.Field(() => String, { description: "\u041F\u0443\u0431\u043B\u0438\u0447\u043D\u044B\u0439 \u043A\u043B\u044E\u0447" }),
|
|
480
796
|
classValidator.IsString()
|
|
481
797
|
], exports.SignatureInfoInputDTO.prototype, "public_key", 2);
|
|
482
|
-
__decorateClass$
|
|
798
|
+
__decorateClass$m([
|
|
483
799
|
graphql.Field(() => String, { description: "\u041F\u043E\u0434\u043F\u0438\u0441\u044C \u0445\u044D\u0448\u0430" }),
|
|
484
800
|
classValidator.IsString()
|
|
485
801
|
], exports.SignatureInfoInputDTO.prototype, "signature", 2);
|
|
486
|
-
__decorateClass$
|
|
802
|
+
__decorateClass$m([
|
|
487
803
|
graphql.Field(() => String, { description: "\u0412\u0440\u0435\u043C\u044F \u043F\u043E\u0434\u043F\u0438\u0441\u0430\u043D\u0438\u044F" }),
|
|
488
804
|
classValidator.IsString()
|
|
489
805
|
], exports.SignatureInfoInputDTO.prototype, "signed_at", 2);
|
|
490
|
-
__decorateClass$
|
|
806
|
+
__decorateClass$m([
|
|
491
807
|
graphql.Field(() => String, { description: "\u041F\u043E\u0434\u043F\u0438\u0441\u0430\u043D\u043D\u044B\u0439 \u0445\u044D\u0448" }),
|
|
492
808
|
classValidator.IsString()
|
|
493
809
|
], exports.SignatureInfoInputDTO.prototype, "signed_hash", 2);
|
|
494
|
-
__decorateClass$
|
|
810
|
+
__decorateClass$m([
|
|
495
811
|
graphql.Field(() => String, { description: "\u041C\u0435\u0442\u0430-\u0434\u0430\u043D\u043D\u044B\u0435 \u043F\u043E\u0434\u043F\u0438\u0441\u0438" }),
|
|
496
812
|
classValidator.IsString()
|
|
497
813
|
], exports.SignatureInfoInputDTO.prototype, "meta", 2);
|
|
498
|
-
exports.SignatureInfoInputDTO = __decorateClass$
|
|
814
|
+
exports.SignatureInfoInputDTO = __decorateClass$m([
|
|
499
815
|
graphql.InputType("SignatureInfoInput")
|
|
500
816
|
], exports.SignatureInfoInputDTO);
|
|
501
817
|
exports.SignedDigitalDocumentInputDTO = class SignedDigitalDocumentInputDTO {
|
|
@@ -516,33 +832,33 @@ exports.SignedDigitalDocumentInputDTO = class SignedDigitalDocumentInputDTO {
|
|
|
516
832
|
};
|
|
517
833
|
}
|
|
518
834
|
};
|
|
519
|
-
__decorateClass$
|
|
835
|
+
__decorateClass$m([
|
|
520
836
|
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
837
|
classValidator.IsString()
|
|
522
838
|
], exports.SignedDigitalDocumentInputDTO.prototype, "version", 2);
|
|
523
|
-
__decorateClass$
|
|
839
|
+
__decorateClass$m([
|
|
524
840
|
graphql.Field(() => String, { description: "\u041E\u0431\u0449\u0438\u0439 \u0445\u044D\u0448 (doc_hash + meta_hash)" }),
|
|
525
841
|
classValidator.IsString()
|
|
526
842
|
], exports.SignedDigitalDocumentInputDTO.prototype, "hash", 2);
|
|
527
|
-
__decorateClass$
|
|
843
|
+
__decorateClass$m([
|
|
528
844
|
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
845
|
classValidator.IsString()
|
|
530
846
|
], exports.SignedDigitalDocumentInputDTO.prototype, "doc_hash", 2);
|
|
531
|
-
__decorateClass$
|
|
847
|
+
__decorateClass$m([
|
|
532
848
|
graphql.Field(() => String, { description: "\u0425\u044D\u0448 \u043C\u0435\u0442\u0430-\u0434\u0430\u043D\u043D\u044B\u0445" }),
|
|
533
849
|
classValidator.IsString()
|
|
534
850
|
], exports.SignedDigitalDocumentInputDTO.prototype, "meta_hash", 2);
|
|
535
|
-
__decorateClass$
|
|
536
|
-
graphql.Field(() =>
|
|
851
|
+
__decorateClass$m([
|
|
852
|
+
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
853
|
], exports.SignedDigitalDocumentInputDTO.prototype, "meta", 2);
|
|
538
|
-
__decorateClass$
|
|
854
|
+
__decorateClass$m([
|
|
539
855
|
graphql.Field(() => [exports.SignatureInfoInputDTO], { description: "\u0412\u0435\u043A\u0442\u043E\u0440 \u043F\u043E\u0434\u043F\u0438\u0441\u0435\u0439" }),
|
|
540
856
|
classValidator.IsArray(),
|
|
541
857
|
classValidator.ArrayMinSize(1),
|
|
542
858
|
classValidator.ValidateNested({ each: true }),
|
|
543
859
|
classTransformer.Type(() => exports.SignatureInfoInputDTO)
|
|
544
860
|
], exports.SignedDigitalDocumentInputDTO.prototype, "signatures", 2);
|
|
545
|
-
exports.SignedDigitalDocumentInputDTO = __decorateClass$
|
|
861
|
+
exports.SignedDigitalDocumentInputDTO = __decorateClass$m([
|
|
546
862
|
graphql.InputType("SignedDigitalDocumentInput")
|
|
547
863
|
], exports.SignedDigitalDocumentInputDTO);
|
|
548
864
|
|
|
@@ -555,186 +871,186 @@ graphql.registerEnumType(LangType, {
|
|
|
555
871
|
description: "\u042F\u0437\u044B\u043A \u0434\u043E\u043A\u0443\u043C\u0435\u043D\u0442\u0430"
|
|
556
872
|
});
|
|
557
873
|
|
|
558
|
-
var __defProp$
|
|
559
|
-
var __getOwnPropDesc$
|
|
560
|
-
var __decorateClass$
|
|
561
|
-
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$
|
|
874
|
+
var __defProp$l = Object.defineProperty;
|
|
875
|
+
var __getOwnPropDesc$l = Object.getOwnPropertyDescriptor;
|
|
876
|
+
var __decorateClass$l = (decorators, target, key, kind) => {
|
|
877
|
+
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$l(target, key) : target;
|
|
562
878
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
563
879
|
if (decorator = decorators[i])
|
|
564
880
|
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
565
881
|
if (kind && result)
|
|
566
|
-
__defProp$
|
|
882
|
+
__defProp$l(target, key, result);
|
|
567
883
|
return result;
|
|
568
884
|
};
|
|
569
885
|
exports.MetaDocumentInputDTO = class MetaDocumentInputDTO {
|
|
570
886
|
};
|
|
571
|
-
__decorateClass$
|
|
887
|
+
__decorateClass$l([
|
|
572
888
|
graphql.Field(() => String, { description: "\u041D\u0430\u0437\u0432\u0430\u043D\u0438\u0435 \u0434\u043E\u043A\u0443\u043C\u0435\u043D\u0442\u0430" }),
|
|
573
889
|
classValidator.IsString()
|
|
574
890
|
], exports.MetaDocumentInputDTO.prototype, "title", 2);
|
|
575
|
-
__decorateClass$
|
|
891
|
+
__decorateClass$l([
|
|
576
892
|
graphql.Field(() => graphql.Int, { description: "ID \u0434\u043E\u043A\u0443\u043C\u0435\u043D\u0442\u0430 \u0432 \u0440\u0435\u0435\u0441\u0442\u0440\u0435" }),
|
|
577
893
|
classValidator.IsNumber()
|
|
578
894
|
], exports.MetaDocumentInputDTO.prototype, "registry_id", 2);
|
|
579
|
-
__decorateClass$
|
|
895
|
+
__decorateClass$l([
|
|
580
896
|
graphql.Field(() => String, { description: "\u042F\u0437\u044B\u043A \u0434\u043E\u043A\u0443\u043C\u0435\u043D\u0442\u0430" }),
|
|
581
897
|
classValidator.IsEnum(LangType)
|
|
582
898
|
], exports.MetaDocumentInputDTO.prototype, "lang", 2);
|
|
583
|
-
__decorateClass$
|
|
899
|
+
__decorateClass$l([
|
|
584
900
|
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
901
|
classValidator.IsString()
|
|
586
902
|
], exports.MetaDocumentInputDTO.prototype, "generator", 2);
|
|
587
|
-
__decorateClass$
|
|
903
|
+
__decorateClass$l([
|
|
588
904
|
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
905
|
classValidator.IsString()
|
|
590
906
|
], exports.MetaDocumentInputDTO.prototype, "version", 2);
|
|
591
|
-
__decorateClass$
|
|
907
|
+
__decorateClass$l([
|
|
592
908
|
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
909
|
classValidator.IsString()
|
|
594
910
|
], exports.MetaDocumentInputDTO.prototype, "coopname", 2);
|
|
595
|
-
__decorateClass$
|
|
911
|
+
__decorateClass$l([
|
|
596
912
|
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
913
|
classValidator.IsString()
|
|
598
914
|
], exports.MetaDocumentInputDTO.prototype, "username", 2);
|
|
599
|
-
__decorateClass$
|
|
915
|
+
__decorateClass$l([
|
|
600
916
|
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
917
|
classValidator.IsString()
|
|
602
918
|
], exports.MetaDocumentInputDTO.prototype, "created_at", 2);
|
|
603
|
-
__decorateClass$
|
|
919
|
+
__decorateClass$l([
|
|
604
920
|
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
921
|
classValidator.IsInt()
|
|
606
922
|
], exports.MetaDocumentInputDTO.prototype, "block_num", 2);
|
|
607
|
-
__decorateClass$
|
|
923
|
+
__decorateClass$l([
|
|
608
924
|
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
925
|
classValidator.IsString()
|
|
610
926
|
], exports.MetaDocumentInputDTO.prototype, "timezone", 2);
|
|
611
|
-
__decorateClass$
|
|
927
|
+
__decorateClass$l([
|
|
612
928
|
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
929
|
classValidator.IsArray(),
|
|
614
930
|
classValidator.IsString({ each: true })
|
|
615
931
|
], exports.MetaDocumentInputDTO.prototype, "links", 2);
|
|
616
|
-
exports.MetaDocumentInputDTO = __decorateClass$
|
|
932
|
+
exports.MetaDocumentInputDTO = __decorateClass$l([
|
|
617
933
|
graphql.InputType("MetaDocumentInput")
|
|
618
934
|
], exports.MetaDocumentInputDTO);
|
|
619
935
|
|
|
620
|
-
var __defProp$
|
|
621
|
-
var __getOwnPropDesc$
|
|
622
|
-
var __decorateClass$
|
|
623
|
-
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$
|
|
936
|
+
var __defProp$k = Object.defineProperty;
|
|
937
|
+
var __getOwnPropDesc$k = Object.getOwnPropertyDescriptor;
|
|
938
|
+
var __decorateClass$k = (decorators, target, key, kind) => {
|
|
939
|
+
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$k(target, key) : target;
|
|
624
940
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
625
941
|
if (decorator = decorators[i])
|
|
626
942
|
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
627
943
|
if (kind && result)
|
|
628
|
-
__defProp$
|
|
944
|
+
__defProp$k(target, key, result);
|
|
629
945
|
return result;
|
|
630
946
|
};
|
|
631
947
|
exports.GenerateMetaDocumentInputDTO = class GenerateMetaDocumentInputDTO {
|
|
632
948
|
};
|
|
633
|
-
__decorateClass$
|
|
949
|
+
__decorateClass$k([
|
|
634
950
|
graphql.Field(() => String, { description: "\u041D\u0430\u0437\u0432\u0430\u043D\u0438\u0435 \u0434\u043E\u043A\u0443\u043C\u0435\u043D\u0442\u0430", nullable: true }),
|
|
635
951
|
classValidator.IsOptional(),
|
|
636
952
|
classValidator.IsString()
|
|
637
953
|
], exports.GenerateMetaDocumentInputDTO.prototype, "title", 2);
|
|
638
|
-
__decorateClass$
|
|
954
|
+
__decorateClass$k([
|
|
639
955
|
graphql.Field(() => graphql.Int, { description: "ID \u0434\u043E\u043A\u0443\u043C\u0435\u043D\u0442\u0430 \u0432 \u0440\u0435\u0435\u0441\u0442\u0440\u0435" }),
|
|
640
956
|
classValidator.IsNumber()
|
|
641
957
|
], exports.GenerateMetaDocumentInputDTO.prototype, "registry_id", 2);
|
|
642
|
-
__decorateClass$
|
|
958
|
+
__decorateClass$k([
|
|
643
959
|
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
960
|
classValidator.IsString()
|
|
645
961
|
], exports.GenerateMetaDocumentInputDTO.prototype, "coopname", 2);
|
|
646
|
-
__decorateClass$
|
|
962
|
+
__decorateClass$k([
|
|
647
963
|
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
964
|
classValidator.IsString()
|
|
649
965
|
], exports.GenerateMetaDocumentInputDTO.prototype, "username", 2);
|
|
650
|
-
__decorateClass$
|
|
966
|
+
__decorateClass$k([
|
|
651
967
|
graphql.Field(() => String, { description: "\u042F\u0437\u044B\u043A \u0434\u043E\u043A\u0443\u043C\u0435\u043D\u0442\u0430", nullable: true }),
|
|
652
968
|
classValidator.IsOptional(),
|
|
653
969
|
classValidator.IsEnum(LangType)
|
|
654
970
|
], exports.GenerateMetaDocumentInputDTO.prototype, "lang", 2);
|
|
655
|
-
__decorateClass$
|
|
971
|
+
__decorateClass$k([
|
|
656
972
|
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
973
|
classValidator.IsOptional(),
|
|
658
974
|
classValidator.IsString()
|
|
659
975
|
], exports.GenerateMetaDocumentInputDTO.prototype, "generator", 2);
|
|
660
|
-
__decorateClass$
|
|
976
|
+
__decorateClass$k([
|
|
661
977
|
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
978
|
classValidator.IsOptional(),
|
|
663
979
|
classValidator.IsString()
|
|
664
980
|
], exports.GenerateMetaDocumentInputDTO.prototype, "version", 2);
|
|
665
|
-
__decorateClass$
|
|
981
|
+
__decorateClass$k([
|
|
666
982
|
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
983
|
classValidator.IsOptional()
|
|
668
984
|
], exports.GenerateMetaDocumentInputDTO.prototype, "created_at", 2);
|
|
669
|
-
__decorateClass$
|
|
985
|
+
__decorateClass$k([
|
|
670
986
|
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
987
|
classValidator.IsOptional(),
|
|
672
988
|
classValidator.IsInt()
|
|
673
989
|
], exports.GenerateMetaDocumentInputDTO.prototype, "block_num", 2);
|
|
674
|
-
__decorateClass$
|
|
990
|
+
__decorateClass$k([
|
|
675
991
|
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
992
|
classValidator.IsOptional(),
|
|
677
993
|
classValidator.IsString()
|
|
678
994
|
], exports.GenerateMetaDocumentInputDTO.prototype, "timezone", 2);
|
|
679
|
-
__decorateClass$
|
|
995
|
+
__decorateClass$k([
|
|
680
996
|
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
997
|
classValidator.IsOptional(),
|
|
682
998
|
classValidator.IsArray(),
|
|
683
999
|
classValidator.IsString({ each: true })
|
|
684
1000
|
], exports.GenerateMetaDocumentInputDTO.prototype, "links", 2);
|
|
685
|
-
exports.GenerateMetaDocumentInputDTO = __decorateClass$
|
|
1001
|
+
exports.GenerateMetaDocumentInputDTO = __decorateClass$k([
|
|
686
1002
|
graphql.InputType("GenerateMetaDocumentInput")
|
|
687
1003
|
], exports.GenerateMetaDocumentInputDTO);
|
|
688
1004
|
|
|
689
|
-
var __defProp$
|
|
690
|
-
var __getOwnPropDesc$
|
|
691
|
-
var __decorateClass$
|
|
692
|
-
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$
|
|
1005
|
+
var __defProp$j = Object.defineProperty;
|
|
1006
|
+
var __getOwnPropDesc$j = Object.getOwnPropertyDescriptor;
|
|
1007
|
+
var __decorateClass$j = (decorators, target, key, kind) => {
|
|
1008
|
+
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$j(target, key) : target;
|
|
693
1009
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
694
1010
|
if (decorator = decorators[i])
|
|
695
1011
|
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
696
1012
|
if (kind && result)
|
|
697
|
-
__defProp$
|
|
1013
|
+
__defProp$j(target, key, result);
|
|
698
1014
|
return result;
|
|
699
1015
|
};
|
|
700
1016
|
let ExpenseProposalItemInputDTO = class {
|
|
701
1017
|
};
|
|
702
|
-
__decorateClass$
|
|
1018
|
+
__decorateClass$j([
|
|
703
1019
|
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
1020
|
classValidator.IsString()
|
|
705
1021
|
], ExpenseProposalItemInputDTO.prototype, "number", 2);
|
|
706
|
-
__decorateClass$
|
|
1022
|
+
__decorateClass$j([
|
|
707
1023
|
graphql.Field(() => String, { description: "\u041E\u043F\u0438\u0441\u0430\u043D\u0438\u0435 \u0440\u0430\u0441\u0445\u043E\u0434\u0430" }),
|
|
708
1024
|
classValidator.IsString()
|
|
709
1025
|
], ExpenseProposalItemInputDTO.prototype, "description", 2);
|
|
710
|
-
__decorateClass$
|
|
1026
|
+
__decorateClass$j([
|
|
711
1027
|
graphql.Field(() => String, { description: "\u0421\u0443\u043C\u043C\u0430 \u0441\u0442\u0440\u043E\u043A\u0438" }),
|
|
712
1028
|
classValidator.IsString()
|
|
713
1029
|
], ExpenseProposalItemInputDTO.prototype, "amount", 2);
|
|
714
|
-
__decorateClass$
|
|
1030
|
+
__decorateClass$j([
|
|
715
1031
|
graphql.Field(() => String, { description: "\u0422\u0438\u043F \u043F\u043E\u043B\u0443\u0447\u0430\u0442\u0435\u043B\u044F (SELF / MEMBER / ORG)" }),
|
|
716
1032
|
classValidator.IsString()
|
|
717
1033
|
], ExpenseProposalItemInputDTO.prototype, "recipient_type", 2);
|
|
718
|
-
__decorateClass$
|
|
1034
|
+
__decorateClass$j([
|
|
719
1035
|
graphql.Field(() => String, { description: "\u0421\u043F\u043E\u0441\u043E\u0431 \u043E\u043F\u043B\u0430\u0442\u044B (ADVANCE / DIRECT)" }),
|
|
720
1036
|
classValidator.IsString()
|
|
721
1037
|
], ExpenseProposalItemInputDTO.prototype, "mechanics", 2);
|
|
722
|
-
__decorateClass$
|
|
1038
|
+
__decorateClass$j([
|
|
723
1039
|
graphql.Field(() => String, { description: "\u0418\u043C\u044F \u043F\u043E\u043B\u0443\u0447\u0430\u0442\u0435\u043B\u044F", nullable: true }),
|
|
724
1040
|
classValidator.IsOptional(),
|
|
725
1041
|
classValidator.IsString()
|
|
726
1042
|
], ExpenseProposalItemInputDTO.prototype, "recipient_name", 2);
|
|
727
|
-
__decorateClass$
|
|
1043
|
+
__decorateClass$j([
|
|
728
1044
|
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
1045
|
classValidator.IsOptional(),
|
|
730
1046
|
classValidator.IsString()
|
|
731
1047
|
], ExpenseProposalItemInputDTO.prototype, "requisites", 2);
|
|
732
|
-
__decorateClass$
|
|
1048
|
+
__decorateClass$j([
|
|
733
1049
|
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
1050
|
classValidator.IsOptional(),
|
|
735
1051
|
classValidator.IsString()
|
|
736
1052
|
], ExpenseProposalItemInputDTO.prototype, "payment_purpose", 2);
|
|
737
|
-
__decorateClass$
|
|
1053
|
+
__decorateClass$j([
|
|
738
1054
|
graphql.Field(() => String, {
|
|
739
1055
|
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
1056
|
nullable: true
|
|
@@ -742,7 +1058,7 @@ __decorateClass$a([
|
|
|
742
1058
|
classValidator.IsOptional(),
|
|
743
1059
|
classValidator.IsString()
|
|
744
1060
|
], ExpenseProposalItemInputDTO.prototype, "payment_method_id", 2);
|
|
745
|
-
__decorateClass$
|
|
1061
|
+
__decorateClass$j([
|
|
746
1062
|
graphql.Field(() => String, {
|
|
747
1063
|
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
1064
|
nullable: true
|
|
@@ -750,60 +1066,60 @@ __decorateClass$a([
|
|
|
750
1066
|
classValidator.IsOptional(),
|
|
751
1067
|
classValidator.IsString()
|
|
752
1068
|
], ExpenseProposalItemInputDTO.prototype, "recipient_username", 2);
|
|
753
|
-
ExpenseProposalItemInputDTO = __decorateClass$
|
|
1069
|
+
ExpenseProposalItemInputDTO = __decorateClass$j([
|
|
754
1070
|
graphql.InputType("ExpenseProposalItemInput")
|
|
755
1071
|
], ExpenseProposalItemInputDTO);
|
|
756
1072
|
let ExpenseProposalSignedItemInputDTO = class {
|
|
757
1073
|
};
|
|
758
|
-
__decorateClass$
|
|
1074
|
+
__decorateClass$j([
|
|
759
1075
|
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
1076
|
classValidator.IsString()
|
|
761
1077
|
], ExpenseProposalSignedItemInputDTO.prototype, "number", 2);
|
|
762
|
-
__decorateClass$
|
|
1078
|
+
__decorateClass$j([
|
|
763
1079
|
graphql.Field(() => String, { description: "\u041E\u043F\u0438\u0441\u0430\u043D\u0438\u0435 \u0440\u0430\u0441\u0445\u043E\u0434\u0430" }),
|
|
764
1080
|
classValidator.IsString()
|
|
765
1081
|
], ExpenseProposalSignedItemInputDTO.prototype, "description", 2);
|
|
766
|
-
__decorateClass$
|
|
1082
|
+
__decorateClass$j([
|
|
767
1083
|
graphql.Field(() => String, { description: "\u0421\u0443\u043C\u043C\u0430 \u0441\u0442\u0440\u043E\u043A\u0438" }),
|
|
768
1084
|
classValidator.IsString()
|
|
769
1085
|
], ExpenseProposalSignedItemInputDTO.prototype, "amount", 2);
|
|
770
|
-
__decorateClass$
|
|
1086
|
+
__decorateClass$j([
|
|
771
1087
|
graphql.Field(() => String, { description: "\u0422\u0438\u043F \u043F\u043E\u043B\u0443\u0447\u0430\u0442\u0435\u043B\u044F (SELF / MEMBER / ORG)" }),
|
|
772
1088
|
classValidator.IsString()
|
|
773
1089
|
], ExpenseProposalSignedItemInputDTO.prototype, "recipient_type", 2);
|
|
774
|
-
__decorateClass$
|
|
1090
|
+
__decorateClass$j([
|
|
775
1091
|
graphql.Field(() => String, { description: "\u0421\u043F\u043E\u0441\u043E\u0431 \u043E\u043F\u043B\u0430\u0442\u044B (ADVANCE / DIRECT)" }),
|
|
776
1092
|
classValidator.IsString()
|
|
777
1093
|
], ExpenseProposalSignedItemInputDTO.prototype, "mechanics", 2);
|
|
778
|
-
ExpenseProposalSignedItemInputDTO = __decorateClass$
|
|
1094
|
+
ExpenseProposalSignedItemInputDTO = __decorateClass$j([
|
|
779
1095
|
graphql.InputType("ExpenseProposalSignedItemInput")
|
|
780
1096
|
], ExpenseProposalSignedItemInputDTO);
|
|
781
1097
|
let ExpenseProposalHeaderInputDTO = class {
|
|
782
1098
|
};
|
|
783
|
-
__decorateClass$
|
|
1099
|
+
__decorateClass$j([
|
|
784
1100
|
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
1101
|
classValidator.IsString()
|
|
786
1102
|
], ExpenseProposalHeaderInputDTO.prototype, "description", 2);
|
|
787
|
-
__decorateClass$
|
|
1103
|
+
__decorateClass$j([
|
|
788
1104
|
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
1105
|
classValidator.IsString()
|
|
790
1106
|
], ExpenseProposalHeaderInputDTO.prototype, "total_amount", 2);
|
|
791
|
-
__decorateClass$
|
|
1107
|
+
__decorateClass$j([
|
|
792
1108
|
graphql.Field(() => graphql.Int, { description: "\u041A\u043E\u043B\u0438\u0447\u0435\u0441\u0442\u0432\u043E \u043F\u043E\u0437\u0438\u0446\u0438\u0439" }),
|
|
793
1109
|
classValidator.IsInt()
|
|
794
1110
|
], ExpenseProposalHeaderInputDTO.prototype, "items_count", 2);
|
|
795
|
-
__decorateClass$
|
|
1111
|
+
__decorateClass$j([
|
|
796
1112
|
graphql.Field(() => String, { description: "\u041A\u043E\u0448\u0435\u043B\u0451\u043A-\u0438\u0441\u0442\u043E\u0447\u043D\u0438\u043A" }),
|
|
797
1113
|
classValidator.IsString()
|
|
798
1114
|
], ExpenseProposalHeaderInputDTO.prototype, "source_wallet", 2);
|
|
799
|
-
__decorateClass$
|
|
1115
|
+
__decorateClass$j([
|
|
800
1116
|
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
1117
|
classValidator.IsString(),
|
|
802
1118
|
classValidator.Matches(/^\d{2}\.\d{2}\.\d{4}$/, {
|
|
803
1119
|
message: validationMessage("kit.expenseStatement.dueDateFormat")
|
|
804
1120
|
})
|
|
805
1121
|
], ExpenseProposalHeaderInputDTO.prototype, "deadline", 2);
|
|
806
|
-
__decorateClass$
|
|
1122
|
+
__decorateClass$j([
|
|
807
1123
|
graphql.Field(() => String, {
|
|
808
1124
|
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
1125
|
nullable: true
|
|
@@ -811,56 +1127,56 @@ __decorateClass$a([
|
|
|
811
1127
|
classValidator.IsOptional(),
|
|
812
1128
|
classValidator.IsString()
|
|
813
1129
|
], ExpenseProposalHeaderInputDTO.prototype, "fund_name", 2);
|
|
814
|
-
ExpenseProposalHeaderInputDTO = __decorateClass$
|
|
1130
|
+
ExpenseProposalHeaderInputDTO = __decorateClass$j([
|
|
815
1131
|
graphql.InputType("ExpenseProposalHeaderInput")
|
|
816
1132
|
], ExpenseProposalHeaderInputDTO);
|
|
817
1133
|
let BaseExpenseProposalStatementGenerateMetaDocumentInputDTO = class {
|
|
818
1134
|
};
|
|
819
|
-
__decorateClass$
|
|
1135
|
+
__decorateClass$j([
|
|
820
1136
|
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
1137
|
classValidator.IsString(),
|
|
822
1138
|
classValidator.IsNotEmpty()
|
|
823
1139
|
], BaseExpenseProposalStatementGenerateMetaDocumentInputDTO.prototype, "proposal_hash", 2);
|
|
824
|
-
__decorateClass$
|
|
1140
|
+
__decorateClass$j([
|
|
825
1141
|
graphql.Field(() => ExpenseProposalHeaderInputDTO, { description: "\u0428\u0430\u043F\u043A\u0430 \u0421\u0417" }),
|
|
826
1142
|
classValidator.ValidateNested(),
|
|
827
1143
|
classTransformer.Type(() => ExpenseProposalHeaderInputDTO)
|
|
828
1144
|
], BaseExpenseProposalStatementGenerateMetaDocumentInputDTO.prototype, "proposal", 2);
|
|
829
|
-
__decorateClass$
|
|
1145
|
+
__decorateClass$j([
|
|
830
1146
|
graphql.Field(() => [ExpenseProposalItemInputDTO], { description: "\u041F\u043E\u0437\u0438\u0446\u0438\u0438 \u0440\u0430\u0441\u0445\u043E\u0434\u0430" }),
|
|
831
1147
|
classValidator.IsArray(),
|
|
832
1148
|
classValidator.ArrayMinSize(1),
|
|
833
1149
|
classValidator.ValidateNested({ each: true }),
|
|
834
1150
|
classTransformer.Type(() => ExpenseProposalItemInputDTO)
|
|
835
1151
|
], BaseExpenseProposalStatementGenerateMetaDocumentInputDTO.prototype, "items", 2);
|
|
836
|
-
BaseExpenseProposalStatementGenerateMetaDocumentInputDTO = __decorateClass$
|
|
1152
|
+
BaseExpenseProposalStatementGenerateMetaDocumentInputDTO = __decorateClass$j([
|
|
837
1153
|
graphql.InputType("BaseExpenseProposalStatementGenerateMetaDocumentInput")
|
|
838
1154
|
], BaseExpenseProposalStatementGenerateMetaDocumentInputDTO);
|
|
839
1155
|
let BaseExpenseProposalStatementSignedMetaDocumentInputDTO = class {
|
|
840
1156
|
};
|
|
841
|
-
__decorateClass$
|
|
1157
|
+
__decorateClass$j([
|
|
842
1158
|
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
1159
|
classValidator.IsString(),
|
|
844
1160
|
classValidator.IsNotEmpty()
|
|
845
1161
|
], BaseExpenseProposalStatementSignedMetaDocumentInputDTO.prototype, "proposal_hash", 2);
|
|
846
|
-
__decorateClass$
|
|
1162
|
+
__decorateClass$j([
|
|
847
1163
|
graphql.Field(() => ExpenseProposalHeaderInputDTO, { description: "\u0428\u0430\u043F\u043A\u0430 \u0421\u0417" }),
|
|
848
1164
|
classValidator.ValidateNested(),
|
|
849
1165
|
classTransformer.Type(() => ExpenseProposalHeaderInputDTO)
|
|
850
1166
|
], BaseExpenseProposalStatementSignedMetaDocumentInputDTO.prototype, "proposal", 2);
|
|
851
|
-
__decorateClass$
|
|
1167
|
+
__decorateClass$j([
|
|
852
1168
|
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
1169
|
classValidator.IsArray(),
|
|
854
1170
|
classValidator.ArrayMinSize(1),
|
|
855
1171
|
classValidator.ValidateNested({ each: true }),
|
|
856
1172
|
classTransformer.Type(() => ExpenseProposalSignedItemInputDTO)
|
|
857
1173
|
], BaseExpenseProposalStatementSignedMetaDocumentInputDTO.prototype, "items", 2);
|
|
858
|
-
__decorateClass$
|
|
1174
|
+
__decorateClass$j([
|
|
859
1175
|
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
1176
|
classValidator.IsString(),
|
|
861
1177
|
classValidator.IsNotEmpty()
|
|
862
1178
|
], BaseExpenseProposalStatementSignedMetaDocumentInputDTO.prototype, "doc_data_hash", 2);
|
|
863
|
-
BaseExpenseProposalStatementSignedMetaDocumentInputDTO = __decorateClass$
|
|
1179
|
+
BaseExpenseProposalStatementSignedMetaDocumentInputDTO = __decorateClass$j([
|
|
864
1180
|
graphql.InputType("BaseExpenseProposalStatementSignedMetaDocumentInput")
|
|
865
1181
|
], BaseExpenseProposalStatementSignedMetaDocumentInputDTO);
|
|
866
1182
|
exports.ExpenseProposalStatementGenerateDocumentInputDTO = class ExpenseProposalStatementGenerateDocumentInputDTO extends graphql.IntersectionType(
|
|
@@ -868,7 +1184,7 @@ exports.ExpenseProposalStatementGenerateDocumentInputDTO = class ExpenseProposal
|
|
|
868
1184
|
graphql.OmitType(exports.GenerateMetaDocumentInputDTO, ["registry_id"])
|
|
869
1185
|
) {
|
|
870
1186
|
};
|
|
871
|
-
exports.ExpenseProposalStatementGenerateDocumentInputDTO = __decorateClass$
|
|
1187
|
+
exports.ExpenseProposalStatementGenerateDocumentInputDTO = __decorateClass$j([
|
|
872
1188
|
graphql.InputType("ExpenseProposalStatementGenerateDocumentInput")
|
|
873
1189
|
], exports.ExpenseProposalStatementGenerateDocumentInputDTO);
|
|
874
1190
|
exports.ExpenseProposalStatementSignedMetaDocumentInputDTO = class ExpenseProposalStatementSignedMetaDocumentInputDTO extends graphql.IntersectionType(
|
|
@@ -876,29 +1192,29 @@ exports.ExpenseProposalStatementSignedMetaDocumentInputDTO = class ExpensePropos
|
|
|
876
1192
|
exports.MetaDocumentInputDTO
|
|
877
1193
|
) {
|
|
878
1194
|
};
|
|
879
|
-
exports.ExpenseProposalStatementSignedMetaDocumentInputDTO = __decorateClass$
|
|
1195
|
+
exports.ExpenseProposalStatementSignedMetaDocumentInputDTO = __decorateClass$j([
|
|
880
1196
|
graphql.InputType("ExpenseProposalStatementSignedMetaDocumentInput")
|
|
881
1197
|
], exports.ExpenseProposalStatementSignedMetaDocumentInputDTO);
|
|
882
1198
|
exports.ExpenseProposalStatementSignedDocumentInputDTO = class ExpenseProposalStatementSignedDocumentInputDTO extends exports.SignedDigitalDocumentInputDTO {
|
|
883
1199
|
};
|
|
884
|
-
__decorateClass$
|
|
1200
|
+
__decorateClass$j([
|
|
885
1201
|
graphql.Field(() => exports.ExpenseProposalStatementSignedMetaDocumentInputDTO, {
|
|
886
1202
|
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
1203
|
})
|
|
888
1204
|
], exports.ExpenseProposalStatementSignedDocumentInputDTO.prototype, "meta", 2);
|
|
889
|
-
exports.ExpenseProposalStatementSignedDocumentInputDTO = __decorateClass$
|
|
1205
|
+
exports.ExpenseProposalStatementSignedDocumentInputDTO = __decorateClass$j([
|
|
890
1206
|
graphql.InputType("ExpenseProposalStatementSignedDocumentInput")
|
|
891
1207
|
], exports.ExpenseProposalStatementSignedDocumentInputDTO);
|
|
892
1208
|
|
|
893
|
-
var __defProp$
|
|
894
|
-
var __getOwnPropDesc$
|
|
895
|
-
var __decorateClass$
|
|
896
|
-
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$
|
|
1209
|
+
var __defProp$i = Object.defineProperty;
|
|
1210
|
+
var __getOwnPropDesc$i = Object.getOwnPropertyDescriptor;
|
|
1211
|
+
var __decorateClass$i = (decorators, target, key, kind) => {
|
|
1212
|
+
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$i(target, key) : target;
|
|
897
1213
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
898
1214
|
if (decorator = decorators[i])
|
|
899
1215
|
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
900
1216
|
if (kind && result)
|
|
901
|
-
__defProp$
|
|
1217
|
+
__defProp$i(target, key, result);
|
|
902
1218
|
return result;
|
|
903
1219
|
};
|
|
904
1220
|
var CandidateStatus = /* @__PURE__ */ ((CandidateStatus2) => {
|
|
@@ -912,63 +1228,63 @@ graphql.registerEnumType(CandidateStatus, {
|
|
|
912
1228
|
});
|
|
913
1229
|
exports.CandidateOutputDTO = class CandidateOutputDTO {
|
|
914
1230
|
};
|
|
915
|
-
__decorateClass$
|
|
1231
|
+
__decorateClass$i([
|
|
916
1232
|
graphql.Field(() => String)
|
|
917
1233
|
], exports.CandidateOutputDTO.prototype, "username", 2);
|
|
918
|
-
__decorateClass$
|
|
1234
|
+
__decorateClass$i([
|
|
919
1235
|
graphql.Field(() => String, { nullable: true })
|
|
920
1236
|
], exports.CandidateOutputDTO.prototype, "username_display_name", 2);
|
|
921
|
-
__decorateClass$
|
|
1237
|
+
__decorateClass$i([
|
|
922
1238
|
graphql.Field(() => String)
|
|
923
1239
|
], exports.CandidateOutputDTO.prototype, "coopname", 2);
|
|
924
|
-
__decorateClass$
|
|
1240
|
+
__decorateClass$i([
|
|
925
1241
|
graphql.Field(() => String, { nullable: true })
|
|
926
1242
|
], exports.CandidateOutputDTO.prototype, "braname", 2);
|
|
927
|
-
__decorateClass$
|
|
1243
|
+
__decorateClass$i([
|
|
928
1244
|
graphql.Field(() => CandidateStatus)
|
|
929
1245
|
], exports.CandidateOutputDTO.prototype, "status", 2);
|
|
930
|
-
__decorateClass$
|
|
1246
|
+
__decorateClass$i([
|
|
931
1247
|
graphql.Field(() => String)
|
|
932
1248
|
], exports.CandidateOutputDTO.prototype, "type", 2);
|
|
933
|
-
__decorateClass$
|
|
1249
|
+
__decorateClass$i([
|
|
934
1250
|
graphql.Field(() => Date)
|
|
935
1251
|
], exports.CandidateOutputDTO.prototype, "created_at", 2);
|
|
936
|
-
__decorateClass$
|
|
1252
|
+
__decorateClass$i([
|
|
937
1253
|
graphql.Field(() => Date, { nullable: true })
|
|
938
1254
|
], exports.CandidateOutputDTO.prototype, "registered_at", 2);
|
|
939
|
-
__decorateClass$
|
|
1255
|
+
__decorateClass$i([
|
|
940
1256
|
graphql.Field(() => String, { nullable: true })
|
|
941
1257
|
], exports.CandidateOutputDTO.prototype, "referer", 2);
|
|
942
|
-
__decorateClass$
|
|
1258
|
+
__decorateClass$i([
|
|
943
1259
|
graphql.Field(() => String, { nullable: true })
|
|
944
1260
|
], exports.CandidateOutputDTO.prototype, "referer_display_name", 2);
|
|
945
|
-
__decorateClass$
|
|
1261
|
+
__decorateClass$i([
|
|
946
1262
|
graphql.Field(() => String)
|
|
947
1263
|
], exports.CandidateOutputDTO.prototype, "public_key", 2);
|
|
948
|
-
__decorateClass$
|
|
1264
|
+
__decorateClass$i([
|
|
949
1265
|
graphql.Field(() => String, { nullable: true })
|
|
950
1266
|
], exports.CandidateOutputDTO.prototype, "program_key", 2);
|
|
951
|
-
exports.CandidateOutputDTO = __decorateClass$
|
|
1267
|
+
exports.CandidateOutputDTO = __decorateClass$i([
|
|
952
1268
|
graphql.ObjectType("Candidate")
|
|
953
1269
|
], exports.CandidateOutputDTO);
|
|
954
1270
|
|
|
955
|
-
var __defProp$
|
|
956
|
-
var __getOwnPropDesc$
|
|
957
|
-
var __decorateClass$
|
|
958
|
-
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$
|
|
1271
|
+
var __defProp$h = Object.defineProperty;
|
|
1272
|
+
var __getOwnPropDesc$h = Object.getOwnPropertyDescriptor;
|
|
1273
|
+
var __decorateClass$h = (decorators, target, key, kind) => {
|
|
1274
|
+
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$h(target, key) : target;
|
|
959
1275
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
960
1276
|
if (decorator = decorators[i])
|
|
961
1277
|
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
962
1278
|
if (kind && result)
|
|
963
|
-
__defProp$
|
|
1279
|
+
__defProp$h(target, key, result);
|
|
964
1280
|
return result;
|
|
965
1281
|
};
|
|
966
1282
|
exports.CandidateFilterInputDTO = class CandidateFilterInputDTO {
|
|
967
1283
|
};
|
|
968
|
-
__decorateClass$
|
|
1284
|
+
__decorateClass$h([
|
|
969
1285
|
graphql.Field(() => String, { nullable: true })
|
|
970
1286
|
], exports.CandidateFilterInputDTO.prototype, "referer", 2);
|
|
971
|
-
exports.CandidateFilterInputDTO = __decorateClass$
|
|
1287
|
+
exports.CandidateFilterInputDTO = __decorateClass$h([
|
|
972
1288
|
graphql.InputType("CandidateFilterInput")
|
|
973
1289
|
], exports.CandidateFilterInputDTO);
|
|
974
1290
|
|
|
@@ -1023,23 +1339,6 @@ function isExtensionAvailable(availability, isMainnet) {
|
|
|
1023
1339
|
}
|
|
1024
1340
|
}
|
|
1025
1341
|
|
|
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
1342
|
let migrations;
|
|
1044
1343
|
function registerExtensionDatabaseMigrations(list) {
|
|
1045
1344
|
if (migrations) {
|
|
@@ -1057,38 +1356,67 @@ function resetExtensionDatabaseMigrations() {
|
|
|
1057
1356
|
migrations = void 0;
|
|
1058
1357
|
}
|
|
1059
1358
|
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1359
|
+
async function attachOne(records, related, property, keys) {
|
|
1360
|
+
if (records.length === 0)
|
|
1361
|
+
return;
|
|
1362
|
+
const pairs = Object.entries(keys);
|
|
1363
|
+
const read = (record, field) => record[field];
|
|
1364
|
+
const where = {};
|
|
1365
|
+
for (const [relatedField, ownField] of pairs) {
|
|
1366
|
+
const values = [...new Set(records.map((record) => read(record, ownField)).filter((value) => value !== null && value !== void 0))];
|
|
1367
|
+
if (values.length === 0)
|
|
1368
|
+
return;
|
|
1369
|
+
where[relatedField] = transaction.oneOf(values);
|
|
1370
|
+
}
|
|
1371
|
+
const found = await related.find(where);
|
|
1372
|
+
const signature = (record, side) => pairs.map((pair) => String(read(record, pair[side]))).join("\0");
|
|
1373
|
+
const index = /* @__PURE__ */ new Map();
|
|
1374
|
+
for (const candidate of found) {
|
|
1375
|
+
const key = signature(candidate, 0);
|
|
1376
|
+
if (!index.has(key))
|
|
1377
|
+
index.set(key, candidate);
|
|
1378
|
+
}
|
|
1379
|
+
for (const record of records) {
|
|
1380
|
+
const match = index.get(signature(record, 1));
|
|
1381
|
+
if (match)
|
|
1382
|
+
record[property] = match;
|
|
1383
|
+
}
|
|
1384
|
+
}
|
|
1385
|
+
|
|
1386
|
+
var __defProp$g = Object.defineProperty;
|
|
1387
|
+
var __getOwnPropDesc$g = Object.getOwnPropertyDescriptor;
|
|
1388
|
+
var __decorateClass$g = (decorators, target, key, kind) => {
|
|
1389
|
+
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$g(target, key) : target;
|
|
1064
1390
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
1065
1391
|
if (decorator = decorators[i])
|
|
1066
1392
|
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
1067
1393
|
if (kind && result)
|
|
1068
|
-
__defProp$
|
|
1394
|
+
__defProp$g(target, key, result);
|
|
1069
1395
|
return result;
|
|
1070
1396
|
};
|
|
1071
1397
|
const SORT_FIELD_PATTERN = /^([A-Za-z_][A-Za-z0-9_]*(:(asc|desc))?)?$/i;
|
|
1072
1398
|
exports.PaginationInputDTO = class PaginationInputDTO {
|
|
1073
1399
|
};
|
|
1074
|
-
__decorateClass$
|
|
1400
|
+
__decorateClass$g([
|
|
1075
1401
|
graphql.Field(() => graphql.Int, { description: "\u041D\u043E\u043C\u0435\u0440 \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u044B", defaultValue: 1 })
|
|
1076
1402
|
], exports.PaginationInputDTO.prototype, "page", 2);
|
|
1077
|
-
__decorateClass$
|
|
1403
|
+
__decorateClass$g([
|
|
1078
1404
|
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
1405
|
], exports.PaginationInputDTO.prototype, "limit", 2);
|
|
1080
|
-
__decorateClass$
|
|
1406
|
+
__decorateClass$g([
|
|
1081
1407
|
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
1408
|
classValidator.IsOptional(),
|
|
1083
1409
|
classValidator.Matches(SORT_FIELD_PATTERN, { message: validationMessage("kit.pagination.invalidSortField") })
|
|
1084
1410
|
], exports.PaginationInputDTO.prototype, "sortBy", 2);
|
|
1085
|
-
__decorateClass$
|
|
1411
|
+
__decorateClass$g([
|
|
1086
1412
|
graphql.Field(() => String, {
|
|
1087
1413
|
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
1414
|
defaultValue: "ASC"
|
|
1089
|
-
})
|
|
1415
|
+
}),
|
|
1416
|
+
classValidator.IsOptional(),
|
|
1417
|
+
classValidator.IsIn(["ASC", "DESC"], { message: validationMessage("kit.pagination.invalidSortOrder") })
|
|
1090
1418
|
], exports.PaginationInputDTO.prototype, "sortOrder", 2);
|
|
1091
|
-
exports.PaginationInputDTO = __decorateClass$
|
|
1419
|
+
exports.PaginationInputDTO = __decorateClass$g([
|
|
1092
1420
|
graphql.InputType("PaginationInput")
|
|
1093
1421
|
], exports.PaginationInputDTO);
|
|
1094
1422
|
class PaginationResult {
|
|
@@ -1096,19 +1424,19 @@ class PaginationResult {
|
|
|
1096
1424
|
function createPaginationResult(ItemType, name) {
|
|
1097
1425
|
let PaginationResult2 = class {
|
|
1098
1426
|
};
|
|
1099
|
-
__decorateClass$
|
|
1427
|
+
__decorateClass$g([
|
|
1100
1428
|
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" })
|
|
1101
1429
|
], PaginationResult2.prototype, "items", 2);
|
|
1102
|
-
__decorateClass$
|
|
1430
|
+
__decorateClass$g([
|
|
1103
1431
|
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" })
|
|
1104
1432
|
], PaginationResult2.prototype, "totalCount", 2);
|
|
1105
|
-
__decorateClass$
|
|
1433
|
+
__decorateClass$g([
|
|
1106
1434
|
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" })
|
|
1107
1435
|
], PaginationResult2.prototype, "totalPages", 2);
|
|
1108
|
-
__decorateClass$
|
|
1436
|
+
__decorateClass$g([
|
|
1109
1437
|
graphql.Field(() => graphql.Int, { description: "\u0422\u0435\u043A\u0443\u0449\u0430\u044F \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u0430" })
|
|
1110
1438
|
], PaginationResult2.prototype, "currentPage", 2);
|
|
1111
|
-
PaginationResult2 = __decorateClass$
|
|
1439
|
+
PaginationResult2 = __decorateClass$g([
|
|
1112
1440
|
graphql.ObjectType(`${name}PaginationResult`, { isAbstract: true })
|
|
1113
1441
|
], PaginationResult2);
|
|
1114
1442
|
return PaginationResult2;
|
|
@@ -1154,16 +1482,16 @@ class PaginationUtils {
|
|
|
1154
1482
|
static validatePaginationOptions(options) {
|
|
1155
1483
|
const { page = 1, limit = 10, sortBy, sortOrder = "ASC" } = options;
|
|
1156
1484
|
if (page < 1) {
|
|
1157
|
-
throw DomainError.
|
|
1485
|
+
throw DomainError.badRequest("KIT_PAGE_NUMBER_INVALID");
|
|
1158
1486
|
}
|
|
1159
1487
|
if (limit < 1 || limit > 1e3) {
|
|
1160
|
-
throw DomainError.
|
|
1488
|
+
throw DomainError.badRequest("KIT_PAGE_LIMIT_INVALID");
|
|
1161
1489
|
}
|
|
1162
1490
|
if (sortOrder !== "ASC" && sortOrder !== "DESC") {
|
|
1163
|
-
throw DomainError.
|
|
1491
|
+
throw DomainError.badRequest("KIT_SORT_ORDER_INVALID");
|
|
1164
1492
|
}
|
|
1165
1493
|
if (sortBy !== void 0 && sortBy !== null && !SORT_FIELD_PATTERN.test(sortBy)) {
|
|
1166
|
-
throw DomainError.
|
|
1494
|
+
throw DomainError.badRequest("KIT_SORT_FIELD_INVALID");
|
|
1167
1495
|
}
|
|
1168
1496
|
return {
|
|
1169
1497
|
page,
|
|
@@ -1185,48 +1513,707 @@ function paginationInputToOffset(options) {
|
|
|
1185
1513
|
};
|
|
1186
1514
|
}
|
|
1187
1515
|
|
|
1188
|
-
var __defProp$
|
|
1189
|
-
var __getOwnPropDesc$
|
|
1190
|
-
var __decorateClass$
|
|
1191
|
-
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$
|
|
1516
|
+
var __defProp$f = Object.defineProperty;
|
|
1517
|
+
var __getOwnPropDesc$f = Object.getOwnPropertyDescriptor;
|
|
1518
|
+
var __decorateClass$f = (decorators, target, key, kind) => {
|
|
1519
|
+
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$f(target, key) : target;
|
|
1192
1520
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
1193
1521
|
if (decorator = decorators[i])
|
|
1194
1522
|
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
1195
1523
|
if (kind && result)
|
|
1196
|
-
__defProp$
|
|
1524
|
+
__defProp$f(target, key, result);
|
|
1197
1525
|
return result;
|
|
1198
1526
|
};
|
|
1199
|
-
exports.
|
|
1527
|
+
exports.Ledger2AccountDTO = class Ledger2AccountDTO {
|
|
1200
1528
|
};
|
|
1201
|
-
__decorateClass$
|
|
1202
|
-
graphql.Field(() =>
|
|
1203
|
-
], exports.
|
|
1204
|
-
__decorateClass$
|
|
1205
|
-
graphql.Field(() =>
|
|
1206
|
-
], exports.
|
|
1207
|
-
__decorateClass$
|
|
1208
|
-
graphql.Field(() =>
|
|
1209
|
-
], exports.
|
|
1210
|
-
__decorateClass$
|
|
1211
|
-
graphql.Field(() =>
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
})
|
|
1215
|
-
], exports.
|
|
1216
|
-
__decorateClass$
|
|
1217
|
-
graphql.Field(() =>
|
|
1218
|
-
], exports.
|
|
1219
|
-
__decorateClass$
|
|
1220
|
-
graphql.
|
|
1221
|
-
], exports.
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
__decorateClass$
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
|
|
1529
|
+
__decorateClass$f([
|
|
1530
|
+
graphql.Field(() => graphql.Int, { description: "ID \u0441\u0447\u0451\u0442\u0430 (\xD71000 offset): 51000/80000/86000/..." })
|
|
1531
|
+
], exports.Ledger2AccountDTO.prototype, "id", 2);
|
|
1532
|
+
__decorateClass$f([
|
|
1533
|
+
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" })
|
|
1534
|
+
], exports.Ledger2AccountDTO.prototype, "name", 2);
|
|
1535
|
+
__decorateClass$f([
|
|
1536
|
+
graphql.Field(() => String, { description: '\u0421\u0430\u043B\u044C\u0434\u043E (EOSIO asset: "7000.0000 RUB")' })
|
|
1537
|
+
], exports.Ledger2AccountDTO.prototype, "balance", 2);
|
|
1538
|
+
__decorateClass$f([
|
|
1539
|
+
graphql.Field(() => String, { description: "\u0414\u0435\u0431\u0435\u0442\u043E\u0432\u044B\u0439 \u043E\u0431\u043E\u0440\u043E\u0442" })
|
|
1540
|
+
], exports.Ledger2AccountDTO.prototype, "debitBalance", 2);
|
|
1541
|
+
__decorateClass$f([
|
|
1542
|
+
graphql.Field(() => String, { description: "\u041A\u0440\u0435\u0434\u0438\u0442\u043E\u0432\u044B\u0439 \u043E\u0431\u043E\u0440\u043E\u0442" })
|
|
1543
|
+
], exports.Ledger2AccountDTO.prototype, "creditBalance", 2);
|
|
1544
|
+
__decorateClass$f([
|
|
1545
|
+
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)" })
|
|
1546
|
+
], exports.Ledger2AccountDTO.prototype, "accountType", 2);
|
|
1547
|
+
exports.Ledger2AccountDTO = __decorateClass$f([
|
|
1548
|
+
graphql.ObjectType("Ledger2Account")
|
|
1549
|
+
], exports.Ledger2AccountDTO);
|
|
1550
|
+
|
|
1551
|
+
var __defProp$e = Object.defineProperty;
|
|
1552
|
+
var __getOwnPropDesc$e = Object.getOwnPropertyDescriptor;
|
|
1553
|
+
var __decorateClass$e = (decorators, target, key, kind) => {
|
|
1554
|
+
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$e(target, key) : target;
|
|
1555
|
+
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
1556
|
+
if (decorator = decorators[i])
|
|
1557
|
+
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
1558
|
+
if (kind && result)
|
|
1559
|
+
__defProp$e(target, key, result);
|
|
1560
|
+
return result;
|
|
1561
|
+
};
|
|
1562
|
+
exports.Ledger2WalletDTO = class Ledger2WalletDTO {
|
|
1563
|
+
};
|
|
1564
|
+
__decorateClass$e([
|
|
1565
|
+
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>)" })
|
|
1566
|
+
], exports.Ledger2WalletDTO.prototype, "id", 2);
|
|
1567
|
+
__decorateClass$e([
|
|
1568
|
+
graphql.Field(() => String, { description: "\u041D\u0430\u0437\u0432\u0430\u043D\u0438\u0435 \u043A\u043E\u0448\u0435\u043B\u044C\u043A\u0430" })
|
|
1569
|
+
], exports.Ledger2WalletDTO.prototype, "name", 2);
|
|
1570
|
+
__decorateClass$e([
|
|
1571
|
+
graphql.Field(() => String, { description: "\u0414\u043E\u0441\u0442\u0443\u043F\u043D\u044B\u0439 \u0431\u0430\u043B\u0430\u043D\u0441" })
|
|
1572
|
+
], exports.Ledger2WalletDTO.prototype, "available", 2);
|
|
1573
|
+
exports.Ledger2WalletDTO = __decorateClass$e([
|
|
1574
|
+
graphql.ObjectType("Ledger2Wallet")
|
|
1575
|
+
], exports.Ledger2WalletDTO);
|
|
1576
|
+
|
|
1577
|
+
var __defProp$d = Object.defineProperty;
|
|
1578
|
+
var __getOwnPropDesc$d = Object.getOwnPropertyDescriptor;
|
|
1579
|
+
var __decorateClass$d = (decorators, target, key, kind) => {
|
|
1580
|
+
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$d(target, key) : target;
|
|
1581
|
+
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
1582
|
+
if (decorator = decorators[i])
|
|
1583
|
+
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
1584
|
+
if (kind && result)
|
|
1585
|
+
__defProp$d(target, key, result);
|
|
1586
|
+
return result;
|
|
1587
|
+
};
|
|
1588
|
+
exports.Ledger2OperationDTO = class Ledger2OperationDTO {
|
|
1589
|
+
};
|
|
1590
|
+
__decorateClass$d([
|
|
1591
|
+
graphql.Field(() => String, {
|
|
1592
|
+
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)"
|
|
1593
|
+
})
|
|
1594
|
+
], exports.Ledger2OperationDTO.prototype, "globalSequence", 2);
|
|
1595
|
+
__decorateClass$d([
|
|
1596
|
+
graphql.Field(() => graphql.Int)
|
|
1597
|
+
], exports.Ledger2OperationDTO.prototype, "blockNum", 2);
|
|
1598
|
+
__decorateClass$d([
|
|
1599
|
+
graphql.Field(() => String)
|
|
1600
|
+
], exports.Ledger2OperationDTO.prototype, "coopname", 2);
|
|
1601
|
+
__decorateClass$d([
|
|
1602
|
+
graphql.Field(() => String, {
|
|
1603
|
+
description: "apply | walletop | debit | credit"
|
|
1604
|
+
})
|
|
1605
|
+
], exports.Ledger2OperationDTO.prototype, "action", 2);
|
|
1606
|
+
__decorateClass$d([
|
|
1607
|
+
graphql.Field(() => String, {
|
|
1608
|
+
nullable: true,
|
|
1609
|
+
description: "\u0414\u043B\u044F apply: OPERATION_REGISTRY code (o.cap.lend / o.wal.depcpl / ...)"
|
|
1610
|
+
})
|
|
1611
|
+
], exports.Ledger2OperationDTO.prototype, "operationCode", 2);
|
|
1612
|
+
__decorateClass$d([
|
|
1613
|
+
graphql.Field(() => String, { nullable: true, description: "process_hash (32-hex)" })
|
|
1614
|
+
], exports.Ledger2OperationDTO.prototype, "processHash", 2);
|
|
1615
|
+
__decorateClass$d([
|
|
1616
|
+
graphql.Field(() => String, { nullable: true })
|
|
1617
|
+
], exports.Ledger2OperationDTO.prototype, "username", 2);
|
|
1618
|
+
__decorateClass$d([
|
|
1619
|
+
graphql.Field(() => graphql.Int, { nullable: true, description: "ID \u0441\u0447\u0451\u0442\u0430/\u043A\u043E\u0448\u0435\u043B\u044C\u043A\u0430 (\xD71000)" })
|
|
1620
|
+
], exports.Ledger2OperationDTO.prototype, "accountId", 2);
|
|
1621
|
+
__decorateClass$d([
|
|
1622
|
+
graphql.Field(() => String, { nullable: true, description: "walletop: wallet_from (eosio::name w.<contract>.<waltype>)" })
|
|
1623
|
+
], exports.Ledger2OperationDTO.prototype, "walletFrom", 2);
|
|
1624
|
+
__decorateClass$d([
|
|
1625
|
+
graphql.Field(() => String, { nullable: true, description: "walletop: wallet_to (eosio::name w.<contract>.<waltype>)" })
|
|
1626
|
+
], exports.Ledger2OperationDTO.prototype, "walletTo", 2);
|
|
1627
|
+
__decorateClass$d([
|
|
1628
|
+
graphql.Field(() => String, { nullable: true, description: 'Asset "100.0000 RUB"' })
|
|
1629
|
+
], exports.Ledger2OperationDTO.prototype, "quantity", 2);
|
|
1630
|
+
__decorateClass$d([
|
|
1631
|
+
graphql.Field(() => String, { nullable: true })
|
|
1632
|
+
], exports.Ledger2OperationDTO.prototype, "memo", 2);
|
|
1633
|
+
__decorateClass$d([
|
|
1634
|
+
graphql.Field(() => String, {
|
|
1635
|
+
nullable: true,
|
|
1636
|
+
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."
|
|
1637
|
+
})
|
|
1638
|
+
], exports.Ledger2OperationDTO.prototype, "parentApplyGlobalSequence", 2);
|
|
1639
|
+
__decorateClass$d([
|
|
1640
|
+
graphql.Field(() => Date)
|
|
1641
|
+
], exports.Ledger2OperationDTO.prototype, "createdAt", 2);
|
|
1642
|
+
exports.Ledger2OperationDTO = __decorateClass$d([
|
|
1643
|
+
graphql.ObjectType("Ledger2Operation")
|
|
1644
|
+
], exports.Ledger2OperationDTO);
|
|
1645
|
+
exports.Ledger2HistoryResponseDTO = class Ledger2HistoryResponseDTO {
|
|
1646
|
+
};
|
|
1647
|
+
__decorateClass$d([
|
|
1648
|
+
graphql.Field(() => [exports.Ledger2OperationDTO])
|
|
1649
|
+
], exports.Ledger2HistoryResponseDTO.prototype, "items", 2);
|
|
1650
|
+
__decorateClass$d([
|
|
1651
|
+
graphql.Field(() => graphql.Int)
|
|
1652
|
+
], exports.Ledger2HistoryResponseDTO.prototype, "totalCount", 2);
|
|
1653
|
+
__decorateClass$d([
|
|
1654
|
+
graphql.Field(() => graphql.Int)
|
|
1655
|
+
], exports.Ledger2HistoryResponseDTO.prototype, "totalPages", 2);
|
|
1656
|
+
__decorateClass$d([
|
|
1657
|
+
graphql.Field(() => graphql.Int)
|
|
1658
|
+
], exports.Ledger2HistoryResponseDTO.prototype, "currentPage", 2);
|
|
1659
|
+
exports.Ledger2HistoryResponseDTO = __decorateClass$d([
|
|
1660
|
+
graphql.ObjectType("Ledger2HistoryResponse")
|
|
1661
|
+
], exports.Ledger2HistoryResponseDTO);
|
|
1662
|
+
|
|
1663
|
+
var __defProp$c = Object.defineProperty;
|
|
1664
|
+
var __getOwnPropDesc$c = Object.getOwnPropertyDescriptor;
|
|
1665
|
+
var __decorateClass$c = (decorators, target, key, kind) => {
|
|
1666
|
+
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$c(target, key) : target;
|
|
1667
|
+
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
1668
|
+
if (decorator = decorators[i])
|
|
1669
|
+
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
1670
|
+
if (kind && result)
|
|
1671
|
+
__defProp$c(target, key, result);
|
|
1672
|
+
return result;
|
|
1673
|
+
};
|
|
1674
|
+
exports.Ledger2PostingDTO = class Ledger2PostingDTO {
|
|
1675
|
+
};
|
|
1676
|
+
__decorateClass$c([
|
|
1677
|
+
graphql.Field(() => String, { description: "\u0421\u0442\u0430\u0431\u0438\u043B\u044C\u043D\u044B\u0439 \u043A\u043B\u044E\u0447 \u0434\u043B\u044F UI: debitSeq_creditSeq" })
|
|
1678
|
+
], exports.Ledger2PostingDTO.prototype, "key", 2);
|
|
1679
|
+
__decorateClass$c([
|
|
1680
|
+
graphql.Field(() => graphql.Int)
|
|
1681
|
+
], exports.Ledger2PostingDTO.prototype, "blockNum", 2);
|
|
1682
|
+
__decorateClass$c([
|
|
1683
|
+
graphql.Field(() => String, { nullable: true, description: "process_hash (32-hex)" })
|
|
1684
|
+
], exports.Ledger2PostingDTO.prototype, "processHash", 2);
|
|
1685
|
+
__decorateClass$c([
|
|
1686
|
+
graphql.Field(() => String, {
|
|
1687
|
+
nullable: true,
|
|
1688
|
+
description: "OPERATION_REGISTRY \u043A\u043E\u0434 \u0438\u0437 parent apply (`o.cap.lend` / `o.wal.depcpl` / ...)"
|
|
1689
|
+
})
|
|
1690
|
+
], exports.Ledger2PostingDTO.prototype, "operationCode", 2);
|
|
1691
|
+
__decorateClass$c([
|
|
1692
|
+
graphql.Field(() => String, {
|
|
1693
|
+
nullable: true,
|
|
1694
|
+
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)"
|
|
1695
|
+
})
|
|
1696
|
+
], exports.Ledger2PostingDTO.prototype, "parentApplyGlobalSequence", 2);
|
|
1697
|
+
__decorateClass$c([
|
|
1698
|
+
graphql.Field(() => String, { nullable: true, description: "global_sequence debit-action" })
|
|
1699
|
+
], exports.Ledger2PostingDTO.prototype, "debitGlobalSequence", 2);
|
|
1700
|
+
__decorateClass$c([
|
|
1701
|
+
graphql.Field(() => graphql.Int, { nullable: true, description: "id \u0431\u0443\u0445.\u0441\u0447\u0451\u0442\u0430 debit (\xD71000)" })
|
|
1702
|
+
], exports.Ledger2PostingDTO.prototype, "debitAccountId", 2);
|
|
1703
|
+
__decorateClass$c([
|
|
1704
|
+
graphql.Field(() => String, { nullable: true, description: "global_sequence credit-action" })
|
|
1705
|
+
], exports.Ledger2PostingDTO.prototype, "creditGlobalSequence", 2);
|
|
1706
|
+
__decorateClass$c([
|
|
1707
|
+
graphql.Field(() => graphql.Int, { nullable: true, description: "id \u0431\u0443\u0445.\u0441\u0447\u0451\u0442\u0430 credit (\xD71000)" })
|
|
1708
|
+
], exports.Ledger2PostingDTO.prototype, "creditAccountId", 2);
|
|
1709
|
+
__decorateClass$c([
|
|
1710
|
+
graphql.Field(() => String, { nullable: true, description: 'Asset "100.0000 RUB"' })
|
|
1711
|
+
], exports.Ledger2PostingDTO.prototype, "quantity", 2);
|
|
1712
|
+
__decorateClass$c([
|
|
1713
|
+
graphql.Field(() => String, { nullable: true })
|
|
1714
|
+
], exports.Ledger2PostingDTO.prototype, "memo", 2);
|
|
1715
|
+
__decorateClass$c([
|
|
1716
|
+
graphql.Field(() => String, { nullable: true })
|
|
1717
|
+
], exports.Ledger2PostingDTO.prototype, "username", 2);
|
|
1718
|
+
__decorateClass$c([
|
|
1719
|
+
graphql.Field(() => Date)
|
|
1720
|
+
], exports.Ledger2PostingDTO.prototype, "createdAt", 2);
|
|
1721
|
+
exports.Ledger2PostingDTO = __decorateClass$c([
|
|
1722
|
+
graphql.ObjectType("Ledger2Posting")
|
|
1723
|
+
], exports.Ledger2PostingDTO);
|
|
1724
|
+
exports.Ledger2PostingsResponseDTO = class Ledger2PostingsResponseDTO {
|
|
1725
|
+
};
|
|
1726
|
+
__decorateClass$c([
|
|
1727
|
+
graphql.Field(() => [exports.Ledger2PostingDTO])
|
|
1728
|
+
], exports.Ledger2PostingsResponseDTO.prototype, "items", 2);
|
|
1729
|
+
__decorateClass$c([
|
|
1730
|
+
graphql.Field(() => graphql.Int)
|
|
1731
|
+
], exports.Ledger2PostingsResponseDTO.prototype, "totalCount", 2);
|
|
1732
|
+
__decorateClass$c([
|
|
1733
|
+
graphql.Field(() => graphql.Int)
|
|
1734
|
+
], exports.Ledger2PostingsResponseDTO.prototype, "totalPages", 2);
|
|
1735
|
+
__decorateClass$c([
|
|
1736
|
+
graphql.Field(() => graphql.Int)
|
|
1737
|
+
], exports.Ledger2PostingsResponseDTO.prototype, "currentPage", 2);
|
|
1738
|
+
exports.Ledger2PostingsResponseDTO = __decorateClass$c([
|
|
1739
|
+
graphql.ObjectType("Ledger2PostingsResponse")
|
|
1740
|
+
], exports.Ledger2PostingsResponseDTO);
|
|
1741
|
+
|
|
1742
|
+
var __defProp$b = Object.defineProperty;
|
|
1743
|
+
var __getOwnPropDesc$b = Object.getOwnPropertyDescriptor;
|
|
1744
|
+
var __decorateClass$b = (decorators, target, key, kind) => {
|
|
1745
|
+
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$b(target, key) : target;
|
|
1746
|
+
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
1747
|
+
if (decorator = decorators[i])
|
|
1748
|
+
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
1749
|
+
if (kind && result)
|
|
1750
|
+
__defProp$b(target, key, result);
|
|
1751
|
+
return result;
|
|
1752
|
+
};
|
|
1753
|
+
exports.GetLedger2HistoryInputDTO = class GetLedger2HistoryInputDTO {
|
|
1754
|
+
};
|
|
1755
|
+
__decorateClass$b([
|
|
1756
|
+
graphql.Field(() => String),
|
|
1757
|
+
classValidator.IsString()
|
|
1758
|
+
], exports.GetLedger2HistoryInputDTO.prototype, "coopname", 2);
|
|
1759
|
+
__decorateClass$b([
|
|
1760
|
+
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." }),
|
|
1761
|
+
classValidator.IsOptional(),
|
|
1762
|
+
classValidator.IsInt()
|
|
1763
|
+
], exports.GetLedger2HistoryInputDTO.prototype, "accountId", 2);
|
|
1764
|
+
__decorateClass$b([
|
|
1765
|
+
graphql.Field(() => String, {
|
|
1766
|
+
nullable: true,
|
|
1767
|
+
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."
|
|
1768
|
+
}),
|
|
1769
|
+
classValidator.IsOptional(),
|
|
1770
|
+
classValidator.IsString(),
|
|
1771
|
+
classValidator.MaxLength(13)
|
|
1772
|
+
], exports.GetLedger2HistoryInputDTO.prototype, "walletName", 2);
|
|
1773
|
+
__decorateClass$b([
|
|
1774
|
+
graphql.Field(() => [String], {
|
|
1775
|
+
nullable: true,
|
|
1776
|
+
description: "\u0418\u043C\u0435\u043D\u0430 blockchain-\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0439: apply | walletop | debit | credit"
|
|
1777
|
+
}),
|
|
1778
|
+
classValidator.IsOptional(),
|
|
1779
|
+
classValidator.IsArray(),
|
|
1780
|
+
classValidator.IsString({ each: true })
|
|
1781
|
+
], exports.GetLedger2HistoryInputDTO.prototype, "actionNames", 2);
|
|
1782
|
+
__decorateClass$b([
|
|
1783
|
+
graphql.Field(() => [String], {
|
|
1784
|
+
nullable: true,
|
|
1785
|
+
description: "OPERATION_REGISTRY \u043A\u043E\u0434\u044B: o.cap.lend, o.wal.depcpl, o.mig.minshr \u0438 \u0442.\u0434."
|
|
1786
|
+
}),
|
|
1787
|
+
classValidator.IsOptional(),
|
|
1788
|
+
classValidator.IsArray(),
|
|
1789
|
+
classValidator.IsString({ each: true })
|
|
1790
|
+
], exports.GetLedger2HistoryInputDTO.prototype, "operationCodes", 2);
|
|
1791
|
+
__decorateClass$b([
|
|
1792
|
+
graphql.Field(() => String, { nullable: true }),
|
|
1793
|
+
classValidator.IsOptional(),
|
|
1794
|
+
classValidator.IsString(),
|
|
1795
|
+
classValidator.MaxLength(64)
|
|
1796
|
+
], exports.GetLedger2HistoryInputDTO.prototype, "username", 2);
|
|
1797
|
+
__decorateClass$b([
|
|
1798
|
+
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" }),
|
|
1799
|
+
classValidator.IsOptional(),
|
|
1800
|
+
classValidator.IsString(),
|
|
1801
|
+
classValidator.MaxLength(66),
|
|
1802
|
+
classValidator.Matches(/^[0-9a-fA-F]{64}$/, {
|
|
1803
|
+
message: validationMessage("ledger2.getLedger2HistoryInput.processHashInvalidFormat")
|
|
1804
|
+
})
|
|
1805
|
+
], exports.GetLedger2HistoryInputDTO.prototype, "processHash", 2);
|
|
1806
|
+
__decorateClass$b([
|
|
1807
|
+
graphql.Field(() => String, {
|
|
1808
|
+
nullable: true,
|
|
1809
|
+
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)."
|
|
1810
|
+
}),
|
|
1811
|
+
classValidator.IsOptional(),
|
|
1812
|
+
classValidator.IsString(),
|
|
1813
|
+
classValidator.MaxLength(24)
|
|
1814
|
+
], exports.GetLedger2HistoryInputDTO.prototype, "parentApplyGlobalSequence", 2);
|
|
1815
|
+
__decorateClass$b([
|
|
1816
|
+
graphql.Field(() => String, {
|
|
1817
|
+
nullable: true,
|
|
1818
|
+
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)."
|
|
1819
|
+
}),
|
|
1820
|
+
classValidator.IsOptional(),
|
|
1821
|
+
classValidator.IsString(),
|
|
1822
|
+
classValidator.MaxLength(24)
|
|
1823
|
+
], exports.GetLedger2HistoryInputDTO.prototype, "applyGlobalSequence", 2);
|
|
1824
|
+
__decorateClass$b([
|
|
1825
|
+
graphql.Field(() => String, {
|
|
1826
|
+
nullable: true,
|
|
1827
|
+
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."
|
|
1828
|
+
}),
|
|
1829
|
+
classValidator.IsOptional(),
|
|
1830
|
+
classValidator.IsString(),
|
|
1831
|
+
classValidator.MaxLength(24)
|
|
1832
|
+
], exports.GetLedger2HistoryInputDTO.prototype, "walletopGlobalSequence", 2);
|
|
1833
|
+
__decorateClass$b([
|
|
1834
|
+
graphql.Field(() => Date, { nullable: true }),
|
|
1835
|
+
classValidator.IsOptional(),
|
|
1836
|
+
classValidator.IsDate(),
|
|
1837
|
+
classTransformer.Type(() => Date)
|
|
1838
|
+
], exports.GetLedger2HistoryInputDTO.prototype, "dateFrom", 2);
|
|
1839
|
+
__decorateClass$b([
|
|
1840
|
+
graphql.Field(() => Date, { nullable: true }),
|
|
1841
|
+
classValidator.IsOptional(),
|
|
1842
|
+
classValidator.IsDate(),
|
|
1843
|
+
classTransformer.Type(() => Date)
|
|
1844
|
+
], exports.GetLedger2HistoryInputDTO.prototype, "dateTo", 2);
|
|
1845
|
+
__decorateClass$b([
|
|
1846
|
+
graphql.Field(() => graphql.Int, { nullable: true, defaultValue: 1 }),
|
|
1847
|
+
classValidator.IsOptional(),
|
|
1848
|
+
classValidator.IsInt(),
|
|
1849
|
+
classValidator.Min(1)
|
|
1850
|
+
], exports.GetLedger2HistoryInputDTO.prototype, "page", 2);
|
|
1851
|
+
__decorateClass$b([
|
|
1852
|
+
graphql.Field(() => graphql.Int, { nullable: true, defaultValue: 50 }),
|
|
1853
|
+
classValidator.IsOptional(),
|
|
1854
|
+
classValidator.IsInt(),
|
|
1855
|
+
classValidator.Min(1),
|
|
1856
|
+
classValidator.Max(500)
|
|
1857
|
+
], exports.GetLedger2HistoryInputDTO.prototype, "limit", 2);
|
|
1858
|
+
__decorateClass$b([
|
|
1859
|
+
graphql.Field(() => String, { nullable: true, defaultValue: "DESC" }),
|
|
1860
|
+
classValidator.IsOptional(),
|
|
1861
|
+
classValidator.IsIn(["ASC", "DESC"])
|
|
1862
|
+
], exports.GetLedger2HistoryInputDTO.prototype, "sortOrder", 2);
|
|
1863
|
+
exports.GetLedger2HistoryInputDTO = __decorateClass$b([
|
|
1864
|
+
graphql.InputType("GetLedger2HistoryInput")
|
|
1865
|
+
], exports.GetLedger2HistoryInputDTO);
|
|
1866
|
+
|
|
1867
|
+
var __defProp$a = Object.defineProperty;
|
|
1868
|
+
var __getOwnPropDesc$a = Object.getOwnPropertyDescriptor;
|
|
1869
|
+
var __decorateClass$a = (decorators, target, key, kind) => {
|
|
1870
|
+
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$a(target, key) : target;
|
|
1871
|
+
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
1872
|
+
if (decorator = decorators[i])
|
|
1873
|
+
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
1874
|
+
if (kind && result)
|
|
1875
|
+
__defProp$a(target, key, result);
|
|
1876
|
+
return result;
|
|
1877
|
+
};
|
|
1878
|
+
exports.GetLedger2PostingsInputDTO = class GetLedger2PostingsInputDTO {
|
|
1879
|
+
};
|
|
1880
|
+
__decorateClass$a([
|
|
1881
|
+
graphql.Field(() => String),
|
|
1882
|
+
classValidator.IsString()
|
|
1883
|
+
], exports.GetLedger2PostingsInputDTO.prototype, "coopname", 2);
|
|
1884
|
+
__decorateClass$a([
|
|
1885
|
+
graphql.Field(() => graphql.Int, {
|
|
1886
|
+
nullable: true,
|
|
1887
|
+
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."
|
|
1888
|
+
}),
|
|
1889
|
+
classValidator.IsOptional(),
|
|
1890
|
+
classValidator.IsInt()
|
|
1891
|
+
], exports.GetLedger2PostingsInputDTO.prototype, "accountId", 2);
|
|
1892
|
+
__decorateClass$a([
|
|
1893
|
+
graphql.Field(() => String, { nullable: true }),
|
|
1894
|
+
classValidator.IsOptional(),
|
|
1895
|
+
classValidator.IsString(),
|
|
1896
|
+
classValidator.MaxLength(64)
|
|
1897
|
+
], exports.GetLedger2PostingsInputDTO.prototype, "username", 2);
|
|
1898
|
+
__decorateClass$a([
|
|
1899
|
+
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" }),
|
|
1900
|
+
classValidator.IsOptional(),
|
|
1901
|
+
classValidator.IsString(),
|
|
1902
|
+
classValidator.MaxLength(66)
|
|
1903
|
+
], exports.GetLedger2PostingsInputDTO.prototype, "processHash", 2);
|
|
1904
|
+
__decorateClass$a([
|
|
1905
|
+
graphql.Field(() => String, {
|
|
1906
|
+
nullable: true,
|
|
1907
|
+
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."
|
|
1908
|
+
}),
|
|
1909
|
+
classValidator.IsOptional(),
|
|
1910
|
+
classValidator.IsString(),
|
|
1911
|
+
classValidator.MaxLength(24)
|
|
1912
|
+
], exports.GetLedger2PostingsInputDTO.prototype, "debitGlobalSequence", 2);
|
|
1913
|
+
__decorateClass$a([
|
|
1914
|
+
graphql.Field(() => String, {
|
|
1915
|
+
nullable: true,
|
|
1916
|
+
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."
|
|
1917
|
+
}),
|
|
1918
|
+
classValidator.IsOptional(),
|
|
1919
|
+
classValidator.IsString(),
|
|
1920
|
+
classValidator.MaxLength(24)
|
|
1921
|
+
], exports.GetLedger2PostingsInputDTO.prototype, "applyGlobalSequence", 2);
|
|
1922
|
+
__decorateClass$a([
|
|
1923
|
+
graphql.Field(() => Date, { nullable: true }),
|
|
1924
|
+
classValidator.IsOptional(),
|
|
1925
|
+
classValidator.IsDate(),
|
|
1926
|
+
classTransformer.Type(() => Date)
|
|
1927
|
+
], exports.GetLedger2PostingsInputDTO.prototype, "dateFrom", 2);
|
|
1928
|
+
__decorateClass$a([
|
|
1929
|
+
graphql.Field(() => Date, { nullable: true }),
|
|
1930
|
+
classValidator.IsOptional(),
|
|
1931
|
+
classValidator.IsDate(),
|
|
1932
|
+
classTransformer.Type(() => Date)
|
|
1933
|
+
], exports.GetLedger2PostingsInputDTO.prototype, "dateTo", 2);
|
|
1934
|
+
__decorateClass$a([
|
|
1935
|
+
graphql.Field(() => graphql.Int, { nullable: true, defaultValue: 1 }),
|
|
1936
|
+
classValidator.IsOptional(),
|
|
1937
|
+
classValidator.IsInt(),
|
|
1938
|
+
classValidator.Min(1)
|
|
1939
|
+
], exports.GetLedger2PostingsInputDTO.prototype, "page", 2);
|
|
1940
|
+
__decorateClass$a([
|
|
1941
|
+
graphql.Field(() => graphql.Int, { nullable: true, defaultValue: 50 }),
|
|
1942
|
+
classValidator.IsOptional(),
|
|
1943
|
+
classValidator.IsInt(),
|
|
1944
|
+
classValidator.Min(1),
|
|
1945
|
+
classValidator.Max(500)
|
|
1946
|
+
], exports.GetLedger2PostingsInputDTO.prototype, "limit", 2);
|
|
1947
|
+
__decorateClass$a([
|
|
1948
|
+
graphql.Field(() => String, { nullable: true, defaultValue: "DESC" }),
|
|
1949
|
+
classValidator.IsOptional(),
|
|
1950
|
+
classValidator.IsIn(["ASC", "DESC"])
|
|
1951
|
+
], exports.GetLedger2PostingsInputDTO.prototype, "sortOrder", 2);
|
|
1952
|
+
exports.GetLedger2PostingsInputDTO = __decorateClass$a([
|
|
1953
|
+
graphql.InputType("GetLedger2PostingsInput")
|
|
1954
|
+
], exports.GetLedger2PostingsInputDTO);
|
|
1955
|
+
|
|
1956
|
+
var __defProp$9 = Object.defineProperty;
|
|
1957
|
+
var __getOwnPropDesc$9 = Object.getOwnPropertyDescriptor;
|
|
1958
|
+
var __decorateClass$9 = (decorators, target, key, kind) => {
|
|
1959
|
+
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$9(target, key) : target;
|
|
1960
|
+
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
1961
|
+
if (decorator = decorators[i])
|
|
1962
|
+
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
1963
|
+
if (kind && result)
|
|
1964
|
+
__defProp$9(target, key, result);
|
|
1965
|
+
return result;
|
|
1966
|
+
};
|
|
1967
|
+
exports.ProcessesFilterInput = class ProcessesFilterInput {
|
|
1968
|
+
};
|
|
1969
|
+
__decorateClass$9([
|
|
1970
|
+
graphql.Field(() => String)
|
|
1971
|
+
], exports.ProcessesFilterInput.prototype, "coopname", 2);
|
|
1972
|
+
__decorateClass$9([
|
|
1973
|
+
graphql.Field(() => String, { nullable: true })
|
|
1974
|
+
], exports.ProcessesFilterInput.prototype, "processType", 2);
|
|
1975
|
+
__decorateClass$9([
|
|
1976
|
+
graphql.Field(() => String, { nullable: true })
|
|
1977
|
+
], exports.ProcessesFilterInput.prototype, "username", 2);
|
|
1978
|
+
__decorateClass$9([
|
|
1979
|
+
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" })
|
|
1980
|
+
], exports.ProcessesFilterInput.prototype, "processHash", 2);
|
|
1981
|
+
__decorateClass$9([
|
|
1982
|
+
graphql.Field(() => graphql.Int, { nullable: true })
|
|
1983
|
+
], exports.ProcessesFilterInput.prototype, "fromBlock", 2);
|
|
1984
|
+
__decorateClass$9([
|
|
1985
|
+
graphql.Field(() => graphql.Int, { nullable: true })
|
|
1986
|
+
], exports.ProcessesFilterInput.prototype, "toBlock", 2);
|
|
1987
|
+
exports.ProcessesFilterInput = __decorateClass$9([
|
|
1988
|
+
graphql.InputType("ProcessesFilter")
|
|
1989
|
+
], exports.ProcessesFilterInput);
|
|
1990
|
+
|
|
1991
|
+
var __defProp$8 = Object.defineProperty;
|
|
1992
|
+
var __getOwnPropDesc$8 = Object.getOwnPropertyDescriptor;
|
|
1993
|
+
var __decorateClass$8 = (decorators, target, key, kind) => {
|
|
1994
|
+
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$8(target, key) : target;
|
|
1995
|
+
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
1996
|
+
if (decorator = decorators[i])
|
|
1997
|
+
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
1998
|
+
if (kind && result)
|
|
1999
|
+
__defProp$8(target, key, result);
|
|
2000
|
+
return result;
|
|
2001
|
+
};
|
|
2002
|
+
exports.ProcessSummaryDTO = class ProcessSummaryDTO {
|
|
2003
|
+
// actionCount/deltaCount/documentCount удалены: N+1 counters на каждой
|
|
2004
|
+
// странице listProcesses были запросы 300+ на request. UI читает
|
|
2005
|
+
// getProcess(hash) при раскрытии — там счётчики выводимы из массивов.
|
|
2006
|
+
};
|
|
2007
|
+
__decorateClass$8([
|
|
2008
|
+
graphql.Field(() => String)
|
|
2009
|
+
], exports.ProcessSummaryDTO.prototype, "processType", 2);
|
|
2010
|
+
__decorateClass$8([
|
|
2011
|
+
graphql.Field(() => String)
|
|
2012
|
+
], exports.ProcessSummaryDTO.prototype, "processHash", 2);
|
|
2013
|
+
__decorateClass$8([
|
|
2014
|
+
graphql.Field(() => String)
|
|
2015
|
+
], exports.ProcessSummaryDTO.prototype, "coopname", 2);
|
|
2016
|
+
__decorateClass$8([
|
|
2017
|
+
graphql.Field(() => String, { nullable: true })
|
|
2018
|
+
], exports.ProcessSummaryDTO.prototype, "username", 2);
|
|
2019
|
+
__decorateClass$8([
|
|
2020
|
+
graphql.Field(() => Date)
|
|
2021
|
+
], exports.ProcessSummaryDTO.prototype, "firstSeenAt", 2);
|
|
2022
|
+
__decorateClass$8([
|
|
2023
|
+
graphql.Field(() => Date)
|
|
2024
|
+
], exports.ProcessSummaryDTO.prototype, "lastSeenAt", 2);
|
|
2025
|
+
__decorateClass$8([
|
|
2026
|
+
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" })
|
|
2027
|
+
], exports.ProcessSummaryDTO.prototype, "amount", 2);
|
|
2028
|
+
__decorateClass$8([
|
|
2029
|
+
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" })
|
|
2030
|
+
], exports.ProcessSummaryDTO.prototype, "memo", 2);
|
|
2031
|
+
exports.ProcessSummaryDTO = __decorateClass$8([
|
|
2032
|
+
graphql.ObjectType("ProcessSummary")
|
|
2033
|
+
], exports.ProcessSummaryDTO);
|
|
2034
|
+
const PaginatedProcessSummary = createPaginationResult(exports.ProcessSummaryDTO, "ProcessSummary");
|
|
2035
|
+
|
|
2036
|
+
var __defProp$7 = Object.defineProperty;
|
|
2037
|
+
var __getOwnPropDesc$7 = Object.getOwnPropertyDescriptor;
|
|
2038
|
+
var __decorateClass$7 = (decorators, target, key, kind) => {
|
|
2039
|
+
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$7(target, key) : target;
|
|
2040
|
+
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
2041
|
+
if (decorator = decorators[i])
|
|
2042
|
+
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
2043
|
+
if (kind && result)
|
|
2044
|
+
__defProp$7(target, key, result);
|
|
2045
|
+
return result;
|
|
2046
|
+
};
|
|
2047
|
+
exports.ProcessActionDTO = class ProcessActionDTO {
|
|
2048
|
+
};
|
|
2049
|
+
__decorateClass$7([
|
|
2050
|
+
graphql.Field(() => String)
|
|
2051
|
+
], exports.ProcessActionDTO.prototype, "id", 2);
|
|
2052
|
+
__decorateClass$7([
|
|
2053
|
+
graphql.Field(() => String)
|
|
2054
|
+
], exports.ProcessActionDTO.prototype, "account", 2);
|
|
2055
|
+
__decorateClass$7([
|
|
2056
|
+
graphql.Field(() => String)
|
|
2057
|
+
], exports.ProcessActionDTO.prototype, "name", 2);
|
|
2058
|
+
__decorateClass$7([
|
|
2059
|
+
graphql.Field(() => GraphQLJSON__default, { nullable: true })
|
|
2060
|
+
], exports.ProcessActionDTO.prototype, "data", 2);
|
|
2061
|
+
__decorateClass$7([
|
|
2062
|
+
graphql.Field(() => Number)
|
|
2063
|
+
], exports.ProcessActionDTO.prototype, "block_num", 2);
|
|
2064
|
+
__decorateClass$7([
|
|
2065
|
+
graphql.Field(() => String)
|
|
2066
|
+
], exports.ProcessActionDTO.prototype, "block_id", 2);
|
|
2067
|
+
__decorateClass$7([
|
|
2068
|
+
graphql.Field(() => String)
|
|
2069
|
+
], exports.ProcessActionDTO.prototype, "global_sequence", 2);
|
|
2070
|
+
__decorateClass$7([
|
|
2071
|
+
graphql.Field(() => String)
|
|
2072
|
+
], exports.ProcessActionDTO.prototype, "transaction_id", 2);
|
|
2073
|
+
__decorateClass$7([
|
|
2074
|
+
graphql.Field(() => Date)
|
|
2075
|
+
], exports.ProcessActionDTO.prototype, "created_at", 2);
|
|
2076
|
+
exports.ProcessActionDTO = __decorateClass$7([
|
|
2077
|
+
graphql.ObjectType("ProcessAction")
|
|
2078
|
+
], exports.ProcessActionDTO);
|
|
2079
|
+
exports.ProcessDeltaDTO = class ProcessDeltaDTO {
|
|
2080
|
+
};
|
|
2081
|
+
__decorateClass$7([
|
|
2082
|
+
graphql.Field(() => String)
|
|
2083
|
+
], exports.ProcessDeltaDTO.prototype, "id", 2);
|
|
2084
|
+
__decorateClass$7([
|
|
2085
|
+
graphql.Field(() => String)
|
|
2086
|
+
], exports.ProcessDeltaDTO.prototype, "code", 2);
|
|
2087
|
+
__decorateClass$7([
|
|
2088
|
+
graphql.Field(() => String)
|
|
2089
|
+
], exports.ProcessDeltaDTO.prototype, "scope", 2);
|
|
2090
|
+
__decorateClass$7([
|
|
2091
|
+
graphql.Field(() => String)
|
|
2092
|
+
], exports.ProcessDeltaDTO.prototype, "table", 2);
|
|
2093
|
+
__decorateClass$7([
|
|
2094
|
+
graphql.Field(() => String)
|
|
2095
|
+
], exports.ProcessDeltaDTO.prototype, "primary_key", 2);
|
|
2096
|
+
__decorateClass$7([
|
|
2097
|
+
graphql.Field(() => Boolean)
|
|
2098
|
+
], exports.ProcessDeltaDTO.prototype, "present", 2);
|
|
2099
|
+
__decorateClass$7([
|
|
2100
|
+
graphql.Field(() => GraphQLJSON__default, { nullable: true })
|
|
2101
|
+
], exports.ProcessDeltaDTO.prototype, "value", 2);
|
|
2102
|
+
__decorateClass$7([
|
|
2103
|
+
graphql.Field(() => Number)
|
|
2104
|
+
], exports.ProcessDeltaDTO.prototype, "block_num", 2);
|
|
2105
|
+
__decorateClass$7([
|
|
2106
|
+
graphql.Field(() => Date)
|
|
2107
|
+
], exports.ProcessDeltaDTO.prototype, "created_at", 2);
|
|
2108
|
+
exports.ProcessDeltaDTO = __decorateClass$7([
|
|
2109
|
+
graphql.ObjectType("ProcessDelta")
|
|
2110
|
+
], exports.ProcessDeltaDTO);
|
|
2111
|
+
exports.ProcessDocumentSourceDTO = class ProcessDocumentSourceDTO {
|
|
2112
|
+
};
|
|
2113
|
+
__decorateClass$7([
|
|
2114
|
+
graphql.Field(() => String)
|
|
2115
|
+
], exports.ProcessDocumentSourceDTO.prototype, "code", 2);
|
|
2116
|
+
__decorateClass$7([
|
|
2117
|
+
graphql.Field(() => String)
|
|
2118
|
+
], exports.ProcessDocumentSourceDTO.prototype, "table", 2);
|
|
2119
|
+
__decorateClass$7([
|
|
2120
|
+
graphql.Field(() => String)
|
|
2121
|
+
], exports.ProcessDocumentSourceDTO.prototype, "field", 2);
|
|
2122
|
+
__decorateClass$7([
|
|
2123
|
+
graphql.Field(() => String)
|
|
2124
|
+
], exports.ProcessDocumentSourceDTO.prototype, "primary_key", 2);
|
|
2125
|
+
exports.ProcessDocumentSourceDTO = __decorateClass$7([
|
|
2126
|
+
graphql.ObjectType("ProcessDocumentSource")
|
|
2127
|
+
], exports.ProcessDocumentSourceDTO);
|
|
2128
|
+
exports.ProcessDocumentDTO = class ProcessDocumentDTO {
|
|
2129
|
+
};
|
|
2130
|
+
__decorateClass$7([
|
|
2131
|
+
graphql.Field(() => String)
|
|
2132
|
+
], exports.ProcessDocumentDTO.prototype, "hash", 2);
|
|
2133
|
+
__decorateClass$7([
|
|
2134
|
+
graphql.Field(() => exports.ProcessDocumentSourceDTO)
|
|
2135
|
+
], exports.ProcessDocumentDTO.prototype, "source", 2);
|
|
2136
|
+
__decorateClass$7([
|
|
2137
|
+
graphql.Field(() => GraphQLJSON__default)
|
|
2138
|
+
], exports.ProcessDocumentDTO.prototype, "document", 2);
|
|
2139
|
+
__decorateClass$7([
|
|
2140
|
+
graphql.Field(() => GraphQLJSON__default, { nullable: true })
|
|
2141
|
+
], exports.ProcessDocumentDTO.prototype, "raw", 2);
|
|
2142
|
+
exports.ProcessDocumentDTO = __decorateClass$7([
|
|
2143
|
+
graphql.ObjectType("ProcessDocument")
|
|
2144
|
+
], exports.ProcessDocumentDTO);
|
|
2145
|
+
exports.ProcessViewDTO = class ProcessViewDTO {
|
|
2146
|
+
};
|
|
2147
|
+
__decorateClass$7([
|
|
2148
|
+
graphql.Field(() => String)
|
|
2149
|
+
], exports.ProcessViewDTO.prototype, "process_type", 2);
|
|
2150
|
+
__decorateClass$7([
|
|
2151
|
+
graphql.Field(() => String)
|
|
2152
|
+
], exports.ProcessViewDTO.prototype, "process_hash", 2);
|
|
2153
|
+
__decorateClass$7([
|
|
2154
|
+
graphql.Field(() => String)
|
|
2155
|
+
], exports.ProcessViewDTO.prototype, "coopname", 2);
|
|
2156
|
+
__decorateClass$7([
|
|
2157
|
+
graphql.Field(() => Date)
|
|
2158
|
+
], exports.ProcessViewDTO.prototype, "first_seen_at", 2);
|
|
2159
|
+
__decorateClass$7([
|
|
2160
|
+
graphql.Field(() => Date)
|
|
2161
|
+
], exports.ProcessViewDTO.prototype, "last_seen_at", 2);
|
|
2162
|
+
__decorateClass$7([
|
|
2163
|
+
graphql.Field(() => [exports.ProcessActionDTO])
|
|
2164
|
+
], exports.ProcessViewDTO.prototype, "actions", 2);
|
|
2165
|
+
__decorateClass$7([
|
|
2166
|
+
graphql.Field(() => [exports.ProcessDeltaDTO])
|
|
2167
|
+
], exports.ProcessViewDTO.prototype, "delta_history", 2);
|
|
2168
|
+
__decorateClass$7([
|
|
2169
|
+
graphql.Field(() => [exports.ProcessDocumentDTO])
|
|
2170
|
+
], exports.ProcessViewDTO.prototype, "documents", 2);
|
|
2171
|
+
exports.ProcessViewDTO = __decorateClass$7([
|
|
2172
|
+
graphql.ObjectType("ProcessView")
|
|
2173
|
+
], exports.ProcessViewDTO);
|
|
2174
|
+
|
|
2175
|
+
var __defProp$6 = Object.defineProperty;
|
|
2176
|
+
var __getOwnPropDesc$6 = Object.getOwnPropertyDescriptor;
|
|
2177
|
+
var __decorateClass$6 = (decorators, target, key, kind) => {
|
|
2178
|
+
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$6(target, key) : target;
|
|
2179
|
+
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
2180
|
+
if (decorator = decorators[i])
|
|
2181
|
+
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
2182
|
+
if (kind && result)
|
|
2183
|
+
__defProp$6(target, key, result);
|
|
2184
|
+
return result;
|
|
2185
|
+
};
|
|
2186
|
+
exports.TransactionDTO = class TransactionDTO {
|
|
2187
|
+
};
|
|
2188
|
+
__decorateClass$6([
|
|
2189
|
+
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 })
|
|
2190
|
+
], exports.TransactionDTO.prototype, "chain", 2);
|
|
2191
|
+
__decorateClass$6([
|
|
2192
|
+
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 })
|
|
2193
|
+
], exports.TransactionDTO.prototype, "request", 2);
|
|
2194
|
+
__decorateClass$6([
|
|
2195
|
+
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 })
|
|
2196
|
+
], exports.TransactionDTO.prototype, "resolved", 2);
|
|
2197
|
+
__decorateClass$6([
|
|
2198
|
+
graphql.Field(() => GraphQLJSON.GraphQLJSON, {
|
|
2199
|
+
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)",
|
|
2200
|
+
nullable: true
|
|
2201
|
+
})
|
|
2202
|
+
], exports.TransactionDTO.prototype, "response", 2);
|
|
2203
|
+
__decorateClass$6([
|
|
2204
|
+
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 })
|
|
2205
|
+
], exports.TransactionDTO.prototype, "returns", 2);
|
|
2206
|
+
__decorateClass$6([
|
|
2207
|
+
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 })
|
|
2208
|
+
], exports.TransactionDTO.prototype, "revisions", 2);
|
|
2209
|
+
__decorateClass$6([
|
|
2210
|
+
graphql.Field(() => GraphQLJSON.GraphQLJSON, { description: "\u041F\u043E\u0434\u043F\u0438\u0441\u0438 \u0442\u0440\u0430\u043D\u0437\u0430\u043A\u0446\u0438\u0438", nullable: true })
|
|
2211
|
+
], exports.TransactionDTO.prototype, "signatures", 2);
|
|
2212
|
+
__decorateClass$6([
|
|
2213
|
+
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 })
|
|
2214
|
+
], exports.TransactionDTO.prototype, "signer", 2);
|
|
2215
|
+
__decorateClass$6([
|
|
2216
|
+
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 })
|
|
1230
2217
|
], exports.TransactionDTO.prototype, "transaction", 2);
|
|
1231
2218
|
exports.TransactionDTO = __decorateClass$6([
|
|
1232
2219
|
graphql.ObjectType("Transaction")
|
|
@@ -1335,7 +2322,7 @@ __decorateClass$5([
|
|
|
1335
2322
|
classValidator.IsString()
|
|
1336
2323
|
], exports.GeneratedDocumentDTO.prototype, "hash", 2);
|
|
1337
2324
|
__decorateClass$5([
|
|
1338
|
-
graphql.Field(() =>
|
|
2325
|
+
graphql.Field(() => GraphQLJSON.GraphQLJSON, { description: "\u041C\u0435\u0442\u0430\u0434\u0430\u043D\u043D\u044B\u0435 \u0434\u043E\u043A\u0443\u043C\u0435\u043D\u0442\u0430" })
|
|
1339
2326
|
], exports.GeneratedDocumentDTO.prototype, "meta", 2);
|
|
1340
2327
|
__decorateClass$5([
|
|
1341
2328
|
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)" }),
|
|
@@ -1425,7 +2412,7 @@ __decorateClass$2([
|
|
|
1425
2412
|
classValidator.IsString()
|
|
1426
2413
|
], exports.SignatureInfoDTO.prototype, "signed_hash", 2);
|
|
1427
2414
|
__decorateClass$2([
|
|
1428
|
-
graphql.Field(() =>
|
|
2415
|
+
graphql.Field(() => GraphQLJSON.GraphQLJSON)
|
|
1429
2416
|
], exports.SignatureInfoDTO.prototype, "meta", 2);
|
|
1430
2417
|
__decorateClass$2([
|
|
1431
2418
|
graphql.Field(() => Boolean, { nullable: true })
|
|
@@ -1460,7 +2447,7 @@ __decorateClass$2([
|
|
|
1460
2447
|
classValidator.IsString()
|
|
1461
2448
|
], exports.SignedDigitalDocumentDTO.prototype, "meta_hash", 2);
|
|
1462
2449
|
__decorateClass$2([
|
|
1463
|
-
graphql.Field(() =>
|
|
2450
|
+
graphql.Field(() => GraphQLJSON.GraphQLJSON)
|
|
1464
2451
|
], exports.SignedDigitalDocumentDTO.prototype, "meta", 2);
|
|
1465
2452
|
__decorateClass$2([
|
|
1466
2453
|
graphql.Field(() => [exports.SignatureInfoDTO]),
|
|
@@ -1533,7 +2520,7 @@ class CurrencyValidationUtil {
|
|
|
1533
2520
|
static validateCurrencySymbol(amount, fieldName = server.t("kit.currency.defaultFieldName")) {
|
|
1534
2521
|
if (!this.hasValidCurrencySymbol(amount)) {
|
|
1535
2522
|
const expectedSymbol = platformSettings().blockchain.rootGovernSymbol;
|
|
1536
|
-
throw DomainError.
|
|
2523
|
+
throw DomainError.badRequest("KIT_CURRENCY_SYMBOL_INVALID", { fieldName, expectedSymbol });
|
|
1537
2524
|
}
|
|
1538
2525
|
}
|
|
1539
2526
|
/**
|
|
@@ -1678,12 +2665,12 @@ exports.DomainToBlockchainUtils = class DomainToBlockchainUtils {
|
|
|
1678
2665
|
formatQuantityWithPrecision(quantity) {
|
|
1679
2666
|
const parts = quantity.split(" ");
|
|
1680
2667
|
if (parts.length !== 2) {
|
|
1681
|
-
throw DomainError.
|
|
2668
|
+
throw DomainError.badRequest("KIT_QUANTITY_FORMAT_INVALID", { quantity });
|
|
1682
2669
|
}
|
|
1683
2670
|
const [amount, symbol] = parts;
|
|
1684
2671
|
const numericAmount = parseFloat(amount);
|
|
1685
2672
|
if (isNaN(numericAmount)) {
|
|
1686
|
-
throw DomainError.
|
|
2673
|
+
throw DomainError.badRequest("KIT_QUANTITY_AMOUNT_INVALID", { amount });
|
|
1687
2674
|
}
|
|
1688
2675
|
const { rootSymbol, rootPrecision, rootGovernSymbol, rootGovernPrecision } = platformSettings().blockchain;
|
|
1689
2676
|
let precision;
|
|
@@ -1692,7 +2679,7 @@ exports.DomainToBlockchainUtils = class DomainToBlockchainUtils {
|
|
|
1692
2679
|
} else if (symbol === rootGovernSymbol) {
|
|
1693
2680
|
precision = rootGovernPrecision;
|
|
1694
2681
|
} else {
|
|
1695
|
-
throw DomainError.
|
|
2682
|
+
throw DomainError.badRequest("KIT_SYMBOL_UNSUPPORTED", { symbol, rootSymbol, rootGovernSymbol });
|
|
1696
2683
|
}
|
|
1697
2684
|
return `${numericAmount.toFixed(precision)} ${symbol}`;
|
|
1698
2685
|
}
|
|
@@ -1700,10 +2687,10 @@ exports.DomainToBlockchainUtils = class DomainToBlockchainUtils {
|
|
|
1700
2687
|
formatNumericStringToAssetString(numericString, precision, symbol) {
|
|
1701
2688
|
const numericValue = parseFloat(numericString);
|
|
1702
2689
|
if (isNaN(numericValue)) {
|
|
1703
|
-
throw DomainError.
|
|
2690
|
+
throw DomainError.badRequest("KIT_NUMBER_INVALID", { value: numericString });
|
|
1704
2691
|
}
|
|
1705
2692
|
if (numericValue < 0) {
|
|
1706
|
-
throw DomainError.
|
|
2693
|
+
throw DomainError.badRequest("KIT_NUMBER_NEGATIVE", { value: numericString });
|
|
1707
2694
|
}
|
|
1708
2695
|
return `${numericValue.toFixed(precision)} ${symbol}`;
|
|
1709
2696
|
}
|
|
@@ -1734,7 +2721,7 @@ exports.DomainToBlockchainUtils = __decorateClass([
|
|
|
1734
2721
|
common.Injectable()
|
|
1735
2722
|
], exports.DomainToBlockchainUtils);
|
|
1736
2723
|
|
|
1737
|
-
const DIGEST_RE = /^[0-9a-f]{64}
|
|
2724
|
+
const DIGEST_RE = /^[0-9a-f]{64}$/i;
|
|
1738
2725
|
function chainTextDigest(text) {
|
|
1739
2726
|
if (!text)
|
|
1740
2727
|
return "";
|
|
@@ -1743,6 +2730,9 @@ function chainTextDigest(text) {
|
|
|
1743
2730
|
function isChainTextDigest(value) {
|
|
1744
2731
|
return typeof value === "string" && DIGEST_RE.test(value);
|
|
1745
2732
|
}
|
|
2733
|
+
function isChainTextOf(text, chainValue) {
|
|
2734
|
+
return chainTextDigest(text) === (chainValue ?? "").toLowerCase();
|
|
2735
|
+
}
|
|
1746
2736
|
function resolveChainText(chainValue, current) {
|
|
1747
2737
|
return isChainTextDigest(chainValue) ? current ?? "" : chainValue;
|
|
1748
2738
|
}
|
|
@@ -1833,17 +2823,17 @@ class AmountFormatterUtils {
|
|
|
1833
2823
|
*/
|
|
1834
2824
|
static formatAmount(amountStr) {
|
|
1835
2825
|
if (!amountStr || typeof amountStr !== "string") {
|
|
1836
|
-
throw DomainError.
|
|
2826
|
+
throw DomainError.badRequest("KIT_AMOUNT_FORMAT_INVALID", { amount: amountStr });
|
|
1837
2827
|
}
|
|
1838
2828
|
const parts = amountStr.trim().split(/\s+/);
|
|
1839
2829
|
if (parts.length < 1 || !parts[0]) {
|
|
1840
|
-
throw DomainError.
|
|
2830
|
+
throw DomainError.badRequest("KIT_AMOUNT_FORMAT_INVALID", { amount: amountStr });
|
|
1841
2831
|
}
|
|
1842
2832
|
const amountPart = parts[0].replace(",", ".");
|
|
1843
2833
|
const currency = parts.length >= 2 ? parts.slice(1).join(" ") : "";
|
|
1844
2834
|
const amount = parseFloat(amountPart);
|
|
1845
2835
|
if (isNaN(amount)) {
|
|
1846
|
-
throw DomainError.
|
|
2836
|
+
throw DomainError.badRequest("KIT_AMOUNT_NUMBER_INVALID", { value: parts[0] });
|
|
1847
2837
|
}
|
|
1848
2838
|
const formattedAmount = amount.toLocaleString("ru-RU", {
|
|
1849
2839
|
minimumFractionDigits: 2,
|
|
@@ -1919,7 +2909,7 @@ class QuantityUtils {
|
|
|
1919
2909
|
} else if (symbol === rootGovernSymbol) {
|
|
1920
2910
|
return rootGovernPrecision;
|
|
1921
2911
|
} else {
|
|
1922
|
-
throw DomainError.
|
|
2912
|
+
throw DomainError.badRequest("KIT_SYMBOL_UNSUPPORTED", { symbol, rootSymbol, rootGovernSymbol });
|
|
1923
2913
|
}
|
|
1924
2914
|
}
|
|
1925
2915
|
/**
|
|
@@ -1929,7 +2919,7 @@ class QuantityUtils {
|
|
|
1929
2919
|
static validateSymbol(symbol) {
|
|
1930
2920
|
if (!this.isSupportedSymbol(symbol)) {
|
|
1931
2921
|
const { rootSymbol, rootGovernSymbol } = platformSettings().blockchain;
|
|
1932
|
-
throw DomainError.
|
|
2922
|
+
throw DomainError.badRequest("KIT_SYMBOL_UNSUPPORTED", { symbol, rootSymbol, rootGovernSymbol });
|
|
1933
2923
|
}
|
|
1934
2924
|
}
|
|
1935
2925
|
/**
|
|
@@ -1941,7 +2931,7 @@ class QuantityUtils {
|
|
|
1941
2931
|
static formatQuantityForBlockchain(amount, symbol) {
|
|
1942
2932
|
this.validateSymbol(symbol);
|
|
1943
2933
|
if (isNaN(amount) || amount < 0) {
|
|
1944
|
-
throw DomainError.
|
|
2934
|
+
throw DomainError.badRequest("KIT_NUMBER_INVALID", { value: amount });
|
|
1945
2935
|
}
|
|
1946
2936
|
const precision = this.getPrecisionForSymbol(symbol);
|
|
1947
2937
|
const formattedAmount = amount.toFixed(precision);
|
|
@@ -1956,7 +2946,7 @@ class QuantityUtils {
|
|
|
1956
2946
|
static combineQuantityAndSymbol(amount, symbol) {
|
|
1957
2947
|
this.validateSymbol(symbol);
|
|
1958
2948
|
if (isNaN(amount) || amount < 0) {
|
|
1959
|
-
throw DomainError.
|
|
2949
|
+
throw DomainError.badRequest("KIT_NUMBER_INVALID", { value: amount });
|
|
1960
2950
|
}
|
|
1961
2951
|
return `${amount} ${symbol}`;
|
|
1962
2952
|
}
|
|
@@ -1968,12 +2958,12 @@ class QuantityUtils {
|
|
|
1968
2958
|
static parseQuantityString(quantity) {
|
|
1969
2959
|
const parts = quantity.split(" ");
|
|
1970
2960
|
if (parts.length !== 2) {
|
|
1971
|
-
throw DomainError.
|
|
2961
|
+
throw DomainError.badRequest("KIT_QUANTITY_FORMAT_INVALID", { quantity });
|
|
1972
2962
|
}
|
|
1973
2963
|
const [amountStr, symbol] = parts;
|
|
1974
2964
|
const amount = parseFloat(amountStr);
|
|
1975
2965
|
if (isNaN(amount)) {
|
|
1976
|
-
throw DomainError.
|
|
2966
|
+
throw DomainError.badRequest("KIT_QUANTITY_AMOUNT_INVALID", { amount: amountStr });
|
|
1977
2967
|
}
|
|
1978
2968
|
this.validateSymbol(symbol);
|
|
1979
2969
|
return { amount, symbol };
|
|
@@ -2085,13 +3075,29 @@ function sanitizeUserText(value) {
|
|
|
2085
3075
|
return cooptypes._Common.Text.sanitizeEditorMarkdown(value);
|
|
2086
3076
|
}
|
|
2087
3077
|
|
|
2088
|
-
function
|
|
2089
|
-
|
|
2090
|
-
|
|
2091
|
-
|
|
2092
|
-
|
|
2093
|
-
|
|
2094
|
-
|
|
3078
|
+
function SafeMarkup(validationOptions) {
|
|
3079
|
+
return function(object, propertyName) {
|
|
3080
|
+
classValidator.registerDecorator({
|
|
3081
|
+
name: "safeMarkup",
|
|
3082
|
+
target: object.constructor,
|
|
3083
|
+
propertyName,
|
|
3084
|
+
options: { message: validationMessage("kit.markup.executable"), ...validationOptions },
|
|
3085
|
+
validator: {
|
|
3086
|
+
validate(value) {
|
|
3087
|
+
return typeof value !== "string" || !cooptypes._Common.Text.hasExecutableMarkup(value);
|
|
3088
|
+
}
|
|
3089
|
+
}
|
|
3090
|
+
});
|
|
3091
|
+
};
|
|
3092
|
+
}
|
|
3093
|
+
|
|
3094
|
+
function pickDefined(source, keys) {
|
|
3095
|
+
const picked = {};
|
|
3096
|
+
for (const key of keys) {
|
|
3097
|
+
if (source[key] !== void 0)
|
|
3098
|
+
picked[key] = source[key];
|
|
3099
|
+
}
|
|
3100
|
+
return picked;
|
|
2095
3101
|
}
|
|
2096
3102
|
|
|
2097
3103
|
class HttpApiError extends common.HttpException {
|
|
@@ -2109,6 +3115,7 @@ class HttpApiError extends common.HttpException {
|
|
|
2109
3115
|
|
|
2110
3116
|
const ASSERT_PREFIX = /assertion failure with message: (.+?)(?:\n|$)/;
|
|
2111
3117
|
const CODED = /^([A-Z][A-Z0-9]*(?:_[A-Z0-9]+)+):\s*(.*)$/s;
|
|
3118
|
+
const ENCODING = /^Encoding error at root<[^>]*>((?:\.[^.<:]+<[^>]*>)*):/;
|
|
2112
3119
|
function parseChainAssert(message) {
|
|
2113
3120
|
const assert = message.match(ASSERT_PREFIX);
|
|
2114
3121
|
const body = (assert ? assert[1] : message).trim();
|
|
@@ -2124,7 +3131,23 @@ function chainErrorCode(error) {
|
|
|
2124
3131
|
const raw = error?.message ?? String(error);
|
|
2125
3132
|
return parseChainAssert(raw).code;
|
|
2126
3133
|
}
|
|
3134
|
+
function chainRefusalOf(error) {
|
|
3135
|
+
if (error instanceof DomainError)
|
|
3136
|
+
return error;
|
|
3137
|
+
const raw = error?.message ?? String(error);
|
|
3138
|
+
const encoding = raw.match(ENCODING);
|
|
3139
|
+
if (encoding) {
|
|
3140
|
+
const field = encoding[1].split(".").filter(Boolean).map((part) => part.replace(/<[^>]*>$/, "")).join(".");
|
|
3141
|
+
return DomainError.badRequest("CHAIN_ACTION_ARGUMENT_INVALID", { field });
|
|
3142
|
+
}
|
|
3143
|
+
if (!ASSERT_PREFIX.test(raw))
|
|
3144
|
+
return null;
|
|
3145
|
+
const { code, text } = parseChainAssert(raw);
|
|
3146
|
+
return DomainError.badRequest(code ?? "CHAIN_ASSERT", { message: text });
|
|
3147
|
+
}
|
|
2127
3148
|
function rethrowChainError(error) {
|
|
3149
|
+
if (error instanceof DomainError)
|
|
3150
|
+
throw error;
|
|
2128
3151
|
const raw = error?.message ?? String(error);
|
|
2129
3152
|
const match = raw.match(ASSERT_PREFIX);
|
|
2130
3153
|
if (!match)
|
|
@@ -2133,11 +3156,37 @@ function rethrowChainError(error) {
|
|
|
2133
3156
|
throw DomainError.badRequest(code ?? "CHAIN_ASSERT", { message: text });
|
|
2134
3157
|
}
|
|
2135
3158
|
|
|
3159
|
+
exports.KYSELY = transaction.KYSELY;
|
|
3160
|
+
exports.MAIN_DATABASE = transaction.MAIN_DATABASE;
|
|
3161
|
+
exports.SqlBuilder = transaction.SqlBuilder;
|
|
3162
|
+
exports.TableStore = transaction.TableStore;
|
|
3163
|
+
exports.affectedCount = transaction.affectedCount;
|
|
3164
|
+
exports.bindNamed = transaction.bindNamed;
|
|
3165
|
+
exports.camelRow = transaction.camelRow;
|
|
3166
|
+
exports.configureLocalChangePublisher = transaction.configureLocalChangePublisher;
|
|
3167
|
+
exports.contains = transaction.contains;
|
|
3168
|
+
exports.ilike = transaction.ilike;
|
|
3169
|
+
exports.inTransaction = transaction.inTransaction;
|
|
3170
|
+
exports.isNull = transaction.isNull;
|
|
3171
|
+
exports.lessOrEqual = transaction.lessOrEqual;
|
|
3172
|
+
exports.lessThan = transaction.lessThan;
|
|
3173
|
+
exports.moreOrEqual = transaction.moreOrEqual;
|
|
3174
|
+
exports.moreThan = transaction.moreThan;
|
|
3175
|
+
exports.notEqual = transaction.notEqual;
|
|
3176
|
+
exports.notNull = transaction.notNull;
|
|
3177
|
+
exports.oneOf = transaction.oneOf;
|
|
3178
|
+
exports.pendingLocalChanges = transaction.pendingLocalChanges;
|
|
3179
|
+
exports.rawQuery = transaction.rawQuery;
|
|
3180
|
+
exports.snakeRow = transaction.snakeRow;
|
|
3181
|
+
exports.sortColumn = transaction.sortColumn;
|
|
3182
|
+
exports.sortDirection = transaction.sortDirection;
|
|
3183
|
+
exports.within = transaction.within;
|
|
3184
|
+
exports.APP_RIGHTS = APP_RIGHTS;
|
|
2136
3185
|
exports.AmountFormatterUtils = AmountFormatterUtils;
|
|
2137
3186
|
exports.AssetUtils = AssetUtils;
|
|
2138
|
-
exports.AuthRoles = AuthRoles;
|
|
2139
3187
|
exports.BucketRegistry = BucketRegistry;
|
|
2140
3188
|
exports.CandidateStatus = CandidateStatus;
|
|
3189
|
+
exports.CouncilField = CouncilField;
|
|
2141
3190
|
exports.CurrencyValidationUtil = CurrencyValidationUtil;
|
|
2142
3191
|
exports.CurrentUser = CurrentUser;
|
|
2143
3192
|
exports.DEFAULT_DOCUMENT_VERSION = DEFAULT_DOCUMENT_VERSION;
|
|
@@ -2151,6 +3200,8 @@ exports.EXTENSION_SECRET_UNSET = EXTENSION_SECRET_UNSET;
|
|
|
2151
3200
|
exports.ExtensionAvailability = ExtensionAvailability;
|
|
2152
3201
|
exports.ExtensionConfigSuppliedBy = ExtensionConfigSuppliedBy;
|
|
2153
3202
|
exports.ExtensionDomainEntity = ExtensionDomainEntity;
|
|
3203
|
+
exports.GRANTED_SCOPE_KEY = GRANTED_SCOPE_KEY;
|
|
3204
|
+
exports.GrantedScope = GrantedScope;
|
|
2154
3205
|
exports.HttpApiError = HttpApiError;
|
|
2155
3206
|
exports.InjectBucket = InjectBucket;
|
|
2156
3207
|
exports.LOG_EXTENSION_REPOSITORY = LOG_EXTENSION_REPOSITORY;
|
|
@@ -2159,27 +3210,38 @@ exports.LogExtensionDomainEntity = LogExtensionDomainEntity;
|
|
|
2159
3210
|
exports.ONBOARDING_EXPIRY_DAYS = ONBOARDING_EXPIRY_DAYS;
|
|
2160
3211
|
exports.ONBOARDING_EXPIRY_MS = ONBOARDING_EXPIRY_MS;
|
|
2161
3212
|
exports.OptionalCurrentUser = OptionalCurrentUser;
|
|
3213
|
+
exports.PaginatedProcessSummary = PaginatedProcessSummary;
|
|
2162
3214
|
exports.PaginationResult = PaginationResult;
|
|
2163
3215
|
exports.PaginationUtils = PaginationUtils;
|
|
2164
3216
|
exports.QuantityUtils = QuantityUtils;
|
|
2165
|
-
exports.
|
|
2166
|
-
exports.
|
|
3217
|
+
exports.RIGHT_METADATA_KEY = RIGHT_METADATA_KEY;
|
|
3218
|
+
exports.RequireRight = RequireRight;
|
|
3219
|
+
exports.SCOPE_DENIALS = SCOPE_DENIALS;
|
|
3220
|
+
exports.SELF = SELF;
|
|
2167
3221
|
exports.SORT_FIELD_PATTERN = SORT_FIELD_PATTERN;
|
|
3222
|
+
exports.SafeMarkup = SafeMarkup;
|
|
2168
3223
|
exports.UseBucket = UseBucket;
|
|
3224
|
+
exports.attachOne = attachOne;
|
|
2169
3225
|
exports.bucketProvidersFor = bucketProvidersFor;
|
|
2170
3226
|
exports.bucketTokenFor = bucketTokenFor;
|
|
2171
3227
|
exports.buildPaginationResult = buildPaginationResult;
|
|
2172
3228
|
exports.chainErrorCode = chainErrorCode;
|
|
3229
|
+
exports.chainRefusalOf = chainRefusalOf;
|
|
2173
3230
|
exports.chainTextDigest = chainTextDigest;
|
|
2174
3231
|
exports.checkPaymentAmount = checkPaymentAmount;
|
|
2175
3232
|
exports.checkPaymentSymbol = checkPaymentSymbol;
|
|
3233
|
+
exports.checkRight = checkRight;
|
|
3234
|
+
exports.checkRightScope = checkRightScope;
|
|
2176
3235
|
exports.computeOnboardingExpiresAt = computeOnboardingExpiresAt;
|
|
2177
3236
|
exports.configureExtensionAuth = configureExtensionAuth;
|
|
2178
3237
|
exports.configurePlatformSettings = configurePlatformSettings;
|
|
3238
|
+
exports.councilRolesOf = councilRolesOf;
|
|
2179
3239
|
exports.createPaginationResult = createPaginationResult;
|
|
3240
|
+
exports.desktopGrants = desktopGrants;
|
|
3241
|
+
exports.desktopGrantsOf = desktopGrantsOf;
|
|
2180
3242
|
exports.domainErrorMessage = domainErrorMessage;
|
|
3243
|
+
exports.expandRights = expandRights;
|
|
2181
3244
|
exports.extensionDatabaseMigrations = extensionDatabaseMigrations;
|
|
2182
|
-
exports.extensionEntities = extensionEntities;
|
|
2183
3245
|
exports.generateHashFromString = generateHashFromString;
|
|
2184
3246
|
exports.generateRandomHash = generateRandomHash;
|
|
2185
3247
|
exports.generateUniqueHash = generateUniqueHash;
|
|
@@ -2187,21 +3249,29 @@ exports.getAmountPlusFee = getAmountPlusFee;
|
|
|
2187
3249
|
exports.getAppliedBlockNum = getAppliedBlockNum;
|
|
2188
3250
|
exports.hasServerSecret = hasServerSecret;
|
|
2189
3251
|
exports.isChainTextDigest = isChainTextDigest;
|
|
3252
|
+
exports.isChainTextOf = isChainTextOf;
|
|
2190
3253
|
exports.isExtensionAvailable = isExtensionAvailable;
|
|
3254
|
+
exports.memberRolesOf = memberRolesOf;
|
|
2191
3255
|
exports.mergeSecretConfig = mergeSecretConfig;
|
|
2192
3256
|
exports.paginationInputToOffset = paginationInputToOffset;
|
|
2193
3257
|
exports.parseChainAssert = parseChainAssert;
|
|
3258
|
+
exports.pickDefined = pickDefined;
|
|
2194
3259
|
exports.platformSettings = platformSettings;
|
|
2195
3260
|
exports.providerSuppliedPaths = providerSuppliedPaths;
|
|
2196
3261
|
exports.redactSecretConfig = redactSecretConfig;
|
|
2197
3262
|
exports.registerExtensionDatabaseMigrations = registerExtensionDatabaseMigrations;
|
|
2198
|
-
exports.registerExtensionEntities = registerExtensionEntities;
|
|
2199
3263
|
exports.resetExtensionDatabaseMigrations = resetExtensionDatabaseMigrations;
|
|
2200
|
-
exports.resetExtensionEntities = resetExtensionEntities;
|
|
2201
3264
|
exports.resolveChainText = resolveChainText;
|
|
2202
|
-
exports.resolveSortColumn = resolveSortColumn;
|
|
2203
3265
|
exports.rethrowChainError = rethrowChainError;
|
|
3266
|
+
exports.rightConditions = rightConditions;
|
|
3267
|
+
exports.rightGrants = rightGrants;
|
|
3268
|
+
exports.rightMatches = rightMatches;
|
|
3269
|
+
exports.rightsByRole = rightsByRole;
|
|
3270
|
+
exports.rightsHeld = rightsHeld;
|
|
2204
3271
|
exports.sanitizeUserText = sanitizeUserText;
|
|
3272
|
+
exports.scopeConditions = scopeConditions;
|
|
3273
|
+
exports.scopeOfRight = scopeOfRight;
|
|
3274
|
+
exports.scopesMatched = scopesMatched;
|
|
2205
3275
|
exports.validationMessage = validationMessage;
|
|
2206
3276
|
exports.verifySignedDocumentAgainstStoredDraft = verifySignedDocumentAgainstStoredDraft;
|
|
2207
3277
|
exports.waitForEvent = waitForEvent;
|