@ject-2-test/backend-api-client 1.0.0

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.
@@ -0,0 +1,129 @@
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
+ import type { UserResponse } from '../models';
18
+ /**
19
+ * DefaultApi - axios parameter creator
20
+ */
21
+ export declare const DefaultApiAxiosParamCreator: (configuration?: Configuration) => {
22
+ /**
23
+ * 등록된 모든 사용자 목록을 조회합니다.
24
+ * @summary 사용자 전체 조회
25
+ * @param {*} [options] Override http request option.
26
+ * @throws {RequiredError}
27
+ */
28
+ getAllUsers: (options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
29
+ /**
30
+ * ID로 특정 사용자를 조회합니다.
31
+ * @summary 사용자 단건 조회
32
+ * @param {number} id 사용자 ID
33
+ * @param {*} [options] Override http request option.
34
+ * @throws {RequiredError}
35
+ */
36
+ getUserById: (id: number, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
37
+ /**
38
+ * 이메일/비밀번호로 로그인하여 JWT 토큰을 발급받습니다.
39
+ * @summary 로그인
40
+ * @param {LoginRequest} loginRequest
41
+ * @param {*} [options] Override http request option.
42
+ * @throws {RequiredError}
43
+ */
44
+ login: (loginRequest: LoginRequest, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
45
+ };
46
+ /**
47
+ * DefaultApi - functional programming interface
48
+ */
49
+ export declare const DefaultApiFp: (configuration?: Configuration) => {
50
+ /**
51
+ * 등록된 모든 사용자 목록을 조회합니다.
52
+ * @summary 사용자 전체 조회
53
+ * @param {*} [options] Override http request option.
54
+ * @throws {RequiredError}
55
+ */
56
+ getAllUsers(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<UserResponse>>>;
57
+ /**
58
+ * ID로 특정 사용자를 조회합니다.
59
+ * @summary 사용자 단건 조회
60
+ * @param {number} id 사용자 ID
61
+ * @param {*} [options] Override http request option.
62
+ * @throws {RequiredError}
63
+ */
64
+ getUserById(id: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<UserResponse>>;
65
+ /**
66
+ * 이메일/비밀번호로 로그인하여 JWT 토큰을 발급받습니다.
67
+ * @summary 로그인
68
+ * @param {LoginRequest} loginRequest
69
+ * @param {*} [options] Override http request option.
70
+ * @throws {RequiredError}
71
+ */
72
+ login(loginRequest: LoginRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<LoginResponse>>;
73
+ };
74
+ /**
75
+ * DefaultApi - factory interface
76
+ */
77
+ export declare const DefaultApiFactory: (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) => {
78
+ /**
79
+ * 등록된 모든 사용자 목록을 조회합니다.
80
+ * @summary 사용자 전체 조회
81
+ * @param {*} [options] Override http request option.
82
+ * @throws {RequiredError}
83
+ */
84
+ getAllUsers(options?: RawAxiosRequestConfig): AxiosPromise<Array<UserResponse>>;
85
+ /**
86
+ * ID로 특정 사용자를 조회합니다.
87
+ * @summary 사용자 단건 조회
88
+ * @param {number} id 사용자 ID
89
+ * @param {*} [options] Override http request option.
90
+ * @throws {RequiredError}
91
+ */
92
+ getUserById(id: number, options?: RawAxiosRequestConfig): AxiosPromise<UserResponse>;
93
+ /**
94
+ * 이메일/비밀번호로 로그인하여 JWT 토큰을 발급받습니다.
95
+ * @summary 로그인
96
+ * @param {LoginRequest} loginRequest
97
+ * @param {*} [options] Override http request option.
98
+ * @throws {RequiredError}
99
+ */
100
+ login(loginRequest: LoginRequest, options?: RawAxiosRequestConfig): AxiosPromise<LoginResponse>;
101
+ };
102
+ /**
103
+ * DefaultApi - object-oriented interface
104
+ */
105
+ export declare class DefaultApi extends BaseAPI {
106
+ /**
107
+ * 등록된 모든 사용자 목록을 조회합니다.
108
+ * @summary 사용자 전체 조회
109
+ * @param {*} [options] Override http request option.
110
+ * @throws {RequiredError}
111
+ */
112
+ getAllUsers(options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<UserResponse[], any, {}>>;
113
+ /**
114
+ * ID로 특정 사용자를 조회합니다.
115
+ * @summary 사용자 단건 조회
116
+ * @param {number} id 사용자 ID
117
+ * @param {*} [options] Override http request option.
118
+ * @throws {RequiredError}
119
+ */
120
+ getUserById(id: number, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<UserResponse, any, {}>>;
121
+ /**
122
+ * 이메일/비밀번호로 로그인하여 JWT 토큰을 발급받습니다.
123
+ * @summary 로그인
124
+ * @param {LoginRequest} loginRequest
125
+ * @param {*} [options] Override http request option.
126
+ * @throws {RequiredError}
127
+ */
128
+ login(loginRequest: LoginRequest, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<LoginResponse, any, {}>>;
129
+ }
@@ -0,0 +1,249 @@
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.DefaultApi = exports.DefaultApiFactory = exports.DefaultApiFp = exports.DefaultApiAxiosParamCreator = 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
+ * DefaultApi - axios parameter creator
28
+ */
29
+ const DefaultApiAxiosParamCreator = 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
+ * 이메일/비밀번호로 로그인하여 JWT 토큰을 발급받습니다.
95
+ * @summary 로그인
96
+ * @param {LoginRequest} loginRequest
97
+ * @param {*} [options] Override http request option.
98
+ * @throws {RequiredError}
99
+ */
100
+ login: async (loginRequest, options = {}) => {
101
+ // verify required parameter 'loginRequest' is not null or undefined
102
+ (0, common_1.assertParamExists)('login', 'loginRequest', loginRequest);
103
+ const localVarPath = `/api/auth/login`;
104
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
105
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
106
+ let baseOptions;
107
+ if (configuration) {
108
+ baseOptions = configuration.baseOptions;
109
+ }
110
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options };
111
+ const localVarHeaderParameter = {};
112
+ const localVarQueryParameter = {};
113
+ // authentication bearerAuth required
114
+ // http bearer authentication required
115
+ await (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
116
+ localVarHeaderParameter['Content-Type'] = 'application/json';
117
+ localVarHeaderParameter['Accept'] = '*/*';
118
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
119
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
120
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
121
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(loginRequest, localVarRequestOptions, configuration);
122
+ return {
123
+ url: (0, common_1.toPathString)(localVarUrlObj),
124
+ options: localVarRequestOptions,
125
+ };
126
+ },
127
+ };
128
+ };
129
+ exports.DefaultApiAxiosParamCreator = DefaultApiAxiosParamCreator;
130
+ /**
131
+ * DefaultApi - functional programming interface
132
+ */
133
+ const DefaultApiFp = function (configuration) {
134
+ const localVarAxiosParamCreator = (0, exports.DefaultApiAxiosParamCreator)(configuration);
135
+ return {
136
+ /**
137
+ * 등록된 모든 사용자 목록을 조회합니다.
138
+ * @summary 사용자 전체 조회
139
+ * @param {*} [options] Override http request option.
140
+ * @throws {RequiredError}
141
+ */
142
+ async getAllUsers(options) {
143
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getAllUsers(options);
144
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
145
+ const localVarOperationServerBasePath = base_1.operationServerMap['DefaultApi.getAllUsers']?.[localVarOperationServerIndex]?.url;
146
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
147
+ },
148
+ /**
149
+ * ID로 특정 사용자를 조회합니다.
150
+ * @summary 사용자 단건 조회
151
+ * @param {number} id 사용자 ID
152
+ * @param {*} [options] Override http request option.
153
+ * @throws {RequiredError}
154
+ */
155
+ async getUserById(id, options) {
156
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getUserById(id, options);
157
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
158
+ const localVarOperationServerBasePath = base_1.operationServerMap['DefaultApi.getUserById']?.[localVarOperationServerIndex]?.url;
159
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
160
+ },
161
+ /**
162
+ * 이메일/비밀번호로 로그인하여 JWT 토큰을 발급받습니다.
163
+ * @summary 로그인
164
+ * @param {LoginRequest} loginRequest
165
+ * @param {*} [options] Override http request option.
166
+ * @throws {RequiredError}
167
+ */
168
+ async login(loginRequest, options) {
169
+ const localVarAxiosArgs = await localVarAxiosParamCreator.login(loginRequest, options);
170
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
171
+ const localVarOperationServerBasePath = base_1.operationServerMap['DefaultApi.login']?.[localVarOperationServerIndex]?.url;
172
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
173
+ },
174
+ };
175
+ };
176
+ exports.DefaultApiFp = DefaultApiFp;
177
+ /**
178
+ * DefaultApi - factory interface
179
+ */
180
+ const DefaultApiFactory = function (configuration, basePath, axios) {
181
+ const localVarFp = (0, exports.DefaultApiFp)(configuration);
182
+ return {
183
+ /**
184
+ * 등록된 모든 사용자 목록을 조회합니다.
185
+ * @summary 사용자 전체 조회
186
+ * @param {*} [options] Override http request option.
187
+ * @throws {RequiredError}
188
+ */
189
+ getAllUsers(options) {
190
+ return localVarFp.getAllUsers(options).then((request) => request(axios, basePath));
191
+ },
192
+ /**
193
+ * ID로 특정 사용자를 조회합니다.
194
+ * @summary 사용자 단건 조회
195
+ * @param {number} id 사용자 ID
196
+ * @param {*} [options] Override http request option.
197
+ * @throws {RequiredError}
198
+ */
199
+ getUserById(id, options) {
200
+ return localVarFp.getUserById(id, options).then((request) => request(axios, basePath));
201
+ },
202
+ /**
203
+ * 이메일/비밀번호로 로그인하여 JWT 토큰을 발급받습니다.
204
+ * @summary 로그인
205
+ * @param {LoginRequest} loginRequest
206
+ * @param {*} [options] Override http request option.
207
+ * @throws {RequiredError}
208
+ */
209
+ login(loginRequest, options) {
210
+ return localVarFp.login(loginRequest, options).then((request) => request(axios, basePath));
211
+ },
212
+ };
213
+ };
214
+ exports.DefaultApiFactory = DefaultApiFactory;
215
+ /**
216
+ * DefaultApi - object-oriented interface
217
+ */
218
+ class DefaultApi extends base_1.BaseAPI {
219
+ /**
220
+ * 등록된 모든 사용자 목록을 조회합니다.
221
+ * @summary 사용자 전체 조회
222
+ * @param {*} [options] Override http request option.
223
+ * @throws {RequiredError}
224
+ */
225
+ getAllUsers(options) {
226
+ return (0, exports.DefaultApiFp)(this.configuration).getAllUsers(options).then((request) => request(this.axios, this.basePath));
227
+ }
228
+ /**
229
+ * ID로 특정 사용자를 조회합니다.
230
+ * @summary 사용자 단건 조회
231
+ * @param {number} id 사용자 ID
232
+ * @param {*} [options] Override http request option.
233
+ * @throws {RequiredError}
234
+ */
235
+ getUserById(id, options) {
236
+ return (0, exports.DefaultApiFp)(this.configuration).getUserById(id, options).then((request) => request(this.axios, this.basePath));
237
+ }
238
+ /**
239
+ * 이메일/비밀번호로 로그인하여 JWT 토큰을 발급받습니다.
240
+ * @summary 로그인
241
+ * @param {LoginRequest} loginRequest
242
+ * @param {*} [options] Override http request option.
243
+ * @throws {RequiredError}
244
+ */
245
+ login(loginRequest, options) {
246
+ return (0, exports.DefaultApiFp)(this.configuration).login(loginRequest, options).then((request) => request(this.axios, this.basePath));
247
+ }
248
+ }
249
+ exports.DefaultApi = DefaultApi;
package/dist/api.d.ts ADDED
@@ -0,0 +1,12 @@
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/default-api';
package/dist/api.js ADDED
@@ -0,0 +1,30 @@
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/default-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 = {};
@@ -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;
@@ -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,3 @@
1
+ export * from './login-request';
2
+ export * from './login-response';
3
+ export * from './user-response';
@@ -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,21 @@
1
+ {
2
+ "name": "@ject-2-test/backend-api-client",
3
+ "version": "1.0.0",
4
+ "description": "Backend API client generated from OpenAPI spec",
5
+ "main": "dist/index.js",
6
+ "types": "dist/index.d.ts",
7
+ "files": [
8
+ "dist"
9
+ ],
10
+ "scripts": {
11
+ "build": "tsc",
12
+ "prepublishOnly": "npm run build"
13
+ },
14
+ "dependencies": {
15
+ "axios": "^1.7.0"
16
+ },
17
+ "devDependencies": {
18
+ "typescript": "^5.5.0"
19
+ },
20
+ "license": "MIT"
21
+ }