fix: authorization type error (#987)

Co-authored-by: Eli Bosley <ekbosley@gmail.com>
This commit is contained in:
Michael Datelle
2024-12-18 12:03:28 -05:00
committed by GitHub
parent 000692ca50
commit 5f0446fa79
9 changed files with 27972 additions and 27657 deletions

View File

@@ -43,17 +43,34 @@ export type AccessUrlInput = {
type: URL_TYPE;
};
export type AddPermissionInput = {
action: Scalars['String']['input'];
possession: Scalars['String']['input'];
resource: Resource;
role: Role;
};
export type AddRoleForApiKeyInput = {
apiKeyId: Scalars['ID']['input'];
role: Role;
};
export type AddRoleForUserInput = {
role: Role;
userId: Scalars['ID']['input'];
};
export type AllowedOriginInput = {
origins: Array<Scalars['String']['input']>;
};
export type ApiKey = {
__typename?: 'ApiKey';
createdAt: Scalars['DateTime']['output'];
description?: Maybe<Scalars['String']['output']>;
expiresAt: Scalars['Long']['output'];
key: Scalars['String']['output'];
id: Scalars['ID']['output'];
name: Scalars['String']['output'];
scopes: Scalars['JSON']['output'];
roles: Array<Role>;
};
export type ApiKeyResponse = {
@@ -62,6 +79,16 @@ export type ApiKeyResponse = {
valid: Scalars['Boolean']['output'];
};
export type ApiKeyWithSecret = {
__typename?: 'ApiKeyWithSecret';
createdAt: Scalars['DateTime']['output'];
description?: Maybe<Scalars['String']['output']>;
id: Scalars['ID']['output'];
key: Scalars['String']['output'];
name: Scalars['String']['output'];
roles: Array<Role>;
};
export type ArrayType = Node & {
__typename?: 'Array';
/** Current boot disk */
@@ -322,6 +349,12 @@ export enum ContainerState {
Running = 'RUNNING'
}
export type CreateApiKeyInput = {
description?: InputMaybe<Scalars['String']['input']>;
name: Scalars['String']['input'];
roles: Array<Role>;
};
export type Devices = {
__typename?: 'Devices';
gpu?: Maybe<Array<Maybe<Gpu>>>;
@@ -567,7 +600,7 @@ export type Me = UserAccount & {
id: Scalars['ID']['output'];
name: Scalars['String']['output'];
permissions?: Maybe<Scalars['JSON']['output']>;
roles: Scalars['String']['output'];
roles: Array<Role>;
};
export enum MemoryFormFactor {
@@ -620,10 +653,11 @@ export type Mount = {
export type Mutation = {
__typename?: 'Mutation';
/** Create a new API key */
addApikey?: Maybe<ApiKey>;
/** Add new disk to array */
addDiskToArray?: Maybe<ArrayType>;
addPermission: Scalars['Boolean']['output'];
addRoleForApiKey: Scalars['Boolean']['output'];
addRoleForUser: Scalars['Boolean']['output'];
/** Add a new user */
addUser?: Maybe<User>;
archiveAll: NotificationOverview;
@@ -635,6 +669,7 @@ export type Mutation = {
clearArrayDiskStatistics?: Maybe<Scalars['JSON']['output']>;
connectSignIn: Scalars['Boolean']['output'];
connectSignOut: Scalars['Boolean']['output'];
createApiKey: ApiKeyWithSecret;
createNotification: Notification;
/** Deletes all archived notifications on server. */
deleteArchivedNotifications: NotificationOverview;
@@ -642,8 +677,6 @@ export type Mutation = {
/** Delete a user */
deleteUser?: Maybe<User>;
enableDynamicRemoteAccess: Scalars['Boolean']['output'];
/** Get an existing API key */
getApiKey?: Maybe<ApiKey>;
login?: Maybe<Scalars['String']['output']>;
mountArrayDisk?: Maybe<Disk>;
/** Pause parity check */
@@ -653,6 +686,7 @@ export type Mutation = {
recalculateOverview: NotificationOverview;
/** Remove existing disk from array. NOTE: The array must be stopped before running this otherwise it'll throw an error. */
removeDiskFromArray?: Maybe<ArrayType>;
removeRoleFromApiKey: Scalars['Boolean']['output'];
/** Resume parity check */
resumeParityCheck?: Maybe<Scalars['JSON']['output']>;
setAdditionalAllowedOrigins: Array<Scalars['String']['output']>;
@@ -669,14 +703,6 @@ export type Mutation = {
unmountArrayDisk?: Maybe<Disk>;
/** Marks a notification as unread. */
unreadNotification: Notification;
/** Update an existing API key */
updateApikey?: Maybe<ApiKey>;
};
export type MutationaddApikeyArgs = {
input?: InputMaybe<updateApikeyInput>;
name: Scalars['String']['input'];
};
@@ -685,6 +711,21 @@ export type MutationaddDiskToArrayArgs = {
};
export type MutationaddPermissionArgs = {
input: AddPermissionInput;
};
export type MutationaddRoleForApiKeyArgs = {
input: AddRoleForApiKeyInput;
};
export type MutationaddRoleForUserArgs = {
input: AddRoleForUserInput;
};
export type MutationaddUserArgs = {
input: addUserInput;
};
@@ -715,6 +756,11 @@ export type MutationconnectSignInArgs = {
};
export type MutationcreateApiKeyArgs = {
input: CreateApiKeyInput;
};
export type MutationcreateNotificationArgs = {
input: NotificationData;
};
@@ -736,12 +782,6 @@ export type MutationenableDynamicRemoteAccessArgs = {
};
export type MutationgetApiKeyArgs = {
input?: InputMaybe<authenticateInput>;
name: Scalars['String']['input'];
};
export type MutationloginArgs = {
password: Scalars['String']['input'];
username: Scalars['String']['input'];
@@ -758,6 +798,11 @@ export type MutationremoveDiskFromArrayArgs = {
};
export type MutationremoveRoleFromApiKeyArgs = {
input: RemoveRoleFromApiKeyInput;
};
export type MutationsetAdditionalAllowedOriginsArgs = {
input: AllowedOriginInput;
};
@@ -792,12 +837,6 @@ export type MutationunreadNotificationArgs = {
id: Scalars['String']['input'];
};
export type MutationupdateApikeyArgs = {
input?: InputMaybe<updateApikeyInput>;
name: Scalars['String']['input'];
};
export type Network = Node & {
__typename?: 'Network';
accessUrls?: Maybe<Array<AccessUrl>>;
@@ -999,8 +1038,8 @@ export type ProfileModel = {
export type Query = {
__typename?: 'Query';
/** Get all API keys */
apiKeys?: Maybe<Array<Maybe<ApiKey>>>;
apiKey?: Maybe<ApiKey>;
apiKeys: Array<ApiKey>;
/** An Unraid array consisting of 1 or 2 Parity disks and a number of Data disks. */
array: ArrayType;
cloud?: Maybe<Cloud>;
@@ -1046,6 +1085,11 @@ export type Query = {
};
export type QueryapiKeyArgs = {
id: Scalars['ID']['input'];
};
export type QuerydiskArgs = {
id: Scalars['ID']['input'];
};
@@ -1140,6 +1184,52 @@ export type RemoteAccess = {
port?: Maybe<Scalars['Port']['output']>;
};
export type RemoveRoleFromApiKeyInput = {
apiKeyId: Scalars['ID']['input'];
role: Role;
};
/** Available resources for permissions */
export enum Resource {
ApiKey = 'api_key',
Array = 'array',
Cloud = 'cloud',
Config = 'config',
Connect = 'connect',
CrashReportingEnabled = 'crash_reporting_enabled',
Customizations = 'customizations',
Dashboard = 'dashboard',
Disk = 'disk',
Display = 'display',
Docker = 'docker',
Flash = 'flash',
Info = 'info',
Logs = 'logs',
Me = 'me',
Network = 'network',
Notifications = 'notifications',
Online = 'online',
Os = 'os',
Owner = 'owner',
Permission = 'permission',
Registration = 'registration',
Servers = 'servers',
Services = 'services',
Share = 'share',
Vars = 'vars',
Vms = 'vms',
Welcome = 'welcome'
}
/** Available roles for API keys and users */
export enum Role {
Admin = 'admin',
Guest = 'guest',
MyServers = 'my_servers',
Notifier = 'notifier',
Upc = 'upc'
}
export type Server = {
__typename?: 'Server';
apikey: Scalars['String']['output'];
@@ -1203,7 +1293,6 @@ export type Share = {
export type Subscription = {
__typename?: 'Subscription';
apikeys?: Maybe<Array<Maybe<ApiKey>>>;
array: ArrayType;
config: Config;
display?: Maybe<Display>;
@@ -1361,14 +1450,14 @@ export type User = UserAccount & {
name: Scalars['String']['output'];
/** If the account has a password set */
password?: Maybe<Scalars['Boolean']['output']>;
roles: Scalars['String']['output'];
roles: Array<Role>;
};
export type UserAccount = {
description: Scalars['String']['output'];
id: Scalars['ID']['output'];
name: Scalars['String']['output'];
roles: Scalars['String']['output'];
roles: Array<Role>;
};
export type Vars = Node & {
@@ -1607,12 +1696,6 @@ export type Welcome = {
message: Scalars['String']['output'];
};
export type addApiKeyInput = {
key?: InputMaybe<Scalars['String']['input']>;
name?: InputMaybe<Scalars['String']['input']>;
userId?: InputMaybe<Scalars['String']['input']>;
};
export type addUserInput = {
description?: InputMaybe<Scalars['String']['input']>;
name: Scalars['String']['input'];
@@ -1626,10 +1709,6 @@ export type arrayDiskInput = {
slot?: InputMaybe<Scalars['Int']['input']>;
};
export type authenticateInput = {
password: Scalars['String']['input'];
};
export type deleteUserInput = {
name: Scalars['String']['input'];
};
@@ -1650,11 +1729,6 @@ export enum registrationType {
Unleashed = 'UNLEASHED'
}
export type updateApikeyInput = {
description?: InputMaybe<Scalars['String']['input']>;
expiresAt: Scalars['Long']['input'];
};
export type usersInput = {
slim?: InputMaybe<Scalars['Boolean']['input']>;
};