@questwork/q-utilities 0.1.29 → 0.1.32
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/BEST_PRACTICES.md +217 -0
- package/BUILDING_JS_TS_LIBRARY.md +321 -0
- package/dist/q-utilities.cjs +12 -0
- package/dist/q-utilities.cjs.map +1 -0
- package/dist/q-utilities.d.ts +1035 -0
- package/dist/q-utilities.esm.js +2796 -4067
- package/dist/q-utilities.esm.js.map +1 -0
- package/dist/q-utilities.iife.js +12 -0
- package/dist/q-utilities.iife.js.map +1 -0
- package/dist/q-utilities.umd.js +12 -0
- package/dist/q-utilities.umd.js.map +1 -0
- package/package.json +23 -24
- package/tests/runtime-test.js +563 -0
- package/tsconfig.json +28 -0
- package/vite.config.js +73 -0
- package/vitest.config.js +9 -0
- package/dist/index.min.cjs +0 -4410
- package/dist/q-utilities.min.js +0 -4441
|
@@ -0,0 +1,1035 @@
|
|
|
1
|
+
export declare class ActionRecord {
|
|
2
|
+
static get _classname(): string;
|
|
3
|
+
static get _superclass(): string;
|
|
4
|
+
static dummyData(): {
|
|
5
|
+
timestamp: number;
|
|
6
|
+
};
|
|
7
|
+
static init(options?: {}): any;
|
|
8
|
+
constructor(options: any);
|
|
9
|
+
_Actor: any;
|
|
10
|
+
_actor: any;
|
|
11
|
+
actorCode: any;
|
|
12
|
+
timestamp: any;
|
|
13
|
+
get _classname(): string;
|
|
14
|
+
get _superclass(): string;
|
|
15
|
+
get actor(): any;
|
|
16
|
+
get isValid(): boolean;
|
|
17
|
+
update(update: any): this;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export declare class ApiResponse {
|
|
21
|
+
static init(options?: {}): ApiResponse;
|
|
22
|
+
static get _classname(): string;
|
|
23
|
+
static get _superclass(): string;
|
|
24
|
+
constructor(options?: {});
|
|
25
|
+
_data: any;
|
|
26
|
+
err: any;
|
|
27
|
+
isNew: any;
|
|
28
|
+
message: any;
|
|
29
|
+
total: any;
|
|
30
|
+
_instanceBuilder: any;
|
|
31
|
+
get data(): any;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export declare function authorize({ allowCoordinator, allowOwner, query, required, user }: {
|
|
35
|
+
allowCoordinator: any;
|
|
36
|
+
allowOwner: any;
|
|
37
|
+
query?: {};
|
|
38
|
+
required: any;
|
|
39
|
+
user: any;
|
|
40
|
+
}): {};
|
|
41
|
+
|
|
42
|
+
export declare class AwsStsS3Client {
|
|
43
|
+
static dummyData(): {
|
|
44
|
+
getIdToken: () => string;
|
|
45
|
+
roleArn: string;
|
|
46
|
+
awsClientSts: {
|
|
47
|
+
STSClient: {
|
|
48
|
+
new (): {};
|
|
49
|
+
};
|
|
50
|
+
AssumeRoleWithWebIdentityCommand: {
|
|
51
|
+
new (): {};
|
|
52
|
+
};
|
|
53
|
+
};
|
|
54
|
+
awsClientS3: {
|
|
55
|
+
S3Client: {
|
|
56
|
+
new (): {};
|
|
57
|
+
};
|
|
58
|
+
PutObjectCommand: {
|
|
59
|
+
new (): {};
|
|
60
|
+
};
|
|
61
|
+
GetObjectCommand: {
|
|
62
|
+
new (): {};
|
|
63
|
+
};
|
|
64
|
+
DeleteObjectCommand: {
|
|
65
|
+
new (): {};
|
|
66
|
+
};
|
|
67
|
+
};
|
|
68
|
+
};
|
|
69
|
+
static init(options?: {}): AwsStsS3Client;
|
|
70
|
+
constructor(options: any);
|
|
71
|
+
expiration: any;
|
|
72
|
+
s3Client: any;
|
|
73
|
+
getIdToken: any;
|
|
74
|
+
region: any;
|
|
75
|
+
roleArn: any;
|
|
76
|
+
roleSessionName: any;
|
|
77
|
+
durationSession: any;
|
|
78
|
+
awsClientSts: any;
|
|
79
|
+
awsClientS3: any;
|
|
80
|
+
get isExpired(): boolean;
|
|
81
|
+
get isValid(): boolean;
|
|
82
|
+
refreshCredentials(): Promise<this>;
|
|
83
|
+
getS3Client(): Promise<any>;
|
|
84
|
+
putObject(params: any): Promise<{
|
|
85
|
+
url: string;
|
|
86
|
+
filename: any;
|
|
87
|
+
folder: any;
|
|
88
|
+
subFolders: any;
|
|
89
|
+
}>;
|
|
90
|
+
getObject(params: any): Promise<{
|
|
91
|
+
body: any;
|
|
92
|
+
contentType: any;
|
|
93
|
+
lastModified: any;
|
|
94
|
+
contentLength: any;
|
|
95
|
+
}>;
|
|
96
|
+
deleteObject(params: any): Promise<boolean>;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
export declare function calculateAge(timestamp: any, reference: any): number;
|
|
100
|
+
|
|
101
|
+
export declare function changeCreatorOwner(that: any, { source, target }: {
|
|
102
|
+
source: any;
|
|
103
|
+
target: any;
|
|
104
|
+
}): any;
|
|
105
|
+
|
|
106
|
+
export declare function concatStringByArray(arrTemplate: any, data: any): any;
|
|
107
|
+
|
|
108
|
+
export declare class ConsoleLog extends QLog {
|
|
109
|
+
format: any;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
export declare function convertString(string: any, patternMatch: RegExp, value: any, getValueByKeys: any): any;
|
|
113
|
+
|
|
114
|
+
export declare function convertTimestampToString(timestamp: any, dateFormat: any): any;
|
|
115
|
+
|
|
116
|
+
/**
|
|
117
|
+
* Unified Middleware Handler (Express & Koa Compatible)
|
|
118
|
+
*/
|
|
119
|
+
declare function customHandler({ responseHelper, handler, ignoreError }: {
|
|
120
|
+
responseHelper: any;
|
|
121
|
+
handler: any;
|
|
122
|
+
ignoreError?: boolean;
|
|
123
|
+
}): (reqOrCtx: any, resOrNext: any, nextInExpress: any) => Promise<any>;
|
|
124
|
+
|
|
125
|
+
declare const _default: {
|
|
126
|
+
ApiResponse: typeof models.ApiResponse;
|
|
127
|
+
makeApiResponse: typeof models.makeApiResponse;
|
|
128
|
+
AwsStsS3Client: typeof models.AwsStsS3Client;
|
|
129
|
+
KeyValueObject: typeof models.KeyValueObject;
|
|
130
|
+
Metadata: typeof models.Metadata;
|
|
131
|
+
PushEnvelope: typeof models.PushEnvelope;
|
|
132
|
+
ConsoleLog: typeof models.ConsoleLog;
|
|
133
|
+
getQLogEnv: typeof models.getQLogEnv;
|
|
134
|
+
LogRecord: typeof models.LogRecord;
|
|
135
|
+
QLog: typeof models.QLog;
|
|
136
|
+
QLogEnv: {
|
|
137
|
+
debug: {
|
|
138
|
+
name: string;
|
|
139
|
+
};
|
|
140
|
+
production: {
|
|
141
|
+
name: string;
|
|
142
|
+
};
|
|
143
|
+
};
|
|
144
|
+
QLogLevel: {
|
|
145
|
+
trace: {
|
|
146
|
+
weight: number;
|
|
147
|
+
name: string;
|
|
148
|
+
};
|
|
149
|
+
debug: {
|
|
150
|
+
weight: number;
|
|
151
|
+
name: string;
|
|
152
|
+
};
|
|
153
|
+
info: {
|
|
154
|
+
weight: number;
|
|
155
|
+
name: string;
|
|
156
|
+
};
|
|
157
|
+
warn: {
|
|
158
|
+
weight: number;
|
|
159
|
+
name: string;
|
|
160
|
+
};
|
|
161
|
+
error: {
|
|
162
|
+
weight: number;
|
|
163
|
+
name: string;
|
|
164
|
+
};
|
|
165
|
+
critical: {
|
|
166
|
+
weight: number;
|
|
167
|
+
name: string;
|
|
168
|
+
};
|
|
169
|
+
alert: {
|
|
170
|
+
weight: number;
|
|
171
|
+
name: string;
|
|
172
|
+
};
|
|
173
|
+
emergency: {
|
|
174
|
+
weight: number;
|
|
175
|
+
name: string;
|
|
176
|
+
};
|
|
177
|
+
};
|
|
178
|
+
QMeta: typeof models.QMeta;
|
|
179
|
+
Repo: typeof models.Repo;
|
|
180
|
+
makeService: typeof models.makeService;
|
|
181
|
+
Service: typeof models.Service;
|
|
182
|
+
ActionRecord: typeof models.ActionRecord;
|
|
183
|
+
Status: typeof models.Status;
|
|
184
|
+
StatusDocument: typeof models.StatusDocument;
|
|
185
|
+
TemplateCompiler: typeof models.TemplateCompiler;
|
|
186
|
+
TenantAwareEntity: typeof models.TenantAwareEntity;
|
|
187
|
+
TrackedEntity: typeof models.TrackedEntity;
|
|
188
|
+
UniqueKeyGenerator: typeof models.UniqueKeyGenerator;
|
|
189
|
+
WebAppRequest: typeof models.WebAppRequest;
|
|
190
|
+
ErrorDetail: typeof models.ErrorDetail;
|
|
191
|
+
ERROR_CODES: {
|
|
192
|
+
readonly EXCUTE_EVENT_ERROR: "EXCUTE_EVENT_ERROR";
|
|
193
|
+
readonly NOT_FOUND: "NOT_FOUND";
|
|
194
|
+
readonly SERVER_ERROR: "SERVER_ERROR";
|
|
195
|
+
readonly TIMEOUT: "TIMEOUT";
|
|
196
|
+
readonly UNAUTHORIZED: "UNAUTHORIZED";
|
|
197
|
+
readonly VALIDATION_ERROR: "VALIDATION_ERROR";
|
|
198
|
+
};
|
|
199
|
+
WebAppResponse: typeof models.WebAppResponse;
|
|
200
|
+
authorize({ allowCoordinator, allowOwner, query, required, user }: {
|
|
201
|
+
allowCoordinator: any;
|
|
202
|
+
allowOwner: any;
|
|
203
|
+
query?: {};
|
|
204
|
+
required: any;
|
|
205
|
+
user: any;
|
|
206
|
+
}): {};
|
|
207
|
+
calculateAge(timestamp: any, reference: any): number;
|
|
208
|
+
changeCreatorOwner(that: any, { source, target }: {
|
|
209
|
+
source: any;
|
|
210
|
+
target: any;
|
|
211
|
+
}): any;
|
|
212
|
+
concatStringByArray: typeof helpers.concatStringByArray;
|
|
213
|
+
convertString: typeof helpers.convertString;
|
|
214
|
+
convertTimestampToString(timestamp: any, dateFormat: any): any;
|
|
215
|
+
detectControlCharacters(input: string, options?: {
|
|
216
|
+
preserveBasicWhitespace?: boolean;
|
|
217
|
+
}): any;
|
|
218
|
+
printControlCharReport(report: any): void;
|
|
219
|
+
displayName(user: any, options: any): any;
|
|
220
|
+
downloadFileByUrl: typeof helpers.downloadFileByUrl;
|
|
221
|
+
escapeRegex(string: any): string;
|
|
222
|
+
expressHelper: {
|
|
223
|
+
customHandler: customHandler;
|
|
224
|
+
findAllResult: findAllResult;
|
|
225
|
+
findOneResult: findOneResult;
|
|
226
|
+
hideSensitiveFields: hideSensitiveFields;
|
|
227
|
+
postResult: postResult;
|
|
228
|
+
updateOneResult: updateOneResult;
|
|
229
|
+
};
|
|
230
|
+
extractEmails(dirtyArray: any[]): any[];
|
|
231
|
+
formatDate: typeof helpers.formatDate;
|
|
232
|
+
generalPost: typeof helpers.generalPost;
|
|
233
|
+
getObjectByArr: typeof helpers.getObjectByArr;
|
|
234
|
+
getValidation: typeof helpers.getValidation;
|
|
235
|
+
getValueByKeys: typeof helpers.getValueByKeys;
|
|
236
|
+
groupArrayByKey(arr: any, key: any): any;
|
|
237
|
+
init(_class: any, options: any): any;
|
|
238
|
+
initFromArray(_class: any, arr: any): any[];
|
|
239
|
+
initOnlyValidFromArray(_class: any, arr: any): any[];
|
|
240
|
+
isConvertibleToNumber(value: any): boolean;
|
|
241
|
+
mergeArraysByKey(arr1: any, arr2: any): {
|
|
242
|
+
key: any;
|
|
243
|
+
value: any;
|
|
244
|
+
}[];
|
|
245
|
+
objectHelper: {
|
|
246
|
+
expandDotNotation: (obj: any) => {};
|
|
247
|
+
get: (obj: any, path: any) => any;
|
|
248
|
+
getNestedValue: (obj: any, path: any) => any;
|
|
249
|
+
isPlainObject: (value: any) => boolean;
|
|
250
|
+
merge: (target: any, ...sources: any[]) => any;
|
|
251
|
+
set: (obj: any, path: any, value: any) => void;
|
|
252
|
+
};
|
|
253
|
+
padZeros: typeof helpers.padZeros;
|
|
254
|
+
pMap(iterable: any, mapper: any, { concurrency, stopOnError, signal, }?: {
|
|
255
|
+
concurrency?: number;
|
|
256
|
+
stopOnError?: boolean;
|
|
257
|
+
}): Promise<any>;
|
|
258
|
+
pMapIterable(iterable: any, mapper: any, { concurrency, backpressure, }?: {
|
|
259
|
+
concurrency?: number;
|
|
260
|
+
backpressure?: any;
|
|
261
|
+
}): {
|
|
262
|
+
[Symbol.asyncIterator](): AsyncGenerator<any, void, unknown>;
|
|
263
|
+
};
|
|
264
|
+
pMapSkip: typeof helpers.pMapSkip;
|
|
265
|
+
pReduce: typeof helpers.pReduce;
|
|
266
|
+
renderByTemplate: typeof helpers.renderByTemplate;
|
|
267
|
+
replacePlaceholders({ content, mapping }: {
|
|
268
|
+
content: any;
|
|
269
|
+
mapping: any;
|
|
270
|
+
}): any;
|
|
271
|
+
sanitizeText(input: string, options?: {
|
|
272
|
+
normalizeWhitespace?: boolean;
|
|
273
|
+
removeNewlines?: boolean;
|
|
274
|
+
trim?: boolean;
|
|
275
|
+
debug?: boolean;
|
|
276
|
+
}): string;
|
|
277
|
+
setId(id: any): any;
|
|
278
|
+
shuffleArray(array: any): any[];
|
|
279
|
+
stringFormatter: typeof helpers.stringFormatter;
|
|
280
|
+
stringHelper: {
|
|
281
|
+
getCssClass: (str: any) => any;
|
|
282
|
+
isSame: (str1: any, str2: any) => boolean;
|
|
283
|
+
punctuationless: (str: any) => any;
|
|
284
|
+
safeToUpperCase: (input: any) => any;
|
|
285
|
+
setCode: (param: any) => any;
|
|
286
|
+
toCamelCase: (str: any) => any;
|
|
287
|
+
toLowerCase: (str: any) => any;
|
|
288
|
+
toScreamingSnakeCase: (str: any) => any;
|
|
289
|
+
};
|
|
290
|
+
tenantPlugin(schema: any, options: any): void;
|
|
291
|
+
trackingPlugin(schema: any, options: any): void;
|
|
292
|
+
};
|
|
293
|
+
export default _default;
|
|
294
|
+
|
|
295
|
+
/**
|
|
296
|
+
* Detects and reports hidden/control characters in a string without modifying it.
|
|
297
|
+
* @param {string} input - The string to analyze.
|
|
298
|
+
* @param {Object} [options] - Configuration options.
|
|
299
|
+
* @param {boolean} [options.preserveBasicWhitespace=true] - Whether to consider basic whitespace as valid.
|
|
300
|
+
* @returns {Object} Report object with detection results.
|
|
301
|
+
*/
|
|
302
|
+
export declare function detectControlCharacters(input: string, options?: {
|
|
303
|
+
preserveBasicWhitespace?: boolean;
|
|
304
|
+
}): any;
|
|
305
|
+
|
|
306
|
+
export declare function displayName(user: any, options: any): any;
|
|
307
|
+
|
|
308
|
+
export declare function downloadFileByUrl({ dataUrl, filename }?: {
|
|
309
|
+
dataUrl?: string;
|
|
310
|
+
filename?: string;
|
|
311
|
+
}): void;
|
|
312
|
+
|
|
313
|
+
export declare const ERROR_CODES: {
|
|
314
|
+
readonly EXCUTE_EVENT_ERROR: "EXCUTE_EVENT_ERROR";
|
|
315
|
+
readonly NOT_FOUND: "NOT_FOUND";
|
|
316
|
+
readonly SERVER_ERROR: "SERVER_ERROR";
|
|
317
|
+
readonly TIMEOUT: "TIMEOUT";
|
|
318
|
+
readonly UNAUTHORIZED: "UNAUTHORIZED";
|
|
319
|
+
readonly VALIDATION_ERROR: "VALIDATION_ERROR";
|
|
320
|
+
};
|
|
321
|
+
|
|
322
|
+
export declare type ErrorCode = typeof ERROR_CODES[KnownErrorCode];
|
|
323
|
+
|
|
324
|
+
export declare class ErrorDetail {
|
|
325
|
+
[key: string]: any;
|
|
326
|
+
code: ErrorCode | null;
|
|
327
|
+
message: string;
|
|
328
|
+
timestamp: number | null;
|
|
329
|
+
constructor(options?: ErrorDetailOptions);
|
|
330
|
+
static init(options: any): ErrorDetail | null;
|
|
331
|
+
get isValid(): boolean;
|
|
332
|
+
}
|
|
333
|
+
|
|
334
|
+
export declare interface ErrorDetailOptions {
|
|
335
|
+
code?: ErrorCode;
|
|
336
|
+
message?: string;
|
|
337
|
+
timestamp?: number | null;
|
|
338
|
+
}
|
|
339
|
+
|
|
340
|
+
export declare function escapeRegex(string: any): string;
|
|
341
|
+
|
|
342
|
+
export declare namespace expressHelper {
|
|
343
|
+
export { customHandler };
|
|
344
|
+
export { findAllResult };
|
|
345
|
+
export { findOneResult };
|
|
346
|
+
export { hideSensitiveFields };
|
|
347
|
+
export { postResult };
|
|
348
|
+
export { updateOneResult };
|
|
349
|
+
}
|
|
350
|
+
|
|
351
|
+
/**
|
|
352
|
+
* Extracts and normalizes unique email addresses from an array containing messy entries
|
|
353
|
+
* @param {Array} dirtyArray - Array that may contain emails in various formats (may include null/empty entries)
|
|
354
|
+
* @returns {Array} Sorted array of unique, lowercase email addresses
|
|
355
|
+
*/
|
|
356
|
+
export declare function extractEmails(dirtyArray: any[]): any[];
|
|
357
|
+
|
|
358
|
+
declare function findAllResult({ responseHelper, service }: {
|
|
359
|
+
responseHelper: any;
|
|
360
|
+
service: any;
|
|
361
|
+
}): (req: any, res: any, next: any) => Promise<void>;
|
|
362
|
+
|
|
363
|
+
declare function findOneResult({ responseHelper, service }: {
|
|
364
|
+
responseHelper: any;
|
|
365
|
+
service: any;
|
|
366
|
+
}): (req: any, res: any, next: any) => Promise<void>;
|
|
367
|
+
|
|
368
|
+
export declare function formatDate(date: any, format: any): any;
|
|
369
|
+
|
|
370
|
+
export declare function generalPost({ body, GeneralModel, UniqueKeyGenerator, resourceInfo }: {
|
|
371
|
+
body?: {};
|
|
372
|
+
GeneralModel: any;
|
|
373
|
+
UniqueKeyGenerator: any;
|
|
374
|
+
resourceInfo: any;
|
|
375
|
+
}): Promise<any>;
|
|
376
|
+
|
|
377
|
+
declare function _getDataByKey(key: any, data: any): any;
|
|
378
|
+
|
|
379
|
+
export declare function getObjectByArr(arr: any, data: any, getValueByKeys: any, getValidation: any, KeyValueObject: any): any;
|
|
380
|
+
|
|
381
|
+
export declare function getQLogEnv(name: any): any;
|
|
382
|
+
|
|
383
|
+
export declare function getValidation(rule: any, data: any, getDataByKey?: typeof _getDataByKey, KeyValueObject?: typeof KeyValueObject): any;
|
|
384
|
+
|
|
385
|
+
export declare function getValueByKeys(keys: any, data: any): any;
|
|
386
|
+
|
|
387
|
+
export declare function groupArrayByKey(arr: any, key: any): any;
|
|
388
|
+
|
|
389
|
+
declare namespace helpers {
|
|
390
|
+
export {
|
|
391
|
+
authorize,
|
|
392
|
+
calculateAge,
|
|
393
|
+
changeCreatorOwner,
|
|
394
|
+
concatStringByArray,
|
|
395
|
+
convertString,
|
|
396
|
+
convertTimestampToString,
|
|
397
|
+
detectControlCharacters,
|
|
398
|
+
printControlCharReport,
|
|
399
|
+
displayName,
|
|
400
|
+
downloadFileByUrl,
|
|
401
|
+
escapeRegex,
|
|
402
|
+
expressHelper,
|
|
403
|
+
extractEmails,
|
|
404
|
+
formatDate,
|
|
405
|
+
generalPost,
|
|
406
|
+
getObjectByArr,
|
|
407
|
+
getValidation,
|
|
408
|
+
getValueByKeys,
|
|
409
|
+
groupArrayByKey,
|
|
410
|
+
init,
|
|
411
|
+
initFromArray,
|
|
412
|
+
initOnlyValidFromArray,
|
|
413
|
+
isConvertibleToNumber,
|
|
414
|
+
mergeArraysByKey,
|
|
415
|
+
objectHelper,
|
|
416
|
+
padZeros,
|
|
417
|
+
pMap,
|
|
418
|
+
pMapIterable,
|
|
419
|
+
pMapSkip,
|
|
420
|
+
pReduce,
|
|
421
|
+
renderByTemplate,
|
|
422
|
+
replacePlaceholders,
|
|
423
|
+
sanitizeText,
|
|
424
|
+
setId,
|
|
425
|
+
shuffleArray,
|
|
426
|
+
stringFormatter,
|
|
427
|
+
stringHelper,
|
|
428
|
+
tenantPlugin,
|
|
429
|
+
trackingPlugin
|
|
430
|
+
}
|
|
431
|
+
}
|
|
432
|
+
|
|
433
|
+
declare function hideSensitiveFields(aggregation: any, { query }?: {
|
|
434
|
+
query?: {};
|
|
435
|
+
}): void;
|
|
436
|
+
|
|
437
|
+
export declare function init(_class: any, options: any): any;
|
|
438
|
+
|
|
439
|
+
export declare function initFromArray(_class: any, arr: any): any[];
|
|
440
|
+
|
|
441
|
+
export declare function initOnlyValidFromArray(_class: any, arr: any): any[];
|
|
442
|
+
|
|
443
|
+
export declare function isConvertibleToNumber(value: any): boolean;
|
|
444
|
+
|
|
445
|
+
export declare class KeyValueObject {
|
|
446
|
+
static init(options?: {}): KeyValueObject;
|
|
447
|
+
static initFromArray(arr?: any[]): KeyValueObject[];
|
|
448
|
+
static initOnlyValidFromArray(arr?: any[]): KeyValueObject[];
|
|
449
|
+
static get _classname(): string;
|
|
450
|
+
static get _superclass(): string;
|
|
451
|
+
static addItem(arr: any, key: any, value: any): void;
|
|
452
|
+
static addRecord(arr: any[], key: any, value: any): any[];
|
|
453
|
+
static appendRecord(arr: any[], key: any, value: any): any[];
|
|
454
|
+
static appendValueArray(arr: any[], key: any, value: any): any[];
|
|
455
|
+
static foundByKey(arr: any[], key: any): any;
|
|
456
|
+
static foundValueByKey(arr: any[], key: any): any;
|
|
457
|
+
static fromObject(options?: {}): any[];
|
|
458
|
+
static getValueByKey(arr: any[], key: any): any;
|
|
459
|
+
static getMetadataValueByKeyAsArray(arr: any[], key: any): any;
|
|
460
|
+
static getValueByKeyFromArray(arr: any[], key: any): any;
|
|
461
|
+
static getValuesByKey(arr: any[], key: any): any;
|
|
462
|
+
static hasKeyValue(arr: any[], key: any, value: any): boolean;
|
|
463
|
+
static insertOrUpdateRecord(arr: any[], key: any, value: any): any[];
|
|
464
|
+
static keys(arr?: any[]): any;
|
|
465
|
+
static mapToKeyValue(arr?: any[], keyPath?: string, valuePath?: string): any;
|
|
466
|
+
static merge(toArr: any, fromArr: any): any;
|
|
467
|
+
static removeByKey(arr: any, key: any): any;
|
|
468
|
+
static removeByKeys(arr: any, keys: any): any;
|
|
469
|
+
static sameKey(item: any, key: any): boolean;
|
|
470
|
+
static toObject(arr?: any[]): any;
|
|
471
|
+
static toString(arr?: any[], delimiter?: string): any;
|
|
472
|
+
static updateRecord(arr: any[], key: any, value: any): any[];
|
|
473
|
+
static updateOrInsertRecord(arr: any[], key: any, value: any): any[];
|
|
474
|
+
static updateRecordsFromArray(arr?: any[], updateArr?: any[]): any[];
|
|
475
|
+
static values(arr?: any[]): any;
|
|
476
|
+
constructor(options?: {});
|
|
477
|
+
key: any;
|
|
478
|
+
value: any;
|
|
479
|
+
get isValid(): boolean;
|
|
480
|
+
get toObject(): {};
|
|
481
|
+
}
|
|
482
|
+
|
|
483
|
+
declare type KnownErrorCode = keyof typeof ERROR_CODES;
|
|
484
|
+
|
|
485
|
+
export declare class LogRecord {
|
|
486
|
+
constructor(options?: {});
|
|
487
|
+
data: any;
|
|
488
|
+
level: any;
|
|
489
|
+
timestamp: any;
|
|
490
|
+
stackTrace: any;
|
|
491
|
+
name: any;
|
|
492
|
+
zone: any;
|
|
493
|
+
toString(): string;
|
|
494
|
+
logName(): string;
|
|
495
|
+
serialize(): any;
|
|
496
|
+
}
|
|
497
|
+
|
|
498
|
+
export declare function makeApiResponse({ repo, result }: {
|
|
499
|
+
repo: any;
|
|
500
|
+
result: any;
|
|
501
|
+
}): ApiResponse;
|
|
502
|
+
|
|
503
|
+
export declare function makeService({ repo }: {
|
|
504
|
+
repo: any;
|
|
505
|
+
}): Service;
|
|
506
|
+
|
|
507
|
+
export declare function mergeArraysByKey(arr1: any, arr2: any): {
|
|
508
|
+
key: any;
|
|
509
|
+
value: any;
|
|
510
|
+
}[];
|
|
511
|
+
|
|
512
|
+
export declare class Metadata extends KeyValueObject {
|
|
513
|
+
}
|
|
514
|
+
|
|
515
|
+
declare namespace models {
|
|
516
|
+
export {
|
|
517
|
+
ApiResponse,
|
|
518
|
+
makeApiResponse,
|
|
519
|
+
AwsStsS3Client,
|
|
520
|
+
KeyValueObject,
|
|
521
|
+
Metadata,
|
|
522
|
+
PushEnvelope,
|
|
523
|
+
ConsoleLog,
|
|
524
|
+
getQLogEnv,
|
|
525
|
+
LogRecord,
|
|
526
|
+
QLog,
|
|
527
|
+
QLogEnv,
|
|
528
|
+
QLogLevel,
|
|
529
|
+
QMeta,
|
|
530
|
+
Repo,
|
|
531
|
+
makeService,
|
|
532
|
+
Service,
|
|
533
|
+
ActionRecord,
|
|
534
|
+
Status,
|
|
535
|
+
StatusDocument,
|
|
536
|
+
TemplateCompiler,
|
|
537
|
+
TenantAwareEntity,
|
|
538
|
+
TrackedEntity,
|
|
539
|
+
UniqueKeyGenerator,
|
|
540
|
+
WebAppRequest,
|
|
541
|
+
ErrorDetail,
|
|
542
|
+
ERROR_CODES,
|
|
543
|
+
WebAppResponse,
|
|
544
|
+
ErrorDetailOptions,
|
|
545
|
+
ErrorCode
|
|
546
|
+
}
|
|
547
|
+
}
|
|
548
|
+
|
|
549
|
+
export declare namespace objectHelper {
|
|
550
|
+
export { expandDotNotation };
|
|
551
|
+
export { get };
|
|
552
|
+
export { getNestedValue };
|
|
553
|
+
export { isPlainObject };
|
|
554
|
+
export { merge };
|
|
555
|
+
export { set };
|
|
556
|
+
}
|
|
557
|
+
|
|
558
|
+
export declare function padZeros(num: any, minLength?: number): any;
|
|
559
|
+
|
|
560
|
+
export declare function pMap(iterable: any, mapper: any, { concurrency, stopOnError, signal, }?: {
|
|
561
|
+
concurrency?: number;
|
|
562
|
+
stopOnError?: boolean;
|
|
563
|
+
}): Promise<any>;
|
|
564
|
+
|
|
565
|
+
export declare function pMapIterable(iterable: any, mapper: any, { concurrency, backpressure, }?: {
|
|
566
|
+
concurrency?: number;
|
|
567
|
+
backpressure?: any;
|
|
568
|
+
}): {
|
|
569
|
+
[Symbol.asyncIterator](): AsyncGenerator<any, void, unknown>;
|
|
570
|
+
};
|
|
571
|
+
|
|
572
|
+
export declare const pMapSkip: unique symbol;
|
|
573
|
+
|
|
574
|
+
declare function postResult({ responseHelper, service }: {
|
|
575
|
+
responseHelper: any;
|
|
576
|
+
service: any;
|
|
577
|
+
}): (req: any, res: any, next: any) => Promise<void>;
|
|
578
|
+
|
|
579
|
+
export declare function pReduce(iterable: any, reducer: any, initialValue: any): Promise<any>;
|
|
580
|
+
|
|
581
|
+
/**
|
|
582
|
+
* Pretty print the detection results to console
|
|
583
|
+
*/
|
|
584
|
+
export declare function printControlCharReport(report: any): void;
|
|
585
|
+
|
|
586
|
+
export declare class PushEnvelope extends TrackedEntity {
|
|
587
|
+
constructor(options: any);
|
|
588
|
+
body: any;
|
|
589
|
+
data: any;
|
|
590
|
+
dirty: any;
|
|
591
|
+
metadata: KeyValueObject[];
|
|
592
|
+
remarks: KeyValueObject[];
|
|
593
|
+
threadID: any;
|
|
594
|
+
title: any;
|
|
595
|
+
get _classname(): string;
|
|
596
|
+
get _superclass(): string;
|
|
597
|
+
get isValid(): any;
|
|
598
|
+
}
|
|
599
|
+
|
|
600
|
+
export declare class QLog {
|
|
601
|
+
static getInstance(options: any): any;
|
|
602
|
+
constructor(options?: {});
|
|
603
|
+
_level: any;
|
|
604
|
+
_handlers: Map<any, any>;
|
|
605
|
+
setLevel(level: any): this;
|
|
606
|
+
addHandler(handler: any): this;
|
|
607
|
+
removeHandler(handlerClass: any): this;
|
|
608
|
+
receive({ record }: {
|
|
609
|
+
record: any;
|
|
610
|
+
}): void;
|
|
611
|
+
logBody(record: any): void;
|
|
612
|
+
trace(options: any, object: any): void;
|
|
613
|
+
debug(options: any, object: any): void;
|
|
614
|
+
info(options: any, object: any): void;
|
|
615
|
+
warn(options: any, object: any): void;
|
|
616
|
+
error(options: any, object: any): void;
|
|
617
|
+
critical(options: any, object: any): void;
|
|
618
|
+
_log({ level, object, options }: {
|
|
619
|
+
level: any;
|
|
620
|
+
object: any;
|
|
621
|
+
options: any;
|
|
622
|
+
}): void;
|
|
623
|
+
}
|
|
624
|
+
|
|
625
|
+
export declare namespace QLogEnv {
|
|
626
|
+
export namespace debug {
|
|
627
|
+
let name: string;
|
|
628
|
+
}
|
|
629
|
+
export namespace production {
|
|
630
|
+
let name_1: string;
|
|
631
|
+
export { name_1 as name };
|
|
632
|
+
}
|
|
633
|
+
}
|
|
634
|
+
|
|
635
|
+
export declare namespace QLogLevel {
|
|
636
|
+
export namespace trace {
|
|
637
|
+
let weight: number;
|
|
638
|
+
let name: string;
|
|
639
|
+
}
|
|
640
|
+
export namespace debug {
|
|
641
|
+
let weight_1: number;
|
|
642
|
+
export { weight_1 as weight };
|
|
643
|
+
let name_1: string;
|
|
644
|
+
export { name_1 as name };
|
|
645
|
+
}
|
|
646
|
+
export namespace info {
|
|
647
|
+
let weight_2: number;
|
|
648
|
+
export { weight_2 as weight };
|
|
649
|
+
let name_2: string;
|
|
650
|
+
export { name_2 as name };
|
|
651
|
+
}
|
|
652
|
+
export namespace warn {
|
|
653
|
+
let weight_3: number;
|
|
654
|
+
export { weight_3 as weight };
|
|
655
|
+
let name_3: string;
|
|
656
|
+
export { name_3 as name };
|
|
657
|
+
}
|
|
658
|
+
export namespace error {
|
|
659
|
+
let weight_4: number;
|
|
660
|
+
export { weight_4 as weight };
|
|
661
|
+
let name_4: string;
|
|
662
|
+
export { name_4 as name };
|
|
663
|
+
}
|
|
664
|
+
export namespace critical {
|
|
665
|
+
let weight_5: number;
|
|
666
|
+
export { weight_5 as weight };
|
|
667
|
+
let name_5: string;
|
|
668
|
+
export { name_5 as name };
|
|
669
|
+
}
|
|
670
|
+
export namespace alert {
|
|
671
|
+
let weight_6: number;
|
|
672
|
+
export { weight_6 as weight };
|
|
673
|
+
let name_6: string;
|
|
674
|
+
export { name_6 as name };
|
|
675
|
+
}
|
|
676
|
+
export namespace emergency {
|
|
677
|
+
let weight_7: number;
|
|
678
|
+
export { weight_7 as weight };
|
|
679
|
+
let name_7: string;
|
|
680
|
+
export { name_7 as name };
|
|
681
|
+
}
|
|
682
|
+
}
|
|
683
|
+
|
|
684
|
+
export declare class QMeta {
|
|
685
|
+
static get _classname(): string;
|
|
686
|
+
static get _superclass(): string;
|
|
687
|
+
static init(options?: {}): QMeta;
|
|
688
|
+
constructor(options?: {});
|
|
689
|
+
attributes: KeyValueObject[];
|
|
690
|
+
ref: any;
|
|
691
|
+
addAttribute(obj: any): this;
|
|
692
|
+
update(obj: any): this;
|
|
693
|
+
}
|
|
694
|
+
|
|
695
|
+
export declare function renderByTemplate({ engine, template, value }?: {}): any;
|
|
696
|
+
|
|
697
|
+
export declare function replacePlaceholders({ content, mapping }: {
|
|
698
|
+
content: any;
|
|
699
|
+
mapping: any;
|
|
700
|
+
}): any;
|
|
701
|
+
|
|
702
|
+
export declare class Repo {
|
|
703
|
+
static init(options?: {}): any;
|
|
704
|
+
static get _classname(): string;
|
|
705
|
+
static get _superclass(): string;
|
|
706
|
+
constructor(options: any);
|
|
707
|
+
model: any;
|
|
708
|
+
_sharedOptions: any;
|
|
709
|
+
_queryOptions: any;
|
|
710
|
+
_saveOptions: any;
|
|
711
|
+
_Class: any;
|
|
712
|
+
get _classname(): string;
|
|
713
|
+
get _superclass(): string;
|
|
714
|
+
get isValid(): boolean;
|
|
715
|
+
get queryOptions(): any;
|
|
716
|
+
get saveOptions(): any;
|
|
717
|
+
init(options: any): any;
|
|
718
|
+
deleteOne({ id }: {
|
|
719
|
+
id: any;
|
|
720
|
+
}): Promise<any>;
|
|
721
|
+
findAll({ config, query, systemLog }: {
|
|
722
|
+
config?: {};
|
|
723
|
+
query: any;
|
|
724
|
+
systemLog: any;
|
|
725
|
+
}): Promise<any>;
|
|
726
|
+
findOne({ config, query, systemLog }: {
|
|
727
|
+
config?: {};
|
|
728
|
+
query: any;
|
|
729
|
+
systemLog: any;
|
|
730
|
+
}): Promise<any>;
|
|
731
|
+
saveAll({ config, docs, systemLog }: {
|
|
732
|
+
config?: {};
|
|
733
|
+
docs: any;
|
|
734
|
+
systemLog: any;
|
|
735
|
+
}): any;
|
|
736
|
+
saveOne({ config, doc, systemLog }: {
|
|
737
|
+
config?: {};
|
|
738
|
+
doc: any;
|
|
739
|
+
systemLog: any;
|
|
740
|
+
}): Promise<any>;
|
|
741
|
+
}
|
|
742
|
+
|
|
743
|
+
/**
|
|
744
|
+
* Sanitizes input by removing hidden/control characters with customizable whitespace handling.
|
|
745
|
+
* @param {string} input - The string to sanitize.
|
|
746
|
+
* @param {object} [options] - Configuration options.
|
|
747
|
+
* @param {boolean} [options.normalizeWhitespace] - Collapse multiple spaces/tabs into one space.
|
|
748
|
+
* @param {boolean} [options.removeNewlines] - If true, replaces newlines with spaces.
|
|
749
|
+
* @param {boolean} [options.trim] - If true, trims leading/trailing whitespace.
|
|
750
|
+
* @param {boolean} [options.debug] - If true, logs debug information about removed characters.
|
|
751
|
+
* @returns {string} The sanitized string.
|
|
752
|
+
*/
|
|
753
|
+
export declare function sanitizeText(input: string, options?: {
|
|
754
|
+
normalizeWhitespace?: boolean;
|
|
755
|
+
removeNewlines?: boolean;
|
|
756
|
+
trim?: boolean;
|
|
757
|
+
debug?: boolean;
|
|
758
|
+
}): string;
|
|
759
|
+
|
|
760
|
+
export declare class Service {
|
|
761
|
+
static get _classname(): string;
|
|
762
|
+
static get _superclass(): string;
|
|
763
|
+
constructor({ repo }: {
|
|
764
|
+
repo: any;
|
|
765
|
+
});
|
|
766
|
+
repo: any;
|
|
767
|
+
deleteOne({ id }: {
|
|
768
|
+
id: any;
|
|
769
|
+
}): Promise<ApiResponse>;
|
|
770
|
+
findAll({ config, query, systemLog }?: {
|
|
771
|
+
config?: {};
|
|
772
|
+
query?: {};
|
|
773
|
+
}): Promise<ApiResponse>;
|
|
774
|
+
findOne({ config, query, systemLog }?: {
|
|
775
|
+
config?: {};
|
|
776
|
+
query?: {};
|
|
777
|
+
}): Promise<ApiResponse>;
|
|
778
|
+
init(options: any): any;
|
|
779
|
+
initFromArray(arr?: any[]): any[];
|
|
780
|
+
initOnlyValidFromArray(arr?: any[]): any[];
|
|
781
|
+
saveAll({ config, docs, systemLog }?: {
|
|
782
|
+
config?: {};
|
|
783
|
+
docs?: any[];
|
|
784
|
+
}): Promise<ApiResponse>;
|
|
785
|
+
saveOne({ config, doc, systemLog }?: {
|
|
786
|
+
config?: {};
|
|
787
|
+
doc?: {};
|
|
788
|
+
}): Promise<ApiResponse | {
|
|
789
|
+
isNew: any;
|
|
790
|
+
data: any[];
|
|
791
|
+
err: Error;
|
|
792
|
+
}>;
|
|
793
|
+
}
|
|
794
|
+
|
|
795
|
+
export declare function setId(id: any): any;
|
|
796
|
+
|
|
797
|
+
export declare function shuffleArray(array: any): any[];
|
|
798
|
+
|
|
799
|
+
export declare class Status {
|
|
800
|
+
static get _classname(): string;
|
|
801
|
+
static get _superclass(): string;
|
|
802
|
+
static dummyData(): {};
|
|
803
|
+
static init(options?: {}): any;
|
|
804
|
+
static initFromArray(arr?: any[]): any[];
|
|
805
|
+
static initOnlyValidFromArray(arr?: any[]): any[];
|
|
806
|
+
constructor(options: any);
|
|
807
|
+
_ActionRecord: any;
|
|
808
|
+
created: any;
|
|
809
|
+
get _classname(): string;
|
|
810
|
+
get _superclass(): string;
|
|
811
|
+
get isCreated(): boolean;
|
|
812
|
+
get isValid(): boolean;
|
|
813
|
+
setValue(t: any, actorCode: any, key: any): this;
|
|
814
|
+
update(update: any): this;
|
|
815
|
+
}
|
|
816
|
+
|
|
817
|
+
export declare class StatusDocument extends Status {
|
|
818
|
+
archived: any;
|
|
819
|
+
completed: any;
|
|
820
|
+
discarded: any;
|
|
821
|
+
drafted: any;
|
|
822
|
+
get isArchived(): boolean;
|
|
823
|
+
get isCompleted(): boolean;
|
|
824
|
+
get isDiscarded(): boolean;
|
|
825
|
+
get isDrafted(): boolean;
|
|
826
|
+
setArchived(value: any, actorCode: any): this;
|
|
827
|
+
setCompleted(value: any, actorCode: any): this;
|
|
828
|
+
setDiscarded(value: any, actorCode: any): this;
|
|
829
|
+
setDrafted(value: any, actorCode: any): this;
|
|
830
|
+
}
|
|
831
|
+
|
|
832
|
+
export declare function stringFormatter(str: any, delimiter?: string): any;
|
|
833
|
+
|
|
834
|
+
export declare namespace stringHelper {
|
|
835
|
+
export { getCssClass };
|
|
836
|
+
export { isSame };
|
|
837
|
+
export { punctuationless };
|
|
838
|
+
export { safeToUpperCase };
|
|
839
|
+
export { setCode };
|
|
840
|
+
export { toCamelCase };
|
|
841
|
+
export { toLowerCase };
|
|
842
|
+
export { toScreamingSnakeCase };
|
|
843
|
+
}
|
|
844
|
+
|
|
845
|
+
export declare class TemplateCompiler {
|
|
846
|
+
static init(options: any): TemplateCompiler;
|
|
847
|
+
static initFromArray(arr?: any[]): TemplateCompiler[];
|
|
848
|
+
static initOnlyValidFromArray(arr?: any[]): TemplateCompiler[];
|
|
849
|
+
static concatIf(data: any, args: any): any;
|
|
850
|
+
static divide(data: any, args: any): any;
|
|
851
|
+
static eq(data: any, args: any): any;
|
|
852
|
+
static filterAll(data: any, args: any): any;
|
|
853
|
+
static formatDate(data: any, args: any): any;
|
|
854
|
+
static get(data: any, key: any, failover?: any): any;
|
|
855
|
+
static gt(data: any, args: any): any;
|
|
856
|
+
static gte(data: any, args: any): any;
|
|
857
|
+
static isEmpty(data: any, args: any): any;
|
|
858
|
+
static isNotEmpty(data: any, args: any): any;
|
|
859
|
+
static join(data: any, separator?: string): any;
|
|
860
|
+
static lt(data: any, args: any): any;
|
|
861
|
+
static lte(data: any, args: any): any;
|
|
862
|
+
static map(data: any, args?: any[]): any;
|
|
863
|
+
static neq(data: any, args: any): any;
|
|
864
|
+
static removeHtml(data: any, args: any): any;
|
|
865
|
+
static replaceChar(data: any, args: any): any;
|
|
866
|
+
static sum(data: any, args: any): any;
|
|
867
|
+
static toLowerCase(data: any, args: any): string;
|
|
868
|
+
static toUpperCase(data: any, args: any): string;
|
|
869
|
+
static parseFunction(expression: any): any;
|
|
870
|
+
static parseParams(parameters: any): any[];
|
|
871
|
+
constructor(data: any);
|
|
872
|
+
data: any;
|
|
873
|
+
pipe(expression?: string): any;
|
|
874
|
+
delimiters: string[];
|
|
875
|
+
}
|
|
876
|
+
|
|
877
|
+
export declare class TenantAwareEntity extends TrackedEntity {
|
|
878
|
+
static dummyData(): {
|
|
879
|
+
metadata: any[];
|
|
880
|
+
remarks: any[];
|
|
881
|
+
tenantCode: string;
|
|
882
|
+
meta: {
|
|
883
|
+
active: boolean;
|
|
884
|
+
deleted: boolean;
|
|
885
|
+
created: number;
|
|
886
|
+
creator: string;
|
|
887
|
+
modified: number;
|
|
888
|
+
owner: string;
|
|
889
|
+
};
|
|
890
|
+
};
|
|
891
|
+
_tenant: any;
|
|
892
|
+
metadata: KeyValueObject[];
|
|
893
|
+
remarks: KeyValueObject[];
|
|
894
|
+
tenantCode: any;
|
|
895
|
+
get __valid(): {
|
|
896
|
+
tenantCode: any;
|
|
897
|
+
};
|
|
898
|
+
insertOrUpdateMetadata(key: any, value: any): this;
|
|
899
|
+
getMetadata(): KeyValueObject[];
|
|
900
|
+
getMetadataByKey(key: any): any;
|
|
901
|
+
getMetadataValueByKey(key: any): any;
|
|
902
|
+
getMetadataValueByKeys(keys: any, kv: any): any;
|
|
903
|
+
getMetadataValueByKeyAsArray(key: any): any;
|
|
904
|
+
getRemarks(): KeyValueObject[];
|
|
905
|
+
getRemarkByKey(key: any): any;
|
|
906
|
+
getRemarksValueByKey(key: any): any;
|
|
907
|
+
getTenantCode(): any;
|
|
908
|
+
update(update: any): this;
|
|
909
|
+
}
|
|
910
|
+
|
|
911
|
+
export declare function tenantPlugin(schema: any, options: any): void;
|
|
912
|
+
|
|
913
|
+
export declare class TrackedEntity {
|
|
914
|
+
static dummyData(): {
|
|
915
|
+
meta: {
|
|
916
|
+
active: boolean;
|
|
917
|
+
deleted: boolean;
|
|
918
|
+
created: number;
|
|
919
|
+
creator: string;
|
|
920
|
+
modified: number;
|
|
921
|
+
owner: string;
|
|
922
|
+
};
|
|
923
|
+
};
|
|
924
|
+
static get _classname(): string;
|
|
925
|
+
static get _superclass(): string;
|
|
926
|
+
static init(options?: {}): any;
|
|
927
|
+
static initFromArray(arr?: any[]): any[];
|
|
928
|
+
static initOnlyValidFromArray(arr?: any[]): any[];
|
|
929
|
+
static ALLOWED_META_PROPS: string[];
|
|
930
|
+
constructor(options?: {});
|
|
931
|
+
id: any;
|
|
932
|
+
_type: any;
|
|
933
|
+
meta: {
|
|
934
|
+
active: any;
|
|
935
|
+
created: any;
|
|
936
|
+
creator: any;
|
|
937
|
+
deleted: any;
|
|
938
|
+
modified: any;
|
|
939
|
+
owner: any;
|
|
940
|
+
};
|
|
941
|
+
get __valid(): {};
|
|
942
|
+
get isValid(): boolean;
|
|
943
|
+
get active(): any;
|
|
944
|
+
get created(): any;
|
|
945
|
+
get creator(): any;
|
|
946
|
+
get deleted(): any;
|
|
947
|
+
get modified(): any;
|
|
948
|
+
get owner(): any;
|
|
949
|
+
changeCreatorOwner({ source, target }: {
|
|
950
|
+
source: any;
|
|
951
|
+
target: any;
|
|
952
|
+
}): any;
|
|
953
|
+
delete(): this;
|
|
954
|
+
setActive(): this;
|
|
955
|
+
setDeleted(): this;
|
|
956
|
+
setModified(): this;
|
|
957
|
+
setOwner(owner: any): this;
|
|
958
|
+
unsetActive(): this;
|
|
959
|
+
unsetDeleted(): this;
|
|
960
|
+
update(update: any): this;
|
|
961
|
+
}
|
|
962
|
+
|
|
963
|
+
export declare function trackingPlugin(schema: any, options: any): void;
|
|
964
|
+
|
|
965
|
+
export declare class UniqueKeyGenerator {
|
|
966
|
+
static get _classname(): string;
|
|
967
|
+
static get _superclass(): string;
|
|
968
|
+
static makeFormatter({ fieldName, format, options }: {
|
|
969
|
+
fieldName: any;
|
|
970
|
+
format: any;
|
|
971
|
+
options: any;
|
|
972
|
+
}): (obj?: {}) => Promise<{
|
|
973
|
+
[x: number]: any;
|
|
974
|
+
}>;
|
|
975
|
+
static makeGenerator(arr: any): (obj: any) => Promise<any>;
|
|
976
|
+
}
|
|
977
|
+
|
|
978
|
+
declare function updateOneResult({ responseHelper, service }: {
|
|
979
|
+
responseHelper: any;
|
|
980
|
+
service: any;
|
|
981
|
+
}): (req: any, res: any, next: any) => Promise<void>;
|
|
982
|
+
|
|
983
|
+
export declare class WebAppRequest {
|
|
984
|
+
[key: string]: any;
|
|
985
|
+
blockUI: boolean | null;
|
|
986
|
+
callback: WebAppResponseCallbackFunction | null;
|
|
987
|
+
data: any[] | null;
|
|
988
|
+
event: string | null;
|
|
989
|
+
reloadPage: boolean | null;
|
|
990
|
+
sessionId: string | null;
|
|
991
|
+
timeout: number | null;
|
|
992
|
+
constructor(options?: WebAppRequestOptions);
|
|
993
|
+
static get _classname(): string;
|
|
994
|
+
static get _superclass(): string;
|
|
995
|
+
static init(options: any): WebAppRequest | null;
|
|
996
|
+
static dummyData(): WebAppRequestOptions;
|
|
997
|
+
get isValid(): boolean;
|
|
998
|
+
getId(): string | null;
|
|
999
|
+
}
|
|
1000
|
+
|
|
1001
|
+
declare interface WebAppRequestOptions {
|
|
1002
|
+
blockUI?: boolean | null;
|
|
1003
|
+
callback?: WebAppResponseCallbackFunction | null;
|
|
1004
|
+
data?: any[] | null;
|
|
1005
|
+
event?: string | null;
|
|
1006
|
+
reloadPage?: boolean | null;
|
|
1007
|
+
sessionId?: string | null;
|
|
1008
|
+
timeout?: number | null;
|
|
1009
|
+
}
|
|
1010
|
+
|
|
1011
|
+
export declare class WebAppResponse {
|
|
1012
|
+
[key: string]: any;
|
|
1013
|
+
data: any[] | null;
|
|
1014
|
+
errorDetail: ErrorDetail | null;
|
|
1015
|
+
sessionId: string | null;
|
|
1016
|
+
success: boolean;
|
|
1017
|
+
constructor(options?: WebAppResponseOptions);
|
|
1018
|
+
static get _classname(): string;
|
|
1019
|
+
static get _superclass(): string;
|
|
1020
|
+
static init(options: any): WebAppResponse | null;
|
|
1021
|
+
static dummyData(): WebAppResponseOptions;
|
|
1022
|
+
get isValid(): boolean;
|
|
1023
|
+
getId(): string | null;
|
|
1024
|
+
}
|
|
1025
|
+
|
|
1026
|
+
declare type WebAppResponseCallbackFunction = (WebAppResponse: any) => void;
|
|
1027
|
+
|
|
1028
|
+
declare interface WebAppResponseOptions {
|
|
1029
|
+
data?: any[] | null;
|
|
1030
|
+
errorDetail?: any | null;
|
|
1031
|
+
sessionId?: string | null;
|
|
1032
|
+
success?: boolean;
|
|
1033
|
+
}
|
|
1034
|
+
|
|
1035
|
+
export { }
|