graphql.tsx 35 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949
  1. import { gql } from '@apollo/client';
  2. import * as Apollo from '@apollo/client';
  3. export type Maybe<T> = T | null;
  4. export type InputMaybe<T> = Maybe<T>;
  5. export type Exact<T extends { [key: string]: unknown }> = { [K in keyof T]: T[K] };
  6. export type MakeOptional<T, K extends keyof T> = Omit<T, K> & { [SubKey in K]?: Maybe<T[SubKey]> };
  7. export type MakeMaybe<T, K extends keyof T> = Omit<T, K> & { [SubKey in K]: Maybe<T[SubKey]> };
  8. const defaultOptions = {} as const;
  9. /** All built-in and custom scalars, mapped to their actual values */
  10. export type Scalars = {
  11. ID: string;
  12. String: string;
  13. Boolean: boolean;
  14. Int: number;
  15. Float: number;
  16. /** The javascript `Date` as string. Type represents date and time as the ISO Date string. */
  17. DateTime: any;
  18. /** The `JSONObject` scalar type represents JSON objects as specified by [ECMA-404](http://www.ecma-international.org/publications/files/ECMA-ST/ECMA-404.pdf). */
  19. JSONObject: any;
  20. };
  21. export type App = {
  22. __typename?: 'App';
  23. config: Scalars['JSONObject'];
  24. createdAt: Scalars['DateTime'];
  25. id: Scalars['String'];
  26. info?: Maybe<AppInfo>;
  27. lastOpened: Scalars['DateTime'];
  28. numOpened: Scalars['Float'];
  29. status: AppStatusEnum;
  30. updateInfo?: Maybe<UpdateInfo>;
  31. updatedAt: Scalars['DateTime'];
  32. version?: Maybe<Scalars['Float']>;
  33. };
  34. export enum AppCategoriesEnum {
  35. Automation = 'AUTOMATION',
  36. Books = 'BOOKS',
  37. Data = 'DATA',
  38. Development = 'DEVELOPMENT',
  39. Featured = 'FEATURED',
  40. Finance = 'FINANCE',
  41. Media = 'MEDIA',
  42. Music = 'MUSIC',
  43. Network = 'NETWORK',
  44. Photography = 'PHOTOGRAPHY',
  45. Security = 'SECURITY',
  46. Social = 'SOCIAL',
  47. Utilities = 'UTILITIES'
  48. }
  49. export type AppInfo = {
  50. __typename?: 'AppInfo';
  51. author: Scalars['String'];
  52. available: Scalars['Boolean'];
  53. categories: Array<AppCategoriesEnum>;
  54. description: Scalars['String'];
  55. form_fields: Array<FormField>;
  56. id: Scalars['String'];
  57. name: Scalars['String'];
  58. port: Scalars['Float'];
  59. requirements?: Maybe<Scalars['JSONObject']>;
  60. short_desc: Scalars['String'];
  61. source: Scalars['String'];
  62. tipi_version: Scalars['Float'];
  63. url_suffix?: Maybe<Scalars['String']>;
  64. version?: Maybe<Scalars['String']>;
  65. };
  66. export type AppInputType = {
  67. form: Scalars['JSONObject'];
  68. id: Scalars['String'];
  69. };
  70. export enum AppStatusEnum {
  71. Installing = 'INSTALLING',
  72. Missing = 'MISSING',
  73. Running = 'RUNNING',
  74. Starting = 'STARTING',
  75. Stopped = 'STOPPED',
  76. Stopping = 'STOPPING',
  77. Uninstalling = 'UNINSTALLING',
  78. Updating = 'UPDATING'
  79. }
  80. export type Cpu = {
  81. __typename?: 'Cpu';
  82. load: Scalars['Float'];
  83. };
  84. export type DiskMemory = {
  85. __typename?: 'DiskMemory';
  86. available: Scalars['Float'];
  87. total: Scalars['Float'];
  88. used: Scalars['Float'];
  89. };
  90. export enum FieldTypesEnum {
  91. Email = 'email',
  92. Fqdn = 'fqdn',
  93. Fqdnip = 'fqdnip',
  94. Ip = 'ip',
  95. Number = 'number',
  96. Password = 'password',
  97. Random = 'random',
  98. Text = 'text',
  99. Url = 'url'
  100. }
  101. export type FormField = {
  102. __typename?: 'FormField';
  103. env_variable: Scalars['String'];
  104. hint?: Maybe<Scalars['String']>;
  105. label: Scalars['String'];
  106. max?: Maybe<Scalars['Float']>;
  107. min?: Maybe<Scalars['Float']>;
  108. required?: Maybe<Scalars['Boolean']>;
  109. type: FieldTypesEnum;
  110. };
  111. export type ListAppsResonse = {
  112. __typename?: 'ListAppsResonse';
  113. apps: Array<AppInfo>;
  114. total: Scalars['Float'];
  115. };
  116. export type Mutation = {
  117. __typename?: 'Mutation';
  118. installApp: App;
  119. login: UserResponse;
  120. logout: Scalars['Boolean'];
  121. register: UserResponse;
  122. startApp: App;
  123. stopApp: App;
  124. uninstallApp: App;
  125. updateApp: App;
  126. updateAppConfig: App;
  127. };
  128. export type MutationInstallAppArgs = {
  129. input: AppInputType;
  130. };
  131. export type MutationLoginArgs = {
  132. input: UsernamePasswordInput;
  133. };
  134. export type MutationRegisterArgs = {
  135. input: UsernamePasswordInput;
  136. };
  137. export type MutationStartAppArgs = {
  138. id: Scalars['String'];
  139. };
  140. export type MutationStopAppArgs = {
  141. id: Scalars['String'];
  142. };
  143. export type MutationUninstallAppArgs = {
  144. id: Scalars['String'];
  145. };
  146. export type MutationUpdateAppArgs = {
  147. id: Scalars['String'];
  148. };
  149. export type MutationUpdateAppConfigArgs = {
  150. input: AppInputType;
  151. };
  152. export type Query = {
  153. __typename?: 'Query';
  154. getApp: App;
  155. installedApps: Array<App>;
  156. isConfigured: Scalars['Boolean'];
  157. listAppsInfo: ListAppsResonse;
  158. me?: Maybe<User>;
  159. systemInfo?: Maybe<SystemInfoResponse>;
  160. version: VersionResponse;
  161. };
  162. export type QueryGetAppArgs = {
  163. id: Scalars['String'];
  164. };
  165. export type SystemInfoResponse = {
  166. __typename?: 'SystemInfoResponse';
  167. cpu: Cpu;
  168. disk: DiskMemory;
  169. memory: DiskMemory;
  170. };
  171. export type UpdateInfo = {
  172. __typename?: 'UpdateInfo';
  173. current: Scalars['Float'];
  174. dockerVersion: Scalars['String'];
  175. latest: Scalars['Float'];
  176. };
  177. export type User = {
  178. __typename?: 'User';
  179. createdAt: Scalars['DateTime'];
  180. id: Scalars['ID'];
  181. updatedAt: Scalars['DateTime'];
  182. username: Scalars['String'];
  183. };
  184. export type UserResponse = {
  185. __typename?: 'UserResponse';
  186. user?: Maybe<User>;
  187. };
  188. export type UsernamePasswordInput = {
  189. password: Scalars['String'];
  190. username: Scalars['String'];
  191. };
  192. export type VersionResponse = {
  193. __typename?: 'VersionResponse';
  194. current: Scalars['String'];
  195. latest?: Maybe<Scalars['String']>;
  196. };
  197. export type InstallAppMutationVariables = Exact<{
  198. input: AppInputType;
  199. }>;
  200. export type InstallAppMutation = { __typename?: 'Mutation', installApp: { __typename: 'App', id: string, status: AppStatusEnum } };
  201. export type LoginMutationVariables = Exact<{
  202. input: UsernamePasswordInput;
  203. }>;
  204. export type LoginMutation = { __typename?: 'Mutation', login: { __typename?: 'UserResponse', user?: { __typename?: 'User', id: string } | null } };
  205. export type LogoutMutationVariables = Exact<{ [key: string]: never; }>;
  206. export type LogoutMutation = { __typename?: 'Mutation', logout: boolean };
  207. export type RegisterMutationVariables = Exact<{
  208. input: UsernamePasswordInput;
  209. }>;
  210. export type RegisterMutation = { __typename?: 'Mutation', register: { __typename?: 'UserResponse', user?: { __typename?: 'User', id: string } | null } };
  211. export type StartAppMutationVariables = Exact<{
  212. id: Scalars['String'];
  213. }>;
  214. export type StartAppMutation = { __typename?: 'Mutation', startApp: { __typename: 'App', id: string, status: AppStatusEnum } };
  215. export type StopAppMutationVariables = Exact<{
  216. id: Scalars['String'];
  217. }>;
  218. export type StopAppMutation = { __typename?: 'Mutation', stopApp: { __typename: 'App', id: string, status: AppStatusEnum } };
  219. export type UninstallAppMutationVariables = Exact<{
  220. id: Scalars['String'];
  221. }>;
  222. export type UninstallAppMutation = { __typename?: 'Mutation', uninstallApp: { __typename: 'App', id: string, status: AppStatusEnum } };
  223. export type UpdateAppMutationVariables = Exact<{
  224. id: Scalars['String'];
  225. }>;
  226. export type UpdateAppMutation = { __typename?: 'Mutation', updateApp: { __typename: 'App', id: string, status: AppStatusEnum } };
  227. export type UpdateAppConfigMutationVariables = Exact<{
  228. input: AppInputType;
  229. }>;
  230. export type UpdateAppConfigMutation = { __typename?: 'Mutation', updateAppConfig: { __typename: 'App', id: string, status: AppStatusEnum } };
  231. export type GetAppQueryVariables = Exact<{
  232. appId: Scalars['String'];
  233. }>;
  234. export type GetAppQuery = { __typename?: 'Query', getApp: { __typename?: 'App', id: string, status: AppStatusEnum, config: any, version?: number | null, updateInfo?: { __typename?: 'UpdateInfo', current: number, latest: number, dockerVersion: string } | null, info?: { __typename?: 'AppInfo', id: string, port: number, name: string, description: string, available: boolean, version?: string | null, tipi_version: number, short_desc: string, author: string, source: string, categories: Array<AppCategoriesEnum>, url_suffix?: string | null, form_fields: Array<{ __typename?: 'FormField', type: FieldTypesEnum, label: string, max?: number | null, min?: number | null, hint?: string | null, required?: boolean | null, env_variable: string }> } | null } };
  235. export type InstalledAppsQueryVariables = Exact<{ [key: string]: never; }>;
  236. export type InstalledAppsQuery = { __typename?: 'Query', installedApps: Array<{ __typename?: 'App', id: string, status: AppStatusEnum, config: any, version?: number | null, updateInfo?: { __typename?: 'UpdateInfo', current: number, latest: number, dockerVersion: string } | null, info?: { __typename?: 'AppInfo', id: string, name: string, description: string, tipi_version: number, short_desc: string } | null }> };
  237. export type ConfiguredQueryVariables = Exact<{ [key: string]: never; }>;
  238. export type ConfiguredQuery = { __typename?: 'Query', isConfigured: boolean };
  239. export type ListAppsQueryVariables = Exact<{ [key: string]: never; }>;
  240. export type ListAppsQuery = { __typename?: 'Query', listAppsInfo: { __typename?: 'ListAppsResonse', total: number, apps: Array<{ __typename?: 'AppInfo', id: string, available: boolean, tipi_version: number, port: number, name: string, version?: string | null, short_desc: string, author: string, categories: Array<AppCategoriesEnum> }> } };
  241. export type MeQueryVariables = Exact<{ [key: string]: never; }>;
  242. export type MeQuery = { __typename?: 'Query', me?: { __typename?: 'User', id: string } | null };
  243. export type SystemInfoQueryVariables = Exact<{ [key: string]: never; }>;
  244. export type SystemInfoQuery = { __typename?: 'Query', systemInfo?: { __typename?: 'SystemInfoResponse', cpu: { __typename?: 'Cpu', load: number }, disk: { __typename?: 'DiskMemory', available: number, used: number, total: number }, memory: { __typename?: 'DiskMemory', available: number, used: number, total: number } } | null };
  245. export type VersionQueryVariables = Exact<{ [key: string]: never; }>;
  246. export type VersionQuery = { __typename?: 'Query', version: { __typename?: 'VersionResponse', current: string, latest?: string | null } };
  247. export const InstallAppDocument = gql`
  248. mutation InstallApp($input: AppInputType!) {
  249. installApp(input: $input) {
  250. id
  251. status
  252. __typename
  253. }
  254. }
  255. `;
  256. export type InstallAppMutationFn = Apollo.MutationFunction<InstallAppMutation, InstallAppMutationVariables>;
  257. /**
  258. * __useInstallAppMutation__
  259. *
  260. * To run a mutation, you first call `useInstallAppMutation` within a React component and pass it any options that fit your needs.
  261. * When your component renders, `useInstallAppMutation` returns a tuple that includes:
  262. * - A mutate function that you can call at any time to execute the mutation
  263. * - An object with fields that represent the current status of the mutation's execution
  264. *
  265. * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2;
  266. *
  267. * @example
  268. * const [installAppMutation, { data, loading, error }] = useInstallAppMutation({
  269. * variables: {
  270. * input: // value for 'input'
  271. * },
  272. * });
  273. */
  274. export function useInstallAppMutation(baseOptions?: Apollo.MutationHookOptions<InstallAppMutation, InstallAppMutationVariables>) {
  275. const options = {...defaultOptions, ...baseOptions}
  276. return Apollo.useMutation<InstallAppMutation, InstallAppMutationVariables>(InstallAppDocument, options);
  277. }
  278. export type InstallAppMutationHookResult = ReturnType<typeof useInstallAppMutation>;
  279. export type InstallAppMutationResult = Apollo.MutationResult<InstallAppMutation>;
  280. export type InstallAppMutationOptions = Apollo.BaseMutationOptions<InstallAppMutation, InstallAppMutationVariables>;
  281. export const LoginDocument = gql`
  282. mutation Login($input: UsernamePasswordInput!) {
  283. login(input: $input) {
  284. user {
  285. id
  286. }
  287. }
  288. }
  289. `;
  290. export type LoginMutationFn = Apollo.MutationFunction<LoginMutation, LoginMutationVariables>;
  291. /**
  292. * __useLoginMutation__
  293. *
  294. * To run a mutation, you first call `useLoginMutation` within a React component and pass it any options that fit your needs.
  295. * When your component renders, `useLoginMutation` returns a tuple that includes:
  296. * - A mutate function that you can call at any time to execute the mutation
  297. * - An object with fields that represent the current status of the mutation's execution
  298. *
  299. * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2;
  300. *
  301. * @example
  302. * const [loginMutation, { data, loading, error }] = useLoginMutation({
  303. * variables: {
  304. * input: // value for 'input'
  305. * },
  306. * });
  307. */
  308. export function useLoginMutation(baseOptions?: Apollo.MutationHookOptions<LoginMutation, LoginMutationVariables>) {
  309. const options = {...defaultOptions, ...baseOptions}
  310. return Apollo.useMutation<LoginMutation, LoginMutationVariables>(LoginDocument, options);
  311. }
  312. export type LoginMutationHookResult = ReturnType<typeof useLoginMutation>;
  313. export type LoginMutationResult = Apollo.MutationResult<LoginMutation>;
  314. export type LoginMutationOptions = Apollo.BaseMutationOptions<LoginMutation, LoginMutationVariables>;
  315. export const LogoutDocument = gql`
  316. mutation Logout {
  317. logout
  318. }
  319. `;
  320. export type LogoutMutationFn = Apollo.MutationFunction<LogoutMutation, LogoutMutationVariables>;
  321. /**
  322. * __useLogoutMutation__
  323. *
  324. * To run a mutation, you first call `useLogoutMutation` within a React component and pass it any options that fit your needs.
  325. * When your component renders, `useLogoutMutation` returns a tuple that includes:
  326. * - A mutate function that you can call at any time to execute the mutation
  327. * - An object with fields that represent the current status of the mutation's execution
  328. *
  329. * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2;
  330. *
  331. * @example
  332. * const [logoutMutation, { data, loading, error }] = useLogoutMutation({
  333. * variables: {
  334. * },
  335. * });
  336. */
  337. export function useLogoutMutation(baseOptions?: Apollo.MutationHookOptions<LogoutMutation, LogoutMutationVariables>) {
  338. const options = {...defaultOptions, ...baseOptions}
  339. return Apollo.useMutation<LogoutMutation, LogoutMutationVariables>(LogoutDocument, options);
  340. }
  341. export type LogoutMutationHookResult = ReturnType<typeof useLogoutMutation>;
  342. export type LogoutMutationResult = Apollo.MutationResult<LogoutMutation>;
  343. export type LogoutMutationOptions = Apollo.BaseMutationOptions<LogoutMutation, LogoutMutationVariables>;
  344. export const RegisterDocument = gql`
  345. mutation Register($input: UsernamePasswordInput!) {
  346. register(input: $input) {
  347. user {
  348. id
  349. }
  350. }
  351. }
  352. `;
  353. export type RegisterMutationFn = Apollo.MutationFunction<RegisterMutation, RegisterMutationVariables>;
  354. /**
  355. * __useRegisterMutation__
  356. *
  357. * To run a mutation, you first call `useRegisterMutation` within a React component and pass it any options that fit your needs.
  358. * When your component renders, `useRegisterMutation` returns a tuple that includes:
  359. * - A mutate function that you can call at any time to execute the mutation
  360. * - An object with fields that represent the current status of the mutation's execution
  361. *
  362. * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2;
  363. *
  364. * @example
  365. * const [registerMutation, { data, loading, error }] = useRegisterMutation({
  366. * variables: {
  367. * input: // value for 'input'
  368. * },
  369. * });
  370. */
  371. export function useRegisterMutation(baseOptions?: Apollo.MutationHookOptions<RegisterMutation, RegisterMutationVariables>) {
  372. const options = {...defaultOptions, ...baseOptions}
  373. return Apollo.useMutation<RegisterMutation, RegisterMutationVariables>(RegisterDocument, options);
  374. }
  375. export type RegisterMutationHookResult = ReturnType<typeof useRegisterMutation>;
  376. export type RegisterMutationResult = Apollo.MutationResult<RegisterMutation>;
  377. export type RegisterMutationOptions = Apollo.BaseMutationOptions<RegisterMutation, RegisterMutationVariables>;
  378. export const StartAppDocument = gql`
  379. mutation StartApp($id: String!) {
  380. startApp(id: $id) {
  381. id
  382. status
  383. __typename
  384. }
  385. }
  386. `;
  387. export type StartAppMutationFn = Apollo.MutationFunction<StartAppMutation, StartAppMutationVariables>;
  388. /**
  389. * __useStartAppMutation__
  390. *
  391. * To run a mutation, you first call `useStartAppMutation` within a React component and pass it any options that fit your needs.
  392. * When your component renders, `useStartAppMutation` returns a tuple that includes:
  393. * - A mutate function that you can call at any time to execute the mutation
  394. * - An object with fields that represent the current status of the mutation's execution
  395. *
  396. * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2;
  397. *
  398. * @example
  399. * const [startAppMutation, { data, loading, error }] = useStartAppMutation({
  400. * variables: {
  401. * id: // value for 'id'
  402. * },
  403. * });
  404. */
  405. export function useStartAppMutation(baseOptions?: Apollo.MutationHookOptions<StartAppMutation, StartAppMutationVariables>) {
  406. const options = {...defaultOptions, ...baseOptions}
  407. return Apollo.useMutation<StartAppMutation, StartAppMutationVariables>(StartAppDocument, options);
  408. }
  409. export type StartAppMutationHookResult = ReturnType<typeof useStartAppMutation>;
  410. export type StartAppMutationResult = Apollo.MutationResult<StartAppMutation>;
  411. export type StartAppMutationOptions = Apollo.BaseMutationOptions<StartAppMutation, StartAppMutationVariables>;
  412. export const StopAppDocument = gql`
  413. mutation StopApp($id: String!) {
  414. stopApp(id: $id) {
  415. id
  416. status
  417. __typename
  418. }
  419. }
  420. `;
  421. export type StopAppMutationFn = Apollo.MutationFunction<StopAppMutation, StopAppMutationVariables>;
  422. /**
  423. * __useStopAppMutation__
  424. *
  425. * To run a mutation, you first call `useStopAppMutation` within a React component and pass it any options that fit your needs.
  426. * When your component renders, `useStopAppMutation` returns a tuple that includes:
  427. * - A mutate function that you can call at any time to execute the mutation
  428. * - An object with fields that represent the current status of the mutation's execution
  429. *
  430. * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2;
  431. *
  432. * @example
  433. * const [stopAppMutation, { data, loading, error }] = useStopAppMutation({
  434. * variables: {
  435. * id: // value for 'id'
  436. * },
  437. * });
  438. */
  439. export function useStopAppMutation(baseOptions?: Apollo.MutationHookOptions<StopAppMutation, StopAppMutationVariables>) {
  440. const options = {...defaultOptions, ...baseOptions}
  441. return Apollo.useMutation<StopAppMutation, StopAppMutationVariables>(StopAppDocument, options);
  442. }
  443. export type StopAppMutationHookResult = ReturnType<typeof useStopAppMutation>;
  444. export type StopAppMutationResult = Apollo.MutationResult<StopAppMutation>;
  445. export type StopAppMutationOptions = Apollo.BaseMutationOptions<StopAppMutation, StopAppMutationVariables>;
  446. export const UninstallAppDocument = gql`
  447. mutation UninstallApp($id: String!) {
  448. uninstallApp(id: $id) {
  449. id
  450. status
  451. __typename
  452. }
  453. }
  454. `;
  455. export type UninstallAppMutationFn = Apollo.MutationFunction<UninstallAppMutation, UninstallAppMutationVariables>;
  456. /**
  457. * __useUninstallAppMutation__
  458. *
  459. * To run a mutation, you first call `useUninstallAppMutation` within a React component and pass it any options that fit your needs.
  460. * When your component renders, `useUninstallAppMutation` returns a tuple that includes:
  461. * - A mutate function that you can call at any time to execute the mutation
  462. * - An object with fields that represent the current status of the mutation's execution
  463. *
  464. * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2;
  465. *
  466. * @example
  467. * const [uninstallAppMutation, { data, loading, error }] = useUninstallAppMutation({
  468. * variables: {
  469. * id: // value for 'id'
  470. * },
  471. * });
  472. */
  473. export function useUninstallAppMutation(baseOptions?: Apollo.MutationHookOptions<UninstallAppMutation, UninstallAppMutationVariables>) {
  474. const options = {...defaultOptions, ...baseOptions}
  475. return Apollo.useMutation<UninstallAppMutation, UninstallAppMutationVariables>(UninstallAppDocument, options);
  476. }
  477. export type UninstallAppMutationHookResult = ReturnType<typeof useUninstallAppMutation>;
  478. export type UninstallAppMutationResult = Apollo.MutationResult<UninstallAppMutation>;
  479. export type UninstallAppMutationOptions = Apollo.BaseMutationOptions<UninstallAppMutation, UninstallAppMutationVariables>;
  480. export const UpdateAppDocument = gql`
  481. mutation UpdateApp($id: String!) {
  482. updateApp(id: $id) {
  483. id
  484. status
  485. __typename
  486. }
  487. }
  488. `;
  489. export type UpdateAppMutationFn = Apollo.MutationFunction<UpdateAppMutation, UpdateAppMutationVariables>;
  490. /**
  491. * __useUpdateAppMutation__
  492. *
  493. * To run a mutation, you first call `useUpdateAppMutation` within a React component and pass it any options that fit your needs.
  494. * When your component renders, `useUpdateAppMutation` returns a tuple that includes:
  495. * - A mutate function that you can call at any time to execute the mutation
  496. * - An object with fields that represent the current status of the mutation's execution
  497. *
  498. * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2;
  499. *
  500. * @example
  501. * const [updateAppMutation, { data, loading, error }] = useUpdateAppMutation({
  502. * variables: {
  503. * id: // value for 'id'
  504. * },
  505. * });
  506. */
  507. export function useUpdateAppMutation(baseOptions?: Apollo.MutationHookOptions<UpdateAppMutation, UpdateAppMutationVariables>) {
  508. const options = {...defaultOptions, ...baseOptions}
  509. return Apollo.useMutation<UpdateAppMutation, UpdateAppMutationVariables>(UpdateAppDocument, options);
  510. }
  511. export type UpdateAppMutationHookResult = ReturnType<typeof useUpdateAppMutation>;
  512. export type UpdateAppMutationResult = Apollo.MutationResult<UpdateAppMutation>;
  513. export type UpdateAppMutationOptions = Apollo.BaseMutationOptions<UpdateAppMutation, UpdateAppMutationVariables>;
  514. export const UpdateAppConfigDocument = gql`
  515. mutation UpdateAppConfig($input: AppInputType!) {
  516. updateAppConfig(input: $input) {
  517. id
  518. status
  519. __typename
  520. }
  521. }
  522. `;
  523. export type UpdateAppConfigMutationFn = Apollo.MutationFunction<UpdateAppConfigMutation, UpdateAppConfigMutationVariables>;
  524. /**
  525. * __useUpdateAppConfigMutation__
  526. *
  527. * To run a mutation, you first call `useUpdateAppConfigMutation` within a React component and pass it any options that fit your needs.
  528. * When your component renders, `useUpdateAppConfigMutation` returns a tuple that includes:
  529. * - A mutate function that you can call at any time to execute the mutation
  530. * - An object with fields that represent the current status of the mutation's execution
  531. *
  532. * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2;
  533. *
  534. * @example
  535. * const [updateAppConfigMutation, { data, loading, error }] = useUpdateAppConfigMutation({
  536. * variables: {
  537. * input: // value for 'input'
  538. * },
  539. * });
  540. */
  541. export function useUpdateAppConfigMutation(baseOptions?: Apollo.MutationHookOptions<UpdateAppConfigMutation, UpdateAppConfigMutationVariables>) {
  542. const options = {...defaultOptions, ...baseOptions}
  543. return Apollo.useMutation<UpdateAppConfigMutation, UpdateAppConfigMutationVariables>(UpdateAppConfigDocument, options);
  544. }
  545. export type UpdateAppConfigMutationHookResult = ReturnType<typeof useUpdateAppConfigMutation>;
  546. export type UpdateAppConfigMutationResult = Apollo.MutationResult<UpdateAppConfigMutation>;
  547. export type UpdateAppConfigMutationOptions = Apollo.BaseMutationOptions<UpdateAppConfigMutation, UpdateAppConfigMutationVariables>;
  548. export const GetAppDocument = gql`
  549. query GetApp($appId: String!) {
  550. getApp(id: $appId) {
  551. id
  552. status
  553. config
  554. version
  555. updateInfo {
  556. current
  557. latest
  558. dockerVersion
  559. }
  560. info {
  561. id
  562. port
  563. name
  564. description
  565. available
  566. version
  567. tipi_version
  568. short_desc
  569. author
  570. source
  571. categories
  572. url_suffix
  573. form_fields {
  574. type
  575. label
  576. max
  577. min
  578. hint
  579. required
  580. env_variable
  581. }
  582. }
  583. }
  584. }
  585. `;
  586. /**
  587. * __useGetAppQuery__
  588. *
  589. * To run a query within a React component, call `useGetAppQuery` and pass it any options that fit your needs.
  590. * When your component renders, `useGetAppQuery` returns an object from Apollo Client that contains loading, error, and data properties
  591. * you can use to render your UI.
  592. *
  593. * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options;
  594. *
  595. * @example
  596. * const { data, loading, error } = useGetAppQuery({
  597. * variables: {
  598. * appId: // value for 'appId'
  599. * },
  600. * });
  601. */
  602. export function useGetAppQuery(baseOptions: Apollo.QueryHookOptions<GetAppQuery, GetAppQueryVariables>) {
  603. const options = {...defaultOptions, ...baseOptions}
  604. return Apollo.useQuery<GetAppQuery, GetAppQueryVariables>(GetAppDocument, options);
  605. }
  606. export function useGetAppLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions<GetAppQuery, GetAppQueryVariables>) {
  607. const options = {...defaultOptions, ...baseOptions}
  608. return Apollo.useLazyQuery<GetAppQuery, GetAppQueryVariables>(GetAppDocument, options);
  609. }
  610. export type GetAppQueryHookResult = ReturnType<typeof useGetAppQuery>;
  611. export type GetAppLazyQueryHookResult = ReturnType<typeof useGetAppLazyQuery>;
  612. export type GetAppQueryResult = Apollo.QueryResult<GetAppQuery, GetAppQueryVariables>;
  613. export const InstalledAppsDocument = gql`
  614. query InstalledApps {
  615. installedApps {
  616. id
  617. status
  618. config
  619. version
  620. updateInfo {
  621. current
  622. latest
  623. dockerVersion
  624. }
  625. info {
  626. id
  627. name
  628. description
  629. tipi_version
  630. short_desc
  631. }
  632. }
  633. }
  634. `;
  635. /**
  636. * __useInstalledAppsQuery__
  637. *
  638. * To run a query within a React component, call `useInstalledAppsQuery` and pass it any options that fit your needs.
  639. * When your component renders, `useInstalledAppsQuery` returns an object from Apollo Client that contains loading, error, and data properties
  640. * you can use to render your UI.
  641. *
  642. * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options;
  643. *
  644. * @example
  645. * const { data, loading, error } = useInstalledAppsQuery({
  646. * variables: {
  647. * },
  648. * });
  649. */
  650. export function useInstalledAppsQuery(baseOptions?: Apollo.QueryHookOptions<InstalledAppsQuery, InstalledAppsQueryVariables>) {
  651. const options = {...defaultOptions, ...baseOptions}
  652. return Apollo.useQuery<InstalledAppsQuery, InstalledAppsQueryVariables>(InstalledAppsDocument, options);
  653. }
  654. export function useInstalledAppsLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions<InstalledAppsQuery, InstalledAppsQueryVariables>) {
  655. const options = {...defaultOptions, ...baseOptions}
  656. return Apollo.useLazyQuery<InstalledAppsQuery, InstalledAppsQueryVariables>(InstalledAppsDocument, options);
  657. }
  658. export type InstalledAppsQueryHookResult = ReturnType<typeof useInstalledAppsQuery>;
  659. export type InstalledAppsLazyQueryHookResult = ReturnType<typeof useInstalledAppsLazyQuery>;
  660. export type InstalledAppsQueryResult = Apollo.QueryResult<InstalledAppsQuery, InstalledAppsQueryVariables>;
  661. export const ConfiguredDocument = gql`
  662. query Configured {
  663. isConfigured
  664. }
  665. `;
  666. /**
  667. * __useConfiguredQuery__
  668. *
  669. * To run a query within a React component, call `useConfiguredQuery` and pass it any options that fit your needs.
  670. * When your component renders, `useConfiguredQuery` returns an object from Apollo Client that contains loading, error, and data properties
  671. * you can use to render your UI.
  672. *
  673. * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options;
  674. *
  675. * @example
  676. * const { data, loading, error } = useConfiguredQuery({
  677. * variables: {
  678. * },
  679. * });
  680. */
  681. export function useConfiguredQuery(baseOptions?: Apollo.QueryHookOptions<ConfiguredQuery, ConfiguredQueryVariables>) {
  682. const options = {...defaultOptions, ...baseOptions}
  683. return Apollo.useQuery<ConfiguredQuery, ConfiguredQueryVariables>(ConfiguredDocument, options);
  684. }
  685. export function useConfiguredLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions<ConfiguredQuery, ConfiguredQueryVariables>) {
  686. const options = {...defaultOptions, ...baseOptions}
  687. return Apollo.useLazyQuery<ConfiguredQuery, ConfiguredQueryVariables>(ConfiguredDocument, options);
  688. }
  689. export type ConfiguredQueryHookResult = ReturnType<typeof useConfiguredQuery>;
  690. export type ConfiguredLazyQueryHookResult = ReturnType<typeof useConfiguredLazyQuery>;
  691. export type ConfiguredQueryResult = Apollo.QueryResult<ConfiguredQuery, ConfiguredQueryVariables>;
  692. export const ListAppsDocument = gql`
  693. query ListApps {
  694. listAppsInfo {
  695. apps {
  696. id
  697. available
  698. tipi_version
  699. port
  700. name
  701. version
  702. short_desc
  703. author
  704. categories
  705. }
  706. total
  707. }
  708. }
  709. `;
  710. /**
  711. * __useListAppsQuery__
  712. *
  713. * To run a query within a React component, call `useListAppsQuery` and pass it any options that fit your needs.
  714. * When your component renders, `useListAppsQuery` returns an object from Apollo Client that contains loading, error, and data properties
  715. * you can use to render your UI.
  716. *
  717. * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options;
  718. *
  719. * @example
  720. * const { data, loading, error } = useListAppsQuery({
  721. * variables: {
  722. * },
  723. * });
  724. */
  725. export function useListAppsQuery(baseOptions?: Apollo.QueryHookOptions<ListAppsQuery, ListAppsQueryVariables>) {
  726. const options = {...defaultOptions, ...baseOptions}
  727. return Apollo.useQuery<ListAppsQuery, ListAppsQueryVariables>(ListAppsDocument, options);
  728. }
  729. export function useListAppsLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions<ListAppsQuery, ListAppsQueryVariables>) {
  730. const options = {...defaultOptions, ...baseOptions}
  731. return Apollo.useLazyQuery<ListAppsQuery, ListAppsQueryVariables>(ListAppsDocument, options);
  732. }
  733. export type ListAppsQueryHookResult = ReturnType<typeof useListAppsQuery>;
  734. export type ListAppsLazyQueryHookResult = ReturnType<typeof useListAppsLazyQuery>;
  735. export type ListAppsQueryResult = Apollo.QueryResult<ListAppsQuery, ListAppsQueryVariables>;
  736. export const MeDocument = gql`
  737. query Me {
  738. me {
  739. id
  740. }
  741. }
  742. `;
  743. /**
  744. * __useMeQuery__
  745. *
  746. * To run a query within a React component, call `useMeQuery` and pass it any options that fit your needs.
  747. * When your component renders, `useMeQuery` returns an object from Apollo Client that contains loading, error, and data properties
  748. * you can use to render your UI.
  749. *
  750. * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options;
  751. *
  752. * @example
  753. * const { data, loading, error } = useMeQuery({
  754. * variables: {
  755. * },
  756. * });
  757. */
  758. export function useMeQuery(baseOptions?: Apollo.QueryHookOptions<MeQuery, MeQueryVariables>) {
  759. const options = {...defaultOptions, ...baseOptions}
  760. return Apollo.useQuery<MeQuery, MeQueryVariables>(MeDocument, options);
  761. }
  762. export function useMeLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions<MeQuery, MeQueryVariables>) {
  763. const options = {...defaultOptions, ...baseOptions}
  764. return Apollo.useLazyQuery<MeQuery, MeQueryVariables>(MeDocument, options);
  765. }
  766. export type MeQueryHookResult = ReturnType<typeof useMeQuery>;
  767. export type MeLazyQueryHookResult = ReturnType<typeof useMeLazyQuery>;
  768. export type MeQueryResult = Apollo.QueryResult<MeQuery, MeQueryVariables>;
  769. export const SystemInfoDocument = gql`
  770. query SystemInfo {
  771. systemInfo {
  772. cpu {
  773. load
  774. }
  775. disk {
  776. available
  777. used
  778. total
  779. }
  780. memory {
  781. available
  782. used
  783. total
  784. }
  785. }
  786. }
  787. `;
  788. /**
  789. * __useSystemInfoQuery__
  790. *
  791. * To run a query within a React component, call `useSystemInfoQuery` and pass it any options that fit your needs.
  792. * When your component renders, `useSystemInfoQuery` returns an object from Apollo Client that contains loading, error, and data properties
  793. * you can use to render your UI.
  794. *
  795. * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options;
  796. *
  797. * @example
  798. * const { data, loading, error } = useSystemInfoQuery({
  799. * variables: {
  800. * },
  801. * });
  802. */
  803. export function useSystemInfoQuery(baseOptions?: Apollo.QueryHookOptions<SystemInfoQuery, SystemInfoQueryVariables>) {
  804. const options = {...defaultOptions, ...baseOptions}
  805. return Apollo.useQuery<SystemInfoQuery, SystemInfoQueryVariables>(SystemInfoDocument, options);
  806. }
  807. export function useSystemInfoLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions<SystemInfoQuery, SystemInfoQueryVariables>) {
  808. const options = {...defaultOptions, ...baseOptions}
  809. return Apollo.useLazyQuery<SystemInfoQuery, SystemInfoQueryVariables>(SystemInfoDocument, options);
  810. }
  811. export type SystemInfoQueryHookResult = ReturnType<typeof useSystemInfoQuery>;
  812. export type SystemInfoLazyQueryHookResult = ReturnType<typeof useSystemInfoLazyQuery>;
  813. export type SystemInfoQueryResult = Apollo.QueryResult<SystemInfoQuery, SystemInfoQueryVariables>;
  814. export const VersionDocument = gql`
  815. query Version {
  816. version {
  817. current
  818. latest
  819. }
  820. }
  821. `;
  822. /**
  823. * __useVersionQuery__
  824. *
  825. * To run a query within a React component, call `useVersionQuery` and pass it any options that fit your needs.
  826. * When your component renders, `useVersionQuery` returns an object from Apollo Client that contains loading, error, and data properties
  827. * you can use to render your UI.
  828. *
  829. * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options;
  830. *
  831. * @example
  832. * const { data, loading, error } = useVersionQuery({
  833. * variables: {
  834. * },
  835. * });
  836. */
  837. export function useVersionQuery(baseOptions?: Apollo.QueryHookOptions<VersionQuery, VersionQueryVariables>) {
  838. const options = {...defaultOptions, ...baseOptions}
  839. return Apollo.useQuery<VersionQuery, VersionQueryVariables>(VersionDocument, options);
  840. }
  841. export function useVersionLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions<VersionQuery, VersionQueryVariables>) {
  842. const options = {...defaultOptions, ...baseOptions}
  843. return Apollo.useLazyQuery<VersionQuery, VersionQueryVariables>(VersionDocument, options);
  844. }
  845. export type VersionQueryHookResult = ReturnType<typeof useVersionQuery>;
  846. export type VersionLazyQueryHookResult = ReturnType<typeof useVersionLazyQuery>;
  847. export type VersionQueryResult = Apollo.QueryResult<VersionQuery, VersionQueryVariables>;