From 4c9ebc3a9ff7b173f44f02d93025558e9e59b5c8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20Loipf=C3=BChrer?= Date: Sun, 8 Sep 2024 18:12:25 +0200 Subject: [PATCH] chore: formatting --- abrechnung/core/decorators.py | 7 +- frontend/libs/api/src/lib/generated/Client.ts | 23 +- .../api/src/lib/generated/core/ApiError.ts | 6 +- .../lib/generated/core/ApiRequestOptions.ts | 2 +- .../src/lib/generated/core/BaseHttpRequest.ts | 7 +- .../lib/generated/core/CancelablePromise.ts | 13 +- .../lib/generated/core/FetchHttpRequest.ts | 11 +- .../api/src/lib/generated/core/OpenAPI.ts | 10 +- .../api/src/lib/generated/core/request.ts | 103 +- frontend/libs/api/src/lib/generated/index.ts | 106 +- .../src/lib/generated/models/AccountType.ts | 2 +- .../lib/generated/models/Body_get_token.ts | 7 +- .../generated/models/ChangeEmailPayload.ts | 1 - .../generated/models/ChangePasswordPayload.ts | 1 - .../lib/generated/models/ClearingAccount.ts | 1 - .../models/ConfirmEmailChangePayload.ts | 1 - .../models/ConfirmPasswordRecoveryPayload.ts | 1 - .../models/ConfirmRegistrationPayload.ts | 1 - .../generated/models/CreateInvitePayload.ts | 1 - .../generated/models/DeleteSessionPayload.ts | 1 - .../lib/generated/models/FileAttachment.ts | 7 +- .../api/src/lib/generated/models/Group.ts | 1 - .../src/lib/generated/models/GroupInvite.ts | 3 +- .../api/src/lib/generated/models/GroupLog.ts | 3 +- .../src/lib/generated/models/GroupMember.ts | 3 +- .../src/lib/generated/models/GroupMessage.ts | 1 - .../src/lib/generated/models/GroupPayload.ts | 1 - .../src/lib/generated/models/GroupPreview.ts | 1 - .../generated/models/HTTPValidationError.ts | 3 +- .../src/lib/generated/models/LoginPayload.ts | 1 - .../src/lib/generated/models/NewAccount.ts | 7 +- .../api/src/lib/generated/models/NewFile.ts | 1 - .../lib/generated/models/NewTransaction.ts | 7 +- .../models/NewTransactionPosition.ts | 1 - .../lib/generated/models/PersonalAccount.ts | 3 +- .../generated/models/PreviewGroupPayload.ts | 1 - .../models/RecoverPasswordPayload.ts | 1 - .../lib/generated/models/RegisterPayload.ts | 3 +- .../lib/generated/models/RegisterResponse.ts | 1 - .../generated/models/RenameSessionPayload.ts | 1 - .../api/src/lib/generated/models/Session.ts | 3 +- .../api/src/lib/generated/models/Token.ts | 1 - .../src/lib/generated/models/Transaction.ts | 7 +- .../generated/models/TransactionPosition.ts | 1 - .../lib/generated/models/TransactionType.ts | 2 +- .../src/lib/generated/models/UpdateFile.ts | 1 - .../models/UpdateGroupMemberPayload.ts | 1 - .../models/UpdatePositionsPayload.ts | 3 +- .../lib/generated/models/UpdateTransaction.ts | 11 +- .../libs/api/src/lib/generated/models/User.ts | 3 +- .../lib/generated/models/ValidationError.ts | 3 +- .../lib/generated/models/VersionResponse.ts | 1 - frontend/libs/api/src/lib/generated/schema.ts | 3138 +++++++++-------- .../lib/generated/services/AccountsService.ts | 82 +- .../src/lib/generated/services/AuthService.ts | 168 +- .../lib/generated/services/CommonService.ts | 10 +- .../lib/generated/services/GroupsService.ts | 224 +- .../generated/services/TransactionsService.ts | 112 +- 58 files changed, 2002 insertions(+), 2124 deletions(-) diff --git a/abrechnung/core/decorators.py b/abrechnung/core/decorators.py index eba3799..c01beb8 100644 --- a/abrechnung/core/decorators.py +++ b/abrechnung/core/decorators.py @@ -1,5 +1,5 @@ from functools import wraps -from inspect import signature, Parameter +from inspect import Parameter, signature from typing import Awaitable, Callable, TypeVar from abrechnung.core.auth import check_group_permissions @@ -11,7 +11,9 @@ def _add_arg_to_signature(original_func, new_func, name: str, annotation): sig = signature(original_func) if name in sig.parameters: return - new_parameters = tuple(sig.parameters.values()) + (Parameter(name, kind=Parameter.KEYWORD_ONLY, annotation=annotation),) + new_parameters = tuple(sig.parameters.values()) + ( + Parameter(name, kind=Parameter.KEYWORD_ONLY, annotation=annotation), + ) sig = sig.replace(parameters=new_parameters) new_func.__signature__ = sig # type: ignore @@ -78,6 +80,7 @@ async def wrapper(*args, **kwargs): kwargs["group_id"] = group_id return await func(*args, **kwargs) + _add_arg_to_signature(func, wrapper, "group_id", int) return wrapper diff --git a/frontend/libs/api/src/lib/generated/Client.ts b/frontend/libs/api/src/lib/generated/Client.ts index 90ce597..62fde6a 100644 --- a/frontend/libs/api/src/lib/generated/Client.ts +++ b/frontend/libs/api/src/lib/generated/Client.ts @@ -2,14 +2,14 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -import type { BaseHttpRequest } from './core/BaseHttpRequest'; -import type { OpenAPIConfig } from './core/OpenAPI'; -import { FetchHttpRequest } from './core/FetchHttpRequest'; -import { AccountsService } from './services/AccountsService'; -import { AuthService } from './services/AuthService'; -import { CommonService } from './services/CommonService'; -import { GroupsService } from './services/GroupsService'; -import { TransactionsService } from './services/TransactionsService'; +import type { BaseHttpRequest } from "./core/BaseHttpRequest"; +import type { OpenAPIConfig } from "./core/OpenAPI"; +import { FetchHttpRequest } from "./core/FetchHttpRequest"; +import { AccountsService } from "./services/AccountsService"; +import { AuthService } from "./services/AuthService"; +import { CommonService } from "./services/CommonService"; +import { GroupsService } from "./services/GroupsService"; +import { TransactionsService } from "./services/TransactionsService"; type HttpRequestConstructor = new (config: OpenAPIConfig) => BaseHttpRequest; export class Client { public readonly accounts: AccountsService; @@ -20,10 +20,10 @@ export class Client { public readonly request: BaseHttpRequest; constructor(config?: Partial, HttpRequest: HttpRequestConstructor = FetchHttpRequest) { this.request = new HttpRequest({ - BASE: config?.BASE ?? '', - VERSION: config?.VERSION ?? '0.14.0', + BASE: config?.BASE ?? "", + VERSION: config?.VERSION ?? "0.14.0", WITH_CREDENTIALS: config?.WITH_CREDENTIALS ?? false, - CREDENTIALS: config?.CREDENTIALS ?? 'include', + CREDENTIALS: config?.CREDENTIALS ?? "include", TOKEN: config?.TOKEN, USERNAME: config?.USERNAME, PASSWORD: config?.PASSWORD, @@ -37,4 +37,3 @@ export class Client { this.transactions = new TransactionsService(this.request); } } - diff --git a/frontend/libs/api/src/lib/generated/core/ApiError.ts b/frontend/libs/api/src/lib/generated/core/ApiError.ts index ec7b16a..360272a 100644 --- a/frontend/libs/api/src/lib/generated/core/ApiError.ts +++ b/frontend/libs/api/src/lib/generated/core/ApiError.ts @@ -2,8 +2,8 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -import type { ApiRequestOptions } from './ApiRequestOptions'; -import type { ApiResult } from './ApiResult'; +import type { ApiRequestOptions } from "./ApiRequestOptions"; +import type { ApiResult } from "./ApiResult"; export class ApiError extends Error { public readonly url: string; @@ -15,7 +15,7 @@ export class ApiError extends Error { constructor(request: ApiRequestOptions, response: ApiResult, message: string) { super(message); - this.name = 'ApiError'; + this.name = "ApiError"; this.url = response.url; this.status = response.status; this.statusText = response.statusText; diff --git a/frontend/libs/api/src/lib/generated/core/ApiRequestOptions.ts b/frontend/libs/api/src/lib/generated/core/ApiRequestOptions.ts index 93143c3..b0f8271 100644 --- a/frontend/libs/api/src/lib/generated/core/ApiRequestOptions.ts +++ b/frontend/libs/api/src/lib/generated/core/ApiRequestOptions.ts @@ -3,7 +3,7 @@ /* tslint:disable */ /* eslint-disable */ export type ApiRequestOptions = { - readonly method: 'GET' | 'PUT' | 'POST' | 'DELETE' | 'OPTIONS' | 'HEAD' | 'PATCH'; + readonly method: "GET" | "PUT" | "POST" | "DELETE" | "OPTIONS" | "HEAD" | "PATCH"; readonly url: string; readonly path?: Record; readonly cookies?: Record; diff --git a/frontend/libs/api/src/lib/generated/core/BaseHttpRequest.ts b/frontend/libs/api/src/lib/generated/core/BaseHttpRequest.ts index 04aad6a..0fdd849 100644 --- a/frontend/libs/api/src/lib/generated/core/BaseHttpRequest.ts +++ b/frontend/libs/api/src/lib/generated/core/BaseHttpRequest.ts @@ -2,12 +2,11 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -import type { ApiRequestOptions } from './ApiRequestOptions'; -import type { CancelablePromise } from './CancelablePromise'; -import type { OpenAPIConfig } from './OpenAPI'; +import type { ApiRequestOptions } from "./ApiRequestOptions"; +import type { CancelablePromise } from "./CancelablePromise"; +import type { OpenAPIConfig } from "./OpenAPI"; export abstract class BaseHttpRequest { - constructor(public readonly config: OpenAPIConfig) {} public abstract request(options: ApiRequestOptions): CancelablePromise; diff --git a/frontend/libs/api/src/lib/generated/core/CancelablePromise.ts b/frontend/libs/api/src/lib/generated/core/CancelablePromise.ts index d70de92..183e413 100644 --- a/frontend/libs/api/src/lib/generated/core/CancelablePromise.ts +++ b/frontend/libs/api/src/lib/generated/core/CancelablePromise.ts @@ -3,10 +3,9 @@ /* tslint:disable */ /* eslint-disable */ export class CancelError extends Error { - constructor(message: string) { super(message); - this.name = 'CancelError'; + this.name = "CancelError"; } public get isCancelled(): boolean { @@ -69,15 +68,15 @@ export class CancelablePromise implements Promise { this.#cancelHandlers.push(cancelHandler); }; - Object.defineProperty(onCancel, 'isResolved', { + Object.defineProperty(onCancel, "isResolved", { get: (): boolean => this.#isResolved, }); - Object.defineProperty(onCancel, 'isRejected', { + Object.defineProperty(onCancel, "isRejected", { get: (): boolean => this.#isRejected, }); - Object.defineProperty(onCancel, 'isCancelled', { + Object.defineProperty(onCancel, "isCancelled", { get: (): boolean => this.#isCancelled, }); @@ -117,12 +116,12 @@ export class CancelablePromise implements Promise { cancelHandler(); } } catch (error) { - console.warn('Cancellation threw an error', error); + console.warn("Cancellation threw an error", error); return; } } this.#cancelHandlers.length = 0; - if (this.#reject) this.#reject(new CancelError('Request aborted')); + if (this.#reject) this.#reject(new CancelError("Request aborted")); } public get isCancelled(): boolean { diff --git a/frontend/libs/api/src/lib/generated/core/FetchHttpRequest.ts b/frontend/libs/api/src/lib/generated/core/FetchHttpRequest.ts index e58111a..eaf9466 100644 --- a/frontend/libs/api/src/lib/generated/core/FetchHttpRequest.ts +++ b/frontend/libs/api/src/lib/generated/core/FetchHttpRequest.ts @@ -2,14 +2,13 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -import type { ApiRequestOptions } from './ApiRequestOptions'; -import { BaseHttpRequest } from './BaseHttpRequest'; -import type { CancelablePromise } from './CancelablePromise'; -import type { OpenAPIConfig } from './OpenAPI'; -import { request as __request } from './request'; +import type { ApiRequestOptions } from "./ApiRequestOptions"; +import { BaseHttpRequest } from "./BaseHttpRequest"; +import type { CancelablePromise } from "./CancelablePromise"; +import type { OpenAPIConfig } from "./OpenAPI"; +import { request as __request } from "./request"; export class FetchHttpRequest extends BaseHttpRequest { - constructor(config: OpenAPIConfig) { super(config); } diff --git a/frontend/libs/api/src/lib/generated/core/OpenAPI.ts b/frontend/libs/api/src/lib/generated/core/OpenAPI.ts index 76e30d8..1731d2b 100644 --- a/frontend/libs/api/src/lib/generated/core/OpenAPI.ts +++ b/frontend/libs/api/src/lib/generated/core/OpenAPI.ts @@ -2,7 +2,7 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -import type { ApiRequestOptions } from './ApiRequestOptions'; +import type { ApiRequestOptions } from "./ApiRequestOptions"; type Resolver = (options: ApiRequestOptions) => Promise; type Headers = Record; @@ -11,7 +11,7 @@ export type OpenAPIConfig = { BASE: string; VERSION: string; WITH_CREDENTIALS: boolean; - CREDENTIALS: 'include' | 'omit' | 'same-origin'; + CREDENTIALS: "include" | "omit" | "same-origin"; TOKEN?: string | Resolver | undefined; USERNAME?: string | Resolver | undefined; PASSWORD?: string | Resolver | undefined; @@ -20,10 +20,10 @@ export type OpenAPIConfig = { }; export const OpenAPI: OpenAPIConfig = { - BASE: '', - VERSION: '0.14.0', + BASE: "", + VERSION: "0.14.0", WITH_CREDENTIALS: false, - CREDENTIALS: 'include', + CREDENTIALS: "include", TOKEN: undefined, USERNAME: undefined, PASSWORD: undefined, diff --git a/frontend/libs/api/src/lib/generated/core/request.ts b/frontend/libs/api/src/lib/generated/core/request.ts index f83d711..2ab4d6c 100644 --- a/frontend/libs/api/src/lib/generated/core/request.ts +++ b/frontend/libs/api/src/lib/generated/core/request.ts @@ -2,33 +2,33 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -import { ApiError } from './ApiError'; -import type { ApiRequestOptions } from './ApiRequestOptions'; -import type { ApiResult } from './ApiResult'; -import { CancelablePromise } from './CancelablePromise'; -import type { OnCancel } from './CancelablePromise'; -import type { OpenAPIConfig } from './OpenAPI'; +import { ApiError } from "./ApiError"; +import type { ApiRequestOptions } from "./ApiRequestOptions"; +import type { ApiResult } from "./ApiResult"; +import { CancelablePromise } from "./CancelablePromise"; +import type { OnCancel } from "./CancelablePromise"; +import type { OpenAPIConfig } from "./OpenAPI"; export const isDefined = (value: T | null | undefined): value is Exclude => { return value !== undefined && value !== null; }; export const isString = (value: any): value is string => { - return typeof value === 'string'; + return typeof value === "string"; }; export const isStringWithValue = (value: any): value is string => { - return isString(value) && value !== ''; + return isString(value) && value !== ""; }; export const isBlob = (value: any): value is Blob => { return ( - typeof value === 'object' && - typeof value.type === 'string' && - typeof value.stream === 'function' && - typeof value.arrayBuffer === 'function' && - typeof value.constructor === 'function' && - typeof value.constructor.name === 'string' && + typeof value === "object" && + typeof value.type === "string" && + typeof value.stream === "function" && + typeof value.arrayBuffer === "function" && + typeof value.constructor === "function" && + typeof value.constructor.name === "string" && /^(Blob|File)$/.test(value.constructor.name) && /^(Blob|File)$/.test(value[Symbol.toStringTag]) ); @@ -43,7 +43,7 @@ export const base64 = (str: string): string => { return btoa(str); } catch (err) { // @ts-ignore - return Buffer.from(str).toString('base64'); + return Buffer.from(str).toString("base64"); } }; @@ -57,10 +57,10 @@ export const getQueryString = (params: Record): string => { const process = (key: string, value: any) => { if (isDefined(value)) { if (Array.isArray(value)) { - value.forEach(v => { + value.forEach((v) => { process(key, v); }); - } else if (typeof value === 'object') { + } else if (typeof value === "object") { Object.entries(value).forEach(([k, v]) => { process(`${key}[${k}]`, v); }); @@ -75,17 +75,17 @@ export const getQueryString = (params: Record): string => { }); if (qs.length > 0) { - return `?${qs.join('&')}`; + return `?${qs.join("&")}`; } - return ''; + return ""; }; const getUrl = (config: OpenAPIConfig, options: ApiRequestOptions): string => { const encoder = config.ENCODE_PATH || encodeURI; const path = options.url - .replace('{api-version}', config.VERSION) + .replace("{api-version}", config.VERSION) .replace(/{(.*?)}/g, (substring: string, group: string) => { if (options.path?.hasOwnProperty(group)) { return encoder(String(options.path[group])); @@ -116,7 +116,7 @@ export const getFormData = (options: ApiRequestOptions): FormData | undefined => .filter(([_, value]) => isDefined(value)) .forEach(([key, value]) => { if (Array.isArray(value)) { - value.forEach(v => process(key, v)); + value.forEach((v) => process(key, v)); } else { process(key, value); } @@ -130,7 +130,7 @@ export const getFormData = (options: ApiRequestOptions): FormData | undefined => type Resolver = (options: ApiRequestOptions) => Promise; export const resolve = async (options: ApiRequestOptions, resolver?: T | Resolver): Promise => { - if (typeof resolver === 'function') { + if (typeof resolver === "function") { return (resolver as Resolver)(options); } return resolver; @@ -145,34 +145,37 @@ export const getHeaders = async (config: OpenAPIConfig, options: ApiRequestOptio ]); const headers = Object.entries({ - Accept: 'application/json', + Accept: "application/json", ...additionalHeaders, ...options.headers, }) .filter(([_, value]) => isDefined(value)) - .reduce((headers, [key, value]) => ({ - ...headers, - [key]: String(value), - }), {} as Record); + .reduce( + (headers, [key, value]) => ({ + ...headers, + [key]: String(value), + }), + {} as Record + ); if (isStringWithValue(token)) { - headers['Authorization'] = `Bearer ${token}`; + headers["Authorization"] = `Bearer ${token}`; } if (isStringWithValue(username) && isStringWithValue(password)) { const credentials = base64(`${username}:${password}`); - headers['Authorization'] = `Basic ${credentials}`; + headers["Authorization"] = `Basic ${credentials}`; } if (options.body !== undefined) { if (options.mediaType) { - headers['Content-Type'] = options.mediaType; + headers["Content-Type"] = options.mediaType; } else if (isBlob(options.body)) { - headers['Content-Type'] = options.body.type || 'application/octet-stream'; + headers["Content-Type"] = options.body.type || "application/octet-stream"; } else if (isString(options.body)) { - headers['Content-Type'] = 'text/plain'; + headers["Content-Type"] = "text/plain"; } else if (!isFormData(options.body)) { - headers['Content-Type'] = 'application/json'; + headers["Content-Type"] = "application/json"; } } @@ -181,8 +184,8 @@ export const getHeaders = async (config: OpenAPIConfig, options: ApiRequestOptio export const getRequestBody = (options: ApiRequestOptions): any => { if (options.body !== undefined) { - if (options.mediaType?.includes('/json')) { - return JSON.stringify(options.body) + if (options.mediaType?.includes("/json")) { + return JSON.stringify(options.body); } else if (isString(options.body) || isBlob(options.body) || isFormData(options.body)) { return options.body; } else { @@ -232,10 +235,10 @@ export const getResponseHeader = (response: Response, responseHeader?: string): export const getResponseBody = async (response: Response): Promise => { if (response.status !== 204) { try { - const contentType = response.headers.get('Content-Type'); + const contentType = response.headers.get("Content-Type"); if (contentType) { - const jsonTypes = ['application/json', 'application/problem+json'] - const isJSON = jsonTypes.some(type => contentType.toLowerCase().startsWith(type)); + const jsonTypes = ["application/json", "application/problem+json"]; + const isJSON = jsonTypes.some((type) => contentType.toLowerCase().startsWith(type)); if (isJSON) { return await response.json(); } else { @@ -251,15 +254,15 @@ export const getResponseBody = async (response: Response): Promise => { export const catchErrorCodes = (options: ApiRequestOptions, result: ApiResult): void => { const errors: Record = { - 400: 'Bad Request', - 401: 'Unauthorized', - 403: 'Forbidden', - 404: 'Not Found', - 500: 'Internal Server Error', - 502: 'Bad Gateway', - 503: 'Service Unavailable', + 400: "Bad Request", + 401: "Unauthorized", + 403: "Forbidden", + 404: "Not Found", + 500: "Internal Server Error", + 502: "Bad Gateway", + 503: "Service Unavailable", ...options.errors, - } + }; const error = errors[result.status]; if (error) { @@ -267,8 +270,8 @@ export const catchErrorCodes = (options: ApiRequestOptions, result: ApiResult): } if (!result.ok) { - const errorStatus = result.status ?? 'unknown'; - const errorStatusText = result.statusText ?? 'unknown'; + const errorStatus = result.status ?? "unknown"; + const errorStatusText = result.statusText ?? "unknown"; const errorBody = (() => { try { return JSON.stringify(result.body, null, 2); @@ -277,7 +280,9 @@ export const catchErrorCodes = (options: ApiRequestOptions, result: ApiResult): } })(); - throw new ApiError(options, result, + throw new ApiError( + options, + result, `Generic Error: status: ${errorStatus}; status text: ${errorStatusText}; body: ${errorBody}` ); } diff --git a/frontend/libs/api/src/lib/generated/index.ts b/frontend/libs/api/src/lib/generated/index.ts index 1f94b39..2ec668a 100644 --- a/frontend/libs/api/src/lib/generated/index.ts +++ b/frontend/libs/api/src/lib/generated/index.ts @@ -2,59 +2,59 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -export { Client } from './Client'; +export { Client } from "./Client"; -export { ApiError } from './core/ApiError'; -export { BaseHttpRequest } from './core/BaseHttpRequest'; -export { CancelablePromise, CancelError } from './core/CancelablePromise'; -export { OpenAPI } from './core/OpenAPI'; -export type { OpenAPIConfig } from './core/OpenAPI'; +export { ApiError } from "./core/ApiError"; +export { BaseHttpRequest } from "./core/BaseHttpRequest"; +export { CancelablePromise, CancelError } from "./core/CancelablePromise"; +export { OpenAPI } from "./core/OpenAPI"; +export type { OpenAPIConfig } from "./core/OpenAPI"; -export type { AccountType } from './models/AccountType'; -export type { Body_get_token } from './models/Body_get_token'; -export type { ChangeEmailPayload } from './models/ChangeEmailPayload'; -export type { ChangePasswordPayload } from './models/ChangePasswordPayload'; -export type { ClearingAccount } from './models/ClearingAccount'; -export type { ConfirmEmailChangePayload } from './models/ConfirmEmailChangePayload'; -export type { ConfirmPasswordRecoveryPayload } from './models/ConfirmPasswordRecoveryPayload'; -export type { ConfirmRegistrationPayload } from './models/ConfirmRegistrationPayload'; -export type { CreateInvitePayload } from './models/CreateInvitePayload'; -export type { DeleteSessionPayload } from './models/DeleteSessionPayload'; -export type { FileAttachment } from './models/FileAttachment'; -export type { Group } from './models/Group'; -export type { GroupInvite } from './models/GroupInvite'; -export type { GroupLog } from './models/GroupLog'; -export type { GroupMember } from './models/GroupMember'; -export type { GroupMessage } from './models/GroupMessage'; -export type { GroupPayload } from './models/GroupPayload'; -export type { GroupPreview } from './models/GroupPreview'; -export type { HTTPValidationError } from './models/HTTPValidationError'; -export type { LoginPayload } from './models/LoginPayload'; -export type { NewAccount } from './models/NewAccount'; -export type { NewFile } from './models/NewFile'; -export type { NewTransaction } from './models/NewTransaction'; -export type { NewTransactionPosition } from './models/NewTransactionPosition'; -export type { PersonalAccount } from './models/PersonalAccount'; -export type { PreviewGroupPayload } from './models/PreviewGroupPayload'; -export type { RecoverPasswordPayload } from './models/RecoverPasswordPayload'; -export type { RegisterPayload } from './models/RegisterPayload'; -export type { RegisterResponse } from './models/RegisterResponse'; -export type { RenameSessionPayload } from './models/RenameSessionPayload'; -export type { Session } from './models/Session'; -export type { Token } from './models/Token'; -export type { Transaction } from './models/Transaction'; -export type { TransactionPosition } from './models/TransactionPosition'; -export type { TransactionType } from './models/TransactionType'; -export type { UpdateFile } from './models/UpdateFile'; -export type { UpdateGroupMemberPayload } from './models/UpdateGroupMemberPayload'; -export type { UpdatePositionsPayload } from './models/UpdatePositionsPayload'; -export type { UpdateTransaction } from './models/UpdateTransaction'; -export type { User } from './models/User'; -export type { ValidationError } from './models/ValidationError'; -export type { VersionResponse } from './models/VersionResponse'; +export type { AccountType } from "./models/AccountType"; +export type { Body_get_token } from "./models/Body_get_token"; +export type { ChangeEmailPayload } from "./models/ChangeEmailPayload"; +export type { ChangePasswordPayload } from "./models/ChangePasswordPayload"; +export type { ClearingAccount } from "./models/ClearingAccount"; +export type { ConfirmEmailChangePayload } from "./models/ConfirmEmailChangePayload"; +export type { ConfirmPasswordRecoveryPayload } from "./models/ConfirmPasswordRecoveryPayload"; +export type { ConfirmRegistrationPayload } from "./models/ConfirmRegistrationPayload"; +export type { CreateInvitePayload } from "./models/CreateInvitePayload"; +export type { DeleteSessionPayload } from "./models/DeleteSessionPayload"; +export type { FileAttachment } from "./models/FileAttachment"; +export type { Group } from "./models/Group"; +export type { GroupInvite } from "./models/GroupInvite"; +export type { GroupLog } from "./models/GroupLog"; +export type { GroupMember } from "./models/GroupMember"; +export type { GroupMessage } from "./models/GroupMessage"; +export type { GroupPayload } from "./models/GroupPayload"; +export type { GroupPreview } from "./models/GroupPreview"; +export type { HTTPValidationError } from "./models/HTTPValidationError"; +export type { LoginPayload } from "./models/LoginPayload"; +export type { NewAccount } from "./models/NewAccount"; +export type { NewFile } from "./models/NewFile"; +export type { NewTransaction } from "./models/NewTransaction"; +export type { NewTransactionPosition } from "./models/NewTransactionPosition"; +export type { PersonalAccount } from "./models/PersonalAccount"; +export type { PreviewGroupPayload } from "./models/PreviewGroupPayload"; +export type { RecoverPasswordPayload } from "./models/RecoverPasswordPayload"; +export type { RegisterPayload } from "./models/RegisterPayload"; +export type { RegisterResponse } from "./models/RegisterResponse"; +export type { RenameSessionPayload } from "./models/RenameSessionPayload"; +export type { Session } from "./models/Session"; +export type { Token } from "./models/Token"; +export type { Transaction } from "./models/Transaction"; +export type { TransactionPosition } from "./models/TransactionPosition"; +export type { TransactionType } from "./models/TransactionType"; +export type { UpdateFile } from "./models/UpdateFile"; +export type { UpdateGroupMemberPayload } from "./models/UpdateGroupMemberPayload"; +export type { UpdatePositionsPayload } from "./models/UpdatePositionsPayload"; +export type { UpdateTransaction } from "./models/UpdateTransaction"; +export type { User } from "./models/User"; +export type { ValidationError } from "./models/ValidationError"; +export type { VersionResponse } from "./models/VersionResponse"; -export { AccountsService } from './services/AccountsService'; -export { AuthService } from './services/AuthService'; -export { CommonService } from './services/CommonService'; -export { GroupsService } from './services/GroupsService'; -export { TransactionsService } from './services/TransactionsService'; +export { AccountsService } from "./services/AccountsService"; +export { AuthService } from "./services/AuthService"; +export { CommonService } from "./services/CommonService"; +export { GroupsService } from "./services/GroupsService"; +export { TransactionsService } from "./services/TransactionsService"; diff --git a/frontend/libs/api/src/lib/generated/models/AccountType.ts b/frontend/libs/api/src/lib/generated/models/AccountType.ts index 63dd523..0ac44cc 100644 --- a/frontend/libs/api/src/lib/generated/models/AccountType.ts +++ b/frontend/libs/api/src/lib/generated/models/AccountType.ts @@ -2,4 +2,4 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -export type AccountType = 'personal' | 'clearing'; +export type AccountType = "personal" | "clearing"; diff --git a/frontend/libs/api/src/lib/generated/models/Body_get_token.ts b/frontend/libs/api/src/lib/generated/models/Body_get_token.ts index 7ab1d61..3c5cc6d 100644 --- a/frontend/libs/api/src/lib/generated/models/Body_get_token.ts +++ b/frontend/libs/api/src/lib/generated/models/Body_get_token.ts @@ -3,11 +3,10 @@ /* tslint:disable */ /* eslint-disable */ export type Body_get_token = { - grant_type?: (string | null); + grant_type?: string | null; username: string; password: string; scope?: string; - client_id?: (string | null); - client_secret?: (string | null); + client_id?: string | null; + client_secret?: string | null; }; - diff --git a/frontend/libs/api/src/lib/generated/models/ChangeEmailPayload.ts b/frontend/libs/api/src/lib/generated/models/ChangeEmailPayload.ts index 21c9bf3..a30e8ba 100644 --- a/frontend/libs/api/src/lib/generated/models/ChangeEmailPayload.ts +++ b/frontend/libs/api/src/lib/generated/models/ChangeEmailPayload.ts @@ -6,4 +6,3 @@ export type ChangeEmailPayload = { email: string; password: string; }; - diff --git a/frontend/libs/api/src/lib/generated/models/ChangePasswordPayload.ts b/frontend/libs/api/src/lib/generated/models/ChangePasswordPayload.ts index bffab57..3cabe26 100644 --- a/frontend/libs/api/src/lib/generated/models/ChangePasswordPayload.ts +++ b/frontend/libs/api/src/lib/generated/models/ChangePasswordPayload.ts @@ -6,4 +6,3 @@ export type ChangePasswordPayload = { new_password: string; old_password: string; }; - diff --git a/frontend/libs/api/src/lib/generated/models/ClearingAccount.ts b/frontend/libs/api/src/lib/generated/models/ClearingAccount.ts index 21f6739..02d643d 100644 --- a/frontend/libs/api/src/lib/generated/models/ClearingAccount.ts +++ b/frontend/libs/api/src/lib/generated/models/ClearingAccount.ts @@ -14,4 +14,3 @@ export type ClearingAccount = { last_changed: string; deleted: boolean; }; - diff --git a/frontend/libs/api/src/lib/generated/models/ConfirmEmailChangePayload.ts b/frontend/libs/api/src/lib/generated/models/ConfirmEmailChangePayload.ts index ad09f94..b358324 100644 --- a/frontend/libs/api/src/lib/generated/models/ConfirmEmailChangePayload.ts +++ b/frontend/libs/api/src/lib/generated/models/ConfirmEmailChangePayload.ts @@ -5,4 +5,3 @@ export type ConfirmEmailChangePayload = { token: string; }; - diff --git a/frontend/libs/api/src/lib/generated/models/ConfirmPasswordRecoveryPayload.ts b/frontend/libs/api/src/lib/generated/models/ConfirmPasswordRecoveryPayload.ts index 64d4a5c..bddaf8f 100644 --- a/frontend/libs/api/src/lib/generated/models/ConfirmPasswordRecoveryPayload.ts +++ b/frontend/libs/api/src/lib/generated/models/ConfirmPasswordRecoveryPayload.ts @@ -6,4 +6,3 @@ export type ConfirmPasswordRecoveryPayload = { token: string; new_password: string; }; - diff --git a/frontend/libs/api/src/lib/generated/models/ConfirmRegistrationPayload.ts b/frontend/libs/api/src/lib/generated/models/ConfirmRegistrationPayload.ts index 6970d70..f3f810d 100644 --- a/frontend/libs/api/src/lib/generated/models/ConfirmRegistrationPayload.ts +++ b/frontend/libs/api/src/lib/generated/models/ConfirmRegistrationPayload.ts @@ -5,4 +5,3 @@ export type ConfirmRegistrationPayload = { token: string; }; - diff --git a/frontend/libs/api/src/lib/generated/models/CreateInvitePayload.ts b/frontend/libs/api/src/lib/generated/models/CreateInvitePayload.ts index 94d4b11..ed62e6f 100644 --- a/frontend/libs/api/src/lib/generated/models/CreateInvitePayload.ts +++ b/frontend/libs/api/src/lib/generated/models/CreateInvitePayload.ts @@ -8,4 +8,3 @@ export type CreateInvitePayload = { join_as_editor: boolean; valid_until: string; }; - diff --git a/frontend/libs/api/src/lib/generated/models/DeleteSessionPayload.ts b/frontend/libs/api/src/lib/generated/models/DeleteSessionPayload.ts index 34fbafd..0f467af 100644 --- a/frontend/libs/api/src/lib/generated/models/DeleteSessionPayload.ts +++ b/frontend/libs/api/src/lib/generated/models/DeleteSessionPayload.ts @@ -5,4 +5,3 @@ export type DeleteSessionPayload = { session_id: number; }; - diff --git a/frontend/libs/api/src/lib/generated/models/FileAttachment.ts b/frontend/libs/api/src/lib/generated/models/FileAttachment.ts index 15b949a..cf59e5a 100644 --- a/frontend/libs/api/src/lib/generated/models/FileAttachment.ts +++ b/frontend/libs/api/src/lib/generated/models/FileAttachment.ts @@ -5,9 +5,8 @@ export type FileAttachment = { id: number; filename: string; - blob_id: (number | null); - mime_type: (string | null); - host_url?: (string | null); + blob_id: number | null; + mime_type: string | null; + host_url?: string | null; deleted: boolean; }; - diff --git a/frontend/libs/api/src/lib/generated/models/Group.ts b/frontend/libs/api/src/lib/generated/models/Group.ts index 7409c7c..f081524 100644 --- a/frontend/libs/api/src/lib/generated/models/Group.ts +++ b/frontend/libs/api/src/lib/generated/models/Group.ts @@ -14,4 +14,3 @@ export type Group = { last_changed: string; archived: boolean; }; - diff --git a/frontend/libs/api/src/lib/generated/models/GroupInvite.ts b/frontend/libs/api/src/lib/generated/models/GroupInvite.ts index ed8164e..d0eb40f 100644 --- a/frontend/libs/api/src/lib/generated/models/GroupInvite.ts +++ b/frontend/libs/api/src/lib/generated/models/GroupInvite.ts @@ -5,10 +5,9 @@ export type GroupInvite = { id: number; created_by: number; - token: (string | null); + token: string | null; single_use: boolean; join_as_editor: boolean; description: string; valid_until: string; }; - diff --git a/frontend/libs/api/src/lib/generated/models/GroupLog.ts b/frontend/libs/api/src/lib/generated/models/GroupLog.ts index cb6aa8f..9165fae 100644 --- a/frontend/libs/api/src/lib/generated/models/GroupLog.ts +++ b/frontend/libs/api/src/lib/generated/models/GroupLog.ts @@ -8,6 +8,5 @@ export type GroupLog = { logged_at: string; type: string; message: string; - affected: (number | null); + affected: number | null; }; - diff --git a/frontend/libs/api/src/lib/generated/models/GroupMember.ts b/frontend/libs/api/src/lib/generated/models/GroupMember.ts index a982c1d..8ca5547 100644 --- a/frontend/libs/api/src/lib/generated/models/GroupMember.ts +++ b/frontend/libs/api/src/lib/generated/models/GroupMember.ts @@ -9,6 +9,5 @@ export type GroupMember = { can_write: boolean; description: string; joined_at: string; - invited_by: (number | null); + invited_by: number | null; }; - diff --git a/frontend/libs/api/src/lib/generated/models/GroupMessage.ts b/frontend/libs/api/src/lib/generated/models/GroupMessage.ts index 2548d76..7e3e0f7 100644 --- a/frontend/libs/api/src/lib/generated/models/GroupMessage.ts +++ b/frontend/libs/api/src/lib/generated/models/GroupMessage.ts @@ -5,4 +5,3 @@ export type GroupMessage = { message: string; }; - diff --git a/frontend/libs/api/src/lib/generated/models/GroupPayload.ts b/frontend/libs/api/src/lib/generated/models/GroupPayload.ts index f35e3f1..bf67014 100644 --- a/frontend/libs/api/src/lib/generated/models/GroupPayload.ts +++ b/frontend/libs/api/src/lib/generated/models/GroupPayload.ts @@ -9,4 +9,3 @@ export type GroupPayload = { add_user_account_on_join?: boolean; terms?: string; }; - diff --git a/frontend/libs/api/src/lib/generated/models/GroupPreview.ts b/frontend/libs/api/src/lib/generated/models/GroupPreview.ts index 3ce1da7..542f852 100644 --- a/frontend/libs/api/src/lib/generated/models/GroupPreview.ts +++ b/frontend/libs/api/src/lib/generated/models/GroupPreview.ts @@ -13,4 +13,3 @@ export type GroupPreview = { invite_valid_until: string; invite_description: string; }; - diff --git a/frontend/libs/api/src/lib/generated/models/HTTPValidationError.ts b/frontend/libs/api/src/lib/generated/models/HTTPValidationError.ts index f9b1a79..b167d69 100644 --- a/frontend/libs/api/src/lib/generated/models/HTTPValidationError.ts +++ b/frontend/libs/api/src/lib/generated/models/HTTPValidationError.ts @@ -2,8 +2,7 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -import type { ValidationError } from './ValidationError'; +import type { ValidationError } from "./ValidationError"; export type HTTPValidationError = { detail?: Array; }; - diff --git a/frontend/libs/api/src/lib/generated/models/LoginPayload.ts b/frontend/libs/api/src/lib/generated/models/LoginPayload.ts index 035ef4e..bd116b7 100644 --- a/frontend/libs/api/src/lib/generated/models/LoginPayload.ts +++ b/frontend/libs/api/src/lib/generated/models/LoginPayload.ts @@ -7,4 +7,3 @@ export type LoginPayload = { password: string; session_name: string; }; - diff --git a/frontend/libs/api/src/lib/generated/models/NewAccount.ts b/frontend/libs/api/src/lib/generated/models/NewAccount.ts index 146d98d..269eb2e 100644 --- a/frontend/libs/api/src/lib/generated/models/NewAccount.ts +++ b/frontend/libs/api/src/lib/generated/models/NewAccount.ts @@ -2,15 +2,14 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -import type { AccountType } from './AccountType'; +import type { AccountType } from "./AccountType"; export type NewAccount = { type: AccountType; name: string; description?: string; - owning_user_id?: (number | null); - date_info?: (string | null); + owning_user_id?: number | null; + date_info?: string | null; deleted?: boolean; tags?: Array; clearing_shares?: Record; }; - diff --git a/frontend/libs/api/src/lib/generated/models/NewFile.ts b/frontend/libs/api/src/lib/generated/models/NewFile.ts index 53c8afc..ab89d5f 100644 --- a/frontend/libs/api/src/lib/generated/models/NewFile.ts +++ b/frontend/libs/api/src/lib/generated/models/NewFile.ts @@ -7,4 +7,3 @@ export type NewFile = { mime_type: string; content: string; }; - diff --git a/frontend/libs/api/src/lib/generated/models/NewTransaction.ts b/frontend/libs/api/src/lib/generated/models/NewTransaction.ts index ee0e5e2..708ed14 100644 --- a/frontend/libs/api/src/lib/generated/models/NewTransaction.ts +++ b/frontend/libs/api/src/lib/generated/models/NewTransaction.ts @@ -2,9 +2,9 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -import type { NewFile } from './NewFile'; -import type { NewTransactionPosition } from './NewTransactionPosition'; -import type { TransactionType } from './TransactionType'; +import type { NewFile } from "./NewFile"; +import type { NewTransactionPosition } from "./NewTransactionPosition"; +import type { TransactionType } from "./TransactionType"; export type NewTransaction = { type: TransactionType; name: string; @@ -19,4 +19,3 @@ export type NewTransaction = { new_files?: Array; new_positions?: Array; }; - diff --git a/frontend/libs/api/src/lib/generated/models/NewTransactionPosition.ts b/frontend/libs/api/src/lib/generated/models/NewTransactionPosition.ts index 99ad220..9c80676 100644 --- a/frontend/libs/api/src/lib/generated/models/NewTransactionPosition.ts +++ b/frontend/libs/api/src/lib/generated/models/NewTransactionPosition.ts @@ -8,4 +8,3 @@ export type NewTransactionPosition = { communist_shares: number; usages: Record; }; - diff --git a/frontend/libs/api/src/lib/generated/models/PersonalAccount.ts b/frontend/libs/api/src/lib/generated/models/PersonalAccount.ts index 148b7cc..3324c44 100644 --- a/frontend/libs/api/src/lib/generated/models/PersonalAccount.ts +++ b/frontend/libs/api/src/lib/generated/models/PersonalAccount.ts @@ -8,8 +8,7 @@ export type PersonalAccount = { type: "personal"; name: string; description: string; - owning_user_id: (number | null); + owning_user_id: number | null; deleted: boolean; last_changed: string; }; - diff --git a/frontend/libs/api/src/lib/generated/models/PreviewGroupPayload.ts b/frontend/libs/api/src/lib/generated/models/PreviewGroupPayload.ts index a5cb699..97917d4 100644 --- a/frontend/libs/api/src/lib/generated/models/PreviewGroupPayload.ts +++ b/frontend/libs/api/src/lib/generated/models/PreviewGroupPayload.ts @@ -5,4 +5,3 @@ export type PreviewGroupPayload = { invite_token: string; }; - diff --git a/frontend/libs/api/src/lib/generated/models/RecoverPasswordPayload.ts b/frontend/libs/api/src/lib/generated/models/RecoverPasswordPayload.ts index 0ac385d..5067e61 100644 --- a/frontend/libs/api/src/lib/generated/models/RecoverPasswordPayload.ts +++ b/frontend/libs/api/src/lib/generated/models/RecoverPasswordPayload.ts @@ -5,4 +5,3 @@ export type RecoverPasswordPayload = { email: string; }; - diff --git a/frontend/libs/api/src/lib/generated/models/RegisterPayload.ts b/frontend/libs/api/src/lib/generated/models/RegisterPayload.ts index 81ec193..45de331 100644 --- a/frontend/libs/api/src/lib/generated/models/RegisterPayload.ts +++ b/frontend/libs/api/src/lib/generated/models/RegisterPayload.ts @@ -6,6 +6,5 @@ export type RegisterPayload = { username: string; password: string; email: string; - invite_token?: (string | null); + invite_token?: string | null; }; - diff --git a/frontend/libs/api/src/lib/generated/models/RegisterResponse.ts b/frontend/libs/api/src/lib/generated/models/RegisterResponse.ts index 1d6a4e9..fa5499b 100644 --- a/frontend/libs/api/src/lib/generated/models/RegisterResponse.ts +++ b/frontend/libs/api/src/lib/generated/models/RegisterResponse.ts @@ -5,4 +5,3 @@ export type RegisterResponse = { user_id: number; }; - diff --git a/frontend/libs/api/src/lib/generated/models/RenameSessionPayload.ts b/frontend/libs/api/src/lib/generated/models/RenameSessionPayload.ts index 5a3e2a1..51c1ed0 100644 --- a/frontend/libs/api/src/lib/generated/models/RenameSessionPayload.ts +++ b/frontend/libs/api/src/lib/generated/models/RenameSessionPayload.ts @@ -6,4 +6,3 @@ export type RenameSessionPayload = { session_id: number; name: string; }; - diff --git a/frontend/libs/api/src/lib/generated/models/Session.ts b/frontend/libs/api/src/lib/generated/models/Session.ts index 1bb0dea..d3782fa 100644 --- a/frontend/libs/api/src/lib/generated/models/Session.ts +++ b/frontend/libs/api/src/lib/generated/models/Session.ts @@ -5,7 +5,6 @@ export type Session = { id: number; name: string; - valid_until: (string | null); + valid_until: string | null; last_seen: string; }; - diff --git a/frontend/libs/api/src/lib/generated/models/Token.ts b/frontend/libs/api/src/lib/generated/models/Token.ts index e4dcb7c..f04a8f2 100644 --- a/frontend/libs/api/src/lib/generated/models/Token.ts +++ b/frontend/libs/api/src/lib/generated/models/Token.ts @@ -6,4 +6,3 @@ export type Token = { user_id: number; access_token: string; }; - diff --git a/frontend/libs/api/src/lib/generated/models/Transaction.ts b/frontend/libs/api/src/lib/generated/models/Transaction.ts index fd305df..968be7c 100644 --- a/frontend/libs/api/src/lib/generated/models/Transaction.ts +++ b/frontend/libs/api/src/lib/generated/models/Transaction.ts @@ -2,9 +2,9 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -import type { FileAttachment } from './FileAttachment'; -import type { TransactionPosition } from './TransactionPosition'; -import type { TransactionType } from './TransactionType'; +import type { FileAttachment } from "./FileAttachment"; +import type { TransactionPosition } from "./TransactionPosition"; +import type { TransactionType } from "./TransactionType"; export type Transaction = { id: number; group_id: number; @@ -23,4 +23,3 @@ export type Transaction = { positions: Array; files: Array; }; - diff --git a/frontend/libs/api/src/lib/generated/models/TransactionPosition.ts b/frontend/libs/api/src/lib/generated/models/TransactionPosition.ts index d63eacf..19de25d 100644 --- a/frontend/libs/api/src/lib/generated/models/TransactionPosition.ts +++ b/frontend/libs/api/src/lib/generated/models/TransactionPosition.ts @@ -10,4 +10,3 @@ export type TransactionPosition = { id: number; deleted: boolean; }; - diff --git a/frontend/libs/api/src/lib/generated/models/TransactionType.ts b/frontend/libs/api/src/lib/generated/models/TransactionType.ts index 53631cd..092320b 100644 --- a/frontend/libs/api/src/lib/generated/models/TransactionType.ts +++ b/frontend/libs/api/src/lib/generated/models/TransactionType.ts @@ -2,4 +2,4 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -export type TransactionType = 'mimo' | 'purchase' | 'transfer'; +export type TransactionType = "mimo" | "purchase" | "transfer"; diff --git a/frontend/libs/api/src/lib/generated/models/UpdateFile.ts b/frontend/libs/api/src/lib/generated/models/UpdateFile.ts index 226ff3a..9051046 100644 --- a/frontend/libs/api/src/lib/generated/models/UpdateFile.ts +++ b/frontend/libs/api/src/lib/generated/models/UpdateFile.ts @@ -7,4 +7,3 @@ export type UpdateFile = { filename: string; deleted: boolean; }; - diff --git a/frontend/libs/api/src/lib/generated/models/UpdateGroupMemberPayload.ts b/frontend/libs/api/src/lib/generated/models/UpdateGroupMemberPayload.ts index ff21e66..975f60e 100644 --- a/frontend/libs/api/src/lib/generated/models/UpdateGroupMemberPayload.ts +++ b/frontend/libs/api/src/lib/generated/models/UpdateGroupMemberPayload.ts @@ -7,4 +7,3 @@ export type UpdateGroupMemberPayload = { can_write: boolean; is_owner: boolean; }; - diff --git a/frontend/libs/api/src/lib/generated/models/UpdatePositionsPayload.ts b/frontend/libs/api/src/lib/generated/models/UpdatePositionsPayload.ts index f53a37f..693790c 100644 --- a/frontend/libs/api/src/lib/generated/models/UpdatePositionsPayload.ts +++ b/frontend/libs/api/src/lib/generated/models/UpdatePositionsPayload.ts @@ -2,8 +2,7 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -import type { TransactionPosition } from './TransactionPosition'; +import type { TransactionPosition } from "./TransactionPosition"; export type UpdatePositionsPayload = { positions: Array; }; - diff --git a/frontend/libs/api/src/lib/generated/models/UpdateTransaction.ts b/frontend/libs/api/src/lib/generated/models/UpdateTransaction.ts index e5cb822..1ad82ef 100644 --- a/frontend/libs/api/src/lib/generated/models/UpdateTransaction.ts +++ b/frontend/libs/api/src/lib/generated/models/UpdateTransaction.ts @@ -2,11 +2,11 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -import type { NewFile } from './NewFile'; -import type { NewTransactionPosition } from './NewTransactionPosition'; -import type { TransactionPosition } from './TransactionPosition'; -import type { TransactionType } from './TransactionType'; -import type { UpdateFile } from './UpdateFile'; +import type { NewFile } from "./NewFile"; +import type { NewTransactionPosition } from "./NewTransactionPosition"; +import type { TransactionPosition } from "./TransactionPosition"; +import type { TransactionType } from "./TransactionType"; +import type { UpdateFile } from "./UpdateFile"; export type UpdateTransaction = { type: TransactionType; name: string; @@ -23,4 +23,3 @@ export type UpdateTransaction = { changed_files?: Array; changed_positions?: Array; }; - diff --git a/frontend/libs/api/src/lib/generated/models/User.ts b/frontend/libs/api/src/lib/generated/models/User.ts index 31df3aa..34a2b04 100644 --- a/frontend/libs/api/src/lib/generated/models/User.ts +++ b/frontend/libs/api/src/lib/generated/models/User.ts @@ -2,7 +2,7 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -import type { Session } from './Session'; +import type { Session } from "./Session"; export type User = { id: number; username: string; @@ -13,4 +13,3 @@ export type User = { sessions: Array; is_guest_user: boolean; }; - diff --git a/frontend/libs/api/src/lib/generated/models/ValidationError.ts b/frontend/libs/api/src/lib/generated/models/ValidationError.ts index aaf1c92..64d6a72 100644 --- a/frontend/libs/api/src/lib/generated/models/ValidationError.ts +++ b/frontend/libs/api/src/lib/generated/models/ValidationError.ts @@ -3,8 +3,7 @@ /* tslint:disable */ /* eslint-disable */ export type ValidationError = { - loc: Array<(string | number)>; + loc: Array; msg: string; type: string; }; - diff --git a/frontend/libs/api/src/lib/generated/models/VersionResponse.ts b/frontend/libs/api/src/lib/generated/models/VersionResponse.ts index 7e1ba3d..3647645 100644 --- a/frontend/libs/api/src/lib/generated/models/VersionResponse.ts +++ b/frontend/libs/api/src/lib/generated/models/VersionResponse.ts @@ -8,4 +8,3 @@ export type VersionResponse = { minor_version: number; patch_version: number; }; - diff --git a/frontend/libs/api/src/lib/generated/schema.ts b/frontend/libs/api/src/lib/generated/schema.ts index a866219..732c6e7 100644 --- a/frontend/libs/api/src/lib/generated/schema.ts +++ b/frontend/libs/api/src/lib/generated/schema.ts @@ -6,1573 +6,1587 @@ * Do not make direct changes to the file. */ - -import { z } from 'zod'; +import { z } from "zod"; export namespace components.schemas { - /** - * AccountType - * @enum {string} - */ - export const AccountType = z.enum(["personal", "clearing"]); - /** Body_get_token */ - export const Body_get_token = z.object({ - grant_type: z.union([z.string(), z.null()]).optional(), - username: z.string(), - password: z.string(), - scope: z.string().optional(), - client_id: z.union([z.string(), z.null()]).optional(), - client_secret: z.union([z.string(), z.null()]).optional(), - }); - /** ChangeEmailPayload */ - export const ChangeEmailPayload = z.object({ - email: z.string(), - password: z.string(), - }); - /** ChangePasswordPayload */ - export const ChangePasswordPayload = z.object({ - new_password: z.string(), - old_password: z.string(), - }); - /** ClearingAccount */ - export const ClearingAccount = z.object({ - id: z.number().int(), - group_id: z.number().int(), - type: z.literal("clearing"), - name: z.string(), - description: z.string(), - date_info: z.string(), - tags: z.array(z.string()), - clearing_shares: z.record(z.number()), - last_changed: z.string(), - deleted: z.boolean(), - }); - /** ConfirmEmailChangePayload */ - export const ConfirmEmailChangePayload = z.object({ - token: z.string(), - }); - /** ConfirmPasswordRecoveryPayload */ - export const ConfirmPasswordRecoveryPayload = z.object({ - token: z.string(), - new_password: z.string(), - }); - /** ConfirmRegistrationPayload */ - export const ConfirmRegistrationPayload = z.object({ - token: z.string(), - }); - /** CreateInvitePayload */ - export const CreateInvitePayload = z.object({ - description: z.string(), - single_use: z.boolean(), - join_as_editor: z.boolean(), - valid_until: z.string(), - }); - /** DeleteSessionPayload */ - export const DeleteSessionPayload = z.object({ - session_id: z.number().int(), - }); - /** FileAttachment */ - export const FileAttachment = z.object({ - id: z.number().int(), - filename: z.string(), - blob_id: z.union([z.number().int(), z.null()]), - mime_type: z.union([z.string(), z.null()]), - host_url: z.union([z.string(), z.null()]).optional(), - deleted: z.boolean(), - }); - /** Group */ - export const Group = z.object({ - id: z.number().int(), - name: z.string(), - description: z.string(), - currency_symbol: z.string(), - terms: z.string(), - add_user_account_on_join: z.boolean(), - created_at: z.string(), - created_by: z.number().int(), - last_changed: z.string(), - archived: z.boolean(), - }); - /** GroupInvite */ - export const GroupInvite = z.object({ - id: z.number().int(), - created_by: z.number().int(), - token: z.union([z.string(), z.null()]), - single_use: z.boolean(), - join_as_editor: z.boolean(), - description: z.string(), - valid_until: z.string(), - }); - /** GroupLog */ - export const GroupLog = z.object({ - id: z.number().int(), - user_id: z.number().int(), - logged_at: z.string(), - type: z.string(), - message: z.string(), - affected: z.union([z.number().int(), z.null()]), - }); - /** GroupMember */ - export const GroupMember = z.object({ - user_id: z.number().int(), - username: z.string(), - is_owner: z.boolean(), - can_write: z.boolean(), - description: z.string(), - joined_at: z.string(), - invited_by: z.union([z.number().int(), z.null()]), - }); - /** GroupMessage */ - export const GroupMessage = z.object({ - message: z.string(), - }); - /** GroupPayload */ - export const GroupPayload = z.object({ - name: z.string(), - description: z.string().optional(), - currency_symbol: z.string(), - add_user_account_on_join: z.boolean().optional(), - terms: z.string().optional(), - }); - /** GroupPreview */ - export const GroupPreview = z.object({ - id: z.number().int(), - name: z.string(), - description: z.string(), - currency_symbol: z.string(), - terms: z.string(), - created_at: z.string(), - invite_single_use: z.boolean(), - invite_valid_until: z.string(), - invite_description: z.string(), - }); - /** HTTPValidationError */ - export const HTTPValidationError = z.object({ - detail: z.array(components["schemas"]["ValidationError"]).optional(), - }); - /** LoginPayload */ - export const LoginPayload = z.object({ - username: z.string(), - password: z.string(), - session_name: z.string(), - }); - /** NewAccount */ - export const NewAccount = z.object({ - type: components["schemas"]["AccountType"], - name: z.string(), - description: z.string().optional(), - owning_user_id: z.union([z.number().int(), z.null()]).optional(), - date_info: z.union([z.string(), z.null()]).optional(), - deleted: z.boolean().optional(), - tags: z.array(z.string()).optional(), - clearing_shares: z.record(z.number()).optional(), - }); - /** NewFile */ - export const NewFile = z.object({ - filename: z.string(), - mime_type: z.string(), - content: z.string(), - }); - /** NewTransaction */ - export const NewTransaction = z.object({ - type: components["schemas"]["TransactionType"], - name: z.string(), - description: z.string(), - value: z.number(), - currency_symbol: z.string(), - currency_conversion_rate: z.number(), - billed_at: z.string(), - tags: z.array(z.string()).optional(), - creditor_shares: z.record(z.number()), - debitor_shares: z.record(z.number()), - new_files: z.array(components["schemas"]["NewFile"]).optional(), - new_positions: z.array(components["schemas"]["NewTransactionPosition"]).optional(), - }); - /** NewTransactionPosition */ - export const NewTransactionPosition = z.object({ - name: z.string(), - price: z.number(), - communist_shares: z.number(), - usages: z.record(z.number()), - }); - /** PersonalAccount */ - export const PersonalAccount = z.object({ - id: z.number().int(), - group_id: z.number().int(), - type: z.literal("personal"), - name: z.string(), - description: z.string(), - owning_user_id: z.union([z.number().int(), z.null()]), - deleted: z.boolean(), - last_changed: z.string(), - }); - /** PreviewGroupPayload */ - export const PreviewGroupPayload = z.object({ - invite_token: z.string(), - }); - /** RecoverPasswordPayload */ - export const RecoverPasswordPayload = z.object({ - email: z.string(), - }); - /** RegisterPayload */ - export const RegisterPayload = z.object({ - username: z.string(), - password: z.string(), - email: z.string(), - invite_token: z.union([z.string(), z.null()]).optional(), - }); - /** RegisterResponse */ - export const RegisterResponse = z.object({ - user_id: z.number().int(), - }); - /** RenameSessionPayload */ - export const RenameSessionPayload = z.object({ - session_id: z.number().int(), - name: z.string(), - }); - /** Session */ - export const Session = z.object({ - id: z.number().int(), - name: z.string(), - valid_until: z.union([z.string(), z.null()]), - last_seen: z.string(), - }); - /** Token */ - export const Token = z.object({ - user_id: z.number().int(), - access_token: z.string(), - }); - /** Transaction */ - export const Transaction = z.object({ - id: z.number().int(), - group_id: z.number().int(), - type: components["schemas"]["TransactionType"], - name: z.string(), - description: z.string(), - value: z.number(), - currency_symbol: z.string(), - currency_conversion_rate: z.number(), - billed_at: z.string(), - tags: z.array(z.string()), - deleted: z.boolean(), - creditor_shares: z.record(z.number()), - debitor_shares: z.record(z.number()), - last_changed: z.string(), - positions: z.array(components["schemas"]["TransactionPosition"]), - files: z.array(components["schemas"]["FileAttachment"]), - }); - /** TransactionPosition */ - export const TransactionPosition = z.object({ - name: z.string(), - price: z.number(), - communist_shares: z.number(), - usages: z.record(z.number()), - id: z.number().int(), - deleted: z.boolean(), - }); - /** - * TransactionType - * @enum {string} - */ - export const TransactionType = z.enum(["mimo", "purchase", "transfer"]); - /** UpdateFile */ - export const UpdateFile = z.object({ - id: z.number().int(), - filename: z.string(), - deleted: z.boolean(), - }); - /** UpdateGroupMemberPayload */ - export const UpdateGroupMemberPayload = z.object({ - user_id: z.number().int(), - can_write: z.boolean(), - is_owner: z.boolean(), - }); - /** UpdatePositionsPayload */ - export const UpdatePositionsPayload = z.object({ - positions: z.array(components["schemas"]["TransactionPosition"]), - }); - /** UpdateTransaction */ - export const UpdateTransaction = z.object({ - type: components["schemas"]["TransactionType"], - name: z.string(), - description: z.string(), - value: z.number(), - currency_symbol: z.string(), - currency_conversion_rate: z.number(), - billed_at: z.string(), - tags: z.array(z.string()).optional(), - creditor_shares: z.record(z.number()), - debitor_shares: z.record(z.number()), - new_files: z.array(components["schemas"]["NewFile"]).optional(), - new_positions: z.array(components["schemas"]["NewTransactionPosition"]).optional(), - changed_files: z.array(components["schemas"]["UpdateFile"]).optional(), - changed_positions: z.array(components["schemas"]["TransactionPosition"]).optional(), - }); - /** User */ - export const User = z.object({ - id: z.number().int(), - username: z.string(), - email: z.string(), - registered_at: z.string(), - deleted: z.boolean(), - pending: z.boolean(), - sessions: z.array(components["schemas"]["Session"]), - is_guest_user: z.boolean(), - }); - /** ValidationError */ - export const ValidationError = z.object({ - loc: z.array(z.union([z.string(), z.number().int()])), - msg: z.string(), - type: z.string(), - }); - /** - * VersionResponse - * @example { - * "major_version": 1, - * "minor_version": 3, - * "patch_version": 2, - * "version": "1.3.2" - * } - */ - export const VersionResponse = z.object({ - version: z.string(), - major_version: z.number().int(), - minor_version: z.number().int(), - patch_version: z.number().int(), - }); -} - -export const operations = { - - list_transactions: { - /** list all transactions in a group */ - parameters: { - query: z.object({ - min_last_changed: z.union([z.string(), z.null()]).optional(), - transaction_ids: z.union([z.string(), z.null()]).optional(), - }).optional(), - path: z.object({ - group_id: z.number().int(), - }), - }, - responses: { - /** @description Successful Response */ - 200: { - content: { - "application/json": z.array(components["schemas"]["Transaction"]), - }, - }, - /** @description unauthorized */ - 401: z.never(), - /** @description forbidden */ - 403: z.never(), - /** @description Not found */ - 404: z.never(), - /** @description Validation Error */ - 422: { - content: { - "application/json": components["schemas"]["HTTPValidationError"], - }, - }, - }, - }, - create_transaction: { - /** create a new transaction */ - parameters: { - path: z.object({ - group_id: z.number().int(), - }), - }, - requestBody: { - content: { - "application/json": components["schemas"]["NewTransaction"], - }, - }, - responses: { - /** @description Successful Response */ - 200: { - content: { - "application/json": components["schemas"]["Transaction"], - }, - }, - /** @description unauthorized */ - 401: z.never(), - /** @description forbidden */ - 403: z.never(), - /** @description Not found */ - 404: z.never(), - /** @description Validation Error */ - 422: { - content: { - "application/json": components["schemas"]["HTTPValidationError"], - }, - }, - }, - }, - get_transaction: { - /** get transaction details */ - parameters: { - path: z.object({ - group_id: z.number().int(), - transaction_id: z.number().int(), - }), - }, - responses: { - /** @description Successful Response */ - 200: { - content: { - "application/json": components["schemas"]["Transaction"], - }, - }, - /** @description unauthorized */ - 401: z.never(), - /** @description forbidden */ - 403: z.never(), - /** @description Not found */ - 404: z.never(), - /** @description Validation Error */ - 422: { - content: { - "application/json": components["schemas"]["HTTPValidationError"], - }, - }, - }, - }, - update_transaction: { - /** update transaction details */ - parameters: { - path: z.object({ - group_id: z.number().int(), - transaction_id: z.number().int(), - }), - }, - requestBody: { - content: { - "application/json": components["schemas"]["UpdateTransaction"], - }, - }, - responses: { - /** @description Successful Response */ - 200: { - content: { - "application/json": components["schemas"]["Transaction"], - }, - }, - /** @description unauthorized */ - 401: z.never(), - /** @description forbidden */ - 403: z.never(), - /** @description Not found */ - 404: z.never(), - /** @description Validation Error */ - 422: { - content: { - "application/json": components["schemas"]["HTTPValidationError"], - }, - }, - }, - }, - delete_transaction: { - /** delete a transaction */ - parameters: { - path: z.object({ - group_id: z.number().int(), - transaction_id: z.number().int(), - }), - }, - responses: { - /** @description Successful Response */ - 200: { - content: { - "application/json": components["schemas"]["Transaction"], - }, - }, - /** @description unauthorized */ - 401: z.never(), - /** @description forbidden */ - 403: z.never(), - /** @description Not found */ - 404: z.never(), - /** @description Validation Error */ - 422: { - content: { - "application/json": components["schemas"]["HTTPValidationError"], - }, - }, - }, - }, - update_transaction_positions: { - /** update transaction positions */ - parameters: { - path: z.object({ - group_id: z.number().int(), - transaction_id: z.number().int(), - }), - }, - requestBody: { - content: { - "application/json": components["schemas"]["UpdatePositionsPayload"], - }, - }, - responses: { - /** @description Successful Response */ - 200: { - content: { - "application/json": components["schemas"]["Transaction"], - }, - }, - /** @description unauthorized */ - 401: z.never(), - /** @description forbidden */ - 403: z.never(), - /** @description Not found */ - 404: z.never(), - /** @description Validation Error */ - 422: { - content: { - "application/json": components["schemas"]["HTTPValidationError"], - }, - }, - }, - }, - get_file_contents: { - /** fetch the (binary) contents of a transaction attachment */ - parameters: { - path: z.object({ - file_id: z.number().int(), - blob_id: z.number().int(), - }), - }, - responses: { - /** @description Successful Response */ - 200: z.never(), - /** @description unauthorized */ - 401: z.never(), - /** @description forbidden */ - 403: z.never(), - /** @description Not found */ - 404: z.never(), - /** @description Validation Error */ - 422: { - content: { - "application/json": components["schemas"]["HTTPValidationError"], - }, - }, - }, - }, - preview_group: { - /** preview a group before joining using an invite token */ - requestBody: { - content: { - "application/json": components["schemas"]["PreviewGroupPayload"], - }, - }, - responses: { - /** @description Successful Response */ - 200: { - content: { - "application/json": components["schemas"]["GroupPreview"], - }, - }, - /** @description unauthorized */ - 401: z.never(), - /** @description forbidden */ - 403: z.never(), - /** @description Not found */ - 404: z.never(), - /** @description Validation Error */ - 422: { - content: { - "application/json": components["schemas"]["HTTPValidationError"], - }, - }, - }, - }, - join_group: { - /** join a group using an invite token */ - requestBody: { - content: { - "application/json": components["schemas"]["PreviewGroupPayload"], - }, - }, - responses: { - /** @description Successful Response */ - 200: { - content: { - "application/json": components["schemas"]["Group"], - }, - }, - /** @description unauthorized */ - 401: z.never(), - /** @description forbidden */ - 403: z.never(), - /** @description Not found */ - 404: z.never(), - /** @description Validation Error */ - 422: { - content: { - "application/json": components["schemas"]["HTTPValidationError"], - }, - }, - }, - }, - list_groups: { - /** list the current users groups */ - responses: { - /** @description Successful Response */ - 200: { - content: { - "application/json": z.array(components["schemas"]["Group"]), - }, - }, - /** @description unauthorized */ - 401: z.never(), - /** @description forbidden */ - 403: z.never(), - /** @description Not found */ - 404: z.never(), - }, - }, - create_group: { - /** create a group */ - requestBody: { - content: { - "application/json": components["schemas"]["GroupPayload"], - }, - }, - responses: { - /** @description Successful Response */ - 200: { - content: { - "application/json": components["schemas"]["Group"], - }, - }, - /** @description unauthorized */ - 401: z.never(), - /** @description forbidden */ - 403: z.never(), - /** @description Not found */ - 404: z.never(), - /** @description Validation Error */ - 422: { - content: { - "application/json": components["schemas"]["HTTPValidationError"], - }, - }, - }, - }, - get_group: { - /** fetch group details */ - parameters: { - path: z.object({ - group_id: z.number().int(), - }), - }, - responses: { - /** @description Successful Response */ - 200: { - content: { - "application/json": components["schemas"]["Group"], - }, - }, - /** @description unauthorized */ - 401: z.never(), - /** @description forbidden */ - 403: z.never(), - /** @description Not found */ - 404: z.never(), - /** @description Validation Error */ - 422: { - content: { - "application/json": components["schemas"]["HTTPValidationError"], - }, - }, - }, - }, - update_group: { - /** update group details */ - parameters: { - path: z.object({ - group_id: z.number().int(), - }), - }, - requestBody: { - content: { - "application/json": components["schemas"]["GroupPayload"], - }, - }, - responses: { - /** @description Successful Response */ - 200: { - content: { - "application/json": components["schemas"]["Group"], - }, - }, - /** @description unauthorized */ - 401: z.never(), - /** @description forbidden */ - 403: z.never(), - /** @description Not found */ - 404: z.never(), - /** @description Validation Error */ - 422: { - content: { - "application/json": components["schemas"]["HTTPValidationError"], - }, - }, - }, - }, - delete_group: { - /** delete a group */ - parameters: { - path: z.object({ - group_id: z.number().int(), - }), - }, - responses: { - /** @description Successful Response */ - 204: z.never(), - /** @description unauthorized */ - 401: z.never(), - /** @description forbidden */ - 403: z.never(), - /** @description Not found */ - 404: z.never(), - /** @description Validation Error */ - 422: { - content: { - "application/json": components["schemas"]["HTTPValidationError"], - }, - }, - }, - }, - leave_group: { - /** leave a group */ - parameters: { - path: z.object({ - group_id: z.number().int(), - }), - }, - responses: { - /** @description Successful Response */ - 204: z.never(), - /** @description unauthorized */ - 401: z.never(), - /** @description forbidden */ - 403: z.never(), - /** @description Not found */ - 404: z.never(), - /** @description Validation Error */ - 422: { - content: { - "application/json": components["schemas"]["HTTPValidationError"], - }, - }, - }, - }, - list_members: { - /** list all members of a group */ - parameters: { - path: z.object({ + /** + * AccountType + * @enum {string} + */ + export const AccountType = z.enum(["personal", "clearing"]); + /** Body_get_token */ + export const Body_get_token = z.object({ + grant_type: z.union([z.string(), z.null()]).optional(), + username: z.string(), + password: z.string(), + scope: z.string().optional(), + client_id: z.union([z.string(), z.null()]).optional(), + client_secret: z.union([z.string(), z.null()]).optional(), + }); + /** ChangeEmailPayload */ + export const ChangeEmailPayload = z.object({ + email: z.string(), + password: z.string(), + }); + /** ChangePasswordPayload */ + export const ChangePasswordPayload = z.object({ + new_password: z.string(), + old_password: z.string(), + }); + /** ClearingAccount */ + export const ClearingAccount = z.object({ + id: z.number().int(), group_id: z.number().int(), - }), - }, - responses: { - /** @description Successful Response */ - 200: { - content: { - "application/json": z.array(components["schemas"]["GroupMember"]), - }, - }, - /** @description unauthorized */ - 401: z.never(), - /** @description forbidden */ - 403: z.never(), - /** @description Not found */ - 404: z.never(), - /** @description Validation Error */ - 422: { - content: { - "application/json": components["schemas"]["HTTPValidationError"], - }, - }, - }, - }, - update_member_permissions: { - /** update the permissions of a group member */ - parameters: { - path: z.object({ + type: z.literal("clearing"), + name: z.string(), + description: z.string(), + date_info: z.string(), + tags: z.array(z.string()), + clearing_shares: z.record(z.number()), + last_changed: z.string(), + deleted: z.boolean(), + }); + /** ConfirmEmailChangePayload */ + export const ConfirmEmailChangePayload = z.object({ + token: z.string(), + }); + /** ConfirmPasswordRecoveryPayload */ + export const ConfirmPasswordRecoveryPayload = z.object({ + token: z.string(), + new_password: z.string(), + }); + /** ConfirmRegistrationPayload */ + export const ConfirmRegistrationPayload = z.object({ + token: z.string(), + }); + /** CreateInvitePayload */ + export const CreateInvitePayload = z.object({ + description: z.string(), + single_use: z.boolean(), + join_as_editor: z.boolean(), + valid_until: z.string(), + }); + /** DeleteSessionPayload */ + export const DeleteSessionPayload = z.object({ + session_id: z.number().int(), + }); + /** FileAttachment */ + export const FileAttachment = z.object({ + id: z.number().int(), + filename: z.string(), + blob_id: z.union([z.number().int(), z.null()]), + mime_type: z.union([z.string(), z.null()]), + host_url: z.union([z.string(), z.null()]).optional(), + deleted: z.boolean(), + }); + /** Group */ + export const Group = z.object({ + id: z.number().int(), + name: z.string(), + description: z.string(), + currency_symbol: z.string(), + terms: z.string(), + add_user_account_on_join: z.boolean(), + created_at: z.string(), + created_by: z.number().int(), + last_changed: z.string(), + archived: z.boolean(), + }); + /** GroupInvite */ + export const GroupInvite = z.object({ + id: z.number().int(), + created_by: z.number().int(), + token: z.union([z.string(), z.null()]), + single_use: z.boolean(), + join_as_editor: z.boolean(), + description: z.string(), + valid_until: z.string(), + }); + /** GroupLog */ + export const GroupLog = z.object({ + id: z.number().int(), + user_id: z.number().int(), + logged_at: z.string(), + type: z.string(), + message: z.string(), + affected: z.union([z.number().int(), z.null()]), + }); + /** GroupMember */ + export const GroupMember = z.object({ + user_id: z.number().int(), + username: z.string(), + is_owner: z.boolean(), + can_write: z.boolean(), + description: z.string(), + joined_at: z.string(), + invited_by: z.union([z.number().int(), z.null()]), + }); + /** GroupMessage */ + export const GroupMessage = z.object({ + message: z.string(), + }); + /** GroupPayload */ + export const GroupPayload = z.object({ + name: z.string(), + description: z.string().optional(), + currency_symbol: z.string(), + add_user_account_on_join: z.boolean().optional(), + terms: z.string().optional(), + }); + /** GroupPreview */ + export const GroupPreview = z.object({ + id: z.number().int(), + name: z.string(), + description: z.string(), + currency_symbol: z.string(), + terms: z.string(), + created_at: z.string(), + invite_single_use: z.boolean(), + invite_valid_until: z.string(), + invite_description: z.string(), + }); + /** HTTPValidationError */ + export const HTTPValidationError = z.object({ + detail: z.array(components["schemas"]["ValidationError"]).optional(), + }); + /** LoginPayload */ + export const LoginPayload = z.object({ + username: z.string(), + password: z.string(), + session_name: z.string(), + }); + /** NewAccount */ + export const NewAccount = z.object({ + type: components["schemas"]["AccountType"], + name: z.string(), + description: z.string().optional(), + owning_user_id: z.union([z.number().int(), z.null()]).optional(), + date_info: z.union([z.string(), z.null()]).optional(), + deleted: z.boolean().optional(), + tags: z.array(z.string()).optional(), + clearing_shares: z.record(z.number()).optional(), + }); + /** NewFile */ + export const NewFile = z.object({ + filename: z.string(), + mime_type: z.string(), + content: z.string(), + }); + /** NewTransaction */ + export const NewTransaction = z.object({ + type: components["schemas"]["TransactionType"], + name: z.string(), + description: z.string(), + value: z.number(), + currency_symbol: z.string(), + currency_conversion_rate: z.number(), + billed_at: z.string(), + tags: z.array(z.string()).optional(), + creditor_shares: z.record(z.number()), + debitor_shares: z.record(z.number()), + new_files: z.array(components["schemas"]["NewFile"]).optional(), + new_positions: z.array(components["schemas"]["NewTransactionPosition"]).optional(), + }); + /** NewTransactionPosition */ + export const NewTransactionPosition = z.object({ + name: z.string(), + price: z.number(), + communist_shares: z.number(), + usages: z.record(z.number()), + }); + /** PersonalAccount */ + export const PersonalAccount = z.object({ + id: z.number().int(), group_id: z.number().int(), - }), - }, - requestBody: { - content: { - "application/json": components["schemas"]["UpdateGroupMemberPayload"], - }, - }, - responses: { - /** @description Successful Response */ - 200: { - content: { - "application/json": components["schemas"]["GroupMember"], - }, - }, - /** @description unauthorized */ - 401: z.never(), - /** @description forbidden */ - 403: z.never(), - /** @description Not found */ - 404: z.never(), - /** @description Validation Error */ - 422: { - content: { - "application/json": components["schemas"]["HTTPValidationError"], - }, - }, - }, - }, - list_log: { - /** fetch the group log */ - parameters: { - path: z.object({ + type: z.literal("personal"), + name: z.string(), + description: z.string(), + owning_user_id: z.union([z.number().int(), z.null()]), + deleted: z.boolean(), + last_changed: z.string(), + }); + /** PreviewGroupPayload */ + export const PreviewGroupPayload = z.object({ + invite_token: z.string(), + }); + /** RecoverPasswordPayload */ + export const RecoverPasswordPayload = z.object({ + email: z.string(), + }); + /** RegisterPayload */ + export const RegisterPayload = z.object({ + username: z.string(), + password: z.string(), + email: z.string(), + invite_token: z.union([z.string(), z.null()]).optional(), + }); + /** RegisterResponse */ + export const RegisterResponse = z.object({ + user_id: z.number().int(), + }); + /** RenameSessionPayload */ + export const RenameSessionPayload = z.object({ + session_id: z.number().int(), + name: z.string(), + }); + /** Session */ + export const Session = z.object({ + id: z.number().int(), + name: z.string(), + valid_until: z.union([z.string(), z.null()]), + last_seen: z.string(), + }); + /** Token */ + export const Token = z.object({ + user_id: z.number().int(), + access_token: z.string(), + }); + /** Transaction */ + export const Transaction = z.object({ + id: z.number().int(), group_id: z.number().int(), - }), - }, - responses: { - /** @description Successful Response */ - 200: { - content: { - "application/json": z.array(components["schemas"]["GroupLog"]), - }, - }, - /** @description unauthorized */ - 401: z.never(), - /** @description forbidden */ - 403: z.never(), - /** @description Not found */ - 404: z.never(), - /** @description Validation Error */ - 422: { - content: { - "application/json": components["schemas"]["HTTPValidationError"], - }, - }, - }, - }, - send_group_message: { - /** post a message to the group log */ - parameters: { - path: z.object({ - group_id: z.number().int(), - }), - }, - requestBody: { - content: { - "application/json": components["schemas"]["GroupMessage"], - }, - }, - responses: { - /** @description Successful Response */ - 204: z.never(), - /** @description unauthorized */ - 401: z.never(), - /** @description forbidden */ - 403: z.never(), - /** @description Not found */ - 404: z.never(), - /** @description Validation Error */ - 422: { - content: { - "application/json": components["schemas"]["HTTPValidationError"], - }, - }, - }, - }, - list_invites: { - /** list all invite links of a group */ - parameters: { - path: z.object({ - group_id: z.number().int(), - }), - }, - responses: { - /** @description Successful Response */ - 200: { - content: { - "application/json": z.array(components["schemas"]["GroupInvite"]), - }, - }, - /** @description unauthorized */ - 401: z.never(), - /** @description forbidden */ - 403: z.never(), - /** @description Not found */ - 404: z.never(), - /** @description Validation Error */ - 422: { - content: { - "application/json": components["schemas"]["HTTPValidationError"], - }, - }, - }, - }, - create_invite: { - /** create a new group invite link */ - parameters: { - path: z.object({ - group_id: z.number().int(), - }), - }, - requestBody: { - content: { - "application/json": components["schemas"]["CreateInvitePayload"], - }, - }, - responses: { - /** @description Successful Response */ - 200: { - content: { - "application/json": components["schemas"]["GroupInvite"], - }, - }, - /** @description unauthorized */ - 401: z.never(), - /** @description forbidden */ - 403: z.never(), - /** @description Not found */ - 404: z.never(), - /** @description Validation Error */ - 422: { - content: { - "application/json": components["schemas"]["HTTPValidationError"], - }, - }, - }, - }, - delete_invite: { - /** delete a group invite link */ - parameters: { - path: z.object({ - group_id: z.number().int(), - invite_id: z.number().int(), - }), - }, - responses: { - /** @description Successful Response */ - 204: z.never(), - /** @description unauthorized */ - 401: z.never(), - /** @description forbidden */ - 403: z.never(), - /** @description Not found */ - 404: z.never(), - /** @description Validation Error */ - 422: { - content: { - "application/json": components["schemas"]["HTTPValidationError"], - }, - }, - }, - }, - archive_group: { - /** archive a group */ - parameters: { - path: z.object({ - group_id: z.number().int(), - }), - }, - responses: { - /** @description Successful Response */ - 200: { - content: { - "application/json": z.record(z.any()), - }, - }, - /** @description unauthorized */ - 401: z.never(), - /** @description forbidden */ - 403: z.never(), - /** @description Not found */ - 404: z.never(), - /** @description Validation Error */ - 422: { - content: { - "application/json": components["schemas"]["HTTPValidationError"], - }, - }, - }, - }, - unarchive_group: { - /** un-archive a group */ - parameters: { - path: z.object({ - group_id: z.number().int(), - }), - }, - responses: { - /** @description Successful Response */ - 200: { - content: { - "application/json": z.record(z.any()), - }, - }, - /** @description unauthorized */ - 401: z.never(), - /** @description forbidden */ - 403: z.never(), - /** @description Not found */ - 404: z.never(), - /** @description Validation Error */ - 422: { - content: { - "application/json": components["schemas"]["HTTPValidationError"], - }, - }, - }, - }, - get_token: { - /** login with username and password */ - requestBody: { - content: { - "application/x-www-form-urlencoded": components["schemas"]["Body_get_token"], - }, - }, - responses: { - /** @description Successful Response */ - 200: { - content: { - "application/json": components["schemas"]["Token"], - }, - }, - /** @description Validation Error */ - 422: { - content: { - "application/json": components["schemas"]["HTTPValidationError"], - }, - }, - }, - }, - login: { - /** login with username and password */ - requestBody: { - content: { - "application/json": components["schemas"]["LoginPayload"], - }, - }, - responses: { - /** @description Successful Response */ - 200: { - content: { - "application/json": components["schemas"]["Token"], - }, - }, - /** @description Validation Error */ - 422: { - content: { - "application/json": components["schemas"]["HTTPValidationError"], - }, - }, - }, - }, - logout: { - /** sign out of the current session */ - responses: { - /** @description Successful Response */ - 204: z.never(), - }, - }, - register: { - /** register a new user */ - requestBody: { - content: { - "application/json": components["schemas"]["RegisterPayload"], - }, - }, - responses: { - /** @description Successful Response */ - 200: { - content: { - "application/json": components["schemas"]["RegisterResponse"], - }, - }, - /** @description Validation Error */ - 422: { - content: { - "application/json": components["schemas"]["HTTPValidationError"], - }, - }, - }, - }, - confirm_registration: { - /** confirm a pending registration */ - requestBody: { - content: { - "application/json": components["schemas"]["ConfirmRegistrationPayload"], - }, - }, - responses: { - /** @description Successful Response */ - 204: z.never(), - /** @description Validation Error */ - 422: { - content: { - "application/json": components["schemas"]["HTTPValidationError"], - }, - }, - }, - }, - get_profile: { - /** fetch user profile information */ - responses: { - /** @description Successful Response */ - 200: { - content: { - "application/json": components["schemas"]["User"], - }, - }, - }, - }, - change_password: { - /** change password */ - requestBody: { - content: { - "application/json": components["schemas"]["ChangePasswordPayload"], - }, - }, - responses: { - /** @description Successful Response */ - 204: z.never(), - /** @description Validation Error */ - 422: { - content: { - "application/json": components["schemas"]["HTTPValidationError"], - }, - }, - }, - }, - change_email: { - /** change email */ - requestBody: { - content: { - "application/json": components["schemas"]["ChangeEmailPayload"], - }, - }, - responses: { - /** @description Successful Response */ - 204: z.never(), - /** @description Validation Error */ - 422: { - content: { - "application/json": components["schemas"]["HTTPValidationError"], - }, - }, - }, - }, - confirm_email_change: { - /** confirm a pending email change */ - requestBody: { - content: { - "application/json": components["schemas"]["ConfirmEmailChangePayload"], - }, - }, - responses: { - /** @description Successful Response */ - 204: z.never(), - /** @description Validation Error */ - 422: { - content: { - "application/json": components["schemas"]["HTTPValidationError"], - }, - }, - }, - }, - recover_password: { - /** recover password */ - requestBody: { - content: { - "application/json": components["schemas"]["RecoverPasswordPayload"], - }, - }, - responses: { - /** @description Successful Response */ - 204: z.never(), - /** @description Validation Error */ - 422: { - content: { - "application/json": components["schemas"]["HTTPValidationError"], - }, - }, - }, - }, - confirm_password_recovery: { - /** confirm a pending password recovery */ - requestBody: { - content: { - "application/json": components["schemas"]["ConfirmPasswordRecoveryPayload"], - }, - }, - responses: { - /** @description Successful Response */ - 204: z.never(), - /** @description Validation Error */ - 422: { - content: { - "application/json": components["schemas"]["HTTPValidationError"], - }, - }, - }, - }, - delete_session: { - /** delete a given user session */ - requestBody: { - content: { - "application/json": components["schemas"]["DeleteSessionPayload"], - }, - }, - responses: { - /** @description Successful Response */ - 204: z.never(), - /** @description Validation Error */ - 422: { - content: { - "application/json": components["schemas"]["HTTPValidationError"], - }, - }, - }, - }, - rename_session: { - /** rename a given user session */ - requestBody: { - content: { - "application/json": components["schemas"]["RenameSessionPayload"], - }, - }, - responses: { - /** @description Successful Response */ - 204: z.never(), - /** @description Validation Error */ - 422: { - content: { - "application/json": components["schemas"]["HTTPValidationError"], - }, - }, - }, - }, - list_accounts: { - /** list all accounts in a group */ - parameters: { - path: z.object({ - group_id: z.number().int(), - }), - }, - responses: { - /** @description Successful Response */ - 200: { - content: { - "application/json": z.array(z.union([components["schemas"]["ClearingAccount"], components["schemas"]["PersonalAccount"]])), - }, - }, - /** @description unauthorized */ - 401: z.never(), - /** @description forbidden */ - 403: z.never(), - /** @description Not found */ - 404: z.never(), - /** @description Validation Error */ - 422: { - content: { - "application/json": components["schemas"]["HTTPValidationError"], - }, - }, - }, - }, - create_account: { - /** create a new group account */ - parameters: { - path: z.object({ - group_id: z.number().int(), - }), - }, - requestBody: { - content: { - "application/json": components["schemas"]["NewAccount"], - }, - }, - responses: { - /** @description Successful Response */ - 200: { - content: { - "application/json": z.union([components["schemas"]["ClearingAccount"], components["schemas"]["PersonalAccount"]]), - }, - }, - /** @description unauthorized */ - 401: z.never(), - /** @description forbidden */ - 403: z.never(), - /** @description Not found */ - 404: z.never(), - /** @description Validation Error */ - 422: { - content: { - "application/json": components["schemas"]["HTTPValidationError"], - }, - }, - }, - }, - get_account: { - /** fetch a group account */ - parameters: { - path: z.object({ - group_id: z.number().int(), - account_id: z.number().int(), - }), - }, - responses: { - /** @description Successful Response */ - 200: { - content: { - "application/json": z.union([components["schemas"]["ClearingAccount"], components["schemas"]["PersonalAccount"]]), - }, - }, - /** @description unauthorized */ - 401: z.never(), - /** @description forbidden */ - 403: z.never(), - /** @description Not found */ - 404: z.never(), - /** @description Validation Error */ - 422: { - content: { - "application/json": components["schemas"]["HTTPValidationError"], - }, - }, - }, - }, - update_account: { - /** update an account */ - parameters: { - path: z.object({ - group_id: z.number().int(), - account_id: z.number().int(), - }), - }, - requestBody: { - content: { - "application/json": components["schemas"]["NewAccount"], - }, - }, - responses: { - /** @description Successful Response */ - 200: { - content: { - "application/json": z.union([components["schemas"]["ClearingAccount"], components["schemas"]["PersonalAccount"]]), - }, - }, - /** @description unauthorized */ - 401: z.never(), - /** @description forbidden */ - 403: z.never(), - /** @description Not found */ - 404: z.never(), - /** @description Validation Error */ - 422: { - content: { - "application/json": components["schemas"]["HTTPValidationError"], - }, - }, - }, - }, - delete_account: { - /** delete an account */ - parameters: { - path: z.object({ - group_id: z.number().int(), - account_id: z.number().int(), - }), - }, - responses: { - /** @description Successful Response */ - 200: { - content: { - "application/json": z.union([components["schemas"]["ClearingAccount"], components["schemas"]["PersonalAccount"]]), - }, - }, - /** @description unauthorized */ - 401: z.never(), - /** @description forbidden */ - 403: z.never(), - /** @description Not found */ - 404: z.never(), - /** @description Validation Error */ - 422: { - content: { - "application/json": components["schemas"]["HTTPValidationError"], - }, - }, - }, - }, - get_version: { - /** Get Version */ - responses: { - /** @description Successful Response */ - 200: { - content: { - "application/json": components["schemas"]["VersionResponse"], - }, - }, - }, - }, + type: components["schemas"]["TransactionType"], + name: z.string(), + description: z.string(), + value: z.number(), + currency_symbol: z.string(), + currency_conversion_rate: z.number(), + billed_at: z.string(), + tags: z.array(z.string()), + deleted: z.boolean(), + creditor_shares: z.record(z.number()), + debitor_shares: z.record(z.number()), + last_changed: z.string(), + positions: z.array(components["schemas"]["TransactionPosition"]), + files: z.array(components["schemas"]["FileAttachment"]), + }); + /** TransactionPosition */ + export const TransactionPosition = z.object({ + name: z.string(), + price: z.number(), + communist_shares: z.number(), + usages: z.record(z.number()), + id: z.number().int(), + deleted: z.boolean(), + }); + /** + * TransactionType + * @enum {string} + */ + export const TransactionType = z.enum(["mimo", "purchase", "transfer"]); + /** UpdateFile */ + export const UpdateFile = z.object({ + id: z.number().int(), + filename: z.string(), + deleted: z.boolean(), + }); + /** UpdateGroupMemberPayload */ + export const UpdateGroupMemberPayload = z.object({ + user_id: z.number().int(), + can_write: z.boolean(), + is_owner: z.boolean(), + }); + /** UpdatePositionsPayload */ + export const UpdatePositionsPayload = z.object({ + positions: z.array(components["schemas"]["TransactionPosition"]), + }); + /** UpdateTransaction */ + export const UpdateTransaction = z.object({ + type: components["schemas"]["TransactionType"], + name: z.string(), + description: z.string(), + value: z.number(), + currency_symbol: z.string(), + currency_conversion_rate: z.number(), + billed_at: z.string(), + tags: z.array(z.string()).optional(), + creditor_shares: z.record(z.number()), + debitor_shares: z.record(z.number()), + new_files: z.array(components["schemas"]["NewFile"]).optional(), + new_positions: z.array(components["schemas"]["NewTransactionPosition"]).optional(), + changed_files: z.array(components["schemas"]["UpdateFile"]).optional(), + changed_positions: z.array(components["schemas"]["TransactionPosition"]).optional(), + }); + /** User */ + export const User = z.object({ + id: z.number().int(), + username: z.string(), + email: z.string(), + registered_at: z.string(), + deleted: z.boolean(), + pending: z.boolean(), + sessions: z.array(components["schemas"]["Session"]), + is_guest_user: z.boolean(), + }); + /** ValidationError */ + export const ValidationError = z.object({ + loc: z.array(z.union([z.string(), z.number().int()])), + msg: z.string(), + type: z.string(), + }); + /** + * VersionResponse + * @example { + * "major_version": 1, + * "minor_version": 3, + * "patch_version": 2, + * "version": "1.3.2" + * } + */ + export const VersionResponse = z.object({ + version: z.string(), + major_version: z.number().int(), + minor_version: z.number().int(), + patch_version: z.number().int(), + }); } +export const operations = { + list_transactions: { + /** list all transactions in a group */ + parameters: { + query: z + .object({ + min_last_changed: z.union([z.string(), z.null()]).optional(), + transaction_ids: z.union([z.string(), z.null()]).optional(), + }) + .optional(), + path: z.object({ + group_id: z.number().int(), + }), + }, + responses: { + /** @description Successful Response */ + 200: { + content: { + "application/json": z.array(components["schemas"]["Transaction"]), + }, + }, + /** @description unauthorized */ + 401: z.never(), + /** @description forbidden */ + 403: z.never(), + /** @description Not found */ + 404: z.never(), + /** @description Validation Error */ + 422: { + content: { + "application/json": components["schemas"]["HTTPValidationError"], + }, + }, + }, + }, + create_transaction: { + /** create a new transaction */ + parameters: { + path: z.object({ + group_id: z.number().int(), + }), + }, + requestBody: { + content: { + "application/json": components["schemas"]["NewTransaction"], + }, + }, + responses: { + /** @description Successful Response */ + 200: { + content: { + "application/json": components["schemas"]["Transaction"], + }, + }, + /** @description unauthorized */ + 401: z.never(), + /** @description forbidden */ + 403: z.never(), + /** @description Not found */ + 404: z.never(), + /** @description Validation Error */ + 422: { + content: { + "application/json": components["schemas"]["HTTPValidationError"], + }, + }, + }, + }, + get_transaction: { + /** get transaction details */ + parameters: { + path: z.object({ + group_id: z.number().int(), + transaction_id: z.number().int(), + }), + }, + responses: { + /** @description Successful Response */ + 200: { + content: { + "application/json": components["schemas"]["Transaction"], + }, + }, + /** @description unauthorized */ + 401: z.never(), + /** @description forbidden */ + 403: z.never(), + /** @description Not found */ + 404: z.never(), + /** @description Validation Error */ + 422: { + content: { + "application/json": components["schemas"]["HTTPValidationError"], + }, + }, + }, + }, + update_transaction: { + /** update transaction details */ + parameters: { + path: z.object({ + group_id: z.number().int(), + transaction_id: z.number().int(), + }), + }, + requestBody: { + content: { + "application/json": components["schemas"]["UpdateTransaction"], + }, + }, + responses: { + /** @description Successful Response */ + 200: { + content: { + "application/json": components["schemas"]["Transaction"], + }, + }, + /** @description unauthorized */ + 401: z.never(), + /** @description forbidden */ + 403: z.never(), + /** @description Not found */ + 404: z.never(), + /** @description Validation Error */ + 422: { + content: { + "application/json": components["schemas"]["HTTPValidationError"], + }, + }, + }, + }, + delete_transaction: { + /** delete a transaction */ + parameters: { + path: z.object({ + group_id: z.number().int(), + transaction_id: z.number().int(), + }), + }, + responses: { + /** @description Successful Response */ + 200: { + content: { + "application/json": components["schemas"]["Transaction"], + }, + }, + /** @description unauthorized */ + 401: z.never(), + /** @description forbidden */ + 403: z.never(), + /** @description Not found */ + 404: z.never(), + /** @description Validation Error */ + 422: { + content: { + "application/json": components["schemas"]["HTTPValidationError"], + }, + }, + }, + }, + update_transaction_positions: { + /** update transaction positions */ + parameters: { + path: z.object({ + group_id: z.number().int(), + transaction_id: z.number().int(), + }), + }, + requestBody: { + content: { + "application/json": components["schemas"]["UpdatePositionsPayload"], + }, + }, + responses: { + /** @description Successful Response */ + 200: { + content: { + "application/json": components["schemas"]["Transaction"], + }, + }, + /** @description unauthorized */ + 401: z.never(), + /** @description forbidden */ + 403: z.never(), + /** @description Not found */ + 404: z.never(), + /** @description Validation Error */ + 422: { + content: { + "application/json": components["schemas"]["HTTPValidationError"], + }, + }, + }, + }, + get_file_contents: { + /** fetch the (binary) contents of a transaction attachment */ + parameters: { + path: z.object({ + file_id: z.number().int(), + blob_id: z.number().int(), + }), + }, + responses: { + /** @description Successful Response */ + 200: z.never(), + /** @description unauthorized */ + 401: z.never(), + /** @description forbidden */ + 403: z.never(), + /** @description Not found */ + 404: z.never(), + /** @description Validation Error */ + 422: { + content: { + "application/json": components["schemas"]["HTTPValidationError"], + }, + }, + }, + }, + preview_group: { + /** preview a group before joining using an invite token */ + requestBody: { + content: { + "application/json": components["schemas"]["PreviewGroupPayload"], + }, + }, + responses: { + /** @description Successful Response */ + 200: { + content: { + "application/json": components["schemas"]["GroupPreview"], + }, + }, + /** @description unauthorized */ + 401: z.never(), + /** @description forbidden */ + 403: z.never(), + /** @description Not found */ + 404: z.never(), + /** @description Validation Error */ + 422: { + content: { + "application/json": components["schemas"]["HTTPValidationError"], + }, + }, + }, + }, + join_group: { + /** join a group using an invite token */ + requestBody: { + content: { + "application/json": components["schemas"]["PreviewGroupPayload"], + }, + }, + responses: { + /** @description Successful Response */ + 200: { + content: { + "application/json": components["schemas"]["Group"], + }, + }, + /** @description unauthorized */ + 401: z.never(), + /** @description forbidden */ + 403: z.never(), + /** @description Not found */ + 404: z.never(), + /** @description Validation Error */ + 422: { + content: { + "application/json": components["schemas"]["HTTPValidationError"], + }, + }, + }, + }, + list_groups: { + /** list the current users groups */ + responses: { + /** @description Successful Response */ + 200: { + content: { + "application/json": z.array(components["schemas"]["Group"]), + }, + }, + /** @description unauthorized */ + 401: z.never(), + /** @description forbidden */ + 403: z.never(), + /** @description Not found */ + 404: z.never(), + }, + }, + create_group: { + /** create a group */ + requestBody: { + content: { + "application/json": components["schemas"]["GroupPayload"], + }, + }, + responses: { + /** @description Successful Response */ + 200: { + content: { + "application/json": components["schemas"]["Group"], + }, + }, + /** @description unauthorized */ + 401: z.never(), + /** @description forbidden */ + 403: z.never(), + /** @description Not found */ + 404: z.never(), + /** @description Validation Error */ + 422: { + content: { + "application/json": components["schemas"]["HTTPValidationError"], + }, + }, + }, + }, + get_group: { + /** fetch group details */ + parameters: { + path: z.object({ + group_id: z.number().int(), + }), + }, + responses: { + /** @description Successful Response */ + 200: { + content: { + "application/json": components["schemas"]["Group"], + }, + }, + /** @description unauthorized */ + 401: z.never(), + /** @description forbidden */ + 403: z.never(), + /** @description Not found */ + 404: z.never(), + /** @description Validation Error */ + 422: { + content: { + "application/json": components["schemas"]["HTTPValidationError"], + }, + }, + }, + }, + update_group: { + /** update group details */ + parameters: { + path: z.object({ + group_id: z.number().int(), + }), + }, + requestBody: { + content: { + "application/json": components["schemas"]["GroupPayload"], + }, + }, + responses: { + /** @description Successful Response */ + 200: { + content: { + "application/json": components["schemas"]["Group"], + }, + }, + /** @description unauthorized */ + 401: z.never(), + /** @description forbidden */ + 403: z.never(), + /** @description Not found */ + 404: z.never(), + /** @description Validation Error */ + 422: { + content: { + "application/json": components["schemas"]["HTTPValidationError"], + }, + }, + }, + }, + delete_group: { + /** delete a group */ + parameters: { + path: z.object({ + group_id: z.number().int(), + }), + }, + responses: { + /** @description Successful Response */ + 204: z.never(), + /** @description unauthorized */ + 401: z.never(), + /** @description forbidden */ + 403: z.never(), + /** @description Not found */ + 404: z.never(), + /** @description Validation Error */ + 422: { + content: { + "application/json": components["schemas"]["HTTPValidationError"], + }, + }, + }, + }, + leave_group: { + /** leave a group */ + parameters: { + path: z.object({ + group_id: z.number().int(), + }), + }, + responses: { + /** @description Successful Response */ + 204: z.never(), + /** @description unauthorized */ + 401: z.never(), + /** @description forbidden */ + 403: z.never(), + /** @description Not found */ + 404: z.never(), + /** @description Validation Error */ + 422: { + content: { + "application/json": components["schemas"]["HTTPValidationError"], + }, + }, + }, + }, + list_members: { + /** list all members of a group */ + parameters: { + path: z.object({ + group_id: z.number().int(), + }), + }, + responses: { + /** @description Successful Response */ + 200: { + content: { + "application/json": z.array(components["schemas"]["GroupMember"]), + }, + }, + /** @description unauthorized */ + 401: z.never(), + /** @description forbidden */ + 403: z.never(), + /** @description Not found */ + 404: z.never(), + /** @description Validation Error */ + 422: { + content: { + "application/json": components["schemas"]["HTTPValidationError"], + }, + }, + }, + }, + update_member_permissions: { + /** update the permissions of a group member */ + parameters: { + path: z.object({ + group_id: z.number().int(), + }), + }, + requestBody: { + content: { + "application/json": components["schemas"]["UpdateGroupMemberPayload"], + }, + }, + responses: { + /** @description Successful Response */ + 200: { + content: { + "application/json": components["schemas"]["GroupMember"], + }, + }, + /** @description unauthorized */ + 401: z.never(), + /** @description forbidden */ + 403: z.never(), + /** @description Not found */ + 404: z.never(), + /** @description Validation Error */ + 422: { + content: { + "application/json": components["schemas"]["HTTPValidationError"], + }, + }, + }, + }, + list_log: { + /** fetch the group log */ + parameters: { + path: z.object({ + group_id: z.number().int(), + }), + }, + responses: { + /** @description Successful Response */ + 200: { + content: { + "application/json": z.array(components["schemas"]["GroupLog"]), + }, + }, + /** @description unauthorized */ + 401: z.never(), + /** @description forbidden */ + 403: z.never(), + /** @description Not found */ + 404: z.never(), + /** @description Validation Error */ + 422: { + content: { + "application/json": components["schemas"]["HTTPValidationError"], + }, + }, + }, + }, + send_group_message: { + /** post a message to the group log */ + parameters: { + path: z.object({ + group_id: z.number().int(), + }), + }, + requestBody: { + content: { + "application/json": components["schemas"]["GroupMessage"], + }, + }, + responses: { + /** @description Successful Response */ + 204: z.never(), + /** @description unauthorized */ + 401: z.never(), + /** @description forbidden */ + 403: z.never(), + /** @description Not found */ + 404: z.never(), + /** @description Validation Error */ + 422: { + content: { + "application/json": components["schemas"]["HTTPValidationError"], + }, + }, + }, + }, + list_invites: { + /** list all invite links of a group */ + parameters: { + path: z.object({ + group_id: z.number().int(), + }), + }, + responses: { + /** @description Successful Response */ + 200: { + content: { + "application/json": z.array(components["schemas"]["GroupInvite"]), + }, + }, + /** @description unauthorized */ + 401: z.never(), + /** @description forbidden */ + 403: z.never(), + /** @description Not found */ + 404: z.never(), + /** @description Validation Error */ + 422: { + content: { + "application/json": components["schemas"]["HTTPValidationError"], + }, + }, + }, + }, + create_invite: { + /** create a new group invite link */ + parameters: { + path: z.object({ + group_id: z.number().int(), + }), + }, + requestBody: { + content: { + "application/json": components["schemas"]["CreateInvitePayload"], + }, + }, + responses: { + /** @description Successful Response */ + 200: { + content: { + "application/json": components["schemas"]["GroupInvite"], + }, + }, + /** @description unauthorized */ + 401: z.never(), + /** @description forbidden */ + 403: z.never(), + /** @description Not found */ + 404: z.never(), + /** @description Validation Error */ + 422: { + content: { + "application/json": components["schemas"]["HTTPValidationError"], + }, + }, + }, + }, + delete_invite: { + /** delete a group invite link */ + parameters: { + path: z.object({ + group_id: z.number().int(), + invite_id: z.number().int(), + }), + }, + responses: { + /** @description Successful Response */ + 204: z.never(), + /** @description unauthorized */ + 401: z.never(), + /** @description forbidden */ + 403: z.never(), + /** @description Not found */ + 404: z.never(), + /** @description Validation Error */ + 422: { + content: { + "application/json": components["schemas"]["HTTPValidationError"], + }, + }, + }, + }, + archive_group: { + /** archive a group */ + parameters: { + path: z.object({ + group_id: z.number().int(), + }), + }, + responses: { + /** @description Successful Response */ + 200: { + content: { + "application/json": z.record(z.any()), + }, + }, + /** @description unauthorized */ + 401: z.never(), + /** @description forbidden */ + 403: z.never(), + /** @description Not found */ + 404: z.never(), + /** @description Validation Error */ + 422: { + content: { + "application/json": components["schemas"]["HTTPValidationError"], + }, + }, + }, + }, + unarchive_group: { + /** un-archive a group */ + parameters: { + path: z.object({ + group_id: z.number().int(), + }), + }, + responses: { + /** @description Successful Response */ + 200: { + content: { + "application/json": z.record(z.any()), + }, + }, + /** @description unauthorized */ + 401: z.never(), + /** @description forbidden */ + 403: z.never(), + /** @description Not found */ + 404: z.never(), + /** @description Validation Error */ + 422: { + content: { + "application/json": components["schemas"]["HTTPValidationError"], + }, + }, + }, + }, + get_token: { + /** login with username and password */ + requestBody: { + content: { + "application/x-www-form-urlencoded": components["schemas"]["Body_get_token"], + }, + }, + responses: { + /** @description Successful Response */ + 200: { + content: { + "application/json": components["schemas"]["Token"], + }, + }, + /** @description Validation Error */ + 422: { + content: { + "application/json": components["schemas"]["HTTPValidationError"], + }, + }, + }, + }, + login: { + /** login with username and password */ + requestBody: { + content: { + "application/json": components["schemas"]["LoginPayload"], + }, + }, + responses: { + /** @description Successful Response */ + 200: { + content: { + "application/json": components["schemas"]["Token"], + }, + }, + /** @description Validation Error */ + 422: { + content: { + "application/json": components["schemas"]["HTTPValidationError"], + }, + }, + }, + }, + logout: { + /** sign out of the current session */ + responses: { + /** @description Successful Response */ + 204: z.never(), + }, + }, + register: { + /** register a new user */ + requestBody: { + content: { + "application/json": components["schemas"]["RegisterPayload"], + }, + }, + responses: { + /** @description Successful Response */ + 200: { + content: { + "application/json": components["schemas"]["RegisterResponse"], + }, + }, + /** @description Validation Error */ + 422: { + content: { + "application/json": components["schemas"]["HTTPValidationError"], + }, + }, + }, + }, + confirm_registration: { + /** confirm a pending registration */ + requestBody: { + content: { + "application/json": components["schemas"]["ConfirmRegistrationPayload"], + }, + }, + responses: { + /** @description Successful Response */ + 204: z.never(), + /** @description Validation Error */ + 422: { + content: { + "application/json": components["schemas"]["HTTPValidationError"], + }, + }, + }, + }, + get_profile: { + /** fetch user profile information */ + responses: { + /** @description Successful Response */ + 200: { + content: { + "application/json": components["schemas"]["User"], + }, + }, + }, + }, + change_password: { + /** change password */ + requestBody: { + content: { + "application/json": components["schemas"]["ChangePasswordPayload"], + }, + }, + responses: { + /** @description Successful Response */ + 204: z.never(), + /** @description Validation Error */ + 422: { + content: { + "application/json": components["schemas"]["HTTPValidationError"], + }, + }, + }, + }, + change_email: { + /** change email */ + requestBody: { + content: { + "application/json": components["schemas"]["ChangeEmailPayload"], + }, + }, + responses: { + /** @description Successful Response */ + 204: z.never(), + /** @description Validation Error */ + 422: { + content: { + "application/json": components["schemas"]["HTTPValidationError"], + }, + }, + }, + }, + confirm_email_change: { + /** confirm a pending email change */ + requestBody: { + content: { + "application/json": components["schemas"]["ConfirmEmailChangePayload"], + }, + }, + responses: { + /** @description Successful Response */ + 204: z.never(), + /** @description Validation Error */ + 422: { + content: { + "application/json": components["schemas"]["HTTPValidationError"], + }, + }, + }, + }, + recover_password: { + /** recover password */ + requestBody: { + content: { + "application/json": components["schemas"]["RecoverPasswordPayload"], + }, + }, + responses: { + /** @description Successful Response */ + 204: z.never(), + /** @description Validation Error */ + 422: { + content: { + "application/json": components["schemas"]["HTTPValidationError"], + }, + }, + }, + }, + confirm_password_recovery: { + /** confirm a pending password recovery */ + requestBody: { + content: { + "application/json": components["schemas"]["ConfirmPasswordRecoveryPayload"], + }, + }, + responses: { + /** @description Successful Response */ + 204: z.never(), + /** @description Validation Error */ + 422: { + content: { + "application/json": components["schemas"]["HTTPValidationError"], + }, + }, + }, + }, + delete_session: { + /** delete a given user session */ + requestBody: { + content: { + "application/json": components["schemas"]["DeleteSessionPayload"], + }, + }, + responses: { + /** @description Successful Response */ + 204: z.never(), + /** @description Validation Error */ + 422: { + content: { + "application/json": components["schemas"]["HTTPValidationError"], + }, + }, + }, + }, + rename_session: { + /** rename a given user session */ + requestBody: { + content: { + "application/json": components["schemas"]["RenameSessionPayload"], + }, + }, + responses: { + /** @description Successful Response */ + 204: z.never(), + /** @description Validation Error */ + 422: { + content: { + "application/json": components["schemas"]["HTTPValidationError"], + }, + }, + }, + }, + list_accounts: { + /** list all accounts in a group */ + parameters: { + path: z.object({ + group_id: z.number().int(), + }), + }, + responses: { + /** @description Successful Response */ + 200: { + content: { + "application/json": z.array( + z.union([components["schemas"]["ClearingAccount"], components["schemas"]["PersonalAccount"]]) + ), + }, + }, + /** @description unauthorized */ + 401: z.never(), + /** @description forbidden */ + 403: z.never(), + /** @description Not found */ + 404: z.never(), + /** @description Validation Error */ + 422: { + content: { + "application/json": components["schemas"]["HTTPValidationError"], + }, + }, + }, + }, + create_account: { + /** create a new group account */ + parameters: { + path: z.object({ + group_id: z.number().int(), + }), + }, + requestBody: { + content: { + "application/json": components["schemas"]["NewAccount"], + }, + }, + responses: { + /** @description Successful Response */ + 200: { + content: { + "application/json": z.union([ + components["schemas"]["ClearingAccount"], + components["schemas"]["PersonalAccount"], + ]), + }, + }, + /** @description unauthorized */ + 401: z.never(), + /** @description forbidden */ + 403: z.never(), + /** @description Not found */ + 404: z.never(), + /** @description Validation Error */ + 422: { + content: { + "application/json": components["schemas"]["HTTPValidationError"], + }, + }, + }, + }, + get_account: { + /** fetch a group account */ + parameters: { + path: z.object({ + group_id: z.number().int(), + account_id: z.number().int(), + }), + }, + responses: { + /** @description Successful Response */ + 200: { + content: { + "application/json": z.union([ + components["schemas"]["ClearingAccount"], + components["schemas"]["PersonalAccount"], + ]), + }, + }, + /** @description unauthorized */ + 401: z.never(), + /** @description forbidden */ + 403: z.never(), + /** @description Not found */ + 404: z.never(), + /** @description Validation Error */ + 422: { + content: { + "application/json": components["schemas"]["HTTPValidationError"], + }, + }, + }, + }, + update_account: { + /** update an account */ + parameters: { + path: z.object({ + group_id: z.number().int(), + account_id: z.number().int(), + }), + }, + requestBody: { + content: { + "application/json": components["schemas"]["NewAccount"], + }, + }, + responses: { + /** @description Successful Response */ + 200: { + content: { + "application/json": z.union([ + components["schemas"]["ClearingAccount"], + components["schemas"]["PersonalAccount"], + ]), + }, + }, + /** @description unauthorized */ + 401: z.never(), + /** @description forbidden */ + 403: z.never(), + /** @description Not found */ + 404: z.never(), + /** @description Validation Error */ + 422: { + content: { + "application/json": components["schemas"]["HTTPValidationError"], + }, + }, + }, + }, + delete_account: { + /** delete an account */ + parameters: { + path: z.object({ + group_id: z.number().int(), + account_id: z.number().int(), + }), + }, + responses: { + /** @description Successful Response */ + 200: { + content: { + "application/json": z.union([ + components["schemas"]["ClearingAccount"], + components["schemas"]["PersonalAccount"], + ]), + }, + }, + /** @description unauthorized */ + 401: z.never(), + /** @description forbidden */ + 403: z.never(), + /** @description Not found */ + 404: z.never(), + /** @description Validation Error */ + 422: { + content: { + "application/json": components["schemas"]["HTTPValidationError"], + }, + }, + }, + }, + get_version: { + /** Get Version */ + responses: { + /** @description Successful Response */ + 200: { + content: { + "application/json": components["schemas"]["VersionResponse"], + }, + }, + }, + }, +}; + export const paths = { - "/api/v1/groups/{group_id}/transactions": { - /** list all transactions in a group */ - get: operations["list_transactions"], - /** create a new transaction */ - post: operations["create_transaction"], - }, - "/api/v1/groups/{group_id}/transactions/{transaction_id}": { - /** get transaction details */ - get: operations["get_transaction"], - /** update transaction details */ - post: operations["update_transaction"], - /** delete a transaction */ - delete: operations["delete_transaction"], - }, - "/api/v1/groups/{group_id}/transactions/{transaction_id}/positions": { - /** update transaction positions */ - post: operations["update_transaction_positions"], - }, - "/api/v1/files/{file_id}/{blob_id}": { - /** fetch the (binary) contents of a transaction attachment */ - get: operations["get_file_contents"], - }, - "/api/v1/groups/preview": { - /** preview a group before joining using an invite token */ - post: operations["preview_group"], - }, - "/api/v1/groups/join": { - /** join a group using an invite token */ - post: operations["join_group"], - }, - "/api/v1/groups": { - /** list the current users groups */ - get: operations["list_groups"], - /** create a group */ - post: operations["create_group"], - }, - "/api/v1/groups/{group_id}": { - /** fetch group details */ - get: operations["get_group"], - /** update group details */ - post: operations["update_group"], - /** delete a group */ - delete: operations["delete_group"], - }, - "/api/v1/groups/{group_id}/leave": { - /** leave a group */ - post: operations["leave_group"], - }, - "/api/v1/groups/{group_id}/members": { - /** list all members of a group */ - get: operations["list_members"], - /** update the permissions of a group member */ - post: operations["update_member_permissions"], - }, - "/api/v1/groups/{group_id}/logs": { - /** fetch the group log */ - get: operations["list_log"], - }, - "/api/v1/groups/{group_id}/send_message": { - /** post a message to the group log */ - post: operations["send_group_message"], - }, - "/api/v1/groups/{group_id}/invites": { - /** list all invite links of a group */ - get: operations["list_invites"], - /** create a new group invite link */ - post: operations["create_invite"], - }, - "/api/v1/groups/{group_id}/invites/{invite_id}": { - /** delete a group invite link */ - delete: operations["delete_invite"], - }, - "/api/v1/groups/{group_id}/archive": { - /** archive a group */ - post: operations["archive_group"], - }, - "/api/v1/groups/{group_id}/un-archive": { - /** un-archive a group */ - post: operations["unarchive_group"], - }, - "/api/v1/auth/token": { - /** login with username and password */ - post: operations["get_token"], - }, - "/api/v1/auth/login": { - /** login with username and password */ - post: operations["login"], - }, - "/api/v1/auth/logout": { - /** sign out of the current session */ - post: operations["logout"], - }, - "/api/v1/auth/register": { - /** register a new user */ - post: operations["register"], - }, - "/api/v1/auth/confirm_registration": { - /** confirm a pending registration */ - post: operations["confirm_registration"], - }, - "/api/v1/profile": { - /** fetch user profile information */ - get: operations["get_profile"], - }, - "/api/v1/profile/change_password": { - /** change password */ - post: operations["change_password"], - }, - "/api/v1/profile/change_email": { - /** change email */ - post: operations["change_email"], - }, - "/api/v1/auth/confirm_email_change": { - /** confirm a pending email change */ - post: operations["confirm_email_change"], - }, - "/api/v1/auth/recover_password": { - /** recover password */ - post: operations["recover_password"], - }, - "/api/v1/auth/confirm_password_recovery": { - /** confirm a pending password recovery */ - post: operations["confirm_password_recovery"], - }, - "/api/v1/auth/delete_session": { - /** delete a given user session */ - post: operations["delete_session"], - }, - "/api/v1/auth/rename_session": { - /** rename a given user session */ - post: operations["rename_session"], - }, - "/api/v1/groups/{group_id}/accounts": { - /** list all accounts in a group */ - get: operations["list_accounts"], - /** create a new group account */ - post: operations["create_account"], - }, - "/api/v1/groups/{group_id}/accounts/{account_id}": { - /** fetch a group account */ - get: operations["get_account"], - /** update an account */ - post: operations["update_account"], - /** delete an account */ - delete: operations["delete_account"], - }, - "/api/version": { - /** Get Version */ - get: operations["get_version"], - }, -} + "/api/v1/groups/{group_id}/transactions": { + /** list all transactions in a group */ + get: operations["list_transactions"], + /** create a new transaction */ + post: operations["create_transaction"], + }, + "/api/v1/groups/{group_id}/transactions/{transaction_id}": { + /** get transaction details */ + get: operations["get_transaction"], + /** update transaction details */ + post: operations["update_transaction"], + /** delete a transaction */ + delete: operations["delete_transaction"], + }, + "/api/v1/groups/{group_id}/transactions/{transaction_id}/positions": { + /** update transaction positions */ + post: operations["update_transaction_positions"], + }, + "/api/v1/files/{file_id}/{blob_id}": { + /** fetch the (binary) contents of a transaction attachment */ + get: operations["get_file_contents"], + }, + "/api/v1/groups/preview": { + /** preview a group before joining using an invite token */ + post: operations["preview_group"], + }, + "/api/v1/groups/join": { + /** join a group using an invite token */ + post: operations["join_group"], + }, + "/api/v1/groups": { + /** list the current users groups */ + get: operations["list_groups"], + /** create a group */ + post: operations["create_group"], + }, + "/api/v1/groups/{group_id}": { + /** fetch group details */ + get: operations["get_group"], + /** update group details */ + post: operations["update_group"], + /** delete a group */ + delete: operations["delete_group"], + }, + "/api/v1/groups/{group_id}/leave": { + /** leave a group */ + post: operations["leave_group"], + }, + "/api/v1/groups/{group_id}/members": { + /** list all members of a group */ + get: operations["list_members"], + /** update the permissions of a group member */ + post: operations["update_member_permissions"], + }, + "/api/v1/groups/{group_id}/logs": { + /** fetch the group log */ + get: operations["list_log"], + }, + "/api/v1/groups/{group_id}/send_message": { + /** post a message to the group log */ + post: operations["send_group_message"], + }, + "/api/v1/groups/{group_id}/invites": { + /** list all invite links of a group */ + get: operations["list_invites"], + /** create a new group invite link */ + post: operations["create_invite"], + }, + "/api/v1/groups/{group_id}/invites/{invite_id}": { + /** delete a group invite link */ + delete: operations["delete_invite"], + }, + "/api/v1/groups/{group_id}/archive": { + /** archive a group */ + post: operations["archive_group"], + }, + "/api/v1/groups/{group_id}/un-archive": { + /** un-archive a group */ + post: operations["unarchive_group"], + }, + "/api/v1/auth/token": { + /** login with username and password */ + post: operations["get_token"], + }, + "/api/v1/auth/login": { + /** login with username and password */ + post: operations["login"], + }, + "/api/v1/auth/logout": { + /** sign out of the current session */ + post: operations["logout"], + }, + "/api/v1/auth/register": { + /** register a new user */ + post: operations["register"], + }, + "/api/v1/auth/confirm_registration": { + /** confirm a pending registration */ + post: operations["confirm_registration"], + }, + "/api/v1/profile": { + /** fetch user profile information */ + get: operations["get_profile"], + }, + "/api/v1/profile/change_password": { + /** change password */ + post: operations["change_password"], + }, + "/api/v1/profile/change_email": { + /** change email */ + post: operations["change_email"], + }, + "/api/v1/auth/confirm_email_change": { + /** confirm a pending email change */ + post: operations["confirm_email_change"], + }, + "/api/v1/auth/recover_password": { + /** recover password */ + post: operations["recover_password"], + }, + "/api/v1/auth/confirm_password_recovery": { + /** confirm a pending password recovery */ + post: operations["confirm_password_recovery"], + }, + "/api/v1/auth/delete_session": { + /** delete a given user session */ + post: operations["delete_session"], + }, + "/api/v1/auth/rename_session": { + /** rename a given user session */ + post: operations["rename_session"], + }, + "/api/v1/groups/{group_id}/accounts": { + /** list all accounts in a group */ + get: operations["list_accounts"], + /** create a new group account */ + post: operations["create_account"], + }, + "/api/v1/groups/{group_id}/accounts/{account_id}": { + /** fetch a group account */ + get: operations["get_account"], + /** update an account */ + post: operations["update_account"], + /** delete an account */ + delete: operations["delete_account"], + }, + "/api/version": { + /** Get Version */ + get: operations["get_version"], + }, +}; diff --git a/frontend/libs/api/src/lib/generated/services/AccountsService.ts b/frontend/libs/api/src/lib/generated/services/AccountsService.ts index 6e5c103..3d639b0 100644 --- a/frontend/libs/api/src/lib/generated/services/AccountsService.ts +++ b/frontend/libs/api/src/lib/generated/services/AccountsService.ts @@ -2,11 +2,11 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -import type { ClearingAccount } from '../models/ClearingAccount'; -import type { NewAccount } from '../models/NewAccount'; -import type { PersonalAccount } from '../models/PersonalAccount'; -import type { CancelablePromise } from '../core/CancelablePromise'; -import type { BaseHttpRequest } from '../core/BaseHttpRequest'; +import type { ClearingAccount } from "../models/ClearingAccount"; +import type { NewAccount } from "../models/NewAccount"; +import type { PersonalAccount } from "../models/PersonalAccount"; +import type { CancelablePromise } from "../core/CancelablePromise"; +import type { BaseHttpRequest } from "../core/BaseHttpRequest"; export class AccountsService { constructor(public readonly httpRequest: BaseHttpRequest) {} /** @@ -14,16 +14,12 @@ export class AccountsService { * @returns any Successful Response * @throws ApiError */ - public listAccounts({ - groupId, - }: { - groupId: number, - }): CancelablePromise> { + public listAccounts({ groupId }: { groupId: number }): CancelablePromise> { return this.httpRequest.request({ - method: 'GET', - url: '/api/v1/groups/{group_id}/accounts', + method: "GET", + url: "/api/v1/groups/{group_id}/accounts", path: { - 'group_id': groupId, + group_id: groupId, }, errors: { 401: `unauthorized`, @@ -42,17 +38,17 @@ export class AccountsService { groupId, requestBody, }: { - groupId: number, - requestBody: NewAccount, - }): CancelablePromise<(ClearingAccount | PersonalAccount)> { + groupId: number; + requestBody: NewAccount; + }): CancelablePromise { return this.httpRequest.request({ - method: 'POST', - url: '/api/v1/groups/{group_id}/accounts', + method: "POST", + url: "/api/v1/groups/{group_id}/accounts", path: { - 'group_id': groupId, + group_id: groupId, }, body: requestBody, - mediaType: 'application/json', + mediaType: "application/json", errors: { 401: `unauthorized`, 403: `forbidden`, @@ -70,15 +66,15 @@ export class AccountsService { groupId, accountId, }: { - groupId: number, - accountId: number, - }): CancelablePromise<(ClearingAccount | PersonalAccount)> { + groupId: number; + accountId: number; + }): CancelablePromise { return this.httpRequest.request({ - method: 'GET', - url: '/api/v1/groups/{group_id}/accounts/{account_id}', + method: "GET", + url: "/api/v1/groups/{group_id}/accounts/{account_id}", path: { - 'group_id': groupId, - 'account_id': accountId, + group_id: groupId, + account_id: accountId, }, errors: { 401: `unauthorized`, @@ -98,19 +94,19 @@ export class AccountsService { accountId, requestBody, }: { - groupId: number, - accountId: number, - requestBody: NewAccount, - }): CancelablePromise<(ClearingAccount | PersonalAccount)> { + groupId: number; + accountId: number; + requestBody: NewAccount; + }): CancelablePromise { return this.httpRequest.request({ - method: 'POST', - url: '/api/v1/groups/{group_id}/accounts/{account_id}', + method: "POST", + url: "/api/v1/groups/{group_id}/accounts/{account_id}", path: { - 'group_id': groupId, - 'account_id': accountId, + group_id: groupId, + account_id: accountId, }, body: requestBody, - mediaType: 'application/json', + mediaType: "application/json", errors: { 401: `unauthorized`, 403: `forbidden`, @@ -128,15 +124,15 @@ export class AccountsService { groupId, accountId, }: { - groupId: number, - accountId: number, - }): CancelablePromise<(ClearingAccount | PersonalAccount)> { + groupId: number; + accountId: number; + }): CancelablePromise { return this.httpRequest.request({ - method: 'DELETE', - url: '/api/v1/groups/{group_id}/accounts/{account_id}', + method: "DELETE", + url: "/api/v1/groups/{group_id}/accounts/{account_id}", path: { - 'group_id': groupId, - 'account_id': accountId, + group_id: groupId, + account_id: accountId, }, errors: { 401: `unauthorized`, diff --git a/frontend/libs/api/src/lib/generated/services/AuthService.ts b/frontend/libs/api/src/lib/generated/services/AuthService.ts index d431750..58fc233 100644 --- a/frontend/libs/api/src/lib/generated/services/AuthService.ts +++ b/frontend/libs/api/src/lib/generated/services/AuthService.ts @@ -2,22 +2,22 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -import type { Body_get_token } from '../models/Body_get_token'; -import type { ChangeEmailPayload } from '../models/ChangeEmailPayload'; -import type { ChangePasswordPayload } from '../models/ChangePasswordPayload'; -import type { ConfirmEmailChangePayload } from '../models/ConfirmEmailChangePayload'; -import type { ConfirmPasswordRecoveryPayload } from '../models/ConfirmPasswordRecoveryPayload'; -import type { ConfirmRegistrationPayload } from '../models/ConfirmRegistrationPayload'; -import type { DeleteSessionPayload } from '../models/DeleteSessionPayload'; -import type { LoginPayload } from '../models/LoginPayload'; -import type { RecoverPasswordPayload } from '../models/RecoverPasswordPayload'; -import type { RegisterPayload } from '../models/RegisterPayload'; -import type { RegisterResponse } from '../models/RegisterResponse'; -import type { RenameSessionPayload } from '../models/RenameSessionPayload'; -import type { Token } from '../models/Token'; -import type { User } from '../models/User'; -import type { CancelablePromise } from '../core/CancelablePromise'; -import type { BaseHttpRequest } from '../core/BaseHttpRequest'; +import type { Body_get_token } from "../models/Body_get_token"; +import type { ChangeEmailPayload } from "../models/ChangeEmailPayload"; +import type { ChangePasswordPayload } from "../models/ChangePasswordPayload"; +import type { ConfirmEmailChangePayload } from "../models/ConfirmEmailChangePayload"; +import type { ConfirmPasswordRecoveryPayload } from "../models/ConfirmPasswordRecoveryPayload"; +import type { ConfirmRegistrationPayload } from "../models/ConfirmRegistrationPayload"; +import type { DeleteSessionPayload } from "../models/DeleteSessionPayload"; +import type { LoginPayload } from "../models/LoginPayload"; +import type { RecoverPasswordPayload } from "../models/RecoverPasswordPayload"; +import type { RegisterPayload } from "../models/RegisterPayload"; +import type { RegisterResponse } from "../models/RegisterResponse"; +import type { RenameSessionPayload } from "../models/RenameSessionPayload"; +import type { Token } from "../models/Token"; +import type { User } from "../models/User"; +import type { CancelablePromise } from "../core/CancelablePromise"; +import type { BaseHttpRequest } from "../core/BaseHttpRequest"; export class AuthService { constructor(public readonly httpRequest: BaseHttpRequest) {} /** @@ -25,16 +25,12 @@ export class AuthService { * @returns Token Successful Response * @throws ApiError */ - public getToken({ - formData, - }: { - formData: Body_get_token, - }): CancelablePromise { + public getToken({ formData }: { formData: Body_get_token }): CancelablePromise { return this.httpRequest.request({ - method: 'POST', - url: '/api/v1/auth/token', + method: "POST", + url: "/api/v1/auth/token", formData: formData, - mediaType: 'application/x-www-form-urlencoded', + mediaType: "application/x-www-form-urlencoded", errors: { 422: `Validation Error`, }, @@ -45,16 +41,12 @@ export class AuthService { * @returns Token Successful Response * @throws ApiError */ - public login({ - requestBody, - }: { - requestBody: LoginPayload, - }): CancelablePromise { + public login({ requestBody }: { requestBody: LoginPayload }): CancelablePromise { return this.httpRequest.request({ - method: 'POST', - url: '/api/v1/auth/login', + method: "POST", + url: "/api/v1/auth/login", body: requestBody, - mediaType: 'application/json', + mediaType: "application/json", errors: { 422: `Validation Error`, }, @@ -67,8 +59,8 @@ export class AuthService { */ public logout(): CancelablePromise { return this.httpRequest.request({ - method: 'POST', - url: '/api/v1/auth/logout', + method: "POST", + url: "/api/v1/auth/logout", }); } /** @@ -76,16 +68,12 @@ export class AuthService { * @returns RegisterResponse Successful Response * @throws ApiError */ - public register({ - requestBody, - }: { - requestBody: RegisterPayload, - }): CancelablePromise { + public register({ requestBody }: { requestBody: RegisterPayload }): CancelablePromise { return this.httpRequest.request({ - method: 'POST', - url: '/api/v1/auth/register', + method: "POST", + url: "/api/v1/auth/register", body: requestBody, - mediaType: 'application/json', + mediaType: "application/json", errors: { 422: `Validation Error`, }, @@ -96,16 +84,12 @@ export class AuthService { * @returns void * @throws ApiError */ - public confirmRegistration({ - requestBody, - }: { - requestBody: ConfirmRegistrationPayload, - }): CancelablePromise { + public confirmRegistration({ requestBody }: { requestBody: ConfirmRegistrationPayload }): CancelablePromise { return this.httpRequest.request({ - method: 'POST', - url: '/api/v1/auth/confirm_registration', + method: "POST", + url: "/api/v1/auth/confirm_registration", body: requestBody, - mediaType: 'application/json', + mediaType: "application/json", errors: { 422: `Validation Error`, }, @@ -118,8 +102,8 @@ export class AuthService { */ public getProfile(): CancelablePromise { return this.httpRequest.request({ - method: 'GET', - url: '/api/v1/profile', + method: "GET", + url: "/api/v1/profile", }); } /** @@ -127,16 +111,12 @@ export class AuthService { * @returns void * @throws ApiError */ - public changePassword({ - requestBody, - }: { - requestBody: ChangePasswordPayload, - }): CancelablePromise { + public changePassword({ requestBody }: { requestBody: ChangePasswordPayload }): CancelablePromise { return this.httpRequest.request({ - method: 'POST', - url: '/api/v1/profile/change_password', + method: "POST", + url: "/api/v1/profile/change_password", body: requestBody, - mediaType: 'application/json', + mediaType: "application/json", errors: { 422: `Validation Error`, }, @@ -147,16 +127,12 @@ export class AuthService { * @returns void * @throws ApiError */ - public changeEmail({ - requestBody, - }: { - requestBody: ChangeEmailPayload, - }): CancelablePromise { + public changeEmail({ requestBody }: { requestBody: ChangeEmailPayload }): CancelablePromise { return this.httpRequest.request({ - method: 'POST', - url: '/api/v1/profile/change_email', + method: "POST", + url: "/api/v1/profile/change_email", body: requestBody, - mediaType: 'application/json', + mediaType: "application/json", errors: { 422: `Validation Error`, }, @@ -167,16 +143,12 @@ export class AuthService { * @returns void * @throws ApiError */ - public confirmEmailChange({ - requestBody, - }: { - requestBody: ConfirmEmailChangePayload, - }): CancelablePromise { + public confirmEmailChange({ requestBody }: { requestBody: ConfirmEmailChangePayload }): CancelablePromise { return this.httpRequest.request({ - method: 'POST', - url: '/api/v1/auth/confirm_email_change', + method: "POST", + url: "/api/v1/auth/confirm_email_change", body: requestBody, - mediaType: 'application/json', + mediaType: "application/json", errors: { 422: `Validation Error`, }, @@ -187,16 +159,12 @@ export class AuthService { * @returns void * @throws ApiError */ - public recoverPassword({ - requestBody, - }: { - requestBody: RecoverPasswordPayload, - }): CancelablePromise { + public recoverPassword({ requestBody }: { requestBody: RecoverPasswordPayload }): CancelablePromise { return this.httpRequest.request({ - method: 'POST', - url: '/api/v1/auth/recover_password', + method: "POST", + url: "/api/v1/auth/recover_password", body: requestBody, - mediaType: 'application/json', + mediaType: "application/json", errors: { 422: `Validation Error`, }, @@ -210,13 +178,13 @@ export class AuthService { public confirmPasswordRecovery({ requestBody, }: { - requestBody: ConfirmPasswordRecoveryPayload, + requestBody: ConfirmPasswordRecoveryPayload; }): CancelablePromise { return this.httpRequest.request({ - method: 'POST', - url: '/api/v1/auth/confirm_password_recovery', + method: "POST", + url: "/api/v1/auth/confirm_password_recovery", body: requestBody, - mediaType: 'application/json', + mediaType: "application/json", errors: { 422: `Validation Error`, }, @@ -227,16 +195,12 @@ export class AuthService { * @returns void * @throws ApiError */ - public deleteSession({ - requestBody, - }: { - requestBody: DeleteSessionPayload, - }): CancelablePromise { + public deleteSession({ requestBody }: { requestBody: DeleteSessionPayload }): CancelablePromise { return this.httpRequest.request({ - method: 'POST', - url: '/api/v1/auth/delete_session', + method: "POST", + url: "/api/v1/auth/delete_session", body: requestBody, - mediaType: 'application/json', + mediaType: "application/json", errors: { 422: `Validation Error`, }, @@ -247,16 +211,12 @@ export class AuthService { * @returns void * @throws ApiError */ - public renameSession({ - requestBody, - }: { - requestBody: RenameSessionPayload, - }): CancelablePromise { + public renameSession({ requestBody }: { requestBody: RenameSessionPayload }): CancelablePromise { return this.httpRequest.request({ - method: 'POST', - url: '/api/v1/auth/rename_session', + method: "POST", + url: "/api/v1/auth/rename_session", body: requestBody, - mediaType: 'application/json', + mediaType: "application/json", errors: { 422: `Validation Error`, }, diff --git a/frontend/libs/api/src/lib/generated/services/CommonService.ts b/frontend/libs/api/src/lib/generated/services/CommonService.ts index 4f6588f..9021c69 100644 --- a/frontend/libs/api/src/lib/generated/services/CommonService.ts +++ b/frontend/libs/api/src/lib/generated/services/CommonService.ts @@ -2,9 +2,9 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -import type { VersionResponse } from '../models/VersionResponse'; -import type { CancelablePromise } from '../core/CancelablePromise'; -import type { BaseHttpRequest } from '../core/BaseHttpRequest'; +import type { VersionResponse } from "../models/VersionResponse"; +import type { CancelablePromise } from "../core/CancelablePromise"; +import type { BaseHttpRequest } from "../core/BaseHttpRequest"; export class CommonService { constructor(public readonly httpRequest: BaseHttpRequest) {} /** @@ -14,8 +14,8 @@ export class CommonService { */ public getVersion(): CancelablePromise { return this.httpRequest.request({ - method: 'GET', - url: '/api/version', + method: "GET", + url: "/api/version", }); } } diff --git a/frontend/libs/api/src/lib/generated/services/GroupsService.ts b/frontend/libs/api/src/lib/generated/services/GroupsService.ts index ddf3e5c..376afd5 100644 --- a/frontend/libs/api/src/lib/generated/services/GroupsService.ts +++ b/frontend/libs/api/src/lib/generated/services/GroupsService.ts @@ -2,18 +2,18 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -import type { CreateInvitePayload } from '../models/CreateInvitePayload'; -import type { Group } from '../models/Group'; -import type { GroupInvite } from '../models/GroupInvite'; -import type { GroupLog } from '../models/GroupLog'; -import type { GroupMember } from '../models/GroupMember'; -import type { GroupMessage } from '../models/GroupMessage'; -import type { GroupPayload } from '../models/GroupPayload'; -import type { GroupPreview } from '../models/GroupPreview'; -import type { PreviewGroupPayload } from '../models/PreviewGroupPayload'; -import type { UpdateGroupMemberPayload } from '../models/UpdateGroupMemberPayload'; -import type { CancelablePromise } from '../core/CancelablePromise'; -import type { BaseHttpRequest } from '../core/BaseHttpRequest'; +import type { CreateInvitePayload } from "../models/CreateInvitePayload"; +import type { Group } from "../models/Group"; +import type { GroupInvite } from "../models/GroupInvite"; +import type { GroupLog } from "../models/GroupLog"; +import type { GroupMember } from "../models/GroupMember"; +import type { GroupMessage } from "../models/GroupMessage"; +import type { GroupPayload } from "../models/GroupPayload"; +import type { GroupPreview } from "../models/GroupPreview"; +import type { PreviewGroupPayload } from "../models/PreviewGroupPayload"; +import type { UpdateGroupMemberPayload } from "../models/UpdateGroupMemberPayload"; +import type { CancelablePromise } from "../core/CancelablePromise"; +import type { BaseHttpRequest } from "../core/BaseHttpRequest"; export class GroupsService { constructor(public readonly httpRequest: BaseHttpRequest) {} /** @@ -21,16 +21,12 @@ export class GroupsService { * @returns GroupPreview Successful Response * @throws ApiError */ - public previewGroup({ - requestBody, - }: { - requestBody: PreviewGroupPayload, - }): CancelablePromise { + public previewGroup({ requestBody }: { requestBody: PreviewGroupPayload }): CancelablePromise { return this.httpRequest.request({ - method: 'POST', - url: '/api/v1/groups/preview', + method: "POST", + url: "/api/v1/groups/preview", body: requestBody, - mediaType: 'application/json', + mediaType: "application/json", errors: { 401: `unauthorized`, 403: `forbidden`, @@ -44,16 +40,12 @@ export class GroupsService { * @returns Group Successful Response * @throws ApiError */ - public joinGroup({ - requestBody, - }: { - requestBody: PreviewGroupPayload, - }): CancelablePromise { + public joinGroup({ requestBody }: { requestBody: PreviewGroupPayload }): CancelablePromise { return this.httpRequest.request({ - method: 'POST', - url: '/api/v1/groups/join', + method: "POST", + url: "/api/v1/groups/join", body: requestBody, - mediaType: 'application/json', + mediaType: "application/json", errors: { 401: `unauthorized`, 403: `forbidden`, @@ -69,8 +61,8 @@ export class GroupsService { */ public listGroups(): CancelablePromise> { return this.httpRequest.request({ - method: 'GET', - url: '/api/v1/groups', + method: "GET", + url: "/api/v1/groups", errors: { 401: `unauthorized`, 403: `forbidden`, @@ -83,16 +75,12 @@ export class GroupsService { * @returns Group Successful Response * @throws ApiError */ - public createGroup({ - requestBody, - }: { - requestBody: GroupPayload, - }): CancelablePromise { + public createGroup({ requestBody }: { requestBody: GroupPayload }): CancelablePromise { return this.httpRequest.request({ - method: 'POST', - url: '/api/v1/groups', + method: "POST", + url: "/api/v1/groups", body: requestBody, - mediaType: 'application/json', + mediaType: "application/json", errors: { 401: `unauthorized`, 403: `forbidden`, @@ -106,16 +94,12 @@ export class GroupsService { * @returns Group Successful Response * @throws ApiError */ - public getGroup({ - groupId, - }: { - groupId: number, - }): CancelablePromise { + public getGroup({ groupId }: { groupId: number }): CancelablePromise { return this.httpRequest.request({ - method: 'GET', - url: '/api/v1/groups/{group_id}', + method: "GET", + url: "/api/v1/groups/{group_id}", path: { - 'group_id': groupId, + group_id: groupId, }, errors: { 401: `unauthorized`, @@ -134,17 +118,17 @@ export class GroupsService { groupId, requestBody, }: { - groupId: number, - requestBody: GroupPayload, + groupId: number; + requestBody: GroupPayload; }): CancelablePromise { return this.httpRequest.request({ - method: 'POST', - url: '/api/v1/groups/{group_id}', + method: "POST", + url: "/api/v1/groups/{group_id}", path: { - 'group_id': groupId, + group_id: groupId, }, body: requestBody, - mediaType: 'application/json', + mediaType: "application/json", errors: { 401: `unauthorized`, 403: `forbidden`, @@ -158,16 +142,12 @@ export class GroupsService { * @returns void * @throws ApiError */ - public deleteGroup({ - groupId, - }: { - groupId: number, - }): CancelablePromise { + public deleteGroup({ groupId }: { groupId: number }): CancelablePromise { return this.httpRequest.request({ - method: 'DELETE', - url: '/api/v1/groups/{group_id}', + method: "DELETE", + url: "/api/v1/groups/{group_id}", path: { - 'group_id': groupId, + group_id: groupId, }, errors: { 401: `unauthorized`, @@ -182,16 +162,12 @@ export class GroupsService { * @returns void * @throws ApiError */ - public leaveGroup({ - groupId, - }: { - groupId: number, - }): CancelablePromise { + public leaveGroup({ groupId }: { groupId: number }): CancelablePromise { return this.httpRequest.request({ - method: 'POST', - url: '/api/v1/groups/{group_id}/leave', + method: "POST", + url: "/api/v1/groups/{group_id}/leave", path: { - 'group_id': groupId, + group_id: groupId, }, errors: { 401: `unauthorized`, @@ -206,16 +182,12 @@ export class GroupsService { * @returns GroupMember Successful Response * @throws ApiError */ - public listMembers({ - groupId, - }: { - groupId: number, - }): CancelablePromise> { + public listMembers({ groupId }: { groupId: number }): CancelablePromise> { return this.httpRequest.request({ - method: 'GET', - url: '/api/v1/groups/{group_id}/members', + method: "GET", + url: "/api/v1/groups/{group_id}/members", path: { - 'group_id': groupId, + group_id: groupId, }, errors: { 401: `unauthorized`, @@ -234,17 +206,17 @@ export class GroupsService { groupId, requestBody, }: { - groupId: number, - requestBody: UpdateGroupMemberPayload, + groupId: number; + requestBody: UpdateGroupMemberPayload; }): CancelablePromise { return this.httpRequest.request({ - method: 'POST', - url: '/api/v1/groups/{group_id}/members', + method: "POST", + url: "/api/v1/groups/{group_id}/members", path: { - 'group_id': groupId, + group_id: groupId, }, body: requestBody, - mediaType: 'application/json', + mediaType: "application/json", errors: { 401: `unauthorized`, 403: `forbidden`, @@ -258,16 +230,12 @@ export class GroupsService { * @returns GroupLog Successful Response * @throws ApiError */ - public listLog({ - groupId, - }: { - groupId: number, - }): CancelablePromise> { + public listLog({ groupId }: { groupId: number }): CancelablePromise> { return this.httpRequest.request({ - method: 'GET', - url: '/api/v1/groups/{group_id}/logs', + method: "GET", + url: "/api/v1/groups/{group_id}/logs", path: { - 'group_id': groupId, + group_id: groupId, }, errors: { 401: `unauthorized`, @@ -286,17 +254,17 @@ export class GroupsService { groupId, requestBody, }: { - groupId: number, - requestBody: GroupMessage, + groupId: number; + requestBody: GroupMessage; }): CancelablePromise { return this.httpRequest.request({ - method: 'POST', - url: '/api/v1/groups/{group_id}/send_message', + method: "POST", + url: "/api/v1/groups/{group_id}/send_message", path: { - 'group_id': groupId, + group_id: groupId, }, body: requestBody, - mediaType: 'application/json', + mediaType: "application/json", errors: { 401: `unauthorized`, 403: `forbidden`, @@ -310,16 +278,12 @@ export class GroupsService { * @returns GroupInvite Successful Response * @throws ApiError */ - public listInvites({ - groupId, - }: { - groupId: number, - }): CancelablePromise> { + public listInvites({ groupId }: { groupId: number }): CancelablePromise> { return this.httpRequest.request({ - method: 'GET', - url: '/api/v1/groups/{group_id}/invites', + method: "GET", + url: "/api/v1/groups/{group_id}/invites", path: { - 'group_id': groupId, + group_id: groupId, }, errors: { 401: `unauthorized`, @@ -338,17 +302,17 @@ export class GroupsService { groupId, requestBody, }: { - groupId: number, - requestBody: CreateInvitePayload, + groupId: number; + requestBody: CreateInvitePayload; }): CancelablePromise { return this.httpRequest.request({ - method: 'POST', - url: '/api/v1/groups/{group_id}/invites', + method: "POST", + url: "/api/v1/groups/{group_id}/invites", path: { - 'group_id': groupId, + group_id: groupId, }, body: requestBody, - mediaType: 'application/json', + mediaType: "application/json", errors: { 401: `unauthorized`, 403: `forbidden`, @@ -362,19 +326,13 @@ export class GroupsService { * @returns void * @throws ApiError */ - public deleteInvite({ - groupId, - inviteId, - }: { - groupId: number, - inviteId: number, - }): CancelablePromise { + public deleteInvite({ groupId, inviteId }: { groupId: number; inviteId: number }): CancelablePromise { return this.httpRequest.request({ - method: 'DELETE', - url: '/api/v1/groups/{group_id}/invites/{invite_id}', + method: "DELETE", + url: "/api/v1/groups/{group_id}/invites/{invite_id}", path: { - 'group_id': groupId, - 'invite_id': inviteId, + group_id: groupId, + invite_id: inviteId, }, errors: { 401: `unauthorized`, @@ -389,16 +347,12 @@ export class GroupsService { * @returns any Successful Response * @throws ApiError */ - public archiveGroup({ - groupId, - }: { - groupId: number, - }): CancelablePromise { + public archiveGroup({ groupId }: { groupId: number }): CancelablePromise { return this.httpRequest.request({ - method: 'POST', - url: '/api/v1/groups/{group_id}/archive', + method: "POST", + url: "/api/v1/groups/{group_id}/archive", path: { - 'group_id': groupId, + group_id: groupId, }, errors: { 401: `unauthorized`, @@ -413,16 +367,12 @@ export class GroupsService { * @returns any Successful Response * @throws ApiError */ - public unarchiveGroup({ - groupId, - }: { - groupId: number, - }): CancelablePromise { + public unarchiveGroup({ groupId }: { groupId: number }): CancelablePromise { return this.httpRequest.request({ - method: 'POST', - url: '/api/v1/groups/{group_id}/un-archive', + method: "POST", + url: "/api/v1/groups/{group_id}/un-archive", path: { - 'group_id': groupId, + group_id: groupId, }, errors: { 401: `unauthorized`, diff --git a/frontend/libs/api/src/lib/generated/services/TransactionsService.ts b/frontend/libs/api/src/lib/generated/services/TransactionsService.ts index 2edb79f..49855b4 100644 --- a/frontend/libs/api/src/lib/generated/services/TransactionsService.ts +++ b/frontend/libs/api/src/lib/generated/services/TransactionsService.ts @@ -2,12 +2,12 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -import type { NewTransaction } from '../models/NewTransaction'; -import type { Transaction } from '../models/Transaction'; -import type { UpdatePositionsPayload } from '../models/UpdatePositionsPayload'; -import type { UpdateTransaction } from '../models/UpdateTransaction'; -import type { CancelablePromise } from '../core/CancelablePromise'; -import type { BaseHttpRequest } from '../core/BaseHttpRequest'; +import type { NewTransaction } from "../models/NewTransaction"; +import type { Transaction } from "../models/Transaction"; +import type { UpdatePositionsPayload } from "../models/UpdatePositionsPayload"; +import type { UpdateTransaction } from "../models/UpdateTransaction"; +import type { CancelablePromise } from "../core/CancelablePromise"; +import type { BaseHttpRequest } from "../core/BaseHttpRequest"; export class TransactionsService { constructor(public readonly httpRequest: BaseHttpRequest) {} /** @@ -20,19 +20,19 @@ export class TransactionsService { minLastChanged, transactionIds, }: { - groupId: number, - minLastChanged?: (string | null), - transactionIds?: (string | null), + groupId: number; + minLastChanged?: string | null; + transactionIds?: string | null; }): CancelablePromise> { return this.httpRequest.request({ - method: 'GET', - url: '/api/v1/groups/{group_id}/transactions', + method: "GET", + url: "/api/v1/groups/{group_id}/transactions", path: { - 'group_id': groupId, + group_id: groupId, }, query: { - 'min_last_changed': minLastChanged, - 'transaction_ids': transactionIds, + min_last_changed: minLastChanged, + transaction_ids: transactionIds, }, errors: { 401: `unauthorized`, @@ -51,17 +51,17 @@ export class TransactionsService { groupId, requestBody, }: { - groupId: number, - requestBody: NewTransaction, + groupId: number; + requestBody: NewTransaction; }): CancelablePromise { return this.httpRequest.request({ - method: 'POST', - url: '/api/v1/groups/{group_id}/transactions', + method: "POST", + url: "/api/v1/groups/{group_id}/transactions", path: { - 'group_id': groupId, + group_id: groupId, }, body: requestBody, - mediaType: 'application/json', + mediaType: "application/json", errors: { 401: `unauthorized`, 403: `forbidden`, @@ -79,15 +79,15 @@ export class TransactionsService { groupId, transactionId, }: { - groupId: number, - transactionId: number, + groupId: number; + transactionId: number; }): CancelablePromise { return this.httpRequest.request({ - method: 'GET', - url: '/api/v1/groups/{group_id}/transactions/{transaction_id}', + method: "GET", + url: "/api/v1/groups/{group_id}/transactions/{transaction_id}", path: { - 'group_id': groupId, - 'transaction_id': transactionId, + group_id: groupId, + transaction_id: transactionId, }, errors: { 401: `unauthorized`, @@ -107,19 +107,19 @@ export class TransactionsService { transactionId, requestBody, }: { - groupId: number, - transactionId: number, - requestBody: UpdateTransaction, + groupId: number; + transactionId: number; + requestBody: UpdateTransaction; }): CancelablePromise { return this.httpRequest.request({ - method: 'POST', - url: '/api/v1/groups/{group_id}/transactions/{transaction_id}', + method: "POST", + url: "/api/v1/groups/{group_id}/transactions/{transaction_id}", path: { - 'group_id': groupId, - 'transaction_id': transactionId, + group_id: groupId, + transaction_id: transactionId, }, body: requestBody, - mediaType: 'application/json', + mediaType: "application/json", errors: { 401: `unauthorized`, 403: `forbidden`, @@ -137,15 +137,15 @@ export class TransactionsService { groupId, transactionId, }: { - groupId: number, - transactionId: number, + groupId: number; + transactionId: number; }): CancelablePromise { return this.httpRequest.request({ - method: 'DELETE', - url: '/api/v1/groups/{group_id}/transactions/{transaction_id}', + method: "DELETE", + url: "/api/v1/groups/{group_id}/transactions/{transaction_id}", path: { - 'group_id': groupId, - 'transaction_id': transactionId, + group_id: groupId, + transaction_id: transactionId, }, errors: { 401: `unauthorized`, @@ -165,19 +165,19 @@ export class TransactionsService { transactionId, requestBody, }: { - groupId: number, - transactionId: number, - requestBody: UpdatePositionsPayload, + groupId: number; + transactionId: number; + requestBody: UpdatePositionsPayload; }): CancelablePromise { return this.httpRequest.request({ - method: 'POST', - url: '/api/v1/groups/{group_id}/transactions/{transaction_id}/positions', + method: "POST", + url: "/api/v1/groups/{group_id}/transactions/{transaction_id}/positions", path: { - 'group_id': groupId, - 'transaction_id': transactionId, + group_id: groupId, + transaction_id: transactionId, }, body: requestBody, - mediaType: 'application/json', + mediaType: "application/json", errors: { 401: `unauthorized`, 403: `forbidden`, @@ -191,19 +191,13 @@ export class TransactionsService { * @returns any Successful Response * @throws ApiError */ - public getFileContents({ - fileId, - blobId, - }: { - fileId: number, - blobId: number, - }): CancelablePromise { + public getFileContents({ fileId, blobId }: { fileId: number; blobId: number }): CancelablePromise { return this.httpRequest.request({ - method: 'GET', - url: '/api/v1/files/{file_id}/{blob_id}', + method: "GET", + url: "/api/v1/files/{file_id}/{blob_id}", path: { - 'file_id': fileId, - 'blob_id': blobId, + file_id: fileId, + blob_id: blobId, }, errors: { 401: `unauthorized`,