## 概要 [Task3569: データ削除ツール作成+動作確認](https://paruru.nds-tyo.co.jp:8443/tfs/ReciproCollection/fa4924a4-d079-4fab-9fb5-a9a11eb205f0/_workitems/edit/3569) - データ削除ツールを実装しました。 - Blobストレージからのコンテナ削除 - ADB2Cからのユーザー削除 - DBの全削除 - Auto Incrementの設定 ## レビューポイント - Blobストレージの削除対象の取得に問題はないでしょうか? - 3つのリージョン内のすべてのコンテナを取得してから、取得したコンテナを全削除するようにしています。 - ADB2Cの削除対象の取得に問題はないでしょうか? - ローカルアカウントなユーザーのみを取得してから、取得したユーザーを全削除するようにしています。 - フォルダ構成に違和感はないでしょうか? ## UIの変更 - [Task3569](https://ndstokyo.sharepoint.com/:f:/r/sites/Piranha/Shared%20Documents/General/OMDS/%E3%82%B9%E3%82%AF%E3%83%AA%E3%83%BC%E3%83%B3%E3%82%B7%E3%83%A7%E3%83%83%E3%83%88/Task3569?csf=1&web=1&e=wU1st1) ## 動作確認状況 - ローカルで確認 - DB操作のみ確認しています。Azureリソースの削除についてはdevelop環境で改めて実施します。
147 lines
4.7 KiB
TypeScript
147 lines
4.7 KiB
TypeScript
/* tslint:disable */
|
|
/* eslint-disable */
|
|
/**
|
|
* ODMSOpenAPI
|
|
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
*
|
|
* The version of the OpenAPI document: 1.0.0
|
|
*
|
|
*
|
|
* 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, AxiosRequestConfig } 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';
|
|
import type { RequestArgs } from './base';
|
|
// @ts-ignore
|
|
import { BASE_PATH, COLLECTION_FORMATS, BaseAPI, RequiredError, operationServerMap } from './base';
|
|
|
|
/**
|
|
*
|
|
* @export
|
|
* @interface ErrorResponse
|
|
*/
|
|
export interface ErrorResponse {
|
|
/**
|
|
*
|
|
* @type {string}
|
|
* @memberof ErrorResponse
|
|
*/
|
|
'message': string;
|
|
/**
|
|
*
|
|
* @type {string}
|
|
* @memberof ErrorResponse
|
|
*/
|
|
'code': string;
|
|
}
|
|
|
|
/**
|
|
* DeleteApi - axios parameter creator
|
|
* @export
|
|
*/
|
|
export const DeleteApiAxiosParamCreator = function (configuration?: Configuration) {
|
|
return {
|
|
/**
|
|
* すべてのデータを削除します
|
|
* @summary
|
|
* @param {*} [options] Override http request option.
|
|
* @throws {RequiredError}
|
|
*/
|
|
deleteData: async (options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
const localVarPath = `/delete`;
|
|
// 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,
|
|
};
|
|
},
|
|
}
|
|
};
|
|
|
|
/**
|
|
* DeleteApi - functional programming interface
|
|
* @export
|
|
*/
|
|
export const DeleteApiFp = function(configuration?: Configuration) {
|
|
const localVarAxiosParamCreator = DeleteApiAxiosParamCreator(configuration)
|
|
return {
|
|
/**
|
|
* すべてのデータを削除します
|
|
* @summary
|
|
* @param {*} [options] Override http request option.
|
|
* @throws {RequiredError}
|
|
*/
|
|
async deleteData(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<object>> {
|
|
const localVarAxiosArgs = await localVarAxiosParamCreator.deleteData(options);
|
|
const index = configuration?.serverIndex ?? 0;
|
|
const operationBasePath = operationServerMap['DeleteApi.deleteData']?.[index]?.url;
|
|
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath);
|
|
},
|
|
}
|
|
};
|
|
|
|
/**
|
|
* DeleteApi - factory interface
|
|
* @export
|
|
*/
|
|
export const DeleteApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
|
|
const localVarFp = DeleteApiFp(configuration)
|
|
return {
|
|
/**
|
|
* すべてのデータを削除します
|
|
* @summary
|
|
* @param {*} [options] Override http request option.
|
|
* @throws {RequiredError}
|
|
*/
|
|
deleteData(options?: any): AxiosPromise<object> {
|
|
return localVarFp.deleteData(options).then((request) => request(axios, basePath));
|
|
},
|
|
};
|
|
};
|
|
|
|
/**
|
|
* DeleteApi - object-oriented interface
|
|
* @export
|
|
* @class DeleteApi
|
|
* @extends {BaseAPI}
|
|
*/
|
|
export class DeleteApi extends BaseAPI {
|
|
/**
|
|
* すべてのデータを削除します
|
|
* @summary
|
|
* @param {*} [options] Override http request option.
|
|
* @throws {RequiredError}
|
|
* @memberof DeleteApi
|
|
*/
|
|
public deleteData(options?: AxiosRequestConfig) {
|
|
return DeleteApiFp(this.configuration).deleteData(options).then((request) => request(this.axios, this.basePath));
|
|
}
|
|
}
|
|
|
|
|
|
|