Skip to content

Commit af52b3f

Browse files
committed
feat: initialize defaults
1 parent eb7822d commit af52b3f

File tree

7 files changed

+293
-129
lines changed

7 files changed

+293
-129
lines changed

src/apis/gql/gql.ts

Lines changed: 37 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -13,37 +13,36 @@ import * as types from './graphql'
1313
* Therefore it is highly recommended to use the babel or swc plugin for production.
1414
*/
1515
const documents = {
16-
'\n mutation CreateConfig($name: String, $global: globalInput) {\n createConfig(name: $name, global: $global) {\n id\n }\n }\n ':
16+
'\n mutation SetJsonStorage($paths: [String!]!, $values: [String!]!) {\n setJsonStorage(paths: $paths, values: $values)\n }\n':
17+
types.SetJsonStorageDocument,
18+
'\n mutation CreateConfig($name: String, $global: globalInput) {\n createConfig(name: $name, global: $global) {\n id\n }\n }\n':
1719
types.CreateConfigDocument,
1820
'\n mutation UpdateConfig($id: ID!, $global: globalInput!) {\n updateConfig(id: $id, global: $global) {\n id\n }\n }\n ':
1921
types.UpdateConfigDocument,
2022
'\n mutation RemoveConfig($id: ID!) {\n removeConfig(id: $id)\n }\n ':
2123
types.RemoveConfigDocument,
22-
'\n mutation SelectConfig($id: ID!) {\n selectConfig(id: $id)\n }\n ':
23-
types.SelectConfigDocument,
24+
'\n mutation SelectConfig($id: ID!) {\n selectConfig(id: $id)\n }\n': types.SelectConfigDocument,
2425
'\n mutation RenameConfig($id: ID!, $name: String!) {\n renameConfig(id: $id, name: $name)\n }\n ':
2526
types.RenameConfigDocument,
26-
'\n mutation CreateRouting($name: String, $routing: String) {\n createRouting(name: $name, routing: $routing) {\n id\n }\n }\n ':
27+
'\n mutation CreateRouting($name: String, $routing: String) {\n createRouting(name: $name, routing: $routing) {\n id\n }\n }\n':
2728
types.CreateRoutingDocument,
2829
'\n mutation UpdateRouting($id: ID!, $routing: String!) {\n updateRouting(id: $id, routing: $routing) {\n id\n }\n }\n ':
2930
types.UpdateRoutingDocument,
3031
'\n mutation RemoveRouting($id: ID!) {\n removeRouting(id: $id)\n }\n ':
3132
types.RemoveRoutingDocument,
32-
'\n mutation SelectRouting($id: ID!) {\n selectRouting(id: $id)\n }\n ':
33-
types.SelectRoutingDocument,
33+
'\n mutation SelectRouting($id: ID!) {\n selectRouting(id: $id)\n }\n': types.SelectRoutingDocument,
3434
'\n mutation RenameRouting($id: ID!, $name: String!) {\n renameRouting(id: $id, name: $name)\n }\n ':
3535
types.RenameRoutingDocument,
36-
'\n mutation CreateDNS($name: String, $dns: String) {\n createDns(name: $name, dns: $dns) {\n id\n }\n }\n ':
36+
'\n mutation CreateDNS($name: String, $dns: String) {\n createDns(name: $name, dns: $dns) {\n id\n }\n }\n':
3737
types.CreateDnsDocument,
3838
'\n mutation UpdateDNS($id: ID!, $dns: String!) {\n updateDns(id: $id, dns: $dns) {\n id\n }\n }\n ':
3939
types.UpdateDnsDocument,
4040
'\n mutation RemoveDNS($id: ID!) {\n removeDns(id: $id)\n }\n ':
4141
types.RemoveDnsDocument,
42-
'\n mutation SelectDNS($id: ID!) {\n selectDns(id: $id)\n }\n ':
43-
types.SelectDnsDocument,
42+
'\n mutation SelectDNS($id: ID!) {\n selectDns(id: $id)\n }\n': types.SelectDnsDocument,
4443
'\n mutation RenameDNS($id: ID!, $name: String!) {\n renameDns(id: $id, name: $name)\n }\n ':
4544
types.RenameDnsDocument,
46-
'\n mutation CreateGroup($name: String!, $policy: Policy!, $policyParams: [PolicyParam!]) {\n createGroup(name: $name, policy: $policy, policyParams: $policyParams) {\n id\n }\n }\n ':
45+
'\n mutation CreateGroup($name: String!, $policy: Policy!, $policyParams: [PolicyParam!]) {\n createGroup(name: $name, policy: $policy, policyParams: $policyParams) {\n id\n }\n }\n':
4746
types.CreateGroupDocument,
4847
'\n mutation RemoveGroup($id: ID!) {\n removeGroup(id: $id)\n }\n ':
4948
types.RemoveGroupDocument,
@@ -96,6 +95,8 @@ const documents = {
9695
types.UserDocument,
9796
'\n query User {\n user {\n username\n name\n avatar\n }\n }\n ':
9897
types.UserDocument,
98+
'\n query JsonStorage($paths: [String!]) {\n jsonStorage(paths: $paths)\n }\n ':
99+
types.JsonStorageDocument,
99100
'\n query NumberUsers {\n numberUsers\n }\n ': types.NumberUsersDocument,
100101
'\n mutation CreateUser($username: String!, $password: String!) {\n createUser(username: $username, password: $password)\n }\n ':
101102
types.CreateUserDocument,
@@ -121,8 +122,14 @@ export function graphql(source: string): unknown
121122
* The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
122123
*/
123124
export function graphql(
124-
source: '\n mutation CreateConfig($name: String, $global: globalInput) {\n createConfig(name: $name, global: $global) {\n id\n }\n }\n '
125-
): (typeof documents)['\n mutation CreateConfig($name: String, $global: globalInput) {\n createConfig(name: $name, global: $global) {\n id\n }\n }\n ']
125+
source: '\n mutation SetJsonStorage($paths: [String!]!, $values: [String!]!) {\n setJsonStorage(paths: $paths, values: $values)\n }\n'
126+
): (typeof documents)['\n mutation SetJsonStorage($paths: [String!]!, $values: [String!]!) {\n setJsonStorage(paths: $paths, values: $values)\n }\n']
127+
/**
128+
* The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
129+
*/
130+
export function graphql(
131+
source: '\n mutation CreateConfig($name: String, $global: globalInput) {\n createConfig(name: $name, global: $global) {\n id\n }\n }\n'
132+
): (typeof documents)['\n mutation CreateConfig($name: String, $global: globalInput) {\n createConfig(name: $name, global: $global) {\n id\n }\n }\n']
126133
/**
127134
* The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
128135
*/
@@ -139,8 +146,8 @@ export function graphql(
139146
* The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
140147
*/
141148
export function graphql(
142-
source: '\n mutation SelectConfig($id: ID!) {\n selectConfig(id: $id)\n }\n '
143-
): (typeof documents)['\n mutation SelectConfig($id: ID!) {\n selectConfig(id: $id)\n }\n ']
149+
source: '\n mutation SelectConfig($id: ID!) {\n selectConfig(id: $id)\n }\n'
150+
): (typeof documents)['\n mutation SelectConfig($id: ID!) {\n selectConfig(id: $id)\n }\n']
144151
/**
145152
* The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
146153
*/
@@ -151,8 +158,8 @@ export function graphql(
151158
* The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
152159
*/
153160
export function graphql(
154-
source: '\n mutation CreateRouting($name: String, $routing: String) {\n createRouting(name: $name, routing: $routing) {\n id\n }\n }\n '
155-
): (typeof documents)['\n mutation CreateRouting($name: String, $routing: String) {\n createRouting(name: $name, routing: $routing) {\n id\n }\n }\n ']
161+
source: '\n mutation CreateRouting($name: String, $routing: String) {\n createRouting(name: $name, routing: $routing) {\n id\n }\n }\n'
162+
): (typeof documents)['\n mutation CreateRouting($name: String, $routing: String) {\n createRouting(name: $name, routing: $routing) {\n id\n }\n }\n']
156163
/**
157164
* The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
158165
*/
@@ -169,8 +176,8 @@ export function graphql(
169176
* The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
170177
*/
171178
export function graphql(
172-
source: '\n mutation SelectRouting($id: ID!) {\n selectRouting(id: $id)\n }\n '
173-
): (typeof documents)['\n mutation SelectRouting($id: ID!) {\n selectRouting(id: $id)\n }\n ']
179+
source: '\n mutation SelectRouting($id: ID!) {\n selectRouting(id: $id)\n }\n'
180+
): (typeof documents)['\n mutation SelectRouting($id: ID!) {\n selectRouting(id: $id)\n }\n']
174181
/**
175182
* The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
176183
*/
@@ -181,8 +188,8 @@ export function graphql(
181188
* The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
182189
*/
183190
export function graphql(
184-
source: '\n mutation CreateDNS($name: String, $dns: String) {\n createDns(name: $name, dns: $dns) {\n id\n }\n }\n '
185-
): (typeof documents)['\n mutation CreateDNS($name: String, $dns: String) {\n createDns(name: $name, dns: $dns) {\n id\n }\n }\n ']
191+
source: '\n mutation CreateDNS($name: String, $dns: String) {\n createDns(name: $name, dns: $dns) {\n id\n }\n }\n'
192+
): (typeof documents)['\n mutation CreateDNS($name: String, $dns: String) {\n createDns(name: $name, dns: $dns) {\n id\n }\n }\n']
186193
/**
187194
* The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
188195
*/
@@ -199,8 +206,8 @@ export function graphql(
199206
* The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
200207
*/
201208
export function graphql(
202-
source: '\n mutation SelectDNS($id: ID!) {\n selectDns(id: $id)\n }\n '
203-
): (typeof documents)['\n mutation SelectDNS($id: ID!) {\n selectDns(id: $id)\n }\n ']
209+
source: '\n mutation SelectDNS($id: ID!) {\n selectDns(id: $id)\n }\n'
210+
): (typeof documents)['\n mutation SelectDNS($id: ID!) {\n selectDns(id: $id)\n }\n']
204211
/**
205212
* The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
206213
*/
@@ -211,8 +218,8 @@ export function graphql(
211218
* The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
212219
*/
213220
export function graphql(
214-
source: '\n mutation CreateGroup($name: String!, $policy: Policy!, $policyParams: [PolicyParam!]) {\n createGroup(name: $name, policy: $policy, policyParams: $policyParams) {\n id\n }\n }\n '
215-
): (typeof documents)['\n mutation CreateGroup($name: String!, $policy: Policy!, $policyParams: [PolicyParam!]) {\n createGroup(name: $name, policy: $policy, policyParams: $policyParams) {\n id\n }\n }\n ']
221+
source: '\n mutation CreateGroup($name: String!, $policy: Policy!, $policyParams: [PolicyParam!]) {\n createGroup(name: $name, policy: $policy, policyParams: $policyParams) {\n id\n }\n }\n'
222+
): (typeof documents)['\n mutation CreateGroup($name: String!, $policy: Policy!, $policyParams: [PolicyParam!]) {\n createGroup(name: $name, policy: $policy, policyParams: $policyParams) {\n id\n }\n }\n']
216223
/**
217224
* The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
218225
*/
@@ -369,6 +376,12 @@ export function graphql(
369376
export function graphql(
370377
source: '\n query User {\n user {\n username\n name\n avatar\n }\n }\n '
371378
): (typeof documents)['\n query User {\n user {\n username\n name\n avatar\n }\n }\n ']
379+
/**
380+
* The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
381+
*/
382+
export function graphql(
383+
source: '\n query JsonStorage($paths: [String!]) {\n jsonStorage(paths: $paths)\n }\n '
384+
): (typeof documents)['\n query JsonStorage($paths: [String!]) {\n jsonStorage(paths: $paths)\n }\n ']
372385
/**
373386
* The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
374387
*/

src/apis/gql/graphql.ts

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -629,6 +629,13 @@ export type GlobalInput = {
629629
wanInterface?: InputMaybe<Array<Scalars['String']['input']>>
630630
}
631631

632+
export type SetJsonStorageMutationVariables = Exact<{
633+
paths: Array<Scalars['String']['input']> | Scalars['String']['input']
634+
values: Array<Scalars['String']['input']> | Scalars['String']['input']
635+
}>
636+
637+
export type SetJsonStorageMutation = { __typename?: 'Mutation'; setJsonStorage: number }
638+
632639
export type CreateConfigMutationVariables = Exact<{
633640
name?: InputMaybe<Scalars['String']['input']>
634641
global?: InputMaybe<GlobalInput>
@@ -1070,6 +1077,61 @@ export type TokenQueryVariables = Exact<{
10701077

10711078
export type TokenQuery = { __typename?: 'Query'; token: string }
10721079

1080+
export const SetJsonStorageDocument = {
1081+
kind: 'Document',
1082+
definitions: [
1083+
{
1084+
kind: 'OperationDefinition',
1085+
operation: 'mutation',
1086+
name: { kind: 'Name', value: 'SetJsonStorage' },
1087+
variableDefinitions: [
1088+
{
1089+
kind: 'VariableDefinition',
1090+
variable: { kind: 'Variable', name: { kind: 'Name', value: 'paths' } },
1091+
type: {
1092+
kind: 'NonNullType',
1093+
type: {
1094+
kind: 'ListType',
1095+
type: { kind: 'NonNullType', type: { kind: 'NamedType', name: { kind: 'Name', value: 'String' } } }
1096+
}
1097+
}
1098+
},
1099+
{
1100+
kind: 'VariableDefinition',
1101+
variable: { kind: 'Variable', name: { kind: 'Name', value: 'values' } },
1102+
type: {
1103+
kind: 'NonNullType',
1104+
type: {
1105+
kind: 'ListType',
1106+
type: { kind: 'NonNullType', type: { kind: 'NamedType', name: { kind: 'Name', value: 'String' } } }
1107+
}
1108+
}
1109+
}
1110+
],
1111+
selectionSet: {
1112+
kind: 'SelectionSet',
1113+
selections: [
1114+
{
1115+
kind: 'Field',
1116+
name: { kind: 'Name', value: 'setJsonStorage' },
1117+
arguments: [
1118+
{
1119+
kind: 'Argument',
1120+
name: { kind: 'Name', value: 'paths' },
1121+
value: { kind: 'Variable', name: { kind: 'Name', value: 'paths' } }
1122+
},
1123+
{
1124+
kind: 'Argument',
1125+
name: { kind: 'Name', value: 'values' },
1126+
value: { kind: 'Variable', name: { kind: 'Name', value: 'values' } }
1127+
}
1128+
]
1129+
}
1130+
]
1131+
}
1132+
}
1133+
]
1134+
} as unknown as DocumentNode<SetJsonStorageMutation, SetJsonStorageMutationVariables>
10731135
export const CreateConfigDocument = {
10741136
kind: 'Document',
10751137
definitions: [

0 commit comments

Comments
 (0)