-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #111 from bas-kirill/feature/logout
feat(logout): add logout button and server side processing
- Loading branch information
Showing
35 changed files
with
602 additions
and
107 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,171 @@ | ||
/* tslint:disable */ | ||
/* eslint-disable */ | ||
/** | ||
* Country | ||
* Basic Material | ||
* | ||
* The version of the OpenAPI document: 1.0.0 | ||
* Contact: [email protected] | ||
* | ||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). | ||
* https://openapi-generator.tech | ||
* Do not edit the class manually. | ||
*/ | ||
|
||
import type { Configuration } from "../configuration"; | ||
import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from "axios"; | ||
import globalAxios from "axios"; | ||
// Some imports not used depending on template conditions | ||
// @ts-ignore | ||
import { | ||
DUMMY_BASE_URL, | ||
assertParamExists, | ||
setApiKeyToObject, | ||
setBasicAuthToObject, | ||
setBearerAuthToObject, | ||
setOAuthToObject, | ||
setSearchParams, | ||
serializeDataIfNeeded, | ||
toPathString, | ||
createRequestFunction, | ||
} from "../common"; | ||
// @ts-ignore | ||
import { | ||
BASE_PATH, | ||
COLLECTION_FORMATS, | ||
type RequestArgs, | ||
BaseAPI, | ||
RequiredError, | ||
operationServerMap, | ||
} from "../base"; | ||
// @ts-ignore | ||
import type { ServerError } from "../model"; | ||
/** | ||
* LogoutApi - axios parameter creator | ||
* @export | ||
*/ | ||
export const LogoutApiAxiosParamCreator = function ( | ||
configuration?: Configuration, | ||
) { | ||
return { | ||
/** | ||
* Logout Endpoint | ||
* @summary Logout Endpoint | ||
* @param {*} [options] Override http request option. | ||
* @throws {RequiredError} | ||
*/ | ||
logout: async ( | ||
options: RawAxiosRequestConfig = {}, | ||
): Promise<RequestArgs> => { | ||
const localVarPath = `/api/auth/logout`; | ||
// use dummy base URL string because the URL constructor only accepts absolute URLs. | ||
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); | ||
let baseOptions; | ||
if (configuration) { | ||
baseOptions = configuration.baseOptions; | ||
} | ||
|
||
const localVarRequestOptions = { | ||
method: "POST", | ||
...baseOptions, | ||
...options, | ||
}; | ||
const localVarHeaderParameter = {} as any; | ||
const localVarQueryParameter = {} as any; | ||
|
||
setSearchParams(localVarUrlObj, localVarQueryParameter); | ||
let headersFromBaseOptions = | ||
baseOptions && baseOptions.headers ? baseOptions.headers : {}; | ||
localVarRequestOptions.headers = { | ||
...localVarHeaderParameter, | ||
...headersFromBaseOptions, | ||
...options.headers, | ||
}; | ||
|
||
return { | ||
url: toPathString(localVarUrlObj), | ||
options: localVarRequestOptions, | ||
}; | ||
}, | ||
}; | ||
}; | ||
|
||
/** | ||
* LogoutApi - functional programming interface | ||
* @export | ||
*/ | ||
export const LogoutApiFp = function (configuration?: Configuration) { | ||
const localVarAxiosParamCreator = LogoutApiAxiosParamCreator(configuration); | ||
return { | ||
/** | ||
* Logout Endpoint | ||
* @summary Logout Endpoint | ||
* @param {*} [options] Override http request option. | ||
* @throws {RequiredError} | ||
*/ | ||
async logout( | ||
options?: RawAxiosRequestConfig, | ||
): Promise< | ||
(axios?: AxiosInstance, basePath?: string) => AxiosPromise<object> | ||
> { | ||
const localVarAxiosArgs = await localVarAxiosParamCreator.logout(options); | ||
const localVarOperationServerIndex = configuration?.serverIndex ?? 0; | ||
const localVarOperationServerBasePath = | ||
operationServerMap["LogoutApi.logout"]?.[localVarOperationServerIndex] | ||
?.url; | ||
return (axios, basePath) => | ||
createRequestFunction( | ||
localVarAxiosArgs, | ||
globalAxios, | ||
BASE_PATH, | ||
configuration, | ||
)(axios, localVarOperationServerBasePath || basePath); | ||
}, | ||
}; | ||
}; | ||
|
||
/** | ||
* LogoutApi - factory interface | ||
* @export | ||
*/ | ||
export const LogoutApiFactory = function ( | ||
configuration?: Configuration, | ||
basePath?: string, | ||
axios?: AxiosInstance, | ||
) { | ||
const localVarFp = LogoutApiFp(configuration); | ||
return { | ||
/** | ||
* Logout Endpoint | ||
* @summary Logout Endpoint | ||
* @param {*} [options] Override http request option. | ||
* @throws {RequiredError} | ||
*/ | ||
logout(options?: RawAxiosRequestConfig): AxiosPromise<object> { | ||
return localVarFp | ||
.logout(options) | ||
.then((request) => request(axios, basePath)); | ||
}, | ||
}; | ||
}; | ||
|
||
/** | ||
* LogoutApi - object-oriented interface | ||
* @export | ||
* @class LogoutApi | ||
* @extends {BaseAPI} | ||
*/ | ||
export class LogoutApi extends BaseAPI { | ||
/** | ||
* Logout Endpoint | ||
* @summary Logout Endpoint | ||
* @param {*} [options] Override http request option. | ||
* @throws {RequiredError} | ||
* @memberof LogoutApi | ||
*/ | ||
public logout(options?: RawAxiosRequestConfig) { | ||
return LogoutApiFp(this.configuration) | ||
.logout(options) | ||
.then((request) => request(this.axios, this.basePath)); | ||
} | ||
} |
85 changes: 85 additions & 0 deletions
85
client/src/generated/model/instrument-detail-without-id.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
/* tslint:disable */ | ||
/* eslint-disable */ | ||
/** | ||
* Country | ||
* Basic Material | ||
* | ||
* The version of the OpenAPI document: 1.0.0 | ||
* Contact: [email protected] | ||
* | ||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). | ||
* https://openapi-generator.tech | ||
* Do not edit the class manually. | ||
*/ | ||
|
||
// May contain unused imports in some cases | ||
// @ts-ignore | ||
import type { BasicMaterial } from "./basic-material"; | ||
// May contain unused imports in some cases | ||
// @ts-ignore | ||
import type { Country } from "./country"; | ||
// May contain unused imports in some cases | ||
// @ts-ignore | ||
import type { InstrumentName } from "./instrument-name"; | ||
// May contain unused imports in some cases | ||
// @ts-ignore | ||
import type { InstrumentType } from "./instrument-type"; | ||
// May contain unused imports in some cases | ||
// @ts-ignore | ||
import type { ManufactureDate } from "./manufacture-date"; | ||
// May contain unused imports in some cases | ||
// @ts-ignore | ||
import type { ManufacturerName } from "./manufacturer-name"; | ||
// May contain unused imports in some cases | ||
// @ts-ignore | ||
import type { ReleaseDate } from "./release-date"; | ||
|
||
/** | ||
* | ||
* @export | ||
* @interface InstrumentDetailWithoutId | ||
*/ | ||
export interface InstrumentDetailWithoutId { | ||
/** | ||
* | ||
* @type {InstrumentName} | ||
* @memberof InstrumentDetailWithoutId | ||
*/ | ||
instrument_name: InstrumentName; | ||
/** | ||
* | ||
* @type {InstrumentType} | ||
* @memberof InstrumentDetailWithoutId | ||
*/ | ||
instrument_type: InstrumentType; | ||
/** | ||
* | ||
* @type {ManufacturerName} | ||
* @memberof InstrumentDetailWithoutId | ||
*/ | ||
manufacturer_name: ManufacturerName; | ||
/** | ||
* | ||
* @type {ManufactureDate} | ||
* @memberof InstrumentDetailWithoutId | ||
*/ | ||
manufacturer_date: ManufactureDate; | ||
/** | ||
* | ||
* @type {ReleaseDate} | ||
* @memberof InstrumentDetailWithoutId | ||
*/ | ||
release_date: ReleaseDate; | ||
/** | ||
* | ||
* @type {Country} | ||
* @memberof InstrumentDetailWithoutId | ||
*/ | ||
country: Country; | ||
/** | ||
* | ||
* @type {Array<BasicMaterial>} | ||
* @memberof InstrumentDetailWithoutId | ||
*/ | ||
basic_materials: Array<BasicMaterial>; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
/* tslint:disable */ | ||
/* eslint-disable */ | ||
/** | ||
* Country | ||
* Basic Material | ||
* | ||
* The version of the OpenAPI document: 1.0.0 | ||
* Contact: [email protected] | ||
* | ||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). | ||
* https://openapi-generator.tech | ||
* Do not edit the class manually. | ||
*/ | ||
|
||
/** | ||
* | ||
* @export | ||
* @interface InstrumentPhoto | ||
*/ | ||
export interface InstrumentPhoto { | ||
/** | ||
* | ||
* @type {string} | ||
* @memberof InstrumentPhoto | ||
*/ | ||
photo: string; | ||
} |
Oops, something went wrong.