Skip to content

Commit c1812f7

Browse files
committed
fix: bigint usage
1 parent a3168b5 commit c1812f7

File tree

7 files changed

+43
-12
lines changed

7 files changed

+43
-12
lines changed

api/codegen.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,15 @@ const config: CodegenConfig = {
1717
URL: 'URL',
1818
Port: 'number',
1919
UUID: 'string',
20+
BigInt: 'number',
2021
},
2122
scalarSchemas: {
2223
URL: 'z.instanceof(URL)',
2324
Long: 'z.number()',
2425
JSON: 'z.record(z.string(), z.any())',
2526
Port: 'z.number()',
2627
UUID: 'z.string()',
28+
BigInt: 'z.number()',
2729
},
2830
},
2931
generates: {

api/src/unraid-api/cli/generated/graphql.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ export type Scalars = {
1515
Int: { input: number; output: number; }
1616
Float: { input: number; output: number; }
1717
/** The `BigInt` scalar type represents non-fractional signed whole numeric values. */
18-
BigInt: { input: any; output: any; }
18+
BigInt: { input: number; output: number; }
1919
/** A date-time string at UTC, such as 2019-12-03T09:54:33Z, compliant with the date-time format. */
2020
DateTime: { input: string; output: string; }
2121
/** The `JSON` scalar type represents JSON values as specified by [ECMA-404](http://www.ecma-international.org/publications/files/ECMA-ST/ECMA-404.pdf). */
@@ -711,7 +711,7 @@ export type DockerContainer = Node & {
711711
names: Array<Scalars['String']['output']>;
712712
networkSettings?: Maybe<Scalars['JSON']['output']>;
713713
ports: Array<ContainerPort>;
714-
/** Total size of all the files in the container in bytes */
714+
/** Total size of all files in the container (in bytes) */
715715
sizeRootFs?: Maybe<Scalars['BigInt']['output']>;
716716
state: ContainerState;
717717
status: Scalars['String']['output'];

package.json

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,9 +71,6 @@
7171
],
7272
"unraid-ui/**/*.{js,ts,tsx,vue}": [
7373
"pnpm --filter @unraid/ui lint:fix"
74-
],
75-
"packages/**/*.{js,ts}": [
76-
"eslint --fix"
7774
]
7875
},
7976
"packageManager": "pnpm@10.15.0"

packages/unraid-api-plugin-connect/codegen.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,15 @@ const config: CodegenConfig = {
1717
URL: 'URL',
1818
Port: 'number',
1919
UUID: 'string',
20+
BigInt: 'number',
2021
},
2122
scalarSchemas: {
2223
URL: 'z.instanceof(URL)',
2324
Long: 'z.number()',
2425
JSON: 'z.record(z.string(), z.any())',
2526
Port: 'z.number()',
2627
UUID: 'z.string()',
28+
BigInt: 'z.number()',
2729
},
2830
},
2931
generates: {

packages/unraid-api-plugin-connect/src/graphql/generated/client/graphql.ts

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -731,10 +731,17 @@ export type RemoteGraphQlEventFragmentFragment = { __typename?: 'RemoteGraphQLEv
731731
export type EventsSubscriptionVariables = Exact<{ [key: string]: never; }>;
732732

733733

734-
export type EventsSubscription = { __typename?: 'Subscription', events?: Array<{ __typename: 'ClientConnectedEvent', connectedEvent: EventType, connectedData: { __typename?: 'ClientConnectionEventData', type: ClientType, version: string, apiKey: string } } | { __typename: 'ClientDisconnectedEvent', disconnectedEvent: EventType, disconnectedData: { __typename?: 'ClientConnectionEventData', type: ClientType, version: string, apiKey: string } } | { __typename: 'ClientPingEvent' } | { __typename: 'RemoteAccessEvent' } | (
735-
{ __typename: 'RemoteGraphQLEvent' }
736-
& { ' $fragmentRefs'?: { 'RemoteGraphQlEventFragmentFragment': RemoteGraphQlEventFragmentFragment } }
737-
) | { __typename: 'UpdateEvent' }> | null };
734+
export type EventsSubscription = { __typename?: 'Subscription', events?: Array<
735+
| { __typename: 'ClientConnectedEvent', connectedEvent: EventType, connectedData: { __typename?: 'ClientConnectionEventData', type: ClientType, version: string, apiKey: string } }
736+
| { __typename: 'ClientDisconnectedEvent', disconnectedEvent: EventType, disconnectedData: { __typename?: 'ClientConnectionEventData', type: ClientType, version: string, apiKey: string } }
737+
| { __typename: 'ClientPingEvent' }
738+
| { __typename: 'RemoteAccessEvent' }
739+
| (
740+
{ __typename: 'RemoteGraphQLEvent' }
741+
& { ' $fragmentRefs'?: { 'RemoteGraphQlEventFragmentFragment': RemoteGraphQlEventFragmentFragment } }
742+
)
743+
| { __typename: 'UpdateEvent' }
744+
> | null };
738745

739746
export type SendRemoteGraphQlResponseMutationVariables = Exact<{
740747
input: RemoteGraphQlServerInput;

web/codegen.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ const config: CodegenConfig = {
1717
Port: 'number',
1818
UUID: 'string',
1919
PrefixedID: 'string',
20+
BigInt: 'number',
2021
},
2122
},
2223
generates: {

web/src/composables/gql/graphql.ts

Lines changed: 25 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ export type Scalars = {
1515
Int: { input: number; output: number; }
1616
Float: { input: number; output: number; }
1717
/** The `BigInt` scalar type represents non-fractional signed whole numeric values. */
18-
BigInt: { input: any; output: any; }
18+
BigInt: { input: number; output: number; }
1919
/** A date-time string at UTC, such as 2019-12-03T09:54:33Z, compliant with the date-time format. */
2020
DateTime: { input: string; output: string; }
2121
/** The `JSON` scalar type represents JSON values as specified by [ECMA-404](http://www.ecma-international.org/publications/files/ECMA-ST/ECMA-404.pdf). */
@@ -241,6 +241,8 @@ export type ArrayDisk = Node & {
241241
id: Scalars['PrefixedID']['output'];
242242
/** Array slot number. Parity1 is always 0 and Parity2 is always 29. Array slots will be 1 - 28. Cache slots are 30 - 53. Flash is 54. */
243243
idx: Scalars['Int']['output'];
244+
/** Whether the disk is currently spinning */
245+
isSpinning?: Maybe<Scalars['Boolean']['output']>;
244246
name?: Maybe<Scalars['String']['output']>;
245247
/** Number of unrecoverable errors reported by the device I/O drivers. Missing data due to unrecoverable array read errors is filled in on-the-fly using parity reconstruct (and we attempt to write this data back to the sector(s) which failed). Any unrecoverable write error results in disabling the disk. */
246248
numErrors?: Maybe<Scalars['BigInt']['output']>;
@@ -607,6 +609,8 @@ export type Disk = Node & {
607609
id: Scalars['PrefixedID']['output'];
608610
/** The interface type of the disk */
609611
interfaceType: DiskInterfaceType;
612+
/** Whether the disk is spinning or not */
613+
isSpinning: Scalars['Boolean']['output'];
610614
/** The model name of the disk */
611615
name: Scalars['String']['output'];
612616
/** The partitions on the disk */
@@ -674,6 +678,7 @@ export enum DiskSmartStatus {
674678

675679
export type Docker = Node & {
676680
__typename?: 'Docker';
681+
containerUpdateStatuses: Array<ExplicitStatusItem>;
677682
containers: Array<DockerContainer>;
678683
id: Scalars['PrefixedID']['output'];
679684
networks: Array<DockerNetwork>;
@@ -699,13 +704,15 @@ export type DockerContainer = Node & {
699704
id: Scalars['PrefixedID']['output'];
700705
image: Scalars['String']['output'];
701706
imageId: Scalars['String']['output'];
707+
isRebuildReady?: Maybe<Scalars['Boolean']['output']>;
708+
isUpdateAvailable?: Maybe<Scalars['Boolean']['output']>;
702709
labels?: Maybe<Scalars['JSON']['output']>;
703710
mounts?: Maybe<Array<Scalars['JSON']['output']>>;
704711
names: Array<Scalars['String']['output']>;
705712
networkSettings?: Maybe<Scalars['JSON']['output']>;
706713
ports: Array<ContainerPort>;
707-
/** Total size of all the files in the container */
708-
sizeRootFs?: Maybe<Scalars['Int']['output']>;
714+
/** Total size of all files in the container (in bytes) */
715+
sizeRootFs?: Maybe<Scalars['BigInt']['output']>;
709716
state: ContainerState;
710717
status: Scalars['String']['output'];
711718
};
@@ -770,6 +777,12 @@ export type EnableDynamicRemoteAccessInput = {
770777
url: AccessUrlInput;
771778
};
772779

780+
export type ExplicitStatusItem = {
781+
__typename?: 'ExplicitStatusItem';
782+
name: Scalars['String']['output'];
783+
updateStatus: UpdateStatus;
784+
};
785+
773786
export type Flash = Node & {
774787
__typename?: 'Flash';
775788
guid: Scalars['String']['output'];
@@ -1225,6 +1238,7 @@ export type Mutation = {
12251238
rclone: RCloneMutations;
12261239
/** Reads each notification to recompute & update the overview. */
12271240
recalculateOverview: NotificationOverview;
1241+
refreshDockerDigests: Scalars['Boolean']['output'];
12281242
/** Remove one or more plugins from the API. Returns false if restart was triggered automatically, true if manual restart is required. */
12291243
removePlugin: Scalars['Boolean']['output'];
12301244
setDockerFolderChildren: ResolvedOrganizerV1;
@@ -2260,6 +2274,14 @@ export type UpdateSettingsResponse = {
22602274
warnings?: Maybe<Array<Scalars['String']['output']>>;
22612275
};
22622276

2277+
/** Update status of a container. */
2278+
export enum UpdateStatus {
2279+
REBUILD_READY = 'REBUILD_READY',
2280+
UNKNOWN = 'UNKNOWN',
2281+
UPDATE_AVAILABLE = 'UPDATE_AVAILABLE',
2282+
UP_TO_DATE = 'UP_TO_DATE'
2283+
}
2284+
22632285
export type Uptime = {
22642286
__typename?: 'Uptime';
22652287
timestamp?: Maybe<Scalars['String']['output']>;

0 commit comments

Comments
 (0)