@chilibase/backend 0.1.0
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/README.md +3 -0
- package/lib/administration/x-browse-meta.entity.d.ts +8 -0
- package/lib/administration/x-browse-meta.entity.js +42 -0
- package/lib/administration/x-browse-meta.entity.js.map +1 -0
- package/lib/administration/x-column-meta.entity.d.ts +11 -0
- package/lib/administration/x-column-meta.entity.js +59 -0
- package/lib/administration/x-column-meta.entity.js.map +1 -0
- package/lib/administration/x-enum-enum.entity.d.ts +12 -0
- package/lib/administration/x-enum-enum.entity.js +59 -0
- package/lib/administration/x-enum-enum.entity.js.map +1 -0
- package/lib/administration/x-enum.entity.d.ts +10 -0
- package/lib/administration/x-enum.entity.js +54 -0
- package/lib/administration/x-enum.entity.js.map +1 -0
- package/lib/administration/x-file.entity.d.ts +10 -0
- package/lib/administration/x-file.entity.js +53 -0
- package/lib/administration/x-file.entity.js.map +1 -0
- package/lib/administration/x-param.entity.d.ts +10 -0
- package/lib/administration/x-param.entity.js +54 -0
- package/lib/administration/x-param.entity.js.map +1 -0
- package/lib/administration/x-user.entity.d.ts +11 -0
- package/lib/administration/x-user.entity.js +63 -0
- package/lib/administration/x-user.entity.js.map +1 -0
- package/lib/auth/auth.module.d.ts +2 -0
- package/lib/auth/auth.module.js +19 -0
- package/lib/auth/auth.module.js.map +1 -0
- package/lib/auth/jwt-auth.guard.d.ts +10 -0
- package/lib/auth/jwt-auth.guard.js +36 -0
- package/lib/auth/jwt-auth.guard.js.map +1 -0
- package/lib/auth/jwt.strategy.d.ts +9 -0
- package/lib/auth/jwt.strategy.js +60 -0
- package/lib/auth/jwt.strategy.js.map +1 -0
- package/lib/auth/public.d.ts +2 -0
- package/lib/auth/public.js +4 -0
- package/lib/auth/public.js.map +1 -0
- package/lib/serverApi/ExportImportParam.d.ts +70 -0
- package/lib/serverApi/ExportImportParam.js +33 -0
- package/lib/serverApi/ExportImportParam.js.map +1 -0
- package/lib/serverApi/FindParam.d.ts +59 -0
- package/lib/serverApi/FindParam.js +20 -0
- package/lib/serverApi/FindParam.js.map +1 -0
- package/lib/serverApi/FindResult.d.ts +8 -0
- package/lib/serverApi/FindResult.js +2 -0
- package/lib/serverApi/FindResult.js.map +1 -0
- package/lib/serverApi/PrimeFilterSortMeta.d.ts +43 -0
- package/lib/serverApi/PrimeFilterSortMeta.js +32 -0
- package/lib/serverApi/PrimeFilterSortMeta.js.map +1 -0
- package/lib/serverApi/XBrowseMetadata.d.ts +4 -0
- package/lib/serverApi/XBrowseMetadata.js +2 -0
- package/lib/serverApi/XBrowseMetadata.js.map +1 -0
- package/lib/serverApi/XEntityMetadata.d.ts +35 -0
- package/lib/serverApi/XEntityMetadata.js +2 -0
- package/lib/serverApi/XEntityMetadata.js.map +1 -0
- package/lib/serverApi/XFileJsonField.d.ts +6 -0
- package/lib/serverApi/XFileJsonField.js +2 -0
- package/lib/serverApi/XFileJsonField.js.map +1 -0
- package/lib/serverApi/XPostLoginIfc.d.ts +7 -0
- package/lib/serverApi/XPostLoginIfc.js +2 -0
- package/lib/serverApi/XPostLoginIfc.js.map +1 -0
- package/lib/serverApi/XUser.d.ts +8 -0
- package/lib/serverApi/XUser.js +2 -0
- package/lib/serverApi/XUser.js.map +1 -0
- package/lib/serverApi/XUserAuthenticationIfc.d.ts +9 -0
- package/lib/serverApi/XUserAuthenticationIfc.js +2 -0
- package/lib/serverApi/XUserAuthenticationIfc.js.map +1 -0
- package/lib/serverApi/XUtilsCommon.d.ts +48 -0
- package/lib/serverApi/XUtilsCommon.js +409 -0
- package/lib/serverApi/XUtilsCommon.js.map +1 -0
- package/lib/serverApi/XUtilsConversions.d.ts +37 -0
- package/lib/serverApi/XUtilsConversions.js +386 -0
- package/lib/serverApi/XUtilsConversions.js.map +1 -0
- package/lib/serverApi/XUtilsMetadataCommon.d.ts +29 -0
- package/lib/serverApi/XUtilsMetadataCommon.js +170 -0
- package/lib/serverApi/XUtilsMetadataCommon.js.map +1 -0
- package/lib/serverApi/index.d.ts +2 -0
- package/lib/serverApi/index.js +3 -0
- package/lib/serverApi/index.js.map +1 -0
- package/lib/serverApi/x-lib-api.d.ts +12 -0
- package/lib/serverApi/x-lib-api.js +2 -0
- package/lib/serverApi/x-lib-api.js.map +1 -0
- package/lib/services/FindParamRows.d.ts +8 -0
- package/lib/services/FindParamRows.js +2 -0
- package/lib/services/FindParamRows.js.map +1 -0
- package/lib/services/FindParamRowsForAssoc.d.ts +6 -0
- package/lib/services/FindParamRowsForAssoc.js +2 -0
- package/lib/services/FindParamRowsForAssoc.js.map +1 -0
- package/lib/services/FindRowByIdParam.d.ts +5 -0
- package/lib/services/FindRowByIdParam.js +2 -0
- package/lib/services/FindRowByIdParam.js.map +1 -0
- package/lib/services/GetAssocNameParam.d.ts +4 -0
- package/lib/services/GetAssocNameParam.js +2 -0
- package/lib/services/GetAssocNameParam.js.map +1 -0
- package/lib/services/RemoveRowParam.d.ts +5 -0
- package/lib/services/RemoveRowParam.js +2 -0
- package/lib/services/RemoveRowParam.js.map +1 -0
- package/lib/services/SaveRowParam.d.ts +5 -0
- package/lib/services/SaveRowParam.js +2 -0
- package/lib/services/SaveRowParam.js.map +1 -0
- package/lib/services/XAdvancedConsoleLogger.d.ts +4 -0
- package/lib/services/XAdvancedConsoleLogger.js +25 -0
- package/lib/services/XAdvancedConsoleLogger.js.map +1 -0
- package/lib/services/XAppError.d.ts +3 -0
- package/lib/services/XAppError.js +8 -0
- package/lib/services/XAppError.js.map +1 -0
- package/lib/services/XEnvVars.d.ts +23 -0
- package/lib/services/XEnvVars.js +27 -0
- package/lib/services/XEnvVars.js.map +1 -0
- package/lib/services/XOptimisticLockingSubscriber.d.ts +4 -0
- package/lib/services/XOptimisticLockingSubscriber.js +23 -0
- package/lib/services/XOptimisticLockingSubscriber.js.map +1 -0
- package/lib/services/XRowIdListToRemove.d.ts +10 -0
- package/lib/services/XRowIdListToRemove.js +26 -0
- package/lib/services/XRowIdListToRemove.js.map +1 -0
- package/lib/services/XUtils.d.ts +16 -0
- package/lib/services/XUtils.js +58 -0
- package/lib/services/XUtils.js.map +1 -0
- package/lib/services/index.d.ts +4 -0
- package/lib/services/index.js +5 -0
- package/lib/services/index.js.map +1 -0
- package/lib/services/x-browse-form-metadata.service.d.ts +7 -0
- package/lib/services/x-browse-form-metadata.service.js +40 -0
- package/lib/services/x-browse-form-metadata.service.js.map +1 -0
- package/lib/services/x-entity-metadata.service.d.ts +15 -0
- package/lib/services/x-entity-metadata.service.js +127 -0
- package/lib/services/x-entity-metadata.service.js.map +1 -0
- package/lib/services/x-exception.filter.d.ts +4 -0
- package/lib/services/x-exception.filter.js +64 -0
- package/lib/services/x-exception.filter.js.map +1 -0
- package/lib/services/x-export-csv.service.d.ts +24 -0
- package/lib/services/x-export-csv.service.js +155 -0
- package/lib/services/x-export-csv.service.js.map +1 -0
- package/lib/services/x-export-excel.service.d.ts +12 -0
- package/lib/services/x-export-excel.service.js +68 -0
- package/lib/services/x-export-excel.service.js.map +1 -0
- package/lib/services/x-export-json.service.d.ts +7 -0
- package/lib/services/x-export-json.service.js +45 -0
- package/lib/services/x-export-json.service.js.map +1 -0
- package/lib/services/x-export.service.d.ts +14 -0
- package/lib/services/x-export.service.js +90 -0
- package/lib/services/x-export.service.js.map +1 -0
- package/lib/services/x-file.controller.d.ts +13 -0
- package/lib/services/x-file.controller.js +111 -0
- package/lib/services/x-file.controller.js.map +1 -0
- package/lib/services/x-file.service.d.ts +8 -0
- package/lib/services/x-file.service.js +41 -0
- package/lib/services/x-file.service.js.map +1 -0
- package/lib/services/x-lazy-data-table.service.d.ts +33 -0
- package/lib/services/x-lazy-data-table.service.js +227 -0
- package/lib/services/x-lazy-data-table.service.js.map +1 -0
- package/lib/services/x-lib.controller.d.ts +45 -0
- package/lib/services/x-lib.controller.js +205 -0
- package/lib/services/x-lib.controller.js.map +1 -0
- package/lib/services/x-lib.module.d.ts +4 -0
- package/lib/services/x-lib.module.js +51 -0
- package/lib/services/x-lib.module.js.map +1 -0
- package/lib/services/x-lib.service.d.ts +33 -0
- package/lib/services/x-lib.service.js +264 -0
- package/lib/services/x-lib.service.js.map +1 -0
- package/lib/tsconfig.tsbuildinfo +1 -0
- package/lib/x-query-data/XMainQueryData.d.ts +27 -0
- package/lib/x-query-data/XMainQueryData.js +172 -0
- package/lib/x-query-data/XMainQueryData.js.map +1 -0
- package/lib/x-query-data/XQueryData.d.ts +33 -0
- package/lib/x-query-data/XQueryData.js +242 -0
- package/lib/x-query-data/XQueryData.js.map +1 -0
- package/lib/x-query-data/XSubQueryData.d.ts +11 -0
- package/lib/x-query-data/XSubQueryData.js +52 -0
- package/lib/x-query-data/XSubQueryData.js.map +1 -0
- package/package.json +100 -0
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
8
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
9
|
+
};
|
|
10
|
+
import { Injectable } from '@nestjs/common';
|
|
11
|
+
import { PassportStrategy } from '@nestjs/passport';
|
|
12
|
+
import { ExtractJwt, Strategy } from 'passport-jwt';
|
|
13
|
+
import { passportJwtSecret } from "jwks-rsa";
|
|
14
|
+
import { XAuth, XEnvVar } from "../services/XEnvVars.js";
|
|
15
|
+
import { XUtils } from "../services/XUtils.js";
|
|
16
|
+
let JwtStrategy = class JwtStrategy extends PassportStrategy(Strategy, 'x-jwt-strategy') {
|
|
17
|
+
constructor() {
|
|
18
|
+
if (XUtils.getEnvVarValue(XEnvVar.X_AUTH) === XAuth.AUTH0) {
|
|
19
|
+
super({
|
|
20
|
+
secretOrKeyProvider: passportJwtSecret({
|
|
21
|
+
cache: true,
|
|
22
|
+
rateLimit: true,
|
|
23
|
+
jwksRequestsPerMinute: 5,
|
|
24
|
+
jwksUri: `https://${XUtils.getEnvVarValue(XEnvVar.X_AUTH0_DOMAIN)}/.well-known/jwks.json`,
|
|
25
|
+
}),
|
|
26
|
+
jwtFromRequest: ExtractJwt.fromAuthHeaderAsBearerToken(),
|
|
27
|
+
audience: XUtils.getEnvVarValue(XEnvVar.X_AUTH0_AUDIENCE),
|
|
28
|
+
issuer: `https://${XUtils.getEnvVarValue(XEnvVar.X_AUTH0_DOMAIN)}/`,
|
|
29
|
+
algorithms: ['RS256'],
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
else if (XUtils.getEnvVarValue(XEnvVar.X_AUTH) === XAuth.MS_ENTRA_ID) {
|
|
33
|
+
super({
|
|
34
|
+
secretOrKeyProvider: passportJwtSecret({
|
|
35
|
+
cache: true,
|
|
36
|
+
rateLimit: true,
|
|
37
|
+
jwksRequestsPerMinute: 5,
|
|
38
|
+
jwksUri: `https://login.microsoftonline.com/${XUtils.getEnvVarValue(XEnvVar.X_MS_ENTRA_ID_TENANT_ID)}/discovery/v2.0/keys`
|
|
39
|
+
}),
|
|
40
|
+
jwtFromRequest: ExtractJwt.fromAuthHeaderAsBearerToken(),
|
|
41
|
+
audience: XUtils.getEnvVarValue(XEnvVar.X_MS_ENTRA_ID_AUDIENCE),
|
|
42
|
+
issuer: `https://login.microsoftonline.com/${XUtils.getEnvVarValue(XEnvVar.X_MS_ENTRA_ID_TENANT_ID)}/v2.0`,
|
|
43
|
+
algorithms: ['RS256'],
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
else {
|
|
47
|
+
console.log(`JwtStrategy: authentication not implemented for X_AUTH = ${XUtils.getEnvVarValue(XEnvVar.X_AUTH)}`);
|
|
48
|
+
throw `JwtStrategy: authentication not implemented for X_AUTH = ${XUtils.getEnvVarValue(XEnvVar.X_AUTH)}`;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
validate(payload) {
|
|
52
|
+
return payload;
|
|
53
|
+
}
|
|
54
|
+
};
|
|
55
|
+
JwtStrategy = __decorate([
|
|
56
|
+
Injectable(),
|
|
57
|
+
__metadata("design:paramtypes", [])
|
|
58
|
+
], JwtStrategy);
|
|
59
|
+
export { JwtStrategy };
|
|
60
|
+
//# sourceMappingURL=jwt.strategy.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"jwt.strategy.js","sourceRoot":"","sources":["../../src/auth/jwt.strategy.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAC5C,OAAO,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AACpD,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AACpD,OAAO,EAAC,iBAAiB,EAAC,MAAM,UAAU,CAAC;AAC3C,OAAO,EAAC,KAAK,EAAE,OAAO,EAAC,MAAM,yBAAyB,CAAC;AACvD,OAAO,EAAC,MAAM,EAAC,MAAM,uBAAuB,CAAC;AAGtC,IAAM,WAAW,GAAjB,MAAM,WAAY,SAAQ,gBAAgB,CAAC,QAAQ,EAAE,gBAAgB,CAAC;IACzE;QACI,IAAI,MAAM,CAAC,cAAc,CAAC,OAAO,CAAC,MAAM,CAAC,KAAK,KAAK,CAAC,KAAK,EAAE,CAAC;YACxD,KAAK,CAAC;gBACF,mBAAmB,EAAE,iBAAiB,CAAC;oBACnC,KAAK,EAAE,IAAI;oBACX,SAAS,EAAE,IAAI;oBACf,qBAAqB,EAAE,CAAC;oBACxB,OAAO,EAAE,WAAW,MAAM,CAAC,cAAc,CAAC,OAAO,CAAC,cAAc,CAAC,wBAAwB;iBAC5F,CAAC;gBAEF,cAAc,EAAE,UAAU,CAAC,2BAA2B,EAAE;gBACxD,QAAQ,EAAE,MAAM,CAAC,cAAc,CAAC,OAAO,CAAC,gBAAgB,CAAC;gBACzD,MAAM,EAAE,WAAW,MAAM,CAAC,cAAc,CAAC,OAAO,CAAC,cAAc,CAAC,GAAG;gBACnE,UAAU,EAAE,CAAC,OAAO,CAAC;aACxB,CAAC,CAAC;QACP,CAAC;aACI,IAAI,MAAM,CAAC,cAAc,CAAC,OAAO,CAAC,MAAM,CAAC,KAAK,KAAK,CAAC,WAAW,EAAE,CAAC;YACnE,KAAK,CAAC;gBACF,mBAAmB,EAAE,iBAAiB,CAAC;oBACnC,KAAK,EAAE,IAAI;oBACX,SAAS,EAAE,IAAI;oBACf,qBAAqB,EAAE,CAAC;oBACxB,OAAO,EAAE,qCAAqC,MAAM,CAAC,cAAc,CAAC,OAAO,CAAC,uBAAuB,CAAC,sBAAsB;iBAC7H,CAAC;gBAEF,cAAc,EAAE,UAAU,CAAC,2BAA2B,EAAE;gBACxD,QAAQ,EAAE,MAAM,CAAC,cAAc,CAAC,OAAO,CAAC,sBAAsB,CAAC;gBAC/D,MAAM,EAAE,qCAAqC,MAAM,CAAC,cAAc,CAAC,OAAO,CAAC,uBAAuB,CAAC,OAAO;gBAC1G,UAAU,EAAE,CAAC,OAAO,CAAC;aACxB,CAAC,CAAC;QACP,CAAC;aACI,CAAC;YACF,OAAO,CAAC,GAAG,CAAC,4DAA4D,MAAM,CAAC,cAAc,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;YACjH,MAAM,4DAA4D,MAAM,CAAC,cAAc,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE,CAAC;QAC9G,CAAC;IACL,CAAC;IAED,QAAQ,CAAC,OAAgB;QAErB,OAAO,OAAO,CAAC;IACnB,CAAC;CACJ,CAAA;AA1CY,WAAW;IADvB,UAAU,EAAE;;GACA,WAAW,CA0CvB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"public.js","sourceRoot":"","sources":["../../src/auth/public.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAG7C,MAAM,CAAC,MAAM,aAAa,GAAG,UAAU,CAAC;AACxC,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,EAAE,CAAC,WAAW,CAAC,aAAa,EAAE,IAAI,CAAC,CAAC"}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { DataTableSortMeta } from "./PrimeFilterSortMeta.js";
|
|
2
|
+
import { XCustomFilterItem, XDataTableFilterMeta, XFullTextSearch } from "./FindParam.js";
|
|
3
|
+
export declare enum ExportType {
|
|
4
|
+
Excel = "excel",
|
|
5
|
+
Csv = "csv",
|
|
6
|
+
Json = "json"
|
|
7
|
+
}
|
|
8
|
+
export interface ExportExcelParam {
|
|
9
|
+
queryParam: LazyDataTableQueryParam;
|
|
10
|
+
excelCsvParam: ExcelCsvParam;
|
|
11
|
+
widths: string[];
|
|
12
|
+
}
|
|
13
|
+
export interface ExportCsvParam {
|
|
14
|
+
queryParam: LazyDataTableQueryParam;
|
|
15
|
+
excelCsvParam: ExcelCsvParam;
|
|
16
|
+
csvParam: CsvParam;
|
|
17
|
+
}
|
|
18
|
+
export interface ExportJsonParam {
|
|
19
|
+
queryParam: LazyDataTableQueryParam;
|
|
20
|
+
}
|
|
21
|
+
export interface LazyDataTableQueryParam {
|
|
22
|
+
filters: XDataTableFilterMeta;
|
|
23
|
+
fullTextSearch?: XFullTextSearch;
|
|
24
|
+
customFilterItems?: XCustomFilterItem[];
|
|
25
|
+
multiSortMeta?: DataTableSortMeta[];
|
|
26
|
+
entity: string;
|
|
27
|
+
fields: string[];
|
|
28
|
+
}
|
|
29
|
+
export interface ExcelCsvParam {
|
|
30
|
+
headers?: string[];
|
|
31
|
+
toManyAssocExport: XMultilineExportType;
|
|
32
|
+
multilineTextExport: XMultilineExportType;
|
|
33
|
+
fieldsToDuplicateValues?: string[];
|
|
34
|
+
}
|
|
35
|
+
export declare enum XMultilineExportType {
|
|
36
|
+
Singleline = "singleline",
|
|
37
|
+
Multiline = "multiline",
|
|
38
|
+
Off = "off"
|
|
39
|
+
}
|
|
40
|
+
export interface CsvParam {
|
|
41
|
+
csvSeparator: CsvSeparator;
|
|
42
|
+
csvDecimalFormat: CsvDecimalFormat;
|
|
43
|
+
csvEncoding: CsvEncoding;
|
|
44
|
+
}
|
|
45
|
+
export declare enum CsvSeparator {
|
|
46
|
+
Semicolon = ";",
|
|
47
|
+
Comma = ","
|
|
48
|
+
}
|
|
49
|
+
export declare enum CsvDecimalFormat {
|
|
50
|
+
Comma = "123456,78",
|
|
51
|
+
Dot = "123456.78"
|
|
52
|
+
}
|
|
53
|
+
export declare enum CsvEncoding {
|
|
54
|
+
Utf8 = "utf-8",
|
|
55
|
+
Win1250 = "win1250"
|
|
56
|
+
}
|
|
57
|
+
export declare enum ImportType {
|
|
58
|
+
Csv = "csv",
|
|
59
|
+
Json = "json"
|
|
60
|
+
}
|
|
61
|
+
export interface ImportParam {
|
|
62
|
+
importType: ImportType;
|
|
63
|
+
entity: string;
|
|
64
|
+
csvParam: CsvParam;
|
|
65
|
+
}
|
|
66
|
+
export interface ImportResponse {
|
|
67
|
+
ok: boolean;
|
|
68
|
+
rowsImported?: number;
|
|
69
|
+
error?: string;
|
|
70
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
export var ExportType;
|
|
2
|
+
(function (ExportType) {
|
|
3
|
+
ExportType["Excel"] = "excel";
|
|
4
|
+
ExportType["Csv"] = "csv";
|
|
5
|
+
ExportType["Json"] = "json";
|
|
6
|
+
})(ExportType || (ExportType = {}));
|
|
7
|
+
export var XMultilineExportType;
|
|
8
|
+
(function (XMultilineExportType) {
|
|
9
|
+
XMultilineExportType["Singleline"] = "singleline";
|
|
10
|
+
XMultilineExportType["Multiline"] = "multiline";
|
|
11
|
+
XMultilineExportType["Off"] = "off";
|
|
12
|
+
})(XMultilineExportType || (XMultilineExportType = {}));
|
|
13
|
+
export var CsvSeparator;
|
|
14
|
+
(function (CsvSeparator) {
|
|
15
|
+
CsvSeparator["Semicolon"] = ";";
|
|
16
|
+
CsvSeparator["Comma"] = ",";
|
|
17
|
+
})(CsvSeparator || (CsvSeparator = {}));
|
|
18
|
+
export var CsvDecimalFormat;
|
|
19
|
+
(function (CsvDecimalFormat) {
|
|
20
|
+
CsvDecimalFormat["Comma"] = "123456,78";
|
|
21
|
+
CsvDecimalFormat["Dot"] = "123456.78";
|
|
22
|
+
})(CsvDecimalFormat || (CsvDecimalFormat = {}));
|
|
23
|
+
export var CsvEncoding;
|
|
24
|
+
(function (CsvEncoding) {
|
|
25
|
+
CsvEncoding["Utf8"] = "utf-8";
|
|
26
|
+
CsvEncoding["Win1250"] = "win1250";
|
|
27
|
+
})(CsvEncoding || (CsvEncoding = {}));
|
|
28
|
+
export var ImportType;
|
|
29
|
+
(function (ImportType) {
|
|
30
|
+
ImportType["Csv"] = "csv";
|
|
31
|
+
ImportType["Json"] = "json";
|
|
32
|
+
})(ImportType || (ImportType = {}));
|
|
33
|
+
//# sourceMappingURL=ExportImportParam.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ExportImportParam.js","sourceRoot":"","sources":["../../src/serverApi/ExportImportParam.ts"],"names":[],"mappings":"AAOA,MAAM,CAAN,IAAY,UAIX;AAJD,WAAY,UAAU;IAClB,6BAAe,CAAA;IACf,yBAAW,CAAA;IACX,2BAAa,CAAA;AACjB,CAAC,EAJW,UAAU,KAAV,UAAU,QAIrB;AAoCD,MAAM,CAAN,IAAY,oBAIX;AAJD,WAAY,oBAAoB;IAC5B,iDAAyB,CAAA;IACzB,+CAAuB,CAAA;IACvB,mCAAW,CAAA;AACf,CAAC,EAJW,oBAAoB,KAApB,oBAAoB,QAI/B;AAWD,MAAM,CAAN,IAAY,YAGX;AAHD,WAAY,YAAY;IACpB,+BAAe,CAAA;IACf,2BAAW,CAAA;AACf,CAAC,EAHW,YAAY,KAAZ,YAAY,QAGvB;AAGD,MAAM,CAAN,IAAY,gBAGX;AAHD,WAAY,gBAAgB;IACxB,uCAAmB,CAAA;IACnB,qCAAiB,CAAA;AACrB,CAAC,EAHW,gBAAgB,KAAhB,gBAAgB,QAG3B;AAKD,MAAM,CAAN,IAAY,WAGX;AAHD,WAAY,WAAW;IACnB,6BAAc,CAAA;IACd,kCAAmB,CAAA;AACvB,CAAC,EAHW,WAAW,KAAX,WAAW,QAGtB;AAID,MAAM,CAAN,IAAY,UAGX;AAHD,WAAY,UAAU;IAClB,yBAAW,CAAA;IACX,2BAAa,CAAA;AACjB,CAAC,EAHW,UAAU,KAAV,UAAU,QAGrB"}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { DataTableFilterMetaData, DataTableOperatorFilterMetaData, DataTableSortMeta } from "./PrimeFilterSortMeta.js";
|
|
2
|
+
import { XParams } from "./XUtilsCommon.js";
|
|
3
|
+
export declare enum ResultType {
|
|
4
|
+
OnlyRowCount = 0,
|
|
5
|
+
OnlyPagedRows = 1,
|
|
6
|
+
RowCountAndPagedRows = 2,
|
|
7
|
+
AllRows = 3
|
|
8
|
+
}
|
|
9
|
+
export interface XCustomFilterItem {
|
|
10
|
+
where: string;
|
|
11
|
+
params: XParams;
|
|
12
|
+
}
|
|
13
|
+
export type XCustomFilter = XCustomFilterItem | XCustomFilterItem[];
|
|
14
|
+
export declare enum XFilterMatchMode {
|
|
15
|
+
X_AUTO_COMPLETE = "xAutoComplete",
|
|
16
|
+
X_FILTER_ELEMENT = "xFilterElement"
|
|
17
|
+
}
|
|
18
|
+
export interface XDataTableFilterMetaData extends DataTableFilterMetaData {
|
|
19
|
+
customFilterItems?: XCustomFilterItem[];
|
|
20
|
+
}
|
|
21
|
+
export interface XDataTableFilterMeta {
|
|
22
|
+
[key: string]: XDataTableFilterMetaData | DataTableOperatorFilterMetaData;
|
|
23
|
+
}
|
|
24
|
+
export interface XFullTextSearch {
|
|
25
|
+
fields?: string[];
|
|
26
|
+
value: string;
|
|
27
|
+
splitValue: boolean;
|
|
28
|
+
matchMode: 'startsWith' | 'contains' | 'endsWith' | 'equals';
|
|
29
|
+
}
|
|
30
|
+
export declare enum XAggregateFunction {
|
|
31
|
+
Min = "MIN",
|
|
32
|
+
Max = "MAX",
|
|
33
|
+
Sum = "SUM",
|
|
34
|
+
Avg = "AVG"
|
|
35
|
+
}
|
|
36
|
+
export interface XSimpleAggregateItem {
|
|
37
|
+
field: string;
|
|
38
|
+
aggregateFunction: XAggregateFunction;
|
|
39
|
+
}
|
|
40
|
+
export interface FindParam {
|
|
41
|
+
resultType: ResultType;
|
|
42
|
+
first?: number;
|
|
43
|
+
rows?: number;
|
|
44
|
+
filters?: XDataTableFilterMeta;
|
|
45
|
+
fullTextSearch?: XFullTextSearch;
|
|
46
|
+
customFilterItems?: XCustomFilterItem[];
|
|
47
|
+
multiSortMeta?: DataTableSortMeta[];
|
|
48
|
+
entity: string;
|
|
49
|
+
fields?: string[];
|
|
50
|
+
aggregateItems?: XSimpleAggregateItem[];
|
|
51
|
+
}
|
|
52
|
+
export interface XLazyAutoCompleteSuggestionsRequest {
|
|
53
|
+
maxRows: number;
|
|
54
|
+
fullTextSearch?: XFullTextSearch;
|
|
55
|
+
entity: string;
|
|
56
|
+
filterItems?: XCustomFilterItem[];
|
|
57
|
+
multiSortMeta?: DataTableSortMeta[];
|
|
58
|
+
fields?: string[];
|
|
59
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export var ResultType;
|
|
2
|
+
(function (ResultType) {
|
|
3
|
+
ResultType[ResultType["OnlyRowCount"] = 0] = "OnlyRowCount";
|
|
4
|
+
ResultType[ResultType["OnlyPagedRows"] = 1] = "OnlyPagedRows";
|
|
5
|
+
ResultType[ResultType["RowCountAndPagedRows"] = 2] = "RowCountAndPagedRows";
|
|
6
|
+
ResultType[ResultType["AllRows"] = 3] = "AllRows";
|
|
7
|
+
})(ResultType || (ResultType = {}));
|
|
8
|
+
export var XFilterMatchMode;
|
|
9
|
+
(function (XFilterMatchMode) {
|
|
10
|
+
XFilterMatchMode["X_AUTO_COMPLETE"] = "xAutoComplete";
|
|
11
|
+
XFilterMatchMode["X_FILTER_ELEMENT"] = "xFilterElement";
|
|
12
|
+
})(XFilterMatchMode || (XFilterMatchMode = {}));
|
|
13
|
+
export var XAggregateFunction;
|
|
14
|
+
(function (XAggregateFunction) {
|
|
15
|
+
XAggregateFunction["Min"] = "MIN";
|
|
16
|
+
XAggregateFunction["Max"] = "MAX";
|
|
17
|
+
XAggregateFunction["Sum"] = "SUM";
|
|
18
|
+
XAggregateFunction["Avg"] = "AVG";
|
|
19
|
+
})(XAggregateFunction || (XAggregateFunction = {}));
|
|
20
|
+
//# sourceMappingURL=FindParam.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FindParam.js","sourceRoot":"","sources":["../../src/serverApi/FindParam.ts"],"names":[],"mappings":"AAGA,MAAM,CAAN,IAAY,UAKX;AALD,WAAY,UAAU;IAClB,2DAAY,CAAA;IACZ,6DAAa,CAAA;IACb,2EAAoB,CAAA;IACpB,iDAAO,CAAA;AACX,CAAC,EALW,UAAU,KAAV,UAAU,QAKrB;AAYD,MAAM,CAAN,IAAY,gBAGX;AAHD,WAAY,gBAAgB;IACxB,qDAAiC,CAAA;IACjC,uDAAmC,CAAA;AACvC,CAAC,EAHW,gBAAgB,KAAhB,gBAAgB,QAG3B;AAuBD,MAAM,CAAN,IAAY,kBAKX;AALD,WAAY,kBAAkB;IAC1B,iCAAW,CAAA;IACX,iCAAW,CAAA;IACX,iCAAW,CAAA;IACX,iCAAW,CAAA;AACf,CAAC,EALW,kBAAkB,KAAlB,kBAAkB,QAK7B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FindResult.js","sourceRoot":"","sources":["../../src/serverApi/FindResult.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
export declare enum FilterMatchMode {
|
|
2
|
+
STARTS_WITH = "startsWith",
|
|
3
|
+
CONTAINS = "contains",
|
|
4
|
+
NOT_CONTAINS = "notContains",
|
|
5
|
+
ENDS_WITH = "endsWith",
|
|
6
|
+
EQUALS = "equals",
|
|
7
|
+
NOT_EQUALS = "notEquals",
|
|
8
|
+
IN = "in",
|
|
9
|
+
LESS_THAN = "lt",
|
|
10
|
+
LESS_THAN_OR_EQUAL_TO = "lte",
|
|
11
|
+
GREATER_THAN = "gt",
|
|
12
|
+
GREATER_THAN_OR_EQUAL_TO = "gte",
|
|
13
|
+
BETWEEN = "between",
|
|
14
|
+
DATE_IS = "dateIs",
|
|
15
|
+
DATE_IS_NOT = "dateIsNot",
|
|
16
|
+
DATE_BEFORE = "dateBefore",
|
|
17
|
+
DATE_AFTER = "dateAfter",
|
|
18
|
+
CUSTOM = "custom"
|
|
19
|
+
}
|
|
20
|
+
export declare enum FilterOperator {
|
|
21
|
+
AND = "and",
|
|
22
|
+
OR = "or"
|
|
23
|
+
}
|
|
24
|
+
export declare enum SortOrder {
|
|
25
|
+
DESC = -1,
|
|
26
|
+
UNSORTED = 0,
|
|
27
|
+
ASC = 1
|
|
28
|
+
}
|
|
29
|
+
export interface DataTableSortMeta {
|
|
30
|
+
field: string;
|
|
31
|
+
order: 1 | 0 | -1 | null | undefined;
|
|
32
|
+
}
|
|
33
|
+
export interface DataTableFilterMetaData {
|
|
34
|
+
value: any;
|
|
35
|
+
matchMode: 'startsWith' | 'contains' | 'notContains' | 'endsWith' | 'equals' | 'notEquals' | 'in' | 'lt' | 'lte' | 'gt' | 'gte' | 'between' | 'dateIs' | 'dateIsNot' | 'dateBefore' | 'dateAfter' | 'custom' | undefined;
|
|
36
|
+
}
|
|
37
|
+
export interface DataTableOperatorFilterMetaData {
|
|
38
|
+
operator: string;
|
|
39
|
+
constraints: DataTableFilterMetaData[];
|
|
40
|
+
}
|
|
41
|
+
export interface DataTableFilterMeta {
|
|
42
|
+
[key: string]: DataTableFilterMetaData | DataTableOperatorFilterMetaData;
|
|
43
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
export var FilterMatchMode;
|
|
2
|
+
(function (FilterMatchMode) {
|
|
3
|
+
FilterMatchMode["STARTS_WITH"] = "startsWith";
|
|
4
|
+
FilterMatchMode["CONTAINS"] = "contains";
|
|
5
|
+
FilterMatchMode["NOT_CONTAINS"] = "notContains";
|
|
6
|
+
FilterMatchMode["ENDS_WITH"] = "endsWith";
|
|
7
|
+
FilterMatchMode["EQUALS"] = "equals";
|
|
8
|
+
FilterMatchMode["NOT_EQUALS"] = "notEquals";
|
|
9
|
+
FilterMatchMode["IN"] = "in";
|
|
10
|
+
FilterMatchMode["LESS_THAN"] = "lt";
|
|
11
|
+
FilterMatchMode["LESS_THAN_OR_EQUAL_TO"] = "lte";
|
|
12
|
+
FilterMatchMode["GREATER_THAN"] = "gt";
|
|
13
|
+
FilterMatchMode["GREATER_THAN_OR_EQUAL_TO"] = "gte";
|
|
14
|
+
FilterMatchMode["BETWEEN"] = "between";
|
|
15
|
+
FilterMatchMode["DATE_IS"] = "dateIs";
|
|
16
|
+
FilterMatchMode["DATE_IS_NOT"] = "dateIsNot";
|
|
17
|
+
FilterMatchMode["DATE_BEFORE"] = "dateBefore";
|
|
18
|
+
FilterMatchMode["DATE_AFTER"] = "dateAfter";
|
|
19
|
+
FilterMatchMode["CUSTOM"] = "custom";
|
|
20
|
+
})(FilterMatchMode || (FilterMatchMode = {}));
|
|
21
|
+
export var FilterOperator;
|
|
22
|
+
(function (FilterOperator) {
|
|
23
|
+
FilterOperator["AND"] = "and";
|
|
24
|
+
FilterOperator["OR"] = "or";
|
|
25
|
+
})(FilterOperator || (FilterOperator = {}));
|
|
26
|
+
export var SortOrder;
|
|
27
|
+
(function (SortOrder) {
|
|
28
|
+
SortOrder[SortOrder["DESC"] = -1] = "DESC";
|
|
29
|
+
SortOrder[SortOrder["UNSORTED"] = 0] = "UNSORTED";
|
|
30
|
+
SortOrder[SortOrder["ASC"] = 1] = "ASC";
|
|
31
|
+
})(SortOrder || (SortOrder = {}));
|
|
32
|
+
//# sourceMappingURL=PrimeFilterSortMeta.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PrimeFilterSortMeta.js","sourceRoot":"","sources":["../../src/serverApi/PrimeFilterSortMeta.ts"],"names":[],"mappings":"AAGA,MAAM,CAAN,IAAY,eAkBX;AAlBD,WAAY,eAAe;IACvB,6CAA0B,CAAA;IAC1B,wCAAqB,CAAA;IACrB,+CAA4B,CAAA;IAC5B,yCAAsB,CAAA;IACtB,oCAAiB,CAAA;IACjB,2CAAwB,CAAA;IACxB,4BAAS,CAAA;IACT,mCAAgB,CAAA;IAChB,gDAA6B,CAAA;IAC7B,sCAAmB,CAAA;IACnB,mDAAgC,CAAA;IAChC,sCAAmB,CAAA;IACnB,qCAAkB,CAAA;IAClB,4CAAyB,CAAA;IACzB,6CAA0B,CAAA;IAC1B,2CAAwB,CAAA;IACxB,oCAAiB,CAAA;AACrB,CAAC,EAlBW,eAAe,KAAf,eAAe,QAkB1B;AAED,MAAM,CAAN,IAAY,cAGX;AAHD,WAAY,cAAc;IACtB,6BAAW,CAAA;IACX,2BAAS,CAAA;AACb,CAAC,EAHW,cAAc,KAAd,cAAc,QAGzB;AAED,MAAM,CAAN,IAAY,SAIX;AAJD,WAAY,SAAS;IACjB,0CAAS,CAAA;IACT,iDAAY,CAAA;IACZ,uCAAO,CAAA;AACX,CAAC,EAJW,SAAS,KAAT,SAAS,QAIpB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"XBrowseMetadata.js","sourceRoot":"","sources":["../../src/serverApi/XBrowseMetadata.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
export interface XEntityMap {
|
|
2
|
+
[name: string]: XEntity;
|
|
3
|
+
}
|
|
4
|
+
export interface XEntity {
|
|
5
|
+
name: string;
|
|
6
|
+
idField: string;
|
|
7
|
+
fieldMap: XFieldMap;
|
|
8
|
+
assocMap: XAssocMap;
|
|
9
|
+
}
|
|
10
|
+
export interface XFieldMap {
|
|
11
|
+
[name: string]: XField;
|
|
12
|
+
}
|
|
13
|
+
export interface XAssocMap {
|
|
14
|
+
[name: string]: XAssoc;
|
|
15
|
+
}
|
|
16
|
+
export interface XField {
|
|
17
|
+
name: string;
|
|
18
|
+
type: string;
|
|
19
|
+
isNullable: boolean;
|
|
20
|
+
length?: number;
|
|
21
|
+
precision?: number;
|
|
22
|
+
scale?: number;
|
|
23
|
+
width?: number;
|
|
24
|
+
}
|
|
25
|
+
export type XRelationType = "one-to-one" | "one-to-many" | "many-to-one" | "many-to-many";
|
|
26
|
+
export interface XAssoc {
|
|
27
|
+
relationType: XRelationType;
|
|
28
|
+
name: string;
|
|
29
|
+
entityName: string;
|
|
30
|
+
inverseAssocName?: string;
|
|
31
|
+
isCascadeInsert: boolean;
|
|
32
|
+
isCascadeUpdate: boolean;
|
|
33
|
+
isCascadeRemove: boolean;
|
|
34
|
+
isNullable: boolean;
|
|
35
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"XEntityMetadata.js","sourceRoot":"","sources":["../../src/serverApi/XEntityMetadata.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"XFileJsonField.js","sourceRoot":"","sources":["../../src/serverApi/XFileJsonField.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"XPostLoginIfc.js","sourceRoot":"","sources":["../../src/serverApi/XPostLoginIfc.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"XUser.js","sourceRoot":"","sources":["../../src/serverApi/XUser.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"XUserAuthenticationIfc.js","sourceRoot":"","sources":["../../src/serverApi/XUserAuthenticationIfc.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { XEntity, XField } from "./XEntityMetadata.js";
|
|
2
|
+
import { XCustomFilter, XCustomFilterItem } from "./FindParam.js";
|
|
3
|
+
import { DataTableSortMeta } from "./PrimeFilterSortMeta.js";
|
|
4
|
+
export interface XParams {
|
|
5
|
+
[key: string]: any;
|
|
6
|
+
}
|
|
7
|
+
export declare class XUtilsCommon {
|
|
8
|
+
static newLine: string;
|
|
9
|
+
static getValueByPath(object: any, path: string): any;
|
|
10
|
+
static getValueOrValueListByPath(object: any, path: string): any | any[];
|
|
11
|
+
static setValueByPath(object: any, path: string, value: any): void;
|
|
12
|
+
static getFieldListForPath(path: string): string[];
|
|
13
|
+
static getFieldAndRestPath(path: string): [string, string | null];
|
|
14
|
+
static getPathToAssoc(path: string): string;
|
|
15
|
+
static getPathToAssocAndField(path: string): [string | null, string];
|
|
16
|
+
static isSingleField(path: string): boolean;
|
|
17
|
+
static getPrefixAndField(path: string): [string | null, string];
|
|
18
|
+
static createDisplayValue(object: any, xEntity: XEntity | undefined, fields: string[]): string;
|
|
19
|
+
static createDisplayValueForField(object: any, xEntity: XEntity | undefined, field: string): string;
|
|
20
|
+
static displayValueAsUI(prefix: string | null, value: any, xField: XField | undefined): string;
|
|
21
|
+
static objectAsJSON(value: any): string;
|
|
22
|
+
static arrayCreateMap<ID, T>(array: T[], idField: string): Map<ID, T>;
|
|
23
|
+
static arrayMoveElement(array: any[], position: number, offset: number): void;
|
|
24
|
+
static arraySort(array: any[], fieldOrValueFunction: string | ((item: any) => any)): any[];
|
|
25
|
+
static arrayIncludes<T>(array: T[], item: T, idField: string): boolean;
|
|
26
|
+
static arrayIntersect<T>(array1: T[], array2: T[], idField: string): T[];
|
|
27
|
+
static createCustomFilter(filter: string | undefined | null): XCustomFilterItem | undefined;
|
|
28
|
+
static createCustomFilterItems(customFilter: XCustomFilter | undefined): XCustomFilterItem[] | undefined;
|
|
29
|
+
static createMultiSortMeta(sortField: string | DataTableSortMeta[] | undefined): DataTableSortMeta[] | undefined;
|
|
30
|
+
static filterAnd(...filters: (XCustomFilter | undefined)[]): XCustomFilterItem[] | undefined;
|
|
31
|
+
static filterIdIn(idField: string, idList: number[]): XCustomFilter;
|
|
32
|
+
static createPathFieldExp(pathFieldOrPathFieldExp: string): string;
|
|
33
|
+
static isPathField(pathFieldOrPathFieldExp: string): boolean;
|
|
34
|
+
static getDayName(date: Date | null | undefined): string | undefined;
|
|
35
|
+
static dateAddDays(date: Date | null, days: number): Date | null;
|
|
36
|
+
static dateAddMonths(date: Date | null, months: number): Date | null;
|
|
37
|
+
static dateEquals(date1: Date | null, date2: Date | null): boolean;
|
|
38
|
+
static dateIntersect(date1From: Date, date1To: Date, date2From: Date, date2To: Date): boolean;
|
|
39
|
+
static dateCompare(date1: Date, date2: Date): number;
|
|
40
|
+
static dateDiffInYears(dateOld: Date | null, dateNew: Date | null): number | null;
|
|
41
|
+
static monthDiff(monthOld: Date | null, monthNew: Date | null): number | null;
|
|
42
|
+
static findFirstMatch(pattern: RegExp, value: string): string | null;
|
|
43
|
+
static sqlMaxDateIfNull(sqlExp: string): string;
|
|
44
|
+
static today(): Date;
|
|
45
|
+
static currentMonth(): Date;
|
|
46
|
+
static dateAsMonth(date: Date | null): Date | null;
|
|
47
|
+
static isInt(stringValue: string): boolean;
|
|
48
|
+
}
|