@apollo-annotation/schemas 0.1.17 → 0.1.19
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/package.json +3 -3
- package/src/feature.schema.ts +4 -17
- package/src/index.ts +1 -0
- package/src/jbrowseConfig.schema.ts +9 -0
- package/src/refSeq.schema.ts +3 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@apollo-annotation/schemas",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.19",
|
|
4
4
|
"main": "./dist/index.js",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"build": "tsc"
|
|
@@ -16,9 +16,9 @@
|
|
|
16
16
|
"tslib": "^2.3.1"
|
|
17
17
|
},
|
|
18
18
|
"devDependencies": {
|
|
19
|
-
"@apollo-annotation/mst": "^0.1.
|
|
19
|
+
"@apollo-annotation/mst": "^0.1.19",
|
|
20
20
|
"@types/node": "^18.14.2",
|
|
21
|
-
"typescript": "^5.
|
|
21
|
+
"typescript": "^5.5.3"
|
|
22
22
|
},
|
|
23
23
|
"publishConfig": {
|
|
24
24
|
"access": "public"
|
package/src/feature.schema.ts
CHANGED
|
@@ -14,10 +14,6 @@ export class Feature
|
|
|
14
14
|
// Don't make this a @Prop since _id is already on a MongoDB document
|
|
15
15
|
_id: Types.ObjectId
|
|
16
16
|
|
|
17
|
-
// Here we store feature ID if it's given in attributes, otherwise gffId = _id as string
|
|
18
|
-
@Prop()
|
|
19
|
-
gffId: string
|
|
20
|
-
|
|
21
17
|
@Prop({
|
|
22
18
|
required: true,
|
|
23
19
|
index: true,
|
|
@@ -33,23 +29,14 @@ export class Feature
|
|
|
33
29
|
type: string
|
|
34
30
|
|
|
35
31
|
@Prop({ required: true })
|
|
36
|
-
|
|
32
|
+
min: number
|
|
37
33
|
|
|
38
34
|
@Prop({ required: true })
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
@Prop()
|
|
42
|
-
discontinuousLocations?: { start: number; end: number; phase?: 0 | 1 | 2 }[]
|
|
35
|
+
max: number
|
|
43
36
|
|
|
44
37
|
@Prop()
|
|
45
38
|
strand?: 1 | -1
|
|
46
39
|
|
|
47
|
-
@Prop()
|
|
48
|
-
score?: number
|
|
49
|
-
|
|
50
|
-
@Prop()
|
|
51
|
-
phase?: 0 | 1 | 2
|
|
52
|
-
|
|
53
40
|
@Prop({ type: Map, of: [String] })
|
|
54
41
|
attributes?: Record<string, string[]>
|
|
55
42
|
|
|
@@ -67,6 +54,6 @@ export const FeatureSchema = SchemaFactory.createForClass(Feature)
|
|
|
67
54
|
|
|
68
55
|
FeatureSchema.add({ children: { type: Map, of: FeatureSchema } })
|
|
69
56
|
|
|
70
|
-
FeatureSchema.index({ refSeq: 1,
|
|
71
|
-
FeatureSchema.index({ refSeq: 1,
|
|
57
|
+
FeatureSchema.index({ refSeq: 1, min: 1 })
|
|
58
|
+
FeatureSchema.index({ refSeq: 1, max: 1 })
|
|
72
59
|
FeatureSchema.index({ '$**': 'text' })
|
package/src/index.ts
CHANGED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Schema, SchemaFactory } from '@nestjs/mongoose'
|
|
2
|
+
import { Document } from 'mongoose'
|
|
3
|
+
|
|
4
|
+
export type JBrowseConfigDocument = JBrowseConfig & Document
|
|
5
|
+
|
|
6
|
+
@Schema({ strict: false })
|
|
7
|
+
export class JBrowseConfig {}
|
|
8
|
+
|
|
9
|
+
export const JBrowseConfigSchema = SchemaFactory.createForClass(JBrowseConfig)
|