@yglin/tw-env-records 0.0.0
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/lib/app.d.ts +3 -0
- package/lib/channels.d.ts +3 -0
- package/lib/client.d.ts +40 -0
- package/lib/client.js +50 -0
- package/lib/configuration.d.ts +142 -0
- package/lib/declarations.d.ts +10 -0
- package/lib/hooks/before-record-find.d.ts +2 -0
- package/lib/hooks/log-error.d.ts +2 -0
- package/lib/hooks/on-record-created.d.ts +2 -0
- package/lib/hooks/on-record-deleted.d.ts +2 -0
- package/lib/hooks/on-record-updated.d.ts +2 -0
- package/lib/index.d.ts +1 -0
- package/lib/internal/crawler-endpoints.d.ts +2 -0
- package/lib/jobs/audit.d.ts +7 -0
- package/lib/jobs/crawler-state.d.ts +12 -0
- package/lib/jobs/crawler.d.ts +7 -0
- package/lib/jobs/full-database-analyzer.d.ts +10 -0
- package/lib/jobs/scheduler.d.ts +2 -0
- package/lib/logger.d.ts +6 -0
- package/lib/maids/collate-place-names.d.ts +1 -0
- package/lib/maids/fix-place-names.d.ts +7 -0
- package/lib/maids/full-database-analyze.d.ts +1 -0
- package/lib/maids/geocode.d.ts +4 -0
- package/lib/mongodb.d.ts +8 -0
- package/lib/postgresql.d.ts +8 -0
- package/lib/services/ask-ai/ask-ai.class.d.ts +35 -0
- package/lib/services/ask-ai/ask-ai.d.ts +10 -0
- package/lib/services/ask-ai/ask-ai.shared.d.ts +12 -0
- package/lib/services/ask-ai/ask-ai.shared.js +13 -0
- package/lib/services/date-index/date-index.class.d.ts +11 -0
- package/lib/services/date-index/date-index.d.ts +11 -0
- package/lib/services/date-index/date-index.schema.d.ts +170 -0
- package/lib/services/date-index/date-index.shared.d.ts +13 -0
- package/lib/services/date-index/date-index.shared.js +19 -0
- package/lib/services/index.d.ts +9 -0
- package/lib/services/meta/meta.class.d.ts +151 -0
- package/lib/services/meta/meta.d.ts +11 -0
- package/lib/services/meta/meta.schema.d.ts +169 -0
- package/lib/services/meta/meta.shared.d.ts +13 -0
- package/lib/services/meta/meta.shared.js +13 -0
- package/lib/services/person/person.class.d.ts +1098 -0
- package/lib/services/person/person.d.ts +11 -0
- package/lib/services/person/person.schema.d.ts +2693 -0
- package/lib/services/person/person.shared.d.ts +13 -0
- package/lib/services/person/person.shared.js +13 -0
- package/lib/services/person-index/person-index.class.d.ts +17 -0
- package/lib/services/person-index/person-index.d.ts +11 -0
- package/lib/services/person-index/person-index.schema.d.ts +253 -0
- package/lib/services/person-index/person-index.shared.d.ts +13 -0
- package/lib/services/person-index/person-index.shared.js +19 -0
- package/lib/services/place-index/place-index.class.d.ts +15 -0
- package/lib/services/place-index/place-index.d.ts +11 -0
- package/lib/services/place-index/place-index.schema.d.ts +175 -0
- package/lib/services/place-index/place-index.shared.d.ts +15 -0
- package/lib/services/place-index/place-index.shared.js +21 -0
- package/lib/services/place-names/place-names.class.d.ts +53 -0
- package/lib/services/place-names/place-names.d.ts +11 -0
- package/lib/services/place-names/place-names.schema.d.ts +459 -0
- package/lib/services/place-names/place-names.shared.d.ts +13 -0
- package/lib/services/place-names/place-names.shared.js +13 -0
- package/lib/services/record/record.class.d.ts +155 -0
- package/lib/services/record/record.d.ts +11 -0
- package/lib/services/record/record.schema.d.ts +388 -0
- package/lib/services/record/record.shared.d.ts +13 -0
- package/lib/services/record/record.shared.js +13 -0
- package/lib/services/tag/spectral.d.ts +33 -0
- package/lib/services/tag/tag.class.d.ts +1098 -0
- package/lib/services/tag/tag.d.ts +11 -0
- package/lib/services/tag/tag.schema.d.ts +2693 -0
- package/lib/services/tag/tag.shared.d.ts +13 -0
- package/lib/services/tag/tag.shared.js +13 -0
- package/lib/services/tag-index/tag-index.class.d.ts +15 -0
- package/lib/services/tag-index/tag-index.d.ts +11 -0
- package/lib/services/tag-index/tag-index.schema.d.ts +155 -0
- package/lib/services/tag-index/tag-index.shared.d.ts +13 -0
- package/lib/services/tag-index/tag-index.shared.js +19 -0
- package/lib/services/tag-similarity/tag-similarity.class.d.ts +18 -0
- package/lib/services/tag-similarity/tag-similarity.d.ts +11 -0
- package/lib/services/tag-similarity/tag-similarity.schema.d.ts +404 -0
- package/lib/services/tag-similarity/tag-similarity.shared.d.ts +12 -0
- package/lib/services/tag-similarity/tag-similarity.shared.js +13 -0
- package/lib/utils/index.d.ts +5 -0
- package/lib/utils/postgresql-transport.d.ts +20 -0
- package/lib/utils/update-date-index.d.ts +3 -0
- package/lib/utils/update-person-index.d.ts +3 -0
- package/lib/utils/update-place-index.d.ts +3 -0
- package/lib/utils/update-tag-index.d.ts +3 -0
- package/lib/utils/wrap-error.d.ts +1 -0
- package/lib/validators.d.ts +3 -0
- package/package.json +105 -0
- package/readme.md +42 -0
|
@@ -0,0 +1,170 @@
|
|
|
1
|
+
import type { Static } from '@feathersjs/typebox';
|
|
2
|
+
import type { HookContext } from '../../declarations';
|
|
3
|
+
import type { DateIndexService } from './date-index.class';
|
|
4
|
+
export declare const buildDateIndexId: (year: number, month?: number, day?: number) => string;
|
|
5
|
+
export declare const deriveDateIndexIds: (year: number, month?: number, day?: number) => string[];
|
|
6
|
+
export declare const deriveDifferentDateIndexIds: (before: {
|
|
7
|
+
year: number;
|
|
8
|
+
month?: number;
|
|
9
|
+
day?: number;
|
|
10
|
+
}, after: {
|
|
11
|
+
year: number;
|
|
12
|
+
month?: number;
|
|
13
|
+
day?: number;
|
|
14
|
+
}) => {
|
|
15
|
+
toAdd: string[];
|
|
16
|
+
toRemove: string[];
|
|
17
|
+
};
|
|
18
|
+
export declare const deriveDateIndexIdsForQueryBetween: (fromYear: number, toYear?: number, fromMonth?: number, toMonth?: number, fromDay?: number, toDay?: number) => string[];
|
|
19
|
+
export declare const dateIndexSchema: import("@sinclair/typebox").TObject<{
|
|
20
|
+
id: import("@sinclair/typebox").TString<string>;
|
|
21
|
+
records: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TNumber>;
|
|
22
|
+
}>;
|
|
23
|
+
export type DateIndex = Static<typeof dateIndexSchema>;
|
|
24
|
+
export declare const dateIndexValidator: import("@feathersjs/schema").Validator<any, any>;
|
|
25
|
+
export declare const dateIndexResolver: import("@feathersjs/schema").Resolver<{
|
|
26
|
+
id: string;
|
|
27
|
+
records: number[];
|
|
28
|
+
}, HookContext<DateIndexService<import("./date-index.class").DateIndexParams>>>;
|
|
29
|
+
export declare const dateIndexExternalResolver: import("@feathersjs/schema").Resolver<{
|
|
30
|
+
id: string;
|
|
31
|
+
records: number[];
|
|
32
|
+
}, HookContext<DateIndexService<import("./date-index.class").DateIndexParams>>>;
|
|
33
|
+
export declare const dateIndexDataSchema: import("@sinclair/typebox").TPick<import("@sinclair/typebox").TObject<{
|
|
34
|
+
id: import("@sinclair/typebox").TString<string>;
|
|
35
|
+
records: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TNumber>;
|
|
36
|
+
}>, ["id", "records"]>;
|
|
37
|
+
export type DateIndexData = Static<typeof dateIndexDataSchema>;
|
|
38
|
+
export declare const dateIndexDataValidator: import("@feathersjs/schema").Validator<any, any>;
|
|
39
|
+
export declare const dateIndexDataResolver: import("@feathersjs/schema").Resolver<{
|
|
40
|
+
id: string;
|
|
41
|
+
records: number[];
|
|
42
|
+
}, HookContext<DateIndexService<import("./date-index.class").DateIndexParams>>>;
|
|
43
|
+
export declare const dateIndexPatchSchema: import("@sinclair/typebox").TPick<import("@sinclair/typebox").TObject<{
|
|
44
|
+
id: import("@sinclair/typebox").TString<string>;
|
|
45
|
+
records: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TNumber>;
|
|
46
|
+
}>, ["records"]>;
|
|
47
|
+
export type DateIndexPatch = Static<typeof dateIndexPatchSchema>;
|
|
48
|
+
export declare const dateIndexPatchValidator: import("@feathersjs/schema").Validator<any, any>;
|
|
49
|
+
export declare const dateIndexPatchResolver: import("@feathersjs/schema").Resolver<{
|
|
50
|
+
id: string;
|
|
51
|
+
records: number[];
|
|
52
|
+
}, HookContext<DateIndexService<import("./date-index.class").DateIndexParams>>>;
|
|
53
|
+
export declare const dateIndexQueryProperties: import("@sinclair/typebox").TPick<import("@sinclair/typebox").TObject<{
|
|
54
|
+
id: import("@sinclair/typebox").TString<string>;
|
|
55
|
+
records: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TNumber>;
|
|
56
|
+
}>, ["id"]>;
|
|
57
|
+
export declare const dateIndexQuerySchema: import("@sinclair/typebox").TIntersect<[import("@sinclair/typebox").TIntersect<[import("@sinclair/typebox").TPartial<import("@sinclair/typebox").TObject<{
|
|
58
|
+
$limit: import("@sinclair/typebox").TNumber;
|
|
59
|
+
$skip: import("@sinclair/typebox").TNumber;
|
|
60
|
+
$sort: import("@sinclair/typebox").TObject<{
|
|
61
|
+
id: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TInteger>;
|
|
62
|
+
}>;
|
|
63
|
+
$select: import("@sinclair/typebox").TUnsafe<"id"[]>;
|
|
64
|
+
$and: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TObject<{
|
|
65
|
+
id: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString<string>, import("@sinclair/typebox").TPartial<import("@sinclair/typebox").TIntersect<[import("@sinclair/typebox").TObject<{
|
|
66
|
+
$gt: import("@sinclair/typebox").TString<string>;
|
|
67
|
+
$gte: import("@sinclair/typebox").TString<string>;
|
|
68
|
+
$lt: import("@sinclair/typebox").TString<string>;
|
|
69
|
+
$lte: import("@sinclair/typebox").TString<string>;
|
|
70
|
+
$ne: import("@sinclair/typebox").TString<string>;
|
|
71
|
+
$in: import("@sinclair/typebox").TString<string> | import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString<string>>;
|
|
72
|
+
$nin: import("@sinclair/typebox").TString<string> | import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString<string>>;
|
|
73
|
+
}>, import("@sinclair/typebox").TObject<{
|
|
74
|
+
[key: string]: import("@sinclair/typebox").TSchema;
|
|
75
|
+
} | undefined>]>>]>>;
|
|
76
|
+
}>>, import("@sinclair/typebox").TObject<{
|
|
77
|
+
$or: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TObject<{
|
|
78
|
+
id: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString<string>, import("@sinclair/typebox").TPartial<import("@sinclair/typebox").TIntersect<[import("@sinclair/typebox").TObject<{
|
|
79
|
+
$gt: import("@sinclair/typebox").TString<string>;
|
|
80
|
+
$gte: import("@sinclair/typebox").TString<string>;
|
|
81
|
+
$lt: import("@sinclair/typebox").TString<string>;
|
|
82
|
+
$lte: import("@sinclair/typebox").TString<string>;
|
|
83
|
+
$ne: import("@sinclair/typebox").TString<string>;
|
|
84
|
+
$in: import("@sinclair/typebox").TString<string> | import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString<string>>;
|
|
85
|
+
$nin: import("@sinclair/typebox").TString<string> | import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString<string>>;
|
|
86
|
+
}>, import("@sinclair/typebox").TObject<{
|
|
87
|
+
[key: string]: import("@sinclair/typebox").TSchema;
|
|
88
|
+
} | undefined>]>>]>>;
|
|
89
|
+
}>>>;
|
|
90
|
+
}>]>>;
|
|
91
|
+
$or: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TObject<{
|
|
92
|
+
id: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString<string>, import("@sinclair/typebox").TPartial<import("@sinclair/typebox").TIntersect<[import("@sinclair/typebox").TObject<{
|
|
93
|
+
$gt: import("@sinclair/typebox").TString<string>;
|
|
94
|
+
$gte: import("@sinclair/typebox").TString<string>;
|
|
95
|
+
$lt: import("@sinclair/typebox").TString<string>;
|
|
96
|
+
$lte: import("@sinclair/typebox").TString<string>;
|
|
97
|
+
$ne: import("@sinclair/typebox").TString<string>;
|
|
98
|
+
$in: import("@sinclair/typebox").TString<string> | import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString<string>>;
|
|
99
|
+
$nin: import("@sinclair/typebox").TString<string> | import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString<string>>;
|
|
100
|
+
}>, import("@sinclair/typebox").TObject<{
|
|
101
|
+
[key: string]: import("@sinclair/typebox").TSchema;
|
|
102
|
+
} | undefined>]>>]>>;
|
|
103
|
+
}>>>;
|
|
104
|
+
}>>, import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TObject<{
|
|
105
|
+
id: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString<string>, import("@sinclair/typebox").TPartial<import("@sinclair/typebox").TIntersect<[import("@sinclair/typebox").TObject<{
|
|
106
|
+
$gt: import("@sinclair/typebox").TString<string>;
|
|
107
|
+
$gte: import("@sinclair/typebox").TString<string>;
|
|
108
|
+
$lt: import("@sinclair/typebox").TString<string>;
|
|
109
|
+
$lte: import("@sinclair/typebox").TString<string>;
|
|
110
|
+
$ne: import("@sinclair/typebox").TString<string>;
|
|
111
|
+
$in: import("@sinclair/typebox").TString<string> | import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString<string>>;
|
|
112
|
+
$nin: import("@sinclair/typebox").TString<string> | import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString<string>>;
|
|
113
|
+
}>, import("@sinclair/typebox").TObject<{
|
|
114
|
+
[key: string]: import("@sinclair/typebox").TSchema;
|
|
115
|
+
} | undefined>]>>]>>;
|
|
116
|
+
}>>]>, import("@sinclair/typebox").TObject<{}>]>;
|
|
117
|
+
export type DateIndexQuery = Static<typeof dateIndexQuerySchema>;
|
|
118
|
+
export declare const dateIndexQueryValidator: import("@feathersjs/schema").Validator<any, any>;
|
|
119
|
+
export declare const dateIndexQueryResolver: import("@feathersjs/schema").Resolver<Partial<{
|
|
120
|
+
$limit: number;
|
|
121
|
+
$skip: number;
|
|
122
|
+
$sort: {
|
|
123
|
+
id?: number | undefined;
|
|
124
|
+
};
|
|
125
|
+
$select: "id"[];
|
|
126
|
+
$and: ({
|
|
127
|
+
id?: string | Partial<{
|
|
128
|
+
$gt: string;
|
|
129
|
+
$gte: string;
|
|
130
|
+
$lt: string;
|
|
131
|
+
$lte: string;
|
|
132
|
+
$ne: string;
|
|
133
|
+
$in: string | string[];
|
|
134
|
+
$nin: string | string[];
|
|
135
|
+
} & {}> | undefined;
|
|
136
|
+
} | {
|
|
137
|
+
$or: {
|
|
138
|
+
id?: string | Partial<{
|
|
139
|
+
$gt: string;
|
|
140
|
+
$gte: string;
|
|
141
|
+
$lt: string;
|
|
142
|
+
$lte: string;
|
|
143
|
+
$ne: string;
|
|
144
|
+
$in: string | string[];
|
|
145
|
+
$nin: string | string[];
|
|
146
|
+
} & {}> | undefined;
|
|
147
|
+
}[];
|
|
148
|
+
})[];
|
|
149
|
+
$or: {
|
|
150
|
+
id?: string | Partial<{
|
|
151
|
+
$gt: string;
|
|
152
|
+
$gte: string;
|
|
153
|
+
$lt: string;
|
|
154
|
+
$lte: string;
|
|
155
|
+
$ne: string;
|
|
156
|
+
$in: string | string[];
|
|
157
|
+
$nin: string | string[];
|
|
158
|
+
} & {}> | undefined;
|
|
159
|
+
}[];
|
|
160
|
+
}> & {
|
|
161
|
+
id?: string | Partial<{
|
|
162
|
+
$gt: string;
|
|
163
|
+
$gte: string;
|
|
164
|
+
$lt: string;
|
|
165
|
+
$lte: string;
|
|
166
|
+
$ne: string;
|
|
167
|
+
$in: string | string[];
|
|
168
|
+
$nin: string | string[];
|
|
169
|
+
} & {}> | undefined;
|
|
170
|
+
} & {}, HookContext<DateIndexService<import("./date-index.class").DateIndexParams>>>;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { Params } from '@feathersjs/feathers';
|
|
2
|
+
import type { ClientApplication } from '../../client';
|
|
3
|
+
import type { DateIndex, DateIndexData, DateIndexPatch, DateIndexQuery, DateIndexService } from './date-index.class';
|
|
4
|
+
export type { DateIndex, DateIndexData, DateIndexPatch, DateIndexQuery };
|
|
5
|
+
export type DateIndexClientService = Pick<DateIndexService<Params<DateIndexQuery>>, (typeof dateIndexMethods)[number]>;
|
|
6
|
+
export declare const dateIndexPath = "date-index";
|
|
7
|
+
export declare const dateIndexMethods: Array<keyof DateIndexService>;
|
|
8
|
+
export declare const dateIndexClient: (client: ClientApplication) => void;
|
|
9
|
+
declare module '../../client' {
|
|
10
|
+
interface ServiceTypes {
|
|
11
|
+
[dateIndexPath]: DateIndexClientService;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.dateIndexClient = exports.dateIndexMethods = exports.dateIndexPath = void 0;
|
|
4
|
+
exports.dateIndexPath = 'date-index';
|
|
5
|
+
exports.dateIndexMethods = [
|
|
6
|
+
'find',
|
|
7
|
+
'get',
|
|
8
|
+
'create',
|
|
9
|
+
'patch',
|
|
10
|
+
'remove'
|
|
11
|
+
];
|
|
12
|
+
const dateIndexClient = (client) => {
|
|
13
|
+
const connection = client.get('connection');
|
|
14
|
+
client.use(exports.dateIndexPath, connection.service(exports.dateIndexPath), {
|
|
15
|
+
methods: exports.dateIndexMethods
|
|
16
|
+
});
|
|
17
|
+
};
|
|
18
|
+
exports.dateIndexClient = dateIndexClient;
|
|
19
|
+
//# sourceMappingURL=date-index.shared.js.map
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { Application } from '../declarations';
|
|
2
|
+
export declare const services: (app: Application) => void;
|
|
3
|
+
export { Record, RecordData, sortRecordsByDate } from './record/record';
|
|
4
|
+
export { buildDateIndexId, deriveDateIndexIds, deriveDifferentDateIndexIds, deriveDateIndexIdsForQueryBetween, DateIndex } from './date-index/date-index.schema';
|
|
5
|
+
export { buildPlaceIndexId, deriveDifferentPlaceIndexIds, derivePlaceIndexIds, PlaceIndex } from './place-index/place-index.schema';
|
|
6
|
+
export { PersonIndex } from './person-index/person-index.schema';
|
|
7
|
+
export { TagIndex } from './tag-index/tag-index.schema';
|
|
8
|
+
export { PlaceNames } from './place-names/place-names.schema';
|
|
9
|
+
export { TagData } from './tag/tag.schema';
|
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
import type { Params } from '@feathersjs/feathers';
|
|
2
|
+
import { MongoDBService } from '@feathersjs/mongodb';
|
|
3
|
+
import type { MongoDBAdapterParams, MongoDBAdapterOptions, AdapterId } from '@feathersjs/mongodb';
|
|
4
|
+
import type { Application } from '../../declarations';
|
|
5
|
+
import type { Meta, MetaData, MetaPatch, MetaQuery } from './meta.schema';
|
|
6
|
+
// Type definitions below are auto-generated from TypeBox schemas
|
|
7
|
+
// AUTO-GENERATED by scripts/generate-sdk-types-tmp.js
|
|
8
|
+
// Concrete type definitions for client SDK (TypeBox-free)
|
|
9
|
+
// Do not edit this file manually - it will be regenerated on SDK build
|
|
10
|
+
|
|
11
|
+
export interface Meta {
|
|
12
|
+
name: string
|
|
13
|
+
data: any
|
|
14
|
+
modifiedAt?: string
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export interface MetaData {
|
|
18
|
+
name: string
|
|
19
|
+
data: any
|
|
20
|
+
modifiedAt?: string
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export type MetaPatch = Partial<Meta>
|
|
24
|
+
|
|
25
|
+
export interface MetaQuery {
|
|
26
|
+
$limit?: number
|
|
27
|
+
$skip?: number
|
|
28
|
+
$sort?: {
|
|
29
|
+
name?: number
|
|
30
|
+
}
|
|
31
|
+
$select?: string[]
|
|
32
|
+
$and?: {
|
|
33
|
+
name?: string | {
|
|
34
|
+
$gt?: string
|
|
35
|
+
$gte?: string
|
|
36
|
+
$lt?: string
|
|
37
|
+
$lte?: string
|
|
38
|
+
$ne?: string
|
|
39
|
+
$in?: string[]
|
|
40
|
+
$nin?: string[]
|
|
41
|
+
}
|
|
42
|
+
} | {
|
|
43
|
+
$or: {
|
|
44
|
+
name?: string | {
|
|
45
|
+
$gt?: string
|
|
46
|
+
$gte?: string
|
|
47
|
+
$lt?: string
|
|
48
|
+
$lte?: string
|
|
49
|
+
$ne?: string
|
|
50
|
+
$in?: string[]
|
|
51
|
+
$nin?: string[]
|
|
52
|
+
}
|
|
53
|
+
}[]
|
|
54
|
+
}[]
|
|
55
|
+
$or?: {
|
|
56
|
+
name?: string | {
|
|
57
|
+
$gt?: string
|
|
58
|
+
$gte?: string
|
|
59
|
+
$lt?: string
|
|
60
|
+
$lte?: string
|
|
61
|
+
$ne?: string
|
|
62
|
+
$in?: string[]
|
|
63
|
+
$nin?: string[]
|
|
64
|
+
}
|
|
65
|
+
}[]
|
|
66
|
+
name?: string | {
|
|
67
|
+
$gt?: string
|
|
68
|
+
$gte?: string
|
|
69
|
+
$lt?: string
|
|
70
|
+
$lte?: string
|
|
71
|
+
$ne?: string
|
|
72
|
+
$in?: string[]
|
|
73
|
+
$nin?: string[]
|
|
74
|
+
}
|
|
75
|
+
serverInfo?: boolean
|
|
76
|
+
top?: number
|
|
77
|
+
}
|
|
78
|
+
export interface MetaParams extends MongoDBAdapterParams<MetaQuery> {
|
|
79
|
+
}
|
|
80
|
+
export type ServerInfo = {
|
|
81
|
+
services: {
|
|
82
|
+
[serviceName: string]: Record<string, any>;
|
|
83
|
+
};
|
|
84
|
+
};
|
|
85
|
+
export type YearlyStatistics = {
|
|
86
|
+
[year: number]: {
|
|
87
|
+
numberOfRecords: number;
|
|
88
|
+
top10Tags: {
|
|
89
|
+
tag: string;
|
|
90
|
+
count: number;
|
|
91
|
+
}[];
|
|
92
|
+
top10People: {
|
|
93
|
+
person: string;
|
|
94
|
+
count: number;
|
|
95
|
+
}[];
|
|
96
|
+
};
|
|
97
|
+
};
|
|
98
|
+
export type PerCountyStatistics = {
|
|
99
|
+
[county: string]: {
|
|
100
|
+
displayName: string;
|
|
101
|
+
numberOfRecords: number;
|
|
102
|
+
top10Tags: {
|
|
103
|
+
tag: string;
|
|
104
|
+
count: number;
|
|
105
|
+
}[];
|
|
106
|
+
top10People: {
|
|
107
|
+
person: string;
|
|
108
|
+
count: number;
|
|
109
|
+
}[];
|
|
110
|
+
};
|
|
111
|
+
};
|
|
112
|
+
export type TagsTopN = {
|
|
113
|
+
name: string;
|
|
114
|
+
count: number;
|
|
115
|
+
}[];
|
|
116
|
+
export type PeopleTopN = {
|
|
117
|
+
name: string;
|
|
118
|
+
count: number;
|
|
119
|
+
}[];
|
|
120
|
+
export type TagsSimilarityConfigs = {
|
|
121
|
+
countThresholdP50: number;
|
|
122
|
+
countThresholdP75: number;
|
|
123
|
+
countThresholdP90: number;
|
|
124
|
+
countThresholdP95: number;
|
|
125
|
+
totalTags: number;
|
|
126
|
+
tagsWithSpectral: number;
|
|
127
|
+
computedAt: string;
|
|
128
|
+
};
|
|
129
|
+
export declare class MetaService<ServiceParams extends Params = MetaParams> extends MongoDBService<Meta, MetaData, MetaParams, MetaPatch> {
|
|
130
|
+
app: Application;
|
|
131
|
+
constructor(options: MongoDBAdapterOptions, app: Application);
|
|
132
|
+
get(id: AdapterId, params?: MetaParams): Promise<any>;
|
|
133
|
+
/**
|
|
134
|
+
* Upsert a document - create if it doesn't exist, update if it does
|
|
135
|
+
* @param id - The document ID
|
|
136
|
+
* @param data - The data to insert or update
|
|
137
|
+
* @param params - Optional parameters
|
|
138
|
+
* @returns The created or updated document
|
|
139
|
+
*/
|
|
140
|
+
upsert(id: AdapterId, data: Partial<MetaData>, params?: MetaParams): Promise<Meta>;
|
|
141
|
+
/**
|
|
142
|
+
* Upsert using MongoDB's native upsert operation
|
|
143
|
+
* This is more efficient as it's a single database operation
|
|
144
|
+
* @param id - The document ID
|
|
145
|
+
* @param data - The data to insert or update
|
|
146
|
+
* @param params - Optional parameters
|
|
147
|
+
* @returns The created or updated document
|
|
148
|
+
*/
|
|
149
|
+
upsertNative(id: AdapterId, data: Partial<MetaData>, params?: MetaParams): Promise<Meta>;
|
|
150
|
+
}
|
|
151
|
+
export declare const getOptions: (app: Application) => MongoDBAdapterOptions;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Application } from '../../declarations';
|
|
2
|
+
import { MetaService } from './meta.class';
|
|
3
|
+
import { metaPath } from './meta.shared';
|
|
4
|
+
export * from './meta.class';
|
|
5
|
+
export * from './meta.schema';
|
|
6
|
+
export declare const meta: (app: Application) => void;
|
|
7
|
+
declare module '../../declarations' {
|
|
8
|
+
interface ServiceTypes {
|
|
9
|
+
[metaPath]: MetaService;
|
|
10
|
+
}
|
|
11
|
+
}
|
|
@@ -0,0 +1,169 @@
|
|
|
1
|
+
import type { Static } from '@feathersjs/typebox';
|
|
2
|
+
import type { HookContext } from '../../declarations';
|
|
3
|
+
import type { MetaService } from './meta.class';
|
|
4
|
+
export declare const metaSchema: import("@sinclair/typebox").TObject<{
|
|
5
|
+
name: import("@sinclair/typebox").TString<string>;
|
|
6
|
+
data: import("@sinclair/typebox").TAny;
|
|
7
|
+
modifiedAt: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString<"date-time">>;
|
|
8
|
+
}>;
|
|
9
|
+
export type Meta = Static<typeof metaSchema>;
|
|
10
|
+
export declare const metaValidator: import("@feathersjs/schema").Validator<any, any>;
|
|
11
|
+
export declare const metaResolver: import("@feathersjs/schema").Resolver<{
|
|
12
|
+
modifiedAt?: string | undefined;
|
|
13
|
+
data: any;
|
|
14
|
+
name: string;
|
|
15
|
+
}, HookContext<MetaService<import("./meta.class").MetaParams>>>;
|
|
16
|
+
export declare const metaExternalResolver: import("@feathersjs/schema").Resolver<{
|
|
17
|
+
modifiedAt?: string | undefined;
|
|
18
|
+
data: any;
|
|
19
|
+
name: string;
|
|
20
|
+
}, HookContext<MetaService<import("./meta.class").MetaParams>>>;
|
|
21
|
+
export declare const metaDataSchema: import("@sinclair/typebox").TPick<import("@sinclair/typebox").TObject<{
|
|
22
|
+
name: import("@sinclair/typebox").TString<string>;
|
|
23
|
+
data: import("@sinclair/typebox").TAny;
|
|
24
|
+
modifiedAt: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString<"date-time">>;
|
|
25
|
+
}>, ["name", "data", "modifiedAt"]>;
|
|
26
|
+
export type MetaData = Static<typeof metaDataSchema>;
|
|
27
|
+
export declare const metaDataValidator: import("@feathersjs/schema").Validator<any, any>;
|
|
28
|
+
export declare const metaDataResolver: import("@feathersjs/schema").Resolver<{
|
|
29
|
+
modifiedAt?: string | undefined;
|
|
30
|
+
data: any;
|
|
31
|
+
name: string;
|
|
32
|
+
}, HookContext<MetaService<import("./meta.class").MetaParams>>>;
|
|
33
|
+
export declare const metaPatchSchema: import("@sinclair/typebox").TPartial<import("@sinclair/typebox").TObject<{
|
|
34
|
+
name: import("@sinclair/typebox").TString<string>;
|
|
35
|
+
data: import("@sinclair/typebox").TAny;
|
|
36
|
+
modifiedAt: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString<"date-time">>;
|
|
37
|
+
}>>;
|
|
38
|
+
export type MetaPatch = Static<typeof metaPatchSchema>;
|
|
39
|
+
export declare const metaPatchValidator: import("@feathersjs/schema").Validator<any, any>;
|
|
40
|
+
export declare const metaPatchResolver: import("@feathersjs/schema").Resolver<{
|
|
41
|
+
modifiedAt?: string | undefined;
|
|
42
|
+
data: any;
|
|
43
|
+
name: string;
|
|
44
|
+
}, HookContext<MetaService<import("./meta.class").MetaParams>>>;
|
|
45
|
+
export declare const metaQueryProperties: import("@sinclair/typebox").TPick<import("@sinclair/typebox").TObject<{
|
|
46
|
+
name: import("@sinclair/typebox").TString<string>;
|
|
47
|
+
data: import("@sinclair/typebox").TAny;
|
|
48
|
+
modifiedAt: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString<"date-time">>;
|
|
49
|
+
}>, ["name"]>;
|
|
50
|
+
export declare const metaQuerySchema: import("@sinclair/typebox").TIntersect<[import("@sinclair/typebox").TIntersect<[import("@sinclair/typebox").TPartial<import("@sinclair/typebox").TObject<{
|
|
51
|
+
$limit: import("@sinclair/typebox").TNumber;
|
|
52
|
+
$skip: import("@sinclair/typebox").TNumber;
|
|
53
|
+
$sort: import("@sinclair/typebox").TObject<{
|
|
54
|
+
name: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TInteger>;
|
|
55
|
+
}>;
|
|
56
|
+
$select: import("@sinclair/typebox").TUnsafe<"name"[]>;
|
|
57
|
+
$and: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TObject<{
|
|
58
|
+
name: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString<string>, import("@sinclair/typebox").TPartial<import("@sinclair/typebox").TIntersect<[import("@sinclair/typebox").TObject<{
|
|
59
|
+
$gt: import("@sinclair/typebox").TString<string>;
|
|
60
|
+
$gte: import("@sinclair/typebox").TString<string>;
|
|
61
|
+
$lt: import("@sinclair/typebox").TString<string>;
|
|
62
|
+
$lte: import("@sinclair/typebox").TString<string>;
|
|
63
|
+
$ne: import("@sinclair/typebox").TString<string>;
|
|
64
|
+
$in: import("@sinclair/typebox").TString<string> | import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString<string>>;
|
|
65
|
+
$nin: import("@sinclair/typebox").TString<string> | import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString<string>>;
|
|
66
|
+
}>, import("@sinclair/typebox").TObject<{
|
|
67
|
+
[key: string]: import("@sinclair/typebox").TSchema;
|
|
68
|
+
} | undefined>]>>]>>;
|
|
69
|
+
}>>, import("@sinclair/typebox").TObject<{
|
|
70
|
+
$or: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TObject<{
|
|
71
|
+
name: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString<string>, import("@sinclair/typebox").TPartial<import("@sinclair/typebox").TIntersect<[import("@sinclair/typebox").TObject<{
|
|
72
|
+
$gt: import("@sinclair/typebox").TString<string>;
|
|
73
|
+
$gte: import("@sinclair/typebox").TString<string>;
|
|
74
|
+
$lt: import("@sinclair/typebox").TString<string>;
|
|
75
|
+
$lte: import("@sinclair/typebox").TString<string>;
|
|
76
|
+
$ne: import("@sinclair/typebox").TString<string>;
|
|
77
|
+
$in: import("@sinclair/typebox").TString<string> | import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString<string>>;
|
|
78
|
+
$nin: import("@sinclair/typebox").TString<string> | import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString<string>>;
|
|
79
|
+
}>, import("@sinclair/typebox").TObject<{
|
|
80
|
+
[key: string]: import("@sinclair/typebox").TSchema;
|
|
81
|
+
} | undefined>]>>]>>;
|
|
82
|
+
}>>>;
|
|
83
|
+
}>]>>;
|
|
84
|
+
$or: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TObject<{
|
|
85
|
+
name: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString<string>, import("@sinclair/typebox").TPartial<import("@sinclair/typebox").TIntersect<[import("@sinclair/typebox").TObject<{
|
|
86
|
+
$gt: import("@sinclair/typebox").TString<string>;
|
|
87
|
+
$gte: import("@sinclair/typebox").TString<string>;
|
|
88
|
+
$lt: import("@sinclair/typebox").TString<string>;
|
|
89
|
+
$lte: import("@sinclair/typebox").TString<string>;
|
|
90
|
+
$ne: import("@sinclair/typebox").TString<string>;
|
|
91
|
+
$in: import("@sinclair/typebox").TString<string> | import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString<string>>;
|
|
92
|
+
$nin: import("@sinclair/typebox").TString<string> | import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString<string>>;
|
|
93
|
+
}>, import("@sinclair/typebox").TObject<{
|
|
94
|
+
[key: string]: import("@sinclair/typebox").TSchema;
|
|
95
|
+
} | undefined>]>>]>>;
|
|
96
|
+
}>>>;
|
|
97
|
+
}>>, import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TObject<{
|
|
98
|
+
name: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString<string>, import("@sinclair/typebox").TPartial<import("@sinclair/typebox").TIntersect<[import("@sinclair/typebox").TObject<{
|
|
99
|
+
$gt: import("@sinclair/typebox").TString<string>;
|
|
100
|
+
$gte: import("@sinclair/typebox").TString<string>;
|
|
101
|
+
$lt: import("@sinclair/typebox").TString<string>;
|
|
102
|
+
$lte: import("@sinclair/typebox").TString<string>;
|
|
103
|
+
$ne: import("@sinclair/typebox").TString<string>;
|
|
104
|
+
$in: import("@sinclair/typebox").TString<string> | import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString<string>>;
|
|
105
|
+
$nin: import("@sinclair/typebox").TString<string> | import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString<string>>;
|
|
106
|
+
}>, import("@sinclair/typebox").TObject<{
|
|
107
|
+
[key: string]: import("@sinclair/typebox").TSchema;
|
|
108
|
+
} | undefined>]>>]>>;
|
|
109
|
+
}>>]>, import("@sinclair/typebox").TObject<{
|
|
110
|
+
serverInfo: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
|
|
111
|
+
top: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TNumber>;
|
|
112
|
+
}>]>;
|
|
113
|
+
export type MetaQuery = Static<typeof metaQuerySchema>;
|
|
114
|
+
export declare const metaQueryValidator: import("@feathersjs/schema").Validator<any, any>;
|
|
115
|
+
export declare const metaQueryResolver: import("@feathersjs/schema").Resolver<Partial<{
|
|
116
|
+
$limit: number;
|
|
117
|
+
$skip: number;
|
|
118
|
+
$sort: {
|
|
119
|
+
name?: number | undefined;
|
|
120
|
+
};
|
|
121
|
+
$select: "name"[];
|
|
122
|
+
$and: ({
|
|
123
|
+
name?: string | Partial<{
|
|
124
|
+
$gt: string;
|
|
125
|
+
$gte: string;
|
|
126
|
+
$lt: string;
|
|
127
|
+
$lte: string;
|
|
128
|
+
$ne: string;
|
|
129
|
+
$in: string | string[];
|
|
130
|
+
$nin: string | string[];
|
|
131
|
+
} & {}> | undefined;
|
|
132
|
+
} | {
|
|
133
|
+
$or: {
|
|
134
|
+
name?: string | Partial<{
|
|
135
|
+
$gt: string;
|
|
136
|
+
$gte: string;
|
|
137
|
+
$lt: string;
|
|
138
|
+
$lte: string;
|
|
139
|
+
$ne: string;
|
|
140
|
+
$in: string | string[];
|
|
141
|
+
$nin: string | string[];
|
|
142
|
+
} & {}> | undefined;
|
|
143
|
+
}[];
|
|
144
|
+
})[];
|
|
145
|
+
$or: {
|
|
146
|
+
name?: string | Partial<{
|
|
147
|
+
$gt: string;
|
|
148
|
+
$gte: string;
|
|
149
|
+
$lt: string;
|
|
150
|
+
$lte: string;
|
|
151
|
+
$ne: string;
|
|
152
|
+
$in: string | string[];
|
|
153
|
+
$nin: string | string[];
|
|
154
|
+
} & {}> | undefined;
|
|
155
|
+
}[];
|
|
156
|
+
}> & {
|
|
157
|
+
name?: string | Partial<{
|
|
158
|
+
$gt: string;
|
|
159
|
+
$gte: string;
|
|
160
|
+
$lt: string;
|
|
161
|
+
$lte: string;
|
|
162
|
+
$ne: string;
|
|
163
|
+
$in: string | string[];
|
|
164
|
+
$nin: string | string[];
|
|
165
|
+
} & {}> | undefined;
|
|
166
|
+
} & {
|
|
167
|
+
serverInfo?: boolean | undefined;
|
|
168
|
+
top?: number | undefined;
|
|
169
|
+
}, HookContext<MetaService<import("./meta.class").MetaParams>>>;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { Params } from '@feathersjs/feathers';
|
|
2
|
+
import type { ClientApplication } from '../../client';
|
|
3
|
+
import type { Meta, MetaData, MetaPatch, MetaQuery, MetaService, ServerInfo, YearlyStatistics, PerCountyStatistics, TagsTopN, PeopleTopN, TagsSimilarityConfigs } from './meta.class';
|
|
4
|
+
export type { Meta, MetaData, MetaPatch, MetaQuery, ServerInfo, YearlyStatistics, PerCountyStatistics, TagsTopN, PeopleTopN, TagsSimilarityConfigs };
|
|
5
|
+
export type MetaClientService = Pick<MetaService<Params<MetaQuery>>, (typeof metaMethods)[number]>;
|
|
6
|
+
export declare const metaPath = "meta";
|
|
7
|
+
export declare const metaMethods: Array<keyof MetaService>;
|
|
8
|
+
export declare const metaClient: (client: ClientApplication) => void;
|
|
9
|
+
declare module '../../client' {
|
|
10
|
+
interface ServiceTypes {
|
|
11
|
+
[metaPath]: MetaClientService;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.metaClient = exports.metaMethods = exports.metaPath = void 0;
|
|
4
|
+
exports.metaPath = 'meta';
|
|
5
|
+
exports.metaMethods = ['find', 'get', 'create', 'patch', 'remove'];
|
|
6
|
+
const metaClient = (client) => {
|
|
7
|
+
const connection = client.get('connection');
|
|
8
|
+
client.use(exports.metaPath, connection.service(exports.metaPath), {
|
|
9
|
+
methods: exports.metaMethods
|
|
10
|
+
});
|
|
11
|
+
};
|
|
12
|
+
exports.metaClient = metaClient;
|
|
13
|
+
//# sourceMappingURL=meta.shared.js.map
|