@tmlmobilidade/interfaces 20250915.1306.2 → 20250915.1331.9

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,6 @@
1
1
  import { MongoCollectionClass } from '../../mongo-collection.js';
2
2
  import { CreateOrganizationDto, Organization, UpdateOrganizationDto } from '@tmlmobilidade/types';
3
- import { Filter, FindOptions, IndexDescription } from 'mongodb';
3
+ import { IndexDescription } from 'mongodb';
4
4
  import { z } from 'zod';
5
5
  declare class OrganizationsClass extends MongoCollectionClass<Organization, CreateOrganizationDto, UpdateOrganizationDto> {
6
6
  private static _instance;
@@ -8,46 +8,6 @@ declare class OrganizationsClass extends MongoCollectionClass<Organization, Crea
8
8
  protected updateSchema: z.ZodSchema;
9
9
  private constructor();
10
10
  static getInstance(): Promise<OrganizationsClass>;
11
- /**
12
- * Finds a document by its ID.
13
- *
14
- * @param id - The ID of the document to find
15
- * @returns A promise that resolves to the matching document or null if not found
16
- */
17
- findById(id: string, options?: FindOptions<Organization>): Promise<{
18
- _id: string;
19
- created_at: number & {
20
- __brand: "UnixTimestamp";
21
- };
22
- updated_at: number & {
23
- __brand: "UnixTimestamp";
24
- };
25
- home_links: string[];
26
- home_wikis: string[];
27
- longname: string;
28
- shortname: string;
29
- created_by?: string | undefined;
30
- updated_by?: string | undefined;
31
- logo?: string | null | undefined;
32
- theme?: string | null | undefined;
33
- } | null>;
34
- findOne(filter: Filter<Organization>): Promise<import("mongodb").WithId<{
35
- _id: string;
36
- created_at: number & {
37
- __brand: "UnixTimestamp";
38
- };
39
- updated_at: number & {
40
- __brand: "UnixTimestamp";
41
- };
42
- home_links: string[];
43
- home_wikis: string[];
44
- longname: string;
45
- shortname: string;
46
- created_by?: string | undefined;
47
- updated_by?: string | undefined;
48
- logo?: string | null | undefined;
49
- theme?: string | null | undefined;
50
- }> | null>;
51
11
  protected getCollectionIndexes(): IndexDescription[];
52
12
  protected getCollectionName(): string;
53
13
  protected getCreateSchema(): z.ZodSchema;
@@ -18,26 +18,6 @@ class OrganizationsClass extends MongoCollectionClass {
18
18
  }
19
19
  return OrganizationsClass._instance;
20
20
  }
21
- /**
22
- * Finds a document by its ID.
23
- *
24
- * @param id - The ID of the document to find
25
- * @returns A promise that resolves to the matching document or null if not found
26
- */
27
- async findById(id, options) {
28
- const organization = await this.mongoCollection.findOne({ _id: id }, options);
29
- if (!organization) {
30
- return null;
31
- }
32
- return organization;
33
- }
34
- async findOne(filter) {
35
- const organization = await this.mongoCollection.findOne(filter);
36
- if (!organization) {
37
- return null;
38
- }
39
- return organization;
40
- }
41
21
  getCollectionIndexes() {
42
22
  return [
43
23
  { background: true, key: { name: 1 }, unique: true },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tmlmobilidade/interfaces",
3
- "version": "20250915.1306.2",
3
+ "version": "20250915.1331.9",
4
4
  "author": "João de Vasconcelos & Jusi Monteiro",
5
5
  "license": "AGPL-3.0-or-later",
6
6
  "homepage": "https://github.com/tmlmobilidade/services#readme",