fix: codegen on web run

This commit is contained in:
Eli Bosley
2024-01-09 15:13:46 -05:00
committed by Zack Spear
parent d2e17c0051
commit b3768d65aa
5 changed files with 15 additions and 130 deletions

View File

@@ -1,5 +1,5 @@
[api]
version="3.2.3+5a94a72a"
version="3.2.3+6c0ccb2b"
extraOrigins=""
[local]
[notifier]

View File

@@ -1,5 +1,5 @@
[api]
version="3.2.3+5a94a72a"
version="3.2.3+6c0ccb2b"
extraOrigins=""
[local]
[notifier]
@@ -21,4 +21,4 @@ dynamicRemoteAccessType="DISABLED"
[upc]
apikey="unupc_fab6ff6ffe51040595c6d9ffb63a353ba16cc2ad7d93f813a2e80a5810"
[connectionStatus]
minigraph="PRE_INIT"
minigraph="ERROR_RETRYING"

View File

@@ -16,7 +16,7 @@ const documents = {
"\n mutation ConnectSignIn($input: ConnectSignInInput!) {\n connectSignIn(input: $input)\n }\n": types.ConnectSignInDocument,
"\n mutation SignOut {\n connectSignOut\n }\n": types.SignOutDocument,
"\n fragment PartialCloud on Cloud {\n error\n apiKey {\n valid\n error\n }\n cloud {\n status\n error\n }\n minigraphql {\n status\n error\n }\n relay {\n status\n error\n }\n }\n": types.PartialCloudFragmentDoc,
"\n query serverState {\n cloud {\n ...PartialCloud\n }\n config {\n error\n valid\n }\n info {\n os {\n hostname\n }\n }\n owner {\n avatar\n username\n }\n registration {\n state\n expiration\n keyFile {\n contents\n }\n }\n vars {\n regGen\n regState\n configError\n configValid\n }\n }\n": types.serverStateDocument,
"\n query serverState {\n cloud {\n ...PartialCloud\n }\n config {\n error\n valid\n }\n info {\n os {\n hostname\n }\n }\n owner {\n avatar\n username\n }\n registration {\n state\n expiration\n keyFile {\n contents\n }\n updateExpiration\n }\n vars {\n regGen\n regState\n configError\n configValid\n }\n }\n": types.serverStateDocument,
};
/**
@@ -48,7 +48,7 @@ export function graphql(source: "\n fragment PartialCloud on Cloud {\n error
/**
* The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
*/
export function graphql(source: "\n query serverState {\n cloud {\n ...PartialCloud\n }\n config {\n error\n valid\n }\n info {\n os {\n hostname\n }\n }\n owner {\n avatar\n username\n }\n registration {\n state\n expiration\n keyFile {\n contents\n }\n }\n vars {\n regGen\n regState\n configError\n configValid\n }\n }\n"): (typeof documents)["\n query serverState {\n cloud {\n ...PartialCloud\n }\n config {\n error\n valid\n }\n info {\n os {\n hostname\n }\n }\n owner {\n avatar\n username\n }\n registration {\n state\n expiration\n keyFile {\n contents\n }\n }\n vars {\n regGen\n regState\n configError\n configValid\n }\n }\n"];
export function graphql(source: "\n query serverState {\n cloud {\n ...PartialCloud\n }\n config {\n error\n valid\n }\n info {\n os {\n hostname\n }\n }\n owner {\n avatar\n username\n }\n registration {\n state\n expiration\n keyFile {\n contents\n }\n updateExpiration\n }\n vars {\n regGen\n regState\n configError\n configValid\n }\n }\n"): (typeof documents)["\n query serverState {\n cloud {\n ...PartialCloud\n }\n config {\n error\n valid\n }\n info {\n os {\n hostname\n }\n }\n owner {\n avatar\n username\n }\n registration {\n state\n expiration\n keyFile {\n contents\n }\n updateExpiration\n }\n vars {\n regGen\n regState\n configError\n configValid\n }\n }\n"];
export function graphql(source: string) {
return (documents as any)[source] ?? {};

View File

@@ -297,15 +297,6 @@ export enum ContainerState {
Running = 'RUNNING'
}
export type Device = {
__typename?: 'Device';
device?: Maybe<Scalars['String']['output']>;
id: Scalars['ID']['output'];
sectorSize?: Maybe<Scalars['String']['output']>;
sectors?: Maybe<Scalars['String']['output']>;
tag?: Maybe<Scalars['String']['output']>;
};
export type Devices = {
__typename?: 'Devices';
gpu?: Maybe<Array<Maybe<Gpu>>>;
@@ -339,7 +330,8 @@ export type Disk = {
export enum DiskFsType {
Btrfs = 'btrfs',
Vfat = 'vfat',
Xfs = 'xfs'
Xfs = 'xfs',
Zfs = 'zfs'
}
export enum DiskInterfaceType {
@@ -522,7 +514,7 @@ export type Me = UserAccount & {
id: Scalars['ID']['output'];
name: Scalars['String']['output'];
permissions?: Maybe<Scalars['JSON']['output']>;
role: Scalars['String']['output'];
roles: Scalars['String']['output'];
};
export enum MemoryFormFactor {
@@ -579,10 +571,6 @@ export type Mutation = {
addApikey?: Maybe<ApiKey>;
/** Add new disk to array */
addDiskToArray?: Maybe<ArrayType>;
/** Add a new permission scope */
addScope?: Maybe<Scope>;
/** Add a new permission scope to apiKey */
addScopeToApiKey?: Maybe<Scope>;
/** Add a new user */
addUser?: Maybe<User>;
/** Cancel parity check */
@@ -630,16 +618,6 @@ export type MutationaddDiskToArrayArgs = {
};
export type MutationaddScopeArgs = {
input: addScopeInput;
};
export type MutationaddScopeToApiKeyArgs = {
input: addScopeToApiKeyInput;
};
export type MutationaddUserArgs = {
input: addUserInput;
};
@@ -872,12 +850,6 @@ export type Pci = {
vendorname?: Maybe<Scalars['String']['output']>;
};
export type Permissions = {
__typename?: 'Permissions';
grants?: Maybe<Scalars['JSON']['output']>;
scopes?: Maybe<Scalars['JSON']['output']>;
};
export type ProfileModel = {
__typename?: 'ProfileModel';
avatar?: Maybe<Scalars['String']['output']>;
@@ -894,9 +866,6 @@ export type Query = {
array: ArrayType;
cloud?: Maybe<Cloud>;
config: Config;
crashReportingEnabled?: Maybe<Scalars['Boolean']['output']>;
device?: Maybe<Device>;
devices: Array<Maybe<Device>>;
/** Single disk */
disk?: Maybe<Disk>;
/** Mulitiple disks */
@@ -916,29 +885,19 @@ export type Query = {
online?: Maybe<Scalars['Boolean']['output']>;
owner?: Maybe<Owner>;
parityHistory?: Maybe<Array<Maybe<ParityCheck>>>;
permissions?: Maybe<Permissions>;
registration?: Maybe<Registration>;
server?: Maybe<Server>;
servers: Array<Server>;
/** Network Shares */
shares?: Maybe<Array<Maybe<Share>>>;
twoFactor?: Maybe<TwoFactorWithToken>;
unassignedDevices?: Maybe<Array<Maybe<UnassignedDevice>>>;
/** User account */
user?: Maybe<User>;
/** User accounts */
users: Array<User>;
vars?: Maybe<Vars>;
/** Virtual network for vms */
vmNetwork?: Maybe<Scalars['JSON']['output']>;
/** Virtual machines */
vms?: Maybe<Vms>;
welcome?: Maybe<Welcome>;
};
export type QuerydeviceArgs = {
id: Scalars['ID']['input'];
};
@@ -967,11 +926,6 @@ export type QuerynotificationsArgs = {
};
export type QueryserverArgs = {
name: Scalars['String']['input'];
};
export type QueryuserArgs = {
id: Scalars['ID']['input'];
};
@@ -981,11 +935,6 @@ export type QueryusersArgs = {
input?: InputMaybe<usersInput>;
};
export type QueryvmNetworkArgs = {
name: Scalars['String']['input'];
};
export type Registration = {
__typename?: 'Registration';
expiration?: Maybe<Scalars['String']['output']>;
@@ -993,6 +942,7 @@ export type Registration = {
keyFile?: Maybe<KeyFile>;
state?: Maybe<RegistrationState>;
type?: Maybe<registrationType>;
updateExpiration?: Maybe<Scalars['String']['output']>;
};
export enum RegistrationState {
@@ -1043,15 +993,6 @@ export type RelayResponse = {
timeout?: Maybe<Scalars['String']['output']>;
};
/** A permission scope */
export type Scope = {
__typename?: 'Scope';
/** A user friendly description */
description?: Maybe<Scalars['String']['output']>;
/** A unique name for the scope */
name?: Maybe<Scalars['String']['output']>;
};
export type Server = {
__typename?: 'Server';
apikey: Scalars['String']['output'];
@@ -1117,9 +1058,6 @@ export type Subscription = {
apikeys?: Maybe<Array<Maybe<ApiKey>>>;
array: ArrayType;
config: Config;
crashReportingEnabled: Scalars['Boolean']['output'];
device: Device;
devices?: Maybe<Array<Device>>;
display?: Maybe<Display>;
dockerContainer: DockerContainer;
dockerContainers?: Maybe<Array<Maybe<DockerContainer>>>;
@@ -1134,26 +1072,18 @@ export type Subscription = {
parityHistory: ParityCheck;
ping: Scalars['String']['output'];
registration: Registration;
server: Server;
servers?: Maybe<Array<Server>>;
server?: Maybe<Server>;
service?: Maybe<Array<Service>>;
share: Share;
shares?: Maybe<Array<Share>>;
twoFactor?: Maybe<TwoFactorWithoutToken>;
unassignedDevices?: Maybe<Array<UnassignedDevice>>;
user: User;
users: Array<Maybe<User>>;
vars: Vars;
vmNetworks?: Maybe<Array<VmNetwork>>;
vms?: Maybe<Vms>;
};
export type SubscriptiondeviceArgs = {
id: Scalars['ID']['input'];
};
export type SubscriptiondockerContainerArgs = {
id: Scalars['ID']['input'];
};
@@ -1164,11 +1094,6 @@ export type SubscriptiondockerNetworkArgs = {
};
export type SubscriptionserverArgs = {
name: Scalars['String']['input'];
};
export type SubscriptionserviceArgs = {
name: Scalars['String']['input'];
};
@@ -1202,29 +1127,6 @@ export enum Theme {
White = 'white'
}
export type TwoFactorLocal = {
__typename?: 'TwoFactorLocal';
enabled?: Maybe<Scalars['Boolean']['output']>;
};
export type TwoFactorRemote = {
__typename?: 'TwoFactorRemote';
enabled?: Maybe<Scalars['Boolean']['output']>;
};
export type TwoFactorWithToken = {
__typename?: 'TwoFactorWithToken';
local?: Maybe<TwoFactorLocal>;
remote?: Maybe<TwoFactorRemote>;
token?: Maybe<Scalars['String']['output']>;
};
export type TwoFactorWithoutToken = {
__typename?: 'TwoFactorWithoutToken';
local?: Maybe<TwoFactorLocal>;
remote?: Maybe<TwoFactorRemote>;
};
export type UnassignedDevice = {
__typename?: 'UnassignedDevice';
devlinks?: Maybe<Scalars['String']['output']>;
@@ -1301,14 +1203,14 @@ export type User = UserAccount & {
name: Scalars['String']['output'];
/** If the account has a password set */
password?: Maybe<Scalars['Boolean']['output']>;
role: Scalars['String']['output'];
roles: Scalars['String']['output'];
};
export type UserAccount = {
description: Scalars['String']['output'];
id: Scalars['ID']['output'];
name: Scalars['String']['output'];
role: Scalars['String']['output'];
roles: Scalars['String']['output'];
};
export type Vars = {
@@ -1514,11 +1416,6 @@ export type VmDomain = {
uuid: Scalars['ID']['output'];
};
export type VmNetwork = {
__typename?: 'VmNetwork';
_placeholderType?: Maybe<Scalars['String']['output']>;
};
export enum VmState {
Crashed = 'CRASHED',
Idle = 'IDLE',
@@ -1557,19 +1454,6 @@ export type addApiKeyInput = {
userId?: InputMaybe<Scalars['String']['input']>;
};
export type addScopeInput = {
/** Scope description */
description?: InputMaybe<Scalars['String']['input']>;
/** Scope name */
name: Scalars['String']['input'];
};
export type addScopeToApiKeyInput = {
apiKey: Scalars['String']['input'];
/** Scope name */
name: Scalars['String']['input'];
};
export type addUserInput = {
description?: InputMaybe<Scalars['String']['input']>;
name: Scalars['String']['input'];
@@ -1636,9 +1520,9 @@ export type serverStateQueryVariables = Exact<{ [key: string]: never; }>;
export type serverStateQuery = { __typename?: 'Query', cloud?: (
{ __typename?: 'Cloud' }
& { ' $fragmentRefs'?: { 'PartialCloudFragment': PartialCloudFragment } }
) | null, config: { __typename?: 'Config', error?: ConfigErrorState | null, valid?: boolean | null }, info?: { __typename?: 'Info', os?: { __typename?: 'Os', hostname?: string | null } | null } | null, owner?: { __typename?: 'Owner', avatar?: string | null, username?: string | null } | null, registration?: { __typename?: 'Registration', state?: RegistrationState | null, expiration?: string | null, keyFile?: { __typename?: 'KeyFile', contents?: string | null } | null } | null, vars?: { __typename?: 'Vars', regGen?: string | null, regState?: RegistrationState | null, configError?: ConfigErrorState | null, configValid?: boolean | null } | null };
) | null, config: { __typename?: 'Config', error?: ConfigErrorState | null, valid?: boolean | null }, info?: { __typename?: 'Info', os?: { __typename?: 'Os', hostname?: string | null } | null } | null, owner?: { __typename?: 'Owner', avatar?: string | null, username?: string | null } | null, registration?: { __typename?: 'Registration', state?: RegistrationState | null, expiration?: string | null, updateExpiration?: string | null, keyFile?: { __typename?: 'KeyFile', contents?: string | null } | null } | null, vars?: { __typename?: 'Vars', regGen?: string | null, regState?: RegistrationState | null, configError?: ConfigErrorState | null, configValid?: boolean | null } | null };
export const PartialCloudFragmentDoc = {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"PartialCloud"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Cloud"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"error"}},{"kind":"Field","name":{"kind":"Name","value":"apiKey"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"valid"}},{"kind":"Field","name":{"kind":"Name","value":"error"}}]}},{"kind":"Field","name":{"kind":"Name","value":"cloud"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"status"}},{"kind":"Field","name":{"kind":"Name","value":"error"}}]}},{"kind":"Field","name":{"kind":"Name","value":"minigraphql"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"status"}},{"kind":"Field","name":{"kind":"Name","value":"error"}}]}},{"kind":"Field","name":{"kind":"Name","value":"relay"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"status"}},{"kind":"Field","name":{"kind":"Name","value":"error"}}]}}]}}]} as unknown as DocumentNode<PartialCloudFragment, unknown>;
export const ConnectSignInDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"ConnectSignIn"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"input"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"ConnectSignInInput"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"connectSignIn"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"input"},"value":{"kind":"Variable","name":{"kind":"Name","value":"input"}}}]}]}}]} as unknown as DocumentNode<ConnectSignInMutation, ConnectSignInMutationVariables>;
export const SignOutDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"SignOut"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"connectSignOut"}}]}}]} as unknown as DocumentNode<SignOutMutation, SignOutMutationVariables>;
export const serverStateDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"serverState"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"cloud"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"PartialCloud"}}]}},{"kind":"Field","name":{"kind":"Name","value":"config"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"error"}},{"kind":"Field","name":{"kind":"Name","value":"valid"}}]}},{"kind":"Field","name":{"kind":"Name","value":"info"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"os"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"hostname"}}]}}]}},{"kind":"Field","name":{"kind":"Name","value":"owner"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"avatar"}},{"kind":"Field","name":{"kind":"Name","value":"username"}}]}},{"kind":"Field","name":{"kind":"Name","value":"registration"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"state"}},{"kind":"Field","name":{"kind":"Name","value":"expiration"}},{"kind":"Field","name":{"kind":"Name","value":"keyFile"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"contents"}}]}}]}},{"kind":"Field","name":{"kind":"Name","value":"vars"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"regGen"}},{"kind":"Field","name":{"kind":"Name","value":"regState"}},{"kind":"Field","name":{"kind":"Name","value":"configError"}},{"kind":"Field","name":{"kind":"Name","value":"configValid"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"PartialCloud"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Cloud"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"error"}},{"kind":"Field","name":{"kind":"Name","value":"apiKey"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"valid"}},{"kind":"Field","name":{"kind":"Name","value":"error"}}]}},{"kind":"Field","name":{"kind":"Name","value":"cloud"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"status"}},{"kind":"Field","name":{"kind":"Name","value":"error"}}]}},{"kind":"Field","name":{"kind":"Name","value":"minigraphql"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"status"}},{"kind":"Field","name":{"kind":"Name","value":"error"}}]}},{"kind":"Field","name":{"kind":"Name","value":"relay"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"status"}},{"kind":"Field","name":{"kind":"Name","value":"error"}}]}}]}}]} as unknown as DocumentNode<serverStateQuery, serverStateQueryVariables>;
export const serverStateDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"serverState"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"cloud"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"PartialCloud"}}]}},{"kind":"Field","name":{"kind":"Name","value":"config"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"error"}},{"kind":"Field","name":{"kind":"Name","value":"valid"}}]}},{"kind":"Field","name":{"kind":"Name","value":"info"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"os"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"hostname"}}]}}]}},{"kind":"Field","name":{"kind":"Name","value":"owner"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"avatar"}},{"kind":"Field","name":{"kind":"Name","value":"username"}}]}},{"kind":"Field","name":{"kind":"Name","value":"registration"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"state"}},{"kind":"Field","name":{"kind":"Name","value":"expiration"}},{"kind":"Field","name":{"kind":"Name","value":"keyFile"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"contents"}}]}},{"kind":"Field","name":{"kind":"Name","value":"updateExpiration"}}]}},{"kind":"Field","name":{"kind":"Name","value":"vars"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"regGen"}},{"kind":"Field","name":{"kind":"Name","value":"regState"}},{"kind":"Field","name":{"kind":"Name","value":"configError"}},{"kind":"Field","name":{"kind":"Name","value":"configValid"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"PartialCloud"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Cloud"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"error"}},{"kind":"Field","name":{"kind":"Name","value":"apiKey"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"valid"}},{"kind":"Field","name":{"kind":"Name","value":"error"}}]}},{"kind":"Field","name":{"kind":"Name","value":"cloud"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"status"}},{"kind":"Field","name":{"kind":"Name","value":"error"}}]}},{"kind":"Field","name":{"kind":"Name","value":"minigraphql"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"status"}},{"kind":"Field","name":{"kind":"Name","value":"error"}}]}},{"kind":"Field","name":{"kind":"Name","value":"relay"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"status"}},{"kind":"Field","name":{"kind":"Name","value":"error"}}]}}]}}]} as unknown as DocumentNode<serverStateQuery, serverStateQueryVariables>;

View File

@@ -79,6 +79,7 @@ export const SERVER_STATE_QUERY = graphql(/* GraphQL */ `
keyFile {
contents
}
updateExpiration
}
vars {
regGen