-
Notifications
You must be signed in to change notification settings - Fork 45
/
CreateModal.types.ts
129 lines (105 loc) · 2.83 KB
/
CreateModal.types.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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
/*******************************************************************************
* Copyright (c) 2023 Obeo.
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v2.0
* which accompanies this distribution, and is available at
* https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Obeo - initial API and implementation
*******************************************************************************/
import { GQLReferenceWidget } from '../ReferenceWidgetFragment.types';
export interface CreateModalProps {
editingContextId: string;
widget: GQLReferenceWidget;
onClose: (newElementId: string) => void;
}
export interface GQLCreateChildMutationData {
createChild: GQLCreateChildPayload;
}
export interface GQLCreateChildPayload {
__typename: string;
}
export interface GQLErrorPayload extends GQLCreateChildPayload {
message: string;
}
export interface GQLGetChildCreationDescriptionsQueryVariables {
editingContextId: string;
kind: string;
referenceKind?: string;
}
export interface GQLGetChildCreationDescriptionsQueryData {
viewer: GQLViewer;
}
export interface GQLViewer {
editingContext: GQLEditingContext;
}
export interface GQLEditingContext {
childCreationDescriptions: GQLChildCreationDescription[];
}
export interface GQLChildCreationDescription {
id: string;
label: string;
iconURL: string;
}
export interface GQLCreateRootObjectMutationData {
createRootObject: GQLCreateRootObjectPayload;
}
export interface GQLCreateRootObjectPayload {
__typename: string;
}
export interface GQLGetDomainsQueryVariables {
editingContextId: string;
}
export interface GQLGetDomainsQueryData {
viewer: GQLRootViewer;
}
export interface GQLGetRootObjectCreationDescriptionsQueryVariables {
editingContextId: string;
domainId: string;
suggested: boolean;
referenceKind?: string;
}
export interface GQLGetRootObjectCreationDescriptionsQueryData {
viewer: GQLRootViewer;
}
export interface GQLRootViewer {
editingContext: GQLRootEditingContext;
}
export interface GQLRootEditingContext {
rootObjectCreationDescriptions: GQLRootChildCreationDescription[];
domains: GQLDomain[];
}
export interface GQLRootChildCreationDescription {
id: string;
label: string;
iconURL: string;
}
export interface GQLDomain {
id: string;
label: string;
}
export interface GQLCreateRootObjectSuccessPayload extends GQLCreateRootObjectPayload {
id: string;
object: GQLObject;
}
export interface Domain {
id: string;
label: string;
}
export interface GQLCreateChildSuccessPayload extends GQLCreateChildPayload {
id: string;
object: GQLObject;
}
export interface ChildCreationDescription {
id: string;
label: string;
iconURL: string;
}
export interface GQLObject {
id: string;
label: string;
kind: string;
}