diff --git a/.eslintrc.cjs b/.eslintrc.cjs index 968647b6..01f0264e 100644 --- a/.eslintrc.cjs +++ b/.eslintrc.cjs @@ -14,19 +14,6 @@ module.exports = { plugins: ['import', '@typescript-eslint', 'jsx-a11y', 'react-refresh'], rules: { 'react-refresh/only-export-components': ['warn', { allowConstantExport: true }], - // 'no-restricted-imports': [ - // 'error', - // { - // patterns: ['.*'], - // paths: [ - // { - // name: 'react', - // importNames: ['default'], - // message: "import React from 'react' makes bundle size larger.", - // }, - // ], - // }, - // ], 'sort-imports': [ 'error', { diff --git a/.gitignore b/.gitignore index 7b8472a9..174d0ddd 100644 --- a/.gitignore +++ b/.gitignore @@ -28,4 +28,13 @@ styled-system styled-system-studio ## .env -.env* \ No newline at end of file +.env* + + +## yarn +.yarn + +## scripts +# scripts +scripts/__generated__ +scripts/oas-templates \ No newline at end of file diff --git a/.yarnrc.yml b/.yarnrc.yml new file mode 100644 index 00000000..3186f3f0 --- /dev/null +++ b/.yarnrc.yml @@ -0,0 +1 @@ +nodeLinker: node-modules diff --git a/openapitools.json b/openapitools.json new file mode 100644 index 00000000..7a22382b --- /dev/null +++ b/openapitools.json @@ -0,0 +1,14 @@ +{ + "$schema": "node_modules/@openapitools/openapi-generator-cli/config.schema.json", + "spaces": 2, + "generator-cli": { + "version": "5.4.0" + }, + "supportsES6": true, + "withSeparateModelsAndApi": true, + "apiPackage": "api", + "modelPackage": "models", + "enumPropertyNaming": "original", + "enumNameSuffix": "", + "useSingleRequestParameter": false +} diff --git a/package.json b/package.json index 736fdcb1..fa4ca587 100644 --- a/package.json +++ b/package.json @@ -10,7 +10,9 @@ "production": "vite --mode production", "build": "tsc && vite build", "lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0", - "preview": "vite preview" + "preview": "vite preview", + "codegen": "node ./scripts/generate-oas.js", + "re:gen:api": "node ./scripts/re-create-api-json.js" }, "dependencies": { "@amplitude/analytics-browser": "^2.11.6", @@ -21,9 +23,11 @@ "@radix-ui/react-label": "^2.0.2", "@radix-ui/react-menubar": "^1.1.1", "@radix-ui/react-popover": "^1.1.1", - "@radix-ui/react-slot": "^1.0.2", - "@tanstack/react-query": "^5.29.0", + "@radix-ui/react-slot": "^1.1.1", + "@tanstack/react-query": "^5.64.2", "@tanstack/react-query-devtools": "^5.51.23", + "@vanilla-extract/css": "^1.17.0", + "@vanilla-extract/recipes": "^0.5.5", "axios": "^1.6.8", "country-flag-icons": "^1.5.13", "date-fns": "^3.6.0", @@ -40,8 +44,10 @@ "react": "^18.2.0", "react-day-picker": "^8.10.1", "react-dom": "^18.2.0", + "react-error-boundary": "^5.0.0", "react-helmet-async": "^2.0.4", "react-hook-form": "^7.51.4", + "react-icons": "^5.5.0", "react-image-file-resizer": "^0.4.8", "react-router-dom": "^6.22.3", "react-select": "^5.8.0", @@ -51,6 +57,7 @@ "zod": "^3.23.8" }, "devDependencies": { + "@openapitools/openapi-generator-cli": "^2.16.3", "@pandacss/dev": "^0.37.2", "@tanstack/eslint-plugin-query": "^5.51.15", "@types/qs": "^6.9.16", @@ -58,6 +65,7 @@ "@types/react-dom": "^18.2.22", "@typescript-eslint/eslint-plugin": "^7.2.0", "@typescript-eslint/parser": "^7.2.0", + "@vanilla-extract/vite-plugin": "^4.0.19", "@vitejs/plugin-react-swc": "^3.5.0", "eslint": "^8.57.0", "eslint-config-prettier": "^9.1.0", @@ -70,5 +78,6 @@ "typescript": "^5.2.2", "vite": "^5.2.0", "vite-tsconfig-paths": "^4.3.2" - } + }, + "packageManager": "yarn@4.6.0" } diff --git a/packages/api/index.ts b/packages/api/index.ts new file mode 100644 index 00000000..924764a8 --- /dev/null +++ b/packages/api/index.ts @@ -0,0 +1 @@ +export * as kuKeyClient from './ku-key/index' diff --git a/packages/api/ku-key/.gitignore b/packages/api/ku-key/.gitignore new file mode 100644 index 00000000..149b5765 --- /dev/null +++ b/packages/api/ku-key/.gitignore @@ -0,0 +1,4 @@ +wwwroot/*.js +node_modules +typings +dist diff --git a/packages/api/ku-key/.npmignore b/packages/api/ku-key/.npmignore new file mode 100644 index 00000000..999d88df --- /dev/null +++ b/packages/api/ku-key/.npmignore @@ -0,0 +1 @@ +# empty npmignore to ensure all required files (e.g., in the dist folder) are published by npm \ No newline at end of file diff --git a/packages/api/ku-key/.openapi-generator-ignore b/packages/api/ku-key/.openapi-generator-ignore new file mode 100644 index 00000000..ad66c7e1 --- /dev/null +++ b/packages/api/ku-key/.openapi-generator-ignore @@ -0,0 +1,27 @@ +# OpenAPI Generator Ignore +# Generated by openapi-generator https://github.com/openapitools/openapi-generator + +# Use this file to prevent files from being overwritten by the generator. +# The patterns follow closely to .gitignore or .dockerignore. + +# As an example, the C# client generator defines ApiClient.cs. +# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: +#ApiClient.cs + +# You can match any string of characters against a directory, file or extension with a single asterisk (*): +#foo/*/qux +# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux + +# You can recursively match patterns against a directory, file or extension with a double asterisk (**): +#foo/**/qux +# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux + +# You can also negate patterns with an exclamation (!). +# For example, you can ignore all files in a docs folder with the file extension .md: +#docs/*.md +# Then explicitly reverse the ignore rule for a single file: +#!docs/README.md + +.npmignore +.gitignore +git_push.sh diff --git a/packages/api/ku-key/.openapi-generator/FILES b/packages/api/ku-key/.openapi-generator/FILES new file mode 100644 index 00000000..bc87100f --- /dev/null +++ b/packages/api/ku-key/.openapi-generator/FILES @@ -0,0 +1,151 @@ +.gitignore +.npmignore +.openapi-generator-ignore +api.ts +api/attendance-check-api.ts +api/auth-api.ts +api/banner-api.ts +api/board-api.ts +api/calendar-api.ts +api/club-api.ts +api/comment-api.ts +api/course-api.ts +api/course-review-api.ts +api/default-api.ts +api/friendship-api.ts +api/notice-api.ts +api/post-api.ts +api/report-api.ts +api/schedule-api.ts +api/timetable-api.ts +api/user-api.ts +base.ts +common.ts +configuration.ts +git_push.sh +index.ts +models/academic-schedule.ts +models/accept-report-request-dto.ts +models/banner-dto.ts +models/board-info.ts +models/change-password-request-dto.ts +models/change-password-response-dto.ts +models/character.ts +models/check-course-review-reading-ticket-response-dto.ts +models/check-possible-response-dto.ts +models/comment.ts +models/common-course-response-dto-details.ts +models/common-course-response-dto.ts +models/common-delete-response-dto.ts +models/common-timetable-response-dto.ts +models/community-user.ts +models/course-review-response-dto.ts +models/create-calendar-data-request-dto.ts +models/create-calendar-data-response-dto.ts +models/create-club-response-dto.ts +models/create-comment-request-dto.ts +models/create-course-review-request-dto.ts +models/create-report-request-dto.ts +models/create-report-response-dto.ts +models/create-schedule-request-dto.ts +models/create-schedule-response-dto.ts +models/create-timetable-course-response-dto.ts +models/create-timetable-dto.ts +models/cursor-page-meta-response-dto.ts +models/delete-calendar-data-response-dto.ts +models/delete-club-response-dto.ts +models/delete-comment-response-dto.ts +models/delete-friendship-response-dto.ts +models/delete-post-response-dto.ts +models/delete-schedule-response-dto.ts +models/delete-user-response-dto.ts +models/event.ts +models/friend-character-dto.ts +models/get-academic-schedule-data-response-dto.ts +models/get-banner-image-url-response-dto.ts +models/get-board-response-dto.ts +models/get-club-detail-response-dto.ts +models/get-club-response-dto.ts +models/get-comment-response-dto.ts +models/get-course-info-by-timetable-id-response-dto.ts +models/get-course-review-summary-response-dto.ts +models/get-course-reviews-response-dto.ts +models/get-courses-with-course-reviews-response-dto.ts +models/get-daily-calendar-data-response-dto.ts +models/get-friend-response-dto.ts +models/get-hot-club-response-dto.ts +models/get-my-comment-list-response-dto.ts +models/get-notice-response-dto.ts +models/get-point-history-response-dto.ts +models/get-post-list-response-dto.ts +models/get-post-list-with-board-response-dto.ts +models/get-post-response-dto.ts +models/get-profile-response-dto.ts +models/get-received-friendship-request-count-dto.ts +models/get-recommend-club-response-dto.ts +models/get-report-list-response-dto.ts +models/get-report-response-dto.ts +models/get-schedule-info-by-timetable-id-response-dto.ts +models/get-screenshot-verifications-response-dto.ts +models/get-timetable-by-timetable-id-dto.ts +models/get-timetable-by-user-id-response-dto.ts +models/get-today-timetable-response.ts +models/get-waiting-friend-response-dto.ts +models/image.ts +models/index.ts +models/jwt-token-dto.ts +models/language-request-dto.ts +models/language-response-dto.ts +models/like-comment-response-dto.ts +models/login-request-dto.ts +models/login-response-dto.ts +models/logout-request-dto.ts +models/logout-response-dto.ts +models/my-comment.ts +models/notice-dto.ts +models/paginated-course-reviews-dto.ts +models/paginated-courses-dto.ts +models/password-dto.ts +models/post-preview-with-board-name.ts +models/post-preview.ts +models/purchase-item-request-dto.ts +models/purchase-item-response-dto.ts +models/react-post-request-dto.ts +models/react-post-response-dto.ts +models/reaction-count.ts +models/reported-comment.ts +models/reported-post.ts +models/reported-user.ts +models/review-dto.ts +models/scrap-post-response-dto.ts +models/search-course-reviews-with-keyword-response.ts +models/search-user-response-dto.ts +models/select-character-level-request-dto.ts +models/select-character-level-response-dto.ts +models/send-friendship-request-dto.ts +models/send-friendship-response-dto.ts +models/send-temp-password-request-dto.ts +models/send-temp-password-response-dto.ts +models/set-exchange-day-reqeust-dto.ts +models/set-profile-request-dto.ts +models/set-response-dto.ts +models/sign-up-response-dto.ts +models/take-attendance-response-dto.ts +models/timetable-dto.ts +models/today-course-dto.ts +models/today-schedule-dto.ts +models/update-calendar-data-request-dto.ts +models/update-calendar-data-response-dto.ts +models/update-club-response-dto.ts +models/update-comment-request-dto.ts +models/update-friendship-response-dto.ts +models/update-schedule-request-dto.ts +models/update-schedule-response-dto.ts +models/update-timetable-color-dto.ts +models/update-timetable-name-dto.ts +models/verification-request-dto.ts +models/verification-response-dto.ts +models/verify-email-request-dto.ts +models/verify-email-response-dto.ts +models/verify-screenshot-request-dto.ts +models/verify-screenshot-response-dto.ts diff --git a/packages/api/ku-key/.openapi-generator/VERSION b/packages/api/ku-key/.openapi-generator/VERSION new file mode 100644 index 00000000..1e20ec35 --- /dev/null +++ b/packages/api/ku-key/.openapi-generator/VERSION @@ -0,0 +1 @@ +5.4.0 \ No newline at end of file diff --git a/packages/api/ku-key/api.ts b/packages/api/ku-key/api.ts new file mode 100644 index 00000000..82de96f3 --- /dev/null +++ b/packages/api/ku-key/api.ts @@ -0,0 +1,31 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * KU-KEY API + * API for KU-KEY service + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +export * as AttendanceCheckApi from './api/attendance-check-api' +export * as AuthApi from './api/auth-api' +export * as BannerApi from './api/banner-api' +export * as BoardApi from './api/board-api' +export * as CalendarApi from './api/calendar-api' +export * as ClubApi from './api/club-api' +export * as CommentApi from './api/comment-api' +export * as CourseApi from './api/course-api' +export * as CourseReviewApi from './api/course-review-api' +export * as DefaultApi from './api/default-api' +export * as FriendshipApi from './api/friendship-api' +export * as NoticeApi from './api/notice-api' +export * as PostApi from './api/post-api' +export * as ReportApi from './api/report-api' +export * as ScheduleApi from './api/schedule-api' +export * as TimetableApi from './api/timetable-api' +export * as UserApi from './api/user-api' diff --git a/packages/api/ku-key/api/attendance-check-api.ts b/packages/api/ku-key/api/attendance-check-api.ts new file mode 100644 index 00000000..a2325aed --- /dev/null +++ b/packages/api/ku-key/api/attendance-check-api.ts @@ -0,0 +1,174 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * KU-KEY API + * API for KU-KEY service + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import globalAxios, { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios' +import { Configuration } from '../configuration' +// Some imports not used depending on template conditions +// @ts-ignore +import { DUMMY_BASE_URL, assertParamExists, setSearchParams, toPathString, createRequestFunction } from '../common' +// @ts-ignore +import { COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from '../base' + +// @ts-ignore +import { TakeAttendanceResponseDto } from '../models' +/** + * AttendanceCheckApi - axios parameter creator + * @export + */ +/** + * 오늘 출석을 이미 했는지 확인합니다. + * @summary 오늘 출석 체크 여부 확인 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +const attendanceCheckGetAxiosParamCreator = async ( + options: AxiosRequestConfig = {}, + configuration?: Configuration, +): Promise => { + const localVarPath = `/attendance-check` + // 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 + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } +} +/** + * 이미 출석한 날에는 더 이상 출석할 수 없습니다. + * @summary 출석 체크 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +const attendanceCheckPostAxiosParamCreator = async ( + options: AxiosRequestConfig = {}, + configuration?: Configuration, +): Promise => { + const localVarPath = `/attendance-check` + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL) + let baseOptions + if (configuration) { + baseOptions = configuration.baseOptions + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options } + const localVarHeaderParameter = {} as any + const localVarQueryParameter = {} as any + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } +} + +/** + * AttendanceCheckApi - functional programming interface + * @export + */ +/** + * 오늘 출석을 이미 했는지 확인합니다. + * @summary 오늘 출석 체크 여부 확인 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +const attendanceCheckGetFp = async ( + options?: AxiosRequestConfig, + configuration?: Configuration, +): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> => { + const localVarAxiosArgs = await attendanceCheckGetAxiosParamCreator(options, configuration) + return createRequestFunction(localVarAxiosArgs, globalAxios, configuration) +} +/** + * 이미 출석한 날에는 더 이상 출석할 수 없습니다. + * @summary 출석 체크 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +const attendanceCheckPostFp = async ( + options?: AxiosRequestConfig, + configuration?: Configuration, +): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> => { + const localVarAxiosArgs = await attendanceCheckPostAxiosParamCreator(options, configuration) + return createRequestFunction(localVarAxiosArgs, globalAxios, configuration) +} + +/** + * AttendanceCheckApi - factory interface + * @export + */ + +export type AttendanceCheckGetRequestParams = { + options?: any +} + +/** + * 오늘 출석을 이미 했는지 확인합니다. + * @summary 오늘 출석 체크 여부 확인 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +export const attendanceCheckGet = ({ + configuration, + basePath, + axios, +}: { + configuration?: Configuration + basePath?: string + axios?: AxiosInstance +}) => { + return (params?: { options?: any }): AxiosPromise => { + return attendanceCheckGetFp(params?.options, configuration).then(request => request(axios, basePath)) + } +} + +export type AttendanceCheckPostRequestParams = { + options?: any +} + +/** + * 이미 출석한 날에는 더 이상 출석할 수 없습니다. + * @summary 출석 체크 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +export const attendanceCheckPost = ({ + configuration, + basePath, + axios, +}: { + configuration?: Configuration + basePath?: string + axios?: AxiosInstance +}) => { + return (params?: { options?: any }): AxiosPromise => { + return attendanceCheckPostFp(params?.options, configuration).then(request => request(axios, basePath)) + } +} diff --git a/packages/api/ku-key/api/auth-api.ts b/packages/api/ku-key/api/auth-api.ts new file mode 100644 index 00000000..fe40016c --- /dev/null +++ b/packages/api/ku-key/api/auth-api.ts @@ -0,0 +1,1350 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * KU-KEY API + * API for KU-KEY service + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import globalAxios, { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios' +import { Configuration } from '../configuration' +// Some imports not used depending on template conditions +// @ts-ignore +import { DUMMY_BASE_URL, assertParamExists, setSearchParams, toPathString, createRequestFunction } from '../common' +// @ts-ignore +import { COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from '../base' + +// @ts-ignore +import { ChangePasswordRequestDto } from '../models' +// @ts-ignore +import { ChangePasswordResponseDto } from '../models' +// @ts-ignore +import { CheckPossibleResponseDto } from '../models' +// @ts-ignore +import { GetScreenshotVerificationsResponseDto } from '../models' +// @ts-ignore +import { JwtTokenDto } from '../models' +// @ts-ignore +import { LoginRequestDto } from '../models' +// @ts-ignore +import { LoginResponseDto } from '../models' +// @ts-ignore +import { LogoutRequestDto } from '../models' +// @ts-ignore +import { LogoutResponseDto } from '../models' +// @ts-ignore +import { PasswordDto } from '../models' +// @ts-ignore +import { SendTempPasswordRequestDto } from '../models' +// @ts-ignore +import { SendTempPasswordResponseDto } from '../models' +// @ts-ignore +import { SignUpResponseDto } from '../models' +// @ts-ignore +import { VerificationRequestDto } from '../models' +// @ts-ignore +import { VerificationResponseDto } from '../models' +// @ts-ignore +import { VerifyEmailRequestDto } from '../models' +// @ts-ignore +import { VerifyEmailResponseDto } from '../models' +// @ts-ignore +import { VerifyScreenshotRequestDto } from '../models' +// @ts-ignore +import { VerifyScreenshotResponseDto } from '../models' +/** + * AuthApi - axios parameter creator + * @export + */ +/** + * 승인 대기 중인 학교 인증 요청 목록을 조회합니다. + * @summary 학교인증 요청 목록 조회 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +const authAdminRequestGetAxiosParamCreator = async ( + options: AxiosRequestConfig = {}, + configuration?: Configuration, +): Promise => { + const localVarPath = `/auth/admin/request` + // 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 + + 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 + * @param {VerifyScreenshotRequestDto} verifyScreenshotRequestDto + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +const authAdminRequestIdPostAxiosParamCreator = async ( + id: number, + verifyScreenshotRequestDto: VerifyScreenshotRequestDto, + options: AxiosRequestConfig = {}, + configuration?: Configuration, +): Promise => { + const localVarPath = `/auth/admin/request/{id}`.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 + + localVarHeaderParameter['Content-Type'] = 'application/json' + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers } + localVarRequestOptions.data = verifyScreenshotRequestDto || undefined + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } +} +/** + * 요청한 email을 사용하는 유저가 있는지 확인합니다. + * @summary email 중복 확인 + * @param {string} email 중복확인하고자 하는 email + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +const authEmailEmailPostAxiosParamCreator = async ( + email: string, + options: AxiosRequestConfig = {}, + configuration?: Configuration, +): Promise => { + const localVarPath = `/auth/email/{email}`.replace(`{${'email'}}`, encodeURIComponent(String(email))) + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL) + let baseOptions + if (configuration) { + baseOptions = configuration.baseOptions + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options } + const localVarHeaderParameter = {} as any + const localVarQueryParameter = {} as any + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } +} +/** + * 유저가 인증이 되었는지 확인합니다. + * @summary 인증 여부 확인 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +const authIsVerifiedGetAxiosParamCreator = async ( + options: AxiosRequestConfig = {}, + configuration?: Configuration, +): Promise => { + const localVarPath = `/auth/is-verified` + // 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 + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } +} +/** + * 로그인하여 JWT Token을 발급받습니다. Access Token의 만료기간은 5분이고 Refresh Token의 만료기간은 로그인 유지가 참일 경우 14일, 아닐 경우 2일입니다. + * @summary 로그인 + * @param {LoginRequestDto} loginRequestDto + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +const authLoginPostAxiosParamCreator = async ( + loginRequestDto: LoginRequestDto, + options: AxiosRequestConfig = {}, + configuration?: Configuration, +): Promise => { + const localVarPath = `/auth/login` + // 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 + + localVarHeaderParameter['Content-Type'] = 'application/json' + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers } + localVarRequestOptions.data = loginRequestDto || undefined + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } +} +/** + * 서버에 저장된 Refresh Token을 삭제합니다. + * @summary 로그아웃 + * @param {LogoutRequestDto} logoutRequestDto + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +const authLogoutPostAxiosParamCreator = async ( + logoutRequestDto: LogoutRequestDto, + options: AxiosRequestConfig = {}, + configuration?: Configuration, +): Promise => { + const localVarPath = `/auth/logout` + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL) + let baseOptions + if (configuration) { + baseOptions = configuration.baseOptions + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options } + const localVarHeaderParameter = {} as any + const localVarQueryParameter = {} as any + + localVarHeaderParameter['Content-Type'] = 'application/json' + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers } + localVarRequestOptions.data = logoutRequestDto || undefined + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } +} +/** + * 사용자의 비밀번호를 변경합니다. + * @summary 비밀번호 변경 + * @param {ChangePasswordRequestDto} changePasswordRequestDto + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +const authPasswordPatchAxiosParamCreator = async ( + changePasswordRequestDto: ChangePasswordRequestDto, + options: AxiosRequestConfig = {}, + configuration?: Configuration, +): Promise => { + const localVarPath = `/auth/password` + // 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: 'PATCH', ...baseOptions, ...options } + const localVarHeaderParameter = {} as any + const localVarQueryParameter = {} as any + + localVarHeaderParameter['Content-Type'] = 'application/json' + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers } + localVarRequestOptions.data = changePasswordRequestDto || undefined + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } +} +/** + * 저장된 비밀번호가 맞는지 확인합니다. + * @summary 비밀번호 확인 + * @param {PasswordDto} passwordDto + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +const authPasswordPostAxiosParamCreator = async ( + passwordDto: PasswordDto, + options: AxiosRequestConfig = {}, + configuration?: Configuration, +): Promise => { + const localVarPath = `/auth/password` + // 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 + + localVarHeaderParameter['Content-Type'] = 'application/json' + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers } + localVarRequestOptions.data = passwordDto || undefined + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } +} +/** + * Refresh Token을 사용하여 Access Token과 Refresh Token을 재발급받습니다. + * @summary Token 재발급 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +const authRefreshPostAxiosParamCreator = async ( + options: AxiosRequestConfig = {}, + configuration?: Configuration, +): Promise => { + const localVarPath = `/auth/refresh` + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL) + let baseOptions + if (configuration) { + baseOptions = configuration.baseOptions + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options } + const localVarHeaderParameter = {} as any + const localVarQueryParameter = {} as any + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } +} +/** + * 이메일로 인증번호를 발송합니다. + * @summary 이메일 인증번호 발송 + * @param {VerificationRequestDto} verificationRequestDto + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +const authRequestEmailVerificationPostAxiosParamCreator = async ( + verificationRequestDto: VerificationRequestDto, + options: AxiosRequestConfig = {}, + configuration?: Configuration, +): Promise => { + const localVarPath = `/auth/request-email-verification` + // 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 + + localVarHeaderParameter['Content-Type'] = 'application/json' + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers } + localVarRequestOptions.data = verificationRequestDto || undefined + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } +} +/** + * 유저정보를 생성하고 학교인증 요청을 발송합니다. + * @summary 회원가입 및 학교인증 요청 + * @param {string} email 인증완료된 사용자 이메일 + * @param {string} password 사용자 비밀번호 + * @param {string} username 중복확인 완료된 userId + * @param {string} name 본명 + * @param {string} country 국적 + * @param {string} homeUniversity 모교 + * @param {string} major 전공 + * @param {number} studentNumber 중복확인 완료된 학번 + * @param {any} screenshot 교환학생 합격 스크린샷 파일 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +const authSignUpPostAxiosParamCreator = async ( + email: string, + password: string, + username: string, + name: string, + country: string, + homeUniversity: string, + major: string, + studentNumber: number, + screenshot: any, + options: AxiosRequestConfig = {}, + configuration?: Configuration, +): Promise => { + const localVarPath = `/auth/sign-up` + // 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 + const localVarFormParams = new ((configuration && configuration.formDataCtor) || FormData)() + + if (email !== undefined) { + localVarFormParams.append('email', email as any) + } + + if (password !== undefined) { + localVarFormParams.append('password', password as any) + } + + if (username !== undefined) { + localVarFormParams.append('username', username as any) + } + + if (name !== undefined) { + localVarFormParams.append('name', name as any) + } + + if (country !== undefined) { + localVarFormParams.append('country', country as any) + } + + if (homeUniversity !== undefined) { + localVarFormParams.append('homeUniversity', homeUniversity as any) + } + + if (major !== undefined) { + localVarFormParams.append('major', major as any) + } + + if (studentNumber !== undefined) { + localVarFormParams.append('studentNumber', studentNumber as any) + } + + if (screenshot !== undefined) { + localVarFormParams.append('screenshot', screenshot as any) + } + + localVarHeaderParameter['Content-Type'] = 'multipart/form-data' + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers } + localVarRequestOptions.data = localVarFormParams + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } +} +/** + * 요청한 학번으로 인증된 유저가 있는지 확인합니다. + * @summary 학번 중복 확인 + * @param {number} studentNumber 중복확인하고자 하는 학번 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +const authStudentNumberStudentNumberPostAxiosParamCreator = async ( + studentNumber: number, + options: AxiosRequestConfig = {}, + configuration?: Configuration, +): Promise => { + const localVarPath = `/auth/student-number/{studentNumber}`.replace( + `{${'studentNumber'}}`, + encodeURIComponent(String(studentNumber)), + ) + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL) + let baseOptions + if (configuration) { + baseOptions = configuration.baseOptions + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options } + const localVarHeaderParameter = {} as any + const localVarQueryParameter = {} as any + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } +} +/** + * 임시비밀번호를 발급하여 이메일로 발송합니다. + * @summary 임시비밀번호 발급 + * @param {SendTempPasswordRequestDto} sendTempPasswordRequestDto + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +const authTemporaryPasswordPostAxiosParamCreator = async ( + sendTempPasswordRequestDto: SendTempPasswordRequestDto, + options: AxiosRequestConfig = {}, + configuration?: Configuration, +): Promise => { + const localVarPath = `/auth/temporary-password` + // 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 + + localVarHeaderParameter['Content-Type'] = 'application/json' + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers } + localVarRequestOptions.data = sendTempPasswordRequestDto || undefined + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } +} +/** + * 요청한 username을 사용하는 유저가 있는지 확인합니다. + * @summary username 중복 확인 + * @param {string} username 중복확인하고자 하는 username + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +const authUsernameUsernamePostAxiosParamCreator = async ( + username: string, + options: AxiosRequestConfig = {}, + configuration?: Configuration, +): Promise => { + const localVarPath = `/auth/username/{username}`.replace(`{${'username'}}`, encodeURIComponent(String(username))) + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL) + let baseOptions + if (configuration) { + baseOptions = configuration.baseOptions + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options } + const localVarHeaderParameter = {} as any + const localVarQueryParameter = {} as any + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } +} +/** + * 발송된 인증번호로 이메일을 인증합니다. + * @summary 이메일 인증 + * @param {VerifyEmailRequestDto} verifyEmailRequestDto + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +const authVerifyEmailPostAxiosParamCreator = async ( + verifyEmailRequestDto: VerifyEmailRequestDto, + options: AxiosRequestConfig = {}, + configuration?: Configuration, +): Promise => { + const localVarPath = `/auth/verify-email` + // 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 + + localVarHeaderParameter['Content-Type'] = 'application/json' + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers } + localVarRequestOptions.data = verifyEmailRequestDto || undefined + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } +} + +/** + * AuthApi - functional programming interface + * @export + */ +/** + * 승인 대기 중인 학교 인증 요청 목록을 조회합니다. + * @summary 학교인증 요청 목록 조회 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +const authAdminRequestGetFp = async ( + options?: AxiosRequestConfig, + configuration?: Configuration, +): Promise< + (axios?: AxiosInstance, basePath?: string) => AxiosPromise> +> => { + const localVarAxiosArgs = await authAdminRequestGetAxiosParamCreator(options, configuration) + return createRequestFunction(localVarAxiosArgs, globalAxios, configuration) +} +/** + * 학교 인증 요청을 승인 혹은 거절합니다. + * @summary 학교인증 요청 승인/거절 + * @param {number} id + * @param {VerifyScreenshotRequestDto} verifyScreenshotRequestDto + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +const authAdminRequestIdPostFp = async ( + id: number, + verifyScreenshotRequestDto: VerifyScreenshotRequestDto, + options?: AxiosRequestConfig, + configuration?: Configuration, +): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> => { + const localVarAxiosArgs = await authAdminRequestIdPostAxiosParamCreator( + id, + verifyScreenshotRequestDto, + options, + configuration, + ) + return createRequestFunction(localVarAxiosArgs, globalAxios, configuration) +} +/** + * 요청한 email을 사용하는 유저가 있는지 확인합니다. + * @summary email 중복 확인 + * @param {string} email 중복확인하고자 하는 email + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +const authEmailEmailPostFp = async ( + email: string, + options?: AxiosRequestConfig, + configuration?: Configuration, +): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> => { + const localVarAxiosArgs = await authEmailEmailPostAxiosParamCreator(email, options, configuration) + return createRequestFunction(localVarAxiosArgs, globalAxios, configuration) +} +/** + * 유저가 인증이 되었는지 확인합니다. + * @summary 인증 여부 확인 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +const authIsVerifiedGetFp = async ( + options?: AxiosRequestConfig, + configuration?: Configuration, +): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> => { + const localVarAxiosArgs = await authIsVerifiedGetAxiosParamCreator(options, configuration) + return createRequestFunction(localVarAxiosArgs, globalAxios, configuration) +} +/** + * 로그인하여 JWT Token을 발급받습니다. Access Token의 만료기간은 5분이고 Refresh Token의 만료기간은 로그인 유지가 참일 경우 14일, 아닐 경우 2일입니다. + * @summary 로그인 + * @param {LoginRequestDto} loginRequestDto + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +const authLoginPostFp = async ( + loginRequestDto: LoginRequestDto, + options?: AxiosRequestConfig, + configuration?: Configuration, +): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> => { + const localVarAxiosArgs = await authLoginPostAxiosParamCreator(loginRequestDto, options, configuration) + return createRequestFunction(localVarAxiosArgs, globalAxios, configuration) +} +/** + * 서버에 저장된 Refresh Token을 삭제합니다. + * @summary 로그아웃 + * @param {LogoutRequestDto} logoutRequestDto + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +const authLogoutPostFp = async ( + logoutRequestDto: LogoutRequestDto, + options?: AxiosRequestConfig, + configuration?: Configuration, +): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> => { + const localVarAxiosArgs = await authLogoutPostAxiosParamCreator(logoutRequestDto, options, configuration) + return createRequestFunction(localVarAxiosArgs, globalAxios, configuration) +} +/** + * 사용자의 비밀번호를 변경합니다. + * @summary 비밀번호 변경 + * @param {ChangePasswordRequestDto} changePasswordRequestDto + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +const authPasswordPatchFp = async ( + changePasswordRequestDto: ChangePasswordRequestDto, + options?: AxiosRequestConfig, + configuration?: Configuration, +): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> => { + const localVarAxiosArgs = await authPasswordPatchAxiosParamCreator(changePasswordRequestDto, options, configuration) + return createRequestFunction(localVarAxiosArgs, globalAxios, configuration) +} +/** + * 저장된 비밀번호가 맞는지 확인합니다. + * @summary 비밀번호 확인 + * @param {PasswordDto} passwordDto + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +const authPasswordPostFp = async ( + passwordDto: PasswordDto, + options?: AxiosRequestConfig, + configuration?: Configuration, +): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> => { + const localVarAxiosArgs = await authPasswordPostAxiosParamCreator(passwordDto, options, configuration) + return createRequestFunction(localVarAxiosArgs, globalAxios, configuration) +} +/** + * Refresh Token을 사용하여 Access Token과 Refresh Token을 재발급받습니다. + * @summary Token 재발급 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +const authRefreshPostFp = async ( + options?: AxiosRequestConfig, + configuration?: Configuration, +): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> => { + const localVarAxiosArgs = await authRefreshPostAxiosParamCreator(options, configuration) + return createRequestFunction(localVarAxiosArgs, globalAxios, configuration) +} +/** + * 이메일로 인증번호를 발송합니다. + * @summary 이메일 인증번호 발송 + * @param {VerificationRequestDto} verificationRequestDto + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +const authRequestEmailVerificationPostFp = async ( + verificationRequestDto: VerificationRequestDto, + options?: AxiosRequestConfig, + configuration?: Configuration, +): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> => { + const localVarAxiosArgs = await authRequestEmailVerificationPostAxiosParamCreator( + verificationRequestDto, + options, + configuration, + ) + return createRequestFunction(localVarAxiosArgs, globalAxios, configuration) +} +/** + * 유저정보를 생성하고 학교인증 요청을 발송합니다. + * @summary 회원가입 및 학교인증 요청 + * @param {string} email 인증완료된 사용자 이메일 + * @param {string} password 사용자 비밀번호 + * @param {string} username 중복확인 완료된 userId + * @param {string} name 본명 + * @param {string} country 국적 + * @param {string} homeUniversity 모교 + * @param {string} major 전공 + * @param {number} studentNumber 중복확인 완료된 학번 + * @param {any} screenshot 교환학생 합격 스크린샷 파일 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +const authSignUpPostFp = async ( + email: string, + password: string, + username: string, + name: string, + country: string, + homeUniversity: string, + major: string, + studentNumber: number, + screenshot: any, + options?: AxiosRequestConfig, + configuration?: Configuration, +): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> => { + const localVarAxiosArgs = await authSignUpPostAxiosParamCreator( + email, + password, + username, + name, + country, + homeUniversity, + major, + studentNumber, + screenshot, + options, + configuration, + ) + return createRequestFunction(localVarAxiosArgs, globalAxios, configuration) +} +/** + * 요청한 학번으로 인증된 유저가 있는지 확인합니다. + * @summary 학번 중복 확인 + * @param {number} studentNumber 중복확인하고자 하는 학번 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +const authStudentNumberStudentNumberPostFp = async ( + studentNumber: number, + options?: AxiosRequestConfig, + configuration?: Configuration, +): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> => { + const localVarAxiosArgs = await authStudentNumberStudentNumberPostAxiosParamCreator( + studentNumber, + options, + configuration, + ) + return createRequestFunction(localVarAxiosArgs, globalAxios, configuration) +} +/** + * 임시비밀번호를 발급하여 이메일로 발송합니다. + * @summary 임시비밀번호 발급 + * @param {SendTempPasswordRequestDto} sendTempPasswordRequestDto + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +const authTemporaryPasswordPostFp = async ( + sendTempPasswordRequestDto: SendTempPasswordRequestDto, + options?: AxiosRequestConfig, + configuration?: Configuration, +): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> => { + const localVarAxiosArgs = await authTemporaryPasswordPostAxiosParamCreator( + sendTempPasswordRequestDto, + options, + configuration, + ) + return createRequestFunction(localVarAxiosArgs, globalAxios, configuration) +} +/** + * 요청한 username을 사용하는 유저가 있는지 확인합니다. + * @summary username 중복 확인 + * @param {string} username 중복확인하고자 하는 username + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +const authUsernameUsernamePostFp = async ( + username: string, + options?: AxiosRequestConfig, + configuration?: Configuration, +): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> => { + const localVarAxiosArgs = await authUsernameUsernamePostAxiosParamCreator(username, options, configuration) + return createRequestFunction(localVarAxiosArgs, globalAxios, configuration) +} +/** + * 발송된 인증번호로 이메일을 인증합니다. + * @summary 이메일 인증 + * @param {VerifyEmailRequestDto} verifyEmailRequestDto + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +const authVerifyEmailPostFp = async ( + verifyEmailRequestDto: VerifyEmailRequestDto, + options?: AxiosRequestConfig, + configuration?: Configuration, +): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> => { + const localVarAxiosArgs = await authVerifyEmailPostAxiosParamCreator(verifyEmailRequestDto, options, configuration) + return createRequestFunction(localVarAxiosArgs, globalAxios, configuration) +} + +/** + * AuthApi - factory interface + * @export + */ + +export type AuthAdminRequestGetRequestParams = { + options?: any +} + +/** + * 승인 대기 중인 학교 인증 요청 목록을 조회합니다. + * @summary 학교인증 요청 목록 조회 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +export const authAdminRequestGet = ({ + configuration, + basePath, + axios, +}: { + configuration?: Configuration + basePath?: string + axios?: AxiosInstance +}) => { + return (params?: { options?: any }): AxiosPromise> => { + return authAdminRequestGetFp(params?.options, configuration).then(request => request(axios, basePath)) + } +} + +export type AuthAdminRequestIdPostRequestParams = { + id: number + verifyScreenshotRequestDto: VerifyScreenshotRequestDto + options?: any +} + +/** + * 학교 인증 요청을 승인 혹은 거절합니다. + * @summary 학교인증 요청 승인/거절 + * @param {number} id + * @param {VerifyScreenshotRequestDto} verifyScreenshotRequestDto + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +export const authAdminRequestIdPost = ({ + configuration, + basePath, + axios, +}: { + configuration?: Configuration + basePath?: string + axios?: AxiosInstance +}) => { + return (params: AuthAdminRequestIdPostRequestParams): AxiosPromise => { + return authAdminRequestIdPostFp(params.id, params.verifyScreenshotRequestDto, params.options, configuration).then( + request => request(axios, basePath), + ) + } +} + +export type AuthEmailEmailPostRequestParams = { + email: string + options?: any +} + +/** + * 요청한 email을 사용하는 유저가 있는지 확인합니다. + * @summary email 중복 확인 + * @param {string} email 중복확인하고자 하는 email + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +export const authEmailEmailPost = ({ + configuration, + basePath, + axios, +}: { + configuration?: Configuration + basePath?: string + axios?: AxiosInstance +}) => { + return (params: AuthEmailEmailPostRequestParams): AxiosPromise => { + return authEmailEmailPostFp(params.email, params.options, configuration).then(request => request(axios, basePath)) + } +} + +export type AuthIsVerifiedGetRequestParams = { + options?: any +} + +/** + * 유저가 인증이 되었는지 확인합니다. + * @summary 인증 여부 확인 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +export const authIsVerifiedGet = ({ + configuration, + basePath, + axios, +}: { + configuration?: Configuration + basePath?: string + axios?: AxiosInstance +}) => { + return (params?: { options?: any }): AxiosPromise => { + return authIsVerifiedGetFp(params?.options, configuration).then(request => request(axios, basePath)) + } +} + +export type AuthLoginPostRequestParams = { + loginRequestDto: LoginRequestDto + options?: any +} + +/** + * 로그인하여 JWT Token을 발급받습니다. Access Token의 만료기간은 5분이고 Refresh Token의 만료기간은 로그인 유지가 참일 경우 14일, 아닐 경우 2일입니다. + * @summary 로그인 + * @param {LoginRequestDto} loginRequestDto + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +export const authLoginPost = ({ + configuration, + basePath, + axios, +}: { + configuration?: Configuration + basePath?: string + axios?: AxiosInstance +}) => { + return (params: AuthLoginPostRequestParams): AxiosPromise => { + return authLoginPostFp(params.loginRequestDto, params.options, configuration).then(request => + request(axios, basePath), + ) + } +} + +export type AuthLogoutPostRequestParams = { + logoutRequestDto: LogoutRequestDto + options?: any +} + +/** + * 서버에 저장된 Refresh Token을 삭제합니다. + * @summary 로그아웃 + * @param {LogoutRequestDto} logoutRequestDto + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +export const authLogoutPost = ({ + configuration, + basePath, + axios, +}: { + configuration?: Configuration + basePath?: string + axios?: AxiosInstance +}) => { + return (params: AuthLogoutPostRequestParams): AxiosPromise => { + return authLogoutPostFp(params.logoutRequestDto, params.options, configuration).then(request => + request(axios, basePath), + ) + } +} + +export type AuthPasswordPatchRequestParams = { + changePasswordRequestDto: ChangePasswordRequestDto + options?: any +} + +/** + * 사용자의 비밀번호를 변경합니다. + * @summary 비밀번호 변경 + * @param {ChangePasswordRequestDto} changePasswordRequestDto + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +export const authPasswordPatch = ({ + configuration, + basePath, + axios, +}: { + configuration?: Configuration + basePath?: string + axios?: AxiosInstance +}) => { + return (params: AuthPasswordPatchRequestParams): AxiosPromise => { + return authPasswordPatchFp(params.changePasswordRequestDto, params.options, configuration).then(request => + request(axios, basePath), + ) + } +} + +export type AuthPasswordPostRequestParams = { + passwordDto: PasswordDto + options?: any +} + +/** + * 저장된 비밀번호가 맞는지 확인합니다. + * @summary 비밀번호 확인 + * @param {PasswordDto} passwordDto + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +export const authPasswordPost = ({ + configuration, + basePath, + axios, +}: { + configuration?: Configuration + basePath?: string + axios?: AxiosInstance +}) => { + return (params: AuthPasswordPostRequestParams): AxiosPromise => { + return authPasswordPostFp(params.passwordDto, params.options, configuration).then(request => + request(axios, basePath), + ) + } +} + +export type AuthRefreshPostRequestParams = { + options?: any +} + +/** + * Refresh Token을 사용하여 Access Token과 Refresh Token을 재발급받습니다. + * @summary Token 재발급 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +export const authRefreshPost = ({ + configuration, + basePath, + axios, +}: { + configuration?: Configuration + basePath?: string + axios?: AxiosInstance +}) => { + return (params?: { options?: any }): AxiosPromise => { + return authRefreshPostFp(params?.options, configuration).then(request => request(axios, basePath)) + } +} + +export type AuthRequestEmailVerificationPostRequestParams = { + verificationRequestDto: VerificationRequestDto + options?: any +} + +/** + * 이메일로 인증번호를 발송합니다. + * @summary 이메일 인증번호 발송 + * @param {VerificationRequestDto} verificationRequestDto + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +export const authRequestEmailVerificationPost = ({ + configuration, + basePath, + axios, +}: { + configuration?: Configuration + basePath?: string + axios?: AxiosInstance +}) => { + return (params: AuthRequestEmailVerificationPostRequestParams): AxiosPromise => { + return authRequestEmailVerificationPostFp(params.verificationRequestDto, params.options, configuration).then( + request => request(axios, basePath), + ) + } +} + +export type AuthSignUpPostRequestParams = { + email: string + password: string + username: string + name: string + country: string + homeUniversity: string + major: string + studentNumber: number + screenshot: any + options?: any +} + +/** + * 유저정보를 생성하고 학교인증 요청을 발송합니다. + * @summary 회원가입 및 학교인증 요청 + * @param {string} email 인증완료된 사용자 이메일 + * @param {string} password 사용자 비밀번호 + * @param {string} username 중복확인 완료된 userId + * @param {string} name 본명 + * @param {string} country 국적 + * @param {string} homeUniversity 모교 + * @param {string} major 전공 + * @param {number} studentNumber 중복확인 완료된 학번 + * @param {any} screenshot 교환학생 합격 스크린샷 파일 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +export const authSignUpPost = ({ + configuration, + basePath, + axios, +}: { + configuration?: Configuration + basePath?: string + axios?: AxiosInstance +}) => { + return (params: AuthSignUpPostRequestParams): AxiosPromise => { + return authSignUpPostFp( + params.email, + params.password, + params.username, + params.name, + params.country, + params.homeUniversity, + params.major, + params.studentNumber, + params.screenshot, + params.options, + configuration, + ).then(request => request(axios, basePath)) + } +} + +export type AuthStudentNumberStudentNumberPostRequestParams = { + studentNumber: number + options?: any +} + +/** + * 요청한 학번으로 인증된 유저가 있는지 확인합니다. + * @summary 학번 중복 확인 + * @param {number} studentNumber 중복확인하고자 하는 학번 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +export const authStudentNumberStudentNumberPost = ({ + configuration, + basePath, + axios, +}: { + configuration?: Configuration + basePath?: string + axios?: AxiosInstance +}) => { + return (params: AuthStudentNumberStudentNumberPostRequestParams): AxiosPromise => { + return authStudentNumberStudentNumberPostFp(params.studentNumber, params.options, configuration).then(request => + request(axios, basePath), + ) + } +} + +export type AuthTemporaryPasswordPostRequestParams = { + sendTempPasswordRequestDto: SendTempPasswordRequestDto + options?: any +} + +/** + * 임시비밀번호를 발급하여 이메일로 발송합니다. + * @summary 임시비밀번호 발급 + * @param {SendTempPasswordRequestDto} sendTempPasswordRequestDto + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +export const authTemporaryPasswordPost = ({ + configuration, + basePath, + axios, +}: { + configuration?: Configuration + basePath?: string + axios?: AxiosInstance +}) => { + return (params: AuthTemporaryPasswordPostRequestParams): AxiosPromise => { + return authTemporaryPasswordPostFp(params.sendTempPasswordRequestDto, params.options, configuration).then(request => + request(axios, basePath), + ) + } +} + +export type AuthUsernameUsernamePostRequestParams = { + username: string + options?: any +} + +/** + * 요청한 username을 사용하는 유저가 있는지 확인합니다. + * @summary username 중복 확인 + * @param {string} username 중복확인하고자 하는 username + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +export const authUsernameUsernamePost = ({ + configuration, + basePath, + axios, +}: { + configuration?: Configuration + basePath?: string + axios?: AxiosInstance +}) => { + return (params: AuthUsernameUsernamePostRequestParams): AxiosPromise => { + return authUsernameUsernamePostFp(params.username, params.options, configuration).then(request => + request(axios, basePath), + ) + } +} + +export type AuthVerifyEmailPostRequestParams = { + verifyEmailRequestDto: VerifyEmailRequestDto + options?: any +} + +/** + * 발송된 인증번호로 이메일을 인증합니다. + * @summary 이메일 인증 + * @param {VerifyEmailRequestDto} verifyEmailRequestDto + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +export const authVerifyEmailPost = ({ + configuration, + basePath, + axios, +}: { + configuration?: Configuration + basePath?: string + axios?: AxiosInstance +}) => { + return (params: AuthVerifyEmailPostRequestParams): AxiosPromise => { + return authVerifyEmailPostFp(params.verifyEmailRequestDto, params.options, configuration).then(request => + request(axios, basePath), + ) + } +} diff --git a/packages/api/ku-key/api/banner-api.ts b/packages/api/ku-key/api/banner-api.ts new file mode 100644 index 00000000..d3dcf7b0 --- /dev/null +++ b/packages/api/ku-key/api/banner-api.ts @@ -0,0 +1,274 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * KU-KEY API + * API for KU-KEY service + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import globalAxios, { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios' +import { Configuration } from '../configuration' +// Some imports not used depending on template conditions +// @ts-ignore +import { DUMMY_BASE_URL, assertParamExists, setSearchParams, toPathString, createRequestFunction } from '../common' +// @ts-ignore +import { COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from '../base' + +// @ts-ignore +import { BannerDto } from '../models' +/** + * BannerApi - axios parameter creator + * @export + */ +/** + * 배너 이미지 목록을 조회합니다.(최신순) + * @summary 배너 이미지 목록 조회 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +const bannerGetAxiosParamCreator = async ( + options: AxiosRequestConfig = {}, + configuration?: Configuration, +): Promise => { + const localVarPath = `/banner` + // 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 + + 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 배너 이미지 id + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +const bannerIdDeleteAxiosParamCreator = async ( + id: number, + options: AxiosRequestConfig = {}, + configuration?: Configuration, +): Promise => { + const localVarPath = `/banner/{id}`.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: 'DELETE', ...baseOptions, ...options } + const localVarHeaderParameter = {} as any + const localVarQueryParameter = {} as any + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } +} +/** + * 배너 이미지를 생성합니다. + * @summary 배너 이미지 생성 + * @param {any} image 배너 이미지 파일 + * @param {string} title 배너 제목 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +const bannerPostAxiosParamCreator = async ( + image: any, + title: string, + options: AxiosRequestConfig = {}, + configuration?: Configuration, +): Promise => { + const localVarPath = `/banner` + // 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 + const localVarFormParams = new ((configuration && configuration.formDataCtor) || FormData)() + + if (image !== undefined) { + localVarFormParams.append('image', image as any) + } + + if (title !== undefined) { + localVarFormParams.append('title', title as any) + } + + localVarHeaderParameter['Content-Type'] = 'multipart/form-data' + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers } + localVarRequestOptions.data = localVarFormParams + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } +} + +/** + * BannerApi - functional programming interface + * @export + */ +/** + * 배너 이미지 목록을 조회합니다.(최신순) + * @summary 배너 이미지 목록 조회 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +const bannerGetFp = async ( + options?: AxiosRequestConfig, + configuration?: Configuration, +): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> => { + const localVarAxiosArgs = await bannerGetAxiosParamCreator(options, configuration) + return createRequestFunction(localVarAxiosArgs, globalAxios, configuration) +} +/** + * 배너 이미지를 삭제합니다. + * @summary 배너 이미지 삭제 + * @param {number} id 배너 이미지 id + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +const bannerIdDeleteFp = async ( + id: number, + options?: AxiosRequestConfig, + configuration?: Configuration, +): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> => { + const localVarAxiosArgs = await bannerIdDeleteAxiosParamCreator(id, options, configuration) + return createRequestFunction(localVarAxiosArgs, globalAxios, configuration) +} +/** + * 배너 이미지를 생성합니다. + * @summary 배너 이미지 생성 + * @param {any} image 배너 이미지 파일 + * @param {string} title 배너 제목 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +const bannerPostFp = async ( + image: any, + title: string, + options?: AxiosRequestConfig, + configuration?: Configuration, +): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> => { + const localVarAxiosArgs = await bannerPostAxiosParamCreator(image, title, options, configuration) + return createRequestFunction(localVarAxiosArgs, globalAxios, configuration) +} + +/** + * BannerApi - factory interface + * @export + */ + +export type BannerGetRequestParams = { + options?: any +} + +/** + * 배너 이미지 목록을 조회합니다.(최신순) + * @summary 배너 이미지 목록 조회 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +export const bannerGet = ({ + configuration, + basePath, + axios, +}: { + configuration?: Configuration + basePath?: string + axios?: AxiosInstance +}) => { + return (params?: { options?: any }): AxiosPromise> => { + return bannerGetFp(params?.options, configuration).then(request => request(axios, basePath)) + } +} + +export type BannerIdDeleteRequestParams = { + id: number + options?: any +} + +/** + * 배너 이미지를 삭제합니다. + * @summary 배너 이미지 삭제 + * @param {number} id 배너 이미지 id + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +export const bannerIdDelete = ({ + configuration, + basePath, + axios, +}: { + configuration?: Configuration + basePath?: string + axios?: AxiosInstance +}) => { + return (params: BannerIdDeleteRequestParams): AxiosPromise => { + return bannerIdDeleteFp(params.id, params.options, configuration).then(request => request(axios, basePath)) + } +} + +export type BannerPostRequestParams = { + image: any + title: string + options?: any +} + +/** + * 배너 이미지를 생성합니다. + * @summary 배너 이미지 생성 + * @param {any} image 배너 이미지 파일 + * @param {string} title 배너 제목 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +export const bannerPost = ({ + configuration, + basePath, + axios, +}: { + configuration?: Configuration + basePath?: string + axios?: AxiosInstance +}) => { + return (params: BannerPostRequestParams): AxiosPromise => { + return bannerPostFp(params.image, params.title, params.options, configuration).then(request => + request(axios, basePath), + ) + } +} diff --git a/packages/api/ku-key/api/board-api.ts b/packages/api/ku-key/api/board-api.ts new file mode 100644 index 00000000..3ad87f29 --- /dev/null +++ b/packages/api/ku-key/api/board-api.ts @@ -0,0 +1,106 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * KU-KEY API + * API for KU-KEY service + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import globalAxios, { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios' +import { Configuration } from '../configuration' +// Some imports not used depending on template conditions +// @ts-ignore +import { DUMMY_BASE_URL, assertParamExists, setSearchParams, toPathString, createRequestFunction } from '../common' +// @ts-ignore +import { COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from '../base' + +// @ts-ignore +import { GetBoardResponseDto } from '../models' +/** + * BoardApi - axios parameter creator + * @export + */ +/** + * 게시판의 목록을 조회합니다. + * @summary 게시판 목록 조회 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +const boardGetAxiosParamCreator = async ( + options: AxiosRequestConfig = {}, + configuration?: Configuration, +): Promise => { + const localVarPath = `/board` + // 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 + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } +} + +/** + * BoardApi - functional programming interface + * @export + */ +/** + * 게시판의 목록을 조회합니다. + * @summary 게시판 목록 조회 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +const boardGetFp = async ( + options?: AxiosRequestConfig, + configuration?: Configuration, +): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> => { + const localVarAxiosArgs = await boardGetAxiosParamCreator(options, configuration) + return createRequestFunction(localVarAxiosArgs, globalAxios, configuration) +} + +/** + * BoardApi - factory interface + * @export + */ + +export type BoardGetRequestParams = { + options?: any +} + +/** + * 게시판의 목록을 조회합니다. + * @summary 게시판 목록 조회 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +export const boardGet = ({ + configuration, + basePath, + axios, +}: { + configuration?: Configuration + basePath?: string + axios?: AxiosInstance +}) => { + return (params?: { options?: any }): AxiosPromise> => { + return boardGetFp(params?.options, configuration).then(request => request(axios, basePath)) + } +} diff --git a/packages/api/ku-key/api/calendar-api.ts b/packages/api/ku-key/api/calendar-api.ts new file mode 100644 index 00000000..418d34e4 --- /dev/null +++ b/packages/api/ku-key/api/calendar-api.ts @@ -0,0 +1,546 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * KU-KEY API + * API for KU-KEY service + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import globalAxios, { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios' +import { Configuration } from '../configuration' +// Some imports not used depending on template conditions +// @ts-ignore +import { DUMMY_BASE_URL, assertParamExists, setSearchParams, toPathString, createRequestFunction } from '../common' +// @ts-ignore +import { COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from '../base' + +// @ts-ignore +import { CreateCalendarDataRequestDto } from '../models' +// @ts-ignore +import { CreateCalendarDataResponseDto } from '../models' +// @ts-ignore +import { DeleteCalendarDataResponseDto } from '../models' +// @ts-ignore +import { GetAcademicScheduleDataResponseDto } from '../models' +// @ts-ignore +import { GetBannerImageUrlResponseDto } from '../models' +// @ts-ignore +import { GetDailyCalendarDataResponseDto } from '../models' +// @ts-ignore +import { UpdateCalendarDataRequestDto } from '../models' +// @ts-ignore +import { UpdateCalendarDataResponseDto } from '../models' +/** + * CalendarApi - axios parameter creator + * @export + */ +/** + * 연도, 학기 정보를 받아 Academic Schedule에 해당하는 행사/일정을 조회합니다. 행사/일정이 존재하는 날짜의 경우에만 가져옵니다. + * @summary Academic Schedule 행사/일정 조회 + * @param {number} year 연도 + * @param {number} semester 학기 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +const calendarAcademicGetAxiosParamCreator = async ( + year: number, + semester: number, + options: AxiosRequestConfig = {}, + configuration?: Configuration, +): Promise => { + const localVarPath = `/calendar/academic` + // 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 + if (year !== undefined) { + localVarQueryParameter['year'] = year + } + + if (semester !== undefined) { + localVarQueryParameter['semester'] = semester + } + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } +} +/** + * S3에 저장된 메인 홈 배너 이미지 URL 목록을 조회합니다. + * @summary 메인 홈 배너 이미지 URL 목록 조회 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +const calendarBannerImageUrlsGetAxiosParamCreator = async ( + options: AxiosRequestConfig = {}, + configuration?: Configuration, +): Promise => { + const localVarPath = `/calendar/banner-image-urls` + // 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 + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } +} +/** + * 행사/일정 id를 받아 admin page에서 해당하는 행사/일정을 삭제합니다. + * @summary 특정 행사/일정 삭제 + * @param {number} calendarId 행사/일정 id + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +const calendarCalendarIdDeleteAxiosParamCreator = async ( + calendarId: number, + options: AxiosRequestConfig = {}, + configuration?: Configuration, +): Promise => { + const localVarPath = `/calendar/{calendarId}`.replace(`{${'calendarId'}}`, encodeURIComponent(String(calendarId))) + // 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: 'DELETE', ...baseOptions, ...options } + const localVarHeaderParameter = {} as any + const localVarQueryParameter = {} as any + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } +} +/** + * 행사/일정 id를 받아 admin page에서 해당하는 행사/일정을 수정합니다. + * @summary 특정 행사/일정 수정 + * @param {number} calendarId 행사/일정 id + * @param {UpdateCalendarDataRequestDto} updateCalendarDataRequestDto + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +const calendarCalendarIdPatchAxiosParamCreator = async ( + calendarId: number, + updateCalendarDataRequestDto: UpdateCalendarDataRequestDto, + options: AxiosRequestConfig = {}, + configuration?: Configuration, +): Promise => { + const localVarPath = `/calendar/{calendarId}`.replace(`{${'calendarId'}}`, encodeURIComponent(String(calendarId))) + // 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: 'PATCH', ...baseOptions, ...options } + const localVarHeaderParameter = {} as any + const localVarQueryParameter = {} as any + + localVarHeaderParameter['Content-Type'] = 'application/json' + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers } + localVarRequestOptions.data = updateCalendarDataRequestDto || undefined + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } +} +/** + * 연도, 월 정보를 받아 그 달의 행사/일정을 조회합니다. 행사/일정 존재여부에 상관없이 그 달의 모든 날짜를 반환합니다. + * @summary 연도, 월별 행사/일정 조회 + * @param {number} year 연도 + * @param {number} month 월 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +const calendarGetAxiosParamCreator = async ( + year: number, + month: number, + options: AxiosRequestConfig = {}, + configuration?: Configuration, +): Promise => { + const localVarPath = `/calendar` + // 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 + if (year !== undefined) { + localVarQueryParameter['year'] = year + } + + if (month !== undefined) { + localVarQueryParameter['month'] = month + } + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } +} +/** + * admin page에서 특정 날짜의 행사/일정을 생성합니다. + * @summary 특정 날짜 행사/일정 생성 + * @param {CreateCalendarDataRequestDto} createCalendarDataRequestDto + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +const calendarPostAxiosParamCreator = async ( + createCalendarDataRequestDto: CreateCalendarDataRequestDto, + options: AxiosRequestConfig = {}, + configuration?: Configuration, +): Promise => { + const localVarPath = `/calendar` + // 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 + + localVarHeaderParameter['Content-Type'] = 'application/json' + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers } + localVarRequestOptions.data = createCalendarDataRequestDto || undefined + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } +} + +/** + * CalendarApi - functional programming interface + * @export + */ +/** + * 연도, 학기 정보를 받아 Academic Schedule에 해당하는 행사/일정을 조회합니다. 행사/일정이 존재하는 날짜의 경우에만 가져옵니다. + * @summary Academic Schedule 행사/일정 조회 + * @param {number} year 연도 + * @param {number} semester 학기 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +const calendarAcademicGetFp = async ( + year: number, + semester: number, + options?: AxiosRequestConfig, + configuration?: Configuration, +): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> => { + const localVarAxiosArgs = await calendarAcademicGetAxiosParamCreator(year, semester, options, configuration) + return createRequestFunction(localVarAxiosArgs, globalAxios, configuration) +} +/** + * S3에 저장된 메인 홈 배너 이미지 URL 목록을 조회합니다. + * @summary 메인 홈 배너 이미지 URL 목록 조회 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +const calendarBannerImageUrlsGetFp = async ( + options?: AxiosRequestConfig, + configuration?: Configuration, +): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> => { + const localVarAxiosArgs = await calendarBannerImageUrlsGetAxiosParamCreator(options, configuration) + return createRequestFunction(localVarAxiosArgs, globalAxios, configuration) +} +/** + * 행사/일정 id를 받아 admin page에서 해당하는 행사/일정을 삭제합니다. + * @summary 특정 행사/일정 삭제 + * @param {number} calendarId 행사/일정 id + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +const calendarCalendarIdDeleteFp = async ( + calendarId: number, + options?: AxiosRequestConfig, + configuration?: Configuration, +): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> => { + const localVarAxiosArgs = await calendarCalendarIdDeleteAxiosParamCreator(calendarId, options, configuration) + return createRequestFunction(localVarAxiosArgs, globalAxios, configuration) +} +/** + * 행사/일정 id를 받아 admin page에서 해당하는 행사/일정을 수정합니다. + * @summary 특정 행사/일정 수정 + * @param {number} calendarId 행사/일정 id + * @param {UpdateCalendarDataRequestDto} updateCalendarDataRequestDto + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +const calendarCalendarIdPatchFp = async ( + calendarId: number, + updateCalendarDataRequestDto: UpdateCalendarDataRequestDto, + options?: AxiosRequestConfig, + configuration?: Configuration, +): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> => { + const localVarAxiosArgs = await calendarCalendarIdPatchAxiosParamCreator( + calendarId, + updateCalendarDataRequestDto, + options, + configuration, + ) + return createRequestFunction(localVarAxiosArgs, globalAxios, configuration) +} +/** + * 연도, 월 정보를 받아 그 달의 행사/일정을 조회합니다. 행사/일정 존재여부에 상관없이 그 달의 모든 날짜를 반환합니다. + * @summary 연도, 월별 행사/일정 조회 + * @param {number} year 연도 + * @param {number} month 월 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +const calendarGetFp = async ( + year: number, + month: number, + options?: AxiosRequestConfig, + configuration?: Configuration, +): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> => { + const localVarAxiosArgs = await calendarGetAxiosParamCreator(year, month, options, configuration) + return createRequestFunction(localVarAxiosArgs, globalAxios, configuration) +} +/** + * admin page에서 특정 날짜의 행사/일정을 생성합니다. + * @summary 특정 날짜 행사/일정 생성 + * @param {CreateCalendarDataRequestDto} createCalendarDataRequestDto + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +const calendarPostFp = async ( + createCalendarDataRequestDto: CreateCalendarDataRequestDto, + options?: AxiosRequestConfig, + configuration?: Configuration, +): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> => { + const localVarAxiosArgs = await calendarPostAxiosParamCreator(createCalendarDataRequestDto, options, configuration) + return createRequestFunction(localVarAxiosArgs, globalAxios, configuration) +} + +/** + * CalendarApi - factory interface + * @export + */ + +export type CalendarAcademicGetRequestParams = { + year: number + semester: number + options?: any +} + +/** + * 연도, 학기 정보를 받아 Academic Schedule에 해당하는 행사/일정을 조회합니다. 행사/일정이 존재하는 날짜의 경우에만 가져옵니다. + * @summary Academic Schedule 행사/일정 조회 + * @param {number} year 연도 + * @param {number} semester 학기 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +export const calendarAcademicGet = ({ + configuration, + basePath, + axios, +}: { + configuration?: Configuration + basePath?: string + axios?: AxiosInstance +}) => { + return (params: CalendarAcademicGetRequestParams): AxiosPromise> => { + return calendarAcademicGetFp(params.year, params.semester, params.options, configuration).then(request => + request(axios, basePath), + ) + } +} + +export type CalendarBannerImageUrlsGetRequestParams = { + options?: any +} + +/** + * S3에 저장된 메인 홈 배너 이미지 URL 목록을 조회합니다. + * @summary 메인 홈 배너 이미지 URL 목록 조회 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +export const calendarBannerImageUrlsGet = ({ + configuration, + basePath, + axios, +}: { + configuration?: Configuration + basePath?: string + axios?: AxiosInstance +}) => { + return (params?: { options?: any }): AxiosPromise> => { + return calendarBannerImageUrlsGetFp(params?.options, configuration).then(request => request(axios, basePath)) + } +} + +export type CalendarCalendarIdDeleteRequestParams = { + calendarId: number + options?: any +} + +/** + * 행사/일정 id를 받아 admin page에서 해당하는 행사/일정을 삭제합니다. + * @summary 특정 행사/일정 삭제 + * @param {number} calendarId 행사/일정 id + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +export const calendarCalendarIdDelete = ({ + configuration, + basePath, + axios, +}: { + configuration?: Configuration + basePath?: string + axios?: AxiosInstance +}) => { + return (params: CalendarCalendarIdDeleteRequestParams): AxiosPromise => { + return calendarCalendarIdDeleteFp(params.calendarId, params.options, configuration).then(request => + request(axios, basePath), + ) + } +} + +export type CalendarCalendarIdPatchRequestParams = { + calendarId: number + updateCalendarDataRequestDto: UpdateCalendarDataRequestDto + options?: any +} + +/** + * 행사/일정 id를 받아 admin page에서 해당하는 행사/일정을 수정합니다. + * @summary 특정 행사/일정 수정 + * @param {number} calendarId 행사/일정 id + * @param {UpdateCalendarDataRequestDto} updateCalendarDataRequestDto + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +export const calendarCalendarIdPatch = ({ + configuration, + basePath, + axios, +}: { + configuration?: Configuration + basePath?: string + axios?: AxiosInstance +}) => { + return (params: CalendarCalendarIdPatchRequestParams): AxiosPromise => { + return calendarCalendarIdPatchFp( + params.calendarId, + params.updateCalendarDataRequestDto, + params.options, + configuration, + ).then(request => request(axios, basePath)) + } +} + +export type CalendarGetRequestParams = { + year: number + month: number + options?: any +} + +/** + * 연도, 월 정보를 받아 그 달의 행사/일정을 조회합니다. 행사/일정 존재여부에 상관없이 그 달의 모든 날짜를 반환합니다. + * @summary 연도, 월별 행사/일정 조회 + * @param {number} year 연도 + * @param {number} month 월 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +export const calendarGet = ({ + configuration, + basePath, + axios, +}: { + configuration?: Configuration + basePath?: string + axios?: AxiosInstance +}) => { + return (params: CalendarGetRequestParams): AxiosPromise> => { + return calendarGetFp(params.year, params.month, params.options, configuration).then(request => + request(axios, basePath), + ) + } +} + +export type CalendarPostRequestParams = { + createCalendarDataRequestDto: CreateCalendarDataRequestDto + options?: any +} + +/** + * admin page에서 특정 날짜의 행사/일정을 생성합니다. + * @summary 특정 날짜 행사/일정 생성 + * @param {CreateCalendarDataRequestDto} createCalendarDataRequestDto + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +export const calendarPost = ({ + configuration, + basePath, + axios, +}: { + configuration?: Configuration + basePath?: string + axios?: AxiosInstance +}) => { + return (params: CalendarPostRequestParams): AxiosPromise => { + return calendarPostFp(params.createCalendarDataRequestDto, params.options, configuration).then(request => + request(axios, basePath), + ) + } +} diff --git a/packages/api/ku-key/api/club-api.ts b/packages/api/ku-key/api/club-api.ts new file mode 100644 index 00000000..f8f09b23 --- /dev/null +++ b/packages/api/ku-key/api/club-api.ts @@ -0,0 +1,968 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * KU-KEY API + * API for KU-KEY service + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import globalAxios, { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios' +import { Configuration } from '../configuration' +// Some imports not used depending on template conditions +// @ts-ignore +import { DUMMY_BASE_URL, assertParamExists, setSearchParams, toPathString, createRequestFunction } from '../common' +// @ts-ignore +import { COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from '../base' + +// @ts-ignore +import { CreateClubResponseDto } from '../models' +// @ts-ignore +import { DeleteClubResponseDto } from '../models' +// @ts-ignore +import { GetClubDetailResponseDto } from '../models' +// @ts-ignore +import { GetClubResponseDto } from '../models' +// @ts-ignore +import { GetHotClubResponseDto } from '../models' +// @ts-ignore +import { GetRecommendClubResponseDto } from '../models' +// @ts-ignore +import { UpdateClubResponseDto } from '../models' +/** + * ClubApi - axios parameter creator + * @export + */ +/** + * 동아리 id를 받아 admin page에서 동아리 정보를 삭제합니다. + * @summary 동아리 정보 삭제 + * @param {number} clubId 동아리 id + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +const clubClubIdDeleteAxiosParamCreator = async ( + clubId: number, + options: AxiosRequestConfig = {}, + configuration?: Configuration, +): Promise => { + const localVarPath = `/club/{clubId}`.replace(`{${'clubId'}}`, encodeURIComponent(String(clubId))) + // 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: 'DELETE', ...baseOptions, ...options } + const localVarHeaderParameter = {} as any + const localVarQueryParameter = {} as any + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } +} +/** + * 동아리 상세 정보를 조회합니다. + * @summary 동아리 상세 조회 + * @param {number} clubId club id + * @param {boolean} isLogin 로그인 여부 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +const clubClubIdGetAxiosParamCreator = async ( + clubId: number, + isLogin: boolean, + options: AxiosRequestConfig = {}, + configuration?: Configuration, +): Promise => { + const localVarPath = `/club/{clubId}`.replace(`{${'clubId'}}`, encodeURIComponent(String(clubId))) + // 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 + if (isLogin !== undefined) { + localVarQueryParameter['isLogin'] = isLogin + } + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } +} +/** + * 동아리 id를 받아 admin page에서 동아리 정보를 수정합니다. + * @summary 동아리 정보 수정 + * @param {number} clubId 동아리 id + * @param {string} [name] 동아리명 + * @param {string} [category] 카테고리 + * @param {string} [summary] 동아리 요약 + * @param {string} [regularMeeting] 정기 모임 + * @param {string} [recruitmentPeriod] 모집 기간 + * @param {string} [description] 동아리 설명 + * @param {any} [clubImage] 동아리 이미지 파일 + * @param {string} [instagramLink] 인스타그램 링크 + * @param {string} [youtubeLink] 유튜브 링크 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +const clubClubIdPatchAxiosParamCreator = async ( + clubId: number, + name?: string, + category?: string, + summary?: string, + regularMeeting?: string, + recruitmentPeriod?: string, + description?: string, + clubImage?: any, + instagramLink?: string, + youtubeLink?: string, + options: AxiosRequestConfig = {}, + configuration?: Configuration, +): Promise => { + const localVarPath = `/club/{clubId}`.replace(`{${'clubId'}}`, encodeURIComponent(String(clubId))) + // 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: 'PATCH', ...baseOptions, ...options } + const localVarHeaderParameter = {} as any + const localVarQueryParameter = {} as any + const localVarFormParams = new ((configuration && configuration.formDataCtor) || FormData)() + + if (name !== undefined) { + localVarFormParams.append('name', name as any) + } + + if (category !== undefined) { + localVarFormParams.append('category', category as any) + } + + if (summary !== undefined) { + localVarFormParams.append('summary', summary as any) + } + + if (regularMeeting !== undefined) { + localVarFormParams.append('regularMeeting', regularMeeting as any) + } + + if (recruitmentPeriod !== undefined) { + localVarFormParams.append('recruitmentPeriod', recruitmentPeriod as any) + } + + if (description !== undefined) { + localVarFormParams.append('description', description as any) + } + + if (clubImage !== undefined) { + localVarFormParams.append('clubImage', clubImage as any) + } + + if (instagramLink !== undefined) { + localVarFormParams.append('instagramLink', instagramLink as any) + } + + if (youtubeLink !== undefined) { + localVarFormParams.append('youtubeLink', youtubeLink as any) + } + + localVarHeaderParameter['Content-Type'] = 'multipart/form-data' + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers } + localVarRequestOptions.data = localVarFormParams + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } +} +/** + * 동아리 전체 목록을 조회하거나, 좋아요 여부, 소속/분과, 검색어(동아리명, 동아리 요약)로 필터링 및 좋아요 순으로 정렬하여 조회합니다. + * @summary 동아리 목록 조회 + * @param {boolean} isLogin 로그인 여부 + * @param {string} [sortBy] 정렬 방식 (좋아요 순 : like) + * @param {boolean} [wishList] 좋아요 누른 동아리만 필터링 (true / false) + * @param {'Performing Arts' | 'Academic Research' | 'Sports' | 'Religious' | 'Exhibition & Creative Writing' | 'Humanities' | 'Living Culture' | 'Social' | 'Instrumental Arts'} [category] 소속/분과별 필터링 + * @param {string} [keyword] 동아리명/동아리 요약 검색 키워드 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +const clubGetAxiosParamCreator = async ( + isLogin: boolean, + sortBy?: string, + wishList?: boolean, + category?: + | 'Performing Arts' + | 'Academic Research' + | 'Sports' + | 'Religious' + | 'Exhibition & Creative Writing' + | 'Humanities' + | 'Living Culture' + | 'Social' + | 'Instrumental Arts', + keyword?: string, + options: AxiosRequestConfig = {}, + configuration?: Configuration, +): Promise => { + const localVarPath = `/club` + // 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 + if (sortBy !== undefined) { + localVarQueryParameter['sortBy'] = sortBy + } + + if (wishList !== undefined) { + localVarQueryParameter['wishList'] = wishList + } + + if (category !== undefined) { + localVarQueryParameter['category'] = category + } + + if (keyword !== undefined) { + localVarQueryParameter['keyword'] = keyword + } + + if (isLogin !== undefined) { + localVarQueryParameter['isLogin'] = isLogin + } + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } +} +/** + * 최근 일주일 동안 좋아요 개수가 가장 많은 동아리 5개를 반환합니다. + * @summary Hot Club 목록 조회 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +const clubHotGetAxiosParamCreator = async ( + options: AxiosRequestConfig = {}, + configuration?: Configuration, +): Promise => { + const localVarPath = `/club/hot` + // 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 + + 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} clubId 좋아요 누를 동아리 id + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +const clubLikeClubIdPostAxiosParamCreator = async ( + clubId: number, + options: AxiosRequestConfig = {}, + configuration?: Configuration, +): Promise => { + const localVarPath = `/club/like/{clubId}`.replace(`{${'clubId'}}`, encodeURIComponent(String(clubId))) + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL) + let baseOptions + if (configuration) { + baseOptions = configuration.baseOptions + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options } + const localVarHeaderParameter = {} as any + const localVarQueryParameter = {} as any + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } +} +/** + * Admin page에서 새로운 동아리를 생성합니다. + * @summary 동아리 생성 + * @param {string} name 동아리명 + * @param {string} category 카테고리 + * @param {string} summary 동아리 요약 + * @param {string} regularMeeting 정기 모임 + * @param {string} recruitmentPeriod 모집 기간 + * @param {string} description 동아리 설명 + * @param {any} clubImage 동아리 이미지 파일 + * @param {string} [instagramLink] 인스타그램 링크 + * @param {string} [youtubeLink] 유튜브 링크 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +const clubPostAxiosParamCreator = async ( + name: string, + category: string, + summary: string, + regularMeeting: string, + recruitmentPeriod: string, + description: string, + clubImage: any, + instagramLink?: string, + youtubeLink?: string, + options: AxiosRequestConfig = {}, + configuration?: Configuration, +): Promise => { + const localVarPath = `/club` + // 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 + const localVarFormParams = new ((configuration && configuration.formDataCtor) || FormData)() + + if (name !== undefined) { + localVarFormParams.append('name', name as any) + } + + if (category !== undefined) { + localVarFormParams.append('category', category as any) + } + + if (summary !== undefined) { + localVarFormParams.append('summary', summary as any) + } + + if (regularMeeting !== undefined) { + localVarFormParams.append('regularMeeting', regularMeeting as any) + } + + if (recruitmentPeriod !== undefined) { + localVarFormParams.append('recruitmentPeriod', recruitmentPeriod as any) + } + + if (description !== undefined) { + localVarFormParams.append('description', description as any) + } + + if (clubImage !== undefined) { + localVarFormParams.append('clubImage', clubImage as any) + } + + if (instagramLink !== undefined) { + localVarFormParams.append('instagramLink', instagramLink as any) + } + + if (youtubeLink !== undefined) { + localVarFormParams.append('youtubeLink', youtubeLink as any) + } + + localVarHeaderParameter['Content-Type'] = 'multipart/form-data' + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers } + localVarRequestOptions.data = localVarFormParams + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } +} +/** + * 최초에 무작위로 추천, 이후 좋아요를 누른 동아리가 있다면 그와 같은 카테고리 내에서 추천 + * @summary Recommend Club 목록 조회 + * @param {boolean} isLogin 로그인 여부 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +const clubRecommendGetAxiosParamCreator = async ( + isLogin: boolean, + options: AxiosRequestConfig = {}, + configuration?: Configuration, +): Promise => { + const localVarPath = `/club/recommend` + // 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 + if (isLogin !== undefined) { + localVarQueryParameter['isLogin'] = isLogin + } + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } +} + +/** + * ClubApi - functional programming interface + * @export + */ +/** + * 동아리 id를 받아 admin page에서 동아리 정보를 삭제합니다. + * @summary 동아리 정보 삭제 + * @param {number} clubId 동아리 id + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +const clubClubIdDeleteFp = async ( + clubId: number, + options?: AxiosRequestConfig, + configuration?: Configuration, +): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> => { + const localVarAxiosArgs = await clubClubIdDeleteAxiosParamCreator(clubId, options, configuration) + return createRequestFunction(localVarAxiosArgs, globalAxios, configuration) +} +/** + * 동아리 상세 정보를 조회합니다. + * @summary 동아리 상세 조회 + * @param {number} clubId club id + * @param {boolean} isLogin 로그인 여부 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +const clubClubIdGetFp = async ( + clubId: number, + isLogin: boolean, + options?: AxiosRequestConfig, + configuration?: Configuration, +): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> => { + const localVarAxiosArgs = await clubClubIdGetAxiosParamCreator(clubId, isLogin, options, configuration) + return createRequestFunction(localVarAxiosArgs, globalAxios, configuration) +} +/** + * 동아리 id를 받아 admin page에서 동아리 정보를 수정합니다. + * @summary 동아리 정보 수정 + * @param {number} clubId 동아리 id + * @param {string} [name] 동아리명 + * @param {string} [category] 카테고리 + * @param {string} [summary] 동아리 요약 + * @param {string} [regularMeeting] 정기 모임 + * @param {string} [recruitmentPeriod] 모집 기간 + * @param {string} [description] 동아리 설명 + * @param {any} [clubImage] 동아리 이미지 파일 + * @param {string} [instagramLink] 인스타그램 링크 + * @param {string} [youtubeLink] 유튜브 링크 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +const clubClubIdPatchFp = async ( + clubId: number, + name?: string, + category?: string, + summary?: string, + regularMeeting?: string, + recruitmentPeriod?: string, + description?: string, + clubImage?: any, + instagramLink?: string, + youtubeLink?: string, + options?: AxiosRequestConfig, + configuration?: Configuration, +): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> => { + const localVarAxiosArgs = await clubClubIdPatchAxiosParamCreator( + clubId, + name, + category, + summary, + regularMeeting, + recruitmentPeriod, + description, + clubImage, + instagramLink, + youtubeLink, + options, + configuration, + ) + return createRequestFunction(localVarAxiosArgs, globalAxios, configuration) +} +/** + * 동아리 전체 목록을 조회하거나, 좋아요 여부, 소속/분과, 검색어(동아리명, 동아리 요약)로 필터링 및 좋아요 순으로 정렬하여 조회합니다. + * @summary 동아리 목록 조회 + * @param {boolean} isLogin 로그인 여부 + * @param {string} [sortBy] 정렬 방식 (좋아요 순 : like) + * @param {boolean} [wishList] 좋아요 누른 동아리만 필터링 (true / false) + * @param {'Performing Arts' | 'Academic Research' | 'Sports' | 'Religious' | 'Exhibition & Creative Writing' | 'Humanities' | 'Living Culture' | 'Social' | 'Instrumental Arts'} [category] 소속/분과별 필터링 + * @param {string} [keyword] 동아리명/동아리 요약 검색 키워드 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +const clubGetFp = async ( + isLogin: boolean, + sortBy?: string, + wishList?: boolean, + category?: + | 'Performing Arts' + | 'Academic Research' + | 'Sports' + | 'Religious' + | 'Exhibition & Creative Writing' + | 'Humanities' + | 'Living Culture' + | 'Social' + | 'Instrumental Arts', + keyword?: string, + options?: AxiosRequestConfig, + configuration?: Configuration, +): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> => { + const localVarAxiosArgs = await clubGetAxiosParamCreator( + isLogin, + sortBy, + wishList, + category, + keyword, + options, + configuration, + ) + return createRequestFunction(localVarAxiosArgs, globalAxios, configuration) +} +/** + * 최근 일주일 동안 좋아요 개수가 가장 많은 동아리 5개를 반환합니다. + * @summary Hot Club 목록 조회 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +const clubHotGetFp = async ( + options?: AxiosRequestConfig, + configuration?: Configuration, +): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> => { + const localVarAxiosArgs = await clubHotGetAxiosParamCreator(options, configuration) + return createRequestFunction(localVarAxiosArgs, globalAxios, configuration) +} +/** + * 이미 동아리 좋아요 눌러져 있으면 해제, 그렇지 않다면 좋아요 등록 + * @summary 동아리 좋아요 등록/해제 + * @param {number} clubId 좋아요 누를 동아리 id + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +const clubLikeClubIdPostFp = async ( + clubId: number, + options?: AxiosRequestConfig, + configuration?: Configuration, +): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> => { + const localVarAxiosArgs = await clubLikeClubIdPostAxiosParamCreator(clubId, options, configuration) + return createRequestFunction(localVarAxiosArgs, globalAxios, configuration) +} +/** + * Admin page에서 새로운 동아리를 생성합니다. + * @summary 동아리 생성 + * @param {string} name 동아리명 + * @param {string} category 카테고리 + * @param {string} summary 동아리 요약 + * @param {string} regularMeeting 정기 모임 + * @param {string} recruitmentPeriod 모집 기간 + * @param {string} description 동아리 설명 + * @param {any} clubImage 동아리 이미지 파일 + * @param {string} [instagramLink] 인스타그램 링크 + * @param {string} [youtubeLink] 유튜브 링크 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +const clubPostFp = async ( + name: string, + category: string, + summary: string, + regularMeeting: string, + recruitmentPeriod: string, + description: string, + clubImage: any, + instagramLink?: string, + youtubeLink?: string, + options?: AxiosRequestConfig, + configuration?: Configuration, +): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> => { + const localVarAxiosArgs = await clubPostAxiosParamCreator( + name, + category, + summary, + regularMeeting, + recruitmentPeriod, + description, + clubImage, + instagramLink, + youtubeLink, + options, + configuration, + ) + return createRequestFunction(localVarAxiosArgs, globalAxios, configuration) +} +/** + * 최초에 무작위로 추천, 이후 좋아요를 누른 동아리가 있다면 그와 같은 카테고리 내에서 추천 + * @summary Recommend Club 목록 조회 + * @param {boolean} isLogin 로그인 여부 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +const clubRecommendGetFp = async ( + isLogin: boolean, + options?: AxiosRequestConfig, + configuration?: Configuration, +): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> => { + const localVarAxiosArgs = await clubRecommendGetAxiosParamCreator(isLogin, options, configuration) + return createRequestFunction(localVarAxiosArgs, globalAxios, configuration) +} + +/** + * ClubApi - factory interface + * @export + */ + +export type ClubClubIdDeleteRequestParams = { + clubId: number + options?: any +} + +/** + * 동아리 id를 받아 admin page에서 동아리 정보를 삭제합니다. + * @summary 동아리 정보 삭제 + * @param {number} clubId 동아리 id + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +export const clubClubIdDelete = ({ + configuration, + basePath, + axios, +}: { + configuration?: Configuration + basePath?: string + axios?: AxiosInstance +}) => { + return (params: ClubClubIdDeleteRequestParams): AxiosPromise => { + return clubClubIdDeleteFp(params.clubId, params.options, configuration).then(request => request(axios, basePath)) + } +} + +export type ClubClubIdGetRequestParams = { + clubId: number + isLogin: boolean + options?: any +} + +/** + * 동아리 상세 정보를 조회합니다. + * @summary 동아리 상세 조회 + * @param {number} clubId club id + * @param {boolean} isLogin 로그인 여부 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +export const clubClubIdGet = ({ + configuration, + basePath, + axios, +}: { + configuration?: Configuration + basePath?: string + axios?: AxiosInstance +}) => { + return (params: ClubClubIdGetRequestParams): AxiosPromise => { + return clubClubIdGetFp(params.clubId, params.isLogin, params.options, configuration).then(request => + request(axios, basePath), + ) + } +} + +export type ClubClubIdPatchRequestParams = { + clubId: number + name?: string + category?: string + summary?: string + regularMeeting?: string + recruitmentPeriod?: string + description?: string + clubImage?: any + instagramLink?: string + youtubeLink?: string + options?: any +} + +/** + * 동아리 id를 받아 admin page에서 동아리 정보를 수정합니다. + * @summary 동아리 정보 수정 + * @param {number} clubId 동아리 id + * @param {string} [name] 동아리명 + * @param {string} [category] 카테고리 + * @param {string} [summary] 동아리 요약 + * @param {string} [regularMeeting] 정기 모임 + * @param {string} [recruitmentPeriod] 모집 기간 + * @param {string} [description] 동아리 설명 + * @param {any} [clubImage] 동아리 이미지 파일 + * @param {string} [instagramLink] 인스타그램 링크 + * @param {string} [youtubeLink] 유튜브 링크 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +export const clubClubIdPatch = ({ + configuration, + basePath, + axios, +}: { + configuration?: Configuration + basePath?: string + axios?: AxiosInstance +}) => { + return (params: ClubClubIdPatchRequestParams): AxiosPromise => { + return clubClubIdPatchFp( + params.clubId, + params.name, + params.category, + params.summary, + params.regularMeeting, + params.recruitmentPeriod, + params.description, + params.clubImage, + params.instagramLink, + params.youtubeLink, + params.options, + configuration, + ).then(request => request(axios, basePath)) + } +} + +export type ClubGetRequestParams = { + isLogin: boolean + sortBy?: string + wishList?: boolean + category?: + | 'Performing Arts' + | 'Academic Research' + | 'Sports' + | 'Religious' + | 'Exhibition & Creative Writing' + | 'Humanities' + | 'Living Culture' + | 'Social' + | 'Instrumental Arts' + keyword?: string + options?: any +} + +/** + * 동아리 전체 목록을 조회하거나, 좋아요 여부, 소속/분과, 검색어(동아리명, 동아리 요약)로 필터링 및 좋아요 순으로 정렬하여 조회합니다. + * @summary 동아리 목록 조회 + * @param {boolean} isLogin 로그인 여부 + * @param {string} [sortBy] 정렬 방식 (좋아요 순 : like) + * @param {boolean} [wishList] 좋아요 누른 동아리만 필터링 (true / false) + * @param {'Performing Arts' | 'Academic Research' | 'Sports' | 'Religious' | 'Exhibition & Creative Writing' | 'Humanities' | 'Living Culture' | 'Social' | 'Instrumental Arts'} [category] 소속/분과별 필터링 + * @param {string} [keyword] 동아리명/동아리 요약 검색 키워드 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +export const clubGet = ({ + configuration, + basePath, + axios, +}: { + configuration?: Configuration + basePath?: string + axios?: AxiosInstance +}) => { + return (params: ClubGetRequestParams): AxiosPromise> => { + return clubGetFp( + params.isLogin, + params.sortBy, + params.wishList, + params.category, + params.keyword, + params.options, + configuration, + ).then(request => request(axios, basePath)) + } +} + +export type ClubHotGetRequestParams = { + options?: any +} + +/** + * 최근 일주일 동안 좋아요 개수가 가장 많은 동아리 5개를 반환합니다. + * @summary Hot Club 목록 조회 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +export const clubHotGet = ({ + configuration, + basePath, + axios, +}: { + configuration?: Configuration + basePath?: string + axios?: AxiosInstance +}) => { + return (params?: { options?: any }): AxiosPromise> => { + return clubHotGetFp(params?.options, configuration).then(request => request(axios, basePath)) + } +} + +export type ClubLikeClubIdPostRequestParams = { + clubId: number + options?: any +} + +/** + * 이미 동아리 좋아요 눌러져 있으면 해제, 그렇지 않다면 좋아요 등록 + * @summary 동아리 좋아요 등록/해제 + * @param {number} clubId 좋아요 누를 동아리 id + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +export const clubLikeClubIdPost = ({ + configuration, + basePath, + axios, +}: { + configuration?: Configuration + basePath?: string + axios?: AxiosInstance +}) => { + return (params: ClubLikeClubIdPostRequestParams): AxiosPromise => { + return clubLikeClubIdPostFp(params.clubId, params.options, configuration).then(request => request(axios, basePath)) + } +} + +export type ClubPostRequestParams = { + name: string + category: string + summary: string + regularMeeting: string + recruitmentPeriod: string + description: string + clubImage: any + instagramLink?: string + youtubeLink?: string + options?: any +} + +/** + * Admin page에서 새로운 동아리를 생성합니다. + * @summary 동아리 생성 + * @param {string} name 동아리명 + * @param {string} category 카테고리 + * @param {string} summary 동아리 요약 + * @param {string} regularMeeting 정기 모임 + * @param {string} recruitmentPeriod 모집 기간 + * @param {string} description 동아리 설명 + * @param {any} clubImage 동아리 이미지 파일 + * @param {string} [instagramLink] 인스타그램 링크 + * @param {string} [youtubeLink] 유튜브 링크 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +export const clubPost = ({ + configuration, + basePath, + axios, +}: { + configuration?: Configuration + basePath?: string + axios?: AxiosInstance +}) => { + return (params: ClubPostRequestParams): AxiosPromise => { + return clubPostFp( + params.name, + params.category, + params.summary, + params.regularMeeting, + params.recruitmentPeriod, + params.description, + params.clubImage, + params.instagramLink, + params.youtubeLink, + params.options, + configuration, + ).then(request => request(axios, basePath)) + } +} + +export type ClubRecommendGetRequestParams = { + isLogin: boolean + options?: any +} + +/** + * 최초에 무작위로 추천, 이후 좋아요를 누른 동아리가 있다면 그와 같은 카테고리 내에서 추천 + * @summary Recommend Club 목록 조회 + * @param {boolean} isLogin 로그인 여부 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +export const clubRecommendGet = ({ + configuration, + basePath, + axios, +}: { + configuration?: Configuration + basePath?: string + axios?: AxiosInstance +}) => { + return (params: ClubRecommendGetRequestParams): AxiosPromise> => { + return clubRecommendGetFp(params.isLogin, params.options, configuration).then(request => request(axios, basePath)) + } +} diff --git a/packages/api/ku-key/api/comment-api.ts b/packages/api/ku-key/api/comment-api.ts new file mode 100644 index 00000000..afee266b --- /dev/null +++ b/packages/api/ku-key/api/comment-api.ts @@ -0,0 +1,490 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * KU-KEY API + * API for KU-KEY service + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import globalAxios, { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios' +import { Configuration } from '../configuration' +// Some imports not used depending on template conditions +// @ts-ignore +import { DUMMY_BASE_URL, assertParamExists, setSearchParams, toPathString, createRequestFunction } from '../common' +// @ts-ignore +import { COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from '../base' + +// @ts-ignore +import { CreateCommentRequestDto } from '../models' +// @ts-ignore +import { DeleteCommentResponseDto } from '../models' +// @ts-ignore +import { GetCommentResponseDto } from '../models' +// @ts-ignore +import { GetMyCommentListResponseDto } from '../models' +// @ts-ignore +import { LikeCommentResponseDto } from '../models' +// @ts-ignore +import { UpdateCommentRequestDto } from '../models' +/** + * CommentApi - axios parameter creator + * @export + */ +/** + * 댓글을 삭제합니다. + * @summary 댓글 삭제 + * @param {number} commentId 댓글의 고유 ID + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +const commentCommentIdDeleteAxiosParamCreator = async ( + commentId: number, + options: AxiosRequestConfig = {}, + configuration?: Configuration, +): Promise => { + const localVarPath = `/comment/{commentId}`.replace(`{${'commentId'}}`, encodeURIComponent(String(commentId))) + // 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: 'DELETE', ...baseOptions, ...options } + const localVarHeaderParameter = {} as any + const localVarQueryParameter = {} as any + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } +} +/** + * 댓글을 좋아요 합니다. 이미 눌렀다면 취소합니다. + * @summary 댓글 좋아요 + * @param {number} commentId 댓글의 고유 ID + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +const commentCommentIdLikePostAxiosParamCreator = async ( + commentId: number, + options: AxiosRequestConfig = {}, + configuration?: Configuration, +): Promise => { + const localVarPath = `/comment/{commentId}/like`.replace(`{${'commentId'}}`, encodeURIComponent(String(commentId))) + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL) + let baseOptions + if (configuration) { + baseOptions = configuration.baseOptions + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options } + const localVarHeaderParameter = {} as any + const localVarQueryParameter = {} as any + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } +} +/** + * 댓글을 수정합니다. + * @summary 댓글 수정 + * @param {number} commentId 댓글의 고유 ID + * @param {UpdateCommentRequestDto} updateCommentRequestDto + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +const commentCommentIdPatchAxiosParamCreator = async ( + commentId: number, + updateCommentRequestDto: UpdateCommentRequestDto, + options: AxiosRequestConfig = {}, + configuration?: Configuration, +): Promise => { + const localVarPath = `/comment/{commentId}`.replace(`{${'commentId'}}`, encodeURIComponent(String(commentId))) + // 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: 'PATCH', ...baseOptions, ...options } + const localVarHeaderParameter = {} as any + const localVarQueryParameter = {} as any + + localVarHeaderParameter['Content-Type'] = 'application/json' + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers } + localVarRequestOptions.data = updateCommentRequestDto || undefined + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } +} +/** + * 내가 쓴 댓글 목록을 조회합니다. + * @summary 내가 쓴 댓글 목록 조회 + * @param {number} [take] 한 페이지에 담을 데이터 수, default = 10 + * @param {string} [cursor] 커서 값, 14자리 숫자로 이루어진 문자열, 없으면 첫페이지 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +const commentMyGetAxiosParamCreator = async ( + take?: number, + cursor?: string, + options: AxiosRequestConfig = {}, + configuration?: Configuration, +): Promise => { + const localVarPath = `/comment/my` + // 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 + if (take !== undefined) { + localVarQueryParameter['take'] = take + } + + if (cursor !== undefined) { + localVarQueryParameter['cursor'] = cursor + } + + 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} postId 댓글을 달고자 하는 게시글 ID + * @param {CreateCommentRequestDto} createCommentRequestDto + * @param {number} [parentCommentId] 답글을 달고자 하는 댓글 ID + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +const commentPostAxiosParamCreator = async ( + postId: number, + createCommentRequestDto: CreateCommentRequestDto, + parentCommentId?: number, + options: AxiosRequestConfig = {}, + configuration?: Configuration, +): Promise => { + const localVarPath = `/comment` + // 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 + if (postId !== undefined) { + localVarQueryParameter['postId'] = postId + } + + if (parentCommentId !== undefined) { + localVarQueryParameter['parentCommentId'] = parentCommentId + } + + localVarHeaderParameter['Content-Type'] = 'application/json' + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers } + localVarRequestOptions.data = createCommentRequestDto || undefined + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } +} + +/** + * CommentApi - functional programming interface + * @export + */ +/** + * 댓글을 삭제합니다. + * @summary 댓글 삭제 + * @param {number} commentId 댓글의 고유 ID + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +const commentCommentIdDeleteFp = async ( + commentId: number, + options?: AxiosRequestConfig, + configuration?: Configuration, +): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> => { + const localVarAxiosArgs = await commentCommentIdDeleteAxiosParamCreator(commentId, options, configuration) + return createRequestFunction(localVarAxiosArgs, globalAxios, configuration) +} +/** + * 댓글을 좋아요 합니다. 이미 눌렀다면 취소합니다. + * @summary 댓글 좋아요 + * @param {number} commentId 댓글의 고유 ID + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +const commentCommentIdLikePostFp = async ( + commentId: number, + options?: AxiosRequestConfig, + configuration?: Configuration, +): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> => { + const localVarAxiosArgs = await commentCommentIdLikePostAxiosParamCreator(commentId, options, configuration) + return createRequestFunction(localVarAxiosArgs, globalAxios, configuration) +} +/** + * 댓글을 수정합니다. + * @summary 댓글 수정 + * @param {number} commentId 댓글의 고유 ID + * @param {UpdateCommentRequestDto} updateCommentRequestDto + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +const commentCommentIdPatchFp = async ( + commentId: number, + updateCommentRequestDto: UpdateCommentRequestDto, + options?: AxiosRequestConfig, + configuration?: Configuration, +): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> => { + const localVarAxiosArgs = await commentCommentIdPatchAxiosParamCreator( + commentId, + updateCommentRequestDto, + options, + configuration, + ) + return createRequestFunction(localVarAxiosArgs, globalAxios, configuration) +} +/** + * 내가 쓴 댓글 목록을 조회합니다. + * @summary 내가 쓴 댓글 목록 조회 + * @param {number} [take] 한 페이지에 담을 데이터 수, default = 10 + * @param {string} [cursor] 커서 값, 14자리 숫자로 이루어진 문자열, 없으면 첫페이지 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +const commentMyGetFp = async ( + take?: number, + cursor?: string, + options?: AxiosRequestConfig, + configuration?: Configuration, +): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> => { + const localVarAxiosArgs = await commentMyGetAxiosParamCreator(take, cursor, options, configuration) + return createRequestFunction(localVarAxiosArgs, globalAxios, configuration) +} +/** + * 댓글을 작성합니다. + * @summary 댓글 작성 + * @param {number} postId 댓글을 달고자 하는 게시글 ID + * @param {CreateCommentRequestDto} createCommentRequestDto + * @param {number} [parentCommentId] 답글을 달고자 하는 댓글 ID + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +const commentPostFp = async ( + postId: number, + createCommentRequestDto: CreateCommentRequestDto, + parentCommentId?: number, + options?: AxiosRequestConfig, + configuration?: Configuration, +): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> => { + const localVarAxiosArgs = await commentPostAxiosParamCreator( + postId, + createCommentRequestDto, + parentCommentId, + options, + configuration, + ) + return createRequestFunction(localVarAxiosArgs, globalAxios, configuration) +} + +/** + * CommentApi - factory interface + * @export + */ + +export type CommentCommentIdDeleteRequestParams = { + commentId: number + options?: any +} + +/** + * 댓글을 삭제합니다. + * @summary 댓글 삭제 + * @param {number} commentId 댓글의 고유 ID + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +export const commentCommentIdDelete = ({ + configuration, + basePath, + axios, +}: { + configuration?: Configuration + basePath?: string + axios?: AxiosInstance +}) => { + return (params: CommentCommentIdDeleteRequestParams): AxiosPromise => { + return commentCommentIdDeleteFp(params.commentId, params.options, configuration).then(request => + request(axios, basePath), + ) + } +} + +export type CommentCommentIdLikePostRequestParams = { + commentId: number + options?: any +} + +/** + * 댓글을 좋아요 합니다. 이미 눌렀다면 취소합니다. + * @summary 댓글 좋아요 + * @param {number} commentId 댓글의 고유 ID + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +export const commentCommentIdLikePost = ({ + configuration, + basePath, + axios, +}: { + configuration?: Configuration + basePath?: string + axios?: AxiosInstance +}) => { + return (params: CommentCommentIdLikePostRequestParams): AxiosPromise => { + return commentCommentIdLikePostFp(params.commentId, params.options, configuration).then(request => + request(axios, basePath), + ) + } +} + +export type CommentCommentIdPatchRequestParams = { + commentId: number + updateCommentRequestDto: UpdateCommentRequestDto + options?: any +} + +/** + * 댓글을 수정합니다. + * @summary 댓글 수정 + * @param {number} commentId 댓글의 고유 ID + * @param {UpdateCommentRequestDto} updateCommentRequestDto + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +export const commentCommentIdPatch = ({ + configuration, + basePath, + axios, +}: { + configuration?: Configuration + basePath?: string + axios?: AxiosInstance +}) => { + return (params: CommentCommentIdPatchRequestParams): AxiosPromise => { + return commentCommentIdPatchFp( + params.commentId, + params.updateCommentRequestDto, + params.options, + configuration, + ).then(request => request(axios, basePath)) + } +} + +export type CommentMyGetRequestParams = { + take?: number + cursor?: string + options?: any +} + +/** + * 내가 쓴 댓글 목록을 조회합니다. + * @summary 내가 쓴 댓글 목록 조회 + * @param {number} [take] 한 페이지에 담을 데이터 수, default = 10 + * @param {string} [cursor] 커서 값, 14자리 숫자로 이루어진 문자열, 없으면 첫페이지 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +export const commentMyGet = ({ + configuration, + basePath, + axios, +}: { + configuration?: Configuration + basePath?: string + axios?: AxiosInstance +}) => { + return (params: CommentMyGetRequestParams): AxiosPromise => { + return commentMyGetFp(params.take, params.cursor, params.options, configuration).then(request => + request(axios, basePath), + ) + } +} + +export type CommentPostRequestParams = { + postId: number + createCommentRequestDto: CreateCommentRequestDto + parentCommentId?: number + options?: any +} + +/** + * 댓글을 작성합니다. + * @summary 댓글 작성 + * @param {number} postId 댓글을 달고자 하는 게시글 ID + * @param {CreateCommentRequestDto} createCommentRequestDto + * @param {number} [parentCommentId] 답글을 달고자 하는 댓글 ID + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +export const commentPost = ({ + configuration, + basePath, + axios, +}: { + configuration?: Configuration + basePath?: string + axios?: AxiosInstance +}) => { + return (params: CommentPostRequestParams): AxiosPromise => { + return commentPostFp( + params.postId, + params.createCommentRequestDto, + params.parentCommentId, + params.options, + configuration, + ).then(request => request(axios, basePath)) + } +} diff --git a/packages/api/ku-key/api/course-api.ts b/packages/api/ku-key/api/course-api.ts new file mode 100644 index 00000000..cd6520ad --- /dev/null +++ b/packages/api/ku-key/api/course-api.ts @@ -0,0 +1,264 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * KU-KEY API + * API for KU-KEY service + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import globalAxios, { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios' +import { Configuration } from '../configuration' +// Some imports not used depending on template conditions +// @ts-ignore +import { DUMMY_BASE_URL, assertParamExists, setSearchParams, toPathString, createRequestFunction } from '../common' +// @ts-ignore +import { COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from '../base' + +// @ts-ignore +import { CommonCourseResponseDto } from '../models' +// @ts-ignore +import { PaginatedCoursesDto } from '../models' +/** + * CourseApi - axios parameter creator + * @export + */ +/** + * 하나의 엔드포인트로 모든 강의검색 로직을 통합했습니다. + * @summary 강의 검색 + * @param {string} year 연도 + * @param {string} semester 학기 + * @param {number} [cursorId] 커서 id, 값이 존재하지 않으면 첫 페이지 + * @param {'Major' | 'General Studies' | 'Academic Foundations'} [category] 강의 카테고리 (모든 강의, 전공, 교양, 학문의 기초), 모든 강의는 값을 넘겨주지 않음 + * @param {string} [keyword] 검색 키워드 (강의명, 교수명, 학수번호) + * @param {string} [classification] category가 Major일때 특정 과를, category가 Academic Foundation일 때 특정 단과대를 넣어주세요. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +const courseGetAxiosParamCreator = async ( + year: string, + semester: string, + cursorId?: number, + category?: 'Major' | 'General Studies' | 'Academic Foundations', + keyword?: string, + classification?: string, + options: AxiosRequestConfig = {}, + configuration?: Configuration, +): Promise => { + const localVarPath = `/course` + // 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 + if (cursorId !== undefined) { + localVarQueryParameter['cursorId'] = cursorId + } + + if (year !== undefined) { + localVarQueryParameter['year'] = year + } + + if (semester !== undefined) { + localVarQueryParameter['semester'] = semester + } + + if (category !== undefined) { + localVarQueryParameter['category'] = category + } + + if (keyword !== undefined) { + localVarQueryParameter['keyword'] = keyword + } + + if (classification !== undefined) { + localVarQueryParameter['classification'] = classification + } + + 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} limit 반환 개수 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +const courseRecommendationGetAxiosParamCreator = async ( + limit: number, + options: AxiosRequestConfig = {}, + configuration?: Configuration, +): Promise => { + const localVarPath = `/course/recommendation` + // 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 + if (limit !== undefined) { + localVarQueryParameter['limit'] = limit + } + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } +} + +/** + * CourseApi - functional programming interface + * @export + */ +/** + * 하나의 엔드포인트로 모든 강의검색 로직을 통합했습니다. + * @summary 강의 검색 + * @param {string} year 연도 + * @param {string} semester 학기 + * @param {number} [cursorId] 커서 id, 값이 존재하지 않으면 첫 페이지 + * @param {'Major' | 'General Studies' | 'Academic Foundations'} [category] 강의 카테고리 (모든 강의, 전공, 교양, 학문의 기초), 모든 강의는 값을 넘겨주지 않음 + * @param {string} [keyword] 검색 키워드 (강의명, 교수명, 학수번호) + * @param {string} [classification] category가 Major일때 특정 과를, category가 Academic Foundation일 때 특정 단과대를 넣어주세요. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +const courseGetFp = async ( + year: string, + semester: string, + cursorId?: number, + category?: 'Major' | 'General Studies' | 'Academic Foundations', + keyword?: string, + classification?: string, + options?: AxiosRequestConfig, + configuration?: Configuration, +): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> => { + const localVarAxiosArgs = await courseGetAxiosParamCreator( + year, + semester, + cursorId, + category, + keyword, + classification, + options, + configuration, + ) + return createRequestFunction(localVarAxiosArgs, globalAxios, configuration) +} +/** + * 추천 강의를 조회합니다. + * @summary 추천 강의 조회 + * @param {number} limit 반환 개수 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +const courseRecommendationGetFp = async ( + limit: number, + options?: AxiosRequestConfig, + configuration?: Configuration, +): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> => { + const localVarAxiosArgs = await courseRecommendationGetAxiosParamCreator(limit, options, configuration) + return createRequestFunction(localVarAxiosArgs, globalAxios, configuration) +} + +/** + * CourseApi - factory interface + * @export + */ + +export type CourseGetRequestParams = { + year: string + semester: string + cursorId?: number + category?: 'Major' | 'General Studies' | 'Academic Foundations' + keyword?: string + classification?: string + options?: any +} + +/** + * 하나의 엔드포인트로 모든 강의검색 로직을 통합했습니다. + * @summary 강의 검색 + * @param {string} year 연도 + * @param {string} semester 학기 + * @param {number} [cursorId] 커서 id, 값이 존재하지 않으면 첫 페이지 + * @param {'Major' | 'General Studies' | 'Academic Foundations'} [category] 강의 카테고리 (모든 강의, 전공, 교양, 학문의 기초), 모든 강의는 값을 넘겨주지 않음 + * @param {string} [keyword] 검색 키워드 (강의명, 교수명, 학수번호) + * @param {string} [classification] category가 Major일때 특정 과를, category가 Academic Foundation일 때 특정 단과대를 넣어주세요. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +export const courseGet = ({ + configuration, + basePath, + axios, +}: { + configuration?: Configuration + basePath?: string + axios?: AxiosInstance +}) => { + return (params: CourseGetRequestParams): AxiosPromise => { + return courseGetFp( + params.year, + params.semester, + params.cursorId, + params.category, + params.keyword, + params.classification, + params.options, + configuration, + ).then(request => request(axios, basePath)) + } +} + +export type CourseRecommendationGetRequestParams = { + limit: number + options?: any +} + +/** + * 추천 강의를 조회합니다. + * @summary 추천 강의 조회 + * @param {number} limit 반환 개수 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +export const courseRecommendationGet = ({ + configuration, + basePath, + axios, +}: { + configuration?: Configuration + basePath?: string + axios?: AxiosInstance +}) => { + return (params: CourseRecommendationGetRequestParams): AxiosPromise> => { + return courseRecommendationGetFp(params.limit, params.options, configuration).then(request => + request(axios, basePath), + ) + } +} diff --git a/packages/api/ku-key/api/course-review-api.ts b/packages/api/ku-key/api/course-review-api.ts new file mode 100644 index 00000000..4a5cf08c --- /dev/null +++ b/packages/api/ku-key/api/course-review-api.ts @@ -0,0 +1,772 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * KU-KEY API + * API for KU-KEY service + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import globalAxios, { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios' +import { Configuration } from '../configuration' +// Some imports not used depending on template conditions +// @ts-ignore +import { DUMMY_BASE_URL, assertParamExists, setSearchParams, toPathString, createRequestFunction } from '../common' +// @ts-ignore +import { COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from '../base' + +// @ts-ignore +import { CourseReviewResponseDto } from '../models' +// @ts-ignore +import { CreateCourseReviewRequestDto } from '../models' +// @ts-ignore +import { GetCourseReviewSummaryResponseDto } from '../models' +// @ts-ignore +import { GetCourseReviewsResponseDto } from '../models' +// @ts-ignore +import { GetCoursesWithCourseReviewsResponseDto } from '../models' +// @ts-ignore +import { PaginatedCourseReviewsDto } from '../models' +/** + * CourseReviewApi - axios parameter creator + * @export + */ +/** + * 해당 강의에 대해 이미 강의평을 작성했으면 true, 아니면 false 반환 + * @summary 이미 해당 강의에 대해 강의평 작성했는 지 조회 + * @param {string} professorName 교수님 성함 + * @param {string} courseCode 학수번호 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +const courseReviewCheckSubmissionGetAxiosParamCreator = async ( + professorName: string, + courseCode: string, + options: AxiosRequestConfig = {}, + configuration?: Configuration, +): Promise => { + const localVarPath = `/course-review/check-submission` + // 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 + if (professorName !== undefined) { + localVarQueryParameter['professorName'] = professorName + } + + if (courseCode !== undefined) { + localVarQueryParameter['courseCode'] = courseCode + } + + 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} limit 반환 개수 + * @param {'RECENT' | 'TEACHING'} criteria 반환 기준 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +const courseReviewCourseGetAxiosParamCreator = async ( + limit: number, + criteria: 'RECENT' | 'TEACHING', + options: AxiosRequestConfig = {}, + configuration?: Configuration, +): Promise => { + const localVarPath = `/course-review/course` + // 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 + if (limit !== undefined) { + localVarQueryParameter['limit'] = limit + } + + if (criteria !== undefined) { + localVarQueryParameter['criteria'] = criteria + } + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } +} +/** + * 해당 교수의 해당 강의에 대해 강의평을 조회합니다. 열람권이 없으면 열람할 수 없습니다. + * @summary 강의평 조회 + * @param {string} professorName 교수님 성함 + * @param {string} courseCode 학수번호 + * @param {string} criteria 검색 필터 기준 + * @param {string} direction 오름차순 / 내림차순 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +const courseReviewGetAxiosParamCreator = async ( + professorName: string, + courseCode: string, + criteria: string, + direction: string, + options: AxiosRequestConfig = {}, + configuration?: Configuration, +): Promise => { + const localVarPath = `/course-review` + // 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 + if (professorName !== undefined) { + localVarQueryParameter['professorName'] = professorName + } + + if (courseCode !== undefined) { + localVarQueryParameter['courseCode'] = courseCode + } + + if (criteria !== undefined) { + localVarQueryParameter['criteria'] = criteria + } + + if (direction !== undefined) { + localVarQueryParameter['direction'] = direction + } + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } +} +/** + * 내가 작성한 강의평을 조회합니다. + * @summary 내 강의평 조회 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +const courseReviewMyCourseReviewsGetAxiosParamCreator = async ( + options: AxiosRequestConfig = {}, + configuration?: Configuration, +): Promise => { + const localVarPath = `/course-review/my-course-reviews` + // 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 + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } +} +/** + * 강의평을 추가합니다. 유저가 해당 강의에 대해 이미 강의평을 등록했으면 더 이상 등록되지 않습니다. + * @summary 강의평 추가 + * @param {CreateCourseReviewRequestDto} createCourseReviewRequestDto + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +const courseReviewPostAxiosParamCreator = async ( + createCourseReviewRequestDto: CreateCourseReviewRequestDto, + options: AxiosRequestConfig = {}, + configuration?: Configuration, +): Promise => { + const localVarPath = `/course-review` + // 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 + + localVarHeaderParameter['Content-Type'] = 'application/json' + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers } + localVarRequestOptions.data = createCourseReviewRequestDto || undefined + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } +} +/** + * 강의평에 추천을 누릅니다. 이미 추천한 강의평이면 추천이 취소됩니다. 내가 쓴 강의평은 추천할 수 없습니다. + * @summary 강의평 추천 + * @param {number} courseReviewId + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +const courseReviewRecommendCourseReviewIdPostAxiosParamCreator = async ( + courseReviewId: number, + options: AxiosRequestConfig = {}, + configuration?: Configuration, +): Promise => { + const localVarPath = `/course-review/recommend/{courseReviewId}`.replace( + `{${'courseReviewId'}}`, + encodeURIComponent(String(courseReviewId)), + ) + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL) + let baseOptions + if (configuration) { + baseOptions = configuration.baseOptions + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options } + const localVarHeaderParameter = {} as any + const localVarQueryParameter = {} as any + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } +} +/** + * 키워드로 강의평을 검색합니다. + * @summary 강의평 검색 + * @param {string} keyword 검색 키워드 (교수명, 강의명, 학수번호 중 하나) + * @param {number} [cursorId] cursor id, 값이 존재하지 않으면 첫 페이지 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +const courseReviewSearchGetAxiosParamCreator = async ( + keyword: string, + cursorId?: number, + options: AxiosRequestConfig = {}, + configuration?: Configuration, +): Promise => { + const localVarPath = `/course-review/search` + // 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 + if (keyword !== undefined) { + localVarQueryParameter['keyword'] = keyword + } + + if (cursorId !== undefined) { + localVarQueryParameter['cursorId'] = cursorId + } + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } +} +/** + * 해당 교수의 해당 강의에 대한 강의평들을 종합한 강의평 요약을 조회합니다. + * @summary 강의평 요약 조회 + * @param {string} professorName 교수님 성함 + * @param {string} courseCode 학수번호 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +const courseReviewSummaryGetAxiosParamCreator = async ( + professorName: string, + courseCode: string, + options: AxiosRequestConfig = {}, + configuration?: Configuration, +): Promise => { + const localVarPath = `/course-review/summary` + // 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 + if (professorName !== undefined) { + localVarQueryParameter['professorName'] = professorName + } + + if (courseCode !== undefined) { + localVarQueryParameter['courseCode'] = courseCode + } + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } +} + +/** + * CourseReviewApi - functional programming interface + * @export + */ +/** + * 해당 강의에 대해 이미 강의평을 작성했으면 true, 아니면 false 반환 + * @summary 이미 해당 강의에 대해 강의평 작성했는 지 조회 + * @param {string} professorName 교수님 성함 + * @param {string} courseCode 학수번호 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +const courseReviewCheckSubmissionGetFp = async ( + professorName: string, + courseCode: string, + options?: AxiosRequestConfig, + configuration?: Configuration, +): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> => { + const localVarAxiosArgs = await courseReviewCheckSubmissionGetAxiosParamCreator( + professorName, + courseCode, + options, + configuration, + ) + return createRequestFunction(localVarAxiosArgs, globalAxios, configuration) +} +/** + * 최근 강의평이 등록되었거나, 강의력이 좋은 강의를 조회합니다. + * @summary 강의평과 관련된 강의 조회 + * @param {number} limit 반환 개수 + * @param {'RECENT' | 'TEACHING'} criteria 반환 기준 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +const courseReviewCourseGetFp = async ( + limit: number, + criteria: 'RECENT' | 'TEACHING', + options?: AxiosRequestConfig, + configuration?: Configuration, +): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> => { + const localVarAxiosArgs = await courseReviewCourseGetAxiosParamCreator(limit, criteria, options, configuration) + return createRequestFunction(localVarAxiosArgs, globalAxios, configuration) +} +/** + * 해당 교수의 해당 강의에 대해 강의평을 조회합니다. 열람권이 없으면 열람할 수 없습니다. + * @summary 강의평 조회 + * @param {string} professorName 교수님 성함 + * @param {string} courseCode 학수번호 + * @param {string} criteria 검색 필터 기준 + * @param {string} direction 오름차순 / 내림차순 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +const courseReviewGetFp = async ( + professorName: string, + courseCode: string, + criteria: string, + direction: string, + options?: AxiosRequestConfig, + configuration?: Configuration, +): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> => { + const localVarAxiosArgs = await courseReviewGetAxiosParamCreator( + professorName, + courseCode, + criteria, + direction, + options, + configuration, + ) + return createRequestFunction(localVarAxiosArgs, globalAxios, configuration) +} +/** + * 내가 작성한 강의평을 조회합니다. + * @summary 내 강의평 조회 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +const courseReviewMyCourseReviewsGetFp = async ( + options?: AxiosRequestConfig, + configuration?: Configuration, +): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> => { + const localVarAxiosArgs = await courseReviewMyCourseReviewsGetAxiosParamCreator(options, configuration) + return createRequestFunction(localVarAxiosArgs, globalAxios, configuration) +} +/** + * 강의평을 추가합니다. 유저가 해당 강의에 대해 이미 강의평을 등록했으면 더 이상 등록되지 않습니다. + * @summary 강의평 추가 + * @param {CreateCourseReviewRequestDto} createCourseReviewRequestDto + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +const courseReviewPostFp = async ( + createCourseReviewRequestDto: CreateCourseReviewRequestDto, + options?: AxiosRequestConfig, + configuration?: Configuration, +): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> => { + const localVarAxiosArgs = await courseReviewPostAxiosParamCreator( + createCourseReviewRequestDto, + options, + configuration, + ) + return createRequestFunction(localVarAxiosArgs, globalAxios, configuration) +} +/** + * 강의평에 추천을 누릅니다. 이미 추천한 강의평이면 추천이 취소됩니다. 내가 쓴 강의평은 추천할 수 없습니다. + * @summary 강의평 추천 + * @param {number} courseReviewId + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +const courseReviewRecommendCourseReviewIdPostFp = async ( + courseReviewId: number, + options?: AxiosRequestConfig, + configuration?: Configuration, +): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> => { + const localVarAxiosArgs = await courseReviewRecommendCourseReviewIdPostAxiosParamCreator( + courseReviewId, + options, + configuration, + ) + return createRequestFunction(localVarAxiosArgs, globalAxios, configuration) +} +/** + * 키워드로 강의평을 검색합니다. + * @summary 강의평 검색 + * @param {string} keyword 검색 키워드 (교수명, 강의명, 학수번호 중 하나) + * @param {number} [cursorId] cursor id, 값이 존재하지 않으면 첫 페이지 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +const courseReviewSearchGetFp = async ( + keyword: string, + cursorId?: number, + options?: AxiosRequestConfig, + configuration?: Configuration, +): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> => { + const localVarAxiosArgs = await courseReviewSearchGetAxiosParamCreator(keyword, cursorId, options, configuration) + return createRequestFunction(localVarAxiosArgs, globalAxios, configuration) +} +/** + * 해당 교수의 해당 강의에 대한 강의평들을 종합한 강의평 요약을 조회합니다. + * @summary 강의평 요약 조회 + * @param {string} professorName 교수님 성함 + * @param {string} courseCode 학수번호 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +const courseReviewSummaryGetFp = async ( + professorName: string, + courseCode: string, + options?: AxiosRequestConfig, + configuration?: Configuration, +): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> => { + const localVarAxiosArgs = await courseReviewSummaryGetAxiosParamCreator( + professorName, + courseCode, + options, + configuration, + ) + return createRequestFunction(localVarAxiosArgs, globalAxios, configuration) +} + +/** + * CourseReviewApi - factory interface + * @export + */ + +export type CourseReviewCheckSubmissionGetRequestParams = { + professorName: string + courseCode: string + options?: any +} + +/** + * 해당 강의에 대해 이미 강의평을 작성했으면 true, 아니면 false 반환 + * @summary 이미 해당 강의에 대해 강의평 작성했는 지 조회 + * @param {string} professorName 교수님 성함 + * @param {string} courseCode 학수번호 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +export const courseReviewCheckSubmissionGet = ({ + configuration, + basePath, + axios, +}: { + configuration?: Configuration + basePath?: string + axios?: AxiosInstance +}) => { + return (params: CourseReviewCheckSubmissionGetRequestParams): AxiosPromise => { + return courseReviewCheckSubmissionGetFp( + params.professorName, + params.courseCode, + params.options, + configuration, + ).then(request => request(axios, basePath)) + } +} + +export type CourseReviewCourseGetRequestParams = { + limit: number + criteria: 'RECENT' | 'TEACHING' + options?: any +} + +/** + * 최근 강의평이 등록되었거나, 강의력이 좋은 강의를 조회합니다. + * @summary 강의평과 관련된 강의 조회 + * @param {number} limit 반환 개수 + * @param {'RECENT' | 'TEACHING'} criteria 반환 기준 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +export const courseReviewCourseGet = ({ + configuration, + basePath, + axios, +}: { + configuration?: Configuration + basePath?: string + axios?: AxiosInstance +}) => { + return (params: CourseReviewCourseGetRequestParams): AxiosPromise => { + return courseReviewCourseGetFp(params.limit, params.criteria, params.options, configuration).then(request => + request(axios, basePath), + ) + } +} + +export type CourseReviewGetRequestParams = { + professorName: string + courseCode: string + criteria: string + direction: string + options?: any +} + +/** + * 해당 교수의 해당 강의에 대해 강의평을 조회합니다. 열람권이 없으면 열람할 수 없습니다. + * @summary 강의평 조회 + * @param {string} professorName 교수님 성함 + * @param {string} courseCode 학수번호 + * @param {string} criteria 검색 필터 기준 + * @param {string} direction 오름차순 / 내림차순 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +export const courseReviewGet = ({ + configuration, + basePath, + axios, +}: { + configuration?: Configuration + basePath?: string + axios?: AxiosInstance +}) => { + return (params: CourseReviewGetRequestParams): AxiosPromise => { + return courseReviewGetFp( + params.professorName, + params.courseCode, + params.criteria, + params.direction, + params.options, + configuration, + ).then(request => request(axios, basePath)) + } +} + +export type CourseReviewMyCourseReviewsGetRequestParams = { + options?: any +} + +/** + * 내가 작성한 강의평을 조회합니다. + * @summary 내 강의평 조회 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +export const courseReviewMyCourseReviewsGet = ({ + configuration, + basePath, + axios, +}: { + configuration?: Configuration + basePath?: string + axios?: AxiosInstance +}) => { + return (params?: { options?: any }): AxiosPromise> => { + return courseReviewMyCourseReviewsGetFp(params?.options, configuration).then(request => request(axios, basePath)) + } +} + +export type CourseReviewPostRequestParams = { + createCourseReviewRequestDto: CreateCourseReviewRequestDto + options?: any +} + +/** + * 강의평을 추가합니다. 유저가 해당 강의에 대해 이미 강의평을 등록했으면 더 이상 등록되지 않습니다. + * @summary 강의평 추가 + * @param {CreateCourseReviewRequestDto} createCourseReviewRequestDto + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +export const courseReviewPost = ({ + configuration, + basePath, + axios, +}: { + configuration?: Configuration + basePath?: string + axios?: AxiosInstance +}) => { + return (params: CourseReviewPostRequestParams): AxiosPromise => { + return courseReviewPostFp(params.createCourseReviewRequestDto, params.options, configuration).then(request => + request(axios, basePath), + ) + } +} + +export type CourseReviewRecommendCourseReviewIdPostRequestParams = { + courseReviewId: number + options?: any +} + +/** + * 강의평에 추천을 누릅니다. 이미 추천한 강의평이면 추천이 취소됩니다. 내가 쓴 강의평은 추천할 수 없습니다. + * @summary 강의평 추천 + * @param {number} courseReviewId + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +export const courseReviewRecommendCourseReviewIdPost = ({ + configuration, + basePath, + axios, +}: { + configuration?: Configuration + basePath?: string + axios?: AxiosInstance +}) => { + return (params: CourseReviewRecommendCourseReviewIdPostRequestParams): AxiosPromise => { + return courseReviewRecommendCourseReviewIdPostFp(params.courseReviewId, params.options, configuration).then( + request => request(axios, basePath), + ) + } +} + +export type CourseReviewSearchGetRequestParams = { + keyword: string + cursorId?: number + options?: any +} + +/** + * 키워드로 강의평을 검색합니다. + * @summary 강의평 검색 + * @param {string} keyword 검색 키워드 (교수명, 강의명, 학수번호 중 하나) + * @param {number} [cursorId] cursor id, 값이 존재하지 않으면 첫 페이지 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +export const courseReviewSearchGet = ({ + configuration, + basePath, + axios, +}: { + configuration?: Configuration + basePath?: string + axios?: AxiosInstance +}) => { + return (params: CourseReviewSearchGetRequestParams): AxiosPromise => { + return courseReviewSearchGetFp(params.keyword, params.cursorId, params.options, configuration).then(request => + request(axios, basePath), + ) + } +} + +export type CourseReviewSummaryGetRequestParams = { + professorName: string + courseCode: string + options?: any +} + +/** + * 해당 교수의 해당 강의에 대한 강의평들을 종합한 강의평 요약을 조회합니다. + * @summary 강의평 요약 조회 + * @param {string} professorName 교수님 성함 + * @param {string} courseCode 학수번호 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +export const courseReviewSummaryGet = ({ + configuration, + basePath, + axios, +}: { + configuration?: Configuration + basePath?: string + axios?: AxiosInstance +}) => { + return (params: CourseReviewSummaryGetRequestParams): AxiosPromise => { + return courseReviewSummaryGetFp(params.professorName, params.courseCode, params.options, configuration).then( + request => request(axios, basePath), + ) + } +} diff --git a/packages/api/ku-key/api/default-api.ts b/packages/api/ku-key/api/default-api.ts new file mode 100644 index 00000000..ecbfbfdc --- /dev/null +++ b/packages/api/ku-key/api/default-api.ts @@ -0,0 +1,101 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * KU-KEY API + * API for KU-KEY service + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import globalAxios, { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios' +import { Configuration } from '../configuration' +// Some imports not used depending on template conditions +// @ts-ignore +import { DUMMY_BASE_URL, assertParamExists, setSearchParams, toPathString, createRequestFunction } from '../common' +// @ts-ignore +import { COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from '../base' + +/** + * DefaultApi - axios parameter creator + * @export + */ +/** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +const rootGetAxiosParamCreator = async ( + options: AxiosRequestConfig = {}, + configuration?: Configuration, +): Promise => { + const localVarPath = `/` + // 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 + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } +} + +/** + * DefaultApi - functional programming interface + * @export + */ +/** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +const rootGetFp = async ( + options?: AxiosRequestConfig, + configuration?: Configuration, +): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> => { + const localVarAxiosArgs = await rootGetAxiosParamCreator(options, configuration) + return createRequestFunction(localVarAxiosArgs, globalAxios, configuration) +} + +/** + * DefaultApi - factory interface + * @export + */ + +export type RootGetRequestParams = { + options?: any +} + +/** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +export const rootGet = ({ + configuration, + basePath, + axios, +}: { + configuration?: Configuration + basePath?: string + axios?: AxiosInstance +}) => { + return (params?: { options?: any }): AxiosPromise => { + return rootGetFp(params?.options, configuration).then(request => request(axios, basePath)) + } +} diff --git a/packages/api/ku-key/api/friendship-api.ts b/packages/api/ku-key/api/friendship-api.ts new file mode 100644 index 00000000..886a9757 --- /dev/null +++ b/packages/api/ku-key/api/friendship-api.ts @@ -0,0 +1,930 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * KU-KEY API + * API for KU-KEY service + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import globalAxios, { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios' +import { Configuration } from '../configuration' +// Some imports not used depending on template conditions +// @ts-ignore +import { DUMMY_BASE_URL, assertParamExists, setSearchParams, toPathString, createRequestFunction } from '../common' +// @ts-ignore +import { COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from '../base' + +// @ts-ignore +import { DeleteFriendshipResponseDto } from '../models' +// @ts-ignore +import { GetFriendResponseDto } from '../models' +// @ts-ignore +import { GetReceivedFriendshipRequestCountDto } from '../models' +// @ts-ignore +import { GetTimetableByTimetableIdDto } from '../models' +// @ts-ignore +import { GetWaitingFriendResponseDto } from '../models' +// @ts-ignore +import { SearchUserResponseDto } from '../models' +// @ts-ignore +import { SendFriendshipRequestDto } from '../models' +// @ts-ignore +import { SendFriendshipResponseDto } from '../models' +// @ts-ignore +import { UpdateFriendshipResponseDto } from '../models' +/** + * FriendshipApi - axios parameter creator + * @export + */ +/** + * 친구 ID, 연도, 학기를 입력받아 해당 학기에 친구의 대표 시간표를 조회합니다. + * @summary 친구 시간표 조회 + * @param {string} username 친구 추가용 ID (username) + * @param {string} year 연도 + * @param {string} semester 학기 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +const friendshipFriendTimetableGetAxiosParamCreator = async ( + username: string, + year: string, + semester: string, + options: AxiosRequestConfig = {}, + configuration?: Configuration, +): Promise => { + const localVarPath = `/friendship/friend-timetable` + // 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 + if (username !== undefined) { + localVarQueryParameter['username'] = username + } + + if (year !== undefined) { + localVarQueryParameter['year'] = year + } + + if (semester !== undefined) { + localVarQueryParameter['semester'] = semester + } + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } +} +/** + * 이미 친구로 등록된 유저에 대해, friendshipId를 받아 해당 friendship 레코드를 삭제합니다. + * @summary 친구 삭제하기 + * @param {number} friendshipId 해당 친구 관계에 대한 friendship id + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +const friendshipFriendshipIdDeleteAxiosParamCreator = async ( + friendshipId: number, + options: AxiosRequestConfig = {}, + configuration?: Configuration, +): Promise => { + const localVarPath = `/friendship/{friendshipId}`.replace( + `{${'friendshipId'}}`, + encodeURIComponent(String(friendshipId)), + ) + // 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: 'DELETE', ...baseOptions, ...options } + const localVarHeaderParameter = {} as any + const localVarQueryParameter = {} as any + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } +} +/** + * 전체 친구 목록을 조회하거나, keyword를 query로 받아 친구 목록을 필터링하여 조회합니다. + * @summary 친구 목록 조회 + * @param {string} [keyword] 검색 키워드 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +const friendshipGetAxiosParamCreator = async ( + keyword?: string, + options: AxiosRequestConfig = {}, + configuration?: Configuration, +): Promise => { + const localVarPath = `/friendship` + // 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 + if (keyword !== undefined) { + localVarQueryParameter['keyword'] = keyword + } + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } +} +/** + * 검색된 유저에게 친구 요청을 보냅니다. friendship 레코드가 새로 생성됩니다. + * @summary 친구 요청 보내기 + * @param {SendFriendshipRequestDto} sendFriendshipRequestDto + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +const friendshipPostAxiosParamCreator = async ( + sendFriendshipRequestDto: SendFriendshipRequestDto, + options: AxiosRequestConfig = {}, + configuration?: Configuration, +): Promise => { + const localVarPath = `/friendship` + // 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 + + localVarHeaderParameter['Content-Type'] = 'application/json' + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers } + localVarRequestOptions.data = sendFriendshipRequestDto || undefined + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } +} +/** + * 나에게 온 친구 요청 전체 개수 / 아직 확인하지 않은 개수를 조회합니다. + * @summary 나에게 온 친구 요청 개수 조회 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +const friendshipReceivedCountGetAxiosParamCreator = async ( + options: AxiosRequestConfig = {}, + configuration?: Configuration, +): Promise => { + const localVarPath = `/friendship/received/count` + // 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 + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } +} +/** + * friendshipId를 받아 해당 friendship 레코드를 삭제합니다. + * @summary 받은 친구 요청 거절하기 + * @param {number} friendshipId 해당 친구 요청에 대한 friendship id + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +const friendshipReceivedFriendshipIdDeleteAxiosParamCreator = async ( + friendshipId: number, + options: AxiosRequestConfig = {}, + configuration?: Configuration, +): Promise => { + const localVarPath = `/friendship/received/{friendshipId}`.replace( + `{${'friendshipId'}}`, + encodeURIComponent(String(friendshipId)), + ) + // 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: 'DELETE', ...baseOptions, ...options } + const localVarHeaderParameter = {} as any + const localVarQueryParameter = {} as any + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } +} +/** + * friendshipId를 받아 해당 friendship 레코드의 areWeFriend column을 true로 업데이트합니다. + * @summary 받은 친구 요청 수락하기 + * @param {number} friendshipId 해당 친구 요청에 대한 friendship id + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +const friendshipReceivedFriendshipIdPatchAxiosParamCreator = async ( + friendshipId: number, + options: AxiosRequestConfig = {}, + configuration?: Configuration, +): Promise => { + const localVarPath = `/friendship/received/{friendshipId}`.replace( + `{${'friendshipId'}}`, + encodeURIComponent(String(friendshipId)), + ) + // 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: 'PATCH', ...baseOptions, ...options } + const localVarHeaderParameter = {} as any + const localVarQueryParameter = {} as any + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } +} +/** + * 나에게 친구 요청을 보낸 유저 목록을 조회합니다. + * @summary 나에게 친구 요청을 보낸 유저 목록 조회 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +const friendshipReceivedGetAxiosParamCreator = async ( + options: AxiosRequestConfig = {}, + configuration?: Configuration, +): Promise => { + const localVarPath = `/friendship/received` + // 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 + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } +} +/** + * username(친구 추가용 id)를 query로 받아 해당하는 유저를 검색합니다. 검색 결과가 없는 경우 null을 반환합니다. + * @summary 친구 추가를 위한 유저 검색 + * @param {any} username 친구 추가용 id + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +const friendshipSearchUserGetAxiosParamCreator = async ( + username: any, + options: AxiosRequestConfig = {}, + configuration?: Configuration, +): Promise => { + const localVarPath = `/friendship/search-user` + // 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 + if (username !== undefined) { + localVarQueryParameter['username'] = username + } + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } +} +/** + * friendshipId를 받아 해당 friendship 레코드를 삭제합니다. + * @summary 보낸 친구 요청 취소하기 + * @param {number} friendshipId 해당 친구 요청에 대한 friendship id + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +const friendshipSentFriendshipIdDeleteAxiosParamCreator = async ( + friendshipId: number, + options: AxiosRequestConfig = {}, + configuration?: Configuration, +): Promise => { + const localVarPath = `/friendship/sent/{friendshipId}`.replace( + `{${'friendshipId'}}`, + encodeURIComponent(String(friendshipId)), + ) + // 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: 'DELETE', ...baseOptions, ...options } + const localVarHeaderParameter = {} as any + const localVarQueryParameter = {} as any + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } +} +/** + * 내가 친구 요청을 보낸 유저 목록을 조회합니다. + * @summary 내가 친구 요청을 보낸 유저 목록 조회 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +const friendshipSentGetAxiosParamCreator = async ( + options: AxiosRequestConfig = {}, + configuration?: Configuration, +): Promise => { + const localVarPath = `/friendship/sent` + // 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 + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } +} + +/** + * FriendshipApi - functional programming interface + * @export + */ +/** + * 친구 ID, 연도, 학기를 입력받아 해당 학기에 친구의 대표 시간표를 조회합니다. + * @summary 친구 시간표 조회 + * @param {string} username 친구 추가용 ID (username) + * @param {string} year 연도 + * @param {string} semester 학기 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +const friendshipFriendTimetableGetFp = async ( + username: string, + year: string, + semester: string, + options?: AxiosRequestConfig, + configuration?: Configuration, +): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> => { + const localVarAxiosArgs = await friendshipFriendTimetableGetAxiosParamCreator( + username, + year, + semester, + options, + configuration, + ) + return createRequestFunction(localVarAxiosArgs, globalAxios, configuration) +} +/** + * 이미 친구로 등록된 유저에 대해, friendshipId를 받아 해당 friendship 레코드를 삭제합니다. + * @summary 친구 삭제하기 + * @param {number} friendshipId 해당 친구 관계에 대한 friendship id + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +const friendshipFriendshipIdDeleteFp = async ( + friendshipId: number, + options?: AxiosRequestConfig, + configuration?: Configuration, +): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> => { + const localVarAxiosArgs = await friendshipFriendshipIdDeleteAxiosParamCreator(friendshipId, options, configuration) + return createRequestFunction(localVarAxiosArgs, globalAxios, configuration) +} +/** + * 전체 친구 목록을 조회하거나, keyword를 query로 받아 친구 목록을 필터링하여 조회합니다. + * @summary 친구 목록 조회 + * @param {string} [keyword] 검색 키워드 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +const friendshipGetFp = async ( + keyword?: string, + options?: AxiosRequestConfig, + configuration?: Configuration, +): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> => { + const localVarAxiosArgs = await friendshipGetAxiosParamCreator(keyword, options, configuration) + return createRequestFunction(localVarAxiosArgs, globalAxios, configuration) +} +/** + * 검색된 유저에게 친구 요청을 보냅니다. friendship 레코드가 새로 생성됩니다. + * @summary 친구 요청 보내기 + * @param {SendFriendshipRequestDto} sendFriendshipRequestDto + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +const friendshipPostFp = async ( + sendFriendshipRequestDto: SendFriendshipRequestDto, + options?: AxiosRequestConfig, + configuration?: Configuration, +): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> => { + const localVarAxiosArgs = await friendshipPostAxiosParamCreator(sendFriendshipRequestDto, options, configuration) + return createRequestFunction(localVarAxiosArgs, globalAxios, configuration) +} +/** + * 나에게 온 친구 요청 전체 개수 / 아직 확인하지 않은 개수를 조회합니다. + * @summary 나에게 온 친구 요청 개수 조회 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +const friendshipReceivedCountGetFp = async ( + options?: AxiosRequestConfig, + configuration?: Configuration, +): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> => { + const localVarAxiosArgs = await friendshipReceivedCountGetAxiosParamCreator(options, configuration) + return createRequestFunction(localVarAxiosArgs, globalAxios, configuration) +} +/** + * friendshipId를 받아 해당 friendship 레코드를 삭제합니다. + * @summary 받은 친구 요청 거절하기 + * @param {number} friendshipId 해당 친구 요청에 대한 friendship id + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +const friendshipReceivedFriendshipIdDeleteFp = async ( + friendshipId: number, + options?: AxiosRequestConfig, + configuration?: Configuration, +): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> => { + const localVarAxiosArgs = await friendshipReceivedFriendshipIdDeleteAxiosParamCreator( + friendshipId, + options, + configuration, + ) + return createRequestFunction(localVarAxiosArgs, globalAxios, configuration) +} +/** + * friendshipId를 받아 해당 friendship 레코드의 areWeFriend column을 true로 업데이트합니다. + * @summary 받은 친구 요청 수락하기 + * @param {number} friendshipId 해당 친구 요청에 대한 friendship id + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +const friendshipReceivedFriendshipIdPatchFp = async ( + friendshipId: number, + options?: AxiosRequestConfig, + configuration?: Configuration, +): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> => { + const localVarAxiosArgs = await friendshipReceivedFriendshipIdPatchAxiosParamCreator( + friendshipId, + options, + configuration, + ) + return createRequestFunction(localVarAxiosArgs, globalAxios, configuration) +} +/** + * 나에게 친구 요청을 보낸 유저 목록을 조회합니다. + * @summary 나에게 친구 요청을 보낸 유저 목록 조회 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +const friendshipReceivedGetFp = async ( + options?: AxiosRequestConfig, + configuration?: Configuration, +): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> => { + const localVarAxiosArgs = await friendshipReceivedGetAxiosParamCreator(options, configuration) + return createRequestFunction(localVarAxiosArgs, globalAxios, configuration) +} +/** + * username(친구 추가용 id)를 query로 받아 해당하는 유저를 검색합니다. 검색 결과가 없는 경우 null을 반환합니다. + * @summary 친구 추가를 위한 유저 검색 + * @param {any} username 친구 추가용 id + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +const friendshipSearchUserGetFp = async ( + username: any, + options?: AxiosRequestConfig, + configuration?: Configuration, +): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> => { + const localVarAxiosArgs = await friendshipSearchUserGetAxiosParamCreator(username, options, configuration) + return createRequestFunction(localVarAxiosArgs, globalAxios, configuration) +} +/** + * friendshipId를 받아 해당 friendship 레코드를 삭제합니다. + * @summary 보낸 친구 요청 취소하기 + * @param {number} friendshipId 해당 친구 요청에 대한 friendship id + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +const friendshipSentFriendshipIdDeleteFp = async ( + friendshipId: number, + options?: AxiosRequestConfig, + configuration?: Configuration, +): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> => { + const localVarAxiosArgs = await friendshipSentFriendshipIdDeleteAxiosParamCreator( + friendshipId, + options, + configuration, + ) + return createRequestFunction(localVarAxiosArgs, globalAxios, configuration) +} +/** + * 내가 친구 요청을 보낸 유저 목록을 조회합니다. + * @summary 내가 친구 요청을 보낸 유저 목록 조회 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +const friendshipSentGetFp = async ( + options?: AxiosRequestConfig, + configuration?: Configuration, +): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> => { + const localVarAxiosArgs = await friendshipSentGetAxiosParamCreator(options, configuration) + return createRequestFunction(localVarAxiosArgs, globalAxios, configuration) +} + +/** + * FriendshipApi - factory interface + * @export + */ + +export type FriendshipFriendTimetableGetRequestParams = { + username: string + year: string + semester: string + options?: any +} + +/** + * 친구 ID, 연도, 학기를 입력받아 해당 학기에 친구의 대표 시간표를 조회합니다. + * @summary 친구 시간표 조회 + * @param {string} username 친구 추가용 ID (username) + * @param {string} year 연도 + * @param {string} semester 학기 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +export const friendshipFriendTimetableGet = ({ + configuration, + basePath, + axios, +}: { + configuration?: Configuration + basePath?: string + axios?: AxiosInstance +}) => { + return (params: FriendshipFriendTimetableGetRequestParams): AxiosPromise> => { + return friendshipFriendTimetableGetFp( + params.username, + params.year, + params.semester, + params.options, + configuration, + ).then(request => request(axios, basePath)) + } +} + +export type FriendshipFriendshipIdDeleteRequestParams = { + friendshipId: number + options?: any +} + +/** + * 이미 친구로 등록된 유저에 대해, friendshipId를 받아 해당 friendship 레코드를 삭제합니다. + * @summary 친구 삭제하기 + * @param {number} friendshipId 해당 친구 관계에 대한 friendship id + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +export const friendshipFriendshipIdDelete = ({ + configuration, + basePath, + axios, +}: { + configuration?: Configuration + basePath?: string + axios?: AxiosInstance +}) => { + return (params: FriendshipFriendshipIdDeleteRequestParams): AxiosPromise => { + return friendshipFriendshipIdDeleteFp(params.friendshipId, params.options, configuration).then(request => + request(axios, basePath), + ) + } +} + +export type FriendshipGetRequestParams = { + keyword?: string + options?: any +} + +/** + * 전체 친구 목록을 조회하거나, keyword를 query로 받아 친구 목록을 필터링하여 조회합니다. + * @summary 친구 목록 조회 + * @param {string} [keyword] 검색 키워드 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +export const friendshipGet = ({ + configuration, + basePath, + axios, +}: { + configuration?: Configuration + basePath?: string + axios?: AxiosInstance +}) => { + return (params: FriendshipGetRequestParams): AxiosPromise> => { + return friendshipGetFp(params.keyword, params.options, configuration).then(request => request(axios, basePath)) + } +} + +export type FriendshipPostRequestParams = { + sendFriendshipRequestDto: SendFriendshipRequestDto + options?: any +} + +/** + * 검색된 유저에게 친구 요청을 보냅니다. friendship 레코드가 새로 생성됩니다. + * @summary 친구 요청 보내기 + * @param {SendFriendshipRequestDto} sendFriendshipRequestDto + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +export const friendshipPost = ({ + configuration, + basePath, + axios, +}: { + configuration?: Configuration + basePath?: string + axios?: AxiosInstance +}) => { + return (params: FriendshipPostRequestParams): AxiosPromise => { + return friendshipPostFp(params.sendFriendshipRequestDto, params.options, configuration).then(request => + request(axios, basePath), + ) + } +} + +export type FriendshipReceivedCountGetRequestParams = { + options?: any +} + +/** + * 나에게 온 친구 요청 전체 개수 / 아직 확인하지 않은 개수를 조회합니다. + * @summary 나에게 온 친구 요청 개수 조회 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +export const friendshipReceivedCountGet = ({ + configuration, + basePath, + axios, +}: { + configuration?: Configuration + basePath?: string + axios?: AxiosInstance +}) => { + return (params?: { options?: any }): AxiosPromise => { + return friendshipReceivedCountGetFp(params?.options, configuration).then(request => request(axios, basePath)) + } +} + +export type FriendshipReceivedFriendshipIdDeleteRequestParams = { + friendshipId: number + options?: any +} + +/** + * friendshipId를 받아 해당 friendship 레코드를 삭제합니다. + * @summary 받은 친구 요청 거절하기 + * @param {number} friendshipId 해당 친구 요청에 대한 friendship id + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +export const friendshipReceivedFriendshipIdDelete = ({ + configuration, + basePath, + axios, +}: { + configuration?: Configuration + basePath?: string + axios?: AxiosInstance +}) => { + return (params: FriendshipReceivedFriendshipIdDeleteRequestParams): AxiosPromise => { + return friendshipReceivedFriendshipIdDeleteFp(params.friendshipId, params.options, configuration).then(request => + request(axios, basePath), + ) + } +} + +export type FriendshipReceivedFriendshipIdPatchRequestParams = { + friendshipId: number + options?: any +} + +/** + * friendshipId를 받아 해당 friendship 레코드의 areWeFriend column을 true로 업데이트합니다. + * @summary 받은 친구 요청 수락하기 + * @param {number} friendshipId 해당 친구 요청에 대한 friendship id + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +export const friendshipReceivedFriendshipIdPatch = ({ + configuration, + basePath, + axios, +}: { + configuration?: Configuration + basePath?: string + axios?: AxiosInstance +}) => { + return (params: FriendshipReceivedFriendshipIdPatchRequestParams): AxiosPromise => { + return friendshipReceivedFriendshipIdPatchFp(params.friendshipId, params.options, configuration).then(request => + request(axios, basePath), + ) + } +} + +export type FriendshipReceivedGetRequestParams = { + options?: any +} + +/** + * 나에게 친구 요청을 보낸 유저 목록을 조회합니다. + * @summary 나에게 친구 요청을 보낸 유저 목록 조회 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +export const friendshipReceivedGet = ({ + configuration, + basePath, + axios, +}: { + configuration?: Configuration + basePath?: string + axios?: AxiosInstance +}) => { + return (params?: { options?: any }): AxiosPromise> => { + return friendshipReceivedGetFp(params?.options, configuration).then(request => request(axios, basePath)) + } +} + +export type FriendshipSearchUserGetRequestParams = { + username: any + options?: any +} + +/** + * username(친구 추가용 id)를 query로 받아 해당하는 유저를 검색합니다. 검색 결과가 없는 경우 null을 반환합니다. + * @summary 친구 추가를 위한 유저 검색 + * @param {any} username 친구 추가용 id + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +export const friendshipSearchUserGet = ({ + configuration, + basePath, + axios, +}: { + configuration?: Configuration + basePath?: string + axios?: AxiosInstance +}) => { + return (params: FriendshipSearchUserGetRequestParams): AxiosPromise => { + return friendshipSearchUserGetFp(params.username, params.options, configuration).then(request => + request(axios, basePath), + ) + } +} + +export type FriendshipSentFriendshipIdDeleteRequestParams = { + friendshipId: number + options?: any +} + +/** + * friendshipId를 받아 해당 friendship 레코드를 삭제합니다. + * @summary 보낸 친구 요청 취소하기 + * @param {number} friendshipId 해당 친구 요청에 대한 friendship id + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +export const friendshipSentFriendshipIdDelete = ({ + configuration, + basePath, + axios, +}: { + configuration?: Configuration + basePath?: string + axios?: AxiosInstance +}) => { + return (params: FriendshipSentFriendshipIdDeleteRequestParams): AxiosPromise => { + return friendshipSentFriendshipIdDeleteFp(params.friendshipId, params.options, configuration).then(request => + request(axios, basePath), + ) + } +} + +export type FriendshipSentGetRequestParams = { + options?: any +} + +/** + * 내가 친구 요청을 보낸 유저 목록을 조회합니다. + * @summary 내가 친구 요청을 보낸 유저 목록 조회 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +export const friendshipSentGet = ({ + configuration, + basePath, + axios, +}: { + configuration?: Configuration + basePath?: string + axios?: AxiosInstance +}) => { + return (params?: { options?: any }): AxiosPromise> => { + return friendshipSentGetFp(params?.options, configuration).then(request => request(axios, basePath)) + } +} diff --git a/packages/api/ku-key/api/notice-api.ts b/packages/api/ku-key/api/notice-api.ts new file mode 100644 index 00000000..4693b685 --- /dev/null +++ b/packages/api/ku-key/api/notice-api.ts @@ -0,0 +1,269 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * KU-KEY API + * API for KU-KEY service + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import globalAxios, { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios' +import { Configuration } from '../configuration' +// Some imports not used depending on template conditions +// @ts-ignore +import { DUMMY_BASE_URL, assertParamExists, setSearchParams, toPathString, createRequestFunction } from '../common' +// @ts-ignore +import { COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from '../base' + +// @ts-ignore +import { GetNoticeResponseDto } from '../models' +/** + * NoticeApi - axios parameter creator + * @export + */ +/** + * 받았던 알림들을 조회합니다. 커뮤니티 관련 알림일 경우 해당 게시글의 Id를 함께 반환합니다. + * @summary 알림 조회 + * @param {number} [take] 한 페이지에 담을 데이터 수, default = 10 + * @param {string} [cursor] 커서 값, 14자리 숫자로 이루어진 문자열, 없으면 첫페이지 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +const noticeGetAxiosParamCreator = async ( + take?: number, + cursor?: string, + options: AxiosRequestConfig = {}, + configuration?: Configuration, +): Promise => { + const localVarPath = `/notice` + // 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 + if (take !== undefined) { + localVarQueryParameter['take'] = take + } + + if (cursor !== undefined) { + localVarQueryParameter['cursor'] = cursor + } + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } +} +/** + * SSE를 통해 서버에서 넘겨주는 알림을 연결합니다. + * @summary 알림 연결 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +const noticeSseGetAxiosParamCreator = async ( + options: AxiosRequestConfig = {}, + configuration?: Configuration, +): Promise => { + const localVarPath = `/notice/sse` + // 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 + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } +} +/** + * SSE를 통해 서버에서 넘겨주는 알림을 연결합니다. (access토큰 만료됨에 따라 연결이 끊길 경우 사용) + * @summary 알림 연결 + * @param {number} userId + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +const noticeSseUserIdGetAxiosParamCreator = async ( + userId: number, + options: AxiosRequestConfig = {}, + configuration?: Configuration, +): Promise => { + const localVarPath = `/notice/sse/{userId}`.replace(`{${'userId'}}`, encodeURIComponent(String(userId))) + // 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 + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } +} + +/** + * NoticeApi - functional programming interface + * @export + */ +/** + * 받았던 알림들을 조회합니다. 커뮤니티 관련 알림일 경우 해당 게시글의 Id를 함께 반환합니다. + * @summary 알림 조회 + * @param {number} [take] 한 페이지에 담을 데이터 수, default = 10 + * @param {string} [cursor] 커서 값, 14자리 숫자로 이루어진 문자열, 없으면 첫페이지 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +const noticeGetFp = async ( + take?: number, + cursor?: string, + options?: AxiosRequestConfig, + configuration?: Configuration, +): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> => { + const localVarAxiosArgs = await noticeGetAxiosParamCreator(take, cursor, options, configuration) + return createRequestFunction(localVarAxiosArgs, globalAxios, configuration) +} +/** + * SSE를 통해 서버에서 넘겨주는 알림을 연결합니다. + * @summary 알림 연결 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +const noticeSseGetFp = async ( + options?: AxiosRequestConfig, + configuration?: Configuration, +): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> => { + const localVarAxiosArgs = await noticeSseGetAxiosParamCreator(options, configuration) + return createRequestFunction(localVarAxiosArgs, globalAxios, configuration) +} +/** + * SSE를 통해 서버에서 넘겨주는 알림을 연결합니다. (access토큰 만료됨에 따라 연결이 끊길 경우 사용) + * @summary 알림 연결 + * @param {number} userId + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +const noticeSseUserIdGetFp = async ( + userId: number, + options?: AxiosRequestConfig, + configuration?: Configuration, +): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> => { + const localVarAxiosArgs = await noticeSseUserIdGetAxiosParamCreator(userId, options, configuration) + return createRequestFunction(localVarAxiosArgs, globalAxios, configuration) +} + +/** + * NoticeApi - factory interface + * @export + */ + +export type NoticeGetRequestParams = { + take?: number + cursor?: string + options?: any +} + +/** + * 받았던 알림들을 조회합니다. 커뮤니티 관련 알림일 경우 해당 게시글의 Id를 함께 반환합니다. + * @summary 알림 조회 + * @param {number} [take] 한 페이지에 담을 데이터 수, default = 10 + * @param {string} [cursor] 커서 값, 14자리 숫자로 이루어진 문자열, 없으면 첫페이지 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +export const noticeGet = ({ + configuration, + basePath, + axios, +}: { + configuration?: Configuration + basePath?: string + axios?: AxiosInstance +}) => { + return (params: NoticeGetRequestParams): AxiosPromise => { + return noticeGetFp(params.take, params.cursor, params.options, configuration).then(request => + request(axios, basePath), + ) + } +} + +export type NoticeSseGetRequestParams = { + options?: any +} + +/** + * SSE를 통해 서버에서 넘겨주는 알림을 연결합니다. + * @summary 알림 연결 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +export const noticeSseGet = ({ + configuration, + basePath, + axios, +}: { + configuration?: Configuration + basePath?: string + axios?: AxiosInstance +}) => { + return (params?: { options?: any }): AxiosPromise => { + return noticeSseGetFp(params?.options, configuration).then(request => request(axios, basePath)) + } +} + +export type NoticeSseUserIdGetRequestParams = { + userId: number + options?: any +} + +/** + * SSE를 통해 서버에서 넘겨주는 알림을 연결합니다. (access토큰 만료됨에 따라 연결이 끊길 경우 사용) + * @summary 알림 연결 + * @param {number} userId + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +export const noticeSseUserIdGet = ({ + configuration, + basePath, + axios, +}: { + configuration?: Configuration + basePath?: string + axios?: AxiosInstance +}) => { + return (params: NoticeSseUserIdGetRequestParams): AxiosPromise => { + return noticeSseUserIdGetFp(params.userId, params.options, configuration).then(request => request(axios, basePath)) + } +} diff --git a/packages/api/ku-key/api/post-api.ts b/packages/api/ku-key/api/post-api.ts new file mode 100644 index 00000000..a674a19d --- /dev/null +++ b/packages/api/ku-key/api/post-api.ts @@ -0,0 +1,1211 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * KU-KEY API + * API for KU-KEY service + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import globalAxios, { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios' +import { Configuration } from '../configuration' +// Some imports not used depending on template conditions +// @ts-ignore +import { DUMMY_BASE_URL, assertParamExists, setSearchParams, toPathString, createRequestFunction } from '../common' +// @ts-ignore +import { COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from '../base' + +// @ts-ignore +import { DeletePostResponseDto } from '../models' +// @ts-ignore +import { GetPostListResponseDto } from '../models' +// @ts-ignore +import { GetPostListWithBoardResponseDto } from '../models' +// @ts-ignore +import { GetPostResponseDto } from '../models' +// @ts-ignore +import { ReactPostRequestDto } from '../models' +// @ts-ignore +import { ReactPostResponseDto } from '../models' +// @ts-ignore +import { ScrapPostResponseDto } from '../models' +/** + * PostApi - axios parameter creator + * @export + */ +/** + * 전체 게시글 목록을 조회합니다. + * @summary 전체 게시글 목록 조회 + * @param {number} [take] 한 페이지에 담을 데이터 수, default = 10 + * @param {string} [cursor] 커서 값, 14자리 숫자로 이루어진 문자열, 없으면 첫페이지 + * @param {string} [keyword] 검색어, 없으면 전체 조회 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +const postAllGetAxiosParamCreator = async ( + take?: number, + cursor?: string, + keyword?: string, + options: AxiosRequestConfig = {}, + configuration?: Configuration, +): Promise => { + const localVarPath = `/post/all` + // 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 + if (take !== undefined) { + localVarQueryParameter['take'] = take + } + + if (cursor !== undefined) { + localVarQueryParameter['cursor'] = cursor + } + + if (keyword !== undefined) { + localVarQueryParameter['keyword'] = keyword + } + + 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} boardId 게시판 고유 Id, 1: 자유게시판, 2: 질문게시판, 3: 정보게시판 + * @param {number} [take] 한 페이지에 담을 데이터 수, default = 10 + * @param {string} [cursor] 커서 값, 14자리 숫자로 이루어진 문자열, 없으면 첫페이지 + * @param {string} [keyword] 검색어, 없으면 전체 조회 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +const postGetAxiosParamCreator = async ( + boardId: number, + take?: number, + cursor?: string, + keyword?: string, + options: AxiosRequestConfig = {}, + configuration?: Configuration, +): Promise => { + const localVarPath = `/post` + // 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 + if (take !== undefined) { + localVarQueryParameter['take'] = take + } + + if (cursor !== undefined) { + localVarQueryParameter['cursor'] = cursor + } + + if (boardId !== undefined) { + localVarQueryParameter['boardId'] = boardId + } + + if (keyword !== undefined) { + localVarQueryParameter['keyword'] = keyword + } + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } +} +/** + * hot 게시글 목록을 조회합니다. + * @summary hot 게시글 목록 조회 + * @param {number} [take] 한 페이지에 담을 데이터 수, default = 10 + * @param {string} [cursor] 커서 값, 14자리 숫자로 이루어진 문자열, 없으면 첫페이지 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +const postHotGetAxiosParamCreator = async ( + take?: number, + cursor?: string, + options: AxiosRequestConfig = {}, + configuration?: Configuration, +): Promise => { + const localVarPath = `/post/hot` + // 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 + if (take !== undefined) { + localVarQueryParameter['take'] = take + } + + if (cursor !== undefined) { + localVarQueryParameter['cursor'] = cursor + } + + 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} [take] 한 페이지에 담을 데이터 수, default = 10 + * @param {string} [cursor] 커서 값, 14자리 숫자로 이루어진 문자열, 없으면 첫페이지 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +const postMyGetAxiosParamCreator = async ( + take?: number, + cursor?: string, + options: AxiosRequestConfig = {}, + configuration?: Configuration, +): Promise => { + const localVarPath = `/post/my` + // 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 + if (take !== undefined) { + localVarQueryParameter['take'] = take + } + + if (cursor !== undefined) { + localVarQueryParameter['cursor'] = cursor + } + + 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} boardId 게시글을 생성하고자 하는 게시판 ID + * @param {string} title 게시글 제목 + * @param {string} content 게시글 내용 + * @param {boolean} isAnonymous 익명 여부 + * @param {Array} [images] 첨부 이미지 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +const postPostAxiosParamCreator = async ( + boardId: number, + title: string, + content: string, + isAnonymous: boolean, + images?: Array, + options: AxiosRequestConfig = {}, + configuration?: Configuration, +): Promise => { + const localVarPath = `/post` + // 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 + const localVarFormParams = new ((configuration && configuration.formDataCtor) || FormData)() + if (boardId !== undefined) { + localVarQueryParameter['boardId'] = boardId + } + + if (title !== undefined) { + localVarFormParams.append('title', title as any) + } + + if (content !== undefined) { + localVarFormParams.append('content', content as any) + } + + if (isAnonymous !== undefined) { + localVarFormParams.append('isAnonymous', isAnonymous as any) + } + if (images) { + images.forEach(element => { + localVarFormParams.append('images', element as any) + }) + } + + localVarHeaderParameter['Content-Type'] = 'multipart/form-data' + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers } + localVarRequestOptions.data = localVarFormParams + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } +} +/** + * 게시글을 삭제합니다. + * @summary 게시글 삭제 + * @param {number} postId 게시글의 고유 ID + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +const postPostIdDeleteAxiosParamCreator = async ( + postId: number, + options: AxiosRequestConfig = {}, + configuration?: Configuration, +): Promise => { + const localVarPath = `/post/{postId}`.replace(`{${'postId'}}`, encodeURIComponent(String(postId))) + // 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: 'DELETE', ...baseOptions, ...options } + const localVarHeaderParameter = {} as any + const localVarQueryParameter = {} as any + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } +} +/** + * 게시글 내용을 조회합니다. + * @summary 게시글 조회 + * @param {number} postId 게시글의 고유 ID + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +const postPostIdGetAxiosParamCreator = async ( + postId: number, + options: AxiosRequestConfig = {}, + configuration?: Configuration, +): Promise => { + const localVarPath = `/post/{postId}`.replace(`{${'postId'}}`, encodeURIComponent(String(postId))) + // 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 + + 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} postId 게시글의 고유 ID + * @param {string} title 게시글 제목 + * @param {string} content 게시글 내용 + * @param {boolean} isAnonymous 익명 여부 + * @param {boolean} imageUpdate 첨부 이미지 변경 여부 + * @param {Array} [images] 첨부 이미지 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +const postPostIdPatchAxiosParamCreator = async ( + postId: number, + title: string, + content: string, + isAnonymous: boolean, + imageUpdate: boolean, + images?: Array, + options: AxiosRequestConfig = {}, + configuration?: Configuration, +): Promise => { + const localVarPath = `/post/{postId}`.replace(`{${'postId'}}`, encodeURIComponent(String(postId))) + // 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: 'PATCH', ...baseOptions, ...options } + const localVarHeaderParameter = {} as any + const localVarQueryParameter = {} as any + const localVarFormParams = new ((configuration && configuration.formDataCtor) || FormData)() + + if (title !== undefined) { + localVarFormParams.append('title', title as any) + } + + if (content !== undefined) { + localVarFormParams.append('content', content as any) + } + + if (isAnonymous !== undefined) { + localVarFormParams.append('isAnonymous', isAnonymous as any) + } + if (images) { + images.forEach(element => { + localVarFormParams.append('images', element as any) + }) + } + + if (imageUpdate !== undefined) { + localVarFormParams.append('imageUpdate', imageUpdate as any) + } + + localVarHeaderParameter['Content-Type'] = 'multipart/form-data' + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers } + localVarRequestOptions.data = localVarFormParams + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } +} +/** + * 게시글에 반응을 남깁니다. 만일 이미 반응을 남긴 게시글이라면 반응을 변경합니다. + * @summary 게시글 반응 + * @param {number} postId 게시글의 고유 ID + * @param {ReactPostRequestDto} reactPostRequestDto + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +const postPostIdReactionPostAxiosParamCreator = async ( + postId: number, + reactPostRequestDto: ReactPostRequestDto, + options: AxiosRequestConfig = {}, + configuration?: Configuration, +): Promise => { + const localVarPath = `/post/{postId}/reaction`.replace(`{${'postId'}}`, encodeURIComponent(String(postId))) + // 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 + + localVarHeaderParameter['Content-Type'] = 'application/json' + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers } + localVarRequestOptions.data = reactPostRequestDto || undefined + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } +} +/** + * 게시글을 스크랩합니다. 만일 이미 스크랩한 게시글이라면 스크랩을 취소합니다. + * @summary 게시글 스크랩 + * @param {number} postId 게시글의 고유 ID + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +const postPostIdScrapPostAxiosParamCreator = async ( + postId: number, + options: AxiosRequestConfig = {}, + configuration?: Configuration, +): Promise => { + const localVarPath = `/post/{postId}/scrap`.replace(`{${'postId'}}`, encodeURIComponent(String(postId))) + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL) + let baseOptions + if (configuration) { + baseOptions = configuration.baseOptions + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options } + const localVarHeaderParameter = {} as any + const localVarQueryParameter = {} as any + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } +} +/** + * 반응을 남긴 글 목록을 조회합니다. + * @summary 반응 남긴 글 목록 조회 + * @param {number} [take] 한 페이지에 담을 데이터 수, default = 10 + * @param {string} [cursor] 커서 값, 14자리 숫자로 이루어진 문자열, 없으면 첫페이지 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +const postReactGetAxiosParamCreator = async ( + take?: number, + cursor?: string, + options: AxiosRequestConfig = {}, + configuration?: Configuration, +): Promise => { + const localVarPath = `/post/react` + // 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 + if (take !== undefined) { + localVarQueryParameter['take'] = take + } + + if (cursor !== undefined) { + localVarQueryParameter['cursor'] = cursor + } + + 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} [take] 한 페이지에 담을 데이터 수, default = 10 + * @param {string} [cursor] 커서 값, 14자리 숫자로 이루어진 문자열, 없으면 첫페이지 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +const postScrapGetAxiosParamCreator = async ( + take?: number, + cursor?: string, + options: AxiosRequestConfig = {}, + configuration?: Configuration, +): Promise => { + const localVarPath = `/post/scrap` + // 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 + if (take !== undefined) { + localVarQueryParameter['take'] = take + } + + if (cursor !== undefined) { + localVarQueryParameter['cursor'] = cursor + } + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } +} + +/** + * PostApi - functional programming interface + * @export + */ +/** + * 전체 게시글 목록을 조회합니다. + * @summary 전체 게시글 목록 조회 + * @param {number} [take] 한 페이지에 담을 데이터 수, default = 10 + * @param {string} [cursor] 커서 값, 14자리 숫자로 이루어진 문자열, 없으면 첫페이지 + * @param {string} [keyword] 검색어, 없으면 전체 조회 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +const postAllGetFp = async ( + take?: number, + cursor?: string, + keyword?: string, + options?: AxiosRequestConfig, + configuration?: Configuration, +): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> => { + const localVarAxiosArgs = await postAllGetAxiosParamCreator(take, cursor, keyword, options, configuration) + return createRequestFunction(localVarAxiosArgs, globalAxios, configuration) +} +/** + * 게시판 별로 게시글 목록을 조회합니다. + * @summary 게시판 별 게시글 목록 조회 + * @param {number} boardId 게시판 고유 Id, 1: 자유게시판, 2: 질문게시판, 3: 정보게시판 + * @param {number} [take] 한 페이지에 담을 데이터 수, default = 10 + * @param {string} [cursor] 커서 값, 14자리 숫자로 이루어진 문자열, 없으면 첫페이지 + * @param {string} [keyword] 검색어, 없으면 전체 조회 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +const postGetFp = async ( + boardId: number, + take?: number, + cursor?: string, + keyword?: string, + options?: AxiosRequestConfig, + configuration?: Configuration, +): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> => { + const localVarAxiosArgs = await postGetAxiosParamCreator(boardId, take, cursor, keyword, options, configuration) + return createRequestFunction(localVarAxiosArgs, globalAxios, configuration) +} +/** + * hot 게시글 목록을 조회합니다. + * @summary hot 게시글 목록 조회 + * @param {number} [take] 한 페이지에 담을 데이터 수, default = 10 + * @param {string} [cursor] 커서 값, 14자리 숫자로 이루어진 문자열, 없으면 첫페이지 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +const postHotGetFp = async ( + take?: number, + cursor?: string, + options?: AxiosRequestConfig, + configuration?: Configuration, +): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> => { + const localVarAxiosArgs = await postHotGetAxiosParamCreator(take, cursor, options, configuration) + return createRequestFunction(localVarAxiosArgs, globalAxios, configuration) +} +/** + * 내가 쓴 글 목록을 조회합니다. + * @summary 내가 쓴 글 목록 조회 + * @param {number} [take] 한 페이지에 담을 데이터 수, default = 10 + * @param {string} [cursor] 커서 값, 14자리 숫자로 이루어진 문자열, 없으면 첫페이지 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +const postMyGetFp = async ( + take?: number, + cursor?: string, + options?: AxiosRequestConfig, + configuration?: Configuration, +): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> => { + const localVarAxiosArgs = await postMyGetAxiosParamCreator(take, cursor, options, configuration) + return createRequestFunction(localVarAxiosArgs, globalAxios, configuration) +} +/** + * 게시글을 생성합니다. + * @summary 게시글 생성 + * @param {number} boardId 게시글을 생성하고자 하는 게시판 ID + * @param {string} title 게시글 제목 + * @param {string} content 게시글 내용 + * @param {boolean} isAnonymous 익명 여부 + * @param {Array} [images] 첨부 이미지 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +const postPostFp = async ( + boardId: number, + title: string, + content: string, + isAnonymous: boolean, + images?: Array, + options?: AxiosRequestConfig, + configuration?: Configuration, +): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> => { + const localVarAxiosArgs = await postPostAxiosParamCreator( + boardId, + title, + content, + isAnonymous, + images, + options, + configuration, + ) + return createRequestFunction(localVarAxiosArgs, globalAxios, configuration) +} +/** + * 게시글을 삭제합니다. + * @summary 게시글 삭제 + * @param {number} postId 게시글의 고유 ID + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +const postPostIdDeleteFp = async ( + postId: number, + options?: AxiosRequestConfig, + configuration?: Configuration, +): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> => { + const localVarAxiosArgs = await postPostIdDeleteAxiosParamCreator(postId, options, configuration) + return createRequestFunction(localVarAxiosArgs, globalAxios, configuration) +} +/** + * 게시글 내용을 조회합니다. + * @summary 게시글 조회 + * @param {number} postId 게시글의 고유 ID + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +const postPostIdGetFp = async ( + postId: number, + options?: AxiosRequestConfig, + configuration?: Configuration, +): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> => { + const localVarAxiosArgs = await postPostIdGetAxiosParamCreator(postId, options, configuration) + return createRequestFunction(localVarAxiosArgs, globalAxios, configuration) +} +/** + * 게시글을 수정합니다. + * @summary 게시글 수정 + * @param {number} postId 게시글의 고유 ID + * @param {string} title 게시글 제목 + * @param {string} content 게시글 내용 + * @param {boolean} isAnonymous 익명 여부 + * @param {boolean} imageUpdate 첨부 이미지 변경 여부 + * @param {Array} [images] 첨부 이미지 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +const postPostIdPatchFp = async ( + postId: number, + title: string, + content: string, + isAnonymous: boolean, + imageUpdate: boolean, + images?: Array, + options?: AxiosRequestConfig, + configuration?: Configuration, +): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> => { + const localVarAxiosArgs = await postPostIdPatchAxiosParamCreator( + postId, + title, + content, + isAnonymous, + imageUpdate, + images, + options, + configuration, + ) + return createRequestFunction(localVarAxiosArgs, globalAxios, configuration) +} +/** + * 게시글에 반응을 남깁니다. 만일 이미 반응을 남긴 게시글이라면 반응을 변경합니다. + * @summary 게시글 반응 + * @param {number} postId 게시글의 고유 ID + * @param {ReactPostRequestDto} reactPostRequestDto + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +const postPostIdReactionPostFp = async ( + postId: number, + reactPostRequestDto: ReactPostRequestDto, + options?: AxiosRequestConfig, + configuration?: Configuration, +): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> => { + const localVarAxiosArgs = await postPostIdReactionPostAxiosParamCreator( + postId, + reactPostRequestDto, + options, + configuration, + ) + return createRequestFunction(localVarAxiosArgs, globalAxios, configuration) +} +/** + * 게시글을 스크랩합니다. 만일 이미 스크랩한 게시글이라면 스크랩을 취소합니다. + * @summary 게시글 스크랩 + * @param {number} postId 게시글의 고유 ID + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +const postPostIdScrapPostFp = async ( + postId: number, + options?: AxiosRequestConfig, + configuration?: Configuration, +): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> => { + const localVarAxiosArgs = await postPostIdScrapPostAxiosParamCreator(postId, options, configuration) + return createRequestFunction(localVarAxiosArgs, globalAxios, configuration) +} +/** + * 반응을 남긴 글 목록을 조회합니다. + * @summary 반응 남긴 글 목록 조회 + * @param {number} [take] 한 페이지에 담을 데이터 수, default = 10 + * @param {string} [cursor] 커서 값, 14자리 숫자로 이루어진 문자열, 없으면 첫페이지 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +const postReactGetFp = async ( + take?: number, + cursor?: string, + options?: AxiosRequestConfig, + configuration?: Configuration, +): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> => { + const localVarAxiosArgs = await postReactGetAxiosParamCreator(take, cursor, options, configuration) + return createRequestFunction(localVarAxiosArgs, globalAxios, configuration) +} +/** + * 스크랩한 글 목록을 조회합니다. + * @summary 스크랩한 글 목록 조회 + * @param {number} [take] 한 페이지에 담을 데이터 수, default = 10 + * @param {string} [cursor] 커서 값, 14자리 숫자로 이루어진 문자열, 없으면 첫페이지 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +const postScrapGetFp = async ( + take?: number, + cursor?: string, + options?: AxiosRequestConfig, + configuration?: Configuration, +): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> => { + const localVarAxiosArgs = await postScrapGetAxiosParamCreator(take, cursor, options, configuration) + return createRequestFunction(localVarAxiosArgs, globalAxios, configuration) +} + +/** + * PostApi - factory interface + * @export + */ + +export type PostAllGetRequestParams = { + take?: number + cursor?: string + keyword?: string + options?: any +} + +/** + * 전체 게시글 목록을 조회합니다. + * @summary 전체 게시글 목록 조회 + * @param {number} [take] 한 페이지에 담을 데이터 수, default = 10 + * @param {string} [cursor] 커서 값, 14자리 숫자로 이루어진 문자열, 없으면 첫페이지 + * @param {string} [keyword] 검색어, 없으면 전체 조회 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +export const postAllGet = ({ + configuration, + basePath, + axios, +}: { + configuration?: Configuration + basePath?: string + axios?: AxiosInstance +}) => { + return (params: PostAllGetRequestParams): AxiosPromise => { + return postAllGetFp(params.take, params.cursor, params.keyword, params.options, configuration).then(request => + request(axios, basePath), + ) + } +} + +export type PostGetRequestParams = { + boardId: number + take?: number + cursor?: string + keyword?: string + options?: any +} + +/** + * 게시판 별로 게시글 목록을 조회합니다. + * @summary 게시판 별 게시글 목록 조회 + * @param {number} boardId 게시판 고유 Id, 1: 자유게시판, 2: 질문게시판, 3: 정보게시판 + * @param {number} [take] 한 페이지에 담을 데이터 수, default = 10 + * @param {string} [cursor] 커서 값, 14자리 숫자로 이루어진 문자열, 없으면 첫페이지 + * @param {string} [keyword] 검색어, 없으면 전체 조회 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +export const postGet = ({ + configuration, + basePath, + axios, +}: { + configuration?: Configuration + basePath?: string + axios?: AxiosInstance +}) => { + return (params: PostGetRequestParams): AxiosPromise => { + return postGetFp(params.boardId, params.take, params.cursor, params.keyword, params.options, configuration).then( + request => request(axios, basePath), + ) + } +} + +export type PostHotGetRequestParams = { + take?: number + cursor?: string + options?: any +} + +/** + * hot 게시글 목록을 조회합니다. + * @summary hot 게시글 목록 조회 + * @param {number} [take] 한 페이지에 담을 데이터 수, default = 10 + * @param {string} [cursor] 커서 값, 14자리 숫자로 이루어진 문자열, 없으면 첫페이지 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +export const postHotGet = ({ + configuration, + basePath, + axios, +}: { + configuration?: Configuration + basePath?: string + axios?: AxiosInstance +}) => { + return (params: PostHotGetRequestParams): AxiosPromise => { + return postHotGetFp(params.take, params.cursor, params.options, configuration).then(request => + request(axios, basePath), + ) + } +} + +export type PostMyGetRequestParams = { + take?: number + cursor?: string + options?: any +} + +/** + * 내가 쓴 글 목록을 조회합니다. + * @summary 내가 쓴 글 목록 조회 + * @param {number} [take] 한 페이지에 담을 데이터 수, default = 10 + * @param {string} [cursor] 커서 값, 14자리 숫자로 이루어진 문자열, 없으면 첫페이지 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +export const postMyGet = ({ + configuration, + basePath, + axios, +}: { + configuration?: Configuration + basePath?: string + axios?: AxiosInstance +}) => { + return (params: PostMyGetRequestParams): AxiosPromise => { + return postMyGetFp(params.take, params.cursor, params.options, configuration).then(request => + request(axios, basePath), + ) + } +} + +export type PostPostRequestParams = { + boardId: number + title: string + content: string + isAnonymous: boolean + images?: Array + options?: any +} + +/** + * 게시글을 생성합니다. + * @summary 게시글 생성 + * @param {number} boardId 게시글을 생성하고자 하는 게시판 ID + * @param {string} title 게시글 제목 + * @param {string} content 게시글 내용 + * @param {boolean} isAnonymous 익명 여부 + * @param {Array} [images] 첨부 이미지 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +export const postPost = ({ + configuration, + basePath, + axios, +}: { + configuration?: Configuration + basePath?: string + axios?: AxiosInstance +}) => { + return (params: PostPostRequestParams): AxiosPromise => { + return postPostFp( + params.boardId, + params.title, + params.content, + params.isAnonymous, + params.images, + params.options, + configuration, + ).then(request => request(axios, basePath)) + } +} + +export type PostPostIdDeleteRequestParams = { + postId: number + options?: any +} + +/** + * 게시글을 삭제합니다. + * @summary 게시글 삭제 + * @param {number} postId 게시글의 고유 ID + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +export const postPostIdDelete = ({ + configuration, + basePath, + axios, +}: { + configuration?: Configuration + basePath?: string + axios?: AxiosInstance +}) => { + return (params: PostPostIdDeleteRequestParams): AxiosPromise => { + return postPostIdDeleteFp(params.postId, params.options, configuration).then(request => request(axios, basePath)) + } +} + +export type PostPostIdGetRequestParams = { + postId: number + options?: any +} + +/** + * 게시글 내용을 조회합니다. + * @summary 게시글 조회 + * @param {number} postId 게시글의 고유 ID + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +export const postPostIdGet = ({ + configuration, + basePath, + axios, +}: { + configuration?: Configuration + basePath?: string + axios?: AxiosInstance +}) => { + return (params: PostPostIdGetRequestParams): AxiosPromise => { + return postPostIdGetFp(params.postId, params.options, configuration).then(request => request(axios, basePath)) + } +} + +export type PostPostIdPatchRequestParams = { + postId: number + title: string + content: string + isAnonymous: boolean + imageUpdate: boolean + images?: Array + options?: any +} + +/** + * 게시글을 수정합니다. + * @summary 게시글 수정 + * @param {number} postId 게시글의 고유 ID + * @param {string} title 게시글 제목 + * @param {string} content 게시글 내용 + * @param {boolean} isAnonymous 익명 여부 + * @param {boolean} imageUpdate 첨부 이미지 변경 여부 + * @param {Array} [images] 첨부 이미지 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +export const postPostIdPatch = ({ + configuration, + basePath, + axios, +}: { + configuration?: Configuration + basePath?: string + axios?: AxiosInstance +}) => { + return (params: PostPostIdPatchRequestParams): AxiosPromise => { + return postPostIdPatchFp( + params.postId, + params.title, + params.content, + params.isAnonymous, + params.imageUpdate, + params.images, + params.options, + configuration, + ).then(request => request(axios, basePath)) + } +} + +export type PostPostIdReactionPostRequestParams = { + postId: number + reactPostRequestDto: ReactPostRequestDto + options?: any +} + +/** + * 게시글에 반응을 남깁니다. 만일 이미 반응을 남긴 게시글이라면 반응을 변경합니다. + * @summary 게시글 반응 + * @param {number} postId 게시글의 고유 ID + * @param {ReactPostRequestDto} reactPostRequestDto + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +export const postPostIdReactionPost = ({ + configuration, + basePath, + axios, +}: { + configuration?: Configuration + basePath?: string + axios?: AxiosInstance +}) => { + return (params: PostPostIdReactionPostRequestParams): AxiosPromise => { + return postPostIdReactionPostFp(params.postId, params.reactPostRequestDto, params.options, configuration).then( + request => request(axios, basePath), + ) + } +} + +export type PostPostIdScrapPostRequestParams = { + postId: number + options?: any +} + +/** + * 게시글을 스크랩합니다. 만일 이미 스크랩한 게시글이라면 스크랩을 취소합니다. + * @summary 게시글 스크랩 + * @param {number} postId 게시글의 고유 ID + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +export const postPostIdScrapPost = ({ + configuration, + basePath, + axios, +}: { + configuration?: Configuration + basePath?: string + axios?: AxiosInstance +}) => { + return (params: PostPostIdScrapPostRequestParams): AxiosPromise => { + return postPostIdScrapPostFp(params.postId, params.options, configuration).then(request => request(axios, basePath)) + } +} + +export type PostReactGetRequestParams = { + take?: number + cursor?: string + options?: any +} + +/** + * 반응을 남긴 글 목록을 조회합니다. + * @summary 반응 남긴 글 목록 조회 + * @param {number} [take] 한 페이지에 담을 데이터 수, default = 10 + * @param {string} [cursor] 커서 값, 14자리 숫자로 이루어진 문자열, 없으면 첫페이지 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +export const postReactGet = ({ + configuration, + basePath, + axios, +}: { + configuration?: Configuration + basePath?: string + axios?: AxiosInstance +}) => { + return (params: PostReactGetRequestParams): AxiosPromise => { + return postReactGetFp(params.take, params.cursor, params.options, configuration).then(request => + request(axios, basePath), + ) + } +} + +export type PostScrapGetRequestParams = { + take?: number + cursor?: string + options?: any +} + +/** + * 스크랩한 글 목록을 조회합니다. + * @summary 스크랩한 글 목록 조회 + * @param {number} [take] 한 페이지에 담을 데이터 수, default = 10 + * @param {string} [cursor] 커서 값, 14자리 숫자로 이루어진 문자열, 없으면 첫페이지 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +export const postScrapGet = ({ + configuration, + basePath, + axios, +}: { + configuration?: Configuration + basePath?: string + axios?: AxiosInstance +}) => { + return (params: PostScrapGetRequestParams): AxiosPromise => { + return postScrapGetFp(params.take, params.cursor, params.options, configuration).then(request => + request(axios, basePath), + ) + } +} diff --git a/packages/api/ku-key/api/report-api.ts b/packages/api/ku-key/api/report-api.ts new file mode 100644 index 00000000..6425aa3c --- /dev/null +++ b/packages/api/ku-key/api/report-api.ts @@ -0,0 +1,436 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * KU-KEY API + * API for KU-KEY service + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import globalAxios, { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios' +import { Configuration } from '../configuration' +// Some imports not used depending on template conditions +// @ts-ignore +import { DUMMY_BASE_URL, assertParamExists, setSearchParams, toPathString, createRequestFunction } from '../common' +// @ts-ignore +import { COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from '../base' + +// @ts-ignore +import { AcceptReportRequestDto } from '../models' +// @ts-ignore +import { CreateReportRequestDto } from '../models' +// @ts-ignore +import { CreateReportResponseDto } from '../models' +// @ts-ignore +import { GetReportListResponseDto } from '../models' +// @ts-ignore +import { GetReportResponseDto } from '../models' +/** + * ReportApi - axios parameter creator + * @export + */ +/** + * 신고 목록을 조회합니다. + * @summary 신고 목록 조회 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +const reportGetAxiosParamCreator = async ( + options: AxiosRequestConfig = {}, + configuration?: Configuration, +): Promise => { + const localVarPath = `/report` + // 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 + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } +} +/** + * 신고를 생성합니다. + * @summary 신고 생성 + * @param {CreateReportRequestDto} createReportRequestDto + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +const reportPostAxiosParamCreator = async ( + createReportRequestDto: CreateReportRequestDto, + options: AxiosRequestConfig = {}, + configuration?: Configuration, +): Promise => { + const localVarPath = `/report` + // 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 + + localVarHeaderParameter['Content-Type'] = 'application/json' + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers } + localVarRequestOptions.data = createReportRequestDto || undefined + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } +} +/** + * 신고를 승인합니다. + * @summary 신고 승인 + * @param {number} reportId 신고 고유 ID + * @param {AcceptReportRequestDto} acceptReportRequestDto + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +const reportReportIdAcceptPostAxiosParamCreator = async ( + reportId: number, + acceptReportRequestDto: AcceptReportRequestDto, + options: AxiosRequestConfig = {}, + configuration?: Configuration, +): Promise => { + const localVarPath = `/report/{reportId}/accept`.replace(`{${'reportId'}}`, encodeURIComponent(String(reportId))) + // 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 + + localVarHeaderParameter['Content-Type'] = 'application/json' + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers } + localVarRequestOptions.data = acceptReportRequestDto || undefined + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } +} +/** + * 신고 세부내용을 조회합니다. + * @summary 신고 세부내용 조회 + * @param {number} reportId 신고 고유 ID + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +const reportReportIdGetAxiosParamCreator = async ( + reportId: number, + options: AxiosRequestConfig = {}, + configuration?: Configuration, +): Promise => { + const localVarPath = `/report/{reportId}`.replace(`{${'reportId'}}`, encodeURIComponent(String(reportId))) + // 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 + + 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} reportId 신고 고유 ID + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +const reportReportIdRejectPostAxiosParamCreator = async ( + reportId: number, + options: AxiosRequestConfig = {}, + configuration?: Configuration, +): Promise => { + const localVarPath = `/report/{reportId}/reject`.replace(`{${'reportId'}}`, encodeURIComponent(String(reportId))) + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL) + let baseOptions + if (configuration) { + baseOptions = configuration.baseOptions + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options } + const localVarHeaderParameter = {} as any + const localVarQueryParameter = {} as any + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } +} + +/** + * ReportApi - functional programming interface + * @export + */ +/** + * 신고 목록을 조회합니다. + * @summary 신고 목록 조회 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +const reportGetFp = async ( + options?: AxiosRequestConfig, + configuration?: Configuration, +): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> => { + const localVarAxiosArgs = await reportGetAxiosParamCreator(options, configuration) + return createRequestFunction(localVarAxiosArgs, globalAxios, configuration) +} +/** + * 신고를 생성합니다. + * @summary 신고 생성 + * @param {CreateReportRequestDto} createReportRequestDto + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +const reportPostFp = async ( + createReportRequestDto: CreateReportRequestDto, + options?: AxiosRequestConfig, + configuration?: Configuration, +): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> => { + const localVarAxiosArgs = await reportPostAxiosParamCreator(createReportRequestDto, options, configuration) + return createRequestFunction(localVarAxiosArgs, globalAxios, configuration) +} +/** + * 신고를 승인합니다. + * @summary 신고 승인 + * @param {number} reportId 신고 고유 ID + * @param {AcceptReportRequestDto} acceptReportRequestDto + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +const reportReportIdAcceptPostFp = async ( + reportId: number, + acceptReportRequestDto: AcceptReportRequestDto, + options?: AxiosRequestConfig, + configuration?: Configuration, +): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> => { + const localVarAxiosArgs = await reportReportIdAcceptPostAxiosParamCreator( + reportId, + acceptReportRequestDto, + options, + configuration, + ) + return createRequestFunction(localVarAxiosArgs, globalAxios, configuration) +} +/** + * 신고 세부내용을 조회합니다. + * @summary 신고 세부내용 조회 + * @param {number} reportId 신고 고유 ID + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +const reportReportIdGetFp = async ( + reportId: number, + options?: AxiosRequestConfig, + configuration?: Configuration, +): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> => { + const localVarAxiosArgs = await reportReportIdGetAxiosParamCreator(reportId, options, configuration) + return createRequestFunction(localVarAxiosArgs, globalAxios, configuration) +} +/** + * 신고를 거부합니다. + * @summary 신고 거부 + * @param {number} reportId 신고 고유 ID + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +const reportReportIdRejectPostFp = async ( + reportId: number, + options?: AxiosRequestConfig, + configuration?: Configuration, +): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> => { + const localVarAxiosArgs = await reportReportIdRejectPostAxiosParamCreator(reportId, options, configuration) + return createRequestFunction(localVarAxiosArgs, globalAxios, configuration) +} + +/** + * ReportApi - factory interface + * @export + */ + +export type ReportGetRequestParams = { + options?: any +} + +/** + * 신고 목록을 조회합니다. + * @summary 신고 목록 조회 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +export const reportGet = ({ + configuration, + basePath, + axios, +}: { + configuration?: Configuration + basePath?: string + axios?: AxiosInstance +}) => { + return (params?: { options?: any }): AxiosPromise> => { + return reportGetFp(params?.options, configuration).then(request => request(axios, basePath)) + } +} + +export type ReportPostRequestParams = { + createReportRequestDto: CreateReportRequestDto + options?: any +} + +/** + * 신고를 생성합니다. + * @summary 신고 생성 + * @param {CreateReportRequestDto} createReportRequestDto + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +export const reportPost = ({ + configuration, + basePath, + axios, +}: { + configuration?: Configuration + basePath?: string + axios?: AxiosInstance +}) => { + return (params: ReportPostRequestParams): AxiosPromise => { + return reportPostFp(params.createReportRequestDto, params.options, configuration).then(request => + request(axios, basePath), + ) + } +} + +export type ReportReportIdAcceptPostRequestParams = { + reportId: number + acceptReportRequestDto: AcceptReportRequestDto + options?: any +} + +/** + * 신고를 승인합니다. + * @summary 신고 승인 + * @param {number} reportId 신고 고유 ID + * @param {AcceptReportRequestDto} acceptReportRequestDto + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +export const reportReportIdAcceptPost = ({ + configuration, + basePath, + axios, +}: { + configuration?: Configuration + basePath?: string + axios?: AxiosInstance +}) => { + return (params: ReportReportIdAcceptPostRequestParams): AxiosPromise => { + return reportReportIdAcceptPostFp( + params.reportId, + params.acceptReportRequestDto, + params.options, + configuration, + ).then(request => request(axios, basePath)) + } +} + +export type ReportReportIdGetRequestParams = { + reportId: number + options?: any +} + +/** + * 신고 세부내용을 조회합니다. + * @summary 신고 세부내용 조회 + * @param {number} reportId 신고 고유 ID + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +export const reportReportIdGet = ({ + configuration, + basePath, + axios, +}: { + configuration?: Configuration + basePath?: string + axios?: AxiosInstance +}) => { + return (params: ReportReportIdGetRequestParams): AxiosPromise => { + return reportReportIdGetFp(params.reportId, params.options, configuration).then(request => request(axios, basePath)) + } +} + +export type ReportReportIdRejectPostRequestParams = { + reportId: number + options?: any +} + +/** + * 신고를 거부합니다. + * @summary 신고 거부 + * @param {number} reportId 신고 고유 ID + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +export const reportReportIdRejectPost = ({ + configuration, + basePath, + axios, +}: { + configuration?: Configuration + basePath?: string + axios?: AxiosInstance +}) => { + return (params: ReportReportIdRejectPostRequestParams): AxiosPromise => { + return reportReportIdRejectPostFp(params.reportId, params.options, configuration).then(request => + request(axios, basePath), + ) + } +} diff --git a/packages/api/ku-key/api/schedule-api.ts b/packages/api/ku-key/api/schedule-api.ts new file mode 100644 index 00000000..622cafc8 --- /dev/null +++ b/packages/api/ku-key/api/schedule-api.ts @@ -0,0 +1,294 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * KU-KEY API + * API for KU-KEY service + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import globalAxios, { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios' +import { Configuration } from '../configuration' +// Some imports not used depending on template conditions +// @ts-ignore +import { DUMMY_BASE_URL, assertParamExists, setSearchParams, toPathString, createRequestFunction } from '../common' +// @ts-ignore +import { COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from '../base' + +// @ts-ignore +import { CreateScheduleRequestDto } from '../models' +// @ts-ignore +import { CreateScheduleResponseDto } from '../models' +// @ts-ignore +import { DeleteScheduleResponseDto } from '../models' +// @ts-ignore +import { UpdateScheduleRequestDto } from '../models' +// @ts-ignore +import { UpdateScheduleResponseDto } from '../models' +/** + * ScheduleApi - axios parameter creator + * @export + */ +/** + * 시간표에 개인 스케쥴을 추가합니다. 해당 시간에 이미 등록된 개인 스케쥴이나 강의가 있을 경우 추가되지 않습니다. + * @summary 시간표에 개인 스케쥴 추가 + * @param {CreateScheduleRequestDto} createScheduleRequestDto + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +const schedulePostAxiosParamCreator = async ( + createScheduleRequestDto: CreateScheduleRequestDto, + options: AxiosRequestConfig = {}, + configuration?: Configuration, +): Promise => { + const localVarPath = `/schedule` + // 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 + + localVarHeaderParameter['Content-Type'] = 'application/json' + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers } + localVarRequestOptions.data = createScheduleRequestDto || undefined + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } +} +/** + * 시간표에 등록된 개인 스케쥴을 삭제합니다. + * @summary 시간표에 개인 스케쥴 삭제 + * @param {number} scheduleId 삭제할 스케쥴 ID + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +const scheduleScheduleIdDeleteAxiosParamCreator = async ( + scheduleId: number, + options: AxiosRequestConfig = {}, + configuration?: Configuration, +): Promise => { + const localVarPath = `/schedule/{scheduleId}`.replace(`{${'scheduleId'}}`, encodeURIComponent(String(scheduleId))) + // 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: 'DELETE', ...baseOptions, ...options } + const localVarHeaderParameter = {} as any + const localVarQueryParameter = {} as any + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } +} +/** + * 시간표에 등록된 개인 스케쥴을 수정합니다. + * @summary 시간표에 개인 스케쥴 수정 + * @param {number} scheduleId 수정할 스케쥴 ID + * @param {UpdateScheduleRequestDto} updateScheduleRequestDto + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +const scheduleScheduleIdPatchAxiosParamCreator = async ( + scheduleId: number, + updateScheduleRequestDto: UpdateScheduleRequestDto, + options: AxiosRequestConfig = {}, + configuration?: Configuration, +): Promise => { + const localVarPath = `/schedule/{scheduleId}`.replace(`{${'scheduleId'}}`, encodeURIComponent(String(scheduleId))) + // 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: 'PATCH', ...baseOptions, ...options } + const localVarHeaderParameter = {} as any + const localVarQueryParameter = {} as any + + localVarHeaderParameter['Content-Type'] = 'application/json' + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers } + localVarRequestOptions.data = updateScheduleRequestDto || undefined + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } +} + +/** + * ScheduleApi - functional programming interface + * @export + */ +/** + * 시간표에 개인 스케쥴을 추가합니다. 해당 시간에 이미 등록된 개인 스케쥴이나 강의가 있을 경우 추가되지 않습니다. + * @summary 시간표에 개인 스케쥴 추가 + * @param {CreateScheduleRequestDto} createScheduleRequestDto + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +const schedulePostFp = async ( + createScheduleRequestDto: CreateScheduleRequestDto, + options?: AxiosRequestConfig, + configuration?: Configuration, +): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> => { + const localVarAxiosArgs = await schedulePostAxiosParamCreator(createScheduleRequestDto, options, configuration) + return createRequestFunction(localVarAxiosArgs, globalAxios, configuration) +} +/** + * 시간표에 등록된 개인 스케쥴을 삭제합니다. + * @summary 시간표에 개인 스케쥴 삭제 + * @param {number} scheduleId 삭제할 스케쥴 ID + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +const scheduleScheduleIdDeleteFp = async ( + scheduleId: number, + options?: AxiosRequestConfig, + configuration?: Configuration, +): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> => { + const localVarAxiosArgs = await scheduleScheduleIdDeleteAxiosParamCreator(scheduleId, options, configuration) + return createRequestFunction(localVarAxiosArgs, globalAxios, configuration) +} +/** + * 시간표에 등록된 개인 스케쥴을 수정합니다. + * @summary 시간표에 개인 스케쥴 수정 + * @param {number} scheduleId 수정할 스케쥴 ID + * @param {UpdateScheduleRequestDto} updateScheduleRequestDto + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +const scheduleScheduleIdPatchFp = async ( + scheduleId: number, + updateScheduleRequestDto: UpdateScheduleRequestDto, + options?: AxiosRequestConfig, + configuration?: Configuration, +): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> => { + const localVarAxiosArgs = await scheduleScheduleIdPatchAxiosParamCreator( + scheduleId, + updateScheduleRequestDto, + options, + configuration, + ) + return createRequestFunction(localVarAxiosArgs, globalAxios, configuration) +} + +/** + * ScheduleApi - factory interface + * @export + */ + +export type SchedulePostRequestParams = { + createScheduleRequestDto: CreateScheduleRequestDto + options?: any +} + +/** + * 시간표에 개인 스케쥴을 추가합니다. 해당 시간에 이미 등록된 개인 스케쥴이나 강의가 있을 경우 추가되지 않습니다. + * @summary 시간표에 개인 스케쥴 추가 + * @param {CreateScheduleRequestDto} createScheduleRequestDto + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +export const schedulePost = ({ + configuration, + basePath, + axios, +}: { + configuration?: Configuration + basePath?: string + axios?: AxiosInstance +}) => { + return (params: SchedulePostRequestParams): AxiosPromise => { + return schedulePostFp(params.createScheduleRequestDto, params.options, configuration).then(request => + request(axios, basePath), + ) + } +} + +export type ScheduleScheduleIdDeleteRequestParams = { + scheduleId: number + options?: any +} + +/** + * 시간표에 등록된 개인 스케쥴을 삭제합니다. + * @summary 시간표에 개인 스케쥴 삭제 + * @param {number} scheduleId 삭제할 스케쥴 ID + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +export const scheduleScheduleIdDelete = ({ + configuration, + basePath, + axios, +}: { + configuration?: Configuration + basePath?: string + axios?: AxiosInstance +}) => { + return (params: ScheduleScheduleIdDeleteRequestParams): AxiosPromise => { + return scheduleScheduleIdDeleteFp(params.scheduleId, params.options, configuration).then(request => + request(axios, basePath), + ) + } +} + +export type ScheduleScheduleIdPatchRequestParams = { + scheduleId: number + updateScheduleRequestDto: UpdateScheduleRequestDto + options?: any +} + +/** + * 시간표에 등록된 개인 스케쥴을 수정합니다. + * @summary 시간표에 개인 스케쥴 수정 + * @param {number} scheduleId 수정할 스케쥴 ID + * @param {UpdateScheduleRequestDto} updateScheduleRequestDto + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +export const scheduleScheduleIdPatch = ({ + configuration, + basePath, + axios, +}: { + configuration?: Configuration + basePath?: string + axios?: AxiosInstance +}) => { + return (params: ScheduleScheduleIdPatchRequestParams): AxiosPromise => { + return scheduleScheduleIdPatchFp( + params.scheduleId, + params.updateScheduleRequestDto, + params.options, + configuration, + ).then(request => request(axios, basePath)) + } +} diff --git a/packages/api/ku-key/api/timetable-api.ts b/packages/api/ku-key/api/timetable-api.ts new file mode 100644 index 00000000..e86827f2 --- /dev/null +++ b/packages/api/ku-key/api/timetable-api.ts @@ -0,0 +1,993 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * KU-KEY API + * API for KU-KEY service + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import globalAxios, { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios' +import { Configuration } from '../configuration' +// Some imports not used depending on template conditions +// @ts-ignore +import { DUMMY_BASE_URL, assertParamExists, setSearchParams, toPathString, createRequestFunction } from '../common' +// @ts-ignore +import { COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from '../base' + +// @ts-ignore +import { CommonDeleteResponseDto } from '../models' +// @ts-ignore +import { CommonTimetableResponseDto } from '../models' +// @ts-ignore +import { CreateTimetableCourseResponseDto } from '../models' +// @ts-ignore +import { CreateTimetableDto } from '../models' +// @ts-ignore +import { GetTimetableByTimetableIdDto } from '../models' +// @ts-ignore +import { GetTimetableByUserIdResponseDto } from '../models' +// @ts-ignore +import { GetTodayTimetableResponse } from '../models' +// @ts-ignore +import { TimetableDto } from '../models' +// @ts-ignore +import { UpdateTimetableColorDto } from '../models' +// @ts-ignore +import { UpdateTimetableNameDto } from '../models' +/** + * TimetableApi - axios parameter creator + * @export + */ +/** + * 특정 시간표의 색상을 변경합니다. + * @summary 시간표 색상 변경 + * @param {number} timetableId 변경할 시간표 ID + * @param {UpdateTimetableColorDto} updateTimetableColorDto + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +const timetableColorTimetableIdPatchAxiosParamCreator = async ( + timetableId: number, + updateTimetableColorDto: UpdateTimetableColorDto, + options: AxiosRequestConfig = {}, + configuration?: Configuration, +): Promise => { + const localVarPath = `/timetable/color/{timetableId}`.replace( + `{${'timetableId'}}`, + encodeURIComponent(String(timetableId)), + ) + // 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: 'PATCH', ...baseOptions, ...options } + const localVarHeaderParameter = {} as any + const localVarQueryParameter = {} as any + + localVarHeaderParameter['Content-Type'] = 'application/json' + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers } + localVarRequestOptions.data = updateTimetableColorDto || undefined + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } +} +/** + * 해당 시간표에 등록한 특정 강의를 삭제합니다. + * @summary 시간표에 등록한 강의 삭제 + * @param {number} timetableId 특정 시간표 ID + * @param {number} courseId 삭제할 강의 ID + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +const timetableCourseDeleteAxiosParamCreator = async ( + timetableId: number, + courseId: number, + options: AxiosRequestConfig = {}, + configuration?: Configuration, +): Promise => { + const localVarPath = `/timetable/course` + // 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: 'DELETE', ...baseOptions, ...options } + const localVarHeaderParameter = {} as any + const localVarQueryParameter = {} as any + if (timetableId !== undefined) { + localVarQueryParameter['timetableId'] = timetableId + } + + if (courseId !== undefined) { + localVarQueryParameter['courseId'] = courseId + } + + 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} timetableId 특정 시간표 ID + * @param {number} courseId 추가할 강의 ID + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +const timetableCoursePostAxiosParamCreator = async ( + timetableId: number, + courseId: number, + options: AxiosRequestConfig = {}, + configuration?: Configuration, +): Promise => { + const localVarPath = `/timetable/course` + // 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 + if (timetableId !== undefined) { + localVarQueryParameter['timetableId'] = timetableId + } + + if (courseId !== undefined) { + localVarQueryParameter['courseId'] = courseId + } + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } +} +/** + * 해당 유저의 대표 시간표를 조회합니다. + * @summary 대표 시간표 조회 + * @param {string} semester 학기 + * @param {string} year 연도 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +const timetableMainTimetableGetAxiosParamCreator = async ( + semester: string, + year: string, + options: AxiosRequestConfig = {}, + configuration?: Configuration, +): Promise => { + const localVarPath = `/timetable/main-timetable` + // 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 + if (semester !== undefined) { + localVarQueryParameter['semester'] = semester + } + + if (year !== undefined) { + localVarQueryParameter['year'] = year + } + + 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} timetableId 변경할 시간표 ID + * @param {UpdateTimetableNameDto} updateTimetableNameDto + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +const timetableNameTimetableIdPatchAxiosParamCreator = async ( + timetableId: number, + updateTimetableNameDto: UpdateTimetableNameDto, + options: AxiosRequestConfig = {}, + configuration?: Configuration, +): Promise => { + const localVarPath = `/timetable/name/{timetableId}`.replace( + `{${'timetableId'}}`, + encodeURIComponent(String(timetableId)), + ) + // 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: 'PATCH', ...baseOptions, ...options } + const localVarHeaderParameter = {} as any + const localVarQueryParameter = {} as any + + localVarHeaderParameter['Content-Type'] = 'application/json' + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers } + localVarRequestOptions.data = updateTimetableNameDto || undefined + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } +} +/** + * 해당 연도, 학기에 시간표를 생성합니다. 처음 만들어진 시간표가 대표시간표가 되며, 한 학기에 최대 3개까지 시간표 생성이 가능합니다. + * @summary 시간표 생성 + * @param {CreateTimetableDto} createTimetableDto + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +const timetablePostAxiosParamCreator = async ( + createTimetableDto: CreateTimetableDto, + options: AxiosRequestConfig = {}, + configuration?: Configuration, +): Promise => { + const localVarPath = `/timetable` + // 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 + + localVarHeaderParameter['Content-Type'] = 'application/json' + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers } + localVarRequestOptions.data = createTimetableDto || undefined + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } +} +/** + * 특정 시간표를 삭제합니다. 삭제 시 해당 시간표에 등록된 모든 강의도 삭제됩니다. + * @summary 시간표 삭제 + * @param {number} timetableId 삭제할 시간표 ID + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +const timetableTimetableIdDeleteAxiosParamCreator = async ( + timetableId: number, + options: AxiosRequestConfig = {}, + configuration?: Configuration, +): Promise => { + const localVarPath = `/timetable/{timetableId}`.replace(`{${'timetableId'}}`, encodeURIComponent(String(timetableId))) + // 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: 'DELETE', ...baseOptions, ...options } + const localVarHeaderParameter = {} as any + const localVarQueryParameter = {} as any + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } +} +/** + * 시간표 ID로 해당 시간표와 관련된 강의,일정 정보를 반환합니다. + * @summary 시간표 ID로 시간표 관련 정보 조회 + * @param {number} timetableId 특정 시간표 ID + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +const timetableTimetableIdGetAxiosParamCreator = async ( + timetableId: number, + options: AxiosRequestConfig = {}, + configuration?: Configuration, +): Promise => { + const localVarPath = `/timetable/{timetableId}`.replace(`{${'timetableId'}}`, encodeURIComponent(String(timetableId))) + // 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 + + 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} timetableId 대표 시간표로 변경할 시간표 ID + * @param {TimetableDto} timetableDto + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +const timetableTimetableIdPatchAxiosParamCreator = async ( + timetableId: number, + timetableDto: TimetableDto, + options: AxiosRequestConfig = {}, + configuration?: Configuration, +): Promise => { + const localVarPath = `/timetable/{timetableId}`.replace(`{${'timetableId'}}`, encodeURIComponent(String(timetableId))) + // 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: 'PATCH', ...baseOptions, ...options } + const localVarHeaderParameter = {} as any + const localVarQueryParameter = {} as any + + localVarHeaderParameter['Content-Type'] = 'application/json' + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers } + localVarRequestOptions.data = timetableDto || undefined + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } +} +/** + * 오늘의 시간표를 조회합니다. + * @summary 오늘의 시간표 조회 + * @param {string} semester 학기 + * @param {string} year 연도 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +const timetableTodayGetAxiosParamCreator = async ( + semester: string, + year: string, + options: AxiosRequestConfig = {}, + configuration?: Configuration, +): Promise => { + const localVarPath = `/timetable/today` + // 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 + if (semester !== undefined) { + localVarQueryParameter['semester'] = semester + } + + if (year !== undefined) { + localVarQueryParameter['year'] = year + } + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } +} +/** + * 해당 유저가 가지고 있는 시간표의 ID 리스트, 각각의 학기, 대표 시간표 여부, 시간표 이름을 반환합니다. + * @summary 유저의 ID로 시간표 관련 정보 조회 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +const timetableUserGetAxiosParamCreator = async ( + options: AxiosRequestConfig = {}, + configuration?: Configuration, +): Promise => { + const localVarPath = `/timetable/user` + // 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 + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } +} + +/** + * TimetableApi - functional programming interface + * @export + */ +/** + * 특정 시간표의 색상을 변경합니다. + * @summary 시간표 색상 변경 + * @param {number} timetableId 변경할 시간표 ID + * @param {UpdateTimetableColorDto} updateTimetableColorDto + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +const timetableColorTimetableIdPatchFp = async ( + timetableId: number, + updateTimetableColorDto: UpdateTimetableColorDto, + options?: AxiosRequestConfig, + configuration?: Configuration, +): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> => { + const localVarAxiosArgs = await timetableColorTimetableIdPatchAxiosParamCreator( + timetableId, + updateTimetableColorDto, + options, + configuration, + ) + return createRequestFunction(localVarAxiosArgs, globalAxios, configuration) +} +/** + * 해당 시간표에 등록한 특정 강의를 삭제합니다. + * @summary 시간표에 등록한 강의 삭제 + * @param {number} timetableId 특정 시간표 ID + * @param {number} courseId 삭제할 강의 ID + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +const timetableCourseDeleteFp = async ( + timetableId: number, + courseId: number, + options?: AxiosRequestConfig, + configuration?: Configuration, +): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> => { + const localVarAxiosArgs = await timetableCourseDeleteAxiosParamCreator(timetableId, courseId, options, configuration) + return createRequestFunction(localVarAxiosArgs, globalAxios, configuration) +} +/** + * 시간표에 특정 강의를 추가합니다. 해당 시간에 이미 등록된 개인 스케쥴이나 강의가 있을 경우 추가되지 않습니다. + * @summary 시간표에 강의 추가 + * @param {number} timetableId 특정 시간표 ID + * @param {number} courseId 추가할 강의 ID + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +const timetableCoursePostFp = async ( + timetableId: number, + courseId: number, + options?: AxiosRequestConfig, + configuration?: Configuration, +): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> => { + const localVarAxiosArgs = await timetableCoursePostAxiosParamCreator(timetableId, courseId, options, configuration) + return createRequestFunction(localVarAxiosArgs, globalAxios, configuration) +} +/** + * 해당 유저의 대표 시간표를 조회합니다. + * @summary 대표 시간표 조회 + * @param {string} semester 학기 + * @param {string} year 연도 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +const timetableMainTimetableGetFp = async ( + semester: string, + year: string, + options?: AxiosRequestConfig, + configuration?: Configuration, +): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> => { + const localVarAxiosArgs = await timetableMainTimetableGetAxiosParamCreator(semester, year, options, configuration) + return createRequestFunction(localVarAxiosArgs, globalAxios, configuration) +} +/** + * 특정 시간표의 이름을 변경합니다. + * @summary 시간표 이름 변경 + * @param {number} timetableId 변경할 시간표 ID + * @param {UpdateTimetableNameDto} updateTimetableNameDto + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +const timetableNameTimetableIdPatchFp = async ( + timetableId: number, + updateTimetableNameDto: UpdateTimetableNameDto, + options?: AxiosRequestConfig, + configuration?: Configuration, +): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> => { + const localVarAxiosArgs = await timetableNameTimetableIdPatchAxiosParamCreator( + timetableId, + updateTimetableNameDto, + options, + configuration, + ) + return createRequestFunction(localVarAxiosArgs, globalAxios, configuration) +} +/** + * 해당 연도, 학기에 시간표를 생성합니다. 처음 만들어진 시간표가 대표시간표가 되며, 한 학기에 최대 3개까지 시간표 생성이 가능합니다. + * @summary 시간표 생성 + * @param {CreateTimetableDto} createTimetableDto + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +const timetablePostFp = async ( + createTimetableDto: CreateTimetableDto, + options?: AxiosRequestConfig, + configuration?: Configuration, +): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> => { + const localVarAxiosArgs = await timetablePostAxiosParamCreator(createTimetableDto, options, configuration) + return createRequestFunction(localVarAxiosArgs, globalAxios, configuration) +} +/** + * 특정 시간표를 삭제합니다. 삭제 시 해당 시간표에 등록된 모든 강의도 삭제됩니다. + * @summary 시간표 삭제 + * @param {number} timetableId 삭제할 시간표 ID + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +const timetableTimetableIdDeleteFp = async ( + timetableId: number, + options?: AxiosRequestConfig, + configuration?: Configuration, +): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> => { + const localVarAxiosArgs = await timetableTimetableIdDeleteAxiosParamCreator(timetableId, options, configuration) + return createRequestFunction(localVarAxiosArgs, globalAxios, configuration) +} +/** + * 시간표 ID로 해당 시간표와 관련된 강의,일정 정보를 반환합니다. + * @summary 시간표 ID로 시간표 관련 정보 조회 + * @param {number} timetableId 특정 시간표 ID + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +const timetableTimetableIdGetFp = async ( + timetableId: number, + options?: AxiosRequestConfig, + configuration?: Configuration, +): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> => { + const localVarAxiosArgs = await timetableTimetableIdGetAxiosParamCreator(timetableId, options, configuration) + return createRequestFunction(localVarAxiosArgs, globalAxios, configuration) +} +/** + * 특정 시간표를 대표 시간표로 변경합니다. 기존에 이미 대표시간표이면 변경되지 않습니다. + * @summary 대표 시간표 변경 + * @param {number} timetableId 대표 시간표로 변경할 시간표 ID + * @param {TimetableDto} timetableDto + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +const timetableTimetableIdPatchFp = async ( + timetableId: number, + timetableDto: TimetableDto, + options?: AxiosRequestConfig, + configuration?: Configuration, +): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> => { + const localVarAxiosArgs = await timetableTimetableIdPatchAxiosParamCreator( + timetableId, + timetableDto, + options, + configuration, + ) + return createRequestFunction(localVarAxiosArgs, globalAxios, configuration) +} +/** + * 오늘의 시간표를 조회합니다. + * @summary 오늘의 시간표 조회 + * @param {string} semester 학기 + * @param {string} year 연도 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +const timetableTodayGetFp = async ( + semester: string, + year: string, + options?: AxiosRequestConfig, + configuration?: Configuration, +): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> => { + const localVarAxiosArgs = await timetableTodayGetAxiosParamCreator(semester, year, options, configuration) + return createRequestFunction(localVarAxiosArgs, globalAxios, configuration) +} +/** + * 해당 유저가 가지고 있는 시간표의 ID 리스트, 각각의 학기, 대표 시간표 여부, 시간표 이름을 반환합니다. + * @summary 유저의 ID로 시간표 관련 정보 조회 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +const timetableUserGetFp = async ( + options?: AxiosRequestConfig, + configuration?: Configuration, +): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> => { + const localVarAxiosArgs = await timetableUserGetAxiosParamCreator(options, configuration) + return createRequestFunction(localVarAxiosArgs, globalAxios, configuration) +} + +/** + * TimetableApi - factory interface + * @export + */ + +export type TimetableColorTimetableIdPatchRequestParams = { + timetableId: number + updateTimetableColorDto: UpdateTimetableColorDto + options?: any +} + +/** + * 특정 시간표의 색상을 변경합니다. + * @summary 시간표 색상 변경 + * @param {number} timetableId 변경할 시간표 ID + * @param {UpdateTimetableColorDto} updateTimetableColorDto + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +export const timetableColorTimetableIdPatch = ({ + configuration, + basePath, + axios, +}: { + configuration?: Configuration + basePath?: string + axios?: AxiosInstance +}) => { + return (params: TimetableColorTimetableIdPatchRequestParams): AxiosPromise => { + return timetableColorTimetableIdPatchFp( + params.timetableId, + params.updateTimetableColorDto, + params.options, + configuration, + ).then(request => request(axios, basePath)) + } +} + +export type TimetableCourseDeleteRequestParams = { + timetableId: number + courseId: number + options?: any +} + +/** + * 해당 시간표에 등록한 특정 강의를 삭제합니다. + * @summary 시간표에 등록한 강의 삭제 + * @param {number} timetableId 특정 시간표 ID + * @param {number} courseId 삭제할 강의 ID + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +export const timetableCourseDelete = ({ + configuration, + basePath, + axios, +}: { + configuration?: Configuration + basePath?: string + axios?: AxiosInstance +}) => { + return (params: TimetableCourseDeleteRequestParams): AxiosPromise => { + return timetableCourseDeleteFp(params.timetableId, params.courseId, params.options, configuration).then(request => + request(axios, basePath), + ) + } +} + +export type TimetableCoursePostRequestParams = { + timetableId: number + courseId: number + options?: any +} + +/** + * 시간표에 특정 강의를 추가합니다. 해당 시간에 이미 등록된 개인 스케쥴이나 강의가 있을 경우 추가되지 않습니다. + * @summary 시간표에 강의 추가 + * @param {number} timetableId 특정 시간표 ID + * @param {number} courseId 추가할 강의 ID + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +export const timetableCoursePost = ({ + configuration, + basePath, + axios, +}: { + configuration?: Configuration + basePath?: string + axios?: AxiosInstance +}) => { + return (params: TimetableCoursePostRequestParams): AxiosPromise => { + return timetableCoursePostFp(params.timetableId, params.courseId, params.options, configuration).then(request => + request(axios, basePath), + ) + } +} + +export type TimetableMainTimetableGetRequestParams = { + semester: string + year: string + options?: any +} + +/** + * 해당 유저의 대표 시간표를 조회합니다. + * @summary 대표 시간표 조회 + * @param {string} semester 학기 + * @param {string} year 연도 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +export const timetableMainTimetableGet = ({ + configuration, + basePath, + axios, +}: { + configuration?: Configuration + basePath?: string + axios?: AxiosInstance +}) => { + return (params: TimetableMainTimetableGetRequestParams): AxiosPromise => { + return timetableMainTimetableGetFp(params.semester, params.year, params.options, configuration).then(request => + request(axios, basePath), + ) + } +} + +export type TimetableNameTimetableIdPatchRequestParams = { + timetableId: number + updateTimetableNameDto: UpdateTimetableNameDto + options?: any +} + +/** + * 특정 시간표의 이름을 변경합니다. + * @summary 시간표 이름 변경 + * @param {number} timetableId 변경할 시간표 ID + * @param {UpdateTimetableNameDto} updateTimetableNameDto + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +export const timetableNameTimetableIdPatch = ({ + configuration, + basePath, + axios, +}: { + configuration?: Configuration + basePath?: string + axios?: AxiosInstance +}) => { + return (params: TimetableNameTimetableIdPatchRequestParams): AxiosPromise => { + return timetableNameTimetableIdPatchFp( + params.timetableId, + params.updateTimetableNameDto, + params.options, + configuration, + ).then(request => request(axios, basePath)) + } +} + +export type TimetablePostRequestParams = { + createTimetableDto: CreateTimetableDto + options?: any +} + +/** + * 해당 연도, 학기에 시간표를 생성합니다. 처음 만들어진 시간표가 대표시간표가 되며, 한 학기에 최대 3개까지 시간표 생성이 가능합니다. + * @summary 시간표 생성 + * @param {CreateTimetableDto} createTimetableDto + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +export const timetablePost = ({ + configuration, + basePath, + axios, +}: { + configuration?: Configuration + basePath?: string + axios?: AxiosInstance +}) => { + return (params: TimetablePostRequestParams): AxiosPromise => { + return timetablePostFp(params.createTimetableDto, params.options, configuration).then(request => + request(axios, basePath), + ) + } +} + +export type TimetableTimetableIdDeleteRequestParams = { + timetableId: number + options?: any +} + +/** + * 특정 시간표를 삭제합니다. 삭제 시 해당 시간표에 등록된 모든 강의도 삭제됩니다. + * @summary 시간표 삭제 + * @param {number} timetableId 삭제할 시간표 ID + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +export const timetableTimetableIdDelete = ({ + configuration, + basePath, + axios, +}: { + configuration?: Configuration + basePath?: string + axios?: AxiosInstance +}) => { + return (params: TimetableTimetableIdDeleteRequestParams): AxiosPromise => { + return timetableTimetableIdDeleteFp(params.timetableId, params.options, configuration).then(request => + request(axios, basePath), + ) + } +} + +export type TimetableTimetableIdGetRequestParams = { + timetableId: number + options?: any +} + +/** + * 시간표 ID로 해당 시간표와 관련된 강의,일정 정보를 반환합니다. + * @summary 시간표 ID로 시간표 관련 정보 조회 + * @param {number} timetableId 특정 시간표 ID + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +export const timetableTimetableIdGet = ({ + configuration, + basePath, + axios, +}: { + configuration?: Configuration + basePath?: string + axios?: AxiosInstance +}) => { + return (params: TimetableTimetableIdGetRequestParams): AxiosPromise => { + return timetableTimetableIdGetFp(params.timetableId, params.options, configuration).then(request => + request(axios, basePath), + ) + } +} + +export type TimetableTimetableIdPatchRequestParams = { + timetableId: number + timetableDto: TimetableDto + options?: any +} + +/** + * 특정 시간표를 대표 시간표로 변경합니다. 기존에 이미 대표시간표이면 변경되지 않습니다. + * @summary 대표 시간표 변경 + * @param {number} timetableId 대표 시간표로 변경할 시간표 ID + * @param {TimetableDto} timetableDto + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +export const timetableTimetableIdPatch = ({ + configuration, + basePath, + axios, +}: { + configuration?: Configuration + basePath?: string + axios?: AxiosInstance +}) => { + return (params: TimetableTimetableIdPatchRequestParams): AxiosPromise => { + return timetableTimetableIdPatchFp(params.timetableId, params.timetableDto, params.options, configuration).then( + request => request(axios, basePath), + ) + } +} + +export type TimetableTodayGetRequestParams = { + semester: string + year: string + options?: any +} + +/** + * 오늘의 시간표를 조회합니다. + * @summary 오늘의 시간표 조회 + * @param {string} semester 학기 + * @param {string} year 연도 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +export const timetableTodayGet = ({ + configuration, + basePath, + axios, +}: { + configuration?: Configuration + basePath?: string + axios?: AxiosInstance +}) => { + return (params: TimetableTodayGetRequestParams): AxiosPromise => { + return timetableTodayGetFp(params.semester, params.year, params.options, configuration).then(request => + request(axios, basePath), + ) + } +} + +export type TimetableUserGetRequestParams = { + options?: any +} + +/** + * 해당 유저가 가지고 있는 시간표의 ID 리스트, 각각의 학기, 대표 시간표 여부, 시간표 이름을 반환합니다. + * @summary 유저의 ID로 시간표 관련 정보 조회 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +export const timetableUserGet = ({ + configuration, + basePath, + axios, +}: { + configuration?: Configuration + basePath?: string + axios?: AxiosInstance +}) => { + return (params?: { options?: any }): AxiosPromise> => { + return timetableUserGetFp(params?.options, configuration).then(request => request(axios, basePath)) + } +} diff --git a/packages/api/ku-key/api/user-api.ts b/packages/api/ku-key/api/user-api.ts new file mode 100644 index 00000000..1b810d8e --- /dev/null +++ b/packages/api/ku-key/api/user-api.ts @@ -0,0 +1,816 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * KU-KEY API + * API for KU-KEY service + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import globalAxios, { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios' +import { Configuration } from '../configuration' +// Some imports not used depending on template conditions +// @ts-ignore +import { DUMMY_BASE_URL, assertParamExists, setSearchParams, toPathString, createRequestFunction } from '../common' +// @ts-ignore +import { COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from '../base' + +// @ts-ignore +import { CheckCourseReviewReadingTicketResponseDto } from '../models' +// @ts-ignore +import { DeleteUserResponseDto } from '../models' +// @ts-ignore +import { GetPointHistoryResponseDto } from '../models' +// @ts-ignore +import { GetProfileResponseDto } from '../models' +// @ts-ignore +import { LanguageRequestDto } from '../models' +// @ts-ignore +import { LanguageResponseDto } from '../models' +// @ts-ignore +import { PurchaseItemRequestDto } from '../models' +// @ts-ignore +import { PurchaseItemResponseDto } from '../models' +// @ts-ignore +import { SelectCharacterLevelRequestDto } from '../models' +// @ts-ignore +import { SelectCharacterLevelResponseDto } from '../models' +// @ts-ignore +import { SetExchangeDayReqeustDto } from '../models' +// @ts-ignore +import { SetProfileRequestDto } from '../models' +// @ts-ignore +import { SetResponseDto } from '../models' +/** + * UserApi - axios parameter creator + * @export + */ +/** + * 현재 해금된 최대 레벨 이하의 캐릭터 레벨 중 하나를 선택합니다. + * @summary 캐릭터 레벨 선택 + * @param {SelectCharacterLevelRequestDto} selectCharacterLevelRequestDto + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +const userCharacterLevelPatchAxiosParamCreator = async ( + selectCharacterLevelRequestDto: SelectCharacterLevelRequestDto, + options: AxiosRequestConfig = {}, + configuration?: Configuration, +): Promise => { + const localVarPath = `/user/character-level` + // 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: 'PATCH', ...baseOptions, ...options } + const localVarHeaderParameter = {} as any + const localVarQueryParameter = {} as any + + localVarHeaderParameter['Content-Type'] = 'application/json' + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers } + localVarRequestOptions.data = selectCharacterLevelRequestDto || undefined + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } +} +/** + * 해당 사용자의 강의평 열람권이 만료되었는지 확인 후 만료되었으면 null, 만료되지 않았으면 강의평 열람권 만료일자를 반환합니다. + * @summary 강의평 열람권 만료 조회 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +const userCourseReviewReadingTicketGetAxiosParamCreator = async ( + options: AxiosRequestConfig = {}, + configuration?: Configuration, +): Promise => { + const localVarPath = `/user/course-review-reading-ticket` + // 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 + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } +} +/** + * 사용자의 계정을 삭제합니다. + * @summary 회원탈퇴 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +const userDeleteAxiosParamCreator = async ( + options: AxiosRequestConfig = {}, + configuration?: Configuration, +): Promise => { + const localVarPath = `/user` + // 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: 'DELETE', ...baseOptions, ...options } + const localVarHeaderParameter = {} as any + const localVarQueryParameter = {} as any + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } +} +/** + * 교환학생 남은 일자를 설정(변경) 합니다 + * @summary 교환 남은 일자 설정 + * @param {SetExchangeDayReqeustDto} setExchangeDayReqeustDto + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +const userExchangeDayPatchAxiosParamCreator = async ( + setExchangeDayReqeustDto: SetExchangeDayReqeustDto, + options: AxiosRequestConfig = {}, + configuration?: Configuration, +): Promise => { + const localVarPath = `/user/exchange-day` + // 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: 'PATCH', ...baseOptions, ...options } + const localVarHeaderParameter = {} as any + const localVarQueryParameter = {} as any + + localVarHeaderParameter['Content-Type'] = 'application/json' + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers } + localVarRequestOptions.data = setExchangeDayReqeustDto || undefined + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } +} +/** + * 언어를 삭제 합니다 + * @summary 언어 삭제 + * @param {LanguageRequestDto} languageRequestDto + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +const userLanguageDeleteAxiosParamCreator = async ( + languageRequestDto: LanguageRequestDto, + options: AxiosRequestConfig = {}, + configuration?: Configuration, +): Promise => { + const localVarPath = `/user/language` + // 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: 'DELETE', ...baseOptions, ...options } + const localVarHeaderParameter = {} as any + const localVarQueryParameter = {} as any + + localVarHeaderParameter['Content-Type'] = 'application/json' + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers } + localVarRequestOptions.data = languageRequestDto || undefined + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } +} +/** + * 언어를 추가 합니다 + * @summary 언어 추가 + * @param {LanguageRequestDto} languageRequestDto + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +const userLanguagePostAxiosParamCreator = async ( + languageRequestDto: LanguageRequestDto, + options: AxiosRequestConfig = {}, + configuration?: Configuration, +): Promise => { + const localVarPath = `/user/language` + // 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 + + localVarHeaderParameter['Content-Type'] = 'application/json' + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers } + localVarRequestOptions.data = languageRequestDto || undefined + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } +} +/** + * 포인트 획득/사용 내역을 조회 합니다 + * @summary 포인트 내역 조회 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +const userPointHistoryGetAxiosParamCreator = async ( + options: AxiosRequestConfig = {}, + configuration?: Configuration, +): Promise => { + const localVarPath = `/user/point-history` + // 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 + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } +} +/** + * 프로필을 조회 합니다 + * @summary 프로필 조회 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +const userProfileGetAxiosParamCreator = async ( + options: AxiosRequestConfig = {}, + configuration?: Configuration, +): Promise => { + const localVarPath = `/user/profile` + // 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 + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } +} +/** + * 프로필을 설정(변경) 합니다 + * @summary 프로필 설정 + * @param {SetProfileRequestDto} setProfileRequestDto + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +const userProfilePatchAxiosParamCreator = async ( + setProfileRequestDto: SetProfileRequestDto, + options: AxiosRequestConfig = {}, + configuration?: Configuration, +): Promise => { + const localVarPath = `/user/profile` + // 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: 'PATCH', ...baseOptions, ...options } + const localVarHeaderParameter = {} as any + const localVarQueryParameter = {} as any + + localVarHeaderParameter['Content-Type'] = 'application/json' + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers } + localVarRequestOptions.data = setProfileRequestDto || undefined + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } +} +/** + * 포인트 샵에서 아이템을 구매합니다. + * @summary 아이템 구매 + * @param {PurchaseItemRequestDto} purchaseItemRequestDto + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +const userPurchaseItemPostAxiosParamCreator = async ( + purchaseItemRequestDto: PurchaseItemRequestDto, + options: AxiosRequestConfig = {}, + configuration?: Configuration, +): Promise => { + const localVarPath = `/user/purchase-item` + // 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 + + localVarHeaderParameter['Content-Type'] = 'application/json' + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers } + localVarRequestOptions.data = purchaseItemRequestDto || undefined + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } +} + +/** + * UserApi - functional programming interface + * @export + */ +/** + * 현재 해금된 최대 레벨 이하의 캐릭터 레벨 중 하나를 선택합니다. + * @summary 캐릭터 레벨 선택 + * @param {SelectCharacterLevelRequestDto} selectCharacterLevelRequestDto + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +const userCharacterLevelPatchFp = async ( + selectCharacterLevelRequestDto: SelectCharacterLevelRequestDto, + options?: AxiosRequestConfig, + configuration?: Configuration, +): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> => { + const localVarAxiosArgs = await userCharacterLevelPatchAxiosParamCreator( + selectCharacterLevelRequestDto, + options, + configuration, + ) + return createRequestFunction(localVarAxiosArgs, globalAxios, configuration) +} +/** + * 해당 사용자의 강의평 열람권이 만료되었는지 확인 후 만료되었으면 null, 만료되지 않았으면 강의평 열람권 만료일자를 반환합니다. + * @summary 강의평 열람권 만료 조회 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +const userCourseReviewReadingTicketGetFp = async ( + options?: AxiosRequestConfig, + configuration?: Configuration, +): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> => { + const localVarAxiosArgs = await userCourseReviewReadingTicketGetAxiosParamCreator(options, configuration) + return createRequestFunction(localVarAxiosArgs, globalAxios, configuration) +} +/** + * 사용자의 계정을 삭제합니다. + * @summary 회원탈퇴 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +const userDeleteFp = async ( + options?: AxiosRequestConfig, + configuration?: Configuration, +): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> => { + const localVarAxiosArgs = await userDeleteAxiosParamCreator(options, configuration) + return createRequestFunction(localVarAxiosArgs, globalAxios, configuration) +} +/** + * 교환학생 남은 일자를 설정(변경) 합니다 + * @summary 교환 남은 일자 설정 + * @param {SetExchangeDayReqeustDto} setExchangeDayReqeustDto + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +const userExchangeDayPatchFp = async ( + setExchangeDayReqeustDto: SetExchangeDayReqeustDto, + options?: AxiosRequestConfig, + configuration?: Configuration, +): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> => { + const localVarAxiosArgs = await userExchangeDayPatchAxiosParamCreator( + setExchangeDayReqeustDto, + options, + configuration, + ) + return createRequestFunction(localVarAxiosArgs, globalAxios, configuration) +} +/** + * 언어를 삭제 합니다 + * @summary 언어 삭제 + * @param {LanguageRequestDto} languageRequestDto + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +const userLanguageDeleteFp = async ( + languageRequestDto: LanguageRequestDto, + options?: AxiosRequestConfig, + configuration?: Configuration, +): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> => { + const localVarAxiosArgs = await userLanguageDeleteAxiosParamCreator(languageRequestDto, options, configuration) + return createRequestFunction(localVarAxiosArgs, globalAxios, configuration) +} +/** + * 언어를 추가 합니다 + * @summary 언어 추가 + * @param {LanguageRequestDto} languageRequestDto + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +const userLanguagePostFp = async ( + languageRequestDto: LanguageRequestDto, + options?: AxiosRequestConfig, + configuration?: Configuration, +): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> => { + const localVarAxiosArgs = await userLanguagePostAxiosParamCreator(languageRequestDto, options, configuration) + return createRequestFunction(localVarAxiosArgs, globalAxios, configuration) +} +/** + * 포인트 획득/사용 내역을 조회 합니다 + * @summary 포인트 내역 조회 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +const userPointHistoryGetFp = async ( + options?: AxiosRequestConfig, + configuration?: Configuration, +): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> => { + const localVarAxiosArgs = await userPointHistoryGetAxiosParamCreator(options, configuration) + return createRequestFunction(localVarAxiosArgs, globalAxios, configuration) +} +/** + * 프로필을 조회 합니다 + * @summary 프로필 조회 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +const userProfileGetFp = async ( + options?: AxiosRequestConfig, + configuration?: Configuration, +): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> => { + const localVarAxiosArgs = await userProfileGetAxiosParamCreator(options, configuration) + return createRequestFunction(localVarAxiosArgs, globalAxios, configuration) +} +/** + * 프로필을 설정(변경) 합니다 + * @summary 프로필 설정 + * @param {SetProfileRequestDto} setProfileRequestDto + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +const userProfilePatchFp = async ( + setProfileRequestDto: SetProfileRequestDto, + options?: AxiosRequestConfig, + configuration?: Configuration, +): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> => { + const localVarAxiosArgs = await userProfilePatchAxiosParamCreator(setProfileRequestDto, options, configuration) + return createRequestFunction(localVarAxiosArgs, globalAxios, configuration) +} +/** + * 포인트 샵에서 아이템을 구매합니다. + * @summary 아이템 구매 + * @param {PurchaseItemRequestDto} purchaseItemRequestDto + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +const userPurchaseItemPostFp = async ( + purchaseItemRequestDto: PurchaseItemRequestDto, + options?: AxiosRequestConfig, + configuration?: Configuration, +): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> => { + const localVarAxiosArgs = await userPurchaseItemPostAxiosParamCreator(purchaseItemRequestDto, options, configuration) + return createRequestFunction(localVarAxiosArgs, globalAxios, configuration) +} + +/** + * UserApi - factory interface + * @export + */ + +export type UserCharacterLevelPatchRequestParams = { + selectCharacterLevelRequestDto: SelectCharacterLevelRequestDto + options?: any +} + +/** + * 현재 해금된 최대 레벨 이하의 캐릭터 레벨 중 하나를 선택합니다. + * @summary 캐릭터 레벨 선택 + * @param {SelectCharacterLevelRequestDto} selectCharacterLevelRequestDto + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +export const userCharacterLevelPatch = ({ + configuration, + basePath, + axios, +}: { + configuration?: Configuration + basePath?: string + axios?: AxiosInstance +}) => { + return (params: UserCharacterLevelPatchRequestParams): AxiosPromise => { + return userCharacterLevelPatchFp(params.selectCharacterLevelRequestDto, params.options, configuration).then( + request => request(axios, basePath), + ) + } +} + +export type UserCourseReviewReadingTicketGetRequestParams = { + options?: any +} + +/** + * 해당 사용자의 강의평 열람권이 만료되었는지 확인 후 만료되었으면 null, 만료되지 않았으면 강의평 열람권 만료일자를 반환합니다. + * @summary 강의평 열람권 만료 조회 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +export const userCourseReviewReadingTicketGet = ({ + configuration, + basePath, + axios, +}: { + configuration?: Configuration + basePath?: string + axios?: AxiosInstance +}) => { + return (params?: { options?: any }): AxiosPromise => { + return userCourseReviewReadingTicketGetFp(params?.options, configuration).then(request => request(axios, basePath)) + } +} + +export type UserDeleteRequestParams = { + options?: any +} + +/** + * 사용자의 계정을 삭제합니다. + * @summary 회원탈퇴 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +export const userDelete = ({ + configuration, + basePath, + axios, +}: { + configuration?: Configuration + basePath?: string + axios?: AxiosInstance +}) => { + return (params?: { options?: any }): AxiosPromise => { + return userDeleteFp(params?.options, configuration).then(request => request(axios, basePath)) + } +} + +export type UserExchangeDayPatchRequestParams = { + setExchangeDayReqeustDto: SetExchangeDayReqeustDto + options?: any +} + +/** + * 교환학생 남은 일자를 설정(변경) 합니다 + * @summary 교환 남은 일자 설정 + * @param {SetExchangeDayReqeustDto} setExchangeDayReqeustDto + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +export const userExchangeDayPatch = ({ + configuration, + basePath, + axios, +}: { + configuration?: Configuration + basePath?: string + axios?: AxiosInstance +}) => { + return (params: UserExchangeDayPatchRequestParams): AxiosPromise => { + return userExchangeDayPatchFp(params.setExchangeDayReqeustDto, params.options, configuration).then(request => + request(axios, basePath), + ) + } +} + +export type UserLanguageDeleteRequestParams = { + languageRequestDto: LanguageRequestDto + options?: any +} + +/** + * 언어를 삭제 합니다 + * @summary 언어 삭제 + * @param {LanguageRequestDto} languageRequestDto + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +export const userLanguageDelete = ({ + configuration, + basePath, + axios, +}: { + configuration?: Configuration + basePath?: string + axios?: AxiosInstance +}) => { + return (params: UserLanguageDeleteRequestParams): AxiosPromise => { + return userLanguageDeleteFp(params.languageRequestDto, params.options, configuration).then(request => + request(axios, basePath), + ) + } +} + +export type UserLanguagePostRequestParams = { + languageRequestDto: LanguageRequestDto + options?: any +} + +/** + * 언어를 추가 합니다 + * @summary 언어 추가 + * @param {LanguageRequestDto} languageRequestDto + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +export const userLanguagePost = ({ + configuration, + basePath, + axios, +}: { + configuration?: Configuration + basePath?: string + axios?: AxiosInstance +}) => { + return (params: UserLanguagePostRequestParams): AxiosPromise => { + return userLanguagePostFp(params.languageRequestDto, params.options, configuration).then(request => + request(axios, basePath), + ) + } +} + +export type UserPointHistoryGetRequestParams = { + options?: any +} + +/** + * 포인트 획득/사용 내역을 조회 합니다 + * @summary 포인트 내역 조회 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +export const userPointHistoryGet = ({ + configuration, + basePath, + axios, +}: { + configuration?: Configuration + basePath?: string + axios?: AxiosInstance +}) => { + return (params?: { options?: any }): AxiosPromise> => { + return userPointHistoryGetFp(params?.options, configuration).then(request => request(axios, basePath)) + } +} + +export type UserProfileGetRequestParams = { + options?: any +} + +/** + * 프로필을 조회 합니다 + * @summary 프로필 조회 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +export const userProfileGet = ({ + configuration, + basePath, + axios, +}: { + configuration?: Configuration + basePath?: string + axios?: AxiosInstance +}) => { + return (params?: { options?: any }): AxiosPromise => { + return userProfileGetFp(params?.options, configuration).then(request => request(axios, basePath)) + } +} + +export type UserProfilePatchRequestParams = { + setProfileRequestDto: SetProfileRequestDto + options?: any +} + +/** + * 프로필을 설정(변경) 합니다 + * @summary 프로필 설정 + * @param {SetProfileRequestDto} setProfileRequestDto + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +export const userProfilePatch = ({ + configuration, + basePath, + axios, +}: { + configuration?: Configuration + basePath?: string + axios?: AxiosInstance +}) => { + return (params: UserProfilePatchRequestParams): AxiosPromise => { + return userProfilePatchFp(params.setProfileRequestDto, params.options, configuration).then(request => + request(axios, basePath), + ) + } +} + +export type UserPurchaseItemPostRequestParams = { + purchaseItemRequestDto: PurchaseItemRequestDto + options?: any +} + +/** + * 포인트 샵에서 아이템을 구매합니다. + * @summary 아이템 구매 + * @param {PurchaseItemRequestDto} purchaseItemRequestDto + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ +export const userPurchaseItemPost = ({ + configuration, + basePath, + axios, +}: { + configuration?: Configuration + basePath?: string + axios?: AxiosInstance +}) => { + return (params: UserPurchaseItemPostRequestParams): AxiosPromise => { + return userPurchaseItemPostFp(params.purchaseItemRequestDto, params.options, configuration).then(request => + request(axios, basePath), + ) + } +} diff --git a/packages/api/ku-key/base.ts b/packages/api/ku-key/base.ts new file mode 100644 index 00000000..98444b1c --- /dev/null +++ b/packages/api/ku-key/base.ts @@ -0,0 +1,77 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * KU-KEY API + * API for KU-KEY service + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { Configuration } from './configuration' +// Some imports not used depending on template conditions +// @ts-ignore +import globalAxios, { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios' + +export const BASE_PATH = 'http://localhost'.replace(/\/+$/, '') + +/** + * + * @export + */ +export const COLLECTION_FORMATS = { + csv: ',', + ssv: ' ', + tsv: '\t', + pipes: '|', +} + +/** + * + * @export + * @interface RequestArgs + */ +export interface RequestArgs { + url: string + options: AxiosRequestConfig +} + +/** + * + * @export + * @class BaseAPI + */ +export class BaseAPI { + protected configuration: Configuration | undefined + + constructor( + configuration?: Configuration, + protected basePath: string = BASE_PATH, + protected axios: AxiosInstance = globalAxios, + ) { + if (configuration) { + this.configuration = configuration + this.basePath = configuration.basePath || this.basePath + } + } +} + +/** + * + * @export + * @class RequiredError + * @extends {Error} + */ +export class RequiredError extends Error { + name: 'RequiredError' = 'RequiredError' + constructor( + public field: string, + msg?: string, + ) { + super(msg) + } +} diff --git a/packages/api/ku-key/common.ts b/packages/api/ku-key/common.ts new file mode 100644 index 00000000..3f532260 --- /dev/null +++ b/packages/api/ku-key/common.ts @@ -0,0 +1,95 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * KU-KEY API + * API for KU-KEY service + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { Configuration } from './configuration' +import { RequiredError, RequestArgs } from './base' +import { AxiosInstance, AxiosResponse } from 'axios' + +/** + * + * @export + */ +export const DUMMY_BASE_URL = 'https://example.com' + +/** + * + * @throws {RequiredError} + * @export + */ +export const assertParamExists = function (functionName: string, paramName: string, paramValue: unknown) { + if (paramValue === null || paramValue === undefined) { + throw new RequiredError( + paramName, + `Required parameter ${paramName} was null or undefined when calling ${functionName}.`, + ) + } +} + +/** + * + * @export + */ +export const setSearchParams = function (url: URL, ...objects: any[]) { + const searchParams = new URLSearchParams(url.search) + for (const object of objects) { + for (const key in object) { + if (Array.isArray(object[key])) { + searchParams.delete(key) + for (const item of object[key]) { + searchParams.append(key, item) + } + } else { + searchParams.set(key, object[key]) + } + } + } + url.search = searchParams.toString() +} + +/** + * + * @export + */ +export const serializeDataIfNeeded = function (value: any, requestOptions: any, configuration?: Configuration) { + const nonString = typeof value !== 'string' + /* const needsSerialization = nonString && configuration && configuration.isJsonMime + ? configuration.isJsonMime(requestOptions.headers['Content-Type']) + : nonString; */ + // In JP BANK, serialization is off. + const needsSerialization = false + return needsSerialization ? JSON.stringify(value !== undefined ? value : {}) : value || '' +} + +/** + * + * @export + */ +export const toPathString = function (url: URL) { + return url.pathname + url.search + url.hash +} + +/** + * + * @export + */ +export const createRequestFunction = function ( + axiosArgs: RequestArgs, + globalAxios: AxiosInstance, + configuration?: Configuration, +) { + return >(axios: AxiosInstance = globalAxios) => { + const axiosRequestArgs = { ...axiosArgs.options, url: axiosArgs.url } + return axios.request(axiosRequestArgs) + } +} diff --git a/packages/api/ku-key/configuration.ts b/packages/api/ku-key/configuration.ts new file mode 100644 index 00000000..707ebdd0 --- /dev/null +++ b/packages/api/ku-key/configuration.ts @@ -0,0 +1,108 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * KU-KEY API + * API for KU-KEY service + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +export interface ConfigurationParameters { + apiKey?: string | Promise | ((name: string) => string) | ((name: string) => Promise) + username?: string + password?: string + accessToken?: + | string + | Promise + | ((name?: string, scopes?: string[]) => string) + | ((name?: string, scopes?: string[]) => Promise) + basePath?: string + baseOptions?: any + formDataCtor?: new () => any +} + +export class Configuration { + /** + * parameter for apiKey security + * @param name security name + * @memberof Configuration + */ + apiKey?: string | Promise | ((name: string) => string) | ((name: string) => Promise) + /** + * parameter for basic security + * + * @type {string} + * @memberof Configuration + */ + username?: string + /** + * parameter for basic security + * + * @type {string} + * @memberof Configuration + */ + password?: string + /** + * parameter for oauth2 security + * @param name security name + * @param scopes oauth2 scope + * @memberof Configuration + */ + accessToken?: + | string + | Promise + | ((name?: string, scopes?: string[]) => string) + | ((name?: string, scopes?: string[]) => Promise) + /** + * override base path + * + * @type {string} + * @memberof Configuration + */ + basePath?: string + /** + * base options for axios calls + * + * @type {any} + * @memberof Configuration + */ + baseOptions?: any + /** + * The FormData constructor that will be used to create multipart form data + * requests. You can inject this here so that execution environments that + * do not support the FormData class can still run the generated client. + * + * @type {new () => FormData} + */ + formDataCtor?: new () => any + + constructor(param: ConfigurationParameters = {}) { + this.apiKey = param.apiKey + this.username = param.username + this.password = param.password + this.accessToken = param.accessToken + this.basePath = param.basePath + this.baseOptions = param.baseOptions + this.formDataCtor = param.formDataCtor + } + + /** + * Check if the given MIME is a JSON MIME. + * JSON MIME examples: + * application/json + * application/json; charset=UTF8 + * APPLICATION/JSON + * application/vnd.company+json + * @param mime - MIME (Multipurpose Internet Mail Extensions) + * @return True if the given MIME is JSON, false otherwise. + */ + public isJsonMime(mime: string): boolean { + const jsonMime: RegExp = new RegExp('^(application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(;.*)?$', 'i') + return mime !== null && (jsonMime.test(mime) || mime.toLowerCase() === 'application/json-patch+json') + } +} diff --git a/packages/api/ku-key/git_push.sh b/packages/api/ku-key/git_push.sh new file mode 100644 index 00000000..f53a75d4 --- /dev/null +++ b/packages/api/ku-key/git_push.sh @@ -0,0 +1,57 @@ +#!/bin/sh +# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/ +# +# Usage example: /bin/sh ./git_push.sh wing328 openapi-petstore-perl "minor update" "gitlab.com" + +git_user_id=$1 +git_repo_id=$2 +release_note=$3 +git_host=$4 + +if [ "$git_host" = "" ]; then + git_host="github.com" + echo "[INFO] No command line input provided. Set \$git_host to $git_host" +fi + +if [ "$git_user_id" = "" ]; then + git_user_id="GIT_USER_ID" + echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" +fi + +if [ "$git_repo_id" = "" ]; then + git_repo_id="GIT_REPO_ID" + echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" +fi + +if [ "$release_note" = "" ]; then + release_note="Minor update" + echo "[INFO] No command line input provided. Set \$release_note to $release_note" +fi + +# Initialize the local directory as a Git repository +git init + +# Adds the files in the local repository and stages them for commit. +git add . + +# Commits the tracked changes and prepares them to be pushed to a remote repository. +git commit -m "$release_note" + +# Sets the new remote +git_remote=$(git remote) +if [ "$git_remote" = "" ]; then # git remote not defined + + if [ "$GIT_TOKEN" = "" ]; then + echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." + git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git + else + git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git + fi + +fi + +git pull origin master + +# Pushes (Forces) the changes in the local repository up to the remote repository +echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git" +git push origin master 2>&1 | grep -v 'To https' diff --git a/packages/api/ku-key/index.ts b/packages/api/ku-key/index.ts new file mode 100644 index 00000000..5e915326 --- /dev/null +++ b/packages/api/ku-key/index.ts @@ -0,0 +1,16 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * KU-KEY API + * API for KU-KEY service + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +export * as api from './api' +export * as model from './models' diff --git a/packages/api/ku-key/models/academic-schedule.ts b/packages/api/ku-key/models/academic-schedule.ts new file mode 100644 index 00000000..56839faf --- /dev/null +++ b/packages/api/ku-key/models/academic-schedule.ts @@ -0,0 +1,63 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * KU-KEY API + * API for KU-KEY service + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** + * + * @export + * @interface AcademicSchedule + */ +export interface AcademicSchedule { + /** + * 행사/일정 id + * @type {number} + * @memberof AcademicSchedule + */ + id: number + /** + * 행사/일정 제목 + * @type {string} + * @memberof AcademicSchedule + */ + title: string + /** + * 행사/일정 설명 + * @type {string} + * @memberof AcademicSchedule + */ + description: string + /** + * 시작 날짜 + * @type {string} + * @memberof AcademicSchedule + */ + startDate: string + /** + * 시작 요일 + * @type {string} + * @memberof AcademicSchedule + */ + startDay: string + /** + * 종료 날짜 + * @type {string} + * @memberof AcademicSchedule + */ + endDate: string + /** + * 종료 요일 + * @type {string} + * @memberof AcademicSchedule + */ + endDay: string +} diff --git a/packages/api/ku-key/models/accept-report-request-dto.ts b/packages/api/ku-key/models/accept-report-request-dto.ts new file mode 100644 index 00000000..5fddd510 --- /dev/null +++ b/packages/api/ku-key/models/accept-report-request-dto.ts @@ -0,0 +1,27 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * KU-KEY API + * API for KU-KEY service + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** + * + * @export + * @interface AcceptReportRequestDto + */ +export interface AcceptReportRequestDto { + /** + * 정지 일 수 + * @type {number} + * @memberof AcceptReportRequestDto + */ + banDays: number +} diff --git a/packages/api/ku-key/models/banner-dto.ts b/packages/api/ku-key/models/banner-dto.ts new file mode 100644 index 00000000..57ddae14 --- /dev/null +++ b/packages/api/ku-key/models/banner-dto.ts @@ -0,0 +1,39 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * KU-KEY API + * API for KU-KEY service + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** + * + * @export + * @interface BannerDto + */ +export interface BannerDto { + /** + * 배너 id + * @type {number} + * @memberof BannerDto + */ + id: number + /** + * 배너 이미지 URL + * @type {string} + * @memberof BannerDto + */ + imageUrl: string + /** + * 배너 제목 + * @type {string} + * @memberof BannerDto + */ + title: string +} diff --git a/packages/api/ku-key/models/board-info.ts b/packages/api/ku-key/models/board-info.ts new file mode 100644 index 00000000..2b1fe4dd --- /dev/null +++ b/packages/api/ku-key/models/board-info.ts @@ -0,0 +1,39 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * KU-KEY API + * API for KU-KEY service + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** + * + * @export + * @interface BoardInfo + */ +export interface BoardInfo { + /** + * 게시판 고유 ID + * @type {number} + * @memberof BoardInfo + */ + id: number + /** + * 게시판 이름 + * @type {string} + * @memberof BoardInfo + */ + name: string + /** + * 게시판 설명 + * @type {string} + * @memberof BoardInfo + */ + description: string +} diff --git a/packages/api/ku-key/models/change-password-request-dto.ts b/packages/api/ku-key/models/change-password-request-dto.ts new file mode 100644 index 00000000..baa09e96 --- /dev/null +++ b/packages/api/ku-key/models/change-password-request-dto.ts @@ -0,0 +1,27 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * KU-KEY API + * API for KU-KEY service + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** + * + * @export + * @interface ChangePasswordRequestDto + */ +export interface ChangePasswordRequestDto { + /** + * 변경하고자 하는 비밀번호 + * @type {string} + * @memberof ChangePasswordRequestDto + */ + newPassword: string +} diff --git a/packages/api/ku-key/models/change-password-response-dto.ts b/packages/api/ku-key/models/change-password-response-dto.ts new file mode 100644 index 00000000..c9b5ac65 --- /dev/null +++ b/packages/api/ku-key/models/change-password-response-dto.ts @@ -0,0 +1,27 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * KU-KEY API + * API for KU-KEY service + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** + * + * @export + * @interface ChangePasswordResponseDto + */ +export interface ChangePasswordResponseDto { + /** + * 비밀번호 변경 여부 + * @type {boolean} + * @memberof ChangePasswordResponseDto + */ + change: boolean +} diff --git a/packages/api/ku-key/models/character.ts b/packages/api/ku-key/models/character.ts new file mode 100644 index 00000000..6ce4f3c4 --- /dev/null +++ b/packages/api/ku-key/models/character.ts @@ -0,0 +1,46 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * KU-KEY API + * API for KU-KEY service + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** + * + * @export + * @interface Character + */ +export interface Character { + /** + * 캐릭터 종류 + * @type {string} + * @memberof Character + */ + type: CharacterType + /** + * 캐릭터 레벨 + * @type {number} + * @memberof Character + */ + level: number +} + +/** + * @export + * @enum {string} + */ +export type CharacterType = + | 'character1' + | 'character2' + | 'character3' + | 'character4' + | 'character5' + | 'anonymous' + | 'deleted' diff --git a/packages/api/ku-key/models/check-course-review-reading-ticket-response-dto.ts b/packages/api/ku-key/models/check-course-review-reading-ticket-response-dto.ts new file mode 100644 index 00000000..852503c4 --- /dev/null +++ b/packages/api/ku-key/models/check-course-review-reading-ticket-response-dto.ts @@ -0,0 +1,27 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * KU-KEY API + * API for KU-KEY service + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** + * + * @export + * @interface CheckCourseReviewReadingTicketResponseDto + */ +export interface CheckCourseReviewReadingTicketResponseDto { + /** + * 강의평 열람권 만료 일자 + * @type {string} + * @memberof CheckCourseReviewReadingTicketResponseDto + */ + date: string +} diff --git a/packages/api/ku-key/models/check-possible-response-dto.ts b/packages/api/ku-key/models/check-possible-response-dto.ts new file mode 100644 index 00000000..2740069c --- /dev/null +++ b/packages/api/ku-key/models/check-possible-response-dto.ts @@ -0,0 +1,27 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * KU-KEY API + * API for KU-KEY service + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** + * + * @export + * @interface CheckPossibleResponseDto + */ +export interface CheckPossibleResponseDto { + /** + * 사용 가능 여부 + * @type {boolean} + * @memberof CheckPossibleResponseDto + */ + possible: boolean +} diff --git a/packages/api/ku-key/models/comment.ts b/packages/api/ku-key/models/comment.ts new file mode 100644 index 00000000..e5e68a1e --- /dev/null +++ b/packages/api/ku-key/models/comment.ts @@ -0,0 +1,89 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * KU-KEY API + * API for KU-KEY service + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { CommunityUser } from './community-user' + +/** + * + * @export + * @interface Comment + */ +export interface Comment { + /** + * 댓글 고유 ID + * @type {number} + * @memberof Comment + */ + id: number + /** + * 삭제된 댓글인지 여부 + * @type {boolean} + * @memberof Comment + */ + isDeleted: boolean + /** + * 댓글 생성 시간 + * @type {string} + * @memberof Comment + */ + createdAt: string + /** + * 댓글 수정 시간 + * @type {string} + * @memberof Comment + */ + updatedAt: string + /** + * 본인이 작성한 댓글인지 여부 + * @type {boolean} + * @memberof Comment + */ + isMyComment: boolean + /** + * 게시글 작성자의 댓글인지 여부 + * @type {boolean} + * @memberof Comment + */ + isAuthor: boolean + /** + * 댓글 내용 + * @type {string} + * @memberof Comment + */ + content: string + /** + * 댓글을 작성한 사용자 + * @type {CommunityUser} + * @memberof Comment + */ + user: CommunityUser + /** + * 좋아요 수 + * @type {number} + * @memberof Comment + */ + likeCount: number + /** + * 좋아요 눌렀는지 여부 + * @type {boolean} + * @memberof Comment + */ + myLike: boolean + /** + * 답글 + * @type {Array} + * @memberof Comment + */ + reply: Array +} diff --git a/packages/api/ku-key/models/common-course-response-dto-details.ts b/packages/api/ku-key/models/common-course-response-dto-details.ts new file mode 100644 index 00000000..35d2fcf8 --- /dev/null +++ b/packages/api/ku-key/models/common-course-response-dto-details.ts @@ -0,0 +1,45 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * KU-KEY API + * API for KU-KEY service + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** + * + * @export + * @interface CommonCourseResponseDtoDetails + */ +export interface CommonCourseResponseDtoDetails { + /** + * + * @type {string} + * @memberof CommonCourseResponseDtoDetails + */ + day?: string + /** + * + * @type {string} + * @memberof CommonCourseResponseDtoDetails + */ + startTime?: string + /** + * + * @type {string} + * @memberof CommonCourseResponseDtoDetails + */ + endTime?: string + /** + * + * @type {string} + * @memberof CommonCourseResponseDtoDetails + */ + classroom?: string +} diff --git a/packages/api/ku-key/models/common-course-response-dto.ts b/packages/api/ku-key/models/common-course-response-dto.ts new file mode 100644 index 00000000..c53bdf48 --- /dev/null +++ b/packages/api/ku-key/models/common-course-response-dto.ts @@ -0,0 +1,107 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * KU-KEY API + * API for KU-KEY service + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { CommonCourseResponseDtoDetails } from './common-course-response-dto-details' + +/** + * + * @export + * @interface CommonCourseResponseDto + */ +export interface CommonCourseResponseDto { + /** + * ID + * @type {number} + * @memberof CommonCourseResponseDto + */ + id: number + /** + * 교수 이름 + * @type {string} + * @memberof CommonCourseResponseDto + */ + professorName: string + /** + * 강의 구분 + * @type {string} + * @memberof CommonCourseResponseDto + */ + category: string + /** + * 단과대 이름 + * @type {string} + * @memberof CommonCourseResponseDto + */ + college: string + /** + * 강의명 + * @type {string} + * @memberof CommonCourseResponseDto + */ + courseName: string + /** + * 학수 번호 + * @type {string} + * @memberof CommonCourseResponseDto + */ + courseCode: string + /** + * 학점 + * @type {number} + * @memberof CommonCourseResponseDto + */ + credit: number + /** + * 학과 이름 + * @type {string} + * @memberof CommonCourseResponseDto + */ + major: string + /** + * 교환학생 수강 가능 여부 + * @type {boolean} + * @memberof CommonCourseResponseDto + */ + hasExchangeSeat: boolean + /** + * 연도 + * @type {string} + * @memberof CommonCourseResponseDto + */ + year: string + /** + * 학기 + * @type {string} + * @memberof CommonCourseResponseDto + */ + semester: string + /** + * 강의계획서 url + * @type {string} + * @memberof CommonCourseResponseDto + */ + syllabus: string + /** + * 강의평점 + * @type {number} + * @memberof CommonCourseResponseDto + */ + totalRate: number + /** + * 강의 세부사항 + * @type {Array} + * @memberof CommonCourseResponseDto + */ + details: Array +} diff --git a/packages/api/ku-key/models/common-delete-response-dto.ts b/packages/api/ku-key/models/common-delete-response-dto.ts new file mode 100644 index 00000000..3b0d7cf3 --- /dev/null +++ b/packages/api/ku-key/models/common-delete-response-dto.ts @@ -0,0 +1,27 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * KU-KEY API + * API for KU-KEY service + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** + * + * @export + * @interface CommonDeleteResponseDto + */ +export interface CommonDeleteResponseDto { + /** + * 삭제 여부 + * @type {boolean} + * @memberof CommonDeleteResponseDto + */ + deleted: boolean +} diff --git a/packages/api/ku-key/models/common-timetable-response-dto.ts b/packages/api/ku-key/models/common-timetable-response-dto.ts new file mode 100644 index 00000000..f90a67fd --- /dev/null +++ b/packages/api/ku-key/models/common-timetable-response-dto.ts @@ -0,0 +1,63 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * KU-KEY API + * API for KU-KEY service + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** + * + * @export + * @interface CommonTimetableResponseDto + */ +export interface CommonTimetableResponseDto { + /** + * ID + * @type {number} + * @memberof CommonTimetableResponseDto + */ + id: number + /** + * 유저 ID + * @type {number} + * @memberof CommonTimetableResponseDto + */ + userId: number + /** + * 시간표 이름 + * @type {string} + * @memberof CommonTimetableResponseDto + */ + timetableName: string + /** + * 학기 + * @type {string} + * @memberof CommonTimetableResponseDto + */ + semester: string + /** + * 연도 + * @type {string} + * @memberof CommonTimetableResponseDto + */ + year: string + /** + * 대표 시간표 여부 + * @type {boolean} + * @memberof CommonTimetableResponseDto + */ + mainTimetable: boolean + /** + * 시간표 색상 + * @type {string} + * @memberof CommonTimetableResponseDto + */ + color: string +} diff --git a/packages/api/ku-key/models/community-user.ts b/packages/api/ku-key/models/community-user.ts new file mode 100644 index 00000000..ebd99edd --- /dev/null +++ b/packages/api/ku-key/models/community-user.ts @@ -0,0 +1,47 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * KU-KEY API + * API for KU-KEY service + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { Character } from './character' + +/** + * + * @export + * @interface CommunityUser + */ +export interface CommunityUser { + /** + * 사용자, 익명이면 \"Anonymous\", 탈퇴했으면 \"Deleted\" + * @type {string} + * @memberof CommunityUser + */ + username: string + /** + * 사용자가 익명인지 + * @type {boolean} + * @memberof CommunityUser + */ + isAnonymous: boolean + /** + * 사용자가 탈퇴된 유저인지 + * @type {boolean} + * @memberof CommunityUser + */ + isDeleted: boolean + /** + * 사용자 캐릭터 + * @type {Character} + * @memberof CommunityUser + */ + character: Character +} diff --git a/packages/api/ku-key/models/course-review-response-dto.ts b/packages/api/ku-key/models/course-review-response-dto.ts new file mode 100644 index 00000000..0eee9885 --- /dev/null +++ b/packages/api/ku-key/models/course-review-response-dto.ts @@ -0,0 +1,117 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * KU-KEY API + * API for KU-KEY service + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** + * + * @export + * @interface CourseReviewResponseDto + */ +export interface CourseReviewResponseDto { + /** + * id + * @type {number} + * @memberof CourseReviewResponseDto + */ + id: number + /** + * 작성자 + * @type {string} + * @memberof CourseReviewResponseDto + */ + reviewer: string + /** + * 작성일 + * @type {string} + * @memberof CourseReviewResponseDto + */ + createdAt: string + /** + * 강의 평점 + * @type {number} + * @memberof CourseReviewResponseDto + */ + rate: number + /** + * 수업 난이도 + * @type {number} + * @memberof CourseReviewResponseDto + */ + classLevel: number + /** + * 팀 프로젝트 난이도 + * @type {number} + * @memberof CourseReviewResponseDto + */ + teamProject: number + /** + * 학습량 + * @type {number} + * @memberof CourseReviewResponseDto + */ + amountLearned: number + /** + * 교수님 강의력 + * @type {number} + * @memberof CourseReviewResponseDto + */ + teachingSkills: number + /** + * 출석체크 여부 + * @type {number} + * @memberof CourseReviewResponseDto + */ + attendance: number + /** + * 추천수 + * @type {number} + * @memberof CourseReviewResponseDto + */ + recommendCount: number + /** + * 강의평 남기기 + * @type {string} + * @memberof CourseReviewResponseDto + */ + textReview: string + /** + * 해당 강의 교수님 성함 + * @type {string} + * @memberof CourseReviewResponseDto + */ + professorName: string + /** + * 해당 강의 연도 + * @type {string} + * @memberof CourseReviewResponseDto + */ + year: string + /** + * 해당 강의 학기 + * @type {string} + * @memberof CourseReviewResponseDto + */ + semester: string + /** + * 해당 강의 학수번호 + * @type {string} + * @memberof CourseReviewResponseDto + */ + courseCode: string + /** + * 강의평 작성한 유저 ID + * @type {number} + * @memberof CourseReviewResponseDto + */ + userId: number +} diff --git a/packages/api/ku-key/models/create-calendar-data-request-dto.ts b/packages/api/ku-key/models/create-calendar-data-request-dto.ts new file mode 100644 index 00000000..7ac06552 --- /dev/null +++ b/packages/api/ku-key/models/create-calendar-data-request-dto.ts @@ -0,0 +1,51 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * KU-KEY API + * API for KU-KEY service + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** + * + * @export + * @interface CreateCalendarDataRequestDto + */ +export interface CreateCalendarDataRequestDto { + /** + * 시작 날짜 (AAAA-BB-CC 형식) + * @type {string} + * @memberof CreateCalendarDataRequestDto + */ + startDate: string + /** + * 종료 날짜 (AAAA-BB-CC 형식) + * @type {string} + * @memberof CreateCalendarDataRequestDto + */ + endDate: string + /** + * 행사/일정 제목 + * @type {string} + * @memberof CreateCalendarDataRequestDto + */ + title: string + /** + * 행사/일정 설명 + * @type {string} + * @memberof CreateCalendarDataRequestDto + */ + description: string + /** + * 학사 일정 여부 + * @type {boolean} + * @memberof CreateCalendarDataRequestDto + */ + isAcademic: boolean +} diff --git a/packages/api/ku-key/models/create-calendar-data-response-dto.ts b/packages/api/ku-key/models/create-calendar-data-response-dto.ts new file mode 100644 index 00000000..8d5e831a --- /dev/null +++ b/packages/api/ku-key/models/create-calendar-data-response-dto.ts @@ -0,0 +1,57 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * KU-KEY API + * API for KU-KEY service + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** + * + * @export + * @interface CreateCalendarDataResponseDto + */ +export interface CreateCalendarDataResponseDto { + /** + * 행사/일정 id + * @type {number} + * @memberof CreateCalendarDataResponseDto + */ + id: number + /** + * 시작 날짜 (AAAA-BB-CC 형식) + * @type {string} + * @memberof CreateCalendarDataResponseDto + */ + startDate: string + /** + * 종료 날짜 (AAAA-BB-CC 형식) + * @type {string} + * @memberof CreateCalendarDataResponseDto + */ + endDate: string + /** + * 행사/일정 제목 + * @type {string} + * @memberof CreateCalendarDataResponseDto + */ + title: string + /** + * 행사/일정 설명 + * @type {string} + * @memberof CreateCalendarDataResponseDto + */ + description: string + /** + * 학사 일정 여부 + * @type {boolean} + * @memberof CreateCalendarDataResponseDto + */ + isAcademic: boolean +} diff --git a/packages/api/ku-key/models/create-club-response-dto.ts b/packages/api/ku-key/models/create-club-response-dto.ts new file mode 100644 index 00000000..d913496d --- /dev/null +++ b/packages/api/ku-key/models/create-club-response-dto.ts @@ -0,0 +1,75 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * KU-KEY API + * API for KU-KEY service + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** + * + * @export + * @interface CreateClubResponseDto + */ +export interface CreateClubResponseDto { + /** + * club table의 PK + * @type {number} + * @memberof CreateClubResponseDto + */ + clubId: number + /** + * 동아리명 + * @type {string} + * @memberof CreateClubResponseDto + */ + name: string + /** + * 동아리 요약 + * @type {string} + * @memberof CreateClubResponseDto + */ + summary: string + /** + * 정기 모임 + * @type {string} + * @memberof CreateClubResponseDto + */ + regularMeeting: string + /** + * 모집 기간 + * @type {string} + * @memberof CreateClubResponseDto + */ + recruitmentPeriod: string + /** + * 동아리 설명 + * @type {string} + * @memberof CreateClubResponseDto + */ + description: string + /** + * 동아리 사진 URL + * @type {string} + * @memberof CreateClubResponseDto + */ + imageUrl: string + /** + * 인스타그램 링크 + * @type {string} + * @memberof CreateClubResponseDto + */ + instagramLink?: string + /** + * 유튜브 링크 + * @type {string} + * @memberof CreateClubResponseDto + */ + youtubeLink?: string +} diff --git a/packages/api/ku-key/models/create-comment-request-dto.ts b/packages/api/ku-key/models/create-comment-request-dto.ts new file mode 100644 index 00000000..db43fd98 --- /dev/null +++ b/packages/api/ku-key/models/create-comment-request-dto.ts @@ -0,0 +1,33 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * KU-KEY API + * API for KU-KEY service + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** + * + * @export + * @interface CreateCommentRequestDto + */ +export interface CreateCommentRequestDto { + /** + * 댓글 내용 + * @type {string} + * @memberof CreateCommentRequestDto + */ + content: string + /** + * 익명 여부 + * @type {boolean} + * @memberof CreateCommentRequestDto + */ + isAnonymous: boolean +} diff --git a/packages/api/ku-key/models/create-course-review-request-dto.ts b/packages/api/ku-key/models/create-course-review-request-dto.ts new file mode 100644 index 00000000..6d92cc66 --- /dev/null +++ b/packages/api/ku-key/models/create-course-review-request-dto.ts @@ -0,0 +1,87 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * KU-KEY API + * API for KU-KEY service + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** + * + * @export + * @interface CreateCourseReviewRequestDto + */ +export interface CreateCourseReviewRequestDto { + /** + * 강의 평점 + * @type {number} + * @memberof CreateCourseReviewRequestDto + */ + rate: number + /** + * 수업 난이도 + * @type {number} + * @memberof CreateCourseReviewRequestDto + */ + classLevel: number + /** + * 팀 프로젝트 난이도 + * @type {number} + * @memberof CreateCourseReviewRequestDto + */ + teamProject: number + /** + * 학습량 + * @type {number} + * @memberof CreateCourseReviewRequestDto + */ + amountLearned: number + /** + * 교수님 강의력 + * @type {number} + * @memberof CreateCourseReviewRequestDto + */ + teachingSkills: number + /** + * 출석체크 여부 + * @type {number} + * @memberof CreateCourseReviewRequestDto + */ + attendance: number + /** + * 강의평 남기기 + * @type {string} + * @memberof CreateCourseReviewRequestDto + */ + textReview: string + /** + * 연도 + * @type {string} + * @memberof CreateCourseReviewRequestDto + */ + year: string + /** + * 학기 + * @type {string} + * @memberof CreateCourseReviewRequestDto + */ + semester: string + /** + * 교수님 성함 + * @type {string} + * @memberof CreateCourseReviewRequestDto + */ + professorName: string + /** + * 학수번호 + * @type {string} + * @memberof CreateCourseReviewRequestDto + */ + courseCode: string +} diff --git a/packages/api/ku-key/models/create-report-request-dto.ts b/packages/api/ku-key/models/create-report-request-dto.ts new file mode 100644 index 00000000..3ccf27bc --- /dev/null +++ b/packages/api/ku-key/models/create-report-request-dto.ts @@ -0,0 +1,39 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * KU-KEY API + * API for KU-KEY service + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** + * + * @export + * @interface CreateReportRequestDto + */ +export interface CreateReportRequestDto { + /** + * 게시글 ID + * @type {number} + * @memberof CreateReportRequestDto + */ + postId: number + /** + * 댓글 ID (댓글 신고일 경우 존재, 게시글 신고일 경우 null + * @type {number} + * @memberof CreateReportRequestDto + */ + commentId?: number + /** + * 신고 사유 + * @type {string} + * @memberof CreateReportRequestDto + */ + reason: string +} diff --git a/packages/api/ku-key/models/create-report-response-dto.ts b/packages/api/ku-key/models/create-report-response-dto.ts new file mode 100644 index 00000000..994deb38 --- /dev/null +++ b/packages/api/ku-key/models/create-report-response-dto.ts @@ -0,0 +1,27 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * KU-KEY API + * API for KU-KEY service + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** + * + * @export + * @interface CreateReportResponseDto + */ +export interface CreateReportResponseDto { + /** + * 신고 처리 여부 + * @type {boolean} + * @memberof CreateReportResponseDto + */ + isReported: boolean +} diff --git a/packages/api/ku-key/models/create-schedule-request-dto.ts b/packages/api/ku-key/models/create-schedule-request-dto.ts new file mode 100644 index 00000000..d8e81aa8 --- /dev/null +++ b/packages/api/ku-key/models/create-schedule-request-dto.ts @@ -0,0 +1,57 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * KU-KEY API + * API for KU-KEY service + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** + * + * @export + * @interface CreateScheduleRequestDto + */ +export interface CreateScheduleRequestDto { + /** + * 시간표 ID + * @type {number} + * @memberof CreateScheduleRequestDto + */ + timetableId: number + /** + * 일정 이름 + * @type {string} + * @memberof CreateScheduleRequestDto + */ + title: string + /** + * 요일 + * @type {string} + * @memberof CreateScheduleRequestDto + */ + day: string + /** + * 시작 시간 + * @type {string} + * @memberof CreateScheduleRequestDto + */ + startTime: string + /** + * 종료 시간 + * @type {string} + * @memberof CreateScheduleRequestDto + */ + endTime: string + /** + * 장소 + * @type {string} + * @memberof CreateScheduleRequestDto + */ + location: string +} diff --git a/packages/api/ku-key/models/create-schedule-response-dto.ts b/packages/api/ku-key/models/create-schedule-response-dto.ts new file mode 100644 index 00000000..2f320ae5 --- /dev/null +++ b/packages/api/ku-key/models/create-schedule-response-dto.ts @@ -0,0 +1,63 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * KU-KEY API + * API for KU-KEY service + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** + * + * @export + * @interface CreateScheduleResponseDto + */ +export interface CreateScheduleResponseDto { + /** + * ID + * @type {number} + * @memberof CreateScheduleResponseDto + */ + id: number + /** + * 시간표 ID + * @type {number} + * @memberof CreateScheduleResponseDto + */ + timetableId: number + /** + * 일정 이름 + * @type {string} + * @memberof CreateScheduleResponseDto + */ + title: string + /** + * 요일 + * @type {string} + * @memberof CreateScheduleResponseDto + */ + day: string + /** + * 시작 시간 + * @type {string} + * @memberof CreateScheduleResponseDto + */ + startTime: string + /** + * 종료 시간 + * @type {string} + * @memberof CreateScheduleResponseDto + */ + endTime: string + /** + * 장소 + * @type {string} + * @memberof CreateScheduleResponseDto + */ + location: string +} diff --git a/packages/api/ku-key/models/create-timetable-course-response-dto.ts b/packages/api/ku-key/models/create-timetable-course-response-dto.ts new file mode 100644 index 00000000..ca57959e --- /dev/null +++ b/packages/api/ku-key/models/create-timetable-course-response-dto.ts @@ -0,0 +1,39 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * KU-KEY API + * API for KU-KEY service + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** + * + * @export + * @interface CreateTimetableCourseResponseDto + */ +export interface CreateTimetableCourseResponseDto { + /** + * ID + * @type {number} + * @memberof CreateTimetableCourseResponseDto + */ + id: number + /** + * 시간표 ID + * @type {number} + * @memberof CreateTimetableCourseResponseDto + */ + timetableId: number + /** + * 강의 ID + * @type {number} + * @memberof CreateTimetableCourseResponseDto + */ + courseId: number +} diff --git a/packages/api/ku-key/models/create-timetable-dto.ts b/packages/api/ku-key/models/create-timetable-dto.ts new file mode 100644 index 00000000..f094757a --- /dev/null +++ b/packages/api/ku-key/models/create-timetable-dto.ts @@ -0,0 +1,39 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * KU-KEY API + * API for KU-KEY service + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** + * + * @export + * @interface CreateTimetableDto + */ +export interface CreateTimetableDto { + /** + * 학기 + * @type {string} + * @memberof CreateTimetableDto + */ + semester: string + /** + * 연도 + * @type {string} + * @memberof CreateTimetableDto + */ + year: string + /** + * 시간표 이름 + * @type {string} + * @memberof CreateTimetableDto + */ + timetableName: string +} diff --git a/packages/api/ku-key/models/cursor-page-meta-response-dto.ts b/packages/api/ku-key/models/cursor-page-meta-response-dto.ts new file mode 100644 index 00000000..11448c35 --- /dev/null +++ b/packages/api/ku-key/models/cursor-page-meta-response-dto.ts @@ -0,0 +1,33 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * KU-KEY API + * API for KU-KEY service + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** + * + * @export + * @interface CursorPageMetaResponseDto + */ +export interface CursorPageMetaResponseDto { + /** + * 다음 페이지 존재 여부 + * @type {boolean} + * @memberof CursorPageMetaResponseDto + */ + hasNextData: boolean + /** + * 다음페이지 조회용 커서, 다음페이지 없으면 null + * @type {string} + * @memberof CursorPageMetaResponseDto + */ + nextCursor: string +} diff --git a/packages/api/ku-key/models/delete-calendar-data-response-dto.ts b/packages/api/ku-key/models/delete-calendar-data-response-dto.ts new file mode 100644 index 00000000..5c4bab7e --- /dev/null +++ b/packages/api/ku-key/models/delete-calendar-data-response-dto.ts @@ -0,0 +1,27 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * KU-KEY API + * API for KU-KEY service + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** + * + * @export + * @interface DeleteCalendarDataResponseDto + */ +export interface DeleteCalendarDataResponseDto { + /** + * 행사/일정 삭제 여부 + * @type {boolean} + * @memberof DeleteCalendarDataResponseDto + */ + deleted: boolean +} diff --git a/packages/api/ku-key/models/delete-club-response-dto.ts b/packages/api/ku-key/models/delete-club-response-dto.ts new file mode 100644 index 00000000..395bca96 --- /dev/null +++ b/packages/api/ku-key/models/delete-club-response-dto.ts @@ -0,0 +1,27 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * KU-KEY API + * API for KU-KEY service + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** + * + * @export + * @interface DeleteClubResponseDto + */ +export interface DeleteClubResponseDto { + /** + * 삭제 여부 + * @type {boolean} + * @memberof DeleteClubResponseDto + */ + deleted: boolean +} diff --git a/packages/api/ku-key/models/delete-comment-response-dto.ts b/packages/api/ku-key/models/delete-comment-response-dto.ts new file mode 100644 index 00000000..30413e0f --- /dev/null +++ b/packages/api/ku-key/models/delete-comment-response-dto.ts @@ -0,0 +1,27 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * KU-KEY API + * API for KU-KEY service + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** + * + * @export + * @interface DeleteCommentResponseDto + */ +export interface DeleteCommentResponseDto { + /** + * 댓글 삭제 여부 + * @type {boolean} + * @memberof DeleteCommentResponseDto + */ + deleted: boolean +} diff --git a/packages/api/ku-key/models/delete-friendship-response-dto.ts b/packages/api/ku-key/models/delete-friendship-response-dto.ts new file mode 100644 index 00000000..93c9f6f4 --- /dev/null +++ b/packages/api/ku-key/models/delete-friendship-response-dto.ts @@ -0,0 +1,27 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * KU-KEY API + * API for KU-KEY service + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** + * + * @export + * @interface DeleteFriendshipResponseDto + */ +export interface DeleteFriendshipResponseDto { + /** + * 삭제 여부 + * @type {boolean} + * @memberof DeleteFriendshipResponseDto + */ + deleted: boolean +} diff --git a/packages/api/ku-key/models/delete-post-response-dto.ts b/packages/api/ku-key/models/delete-post-response-dto.ts new file mode 100644 index 00000000..e7c09b89 --- /dev/null +++ b/packages/api/ku-key/models/delete-post-response-dto.ts @@ -0,0 +1,27 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * KU-KEY API + * API for KU-KEY service + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** + * + * @export + * @interface DeletePostResponseDto + */ +export interface DeletePostResponseDto { + /** + * 게시글 삭제 여부 + * @type {boolean} + * @memberof DeletePostResponseDto + */ + deleted: boolean +} diff --git a/packages/api/ku-key/models/delete-schedule-response-dto.ts b/packages/api/ku-key/models/delete-schedule-response-dto.ts new file mode 100644 index 00000000..fa289799 --- /dev/null +++ b/packages/api/ku-key/models/delete-schedule-response-dto.ts @@ -0,0 +1,27 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * KU-KEY API + * API for KU-KEY service + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** + * + * @export + * @interface DeleteScheduleResponseDto + */ +export interface DeleteScheduleResponseDto { + /** + * 삭제 여부 + * @type {boolean} + * @memberof DeleteScheduleResponseDto + */ + deleted: boolean +} diff --git a/packages/api/ku-key/models/delete-user-response-dto.ts b/packages/api/ku-key/models/delete-user-response-dto.ts new file mode 100644 index 00000000..4af7bddc --- /dev/null +++ b/packages/api/ku-key/models/delete-user-response-dto.ts @@ -0,0 +1,27 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * KU-KEY API + * API for KU-KEY service + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** + * + * @export + * @interface DeleteUserResponseDto + */ +export interface DeleteUserResponseDto { + /** + * 회원 탈퇴 성공 여부 + * @type {boolean} + * @memberof DeleteUserResponseDto + */ + deleted: boolean +} diff --git a/packages/api/ku-key/models/event.ts b/packages/api/ku-key/models/event.ts new file mode 100644 index 00000000..b606e01d --- /dev/null +++ b/packages/api/ku-key/models/event.ts @@ -0,0 +1,39 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * KU-KEY API + * API for KU-KEY service + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** + * + * @export + * @interface Event + */ +export interface Event { + /** + * 행사/일정 id + * @type {number} + * @memberof Event + */ + id: number + /** + * 행사/일정 제목 + * @type {string} + * @memberof Event + */ + title: string + /** + * 행사/일정 설명 + * @type {string} + * @memberof Event + */ + description: string +} diff --git a/packages/api/ku-key/models/friend-character-dto.ts b/packages/api/ku-key/models/friend-character-dto.ts new file mode 100644 index 00000000..f88123ee --- /dev/null +++ b/packages/api/ku-key/models/friend-character-dto.ts @@ -0,0 +1,46 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * KU-KEY API + * API for KU-KEY service + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** + * + * @export + * @interface FriendCharacterDto + */ +export interface FriendCharacterDto { + /** + * 캐릭터 종류 + * @type {string} + * @memberof FriendCharacterDto + */ + type: FriendCharacterDtoType + /** + * 캐릭터 레벨 + * @type {number} + * @memberof FriendCharacterDto + */ + level: number +} + +/** + * @export + * @enum {string} + */ +export type FriendCharacterDtoType = + | 'character1' + | 'character2' + | 'character3' + | 'character4' + | 'character5' + | 'anonymous' + | 'deleted' diff --git a/packages/api/ku-key/models/get-academic-schedule-data-response-dto.ts b/packages/api/ku-key/models/get-academic-schedule-data-response-dto.ts new file mode 100644 index 00000000..ead764e2 --- /dev/null +++ b/packages/api/ku-key/models/get-academic-schedule-data-response-dto.ts @@ -0,0 +1,35 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * KU-KEY API + * API for KU-KEY service + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { AcademicSchedule } from './academic-schedule' + +/** + * + * @export + * @interface GetAcademicScheduleDataResponseDto + */ +export interface GetAcademicScheduleDataResponseDto { + /** + * 월 + * @type {number} + * @memberof GetAcademicScheduleDataResponseDto + */ + month: number + /** + * 월별 Academic Schedule 행사/일정 + * @type {Array} + * @memberof GetAcademicScheduleDataResponseDto + */ + schedules: Array +} diff --git a/packages/api/ku-key/models/get-banner-image-url-response-dto.ts b/packages/api/ku-key/models/get-banner-image-url-response-dto.ts new file mode 100644 index 00000000..d6734410 --- /dev/null +++ b/packages/api/ku-key/models/get-banner-image-url-response-dto.ts @@ -0,0 +1,27 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * KU-KEY API + * API for KU-KEY service + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** + * + * @export + * @interface GetBannerImageUrlResponseDto + */ +export interface GetBannerImageUrlResponseDto { + /** + * S3에 저장된 배너 이미지 url + * @type {string} + * @memberof GetBannerImageUrlResponseDto + */ + imageUrl: string +} diff --git a/packages/api/ku-key/models/get-board-response-dto.ts b/packages/api/ku-key/models/get-board-response-dto.ts new file mode 100644 index 00000000..aa822772 --- /dev/null +++ b/packages/api/ku-key/models/get-board-response-dto.ts @@ -0,0 +1,33 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * KU-KEY API + * API for KU-KEY service + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** + * + * @export + * @interface GetBoardResponseDto + */ +export interface GetBoardResponseDto { + /** + * 게시판 고유 ID + * @type {number} + * @memberof GetBoardResponseDto + */ + id: number + /** + * 게시판 이름 + * @type {string} + * @memberof GetBoardResponseDto + */ + name: string +} diff --git a/packages/api/ku-key/models/get-club-detail-response-dto.ts b/packages/api/ku-key/models/get-club-detail-response-dto.ts new file mode 100644 index 00000000..b8fb6d3f --- /dev/null +++ b/packages/api/ku-key/models/get-club-detail-response-dto.ts @@ -0,0 +1,99 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * KU-KEY API + * API for KU-KEY service + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** + * + * @export + * @interface GetClubDetailResponseDto + */ +export interface GetClubDetailResponseDto { + /** + * club table의 PK + * @type {number} + * @memberof GetClubDetailResponseDto + */ + clubId: number + /** + * 동아리명 + * @type {string} + * @memberof GetClubDetailResponseDto + */ + name: string + /** + * 동아리 카테고리 + * @type {string} + * @memberof GetClubDetailResponseDto + */ + category: string + /** + * 동아리 요약 + * @type {string} + * @memberof GetClubDetailResponseDto + */ + summary: string + /** + * 정기 모임 + * @type {string} + * @memberof GetClubDetailResponseDto + */ + regularMeeting: string + /** + * 모집 기간 + * @type {string} + * @memberof GetClubDetailResponseDto + */ + recruitmentPeriod: string + /** + * 동아리 설명 + * @type {string} + * @memberof GetClubDetailResponseDto + */ + description: string + /** + * 동아리 사진 URL 목록 + * @type {Array} + * @memberof GetClubDetailResponseDto + */ + imageUrl: Array + /** + * 좋아요 개수 + * @type {number} + * @memberof GetClubDetailResponseDto + */ + likeCount: number + /** + * 인스타그램 링크 + * @type {string} + * @memberof GetClubDetailResponseDto + */ + instagramLink?: string + /** + * 유튜브 링크 + * @type {string} + * @memberof GetClubDetailResponseDto + */ + youtubeLink?: string + /** + * 좋아요 여부 + * @type {boolean} + * @memberof GetClubDetailResponseDto + */ + isLiked: boolean + /** + * 링크 개수 + * @type {number} + * @memberof GetClubDetailResponseDto + */ + linkCount: number +} diff --git a/packages/api/ku-key/models/get-club-response-dto.ts b/packages/api/ku-key/models/get-club-response-dto.ts new file mode 100644 index 00000000..f854b002 --- /dev/null +++ b/packages/api/ku-key/models/get-club-response-dto.ts @@ -0,0 +1,93 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * KU-KEY API + * API for KU-KEY service + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** + * + * @export + * @interface GetClubResponseDto + */ +export interface GetClubResponseDto { + /** + * club table의 PK + * @type {number} + * @memberof GetClubResponseDto + */ + clubId: number + /** + * 동아리명 + * @type {string} + * @memberof GetClubResponseDto + */ + name: string + /** + * 동아리 카테고리 + * @type {string} + * @memberof GetClubResponseDto + */ + category: string + /** + * 동아리 요약 + * @type {string} + * @memberof GetClubResponseDto + */ + summary: string + /** + * 정기 모임 + * @type {string} + * @memberof GetClubResponseDto + */ + regularMeeting: string + /** + * 모집 기간 + * @type {string} + * @memberof GetClubResponseDto + */ + recruitmentPeriod: string + /** + * 동아리 설명 + * @type {string} + * @memberof GetClubResponseDto + */ + description: string + /** + * 동아리 사진 URL + * @type {string} + * @memberof GetClubResponseDto + */ + imageUrl: string + /** + * 좋아요 개수 + * @type {number} + * @memberof GetClubResponseDto + */ + likeCount: number + /** + * 인스타그램 링크 + * @type {string} + * @memberof GetClubResponseDto + */ + instagramLink?: string + /** + * 유튜브 링크 + * @type {string} + * @memberof GetClubResponseDto + */ + youtubeLink?: string + /** + * 좋아요 여부 + * @type {boolean} + * @memberof GetClubResponseDto + */ + isLiked: boolean +} diff --git a/packages/api/ku-key/models/get-comment-response-dto.ts b/packages/api/ku-key/models/get-comment-response-dto.ts new file mode 100644 index 00000000..5d7c2931 --- /dev/null +++ b/packages/api/ku-key/models/get-comment-response-dto.ts @@ -0,0 +1,83 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * KU-KEY API + * API for KU-KEY service + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { CommunityUser } from './community-user' + +/** + * + * @export + * @interface GetCommentResponseDto + */ +export interface GetCommentResponseDto { + /** + * 댓글 고유 ID + * @type {number} + * @memberof GetCommentResponseDto + */ + id: number + /** + * 삭제된 댓글인지 여부 + * @type {boolean} + * @memberof GetCommentResponseDto + */ + isDeleted: boolean + /** + * 댓글 생성 시간 + * @type {string} + * @memberof GetCommentResponseDto + */ + createdAt: string + /** + * 댓글 수정 시간 + * @type {string} + * @memberof GetCommentResponseDto + */ + updatedAt: string + /** + * 본인이 작성한 댓글인지 여부 + * @type {boolean} + * @memberof GetCommentResponseDto + */ + isMyComment: boolean + /** + * 게시글 작성자의 댓글인지 여부 + * @type {boolean} + * @memberof GetCommentResponseDto + */ + isAuthor: boolean + /** + * 댓글 내용 + * @type {string} + * @memberof GetCommentResponseDto + */ + content: string + /** + * 댓글을 작성한 사용자 + * @type {CommunityUser} + * @memberof GetCommentResponseDto + */ + user: CommunityUser + /** + * 좋아요 수 + * @type {number} + * @memberof GetCommentResponseDto + */ + likeCount: number + /** + * 좋아요 눌렀는지 여부 + * @type {boolean} + * @memberof GetCommentResponseDto + */ + myLike: boolean +} diff --git a/packages/api/ku-key/models/get-course-info-by-timetable-id-response-dto.ts b/packages/api/ku-key/models/get-course-info-by-timetable-id-response-dto.ts new file mode 100644 index 00000000..69a1758d --- /dev/null +++ b/packages/api/ku-key/models/get-course-info-by-timetable-id-response-dto.ts @@ -0,0 +1,75 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * KU-KEY API + * API for KU-KEY service + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** + * + * @export + * @interface GetCourseInfoByTimetableIdResponseDto + */ +export interface GetCourseInfoByTimetableIdResponseDto { + /** + * 강의 ID + * @type {number} + * @memberof GetCourseInfoByTimetableIdResponseDto + */ + courseId: number + /** + * 교수님 성함 + * @type {string} + * @memberof GetCourseInfoByTimetableIdResponseDto + */ + professorName: string + /** + * 강의명 + * @type {string} + * @memberof GetCourseInfoByTimetableIdResponseDto + */ + courseName: string + /** + * 학수 번호 + * @type {string} + * @memberof GetCourseInfoByTimetableIdResponseDto + */ + courseCode: string + /** + * 강의 계획서 + * @type {string} + * @memberof GetCourseInfoByTimetableIdResponseDto + */ + syllabus: string + /** + * 시작 시간 + * @type {string} + * @memberof GetCourseInfoByTimetableIdResponseDto + */ + startTime: string + /** + * 종료 시간 + * @type {string} + * @memberof GetCourseInfoByTimetableIdResponseDto + */ + endTime: string + /** + * 강의실 + * @type {string} + * @memberof GetCourseInfoByTimetableIdResponseDto + */ + classroom: string + /** + * 요일 + * @type {string} + * @memberof GetCourseInfoByTimetableIdResponseDto + */ + day: string +} diff --git a/packages/api/ku-key/models/get-course-review-summary-response-dto.ts b/packages/api/ku-key/models/get-course-review-summary-response-dto.ts new file mode 100644 index 00000000..9f6fc8c2 --- /dev/null +++ b/packages/api/ku-key/models/get-course-review-summary-response-dto.ts @@ -0,0 +1,69 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * KU-KEY API + * API for KU-KEY service + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** + * + * @export + * @interface GetCourseReviewSummaryResponseDto + */ +export interface GetCourseReviewSummaryResponseDto { + /** + * 토탈 평점 + * @type {number} + * @memberof GetCourseReviewSummaryResponseDto + */ + totalRate: number + /** + * 리뷰 개수 + * @type {number} + * @memberof GetCourseReviewSummaryResponseDto + */ + reviewCount: number + /** + * 수업 난이도 + * @type {number} + * @memberof GetCourseReviewSummaryResponseDto + */ + classLevel: number + /** + * 팀 프로젝트 난이도 + * @type {number} + * @memberof GetCourseReviewSummaryResponseDto + */ + teamProject: number + /** + * 학습량 + * @type {number} + * @memberof GetCourseReviewSummaryResponseDto + */ + amountLearned: number + /** + * 교수님 강의력 + * @type {number} + * @memberof GetCourseReviewSummaryResponseDto + */ + teachingSkills: number + /** + * 출석 체크 방식 + * @type {number} + * @memberof GetCourseReviewSummaryResponseDto + */ + attendance: number + /** + * 강의명 + * @type {string} + * @memberof GetCourseReviewSummaryResponseDto + */ + courseName: string +} diff --git a/packages/api/ku-key/models/get-course-reviews-response-dto.ts b/packages/api/ku-key/models/get-course-reviews-response-dto.ts new file mode 100644 index 00000000..e4de8d5d --- /dev/null +++ b/packages/api/ku-key/models/get-course-reviews-response-dto.ts @@ -0,0 +1,41 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * KU-KEY API + * API for KU-KEY service + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { ReviewDto } from './review-dto' + +/** + * + * @export + * @interface GetCourseReviewsResponseDto + */ +export interface GetCourseReviewsResponseDto { + /** + * 총 평점 + * @type {number} + * @memberof GetCourseReviewsResponseDto + */ + totalRate: number + /** + * 리뷰 개수 + * @type {number} + * @memberof GetCourseReviewsResponseDto + */ + reviewCount: number + /** + * 리뷰 목록 + * @type {Array} + * @memberof GetCourseReviewsResponseDto + */ + reviews: Array +} diff --git a/packages/api/ku-key/models/get-courses-with-course-reviews-response-dto.ts b/packages/api/ku-key/models/get-courses-with-course-reviews-response-dto.ts new file mode 100644 index 00000000..d07500ca --- /dev/null +++ b/packages/api/ku-key/models/get-courses-with-course-reviews-response-dto.ts @@ -0,0 +1,57 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * KU-KEY API + * API for KU-KEY service + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** + * + * @export + * @interface GetCoursesWithCourseReviewsResponseDto + */ +export interface GetCoursesWithCourseReviewsResponseDto { + /** + * 강의 ID + * @type {number} + * @memberof GetCoursesWithCourseReviewsResponseDto + */ + id: number + /** + * 교수명 + * @type {string} + * @memberof GetCoursesWithCourseReviewsResponseDto + */ + professorName: string + /** + * 강의 이름 + * @type {string} + * @memberof GetCoursesWithCourseReviewsResponseDto + */ + courseName: string + /** + * 강의평점 + * @type {number} + * @memberof GetCoursesWithCourseReviewsResponseDto + */ + totalRate: number + /** + * 연도 + * @type {string} + * @memberof GetCoursesWithCourseReviewsResponseDto + */ + year: string + /** + * 학기 + * @type {string} + * @memberof GetCoursesWithCourseReviewsResponseDto + */ + semester: string +} diff --git a/packages/api/ku-key/models/get-daily-calendar-data-response-dto.ts b/packages/api/ku-key/models/get-daily-calendar-data-response-dto.ts new file mode 100644 index 00000000..197a14d0 --- /dev/null +++ b/packages/api/ku-key/models/get-daily-calendar-data-response-dto.ts @@ -0,0 +1,41 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * KU-KEY API + * API for KU-KEY service + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { Event } from './event' + +/** + * + * @export + * @interface GetDailyCalendarDataResponseDto + */ +export interface GetDailyCalendarDataResponseDto { + /** + * 날짜 (AAAA-BB-CC 형식) + * @type {string} + * @memberof GetDailyCalendarDataResponseDto + */ + date: string + /** + * 행사/일정 제목 + * @type {Array} + * @memberof GetDailyCalendarDataResponseDto + */ + event: Array + /** + * 행사/일정 개수 + * @type {number} + * @memberof GetDailyCalendarDataResponseDto + */ + eventCount: number +} diff --git a/packages/api/ku-key/models/get-friend-response-dto.ts b/packages/api/ku-key/models/get-friend-response-dto.ts new file mode 100644 index 00000000..8f8d9c24 --- /dev/null +++ b/packages/api/ku-key/models/get-friend-response-dto.ts @@ -0,0 +1,71 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * KU-KEY API + * API for KU-KEY service + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { FriendCharacterDto } from './friend-character-dto' + +/** + * + * @export + * @interface GetFriendResponseDto + */ +export interface GetFriendResponseDto { + /** + * freindship table의 PK + * @type {number} + * @memberof GetFriendResponseDto + */ + friendshipId: number + /** + * user table의 PK + * @type {number} + * @memberof GetFriendResponseDto + */ + userId: number + /** + * 본명 + * @type {string} + * @memberof GetFriendResponseDto + */ + name: string + /** + * 친구 추가용 아이디 + * @type {string} + * @memberof GetFriendResponseDto + */ + username: string + /** + * 출신 학교 + * @type {string} + * @memberof GetFriendResponseDto + */ + homeUniversity: string + /** + * 전공 + * @type {string} + * @memberof GetFriendResponseDto + */ + major: string + /** + * 출신 나라 + * @type {string} + * @memberof GetFriendResponseDto + */ + country: string + /** + * 유저 캐릭터 + * @type {FriendCharacterDto} + * @memberof GetFriendResponseDto + */ + character: FriendCharacterDto +} diff --git a/packages/api/ku-key/models/get-hot-club-response-dto.ts b/packages/api/ku-key/models/get-hot-club-response-dto.ts new file mode 100644 index 00000000..d9e4bb74 --- /dev/null +++ b/packages/api/ku-key/models/get-hot-club-response-dto.ts @@ -0,0 +1,57 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * KU-KEY API + * API for KU-KEY service + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** + * + * @export + * @interface GetHotClubResponseDto + */ +export interface GetHotClubResponseDto { + /** + * club table의 PK + * @type {number} + * @memberof GetHotClubResponseDto + */ + clubId: number + /** + * 동아리명 + * @type {string} + * @memberof GetHotClubResponseDto + */ + name: string + /** + * 동아리 요약 + * @type {string} + * @memberof GetHotClubResponseDto + */ + summary: string + /** + * 동아리 사진 URL + * @type {string} + * @memberof GetHotClubResponseDto + */ + imageUrl: string + /** + * 동아리 카테고리 + * @type {string} + * @memberof GetHotClubResponseDto + */ + category: string + /** + * 동아리 순위 + * @type {number} + * @memberof GetHotClubResponseDto + */ + ranking: number +} diff --git a/packages/api/ku-key/models/get-my-comment-list-response-dto.ts b/packages/api/ku-key/models/get-my-comment-list-response-dto.ts new file mode 100644 index 00000000..eea53da1 --- /dev/null +++ b/packages/api/ku-key/models/get-my-comment-list-response-dto.ts @@ -0,0 +1,36 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * KU-KEY API + * API for KU-KEY service + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { CursorPageMetaResponseDto } from './cursor-page-meta-response-dto' +import { MyComment } from './my-comment' + +/** + * + * @export + * @interface GetMyCommentListResponseDto + */ +export interface GetMyCommentListResponseDto { + /** + * 페이징 관련 메타데이터 + * @type {CursorPageMetaResponseDto} + * @memberof GetMyCommentListResponseDto + */ + meta: CursorPageMetaResponseDto + /** + * 댓글 목록 + * @type {Array} + * @memberof GetMyCommentListResponseDto + */ + data: Array +} diff --git a/packages/api/ku-key/models/get-notice-response-dto.ts b/packages/api/ku-key/models/get-notice-response-dto.ts new file mode 100644 index 00000000..e25ab16c --- /dev/null +++ b/packages/api/ku-key/models/get-notice-response-dto.ts @@ -0,0 +1,36 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * KU-KEY API + * API for KU-KEY service + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { CursorPageMetaResponseDto } from './cursor-page-meta-response-dto' +import { NoticeDto } from './notice-dto' + +/** + * + * @export + * @interface GetNoticeResponseDto + */ +export interface GetNoticeResponseDto { + /** + * 페이징 관련 메타데이터 + * @type {CursorPageMetaResponseDto} + * @memberof GetNoticeResponseDto + */ + meta: CursorPageMetaResponseDto + /** + * 알림 목록 + * @type {Array} + * @memberof GetNoticeResponseDto + */ + data: Array +} diff --git a/packages/api/ku-key/models/get-point-history-response-dto.ts b/packages/api/ku-key/models/get-point-history-response-dto.ts new file mode 100644 index 00000000..120faca9 --- /dev/null +++ b/packages/api/ku-key/models/get-point-history-response-dto.ts @@ -0,0 +1,51 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * KU-KEY API + * API for KU-KEY service + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** + * + * @export + * @interface GetPointHistoryResponseDto + */ +export interface GetPointHistoryResponseDto { + /** + * 유형 + * @type {string} + * @memberof GetPointHistoryResponseDto + */ + type: string + /** + * 일시 + * @type {string} + * @memberof GetPointHistoryResponseDto + */ + date: string + /** + * 내역 + * @type {string} + * @memberof GetPointHistoryResponseDto + */ + history: string + /** + * 변경 포인트 + * @type {number} + * @memberof GetPointHistoryResponseDto + */ + changePoint: number + /** + * 결과 포인트 + * @type {number} + * @memberof GetPointHistoryResponseDto + */ + resultPoint: number +} diff --git a/packages/api/ku-key/models/get-post-list-response-dto.ts b/packages/api/ku-key/models/get-post-list-response-dto.ts new file mode 100644 index 00000000..40f1891d --- /dev/null +++ b/packages/api/ku-key/models/get-post-list-response-dto.ts @@ -0,0 +1,36 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * KU-KEY API + * API for KU-KEY service + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { CursorPageMetaResponseDto } from './cursor-page-meta-response-dto' +import { PostPreviewWithBoardName } from './post-preview-with-board-name' + +/** + * + * @export + * @interface GetPostListResponseDto + */ +export interface GetPostListResponseDto { + /** + * 페이징 관련 메타데이터 + * @type {CursorPageMetaResponseDto} + * @memberof GetPostListResponseDto + */ + meta: CursorPageMetaResponseDto + /** + * 게시글 목록 + * @type {Array} + * @memberof GetPostListResponseDto + */ + data: Array +} diff --git a/packages/api/ku-key/models/get-post-list-with-board-response-dto.ts b/packages/api/ku-key/models/get-post-list-with-board-response-dto.ts new file mode 100644 index 00000000..56b5e7ec --- /dev/null +++ b/packages/api/ku-key/models/get-post-list-with-board-response-dto.ts @@ -0,0 +1,43 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * KU-KEY API + * API for KU-KEY service + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { BoardInfo } from './board-info' +import { CursorPageMetaResponseDto } from './cursor-page-meta-response-dto' +import { PostPreview } from './post-preview' + +/** + * + * @export + * @interface GetPostListWithBoardResponseDto + */ +export interface GetPostListWithBoardResponseDto { + /** + * 페이징 관련 메타데이터 + * @type {CursorPageMetaResponseDto} + * @memberof GetPostListWithBoardResponseDto + */ + meta: CursorPageMetaResponseDto + /** + * 게시판 정보 + * @type {BoardInfo} + * @memberof GetPostListWithBoardResponseDto + */ + board: BoardInfo + /** + * 게시글 목록 + * @type {Array} + * @memberof GetPostListWithBoardResponseDto + */ + data: Array +} diff --git a/packages/api/ku-key/models/get-post-response-dto.ts b/packages/api/ku-key/models/get-post-response-dto.ts new file mode 100644 index 00000000..b28cbd59 --- /dev/null +++ b/packages/api/ku-key/models/get-post-response-dto.ts @@ -0,0 +1,110 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * KU-KEY API + * API for KU-KEY service + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { Comment } from './comment' +import { CommunityUser } from './community-user' +import { Image } from './image' +import { ReactionCount } from './reaction-count' + +/** + * + * @export + * @interface GetPostResponseDto + */ +export interface GetPostResponseDto { + /** + * 게시글 고유 ID + * @type {number} + * @memberof GetPostResponseDto + */ + id: number + /** + * 본인이 작성한 글인지 여부 + * @type {boolean} + * @memberof GetPostResponseDto + */ + isMyPost: boolean + /** + * 게시글 제목 + * @type {string} + * @memberof GetPostResponseDto + */ + title: string + /** + * 게시글 내용 + * @type {string} + * @memberof GetPostResponseDto + */ + content: string + /** + * 게시글 생성 시간 + * @type {string} + * @memberof GetPostResponseDto + */ + createdAt: string + /** + * 게시글 수정 시간 + * @type {string} + * @memberof GetPostResponseDto + */ + updatedAt: string + /** + * 게시글을 생성한 사용자 + * @type {CommunityUser} + * @memberof GetPostResponseDto + */ + user: CommunityUser + /** + * 조회수 + * @type {number} + * @memberof GetPostResponseDto + */ + views: number + /** + * 스크랩 수 + * @type {number} + * @memberof GetPostResponseDto + */ + scrapCount: number + /** + * 스크랩 여부 + * @type {boolean} + * @memberof GetPostResponseDto + */ + myScrap: boolean + /** + * 반응 + * @type {ReactionCount} + * @memberof GetPostResponseDto + */ + reactionCount: ReactionCount + /** + * 내 반응(없으면 null) + * @type {number} + * @memberof GetPostResponseDto + */ + myReaction: number + /** + * 댓글 + * @type {Array} + * @memberof GetPostResponseDto + */ + comments: Array + /** + * 첨부 이미지 경로 + * @type {Array} + * @memberof GetPostResponseDto + */ + imageDirs: Array +} diff --git a/packages/api/ku-key/models/get-profile-response-dto.ts b/packages/api/ku-key/models/get-profile-response-dto.ts new file mode 100644 index 00000000..a34a118b --- /dev/null +++ b/packages/api/ku-key/models/get-profile-response-dto.ts @@ -0,0 +1,276 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * KU-KEY API + * API for KU-KEY service + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** + * + * @export + * @interface GetProfileResponseDto + */ +export interface GetProfileResponseDto { + /** + * 유저아이디 + * @type {string} + * @memberof GetProfileResponseDto + */ + username: string + /** + * 국적 + * @type {string} + * @memberof GetProfileResponseDto + */ + country: string + /** + * 모교 + * @type {string} + * @memberof GetProfileResponseDto + */ + homeUniversity: string + /** + * 전공 + * @type {string} + * @memberof GetProfileResponseDto + */ + major: string + /** + * 교환학생 시작 날짜 + * @type {string} + * @memberof GetProfileResponseDto + */ + startDay: string + /** + * 교환학생 끝 날짜 + * @type {string} + * @memberof GetProfileResponseDto + */ + endDay: string + /** + * 사용 가능한 포인트 + * @type {number} + * @memberof GetProfileResponseDto + */ + point: number + /** + * 사용 가능 언어 목록 + * @type {Array} + * @memberof GetProfileResponseDto + */ + languages: Array + /** + * 해금된 최대 캐릭터 레벨 + * @type {number} + * @memberof GetProfileResponseDto + */ + level: number + /** + * 캐릭터 타입 + * @type {string} + * @memberof GetProfileResponseDto + */ + type: string + /** + * 선택된 캐릭터 레벨 + * @type {number} + * @memberof GetProfileResponseDto + */ + selectedLevel: number +} + +/** + * @export + * @enum {string} + */ +export type GetProfileResponseDtoLanguages = + | 'abk' + | 'aar' + | 'afr' + | 'aka' + | 'sqi' + | 'amh' + | 'ara' + | 'arg' + | 'hye' + | 'asm' + | 'ava' + | 'ave' + | 'aym' + | 'aze' + | 'bam' + | 'bak' + | 'eus' + | 'bel' + | 'ben' + | 'bis' + | 'bos' + | 'bre' + | 'bul' + | 'mya' + | 'cat' + | 'cha' + | 'che' + | 'nya' + | 'zho' + | 'chu' + | 'chv' + | 'cor' + | 'cos' + | 'cre' + | 'hrv' + | 'ces' + | 'dan' + | 'div' + | 'nld' + | 'dzo' + | 'eng' + | 'epo' + | 'est' + | 'ewe' + | 'fao' + | 'fij' + | 'fin' + | 'fra' + | 'fry' + | 'ful' + | 'gla' + | 'glg' + | 'lug' + | 'kat' + | 'deu' + | 'ell' + | 'kal' + | 'grn' + | 'guj' + | 'hat' + | 'hau' + | 'heb' + | 'her' + | 'hin' + | 'hmo' + | 'hun' + | 'isl' + | 'ido' + | 'ibo' + | 'ind' + | 'ina' + | 'ile' + | 'iku' + | 'ipk' + | 'gle' + | 'ita' + | 'jpn' + | 'jav' + | 'kan' + | 'kau' + | 'kas' + | 'kaz' + | 'khm' + | 'kik' + | 'kin' + | 'kir' + | 'kom' + | 'kon' + | 'kor' + | 'kua' + | 'kur' + | 'lao' + | 'lat' + | 'lav' + | 'lim' + | 'lin' + | 'lit' + | 'lub' + | 'ltz' + | 'mkd' + | 'mlg' + | 'msa' + | 'mal' + | 'mlt' + | 'glv' + | 'mri' + | 'mar' + | 'mah' + | 'mon' + | 'nau' + | 'nav' + | 'nde' + | 'nbl' + | 'ndo' + | 'nep' + | 'nor' + | 'nob' + | 'nno' + | 'oci' + | 'oji' + | 'ori' + | 'orm' + | 'oss' + | 'pli' + | 'pus' + | 'fas' + | 'pol' + | 'por' + | 'pan' + | 'que' + | 'ron' + | 'roh' + | 'run' + | 'rus' + | 'sme' + | 'smo' + | 'sag' + | 'san' + | 'srd' + | 'srp' + | 'sna' + | 'snd' + | 'sin' + | 'slk' + | 'slv' + | 'som' + | 'sot' + | 'spa' + | 'sun' + | 'swa' + | 'ssw' + | 'swe' + | 'tgl' + | 'tah' + | 'tgk' + | 'tam' + | 'tat' + | 'tel' + | 'tha' + | 'bod' + | 'tir' + | 'ton' + | 'tso' + | 'tsn' + | 'tur' + | 'tuk' + | 'twi' + | 'uig' + | 'ukr' + | 'urd' + | 'uzb' + | 'ven' + | 'vie' + | 'vol' + | 'wln' + | 'cym' + | 'wol' + | 'xho' + | 'iii' + | 'yid' + | 'yor' + | 'zha' + | 'zul' diff --git a/packages/api/ku-key/models/get-received-friendship-request-count-dto.ts b/packages/api/ku-key/models/get-received-friendship-request-count-dto.ts new file mode 100644 index 00000000..29cfcad4 --- /dev/null +++ b/packages/api/ku-key/models/get-received-friendship-request-count-dto.ts @@ -0,0 +1,39 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * KU-KEY API + * API for KU-KEY service + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** + * + * @export + * @interface GetReceivedFriendshipRequestCountDto + */ +export interface GetReceivedFriendshipRequestCountDto { + /** + * 전체 받은 친구 요청 개수 + * @type {number} + * @memberof GetReceivedFriendshipRequestCountDto + */ + totalCount: number + /** + * 확인하지 않은 받은 친구 요청 개수 + * @type {number} + * @memberof GetReceivedFriendshipRequestCountDto + */ + unreadCount: number + /** + * 가장 최근에 요청을 보낸 친구의 캐릭터 (최대 2개) + * @type {Array} + * @memberof GetReceivedFriendshipRequestCountDto + */ + friendCharacters: Array +} diff --git a/packages/api/ku-key/models/get-recommend-club-response-dto.ts b/packages/api/ku-key/models/get-recommend-club-response-dto.ts new file mode 100644 index 00000000..966733e6 --- /dev/null +++ b/packages/api/ku-key/models/get-recommend-club-response-dto.ts @@ -0,0 +1,51 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * KU-KEY API + * API for KU-KEY service + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** + * + * @export + * @interface GetRecommendClubResponseDto + */ +export interface GetRecommendClubResponseDto { + /** + * club table의 PK + * @type {number} + * @memberof GetRecommendClubResponseDto + */ + clubId: number + /** + * 동아리명 + * @type {string} + * @memberof GetRecommendClubResponseDto + */ + name: string + /** + * 동아리 요약 + * @type {string} + * @memberof GetRecommendClubResponseDto + */ + summary: string + /** + * 동아리 사진 URL + * @type {string} + * @memberof GetRecommendClubResponseDto + */ + imageUrl: string + /** + * 동아리 카테고리 + * @type {string} + * @memberof GetRecommendClubResponseDto + */ + category: string +} diff --git a/packages/api/ku-key/models/get-report-list-response-dto.ts b/packages/api/ku-key/models/get-report-list-response-dto.ts new file mode 100644 index 00000000..d5df925e --- /dev/null +++ b/packages/api/ku-key/models/get-report-list-response-dto.ts @@ -0,0 +1,45 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * KU-KEY API + * API for KU-KEY service + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** + * + * @export + * @interface GetReportListResponseDto + */ +export interface GetReportListResponseDto { + /** + * 신고 고유 ID + * @type {number} + * @memberof GetReportListResponseDto + */ + id: number + /** + * 신고 일시 + * @type {string} + * @memberof GetReportListResponseDto + */ + createdAt: string + /** + * 신고 사유 + * @type {string} + * @memberof GetReportListResponseDto + */ + reason: string + /** + * 게시글 신고인지 여부(false 이면 댓글 신고) + * @type {boolean} + * @memberof GetReportListResponseDto + */ + isPost: boolean +} diff --git a/packages/api/ku-key/models/get-report-response-dto.ts b/packages/api/ku-key/models/get-report-response-dto.ts new file mode 100644 index 00000000..1f16f40b --- /dev/null +++ b/packages/api/ku-key/models/get-report-response-dto.ts @@ -0,0 +1,49 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * KU-KEY API + * API for KU-KEY service + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { ReportedComment } from './reported-comment' +import { ReportedPost } from './reported-post' +import { ReportedUser } from './reported-user' + +/** + * + * @export + * @interface GetReportResponseDto + */ +export interface GetReportResponseDto { + /** + * 신고된 게시글 + * @type {ReportedPost} + * @memberof GetReportResponseDto + */ + reportedPost: ReportedPost + /** + * 신고된 댓글 + * @type {ReportedComment} + * @memberof GetReportResponseDto + */ + reportedComment: ReportedComment + /** + * 해당 글에 접수된 신고 횟수 + * @type {number} + * @memberof GetReportResponseDto + */ + reportCount: number + /** + * 신고된 사용자 + * @type {ReportedUser} + * @memberof GetReportResponseDto + */ + reportedUser: ReportedUser +} diff --git a/packages/api/ku-key/models/get-schedule-info-by-timetable-id-response-dto.ts b/packages/api/ku-key/models/get-schedule-info-by-timetable-id-response-dto.ts new file mode 100644 index 00000000..1796da6f --- /dev/null +++ b/packages/api/ku-key/models/get-schedule-info-by-timetable-id-response-dto.ts @@ -0,0 +1,57 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * KU-KEY API + * API for KU-KEY service + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** + * + * @export + * @interface GetScheduleInfoByTimetableIdResponseDto + */ +export interface GetScheduleInfoByTimetableIdResponseDto { + /** + * 일정 ID + * @type {number} + * @memberof GetScheduleInfoByTimetableIdResponseDto + */ + scheduleId: number + /** + * 일정 이름 + * @type {string} + * @memberof GetScheduleInfoByTimetableIdResponseDto + */ + scheduleTitle: string + /** + * 일정 시작 시간 + * @type {string} + * @memberof GetScheduleInfoByTimetableIdResponseDto + */ + scheduleStartTime: string + /** + * 일정 종료 시간 + * @type {string} + * @memberof GetScheduleInfoByTimetableIdResponseDto + */ + scheduleEndTime: string + /** + * 일정 장소 + * @type {string} + * @memberof GetScheduleInfoByTimetableIdResponseDto + */ + location: string + /** + * 일정 요일 + * @type {string} + * @memberof GetScheduleInfoByTimetableIdResponseDto + */ + scheduleDay: string +} diff --git a/packages/api/ku-key/models/get-screenshot-verifications-response-dto.ts b/packages/api/ku-key/models/get-screenshot-verifications-response-dto.ts new file mode 100644 index 00000000..f6aba1d8 --- /dev/null +++ b/packages/api/ku-key/models/get-screenshot-verifications-response-dto.ts @@ -0,0 +1,45 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * KU-KEY API + * API for KU-KEY service + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** + * + * @export + * @interface GetScreenshotVerificationsResponseDto + */ +export interface GetScreenshotVerificationsResponseDto { + /** + * 인증요청 고유 Id + * @type {number} + * @memberof GetScreenshotVerificationsResponseDto + */ + id: number + /** + * 교환학생 합격 스크린샷 이미지 url + * @type {string} + * @memberof GetScreenshotVerificationsResponseDto + */ + imgDir: string + /** + * 인증 요청한 학번 + * @type {number} + * @memberof GetScreenshotVerificationsResponseDto + */ + studentNumber: number + /** + * 요청한 날짜 및 시간 + * @type {string} + * @memberof GetScreenshotVerificationsResponseDto + */ + lastUpdated: string +} diff --git a/packages/api/ku-key/models/get-timetable-by-timetable-id-dto.ts b/packages/api/ku-key/models/get-timetable-by-timetable-id-dto.ts new file mode 100644 index 00000000..b1d6ab03 --- /dev/null +++ b/packages/api/ku-key/models/get-timetable-by-timetable-id-dto.ts @@ -0,0 +1,48 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * KU-KEY API + * API for KU-KEY service + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { GetCourseInfoByTimetableIdResponseDto } from './get-course-info-by-timetable-id-response-dto' +import { GetScheduleInfoByTimetableIdResponseDto } from './get-schedule-info-by-timetable-id-response-dto' + +/** + * + * @export + * @interface GetTimetableByTimetableIdDto + */ +export interface GetTimetableByTimetableIdDto { + /** + * + * @type {Array} + * @memberof GetTimetableByTimetableIdDto + */ + courses?: Array + /** + * + * @type {Array} + * @memberof GetTimetableByTimetableIdDto + */ + schedules?: Array + /** + * 시간표 색상 + * @type {string} + * @memberof GetTimetableByTimetableIdDto + */ + color: string + /** + * 시간표 이름 + * @type {string} + * @memberof GetTimetableByTimetableIdDto + */ + timetableName: string +} diff --git a/packages/api/ku-key/models/get-timetable-by-user-id-response-dto.ts b/packages/api/ku-key/models/get-timetable-by-user-id-response-dto.ts new file mode 100644 index 00000000..8dc3bb14 --- /dev/null +++ b/packages/api/ku-key/models/get-timetable-by-user-id-response-dto.ts @@ -0,0 +1,57 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * KU-KEY API + * API for KU-KEY service + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** + * + * @export + * @interface GetTimetableByUserIdResponseDto + */ +export interface GetTimetableByUserIdResponseDto { + /** + * 시간표 ID + * @type {number} + * @memberof GetTimetableByUserIdResponseDto + */ + timetableId: number + /** + * 학기 + * @type {string} + * @memberof GetTimetableByUserIdResponseDto + */ + semester: string + /** + * 연도 + * @type {string} + * @memberof GetTimetableByUserIdResponseDto + */ + year: string + /** + * 대표 시간표 여부 + * @type {boolean} + * @memberof GetTimetableByUserIdResponseDto + */ + mainTimetable: boolean + /** + * 시간표 이름 + * @type {string} + * @memberof GetTimetableByUserIdResponseDto + */ + timetableName: string + /** + * 시간표 색상 + * @type {string} + * @memberof GetTimetableByUserIdResponseDto + */ + color: string +} diff --git a/packages/api/ku-key/models/get-today-timetable-response.ts b/packages/api/ku-key/models/get-today-timetable-response.ts new file mode 100644 index 00000000..9bdce7d1 --- /dev/null +++ b/packages/api/ku-key/models/get-today-timetable-response.ts @@ -0,0 +1,36 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * KU-KEY API + * API for KU-KEY service + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { TodayCourseDto } from './today-course-dto' +import { TodayScheduleDto } from './today-schedule-dto' + +/** + * + * @export + * @interface GetTodayTimetableResponse + */ +export interface GetTodayTimetableResponse { + /** + * 오늘의 강의 목록 + * @type {Array} + * @memberof GetTodayTimetableResponse + */ + courses?: Array + /** + * 오늘의 일정 목록 + * @type {Array} + * @memberof GetTodayTimetableResponse + */ + schedules?: Array +} diff --git a/packages/api/ku-key/models/get-waiting-friend-response-dto.ts b/packages/api/ku-key/models/get-waiting-friend-response-dto.ts new file mode 100644 index 00000000..86b74bc9 --- /dev/null +++ b/packages/api/ku-key/models/get-waiting-friend-response-dto.ts @@ -0,0 +1,71 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * KU-KEY API + * API for KU-KEY service + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { Character } from './character' + +/** + * + * @export + * @interface GetWaitingFriendResponseDto + */ +export interface GetWaitingFriendResponseDto { + /** + * freindship table의 PK + * @type {number} + * @memberof GetWaitingFriendResponseDto + */ + friendshipId: number + /** + * user table의 PK + * @type {number} + * @memberof GetWaitingFriendResponseDto + */ + userId: number + /** + * 본명 + * @type {string} + * @memberof GetWaitingFriendResponseDto + */ + name: string + /** + * 친구 추가용 아이디 + * @type {string} + * @memberof GetWaitingFriendResponseDto + */ + username: string + /** + * 출신 학교 + * @type {string} + * @memberof GetWaitingFriendResponseDto + */ + homeUniversity: string + /** + * 전공 + * @type {string} + * @memberof GetWaitingFriendResponseDto + */ + major: string + /** + * 출신 나라 + * @type {string} + * @memberof GetWaitingFriendResponseDto + */ + country: string + /** + * 유저 캐릭터 + * @type {Character} + * @memberof GetWaitingFriendResponseDto + */ + character: Character +} diff --git a/packages/api/ku-key/models/image.ts b/packages/api/ku-key/models/image.ts new file mode 100644 index 00000000..3acf529a --- /dev/null +++ b/packages/api/ku-key/models/image.ts @@ -0,0 +1,33 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * KU-KEY API + * API for KU-KEY service + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** + * + * @export + * @interface Image + */ +export interface Image { + /** + * 이미지 고유 ID + * @type {number} + * @memberof Image + */ + id: number + /** + * 이미지 경로 + * @type {string} + * @memberof Image + */ + imgDir: string +} diff --git a/packages/api/ku-key/models/index.ts b/packages/api/ku-key/models/index.ts new file mode 100644 index 00000000..25b2156b --- /dev/null +++ b/packages/api/ku-key/models/index.ts @@ -0,0 +1,124 @@ +export * from './academic-schedule' +export * from './accept-report-request-dto' +export * from './banner-dto' +export * from './board-info' +export * from './change-password-request-dto' +export * from './change-password-response-dto' +export * from './character' +export * from './check-course-review-reading-ticket-response-dto' +export * from './check-possible-response-dto' +export * from './comment' +export * from './common-course-response-dto' +export * from './common-course-response-dto-details' +export * from './common-delete-response-dto' +export * from './common-timetable-response-dto' +export * from './community-user' +export * from './course-review-response-dto' +export * from './create-calendar-data-request-dto' +export * from './create-calendar-data-response-dto' +export * from './create-club-response-dto' +export * from './create-comment-request-dto' +export * from './create-course-review-request-dto' +export * from './create-report-request-dto' +export * from './create-report-response-dto' +export * from './create-schedule-request-dto' +export * from './create-schedule-response-dto' +export * from './create-timetable-course-response-dto' +export * from './create-timetable-dto' +export * from './cursor-page-meta-response-dto' +export * from './delete-calendar-data-response-dto' +export * from './delete-club-response-dto' +export * from './delete-comment-response-dto' +export * from './delete-friendship-response-dto' +export * from './delete-post-response-dto' +export * from './delete-schedule-response-dto' +export * from './delete-user-response-dto' +export * from './event' +export * from './friend-character-dto' +export * from './get-academic-schedule-data-response-dto' +export * from './get-banner-image-url-response-dto' +export * from './get-board-response-dto' +export * from './get-club-detail-response-dto' +export * from './get-club-response-dto' +export * from './get-comment-response-dto' +export * from './get-course-info-by-timetable-id-response-dto' +export * from './get-course-review-summary-response-dto' +export * from './get-course-reviews-response-dto' +export * from './get-courses-with-course-reviews-response-dto' +export * from './get-daily-calendar-data-response-dto' +export * from './get-friend-response-dto' +export * from './get-hot-club-response-dto' +export * from './get-my-comment-list-response-dto' +export * from './get-notice-response-dto' +export * from './get-point-history-response-dto' +export * from './get-post-list-response-dto' +export * from './get-post-list-with-board-response-dto' +export * from './get-post-response-dto' +export * from './get-profile-response-dto' +export * from './get-received-friendship-request-count-dto' +export * from './get-recommend-club-response-dto' +export * from './get-report-list-response-dto' +export * from './get-report-response-dto' +export * from './get-schedule-info-by-timetable-id-response-dto' +export * from './get-screenshot-verifications-response-dto' +export * from './get-timetable-by-timetable-id-dto' +export * from './get-timetable-by-user-id-response-dto' +export * from './get-today-timetable-response' +export * from './get-waiting-friend-response-dto' +export * from './image' +export * from './jwt-token-dto' +export * from './language-request-dto' +export * from './language-response-dto' +export * from './like-comment-response-dto' +export * from './login-request-dto' +export * from './login-response-dto' +export * from './logout-request-dto' +export * from './logout-response-dto' +export * from './my-comment' +export * from './notice-dto' +export * from './paginated-course-reviews-dto' +export * from './paginated-courses-dto' +export * from './password-dto' +export * from './post-preview' +export * from './post-preview-with-board-name' +export * from './purchase-item-request-dto' +export * from './purchase-item-response-dto' +export * from './react-post-request-dto' +export * from './react-post-response-dto' +export * from './reaction-count' +export * from './reported-comment' +export * from './reported-post' +export * from './reported-user' +export * from './review-dto' +export * from './scrap-post-response-dto' +export * from './search-course-reviews-with-keyword-response' +export * from './search-user-response-dto' +export * from './select-character-level-request-dto' +export * from './select-character-level-response-dto' +export * from './send-friendship-request-dto' +export * from './send-friendship-response-dto' +export * from './send-temp-password-request-dto' +export * from './send-temp-password-response-dto' +export * from './set-exchange-day-reqeust-dto' +export * from './set-profile-request-dto' +export * from './set-response-dto' +export * from './sign-up-response-dto' +export * from './take-attendance-response-dto' +export * from './timetable-dto' +export * from './today-course-dto' +export * from './today-schedule-dto' +export * from './update-calendar-data-request-dto' +export * from './update-calendar-data-response-dto' +export * from './update-club-response-dto' +export * from './update-comment-request-dto' +export * from './update-friendship-response-dto' +export * from './update-schedule-request-dto' +export * from './update-schedule-response-dto' +export * from './update-timetable-color-dto' +export * from './update-timetable-name-dto' +export * from './verification-request-dto' +export * from './verification-response-dto' +export * from './verify-email-request-dto' +export * from './verify-email-response-dto' +export * from './verify-screenshot-request-dto' +export * from './verify-screenshot-response-dto' diff --git a/packages/api/ku-key/models/jwt-token-dto.ts b/packages/api/ku-key/models/jwt-token-dto.ts new file mode 100644 index 00000000..acc3f3ed --- /dev/null +++ b/packages/api/ku-key/models/jwt-token-dto.ts @@ -0,0 +1,33 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * KU-KEY API + * API for KU-KEY service + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** + * + * @export + * @interface JwtTokenDto + */ +export interface JwtTokenDto { + /** + * Access Token + * @type {string} + * @memberof JwtTokenDto + */ + accessToken: string + /** + * Refresh Token + * @type {string} + * @memberof JwtTokenDto + */ + refreshToken: string +} diff --git a/packages/api/ku-key/models/language-request-dto.ts b/packages/api/ku-key/models/language-request-dto.ts new file mode 100644 index 00000000..ff383885 --- /dev/null +++ b/packages/api/ku-key/models/language-request-dto.ts @@ -0,0 +1,216 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * KU-KEY API + * API for KU-KEY service + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** + * + * @export + * @interface LanguageRequestDto + */ +export interface LanguageRequestDto { + /** + * 추가/삭제하고자 하는 언어 + * @type {string} + * @memberof LanguageRequestDto + */ + language: LanguageRequestDtoLanguage +} + +/** + * @export + * @enum {string} + */ +export type LanguageRequestDtoLanguage = + | 'abk' + | 'aar' + | 'afr' + | 'aka' + | 'sqi' + | 'amh' + | 'ara' + | 'arg' + | 'hye' + | 'asm' + | 'ava' + | 'ave' + | 'aym' + | 'aze' + | 'bam' + | 'bak' + | 'eus' + | 'bel' + | 'ben' + | 'bis' + | 'bos' + | 'bre' + | 'bul' + | 'mya' + | 'cat' + | 'cha' + | 'che' + | 'nya' + | 'zho' + | 'chu' + | 'chv' + | 'cor' + | 'cos' + | 'cre' + | 'hrv' + | 'ces' + | 'dan' + | 'div' + | 'nld' + | 'dzo' + | 'eng' + | 'epo' + | 'est' + | 'ewe' + | 'fao' + | 'fij' + | 'fin' + | 'fra' + | 'fry' + | 'ful' + | 'gla' + | 'glg' + | 'lug' + | 'kat' + | 'deu' + | 'ell' + | 'kal' + | 'grn' + | 'guj' + | 'hat' + | 'hau' + | 'heb' + | 'her' + | 'hin' + | 'hmo' + | 'hun' + | 'isl' + | 'ido' + | 'ibo' + | 'ind' + | 'ina' + | 'ile' + | 'iku' + | 'ipk' + | 'gle' + | 'ita' + | 'jpn' + | 'jav' + | 'kan' + | 'kau' + | 'kas' + | 'kaz' + | 'khm' + | 'kik' + | 'kin' + | 'kir' + | 'kom' + | 'kon' + | 'kor' + | 'kua' + | 'kur' + | 'lao' + | 'lat' + | 'lav' + | 'lim' + | 'lin' + | 'lit' + | 'lub' + | 'ltz' + | 'mkd' + | 'mlg' + | 'msa' + | 'mal' + | 'mlt' + | 'glv' + | 'mri' + | 'mar' + | 'mah' + | 'mon' + | 'nau' + | 'nav' + | 'nde' + | 'nbl' + | 'ndo' + | 'nep' + | 'nor' + | 'nob' + | 'nno' + | 'oci' + | 'oji' + | 'ori' + | 'orm' + | 'oss' + | 'pli' + | 'pus' + | 'fas' + | 'pol' + | 'por' + | 'pan' + | 'que' + | 'ron' + | 'roh' + | 'run' + | 'rus' + | 'sme' + | 'smo' + | 'sag' + | 'san' + | 'srd' + | 'srp' + | 'sna' + | 'snd' + | 'sin' + | 'slk' + | 'slv' + | 'som' + | 'sot' + | 'spa' + | 'sun' + | 'swa' + | 'ssw' + | 'swe' + | 'tgl' + | 'tah' + | 'tgk' + | 'tam' + | 'tat' + | 'tel' + | 'tha' + | 'bod' + | 'tir' + | 'ton' + | 'tso' + | 'tsn' + | 'tur' + | 'tuk' + | 'twi' + | 'uig' + | 'ukr' + | 'urd' + | 'uzb' + | 'ven' + | 'vie' + | 'vol' + | 'wln' + | 'cym' + | 'wol' + | 'xho' + | 'iii' + | 'yid' + | 'yor' + | 'zha' + | 'zul' diff --git a/packages/api/ku-key/models/language-response-dto.ts b/packages/api/ku-key/models/language-response-dto.ts new file mode 100644 index 00000000..40099bcf --- /dev/null +++ b/packages/api/ku-key/models/language-response-dto.ts @@ -0,0 +1,216 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * KU-KEY API + * API for KU-KEY service + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** + * + * @export + * @interface LanguageResponseDto + */ +export interface LanguageResponseDto { + /** + * 추가/삭제 후 언어 목록 + * @type {Array} + * @memberof LanguageResponseDto + */ + languages: Array +} + +/** + * @export + * @enum {string} + */ +export type LanguageResponseDtoLanguages = + | 'abk' + | 'aar' + | 'afr' + | 'aka' + | 'sqi' + | 'amh' + | 'ara' + | 'arg' + | 'hye' + | 'asm' + | 'ava' + | 'ave' + | 'aym' + | 'aze' + | 'bam' + | 'bak' + | 'eus' + | 'bel' + | 'ben' + | 'bis' + | 'bos' + | 'bre' + | 'bul' + | 'mya' + | 'cat' + | 'cha' + | 'che' + | 'nya' + | 'zho' + | 'chu' + | 'chv' + | 'cor' + | 'cos' + | 'cre' + | 'hrv' + | 'ces' + | 'dan' + | 'div' + | 'nld' + | 'dzo' + | 'eng' + | 'epo' + | 'est' + | 'ewe' + | 'fao' + | 'fij' + | 'fin' + | 'fra' + | 'fry' + | 'ful' + | 'gla' + | 'glg' + | 'lug' + | 'kat' + | 'deu' + | 'ell' + | 'kal' + | 'grn' + | 'guj' + | 'hat' + | 'hau' + | 'heb' + | 'her' + | 'hin' + | 'hmo' + | 'hun' + | 'isl' + | 'ido' + | 'ibo' + | 'ind' + | 'ina' + | 'ile' + | 'iku' + | 'ipk' + | 'gle' + | 'ita' + | 'jpn' + | 'jav' + | 'kan' + | 'kau' + | 'kas' + | 'kaz' + | 'khm' + | 'kik' + | 'kin' + | 'kir' + | 'kom' + | 'kon' + | 'kor' + | 'kua' + | 'kur' + | 'lao' + | 'lat' + | 'lav' + | 'lim' + | 'lin' + | 'lit' + | 'lub' + | 'ltz' + | 'mkd' + | 'mlg' + | 'msa' + | 'mal' + | 'mlt' + | 'glv' + | 'mri' + | 'mar' + | 'mah' + | 'mon' + | 'nau' + | 'nav' + | 'nde' + | 'nbl' + | 'ndo' + | 'nep' + | 'nor' + | 'nob' + | 'nno' + | 'oci' + | 'oji' + | 'ori' + | 'orm' + | 'oss' + | 'pli' + | 'pus' + | 'fas' + | 'pol' + | 'por' + | 'pan' + | 'que' + | 'ron' + | 'roh' + | 'run' + | 'rus' + | 'sme' + | 'smo' + | 'sag' + | 'san' + | 'srd' + | 'srp' + | 'sna' + | 'snd' + | 'sin' + | 'slk' + | 'slv' + | 'som' + | 'sot' + | 'spa' + | 'sun' + | 'swa' + | 'ssw' + | 'swe' + | 'tgl' + | 'tah' + | 'tgk' + | 'tam' + | 'tat' + | 'tel' + | 'tha' + | 'bod' + | 'tir' + | 'ton' + | 'tso' + | 'tsn' + | 'tur' + | 'tuk' + | 'twi' + | 'uig' + | 'ukr' + | 'urd' + | 'uzb' + | 'ven' + | 'vie' + | 'vol' + | 'wln' + | 'cym' + | 'wol' + | 'xho' + | 'iii' + | 'yid' + | 'yor' + | 'zha' + | 'zul' diff --git a/packages/api/ku-key/models/like-comment-response-dto.ts b/packages/api/ku-key/models/like-comment-response-dto.ts new file mode 100644 index 00000000..30ef534d --- /dev/null +++ b/packages/api/ku-key/models/like-comment-response-dto.ts @@ -0,0 +1,27 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * KU-KEY API + * API for KU-KEY service + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** + * + * @export + * @interface LikeCommentResponseDto + */ +export interface LikeCommentResponseDto { + /** + * 좋아요 여부 + * @type {boolean} + * @memberof LikeCommentResponseDto + */ + isLiked: boolean +} diff --git a/packages/api/ku-key/models/login-request-dto.ts b/packages/api/ku-key/models/login-request-dto.ts new file mode 100644 index 00000000..27cd8c62 --- /dev/null +++ b/packages/api/ku-key/models/login-request-dto.ts @@ -0,0 +1,39 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * KU-KEY API + * API for KU-KEY service + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** + * + * @export + * @interface LoginRequestDto + */ +export interface LoginRequestDto { + /** + * 사용자 이메일 + * @type {string} + * @memberof LoginRequestDto + */ + email: string + /** + * 사용자 비밀번호 + * @type {string} + * @memberof LoginRequestDto + */ + password: string + /** + * 로그인 유지 여부 + * @type {boolean} + * @memberof LoginRequestDto + */ + keepingLogin: boolean +} diff --git a/packages/api/ku-key/models/login-response-dto.ts b/packages/api/ku-key/models/login-response-dto.ts new file mode 100644 index 00000000..694d56a1 --- /dev/null +++ b/packages/api/ku-key/models/login-response-dto.ts @@ -0,0 +1,47 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * KU-KEY API + * API for KU-KEY service + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { JwtTokenDto } from './jwt-token-dto' + +/** + * + * @export + * @interface LoginResponseDto + */ +export interface LoginResponseDto { + /** + * JWT 토큰 + * @type {JwtTokenDto} + * @memberof LoginResponseDto + */ + token: JwtTokenDto + /** + * 학교 인증 여부 + * @type {boolean} + * @memberof LoginResponseDto + */ + verified: boolean + /** + * 기기 코드 + * @type {string} + * @memberof LoginResponseDto + */ + deviceCode: string + /** + * 사용자 ID + * @type {number} + * @memberof LoginResponseDto + */ + userId: number +} diff --git a/packages/api/ku-key/models/logout-request-dto.ts b/packages/api/ku-key/models/logout-request-dto.ts new file mode 100644 index 00000000..3966c14e --- /dev/null +++ b/packages/api/ku-key/models/logout-request-dto.ts @@ -0,0 +1,27 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * KU-KEY API + * API for KU-KEY service + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** + * + * @export + * @interface LogoutRequestDto + */ +export interface LogoutRequestDto { + /** + * 기기 코드 (없으면 모든 기기 로그아웃) + * @type {string} + * @memberof LogoutRequestDto + */ + deviceCode?: string +} diff --git a/packages/api/ku-key/models/logout-response-dto.ts b/packages/api/ku-key/models/logout-response-dto.ts new file mode 100644 index 00000000..7782fa91 --- /dev/null +++ b/packages/api/ku-key/models/logout-response-dto.ts @@ -0,0 +1,27 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * KU-KEY API + * API for KU-KEY service + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** + * + * @export + * @interface LogoutResponseDto + */ +export interface LogoutResponseDto { + /** + * 로그아웃 성공 여부 + * @type {boolean} + * @memberof LogoutResponseDto + */ + logout: boolean +} diff --git a/packages/api/ku-key/models/my-comment.ts b/packages/api/ku-key/models/my-comment.ts new file mode 100644 index 00000000..95b9ba88 --- /dev/null +++ b/packages/api/ku-key/models/my-comment.ts @@ -0,0 +1,69 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * KU-KEY API + * API for KU-KEY service + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** + * + * @export + * @interface MyComment + */ +export interface MyComment { + /** + * 댓글 고유 ID + * @type {number} + * @memberof MyComment + */ + id: number + /** + * 댓글 생성 시간 + * @type {string} + * @memberof MyComment + */ + createdAt: string + /** + * 댓글 수정 시간 + * @type {string} + * @memberof MyComment + */ + updatedAt: string + /** + * 댓글 내용 + * @type {string} + * @memberof MyComment + */ + content: string + /** + * 좋아요 수 + * @type {number} + * @memberof MyComment + */ + likeCount: number + /** + * 댓글을 작성한 게시글 Id + * @type {number} + * @memberof MyComment + */ + postId: number + /** + * 답글 수 + * @type {number} + * @memberof MyComment + */ + replyCount: number + /** + * 익명 설정 여부 + * @type {boolean} + * @memberof MyComment + */ + isAnonymous: boolean +} diff --git a/packages/api/ku-key/models/notice-dto.ts b/packages/api/ku-key/models/notice-dto.ts new file mode 100644 index 00000000..8af233fc --- /dev/null +++ b/packages/api/ku-key/models/notice-dto.ts @@ -0,0 +1,63 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * KU-KEY API + * API for KU-KEY service + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** + * + * @export + * @interface NoticeDto + */ +export interface NoticeDto { + /** + * 알림 고유 ID + * @type {number} + * @memberof NoticeDto + */ + id: number + /** + * 알림 내용 + * @type {string} + * @memberof NoticeDto + */ + content: string + /** + * 알림 시간 + * @type {string} + * @memberof NoticeDto + */ + createdAt: string + /** + * 새로운 알림인지 여부 + * @type {boolean} + * @memberof NoticeDto + */ + isNew: boolean + /** + * 알림 종류 + * @type {string} + * @memberof NoticeDto + */ + type: NoticeDtoType + /** + * 연결 핸들러 + * @type {number} + * @memberof NoticeDto + */ + handler: number +} + +/** + * @export + * @enum {string} + */ +export type NoticeDtoType = 'ban' | 'friendRequest' | 'friendAccept' | 'commentOnPost' | 'commentOnComment' | 'hotPost' diff --git a/packages/api/ku-key/models/paginated-course-reviews-dto.ts b/packages/api/ku-key/models/paginated-course-reviews-dto.ts new file mode 100644 index 00000000..e029894f --- /dev/null +++ b/packages/api/ku-key/models/paginated-course-reviews-dto.ts @@ -0,0 +1,41 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * KU-KEY API + * API for KU-KEY service + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { SearchCourseReviewsWithKeywordResponse } from './search-course-reviews-with-keyword-response' + +/** + * + * @export + * @interface PaginatedCourseReviewsDto + */ +export interface PaginatedCourseReviewsDto { + /** + * 다음 페이지 존재 여부 + * @type {boolean} + * @memberof PaginatedCourseReviewsDto + */ + hasNextPage: boolean + /** + * 다음 cursor id + * @type {number} + * @memberof PaginatedCourseReviewsDto + */ + nextCursorId: number + /** + * 강의평 리스트 + * @type {Array} + * @memberof PaginatedCourseReviewsDto + */ + data: Array +} diff --git a/packages/api/ku-key/models/paginated-courses-dto.ts b/packages/api/ku-key/models/paginated-courses-dto.ts new file mode 100644 index 00000000..5710d356 --- /dev/null +++ b/packages/api/ku-key/models/paginated-courses-dto.ts @@ -0,0 +1,41 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * KU-KEY API + * API for KU-KEY service + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { CommonCourseResponseDto } from './common-course-response-dto' + +/** + * + * @export + * @interface PaginatedCoursesDto + */ +export interface PaginatedCoursesDto { + /** + * 다음 페이지 존재 여부 + * @type {boolean} + * @memberof PaginatedCoursesDto + */ + hasNextPage: boolean + /** + * 다음 cursor id + * @type {number} + * @memberof PaginatedCoursesDto + */ + nextCursorId: number + /** + * 강의 리스트 + * @type {Array} + * @memberof PaginatedCoursesDto + */ + data: Array +} diff --git a/packages/api/ku-key/models/password-dto.ts b/packages/api/ku-key/models/password-dto.ts new file mode 100644 index 00000000..d8a5a170 --- /dev/null +++ b/packages/api/ku-key/models/password-dto.ts @@ -0,0 +1,27 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * KU-KEY API + * API for KU-KEY service + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** + * + * @export + * @interface PasswordDto + */ +export interface PasswordDto { + /** + * 비밀번호 + * @type {string} + * @memberof PasswordDto + */ + password: string +} diff --git a/packages/api/ku-key/models/post-preview-with-board-name.ts b/packages/api/ku-key/models/post-preview-with-board-name.ts new file mode 100644 index 00000000..9e09ce74 --- /dev/null +++ b/packages/api/ku-key/models/post-preview-with-board-name.ts @@ -0,0 +1,95 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * KU-KEY API + * API for KU-KEY service + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { CommunityUser } from './community-user' + +/** + * + * @export + * @interface PostPreviewWithBoardName + */ +export interface PostPreviewWithBoardName { + /** + * 게시글 고유 ID + * @type {number} + * @memberof PostPreviewWithBoardName + */ + id: number + /** + * 게시글 제목 + * @type {string} + * @memberof PostPreviewWithBoardName + */ + title: string + /** + * 게시글 내용(100글자 까지) + * @type {string} + * @memberof PostPreviewWithBoardName + */ + content: string + /** + * 게시글 생성 시간 + * @type {string} + * @memberof PostPreviewWithBoardName + */ + createdAt: string + /** + * 게시글을 생성한 사용자 + * @type {CommunityUser} + * @memberof PostPreviewWithBoardName + */ + user: CommunityUser + /** + * 댓글 수 + * @type {number} + * @memberof PostPreviewWithBoardName + */ + commentCount: number + /** + * 스크랩 수 + * @type {number} + * @memberof PostPreviewWithBoardName + */ + scrapCount: number + /** + * 스크랩 여부 + * @type {boolean} + * @memberof PostPreviewWithBoardName + */ + myScrap: boolean + /** + * 사진 미리보기(사진이 없으면 null) + * @type {string} + * @memberof PostPreviewWithBoardName + */ + thumbnailDir: string + /** + * 반응 수 + * @type {number} + * @memberof PostPreviewWithBoardName + */ + reactionCount: number + /** + * 조회 수 + * @type {number} + * @memberof PostPreviewWithBoardName + */ + views: number + /** + * 게시판 이름 + * @type {string} + * @memberof PostPreviewWithBoardName + */ + boardName: string +} diff --git a/packages/api/ku-key/models/post-preview.ts b/packages/api/ku-key/models/post-preview.ts new file mode 100644 index 00000000..fb117f63 --- /dev/null +++ b/packages/api/ku-key/models/post-preview.ts @@ -0,0 +1,89 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * KU-KEY API + * API for KU-KEY service + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { CommunityUser } from './community-user' + +/** + * + * @export + * @interface PostPreview + */ +export interface PostPreview { + /** + * 게시글 고유 ID + * @type {number} + * @memberof PostPreview + */ + id: number + /** + * 게시글 제목 + * @type {string} + * @memberof PostPreview + */ + title: string + /** + * 게시글 내용(100글자 까지) + * @type {string} + * @memberof PostPreview + */ + content: string + /** + * 게시글 생성 시간 + * @type {string} + * @memberof PostPreview + */ + createdAt: string + /** + * 게시글을 생성한 사용자 + * @type {CommunityUser} + * @memberof PostPreview + */ + user: CommunityUser + /** + * 댓글 수 + * @type {number} + * @memberof PostPreview + */ + commentCount: number + /** + * 스크랩 수 + * @type {number} + * @memberof PostPreview + */ + scrapCount: number + /** + * 스크랩 여부 + * @type {boolean} + * @memberof PostPreview + */ + myScrap: boolean + /** + * 사진 미리보기(사진이 없으면 null) + * @type {string} + * @memberof PostPreview + */ + thumbnailDir: string + /** + * 반응 수 + * @type {number} + * @memberof PostPreview + */ + reactionCount: number + /** + * 조회 수 + * @type {number} + * @memberof PostPreview + */ + views: number +} diff --git a/packages/api/ku-key/models/purchase-item-request-dto.ts b/packages/api/ku-key/models/purchase-item-request-dto.ts new file mode 100644 index 00000000..4541e8d8 --- /dev/null +++ b/packages/api/ku-key/models/purchase-item-request-dto.ts @@ -0,0 +1,53 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * KU-KEY API + * API for KU-KEY service + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** + * + * @export + * @interface PurchaseItemRequestDto + */ +export interface PurchaseItemRequestDto { + /** + * 요구 포인트 + * @type {number} + * @memberof PurchaseItemRequestDto + */ + requiredPoints: number + /** + * 아이템 카테고리 + * @type {string} + * @memberof PurchaseItemRequestDto + */ + itemCategory: PurchaseItemRequestDtoItemCategory + /** + * 열람 일수 (강의평 열람권 구매 시에만) + * @type {number} + * @memberof PurchaseItemRequestDto + */ + days?: PurchaseItemRequestDtoDays +} + +/** + * @export + * @enum {string} + */ +export type PurchaseItemRequestDtoItemCategory = + | 'COURSE_REVIEW_READING_TICKET' + | 'CHARACTER_EVOLUTION' + | 'CHARACTER_TYPE_CHANGE' +/** + * @export + * @enum {string} + */ +export type PurchaseItemRequestDtoDays = 3 | 7 | 30 diff --git a/packages/api/ku-key/models/purchase-item-response-dto.ts b/packages/api/ku-key/models/purchase-item-response-dto.ts new file mode 100644 index 00000000..f0ca40f4 --- /dev/null +++ b/packages/api/ku-key/models/purchase-item-response-dto.ts @@ -0,0 +1,39 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * KU-KEY API + * API for KU-KEY service + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** + * + * @export + * @interface PurchaseItemResponseDto + */ +export interface PurchaseItemResponseDto { + /** + * 업데이트된 열람 가능 기간 (강의평 열람권 구매 시) + * @type {string} + * @memberof PurchaseItemResponseDto + */ + viewableUntil?: string + /** + * 업그레이드 레벨 (캐릭터 진화 구매 시) + * @type {number} + * @memberof PurchaseItemResponseDto + */ + upgradeLevel?: number + /** + * 변경된 캐릭터 타입 (캐릭터 타입 변경 구매 시) + * @type {string} + * @memberof PurchaseItemResponseDto + */ + newCharacterType?: string +} diff --git a/packages/api/ku-key/models/react-post-request-dto.ts b/packages/api/ku-key/models/react-post-request-dto.ts new file mode 100644 index 00000000..f91dc5da --- /dev/null +++ b/packages/api/ku-key/models/react-post-request-dto.ts @@ -0,0 +1,33 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * KU-KEY API + * API for KU-KEY service + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** + * + * @export + * @interface ReactPostRequestDto + */ +export interface ReactPostRequestDto { + /** + * 남길 반응 종류 + * @type {number} + * @memberof ReactPostRequestDto + */ + reaction: ReactPostRequestDtoReaction +} + +/** + * @export + * @enum {string} + */ +export type ReactPostRequestDtoReaction = 0 | 1 | 2 | 3 | 4 diff --git a/packages/api/ku-key/models/react-post-response-dto.ts b/packages/api/ku-key/models/react-post-response-dto.ts new file mode 100644 index 00000000..6b61e823 --- /dev/null +++ b/packages/api/ku-key/models/react-post-response-dto.ts @@ -0,0 +1,33 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * KU-KEY API + * API for KU-KEY service + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** + * + * @export + * @interface ReactPostResponseDto + */ +export interface ReactPostResponseDto { + /** + * 남겨진 반응 종류 + * @type {number} + * @memberof ReactPostResponseDto + */ + isReacted: ReactPostResponseDtoIsReacted +} + +/** + * @export + * @enum {string} + */ +export type ReactPostResponseDtoIsReacted = 0 | 1 | 2 | 3 | 4 diff --git a/packages/api/ku-key/models/reaction-count.ts b/packages/api/ku-key/models/reaction-count.ts new file mode 100644 index 00000000..d741b2b6 --- /dev/null +++ b/packages/api/ku-key/models/reaction-count.ts @@ -0,0 +1,51 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * KU-KEY API + * API for KU-KEY service + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** + * + * @export + * @interface ReactionCount + */ +export interface ReactionCount { + /** + * 좋아요 + * @type {number} + * @memberof ReactionCount + */ + good: number + /** + * 슬퍼요 + * @type {number} + * @memberof ReactionCount + */ + sad: number + /** + * 놀라워요 + * @type {number} + * @memberof ReactionCount + */ + amazing: number + /** + * 화나요 + * @type {number} + * @memberof ReactionCount + */ + angry: number + /** + * 웃겨요 + * @type {number} + * @memberof ReactionCount + */ + funny: number +} diff --git a/packages/api/ku-key/models/reported-comment.ts b/packages/api/ku-key/models/reported-comment.ts new file mode 100644 index 00000000..0d3753bd --- /dev/null +++ b/packages/api/ku-key/models/reported-comment.ts @@ -0,0 +1,33 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * KU-KEY API + * API for KU-KEY service + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** + * + * @export + * @interface ReportedComment + */ +export interface ReportedComment { + /** + * 댓글 고유 ID + * @type {number} + * @memberof ReportedComment + */ + id: number + /** + * 댓글 내용 + * @type {string} + * @memberof ReportedComment + */ + content: string +} diff --git a/packages/api/ku-key/models/reported-post.ts b/packages/api/ku-key/models/reported-post.ts new file mode 100644 index 00000000..0b14e384 --- /dev/null +++ b/packages/api/ku-key/models/reported-post.ts @@ -0,0 +1,45 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * KU-KEY API + * API for KU-KEY service + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** + * + * @export + * @interface ReportedPost + */ +export interface ReportedPost { + /** + * 게시글 고유 ID + * @type {number} + * @memberof ReportedPost + */ + id: number + /** + * 게시글 제목 + * @type {string} + * @memberof ReportedPost + */ + title: string + /** + * 게시글 내용 + * @type {string} + * @memberof ReportedPost + */ + content: string + /** + * 게시글 첨부 이미지 + * @type {Array} + * @memberof ReportedPost + */ + imgDirs: Array +} diff --git a/packages/api/ku-key/models/reported-user.ts b/packages/api/ku-key/models/reported-user.ts new file mode 100644 index 00000000..127aafee --- /dev/null +++ b/packages/api/ku-key/models/reported-user.ts @@ -0,0 +1,33 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * KU-KEY API + * API for KU-KEY service + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** + * + * @export + * @interface ReportedUser + */ +export interface ReportedUser { + /** + * 사용자 고유 ID + * @type {number} + * @memberof ReportedUser + */ + id: number + /** + * 사용자 username + * @type {string} + * @memberof ReportedUser + */ + username: string +} diff --git a/packages/api/ku-key/models/review-dto.ts b/packages/api/ku-key/models/review-dto.ts new file mode 100644 index 00000000..f0322022 --- /dev/null +++ b/packages/api/ku-key/models/review-dto.ts @@ -0,0 +1,105 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * KU-KEY API + * API for KU-KEY service + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** + * + * @export + * @interface ReviewDto + */ +export interface ReviewDto { + /** + * 강의평 ID + * @type {number} + * @memberof ReviewDto + */ + id: number + /** + * 평점 + * @type {number} + * @memberof ReviewDto + */ + rate: number + /** + * 작성 일시 + * @type {string} + * @memberof ReviewDto + */ + createdAt: string + /** + * 작성자 + * @type {string} + * @memberof ReviewDto + */ + reviewer: string + /** + * 연도 + * @type {string} + * @memberof ReviewDto + */ + year: string + /** + * 학기 + * @type {string} + * @memberof ReviewDto + */ + semester: string + /** + * 추천 여부 + * @type {boolean} + * @memberof ReviewDto + */ + myRecommend: boolean + /** + * 추천수 + * @type {number} + * @memberof ReviewDto + */ + recommendCount: number + /** + * 강의평 텍스트 + * @type {string} + * @memberof ReviewDto + */ + text: string + /** + * 수업 난이도 + * @type {number} + * @memberof ReviewDto + */ + classLevel: number + /** + * 팀 프로젝트 난이도 + * @type {number} + * @memberof ReviewDto + */ + teamProject: number + /** + * 학습량 + * @type {number} + * @memberof ReviewDto + */ + amountLearned: number + /** + * 교수님 강의력 + * @type {number} + * @memberof ReviewDto + */ + teachingSkills: number + /** + * 출석 체크 방식 + * @type {number} + * @memberof ReviewDto + */ + attendance: number +} diff --git a/packages/api/ku-key/models/scrap-post-response-dto.ts b/packages/api/ku-key/models/scrap-post-response-dto.ts new file mode 100644 index 00000000..e4319c13 --- /dev/null +++ b/packages/api/ku-key/models/scrap-post-response-dto.ts @@ -0,0 +1,27 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * KU-KEY API + * API for KU-KEY service + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** + * + * @export + * @interface ScrapPostResponseDto + */ +export interface ScrapPostResponseDto { + /** + * 스크랩 여부 + * @type {boolean} + * @memberof ScrapPostResponseDto + */ + isScrapped: boolean +} diff --git a/packages/api/ku-key/models/search-course-reviews-with-keyword-response.ts b/packages/api/ku-key/models/search-course-reviews-with-keyword-response.ts new file mode 100644 index 00000000..dfaf8255 --- /dev/null +++ b/packages/api/ku-key/models/search-course-reviews-with-keyword-response.ts @@ -0,0 +1,51 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * KU-KEY API + * API for KU-KEY service + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** + * + * @export + * @interface SearchCourseReviewsWithKeywordResponse + */ +export interface SearchCourseReviewsWithKeywordResponse { + /** + * 리뷰 id + * @type {number} + * @memberof SearchCourseReviewsWithKeywordResponse + */ + id: number + /** + * 총 평점 + * @type {number} + * @memberof SearchCourseReviewsWithKeywordResponse + */ + totalRate: number + /** + * 리뷰 개수 + * @type {number} + * @memberof SearchCourseReviewsWithKeywordResponse + */ + reviewCount: number + /** + * 과목명 + * @type {string} + * @memberof SearchCourseReviewsWithKeywordResponse + */ + courseName: string + /** + * 교수명 + * @type {string} + * @memberof SearchCourseReviewsWithKeywordResponse + */ + professorName: string +} diff --git a/packages/api/ku-key/models/search-user-response-dto.ts b/packages/api/ku-key/models/search-user-response-dto.ts new file mode 100644 index 00000000..2d6a118b --- /dev/null +++ b/packages/api/ku-key/models/search-user-response-dto.ts @@ -0,0 +1,71 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * KU-KEY API + * API for KU-KEY service + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { Character } from './character' + +/** + * + * @export + * @interface SearchUserResponseDto + */ +export interface SearchUserResponseDto { + /** + * 본명 + * @type {string} + * @memberof SearchUserResponseDto + */ + name: string + /** + * 친구 추가용 id + * @type {string} + * @memberof SearchUserResponseDto + */ + username: string + /** + * 출신 학교 + * @type {string} + * @memberof SearchUserResponseDto + */ + homeUniversity: string + /** + * 전공 + * @type {string} + * @memberof SearchUserResponseDto + */ + major: string + /** + * 출신 나라 + * @type {string} + * @memberof SearchUserResponseDto + */ + country: string + /** + * 유저 상태 (본인 / 친구 / 상대방의 수락 대기 중 / 나의 수락 보류 중 / 그 외) + * @type {string} + * @memberof SearchUserResponseDto + */ + status: SearchUserResponseDtoStatus + /** + * 유저 캐릭터 + * @type {Character} + * @memberof SearchUserResponseDto + */ + character: Character +} + +/** + * @export + * @enum {string} + */ +export type SearchUserResponseDtoStatus = 'me' | 'friend' | 'requested' | 'pending' | 'unknown' diff --git a/packages/api/ku-key/models/select-character-level-request-dto.ts b/packages/api/ku-key/models/select-character-level-request-dto.ts new file mode 100644 index 00000000..cc5d1d5c --- /dev/null +++ b/packages/api/ku-key/models/select-character-level-request-dto.ts @@ -0,0 +1,27 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * KU-KEY API + * API for KU-KEY service + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** + * + * @export + * @interface SelectCharacterLevelRequestDto + */ +export interface SelectCharacterLevelRequestDto { + /** + * 선택한 캐릭터 레벨 + * @type {number} + * @memberof SelectCharacterLevelRequestDto + */ + selectedLevel: number +} diff --git a/packages/api/ku-key/models/select-character-level-response-dto.ts b/packages/api/ku-key/models/select-character-level-response-dto.ts new file mode 100644 index 00000000..8df99904 --- /dev/null +++ b/packages/api/ku-key/models/select-character-level-response-dto.ts @@ -0,0 +1,27 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * KU-KEY API + * API for KU-KEY service + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** + * + * @export + * @interface SelectCharacterLevelResponseDto + */ +export interface SelectCharacterLevelResponseDto { + /** + * 선택된 캐릭터 레벨 + * @type {number} + * @memberof SelectCharacterLevelResponseDto + */ + selectedLevel: number +} diff --git a/packages/api/ku-key/models/send-friendship-request-dto.ts b/packages/api/ku-key/models/send-friendship-request-dto.ts new file mode 100644 index 00000000..0647f4c6 --- /dev/null +++ b/packages/api/ku-key/models/send-friendship-request-dto.ts @@ -0,0 +1,27 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * KU-KEY API + * API for KU-KEY service + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** + * + * @export + * @interface SendFriendshipRequestDto + */ +export interface SendFriendshipRequestDto { + /** + * 요청 받을 유저의 username + * @type {string} + * @memberof SendFriendshipRequestDto + */ + toUsername: string +} diff --git a/packages/api/ku-key/models/send-friendship-response-dto.ts b/packages/api/ku-key/models/send-friendship-response-dto.ts new file mode 100644 index 00000000..672e37ea --- /dev/null +++ b/packages/api/ku-key/models/send-friendship-response-dto.ts @@ -0,0 +1,27 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * KU-KEY API + * API for KU-KEY service + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** + * + * @export + * @interface SendFriendshipResponseDto + */ +export interface SendFriendshipResponseDto { + /** + * 요청 성공 여부 + * @type {boolean} + * @memberof SendFriendshipResponseDto + */ + sent: boolean +} diff --git a/packages/api/ku-key/models/send-temp-password-request-dto.ts b/packages/api/ku-key/models/send-temp-password-request-dto.ts new file mode 100644 index 00000000..8b832fbf --- /dev/null +++ b/packages/api/ku-key/models/send-temp-password-request-dto.ts @@ -0,0 +1,27 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * KU-KEY API + * API for KU-KEY service + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** + * + * @export + * @interface SendTempPasswordRequestDto + */ +export interface SendTempPasswordRequestDto { + /** + * 임시비밀번호를 발급받고자 하는 계정의 이메일 + * @type {string} + * @memberof SendTempPasswordRequestDto + */ + email: string +} diff --git a/packages/api/ku-key/models/send-temp-password-response-dto.ts b/packages/api/ku-key/models/send-temp-password-response-dto.ts new file mode 100644 index 00000000..30ee637b --- /dev/null +++ b/packages/api/ku-key/models/send-temp-password-response-dto.ts @@ -0,0 +1,27 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * KU-KEY API + * API for KU-KEY service + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** + * + * @export + * @interface SendTempPasswordResponseDto + */ +export interface SendTempPasswordResponseDto { + /** + * 임시비밀번호 발송 여부 + * @type {boolean} + * @memberof SendTempPasswordResponseDto + */ + sended: boolean +} diff --git a/packages/api/ku-key/models/set-exchange-day-reqeust-dto.ts b/packages/api/ku-key/models/set-exchange-day-reqeust-dto.ts new file mode 100644 index 00000000..eac819c0 --- /dev/null +++ b/packages/api/ku-key/models/set-exchange-day-reqeust-dto.ts @@ -0,0 +1,33 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * KU-KEY API + * API for KU-KEY service + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** + * + * @export + * @interface SetExchangeDayReqeustDto + */ +export interface SetExchangeDayReqeustDto { + /** + * 교환학생 시작 날짜 + * @type {string} + * @memberof SetExchangeDayReqeustDto + */ + startDay: string + /** + * 교환학생 끝 날짜 + * @type {string} + * @memberof SetExchangeDayReqeustDto + */ + endDay: string +} diff --git a/packages/api/ku-key/models/set-profile-request-dto.ts b/packages/api/ku-key/models/set-profile-request-dto.ts new file mode 100644 index 00000000..2dad35f0 --- /dev/null +++ b/packages/api/ku-key/models/set-profile-request-dto.ts @@ -0,0 +1,45 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * KU-KEY API + * API for KU-KEY service + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** + * + * @export + * @interface SetProfileRequestDto + */ +export interface SetProfileRequestDto { + /** + * 유저아이디 + * @type {string} + * @memberof SetProfileRequestDto + */ + username: string + /** + * 국적 + * @type {string} + * @memberof SetProfileRequestDto + */ + country: string + /** + * 모교 + * @type {string} + * @memberof SetProfileRequestDto + */ + homeUniversity: string + /** + * 전공 + * @type {string} + * @memberof SetProfileRequestDto + */ + major: string +} diff --git a/packages/api/ku-key/models/set-response-dto.ts b/packages/api/ku-key/models/set-response-dto.ts new file mode 100644 index 00000000..70d35c14 --- /dev/null +++ b/packages/api/ku-key/models/set-response-dto.ts @@ -0,0 +1,27 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * KU-KEY API + * API for KU-KEY service + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** + * + * @export + * @interface SetResponseDto + */ +export interface SetResponseDto { + /** + * 설정 성공 여부 + * @type {boolean} + * @memberof SetResponseDto + */ + set: boolean +} diff --git a/packages/api/ku-key/models/sign-up-response-dto.ts b/packages/api/ku-key/models/sign-up-response-dto.ts new file mode 100644 index 00000000..274f6243 --- /dev/null +++ b/packages/api/ku-key/models/sign-up-response-dto.ts @@ -0,0 +1,33 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * KU-KEY API + * API for KU-KEY service + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** + * + * @export + * @interface SignUpResponseDto + */ +export interface SignUpResponseDto { + /** + * 학교인증요청 성공 여부 + * @type {boolean} + * @memberof SignUpResponseDto + */ + sended: boolean + /** + * 인증요청한 학번 + * @type {number} + * @memberof SignUpResponseDto + */ + studentNumber: number +} diff --git a/packages/api/ku-key/models/take-attendance-response-dto.ts b/packages/api/ku-key/models/take-attendance-response-dto.ts new file mode 100644 index 00000000..819fe94b --- /dev/null +++ b/packages/api/ku-key/models/take-attendance-response-dto.ts @@ -0,0 +1,39 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * KU-KEY API + * API for KU-KEY service + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** + * + * @export + * @interface TakeAttendanceResponseDto + */ +export interface TakeAttendanceResponseDto { + /** + * 출석자 ID + * @type {number} + * @memberof TakeAttendanceResponseDto + */ + userId: number + /** + * 출석 날짜 + * @type {string} + * @memberof TakeAttendanceResponseDto + */ + attendanceDate: string + /** + * 출석 성공 여부 + * @type {boolean} + * @memberof TakeAttendanceResponseDto + */ + success: boolean +} diff --git a/packages/api/ku-key/models/timetable-dto.ts b/packages/api/ku-key/models/timetable-dto.ts new file mode 100644 index 00000000..c49f7311 --- /dev/null +++ b/packages/api/ku-key/models/timetable-dto.ts @@ -0,0 +1,33 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * KU-KEY API + * API for KU-KEY service + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** + * + * @export + * @interface TimetableDto + */ +export interface TimetableDto { + /** + * 학기 + * @type {string} + * @memberof TimetableDto + */ + semester: string + /** + * 연도 + * @type {string} + * @memberof TimetableDto + */ + year: string +} diff --git a/packages/api/ku-key/models/today-course-dto.ts b/packages/api/ku-key/models/today-course-dto.ts new file mode 100644 index 00000000..bf8c9899 --- /dev/null +++ b/packages/api/ku-key/models/today-course-dto.ts @@ -0,0 +1,51 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * KU-KEY API + * API for KU-KEY service + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** + * + * @export + * @interface TodayCourseDto + */ +export interface TodayCourseDto { + /** + * 강의 이름 + * @type {string} + * @memberof TodayCourseDto + */ + courseName: string + /** + * 교수님 성함 + * @type {string} + * @memberof TodayCourseDto + */ + professorName: string + /** + * 강의실 + * @type {string} + * @memberof TodayCourseDto + */ + classroom?: string + /** + * 시작 시간 + * @type {string} + * @memberof TodayCourseDto + */ + startTime?: string + /** + * 종료 시간 + * @type {string} + * @memberof TodayCourseDto + */ + endTime?: string +} diff --git a/packages/api/ku-key/models/today-schedule-dto.ts b/packages/api/ku-key/models/today-schedule-dto.ts new file mode 100644 index 00000000..872c0a62 --- /dev/null +++ b/packages/api/ku-key/models/today-schedule-dto.ts @@ -0,0 +1,45 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * KU-KEY API + * API for KU-KEY service + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** + * + * @export + * @interface TodayScheduleDto + */ +export interface TodayScheduleDto { + /** + * 일정 이름 + * @type {string} + * @memberof TodayScheduleDto + */ + scheduleName: string + /** + * 시작 시간 + * @type {string} + * @memberof TodayScheduleDto + */ + startTime: string + /** + * 종료 시간 + * @type {string} + * @memberof TodayScheduleDto + */ + endTime: string + /** + * 위치 + * @type {string} + * @memberof TodayScheduleDto + */ + location?: string +} diff --git a/packages/api/ku-key/models/update-calendar-data-request-dto.ts b/packages/api/ku-key/models/update-calendar-data-request-dto.ts new file mode 100644 index 00000000..53f18a70 --- /dev/null +++ b/packages/api/ku-key/models/update-calendar-data-request-dto.ts @@ -0,0 +1,51 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * KU-KEY API + * API for KU-KEY service + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** + * + * @export + * @interface UpdateCalendarDataRequestDto + */ +export interface UpdateCalendarDataRequestDto { + /** + * 시작 날짜 (AAAA-BB-CC 형식) + * @type {string} + * @memberof UpdateCalendarDataRequestDto + */ + startDate?: string + /** + * 종료 날짜 (AAAA-BB-CC 형식) + * @type {string} + * @memberof UpdateCalendarDataRequestDto + */ + endDate?: string + /** + * 행사/일정 제목 + * @type {string} + * @memberof UpdateCalendarDataRequestDto + */ + title?: string + /** + * 행사/일정 설명 + * @type {string} + * @memberof UpdateCalendarDataRequestDto + */ + description?: string + /** + * 학사 일정 여부 + * @type {boolean} + * @memberof UpdateCalendarDataRequestDto + */ + isAcademic?: boolean +} diff --git a/packages/api/ku-key/models/update-calendar-data-response-dto.ts b/packages/api/ku-key/models/update-calendar-data-response-dto.ts new file mode 100644 index 00000000..31aa142b --- /dev/null +++ b/packages/api/ku-key/models/update-calendar-data-response-dto.ts @@ -0,0 +1,27 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * KU-KEY API + * API for KU-KEY service + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** + * + * @export + * @interface UpdateCalendarDataResponseDto + */ +export interface UpdateCalendarDataResponseDto { + /** + * 행사/일정 업데이트 여부 + * @type {boolean} + * @memberof UpdateCalendarDataResponseDto + */ + updated: boolean +} diff --git a/packages/api/ku-key/models/update-club-response-dto.ts b/packages/api/ku-key/models/update-club-response-dto.ts new file mode 100644 index 00000000..0db8fdb2 --- /dev/null +++ b/packages/api/ku-key/models/update-club-response-dto.ts @@ -0,0 +1,27 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * KU-KEY API + * API for KU-KEY service + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** + * + * @export + * @interface UpdateClubResponseDto + */ +export interface UpdateClubResponseDto { + /** + * 업데이트 여부 + * @type {boolean} + * @memberof UpdateClubResponseDto + */ + updated: boolean +} diff --git a/packages/api/ku-key/models/update-comment-request-dto.ts b/packages/api/ku-key/models/update-comment-request-dto.ts new file mode 100644 index 00000000..cb319ce9 --- /dev/null +++ b/packages/api/ku-key/models/update-comment-request-dto.ts @@ -0,0 +1,33 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * KU-KEY API + * API for KU-KEY service + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** + * + * @export + * @interface UpdateCommentRequestDto + */ +export interface UpdateCommentRequestDto { + /** + * 댓글 내용 + * @type {string} + * @memberof UpdateCommentRequestDto + */ + content: string + /** + * 익명 여부 + * @type {boolean} + * @memberof UpdateCommentRequestDto + */ + isAnonymous: boolean +} diff --git a/packages/api/ku-key/models/update-friendship-response-dto.ts b/packages/api/ku-key/models/update-friendship-response-dto.ts new file mode 100644 index 00000000..b03e88e9 --- /dev/null +++ b/packages/api/ku-key/models/update-friendship-response-dto.ts @@ -0,0 +1,27 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * KU-KEY API + * API for KU-KEY service + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** + * + * @export + * @interface UpdateFriendshipResponseDto + */ +export interface UpdateFriendshipResponseDto { + /** + * 업데이트 성공 여부 + * @type {boolean} + * @memberof UpdateFriendshipResponseDto + */ + updated: boolean +} diff --git a/packages/api/ku-key/models/update-schedule-request-dto.ts b/packages/api/ku-key/models/update-schedule-request-dto.ts new file mode 100644 index 00000000..2cf32197 --- /dev/null +++ b/packages/api/ku-key/models/update-schedule-request-dto.ts @@ -0,0 +1,57 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * KU-KEY API + * API for KU-KEY service + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** + * + * @export + * @interface UpdateScheduleRequestDto + */ +export interface UpdateScheduleRequestDto { + /** + * 시간표 ID + * @type {number} + * @memberof UpdateScheduleRequestDto + */ + timetableId: number + /** + * 일정 이름 + * @type {string} + * @memberof UpdateScheduleRequestDto + */ + title?: string + /** + * 요일 + * @type {string} + * @memberof UpdateScheduleRequestDto + */ + day?: string + /** + * 시작 시간 + * @type {string} + * @memberof UpdateScheduleRequestDto + */ + startTime?: string + /** + * 종료 시간 + * @type {string} + * @memberof UpdateScheduleRequestDto + */ + endTime?: string + /** + * 장소 + * @type {string} + * @memberof UpdateScheduleRequestDto + */ + location?: string +} diff --git a/packages/api/ku-key/models/update-schedule-response-dto.ts b/packages/api/ku-key/models/update-schedule-response-dto.ts new file mode 100644 index 00000000..7f83f3c5 --- /dev/null +++ b/packages/api/ku-key/models/update-schedule-response-dto.ts @@ -0,0 +1,63 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * KU-KEY API + * API for KU-KEY service + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** + * + * @export + * @interface UpdateScheduleResponseDto + */ +export interface UpdateScheduleResponseDto { + /** + * ID + * @type {number} + * @memberof UpdateScheduleResponseDto + */ + id: number + /** + * 시간표 ID + * @type {number} + * @memberof UpdateScheduleResponseDto + */ + timetableId: number + /** + * 일정 이름 + * @type {string} + * @memberof UpdateScheduleResponseDto + */ + title: string + /** + * 요일 + * @type {string} + * @memberof UpdateScheduleResponseDto + */ + day: string + /** + * 시작 시간 + * @type {string} + * @memberof UpdateScheduleResponseDto + */ + startTime: string + /** + * 종료 시간 + * @type {string} + * @memberof UpdateScheduleResponseDto + */ + endTime: string + /** + * 장소 + * @type {string} + * @memberof UpdateScheduleResponseDto + */ + location: string +} diff --git a/packages/api/ku-key/models/update-timetable-color-dto.ts b/packages/api/ku-key/models/update-timetable-color-dto.ts new file mode 100644 index 00000000..0dfbe6a9 --- /dev/null +++ b/packages/api/ku-key/models/update-timetable-color-dto.ts @@ -0,0 +1,27 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * KU-KEY API + * API for KU-KEY service + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** + * + * @export + * @interface UpdateTimetableColorDto + */ +export interface UpdateTimetableColorDto { + /** + * 시간표 색상 + * @type {string} + * @memberof UpdateTimetableColorDto + */ + timetableColor: string +} diff --git a/packages/api/ku-key/models/update-timetable-name-dto.ts b/packages/api/ku-key/models/update-timetable-name-dto.ts new file mode 100644 index 00000000..ae520918 --- /dev/null +++ b/packages/api/ku-key/models/update-timetable-name-dto.ts @@ -0,0 +1,27 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * KU-KEY API + * API for KU-KEY service + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** + * + * @export + * @interface UpdateTimetableNameDto + */ +export interface UpdateTimetableNameDto { + /** + * 시간표 이름 + * @type {string} + * @memberof UpdateTimetableNameDto + */ + timetableName: string +} diff --git a/packages/api/ku-key/models/verification-request-dto.ts b/packages/api/ku-key/models/verification-request-dto.ts new file mode 100644 index 00000000..9a07a4d6 --- /dev/null +++ b/packages/api/ku-key/models/verification-request-dto.ts @@ -0,0 +1,27 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * KU-KEY API + * API for KU-KEY service + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** + * + * @export + * @interface VerificationRequestDto + */ +export interface VerificationRequestDto { + /** + * 사용자 이메일 + * @type {string} + * @memberof VerificationRequestDto + */ + email: string +} diff --git a/packages/api/ku-key/models/verification-response-dto.ts b/packages/api/ku-key/models/verification-response-dto.ts new file mode 100644 index 00000000..bbb411d9 --- /dev/null +++ b/packages/api/ku-key/models/verification-response-dto.ts @@ -0,0 +1,27 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * KU-KEY API + * API for KU-KEY service + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** + * + * @export + * @interface VerificationResponseDto + */ +export interface VerificationResponseDto { + /** + * 이매일 발송 여부 + * @type {boolean} + * @memberof VerificationResponseDto + */ + sended: boolean +} diff --git a/packages/api/ku-key/models/verify-email-request-dto.ts b/packages/api/ku-key/models/verify-email-request-dto.ts new file mode 100644 index 00000000..b35e9874 --- /dev/null +++ b/packages/api/ku-key/models/verify-email-request-dto.ts @@ -0,0 +1,33 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * KU-KEY API + * API for KU-KEY service + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** + * + * @export + * @interface VerifyEmailRequestDto + */ +export interface VerifyEmailRequestDto { + /** + * 사용자 이메일 + * @type {string} + * @memberof VerifyEmailRequestDto + */ + email: string + /** + * 인증번호 + * @type {number} + * @memberof VerifyEmailRequestDto + */ + verifyToken: number +} diff --git a/packages/api/ku-key/models/verify-email-response-dto.ts b/packages/api/ku-key/models/verify-email-response-dto.ts new file mode 100644 index 00000000..5829d73c --- /dev/null +++ b/packages/api/ku-key/models/verify-email-response-dto.ts @@ -0,0 +1,27 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * KU-KEY API + * API for KU-KEY service + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** + * + * @export + * @interface VerifyEmailResponseDto + */ +export interface VerifyEmailResponseDto { + /** + * 인증 성공 여부 + * @type {boolean} + * @memberof VerifyEmailResponseDto + */ + verified: boolean +} diff --git a/packages/api/ku-key/models/verify-screenshot-request-dto.ts b/packages/api/ku-key/models/verify-screenshot-request-dto.ts new file mode 100644 index 00000000..22bcbd1c --- /dev/null +++ b/packages/api/ku-key/models/verify-screenshot-request-dto.ts @@ -0,0 +1,27 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * KU-KEY API + * API for KU-KEY service + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** + * + * @export + * @interface VerifyScreenshotRequestDto + */ +export interface VerifyScreenshotRequestDto { + /** + * 요청을 승인할지 거절할지 여부 + * @type {boolean} + * @memberof VerifyScreenshotRequestDto + */ + verify: boolean +} diff --git a/packages/api/ku-key/models/verify-screenshot-response-dto.ts b/packages/api/ku-key/models/verify-screenshot-response-dto.ts new file mode 100644 index 00000000..8242d573 --- /dev/null +++ b/packages/api/ku-key/models/verify-screenshot-response-dto.ts @@ -0,0 +1,27 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * KU-KEY API + * API for KU-KEY service + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** + * + * @export + * @interface VerifyScreenshotResponseDto + */ +export interface VerifyScreenshotResponseDto { + /** + * 정상적으로 처리 되었는지 여부 + * @type {boolean} + * @memberof VerifyScreenshotResponseDto + */ + success: boolean +} diff --git a/packages/tsconfig.json b/packages/tsconfig.json new file mode 100644 index 00000000..d067ab86 --- /dev/null +++ b/packages/tsconfig.json @@ -0,0 +1,113 @@ +{ + "extends": "../tsconfig.json", + "compilerOptions": { + /* Visit https://aka.ms/tsconfig to read more about this file */ + + /* Projects */ + // "incremental": true, /* Save .tsbuildinfo files to allow for incremental compilation of projects. */ + // "composite": true, /* Enable constraints that allow a TypeScript project to be used with project references. */ + // "tsBuildInfoFile": "./.tsbuildinfo", /* Specify the path to .tsbuildinfo incremental compilation file. */ + // "disableSourceOfProjectReferenceRedirect": true, /* Disable preferring source files instead of declaration files when referencing composite projects. */ + // "disableSolutionSearching": true, /* Opt a project out of multi-project reference checking when editing. */ + // "disableReferencedProjectLoad": true, /* Reduce the number of projects loaded automatically by TypeScript. */ + + /* Language and Environment */ + "target": "es2016" /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */, + // "lib": [], /* Specify a set of bundled library declaration files that describe the target runtime environment. */ + // "jsx": "preserve", /* Specify what JSX code is generated. */ + // "experimentalDecorators": true, /* Enable experimental support for legacy experimental decorators. */ + // "emitDecoratorMetadata": true, /* Emit design-type metadata for decorated declarations in source files. */ + // "jsxFactory": "", /* Specify the JSX factory function used when targeting React JSX emit, e.g. 'React.createElement' or 'h'. */ + // "jsxFragmentFactory": "", /* Specify the JSX Fragment reference used for fragments when targeting React JSX emit e.g. 'React.Fragment' or 'Fragment'. */ + // "jsxImportSource": "", /* Specify module specifier used to import the JSX factory functions when using 'jsx: react-jsx*'. */ + // "reactNamespace": "", /* Specify the object invoked for 'createElement'. This only applies when targeting 'react' JSX emit. */ + // "noLib": true, /* Disable including any library files, including the default lib.d.ts. */ + // "useDefineForClassFields": true, /* Emit ECMAScript-standard-compliant class fields. */ + // "moduleDetection": "auto", /* Control what method is used to detect module-format JS files. */ + + /* Modules */ + "module": "ESNext" /* Specify what module code is generated. */, + // "rootDir": "./", /* Specify the root folder within your source files. */ + // "moduleResolution": "node10", /* Specify how TypeScript looks up a file from a given module specifier. */ + // "baseUrl": "./", /* Specify the base directory to resolve non-relative module names. */ + // "paths": {}, /* Specify a set of entries that re-map imports to additional lookup locations. */ + // "rootDirs": [], /* Allow multiple folders to be treated as one when resolving modules. */ + // "typeRoots": [], /* Specify multiple folders that act like './node_modules/@types'. */ + // "types": [], /* Specify type package names to be included without being referenced in a source file. */ + // "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */ + // "moduleSuffixes": [], /* List of file name suffixes to search when resolving a module. */ + // "allowImportingTsExtensions": true, /* Allow imports to include TypeScript file extensions. Requires '--moduleResolution bundler' and either '--noEmit' or '--emitDeclarationOnly' to be set. */ + // "rewriteRelativeImportExtensions": true, /* Rewrite '.ts', '.tsx', '.mts', and '.cts' file extensions in relative import paths to their JavaScript equivalent in output files. */ + // "resolvePackageJsonExports": true, /* Use the package.json 'exports' field when resolving package imports. */ + // "resolvePackageJsonImports": true, /* Use the package.json 'imports' field when resolving imports. */ + // "customConditions": [], /* Conditions to set in addition to the resolver-specific defaults when resolving imports. */ + // "noUncheckedSideEffectImports": true, /* Check side effect imports. */ + // "resolveJsonModule": true, /* Enable importing .json files. */ + // "allowArbitraryExtensions": true, /* Enable importing files with any extension, provided a declaration file is present. */ + // "noResolve": true, /* Disallow 'import's, 'require's or ''s from expanding the number of files TypeScript should add to a project. */ + + /* JavaScript Support */ + // "allowJs": true, /* Allow JavaScript files to be a part of your program. Use the 'checkJS' option to get errors from these files. */ + // "checkJs": true, /* Enable error reporting in type-checked JavaScript files. */ + // "maxNodeModuleJsDepth": 1, /* Specify the maximum folder depth used for checking JavaScript files from 'node_modules'. Only applicable with 'allowJs'. */ + + /* Emit */ + // "declaration": true, /* Generate .d.ts files from TypeScript and JavaScript files in your project. */ + // "declarationMap": true, /* Create sourcemaps for d.ts files. */ + // "emitDeclarationOnly": true, /* Only output d.ts files and not JavaScript files. */ + // "sourceMap": true, /* Create source map files for emitted JavaScript files. */ + // "inlineSourceMap": true, /* Include sourcemap files inside the emitted JavaScript. */ + // "noEmit": true, /* Disable emitting files from a compilation. */ + // "outFile": "./", /* Specify a file that bundles all outputs into one JavaScript file. If 'declaration' is true, also designates a file that bundles all .d.ts output. */ + // "outDir": "./", /* Specify an output folder for all emitted files. */ + // "removeComments": true, /* Disable emitting comments. */ + // "importHelpers": true, /* Allow importing helper functions from tslib once per project, instead of including them per-file. */ + // "downlevelIteration": true, /* Emit more compliant, but verbose and less performant JavaScript for iteration. */ + // "sourceRoot": "", /* Specify the root path for debuggers to find the reference source code. */ + // "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */ + // "inlineSources": true, /* Include source code in the sourcemaps inside the emitted JavaScript. */ + // "emitBOM": true, /* Emit a UTF-8 Byte Order Mark (BOM) in the beginning of output files. */ + // "newLine": "crlf", /* Set the newline character for emitting files. */ + // "stripInternal": true, /* Disable emitting declarations that have '@internal' in their JSDoc comments. */ + // "noEmitHelpers": true, /* Disable generating custom helper functions like '__extends' in compiled output. */ + // "noEmitOnError": true, /* Disable emitting files if any type checking errors are reported. */ + // "preserveConstEnums": true, /* Disable erasing 'const enum' declarations in generated code. */ + // "declarationDir": "./", /* Specify the output directory for generated declaration files. */ + + /* Interop Constraints */ + // "isolatedModules": true, /* Ensure that each file can be safely transpiled without relying on other imports. */ + // "verbatimModuleSyntax": true, /* Do not transform or elide any imports or exports not marked as type-only, ensuring they are written in the output file's format based on the 'module' setting. */ + // "isolatedDeclarations": true, /* Require sufficient annotation on exports so other tools can trivially generate declaration files. */ + // "allowSyntheticDefaultImports": true, /* Allow 'import x from y' when a module doesn't have a default export. */ + "esModuleInterop": true /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables 'allowSyntheticDefaultImports' for type compatibility. */, + // "preserveSymlinks": true, /* Disable resolving symlinks to their realpath. This correlates to the same flag in node. */ + "forceConsistentCasingInFileNames": true /* Ensure that casing is correct in imports. */, + + /* Type Checking */ + "strict": true /* Enable all strict type-checking options. */, + // "noImplicitAny": true, /* Enable error reporting for expressions and declarations with an implied 'any' type. */ + // "strictNullChecks": true, /* When type checking, take into account 'null' and 'undefined'. */ + // "strictFunctionTypes": true, /* When assigning functions, check to ensure parameters and the return values are subtype-compatible. */ + // "strictBindCallApply": true, /* Check that the arguments for 'bind', 'call', and 'apply' methods match the original function. */ + // "strictPropertyInitialization": true, /* Check for class properties that are declared but not set in the constructor. */ + // "strictBuiltinIteratorReturn": true, /* Built-in iterators are instantiated with a 'TReturn' type of 'undefined' instead of 'any'. */ + // "noImplicitThis": true, /* Enable error reporting when 'this' is given the type 'any'. */ + // "useUnknownInCatchVariables": true, /* Default catch clause variables as 'unknown' instead of 'any'. */ + // "alwaysStrict": true, /* Ensure 'use strict' is always emitted. */ + "noUnusedLocals": true /* Enable error reporting when local variables aren't read. */, + "noUnusedParameters": false /* Raise an error when a function parameter isn't read. */, + // "exactOptionalPropertyTypes": true, /* Interpret optional property types as written, rather than adding 'undefined'. */ + // "noImplicitReturns": true, /* Enable error reporting for codepaths that do not explicitly return in a function. */ + // "noFallthroughCasesInSwitch": true, /* Enable error reporting for fallthrough cases in switch statements. */ + // "noUncheckedIndexedAccess": true, /* Add 'undefined' to a type when accessed using an index. */ + // "noImplicitOverride": true, /* Ensure overriding members in derived classes are marked with an override modifier. */ + // "noPropertyAccessFromIndexSignature": true, /* Enforces using indexed accessors for keys declared using an indexed type. */ + // "allowUnusedLabels": true, /* Disable error reporting for unused labels. */ + // "allowUnreachableCode": true, /* Disable error reporting for unreachable code. */ + + /* Completeness */ + // "skipDefaultLibCheck": true, /* Skip type checking .d.ts files that are included with TypeScript. */ + "skipLibCheck": true /* Skip type checking all .d.ts files. */ + }, + "include": ["api/**/*"] +} diff --git a/scripts/generate-oas.js b/scripts/generate-oas.js new file mode 100644 index 00000000..727b0fc0 --- /dev/null +++ b/scripts/generate-oas.js @@ -0,0 +1,76 @@ +import childProcess from 'child_process' +import path from 'path' +import { dirname } from 'path' +import { fileURLToPath } from 'url' + +import fsExtra from 'fs-extra' + +const __filename = fileURLToPath(import.meta.url) +const __dirname = dirname(__filename) + +const ROOT_PATH = path.join(__dirname, '../') +const OUTPUT_PATH = path.join(ROOT_PATH, './packages/api') +const TEMPLATE_PATH = path.join(ROOT_PATH, './scripts/oas-templates') + +async function cleanDirectory(targetPath) { + const exists = await fsExtra.pathExists(targetPath) + + if (exists) { + await fsExtra.emptyDir(targetPath) + await fsExtra.remove(targetPath) + } +} + +/** + * Executes a shell command and return it as a Promise. + * @param cmd {string} + * @return {Promise} + */ +function execShellCommand(cmd) { + return new Promise((resolve, reject) => { + childProcess.exec(cmd, (error, stdout, stderr) => { + if (error) { + console.warn(error) + reject(error) + return + } + console.log(stdout) + resolve(stdout || stderr) + }) + }) +} + +const oasGenerateScript = service => { + const oasScriptPath = 'scripts/__generated__/ku-key-api.json' + return [ + 'openapi-generator-cli', + 'generate', + ['-g', 'typescript-axios'], + ['-i', `${oasScriptPath}`], + ['-o', path.join(OUTPUT_PATH, `${service}`)], + ['-c', path.join(ROOT_PATH, 'openapitools.json')], + ['-t', path.join(TEMPLATE_PATH)], + ] + .flat() + .join(' ') +} + +function runPrettier() { + return execShellCommand(`yarn prettier --w "${OUTPUT_PATH}/**/*.{js,jsx,ts,tsx}"`) +} + +async function generateAPI(serviceName) { + await execShellCommand(oasGenerateScript(serviceName)) +} + +;(async () => { + console.log('Clean Directory') + const serviceNames = ['ku-key'] + await Promise.all(serviceNames.map(serviceName => cleanDirectory(path.join(OUTPUT_PATH, serviceName)))) + + console.log('Start Generate') + await Promise.all(serviceNames.map(generateAPI)) + + console.log('Run Prettier') + await runPrettier() +})() diff --git a/scripts/re-create-api-json.js b/scripts/re-create-api-json.js new file mode 100644 index 00000000..8e2aca0c --- /dev/null +++ b/scripts/re-create-api-json.js @@ -0,0 +1,41 @@ +import childProcess from 'child_process' + +import fsExtra from 'fs-extra' + +function execShellCommand(cmd) { + return new Promise((resolve, reject) => { + childProcess.exec(cmd, (error, stdout, stderr) => { + if (error) { + console.warn(error) + reject(error) + return + } + console.log(stdout) + resolve(stdout || stderr) + }) + }) +} +const outputPath = 'scripts/__generated__/ku-key-api.json' + +async function removeOperationId(filePath) { + // 파일 읽기 + const response = await fetch(filePath) + const data = await response.json() + // paths 객체의 모든 엔드포인트와 메서드를 순회 + Object.values(data.paths).forEach(path => { + Object.values(path).forEach(method => { + // operationId 키가 있으면 제거 + if ('operationId' in method) { + delete method.operationId + } + }) + }) + + // 수정된 데이터를 파일에 쓰기 + await fsExtra.ensureDir('scripts/__generated__') + await fsExtra.writeFile(outputPath, JSON.stringify(data, null, 2), 'utf8') +} + +// 스크립트 실행 +await removeOperationId('https://15.164.27.130.nip.io/api-json') +await execShellCommand(`yarn prettier --w "scripts/__generated__/ku-key-api.json"`) diff --git a/src/App.tsx b/src/App.tsx index 66e64be1..dc333e6e 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -18,6 +18,7 @@ const queryClient = new QueryClient({ refetchOnReconnect: true, refetchOnWindowFocus: true, staleTime: 1000 * 10, // 10 seconds + throwOnError: true, }, }, }) @@ -33,7 +34,7 @@ function App() { - + {router} diff --git a/src/api/hooks/club.ts b/src/api/hooks/club.ts deleted file mode 100644 index 9a15df36..00000000 --- a/src/api/hooks/club.ts +++ /dev/null @@ -1,72 +0,0 @@ -import { useQuery, useQueryClient } from '@tanstack/react-query' - -import { useErrorHandledMutation } from '@/api/hooks/useErrorHandledMutation' -import { GetClubRequest, GetClubResponse, PostClubLikeRequest, PostClubLikeResponse } from '@/api/types/club' -import { ClubSearchParams } from '@/types/club' -import { useAuth } from '@/util/auth/useAuth' -import { apiInterface } from '@/util/axios/custom-axios' - -const getClub = async (params: GetClubRequest) => { - const response = await apiInterface.get('/club', { - params, - headers: { - 'Cache-Control': 'no-store', - Pragma: 'no-cache', - Expires: '0', - }, - }) - return response.data -} - -const createClubSearchQuery = (params: GetClubRequest) => { - const query: GetClubRequest = { - ...params, - keyword: params.keyword || null, - } - return { - queryKey: ['clubSearchResult', query], - queryFn: () => getClub(query), - } -} - -export const useGetClubSearch = (params: GetClubRequest) => { - return useQuery({ - ...createClubSearchQuery(params), - retry: false, - }) -} - -export const useGetCachedClubSearchResult = (params: ClubSearchParams) => { - const queryClient = useQueryClient() - const isLogin = useAuth().authState ?? false - const query = createClubSearchQuery({ ...params, isLogin }) - - const getCachedClubSearchResult = async () => { - const response = await queryClient.ensureQueryData(query) - return response - } - - return getCachedClubSearchResult -} - -const postClubLike = async ({ clubId }: PostClubLikeRequest) => { - const response = await apiInterface.post(`/club/like/${clubId}`) - return response.data -} - -export const usePostClubLike = () => { - const queryClient = useQueryClient() - return useErrorHandledMutation({ - mutationFn: postClubLike, - onSuccess: (response, { queryParams }) => { - queryClient.setQueryData( - ['clubSearchResult', { ...queryParams, keyword: queryParams.keyword || null }], - oldData => { - if (oldData !== undefined) { - return oldData.map(club => (club.clubId === response.clubId ? response : { ...club })) - } - }, - ) - }, - }) -} diff --git a/src/api/hooks/course.ts b/src/api/hooks/course.ts deleted file mode 100644 index 715a4528..00000000 --- a/src/api/hooks/course.ts +++ /dev/null @@ -1,56 +0,0 @@ -import { - GetAcademicFoundationRequest, - GetByKeywordInAcademicFoundationRequest, - GetByKeywordInMajorRequest, - GetByKeywordRequest, - GetCourseRequest, - GetCourseResponse, - GetMajorRequest, -} from '@/api/types/course' -import { apiInterface } from '@/util/axios/custom-axios' - -export const getAllCourse = async () => { - // TODO: All Class에서도 기본 보기 내려주기 - return { - hasNextPage: false, - nextCursorId: null, - data: [], - } -} - -export const getAcademicFoundation = async (params: GetAcademicFoundationRequest) => { - const response = await apiInterface.get('/course/academic-foundation', { params }) - return response.data -} - -export const getGeneral = async (params: GetCourseRequest) => { - const response = await apiInterface.get('/course/general', { params }) - return response.data -} - -export const getMajor = async (params: GetMajorRequest) => { - const response = await apiInterface.get('/course/major', { params }) - return response.data -} - -export const getByKeyword = async (params: GetByKeywordRequest) => { - const response = await apiInterface.get('/course/search-all', { params }) - return response.data -} - -export const getByKeywordInMajor = async (params: GetByKeywordInMajorRequest) => { - const response = await apiInterface.get('/course/search-major', { params }) - return response.data -} - -export const getByKeywordInGeneral = async (params: GetByKeywordRequest) => { - const response = await apiInterface.get('/course/search-general', { params }) - return response.data -} - -export const getByKeywordInAcademicFoundation = async (params: GetByKeywordInAcademicFoundationRequest) => { - const response = await apiInterface.get('/course/search-academic-foundation', { - params, - }) - return response.data -} diff --git a/src/api/types/club.ts b/src/api/types/club.ts index edcd70d1..09461c39 100644 --- a/src/api/types/club.ts +++ b/src/api/types/club.ts @@ -1,4 +1,4 @@ -import { CategoryType } from '@/components/club/constants' +import { CategoryType } from '@/features/Club/constants' import { ClubInterface } from '@/types/club' export interface ClubProfileProps { @@ -13,7 +13,7 @@ export interface GetClubRequest { sortBy?: 'like' | null wishList?: boolean category?: CategoryType - keyword?: string | null + keyword?: string isLogin: boolean } diff --git a/src/api/types/course.ts b/src/api/types/course.ts index 2be59f51..9e8e5092 100644 --- a/src/api/types/course.ts +++ b/src/api/types/course.ts @@ -11,22 +11,7 @@ export interface GetCourseRequest { cursorId?: number year: string semester: SemesterType -} - -export interface GetMajorRequest extends GetCourseRequest { - major: string -} - -export interface GetAcademicFoundationRequest extends GetCourseRequest { - college: string -} - -export interface GetByKeywordRequest extends GetCourseRequest { - keyword: string -} -export interface GetByKeywordInMajorRequest extends GetByKeywordRequest { - major: string -} -export interface GetByKeywordInAcademicFoundationRequest extends GetByKeywordRequest { - college: string + keyword?: string + category?: 'Major' | 'General Studies' | 'Academic Foundations' + classification?: string } diff --git a/src/assets/Ku-key_Big.png b/src/assets/Ku-key_Big.png new file mode 100644 index 00000000..fe13c015 Binary files /dev/null and b/src/assets/Ku-key_Big.png differ diff --git a/src/assets/fake-timetable.jpg b/src/assets/fake-timetable.jpg new file mode 100644 index 00000000..970844a4 Binary files /dev/null and b/src/assets/fake-timetable.jpg differ diff --git a/src/assets/icon/AcademicResearchIcon.tsx b/src/assets/icon/AcademicResearchIcon.tsx index 30ce6ba2..c8dd52b6 100644 --- a/src/assets/icon/AcademicResearchIcon.tsx +++ b/src/assets/icon/AcademicResearchIcon.tsx @@ -1,7 +1,4 @@ -interface Props { - color: string -} -const AcademicResearchIcon = ({ color }: Props) => { +const AcademicResearchIcon = () => { return ( { > ) diff --git a/src/assets/icon/AllIcon.tsx b/src/assets/icon/AllIcon.tsx index 9cd30ab8..6325dff1 100644 --- a/src/assets/icon/AllIcon.tsx +++ b/src/assets/icon/AllIcon.tsx @@ -1,7 +1,4 @@ -interface Props { - color: string -} -const AllIcon = ({ color }: Props) => { +const AllIcon = () => { return ( { > ) diff --git a/src/assets/icon/ExhibitionIcon.tsx b/src/assets/icon/ExhibitionIcon.tsx index b4b51609..e468ecd4 100644 --- a/src/assets/icon/ExhibitionIcon.tsx +++ b/src/assets/icon/ExhibitionIcon.tsx @@ -1,7 +1,4 @@ -interface Props { - color: string -} -const ExhibitionIcon = ({ color }: Props) => { +const ExhibitionIcon = () => { return ( { > ) diff --git a/src/assets/icon/HeartIcon.tsx b/src/assets/icon/HeartIcon.tsx new file mode 100644 index 00000000..a59f09cd --- /dev/null +++ b/src/assets/icon/HeartIcon.tsx @@ -0,0 +1,10 @@ +const HeartIcon = () => ( + + + +) + +export default HeartIcon diff --git a/src/assets/icon/HumanitiesIcon.tsx b/src/assets/icon/HumanitiesIcon.tsx index 94ba9a5f..a676af4f 100644 --- a/src/assets/icon/HumanitiesIcon.tsx +++ b/src/assets/icon/HumanitiesIcon.tsx @@ -1,7 +1,4 @@ -interface Props { - color: string -} -const HumanitiesIcon = ({ color }: Props) => { +const HumanitiesIcon = () => { return ( { > ) diff --git a/src/assets/icon/InstagramIcon.tsx b/src/assets/icon/InstagramIcon.tsx new file mode 100644 index 00000000..df674490 --- /dev/null +++ b/src/assets/icon/InstagramIcon.tsx @@ -0,0 +1,29 @@ +const InstagramIcon = () => { + return ( + + + + + + + + + + + + ) +} +export default InstagramIcon diff --git a/src/assets/icon/InstrumentalArtsIcon.tsx b/src/assets/icon/InstrumentalArtsIcon.tsx index 924b62d8..a90e0967 100644 --- a/src/assets/icon/InstrumentalArtsIcon.tsx +++ b/src/assets/icon/InstrumentalArtsIcon.tsx @@ -1,7 +1,4 @@ -interface Props { - color: string -} -const InstrumentalArtsIcon = ({ color }: Props) => { +const InstrumentalArtsIcon = () => { return ( { > ) diff --git a/src/assets/icon/LeftArrowIcon.tsx b/src/assets/icon/LeftArrowIcon.tsx new file mode 100644 index 00000000..f080f392 --- /dev/null +++ b/src/assets/icon/LeftArrowIcon.tsx @@ -0,0 +1,11 @@ +const LeftArrowIcon = () => { + return ( + + + + ) +} +export default LeftArrowIcon diff --git a/src/assets/icon/LifeCultureIcon.tsx b/src/assets/icon/LifeCultureIcon.tsx index 35e6e682..0961eeca 100644 --- a/src/assets/icon/LifeCultureIcon.tsx +++ b/src/assets/icon/LifeCultureIcon.tsx @@ -1,7 +1,4 @@ -interface Props { - color: string -} -const LifeCultureIcon = ({ color }: Props) => { +const LifeCultureIcon = () => { return ( { > ) diff --git a/src/assets/icon/OptionIcon.tsx b/src/assets/icon/OptionIcon.tsx new file mode 100755 index 00000000..2926cf79 --- /dev/null +++ b/src/assets/icon/OptionIcon.tsx @@ -0,0 +1,11 @@ +const OptionIcon = () => ( + + + +) + +export default OptionIcon diff --git a/src/assets/icon/PerformingArtsIcon.tsx b/src/assets/icon/PerformingArtsIcon.tsx index 050ba35e..bd1f4dd5 100644 --- a/src/assets/icon/PerformingArtsIcon.tsx +++ b/src/assets/icon/PerformingArtsIcon.tsx @@ -1,7 +1,4 @@ -interface Props { - color: string -} -const PerformingArtsIcon = ({ color }: Props) => { +const PerformingArtsIcon = () => { return ( { > ) diff --git a/src/assets/icon/ReligiousIcon.tsx b/src/assets/icon/ReligiousIcon.tsx index 2a9201c7..d02982b7 100644 --- a/src/assets/icon/ReligiousIcon.tsx +++ b/src/assets/icon/ReligiousIcon.tsx @@ -1,7 +1,4 @@ -interface Props { - color: string -} -const ReligiousIcon = ({ color }: Props) => { +const ReligiousIcon = () => { return ( { > ) diff --git a/src/assets/icon/SocialIcon.tsx b/src/assets/icon/SocialIcon.tsx index a4f819e4..4c812b33 100644 --- a/src/assets/icon/SocialIcon.tsx +++ b/src/assets/icon/SocialIcon.tsx @@ -1,7 +1,4 @@ -interface Props { - color: string -} -const SocialIcon = ({ color }: Props) => { +const SocialIcon = () => { return ( { > ) diff --git a/src/assets/icon/SportsIcon.tsx b/src/assets/icon/SportsIcon.tsx index 29156c78..1336d345 100644 --- a/src/assets/icon/SportsIcon.tsx +++ b/src/assets/icon/SportsIcon.tsx @@ -1,7 +1,4 @@ -interface Props { - color: string -} -const SportsIcon = ({ color }: Props) => { +const SportsIcon = () => { return ( { > ) diff --git a/src/assets/icon/YoutubeIcon.tsx b/src/assets/icon/YoutubeIcon.tsx new file mode 100644 index 00000000..06835cf0 --- /dev/null +++ b/src/assets/icon/YoutubeIcon.tsx @@ -0,0 +1,12 @@ +const YoutubeIcon = () => { + return ( + + + + + ) +} +export default YoutubeIcon diff --git a/src/common/components/ErrorBoundarySuspense/DefaultErrorFallback/index.tsx b/src/common/components/ErrorBoundarySuspense/DefaultErrorFallback/index.tsx new file mode 100644 index 00000000..4836bbc3 --- /dev/null +++ b/src/common/components/ErrorBoundarySuspense/DefaultErrorFallback/index.tsx @@ -0,0 +1,11 @@ +import { FallbackProps } from 'react-error-boundary' + +const DefaultErrorFallback = ({ resetErrorBoundary }: FallbackProps) => { + return ( +
+
There was an error!
+ +
+ ) +} +export default DefaultErrorFallback diff --git a/src/common/components/ErrorBoundarySuspense/index.tsx b/src/common/components/ErrorBoundarySuspense/index.tsx new file mode 100644 index 00000000..72bb1e22 --- /dev/null +++ b/src/common/components/ErrorBoundarySuspense/index.tsx @@ -0,0 +1,24 @@ +import { QueryErrorResetBoundary } from '@tanstack/react-query' +import { PropsWithChildren, ReactNode, Suspense } from 'react' +import { ErrorBoundary, FallbackProps } from 'react-error-boundary' + +import DefaultErrorFallback from '@/common/components/ErrorBoundarySuspense/DefaultErrorFallback' + +interface Props extends PropsWithChildren { + fallback: ReactNode + errorFallback?: (props: FallbackProps) => ReactNode +} +const ErrorBoundarySuspense = ({ children, fallback, errorFallback = DefaultErrorFallback }: Props) => { + return ( + + + {({ reset }) => ( + + {children} + + )} + + + ) +} +export default ErrorBoundarySuspense diff --git a/src/common/components/MobileTopBar/index.tsx b/src/common/components/MobileTopBar/index.tsx new file mode 100644 index 00000000..37fa4706 --- /dev/null +++ b/src/common/components/MobileTopBar/index.tsx @@ -0,0 +1,17 @@ +import { useNavigate } from 'react-router-dom' + +import * as s from './style.css' + +import LeftArrowIcon from '@/assets/icon/LeftArrowIcon' + +const MobileTopBar = () => { + const navigate = useNavigate() + return ( +
+ +
+ ) +} +export default MobileTopBar diff --git a/src/common/components/MobileTopBar/style.css.ts b/src/common/components/MobileTopBar/style.css.ts new file mode 100644 index 00000000..3d43db4b --- /dev/null +++ b/src/common/components/MobileTopBar/style.css.ts @@ -0,0 +1,14 @@ +import { style } from '@vanilla-extract/css' + +import { f } from '@/style' +export const Wrapper = style([ + f.pAbsolute, + f.flex, + f.wScreen, + f.alignCenter, + { + height: 96, + background: 'linear-gradient(180deg, rgba(33, 33, 36, 0.30) 50%, rgba(33, 33, 36, 0.00) 100%)', + padding: '0 26px', + }, +]) diff --git a/src/common/hooks/useAsyncRead.ts b/src/common/hooks/useAsyncRead.ts new file mode 100644 index 00000000..5b7f7318 --- /dev/null +++ b/src/common/hooks/useAsyncRead.ts @@ -0,0 +1,18 @@ +import { AxiosInstance, AxiosResponse } from 'axios' + +import { apiInterface } from '@/util/axios/custom-axios' + +type ReadClient = ({ + axios, +}: { + axios?: AxiosInstance +}) => (...params: P) => Promise> + +export const useAsyncRead = (readClient: ReadClient) => { + const axios = apiInterface + + return async (...params: P) => { + const response = await readClient({ axios })(...params) + return response.data + } +} diff --git a/src/components/MainLayout.tsx b/src/components/MainLayout.tsx index aab94392..14fb429b 100644 --- a/src/components/MainLayout.tsx +++ b/src/components/MainLayout.tsx @@ -1,14 +1,25 @@ import { css } from '@styled-system/css' import { useEffect } from 'react' -import { Outlet } from 'react-router-dom' +import { Outlet, useLocation } from 'react-router-dom' import { useCheckVerified } from '@/api/hooks/auth' +import MobileTopBar from '@/common/components/MobileTopBar' import Footer from '@/components/Footer' import Header from '@/components/Header' import MetaTag from '@/components/MetaTag' import { useAuth } from '@/util/auth/useAuth' +import { useMediaQueryByName } from '@/util/hooks/useMediaQueryByName' const MainLayout = () => { + const location = useLocation() + const isMobile = useMediaQueryByName('smDown') + const curPath = location.pathname + + // TODO: 좀 더 까리하게 관리하기 + // 따로 config 파일을 만들기? + const isClubDetail = curPath.startsWith('/club/detail') + const showMobileTopBar = isClubDetail && isMobile + const { isAuthenticated, authState, setVerified } = useAuth() const { data: verified } = useCheckVerified(isAuthenticated && !authState) useEffect(() => { @@ -17,8 +28,8 @@ const MainLayout = () => { return (
-
-
+ {showMobileTopBar ? :
} +