@tmlmobilidade/interfaces 20260518.1511.41 → 20260519.16.41
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/rides/hashed-patterns.d.ts +16 -0
- package/dist/interfaces/rides/hashed-patterns.js +35 -0
- package/dist/interfaces/rides/hashed-trips.d.ts +2 -2
- package/dist/interfaces/rides/index.d.ts +1 -0
- package/dist/interfaces/rides/index.js +1 -0
- package/dist/interfaces/rides/rides.d.ts +6 -0
- package/package.json +1 -1
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { MongoCollectionClass } from '../../common/mongo-collection.js';
|
|
2
|
+
import { type HashedPattern } from '@tmlmobilidade/types';
|
|
3
|
+
import { type IndexDescription } from 'mongodb';
|
|
4
|
+
import { z } from 'zod';
|
|
5
|
+
declare class HashedPatternsClass extends MongoCollectionClass<HashedPattern, HashedPattern, HashedPattern> {
|
|
6
|
+
private static _instance;
|
|
7
|
+
protected createSchema: z.ZodSchema;
|
|
8
|
+
protected updateSchema: z.ZodSchema;
|
|
9
|
+
private constructor();
|
|
10
|
+
static getInstance(): Promise<HashedPatternsClass>;
|
|
11
|
+
protected getCollectionIndexes(): IndexDescription[];
|
|
12
|
+
protected getCollectionName(): string;
|
|
13
|
+
protected getEnvName(): string;
|
|
14
|
+
}
|
|
15
|
+
export declare const hashedPatterns: HashedPatternsClass;
|
|
16
|
+
export {};
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/* * */
|
|
2
|
+
import { MongoCollectionClass } from '../../common/mongo-collection.js';
|
|
3
|
+
import { DocumentSchema } from '@tmlmobilidade/types';
|
|
4
|
+
import { asyncSingletonProxy } from '@tmlmobilidade/utils';
|
|
5
|
+
/* * */
|
|
6
|
+
class HashedPatternsClass extends MongoCollectionClass {
|
|
7
|
+
static _instance;
|
|
8
|
+
createSchema = DocumentSchema;
|
|
9
|
+
updateSchema = DocumentSchema;
|
|
10
|
+
constructor() {
|
|
11
|
+
super();
|
|
12
|
+
}
|
|
13
|
+
static async getInstance() {
|
|
14
|
+
if (!HashedPatternsClass._instance) {
|
|
15
|
+
const instance = new HashedPatternsClass();
|
|
16
|
+
await instance.connect();
|
|
17
|
+
HashedPatternsClass._instance = instance;
|
|
18
|
+
}
|
|
19
|
+
return HashedPatternsClass._instance;
|
|
20
|
+
}
|
|
21
|
+
getCollectionIndexes() {
|
|
22
|
+
return [
|
|
23
|
+
{ background: true, key: { agency_id: 1 } },
|
|
24
|
+
{ background: true, key: { line_id: 1 } },
|
|
25
|
+
];
|
|
26
|
+
}
|
|
27
|
+
getCollectionName() {
|
|
28
|
+
return 'hashed_patterns';
|
|
29
|
+
}
|
|
30
|
+
getEnvName() {
|
|
31
|
+
return 'DATABASE_URI';
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
/* * */
|
|
35
|
+
export const hashedPatterns = asyncSingletonProxy(HashedPatternsClass);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { MongoCollectionClass } from '../../common/mongo-collection.js';
|
|
2
|
-
import { HashedTrip } from '@tmlmobilidade/types';
|
|
3
|
-
import { IndexDescription } from 'mongodb';
|
|
2
|
+
import { type HashedTrip } from '@tmlmobilidade/types';
|
|
3
|
+
import { type IndexDescription } from 'mongodb';
|
|
4
4
|
import { z } from 'zod';
|
|
5
5
|
declare class HashedTripsClass extends MongoCollectionClass<HashedTrip, HashedTrip, HashedTrip> {
|
|
6
6
|
private static _instance;
|
|
@@ -152,6 +152,7 @@ declare class RidesClass extends MongoCollectionClass<Ride, CreateRideDto, Updat
|
|
|
152
152
|
error_message?: string | undefined;
|
|
153
153
|
};
|
|
154
154
|
} | null;
|
|
155
|
+
hashed_pattern_id: string;
|
|
155
156
|
hashed_shape_id: string;
|
|
156
157
|
hashed_trip_id: string;
|
|
157
158
|
system_status: "waiting" | "processing" | "complete" | "error" | "skipped";
|
|
@@ -301,6 +302,7 @@ declare class RidesClass extends MongoCollectionClass<Ride, CreateRideDto, Updat
|
|
|
301
302
|
error_message?: string | undefined;
|
|
302
303
|
};
|
|
303
304
|
} | null;
|
|
305
|
+
hashed_pattern_id: string;
|
|
304
306
|
hashed_shape_id: string;
|
|
305
307
|
hashed_trip_id: string;
|
|
306
308
|
system_status: "waiting" | "processing" | "complete" | "error" | "skipped";
|
|
@@ -450,6 +452,7 @@ declare class RidesClass extends MongoCollectionClass<Ride, CreateRideDto, Updat
|
|
|
450
452
|
error_message?: string | undefined;
|
|
451
453
|
};
|
|
452
454
|
} | null;
|
|
455
|
+
hashed_pattern_id: string;
|
|
453
456
|
hashed_shape_id: string;
|
|
454
457
|
hashed_trip_id: string;
|
|
455
458
|
system_status: "waiting" | "processing" | "complete" | "error" | "skipped";
|
|
@@ -599,6 +602,7 @@ declare class RidesClass extends MongoCollectionClass<Ride, CreateRideDto, Updat
|
|
|
599
602
|
error_message?: string | undefined;
|
|
600
603
|
};
|
|
601
604
|
} | null;
|
|
605
|
+
hashed_pattern_id: string;
|
|
602
606
|
hashed_shape_id: string;
|
|
603
607
|
hashed_trip_id: string;
|
|
604
608
|
system_status: "waiting" | "processing" | "complete" | "error" | "skipped";
|
|
@@ -748,6 +752,7 @@ declare class RidesClass extends MongoCollectionClass<Ride, CreateRideDto, Updat
|
|
|
748
752
|
error_message?: string | undefined;
|
|
749
753
|
};
|
|
750
754
|
} | null;
|
|
755
|
+
hashed_pattern_id: string;
|
|
751
756
|
hashed_shape_id: string;
|
|
752
757
|
hashed_trip_id: string;
|
|
753
758
|
system_status: "waiting" | "processing" | "complete" | "error" | "skipped";
|
|
@@ -897,6 +902,7 @@ declare class RidesClass extends MongoCollectionClass<Ride, CreateRideDto, Updat
|
|
|
897
902
|
error_message?: string | undefined;
|
|
898
903
|
};
|
|
899
904
|
} | null;
|
|
905
|
+
hashed_pattern_id: string;
|
|
900
906
|
hashed_shape_id: string;
|
|
901
907
|
hashed_trip_id: string;
|
|
902
908
|
system_status: "waiting" | "processing" | "complete" | "error" | "skipped";
|