-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathindex.d.ts
55 lines (49 loc) · 1.5 KB
/
index.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
import { FastifyPluginCallback, FastifyPluginAsync } from 'fastify'
import { Knex } from 'knex'
import { Model } from 'objection'
declare namespace fastifyObjectionjs {
interface FastifyObjectionObject {
/**
* Knew configuration
*/
knex: Knex.Config
/**
* Objectionjs models
*/
models: Model[]
}
interface FastifyObjectionNestedObject {
[name: string]: FastifyObjectionObject
}
interface FastifyObjectionOptions {
/**
* Knew configuration
*/
knexConfig?: Knex.Config
/**
* Objectionjs models
*/
models?: Model[]
/**
* Set to true if your columns are UPPER_SNAKE_CASED. Default: false
*/
upperCase?: boolean
/**
* Set true will place an underscore before digits (foo1Bar2 becomes foo_1_bar_2).
* When false, foo1Bar2 becomes foo1_bar2. Default false
*/
underscoreBeforeDigits?: boolean
/**
* Set to true will place underscores between consecutive uppercase letters (fooBAR becomes foo_b_a_r).
* When false, fooBAR will become foo_bar. Default: false
*/
underscoreBetweenUppercaseLetters?: boolean
}
}
declare module 'fastify' {
interface FastifyInstance {
objection: fastifyObjectionjs.FastifyObjectionObject & fastifyObjectionjs.FastifyObjectionNestedObject
}
}
declare const fastifyObjectionjs: FastifyPluginCallback<fastifyObjectionjs.FastifyObjectionOptions> | FastifyPluginAsync<fastifyObjectionjs.FastifyObjectionOptions>
export default fastifyObjectionjs