-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathglobal.d.ts
79 lines (65 loc) · 1.98 KB
/
global.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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
import NexxusError = require('./lib/NexxusError')
export class NexxusPromise<T> implements Promise<T> {
then<TResult1 = T, TResult2 = never>(onfulfilled?: ((value: T) => TResult1 | PromiseLike<TResult1>) | undefined | null, onrejected?: ((reason: NexxusError | Array<NexxusError>) => TResult2 | PromiseLike<TResult2>) | undefined | null): Promise<TResult1 | TResult2>;
catch<TResult = never>(onrejected?: ((reason: NexxusError | Array<NexxusError>) => TResult | PromiseLike<TResult>) | undefined | null): Promise<T | TResult>;
}
declare enum ModelFieldTypes {
INT = 'int',
FLOAT = 'float',
STRING = 'string',
GEOLOCATION = 'geolocation',
ARRAY = 'array',
OBJECT = 'object',
BOOL = 'bool'
}
declare interface BaseModelSettings {
reservedFieldNames: Array<keyof BaseModelReservedFieldNames>
}
declare enum BaseModelReservedFieldNames {
id = 'id',
type = 'type',
modified = 'modified',
created = 'created'
}
declare interface ApplicationSettings {
reservedFieldNames: Array<keyof ApplicationReservedFieldNames>
}
declare enum ApplicationReservedFieldNames {
admins = 'admins',
keys = 'keys'
}
declare interface ContextSettings {
reservedFieldNames: Array<keyof ContextReservedFieldNames>
}
declare enum ContextReservedFieldNames {
application_id = 'application_id'
}
declare interface AppModelSettings {
reservedFieldNames: Array<keyof AppModelReservedFieldNames>
}
declare enum AppModelReservedFieldNames {
application_id = 'application_id',
context_id = 'context_id'
}
declare enum BuiltInModels {
application = 'application',
admin = 'admin',
user = 'user',
context = 'context'
}
declare const CHANNEL_KEY_PREFIX: string
declare interface constants {
fieldTypes: ModelFieldTypes
BaseModel: BaseModelSettings
Application: ApplicationSettings
Context: ContextSettings
ApplicationModel: AppModelSettings
builtinModels: BuiltInModels
CHANNEL_KEY_PREFIX
}
export declare interface ServiceOptions {
serviceType: string,
nodeIndex: number,
configFile: string,
configFileSpec: string
}