@enonic-types/guillotine 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/Global.Modifying.d.ts +66 -0
- package/README.md +59 -0
- package/Utils.d.ts +23 -0
- package/advanced.ts +157 -0
- package/brand.ts +193 -0
- package/extensions/CreationCallbacks.d.ts +17 -0
- package/extensions/DataFetchingEnvironment.d.ts +15 -0
- package/extensions/Enums.d.ts +9 -0
- package/extensions/Field.d.ts +17 -0
- package/extensions/InputTypes.d.ts +26 -0
- package/extensions/Interfaces.d.ts +13 -0
- package/extensions/Resolver.d.ts +21 -0
- package/extensions/Resolvers.d.ts +16 -0
- package/extensions/TypeResolvers.d.ts +10 -0
- package/extensions/Types.d.ts +15 -0
- package/extensions/Unions.d.ts +12 -0
- package/extensions/index.d.ts +64 -0
- package/graphQL/CreateDataFetcherResult.d.ts +54 -0
- package/graphQL/EnumTypes.d.ts +7 -0
- package/graphQL/InputTypes.d.ts +23 -0
- package/graphQL/InterfaceTypes.d.ts +7 -0
- package/graphQL/LocalContext.d.ts +19 -0
- package/graphQL/ObjectTypes.d.ts +8 -0
- package/graphQL/ReferenceTypes.d.ts +55 -0
- package/graphQL/ScalarTypes.d.ts +35 -0
- package/graphQL/UnionTypes.d.ts +7 -0
- package/graphQL/index.d.ts +172 -0
- package/guillotine/enumTypes.ts +47 -0
- package/guillotine/index.ts +55 -0
- package/guillotine/inputTypes.ts +43 -0
- package/guillotine/objectTypes.ts +340 -0
- package/guillotine/scalarTypes.ts +15 -0
- package/index.ts +157 -0
- package/package.json +50 -0
- package/xp/index.d.ts +22 -0
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import type {CreationCallbacks} from './CreationCallbacks'
|
|
2
|
+
import type {Enums} from './Enums'
|
|
3
|
+
import type {InputTypes} from './InputTypes'
|
|
4
|
+
import type {Interfaces} from './Interfaces'
|
|
5
|
+
import type {Resolvers} from './Resolvers'
|
|
6
|
+
import type {Types} from './Types'
|
|
7
|
+
import type {TypeResolvers} from './TypeResolvers'
|
|
8
|
+
import type {Unions} from './Unions'
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
export type {
|
|
12
|
+
CreationCallback,
|
|
13
|
+
CreationCallbacks,
|
|
14
|
+
} from './CreationCallbacks'
|
|
15
|
+
|
|
16
|
+
export type {
|
|
17
|
+
Enum,
|
|
18
|
+
Enums,
|
|
19
|
+
} from './Enums'
|
|
20
|
+
|
|
21
|
+
export type {
|
|
22
|
+
Field,
|
|
23
|
+
Fields,
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export type {
|
|
27
|
+
InputType,
|
|
28
|
+
InputTypeField,
|
|
29
|
+
InputTypeFields,
|
|
30
|
+
InputTypes,
|
|
31
|
+
} from './InputTypes'
|
|
32
|
+
|
|
33
|
+
export type {DataFetchingEnvironment} from './DataFetchingEnvironment'
|
|
34
|
+
export type {
|
|
35
|
+
AnyResolver,
|
|
36
|
+
Resolver
|
|
37
|
+
} from './Resolver'
|
|
38
|
+
export type {Resolvers} from './Resolvers'
|
|
39
|
+
|
|
40
|
+
export type {
|
|
41
|
+
Type,
|
|
42
|
+
Types
|
|
43
|
+
} from './Types'
|
|
44
|
+
|
|
45
|
+
export type {
|
|
46
|
+
TypeResolver,
|
|
47
|
+
TypeResolvers,
|
|
48
|
+
} from './TypeResolvers'
|
|
49
|
+
|
|
50
|
+
export type {
|
|
51
|
+
Union,
|
|
52
|
+
Unions,
|
|
53
|
+
} from './Unions'
|
|
54
|
+
|
|
55
|
+
export declare interface Extensions {
|
|
56
|
+
creationCallbacks?: CreationCallbacks
|
|
57
|
+
enums?: Enums
|
|
58
|
+
inputTypes?: InputTypes
|
|
59
|
+
interfaces?: Interfaces
|
|
60
|
+
resolvers?: Resolvers
|
|
61
|
+
typeResolvers?: TypeResolvers
|
|
62
|
+
types?: Types
|
|
63
|
+
unions?: Unions
|
|
64
|
+
}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
// Make sure ScriptValue type exists in global scope:
|
|
2
|
+
/// <reference types="@enonic-types/global"/>
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
import type {
|
|
6
|
+
LocalContext,
|
|
7
|
+
LocalContextRecord,
|
|
8
|
+
} from './LocalContext'
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
// https://developer.enonic.com/docs/guillotine/stable/extending/resolvers#createdatafetcherresult
|
|
12
|
+
//
|
|
13
|
+
// If parentLocalContext is not provided, then localContext will override
|
|
14
|
+
// parentLocalContext.
|
|
15
|
+
//
|
|
16
|
+
// Otherwise, localContext will be merged with parentLocalContext and
|
|
17
|
+
// localContext will override parentLocalContext if they have the same keys.
|
|
18
|
+
//
|
|
19
|
+
// If localContext is not provided, then parentLocalContext will be used as
|
|
20
|
+
// localContext.
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
export declare interface CreateDataFetcherResultParams<
|
|
24
|
+
DATA extends any,
|
|
25
|
+
LOCAL_CONTEXT extends LocalContextRecord = LocalContext,
|
|
26
|
+
PARENT_LOCAL_CONTEXT extends LocalContextRecord = LocalContext
|
|
27
|
+
> {
|
|
28
|
+
data: ScriptValue // NOTE: ScriptValue type is expected to exist in global scope
|
|
29
|
+
localContext?: LocalContext<LOCAL_CONTEXT>
|
|
30
|
+
parentLocalContext?: LocalContext<PARENT_LOCAL_CONTEXT>
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
// NOTE: Same as DataFetchingEnvironment without args.
|
|
34
|
+
export interface DataFetcherResult<
|
|
35
|
+
DATA extends any,
|
|
36
|
+
LOCAL_CONTEXT extends LocalContextRecord = LocalContext
|
|
37
|
+
> {
|
|
38
|
+
// args, // Depends on the field resolver
|
|
39
|
+
localContext: LocalContext<LOCAL_CONTEXT>
|
|
40
|
+
source: DATA,
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export declare type CreateDataFetcherResult = <
|
|
44
|
+
DATA extends any,
|
|
45
|
+
LOCAL_CONTEXT extends LocalContextRecord = LocalContext,
|
|
46
|
+
PARENT_LOCAL_CONTEXT extends LocalContextRecord = LocalContext
|
|
47
|
+
>(params: CreateDataFetcherResultParams<
|
|
48
|
+
DATA,
|
|
49
|
+
LOCAL_CONTEXT,
|
|
50
|
+
PARENT_LOCAL_CONTEXT
|
|
51
|
+
>) => DataFetcherResult<
|
|
52
|
+
DATA,
|
|
53
|
+
LocalContext<PARENT_LOCAL_CONTEXT & LOCAL_CONTEXT>
|
|
54
|
+
>
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/// <reference path="../Global.Modifying.d.ts"/>
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
import type {ValueOf} from '../Utils'
|
|
5
|
+
import type {GraphQLEnumType} from './EnumTypes'
|
|
6
|
+
import type {
|
|
7
|
+
GraphQLEnumTypeReference,
|
|
8
|
+
GraphQLInputTypeReference,
|
|
9
|
+
} from './ReferenceTypes'
|
|
10
|
+
import type {GraphQLScalars} from './ScalarTypes'
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
export declare type GraphQLInputType = ValueOf<GraphQLInputTypesMap>
|
|
14
|
+
export declare type GraphQLInputTypeName = keyof GraphQLInputTypesMap
|
|
15
|
+
|
|
16
|
+
export declare type GraphQLArgs = Record<string,
|
|
17
|
+
| GraphQLEnumType
|
|
18
|
+
| GraphQLEnumTypeReference<GraphQLEnumType>
|
|
19
|
+
| GraphQLInputType
|
|
20
|
+
| GraphQLInputTypeReference<GraphQLInputType>
|
|
21
|
+
| GraphQLScalars
|
|
22
|
+
// GraphQLObjectType doesn't make sense here.
|
|
23
|
+
>
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export declare type LocalContextRecord = Record<string,string|number|boolean|null>
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
// The documentation:
|
|
5
|
+
// https://developer.enonic.com/docs/guillotine/stable/extending/resolvers
|
|
6
|
+
//
|
|
7
|
+
// Says:
|
|
8
|
+
// If parentLocalContext is not provided, then localContext will override
|
|
9
|
+
// parentLocalContext.
|
|
10
|
+
//
|
|
11
|
+
// This means that is possible to remove branch, project and siteKey in some
|
|
12
|
+
// parent createDataFetcherResult. Which is why the Partial<> is used.
|
|
13
|
+
export declare type LocalContext<
|
|
14
|
+
T extends LocalContextRecord = LocalContextRecord
|
|
15
|
+
> = Partial<{
|
|
16
|
+
branch: string
|
|
17
|
+
project: string
|
|
18
|
+
siteKey?: string
|
|
19
|
+
}> & T
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
/// <reference path="../Global.Modifying.d.ts"/>
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
import type {
|
|
5
|
+
Reference,
|
|
6
|
+
} from '../brand'
|
|
7
|
+
import type {
|
|
8
|
+
ValueOf,
|
|
9
|
+
} from '../Utils'
|
|
10
|
+
import type {
|
|
11
|
+
GraphQLEnumType,
|
|
12
|
+
} from './EnumTypes'
|
|
13
|
+
import type {
|
|
14
|
+
GraphQLInputType,
|
|
15
|
+
} from './InputTypes'
|
|
16
|
+
import type {
|
|
17
|
+
GraphQLInterfaceType,
|
|
18
|
+
} from './InterfaceTypes'
|
|
19
|
+
import type {
|
|
20
|
+
GraphQLObjectType,
|
|
21
|
+
} from './ObjectTypes'
|
|
22
|
+
import type {
|
|
23
|
+
GraphQLUnionType,
|
|
24
|
+
} from './UnionTypes'
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
// export declare type GraphQLReference<
|
|
28
|
+
// GraphQLEnumOrInputOrInterfaceOrObjectOrUnionType extends ValueOf<
|
|
29
|
+
// GraphQLEnumTypesMap
|
|
30
|
+
// & GraphQLInputTypesMap
|
|
31
|
+
// & GraphQLInterfaceTypesMap
|
|
32
|
+
// & GraphQLObjectTypesMap
|
|
33
|
+
// & GraphQLUnionTypesMap
|
|
34
|
+
// >
|
|
35
|
+
// > = Reference<GraphQLEnumOrInputOrInterfaceOrObjectOrUnionType>
|
|
36
|
+
|
|
37
|
+
export declare type GraphQLEnumTypeReference<
|
|
38
|
+
GraphQLEnumType extends ValueOf<GraphQLEnumTypesMap>
|
|
39
|
+
> = Reference<GraphQLEnumType>
|
|
40
|
+
|
|
41
|
+
export declare type GraphQLInputTypeReference<
|
|
42
|
+
GraphQLInputType extends ValueOf<GraphQLInputTypesMap>
|
|
43
|
+
> = Reference<GraphQLInputType>
|
|
44
|
+
|
|
45
|
+
export declare type GraphQLInterfaceTypeReference<
|
|
46
|
+
GraphQLInterfaceType extends ValueOf<GraphQLInterfaceTypesMap>
|
|
47
|
+
> = Reference<GraphQLInterfaceType>
|
|
48
|
+
|
|
49
|
+
export declare type GraphQLObjectTypeReference<
|
|
50
|
+
GraphQLObjectType extends ValueOf<GraphQLObjectTypesMap>
|
|
51
|
+
> = Reference<GraphQLObjectType>
|
|
52
|
+
|
|
53
|
+
export declare type GraphQLUnionTypeReference<
|
|
54
|
+
GraphQLUnionType extends ValueOf<GraphQLUnionTypesMap>
|
|
55
|
+
> = Reference<GraphQLUnionType>
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import type {BrandGraphQLScalarType} from '../brand'
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
export declare type GraphQLBoolean = BrandGraphQLScalarType<'GraphQLBoolean', boolean>
|
|
5
|
+
export declare type GraphQLDate = BrandGraphQLScalarType<'Date', string>
|
|
6
|
+
export declare type GraphQLDateTime = BrandGraphQLScalarType<'DateTime', string>
|
|
7
|
+
export declare type GraphQLFloat = BrandGraphQLScalarType<'GraphQLFloat', number>
|
|
8
|
+
export declare type GraphQLID = BrandGraphQLScalarType<'GraphQLID', string>
|
|
9
|
+
export declare type GraphQLInt = BrandGraphQLScalarType<'GraphQLInt', number>
|
|
10
|
+
export declare type GraphQLJson = BrandGraphQLScalarType<'Json', string>
|
|
11
|
+
export declare type GraphQLLocalDateTime = BrandGraphQLScalarType<'LocalDateTime', string>
|
|
12
|
+
export declare type GraphQLLocalTime = BrandGraphQLScalarType<'LocalTime', string>
|
|
13
|
+
export declare type GraphQLString = BrandGraphQLScalarType<'GraphQLString', string>
|
|
14
|
+
|
|
15
|
+
export declare interface GraphQLBaseScalars {
|
|
16
|
+
GraphQLBoolean: GraphQLBoolean
|
|
17
|
+
GraphQLFloat: GraphQLFloat
|
|
18
|
+
GraphQLID: GraphQLID
|
|
19
|
+
GraphQLInt: GraphQLInt
|
|
20
|
+
GraphQLString: GraphQLString
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export declare interface GraphQLExtendedScalars {
|
|
24
|
+
Date: GraphQLDate
|
|
25
|
+
DateTime: GraphQLDateTime
|
|
26
|
+
Json: GraphQLJson
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export declare interface GraphQLCustomScalars {
|
|
30
|
+
LocalDateTime: GraphQLLocalDateTime
|
|
31
|
+
LocalTime: GraphQLLocalTime
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export declare interface GraphQLScalars
|
|
35
|
+
extends GraphQLBaseScalars, GraphQLExtendedScalars, GraphQLCustomScalars {}
|
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
/// <reference path="../Global.Modifying.d.ts"/>
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
import type {
|
|
5
|
+
AnyGraphQLBrand,
|
|
6
|
+
GetReturnType,
|
|
7
|
+
NonNull,
|
|
8
|
+
Reference,
|
|
9
|
+
} from '../brand'
|
|
10
|
+
import type {
|
|
11
|
+
ArrayElement,
|
|
12
|
+
PartialRecord,
|
|
13
|
+
ValueOf,
|
|
14
|
+
} from '../Utils'
|
|
15
|
+
import type {
|
|
16
|
+
CreateDataFetcherResult,
|
|
17
|
+
CreateDataFetcherResultParams,
|
|
18
|
+
DataFetcherResult,
|
|
19
|
+
} from './CreateDataFetcherResult'
|
|
20
|
+
import type {
|
|
21
|
+
GraphQLEnumType,
|
|
22
|
+
GraphQLEnumTypeName,
|
|
23
|
+
} from './EnumTypes'
|
|
24
|
+
import type {
|
|
25
|
+
GraphQLInputType,
|
|
26
|
+
GraphQLInputTypeName,
|
|
27
|
+
} from './InputTypes'
|
|
28
|
+
import type {
|
|
29
|
+
GraphQLInterfaceType,
|
|
30
|
+
GraphQLInterfaceTypeName,
|
|
31
|
+
} from './InterfaceTypes'
|
|
32
|
+
import type {
|
|
33
|
+
GraphQLObjectType,
|
|
34
|
+
GraphQLObjectTypeName
|
|
35
|
+
} from './ObjectTypes'
|
|
36
|
+
import type {
|
|
37
|
+
GraphQLEnumTypeReference,
|
|
38
|
+
GraphQLInputTypeReference,
|
|
39
|
+
GraphQLInterfaceTypeReference,
|
|
40
|
+
GraphQLObjectTypeReference,
|
|
41
|
+
GraphQLUnionTypeReference,
|
|
42
|
+
} from './ReferenceTypes'
|
|
43
|
+
import type {
|
|
44
|
+
GraphQLCustomScalars,
|
|
45
|
+
GraphQLExtendedScalars,
|
|
46
|
+
GraphQLScalars,
|
|
47
|
+
} from './ScalarTypes'
|
|
48
|
+
import type {
|
|
49
|
+
GraphQLUnionType,
|
|
50
|
+
GraphQLUnionTypeName
|
|
51
|
+
} from './UnionTypes'
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
export type {
|
|
55
|
+
CreateDataFetcherResult,
|
|
56
|
+
CreateDataFetcherResultParams,
|
|
57
|
+
} from './CreateDataFetcherResult'
|
|
58
|
+
|
|
59
|
+
export type {
|
|
60
|
+
GraphQLEnumType,
|
|
61
|
+
GraphQLEnumTypeName,
|
|
62
|
+
} from './EnumTypes'
|
|
63
|
+
|
|
64
|
+
export type {
|
|
65
|
+
GraphQLArgs,
|
|
66
|
+
GraphQLInputType,
|
|
67
|
+
GraphQLInputTypeName,
|
|
68
|
+
} from './InputTypes'
|
|
69
|
+
|
|
70
|
+
export type {
|
|
71
|
+
GraphQLInterfaceType,
|
|
72
|
+
GraphQLInterfaceTypeName,
|
|
73
|
+
} from './InterfaceTypes'
|
|
74
|
+
|
|
75
|
+
export type {
|
|
76
|
+
LocalContext,
|
|
77
|
+
LocalContextRecord,
|
|
78
|
+
} from './LocalContext'
|
|
79
|
+
|
|
80
|
+
export type {
|
|
81
|
+
GraphQLObjectType,
|
|
82
|
+
GraphQLObjectTypeName,
|
|
83
|
+
} from './ObjectTypes'
|
|
84
|
+
|
|
85
|
+
export type {
|
|
86
|
+
GraphQLEnumTypeReference,
|
|
87
|
+
GraphQLInputTypeReference,
|
|
88
|
+
GraphQLInterfaceTypeReference,
|
|
89
|
+
GraphQLObjectTypeReference,
|
|
90
|
+
GraphQLUnionTypeReference,
|
|
91
|
+
} from './ReferenceTypes'
|
|
92
|
+
|
|
93
|
+
export type {
|
|
94
|
+
GraphQLBaseScalars,
|
|
95
|
+
GraphQLBoolean,
|
|
96
|
+
GraphQLCustomScalars,
|
|
97
|
+
GraphQLDate,
|
|
98
|
+
GraphQLDateTime,
|
|
99
|
+
GraphQLExtendedScalars,
|
|
100
|
+
GraphQLFloat,
|
|
101
|
+
GraphQLID,
|
|
102
|
+
GraphQLInt,
|
|
103
|
+
GraphQLJson,
|
|
104
|
+
GraphQLLocalDateTime,
|
|
105
|
+
GraphQLLocalTime,
|
|
106
|
+
GraphQLScalars,
|
|
107
|
+
GraphQLString
|
|
108
|
+
} from './ScalarTypes'
|
|
109
|
+
|
|
110
|
+
|
|
111
|
+
export declare type GraphQLNonNull<
|
|
112
|
+
GraphQLObjectType extends ValueOf<GraphQLObjectTypesMap>
|
|
113
|
+
> = NonNull<GraphQLObjectType>
|
|
114
|
+
|
|
115
|
+
export declare type GraphQLType =
|
|
116
|
+
| GraphQLEnumType
|
|
117
|
+
| GraphQLInputType
|
|
118
|
+
| GraphQLObjectType
|
|
119
|
+
| GraphQLScalars
|
|
120
|
+
|
|
121
|
+
export declare interface GraphQL
|
|
122
|
+
extends GraphQLScalars//, GraphQLExtendedScalars, GraphQLCustomScalars
|
|
123
|
+
{
|
|
124
|
+
createDataFetcherResult: CreateDataFetcherResult
|
|
125
|
+
nonNull: (type: GraphQLType) => GraphQLNonNull<typeof type>
|
|
126
|
+
list: (type: GraphQLType) => (typeof type)[]
|
|
127
|
+
reference: (typeName: string) =>
|
|
128
|
+
typeof typeName extends GraphQLEnumTypeName
|
|
129
|
+
? GraphQLEnumTypeReference<GraphQLEnumTypesMap[typeof typeName]>
|
|
130
|
+
: typeof typeName extends GraphQLInputTypeName
|
|
131
|
+
? GraphQLInputTypeReference<GraphQLInputTypesMap[typeof typeName]>
|
|
132
|
+
: typeof typeName extends GraphQLInterfaceTypeName
|
|
133
|
+
? GraphQLInterfaceTypeReference<GraphQLInterfaceTypesMap[typeof typeName]>
|
|
134
|
+
: typeof typeName extends GraphQLObjectTypeName
|
|
135
|
+
? GraphQLObjectTypeReference<GraphQLObjectTypesMap[typeof typeName]>
|
|
136
|
+
: typeof typeName extends GraphQLUnionTypeName
|
|
137
|
+
? GraphQLUnionTypeReference<GraphQLUnionTypesMap[typeof typeName]>
|
|
138
|
+
: 'reference(typeName) not registered in global GraphQLEnumTypesMap, GraphQLInputTypesMap, GraphQLInterfaceTypesMap, GraphQLObjectTypesMap or GraphQLUnionTypesMap'
|
|
139
|
+
// GraphQLReference<(GraphQLInputTypesMap & GraphQLObjectTypesMap)[typeof typeKey]> // GraphQLReference<typeof typeKey>
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
//──────────────────────────────────────────────────────────────────────────────
|
|
143
|
+
// Converters:
|
|
144
|
+
//──────────────────────────────────────────────────────────────────────────────
|
|
145
|
+
|
|
146
|
+
export declare type GraphQLTypeToGuillotineFields<
|
|
147
|
+
Type // extends ValueOf<GraphQLObjectTypesMap>
|
|
148
|
+
> = {
|
|
149
|
+
[fieldKey in keyof Type]: {
|
|
150
|
+
type: Type[fieldKey]
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
// type BasicTypes = boolean|number|string
|
|
155
|
+
|
|
156
|
+
// Note: This is sketchy, but perhaps useful?
|
|
157
|
+
export declare type GraphQLTypeToResolverResult<
|
|
158
|
+
Type // extends ValueOf<GraphQLObjectTypesMap>
|
|
159
|
+
> =
|
|
160
|
+
Type extends AnyGraphQLBrand
|
|
161
|
+
? GetReturnType<Type>
|
|
162
|
+
: Type extends AnyGraphQLBrand[]
|
|
163
|
+
? GetReturnType<ArrayElement<Type>>[]
|
|
164
|
+
: Type extends Record<string,any>
|
|
165
|
+
? {
|
|
166
|
+
[fieldKey in keyof Type]: Type[fieldKey] extends AnyGraphQLBrand
|
|
167
|
+
? GetReturnType<Type[fieldKey]>
|
|
168
|
+
: Type[fieldKey] extends AnyGraphQLBrand[]
|
|
169
|
+
? GetReturnType<ArrayElement<Type[fieldKey]>>[]
|
|
170
|
+
: 'Record with unhandeled key'
|
|
171
|
+
}
|
|
172
|
+
: 'Unhandled type'
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
// This is a value, do not add declare.
|
|
2
|
+
export enum EnumTypeName {
|
|
3
|
+
ComponentType = 'ComponentType',
|
|
4
|
+
ContentPathType = 'ContentPathType',
|
|
5
|
+
DslGeoPointDistanceType = 'DslGeoPointDistanceType',
|
|
6
|
+
DslOperatorType = 'DslOperatorType',
|
|
7
|
+
DslSortDirectionType = 'DslSortDirectionType',
|
|
8
|
+
FormItemType = 'FormItemType',
|
|
9
|
+
HighlightEncoderType = 'HighlightEncoderType',
|
|
10
|
+
HighlightFragmenterType = 'HighlightFragmenterType',
|
|
11
|
+
HighlightOrderType = 'HighlightOrderType',
|
|
12
|
+
HighlightTagsSchemaType = 'HighlightTagsSchemaType',
|
|
13
|
+
MediaIntentType = 'MediaIntentType',
|
|
14
|
+
Permission = 'Permission',
|
|
15
|
+
PrincipalType = 'PrincipalType',
|
|
16
|
+
UrlType = 'UrlType',
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export declare type EnumTypeNames = keyof typeof EnumTypeName
|
|
20
|
+
|
|
21
|
+
//──────────────────────────────────────────────────────────────────────────────
|
|
22
|
+
|
|
23
|
+
// This is a value, do not add declare.
|
|
24
|
+
export enum FormItemType {
|
|
25
|
+
ItemSet = 'ItemSet',
|
|
26
|
+
Layout = 'Layout',
|
|
27
|
+
Input = 'Input',
|
|
28
|
+
OptionSet = 'OptionSet',
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
// This is a value, do not add declare.
|
|
32
|
+
export enum Permission {
|
|
33
|
+
READ = 'READ',
|
|
34
|
+
CREATE = 'CREATE',
|
|
35
|
+
MODIFY = 'MODIFY',
|
|
36
|
+
DELETE = 'DELETE',
|
|
37
|
+
PUBLISH = 'PUBLISH',
|
|
38
|
+
READ_PERMISSIONS = 'READ_PERMISSIONS',
|
|
39
|
+
WRITE_PERMISSIONS = 'WRITE_PERMISSIONS',
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
// This is a value, do not add declare.
|
|
43
|
+
export enum PrincipalType {
|
|
44
|
+
user = 'user',
|
|
45
|
+
group = 'group',
|
|
46
|
+
role = 'role',
|
|
47
|
+
}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
export type {
|
|
2
|
+
EnumTypeNames,
|
|
3
|
+
} from './enumTypes'
|
|
4
|
+
|
|
5
|
+
export type {
|
|
6
|
+
InputTypeNames,
|
|
7
|
+
} from './inputTypes'
|
|
8
|
+
|
|
9
|
+
export type {
|
|
10
|
+
ObjectTypeNames,
|
|
11
|
+
AccessControlEntry,
|
|
12
|
+
Attachment,
|
|
13
|
+
Content,
|
|
14
|
+
ContentConnection,
|
|
15
|
+
ContentEdge,
|
|
16
|
+
ContentType,
|
|
17
|
+
ExtraData,
|
|
18
|
+
FormItem,
|
|
19
|
+
GeoPoint,
|
|
20
|
+
Icon,
|
|
21
|
+
media_Image,
|
|
22
|
+
media_Image_Data,
|
|
23
|
+
MediaFocalPoint,
|
|
24
|
+
MediaUploader,
|
|
25
|
+
PageInfo,
|
|
26
|
+
Permissions,
|
|
27
|
+
portal_Site,
|
|
28
|
+
portal_Site_Data,
|
|
29
|
+
PrincipalKey,
|
|
30
|
+
PublishInfo,
|
|
31
|
+
XData_base_ApplicationConfig,
|
|
32
|
+
XData_base_gpsInfo_DataConfig,
|
|
33
|
+
XData_media_ApplicationConfig,
|
|
34
|
+
XData_media_cameraInfo_DataConfig,
|
|
35
|
+
XData_media_imageInfo_DataConfig,
|
|
36
|
+
} from './objectTypes'
|
|
37
|
+
|
|
38
|
+
export type {
|
|
39
|
+
ScalarTypeNames,
|
|
40
|
+
} from './scalarTypes'
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
export {
|
|
45
|
+
EnumTypeName,
|
|
46
|
+
FormItemType,
|
|
47
|
+
Permission,
|
|
48
|
+
PrincipalType,
|
|
49
|
+
} from './enumTypes'
|
|
50
|
+
|
|
51
|
+
export {InputTypeName} from './inputTypes'
|
|
52
|
+
|
|
53
|
+
export {ObjectTypeName} from './objectTypes'
|
|
54
|
+
|
|
55
|
+
export {ScalarTypeName} from './scalarTypes'
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
// This is a value, do not add declare.
|
|
2
|
+
export enum InputTypeName {
|
|
3
|
+
AggregationInput = 'AggregationInput',
|
|
4
|
+
BooleanDSLExpressionInput = 'BooleanDSLExpressionInput',
|
|
5
|
+
BooleanFilterInput = 'BooleanFilterInput',
|
|
6
|
+
DSLExpressionValueInput = 'DSLExpressionValueInput',
|
|
7
|
+
DateHistogramAggregationInput = 'DateHistogramAggregationInput',
|
|
8
|
+
DateRangeAggregationInput = 'DateRangeAggregationInput',
|
|
9
|
+
DateRangeInput = 'DateRangeInput',
|
|
10
|
+
ExistsDSLExpressionInput = 'ExistsDSLExpressionInput',
|
|
11
|
+
ExistsFilterInput = 'ExistsFilterInput',
|
|
12
|
+
FilterInput = 'FilterInput',
|
|
13
|
+
FormInput = 'FormInput',
|
|
14
|
+
FulltextDSLExpressionInput = 'FulltextDSLExpressionInput',
|
|
15
|
+
GeoDistanceAggregationInput = 'GeoDistanceAggregationInput',
|
|
16
|
+
GeoPointInput = 'GeoPointInput',
|
|
17
|
+
GeoPointSortDslInput = 'GeoPointSortDslInput',
|
|
18
|
+
HasValueFilterInput = 'HasValueFilterInput',
|
|
19
|
+
HighlightInputType = 'HighlightInputType',
|
|
20
|
+
HighlightPropertiesInputType = 'HighlightPropertiesInputType',
|
|
21
|
+
IdsFilterInput = 'IdsFilterInput',
|
|
22
|
+
InDSLExpressionInput = 'InDSLExpressionInput',
|
|
23
|
+
LikeDSLExpressionInput = 'LikeDSLExpressionInput',
|
|
24
|
+
MatchAllDSLExpressionInput = 'MatchAllDSLExpressionInput',
|
|
25
|
+
MaxAggregationInput = 'MaxAggregationInput',
|
|
26
|
+
MinAggregationInput = 'MinAggregationInput',
|
|
27
|
+
NgramDSLExpressionInput = 'NgramDSLExpressionInput',
|
|
28
|
+
NotExistsFilterInput = 'NotExistsFilterInput',
|
|
29
|
+
NumberRangeInput = 'NumberRangeInput',
|
|
30
|
+
PathMatchDSLExpressionInput = 'PathMatchDSLExpressionInput',
|
|
31
|
+
ProcessHtmlInput = 'ProcessHtmlInput',
|
|
32
|
+
QueryDSLInput = 'QueryDSLInput',
|
|
33
|
+
RangeAggregationInput = 'RangeAggregationInput',
|
|
34
|
+
RangeDSLExpressionInput = 'RangeDSLExpressionInput',
|
|
35
|
+
SortDslInput = 'SortDslInput',
|
|
36
|
+
StatsAggregationInput = 'StatsAggregationInput',
|
|
37
|
+
StemmedDSLExpressionInput = 'StemmedDSLExpressionInput',
|
|
38
|
+
TermDSLExpressionInput = 'TermDSLExpressionInput',
|
|
39
|
+
TermsAggregationInput = 'TermsAggregationInput',
|
|
40
|
+
ValueCountAggregationInput = 'ValueCountAggregationInput',
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export declare type InputTypeNames = keyof typeof InputTypeName
|