@lambdaorm/client 0.7.48
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/LICENSE/home/runner/work/core/core/LICENSE +9 -0
- package/README.md +201 -0
- package/application/IOrm.d.ts +65 -0
- package/application/IOrm.d.ts.map +1 -0
- package/application/IOrm.js +3 -0
- package/application/IOrm.js.map +1 -0
- package/application/index.d.ts +3 -0
- package/application/index.d.ts.map +1 -0
- package/application/index.js +19 -0
- package/application/index.js.map +1 -0
- package/application/services/GeneralService.d.ts +10 -0
- package/application/services/GeneralService.d.ts.map +1 -0
- package/application/services/GeneralService.js +3 -0
- package/application/services/GeneralService.js.map +1 -0
- package/application/services/QueryService.d.ts +50 -0
- package/application/services/QueryService.d.ts.map +1 -0
- package/application/services/QueryService.js +3 -0
- package/application/services/QueryService.js.map +1 -0
- package/application/services/SchemaService.d.ts +27 -0
- package/application/services/SchemaService.d.ts.map +1 -0
- package/application/services/SchemaService.js +3 -0
- package/application/services/SchemaService.js.map +1 -0
- package/application/services/StageService.d.ts +7 -0
- package/application/services/StageService.d.ts.map +1 -0
- package/application/services/StageService.js +3 -0
- package/application/services/StageService.js.map +1 -0
- package/application/services/index.d.ts +5 -0
- package/application/services/index.d.ts.map +1 -0
- package/application/services/index.js +21 -0
- package/application/services/index.js.map +1 -0
- package/domain/actions.d.ts +17 -0
- package/domain/actions.d.ts.map +1 -0
- package/domain/actions.js +38 -0
- package/domain/actions.js.map +1 -0
- package/domain/configuration.d.ts +84 -0
- package/domain/configuration.d.ts.map +1 -0
- package/domain/configuration.js +43 -0
- package/domain/configuration.js.map +1 -0
- package/domain/index.d.ts +5 -0
- package/domain/index.d.ts.map +1 -0
- package/domain/index.js +21 -0
- package/domain/index.js.map +1 -0
- package/domain/model.d.ts +121 -0
- package/domain/model.d.ts.map +1 -0
- package/domain/model.js +3 -0
- package/domain/model.js.map +1 -0
- package/domain/schema.d.ts +11 -0
- package/domain/schema.d.ts.map +1 -0
- package/domain/schema.js +3 -0
- package/domain/schema.js.map +1 -0
- package/index.d.ts +6 -0
- package/index.d.ts.map +1 -0
- package/index.js +24 -0
- package/index.js.map +1 -0
- package/infrastructure/adapters/GeneralApiService.d.ts +14 -0
- package/infrastructure/adapters/GeneralApiService.d.ts.map +1 -0
- package/infrastructure/adapters/GeneralApiService.js +27 -0
- package/infrastructure/adapters/GeneralApiService.js.map +1 -0
- package/infrastructure/adapters/QueryApiService.d.ts +63 -0
- package/infrastructure/adapters/QueryApiService.d.ts.map +1 -0
- package/infrastructure/adapters/QueryApiService.js +66 -0
- package/infrastructure/adapters/QueryApiService.js.map +1 -0
- package/infrastructure/adapters/SchemaApiService.d.ts +31 -0
- package/infrastructure/adapters/SchemaApiService.d.ts.map +1 -0
- package/infrastructure/adapters/SchemaApiService.js +71 -0
- package/infrastructure/adapters/SchemaApiService.js.map +1 -0
- package/infrastructure/adapters/StageApiService.d.ts +11 -0
- package/infrastructure/adapters/StageApiService.d.ts.map +1 -0
- package/infrastructure/adapters/StageApiService.js +23 -0
- package/infrastructure/adapters/StageApiService.js.map +1 -0
- package/infrastructure/adapters/orm.d.ts +78 -0
- package/infrastructure/adapters/orm.d.ts.map +1 -0
- package/infrastructure/adapters/orm.js +104 -0
- package/infrastructure/adapters/orm.js.map +1 -0
- package/infrastructure/api/base.d.ts +55 -0
- package/infrastructure/api/base.d.ts.map +1 -0
- package/infrastructure/api/base.js +61 -0
- package/infrastructure/api/base.js.map +1 -0
- package/infrastructure/api/common.d.ts +66 -0
- package/infrastructure/api/common.d.ts.map +1 -0
- package/infrastructure/api/common.js +138 -0
- package/infrastructure/api/common.js.map +1 -0
- package/infrastructure/api/generalApi.d.ts +130 -0
- package/infrastructure/api/generalApi.d.ts.map +1 -0
- package/infrastructure/api/generalApi.js +248 -0
- package/infrastructure/api/generalApi.js.map +1 -0
- package/infrastructure/api/index.d.ts +5 -0
- package/infrastructure/api/index.d.ts.map +1 -0
- package/infrastructure/api/index.js +21 -0
- package/infrastructure/api/index.js.map +1 -0
- package/infrastructure/api/queryApi.d.ts +220 -0
- package/infrastructure/api/queryApi.d.ts.map +1 -0
- package/infrastructure/api/queryApi.js +408 -0
- package/infrastructure/api/queryApi.js.map +1 -0
- package/infrastructure/api/schemaApi.d.ts +440 -0
- package/infrastructure/api/schemaApi.d.ts.map +1 -0
- package/infrastructure/api/schemaApi.js +847 -0
- package/infrastructure/api/schemaApi.js.map +1 -0
- package/infrastructure/api/stageApi.d.ts +122 -0
- package/infrastructure/api/stageApi.d.ts.map +1 -0
- package/infrastructure/api/stageApi.js +227 -0
- package/infrastructure/api/stageApi.js.map +1 -0
- package/infrastructure/index.d.ts +4 -0
- package/infrastructure/index.d.ts.map +1 -0
- package/infrastructure/index.js +20 -0
- package/infrastructure/index.js.map +1 -0
- package/infrastructure/library.d.ts +8 -0
- package/infrastructure/library.d.ts.map +1 -0
- package/infrastructure/library.js +31 -0
- package/infrastructure/library.js.map +1 -0
- package/infrastructure/repository.d.ts +40 -0
- package/infrastructure/repository.d.ts.map +1 -0
- package/infrastructure/repository.js +88 -0
- package/infrastructure/repository.js.map +1 -0
- package/jest-config.json +20 -0
- package/package.json +50 -0
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SchemaApiService = void 0;
|
|
4
|
+
class SchemaApiService {
|
|
5
|
+
// eslint-disable-next-line no-useless-constructor
|
|
6
|
+
constructor(schemaApi) {
|
|
7
|
+
this.schemaApi = schemaApi;
|
|
8
|
+
}
|
|
9
|
+
async version() {
|
|
10
|
+
const result = await this.schemaApi.version();
|
|
11
|
+
return result.data;
|
|
12
|
+
}
|
|
13
|
+
async schema() {
|
|
14
|
+
const result = await this.schemaApi.schema();
|
|
15
|
+
return result.data;
|
|
16
|
+
}
|
|
17
|
+
async domain() {
|
|
18
|
+
const result = await this.schemaApi.domain();
|
|
19
|
+
return result.data;
|
|
20
|
+
}
|
|
21
|
+
async entities() {
|
|
22
|
+
const result = await this.schemaApi.entities();
|
|
23
|
+
return result.data;
|
|
24
|
+
}
|
|
25
|
+
async entity(entity) {
|
|
26
|
+
const result = await this.schemaApi.entity(entity);
|
|
27
|
+
return result.data;
|
|
28
|
+
}
|
|
29
|
+
async enums() {
|
|
30
|
+
const result = await this.schemaApi.enums();
|
|
31
|
+
return result.data;
|
|
32
|
+
}
|
|
33
|
+
async enum(_enum) {
|
|
34
|
+
const result = await this.schemaApi._enum(_enum);
|
|
35
|
+
return result.data;
|
|
36
|
+
}
|
|
37
|
+
async mappings() {
|
|
38
|
+
const result = await this.schemaApi.mappings();
|
|
39
|
+
return result.data;
|
|
40
|
+
}
|
|
41
|
+
async mapping(mapping) {
|
|
42
|
+
const result = await this.schemaApi.mapping(mapping);
|
|
43
|
+
return result.data;
|
|
44
|
+
}
|
|
45
|
+
async entityMapping(mapping, entity) {
|
|
46
|
+
const result = await this.schemaApi.entityMapping(mapping, entity);
|
|
47
|
+
return result.data;
|
|
48
|
+
}
|
|
49
|
+
async sources() {
|
|
50
|
+
const result = await this.schemaApi.sources();
|
|
51
|
+
return result.data;
|
|
52
|
+
}
|
|
53
|
+
async source(source) {
|
|
54
|
+
const result = await this.schemaApi.source(source);
|
|
55
|
+
return result.data;
|
|
56
|
+
}
|
|
57
|
+
async stages() {
|
|
58
|
+
const result = await this.schemaApi.stages();
|
|
59
|
+
return result.data;
|
|
60
|
+
}
|
|
61
|
+
async stage(stage) {
|
|
62
|
+
const result = await this.schemaApi.stage(stage);
|
|
63
|
+
return result.data;
|
|
64
|
+
}
|
|
65
|
+
async views() {
|
|
66
|
+
const result = await this.schemaApi.views();
|
|
67
|
+
return result.data;
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
exports.SchemaApiService = SchemaApiService;
|
|
71
|
+
//# sourceMappingURL=SchemaApiService.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SchemaApiService.js","sourceRoot":"","sources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AE,CAAA;QACxE,OAAO,MAAM,CAAC,IAAI,CAAA;IACnB,CAAC;CACD;AA9ED,4CA8EC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ClientStageService } from '../../application/services';
|
|
2
|
+
import { SchemaData } from '@lambdaorm/base';
|
|
3
|
+
import { StageApi } from '../api';
|
|
4
|
+
export declare class StageApiService implements ClientStageService {
|
|
5
|
+
private readonly stageApi;
|
|
6
|
+
constructor(stageApi: StageApi);
|
|
7
|
+
exists(stage: string): Promise<boolean>;
|
|
8
|
+
export(stage: string): Promise<SchemaData>;
|
|
9
|
+
import(stage: string, schemaData: any): Promise<void>;
|
|
10
|
+
}
|
|
11
|
+
//# sourceMappingURL=StageApiService.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"StageApiService.d.ts","sourceRoot":"","sources":["../../../../src/lib/infrastructure/adapters/StageApiService.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAA;AAC/D,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AAC5C,OAAO,EAAE,QAAQ,EAAE,MAAM,QAAQ,CAAA;AAGjC,qBAAa,eAAgB,YAAW,kBAAkB;IAE5C,OAAO,CAAC,QAAQ,CAAC,QAAQ;gBAAR,QAAQ,EAAC,QAAQ;IAElC,MAAM,CAAE,KAAK,EAAC,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAKvC,MAAM,CAAE,KAAK,EAAC,MAAM,GAAG,OAAO,CAAC,UAAU,CAAC;IAK1C,MAAM,CAAE,KAAK,EAAC,MAAM,EAAE,UAAU,EAAC,GAAG,GAAG,OAAO,CAAC,IAAI,CAAC;CAIjE"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.StageApiService = void 0;
|
|
4
|
+
class StageApiService {
|
|
5
|
+
// eslint-disable-next-line no-useless-constructor
|
|
6
|
+
constructor(stageApi) {
|
|
7
|
+
this.stageApi = stageApi;
|
|
8
|
+
}
|
|
9
|
+
async exists(stage) {
|
|
10
|
+
const result = await this.stageApi.exists(stage);
|
|
11
|
+
return result.data;
|
|
12
|
+
}
|
|
13
|
+
async export(stage) {
|
|
14
|
+
const result = await this.stageApi._export(stage);
|
|
15
|
+
return result.data;
|
|
16
|
+
}
|
|
17
|
+
async import(stage, schemaData) {
|
|
18
|
+
const result = await this.stageApi._import(stage, schemaData);
|
|
19
|
+
return result.data;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
exports.StageApiService = StageApiService;
|
|
23
|
+
//# sourceMappingURL=StageApiService.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"StageApiService.js","sourceRoot":"","sources":["../../../../src/lib/infrastructure/adapters/StageApiService.ts"],"names":[],"mappings":";;;AAKA,MAAa,eAAe;IAC3B,kDAAkD;IAClD,YAA8B,QAAiB;QAAjB,aAAQ,GAAR,QAAQ,CAAS;IAAG,CAAC;IAE5C,KAAK,CAAC,MAAM,CAAE,KAAY;QAChC,MAAM,MAAM,GAA+B,MAAM,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,KAAK,CAAC,CAAA;QAC5E,OAAO,MAAM,CAAC,IAAI,CAAA;IACnB,CAAC;IAEM,KAAK,CAAC,MAAM,CAAE,KAAY;QAChC,MAAM,MAAM,GAAkC,MAAM,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,KAAK,CAAC,CAAA;QAChF,OAAO,MAAM,CAAC,IAAI,CAAA;IACnB,CAAC;IAEM,KAAK,CAAC,MAAM,CAAE,KAAY,EAAE,UAAc;QAChD,MAAM,MAAM,GAA4B,MAAM,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,KAAK,EAAE,UAAU,CAAC,CAAA;QACtF,OAAO,MAAM,CAAC,IAAI,CAAA;IACnB,CAAC;CACD;AAlBD,0CAkBC"}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { IOrm, ClientGeneralService, ClientStageService, ClientSchemaService } from '../../application';
|
|
2
|
+
import { QueryOptions, QueryPlan, Metadata, MetadataModel, MetadataConstraint, MetadataParameter } from '@lambdaorm/base';
|
|
3
|
+
/**
|
|
4
|
+
* Facade through which you can access all the functionalities of the library.
|
|
5
|
+
*/
|
|
6
|
+
export declare class Orm implements IOrm {
|
|
7
|
+
private static _instance;
|
|
8
|
+
url: string;
|
|
9
|
+
private configuration?;
|
|
10
|
+
private queryService?;
|
|
11
|
+
private generalService?;
|
|
12
|
+
private schemaService?;
|
|
13
|
+
private stageService?;
|
|
14
|
+
constructor(url?: string);
|
|
15
|
+
/**
|
|
16
|
+
* Singleton
|
|
17
|
+
*/
|
|
18
|
+
static get instance(): IOrm;
|
|
19
|
+
init(url?: string): Promise<void>;
|
|
20
|
+
end(): Promise<void>;
|
|
21
|
+
get general(): ClientGeneralService;
|
|
22
|
+
get schema(): ClientSchemaService;
|
|
23
|
+
get stage(): ClientStageService;
|
|
24
|
+
/**
|
|
25
|
+
* Get model of query
|
|
26
|
+
* @param query query expression
|
|
27
|
+
* @returns Model of query
|
|
28
|
+
*/
|
|
29
|
+
model(query: Function): Promise<MetadataModel[]>;
|
|
30
|
+
model(query: string): Promise<MetadataModel[]>;
|
|
31
|
+
/**
|
|
32
|
+
* Get parameters of query
|
|
33
|
+
* @param query query expression
|
|
34
|
+
* @returns Parameters of query
|
|
35
|
+
*/
|
|
36
|
+
parameters(query: Function): Promise<MetadataParameter[]>;
|
|
37
|
+
parameters(query: string): Promise<MetadataParameter[]>;
|
|
38
|
+
/**
|
|
39
|
+
* Get constraints of query
|
|
40
|
+
* @param query query expression
|
|
41
|
+
* @returns Constraints of query
|
|
42
|
+
*/
|
|
43
|
+
constraints(query: Function): Promise<MetadataConstraint>;
|
|
44
|
+
constraints(query: string): Promise<MetadataConstraint>;
|
|
45
|
+
/**
|
|
46
|
+
* Get metadata of query
|
|
47
|
+
* @param query query expression
|
|
48
|
+
* @returns metadata of query
|
|
49
|
+
*/
|
|
50
|
+
metadata(query: Function): Promise<Metadata>;
|
|
51
|
+
metadata(query: string): Promise<Metadata>;
|
|
52
|
+
/**
|
|
53
|
+
* Get getInfo of query
|
|
54
|
+
* @param query query expression
|
|
55
|
+
* @param options options of execution
|
|
56
|
+
*/
|
|
57
|
+
plan(query: Function, options?: QueryOptions): Promise<QueryPlan>;
|
|
58
|
+
plan(query: string, options?: QueryOptions): Promise<QueryPlan>;
|
|
59
|
+
/**
|
|
60
|
+
* Execute query
|
|
61
|
+
* @param query query expression
|
|
62
|
+
* @param data Data with variables
|
|
63
|
+
* @param options options of execution
|
|
64
|
+
* @returns Result of execution
|
|
65
|
+
*/
|
|
66
|
+
execute(query: Function, data?: any, options?: QueryOptions): Promise<any>;
|
|
67
|
+
execute(query: string, data?: any, options?: QueryOptions): Promise<any>;
|
|
68
|
+
/**
|
|
69
|
+
* Execute query
|
|
70
|
+
* @param query query expression
|
|
71
|
+
* @param data Data with variables
|
|
72
|
+
* @param options options of execution
|
|
73
|
+
* @returns Result of execution
|
|
74
|
+
*/
|
|
75
|
+
executeQueued(query: Function, topic: string, data?: any, chunk?: number, options?: QueryOptions): Promise<any>;
|
|
76
|
+
executeQueued(query: string, topic: string, data?: any, chunk?: number, options?: QueryOptions): Promise<any>;
|
|
77
|
+
}
|
|
78
|
+
//# sourceMappingURL=orm.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"orm.d.ts","sourceRoot":"","sources":["../../../../src/lib/infrastructure/adapters/orm.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,IAAI,EAAsB,oBAAoB,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAA;AAE3H,OAAO,EAAE,YAAY,EAAE,SAAS,EAAE,QAAQ,EAAE,aAAa,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAA;AASzH;;G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CAAC;IAQtD;;;;OAIG;IACU,IAAI,CAAC,KAAK,EAAE,QAAQ,EAAE,OAAO,CAAC,EAAE,YAAY,GAAG,OAAO,CAAC,SAAS,CAAC;IACjE,IAAI,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,YAAY,GAAG,OAAO,CAAC,SAAS,CAAC;IAQ5E;;;;;;OAMG;IACU,OAAO,CAAC,KAAK,EAAE,QAAQ,EAAE,IAAI,CAAC,EAAE,GAAG,EAAE,OAAO,CAAC,EAAE,YAAY,GAAE,OAAO,CAAC,GAAG,CAAC;IACzE,OAAO,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,GAAG,EAAE,OAAO,CAAC,EAAE,YAAY,GAAE,OAAO,CAAC,GAAG,CAAC;IAQpF;;;;;;OAMG;IACU,aAAa,CAAC,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAC,MAAM,EAAE,IAAI,CAAC,EAAE,GAAG,EAAE,KAAK,CAAC,EAAC,MAAM,EAAE,OAAO,CAAC,EAAE,YAAY,GAAE,OAAO,CAAC,GAAG,CAAC;IAC5G,aAAa,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAC,MAAM,EAAE,IAAI,CAAC,EAAE,GAAG,EAAE,KAAK,CAAC,EAAC,MAAM,EAAE,OAAO,CAAC,EAAE,YAAY,GAAE,OAAO,CAAC,GAAG,CAAC;CAOvH"}
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* eslint-disable @typescript-eslint/ban-types */
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.Orm = void 0;
|
|
5
|
+
const domain_1 = require("../../domain");
|
|
6
|
+
const _3xpr_1 = require("3xpr");
|
|
7
|
+
const __1 = require("../");
|
|
8
|
+
const api_1 = require("../api");
|
|
9
|
+
const QueryApiService_1 = require("./QueryApiService");
|
|
10
|
+
const GeneralApiService_1 = require("./GeneralApiService");
|
|
11
|
+
const SchemaApiService_1 = require("./SchemaApiService");
|
|
12
|
+
const StageApiService_1 = require("./StageApiService");
|
|
13
|
+
/**
|
|
14
|
+
* Facade through which you can access all the functionalities of the library.
|
|
15
|
+
*/
|
|
16
|
+
class Orm {
|
|
17
|
+
constructor(url = 'http://localhost:9289') {
|
|
18
|
+
this.url = url;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Singleton
|
|
22
|
+
*/
|
|
23
|
+
static get instance() {
|
|
24
|
+
if (!this._instance) {
|
|
25
|
+
this._instance = new Orm();
|
|
26
|
+
}
|
|
27
|
+
return this._instance;
|
|
28
|
+
}
|
|
29
|
+
async init(url) {
|
|
30
|
+
if (url) {
|
|
31
|
+
this.url = url;
|
|
32
|
+
}
|
|
33
|
+
new __1.SentenceLibrary(_3xpr_1.expressions).load();
|
|
34
|
+
this.configuration = new domain_1.Configuration({ basePath: this.url });
|
|
35
|
+
this.queryService = new QueryApiService_1.QueryApiService(new api_1.QueryApi(this.configuration));
|
|
36
|
+
this.generalService = new GeneralApiService_1.GeneralApiService(new api_1.GeneralApi(this.configuration));
|
|
37
|
+
this.schemaService = new SchemaApiService_1.SchemaApiService(new api_1.SchemaApi(this.configuration));
|
|
38
|
+
this.stageService = new StageApiService_1.StageApiService(new api_1.StageApi(this.configuration));
|
|
39
|
+
}
|
|
40
|
+
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
41
|
+
async end() { }
|
|
42
|
+
get general() {
|
|
43
|
+
if (!this.generalService) {
|
|
44
|
+
throw new Error('Orm not initialized');
|
|
45
|
+
}
|
|
46
|
+
return this.generalService;
|
|
47
|
+
}
|
|
48
|
+
get schema() {
|
|
49
|
+
if (!this.schemaService) {
|
|
50
|
+
throw new Error('Orm not initialized');
|
|
51
|
+
}
|
|
52
|
+
return this.schemaService;
|
|
53
|
+
}
|
|
54
|
+
get stage() {
|
|
55
|
+
if (!this.stageService) {
|
|
56
|
+
throw new Error('Orm not initialized');
|
|
57
|
+
}
|
|
58
|
+
return this.stageService;
|
|
59
|
+
}
|
|
60
|
+
async model(query) {
|
|
61
|
+
if (!this.queryService) {
|
|
62
|
+
throw new Error('Orm not initialized');
|
|
63
|
+
}
|
|
64
|
+
return this.queryService.model(query);
|
|
65
|
+
}
|
|
66
|
+
async parameters(query) {
|
|
67
|
+
if (!this.queryService) {
|
|
68
|
+
throw new Error('Orm not initialized');
|
|
69
|
+
}
|
|
70
|
+
return this.queryService.parameters(query);
|
|
71
|
+
}
|
|
72
|
+
async constraints(query) {
|
|
73
|
+
if (!this.queryService) {
|
|
74
|
+
throw new Error('Orm not initialized');
|
|
75
|
+
}
|
|
76
|
+
return this.queryService.constraints(query);
|
|
77
|
+
}
|
|
78
|
+
async metadata(query) {
|
|
79
|
+
if (!this.queryService) {
|
|
80
|
+
throw new Error('Orm not initialized');
|
|
81
|
+
}
|
|
82
|
+
return this.queryService.metadata(query);
|
|
83
|
+
}
|
|
84
|
+
async plan(query, options) {
|
|
85
|
+
if (!this.queryService) {
|
|
86
|
+
throw new Error('Orm not initialized');
|
|
87
|
+
}
|
|
88
|
+
return this.queryService.plan(query, options);
|
|
89
|
+
}
|
|
90
|
+
async execute(query, data = {}, options = undefined) {
|
|
91
|
+
if (!this.queryService) {
|
|
92
|
+
throw new Error('Orm not initialized');
|
|
93
|
+
}
|
|
94
|
+
return this.queryService.execute(query, data, options);
|
|
95
|
+
}
|
|
96
|
+
async executeQueued(query, topic, data = {}, chunk, options = undefined) {
|
|
97
|
+
if (!this.queryService) {
|
|
98
|
+
throw new Error('Orm not initialized');
|
|
99
|
+
}
|
|
100
|
+
return this.queryService.executeQueued(query, data, options);
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
exports.Orm = Orm;
|
|
104
|
+
//# sourceMappingURL=orm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"orm.js","sourceRoot":"","sources":["../../../../src/lib/infrastructure/adapters/orm.ts"],"names":[],"mappings":";AAAA,iDAAi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*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
import { Configuration } from "../../domain/configuration";
|
|
13
|
+
import { AxiosInstance, AxiosRequestConfig } from 'axios';
|
|
14
|
+
/**
|
|
15
|
+
*
|
|
16
|
+
* @export
|
|
17
|
+
*/
|
|
18
|
+
export declare const COLLECTION_FORMATS: {
|
|
19
|
+
csv: string;
|
|
20
|
+
ssv: string;
|
|
21
|
+
tsv: string;
|
|
22
|
+
pipes: string;
|
|
23
|
+
};
|
|
24
|
+
/**
|
|
25
|
+
*
|
|
26
|
+
* @export
|
|
27
|
+
* @interface RequestArgs
|
|
28
|
+
*/
|
|
29
|
+
export interface RequestArgs {
|
|
30
|
+
url: string;
|
|
31
|
+
options: AxiosRequestConfig;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
*
|
|
35
|
+
* @export
|
|
36
|
+
* @class BaseAPI
|
|
37
|
+
*/
|
|
38
|
+
export declare class BaseAPI {
|
|
39
|
+
protected axios: AxiosInstance;
|
|
40
|
+
protected configuration: Configuration;
|
|
41
|
+
protected basePath: string | undefined;
|
|
42
|
+
constructor(configuration: Configuration, axios?: AxiosInstance);
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
*
|
|
46
|
+
* @export
|
|
47
|
+
* @class RequiredError
|
|
48
|
+
* @extends {Error}
|
|
49
|
+
*/
|
|
50
|
+
export declare class RequiredError extends Error {
|
|
51
|
+
field: string;
|
|
52
|
+
name: "RequiredError";
|
|
53
|
+
constructor(field: string, msg?: string);
|
|
54
|
+
}
|
|
55
|
+
//# sourceMappingURL=base.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"base.d.ts","sourceRoot":"","sources":["../../../../src/lib/infrastructure/api/base.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;GAUG;AAGH,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAG3D,OAAoB,EAAgB,aAAa,EAAE,kBAAkB,EAAE,MAAM,OAAO,CAAC;AACrF;;;GAGG;AACH,eAAO,MAAM,kBAAkB;;;;;CAK9B,CAAC;AAEF;;;;GAIG;AACH,MAAM,WAAW,WAAW;IACxB,GAAG,EAAE,MAAM,CAAC;IACZ,OAAO,EAAE,kBAAkB,CAAC;CAC/B;AAED;;;;GAIG;AACH,qBAAa,OAAO;IAIyB,SAAS,CAAC,KAAK,EAAE,aAAa;IAHvE,SAAS,CAAC,aAAa,EAAE,aAAa,CAAA;IACtC,SAAS,CAAC,QAAQ,EAAC,MAAM,GAAG,SAAS,CAAA;gBAEzB,aAAa,EAAE,aAAa,EAAW,KAAK,GAAE,aAA2B;CAIxF;AAED;;;;;GAKG;AACH,qBAAa,aAAc,SAAQ,KAAK;IAEjB,KAAK,EAAE,MAAM;IADhC,IAAI,EAAE,eAAe,CAAmB;gBACrB,KAAK,EAAE,MAAM,EAAE,GAAG,CAAC,EAAE,MAAM;CAGjD"}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* λORM Service
|
|
6
|
+
* service of lambda orm
|
|
7
|
+
*
|
|
8
|
+
* The version of the OpenAPI document: 0.3.0
|
|
9
|
+
* Contact: flaviolrita@hotmail.com
|
|
10
|
+
*
|
|
11
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
|
+
* https://openapi-generator.tech
|
|
13
|
+
* Do not edit the class manually.
|
|
14
|
+
*/
|
|
15
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
16
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
17
|
+
};
|
|
18
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
19
|
+
exports.RequiredError = exports.BaseAPI = exports.COLLECTION_FORMATS = void 0;
|
|
20
|
+
// Some imports not used depending on template conditions
|
|
21
|
+
// @ts-ignore
|
|
22
|
+
const axios_1 = __importDefault(require("axios"));
|
|
23
|
+
/**
|
|
24
|
+
*
|
|
25
|
+
* @export
|
|
26
|
+
*/
|
|
27
|
+
exports.COLLECTION_FORMATS = {
|
|
28
|
+
csv: ",",
|
|
29
|
+
ssv: " ",
|
|
30
|
+
tsv: "\t",
|
|
31
|
+
pipes: "|",
|
|
32
|
+
};
|
|
33
|
+
/**
|
|
34
|
+
*
|
|
35
|
+
* @export
|
|
36
|
+
* @class BaseAPI
|
|
37
|
+
*/
|
|
38
|
+
class BaseAPI {
|
|
39
|
+
constructor(configuration, axios = axios_1.default) {
|
|
40
|
+
this.axios = axios;
|
|
41
|
+
this.configuration = configuration;
|
|
42
|
+
this.basePath = configuration.basePath || 'http://0.0.0.0/9291';
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
exports.BaseAPI = BaseAPI;
|
|
46
|
+
;
|
|
47
|
+
/**
|
|
48
|
+
*
|
|
49
|
+
* @export
|
|
50
|
+
* @class RequiredError
|
|
51
|
+
* @extends {Error}
|
|
52
|
+
*/
|
|
53
|
+
class RequiredError extends Error {
|
|
54
|
+
constructor(field, msg) {
|
|
55
|
+
super(msg);
|
|
56
|
+
this.field = field;
|
|
57
|
+
this.name = "RequiredError";
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
exports.RequiredError = RequiredError;
|
|
61
|
+
//# sourceMappingURL=base.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"base.js","sourceRoot":"","sources":["../../../../src/lib/infrastructure/api/base.ts"],"names":[],"mappings":";AAAA,oBAAoB;AACpB,oBAAoB;AACpB;;;;;;;;;;GAUG;;;;;;AAIH,yDAAyD;AACzD,aAAa;AACb,kDAAqF;AACrF;;;GAGG;AACU,QAAA,kBAAkB,GAAG;IAC9B,GAAG,EAAE,GAAG;IACR,GAAG,EAAE,GAAG;IACR,GAAG,EAAE,IAAI;IACT,KAAK,EAAE,GAAG;CACb,CAAC;AAYF;;;;GAIG;AACH,MAAa,OAAO;IAIhB,YAAY,aAA4B,EAAW,QAAuB,eAAW;QAAlC,UAAK,GAAL,KAAK,CAA6B;QACjF,IAAI,CAAC,aAAa,GAAG,aAAa,CAAC;QACnC,IAAI,CAAC,QAAQ,GAAG,aAAa,CAAC,QAAQ,IAAI,qBAAqB,CAAA;IACnE,CAAC;CACJ;AARD,0BAQC;AAAA,CAAC;AAEF;;;;;GAKG;AACH,MAAa,aAAc,SAAQ,KAAK;IAEpC,YAAmB,KAAa,EAAE,GAAY;QAC1C,KAAK,CAAC,GAAG,CAAC,CAAC;QADI,UAAK,GAAL,KAAK,CAAQ;QADhC,SAAI,GAAoB,eAAe,CAAC;IAGxC,CAAC;CACJ;AALD,sCAKC"}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* λORM Service
|
|
3
|
+
* service of lambda orm
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 0.3.0
|
|
6
|
+
* Contact: flaviolrita@hotmail.com
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
import { Configuration } from "../../domain/configuration";
|
|
13
|
+
import { RequestArgs } from "./base";
|
|
14
|
+
import { AxiosInstance, AxiosResponse } from 'axios';
|
|
15
|
+
/**
|
|
16
|
+
*
|
|
17
|
+
* @export
|
|
18
|
+
*/
|
|
19
|
+
export declare const DUMMY_BASE_URL = "https://example.com";
|
|
20
|
+
/**
|
|
21
|
+
*
|
|
22
|
+
* @throws {RequiredError}
|
|
23
|
+
* @export
|
|
24
|
+
*/
|
|
25
|
+
export declare const assertParamExists: (functionName: string, paramName: string, paramValue: unknown) => void;
|
|
26
|
+
/**
|
|
27
|
+
*
|
|
28
|
+
* @export
|
|
29
|
+
*/
|
|
30
|
+
export declare const setApiKeyToObject: (object: any, keyParamName: string, configuration?: Configuration) => Promise<void>;
|
|
31
|
+
/**
|
|
32
|
+
*
|
|
33
|
+
* @export
|
|
34
|
+
*/
|
|
35
|
+
export declare const setBasicAuthToObject: (object: any, configuration?: Configuration) => void;
|
|
36
|
+
/**
|
|
37
|
+
*
|
|
38
|
+
* @export
|
|
39
|
+
*/
|
|
40
|
+
export declare const setBearerAuthToObject: (object: any, configuration?: Configuration) => Promise<void>;
|
|
41
|
+
/**
|
|
42
|
+
*
|
|
43
|
+
* @export
|
|
44
|
+
*/
|
|
45
|
+
export declare const setOAuthToObject: (object: any, name: string, scopes: string[], configuration?: Configuration) => Promise<void>;
|
|
46
|
+
/**
|
|
47
|
+
*
|
|
48
|
+
* @export
|
|
49
|
+
*/
|
|
50
|
+
export declare const setSearchParams: (url: URL, ...objects: any[]) => void;
|
|
51
|
+
/**
|
|
52
|
+
*
|
|
53
|
+
* @export
|
|
54
|
+
*/
|
|
55
|
+
export declare const serializeDataIfNeeded: (value: any, requestOptions: any, configuration?: Configuration) => any;
|
|
56
|
+
/**
|
|
57
|
+
*
|
|
58
|
+
* @export
|
|
59
|
+
*/
|
|
60
|
+
export declare const toPathString: (url: URL) => string;
|
|
61
|
+
/**
|
|
62
|
+
*
|
|
63
|
+
* @export
|
|
64
|
+
*/
|
|
65
|
+
export declare const createRequestFunction: (axiosArgs: RequestArgs, globalAxios: AxiosInstance, configuration: Configuration) => <T = unknown, R = AxiosResponse<T>>(axios?: AxiosInstance) => Promise<R>;
|
|
66
|
+
//# sourceMappingURL=common.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../../../../src/lib/infrastructure/api/common.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;GAUG;AAGH,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAC3D,OAAO,E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
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* λORM Service
|
|
6
|
+
* service of lambda orm
|
|
7
|
+
*
|
|
8
|
+
* The version of the OpenAPI document: 0.3.0
|
|
9
|
+
* Contact: flaviolrita@hotmail.com
|
|
10
|
+
*
|
|
11
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
|
+
* https://openapi-generator.tech
|
|
13
|
+
* Do not edit the class manually.
|
|
14
|
+
*/
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.createRequestFunction = exports.toPathString = exports.serializeDataIfNeeded = exports.setSearchParams = exports.setOAuthToObject = exports.setBearerAuthToObject = exports.setBasicAuthToObject = exports.setApiKeyToObject = exports.assertParamExists = exports.DUMMY_BASE_URL = void 0;
|
|
17
|
+
const base_1 = require("./base");
|
|
18
|
+
/**
|
|
19
|
+
*
|
|
20
|
+
* @export
|
|
21
|
+
*/
|
|
22
|
+
exports.DUMMY_BASE_URL = 'https://example.com';
|
|
23
|
+
/**
|
|
24
|
+
*
|
|
25
|
+
* @throws {RequiredError}
|
|
26
|
+
* @export
|
|
27
|
+
*/
|
|
28
|
+
const assertParamExists = function (functionName, paramName, paramValue) {
|
|
29
|
+
if (paramValue === null || paramValue === undefined) {
|
|
30
|
+
throw new base_1.RequiredError(paramName, `Required parameter ${paramName} was null or undefined when calling ${functionName}.`);
|
|
31
|
+
}
|
|
32
|
+
};
|
|
33
|
+
exports.assertParamExists = assertParamExists;
|
|
34
|
+
/**
|
|
35
|
+
*
|
|
36
|
+
* @export
|
|
37
|
+
*/
|
|
38
|
+
const setApiKeyToObject = async function (object, keyParamName, configuration) {
|
|
39
|
+
if (configuration && configuration.apiKey) {
|
|
40
|
+
const localVarApiKeyValue = typeof configuration.apiKey === 'function'
|
|
41
|
+
? await configuration.apiKey(keyParamName)
|
|
42
|
+
: await configuration.apiKey;
|
|
43
|
+
object[keyParamName] = localVarApiKeyValue;
|
|
44
|
+
}
|
|
45
|
+
};
|
|
46
|
+
exports.setApiKeyToObject = setApiKeyToObject;
|
|
47
|
+
/**
|
|
48
|
+
*
|
|
49
|
+
* @export
|
|
50
|
+
*/
|
|
51
|
+
const setBasicAuthToObject = function (object, configuration) {
|
|
52
|
+
if (configuration && (configuration.username || configuration.password)) {
|
|
53
|
+
object["auth"] = { username: configuration.username, password: configuration.password };
|
|
54
|
+
}
|
|
55
|
+
};
|
|
56
|
+
exports.setBasicAuthToObject = setBasicAuthToObject;
|
|
57
|
+
/**
|
|
58
|
+
*
|
|
59
|
+
* @export
|
|
60
|
+
*/
|
|
61
|
+
const setBearerAuthToObject = async function (object, configuration) {
|
|
62
|
+
if (configuration && configuration.accessToken) {
|
|
63
|
+
const accessToken = typeof configuration.accessToken === 'function'
|
|
64
|
+
? await configuration.accessToken()
|
|
65
|
+
: await configuration.accessToken;
|
|
66
|
+
object["Authorization"] = "Bearer " + accessToken;
|
|
67
|
+
}
|
|
68
|
+
};
|
|
69
|
+
exports.setBearerAuthToObject = setBearerAuthToObject;
|
|
70
|
+
/**
|
|
71
|
+
*
|
|
72
|
+
* @export
|
|
73
|
+
*/
|
|
74
|
+
const setOAuthToObject = async function (object, name, scopes, configuration) {
|
|
75
|
+
if (configuration && configuration.accessToken) {
|
|
76
|
+
const localVarAccessTokenValue = typeof configuration.accessToken === 'function'
|
|
77
|
+
? await configuration.accessToken(name, scopes)
|
|
78
|
+
: await configuration.accessToken;
|
|
79
|
+
object["Authorization"] = "Bearer " + localVarAccessTokenValue;
|
|
80
|
+
}
|
|
81
|
+
};
|
|
82
|
+
exports.setOAuthToObject = setOAuthToObject;
|
|
83
|
+
/**
|
|
84
|
+
*
|
|
85
|
+
* @export
|
|
86
|
+
*/
|
|
87
|
+
const setSearchParams = function (url, ...objects) {
|
|
88
|
+
const searchParams = new URLSearchParams(url.search);
|
|
89
|
+
for (const object of objects) {
|
|
90
|
+
for (const key in object) {
|
|
91
|
+
if (Array.isArray(object[key])) {
|
|
92
|
+
searchParams.delete(key);
|
|
93
|
+
for (const item of object[key]) {
|
|
94
|
+
searchParams.append(key, item);
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
else {
|
|
98
|
+
searchParams.set(key, object[key]);
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
url.search = searchParams.toString();
|
|
103
|
+
};
|
|
104
|
+
exports.setSearchParams = setSearchParams;
|
|
105
|
+
/**
|
|
106
|
+
*
|
|
107
|
+
* @export
|
|
108
|
+
*/
|
|
109
|
+
const serializeDataIfNeeded = function (value, requestOptions, configuration) {
|
|
110
|
+
const nonString = typeof value !== 'string';
|
|
111
|
+
const needsSerialization = nonString && configuration && configuration.isJsonMime
|
|
112
|
+
? configuration.isJsonMime(requestOptions.headers['Content-Type'])
|
|
113
|
+
: nonString;
|
|
114
|
+
return needsSerialization
|
|
115
|
+
? JSON.stringify(value !== undefined ? value : {})
|
|
116
|
+
: (value || "");
|
|
117
|
+
};
|
|
118
|
+
exports.serializeDataIfNeeded = serializeDataIfNeeded;
|
|
119
|
+
/**
|
|
120
|
+
*
|
|
121
|
+
* @export
|
|
122
|
+
*/
|
|
123
|
+
const toPathString = function (url) {
|
|
124
|
+
return url.pathname + url.search + url.hash;
|
|
125
|
+
};
|
|
126
|
+
exports.toPathString = toPathString;
|
|
127
|
+
/**
|
|
128
|
+
*
|
|
129
|
+
* @export
|
|
130
|
+
*/
|
|
131
|
+
const createRequestFunction = function (axiosArgs, globalAxios, configuration) {
|
|
132
|
+
return (axios = globalAxios) => {
|
|
133
|
+
const axiosRequestArgs = { ...axiosArgs.options, url: configuration.basePath + axiosArgs.url };
|
|
134
|
+
return axios.request(axiosRequestArgs);
|
|
135
|
+
};
|
|
136
|
+
};
|
|
137
|
+
exports.createRequestFunction = createRequestFunction;
|
|
138
|
+
//# sourceMappingURL=common.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"common.js","sourceRoot":"","sources":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