@tmlmobilidade/databases 20260717.1316.58 → 20260717.1321.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.
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
export * from './pcgi-locations.js';
|
|
2
2
|
export * from './pcgi-sales.js';
|
|
3
|
-
export * from './pcgi-transaction-entities.js';
|
|
4
3
|
export * from './pcgi-validations.js';
|
|
5
4
|
export * from '../vehicle-events/raw-vehicle-events.js';
|
|
6
5
|
export * from '../vehicle-events/simplified-vehicle-events.js';
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
export * from './pcgi-locations.js';
|
|
2
2
|
export * from './pcgi-sales.js';
|
|
3
|
-
export * from './pcgi-transaction-entities.js';
|
|
4
3
|
export * from './pcgi-validations.js';
|
|
5
4
|
export * from '../vehicle-events/raw-vehicle-events.js';
|
|
6
5
|
export * from '../vehicle-events/simplified-vehicle-events.js';
|
package/package.json
CHANGED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { MongoInterfaceTemplate } from '../../templates/mongodb.js';
|
|
2
|
-
import { type PcgiTransactionEntity } from '@tmlmobilidade/go-types-apex';
|
|
3
|
-
declare class PCGITransactionEntitiesClass extends MongoInterfaceTemplate<PcgiTransactionEntity, PcgiTransactionEntity, Partial<PcgiTransactionEntity>> {
|
|
4
|
-
private static _instance;
|
|
5
|
-
protected readonly collectionName = "transactionEntity";
|
|
6
|
-
protected readonly databaseName = "FileManagement";
|
|
7
|
-
protected readonly indexDescription = false;
|
|
8
|
-
protected createSchema: any;
|
|
9
|
-
protected updateSchema: any;
|
|
10
|
-
/**
|
|
11
|
-
* Returns the singleton instance of the subclass.
|
|
12
|
-
*/
|
|
13
|
-
static getInstance(): Promise<PCGITransactionEntitiesClass>;
|
|
14
|
-
protected connectToClient(): Promise<import("mongodb").MongoClient>;
|
|
15
|
-
}
|
|
16
|
-
export declare const pcgiTransactionEntities: PCGITransactionEntitiesClass;
|
|
17
|
-
export {};
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
/* * */
|
|
2
|
-
import { PCGIFileManagerClient } from '../../clients/pcgi-file-manager.js';
|
|
3
|
-
import { MongoInterfaceTemplate } from '../../templates/mongodb.js';
|
|
4
|
-
import { asyncSingletonProxy } from '@tmlmobilidade/utils';
|
|
5
|
-
/* * */
|
|
6
|
-
class PCGITransactionEntitiesClass extends MongoInterfaceTemplate {
|
|
7
|
-
//
|
|
8
|
-
static _instance = null;
|
|
9
|
-
collectionName = 'transactionEntity';
|
|
10
|
-
databaseName = 'FileManagement';
|
|
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 PCGITransactionEntitiesClass();
|
|
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 PCGIFileManagerClient.getClient();
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
/* * */
|
|
39
|
-
export const pcgiTransactionEntities = asyncSingletonProxy(PCGITransactionEntitiesClass);
|