graphql.tsx 35 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992
  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. latest: Scalars['Float'];
  175. };
  176. export type User = {
  177. __typename?: 'User';
  178. createdAt: Scalars['DateTime'];
  179. id: Scalars['ID'];
  180. updatedAt: Scalars['DateTime'];
  181. username: Scalars['String'];
  182. };
  183. export type UserResponse = {
  184. __typename?: 'UserResponse';
  185. user?: Maybe<User>;
  186. };
  187. export type UsernamePasswordInput = {
  188. password: Scalars['String'];
  189. username: Scalars['String'];
  190. };
  191. export type VersionResponse = {
  192. __typename?: 'VersionResponse';
  193. current: Scalars['String'];
  194. latest?: Maybe<Scalars['String']>;
  195. };
  196. export type InstallAppMutationVariables = Exact<{
  197. input: AppInputType;
  198. }>;
  199. export type InstallAppMutation = { __typename?: 'Mutation'; installApp: { __typename: 'App'; id: string; status: AppStatusEnum } };
  200. export type LoginMutationVariables = Exact<{
  201. input: UsernamePasswordInput;
  202. }>;
  203. export type LoginMutation = { __typename?: 'Mutation'; login: { __typename?: 'UserResponse'; user?: { __typename?: 'User'; id: string } | null } };
  204. export type LogoutMutationVariables = Exact<{ [key: string]: never }>;
  205. export type LogoutMutation = { __typename?: 'Mutation'; logout: boolean };
  206. export type RegisterMutationVariables = Exact<{
  207. input: UsernamePasswordInput;
  208. }>;
  209. export type RegisterMutation = { __typename?: 'Mutation'; register: { __typename?: 'UserResponse'; user?: { __typename?: 'User'; id: string } | null } };
  210. export type StartAppMutationVariables = Exact<{
  211. id: Scalars['String'];
  212. }>;
  213. export type StartAppMutation = { __typename?: 'Mutation'; startApp: { __typename: 'App'; id: string; status: AppStatusEnum } };
  214. export type StopAppMutationVariables = Exact<{
  215. id: Scalars['String'];
  216. }>;
  217. export type StopAppMutation = { __typename?: 'Mutation'; stopApp: { __typename: 'App'; id: string; status: AppStatusEnum } };
  218. export type UninstallAppMutationVariables = Exact<{
  219. id: Scalars['String'];
  220. }>;
  221. export type UninstallAppMutation = { __typename?: 'Mutation'; uninstallApp: { __typename: 'App'; id: string; status: AppStatusEnum } };
  222. export type UpdateAppMutationVariables = Exact<{
  223. id: Scalars['String'];
  224. }>;
  225. export type UpdateAppMutation = { __typename?: 'Mutation'; updateApp: { __typename: 'App'; id: string; status: AppStatusEnum } };
  226. export type UpdateAppConfigMutationVariables = Exact<{
  227. input: AppInputType;
  228. }>;
  229. export type UpdateAppConfigMutation = { __typename?: 'Mutation'; updateAppConfig: { __typename: 'App'; id: string; status: AppStatusEnum } };
  230. export type GetAppQueryVariables = Exact<{
  231. appId: Scalars['String'];
  232. }>;
  233. export type GetAppQuery = {
  234. __typename?: 'Query';
  235. getApp: {
  236. __typename?: 'App';
  237. id: string;
  238. status: AppStatusEnum;
  239. config: any;
  240. version?: number | null;
  241. updateInfo?: { __typename?: 'UpdateInfo'; current: number; latest: number } | null;
  242. info?: {
  243. __typename?: 'AppInfo';
  244. id: string;
  245. port: number;
  246. name: string;
  247. description: string;
  248. available: boolean;
  249. version?: string | null;
  250. tipi_version: number;
  251. short_desc: string;
  252. author: string;
  253. source: string;
  254. categories: Array<AppCategoriesEnum>;
  255. url_suffix?: string | null;
  256. form_fields: Array<{
  257. __typename?: 'FormField';
  258. type: FieldTypesEnum;
  259. label: string;
  260. max?: number | null;
  261. min?: number | null;
  262. hint?: string | null;
  263. required?: boolean | null;
  264. env_variable: string;
  265. }>;
  266. } | null;
  267. };
  268. };
  269. export type InstalledAppsQueryVariables = Exact<{ [key: string]: never }>;
  270. export type InstalledAppsQuery = {
  271. __typename?: 'Query';
  272. installedApps: Array<{
  273. __typename?: 'App';
  274. id: string;
  275. status: AppStatusEnum;
  276. config: any;
  277. version?: number | null;
  278. updateInfo?: { __typename?: 'UpdateInfo'; current: number; latest: number } | null;
  279. info?: { __typename?: 'AppInfo'; id: string; name: string; description: string; tipi_version: number; short_desc: string } | null;
  280. }>;
  281. };
  282. export type ConfiguredQueryVariables = Exact<{ [key: string]: never }>;
  283. export type ConfiguredQuery = { __typename?: 'Query'; isConfigured: boolean };
  284. export type ListAppsQueryVariables = Exact<{ [key: string]: never }>;
  285. export type ListAppsQuery = {
  286. __typename?: 'Query';
  287. listAppsInfo: {
  288. __typename?: 'ListAppsResonse';
  289. total: number;
  290. apps: Array<{
  291. __typename?: 'AppInfo';
  292. id: string;
  293. available: boolean;
  294. tipi_version: number;
  295. port: number;
  296. name: string;
  297. version?: string | null;
  298. short_desc: string;
  299. author: string;
  300. categories: Array<AppCategoriesEnum>;
  301. }>;
  302. };
  303. };
  304. export type MeQueryVariables = Exact<{ [key: string]: never }>;
  305. export type MeQuery = { __typename?: 'Query'; me?: { __typename?: 'User'; id: string } | null };
  306. export type SystemInfoQueryVariables = Exact<{ [key: string]: never }>;
  307. export type SystemInfoQuery = {
  308. __typename?: 'Query';
  309. systemInfo?: {
  310. __typename?: 'SystemInfoResponse';
  311. cpu: { __typename?: 'Cpu'; load: number };
  312. disk: { __typename?: 'DiskMemory'; available: number; used: number; total: number };
  313. memory: { __typename?: 'DiskMemory'; available: number; used: number; total: number };
  314. } | null;
  315. };
  316. export type VersionQueryVariables = Exact<{ [key: string]: never }>;
  317. export type VersionQuery = { __typename?: 'Query'; version: { __typename?: 'VersionResponse'; current: string; latest?: string | null } };
  318. export const InstallAppDocument = gql`
  319. mutation InstallApp($input: AppInputType!) {
  320. installApp(input: $input) {
  321. id
  322. status
  323. __typename
  324. }
  325. }
  326. `;
  327. export type InstallAppMutationFn = Apollo.MutationFunction<InstallAppMutation, InstallAppMutationVariables>;
  328. /**
  329. * __useInstallAppMutation__
  330. *
  331. * To run a mutation, you first call `useInstallAppMutation` within a React component and pass it any options that fit your needs.
  332. * When your component renders, `useInstallAppMutation` returns a tuple that includes:
  333. * - A mutate function that you can call at any time to execute the mutation
  334. * - An object with fields that represent the current status of the mutation's execution
  335. *
  336. * @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;
  337. *
  338. * @example
  339. * const [installAppMutation, { data, loading, error }] = useInstallAppMutation({
  340. * variables: {
  341. * input: // value for 'input'
  342. * },
  343. * });
  344. */
  345. export function useInstallAppMutation(baseOptions?: Apollo.MutationHookOptions<InstallAppMutation, InstallAppMutationVariables>) {
  346. const options = { ...defaultOptions, ...baseOptions };
  347. return Apollo.useMutation<InstallAppMutation, InstallAppMutationVariables>(InstallAppDocument, options);
  348. }
  349. export type InstallAppMutationHookResult = ReturnType<typeof useInstallAppMutation>;
  350. export type InstallAppMutationResult = Apollo.MutationResult<InstallAppMutation>;
  351. export type InstallAppMutationOptions = Apollo.BaseMutationOptions<InstallAppMutation, InstallAppMutationVariables>;
  352. export const LoginDocument = gql`
  353. mutation Login($input: UsernamePasswordInput!) {
  354. login(input: $input) {
  355. user {
  356. id
  357. }
  358. }
  359. }
  360. `;
  361. export type LoginMutationFn = Apollo.MutationFunction<LoginMutation, LoginMutationVariables>;
  362. /**
  363. * __useLoginMutation__
  364. *
  365. * To run a mutation, you first call `useLoginMutation` within a React component and pass it any options that fit your needs.
  366. * When your component renders, `useLoginMutation` returns a tuple that includes:
  367. * - A mutate function that you can call at any time to execute the mutation
  368. * - An object with fields that represent the current status of the mutation's execution
  369. *
  370. * @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;
  371. *
  372. * @example
  373. * const [loginMutation, { data, loading, error }] = useLoginMutation({
  374. * variables: {
  375. * input: // value for 'input'
  376. * },
  377. * });
  378. */
  379. export function useLoginMutation(baseOptions?: Apollo.MutationHookOptions<LoginMutation, LoginMutationVariables>) {
  380. const options = { ...defaultOptions, ...baseOptions };
  381. return Apollo.useMutation<LoginMutation, LoginMutationVariables>(LoginDocument, options);
  382. }
  383. export type LoginMutationHookResult = ReturnType<typeof useLoginMutation>;
  384. export type LoginMutationResult = Apollo.MutationResult<LoginMutation>;
  385. export type LoginMutationOptions = Apollo.BaseMutationOptions<LoginMutation, LoginMutationVariables>;
  386. export const LogoutDocument = gql`
  387. mutation Logout {
  388. logout
  389. }
  390. `;
  391. export type LogoutMutationFn = Apollo.MutationFunction<LogoutMutation, LogoutMutationVariables>;
  392. /**
  393. * __useLogoutMutation__
  394. *
  395. * To run a mutation, you first call `useLogoutMutation` within a React component and pass it any options that fit your needs.
  396. * When your component renders, `useLogoutMutation` returns a tuple that includes:
  397. * - A mutate function that you can call at any time to execute the mutation
  398. * - An object with fields that represent the current status of the mutation's execution
  399. *
  400. * @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;
  401. *
  402. * @example
  403. * const [logoutMutation, { data, loading, error }] = useLogoutMutation({
  404. * variables: {
  405. * },
  406. * });
  407. */
  408. export function useLogoutMutation(baseOptions?: Apollo.MutationHookOptions<LogoutMutation, LogoutMutationVariables>) {
  409. const options = { ...defaultOptions, ...baseOptions };
  410. return Apollo.useMutation<LogoutMutation, LogoutMutationVariables>(LogoutDocument, options);
  411. }
  412. export type LogoutMutationHookResult = ReturnType<typeof useLogoutMutation>;
  413. export type LogoutMutationResult = Apollo.MutationResult<LogoutMutation>;
  414. export type LogoutMutationOptions = Apollo.BaseMutationOptions<LogoutMutation, LogoutMutationVariables>;
  415. export const RegisterDocument = gql`
  416. mutation Register($input: UsernamePasswordInput!) {
  417. register(input: $input) {
  418. user {
  419. id
  420. }
  421. }
  422. }
  423. `;
  424. export type RegisterMutationFn = Apollo.MutationFunction<RegisterMutation, RegisterMutationVariables>;
  425. /**
  426. * __useRegisterMutation__
  427. *
  428. * To run a mutation, you first call `useRegisterMutation` within a React component and pass it any options that fit your needs.
  429. * When your component renders, `useRegisterMutation` returns a tuple that includes:
  430. * - A mutate function that you can call at any time to execute the mutation
  431. * - An object with fields that represent the current status of the mutation's execution
  432. *
  433. * @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;
  434. *
  435. * @example
  436. * const [registerMutation, { data, loading, error }] = useRegisterMutation({
  437. * variables: {
  438. * input: // value for 'input'
  439. * },
  440. * });
  441. */
  442. export function useRegisterMutation(baseOptions?: Apollo.MutationHookOptions<RegisterMutation, RegisterMutationVariables>) {
  443. const options = { ...defaultOptions, ...baseOptions };
  444. return Apollo.useMutation<RegisterMutation, RegisterMutationVariables>(RegisterDocument, options);
  445. }
  446. export type RegisterMutationHookResult = ReturnType<typeof useRegisterMutation>;
  447. export type RegisterMutationResult = Apollo.MutationResult<RegisterMutation>;
  448. export type RegisterMutationOptions = Apollo.BaseMutationOptions<RegisterMutation, RegisterMutationVariables>;
  449. export const StartAppDocument = gql`
  450. mutation StartApp($id: String!) {
  451. startApp(id: $id) {
  452. id
  453. status
  454. __typename
  455. }
  456. }
  457. `;
  458. export type StartAppMutationFn = Apollo.MutationFunction<StartAppMutation, StartAppMutationVariables>;
  459. /**
  460. * __useStartAppMutation__
  461. *
  462. * To run a mutation, you first call `useStartAppMutation` within a React component and pass it any options that fit your needs.
  463. * When your component renders, `useStartAppMutation` returns a tuple that includes:
  464. * - A mutate function that you can call at any time to execute the mutation
  465. * - An object with fields that represent the current status of the mutation's execution
  466. *
  467. * @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;
  468. *
  469. * @example
  470. * const [startAppMutation, { data, loading, error }] = useStartAppMutation({
  471. * variables: {
  472. * id: // value for 'id'
  473. * },
  474. * });
  475. */
  476. export function useStartAppMutation(baseOptions?: Apollo.MutationHookOptions<StartAppMutation, StartAppMutationVariables>) {
  477. const options = { ...defaultOptions, ...baseOptions };
  478. return Apollo.useMutation<StartAppMutation, StartAppMutationVariables>(StartAppDocument, options);
  479. }
  480. export type StartAppMutationHookResult = ReturnType<typeof useStartAppMutation>;
  481. export type StartAppMutationResult = Apollo.MutationResult<StartAppMutation>;
  482. export type StartAppMutationOptions = Apollo.BaseMutationOptions<StartAppMutation, StartAppMutationVariables>;
  483. export const StopAppDocument = gql`
  484. mutation StopApp($id: String!) {
  485. stopApp(id: $id) {
  486. id
  487. status
  488. __typename
  489. }
  490. }
  491. `;
  492. export type StopAppMutationFn = Apollo.MutationFunction<StopAppMutation, StopAppMutationVariables>;
  493. /**
  494. * __useStopAppMutation__
  495. *
  496. * To run a mutation, you first call `useStopAppMutation` within a React component and pass it any options that fit your needs.
  497. * When your component renders, `useStopAppMutation` returns a tuple that includes:
  498. * - A mutate function that you can call at any time to execute the mutation
  499. * - An object with fields that represent the current status of the mutation's execution
  500. *
  501. * @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;
  502. *
  503. * @example
  504. * const [stopAppMutation, { data, loading, error }] = useStopAppMutation({
  505. * variables: {
  506. * id: // value for 'id'
  507. * },
  508. * });
  509. */
  510. export function useStopAppMutation(baseOptions?: Apollo.MutationHookOptions<StopAppMutation, StopAppMutationVariables>) {
  511. const options = { ...defaultOptions, ...baseOptions };
  512. return Apollo.useMutation<StopAppMutation, StopAppMutationVariables>(StopAppDocument, options);
  513. }
  514. export type StopAppMutationHookResult = ReturnType<typeof useStopAppMutation>;
  515. export type StopAppMutationResult = Apollo.MutationResult<StopAppMutation>;
  516. export type StopAppMutationOptions = Apollo.BaseMutationOptions<StopAppMutation, StopAppMutationVariables>;
  517. export const UninstallAppDocument = gql`
  518. mutation UninstallApp($id: String!) {
  519. uninstallApp(id: $id) {
  520. id
  521. status
  522. __typename
  523. }
  524. }
  525. `;
  526. export type UninstallAppMutationFn = Apollo.MutationFunction<UninstallAppMutation, UninstallAppMutationVariables>;
  527. /**
  528. * __useUninstallAppMutation__
  529. *
  530. * To run a mutation, you first call `useUninstallAppMutation` within a React component and pass it any options that fit your needs.
  531. * When your component renders, `useUninstallAppMutation` returns a tuple that includes:
  532. * - A mutate function that you can call at any time to execute the mutation
  533. * - An object with fields that represent the current status of the mutation's execution
  534. *
  535. * @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;
  536. *
  537. * @example
  538. * const [uninstallAppMutation, { data, loading, error }] = useUninstallAppMutation({
  539. * variables: {
  540. * id: // value for 'id'
  541. * },
  542. * });
  543. */
  544. export function useUninstallAppMutation(baseOptions?: Apollo.MutationHookOptions<UninstallAppMutation, UninstallAppMutationVariables>) {
  545. const options = { ...defaultOptions, ...baseOptions };
  546. return Apollo.useMutation<UninstallAppMutation, UninstallAppMutationVariables>(UninstallAppDocument, options);
  547. }
  548. export type UninstallAppMutationHookResult = ReturnType<typeof useUninstallAppMutation>;
  549. export type UninstallAppMutationResult = Apollo.MutationResult<UninstallAppMutation>;
  550. export type UninstallAppMutationOptions = Apollo.BaseMutationOptions<UninstallAppMutation, UninstallAppMutationVariables>;
  551. export const UpdateAppDocument = gql`
  552. mutation UpdateApp($id: String!) {
  553. updateApp(id: $id) {
  554. id
  555. status
  556. __typename
  557. }
  558. }
  559. `;
  560. export type UpdateAppMutationFn = Apollo.MutationFunction<UpdateAppMutation, UpdateAppMutationVariables>;
  561. /**
  562. * __useUpdateAppMutation__
  563. *
  564. * To run a mutation, you first call `useUpdateAppMutation` within a React component and pass it any options that fit your needs.
  565. * When your component renders, `useUpdateAppMutation` returns a tuple that includes:
  566. * - A mutate function that you can call at any time to execute the mutation
  567. * - An object with fields that represent the current status of the mutation's execution
  568. *
  569. * @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;
  570. *
  571. * @example
  572. * const [updateAppMutation, { data, loading, error }] = useUpdateAppMutation({
  573. * variables: {
  574. * id: // value for 'id'
  575. * },
  576. * });
  577. */
  578. export function useUpdateAppMutation(baseOptions?: Apollo.MutationHookOptions<UpdateAppMutation, UpdateAppMutationVariables>) {
  579. const options = { ...defaultOptions, ...baseOptions };
  580. return Apollo.useMutation<UpdateAppMutation, UpdateAppMutationVariables>(UpdateAppDocument, options);
  581. }
  582. export type UpdateAppMutationHookResult = ReturnType<typeof useUpdateAppMutation>;
  583. export type UpdateAppMutationResult = Apollo.MutationResult<UpdateAppMutation>;
  584. export type UpdateAppMutationOptions = Apollo.BaseMutationOptions<UpdateAppMutation, UpdateAppMutationVariables>;
  585. export const UpdateAppConfigDocument = gql`
  586. mutation UpdateAppConfig($input: AppInputType!) {
  587. updateAppConfig(input: $input) {
  588. id
  589. status
  590. __typename
  591. }
  592. }
  593. `;
  594. export type UpdateAppConfigMutationFn = Apollo.MutationFunction<UpdateAppConfigMutation, UpdateAppConfigMutationVariables>;
  595. /**
  596. * __useUpdateAppConfigMutation__
  597. *
  598. * To run a mutation, you first call `useUpdateAppConfigMutation` within a React component and pass it any options that fit your needs.
  599. * When your component renders, `useUpdateAppConfigMutation` returns a tuple that includes:
  600. * - A mutate function that you can call at any time to execute the mutation
  601. * - An object with fields that represent the current status of the mutation's execution
  602. *
  603. * @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;
  604. *
  605. * @example
  606. * const [updateAppConfigMutation, { data, loading, error }] = useUpdateAppConfigMutation({
  607. * variables: {
  608. * input: // value for 'input'
  609. * },
  610. * });
  611. */
  612. export function useUpdateAppConfigMutation(baseOptions?: Apollo.MutationHookOptions<UpdateAppConfigMutation, UpdateAppConfigMutationVariables>) {
  613. const options = { ...defaultOptions, ...baseOptions };
  614. return Apollo.useMutation<UpdateAppConfigMutation, UpdateAppConfigMutationVariables>(UpdateAppConfigDocument, options);
  615. }
  616. export type UpdateAppConfigMutationHookResult = ReturnType<typeof useUpdateAppConfigMutation>;
  617. export type UpdateAppConfigMutationResult = Apollo.MutationResult<UpdateAppConfigMutation>;
  618. export type UpdateAppConfigMutationOptions = Apollo.BaseMutationOptions<UpdateAppConfigMutation, UpdateAppConfigMutationVariables>;
  619. export const GetAppDocument = gql`
  620. query GetApp($appId: String!) {
  621. getApp(id: $appId) {
  622. id
  623. status
  624. config
  625. version
  626. updateInfo {
  627. current
  628. latest
  629. }
  630. info {
  631. id
  632. port
  633. name
  634. description
  635. available
  636. version
  637. tipi_version
  638. short_desc
  639. author
  640. source
  641. categories
  642. url_suffix
  643. form_fields {
  644. type
  645. label
  646. max
  647. min
  648. hint
  649. required
  650. env_variable
  651. }
  652. }
  653. }
  654. }
  655. `;
  656. /**
  657. * __useGetAppQuery__
  658. *
  659. * To run a query within a React component, call `useGetAppQuery` and pass it any options that fit your needs.
  660. * When your component renders, `useGetAppQuery` returns an object from Apollo Client that contains loading, error, and data properties
  661. * you can use to render your UI.
  662. *
  663. * @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;
  664. *
  665. * @example
  666. * const { data, loading, error } = useGetAppQuery({
  667. * variables: {
  668. * appId: // value for 'appId'
  669. * },
  670. * });
  671. */
  672. export function useGetAppQuery(baseOptions: Apollo.QueryHookOptions<GetAppQuery, GetAppQueryVariables>) {
  673. const options = { ...defaultOptions, ...baseOptions };
  674. return Apollo.useQuery<GetAppQuery, GetAppQueryVariables>(GetAppDocument, options);
  675. }
  676. export function useGetAppLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions<GetAppQuery, GetAppQueryVariables>) {
  677. const options = { ...defaultOptions, ...baseOptions };
  678. return Apollo.useLazyQuery<GetAppQuery, GetAppQueryVariables>(GetAppDocument, options);
  679. }
  680. export type GetAppQueryHookResult = ReturnType<typeof useGetAppQuery>;
  681. export type GetAppLazyQueryHookResult = ReturnType<typeof useGetAppLazyQuery>;
  682. export type GetAppQueryResult = Apollo.QueryResult<GetAppQuery, GetAppQueryVariables>;
  683. export const InstalledAppsDocument = gql`
  684. query InstalledApps {
  685. installedApps {
  686. id
  687. status
  688. config
  689. version
  690. updateInfo {
  691. current
  692. latest
  693. }
  694. info {
  695. id
  696. name
  697. description
  698. tipi_version
  699. short_desc
  700. }
  701. }
  702. }
  703. `;
  704. /**
  705. * __useInstalledAppsQuery__
  706. *
  707. * To run a query within a React component, call `useInstalledAppsQuery` and pass it any options that fit your needs.
  708. * When your component renders, `useInstalledAppsQuery` returns an object from Apollo Client that contains loading, error, and data properties
  709. * you can use to render your UI.
  710. *
  711. * @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;
  712. *
  713. * @example
  714. * const { data, loading, error } = useInstalledAppsQuery({
  715. * variables: {
  716. * },
  717. * });
  718. */
  719. export function useInstalledAppsQuery(baseOptions?: Apollo.QueryHookOptions<InstalledAppsQuery, InstalledAppsQueryVariables>) {
  720. const options = { ...defaultOptions, ...baseOptions };
  721. return Apollo.useQuery<InstalledAppsQuery, InstalledAppsQueryVariables>(InstalledAppsDocument, options);
  722. }
  723. export function useInstalledAppsLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions<InstalledAppsQuery, InstalledAppsQueryVariables>) {
  724. const options = { ...defaultOptions, ...baseOptions };
  725. return Apollo.useLazyQuery<InstalledAppsQuery, InstalledAppsQueryVariables>(InstalledAppsDocument, options);
  726. }
  727. export type InstalledAppsQueryHookResult = ReturnType<typeof useInstalledAppsQuery>;
  728. export type InstalledAppsLazyQueryHookResult = ReturnType<typeof useInstalledAppsLazyQuery>;
  729. export type InstalledAppsQueryResult = Apollo.QueryResult<InstalledAppsQuery, InstalledAppsQueryVariables>;
  730. export const ConfiguredDocument = gql`
  731. query Configured {
  732. isConfigured
  733. }
  734. `;
  735. /**
  736. * __useConfiguredQuery__
  737. *
  738. * To run a query within a React component, call `useConfiguredQuery` and pass it any options that fit your needs.
  739. * When your component renders, `useConfiguredQuery` returns an object from Apollo Client that contains loading, error, and data properties
  740. * you can use to render your UI.
  741. *
  742. * @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;
  743. *
  744. * @example
  745. * const { data, loading, error } = useConfiguredQuery({
  746. * variables: {
  747. * },
  748. * });
  749. */
  750. export function useConfiguredQuery(baseOptions?: Apollo.QueryHookOptions<ConfiguredQuery, ConfiguredQueryVariables>) {
  751. const options = { ...defaultOptions, ...baseOptions };
  752. return Apollo.useQuery<ConfiguredQuery, ConfiguredQueryVariables>(ConfiguredDocument, options);
  753. }
  754. export function useConfiguredLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions<ConfiguredQuery, ConfiguredQueryVariables>) {
  755. const options = { ...defaultOptions, ...baseOptions };
  756. return Apollo.useLazyQuery<ConfiguredQuery, ConfiguredQueryVariables>(ConfiguredDocument, options);
  757. }
  758. export type ConfiguredQueryHookResult = ReturnType<typeof useConfiguredQuery>;
  759. export type ConfiguredLazyQueryHookResult = ReturnType<typeof useConfiguredLazyQuery>;
  760. export type ConfiguredQueryResult = Apollo.QueryResult<ConfiguredQuery, ConfiguredQueryVariables>;
  761. export const ListAppsDocument = gql`
  762. query ListApps {
  763. listAppsInfo {
  764. apps {
  765. id
  766. available
  767. tipi_version
  768. port
  769. name
  770. version
  771. short_desc
  772. author
  773. categories
  774. }
  775. total
  776. }
  777. }
  778. `;
  779. /**
  780. * __useListAppsQuery__
  781. *
  782. * To run a query within a React component, call `useListAppsQuery` and pass it any options that fit your needs.
  783. * When your component renders, `useListAppsQuery` returns an object from Apollo Client that contains loading, error, and data properties
  784. * you can use to render your UI.
  785. *
  786. * @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;
  787. *
  788. * @example
  789. * const { data, loading, error } = useListAppsQuery({
  790. * variables: {
  791. * },
  792. * });
  793. */
  794. export function useListAppsQuery(baseOptions?: Apollo.QueryHookOptions<ListAppsQuery, ListAppsQueryVariables>) {
  795. const options = { ...defaultOptions, ...baseOptions };
  796. return Apollo.useQuery<ListAppsQuery, ListAppsQueryVariables>(ListAppsDocument, options);
  797. }
  798. export function useListAppsLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions<ListAppsQuery, ListAppsQueryVariables>) {
  799. const options = { ...defaultOptions, ...baseOptions };
  800. return Apollo.useLazyQuery<ListAppsQuery, ListAppsQueryVariables>(ListAppsDocument, options);
  801. }
  802. export type ListAppsQueryHookResult = ReturnType<typeof useListAppsQuery>;
  803. export type ListAppsLazyQueryHookResult = ReturnType<typeof useListAppsLazyQuery>;
  804. export type ListAppsQueryResult = Apollo.QueryResult<ListAppsQuery, ListAppsQueryVariables>;
  805. export const MeDocument = gql`
  806. query Me {
  807. me {
  808. id
  809. }
  810. }
  811. `;
  812. /**
  813. * __useMeQuery__
  814. *
  815. * To run a query within a React component, call `useMeQuery` and pass it any options that fit your needs.
  816. * When your component renders, `useMeQuery` returns an object from Apollo Client that contains loading, error, and data properties
  817. * you can use to render your UI.
  818. *
  819. * @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;
  820. *
  821. * @example
  822. * const { data, loading, error } = useMeQuery({
  823. * variables: {
  824. * },
  825. * });
  826. */
  827. export function useMeQuery(baseOptions?: Apollo.QueryHookOptions<MeQuery, MeQueryVariables>) {
  828. const options = { ...defaultOptions, ...baseOptions };
  829. return Apollo.useQuery<MeQuery, MeQueryVariables>(MeDocument, options);
  830. }
  831. export function useMeLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions<MeQuery, MeQueryVariables>) {
  832. const options = { ...defaultOptions, ...baseOptions };
  833. return Apollo.useLazyQuery<MeQuery, MeQueryVariables>(MeDocument, options);
  834. }
  835. export type MeQueryHookResult = ReturnType<typeof useMeQuery>;
  836. export type MeLazyQueryHookResult = ReturnType<typeof useMeLazyQuery>;
  837. export type MeQueryResult = Apollo.QueryResult<MeQuery, MeQueryVariables>;
  838. export const SystemInfoDocument = gql`
  839. query SystemInfo {
  840. systemInfo {
  841. cpu {
  842. load
  843. }
  844. disk {
  845. available
  846. used
  847. total
  848. }
  849. memory {
  850. available
  851. used
  852. total
  853. }
  854. }
  855. }
  856. `;
  857. /**
  858. * __useSystemInfoQuery__
  859. *
  860. * To run a query within a React component, call `useSystemInfoQuery` and pass it any options that fit your needs.
  861. * When your component renders, `useSystemInfoQuery` returns an object from Apollo Client that contains loading, error, and data properties
  862. * you can use to render your UI.
  863. *
  864. * @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;
  865. *
  866. * @example
  867. * const { data, loading, error } = useSystemInfoQuery({
  868. * variables: {
  869. * },
  870. * });
  871. */
  872. export function useSystemInfoQuery(baseOptions?: Apollo.QueryHookOptions<SystemInfoQuery, SystemInfoQueryVariables>) {
  873. const options = { ...defaultOptions, ...baseOptions };
  874. return Apollo.useQuery<SystemInfoQuery, SystemInfoQueryVariables>(SystemInfoDocument, options);
  875. }
  876. export function useSystemInfoLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions<SystemInfoQuery, SystemInfoQueryVariables>) {
  877. const options = { ...defaultOptions, ...baseOptions };
  878. return Apollo.useLazyQuery<SystemInfoQuery, SystemInfoQueryVariables>(SystemInfoDocument, options);
  879. }
  880. export type SystemInfoQueryHookResult = ReturnType<typeof useSystemInfoQuery>;
  881. export type SystemInfoLazyQueryHookResult = ReturnType<typeof useSystemInfoLazyQuery>;
  882. export type SystemInfoQueryResult = Apollo.QueryResult<SystemInfoQuery, SystemInfoQueryVariables>;
  883. export const VersionDocument = gql`
  884. query Version {
  885. version {
  886. current
  887. latest
  888. }
  889. }
  890. `;
  891. /**
  892. * __useVersionQuery__
  893. *
  894. * To run a query within a React component, call `useVersionQuery` and pass it any options that fit your needs.
  895. * When your component renders, `useVersionQuery` returns an object from Apollo Client that contains loading, error, and data properties
  896. * you can use to render your UI.
  897. *
  898. * @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;
  899. *
  900. * @example
  901. * const { data, loading, error } = useVersionQuery({
  902. * variables: {
  903. * },
  904. * });
  905. */
  906. export function useVersionQuery(baseOptions?: Apollo.QueryHookOptions<VersionQuery, VersionQueryVariables>) {
  907. const options = { ...defaultOptions, ...baseOptions };
  908. return Apollo.useQuery<VersionQuery, VersionQueryVariables>(VersionDocument, options);
  909. }
  910. export function useVersionLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions<VersionQuery, VersionQueryVariables>) {
  911. const options = { ...defaultOptions, ...baseOptions };
  912. return Apollo.useLazyQuery<VersionQuery, VersionQueryVariables>(VersionDocument, options);
  913. }
  914. export type VersionQueryHookResult = ReturnType<typeof useVersionQuery>;
  915. export type VersionLazyQueryHookResult = ReturnType<typeof useVersionLazyQuery>;
  916. export type VersionQueryResult = Apollo.QueryResult<VersionQuery, VersionQueryVariables>;