@tmlmobilidade/databases 20260325.1459.50 → 20260326.219.51
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/interfaces/apex/index.d.ts +5 -0
- package/dist/interfaces/apex/index.js +5 -0
- package/dist/interfaces/apex/pcgi-locations.d.ts +16 -0
- package/dist/interfaces/apex/pcgi-locations.js +39 -0
- package/dist/interfaces/apex/pcgi-sales.d.ts +16 -0
- package/dist/interfaces/apex/pcgi-sales.js +39 -0
- package/dist/interfaces/apex/pcgi-transaction-entity.d.ts +1031 -0
- package/dist/interfaces/apex/pcgi-transaction-entity.js +45 -0
- package/dist/interfaces/apex/pcgi-validations.d.ts +16 -0
- package/dist/interfaces/apex/pcgi-validations.js +39 -0
- package/dist/interfaces/index.d.ts +1 -0
- package/dist/interfaces/index.js +1 -0
- package/dist/interfaces/vehicle-events/raw-vehicle-events.d.ts +451 -1
- package/dist/templates/mongodb.d.ts +1 -1
- package/dist/templates/mongodb.js +5 -0
- package/package.json +1 -1
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { MongoInterfaceTemplate } from '../../templates/mongodb.js';
|
|
2
|
+
declare class PCGILocationsClass extends MongoInterfaceTemplate<any, any, Partial<any>> {
|
|
3
|
+
private static _instance;
|
|
4
|
+
protected readonly collectionName = "locationEntity";
|
|
5
|
+
protected readonly databaseName = "LocationManagement";
|
|
6
|
+
protected readonly indexDescription = false;
|
|
7
|
+
protected createSchema: any;
|
|
8
|
+
protected updateSchema: any;
|
|
9
|
+
/**
|
|
10
|
+
* Returns the singleton instance of the subclass.
|
|
11
|
+
*/
|
|
12
|
+
static getInstance(): Promise<PCGILocationsClass>;
|
|
13
|
+
protected connectToClient(): Promise<import("mongodb").MongoClient>;
|
|
14
|
+
}
|
|
15
|
+
export declare const pcgiLocations: PCGILocationsClass;
|
|
16
|
+
export {};
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
2
|
+
import { PCGIRawClient } from '../../clients/pcgi-raw.js';
|
|
3
|
+
import { MongoInterfaceTemplate } from '../../templates/mongodb.js';
|
|
4
|
+
import { asyncSingletonProxy } from '@tmlmobilidade/utils';
|
|
5
|
+
/* * */
|
|
6
|
+
class PCGILocationsClass extends MongoInterfaceTemplate {
|
|
7
|
+
//
|
|
8
|
+
static _instance = null;
|
|
9
|
+
collectionName = 'locationEntity';
|
|
10
|
+
databaseName = 'LocationManagement';
|
|
11
|
+
indexDescription = false;
|
|
12
|
+
createSchema = null;
|
|
13
|
+
updateSchema = null;
|
|
14
|
+
/**
|
|
15
|
+
* Returns the singleton instance of the subclass.
|
|
16
|
+
*/
|
|
17
|
+
static async getInstance() {
|
|
18
|
+
// If no instance exists, create one and store the promise.
|
|
19
|
+
// This ensures that if multiple calls to getInstance() happen concurrently,
|
|
20
|
+
// they will all await the same initialization process.
|
|
21
|
+
if (!this._instance) {
|
|
22
|
+
this._instance = (async () => {
|
|
23
|
+
const instance = new PCGILocationsClass();
|
|
24
|
+
// This behaves like the constructor,
|
|
25
|
+
// but allows for async initialization.
|
|
26
|
+
await instance.init();
|
|
27
|
+
return instance;
|
|
28
|
+
})();
|
|
29
|
+
}
|
|
30
|
+
// Await the instance if it's still initializing,
|
|
31
|
+
// or return it immediately if ready.
|
|
32
|
+
return await this._instance;
|
|
33
|
+
}
|
|
34
|
+
connectToClient() {
|
|
35
|
+
return PCGIRawClient.getClient();
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
/* * */
|
|
39
|
+
export const pcgiLocations = asyncSingletonProxy(PCGILocationsClass);
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { MongoInterfaceTemplate } from '../../templates/mongodb.js';
|
|
2
|
+
declare class PCGISalesClass extends MongoInterfaceTemplate<any, any, Partial<any>> {
|
|
3
|
+
private static _instance;
|
|
4
|
+
protected readonly collectionName = "salesEntity";
|
|
5
|
+
protected readonly databaseName = "SalesManagement";
|
|
6
|
+
protected readonly indexDescription = false;
|
|
7
|
+
protected createSchema: any;
|
|
8
|
+
protected updateSchema: any;
|
|
9
|
+
/**
|
|
10
|
+
* Returns the singleton instance of the subclass.
|
|
11
|
+
*/
|
|
12
|
+
static getInstance(): Promise<PCGISalesClass>;
|
|
13
|
+
protected connectToClient(): Promise<import("mongodb").MongoClient>;
|
|
14
|
+
}
|
|
15
|
+
export declare const pcgiSales: PCGISalesClass;
|
|
16
|
+
export {};
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
2
|
+
import { PCGIRawClient } from '../../clients/pcgi-raw.js';
|
|
3
|
+
import { MongoInterfaceTemplate } from '../../templates/mongodb.js';
|
|
4
|
+
import { asyncSingletonProxy } from '@tmlmobilidade/utils';
|
|
5
|
+
/* * */
|
|
6
|
+
class PCGISalesClass extends MongoInterfaceTemplate {
|
|
7
|
+
//
|
|
8
|
+
static _instance = null;
|
|
9
|
+
collectionName = 'salesEntity';
|
|
10
|
+
databaseName = 'SalesManagement';
|
|
11
|
+
indexDescription = false;
|
|
12
|
+
createSchema = null;
|
|
13
|
+
updateSchema = null;
|
|
14
|
+
/**
|
|
15
|
+
* Returns the singleton instance of the subclass.
|
|
16
|
+
*/
|
|
17
|
+
static async getInstance() {
|
|
18
|
+
// If no instance exists, create one and store the promise.
|
|
19
|
+
// This ensures that if multiple calls to getInstance() happen concurrently,
|
|
20
|
+
// they will all await the same initialization process.
|
|
21
|
+
if (!this._instance) {
|
|
22
|
+
this._instance = (async () => {
|
|
23
|
+
const instance = new PCGISalesClass();
|
|
24
|
+
// This behaves like the constructor,
|
|
25
|
+
// but allows for async initialization.
|
|
26
|
+
await instance.init();
|
|
27
|
+
return instance;
|
|
28
|
+
})();
|
|
29
|
+
}
|
|
30
|
+
// Await the instance if it's still initializing,
|
|
31
|
+
// or return it immediately if ready.
|
|
32
|
+
return await this._instance;
|
|
33
|
+
}
|
|
34
|
+
connectToClient() {
|
|
35
|
+
return PCGIRawClient.getClient();
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
/* * */
|
|
39
|
+
export const pcgiSales = asyncSingletonProxy(PCGISalesClass);
|