@ject-2-test/backend-api-client 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/api/auth-api.d.ts +68 -0
- package/dist/api/auth-api.js +124 -0
- package/dist/api/user-api.d.ts +95 -0
- package/dist/api/user-api.js +182 -0
- package/dist/api.d.ts +13 -0
- package/dist/api.js +31 -0
- package/dist/base.d.ts +42 -0
- package/dist/base.js +48 -0
- package/dist/common.d.ts +34 -0
- package/dist/common.js +123 -0
- package/dist/configuration.d.ts +98 -0
- package/dist/configuration.js +48 -0
- package/dist/index.d.ts +14 -0
- package/dist/index.js +32 -0
- package/dist/models/index.d.ts +3 -0
- package/dist/models/index.js +19 -0
- package/dist/models/login-request.d.ts +24 -0
- package/dist/models/login-request.js +15 -0
- package/dist/models/login-response.d.ts +24 -0
- package/dist/models/login-response.js +15 -0
- package/dist/models/user-response.d.ts +32 -0
- package/dist/models/user-response.js +15 -0
- package/package.json +19 -0
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Backend API
|
|
3
|
+
* 간단한 사용자 관리 API
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 1.0.0
|
|
6
|
+
*
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
import type { Configuration } from '../configuration';
|
|
13
|
+
import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios';
|
|
14
|
+
import { type RequestArgs, BaseAPI } from '../base';
|
|
15
|
+
import type { LoginRequest } from '../models';
|
|
16
|
+
import type { LoginResponse } from '../models';
|
|
17
|
+
/**
|
|
18
|
+
* AuthApi - axios parameter creator
|
|
19
|
+
*/
|
|
20
|
+
export declare const AuthApiAxiosParamCreator: (configuration?: Configuration) => {
|
|
21
|
+
/**
|
|
22
|
+
* 이메일/비밀번호로 로그인하여 JWT 토큰을 발급받습니다.
|
|
23
|
+
* @summary 로그인
|
|
24
|
+
* @param {LoginRequest} loginRequest
|
|
25
|
+
* @param {*} [options] Override http request option.
|
|
26
|
+
* @throws {RequiredError}
|
|
27
|
+
*/
|
|
28
|
+
login: (loginRequest: LoginRequest, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
|
|
29
|
+
};
|
|
30
|
+
/**
|
|
31
|
+
* AuthApi - functional programming interface
|
|
32
|
+
*/
|
|
33
|
+
export declare const AuthApiFp: (configuration?: Configuration) => {
|
|
34
|
+
/**
|
|
35
|
+
* 이메일/비밀번호로 로그인하여 JWT 토큰을 발급받습니다.
|
|
36
|
+
* @summary 로그인
|
|
37
|
+
* @param {LoginRequest} loginRequest
|
|
38
|
+
* @param {*} [options] Override http request option.
|
|
39
|
+
* @throws {RequiredError}
|
|
40
|
+
*/
|
|
41
|
+
login(loginRequest: LoginRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<LoginResponse>>;
|
|
42
|
+
};
|
|
43
|
+
/**
|
|
44
|
+
* AuthApi - factory interface
|
|
45
|
+
*/
|
|
46
|
+
export declare const AuthApiFactory: (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) => {
|
|
47
|
+
/**
|
|
48
|
+
* 이메일/비밀번호로 로그인하여 JWT 토큰을 발급받습니다.
|
|
49
|
+
* @summary 로그인
|
|
50
|
+
* @param {LoginRequest} loginRequest
|
|
51
|
+
* @param {*} [options] Override http request option.
|
|
52
|
+
* @throws {RequiredError}
|
|
53
|
+
*/
|
|
54
|
+
login(loginRequest: LoginRequest, options?: RawAxiosRequestConfig): AxiosPromise<LoginResponse>;
|
|
55
|
+
};
|
|
56
|
+
/**
|
|
57
|
+
* AuthApi - object-oriented interface
|
|
58
|
+
*/
|
|
59
|
+
export declare class AuthApi extends BaseAPI {
|
|
60
|
+
/**
|
|
61
|
+
* 이메일/비밀번호로 로그인하여 JWT 토큰을 발급받습니다.
|
|
62
|
+
* @summary 로그인
|
|
63
|
+
* @param {LoginRequest} loginRequest
|
|
64
|
+
* @param {*} [options] Override http request option.
|
|
65
|
+
* @throws {RequiredError}
|
|
66
|
+
*/
|
|
67
|
+
login(loginRequest: LoginRequest, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<LoginResponse, any, {}>>;
|
|
68
|
+
}
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* Backend API
|
|
6
|
+
* 간단한 사용자 관리 API
|
|
7
|
+
*
|
|
8
|
+
* The version of the OpenAPI document: 1.0.0
|
|
9
|
+
*
|
|
10
|
+
*
|
|
11
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
|
+
* https://openapi-generator.tech
|
|
13
|
+
* Do not edit the class manually.
|
|
14
|
+
*/
|
|
15
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
16
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
17
|
+
};
|
|
18
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
19
|
+
exports.AuthApi = exports.AuthApiFactory = exports.AuthApiFp = exports.AuthApiAxiosParamCreator = void 0;
|
|
20
|
+
const axios_1 = __importDefault(require("axios"));
|
|
21
|
+
// Some imports not used depending on template conditions
|
|
22
|
+
// @ts-ignore
|
|
23
|
+
const common_1 = require("../common");
|
|
24
|
+
// @ts-ignore
|
|
25
|
+
const base_1 = require("../base");
|
|
26
|
+
/**
|
|
27
|
+
* AuthApi - axios parameter creator
|
|
28
|
+
*/
|
|
29
|
+
const AuthApiAxiosParamCreator = function (configuration) {
|
|
30
|
+
return {
|
|
31
|
+
/**
|
|
32
|
+
* 이메일/비밀번호로 로그인하여 JWT 토큰을 발급받습니다.
|
|
33
|
+
* @summary 로그인
|
|
34
|
+
* @param {LoginRequest} loginRequest
|
|
35
|
+
* @param {*} [options] Override http request option.
|
|
36
|
+
* @throws {RequiredError}
|
|
37
|
+
*/
|
|
38
|
+
login: async (loginRequest, options = {}) => {
|
|
39
|
+
// verify required parameter 'loginRequest' is not null or undefined
|
|
40
|
+
(0, common_1.assertParamExists)('login', 'loginRequest', loginRequest);
|
|
41
|
+
const localVarPath = `/api/auth/login`;
|
|
42
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
43
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
44
|
+
let baseOptions;
|
|
45
|
+
if (configuration) {
|
|
46
|
+
baseOptions = configuration.baseOptions;
|
|
47
|
+
}
|
|
48
|
+
const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options };
|
|
49
|
+
const localVarHeaderParameter = {};
|
|
50
|
+
const localVarQueryParameter = {};
|
|
51
|
+
// authentication bearerAuth required
|
|
52
|
+
// http bearer authentication required
|
|
53
|
+
await (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
|
|
54
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
55
|
+
localVarHeaderParameter['Accept'] = '*/*';
|
|
56
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
57
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
58
|
+
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
59
|
+
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(loginRequest, localVarRequestOptions, configuration);
|
|
60
|
+
return {
|
|
61
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
62
|
+
options: localVarRequestOptions,
|
|
63
|
+
};
|
|
64
|
+
},
|
|
65
|
+
};
|
|
66
|
+
};
|
|
67
|
+
exports.AuthApiAxiosParamCreator = AuthApiAxiosParamCreator;
|
|
68
|
+
/**
|
|
69
|
+
* AuthApi - functional programming interface
|
|
70
|
+
*/
|
|
71
|
+
const AuthApiFp = function (configuration) {
|
|
72
|
+
const localVarAxiosParamCreator = (0, exports.AuthApiAxiosParamCreator)(configuration);
|
|
73
|
+
return {
|
|
74
|
+
/**
|
|
75
|
+
* 이메일/비밀번호로 로그인하여 JWT 토큰을 발급받습니다.
|
|
76
|
+
* @summary 로그인
|
|
77
|
+
* @param {LoginRequest} loginRequest
|
|
78
|
+
* @param {*} [options] Override http request option.
|
|
79
|
+
* @throws {RequiredError}
|
|
80
|
+
*/
|
|
81
|
+
async login(loginRequest, options) {
|
|
82
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.login(loginRequest, options);
|
|
83
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
84
|
+
const localVarOperationServerBasePath = base_1.operationServerMap['AuthApi.login']?.[localVarOperationServerIndex]?.url;
|
|
85
|
+
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
86
|
+
},
|
|
87
|
+
};
|
|
88
|
+
};
|
|
89
|
+
exports.AuthApiFp = AuthApiFp;
|
|
90
|
+
/**
|
|
91
|
+
* AuthApi - factory interface
|
|
92
|
+
*/
|
|
93
|
+
const AuthApiFactory = function (configuration, basePath, axios) {
|
|
94
|
+
const localVarFp = (0, exports.AuthApiFp)(configuration);
|
|
95
|
+
return {
|
|
96
|
+
/**
|
|
97
|
+
* 이메일/비밀번호로 로그인하여 JWT 토큰을 발급받습니다.
|
|
98
|
+
* @summary 로그인
|
|
99
|
+
* @param {LoginRequest} loginRequest
|
|
100
|
+
* @param {*} [options] Override http request option.
|
|
101
|
+
* @throws {RequiredError}
|
|
102
|
+
*/
|
|
103
|
+
login(loginRequest, options) {
|
|
104
|
+
return localVarFp.login(loginRequest, options).then((request) => request(axios, basePath));
|
|
105
|
+
},
|
|
106
|
+
};
|
|
107
|
+
};
|
|
108
|
+
exports.AuthApiFactory = AuthApiFactory;
|
|
109
|
+
/**
|
|
110
|
+
* AuthApi - object-oriented interface
|
|
111
|
+
*/
|
|
112
|
+
class AuthApi extends base_1.BaseAPI {
|
|
113
|
+
/**
|
|
114
|
+
* 이메일/비밀번호로 로그인하여 JWT 토큰을 발급받습니다.
|
|
115
|
+
* @summary 로그인
|
|
116
|
+
* @param {LoginRequest} loginRequest
|
|
117
|
+
* @param {*} [options] Override http request option.
|
|
118
|
+
* @throws {RequiredError}
|
|
119
|
+
*/
|
|
120
|
+
login(loginRequest, options) {
|
|
121
|
+
return (0, exports.AuthApiFp)(this.configuration).login(loginRequest, options).then((request) => request(this.axios, this.basePath));
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
exports.AuthApi = AuthApi;
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Backend API
|
|
3
|
+
* 간단한 사용자 관리 API
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 1.0.0
|
|
6
|
+
*
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
import type { Configuration } from '../configuration';
|
|
13
|
+
import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios';
|
|
14
|
+
import { type RequestArgs, BaseAPI } from '../base';
|
|
15
|
+
import type { UserResponse } from '../models';
|
|
16
|
+
/**
|
|
17
|
+
* UserApi - axios parameter creator
|
|
18
|
+
*/
|
|
19
|
+
export declare const UserApiAxiosParamCreator: (configuration?: Configuration) => {
|
|
20
|
+
/**
|
|
21
|
+
* 등록된 모든 사용자 목록을 조회합니다.
|
|
22
|
+
* @summary 사용자 전체 조회
|
|
23
|
+
* @param {*} [options] Override http request option.
|
|
24
|
+
* @throws {RequiredError}
|
|
25
|
+
*/
|
|
26
|
+
getAllUsers: (options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
|
|
27
|
+
/**
|
|
28
|
+
* ID로 특정 사용자를 조회합니다.
|
|
29
|
+
* @summary 사용자 단건 조회
|
|
30
|
+
* @param {number} id 사용자 ID
|
|
31
|
+
* @param {*} [options] Override http request option.
|
|
32
|
+
* @throws {RequiredError}
|
|
33
|
+
*/
|
|
34
|
+
getUserById: (id: number, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
|
|
35
|
+
};
|
|
36
|
+
/**
|
|
37
|
+
* UserApi - functional programming interface
|
|
38
|
+
*/
|
|
39
|
+
export declare const UserApiFp: (configuration?: Configuration) => {
|
|
40
|
+
/**
|
|
41
|
+
* 등록된 모든 사용자 목록을 조회합니다.
|
|
42
|
+
* @summary 사용자 전체 조회
|
|
43
|
+
* @param {*} [options] Override http request option.
|
|
44
|
+
* @throws {RequiredError}
|
|
45
|
+
*/
|
|
46
|
+
getAllUsers(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<UserResponse>>>;
|
|
47
|
+
/**
|
|
48
|
+
* ID로 특정 사용자를 조회합니다.
|
|
49
|
+
* @summary 사용자 단건 조회
|
|
50
|
+
* @param {number} id 사용자 ID
|
|
51
|
+
* @param {*} [options] Override http request option.
|
|
52
|
+
* @throws {RequiredError}
|
|
53
|
+
*/
|
|
54
|
+
getUserById(id: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<UserResponse>>;
|
|
55
|
+
};
|
|
56
|
+
/**
|
|
57
|
+
* UserApi - factory interface
|
|
58
|
+
*/
|
|
59
|
+
export declare const UserApiFactory: (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) => {
|
|
60
|
+
/**
|
|
61
|
+
* 등록된 모든 사용자 목록을 조회합니다.
|
|
62
|
+
* @summary 사용자 전체 조회
|
|
63
|
+
* @param {*} [options] Override http request option.
|
|
64
|
+
* @throws {RequiredError}
|
|
65
|
+
*/
|
|
66
|
+
getAllUsers(options?: RawAxiosRequestConfig): AxiosPromise<Array<UserResponse>>;
|
|
67
|
+
/**
|
|
68
|
+
* ID로 특정 사용자를 조회합니다.
|
|
69
|
+
* @summary 사용자 단건 조회
|
|
70
|
+
* @param {number} id 사용자 ID
|
|
71
|
+
* @param {*} [options] Override http request option.
|
|
72
|
+
* @throws {RequiredError}
|
|
73
|
+
*/
|
|
74
|
+
getUserById(id: number, options?: RawAxiosRequestConfig): AxiosPromise<UserResponse>;
|
|
75
|
+
};
|
|
76
|
+
/**
|
|
77
|
+
* UserApi - object-oriented interface
|
|
78
|
+
*/
|
|
79
|
+
export declare class UserApi extends BaseAPI {
|
|
80
|
+
/**
|
|
81
|
+
* 등록된 모든 사용자 목록을 조회합니다.
|
|
82
|
+
* @summary 사용자 전체 조회
|
|
83
|
+
* @param {*} [options] Override http request option.
|
|
84
|
+
* @throws {RequiredError}
|
|
85
|
+
*/
|
|
86
|
+
getAllUsers(options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<UserResponse[], any, {}>>;
|
|
87
|
+
/**
|
|
88
|
+
* ID로 특정 사용자를 조회합니다.
|
|
89
|
+
* @summary 사용자 단건 조회
|
|
90
|
+
* @param {number} id 사용자 ID
|
|
91
|
+
* @param {*} [options] Override http request option.
|
|
92
|
+
* @throws {RequiredError}
|
|
93
|
+
*/
|
|
94
|
+
getUserById(id: number, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<UserResponse, any, {}>>;
|
|
95
|
+
}
|
|
@@ -0,0 +1,182 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* Backend API
|
|
6
|
+
* 간단한 사용자 관리 API
|
|
7
|
+
*
|
|
8
|
+
* The version of the OpenAPI document: 1.0.0
|
|
9
|
+
*
|
|
10
|
+
*
|
|
11
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
|
+
* https://openapi-generator.tech
|
|
13
|
+
* Do not edit the class manually.
|
|
14
|
+
*/
|
|
15
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
16
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
17
|
+
};
|
|
18
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
19
|
+
exports.UserApi = exports.UserApiFactory = exports.UserApiFp = exports.UserApiAxiosParamCreator = void 0;
|
|
20
|
+
const axios_1 = __importDefault(require("axios"));
|
|
21
|
+
// Some imports not used depending on template conditions
|
|
22
|
+
// @ts-ignore
|
|
23
|
+
const common_1 = require("../common");
|
|
24
|
+
// @ts-ignore
|
|
25
|
+
const base_1 = require("../base");
|
|
26
|
+
/**
|
|
27
|
+
* UserApi - axios parameter creator
|
|
28
|
+
*/
|
|
29
|
+
const UserApiAxiosParamCreator = function (configuration) {
|
|
30
|
+
return {
|
|
31
|
+
/**
|
|
32
|
+
* 등록된 모든 사용자 목록을 조회합니다.
|
|
33
|
+
* @summary 사용자 전체 조회
|
|
34
|
+
* @param {*} [options] Override http request option.
|
|
35
|
+
* @throws {RequiredError}
|
|
36
|
+
*/
|
|
37
|
+
getAllUsers: async (options = {}) => {
|
|
38
|
+
const localVarPath = `/api/users`;
|
|
39
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
40
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
41
|
+
let baseOptions;
|
|
42
|
+
if (configuration) {
|
|
43
|
+
baseOptions = configuration.baseOptions;
|
|
44
|
+
}
|
|
45
|
+
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options };
|
|
46
|
+
const localVarHeaderParameter = {};
|
|
47
|
+
const localVarQueryParameter = {};
|
|
48
|
+
// authentication bearerAuth required
|
|
49
|
+
// http bearer authentication required
|
|
50
|
+
await (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
|
|
51
|
+
localVarHeaderParameter['Accept'] = '*/*';
|
|
52
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
53
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
54
|
+
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
55
|
+
return {
|
|
56
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
57
|
+
options: localVarRequestOptions,
|
|
58
|
+
};
|
|
59
|
+
},
|
|
60
|
+
/**
|
|
61
|
+
* ID로 특정 사용자를 조회합니다.
|
|
62
|
+
* @summary 사용자 단건 조회
|
|
63
|
+
* @param {number} id 사용자 ID
|
|
64
|
+
* @param {*} [options] Override http request option.
|
|
65
|
+
* @throws {RequiredError}
|
|
66
|
+
*/
|
|
67
|
+
getUserById: async (id, options = {}) => {
|
|
68
|
+
// verify required parameter 'id' is not null or undefined
|
|
69
|
+
(0, common_1.assertParamExists)('getUserById', 'id', id);
|
|
70
|
+
const localVarPath = `/api/users/{id}`
|
|
71
|
+
.replace(`{${"id"}}`, encodeURIComponent(String(id)));
|
|
72
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
73
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
74
|
+
let baseOptions;
|
|
75
|
+
if (configuration) {
|
|
76
|
+
baseOptions = configuration.baseOptions;
|
|
77
|
+
}
|
|
78
|
+
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options };
|
|
79
|
+
const localVarHeaderParameter = {};
|
|
80
|
+
const localVarQueryParameter = {};
|
|
81
|
+
// authentication bearerAuth required
|
|
82
|
+
// http bearer authentication required
|
|
83
|
+
await (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
|
|
84
|
+
localVarHeaderParameter['Accept'] = '*/*';
|
|
85
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
86
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
87
|
+
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
88
|
+
return {
|
|
89
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
90
|
+
options: localVarRequestOptions,
|
|
91
|
+
};
|
|
92
|
+
},
|
|
93
|
+
};
|
|
94
|
+
};
|
|
95
|
+
exports.UserApiAxiosParamCreator = UserApiAxiosParamCreator;
|
|
96
|
+
/**
|
|
97
|
+
* UserApi - functional programming interface
|
|
98
|
+
*/
|
|
99
|
+
const UserApiFp = function (configuration) {
|
|
100
|
+
const localVarAxiosParamCreator = (0, exports.UserApiAxiosParamCreator)(configuration);
|
|
101
|
+
return {
|
|
102
|
+
/**
|
|
103
|
+
* 등록된 모든 사용자 목록을 조회합니다.
|
|
104
|
+
* @summary 사용자 전체 조회
|
|
105
|
+
* @param {*} [options] Override http request option.
|
|
106
|
+
* @throws {RequiredError}
|
|
107
|
+
*/
|
|
108
|
+
async getAllUsers(options) {
|
|
109
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.getAllUsers(options);
|
|
110
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
111
|
+
const localVarOperationServerBasePath = base_1.operationServerMap['UserApi.getAllUsers']?.[localVarOperationServerIndex]?.url;
|
|
112
|
+
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
113
|
+
},
|
|
114
|
+
/**
|
|
115
|
+
* ID로 특정 사용자를 조회합니다.
|
|
116
|
+
* @summary 사용자 단건 조회
|
|
117
|
+
* @param {number} id 사용자 ID
|
|
118
|
+
* @param {*} [options] Override http request option.
|
|
119
|
+
* @throws {RequiredError}
|
|
120
|
+
*/
|
|
121
|
+
async getUserById(id, options) {
|
|
122
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.getUserById(id, options);
|
|
123
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
124
|
+
const localVarOperationServerBasePath = base_1.operationServerMap['UserApi.getUserById']?.[localVarOperationServerIndex]?.url;
|
|
125
|
+
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
126
|
+
},
|
|
127
|
+
};
|
|
128
|
+
};
|
|
129
|
+
exports.UserApiFp = UserApiFp;
|
|
130
|
+
/**
|
|
131
|
+
* UserApi - factory interface
|
|
132
|
+
*/
|
|
133
|
+
const UserApiFactory = function (configuration, basePath, axios) {
|
|
134
|
+
const localVarFp = (0, exports.UserApiFp)(configuration);
|
|
135
|
+
return {
|
|
136
|
+
/**
|
|
137
|
+
* 등록된 모든 사용자 목록을 조회합니다.
|
|
138
|
+
* @summary 사용자 전체 조회
|
|
139
|
+
* @param {*} [options] Override http request option.
|
|
140
|
+
* @throws {RequiredError}
|
|
141
|
+
*/
|
|
142
|
+
getAllUsers(options) {
|
|
143
|
+
return localVarFp.getAllUsers(options).then((request) => request(axios, basePath));
|
|
144
|
+
},
|
|
145
|
+
/**
|
|
146
|
+
* ID로 특정 사용자를 조회합니다.
|
|
147
|
+
* @summary 사용자 단건 조회
|
|
148
|
+
* @param {number} id 사용자 ID
|
|
149
|
+
* @param {*} [options] Override http request option.
|
|
150
|
+
* @throws {RequiredError}
|
|
151
|
+
*/
|
|
152
|
+
getUserById(id, options) {
|
|
153
|
+
return localVarFp.getUserById(id, options).then((request) => request(axios, basePath));
|
|
154
|
+
},
|
|
155
|
+
};
|
|
156
|
+
};
|
|
157
|
+
exports.UserApiFactory = UserApiFactory;
|
|
158
|
+
/**
|
|
159
|
+
* UserApi - object-oriented interface
|
|
160
|
+
*/
|
|
161
|
+
class UserApi extends base_1.BaseAPI {
|
|
162
|
+
/**
|
|
163
|
+
* 등록된 모든 사용자 목록을 조회합니다.
|
|
164
|
+
* @summary 사용자 전체 조회
|
|
165
|
+
* @param {*} [options] Override http request option.
|
|
166
|
+
* @throws {RequiredError}
|
|
167
|
+
*/
|
|
168
|
+
getAllUsers(options) {
|
|
169
|
+
return (0, exports.UserApiFp)(this.configuration).getAllUsers(options).then((request) => request(this.axios, this.basePath));
|
|
170
|
+
}
|
|
171
|
+
/**
|
|
172
|
+
* ID로 특정 사용자를 조회합니다.
|
|
173
|
+
* @summary 사용자 단건 조회
|
|
174
|
+
* @param {number} id 사용자 ID
|
|
175
|
+
* @param {*} [options] Override http request option.
|
|
176
|
+
* @throws {RequiredError}
|
|
177
|
+
*/
|
|
178
|
+
getUserById(id, options) {
|
|
179
|
+
return (0, exports.UserApiFp)(this.configuration).getUserById(id, options).then((request) => request(this.axios, this.basePath));
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
exports.UserApi = UserApi;
|
package/dist/api.d.ts
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Backend API
|
|
3
|
+
* 간단한 사용자 관리 API
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 1.0.0
|
|
6
|
+
*
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
export * from './api/auth-api';
|
|
13
|
+
export * from './api/user-api';
|
package/dist/api.js
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* Backend API
|
|
6
|
+
* 간단한 사용자 관리 API
|
|
7
|
+
*
|
|
8
|
+
* The version of the OpenAPI document: 1.0.0
|
|
9
|
+
*
|
|
10
|
+
*
|
|
11
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
|
+
* https://openapi-generator.tech
|
|
13
|
+
* Do not edit the class manually.
|
|
14
|
+
*/
|
|
15
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
16
|
+
if (k2 === undefined) k2 = k;
|
|
17
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
18
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
19
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
20
|
+
}
|
|
21
|
+
Object.defineProperty(o, k2, desc);
|
|
22
|
+
}) : (function(o, m, k, k2) {
|
|
23
|
+
if (k2 === undefined) k2 = k;
|
|
24
|
+
o[k2] = m[k];
|
|
25
|
+
}));
|
|
26
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
27
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
28
|
+
};
|
|
29
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
30
|
+
__exportStar(require("./api/auth-api"), exports);
|
|
31
|
+
__exportStar(require("./api/user-api"), exports);
|
package/dist/base.d.ts
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Backend API
|
|
3
|
+
* 간단한 사용자 관리 API
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 1.0.0
|
|
6
|
+
*
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
import type { Configuration } from './configuration';
|
|
13
|
+
import type { AxiosInstance, RawAxiosRequestConfig } from 'axios';
|
|
14
|
+
export declare const BASE_PATH: string;
|
|
15
|
+
export declare const COLLECTION_FORMATS: {
|
|
16
|
+
csv: string;
|
|
17
|
+
ssv: string;
|
|
18
|
+
tsv: string;
|
|
19
|
+
pipes: string;
|
|
20
|
+
};
|
|
21
|
+
export interface RequestArgs {
|
|
22
|
+
url: string;
|
|
23
|
+
options: RawAxiosRequestConfig;
|
|
24
|
+
}
|
|
25
|
+
export declare class BaseAPI {
|
|
26
|
+
protected basePath: string;
|
|
27
|
+
protected axios: AxiosInstance;
|
|
28
|
+
protected configuration: Configuration | undefined;
|
|
29
|
+
constructor(configuration?: Configuration, basePath?: string, axios?: AxiosInstance);
|
|
30
|
+
}
|
|
31
|
+
export declare class RequiredError extends Error {
|
|
32
|
+
field: string;
|
|
33
|
+
constructor(field: string, msg?: string);
|
|
34
|
+
}
|
|
35
|
+
interface ServerMap {
|
|
36
|
+
[key: string]: {
|
|
37
|
+
url: string;
|
|
38
|
+
description: string;
|
|
39
|
+
}[];
|
|
40
|
+
}
|
|
41
|
+
export declare const operationServerMap: ServerMap;
|
|
42
|
+
export {};
|
package/dist/base.js
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* Backend API
|
|
6
|
+
* 간단한 사용자 관리 API
|
|
7
|
+
*
|
|
8
|
+
* The version of the OpenAPI document: 1.0.0
|
|
9
|
+
*
|
|
10
|
+
*
|
|
11
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
|
+
* https://openapi-generator.tech
|
|
13
|
+
* Do not edit the class manually.
|
|
14
|
+
*/
|
|
15
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
16
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
17
|
+
};
|
|
18
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
19
|
+
exports.operationServerMap = exports.RequiredError = exports.BaseAPI = exports.COLLECTION_FORMATS = exports.BASE_PATH = void 0;
|
|
20
|
+
const axios_1 = __importDefault(require("axios"));
|
|
21
|
+
exports.BASE_PATH = "http://localhost:8080".replace(/\/+$/, "");
|
|
22
|
+
exports.COLLECTION_FORMATS = {
|
|
23
|
+
csv: ",",
|
|
24
|
+
ssv: " ",
|
|
25
|
+
tsv: "\t",
|
|
26
|
+
pipes: "|",
|
|
27
|
+
};
|
|
28
|
+
class BaseAPI {
|
|
29
|
+
constructor(configuration, basePath = exports.BASE_PATH, axios = axios_1.default) {
|
|
30
|
+
this.basePath = basePath;
|
|
31
|
+
this.axios = axios;
|
|
32
|
+
if (configuration) {
|
|
33
|
+
this.configuration = configuration;
|
|
34
|
+
this.basePath = configuration.basePath ?? basePath;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
exports.BaseAPI = BaseAPI;
|
|
39
|
+
;
|
|
40
|
+
class RequiredError extends Error {
|
|
41
|
+
constructor(field, msg) {
|
|
42
|
+
super(msg);
|
|
43
|
+
this.field = field;
|
|
44
|
+
this.name = "RequiredError";
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
exports.RequiredError = RequiredError;
|
|
48
|
+
exports.operationServerMap = {};
|
package/dist/common.d.ts
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Backend API
|
|
3
|
+
* 간단한 사용자 관리 API
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 1.0.0
|
|
6
|
+
*
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
import type { Configuration } from "./configuration";
|
|
13
|
+
import type { RequestArgs } from "./base";
|
|
14
|
+
import type { AxiosInstance, AxiosResponse } from 'axios';
|
|
15
|
+
export declare const DUMMY_BASE_URL = "https://example.com";
|
|
16
|
+
/**
|
|
17
|
+
*
|
|
18
|
+
* @throws {RequiredError}
|
|
19
|
+
*/
|
|
20
|
+
export declare const assertParamExists: (functionName: string, paramName: string, paramValue: unknown) => void;
|
|
21
|
+
export declare const setApiKeyToObject: (object: any, keyParamName: string, configuration?: Configuration) => Promise<void>;
|
|
22
|
+
export declare const setBasicAuthToObject: (object: any, configuration?: Configuration) => void;
|
|
23
|
+
export declare const setBearerAuthToObject: (object: any, configuration?: Configuration) => Promise<void>;
|
|
24
|
+
export declare const setOAuthToObject: (object: any, name: string, scopes: string[], configuration?: Configuration) => Promise<void>;
|
|
25
|
+
export declare const setSearchParams: (url: URL, ...objects: any[]) => void;
|
|
26
|
+
/**
|
|
27
|
+
* JSON serialization helper function which replaces instances of unserializable types with serializable ones.
|
|
28
|
+
* This function will run for every key-value pair encountered by JSON.stringify while traversing an object.
|
|
29
|
+
* Converting a set to a string will return an empty object, so an intermediate conversion to an array is required.
|
|
30
|
+
*/
|
|
31
|
+
export declare const replaceWithSerializableTypeIfNeeded: (key: string, value: any) => any;
|
|
32
|
+
export declare const serializeDataIfNeeded: (value: any, requestOptions: any, configuration?: Configuration) => any;
|
|
33
|
+
export declare const toPathString: (url: URL) => string;
|
|
34
|
+
export declare const createRequestFunction: (axiosArgs: RequestArgs, globalAxios: AxiosInstance, BASE_PATH: string, configuration?: Configuration) => <T = unknown, R = AxiosResponse<T>>(axios?: AxiosInstance, basePath?: string) => Promise<R>;
|
package/dist/common.js
ADDED
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* Backend API
|
|
6
|
+
* 간단한 사용자 관리 API
|
|
7
|
+
*
|
|
8
|
+
* The version of the OpenAPI document: 1.0.0
|
|
9
|
+
*
|
|
10
|
+
*
|
|
11
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
|
+
* https://openapi-generator.tech
|
|
13
|
+
* Do not edit the class manually.
|
|
14
|
+
*/
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.createRequestFunction = exports.toPathString = exports.serializeDataIfNeeded = exports.replaceWithSerializableTypeIfNeeded = exports.setSearchParams = exports.setOAuthToObject = exports.setBearerAuthToObject = exports.setBasicAuthToObject = exports.setApiKeyToObject = exports.assertParamExists = exports.DUMMY_BASE_URL = void 0;
|
|
17
|
+
const base_1 = require("./base");
|
|
18
|
+
exports.DUMMY_BASE_URL = 'https://example.com';
|
|
19
|
+
/**
|
|
20
|
+
*
|
|
21
|
+
* @throws {RequiredError}
|
|
22
|
+
*/
|
|
23
|
+
const assertParamExists = function (functionName, paramName, paramValue) {
|
|
24
|
+
if (paramValue === null || paramValue === undefined) {
|
|
25
|
+
throw new base_1.RequiredError(paramName, `Required parameter ${paramName} was null or undefined when calling ${functionName}.`);
|
|
26
|
+
}
|
|
27
|
+
};
|
|
28
|
+
exports.assertParamExists = assertParamExists;
|
|
29
|
+
const setApiKeyToObject = async function (object, keyParamName, configuration) {
|
|
30
|
+
if (configuration && configuration.apiKey) {
|
|
31
|
+
const localVarApiKeyValue = typeof configuration.apiKey === 'function'
|
|
32
|
+
? await configuration.apiKey(keyParamName)
|
|
33
|
+
: await configuration.apiKey;
|
|
34
|
+
object[keyParamName] = localVarApiKeyValue;
|
|
35
|
+
}
|
|
36
|
+
};
|
|
37
|
+
exports.setApiKeyToObject = setApiKeyToObject;
|
|
38
|
+
const setBasicAuthToObject = function (object, configuration) {
|
|
39
|
+
if (configuration && (configuration.username || configuration.password)) {
|
|
40
|
+
object["auth"] = { username: configuration.username, password: configuration.password };
|
|
41
|
+
}
|
|
42
|
+
};
|
|
43
|
+
exports.setBasicAuthToObject = setBasicAuthToObject;
|
|
44
|
+
const setBearerAuthToObject = async function (object, configuration) {
|
|
45
|
+
if (configuration && configuration.accessToken) {
|
|
46
|
+
const accessToken = typeof configuration.accessToken === 'function'
|
|
47
|
+
? await configuration.accessToken()
|
|
48
|
+
: await configuration.accessToken;
|
|
49
|
+
object["Authorization"] = "Bearer " + accessToken;
|
|
50
|
+
}
|
|
51
|
+
};
|
|
52
|
+
exports.setBearerAuthToObject = setBearerAuthToObject;
|
|
53
|
+
const setOAuthToObject = async function (object, name, scopes, configuration) {
|
|
54
|
+
if (configuration && configuration.accessToken) {
|
|
55
|
+
const localVarAccessTokenValue = typeof configuration.accessToken === 'function'
|
|
56
|
+
? await configuration.accessToken(name, scopes)
|
|
57
|
+
: await configuration.accessToken;
|
|
58
|
+
object["Authorization"] = "Bearer " + localVarAccessTokenValue;
|
|
59
|
+
}
|
|
60
|
+
};
|
|
61
|
+
exports.setOAuthToObject = setOAuthToObject;
|
|
62
|
+
function setFlattenedQueryParams(urlSearchParams, parameter, key = "") {
|
|
63
|
+
if (parameter == null)
|
|
64
|
+
return;
|
|
65
|
+
if (typeof parameter === "object") {
|
|
66
|
+
if (Array.isArray(parameter) || parameter instanceof Set) {
|
|
67
|
+
parameter.forEach(item => setFlattenedQueryParams(urlSearchParams, item, key));
|
|
68
|
+
}
|
|
69
|
+
else {
|
|
70
|
+
Object.keys(parameter).forEach(currentKey => setFlattenedQueryParams(urlSearchParams, parameter[currentKey], `${key}${key !== '' ? '.' : ''}${currentKey}`));
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
else {
|
|
74
|
+
if (urlSearchParams.has(key)) {
|
|
75
|
+
urlSearchParams.append(key, parameter);
|
|
76
|
+
}
|
|
77
|
+
else {
|
|
78
|
+
urlSearchParams.set(key, parameter);
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
const setSearchParams = function (url, ...objects) {
|
|
83
|
+
const searchParams = new URLSearchParams(url.search);
|
|
84
|
+
setFlattenedQueryParams(searchParams, objects);
|
|
85
|
+
url.search = searchParams.toString();
|
|
86
|
+
};
|
|
87
|
+
exports.setSearchParams = setSearchParams;
|
|
88
|
+
/**
|
|
89
|
+
* JSON serialization helper function which replaces instances of unserializable types with serializable ones.
|
|
90
|
+
* This function will run for every key-value pair encountered by JSON.stringify while traversing an object.
|
|
91
|
+
* Converting a set to a string will return an empty object, so an intermediate conversion to an array is required.
|
|
92
|
+
*/
|
|
93
|
+
// @ts-ignore
|
|
94
|
+
const replaceWithSerializableTypeIfNeeded = function (key, value) {
|
|
95
|
+
if (value instanceof Set) {
|
|
96
|
+
return Array.from(value);
|
|
97
|
+
}
|
|
98
|
+
else {
|
|
99
|
+
return value;
|
|
100
|
+
}
|
|
101
|
+
};
|
|
102
|
+
exports.replaceWithSerializableTypeIfNeeded = replaceWithSerializableTypeIfNeeded;
|
|
103
|
+
const serializeDataIfNeeded = function (value, requestOptions, configuration) {
|
|
104
|
+
const nonString = typeof value !== 'string';
|
|
105
|
+
const needsSerialization = nonString && configuration && configuration.isJsonMime
|
|
106
|
+
? configuration.isJsonMime(requestOptions.headers['Content-Type'])
|
|
107
|
+
: nonString;
|
|
108
|
+
return needsSerialization
|
|
109
|
+
? JSON.stringify(value !== undefined ? value : {}, exports.replaceWithSerializableTypeIfNeeded)
|
|
110
|
+
: (value || "");
|
|
111
|
+
};
|
|
112
|
+
exports.serializeDataIfNeeded = serializeDataIfNeeded;
|
|
113
|
+
const toPathString = function (url) {
|
|
114
|
+
return url.pathname + url.search + url.hash;
|
|
115
|
+
};
|
|
116
|
+
exports.toPathString = toPathString;
|
|
117
|
+
const createRequestFunction = function (axiosArgs, globalAxios, BASE_PATH, configuration) {
|
|
118
|
+
return (axios = globalAxios, basePath = BASE_PATH) => {
|
|
119
|
+
const axiosRequestArgs = { ...axiosArgs.options, url: (axios.defaults.baseURL ? '' : configuration?.basePath ?? basePath) + axiosArgs.url };
|
|
120
|
+
return axios.request(axiosRequestArgs);
|
|
121
|
+
};
|
|
122
|
+
};
|
|
123
|
+
exports.createRequestFunction = createRequestFunction;
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Backend API
|
|
3
|
+
* 간단한 사용자 관리 API
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 1.0.0
|
|
6
|
+
*
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
interface AWSv4Configuration {
|
|
13
|
+
options?: {
|
|
14
|
+
region?: string;
|
|
15
|
+
service?: string;
|
|
16
|
+
};
|
|
17
|
+
credentials?: {
|
|
18
|
+
accessKeyId?: string;
|
|
19
|
+
secretAccessKey?: string;
|
|
20
|
+
sessionToken?: string;
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
export interface ConfigurationParameters {
|
|
24
|
+
apiKey?: string | Promise<string> | ((name: string) => string) | ((name: string) => Promise<string>);
|
|
25
|
+
username?: string;
|
|
26
|
+
password?: string;
|
|
27
|
+
accessToken?: string | Promise<string> | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise<string>);
|
|
28
|
+
awsv4?: AWSv4Configuration;
|
|
29
|
+
basePath?: string;
|
|
30
|
+
serverIndex?: number;
|
|
31
|
+
baseOptions?: any;
|
|
32
|
+
formDataCtor?: new () => any;
|
|
33
|
+
}
|
|
34
|
+
export declare class Configuration {
|
|
35
|
+
/**
|
|
36
|
+
* parameter for apiKey security
|
|
37
|
+
* @param name security name
|
|
38
|
+
*/
|
|
39
|
+
apiKey?: string | Promise<string> | ((name: string) => string) | ((name: string) => Promise<string>);
|
|
40
|
+
/**
|
|
41
|
+
* parameter for basic security
|
|
42
|
+
*/
|
|
43
|
+
username?: string;
|
|
44
|
+
/**
|
|
45
|
+
* parameter for basic security
|
|
46
|
+
*/
|
|
47
|
+
password?: string;
|
|
48
|
+
/**
|
|
49
|
+
* parameter for oauth2 security
|
|
50
|
+
* @param name security name
|
|
51
|
+
* @param scopes oauth2 scope
|
|
52
|
+
*/
|
|
53
|
+
accessToken?: string | Promise<string> | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise<string>);
|
|
54
|
+
/**
|
|
55
|
+
* parameter for aws4 signature security
|
|
56
|
+
* @param {Object} AWS4Signature - AWS4 Signature security
|
|
57
|
+
* @param {string} options.region - aws region
|
|
58
|
+
* @param {string} options.service - name of the service.
|
|
59
|
+
* @param {string} credentials.accessKeyId - aws access key id
|
|
60
|
+
* @param {string} credentials.secretAccessKey - aws access key
|
|
61
|
+
* @param {string} credentials.sessionToken - aws session token
|
|
62
|
+
* @memberof Configuration
|
|
63
|
+
*/
|
|
64
|
+
awsv4?: AWSv4Configuration;
|
|
65
|
+
/**
|
|
66
|
+
* override base path
|
|
67
|
+
*/
|
|
68
|
+
basePath?: string;
|
|
69
|
+
/**
|
|
70
|
+
* override server index
|
|
71
|
+
*/
|
|
72
|
+
serverIndex?: number;
|
|
73
|
+
/**
|
|
74
|
+
* base options for axios calls
|
|
75
|
+
*/
|
|
76
|
+
baseOptions?: any;
|
|
77
|
+
/**
|
|
78
|
+
* The FormData constructor that will be used to create multipart form data
|
|
79
|
+
* requests. You can inject this here so that execution environments that
|
|
80
|
+
* do not support the FormData class can still run the generated client.
|
|
81
|
+
*
|
|
82
|
+
* @type {new () => FormData}
|
|
83
|
+
*/
|
|
84
|
+
formDataCtor?: new () => any;
|
|
85
|
+
constructor(param?: ConfigurationParameters);
|
|
86
|
+
/**
|
|
87
|
+
* Check if the given MIME is a JSON MIME.
|
|
88
|
+
* JSON MIME examples:
|
|
89
|
+
* application/json
|
|
90
|
+
* application/json; charset=UTF8
|
|
91
|
+
* APPLICATION/JSON
|
|
92
|
+
* application/vnd.company+json
|
|
93
|
+
* @param mime - MIME (Multipurpose Internet Mail Extensions)
|
|
94
|
+
* @return True if the given MIME is JSON, false otherwise.
|
|
95
|
+
*/
|
|
96
|
+
isJsonMime(mime: string): boolean;
|
|
97
|
+
}
|
|
98
|
+
export {};
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/**
|
|
4
|
+
* Backend API
|
|
5
|
+
* 간단한 사용자 관리 API
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 1.0.0
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
exports.Configuration = void 0;
|
|
16
|
+
class Configuration {
|
|
17
|
+
constructor(param = {}) {
|
|
18
|
+
this.apiKey = param.apiKey;
|
|
19
|
+
this.username = param.username;
|
|
20
|
+
this.password = param.password;
|
|
21
|
+
this.accessToken = param.accessToken;
|
|
22
|
+
this.awsv4 = param.awsv4;
|
|
23
|
+
this.basePath = param.basePath;
|
|
24
|
+
this.serverIndex = param.serverIndex;
|
|
25
|
+
this.baseOptions = {
|
|
26
|
+
...param.baseOptions,
|
|
27
|
+
headers: {
|
|
28
|
+
...param.baseOptions?.headers,
|
|
29
|
+
},
|
|
30
|
+
};
|
|
31
|
+
this.formDataCtor = param.formDataCtor;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Check if the given MIME is a JSON MIME.
|
|
35
|
+
* JSON MIME examples:
|
|
36
|
+
* application/json
|
|
37
|
+
* application/json; charset=UTF8
|
|
38
|
+
* APPLICATION/JSON
|
|
39
|
+
* application/vnd.company+json
|
|
40
|
+
* @param mime - MIME (Multipurpose Internet Mail Extensions)
|
|
41
|
+
* @return True if the given MIME is JSON, false otherwise.
|
|
42
|
+
*/
|
|
43
|
+
isJsonMime(mime) {
|
|
44
|
+
const jsonMime = new RegExp('^(application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(;.*)?$', 'i');
|
|
45
|
+
return mime !== null && (jsonMime.test(mime) || mime.toLowerCase() === 'application/json-patch+json');
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
exports.Configuration = Configuration;
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Backend API
|
|
3
|
+
* 간단한 사용자 관리 API
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 1.0.0
|
|
6
|
+
*
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
export * from "./api";
|
|
13
|
+
export * from "./configuration";
|
|
14
|
+
export * from "./models";
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* Backend API
|
|
6
|
+
* 간단한 사용자 관리 API
|
|
7
|
+
*
|
|
8
|
+
* The version of the OpenAPI document: 1.0.0
|
|
9
|
+
*
|
|
10
|
+
*
|
|
11
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
|
+
* https://openapi-generator.tech
|
|
13
|
+
* Do not edit the class manually.
|
|
14
|
+
*/
|
|
15
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
16
|
+
if (k2 === undefined) k2 = k;
|
|
17
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
18
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
19
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
20
|
+
}
|
|
21
|
+
Object.defineProperty(o, k2, desc);
|
|
22
|
+
}) : (function(o, m, k, k2) {
|
|
23
|
+
if (k2 === undefined) k2 = k;
|
|
24
|
+
o[k2] = m[k];
|
|
25
|
+
}));
|
|
26
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
27
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
28
|
+
};
|
|
29
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
30
|
+
__exportStar(require("./api"), exports);
|
|
31
|
+
__exportStar(require("./configuration"), exports);
|
|
32
|
+
__exportStar(require("./models"), exports);
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./login-request"), exports);
|
|
18
|
+
__exportStar(require("./login-response"), exports);
|
|
19
|
+
__exportStar(require("./user-response"), exports);
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Backend API
|
|
3
|
+
* 간단한 사용자 관리 API
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 1.0.0
|
|
6
|
+
*
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
/**
|
|
13
|
+
* 로그인 요청
|
|
14
|
+
*/
|
|
15
|
+
export interface LoginRequest {
|
|
16
|
+
/**
|
|
17
|
+
* 사용자 이메일
|
|
18
|
+
*/
|
|
19
|
+
email: string;
|
|
20
|
+
/**
|
|
21
|
+
* 비밀번호
|
|
22
|
+
*/
|
|
23
|
+
password: string;
|
|
24
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* Backend API
|
|
6
|
+
* 간단한 사용자 관리 API
|
|
7
|
+
*
|
|
8
|
+
* The version of the OpenAPI document: 1.0.0
|
|
9
|
+
*
|
|
10
|
+
*
|
|
11
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
|
+
* https://openapi-generator.tech
|
|
13
|
+
* Do not edit the class manually.
|
|
14
|
+
*/
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Backend API
|
|
3
|
+
* 간단한 사용자 관리 API
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 1.0.0
|
|
6
|
+
*
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
/**
|
|
13
|
+
* 로그인 응답
|
|
14
|
+
*/
|
|
15
|
+
export interface LoginResponse {
|
|
16
|
+
/**
|
|
17
|
+
* JWT 액세스 토큰
|
|
18
|
+
*/
|
|
19
|
+
accessToken: string;
|
|
20
|
+
/**
|
|
21
|
+
* 토큰 타입
|
|
22
|
+
*/
|
|
23
|
+
tokenType: string;
|
|
24
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* Backend API
|
|
6
|
+
* 간단한 사용자 관리 API
|
|
7
|
+
*
|
|
8
|
+
* The version of the OpenAPI document: 1.0.0
|
|
9
|
+
*
|
|
10
|
+
*
|
|
11
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
|
+
* https://openapi-generator.tech
|
|
13
|
+
* Do not edit the class manually.
|
|
14
|
+
*/
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Backend API
|
|
3
|
+
* 간단한 사용자 관리 API
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 1.0.0
|
|
6
|
+
*
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
/**
|
|
13
|
+
* 사용자 정보
|
|
14
|
+
*/
|
|
15
|
+
export interface UserResponse {
|
|
16
|
+
/**
|
|
17
|
+
* 사용자 ID
|
|
18
|
+
*/
|
|
19
|
+
id: number;
|
|
20
|
+
/**
|
|
21
|
+
* 사용자 이름
|
|
22
|
+
*/
|
|
23
|
+
name: string;
|
|
24
|
+
/**
|
|
25
|
+
* 사용자 이메일
|
|
26
|
+
*/
|
|
27
|
+
email: string;
|
|
28
|
+
/**
|
|
29
|
+
* 역할
|
|
30
|
+
*/
|
|
31
|
+
role: string;
|
|
32
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* Backend API
|
|
6
|
+
* 간단한 사용자 관리 API
|
|
7
|
+
*
|
|
8
|
+
* The version of the OpenAPI document: 1.0.0
|
|
9
|
+
*
|
|
10
|
+
*
|
|
11
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
|
+
* https://openapi-generator.tech
|
|
13
|
+
* Do not edit the class manually.
|
|
14
|
+
*/
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
package/package.json
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@ject-2-test/backend-api-client",
|
|
3
|
+
"version": "0.0.1",
|
|
4
|
+
"description": "Backend API client generated from OpenAPI spec",
|
|
5
|
+
"main": "dist/index.js",
|
|
6
|
+
"types": "dist/index.d.ts",
|
|
7
|
+
"files": ["dist"],
|
|
8
|
+
"scripts": {
|
|
9
|
+
"build": "tsc",
|
|
10
|
+
"prepublishOnly": "npm run build"
|
|
11
|
+
},
|
|
12
|
+
"dependencies": {
|
|
13
|
+
"axios": "^1.7.0"
|
|
14
|
+
},
|
|
15
|
+
"devDependencies": {
|
|
16
|
+
"typescript": "^5.5.0"
|
|
17
|
+
},
|
|
18
|
+
"license": "MIT"
|
|
19
|
+
}
|