Regenerate API client (orval) for new/changed endpoints

Regenerated apiClient.ts, gql/graphql.ts, types/api/index.ts and
typed-router.d.ts to pick up the sppass/cardless, plugin UI, PIN,
and username endpoints/types added in the previous two commits.
This commit is contained in:
Kayori
2026-09-06 15:13:23 +02:00
parent 24f394116a
commit 196369da83
11 changed files with 970 additions and 253 deletions
+5
View File
@@ -16,6 +16,7 @@
"axios": "^1.19.0",
"graphql": "16.14.2",
"pinia": "^4.0.2",
"qr-scanner": "^1.4.2",
"tailwind-material-3": "^3.0.5",
"tailwind-merge": "^3.6.0",
"tailwindcss": "^4.3.3",
@@ -448,6 +449,8 @@
"@types/node": ["@types/node@26.1.2", "", { "dependencies": { "undici-types": "~8.3.0" } }, "sha512-Vu4a5UFA9rIIFJ7rB/Vaafh9lrCQszopTCx6KjFboXTGQbPNasehVR5TEiithSDGyd1DEiUByggTZsg8jukeIg=="],
"@types/offscreencanvas": ["@types/offscreencanvas@2019.7.3", "", {}, "sha512-ieXiYmgSRXUDeOntE1InxjWyvEelZGP63M+cGuquuRLuIKKT1osnkXjxev9B7d1nXSug5vpunx+gNlbVxMlC9A=="],
"@types/unist": ["@types/unist@3.0.3", "", {}, "sha512-ko/gIFJRv177XgZsZcBwnqJN5x/Gien8qNOn0D5bQU/zAzVf9Zt3BlcUiLqhV9y4ARk0GbT3tnUiPNgnTXzc/Q=="],
"@types/ws": ["@types/ws@8.18.1", "", { "dependencies": { "@types/node": "*" } }, "sha512-ThVF6DCVhA8kUGy+aazFQ4kXQ7E1Ty7A3ypFOe0IcJV8O/M511G99AW24irKrW56Wt44yG9+ij8FaqoBGkuBXg=="],
@@ -1074,6 +1077,8 @@
"punycode.js": ["punycode.js@2.3.1", "", {}, "sha512-uxFIHU0YlHYhDQtV4R9J6a52SLx28BCjT+4ieh7IGbgwVJWO+km431c4yRlREUAsAmt/uMjQUyQHNEPf0M39CA=="],
"qr-scanner": ["qr-scanner@1.4.2", "", { "dependencies": { "@types/offscreencanvas": "^2019.6.4" } }, "sha512-kV1yQUe2FENvn59tMZW6mOVfpq9mGxGf8l6+EGaXUOd4RBOLg7tRC83OrirM5AtDvZRpdjdlXURsHreAOSPOUw=="],
"quansync": ["quansync@0.2.11", "", {}, "sha512-AifT7QEbW9Nri4tAwR5M/uzpBuqfZf+zwaEM/QkzEjj7NBuFD2rBuy0K3dE+8wltbezDV7JMA0WfnCPYRSYbXA=="],
"queue-microtask": ["queue-microtask@1.2.3", "", {}, "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A=="],
+6
View File
@@ -8,6 +8,12 @@ export default defineConfig({
target: './src/data/apiClient.ts',
schemas: './src/types/api',
client: 'vue-query',
override: {
mutator: {
path: './src/data/customFetch.ts',
name: 'customFetch',
},
},
}
}
});
+16
View File
@@ -19,6 +19,7 @@
"axios": "^1.19.0",
"graphql": "16.14.2",
"pinia": "^4.0.2",
"qr-scanner": "^1.4.2",
"tailwind-material-3": "^3.0.5",
"tailwind-merge": "^3.6.0",
"tailwindcss": "^4.3.3",
@@ -4008,6 +4009,12 @@
"undici-types": "~8.3.0"
}
},
"node_modules/@types/offscreencanvas": {
"version": "2019.7.3",
"resolved": "https://registry.npmjs.org/@types/offscreencanvas/-/offscreencanvas-2019.7.3.tgz",
"integrity": "sha512-ieXiYmgSRXUDeOntE1InxjWyvEelZGP63M+cGuquuRLuIKKT1osnkXjxev9B7d1nXSug5vpunx+gNlbVxMlC9A==",
"license": "MIT"
},
"node_modules/@types/unist": {
"version": "3.0.3",
"resolved": "https://registry.npmjs.org/@types/unist/-/unist-3.0.3.tgz",
@@ -8747,6 +8754,15 @@
"node": ">=6"
}
},
"node_modules/qr-scanner": {
"version": "1.4.2",
"resolved": "https://registry.npmjs.org/qr-scanner/-/qr-scanner-1.4.2.tgz",
"integrity": "sha512-kV1yQUe2FENvn59tMZW6mOVfpq9mGxGf8l6+EGaXUOd4RBOLg7tRC83OrirM5AtDvZRpdjdlXURsHreAOSPOUw==",
"license": "MIT",
"dependencies": {
"@types/offscreencanvas": "^2019.6.4"
}
},
"node_modules/quansync": {
"version": "0.2.11",
"resolved": "https://registry.npmjs.org/quansync/-/quansync-0.2.11.tgz",
+3 -1
View File
@@ -10,7 +10,8 @@
"build-only": "vite build",
"type-check": "vue-tsc --build --force",
"lint": "eslint . --ext .vue,.js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts --fix --ignore-path .gitignore",
"codegen": "cross-env graphql-codegen"
"codegen": "cross-env graphql-codegen",
"api-codegen": "orval"
},
"dependencies": {
"@apollo/client": "^3.14.1",
@@ -24,6 +25,7 @@
"axios": "^1.19.0",
"graphql": "16.14.2",
"pinia": "^4.0.2",
"qr-scanner": "^1.4.2",
"tailwind-material-3": "^3.0.5",
"tailwind-merge": "^3.6.0",
"tailwindcss": "^4.3.3",
File diff suppressed because it is too large Load Diff
+19 -8
View File
@@ -5,7 +5,12 @@ import type { TokenResponse } from "@/types/tokenResponse";
import { UserService } from "./userService";
export class AuthenticationService {
private static readonly loginErrorMessages: Record<string, string> = {
"Invalid login attempt.": "Incorrect username or password.",
"Failed": "Incorrect username or password.",
"LockedOut": "This account has been locked out due to too many failed attempts. Try again later.",
};
static setAccessToken(accessToken: string): void {
const store = useUserStore();
store.setAccessToken(accessToken);
@@ -54,16 +59,21 @@ export class AuthenticationService {
});
if (!response.ok) {
const json = await response.json();
if (json.toString().includes(
"Invalid email or password",
)
) {
const problem = await response.json().catch(() => null);
const detail = problem?.detail as string | undefined;
if (detail === "TwoFactorRequired") {
return {
twoFactorRequired: false,
incorrectCredentials: true,
twoFactorRequired: true,
incorrectCredentials: false,
};
}
return {
twoFactorRequired: false,
incorrectCredentials: true,
errorMessage: (detail && this.loginErrorMessages[detail]) ?? "Incorrect username or password.",
};
}
const tokenResponse = (await response.json()) as TokenResponse;
@@ -87,6 +97,7 @@ export class AuthenticationService {
return {
twoFactorRequired: true,
incorrectCredentials: true,
errorMessage: "Something went wrong while completing sign-in. Please try again.",
};
}
+1 -1
View File
@@ -19,7 +19,7 @@ export class UserService {
const store = useUserStore();
store.setUser(userClaims);
store.setName(
userClaims.find((claim) => claim.type === "name")?.value || "",
userClaims.find((claim) => claim.type === "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/name")?.value || "",
);
return true;
}
+53 -6
View File
@@ -16,6 +16,7 @@ export type Scalars = {
Int: { input: number; output: number; }
Float: { input: number; output: number; }
DateTime: { input: Date; output: Date; }
Long: { input: unknown; output: unknown; }
};
/** Defines when a policy shall be executed. */
@@ -43,21 +44,21 @@ export enum CacheControlScope {
export type Card = {
__typename?: 'Card';
id: Scalars['Int']['output'];
id: Scalars['Long']['output'];
konamiId: Scalars['String']['output'];
rawId: Scalars['String']['output'];
user: User;
userId: Scalars['Int']['output'];
userId: Scalars['Long']['output'];
};
export type CardFilterInput = {
and?: InputMaybe<Array<CardFilterInput>>;
id?: InputMaybe<IntOperationFilterInput>;
id?: InputMaybe<LongOperationFilterInput>;
konamiId?: InputMaybe<StringOperationFilterInput>;
or?: InputMaybe<Array<CardFilterInput>>;
rawId?: InputMaybe<StringOperationFilterInput>;
user?: InputMaybe<UserFilterInput>;
userId?: InputMaybe<IntOperationFilterInput>;
userId?: InputMaybe<LongOperationFilterInput>;
};
export type CardSortInput = {
@@ -105,6 +106,21 @@ export type ListFilterInputTypeOfCardFilterInput = {
some?: InputMaybe<CardFilterInput>;
};
export type LongOperationFilterInput = {
eq?: InputMaybe<Scalars['Long']['input']>;
gt?: InputMaybe<Scalars['Long']['input']>;
gte?: InputMaybe<Scalars['Long']['input']>;
in?: InputMaybe<Array<InputMaybe<Scalars['Long']['input']>>>;
lt?: InputMaybe<Scalars['Long']['input']>;
lte?: InputMaybe<Scalars['Long']['input']>;
neq?: InputMaybe<Scalars['Long']['input']>;
ngt?: InputMaybe<Scalars['Long']['input']>;
ngte?: InputMaybe<Scalars['Long']['input']>;
nin?: InputMaybe<Array<InputMaybe<Scalars['Long']['input']>>>;
nlt?: InputMaybe<Scalars['Long']['input']>;
nlte?: InputMaybe<Scalars['Long']['input']>;
};
export type Mutation = {
__typename?: 'Mutation';
addCard: Array<Card>;
@@ -153,6 +169,7 @@ export type PageInfo = {
export type Query = {
__typename?: 'Query';
myCards?: Maybe<MyCardsConnection>;
publicUrl: Scalars['String']['output'];
};
@@ -192,7 +209,7 @@ export type User = {
concurrencyStamp?: Maybe<Scalars['String']['output']>;
email?: Maybe<Scalars['String']['output']>;
emailConfirmed: Scalars['Boolean']['output'];
id: Scalars['Int']['output'];
id: Scalars['Long']['output'];
lockoutEnabled: Scalars['Boolean']['output'];
lockoutEnd?: Maybe<Scalars['DateTime']['output']>;
normalizedEmail?: Maybe<Scalars['String']['output']>;
@@ -214,7 +231,7 @@ export type UserFilterInput = {
concurrencyStamp?: InputMaybe<StringOperationFilterInput>;
email?: InputMaybe<StringOperationFilterInput>;
emailConfirmed?: InputMaybe<BooleanOperationFilterInput>;
id?: InputMaybe<IntOperationFilterInput>;
id?: InputMaybe<LongOperationFilterInput>;
lockoutEnabled?: InputMaybe<BooleanOperationFilterInput>;
lockoutEnd?: InputMaybe<DateTimeOperationFilterInput>;
normalizedEmail?: InputMaybe<StringOperationFilterInput>;
@@ -257,6 +274,11 @@ export type AddCardMutationVariables = Exact<{
export type AddCardMutation = { addCard: Array<{ konamiId: string, rawId: string }> };
export type GetConfigQueryVariables = Exact<{ [key: string]: never; }>;
export type GetConfigQuery = { publicUrl: string };
export type GetMyCardsQueryVariables = Exact<{ [key: string]: never; }>;
@@ -293,6 +315,31 @@ export function useAddCardMutation(options: VueApolloComposable.UseMutationOptio
return VueApolloComposable.useMutation<AddCardMutation, AddCardMutationVariables>(AddCardDocument, options);
}
export type AddCardMutationCompositionFunctionResult = VueApolloComposable.UseMutationReturn<AddCardMutation, AddCardMutationVariables>;
export const GetConfigDocument = gql`
query GetConfig {
publicUrl
}
`;
/**
* __useGetConfigQuery__
*
* To run a query within a Vue component, call `useGetConfigQuery` and pass it any options that fit your needs.
* When your component renders, `useGetConfigQuery` returns an object from Apollo Client that contains result, loading and error properties
* you can use to render your UI.
*
* @param options that will be passed into the query, supported options are listed on: https://v4.apollo.vuejs.org/guide-composable/query.html#options;
*
* @example
* const { result, loading, error } = useGetConfigQuery();
*/
export function useGetConfigQuery(options: VueApolloComposable.UseQueryOptions<GetConfigQuery, GetConfigQueryVariables> | VueCompositionApi.Ref<VueApolloComposable.UseQueryOptions<GetConfigQuery, GetConfigQueryVariables>> | ReactiveFunction<VueApolloComposable.UseQueryOptions<GetConfigQuery, GetConfigQueryVariables>> = {}) {
return VueApolloComposable.useQuery<GetConfigQuery, GetConfigQueryVariables>(GetConfigDocument, {}, options);
}
export function useGetConfigLazyQuery(options: VueApolloComposable.UseQueryOptions<GetConfigQuery, GetConfigQueryVariables> | VueCompositionApi.Ref<VueApolloComposable.UseQueryOptions<GetConfigQuery, GetConfigQueryVariables>> | ReactiveFunction<VueApolloComposable.UseQueryOptions<GetConfigQuery, GetConfigQueryVariables>> = {}) {
return VueApolloComposable.useLazyQuery<GetConfigQuery, GetConfigQueryVariables>(GetConfigDocument, {}, options);
}
export type GetConfigQueryCompositionFunctionResult = VueApolloComposable.UseQueryReturn<GetConfigQuery, GetConfigQueryVariables>;
export const GetMyCardsDocument = gql`
query GetMyCards {
myCards {
+7
View File
@@ -6,6 +6,7 @@
*/
export * from './accessTokenResponse';
export * from './approveSessionResponse';
export * from './cardDto';
export * from './claim';
export * from './claimProperties';
@@ -17,6 +18,10 @@ export * from './infoRequest';
export * from './infoResponse';
export * from './loginRequest';
export * from './mapIdentityApiApiAuthConfirmEmailParams';
export * from './pinResponse';
export * from './pluginNavItem';
export * from './pluginRoute';
export * from './pluginUiManifestResponse';
export * from './postApiAuthLoginParams';
export * from './postEamuseMParams';
export * from './postEamuseParams';
@@ -26,5 +31,7 @@ export * from './resendConfirmationEmailRequest';
export * from './resetPasswordRequest';
export * from './twoFactorRequest';
export * from './twoFactorResponse';
export * from './updatePinRequest';
export * from './updateUsernameRequest';
export * from './validateCardRequest';
export * from './validateCardResponse';
@@ -7,5 +7,5 @@
export interface ValidateCardResponse {
message: string;
success?: boolean;
success: boolean;
}
+105
View File
@@ -45,6 +45,20 @@ declare module 'vue-router/auto-routes' {
Record<never, never>,
| never
>,
'/auth/forgotPassword/': RouteRecordInfo<
'/auth/forgotPassword/',
'/auth/forgotPassword',
Record<never, never>,
Record<never, never>,
| never
>,
'/auth/forgotPassword/confirmation': RouteRecordInfo<
'/auth/forgotPassword/confirmation',
'/auth/forgotPassword/confirmation',
Record<never, never>,
Record<never, never>,
| never
>,
'/auth/register': RouteRecordInfo<
'/auth/register',
'/auth/register',
@@ -52,6 +66,34 @@ declare module 'vue-router/auto-routes' {
Record<never, never>,
| never
>,
'/auth/resetPassword/': RouteRecordInfo<
'/auth/resetPassword/',
'/auth/resetPassword',
Record<never, never>,
Record<never, never>,
| never
>,
'/auth/resetPassword/confirmation': RouteRecordInfo<
'/auth/resetPassword/confirmation',
'/auth/resetPassword/confirmation',
Record<never, never>,
Record<never, never>,
| never
>,
'/cardless/[token]': RouteRecordInfo<
'/cardless/[token]',
'/cardless/:token',
{ token: ParamValue<true> },
{ token: ParamValue<false> },
| never
>,
'/cardless/scan': RouteRecordInfo<
'/cardless/scan',
'/cardless/scan',
Record<never, never>,
Record<never, never>,
| never
>,
'/cards/': RouteRecordInfo<
'/cards/',
'/cards',
@@ -59,6 +101,13 @@ declare module 'vue-router/auto-routes' {
Record<never, never>,
| never
>,
'/settings/': RouteRecordInfo<
'/settings/',
'/settings',
Record<never, never>,
Record<never, never>,
| never
>,
}
/**
@@ -88,6 +137,22 @@ declare module 'vue-router/auto-routes' {
pathParamNames:
| never
}
'src/pages/auth/forgotPassword/index.vue': {
routes:
| '/auth/forgotPassword/'
views:
| never
pathParamNames:
| never
}
'src/pages/auth/forgotPassword/confirmation.vue': {
routes:
| '/auth/forgotPassword/confirmation'
views:
| never
pathParamNames:
| never
}
'src/pages/auth/register.vue': {
routes:
| '/auth/register'
@@ -96,6 +161,38 @@ declare module 'vue-router/auto-routes' {
pathParamNames:
| never
}
'src/pages/auth/resetPassword/index.vue': {
routes:
| '/auth/resetPassword/'
views:
| never
pathParamNames:
| never
}
'src/pages/auth/resetPassword/confirmation.vue': {
routes:
| '/auth/resetPassword/confirmation'
views:
| never
pathParamNames:
| never
}
'src/pages/cardless/[token].vue': {
routes:
| '/cardless/[token]'
views:
| never
pathParamNames:
| 'token'
}
'src/pages/cardless/scan.vue': {
routes:
| '/cardless/scan'
views:
| never
pathParamNames:
| never
}
'src/pages/cards/index.vue': {
routes:
| '/cards/'
@@ -104,6 +201,14 @@ declare module 'vue-router/auto-routes' {
pathParamNames:
| never
}
'src/pages/settings/index.vue': {
routes:
| '/settings/'
views:
| never
pathParamNames:
| never
}
}
/**