Merged PR 402: API IF実装
## 概要 [Task2620: API IF実装](https://paruru.nds-tyo.co.jp:8443/tfs/ReciproCollection/fa4924a4-d079-4fab-9fb5-a9a11eb205f0/_workitems/edit/2620) - ActiveWorktypeAPIのIFを実装しました。 - クライアントはIF反映だけしています。 ## レビューポイント - IFはラフスケッチの認識通りか - 制約に問題はないか。 - クライアントの対応に問題はないか ## UIの変更 - なし ## 動作確認状況 - ローカルで確認
This commit is contained in:
parent
3e12721a92
commit
3f17ec615c
@ -663,6 +663,19 @@ export interface GetMyAccountResponse {
|
||||
*/
|
||||
'account': Account;
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface GetOptionItemsResponse
|
||||
*/
|
||||
export interface GetOptionItemsResponse {
|
||||
/**
|
||||
*
|
||||
* @type {Array<GetWorktypeOptionItem>}
|
||||
* @memberof GetOptionItemsResponse
|
||||
*/
|
||||
'optionItems': Array<GetWorktypeOptionItem>;
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
@ -908,6 +921,37 @@ export interface GetUsersResponse {
|
||||
*/
|
||||
'users': Array<User>;
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface GetWorktypeOptionItem
|
||||
*/
|
||||
export interface GetWorktypeOptionItem {
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof GetWorktypeOptionItem
|
||||
*/
|
||||
'itemLabel': string;
|
||||
/**
|
||||
* Default / Blank / LastInput
|
||||
* @type {string}
|
||||
* @memberof GetWorktypeOptionItem
|
||||
*/
|
||||
'defaultValueType': string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof GetWorktypeOptionItem
|
||||
*/
|
||||
'initialValue': string;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof GetWorktypeOptionItem
|
||||
*/
|
||||
'id': number;
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
@ -920,6 +964,12 @@ export interface GetWorktypesResponse {
|
||||
* @memberof GetWorktypesResponse
|
||||
*/
|
||||
'worktypes': Array<Worktype>;
|
||||
/**
|
||||
* Active WorktypeIDに設定されているWorkTypeの内部ID
|
||||
* @type {number}
|
||||
* @memberof GetWorktypesResponse
|
||||
*/
|
||||
'acrive'?: number;
|
||||
}
|
||||
/**
|
||||
*
|
||||
@ -1145,6 +1195,19 @@ export interface PartnerLicenseInfo {
|
||||
*/
|
||||
'issueRequesting': number;
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface PostActiveWorktypeRequest
|
||||
*/
|
||||
export interface PostActiveWorktypeRequest {
|
||||
/**
|
||||
* Active WorkTypeIDにするWorktypeの内部ID
|
||||
* @type {number}
|
||||
* @memberof PostActiveWorktypeRequest
|
||||
*/
|
||||
'id'?: number;
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
@ -1238,6 +1301,31 @@ export interface PostUpdateUserRequest {
|
||||
*/
|
||||
'prompt'?: boolean;
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface PostWorktypeOptionItem
|
||||
*/
|
||||
export interface PostWorktypeOptionItem {
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof PostWorktypeOptionItem
|
||||
*/
|
||||
'itemLabel': string;
|
||||
/**
|
||||
* Default / Blank / LastInput
|
||||
* @type {string}
|
||||
* @memberof PostWorktypeOptionItem
|
||||
*/
|
||||
'defaultValueType': string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof PostWorktypeOptionItem
|
||||
*/
|
||||
'initialValue': string;
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
@ -1577,6 +1665,19 @@ export interface TypistGroup {
|
||||
*/
|
||||
'name': string;
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface UpdateOptionItemsRequest
|
||||
*/
|
||||
export interface UpdateOptionItemsRequest {
|
||||
/**
|
||||
*
|
||||
* @type {Array<PostWorktypeOptionItem>}
|
||||
* @memberof UpdateOptionItemsRequest
|
||||
*/
|
||||
'optionItems': Array<PostWorktypeOptionItem>;
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
@ -1744,6 +1845,46 @@ export interface Worktype {
|
||||
*/
|
||||
export const AccountsApiAxiosParamCreator = function (configuration?: Configuration) {
|
||||
return {
|
||||
/**
|
||||
*
|
||||
* @summary
|
||||
* @param {PostActiveWorktypeRequest} postActiveWorktypeRequest
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
activeWorktype: async (postActiveWorktypeRequest: PostActiveWorktypeRequest, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'postActiveWorktypeRequest' is not null or undefined
|
||||
assertParamExists('activeWorktype', 'postActiveWorktypeRequest', postActiveWorktypeRequest)
|
||||
const localVarPath = `/accounts/active-worktype`;
|
||||
// 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;
|
||||
|
||||
// authentication bearer required
|
||||
// http bearer authentication required
|
||||
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
||||
|
||||
|
||||
|
||||
localVarHeaderParameter['Content-Type'] = 'application/json';
|
||||
|
||||
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
||||
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
||||
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
||||
localVarRequestOptions.data = serializeDataIfNeeded(postActiveWorktypeRequest, localVarRequestOptions, configuration)
|
||||
|
||||
return {
|
||||
url: toPathString(localVarUrlObj),
|
||||
options: localVarRequestOptions,
|
||||
};
|
||||
},
|
||||
/**
|
||||
* ライセンス発行をキャンセルします
|
||||
* @summary
|
||||
@ -2035,6 +2176,44 @@ export const AccountsApiAxiosParamCreator = function (configuration?: Configurat
|
||||
|
||||
|
||||
|
||||
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
||||
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
||||
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
||||
|
||||
return {
|
||||
url: toPathString(localVarUrlObj),
|
||||
options: localVarRequestOptions,
|
||||
};
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary
|
||||
* @param {number} id Worktypeの内部ID
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
getOptionItems: async (id: number, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'id' is not null or undefined
|
||||
assertParamExists('getOptionItems', 'id', id)
|
||||
const localVarPath = `/accounts/worktypes/{id}/option-items`
|
||||
.replace(`{${"id"}}`, encodeURIComponent(String(id)));
|
||||
// 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: 'GET', ...baseOptions, ...options};
|
||||
const localVarHeaderParameter = {} as any;
|
||||
const localVarQueryParameter = {} as any;
|
||||
|
||||
// authentication bearer required
|
||||
// http bearer authentication required
|
||||
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
||||
|
||||
|
||||
|
||||
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
||||
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
||||
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
||||
@ -2352,6 +2531,50 @@ export const AccountsApiAxiosParamCreator = function (configuration?: Configurat
|
||||
options: localVarRequestOptions,
|
||||
};
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary
|
||||
* @param {number} id Worktypeの内部ID
|
||||
* @param {UpdateOptionItemsRequest} updateOptionItemsRequest
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
updateOptionItems: async (id: number, updateOptionItemsRequest: UpdateOptionItemsRequest, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'id' is not null or undefined
|
||||
assertParamExists('updateOptionItems', 'id', id)
|
||||
// verify required parameter 'updateOptionItemsRequest' is not null or undefined
|
||||
assertParamExists('updateOptionItems', 'updateOptionItemsRequest', updateOptionItemsRequest)
|
||||
const localVarPath = `/accounts/worktypes/{id}/option-items`
|
||||
.replace(`{${"id"}}`, encodeURIComponent(String(id)));
|
||||
// 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;
|
||||
|
||||
// authentication bearer required
|
||||
// http bearer authentication required
|
||||
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
||||
|
||||
|
||||
|
||||
localVarHeaderParameter['Content-Type'] = 'application/json';
|
||||
|
||||
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
||||
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
||||
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
||||
localVarRequestOptions.data = serializeDataIfNeeded(updateOptionItemsRequest, localVarRequestOptions, configuration)
|
||||
|
||||
return {
|
||||
url: toPathString(localVarUrlObj),
|
||||
options: localVarRequestOptions,
|
||||
};
|
||||
},
|
||||
/**
|
||||
* ログインしているユーザーのアカウント配下でIDで指定されたタイピストグループを更新します
|
||||
* @summary
|
||||
@ -2450,6 +2673,17 @@ export const AccountsApiAxiosParamCreator = function (configuration?: Configurat
|
||||
export const AccountsApiFp = function(configuration?: Configuration) {
|
||||
const localVarAxiosParamCreator = AccountsApiAxiosParamCreator(configuration)
|
||||
return {
|
||||
/**
|
||||
*
|
||||
* @summary
|
||||
* @param {PostActiveWorktypeRequest} postActiveWorktypeRequest
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async activeWorktype(postActiveWorktypeRequest: PostActiveWorktypeRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<object>> {
|
||||
const localVarAxiosArgs = await localVarAxiosParamCreator.activeWorktype(postActiveWorktypeRequest, options);
|
||||
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
||||
},
|
||||
/**
|
||||
* ライセンス発行をキャンセルします
|
||||
* @summary
|
||||
@ -2536,6 +2770,17 @@ export const AccountsApiFp = function(configuration?: Configuration) {
|
||||
const localVarAxiosArgs = await localVarAxiosParamCreator.getMyAccount(options);
|
||||
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary
|
||||
* @param {number} id Worktypeの内部ID
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async getOptionItems(id: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<GetOptionItemsResponse>> {
|
||||
const localVarAxiosArgs = await localVarAxiosParamCreator.getOptionItems(id, options);
|
||||
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary
|
||||
@ -2622,6 +2867,18 @@ export const AccountsApiFp = function(configuration?: Configuration) {
|
||||
const localVarAxiosArgs = await localVarAxiosParamCreator.issueLicense(issueLicenseRequest, options);
|
||||
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary
|
||||
* @param {number} id Worktypeの内部ID
|
||||
* @param {UpdateOptionItemsRequest} updateOptionItemsRequest
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async updateOptionItems(id: number, updateOptionItemsRequest: UpdateOptionItemsRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<object>> {
|
||||
const localVarAxiosArgs = await localVarAxiosParamCreator.updateOptionItems(id, updateOptionItemsRequest, options);
|
||||
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
||||
},
|
||||
/**
|
||||
* ログインしているユーザーのアカウント配下でIDで指定されたタイピストグループを更新します
|
||||
* @summary
|
||||
@ -2656,6 +2913,16 @@ export const AccountsApiFp = function(configuration?: Configuration) {
|
||||
export const AccountsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
|
||||
const localVarFp = AccountsApiFp(configuration)
|
||||
return {
|
||||
/**
|
||||
*
|
||||
* @summary
|
||||
* @param {PostActiveWorktypeRequest} postActiveWorktypeRequest
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
activeWorktype(postActiveWorktypeRequest: PostActiveWorktypeRequest, options?: any): AxiosPromise<object> {
|
||||
return localVarFp.activeWorktype(postActiveWorktypeRequest, options).then((request) => request(axios, basePath));
|
||||
},
|
||||
/**
|
||||
* ライセンス発行をキャンセルします
|
||||
* @summary
|
||||
@ -2734,6 +3001,16 @@ export const AccountsApiFactory = function (configuration?: Configuration, baseP
|
||||
getMyAccount(options?: any): AxiosPromise<GetMyAccountResponse> {
|
||||
return localVarFp.getMyAccount(options).then((request) => request(axios, basePath));
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary
|
||||
* @param {number} id Worktypeの内部ID
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
getOptionItems(id: number, options?: any): AxiosPromise<GetOptionItemsResponse> {
|
||||
return localVarFp.getOptionItems(id, options).then((request) => request(axios, basePath));
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary
|
||||
@ -2812,6 +3089,17 @@ export const AccountsApiFactory = function (configuration?: Configuration, baseP
|
||||
issueLicense(issueLicenseRequest: IssueLicenseRequest, options?: any): AxiosPromise<object> {
|
||||
return localVarFp.issueLicense(issueLicenseRequest, options).then((request) => request(axios, basePath));
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary
|
||||
* @param {number} id Worktypeの内部ID
|
||||
* @param {UpdateOptionItemsRequest} updateOptionItemsRequest
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
updateOptionItems(id: number, updateOptionItemsRequest: UpdateOptionItemsRequest, options?: any): AxiosPromise<object> {
|
||||
return localVarFp.updateOptionItems(id, updateOptionItemsRequest, options).then((request) => request(axios, basePath));
|
||||
},
|
||||
/**
|
||||
* ログインしているユーザーのアカウント配下でIDで指定されたタイピストグループを更新します
|
||||
* @summary
|
||||
@ -2844,6 +3132,18 @@ export const AccountsApiFactory = function (configuration?: Configuration, baseP
|
||||
* @extends {BaseAPI}
|
||||
*/
|
||||
export class AccountsApi extends BaseAPI {
|
||||
/**
|
||||
*
|
||||
* @summary
|
||||
* @param {PostActiveWorktypeRequest} postActiveWorktypeRequest
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
* @memberof AccountsApi
|
||||
*/
|
||||
public activeWorktype(postActiveWorktypeRequest: PostActiveWorktypeRequest, options?: AxiosRequestConfig) {
|
||||
return AccountsApiFp(this.configuration).activeWorktype(postActiveWorktypeRequest, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
/**
|
||||
* ライセンス発行をキャンセルします
|
||||
* @summary
|
||||
@ -2938,6 +3238,18 @@ export class AccountsApi extends BaseAPI {
|
||||
return AccountsApiFp(this.configuration).getMyAccount(options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @summary
|
||||
* @param {number} id Worktypeの内部ID
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
* @memberof AccountsApi
|
||||
*/
|
||||
public getOptionItems(id: number, options?: AxiosRequestConfig) {
|
||||
return AccountsApiFp(this.configuration).getOptionItems(id, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @summary
|
||||
@ -3032,6 +3344,19 @@ export class AccountsApi extends BaseAPI {
|
||||
return AccountsApiFp(this.configuration).issueLicense(issueLicenseRequest, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @summary
|
||||
* @param {number} id Worktypeの内部ID
|
||||
* @param {UpdateOptionItemsRequest} updateOptionItemsRequest
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
* @memberof AccountsApi
|
||||
*/
|
||||
public updateOptionItems(id: number, updateOptionItemsRequest: UpdateOptionItemsRequest, options?: AxiosRequestConfig) {
|
||||
return AccountsApiFp(this.configuration).updateOptionItems(id, updateOptionItemsRequest, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
/**
|
||||
* ログインしているユーザーのアカウント配下でIDで指定されたタイピストグループを更新します
|
||||
* @summary
|
||||
|
||||
@ -51,6 +51,7 @@ export const worktypeSlice = createSlice({
|
||||
state.apps.isLoading = true;
|
||||
});
|
||||
builder.addCase(listWorktypesAsync.fulfilled, (state, action) => {
|
||||
// TODO:Active WorktypeIDも取得する
|
||||
const { worktypes } = action.payload;
|
||||
state.domain.worktypes = worktypes;
|
||||
state.apps.isLoading = false;
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
import { AppDispatch } from "app/store";
|
||||
import React, { useState, useCallback, useEffect } from "react";
|
||||
import React, { useState, useCallback } from "react";
|
||||
import styles from "styles/app.module.scss";
|
||||
import { useDispatch, useSelector } from "react-redux";
|
||||
import { getTranslationID } from "translation";
|
||||
|
||||
@ -1068,6 +1068,61 @@
|
||||
"security": [{ "bearer": [] }]
|
||||
}
|
||||
},
|
||||
"/accounts/active-worktype": {
|
||||
"post": {
|
||||
"operationId": "activeWorktype",
|
||||
"summary": "",
|
||||
"parameters": [],
|
||||
"requestBody": {
|
||||
"required": true,
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/PostActiveWorktypeRequest"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "成功時のレスポンス",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/PostActiveWorktypeResponse"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"400": {
|
||||
"description": "WorktypeIDが存在しない",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": { "$ref": "#/components/schemas/ErrorResponse" }
|
||||
}
|
||||
}
|
||||
},
|
||||
"401": {
|
||||
"description": "認証エラー",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": { "$ref": "#/components/schemas/ErrorResponse" }
|
||||
}
|
||||
}
|
||||
},
|
||||
"500": {
|
||||
"description": "想定外のサーバーエラー",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": { "$ref": "#/components/schemas/ErrorResponse" }
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"tags": ["accounts"],
|
||||
"security": [{ "bearer": [] }]
|
||||
}
|
||||
},
|
||||
"/accounts/partners": {
|
||||
"get": {
|
||||
"operationId": "getPartners",
|
||||
@ -3038,6 +3093,10 @@
|
||||
"worktypes": {
|
||||
"type": "array",
|
||||
"items": { "$ref": "#/components/schemas/Worktype" }
|
||||
},
|
||||
"acrive": {
|
||||
"type": "number",
|
||||
"description": "Active WorktypeIDに設定されているWorkTypeの内部ID"
|
||||
}
|
||||
},
|
||||
"required": ["worktypes"]
|
||||
@ -3120,6 +3179,16 @@
|
||||
"required": ["optionItems"]
|
||||
},
|
||||
"UpdateOptionItemsResponse": { "type": "object", "properties": {} },
|
||||
"PostActiveWorktypeRequest": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "number",
|
||||
"description": "Active WorkTypeIDにするWorktypeの内部ID"
|
||||
}
|
||||
}
|
||||
},
|
||||
"PostActiveWorktypeResponse": { "type": "object", "properties": {} },
|
||||
"Partner": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
@ -3169,7 +3238,7 @@
|
||||
"description": "親アカウントのID"
|
||||
},
|
||||
"delegationPermission": {
|
||||
"type": "number",
|
||||
"type": "boolean",
|
||||
"description": "代行操作許可"
|
||||
},
|
||||
"primaryAdminUserId": {
|
||||
@ -3330,7 +3399,7 @@
|
||||
},
|
||||
"activeWorktype": {
|
||||
"type": "string",
|
||||
"description": "アカウントがデフォルトで利用するWorkTypeID(アカウントに紐づくWorkTypeIDから一つ指定)"
|
||||
"description": "アカウントがデフォルトで利用するWorkTypeID(アカウントに紐づくWorkTypeIDから一つ指定。activeWorktypeがなければ空文字を返却する)"
|
||||
},
|
||||
"audioFormat": {
|
||||
"type": "string",
|
||||
|
||||
@ -56,6 +56,8 @@ import {
|
||||
UpdateOptionItemsResponse,
|
||||
UpdateOptionItemsRequestParam,
|
||||
UpdateOptionItemsRequest,
|
||||
PostActiveWorktypeRequest,
|
||||
PostActiveWorktypeResponse,
|
||||
UpdateAccountInfoRequest,
|
||||
UpdateAccountInfoResponse,
|
||||
} from './types/types';
|
||||
@ -868,6 +870,47 @@ export class AccountsController {
|
||||
return {};
|
||||
}
|
||||
|
||||
@Post('/active-worktype')
|
||||
@ApiResponse({
|
||||
status: HttpStatus.OK,
|
||||
type: PostActiveWorktypeResponse,
|
||||
description: '成功時のレスポンス',
|
||||
})
|
||||
@ApiResponse({
|
||||
status: HttpStatus.BAD_REQUEST,
|
||||
description: 'WorktypeIDが存在しない',
|
||||
type: ErrorResponse,
|
||||
})
|
||||
@ApiResponse({
|
||||
status: HttpStatus.UNAUTHORIZED,
|
||||
description: '認証エラー',
|
||||
type: ErrorResponse,
|
||||
})
|
||||
@ApiResponse({
|
||||
status: HttpStatus.INTERNAL_SERVER_ERROR,
|
||||
description: '想定外のサーバーエラー',
|
||||
type: ErrorResponse,
|
||||
})
|
||||
@ApiOperation({ operationId: 'activeWorktype' })
|
||||
@ApiBearerAuth()
|
||||
@UseGuards(AuthGuard)
|
||||
@UseGuards(RoleGuard.requireds({ roles: [ADMIN_ROLES.ADMIN] }))
|
||||
async activeWorktype(
|
||||
@Req() req: Request,
|
||||
@Body() body: PostActiveWorktypeRequest,
|
||||
): Promise<PostActiveWorktypeResponse> {
|
||||
const { id } = body;
|
||||
const token = retrieveAuthorizationToken(req);
|
||||
const { userId } = jwt.decode(token, { json: true }) as AccessToken;
|
||||
|
||||
const context = makeContext(userId);
|
||||
|
||||
console.log('id', id);
|
||||
console.log(context.trackingId);
|
||||
|
||||
return {};
|
||||
}
|
||||
|
||||
@Get('/partners')
|
||||
@ApiResponse({
|
||||
status: HttpStatus.OK,
|
||||
|
||||
@ -353,6 +353,12 @@ export class Worktype {
|
||||
export class GetWorktypesResponse {
|
||||
@ApiProperty({ type: [Worktype] })
|
||||
worktypes: Worktype[];
|
||||
|
||||
@ApiProperty({
|
||||
required: false,
|
||||
description: 'Active WorktypeIDに設定されているWorkTypeの内部ID',
|
||||
})
|
||||
acrive?: number | undefined;
|
||||
}
|
||||
|
||||
export class CreateWorktypesRequest {
|
||||
@ -455,6 +461,20 @@ export class UpdateWorktypeRequestParam {
|
||||
id: number;
|
||||
}
|
||||
|
||||
export class PostActiveWorktypeRequest {
|
||||
@ApiProperty({
|
||||
required: false,
|
||||
description: 'Active WorkTypeIDにするWorktypeの内部ID',
|
||||
})
|
||||
@IsOptional()
|
||||
@Type(() => Number)
|
||||
@IsInt()
|
||||
@Min(0)
|
||||
id?: number | undefined;
|
||||
}
|
||||
|
||||
export class PostActiveWorktypeResponse {}
|
||||
|
||||
export class GetPartnersRequest {
|
||||
@ApiProperty({ description: '取得件数' })
|
||||
@IsInt()
|
||||
|
||||
@ -164,7 +164,7 @@ export class GetRelationsResponse {
|
||||
encryptionPassword?: string | undefined;
|
||||
@ApiProperty({
|
||||
description:
|
||||
'アカウントがデフォルトで利用するWorkTypeID(アカウントに紐づくWorkTypeIDから一つ指定)',
|
||||
'アカウントがデフォルトで利用するWorkTypeID(アカウントに紐づくWorkTypeIDから一つ指定。activeWorktypeがなければ空文字を返却する)',
|
||||
})
|
||||
activeWorktype: string;
|
||||
@ApiProperty({ description: '録音形式: DSS/DS2(SP)/DS2(QP): DS2固定' })
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user