From 61fc0d27476c104ba508ad8a4217223410112882 Mon Sep 17 00:00:00 2001 From: Alex Shevchuk Date: Wed, 17 Sep 2025 14:32:06 +0300 Subject: [PATCH] 71 --- .gitea/workflows/ci.yaml | 6 +- .gitea/workflows/deploy_staging.yaml | 2 +- Dockerfile | 11 +- Makefile | 63 +- go.mod | 15 +- internal/config/constants.go | 2 +- internal/http/auth.go | 86 + internal/http/balance.go | 201 + internal/http/build_info.go | 7 + internal/http/company_agent.go | 39 + internal/http/company_distributor.go | 69 + internal/http/handlers.go | 96 + internal/http/integration.go | 10 + internal/http/logo.go | 51 + internal/http/profile.go | 46 + internal/http/router.go | 5 + internal/http/submission.go | 87 + internal/http/swagger/docs/docs.go | 5506 +++++++++++++++++++++++ internal/http/swagger/docs/swagger.json | 5486 ++++++++++++++++++++++ internal/http/swagger/docs/swagger.yaml | 3599 +++++++++++++++ internal/http/swagger/models.go | 14 + internal/http/vacancy.go | 95 + 22 files changed, 15486 insertions(+), 10 deletions(-) create mode 100644 internal/http/swagger/docs/docs.go create mode 100644 internal/http/swagger/docs/swagger.json create mode 100644 internal/http/swagger/docs/swagger.yaml create mode 100644 internal/http/swagger/models.go diff --git a/.gitea/workflows/ci.yaml b/.gitea/workflows/ci.yaml index 294e215..4e66457 100644 --- a/.gitea/workflows/ci.yaml +++ b/.gitea/workflows/ci.yaml @@ -35,7 +35,6 @@ jobs: - name: Run golangci-lint run: | - go clean -modcache go mod tidy golangci-lint run -c ./.golangci-lint.yaml --fix=false --color=always @@ -59,8 +58,11 @@ jobs: go-version: 1.24 - name: Build golang services + env: + HOST: ${{ github.event.base_ref == 'refs/heads/release' && secrets.HOST_STG || secrets.HOST_PROD }} run: | go mod tidy + SWAGGER_HOST=${HOST} make docs CGO_ENABLED=0 GOOS=linux go build -ldflags="-s -w" -o main cmd/main.go push: @@ -119,10 +121,12 @@ jobs: IMAGE_NAME: ${{ steps.docker-metadata.outputs.IMAGE_NAME }} IMAGE_TAG: ${{ steps.docker-metadata.outputs.IMAGE_TAG }} CONFIG_FILE: .build/config/${{ steps.git-metadata.outputs.TARGET_ENV }}.yaml + HOST: ${{ github.event.base_ref == 'refs/heads/release' && secrets.HOST_STG || secrets.HOST_PROD }} run: | docker build \ --build-arg BUILD_LDFLAGS="-w -s" \ --build-arg CONFIG_FILE_PATH=$CONFIG_FILE \ + --build-arg SWAGGER_HOST=$HOST \ -t $IMAGE_NAME:$IMAGE_TAG \ -t $IMAGE_NAME:latest \ . diff --git a/.gitea/workflows/deploy_staging.yaml b/.gitea/workflows/deploy_staging.yaml index 728ba7c..982e868 100644 --- a/.gitea/workflows/deploy_staging.yaml +++ b/.gitea/workflows/deploy_staging.yaml @@ -18,7 +18,7 @@ on: jobs: deploy: - name: Deploy to ${{ inputs.environment }} + name: Deploy runs-on: ubuntu-22.04 env: diff --git a/Dockerfile b/Dockerfile index e616063..7d048ef 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,13 +1,18 @@ FROM golang:1.24-alpine AS builder ARG BUILD_LDFLAGS +ARG SWAGGER_HOST=localhost:8000 WORKDIR /app -COPY go.mod go.sum ./ +RUN apk add --no-cache make + +COPY go.mod ./ RUN go mod download -x COPY . . +RUN SWAGGER_HOST=${SWAGGER_HOST} make docs + RUN CGO_ENABLED=0 GOOS=linux go build -ldflags="${BUILD_LDFLAGS}" -trimpath -o main ./cmd/main.go FROM alpine:3.18 AS certs @@ -21,8 +26,8 @@ ARG CONFIG_FILE_PATH RUN apk add --no-cache ca-certificates tzdata -COPY --from=certs /YandexInternalRootCA.crt /etc/.redis/YandexInternalRootCA.crt -COPY --from=certs /YandexInternalRootCA.crt /etc/.postgres/YandexInternalRootCA.crt +COPY --from=certs /YandexInternalRootCA.crt /root/.redis/YandexInternalRootCA.crt +COPY --from=certs /YandexInternalRootCA.crt /root/.postgres/YandexInternalRootCA.crt COPY ${CONFIG_FILE_PATH} /config.yaml COPY --from=builder /app/main /main diff --git a/Makefile b/Makefile index dab60a3..87bcd30 100644 --- a/Makefile +++ b/Makefile @@ -5,9 +5,11 @@ BUILD_DATE := $(shell date -u +'%Y-%m-%dT%H:%M:%SZ') GIT_COMMIT := $(shell git rev-parse HEAD 2>/dev/null) LDFLAGS := "-s -w -X main.version=$(VERSION) -X main.commit=$(GIT_COMMIT) -X main.date=$(BUILD_DATE)" GOLANGCI_LINT_VERSION := v1.62.2 +SWAG_VERSION := v1.16.2 ENV := "local" UNAME_S := $(shell uname -s) CONFIG_PATH := .build/config/ +SWAGGER_DOCS_PATH := internal/http/swagger/docs ifeq ($(OS),Windows_NT) CONFIG_PATH := $(subst /,\,$(CONFIG_PATH)) @@ -18,7 +20,7 @@ all: lint build ## -- Dependency Management -- .PHONY: install-tools -install-tools: $(BIN_DIR)/golangci-lint +install-tools: $(BIN_DIR)/golangci-lint $(BIN_DIR)/swag .PHONY: $(BIN_DIR)/golangci-lint $(BIN_DIR)/golangci-lint: @@ -26,12 +28,48 @@ $(BIN_DIR)/golangci-lint: @echo "Installing golangci-lint $(GOLANGCI_LINT_VERSION)..." @GOBIN=$(BIN_DIR) go install github.com/golangci/golangci-lint/cmd/golangci-lint@$(GOLANGCI_LINT_VERSION) +.PHONY: $(BIN_DIR)/swag +$(BIN_DIR)/swag: + @mkdir -p $(@D) + @echo "Installing swag $(SWAG_VERSION)..." + @GOBIN=$(BIN_DIR) go install github.com/swaggo/swag/cmd/swag@$(SWAG_VERSION) + ## -- Linting -- .PHONY: lint lint: $(BIN_DIR)/golangci-lint @echo "Running linter..." @$(BIN_DIR)/golangci-lint run --config .golangci-lint.yaml --fix=false --color=always +## -- Documentation -- +.PHONY: docs +docs: $(BIN_DIR)/swag + @echo "Generating Swagger documentation..." + @if [ -n "$(SWAGGER_HOST)" ]; then \ + echo "Using SWAGGER_HOST: $(SWAGGER_HOST)"; \ + $(MAKE) .generate-swagger-with-host HOST=$(SWAGGER_HOST); \ + else \ + echo "Using default host: localhost:8000"; \ + mkdir -p $(SWAGGER_DOCS_PATH); \ + $(BIN_DIR)/swag init -g cmd/main.go -o $(SWAGGER_DOCS_PATH) --parseDependency --parseInternal; \ + echo "Swagger documentation generated in $(SWAGGER_DOCS_PATH)"; \ + fi + +.PHONY: .generate-swagger-with-host +.generate-swagger-with-host: $(BIN_DIR)/swag + @echo "Генерация Swagger документации с host: $(HOST)" + @mkdir -p $(SWAGGER_DOCS_PATH) + @TEMP_MAIN="cmd/main_temp.go" && \ + cp cmd/main.go $$TEMP_MAIN && \ + if [[ "$$OSTYPE" == "darwin"* ]]; then \ + sed -i '' "s/localhost:8000/$(HOST)/g" $$TEMP_MAIN; \ + else \ + sed -i "s/localhost:8000/$(HOST)/g" $$TEMP_MAIN; \ + fi && \ + $(BIN_DIR)/swag init -g $$TEMP_MAIN -o $(SWAGGER_DOCS_PATH) --parseDependency --parseInternal && \ + rm -f $$TEMP_MAIN && \ + echo "Swagger документация успешно сгенерирована с host: $(HOST)" && \ + echo "Документация доступна по адресу: http://$(HOST)/swagger/index.html" + ## -- Run -- ## To change env use: make run CONFIG_PATH={config file dir path} ENV={env} .PHONY: run @@ -71,12 +109,33 @@ docker-build: @echo "Building Docker image..." @docker build \ --build-arg BUILD_LDFLAGS=$(LDFLAGS) \ + --build-arg SWAGGER_HOST=$(SWAGGER_HOST) \ --build-arg CONFIG_FILE_PATH="$(CONFIG_PATH)$(ENV).yaml" \ -t $(APP_NAME):$(VERSION) \ . +.PHONY: docker-build-staging +docker-build-staging: + @echo "Building Docker image for staging..." + @docker build \ + --build-arg BUILD_LDFLAGS=$(LDFLAGS) \ + --build-arg SWAGGER_HOST=api-staging.example.com \ + --build-arg CONFIG_FILE_PATH="$(CONFIG_PATH)$(ENV).yaml" \ + -t $(APP_NAME):staging \ + . + +.PHONY: docker-build-production +docker-build-production: + @echo "Building Docker image for production..." + @docker build \ + --build-arg BUILD_LDFLAGS=$(LDFLAGS) \ + --build-arg SWAGGER_HOST=api.example.com \ + --build-arg CONFIG_FILE_PATH="$(CONFIG_PATH)$(ENV).yaml" \ + -t $(APP_NAME):production \ + . + ## -- Cleanup -- .PHONY: clean clean: @echo "Cleaning..." - @rm -rf $(BIN_DIR) \ No newline at end of file + @rm -rf $(BIN_DIR) diff --git a/go.mod b/go.mod index c34790c..8debaf9 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module git-molva.ru/Molva/molva-backend/services/api_gateway -go 1.23.3 +go 1.24 require ( github.com/AlexOreL-272/ProtoMolva v1.32.5 @@ -19,11 +19,14 @@ require ( github.com/jmoiron/sqlx v1.4.0 github.com/lib/pq v1.10.9 github.com/rabbitmq/amqp091-go v1.10.0 + github.com/swaggo/http-swagger v1.3.4 + github.com/swaggo/swag v1.16.2 google.golang.org/protobuf v1.36.6 ) require ( github.com/BurntSushi/toml v1.4.0 // indirect + github.com/KyleBanks/depth v1.2.1 // indirect github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.6.10 // indirect github.com/aws/aws-sdk-go-v2/credentials v1.17.67 // indirect github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.30 // indirect @@ -38,26 +41,34 @@ require ( github.com/aws/aws-sdk-go-v2/service/sso v1.25.3 // indirect github.com/aws/aws-sdk-go-v2/service/ssooidc v1.30.1 // indirect github.com/aws/aws-sdk-go-v2/service/sts v1.33.19 // indirect + github.com/go-openapi/jsonpointer v0.19.5 // indirect + github.com/go-openapi/jsonreference v0.20.0 // indirect + github.com/go-openapi/spec v0.20.6 // indirect + github.com/go-openapi/swag v0.19.15 // indirect github.com/go-resty/resty/v2 v2.16.5 // indirect github.com/jackc/pgpassfile v1.0.0 // indirect github.com/jackc/pgservicefile v0.0.0-20240606120523-5a60cdf6a761 // indirect github.com/jackc/puddle/v2 v2.2.2 // indirect github.com/joho/godotenv v1.5.1 // indirect + github.com/josharian/intern v1.0.0 // indirect github.com/lann/builder v0.0.0-20180802200727-47ae307949d0 // indirect github.com/lann/ps v0.0.0-20150810152359-62de8c46ede0 // indirect + github.com/mailru/easyjson v0.7.6 // indirect github.com/opentracing/opentracing-go v1.2.0 // indirect github.com/pkg/errors v0.9.1 // indirect github.com/rogpeppe/go-internal v1.14.1 // indirect github.com/segmentio/ksuid v1.0.4 // indirect - github.com/stretchr/testify v1.8.4 // indirect + github.com/swaggo/files v1.0.1 // indirect golang.org/x/crypto v0.37.0 // indirect golang.org/x/net v0.37.0 // indirect golang.org/x/sync v0.13.0 // indirect golang.org/x/sys v0.32.0 // indirect golang.org/x/text v0.24.0 // indirect + golang.org/x/tools v0.26.0 // indirect google.golang.org/genproto/googleapis/api v0.0.0-20250303144028-a0af3efb3deb // indirect google.golang.org/genproto/googleapis/rpc v0.0.0-20250303144028-a0af3efb3deb // indirect google.golang.org/grpc v1.71.0 // indirect + gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect olympos.io/encoding/edn v0.0.0-20201019073823-d3554ca0b0a3 // indirect ) diff --git a/internal/config/constants.go b/internal/config/constants.go index 48b874d..e5bf7a2 100644 --- a/internal/config/constants.go +++ b/internal/config/constants.go @@ -1,5 +1,5 @@ package config const ( - ConfigBasePath = "/config.yaml" + ConfigBasePath = ".build/config/local.yaml" ) diff --git a/internal/http/auth.go b/internal/http/auth.go index 746d55d..f9ff227 100644 --- a/internal/http/auth.go +++ b/internal/http/auth.go @@ -26,6 +26,17 @@ import ( // LOGIN USER // ------------------------------ +// @Summary Вход пользователя +// @Description Аутентификация пользователя по email и паролю +// @Tags auth +// @Accept json +// @Produce json +// @Param request body rmodel.LoginUserRequest true "Данные для входа" +// @Success 200 {object} rmodel.LoginUserResponse "Успешная аутентификация" +// @Failure 400 {object} map[string]string "Неверные данные запроса" +// @Failure 401 {object} map[string]string "Неверные учетные данные" +// @Failure 500 {object} map[string]string "Внутренняя ошибка сервера" +// @Router /api/v1/login [post] func (h *handler) loginHandler(w http.ResponseWriter, r *http.Request) { const handlerName = "loginHandler" @@ -110,6 +121,17 @@ func (h *handler) loginHandler(w http.ResponseWriter, r *http.Request) { // REGISTER USER // ------------------------------ +// @Summary Регистрация пользователя +// @Description Создание нового пользователя в системе +// @Tags auth +// @Accept json +// @Produce json +// @Param request body rmodel.UserCredentials true "Данные для регистрации" +// @Success 201 {object} rmodel.RegisterResponse "Пользователь успешно создан" +// @Failure 400 {object} map[string]string "Неверные данные запроса" +// @Failure 409 {object} map[string]string "Пользователь уже существует" +// @Failure 500 {object} map[string]string "Внутренняя ошибка сервера" +// @Router /api/v1/register [post] func (h *handler) registerHandler(w http.ResponseWriter, r *http.Request) { const handlerName = "registerHandler" @@ -301,6 +323,17 @@ func (h *handler) saveUser(ctx context.Context, uid string, creds rmodel.UserCre // LOGOUT USER // ------------------------------ +// @Summary Выход пользователя +// @Description Завершение сессии пользователя +// @Tags auth +// @Accept json +// @Produce json +// @Param request body rmodel.LogoutUserRequest true "Токен для выхода" +// @Success 200 "Успешный выход" +// @Failure 400 {object} map[string]string "Неверные данные запроса" +// @Failure 401 {object} map[string]string "Неверный токен" +// @Failure 500 {object} map[string]string "Внутренняя ошибка сервера" +// @Router /api/v1/logout [post] func (h *handler) logoutHandler(w http.ResponseWriter, r *http.Request) { const handlerName = "logoutHandler" @@ -327,6 +360,17 @@ func (h *handler) logoutHandler(w http.ResponseWriter, r *http.Request) { // REFRESH USER TOKEN // ------------------------------ +// @Summary Обновление токена доступа +// @Description Получение нового access token по refresh token +// @Tags auth +// @Accept json +// @Produce json +// @Param request body rmodel.RefreshTokenRequest true "Refresh token" +// @Success 200 {object} rmodel.RefreshTokenResponse "Новые токены" +// @Failure 400 {object} map[string]string "Неверные данные запроса" +// @Failure 401 {object} map[string]string "Неверный refresh token" +// @Failure 500 {object} map[string]string "Внутренняя ошибка сервера" +// @Router /api/v1/refresh-token [post] func (h *handler) refreshTokenHandler(w http.ResponseWriter, r *http.Request) { const handlerName = "refreshTokenHandler" @@ -362,6 +406,17 @@ func (h *handler) refreshTokenHandler(w http.ResponseWriter, r *http.Request) { } } +// @Summary Страница подтверждения email +// @Description HTML страница для подтверждения email адреса пользователя +// @Tags auth +// @Accept html +// @Produce html +// @Param uid query string true "ID пользователя" +// @Param token query string true "Токен подтверждения" +// @Success 200 {string} string "HTML страница подтверждения" +// @Failure 400 {object} map[string]string "Неверные параметры запроса" +// @Failure 500 {object} map[string]string "Внутренняя ошибка сервера" +// @Router /api/v1/confirm_email [get] func (h *handler) confirmEmailPageHandler(w http.ResponseWriter, r *http.Request) { const handlerName = "confirmEmailPageHandler" @@ -418,6 +473,16 @@ func (h *handler) confirmEmailPageHandler(w http.ResponseWriter, r *http.Request // RESET PASSWORD // ------------------------------ +// @Summary Запрос восстановления пароля +// @Description Отправка OTP кода на email для восстановления пароля +// @Tags auth +// @Accept json +// @Produce json +// @Param request body rmodel.ForgotPasswordRequest true "Данные для восстановления пароля" +// @Success 200 {object} map[string]string "OTP код отправлен" +// @Failure 400 {object} map[string]string "Неверные данные запроса" +// @Failure 500 {object} map[string]string "Внутренняя ошибка сервера" +// @Router /api/v1/forgot_password [post] func (h *handler) forgotPasswordHandler(w http.ResponseWriter, r *http.Request) { const handlerName = "forgotPasswordHandler" @@ -475,6 +540,17 @@ func (h *handler) forgotPasswordHandler(w http.ResponseWriter, r *http.Request) w.WriteHeader(http.StatusCreated) } +// @Summary Валидация OTP кода +// @Description Проверка OTP кода для восстановления пароля +// @Tags auth +// @Accept json +// @Produce json +// @Param otp query string true "OTP код" +// @Param email query string true "Email пользователя" +// @Success 200 {object} map[string]string "OTP код валиден" +// @Failure 400 {object} map[string]string "Неверные параметры запроса" +// @Failure 500 {object} map[string]string "Внутренняя ошибка сервера" +// @Router /api/v1/validate_otp [get] func (h *handler) validateOTPHandler(w http.ResponseWriter, r *http.Request) { const handlerName = "validateOTPHandler" @@ -519,6 +595,16 @@ func (h *handler) validateOTPHandler(w http.ResponseWriter, r *http.Request) { } } +// @Summary Сброс пароля +// @Description Установка нового пароля после валидации OTP кода +// @Tags auth +// @Accept json +// @Produce json +// @Param request body rmodel.ResetPasswordRequest true "Данные для сброса пароля" +// @Success 200 {object} map[string]string "Пароль успешно изменен" +// @Failure 400 {object} map[string]string "Неверные данные запроса" +// @Failure 500 {object} map[string]string "Внутренняя ошибка сервера" +// @Router /api/v1/reset_password [put] func (h *handler) resetPasswordHandler(w http.ResponseWriter, r *http.Request) { const handlerName = "resetPasswordHandler" diff --git a/internal/http/balance.go b/internal/http/balance.go index 184af74..6338b0a 100644 --- a/internal/http/balance.go +++ b/internal/http/balance.go @@ -12,6 +12,17 @@ import ( "github.com/gorilla/mux" ) +// @Summary Получить баланс агента +// @Description Получение текущего баланса агента +// @Tags agents +// @Accept json +// @Produce json +// @Param agent_id path string true "ID агента" +// @Success 200 {object} rmodel.BalanceGetResponse "Баланс агента" +// @Failure 400 {object} map[string]string "Неверные параметры запроса" +// @Failure 500 {object} map[string]string "Внутренняя ошибка сервера" +// @Security BearerAuth +// @Router /api/v1/agents/{agent_id}/balance [get] func (h *handler) getBalanceAgentHandler(w http.ResponseWriter, r *http.Request) { const handlerName = "getBalanceAgentHandler" @@ -42,6 +53,17 @@ func (h *handler) getBalanceAgentHandler(w http.ResponseWriter, r *http.Request) } } +// @Summary Получить список транзакций агента +// @Description Получение списка транзакций агента с возможностью фильтрации +// @Tags agents +// @Accept json +// @Produce json +// @Param agent_id path string true "ID агента" +// @Success 200 {object} rmodel.TransactionListGetResponse "Список транзакций" +// @Failure 400 {object} map[string]string "Неверные параметры запроса" +// @Failure 500 {object} map[string]string "Внутренняя ошибка сервера" +// @Security BearerAuth +// @Router /api/v1/agents/{agent_id}/transactions [get] func (h *handler) getTransactionListAgentHandler(w http.ResponseWriter, r *http.Request) { const handlerName = "getTransactionListAgentHandler" @@ -84,6 +106,18 @@ func (h *handler) getTransactionListAgentHandler(w http.ResponseWriter, r *http. } } +// @Summary Создать транзакцию агента +// @Description Создание новой транзакции для агента +// @Tags agents +// @Accept json +// @Produce json +// @Param agent_id path string true "ID агента" +// @Param request body rmodel.TransactionCreateRequest true "Данные транзакции" +// @Success 201 {object} rmodel.TransactionCreateResponse "Транзакция создана" +// @Failure 400 {object} map[string]string "Неверные данные запроса" +// @Failure 500 {object} map[string]string "Внутренняя ошибка сервера" +// @Security BearerAuth +// @Router /api/v1/agents/{agent_id}/transactions [post] func (h *handler) createTransactionAgentHandler(w http.ResponseWriter, r *http.Request) { const handlerName = "createTransactionAgentHandler" @@ -146,6 +180,17 @@ func (h *handler) createTransactionAgentHandler(w http.ResponseWriter, r *http.R } } +// @Summary Получить список банковских счетов агента +// @Description Получение списка банковских счетов агента +// @Tags agents +// @Accept json +// @Produce json +// @Param agent_id path string true "ID агента" +// @Success 200 {object} rmodel.BankAccountListGetResponse "Список банковских счетов" +// @Failure 400 {object} map[string]string "Неверные параметры запроса" +// @Failure 500 {object} map[string]string "Внутренняя ошибка сервера" +// @Security BearerAuth +// @Router /api/v1/agents/{agent_id}/bank_accounts [get] func (h *handler) getBankAccountListAgentHandler(w http.ResponseWriter, r *http.Request) { const handlerName = "getBankAccountListAgentHandler" @@ -178,6 +223,18 @@ func (h *handler) getBankAccountListAgentHandler(w http.ResponseWriter, r *http. } } +// @Summary Создать банковский счет агента +// @Description Создание нового банковского счета для агента +// @Tags agents +// @Accept json +// @Produce json +// @Param agent_id path string true "ID агента" +// @Param request body rmodel.BankAccountCreateRequest true "Данные банковского счета" +// @Success 201 {object} rmodel.BankAccountCreateResponse "Банковский счет создан" +// @Failure 400 {object} map[string]string "Неверные данные запроса" +// @Failure 500 {object} map[string]string "Внутренняя ошибка сервера" +// @Security BearerAuth +// @Router /api/v1/agents/{agent_id}/bank_accounts [post] func (h *handler) createBankAccountAgentHandler(w http.ResponseWriter, r *http.Request) { const handlerName = "createBankAccountAgentHandler" @@ -232,6 +289,19 @@ func (h *handler) createBankAccountAgentHandler(w http.ResponseWriter, r *http.R } } +// @Summary Обновить банковский счет агента +// @Description Обновление информации о банковском счете агента +// @Tags agents +// @Accept json +// @Produce json +// @Param agent_id path string true "ID агента" +// @Param bank_account_id path string true "ID банковского счета" +// @Param request body rmodel.BankAccountUpdateRequest true "Данные для обновления" +// @Success 200 {object} map[string]string "Банковский счет обновлен" +// @Failure 400 {object} map[string]string "Неверные данные запроса" +// @Failure 500 {object} map[string]string "Внутренняя ошибка сервера" +// @Security BearerAuth +// @Router /api/v1/agents/{agent_id}/bank_accounts/{bank_account_id} [put] func (h *handler) updateBankAccountAgentHandler(w http.ResponseWriter, r *http.Request) { const handlerName = "updateBankAccountAgentHandler" @@ -285,6 +355,18 @@ func (h *handler) updateBankAccountAgentHandler(w http.ResponseWriter, r *http.R } // TODO: test when implemented +// @Summary Удалить банковский счет агента +// @Description Удаление банковского счета агента +// @Tags agents +// @Accept json +// @Produce json +// @Param agent_id path string true "ID агента" +// @Param bank_account_id path string true "ID банковского счета" +// @Success 200 {object} map[string]string "Банковский счет удален" +// @Failure 400 {object} map[string]string "Неверные параметры запроса" +// @Failure 500 {object} map[string]string "Внутренняя ошибка сервера" +// @Security BearerAuth +// @Router /api/v1/agents/{agent_id}/bank_accounts/{bank_account_id} [delete] func (h *handler) deleteBankAccountAgentHandler(w http.ResponseWriter, r *http.Request) { const handlerName = "deleteBankAccountAgentHandler" @@ -327,6 +409,17 @@ func (h *handler) deleteBankAccountAgentHandler(w http.ResponseWriter, r *http.R } } +// @Summary Получить баланс дистрибьютора +// @Description Получение текущего баланса дистрибьютора +// @Tags distributors +// @Accept json +// @Produce json +// @Param distributor_id path string true "ID дистрибьютора" +// @Success 200 {object} rmodel.BalanceGetResponse "Баланс дистрибьютора" +// @Failure 400 {object} map[string]string "Неверные параметры запроса" +// @Failure 500 {object} map[string]string "Внутренняя ошибка сервера" +// @Security BearerAuth +// @Router /api/v1/distributor/{distributor_id}/balance [get] func (h *handler) getBalanceDistributorHandler(w http.ResponseWriter, r *http.Request) { const handlerName = "getBalanceDistributorHandler" @@ -359,6 +452,18 @@ func (h *handler) getBalanceDistributorHandler(w http.ResponseWriter, r *http.Re } } +// @Summary Получить баланс компании дистрибьютора +// @Description Получение баланса конкретной компании дистрибьютора +// @Tags distributors +// @Accept json +// @Produce json +// @Param distributor_id path string true "ID дистрибьютора" +// @Param company_id path string true "ID компании" +// @Success 200 {object} rmodel.BalanceGetResponse "Баланс компании" +// @Failure 400 {object} map[string]string "Неверные параметры запроса" +// @Failure 500 {object} map[string]string "Внутренняя ошибка сервера" +// @Security BearerAuth +// @Router /api/v1/distributor/{distributor_id}/company/{company_id}/balance [get] func (h *handler) getCompanyBalanceDistributorHandler(w http.ResponseWriter, r *http.Request) { const handlerName = "getCompanyBalanceDistributorHandler" @@ -391,6 +496,17 @@ func (h *handler) getCompanyBalanceDistributorHandler(w http.ResponseWriter, r * } } +// @Summary Получить список транзакций дистрибьютора +// @Description Получение списка транзакций дистрибьютора с возможностью фильтрации +// @Tags distributors +// @Accept json +// @Produce json +// @Param distributor_id path string true "ID дистрибьютора" +// @Success 200 {object} rmodel.TransactionListGetResponse "Список транзакций" +// @Failure 400 {object} map[string]string "Неверные параметры запроса" +// @Failure 500 {object} map[string]string "Внутренняя ошибка сервера" +// @Security BearerAuth +// @Router /api/v1/distributor/{distributor_id}/transactions [get] func (h *handler) getTransactionListDistributorHandler(w http.ResponseWriter, r *http.Request) { const handlerName = "getTransactionListDistributorHandler" @@ -434,6 +550,18 @@ func (h *handler) getTransactionListDistributorHandler(w http.ResponseWriter, r } } +// @Summary Получить список транзакций компании дистрибьютора +// @Description Получение списка транзакций конкретной компании дистрибьютора +// @Tags distributors +// @Accept json +// @Produce json +// @Param distributor_id path string true "ID дистрибьютора" +// @Param company_id path string true "ID компании" +// @Success 200 {object} rmodel.TransactionListGetResponse "Список транзакций компании" +// @Failure 400 {object} map[string]string "Неверные параметры запроса" +// @Failure 500 {object} map[string]string "Внутренняя ошибка сервера" +// @Security BearerAuth +// @Router /api/v1/distributor/{distributor_id}/company/{company_id}/transactions [get] func (h *handler) getCompanyTransactionListDistributorHandler(w http.ResponseWriter, r *http.Request) { const handlerName = "getCompanyTransactionListDistributorHandler" @@ -477,6 +605,18 @@ func (h *handler) getCompanyTransactionListDistributorHandler(w http.ResponseWri } } +// @Summary Создать транзакцию дистрибьютора +// @Description Создание новой транзакции для дистрибьютора +// @Tags distributors +// @Accept json +// @Produce json +// @Param distributor_id path string true "ID дистрибьютора" +// @Param request body rmodel.TransactionCreateRequest true "Данные транзакции" +// @Success 201 {object} rmodel.TransactionCreateResponse "Транзакция создана" +// @Failure 400 {object} map[string]string "Неверные данные запроса" +// @Failure 500 {object} map[string]string "Внутренняя ошибка сервера" +// @Security BearerAuth +// @Router /api/v1/distributor/{distributor_id}/transactions [post] func (h *handler) createTransactionDistributorHandler(w http.ResponseWriter, r *http.Request) { const handlerName = "createTransactionDistributorHandler" @@ -539,6 +679,17 @@ func (h *handler) createTransactionDistributorHandler(w http.ResponseWriter, r * } } +// @Summary Получить список банковских счетов дистрибьютора +// @Description Получение списка банковских счетов дистрибьютора +// @Tags distributors +// @Accept json +// @Produce json +// @Param distributor_id path string true "ID дистрибьютора" +// @Success 200 {object} rmodel.BankAccountListGetResponse "Список банковских счетов" +// @Failure 400 {object} map[string]string "Неверные параметры запроса" +// @Failure 500 {object} map[string]string "Внутренняя ошибка сервера" +// @Security BearerAuth +// @Router /api/v1/distributor/{distributor_id}/bank_accounts [get] func (h *handler) getBankAccountListDistributorHandler(w http.ResponseWriter, r *http.Request) { const handlerName = "getBankAccountListDistributorHandler" @@ -571,6 +722,18 @@ func (h *handler) getBankAccountListDistributorHandler(w http.ResponseWriter, r } } +// @Summary Получить список банковских счетов компании дистрибьютора +// @Description Получение списка банковских счетов конкретной компании дистрибьютора +// @Tags distributors +// @Accept json +// @Produce json +// @Param distributor_id path string true "ID дистрибьютора" +// @Param company_id path string true "ID компании" +// @Success 200 {object} rmodel.BankAccountListGetResponse "Список банковских счетов компании" +// @Failure 400 {object} map[string]string "Неверные параметры запроса" +// @Failure 500 {object} map[string]string "Внутренняя ошибка сервера" +// @Security BearerAuth +// @Router /api/v1/distributor/{distributor_id}/company/{company_id}/bank_accounts [get] func (h *handler) getCompanyBankAccountListDistributorHandler(w http.ResponseWriter, r *http.Request) { const handlerName = "getCompanyBankAccountListDistributorHandler" @@ -603,6 +766,19 @@ func (h *handler) getCompanyBankAccountListDistributorHandler(w http.ResponseWri } } +// @Summary Создать банковский счет компании дистрибьютора +// @Description Создание нового банковского счета для компании дистрибьютора +// @Tags distributors +// @Accept json +// @Produce json +// @Param distributor_id path string true "ID дистрибьютора" +// @Param company_id path string true "ID компании" +// @Param request body rmodel.BankAccountCreateRequest true "Данные банковского счета" +// @Success 201 {object} rmodel.BankAccountCreateResponse "Банковский счет создан" +// @Failure 400 {object} map[string]string "Неверные данные запроса" +// @Failure 500 {object} map[string]string "Внутренняя ошибка сервера" +// @Security BearerAuth +// @Router /api/v1/distributor/{distributor_id}/company/{company_id}/bank_accounts [post] func (h *handler) createBankAccountDistributorHandler(w http.ResponseWriter, r *http.Request) { const handlerName = "createBankAccountDistributorHandler" @@ -664,6 +840,19 @@ func (h *handler) createBankAccountDistributorHandler(w http.ResponseWriter, r * } } +// @Summary Обновить банковский счет дистрибьютора +// @Description Обновление информации о банковском счете дистрибьютора +// @Tags distributors +// @Accept json +// @Produce json +// @Param distributor_id path string true "ID дистрибьютора" +// @Param bank_account_id path string true "ID банковского счета" +// @Param request body rmodel.BankAccountUpdateRequest true "Данные для обновления" +// @Success 200 {object} map[string]string "Банковский счет обновлен" +// @Failure 400 {object} map[string]string "Неверные данные запроса" +// @Failure 500 {object} map[string]string "Внутренняя ошибка сервера" +// @Security BearerAuth +// @Router /api/v1/distributor/{distributor_id}/bank_accounts/{bank_account_id} [put] func (h *handler) updateBankAccountDistributorHandler(w http.ResponseWriter, r *http.Request) { const handlerName = "updateBankAccountDistributorHandler" @@ -725,6 +914,18 @@ func (h *handler) updateBankAccountDistributorHandler(w http.ResponseWriter, r * } } +// @Summary Удалить банковский счет дистрибьютора +// @Description Удаление банковского счета дистрибьютора +// @Tags distributors +// @Accept json +// @Produce json +// @Param distributor_id path string true "ID дистрибьютора" +// @Param bank_account_id path string true "ID банковского счета" +// @Success 200 {object} map[string]string "Банковский счет удален" +// @Failure 400 {object} map[string]string "Неверные параметры запроса" +// @Failure 500 {object} map[string]string "Внутренняя ошибка сервера" +// @Security BearerAuth +// @Router /api/v1/distributor/{distributor_id}/bank_accounts/{bank_account_id} [delete] func (h *handler) deleteBankAccountDistributorHandler(w http.ResponseWriter, r *http.Request) { const handlerName = "deleteBankAccountDistributorHandler" diff --git a/internal/http/build_info.go b/internal/http/build_info.go index c091922..c0a4933 100644 --- a/internal/http/build_info.go +++ b/internal/http/build_info.go @@ -5,6 +5,13 @@ import ( "net/http" ) +// @Summary Получить информацию о сборке +// @Description Получение информации о версии, коммите и дате сборки приложения +// @Tags system +// @Accept json +// @Produce json +// @Success 200 {object} map[string]string "Информация о сборке" +// @Router /api/v1/healthcheck [get] func (h *handler) getBuildInfoHandler(w http.ResponseWriter, _ *http.Request) { response := struct { Version string `json:"version"` diff --git a/internal/http/company_agent.go b/internal/http/company_agent.go index 3842f6e..accf7cd 100644 --- a/internal/http/company_agent.go +++ b/internal/http/company_agent.go @@ -12,6 +12,18 @@ import ( rmodel "git-molva.ru/Molva/molva-backend/services/api_gateway/internal/request_model" ) +// @Summary Получить список компаний агента +// @Description Получение списка всех компаний, принадлежащих агенту +// @Tags agents +// @Accept json +// @Produce json +// @Param agent_id path string true "ID агента" +// @Success 200 {object} rmodel.CompanyListGetResponse "Список компаний" +// @Failure 400 {object} map[string]string "Неверные данные запроса" +// @Failure 401 {object} map[string]string "Неавторизованный доступ" +// @Failure 500 {object} map[string]string "Внутренняя ошибка сервера" +// @Security BearerAuth +// @Router /api/v1/agents/{agent_id}/companies [get] func (h *handler) getCompanyListAgentHandler(w http.ResponseWriter, r *http.Request) { const handlerName = "getCompanyListAgentHandler" @@ -44,6 +56,20 @@ func (h *handler) getCompanyListAgentHandler(w http.ResponseWriter, r *http.Requ } } +// @Summary Получить компанию по ID +// @Description Получение детальной информации о компании агента +// @Tags agents +// @Accept json +// @Produce json +// @Param agent_id path string true "ID агента" +// @Param company_id path string true "ID компании" +// @Success 200 {object} rmodel.CompanyByIdGetResponse "Информация о компании" +// @Failure 400 {object} map[string]string "Неверные данные запроса" +// @Failure 401 {object} map[string]string "Неавторизованный доступ" +// @Failure 404 {object} map[string]string "Компания не найдена" +// @Failure 500 {object} map[string]string "Внутренняя ошибка сервера" +// @Security BearerAuth +// @Router /api/v1/agents/{agent_id}/company/{company_id} [get] func (h *handler) getCompanyByIdAgentHandler(w http.ResponseWriter, r *http.Request) { const handlerName = "getCompanyByIdAgentHandler" @@ -78,6 +104,19 @@ func (h *handler) getCompanyByIdAgentHandler(w http.ResponseWriter, r *http.Requ } } +// @Summary Создать компанию +// @Description Создание новой компании для агента +// @Tags agents +// @Accept json +// @Produce json +// @Param agent_id path string true "ID агента" +// @Param request body rmodel.CompanyCreateRequest true "Данные для создания компании" +// @Success 201 {object} rmodel.CompanyCreateResponse "Компания создана" +// @Failure 400 {object} map[string]string "Неверные данные запроса" +// @Failure 401 {object} map[string]string "Неавторизованный доступ" +// @Failure 500 {object} map[string]string "Внутренняя ошибка сервера" +// @Security BearerAuth +// @Router /api/v1/agents/{agent_id}/company [post] // FIXME: foreign key violation review func (h *handler) createCompanyAgentHandler(w http.ResponseWriter, r *http.Request) { const handlerName = "createAgentCompanyHandler" diff --git a/internal/http/company_distributor.go b/internal/http/company_distributor.go index 0256012..331b721 100644 --- a/internal/http/company_distributor.go +++ b/internal/http/company_distributor.go @@ -10,6 +10,18 @@ import ( "github.com/gorilla/mux" ) +// @Summary Получить список компаний дистрибьютора +// @Description Получение списка всех компаний, принадлежащих дистрибьютору +// @Tags distributors +// @Accept json +// @Produce json +// @Param distributor_id path string true "ID дистрибьютора" +// @Success 200 {object} rmodel.CompanyListGetResponse "Список компаний" +// @Failure 400 {object} map[string]string "Неверные данные запроса" +// @Failure 401 {object} map[string]string "Неавторизованный доступ" +// @Failure 500 {object} map[string]string "Внутренняя ошибка сервера" +// @Security BearerAuth +// @Router /api/v1/distributor/{distributor_id}/companies [get] func (h *handler) getCompanyListDistributorHandler(w http.ResponseWriter, r *http.Request) { const handlerName = "getCompanyListDistributorHandler" @@ -42,6 +54,20 @@ func (h *handler) getCompanyListDistributorHandler(w http.ResponseWriter, r *htt } } +// @Summary Получить компанию дистрибьютора по ID +// @Description Получение детальной информации о компании дистрибьютора +// @Tags distributors +// @Accept json +// @Produce json +// @Param distributor_id path string true "ID дистрибьютора" +// @Param company_id path string true "ID компании" +// @Success 200 {object} rmodel.CompanyByIdGetResponse "Информация о компании" +// @Failure 400 {object} map[string]string "Неверные данные запроса" +// @Failure 401 {object} map[string]string "Неавторизованный доступ" +// @Failure 404 {object} map[string]string "Компания не найдена" +// @Failure 500 {object} map[string]string "Внутренняя ошибка сервера" +// @Security BearerAuth +// @Router /api/v1/distributor/{distributor_id}/company/{company_id} [get] func (h *handler) getCompanyByIdDistributorHandler(w http.ResponseWriter, r *http.Request) { const handlerName = "getCompanyByIdDistributorHandler" @@ -76,6 +102,19 @@ func (h *handler) getCompanyByIdDistributorHandler(w http.ResponseWriter, r *htt } } +// @Summary Создать компанию дистрибьютора +// @Description Создание новой компании для дистрибьютора +// @Tags distributors +// @Accept json +// @Produce json +// @Param distributor_id path string true "ID дистрибьютора" +// @Param request body rmodel.CompanyCreateRequest true "Данные для создания компании" +// @Success 201 {object} rmodel.CompanyCreateResponse "Компания создана" +// @Failure 400 {object} map[string]string "Неверные данные запроса" +// @Failure 401 {object} map[string]string "Неавторизованный доступ" +// @Failure 500 {object} map[string]string "Внутренняя ошибка сервера" +// @Security BearerAuth +// @Router /api/v1/distributor/{distributor_id}/company [post] func (h *handler) createCompanyDistributorHandler(w http.ResponseWriter, r *http.Request) { const handlerName = "createCompanyDistributorHandler" @@ -124,6 +163,21 @@ func (h *handler) createCompanyDistributorHandler(w http.ResponseWriter, r *http } } +// @Summary Обновить компанию дистрибьютора +// @Description Обновление информации о компании дистрибьютора +// @Tags distributors +// @Accept json +// @Produce json +// @Param distributor_id path string true "ID дистрибьютора" +// @Param company_id path string true "ID компании" +// @Param request body rmodel.CompanyUpdateRequest true "Данные для обновления" +// @Success 204 "Компания обновлена" +// @Failure 400 {object} map[string]string "Неверные данные запроса" +// @Failure 401 {object} map[string]string "Неавторизованный доступ" +// @Failure 404 {object} map[string]string "Компания не найдена" +// @Failure 500 {object} map[string]string "Внутренняя ошибка сервера" +// @Security BearerAuth +// @Router /api/v1/distributor/{distributor_id}/company/{company_id} [patch] func (h *handler) updateCompanyDistributorHandler(w http.ResponseWriter, r *http.Request) { const handlerName = "updateCompanyDistributorHandler" @@ -161,6 +215,21 @@ func (h *handler) updateCompanyDistributorHandler(w http.ResponseWriter, r *http w.WriteHeader(http.StatusNoContent) } +// @Summary Добавить участника в компанию +// @Description Добавление нового участника в компанию дистрибьютора +// @Tags distributors +// @Accept json +// @Produce json +// @Param distributor_id path string true "ID дистрибьютора" +// @Param company_id path string true "ID компании" +// @Param request body rmodel.AddDistributorCompanyMemberRequest true "Данные участника" +// @Success 201 "Участник добавлен" +// @Failure 400 {object} map[string]string "Неверные данные запроса" +// @Failure 401 {object} map[string]string "Неавторизованный доступ" +// @Failure 404 {object} map[string]string "Компания не найдена" +// @Failure 500 {object} map[string]string "Внутренняя ошибка сервера" +// @Security BearerAuth +// @Router /api/v1/distributor/{distributor_id}/company/{company_id} [post] func (h *handler) addCompanyMemberDistributorHandler(w http.ResponseWriter, r *http.Request) { const handlerName = "addCompanyMemberDistributorHandler" diff --git a/internal/http/handlers.go b/internal/http/handlers.go index 5696b7a..30a103b 100644 --- a/internal/http/handlers.go +++ b/internal/http/handlers.go @@ -32,6 +32,19 @@ import ( "github.com/gorilla/mux" ) +// @Summary Получить персональную ссылку +// @Description Получение персональной ссылки агента для вакансии +// @Tags agents +// @Accept json +// @Produce json +// @Param agent_id path string true "ID агента" +// @Param vacancy_id path string true "ID вакансии" +// @Success 200 {object} types.PersonalLinkResponse "Персональная ссылка" +// @Failure 400 {object} map[string]string "Неверные данные запроса" +// @Failure 401 {object} map[string]string "Неавторизованный доступ" +// @Failure 500 {object} map[string]string "Внутренняя ошибка сервера" +// @Security BearerAuth +// @Router /api/v1/agents/{agent_id}/vacancies/{vacancy_id} [get] func (h *handler) getPersonalLinkHandler(w http.ResponseWriter, r *http.Request) { handlerName := "getPersonalLinkHandler" vars := mux.Vars(r) @@ -70,6 +83,18 @@ func (h *handler) getPersonalLinkHandler(w http.ResponseWriter, r *http.Request) } } +// @Summary Получить анкету +// @Description Получение HTML формы анкеты для клиента +// @Tags clients +// @Accept json +// @Produce text/html +// @Param link query string true "Зашифрованная ссылка с параметрами" +// @Success 200 {string} string "HTML форма анкеты" +// @Failure 400 {object} map[string]string "Неверные данные запроса" +// @Failure 404 {object} map[string]string "Вакансия не найдена" +// @Failure 500 {object} map[string]string "Внутренняя ошибка сервера" +// @Router /api/v1/anketa [get] +// //nolint:funlen // TODO: make it sudo super clean func (h *handler) getAnketaHandler(w http.ResponseWriter, r *http.Request) { handlerName := "getAnketaHandler" @@ -235,6 +260,19 @@ func (h *handler) extractPermissions(permMap *auth.GetPermissionsByUsersIdRespon return perm } +// @Summary Получить список сотрудников компании +// @Description Получение списка сотрудников компании +// @Tags employees +// @Accept json +// @Produce json +// @Param company_id path string true "ID компании" +// @Param uid query string true "ID пользователя" +// @Success 200 {object} rmodel.EmployeeResponse "Список сотрудников" +// @Failure 400 {object} map[string]string "Неверные данные запроса" +// @Failure 401 {object} map[string]string "Неавторизованный доступ" +// @Failure 500 {object} map[string]string "Внутренняя ошибка сервера" +// @Security BearerAuth +// @Router /api/v1/companies/{company_id}/employees [get] func (h *handler) getEmployeesHandler(w http.ResponseWriter, r *http.Request) { const handlerName = "getEmployeesHandler" @@ -292,6 +330,16 @@ func (h *handler) getEmployeesHandler(w http.ResponseWriter, r *http.Request) { } } +// @Summary Получить статус валидации пользователя +// @Description Получение статуса валидации пользователя по UID +// @Tags system +// @Accept json +// @Produce json +// @Param uid path string true "UID пользователя" +// @Success 200 {object} map[string]string "Статус валидации" +// @Failure 400 {object} map[string]string "Неверные параметры запроса" +// @Failure 500 {object} map[string]string "Внутренняя ошибка сервера" +// @Router /api/v1/{uid}/validation [get] func (h *handler) getUserValidationStatusHandler(w http.ResponseWriter, r *http.Request) { const handlerName = "getValidationStatusHandler" @@ -331,6 +379,16 @@ func (h *handler) getUserValidationStatusHandler(w http.ResponseWriter, r *http. } } +// @Summary Получить файл документа +// @Description Получение файла документа по имени +// @Tags system +// @Accept json +// @Produce application/octet-stream +// @Param file path string true "Имя файла" +// @Success 200 {file} file "Файл документа" +// @Failure 404 {object} map[string]string "Файл не найден" +// @Failure 500 {object} map[string]string "Внутренняя ошибка сервера" +// @Router /api/v1/docs/{file} [get] func (h *handler) getFileHandler(w http.ResponseWriter, r *http.Request) { vars := mux.Vars(r) fileName := vars["file"] @@ -389,6 +447,17 @@ func (h *handler) getFileHandler(w http.ResponseWriter, r *http.Request) { _, _ = w.Write([]byte(link)) } +// @Summary Подтверждение email +// @Description Подтверждение email адреса пользователя по токену +// @Tags auth +// @Accept json +// @Produce json +// @Param uid query string true "ID пользователя" +// @Param token query string true "Токен подтверждения" +// @Success 200 {object} map[string]string "Email успешно подтвержден" +// @Failure 400 {object} map[string]string "Неверные параметры запроса" +// @Failure 500 {object} map[string]string "Внутренняя ошибка сервера" +// @Router /api/v1/verify_email [patch] func (h *handler) verifyEmailHandler(w http.ResponseWriter, r *http.Request) { const handlerName = "verifyEmailHandler" @@ -528,6 +597,16 @@ func (h *handler) sendNewUserNotificationToAdmin(userInfo *auth.UserInfo, userNa return nil } +// @Summary Статус подтверждения email +// @Description Получение статуса подтверждения email адреса пользователя +// @Tags auth +// @Accept json +// @Produce json +// @Param uid query string true "ID пользователя" +// @Success 200 {object} map[string]string "Статус подтверждения email" +// @Failure 400 {object} map[string]string "Неверные параметры запроса" +// @Failure 500 {object} map[string]string "Внутренняя ошибка сервера" +// @Router /api/v1/verify_email [get] func (h *handler) getEmailVerificationStatusHandler(w http.ResponseWriter, r *http.Request) { const handlerName = "getEmailVerificationStatusHandler" @@ -638,6 +717,23 @@ func (h *handler) validateEmail(email string) (bool, error) { return isValidEmail, nil } +// @Summary Получить события пользователя +// @Description Получение ленты событий пользователя с возможностью фильтрации +// @Tags feed +// @Accept json +// @Produce json +// @Param uid path string true "ID пользователя" +// @Param user_type query string true "Тип пользователя (agent/distributor)" +// @Param event_type query string false "Тип события (через запятую)" +// @Param show_cancelled query bool false "Показывать отмененные события" +// @Param limit query int false "Лимит событий" +// @Param offset query int false "Смещение" +// @Success 200 {object} []feed.Event "Список событий" +// @Failure 400 {object} map[string]string "Неверные данные запроса" +// @Failure 401 {object} map[string]string "Неавторизованный доступ" +// @Failure 500 {object} map[string]string "Внутренняя ошибка сервера" +// @Security BearerAuth +// @Router /api/v1/feed/{uid}/events [get] func (h *handler) GetUserEventsHandler(w http.ResponseWriter, r *http.Request) { handlerName := "GetUserEventsHandler" query := r.URL.Query() diff --git a/internal/http/integration.go b/internal/http/integration.go index dd87782..8fa7b13 100644 --- a/internal/http/integration.go +++ b/internal/http/integration.go @@ -11,6 +11,16 @@ import ( intrmodel "git-molva.ru/Molva/molva-backend/services/api_gateway/internal/request_model/integration" ) +// @Summary Callback интеграции с ВкусВилл +// @Description Обработка callback запросов от интеграции с ВкусВилл +// @Tags integration +// @Accept json +// @Produce json +// @Param request body map[string]interface{} true "Данные callback от ВкусВилл" +// @Success 200 {object} map[string]string "Callback обработан" +// @Failure 400 {object} map[string]string "Неверные данные запроса" +// @Failure 500 {object} map[string]string "Внутренняя ошибка сервера" +// @Router /api/v1/integration/vkusvill/callback [post] func (h *handler) vkusvillIntegrationCallbackHandler(w http.ResponseWriter, r *http.Request) { const handlerName = "vkusvillIntegrationCallbackHandler" diff --git a/internal/http/logo.go b/internal/http/logo.go index 0b6b835..fb6916b 100644 --- a/internal/http/logo.go +++ b/internal/http/logo.go @@ -130,6 +130,19 @@ func (lf *LogoFile) Reset() error { // =============== LOGO HANDLERS =============== +// @Summary Получить логотип компании +// @Description Получение логотипа компании дистрибьютора +// @Tags distributors +// @Accept json +// @Produce json +// @Param distributor_id path string true "ID дистрибьютора" +// @Param company_id path string true "ID компании" +// @Success 200 {file} file "Логотип компании" +// @Failure 400 {object} map[string]string "Неверные параметры запроса" +// @Failure 404 {object} map[string]string "Логотип не найден" +// @Failure 500 {object} map[string]string "Внутренняя ошибка сервера" +// @Security BearerAuth +// @Router /api/v1/distributor/{distributor_id}/company/{company_id}/logo [get] func (h *handler) getCompanyLogoHandler(w http.ResponseWriter, r *http.Request) { const handlerName = "getCompanyLogoHandler" @@ -180,6 +193,19 @@ func (h *handler) getCompanyLogoHandler(w http.ResponseWriter, r *http.Request) } } +// @Summary Создать логотип компании +// @Description Загрузка нового логотипа для компании дистрибьютора +// @Tags distributors +// @Accept multipart/form-data +// @Produce json +// @Param distributor_id path string true "ID дистрибьютора" +// @Param company_id path string true "ID компании" +// @Param logo formData file true "Файл логотипа" +// @Success 201 {object} map[string]string "Логотип загружен" +// @Failure 400 {object} map[string]string "Неверные данные запроса" +// @Failure 500 {object} map[string]string "Внутренняя ошибка сервера" +// @Security BearerAuth +// @Router /api/v1/distributor/{distributor_id}/company/{company_id}/logo [post] func (h *handler) createCompanyLogoHandler(w http.ResponseWriter, r *http.Request) { const handlerName = "createCompanyLogoHandler" @@ -240,6 +266,19 @@ func (h *handler) createCompanyLogoHandler(w http.ResponseWriter, r *http.Reques w.WriteHeader(http.StatusCreated) } +// @Summary Обновить логотип компании +// @Description Обновление логотипа компании дистрибьютора +// @Tags distributors +// @Accept multipart/form-data +// @Produce json +// @Param distributor_id path string true "ID дистрибьютора" +// @Param company_id path string true "ID компании" +// @Param logo formData file true "Новый файл логотипа" +// @Success 200 {object} map[string]string "Логотип обновлен" +// @Failure 400 {object} map[string]string "Неверные данные запроса" +// @Failure 500 {object} map[string]string "Внутренняя ошибка сервера" +// @Security BearerAuth +// @Router /api/v1/distributor/{distributor_id}/company/{company_id}/logo [put] func (h *handler) updateCompanyLogoHandler(w http.ResponseWriter, r *http.Request) { const handlerName = "updateCompanyLogoHandler" @@ -300,6 +339,18 @@ func (h *handler) updateCompanyLogoHandler(w http.ResponseWriter, r *http.Reques w.WriteHeader(http.StatusNoContent) } +// @Summary Удалить логотип компании +// @Description Удаление логотипа компании дистрибьютора +// @Tags distributors +// @Accept json +// @Produce json +// @Param distributor_id path string true "ID дистрибьютора" +// @Param company_id path string true "ID компании" +// @Success 200 {object} map[string]string "Логотип удален" +// @Failure 400 {object} map[string]string "Неверные параметры запроса" +// @Failure 500 {object} map[string]string "Внутренняя ошибка сервера" +// @Security BearerAuth +// @Router /api/v1/distributor/{distributor_id}/company/{company_id}/logo [delete] func (h *handler) deleteCompanyLogoHandler(w http.ResponseWriter, r *http.Request) { const handlerName = "deleteCompanyLogoHandler" diff --git a/internal/http/profile.go b/internal/http/profile.go index b9d0135..5b38936 100644 --- a/internal/http/profile.go +++ b/internal/http/profile.go @@ -12,6 +12,17 @@ import ( rmodel "git-molva.ru/Molva/molva-backend/services/api_gateway/internal/request_model" ) +// @Summary Получить профиль агента +// @Description Получение профиля агента по ID +// @Tags agents +// @Accept json +// @Produce json +// @Param agent_id path string true "ID агента" +// @Success 200 {object} rmodel.ProfileGetResponse "Профиль агента" +// @Failure 400 {object} map[string]string "Неверные параметры запроса" +// @Failure 500 {object} map[string]string "Внутренняя ошибка сервера" +// @Security BearerAuth +// @Router /api/v1/agents/{agent_id}/profile [get] func (h *handler) getProfileAgentHandler(w http.ResponseWriter, r *http.Request) { const handlerName = "getAgentProfileHandler" @@ -44,6 +55,18 @@ func (h *handler) getProfileAgentHandler(w http.ResponseWriter, r *http.Request) } } +// @Summary Обновить профиль агента +// @Description Обновление профиля агента +// @Tags agents +// @Accept json +// @Produce json +// @Param agent_id path string true "ID агента" +// @Param request body rmodel.ProfileUpdateRequest true "Данные для обновления профиля" +// @Success 200 {object} map[string]string "Профиль обновлен" +// @Failure 400 {object} map[string]string "Неверные данные запроса" +// @Failure 500 {object} map[string]string "Внутренняя ошибка сервера" +// @Security BearerAuth +// @Router /api/v1/agents/{agent_id}/profile [put] func (h *handler) updateProfileAgentHandler(w http.ResponseWriter, r *http.Request) { const handlerName = "setAgentProfileHandler" @@ -86,6 +109,17 @@ func (h *handler) updateProfileAgentHandler(w http.ResponseWriter, r *http.Reque w.WriteHeader(http.StatusNoContent) } +// @Summary Получить профиль дистрибьютора +// @Description Получение профиля дистрибьютора по ID +// @Tags distributors +// @Accept json +// @Produce json +// @Param distributor_id path string true "ID дистрибьютора" +// @Success 200 {object} rmodel.ProfileGetResponse "Профиль дистрибьютора" +// @Failure 400 {object} map[string]string "Неверные параметры запроса" +// @Failure 500 {object} map[string]string "Внутренняя ошибка сервера" +// @Security BearerAuth +// @Router /api/v1/distributor/{distributor_id}/profile [get] func (h *handler) getProfileDisributorHandler(w http.ResponseWriter, r *http.Request) { const handlerName = "getProfileDisributorHandler" @@ -118,6 +152,18 @@ func (h *handler) getProfileDisributorHandler(w http.ResponseWriter, r *http.Req } } +// @Summary Обновить профиль дистрибьютора +// @Description Обновление профиля дистрибьютора +// @Tags distributors +// @Accept json +// @Produce json +// @Param distributor_id path string true "ID дистрибьютора" +// @Param request body rmodel.ProfileUpdateRequest true "Данные для обновления профиля" +// @Success 200 {object} map[string]string "Профиль обновлен" +// @Failure 400 {object} map[string]string "Неверные данные запроса" +// @Failure 500 {object} map[string]string "Внутренняя ошибка сервера" +// @Security BearerAuth +// @Router /api/v1/distributor/{distributor_id}/profile [put] func (h *handler) updateProfileDistributorHandler(w http.ResponseWriter, r *http.Request) { const handlerName = "updateProfileDistributorHandler" diff --git a/internal/http/router.go b/internal/http/router.go index a94421f..cde7a62 100644 --- a/internal/http/router.go +++ b/internal/http/router.go @@ -23,7 +23,9 @@ import ( formgenerator "git-molva.ru/Molva/molva-backend/services/api_gateway/internal/form_generator" "git-molva.ru/Molva/molva-backend/services/api_gateway/internal/config" + _ "git-molva.ru/Molva/molva-backend/services/api_gateway/internal/http/swagger/docs" "github.com/gorilla/mux" + httpSwagger "github.com/swaggo/http-swagger" ) type Router struct { @@ -200,6 +202,9 @@ func SetupRouter(r *Router, buildCfg config.BuildInfo) { // --------------- FEED ------------ subRouter.HandleFunc("/feed/{uid}/events", h.GetUserEventsHandler).Methods(http.MethodGet) + + // --------------- SWAGGER UI ------------ + r.Mux.PathPrefix("/swagger/").Handler(httpSwagger.WrapHandler) } func setupAuthHandlers(r *Router, h *handler) { diff --git a/internal/http/submission.go b/internal/http/submission.go index 1cd86db..590db28 100644 --- a/internal/http/submission.go +++ b/internal/http/submission.go @@ -18,6 +18,22 @@ import ( rmodel "git-molva.ru/Molva/molva-backend/services/api_gateway/internal/request_model" ) +// @Summary Получить список заявок агента +// @Description Получение списка заявок агента с возможностью фильтрации +// @Tags agents +// @Accept json +// @Produce json +// @Param agent_id path string true "ID агента" +// @Param vacancy_id query string false "ID вакансии" +// @Param status query string false "Статус заявки" +// @Param page query int false "Номер страницы" +// @Param page_size query int false "Размер страницы" +// @Success 200 {object} rmodel.SubmissionListGetResponse "Список заявок" +// @Failure 400 {object} map[string]string "Неверные данные запроса" +// @Failure 401 {object} map[string]string "Неавторизованный доступ" +// @Failure 500 {object} map[string]string "Внутренняя ошибка сервера" +// @Security BearerAuth +// @Router /api/v1/agents/{agent_id}/submissions [get] func (h *handler) getSubmissionListAgentHandler(w http.ResponseWriter, r *http.Request) { const handlerName = "getSubmissionListAgentHandler" @@ -58,6 +74,20 @@ func (h *handler) getSubmissionListAgentHandler(w http.ResponseWriter, r *http.R } } +// @Summary Получить CV заявки +// @Description Получение CV файла заявки +// @Tags agents +// @Accept json +// @Produce application/octet-stream +// @Param agent_id path string true "ID агента" +// @Param submission_id path string true "ID заявки" +// @Success 200 {file} file "CV файл" +// @Failure 400 {object} map[string]string "Неверные данные запроса" +// @Failure 401 {object} map[string]string "Неавторизованный доступ" +// @Failure 404 {object} map[string]string "CV не найден" +// @Failure 500 {object} map[string]string "Внутренняя ошибка сервера" +// @Security BearerAuth +// @Router /api/v1/agents/{agent_id}/submissions/{submission_id}/cv [get] func (h *handler) getSubmissionCVHandler(w http.ResponseWriter, r *http.Request) { const handlerName = "getSubmissionCVHandler" @@ -121,6 +151,20 @@ func (h *handler) getSubmissionCVHandler(w http.ResponseWriter, r *http.Request) } } +// @Summary Удалить заявку агента +// @Description Удаление заявки агента +// @Tags agents +// @Accept json +// @Produce json +// @Param agent_id path string true "ID агента" +// @Param submission_id path string true "ID заявки" +// @Success 204 "Заявка удалена" +// @Failure 400 {object} map[string]string "Неверные данные запроса" +// @Failure 401 {object} map[string]string "Неавторизованный доступ" +// @Failure 404 {object} map[string]string "Заявка не найдена" +// @Failure 500 {object} map[string]string "Внутренняя ошибка сервера" +// @Security BearerAuth +// @Router /api/v1/agents/{agent_id}/submissions/{submission_id} [delete] func (h *handler) deleteSubmissionAgentHandler(w http.ResponseWriter, r *http.Request) { const handlerName = "deleteSubmissionHandler" @@ -162,6 +206,22 @@ func (h *handler) deleteSubmissionAgentHandler(w http.ResponseWriter, r *http.Re } } +// @Summary Получить список заявок дистрибьютора +// @Description Получение списка заявок дистрибьютора с возможностью фильтрации +// @Tags distributors +// @Accept json +// @Produce json +// @Param distributor_id path string true "ID дистрибьютора" +// @Param vacancy_id path string true "ID вакансии" +// @Param status query string false "Статус заявки" +// @Param page query int false "Номер страницы" +// @Param page_size query int false "Размер страницы" +// @Success 200 {object} rmodel.SubmissionListGetResponse "Список заявок" +// @Failure 400 {object} map[string]string "Неверные данные запроса" +// @Failure 401 {object} map[string]string "Неавторизованный доступ" +// @Failure 500 {object} map[string]string "Внутренняя ошибка сервера" +// @Security BearerAuth +// @Router /api/v1/distributor/{distributor_id}/vacancies/{vacancy_id}/submissions [get] func (h *handler) getSubmissionListDistributorHandler(w http.ResponseWriter, r *http.Request) { const handlerName = "getSubmissionsDistributorHandler" @@ -205,6 +265,22 @@ func (h *handler) getSubmissionListDistributorHandler(w http.ResponseWriter, r * } } +// @Summary Обновить статус заявки +// @Description Обновление статуса заявки дистрибьютором +// @Tags distributors +// @Accept json +// @Produce json +// @Param distributor_id path string true "ID дистрибьютора" +// @Param vacancy_id path string true "ID вакансии" +// @Param submission_id path string true "ID заявки" +// @Param request body rmodel.SubmissionStatusUpdateRequest true "Новый статус заявки" +// @Success 200 "Статус обновлен" +// @Failure 400 {object} map[string]string "Неверные данные запроса" +// @Failure 401 {object} map[string]string "Неавторизованный доступ" +// @Failure 404 {object} map[string]string "Заявка не найдена" +// @Failure 500 {object} map[string]string "Внутренняя ошибка сервера" +// @Security BearerAuth +// @Router /api/v1/distributor/{distributor_id}/vacancies/{vacancy_id}/submissions/{submission_id}/status [post] func (h *handler) updateSubmissionStatusDistributorHandler(w http.ResponseWriter, r *http.Request) { const handlerName = "updateSubmissionStatusDistributorHandler" @@ -243,6 +319,17 @@ func (h *handler) updateSubmissionStatusDistributorHandler(w http.ResponseWriter w.WriteHeader(http.StatusNoContent) } +// @Summary Отправить анкету +// @Description Отправка заполненной анкеты клиента +// @Tags clients +// @Accept json +// @Produce json +// @Param request body map[string]interface{} true "Данные анкеты" +// @Success 201 {object} map[string]string "Анкета отправлена" +// @Failure 400 {object} map[string]string "Неверные данные запроса" +// @Failure 500 {object} map[string]string "Внутренняя ошибка сервера" +// @Router /api/v1/anketa [post] +// //nolint:funlen // TODO: refactor func (h *handler) postAnketaHandler(w http.ResponseWriter, r *http.Request) { handlerName := "postAnketaHandler" diff --git a/internal/http/swagger/docs/docs.go b/internal/http/swagger/docs/docs.go new file mode 100644 index 0000000..7a0c039 --- /dev/null +++ b/internal/http/swagger/docs/docs.go @@ -0,0 +1,5506 @@ +// Package docs Code generated by swaggo/swag. DO NOT EDIT +package docs + +import "github.com/swaggo/swag" + +const docTemplate = `{ + "schemes": {{ marshal .Schemes }}, + "swagger": "2.0", + "info": { + "description": "{{escape .Description}}", + "title": "{{.Title}}", + "termsOfService": "http://swagger.io/terms/", + "contact": { + "name": "API Support", + "url": "http://www.swagger.io/support", + "email": "support@swagger.io" + }, + "license": { + "name": "MIT", + "url": "https://opensource.org/licenses/MIT" + }, + "version": "{{.Version}}" + }, + "host": "{{.Host}}", + "basePath": "{{.BasePath}}", + "paths": { + "/api/v1/agents/{agent_id}/balance": { + "get": { + "security": [ + { + "BearerAuth": [] + } + ], + "description": "Получение текущего баланса агента", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "agents" + ], + "summary": "Получить баланс агента", + "parameters": [ + { + "type": "string", + "description": "ID агента", + "name": "agent_id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "Баланс агента", + "schema": { + "$ref": "#/definitions/git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.BalanceGetResponse" + } + }, + "400": { + "description": "Неверные параметры запроса", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "500": { + "description": "Внутренняя ошибка сервера", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + } + } + }, + "/api/v1/agents/{agent_id}/bank_accounts": { + "get": { + "security": [ + { + "BearerAuth": [] + } + ], + "description": "Получение списка банковских счетов агента", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "agents" + ], + "summary": "Получить список банковских счетов агента", + "parameters": [ + { + "type": "string", + "description": "ID агента", + "name": "agent_id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "Список банковских счетов", + "schema": { + "$ref": "#/definitions/git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.BankAccountListGetResponse" + } + }, + "400": { + "description": "Неверные параметры запроса", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "500": { + "description": "Внутренняя ошибка сервера", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + } + }, + "post": { + "security": [ + { + "BearerAuth": [] + } + ], + "description": "Создание нового банковского счета для агента", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "agents" + ], + "summary": "Создать банковский счет агента", + "parameters": [ + { + "type": "string", + "description": "ID агента", + "name": "agent_id", + "in": "path", + "required": true + }, + { + "description": "Данные банковского счета", + "name": "request", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.BankAccountCreateRequest" + } + } + ], + "responses": { + "201": { + "description": "Банковский счет создан", + "schema": { + "$ref": "#/definitions/git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.BankAccountCreateResponse" + } + }, + "400": { + "description": "Неверные данные запроса", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "500": { + "description": "Внутренняя ошибка сервера", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + } + } + }, + "/api/v1/agents/{agent_id}/bank_accounts/{bank_account_id}": { + "put": { + "security": [ + { + "BearerAuth": [] + } + ], + "description": "Обновление информации о банковском счете агента", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "agents" + ], + "summary": "Обновить банковский счет агента", + "parameters": [ + { + "type": "string", + "description": "ID агента", + "name": "agent_id", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "ID банковского счета", + "name": "bank_account_id", + "in": "path", + "required": true + }, + { + "description": "Данные для обновления", + "name": "request", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.BankAccountUpdateRequest" + } + } + ], + "responses": { + "200": { + "description": "Банковский счет обновлен", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "400": { + "description": "Неверные данные запроса", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "500": { + "description": "Внутренняя ошибка сервера", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + } + }, + "delete": { + "security": [ + { + "BearerAuth": [] + } + ], + "description": "Удаление банковского счета агента", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "agents" + ], + "summary": "Удалить банковский счет агента", + "parameters": [ + { + "type": "string", + "description": "ID агента", + "name": "agent_id", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "ID банковского счета", + "name": "bank_account_id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "Банковский счет удален", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "400": { + "description": "Неверные параметры запроса", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "500": { + "description": "Внутренняя ошибка сервера", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + } + } + }, + "/api/v1/agents/{agent_id}/companies": { + "get": { + "security": [ + { + "BearerAuth": [] + } + ], + "description": "Получение списка всех компаний, принадлежащих агенту", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "agents" + ], + "summary": "Получить список компаний агента", + "parameters": [ + { + "type": "string", + "description": "ID агента", + "name": "agent_id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "Список компаний", + "schema": { + "$ref": "#/definitions/git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.CompanyListGetResponse" + } + }, + "400": { + "description": "Неверные данные запроса", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "401": { + "description": "Неавторизованный доступ", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "500": { + "description": "Внутренняя ошибка сервера", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + } + } + }, + "/api/v1/agents/{agent_id}/company": { + "post": { + "security": [ + { + "BearerAuth": [] + } + ], + "description": "Создание новой компании для агента", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "agents" + ], + "summary": "Создать компанию", + "parameters": [ + { + "type": "string", + "description": "ID агента", + "name": "agent_id", + "in": "path", + "required": true + }, + { + "description": "Данные для создания компании", + "name": "request", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.CompanyCreateRequest" + } + } + ], + "responses": { + "201": { + "description": "Компания создана", + "schema": { + "$ref": "#/definitions/git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.CompanyCreateResponse" + } + }, + "400": { + "description": "Неверные данные запроса", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "401": { + "description": "Неавторизованный доступ", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "500": { + "description": "Внутренняя ошибка сервера", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + } + } + }, + "/api/v1/agents/{agent_id}/company/{company_id}": { + "get": { + "security": [ + { + "BearerAuth": [] + } + ], + "description": "Получение детальной информации о компании агента", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "agents" + ], + "summary": "Получить компанию по ID", + "parameters": [ + { + "type": "string", + "description": "ID агента", + "name": "agent_id", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "ID компании", + "name": "company_id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "Информация о компании", + "schema": { + "$ref": "#/definitions/git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.CompanyByIdGetResponse" + } + }, + "400": { + "description": "Неверные данные запроса", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "401": { + "description": "Неавторизованный доступ", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "404": { + "description": "Компания не найдена", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "500": { + "description": "Внутренняя ошибка сервера", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + } + } + }, + "/api/v1/agents/{agent_id}/profile": { + "get": { + "security": [ + { + "BearerAuth": [] + } + ], + "description": "Получение профиля агента по ID", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "agents" + ], + "summary": "Получить профиль агента", + "parameters": [ + { + "type": "string", + "description": "ID агента", + "name": "agent_id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "Профиль агента", + "schema": { + "$ref": "#/definitions/git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.ProfileGetResponse" + } + }, + "400": { + "description": "Неверные параметры запроса", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "500": { + "description": "Внутренняя ошибка сервера", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + } + }, + "put": { + "security": [ + { + "BearerAuth": [] + } + ], + "description": "Обновление профиля агента", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "agents" + ], + "summary": "Обновить профиль агента", + "parameters": [ + { + "type": "string", + "description": "ID агента", + "name": "agent_id", + "in": "path", + "required": true + }, + { + "description": "Данные для обновления профиля", + "name": "request", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.ProfileUpdateRequest" + } + } + ], + "responses": { + "200": { + "description": "Профиль обновлен", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "400": { + "description": "Неверные данные запроса", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "500": { + "description": "Внутренняя ошибка сервера", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + } + } + }, + "/api/v1/agents/{agent_id}/submissions": { + "get": { + "security": [ + { + "BearerAuth": [] + } + ], + "description": "Получение списка заявок агента с возможностью фильтрации", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "agents" + ], + "summary": "Получить список заявок агента", + "parameters": [ + { + "type": "string", + "description": "ID агента", + "name": "agent_id", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "ID вакансии", + "name": "vacancy_id", + "in": "query" + }, + { + "type": "string", + "description": "Статус заявки", + "name": "status", + "in": "query" + }, + { + "type": "integer", + "description": "Номер страницы", + "name": "page", + "in": "query" + }, + { + "type": "integer", + "description": "Размер страницы", + "name": "page_size", + "in": "query" + } + ], + "responses": { + "200": { + "description": "Список заявок", + "schema": { + "$ref": "#/definitions/git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.SubmissionListGetResponse" + } + }, + "400": { + "description": "Неверные данные запроса", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "401": { + "description": "Неавторизованный доступ", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "500": { + "description": "Внутренняя ошибка сервера", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + } + } + }, + "/api/v1/agents/{agent_id}/submissions/{submission_id}": { + "delete": { + "security": [ + { + "BearerAuth": [] + } + ], + "description": "Удаление заявки агента", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "agents" + ], + "summary": "Удалить заявку агента", + "parameters": [ + { + "type": "string", + "description": "ID агента", + "name": "agent_id", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "ID заявки", + "name": "submission_id", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "description": "Заявка удалена" + }, + "400": { + "description": "Неверные данные запроса", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "401": { + "description": "Неавторизованный доступ", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "404": { + "description": "Заявка не найдена", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "500": { + "description": "Внутренняя ошибка сервера", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + } + } + }, + "/api/v1/agents/{agent_id}/submissions/{submission_id}/cv": { + "get": { + "security": [ + { + "BearerAuth": [] + } + ], + "description": "Получение CV файла заявки", + "consumes": [ + "application/json" + ], + "produces": [ + "application/octet-stream" + ], + "tags": [ + "agents" + ], + "summary": "Получить CV заявки", + "parameters": [ + { + "type": "string", + "description": "ID агента", + "name": "agent_id", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "ID заявки", + "name": "submission_id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "CV файл", + "schema": { + "type": "file" + } + }, + "400": { + "description": "Неверные данные запроса", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "401": { + "description": "Неавторизованный доступ", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "404": { + "description": "CV не найден", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "500": { + "description": "Внутренняя ошибка сервера", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + } + } + }, + "/api/v1/agents/{agent_id}/transactions": { + "get": { + "security": [ + { + "BearerAuth": [] + } + ], + "description": "Получение списка транзакций агента с возможностью фильтрации", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "agents" + ], + "summary": "Получить список транзакций агента", + "parameters": [ + { + "type": "string", + "description": "ID агента", + "name": "agent_id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "Список транзакций", + "schema": { + "$ref": "#/definitions/git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.TransactionListGetResponse" + } + }, + "400": { + "description": "Неверные параметры запроса", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "500": { + "description": "Внутренняя ошибка сервера", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + } + }, + "post": { + "security": [ + { + "BearerAuth": [] + } + ], + "description": "Создание новой транзакции для агента", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "agents" + ], + "summary": "Создать транзакцию агента", + "parameters": [ + { + "type": "string", + "description": "ID агента", + "name": "agent_id", + "in": "path", + "required": true + }, + { + "description": "Данные транзакции", + "name": "request", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.TransactionCreateRequest" + } + } + ], + "responses": { + "201": { + "description": "Транзакция создана", + "schema": { + "$ref": "#/definitions/git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.TransactionCreateResponse" + } + }, + "400": { + "description": "Неверные данные запроса", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "500": { + "description": "Внутренняя ошибка сервера", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + } + } + }, + "/api/v1/agents/{agent_id}/vacancies": { + "get": { + "security": [ + { + "BearerAuth": [] + } + ], + "description": "Получение списка вакансий с возможностью фильтрации", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "agents" + ], + "summary": "Получить список вакансий для агента", + "parameters": [ + { + "type": "string", + "description": "ID агента", + "name": "agent_id", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "ID дистрибьютора", + "name": "distributor_id", + "in": "query" + }, + { + "type": "string", + "description": "ID компании", + "name": "company_id", + "in": "query" + }, + { + "type": "string", + "description": "Регион", + "name": "region", + "in": "query" + }, + { + "type": "integer", + "description": "Минимальная зарплата", + "name": "salary_bottom", + "in": "query" + }, + { + "type": "integer", + "description": "Максимальная зарплата", + "name": "salary_top", + "in": "query" + }, + { + "type": "boolean", + "description": "Архивные вакансии", + "name": "is_archived", + "in": "query" + }, + { + "type": "string", + "description": "Статус вакансии", + "name": "status", + "in": "query" + }, + { + "type": "integer", + "description": "Номер страницы", + "name": "page", + "in": "query" + }, + { + "type": "integer", + "description": "Размер страницы", + "name": "page_size", + "in": "query" + } + ], + "responses": { + "200": { + "description": "Список вакансий", + "schema": { + "$ref": "#/definitions/git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.VacancyListGetResponse" + } + }, + "400": { + "description": "Неверные данные запроса", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "401": { + "description": "Неавторизованный доступ", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "500": { + "description": "Внутренняя ошибка сервера", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + } + } + }, + "/api/v1/agents/{agent_id}/vacancies/{vacancy_id}": { + "get": { + "security": [ + { + "BearerAuth": [] + } + ], + "description": "Получение персональной ссылки агента для вакансии", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "agents" + ], + "summary": "Получить персональную ссылку", + "parameters": [ + { + "type": "string", + "description": "ID агента", + "name": "agent_id", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "ID вакансии", + "name": "vacancy_id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "Персональная ссылка", + "schema": { + "$ref": "#/definitions/git-molva_ru_Molva_molva-backend_services_api_gateway_internal_types.PersonalLinkResponse" + } + }, + "400": { + "description": "Неверные данные запроса", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "401": { + "description": "Неавторизованный доступ", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "500": { + "description": "Внутренняя ошибка сервера", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + } + } + }, + "/api/v1/anketa": { + "get": { + "description": "Получение HTML формы анкеты для клиента", + "consumes": [ + "application/json" + ], + "produces": [ + "text/html" + ], + "tags": [ + "clients" + ], + "summary": "Получить анкету", + "parameters": [ + { + "type": "string", + "description": "Зашифрованная ссылка с параметрами", + "name": "link", + "in": "query", + "required": true + } + ], + "responses": { + "200": { + "description": "HTML форма анкеты", + "schema": { + "type": "string" + } + }, + "400": { + "description": "Неверные данные запроса", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "404": { + "description": "Вакансия не найдена", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "500": { + "description": "Внутренняя ошибка сервера", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + } + }, + "post": { + "description": "Отправка заполненной анкеты клиента", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "clients" + ], + "summary": "Отправить анкету", + "parameters": [ + { + "description": "Данные анкеты", + "name": "request", + "in": "body", + "required": true, + "schema": { + "type": "object", + "additionalProperties": true + } + } + ], + "responses": { + "201": { + "description": "Анкета отправлена", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "400": { + "description": "Неверные данные запроса", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "500": { + "description": "Внутренняя ошибка сервера", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + } + } + }, + "/api/v1/companies/{company_id}/employees": { + "get": { + "security": [ + { + "BearerAuth": [] + } + ], + "description": "Получение списка сотрудников компании", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "employees" + ], + "summary": "Получить список сотрудников компании", + "parameters": [ + { + "type": "string", + "description": "ID компании", + "name": "company_id", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "ID пользователя", + "name": "uid", + "in": "query", + "required": true + } + ], + "responses": { + "200": { + "description": "Список сотрудников", + "schema": { + "$ref": "#/definitions/git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.EmployeeResponse" + } + }, + "400": { + "description": "Неверные данные запроса", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "401": { + "description": "Неавторизованный доступ", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "500": { + "description": "Внутренняя ошибка сервера", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + } + } + }, + "/api/v1/confirm_email": { + "get": { + "description": "HTML страница для подтверждения email адреса пользователя", + "consumes": [ + "text/html" + ], + "produces": [ + "text/html" + ], + "tags": [ + "auth" + ], + "summary": "Страница подтверждения email", + "parameters": [ + { + "type": "string", + "description": "ID пользователя", + "name": "uid", + "in": "query", + "required": true + }, + { + "type": "string", + "description": "Токен подтверждения", + "name": "token", + "in": "query", + "required": true + } + ], + "responses": { + "200": { + "description": "HTML страница подтверждения", + "schema": { + "type": "string" + } + }, + "400": { + "description": "Неверные параметры запроса", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "500": { + "description": "Внутренняя ошибка сервера", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + } + } + }, + "/api/v1/distributor/{distributor_id}/balance": { + "get": { + "security": [ + { + "BearerAuth": [] + } + ], + "description": "Получение текущего баланса дистрибьютора", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "distributors" + ], + "summary": "Получить баланс дистрибьютора", + "parameters": [ + { + "type": "string", + "description": "ID дистрибьютора", + "name": "distributor_id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "Баланс дистрибьютора", + "schema": { + "$ref": "#/definitions/git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.BalanceGetResponse" + } + }, + "400": { + "description": "Неверные параметры запроса", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "500": { + "description": "Внутренняя ошибка сервера", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + } + } + }, + "/api/v1/distributor/{distributor_id}/bank_accounts": { + "get": { + "security": [ + { + "BearerAuth": [] + } + ], + "description": "Получение списка банковских счетов дистрибьютора", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "distributors" + ], + "summary": "Получить список банковских счетов дистрибьютора", + "parameters": [ + { + "type": "string", + "description": "ID дистрибьютора", + "name": "distributor_id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "Список банковских счетов", + "schema": { + "$ref": "#/definitions/git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.BankAccountListGetResponse" + } + }, + "400": { + "description": "Неверные параметры запроса", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "500": { + "description": "Внутренняя ошибка сервера", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + } + } + }, + "/api/v1/distributor/{distributor_id}/bank_accounts/{bank_account_id}": { + "put": { + "security": [ + { + "BearerAuth": [] + } + ], + "description": "Обновление информации о банковском счете дистрибьютора", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "distributors" + ], + "summary": "Обновить банковский счет дистрибьютора", + "parameters": [ + { + "type": "string", + "description": "ID дистрибьютора", + "name": "distributor_id", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "ID банковского счета", + "name": "bank_account_id", + "in": "path", + "required": true + }, + { + "description": "Данные для обновления", + "name": "request", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.BankAccountUpdateRequest" + } + } + ], + "responses": { + "200": { + "description": "Банковский счет обновлен", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "400": { + "description": "Неверные данные запроса", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "500": { + "description": "Внутренняя ошибка сервера", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + } + }, + "delete": { + "security": [ + { + "BearerAuth": [] + } + ], + "description": "Удаление банковского счета дистрибьютора", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "distributors" + ], + "summary": "Удалить банковский счет дистрибьютора", + "parameters": [ + { + "type": "string", + "description": "ID дистрибьютора", + "name": "distributor_id", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "ID банковского счета", + "name": "bank_account_id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "Банковский счет удален", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "400": { + "description": "Неверные параметры запроса", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "500": { + "description": "Внутренняя ошибка сервера", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + } + } + }, + "/api/v1/distributor/{distributor_id}/companies": { + "get": { + "security": [ + { + "BearerAuth": [] + } + ], + "description": "Получение списка всех компаний, принадлежащих дистрибьютору", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "distributors" + ], + "summary": "Получить список компаний дистрибьютора", + "parameters": [ + { + "type": "string", + "description": "ID дистрибьютора", + "name": "distributor_id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "Список компаний", + "schema": { + "$ref": "#/definitions/git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.CompanyListGetResponse" + } + }, + "400": { + "description": "Неверные данные запроса", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "401": { + "description": "Неавторизованный доступ", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "500": { + "description": "Внутренняя ошибка сервера", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + } + } + }, + "/api/v1/distributor/{distributor_id}/company": { + "post": { + "security": [ + { + "BearerAuth": [] + } + ], + "description": "Создание новой компании для дистрибьютора", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "distributors" + ], + "summary": "Создать компанию дистрибьютора", + "parameters": [ + { + "type": "string", + "description": "ID дистрибьютора", + "name": "distributor_id", + "in": "path", + "required": true + }, + { + "description": "Данные для создания компании", + "name": "request", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.CompanyCreateRequest" + } + } + ], + "responses": { + "201": { + "description": "Компания создана", + "schema": { + "$ref": "#/definitions/git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.CompanyCreateResponse" + } + }, + "400": { + "description": "Неверные данные запроса", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "401": { + "description": "Неавторизованный доступ", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "500": { + "description": "Внутренняя ошибка сервера", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + } + } + }, + "/api/v1/distributor/{distributor_id}/company/{company_id}": { + "get": { + "security": [ + { + "BearerAuth": [] + } + ], + "description": "Получение детальной информации о компании дистрибьютора", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "distributors" + ], + "summary": "Получить компанию дистрибьютора по ID", + "parameters": [ + { + "type": "string", + "description": "ID дистрибьютора", + "name": "distributor_id", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "ID компании", + "name": "company_id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "Информация о компании", + "schema": { + "$ref": "#/definitions/git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.CompanyByIdGetResponse" + } + }, + "400": { + "description": "Неверные данные запроса", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "401": { + "description": "Неавторизованный доступ", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "404": { + "description": "Компания не найдена", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "500": { + "description": "Внутренняя ошибка сервера", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + } + }, + "post": { + "security": [ + { + "BearerAuth": [] + } + ], + "description": "Добавление нового участника в компанию дистрибьютора", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "distributors" + ], + "summary": "Добавить участника в компанию", + "parameters": [ + { + "type": "string", + "description": "ID дистрибьютора", + "name": "distributor_id", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "ID компании", + "name": "company_id", + "in": "path", + "required": true + }, + { + "description": "Данные участника", + "name": "request", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.AddDistributorCompanyMemberRequest" + } + } + ], + "responses": { + "201": { + "description": "Участник добавлен" + }, + "400": { + "description": "Неверные данные запроса", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "401": { + "description": "Неавторизованный доступ", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "404": { + "description": "Компания не найдена", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "500": { + "description": "Внутренняя ошибка сервера", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + } + }, + "patch": { + "security": [ + { + "BearerAuth": [] + } + ], + "description": "Обновление информации о компании дистрибьютора", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "distributors" + ], + "summary": "Обновить компанию дистрибьютора", + "parameters": [ + { + "type": "string", + "description": "ID дистрибьютора", + "name": "distributor_id", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "ID компании", + "name": "company_id", + "in": "path", + "required": true + }, + { + "description": "Данные для обновления", + "name": "request", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.CompanyUpdateRequest" + } + } + ], + "responses": { + "204": { + "description": "Компания обновлена" + }, + "400": { + "description": "Неверные данные запроса", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "401": { + "description": "Неавторизованный доступ", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "404": { + "description": "Компания не найдена", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "500": { + "description": "Внутренняя ошибка сервера", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + } + } + }, + "/api/v1/distributor/{distributor_id}/company/{company_id}/balance": { + "get": { + "security": [ + { + "BearerAuth": [] + } + ], + "description": "Получение баланса конкретной компании дистрибьютора", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "distributors" + ], + "summary": "Получить баланс компании дистрибьютора", + "parameters": [ + { + "type": "string", + "description": "ID дистрибьютора", + "name": "distributor_id", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "ID компании", + "name": "company_id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "Баланс компании", + "schema": { + "$ref": "#/definitions/git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.BalanceGetResponse" + } + }, + "400": { + "description": "Неверные параметры запроса", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "500": { + "description": "Внутренняя ошибка сервера", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + } + } + }, + "/api/v1/distributor/{distributor_id}/company/{company_id}/bank_accounts": { + "get": { + "security": [ + { + "BearerAuth": [] + } + ], + "description": "Получение списка банковских счетов конкретной компании дистрибьютора", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "distributors" + ], + "summary": "Получить список банковских счетов компании дистрибьютора", + "parameters": [ + { + "type": "string", + "description": "ID дистрибьютора", + "name": "distributor_id", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "ID компании", + "name": "company_id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "Список банковских счетов компании", + "schema": { + "$ref": "#/definitions/git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.BankAccountListGetResponse" + } + }, + "400": { + "description": "Неверные параметры запроса", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "500": { + "description": "Внутренняя ошибка сервера", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + } + }, + "post": { + "security": [ + { + "BearerAuth": [] + } + ], + "description": "Создание нового банковского счета для компании дистрибьютора", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "distributors" + ], + "summary": "Создать банковский счет компании дистрибьютора", + "parameters": [ + { + "type": "string", + "description": "ID дистрибьютора", + "name": "distributor_id", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "ID компании", + "name": "company_id", + "in": "path", + "required": true + }, + { + "description": "Данные банковского счета", + "name": "request", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.BankAccountCreateRequest" + } + } + ], + "responses": { + "201": { + "description": "Банковский счет создан", + "schema": { + "$ref": "#/definitions/git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.BankAccountCreateResponse" + } + }, + "400": { + "description": "Неверные данные запроса", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "500": { + "description": "Внутренняя ошибка сервера", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + } + } + }, + "/api/v1/distributor/{distributor_id}/company/{company_id}/logo": { + "get": { + "security": [ + { + "BearerAuth": [] + } + ], + "description": "Получение логотипа компании дистрибьютора", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "distributors" + ], + "summary": "Получить логотип компании", + "parameters": [ + { + "type": "string", + "description": "ID дистрибьютора", + "name": "distributor_id", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "ID компании", + "name": "company_id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "Логотип компании", + "schema": { + "type": "file" + } + }, + "400": { + "description": "Неверные параметры запроса", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "404": { + "description": "Логотип не найден", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "500": { + "description": "Внутренняя ошибка сервера", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + } + }, + "put": { + "security": [ + { + "BearerAuth": [] + } + ], + "description": "Обновление логотипа компании дистрибьютора", + "consumes": [ + "multipart/form-data" + ], + "produces": [ + "application/json" + ], + "tags": [ + "distributors" + ], + "summary": "Обновить логотип компании", + "parameters": [ + { + "type": "string", + "description": "ID дистрибьютора", + "name": "distributor_id", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "ID компании", + "name": "company_id", + "in": "path", + "required": true + }, + { + "type": "file", + "description": "Новый файл логотипа", + "name": "logo", + "in": "formData", + "required": true + } + ], + "responses": { + "200": { + "description": "Логотип обновлен", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "400": { + "description": "Неверные данные запроса", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "500": { + "description": "Внутренняя ошибка сервера", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + } + }, + "post": { + "security": [ + { + "BearerAuth": [] + } + ], + "description": "Загрузка нового логотипа для компании дистрибьютора", + "consumes": [ + "multipart/form-data" + ], + "produces": [ + "application/json" + ], + "tags": [ + "distributors" + ], + "summary": "Создать логотип компании", + "parameters": [ + { + "type": "string", + "description": "ID дистрибьютора", + "name": "distributor_id", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "ID компании", + "name": "company_id", + "in": "path", + "required": true + }, + { + "type": "file", + "description": "Файл логотипа", + "name": "logo", + "in": "formData", + "required": true + } + ], + "responses": { + "201": { + "description": "Логотип загружен", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "400": { + "description": "Неверные данные запроса", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "500": { + "description": "Внутренняя ошибка сервера", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + } + }, + "delete": { + "security": [ + { + "BearerAuth": [] + } + ], + "description": "Удаление логотипа компании дистрибьютора", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "distributors" + ], + "summary": "Удалить логотип компании", + "parameters": [ + { + "type": "string", + "description": "ID дистрибьютора", + "name": "distributor_id", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "ID компании", + "name": "company_id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "Логотип удален", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "400": { + "description": "Неверные параметры запроса", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "500": { + "description": "Внутренняя ошибка сервера", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + } + } + }, + "/api/v1/distributor/{distributor_id}/company/{company_id}/transactions": { + "get": { + "security": [ + { + "BearerAuth": [] + } + ], + "description": "Получение списка транзакций конкретной компании дистрибьютора", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "distributors" + ], + "summary": "Получить список транзакций компании дистрибьютора", + "parameters": [ + { + "type": "string", + "description": "ID дистрибьютора", + "name": "distributor_id", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "ID компании", + "name": "company_id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "Список транзакций компании", + "schema": { + "$ref": "#/definitions/git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.TransactionListGetResponse" + } + }, + "400": { + "description": "Неверные параметры запроса", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "500": { + "description": "Внутренняя ошибка сервера", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + } + } + }, + "/api/v1/distributor/{distributor_id}/profile": { + "get": { + "security": [ + { + "BearerAuth": [] + } + ], + "description": "Получение профиля дистрибьютора по ID", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "distributors" + ], + "summary": "Получить профиль дистрибьютора", + "parameters": [ + { + "type": "string", + "description": "ID дистрибьютора", + "name": "distributor_id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "Профиль дистрибьютора", + "schema": { + "$ref": "#/definitions/git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.ProfileGetResponse" + } + }, + "400": { + "description": "Неверные параметры запроса", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "500": { + "description": "Внутренняя ошибка сервера", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + } + }, + "put": { + "security": [ + { + "BearerAuth": [] + } + ], + "description": "Обновление профиля дистрибьютора", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "distributors" + ], + "summary": "Обновить профиль дистрибьютора", + "parameters": [ + { + "type": "string", + "description": "ID дистрибьютора", + "name": "distributor_id", + "in": "path", + "required": true + }, + { + "description": "Данные для обновления профиля", + "name": "request", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.ProfileUpdateRequest" + } + } + ], + "responses": { + "200": { + "description": "Профиль обновлен", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "400": { + "description": "Неверные данные запроса", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "500": { + "description": "Внутренняя ошибка сервера", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + } + } + }, + "/api/v1/distributor/{distributor_id}/transactions": { + "get": { + "security": [ + { + "BearerAuth": [] + } + ], + "description": "Получение списка транзакций дистрибьютора с возможностью фильтрации", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "distributors" + ], + "summary": "Получить список транзакций дистрибьютора", + "parameters": [ + { + "type": "string", + "description": "ID дистрибьютора", + "name": "distributor_id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "Список транзакций", + "schema": { + "$ref": "#/definitions/git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.TransactionListGetResponse" + } + }, + "400": { + "description": "Неверные параметры запроса", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "500": { + "description": "Внутренняя ошибка сервера", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + } + }, + "post": { + "security": [ + { + "BearerAuth": [] + } + ], + "description": "Создание новой транзакции для дистрибьютора", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "distributors" + ], + "summary": "Создать транзакцию дистрибьютора", + "parameters": [ + { + "type": "string", + "description": "ID дистрибьютора", + "name": "distributor_id", + "in": "path", + "required": true + }, + { + "description": "Данные транзакции", + "name": "request", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.TransactionCreateRequest" + } + } + ], + "responses": { + "201": { + "description": "Транзакция создана", + "schema": { + "$ref": "#/definitions/git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.TransactionCreateResponse" + } + }, + "400": { + "description": "Неверные данные запроса", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "500": { + "description": "Внутренняя ошибка сервера", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + } + } + }, + "/api/v1/distributor/{distributor_id}/vacancies": { + "get": { + "security": [ + { + "BearerAuth": [] + } + ], + "description": "Получение списка вакансий дистрибьютора с возможностью фильтрации", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "distributors" + ], + "summary": "Получить список вакансий дистрибьютора", + "parameters": [ + { + "type": "string", + "description": "ID дистрибьютора", + "name": "distributor_id", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "ID компании", + "name": "company_id", + "in": "query" + }, + { + "type": "string", + "description": "Регион", + "name": "region", + "in": "query" + }, + { + "type": "integer", + "description": "Минимальная зарплата", + "name": "salary_bottom", + "in": "query" + }, + { + "type": "integer", + "description": "Максимальная зарплата", + "name": "salary_top", + "in": "query" + }, + { + "type": "boolean", + "description": "Архивные вакансии", + "name": "is_archived", + "in": "query" + }, + { + "type": "string", + "description": "Статус вакансии", + "name": "status", + "in": "query" + }, + { + "type": "integer", + "description": "Номер страницы", + "name": "page", + "in": "query" + }, + { + "type": "integer", + "description": "Размер страницы", + "name": "page_size", + "in": "query" + } + ], + "responses": { + "200": { + "description": "Список вакансий", + "schema": { + "$ref": "#/definitions/git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.VacancyListGetResponse" + } + }, + "400": { + "description": "Неверные данные запроса", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "401": { + "description": "Неавторизованный доступ", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "500": { + "description": "Внутренняя ошибка сервера", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + } + }, + "post": { + "security": [ + { + "BearerAuth": [] + } + ], + "description": "Создание новой вакансии дистрибьютором", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "distributors" + ], + "summary": "Создать вакансию", + "parameters": [ + { + "type": "string", + "description": "ID дистрибьютора", + "name": "distributor_id", + "in": "path", + "required": true + }, + { + "description": "Данные для создания вакансии", + "name": "request", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.VacancyCreateRequest" + } + } + ], + "responses": { + "201": { + "description": "Вакансия создана", + "schema": { + "$ref": "#/definitions/git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.VacancyCreateResponse" + } + }, + "400": { + "description": "Неверные данные запроса", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "401": { + "description": "Неавторизованный доступ", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "500": { + "description": "Внутренняя ошибка сервера", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + } + } + }, + "/api/v1/distributor/{distributor_id}/vacancies/{vacancy_id}": { + "delete": { + "security": [ + { + "BearerAuth": [] + } + ], + "description": "Удаление вакансии дистрибьютора", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "distributors" + ], + "summary": "Удалить вакансию", + "parameters": [ + { + "type": "string", + "description": "ID дистрибьютора", + "name": "distributor_id", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "ID вакансии", + "name": "vacancy_id", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "description": "Вакансия удалена" + }, + "400": { + "description": "Неверные данные запроса", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "401": { + "description": "Неавторизованный доступ", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "404": { + "description": "Вакансия не найдена", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "500": { + "description": "Внутренняя ошибка сервера", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + } + }, + "patch": { + "security": [ + { + "BearerAuth": [] + } + ], + "description": "Обновление информации о вакансии дистрибьютора", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "distributors" + ], + "summary": "Обновить вакансию", + "parameters": [ + { + "type": "string", + "description": "ID дистрибьютора", + "name": "distributor_id", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "ID вакансии", + "name": "vacancy_id", + "in": "path", + "required": true + }, + { + "description": "Данные для обновления", + "name": "request", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.VacancyUpdateRequest" + } + } + ], + "responses": { + "204": { + "description": "Вакансия обновлена" + }, + "400": { + "description": "Неверные данные запроса", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "401": { + "description": "Неавторизованный доступ", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "404": { + "description": "Вакансия не найдена", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "500": { + "description": "Внутренняя ошибка сервера", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + } + } + }, + "/api/v1/distributor/{distributor_id}/vacancies/{vacancy_id}/moderation": { + "post": { + "security": [ + { + "BearerAuth": [] + } + ], + "description": "Отправка вакансии дистрибьютора на модерацию", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "distributors" + ], + "summary": "Отправить вакансию на модерацию", + "parameters": [ + { + "type": "string", + "description": "ID дистрибьютора", + "name": "distributor_id", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "ID вакансии", + "name": "vacancy_id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "Вакансия отправлена на модерацию", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "400": { + "description": "Неверные параметры запроса", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "500": { + "description": "Внутренняя ошибка сервера", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + } + } + }, + "/api/v1/distributor/{distributor_id}/vacancies/{vacancy_id}/submissions": { + "get": { + "security": [ + { + "BearerAuth": [] + } + ], + "description": "Получение списка заявок дистрибьютора с возможностью фильтрации", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "distributors" + ], + "summary": "Получить список заявок дистрибьютора", + "parameters": [ + { + "type": "string", + "description": "ID дистрибьютора", + "name": "distributor_id", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "ID вакансии", + "name": "vacancy_id", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Статус заявки", + "name": "status", + "in": "query" + }, + { + "type": "integer", + "description": "Номер страницы", + "name": "page", + "in": "query" + }, + { + "type": "integer", + "description": "Размер страницы", + "name": "page_size", + "in": "query" + } + ], + "responses": { + "200": { + "description": "Список заявок", + "schema": { + "$ref": "#/definitions/git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.SubmissionListGetResponse" + } + }, + "400": { + "description": "Неверные данные запроса", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "401": { + "description": "Неавторизованный доступ", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "500": { + "description": "Внутренняя ошибка сервера", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + } + } + }, + "/api/v1/distributor/{distributor_id}/vacancies/{vacancy_id}/submissions/{submission_id}/status": { + "post": { + "security": [ + { + "BearerAuth": [] + } + ], + "description": "Обновление статуса заявки дистрибьютором", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "distributors" + ], + "summary": "Обновить статус заявки", + "parameters": [ + { + "type": "string", + "description": "ID дистрибьютора", + "name": "distributor_id", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "ID вакансии", + "name": "vacancy_id", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "ID заявки", + "name": "submission_id", + "in": "path", + "required": true + }, + { + "description": "Новый статус заявки", + "name": "request", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.SubmissionStatusUpdateRequest" + } + } + ], + "responses": { + "200": { + "description": "Статус обновлен" + }, + "400": { + "description": "Неверные данные запроса", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "401": { + "description": "Неавторизованный доступ", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "404": { + "description": "Заявка не найдена", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "500": { + "description": "Внутренняя ошибка сервера", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + } + } + }, + "/api/v1/docs/{file}": { + "get": { + "description": "Получение файла документа по имени", + "consumes": [ + "application/json" + ], + "produces": [ + "application/octet-stream" + ], + "tags": [ + "system" + ], + "summary": "Получить файл документа", + "parameters": [ + { + "type": "string", + "description": "Имя файла", + "name": "file", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "Файл документа", + "schema": { + "type": "file" + } + }, + "404": { + "description": "Файл не найден", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "500": { + "description": "Внутренняя ошибка сервера", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + } + } + }, + "/api/v1/feed/{uid}/events": { + "get": { + "security": [ + { + "BearerAuth": [] + } + ], + "description": "Получение ленты событий пользователя с возможностью фильтрации", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "feed" + ], + "summary": "Получить события пользователя", + "parameters": [ + { + "type": "string", + "description": "ID пользователя", + "name": "uid", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Тип пользователя (agent/distributor)", + "name": "user_type", + "in": "query", + "required": true + }, + { + "type": "string", + "description": "Тип события (через запятую)", + "name": "event_type", + "in": "query" + }, + { + "type": "boolean", + "description": "Показывать отмененные события", + "name": "show_cancelled", + "in": "query" + }, + { + "type": "integer", + "description": "Лимит событий", + "name": "limit", + "in": "query" + }, + { + "type": "integer", + "description": "Смещение", + "name": "offset", + "in": "query" + } + ], + "responses": { + "200": { + "description": "Список событий", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/git-molva_ru_Molva_molva-backend_services_api_gateway_internal_feed.Event" + } + } + }, + "400": { + "description": "Неверные данные запроса", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "401": { + "description": "Неавторизованный доступ", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "500": { + "description": "Внутренняя ошибка сервера", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + } + } + }, + "/api/v1/forgot_password": { + "post": { + "description": "Отправка OTP кода на email для восстановления пароля", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "auth" + ], + "summary": "Запрос восстановления пароля", + "parameters": [ + { + "description": "Данные для восстановления пароля", + "name": "request", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.ForgotPasswordRequest" + } + } + ], + "responses": { + "200": { + "description": "OTP код отправлен", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "400": { + "description": "Неверные данные запроса", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "500": { + "description": "Внутренняя ошибка сервера", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + } + } + }, + "/api/v1/healthcheck": { + "get": { + "description": "Получение информации о версии, коммите и дате сборки приложения", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "system" + ], + "summary": "Получить информацию о сборке", + "responses": { + "200": { + "description": "Информация о сборке", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + } + } + }, + "/api/v1/integration/vkusvill/callback": { + "post": { + "description": "Обработка callback запросов от интеграции с ВкусВилл", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "integration" + ], + "summary": "Callback интеграции с ВкусВилл", + "parameters": [ + { + "description": "Данные callback от ВкусВилл", + "name": "request", + "in": "body", + "required": true, + "schema": { + "type": "object", + "additionalProperties": true + } + } + ], + "responses": { + "200": { + "description": "Callback обработан", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "400": { + "description": "Неверные данные запроса", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "500": { + "description": "Внутренняя ошибка сервера", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + } + } + }, + "/api/v1/login": { + "post": { + "description": "Аутентификация пользователя по email и паролю", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "auth" + ], + "summary": "Вход пользователя", + "parameters": [ + { + "description": "Данные для входа", + "name": "request", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.LoginUserRequest" + } + } + ], + "responses": { + "200": { + "description": "Успешная аутентификация", + "schema": { + "$ref": "#/definitions/git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.LoginUserResponse" + } + }, + "400": { + "description": "Неверные данные запроса", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "401": { + "description": "Неверные учетные данные", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "500": { + "description": "Внутренняя ошибка сервера", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + } + } + }, + "/api/v1/logout": { + "post": { + "description": "Завершение сессии пользователя", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "auth" + ], + "summary": "Выход пользователя", + "parameters": [ + { + "description": "Токен для выхода", + "name": "request", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.LogoutUserRequest" + } + } + ], + "responses": { + "200": { + "description": "Успешный выход" + }, + "400": { + "description": "Неверные данные запроса", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "401": { + "description": "Неверный токен", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "500": { + "description": "Внутренняя ошибка сервера", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + } + } + }, + "/api/v1/refresh-token": { + "post": { + "description": "Получение нового access token по refresh token", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "auth" + ], + "summary": "Обновление токена доступа", + "parameters": [ + { + "description": "Refresh token", + "name": "request", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.RefreshTokenRequest" + } + } + ], + "responses": { + "200": { + "description": "Новые токены", + "schema": { + "$ref": "#/definitions/git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.RefreshTokenResponse" + } + }, + "400": { + "description": "Неверные данные запроса", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "401": { + "description": "Неверный refresh token", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "500": { + "description": "Внутренняя ошибка сервера", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + } + } + }, + "/api/v1/register": { + "post": { + "description": "Создание нового пользователя в системе", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "auth" + ], + "summary": "Регистрация пользователя", + "parameters": [ + { + "description": "Данные для регистрации", + "name": "request", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.UserCredentials" + } + } + ], + "responses": { + "201": { + "description": "Пользователь успешно создан", + "schema": { + "$ref": "#/definitions/git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.RegisterResponse" + } + }, + "400": { + "description": "Неверные данные запроса", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "409": { + "description": "Пользователь уже существует", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "500": { + "description": "Внутренняя ошибка сервера", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + } + } + }, + "/api/v1/reset_password": { + "put": { + "description": "Установка нового пароля после валидации OTP кода", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "auth" + ], + "summary": "Сброс пароля", + "parameters": [ + { + "description": "Данные для сброса пароля", + "name": "request", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.ResetPasswordRequest" + } + } + ], + "responses": { + "200": { + "description": "Пароль успешно изменен", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "400": { + "description": "Неверные данные запроса", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "500": { + "description": "Внутренняя ошибка сервера", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + } + } + }, + "/api/v1/validate_otp": { + "get": { + "description": "Проверка OTP кода для восстановления пароля", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "auth" + ], + "summary": "Валидация OTP кода", + "parameters": [ + { + "type": "string", + "description": "OTP код", + "name": "otp", + "in": "query", + "required": true + }, + { + "type": "string", + "description": "Email пользователя", + "name": "email", + "in": "query", + "required": true + } + ], + "responses": { + "200": { + "description": "OTP код валиден", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "400": { + "description": "Неверные параметры запроса", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "500": { + "description": "Внутренняя ошибка сервера", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + } + } + }, + "/api/v1/verify_email": { + "get": { + "description": "Получение статуса подтверждения email адреса пользователя", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "auth" + ], + "summary": "Статус подтверждения email", + "parameters": [ + { + "type": "string", + "description": "ID пользователя", + "name": "uid", + "in": "query", + "required": true + } + ], + "responses": { + "200": { + "description": "Статус подтверждения email", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "400": { + "description": "Неверные параметры запроса", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "500": { + "description": "Внутренняя ошибка сервера", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + } + }, + "patch": { + "description": "Подтверждение email адреса пользователя по токену", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "auth" + ], + "summary": "Подтверждение email", + "parameters": [ + { + "type": "string", + "description": "ID пользователя", + "name": "uid", + "in": "query", + "required": true + }, + { + "type": "string", + "description": "Токен подтверждения", + "name": "token", + "in": "query", + "required": true + } + ], + "responses": { + "200": { + "description": "Email успешно подтвержден", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "400": { + "description": "Неверные параметры запроса", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "500": { + "description": "Внутренняя ошибка сервера", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + } + } + }, + "/api/v1/{uid}/validation": { + "get": { + "description": "Получение статуса валидации пользователя по UID", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "system" + ], + "summary": "Получить статус валидации пользователя", + "parameters": [ + { + "type": "string", + "description": "UID пользователя", + "name": "uid", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "Статус валидации", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "400": { + "description": "Неверные параметры запроса", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "500": { + "description": "Внутренняя ошибка сервера", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + } + } + } + }, + "definitions": { + "git-molva_ru_Molva_molva-backend_services_api_gateway_internal_constants.PermissionValue": { + "type": "string", + "enum": [ + "no_permission", + "can_view", + "can_edit" + ], + "x-enum-varnames": [ + "NoPermission", + "CanView", + "CanEdit" + ] + }, + "git-molva_ru_Molva_molva-backend_services_api_gateway_internal_feed.AttachmentType": { + "type": "string", + "enum": [ + "vacancy", + "cv", + "profile", + "company", + "bank_account", + "submission" + ], + "x-enum-varnames": [ + "AttachmentTypeVacancy", + "AttachmentTypeCV", + "AttachmentTypeProfile", + "AttachmentTypeCompany", + "AttachmentTypeBankAccount", + "AttachmentTypeSubmission" + ] + }, + "git-molva_ru_Molva_molva-backend_services_api_gateway_internal_feed.Event": { + "type": "object", + "properties": { + "cancellation_reason": { + "type": "string" + }, + "company_id": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "event_type": { + "$ref": "#/definitions/git-molva_ru_Molva_molva-backend_services_api_gateway_internal_feed.EventType" + }, + "id": { + "type": "string" + }, + "is_cancelled": { + "type": "boolean" + }, + "message": { + "type": "string" + }, + "owner_id": { + "type": "string" + }, + "owner_type": { + "$ref": "#/definitions/git-molva_ru_Molva_molva-backend_services_api_gateway_internal_feed.UserRole" + }, + "payload": { + "$ref": "#/definitions/git-molva_ru_Molva_molva-backend_services_api_gateway_internal_feed.EventPayload" + }, + "updated_at": { + "type": "string" + }, + "visibility": { + "$ref": "#/definitions/git-molva_ru_Molva_molva-backend_services_api_gateway_internal_feed.Visibility" + } + } + }, + "git-molva_ru_Molva_molva-backend_services_api_gateway_internal_feed.EventPayload": { + "type": "object", + "properties": { + "additional_receiver": { + "description": "may be uid or company id", + "type": "string" + }, + "attachment_id": { + "type": "string" + }, + "attachment_type": { + "$ref": "#/definitions/git-molva_ru_Molva_molva-backend_services_api_gateway_internal_feed.AttachmentType" + }, + "custom_data": { + "type": "string" + } + } + }, + "git-molva_ru_Molva_molva-backend_services_api_gateway_internal_feed.EventType": { + "type": "string", + "enum": [ + "welcome", + "new_company_member", + "profile_changed", + "company_created", + "company_changed", + "vacancy_created", + "vacancy_changed", + "vacancy_moderation_sent", + "submission_status_changed", + "transaction_created", + "bank_details_changed", + "bank_account_created", + "post_anketa" + ], + "x-enum-varnames": [ + "EventWelcome", + "EventNewCompanyMember", + "EventProfileChanged", + "EventCompanyCreated", + "EventCompanyChanged", + "EventVacancyCreated", + "EventVacancyChanged", + "EventVacancyModerationSent", + "EventSubmissionStatusChanged", + "EventTransactionCreated", + "EventBankAccountChanged", + "EventBankAccountCreated", + "EventPostAnketa" + ] + }, + "git-molva_ru_Molva_molva-backend_services_api_gateway_internal_feed.UserRole": { + "type": "string", + "enum": [ + "agent", + "distributor" + ], + "x-enum-varnames": [ + "RoleAgent", + "RoleDistributor" + ] + }, + "git-molva_ru_Molva_molva-backend_services_api_gateway_internal_feed.Visibility": { + "type": "string", + "enum": [ + "public", + "private", + "company_wide" + ], + "x-enum-comments": { + "VisibilityCompanyWide": "Показывается всем в компании", + "VisibilityPrivate": "Показывается только инициатору события", + "VisibilityPublic": "Показывается всем агентам(инициатор может быть только дистр)" + }, + "x-enum-varnames": [ + "VisibilityPublic", + "VisibilityPrivate", + "VisibilityCompanyWide" + ] + }, + "git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.AddDistributorCompanyMemberRequest": { + "type": "object", + "properties": { + "companyId": { + "type": "string" + }, + "id": { + "type": "string" + } + } + }, + "git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.AgentInfo": { + "type": "object", + "properties": { + "id": { + "type": "string" + } + } + }, + "git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.Balance": { + "type": "object", + "properties": { + "clean_balance": { + "type": "integer" + }, + "raw_balance": { + "type": "integer" + } + } + }, + "git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.BalanceGetResponse": { + "type": "object", + "properties": { + "balance": { + "$ref": "#/definitions/git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.Balance" + } + } + }, + "git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.BankAccount": { + "type": "object", + "properties": { + "account_name": { + "type": "string" + }, + "account_number": { + "type": "string" + }, + "bank_name": { + "type": "string" + }, + "bik": { + "type": "string" + }, + "correspondent_account": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "id": { + "type": "string" + }, + "owner_id": { + "type": "string" + }, + "updated_at": { + "type": "string" + } + } + }, + "git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.BankAccountCreateRequest": { + "type": "object", + "properties": { + "account_name": { + "type": "string" + }, + "account_number": { + "type": "string" + }, + "bank_name": { + "type": "string" + }, + "bik": { + "type": "string" + }, + "correspondent_account": { + "type": "string" + }, + "is_primary": { + "type": "boolean" + }, + "ownerId": { + "type": "string" + } + } + }, + "git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.BankAccountCreateResponse": { + "type": "object", + "properties": { + "id": { + "type": "string" + } + } + }, + "git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.BankAccountInfo": { + "type": "object", + "properties": { + "account_name": { + "type": "string" + }, + "account_number": { + "type": "string" + }, + "bank_name": { + "type": "string" + }, + "bik": { + "type": "string" + }, + "correspondent_account": { + "type": "string" + }, + "id": { + "type": "string" + }, + "owner_type": { + "type": "string" + } + } + }, + "git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.BankAccountListGetResponse": { + "type": "object", + "properties": { + "bank_accounts": { + "type": "array", + "items": { + "$ref": "#/definitions/git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.BankAccount" + } + } + } + }, + "git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.BankAccountUpdateRequest": { + "type": "object", + "properties": { + "account_name": { + "type": "string" + }, + "account_number": { + "type": "string" + }, + "bank_name": { + "type": "string" + }, + "bik": { + "type": "string" + }, + "correspondent_account": { + "type": "string" + }, + "id": { + "type": "string" + }, + "is_primary": { + "type": "boolean" + }, + "ownerId": { + "type": "string" + } + } + }, + "git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.CandidateInfo": { + "type": "object", + "properties": { + "birthday": { + "type": "string" + }, + "cv_link": { + "type": "string" + }, + "email": { + "type": "string" + }, + "first_name": { + "type": "string" + }, + "id": { + "type": "string" + }, + "last_name": { + "type": "string" + }, + "middle_name": { + "type": "string" + }, + "phone_number": { + "type": "string" + }, + "resume": { + "type": "string" + } + } + }, + "git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.Company": { + "type": "object", + "properties": { + "description": { + "type": "string" + }, + "extra_fields_template": { + "type": "string" + }, + "has_moderation_ticket": { + "type": "boolean" + }, + "id": { + "type": "string" + }, + "inn": { + "type": "string" + }, + "is_active": { + "type": "boolean" + }, + "kpp": { + "type": "string" + }, + "legal_address": { + "type": "string" + }, + "legal_person": { + "type": "string" + }, + "metadata": { + "type": "string" + }, + "name": { + "type": "string" + }, + "owner_id": { + "type": "string" + }, + "physical_address": { + "type": "string" + }, + "staff": { + "type": "array", + "items": { + "type": "string" + } + }, + "website": { + "type": "string" + } + } + }, + "git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.CompanyByIdGetResponse": { + "type": "object", + "properties": { + "company": { + "$ref": "#/definitions/git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.Company" + } + } + }, + "git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.CompanyCreateRequest": { + "type": "object", + "properties": { + "description": { + "type": "string" + }, + "extra_fields_template": { + "type": "string" + }, + "inn": { + "type": "string" + }, + "kpp": { + "type": "string" + }, + "legal_address": { + "type": "string" + }, + "legal_person": { + "type": "string" + }, + "metadata": { + "type": "string" + }, + "name": { + "type": "string" + }, + "ownerId": { + "type": "string" + }, + "physical_address": { + "type": "string" + }, + "staff": { + "type": "array", + "items": { + "type": "string" + } + }, + "website": { + "type": "string" + } + } + }, + "git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.CompanyCreateResponse": { + "type": "object", + "properties": { + "id": { + "type": "string" + } + } + }, + "git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.CompanyListGetResponse": { + "type": "object", + "properties": { + "companies": { + "type": "array", + "items": { + "$ref": "#/definitions/git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.Company" + } + } + } + }, + "git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.CompanyUpdateRequest": { + "type": "object", + "properties": { + "description": { + "type": "string" + }, + "extra_fields": { + "type": "string" + }, + "id": { + "type": "string" + }, + "inn": { + "type": "string" + }, + "kpp": { + "type": "string" + }, + "legal_address": { + "type": "string" + }, + "legal_person": { + "type": "string" + }, + "metadata": { + "type": "string" + }, + "name": { + "type": "string" + }, + "physical_address": { + "type": "string" + }, + "staff": { + "type": "array", + "items": { + "type": "string" + } + }, + "website": { + "type": "string" + } + } + }, + "git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.EmployeeResponse": { + "type": "object", + "properties": { + "company_id": { + "type": "string" + }, + "employees": { + "type": "array", + "items": { + "$ref": "#/definitions/git-molva_ru_Molva_molva-backend_services_api_gateway_internal_types.Employee" + } + } + } + }, + "git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.ForgotPasswordRequest": { + "type": "object", + "properties": { + "email": { + "type": "string" + } + } + }, + "git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.LoginUserRequest": { + "type": "object", + "properties": { + "email": { + "type": "string" + }, + "password": { + "type": "string" + } + } + }, + "git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.LoginUserResponse": { + "type": "object", + "properties": { + "access_token": { + "type": "string" + }, + "email_confirmed": { + "type": "boolean" + }, + "permissions": { + "$ref": "#/definitions/git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.Permissions" + }, + "refresh_token": { + "type": "string" + }, + "uid": { + "type": "string" + }, + "user_type": { + "type": "integer" + } + } + }, + "git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.LogoutUserRequest": { + "type": "object", + "properties": { + "refresh_token": { + "type": "string" + } + } + }, + "git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.Permissions": { + "type": "object", + "properties": { + "balance": { + "type": "string" + }, + "company": { + "type": "string" + }, + "employees": { + "type": "string" + }, + "profile": { + "type": "string" + }, + "submissions": { + "type": "string" + }, + "vacancies": { + "type": "string" + } + } + }, + "git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.Profile": { + "type": "object", + "properties": { + "email": { + "type": "string" + }, + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "phone_number": { + "type": "string" + } + } + }, + "git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.ProfileGetResponse": { + "type": "object", + "properties": { + "profile": { + "$ref": "#/definitions/git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.Profile" + } + } + }, + "git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.ProfileUpdateRequest": { + "type": "object", + "properties": { + "email": { + "type": "string" + }, + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "phone_number": { + "type": "string" + } + } + }, + "git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.RefreshTokenRequest": { + "type": "object", + "properties": { + "refresh_token": { + "type": "string" + } + } + }, + "git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.RefreshTokenResponse": { + "type": "object", + "properties": { + "access_token": { + "type": "string" + }, + "refresh_token": { + "type": "string" + } + } + }, + "git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.RegisterResponse": { + "type": "object", + "properties": { + "uid": { + "type": "string" + } + } + }, + "git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.ResetPasswordRequest": { + "type": "object", + "properties": { + "email": { + "type": "string" + }, + "new_password": { + "type": "string" + }, + "token": { + "type": "string" + } + } + }, + "git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.Submission": { + "type": "object", + "properties": { + "agent_info": { + "$ref": "#/definitions/git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.AgentInfo" + }, + "candidate_info": { + "$ref": "#/definitions/git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.CandidateInfo" + }, + "id": { + "type": "string" + }, + "status": { + "$ref": "#/definitions/git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.SubmissionStatus" + }, + "vacancy_info": { + "$ref": "#/definitions/git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.VacancyInfo" + } + } + }, + "git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.SubmissionListGetResponse": { + "type": "object", + "properties": { + "submissions": { + "type": "array", + "items": { + "$ref": "#/definitions/git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.Submission" + } + } + } + }, + "git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.SubmissionStatus": { + "type": "string", + "enum": [ + "unspecified", + "new", + "pending", + "on_interview", + "approved", + "cancelled", + "rejected" + ], + "x-enum-varnames": [ + "SubStatusUnspecified", + "SubStatusNew", + "SubStatusPending", + "SubStatusOnInterview", + "SubStatusApproved", + "SubStatusCancelled", + "SubStatusRejected" + ] + }, + "git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.SubmissionStatusUpdateRequest": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "status": { + "$ref": "#/definitions/git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.SubmissionStatus" + } + } + }, + "git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.Transaction": { + "type": "object", + "properties": { + "amount": { + "type": "integer" + }, + "bank_account_info": { + "$ref": "#/definitions/git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.BankAccountInfo" + }, + "created_at": { + "type": "string" + }, + "currency": { + "type": "string" + }, + "id": { + "type": "string" + }, + "owner_info": { + "$ref": "#/definitions/git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.TransactionOwnerInfo" + }, + "payload": { + "$ref": "#/definitions/git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.TransactionPayload" + }, + "status": { + "$ref": "#/definitions/git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.TransactionStatus" + }, + "type": { + "$ref": "#/definitions/git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.TransactionType" + } + } + }, + "git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.TransactionCreateRequest": { + "type": "object", + "properties": { + "amount": { + "type": "integer" + }, + "bank_account_id": { + "type": "string" + }, + "currency": { + "type": "string" + }, + "ownerId": { + "type": "string" + }, + "payload": { + "$ref": "#/definitions/git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.TransactionPayload" + }, + "request_id": { + "type": "string" + } + } + }, + "git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.TransactionCreateResponse": { + "type": "object", + "properties": { + "id": { + "type": "string" + } + } + }, + "git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.TransactionListGetResponse": { + "type": "object", + "properties": { + "transactions": { + "type": "array", + "items": { + "$ref": "#/definitions/git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.Transaction" + } + } + } + }, + "git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.TransactionOwnerInfo": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + } + } + }, + "git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.TransactionPayload": { + "type": "object", + "properties": { + "company_id": { + "type": "string" + }, + "company_name": { + "type": "string" + }, + "origin": { + "type": "string" + }, + "vacancy_id": { + "type": "string" + }, + "vacancy_name": { + "type": "string" + } + } + }, + "git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.TransactionStatus": { + "type": "string", + "enum": [ + "new", + "pending", + "approved", + "rejected" + ], + "x-enum-varnames": [ + "TransactionStatusNew", + "TransactionStatusPending", + "TransactionStatusApproved", + "TransactionStatusRejected" + ] + }, + "git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.TransactionType": { + "type": "string", + "enum": [ + "deposit", + "withdrawal" + ], + "x-enum-varnames": [ + "TransactionTypeDeposit", + "TransactionTypeWithdrawal" + ] + }, + "git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.UserCredentials": { + "type": "object", + "properties": { + "email": { + "type": "string" + }, + "first_name": { + "type": "string" + }, + "last_name": { + "type": "string" + }, + "middle_name": { + "type": "string" + }, + "password": { + "type": "string" + }, + "permissions": { + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "phone": { + "type": "string" + }, + "user_type": { + "type": "integer" + } + } + }, + "git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.Vacancy": { + "type": "object", + "properties": { + "address": { + "type": "string" + }, + "agent_reward": { + "type": "integer" + }, + "company": { + "$ref": "#/definitions/git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.VacancyCompanyInfo" + }, + "created_at": { + "type": "string" + }, + "current_candidates": { + "type": "integer" + }, + "extra_fields": { + "type": "string" + }, + "extra_info": { + "type": "string" + }, + "id": { + "type": "string" + }, + "is_archived": { + "type": "boolean" + }, + "moderation": { + "$ref": "#/definitions/git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.VacancyModeration" + }, + "name": { + "type": "string" + }, + "region": { + "type": "string" + }, + "required_candidates": { + "type": "integer" + }, + "requirements": { + "type": "string" + }, + "responsibilities": { + "type": "string" + }, + "salary_bottom": { + "type": "integer" + }, + "salary_top": { + "type": "integer" + }, + "target_action": { + "$ref": "#/definitions/git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.VacancyTargetAction" + }, + "work_format": { + "type": "string" + } + } + }, + "git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.VacancyCompanyInfo": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "logo_link": { + "type": "string" + }, + "name": { + "type": "string" + } + } + }, + "git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.VacancyCreateRequest": { + "type": "object", + "properties": { + "address": { + "type": "string" + }, + "agent_reward": { + "type": "integer" + }, + "company_id": { + "type": "string" + }, + "current_candidates": { + "type": "integer" + }, + "extra_fields": { + "type": "string" + }, + "extra_info": { + "type": "string" + }, + "name": { + "type": "string" + }, + "region": { + "type": "string" + }, + "required_candidates": { + "type": "integer" + }, + "requirements": { + "type": "string" + }, + "responsibilities": { + "type": "string" + }, + "salary_bottom": { + "type": "integer" + }, + "salary_top": { + "type": "integer" + }, + "target_action": { + "$ref": "#/definitions/git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.VacancyTargetAction" + }, + "work_format": { + "type": "string" + } + } + }, + "git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.VacancyCreateResponse": { + "type": "object", + "properties": { + "id": { + "type": "string" + } + } + }, + "git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.VacancyInfo": { + "type": "object", + "properties": { + "id": { + "type": "string" + } + } + }, + "git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.VacancyListGetResponse": { + "type": "object", + "properties": { + "vacancies": { + "type": "array", + "items": { + "$ref": "#/definitions/git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.Vacancy" + } + } + } + }, + "git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.VacancyModeration": { + "type": "object", + "properties": { + "description_history": { + "type": "array", + "items": { + "$ref": "#/definitions/git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.VacancyModerationDescription" + } + }, + "status": { + "$ref": "#/definitions/git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.VacancyStatus" + } + } + }, + "git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.VacancyModerationDescription": { + "type": "object", + "properties": { + "created_at": { + "type": "string" + }, + "description": { + "type": "string" + } + } + }, + "git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.VacancyStatus": { + "type": "string", + "enum": [ + "unspecified", + "new", + "pending", + "approved", + "rejected" + ], + "x-enum-varnames": [ + "VacUnspecified", + "VacNew", + "VacPending", + "VacApproved", + "VacRejected" + ] + }, + "git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.VacancyTargetAction": { + "type": "object", + "properties": { + "action": { + "type": "string" + }, + "duration": { + "type": "integer" + } + } + }, + "git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.VacancyTargetActionForUpdate": { + "type": "object", + "properties": { + "action": { + "type": "string" + }, + "duration": { + "type": "integer" + } + } + }, + "git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.VacancyUpdateRequest": { + "type": "object", + "properties": { + "address": { + "type": "string" + }, + "agent_reward": { + "type": "integer" + }, + "extra_fields": { + "type": "string" + }, + "extra_info": { + "type": "string" + }, + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "region": { + "type": "string" + }, + "required_candidates": { + "type": "integer" + }, + "requirements": { + "type": "string" + }, + "responsibilities": { + "type": "string" + }, + "salary_bottom": { + "type": "integer" + }, + "salary_top": { + "type": "integer" + }, + "target_action": { + "$ref": "#/definitions/git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.VacancyTargetActionForUpdate" + }, + "work_format": { + "type": "string" + } + } + }, + "git-molva_ru_Molva_molva-backend_services_api_gateway_internal_types.Employee": { + "type": "object", + "properties": { + "email": { + "type": "string" + }, + "first_name": { + "type": "string" + }, + "last_name": { + "type": "string" + }, + "middle_name": { + "type": "string" + }, + "permissions": { + "description": "Phone string ` + "`" + `json:\"phone\"` + "`" + ` // не уверен, что это нужно", + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/git-molva_ru_Molva_molva-backend_services_api_gateway_internal_constants.PermissionValue" + } + }, + "uid": { + "type": "string" + } + } + }, + "git-molva_ru_Molva_molva-backend_services_api_gateway_internal_types.PersonalLinkResponse": { + "type": "object", + "properties": { + "link": { + "type": "string" + } + } + } + }, + "securityDefinitions": { + "BearerAuth": { + "description": "Type \"Bearer\" followed by a space and JWT token.", + "type": "apiKey", + "name": "Authorization", + "in": "header" + } + } +}` + +// SwaggerInfo holds exported Swagger Info so clients can modify it +var SwaggerInfo = &swag.Spec{ + Version: "1.0", + Host: "dev-molva.ru", + BasePath: "/", + Schemes: []string{"http", "https"}, + Title: "Molva API Gateway", + Description: "API Gateway для системы Molva - платформы для управления вакансиями и агентами", + InfoInstanceName: "swagger", + SwaggerTemplate: docTemplate, + LeftDelim: "{{", + RightDelim: "}}", +} + +func init() { + swag.Register(SwaggerInfo.InstanceName(), SwaggerInfo) +} diff --git a/internal/http/swagger/docs/swagger.json b/internal/http/swagger/docs/swagger.json new file mode 100644 index 0000000..566230e --- /dev/null +++ b/internal/http/swagger/docs/swagger.json @@ -0,0 +1,5486 @@ +{ + "schemes": [ + "http", + "https" + ], + "swagger": "2.0", + "info": { + "description": "API Gateway для системы Molva - платформы для управления вакансиями и агентами", + "title": "Molva API Gateway", + "termsOfService": "http://swagger.io/terms/", + "contact": { + "name": "API Support", + "url": "http://www.swagger.io/support", + "email": "support@swagger.io" + }, + "license": { + "name": "MIT", + "url": "https://opensource.org/licenses/MIT" + }, + "version": "1.0" + }, + "host": "dev-molva.ru", + "basePath": "/", + "paths": { + "/api/v1/agents/{agent_id}/balance": { + "get": { + "security": [ + { + "BearerAuth": [] + } + ], + "description": "Получение текущего баланса агента", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "agents" + ], + "summary": "Получить баланс агента", + "parameters": [ + { + "type": "string", + "description": "ID агента", + "name": "agent_id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "Баланс агента", + "schema": { + "$ref": "#/definitions/git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.BalanceGetResponse" + } + }, + "400": { + "description": "Неверные параметры запроса", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "500": { + "description": "Внутренняя ошибка сервера", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + } + } + }, + "/api/v1/agents/{agent_id}/bank_accounts": { + "get": { + "security": [ + { + "BearerAuth": [] + } + ], + "description": "Получение списка банковских счетов агента", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "agents" + ], + "summary": "Получить список банковских счетов агента", + "parameters": [ + { + "type": "string", + "description": "ID агента", + "name": "agent_id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "Список банковских счетов", + "schema": { + "$ref": "#/definitions/git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.BankAccountListGetResponse" + } + }, + "400": { + "description": "Неверные параметры запроса", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "500": { + "description": "Внутренняя ошибка сервера", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + } + }, + "post": { + "security": [ + { + "BearerAuth": [] + } + ], + "description": "Создание нового банковского счета для агента", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "agents" + ], + "summary": "Создать банковский счет агента", + "parameters": [ + { + "type": "string", + "description": "ID агента", + "name": "agent_id", + "in": "path", + "required": true + }, + { + "description": "Данные банковского счета", + "name": "request", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.BankAccountCreateRequest" + } + } + ], + "responses": { + "201": { + "description": "Банковский счет создан", + "schema": { + "$ref": "#/definitions/git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.BankAccountCreateResponse" + } + }, + "400": { + "description": "Неверные данные запроса", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "500": { + "description": "Внутренняя ошибка сервера", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + } + } + }, + "/api/v1/agents/{agent_id}/bank_accounts/{bank_account_id}": { + "put": { + "security": [ + { + "BearerAuth": [] + } + ], + "description": "Обновление информации о банковском счете агента", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "agents" + ], + "summary": "Обновить банковский счет агента", + "parameters": [ + { + "type": "string", + "description": "ID агента", + "name": "agent_id", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "ID банковского счета", + "name": "bank_account_id", + "in": "path", + "required": true + }, + { + "description": "Данные для обновления", + "name": "request", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.BankAccountUpdateRequest" + } + } + ], + "responses": { + "200": { + "description": "Банковский счет обновлен", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "400": { + "description": "Неверные данные запроса", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "500": { + "description": "Внутренняя ошибка сервера", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + } + }, + "delete": { + "security": [ + { + "BearerAuth": [] + } + ], + "description": "Удаление банковского счета агента", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "agents" + ], + "summary": "Удалить банковский счет агента", + "parameters": [ + { + "type": "string", + "description": "ID агента", + "name": "agent_id", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "ID банковского счета", + "name": "bank_account_id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "Банковский счет удален", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "400": { + "description": "Неверные параметры запроса", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "500": { + "description": "Внутренняя ошибка сервера", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + } + } + }, + "/api/v1/agents/{agent_id}/companies": { + "get": { + "security": [ + { + "BearerAuth": [] + } + ], + "description": "Получение списка всех компаний, принадлежащих агенту", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "agents" + ], + "summary": "Получить список компаний агента", + "parameters": [ + { + "type": "string", + "description": "ID агента", + "name": "agent_id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "Список компаний", + "schema": { + "$ref": "#/definitions/git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.CompanyListGetResponse" + } + }, + "400": { + "description": "Неверные данные запроса", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "401": { + "description": "Неавторизованный доступ", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "500": { + "description": "Внутренняя ошибка сервера", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + } + } + }, + "/api/v1/agents/{agent_id}/company": { + "post": { + "security": [ + { + "BearerAuth": [] + } + ], + "description": "Создание новой компании для агента", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "agents" + ], + "summary": "Создать компанию", + "parameters": [ + { + "type": "string", + "description": "ID агента", + "name": "agent_id", + "in": "path", + "required": true + }, + { + "description": "Данные для создания компании", + "name": "request", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.CompanyCreateRequest" + } + } + ], + "responses": { + "201": { + "description": "Компания создана", + "schema": { + "$ref": "#/definitions/git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.CompanyCreateResponse" + } + }, + "400": { + "description": "Неверные данные запроса", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "401": { + "description": "Неавторизованный доступ", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "500": { + "description": "Внутренняя ошибка сервера", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + } + } + }, + "/api/v1/agents/{agent_id}/company/{company_id}": { + "get": { + "security": [ + { + "BearerAuth": [] + } + ], + "description": "Получение детальной информации о компании агента", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "agents" + ], + "summary": "Получить компанию по ID", + "parameters": [ + { + "type": "string", + "description": "ID агента", + "name": "agent_id", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "ID компании", + "name": "company_id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "Информация о компании", + "schema": { + "$ref": "#/definitions/git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.CompanyByIdGetResponse" + } + }, + "400": { + "description": "Неверные данные запроса", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "401": { + "description": "Неавторизованный доступ", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "404": { + "description": "Компания не найдена", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "500": { + "description": "Внутренняя ошибка сервера", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + } + } + }, + "/api/v1/agents/{agent_id}/profile": { + "get": { + "security": [ + { + "BearerAuth": [] + } + ], + "description": "Получение профиля агента по ID", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "agents" + ], + "summary": "Получить профиль агента", + "parameters": [ + { + "type": "string", + "description": "ID агента", + "name": "agent_id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "Профиль агента", + "schema": { + "$ref": "#/definitions/git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.ProfileGetResponse" + } + }, + "400": { + "description": "Неверные параметры запроса", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "500": { + "description": "Внутренняя ошибка сервера", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + } + }, + "put": { + "security": [ + { + "BearerAuth": [] + } + ], + "description": "Обновление профиля агента", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "agents" + ], + "summary": "Обновить профиль агента", + "parameters": [ + { + "type": "string", + "description": "ID агента", + "name": "agent_id", + "in": "path", + "required": true + }, + { + "description": "Данные для обновления профиля", + "name": "request", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.ProfileUpdateRequest" + } + } + ], + "responses": { + "200": { + "description": "Профиль обновлен", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "400": { + "description": "Неверные данные запроса", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "500": { + "description": "Внутренняя ошибка сервера", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + } + } + }, + "/api/v1/agents/{agent_id}/submissions": { + "get": { + "security": [ + { + "BearerAuth": [] + } + ], + "description": "Получение списка заявок агента с возможностью фильтрации", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "agents" + ], + "summary": "Получить список заявок агента", + "parameters": [ + { + "type": "string", + "description": "ID агента", + "name": "agent_id", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "ID вакансии", + "name": "vacancy_id", + "in": "query" + }, + { + "type": "string", + "description": "Статус заявки", + "name": "status", + "in": "query" + }, + { + "type": "integer", + "description": "Номер страницы", + "name": "page", + "in": "query" + }, + { + "type": "integer", + "description": "Размер страницы", + "name": "page_size", + "in": "query" + } + ], + "responses": { + "200": { + "description": "Список заявок", + "schema": { + "$ref": "#/definitions/git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.SubmissionListGetResponse" + } + }, + "400": { + "description": "Неверные данные запроса", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "401": { + "description": "Неавторизованный доступ", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "500": { + "description": "Внутренняя ошибка сервера", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + } + } + }, + "/api/v1/agents/{agent_id}/submissions/{submission_id}": { + "delete": { + "security": [ + { + "BearerAuth": [] + } + ], + "description": "Удаление заявки агента", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "agents" + ], + "summary": "Удалить заявку агента", + "parameters": [ + { + "type": "string", + "description": "ID агента", + "name": "agent_id", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "ID заявки", + "name": "submission_id", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "description": "Заявка удалена" + }, + "400": { + "description": "Неверные данные запроса", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "401": { + "description": "Неавторизованный доступ", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "404": { + "description": "Заявка не найдена", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "500": { + "description": "Внутренняя ошибка сервера", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + } + } + }, + "/api/v1/agents/{agent_id}/submissions/{submission_id}/cv": { + "get": { + "security": [ + { + "BearerAuth": [] + } + ], + "description": "Получение CV файла заявки", + "consumes": [ + "application/json" + ], + "produces": [ + "application/octet-stream" + ], + "tags": [ + "agents" + ], + "summary": "Получить CV заявки", + "parameters": [ + { + "type": "string", + "description": "ID агента", + "name": "agent_id", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "ID заявки", + "name": "submission_id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "CV файл", + "schema": { + "type": "file" + } + }, + "400": { + "description": "Неверные данные запроса", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "401": { + "description": "Неавторизованный доступ", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "404": { + "description": "CV не найден", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "500": { + "description": "Внутренняя ошибка сервера", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + } + } + }, + "/api/v1/agents/{agent_id}/transactions": { + "get": { + "security": [ + { + "BearerAuth": [] + } + ], + "description": "Получение списка транзакций агента с возможностью фильтрации", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "agents" + ], + "summary": "Получить список транзакций агента", + "parameters": [ + { + "type": "string", + "description": "ID агента", + "name": "agent_id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "Список транзакций", + "schema": { + "$ref": "#/definitions/git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.TransactionListGetResponse" + } + }, + "400": { + "description": "Неверные параметры запроса", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "500": { + "description": "Внутренняя ошибка сервера", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + } + }, + "post": { + "security": [ + { + "BearerAuth": [] + } + ], + "description": "Создание новой транзакции для агента", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "agents" + ], + "summary": "Создать транзакцию агента", + "parameters": [ + { + "type": "string", + "description": "ID агента", + "name": "agent_id", + "in": "path", + "required": true + }, + { + "description": "Данные транзакции", + "name": "request", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.TransactionCreateRequest" + } + } + ], + "responses": { + "201": { + "description": "Транзакция создана", + "schema": { + "$ref": "#/definitions/git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.TransactionCreateResponse" + } + }, + "400": { + "description": "Неверные данные запроса", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "500": { + "description": "Внутренняя ошибка сервера", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + } + } + }, + "/api/v1/agents/{agent_id}/vacancies": { + "get": { + "security": [ + { + "BearerAuth": [] + } + ], + "description": "Получение списка вакансий с возможностью фильтрации", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "agents" + ], + "summary": "Получить список вакансий для агента", + "parameters": [ + { + "type": "string", + "description": "ID агента", + "name": "agent_id", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "ID дистрибьютора", + "name": "distributor_id", + "in": "query" + }, + { + "type": "string", + "description": "ID компании", + "name": "company_id", + "in": "query" + }, + { + "type": "string", + "description": "Регион", + "name": "region", + "in": "query" + }, + { + "type": "integer", + "description": "Минимальная зарплата", + "name": "salary_bottom", + "in": "query" + }, + { + "type": "integer", + "description": "Максимальная зарплата", + "name": "salary_top", + "in": "query" + }, + { + "type": "boolean", + "description": "Архивные вакансии", + "name": "is_archived", + "in": "query" + }, + { + "type": "string", + "description": "Статус вакансии", + "name": "status", + "in": "query" + }, + { + "type": "integer", + "description": "Номер страницы", + "name": "page", + "in": "query" + }, + { + "type": "integer", + "description": "Размер страницы", + "name": "page_size", + "in": "query" + } + ], + "responses": { + "200": { + "description": "Список вакансий", + "schema": { + "$ref": "#/definitions/git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.VacancyListGetResponse" + } + }, + "400": { + "description": "Неверные данные запроса", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "401": { + "description": "Неавторизованный доступ", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "500": { + "description": "Внутренняя ошибка сервера", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + } + } + }, + "/api/v1/agents/{agent_id}/vacancies/{vacancy_id}": { + "get": { + "security": [ + { + "BearerAuth": [] + } + ], + "description": "Получение персональной ссылки агента для вакансии", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "agents" + ], + "summary": "Получить персональную ссылку", + "parameters": [ + { + "type": "string", + "description": "ID агента", + "name": "agent_id", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "ID вакансии", + "name": "vacancy_id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "Персональная ссылка", + "schema": { + "$ref": "#/definitions/git-molva_ru_Molva_molva-backend_services_api_gateway_internal_types.PersonalLinkResponse" + } + }, + "400": { + "description": "Неверные данные запроса", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "401": { + "description": "Неавторизованный доступ", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "500": { + "description": "Внутренняя ошибка сервера", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + } + } + }, + "/api/v1/anketa": { + "get": { + "description": "Получение HTML формы анкеты для клиента", + "consumes": [ + "application/json" + ], + "produces": [ + "text/html" + ], + "tags": [ + "clients" + ], + "summary": "Получить анкету", + "parameters": [ + { + "type": "string", + "description": "Зашифрованная ссылка с параметрами", + "name": "link", + "in": "query", + "required": true + } + ], + "responses": { + "200": { + "description": "HTML форма анкеты", + "schema": { + "type": "string" + } + }, + "400": { + "description": "Неверные данные запроса", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "404": { + "description": "Вакансия не найдена", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "500": { + "description": "Внутренняя ошибка сервера", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + } + }, + "post": { + "description": "Отправка заполненной анкеты клиента", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "clients" + ], + "summary": "Отправить анкету", + "parameters": [ + { + "description": "Данные анкеты", + "name": "request", + "in": "body", + "required": true, + "schema": { + "type": "object", + "additionalProperties": true + } + } + ], + "responses": { + "201": { + "description": "Анкета отправлена", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "400": { + "description": "Неверные данные запроса", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "500": { + "description": "Внутренняя ошибка сервера", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + } + } + }, + "/api/v1/companies/{company_id}/employees": { + "get": { + "security": [ + { + "BearerAuth": [] + } + ], + "description": "Получение списка сотрудников компании", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "employees" + ], + "summary": "Получить список сотрудников компании", + "parameters": [ + { + "type": "string", + "description": "ID компании", + "name": "company_id", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "ID пользователя", + "name": "uid", + "in": "query", + "required": true + } + ], + "responses": { + "200": { + "description": "Список сотрудников", + "schema": { + "$ref": "#/definitions/git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.EmployeeResponse" + } + }, + "400": { + "description": "Неверные данные запроса", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "401": { + "description": "Неавторизованный доступ", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "500": { + "description": "Внутренняя ошибка сервера", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + } + } + }, + "/api/v1/confirm_email": { + "get": { + "description": "HTML страница для подтверждения email адреса пользователя", + "consumes": [ + "text/html" + ], + "produces": [ + "text/html" + ], + "tags": [ + "auth" + ], + "summary": "Страница подтверждения email", + "parameters": [ + { + "type": "string", + "description": "ID пользователя", + "name": "uid", + "in": "query", + "required": true + }, + { + "type": "string", + "description": "Токен подтверждения", + "name": "token", + "in": "query", + "required": true + } + ], + "responses": { + "200": { + "description": "HTML страница подтверждения", + "schema": { + "type": "string" + } + }, + "400": { + "description": "Неверные параметры запроса", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "500": { + "description": "Внутренняя ошибка сервера", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + } + } + }, + "/api/v1/distributor/{distributor_id}/balance": { + "get": { + "security": [ + { + "BearerAuth": [] + } + ], + "description": "Получение текущего баланса дистрибьютора", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "distributors" + ], + "summary": "Получить баланс дистрибьютора", + "parameters": [ + { + "type": "string", + "description": "ID дистрибьютора", + "name": "distributor_id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "Баланс дистрибьютора", + "schema": { + "$ref": "#/definitions/git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.BalanceGetResponse" + } + }, + "400": { + "description": "Неверные параметры запроса", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "500": { + "description": "Внутренняя ошибка сервера", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + } + } + }, + "/api/v1/distributor/{distributor_id}/bank_accounts": { + "get": { + "security": [ + { + "BearerAuth": [] + } + ], + "description": "Получение списка банковских счетов дистрибьютора", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "distributors" + ], + "summary": "Получить список банковских счетов дистрибьютора", + "parameters": [ + { + "type": "string", + "description": "ID дистрибьютора", + "name": "distributor_id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "Список банковских счетов", + "schema": { + "$ref": "#/definitions/git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.BankAccountListGetResponse" + } + }, + "400": { + "description": "Неверные параметры запроса", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "500": { + "description": "Внутренняя ошибка сервера", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + } + } + }, + "/api/v1/distributor/{distributor_id}/bank_accounts/{bank_account_id}": { + "put": { + "security": [ + { + "BearerAuth": [] + } + ], + "description": "Обновление информации о банковском счете дистрибьютора", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "distributors" + ], + "summary": "Обновить банковский счет дистрибьютора", + "parameters": [ + { + "type": "string", + "description": "ID дистрибьютора", + "name": "distributor_id", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "ID банковского счета", + "name": "bank_account_id", + "in": "path", + "required": true + }, + { + "description": "Данные для обновления", + "name": "request", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.BankAccountUpdateRequest" + } + } + ], + "responses": { + "200": { + "description": "Банковский счет обновлен", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "400": { + "description": "Неверные данные запроса", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "500": { + "description": "Внутренняя ошибка сервера", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + } + }, + "delete": { + "security": [ + { + "BearerAuth": [] + } + ], + "description": "Удаление банковского счета дистрибьютора", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "distributors" + ], + "summary": "Удалить банковский счет дистрибьютора", + "parameters": [ + { + "type": "string", + "description": "ID дистрибьютора", + "name": "distributor_id", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "ID банковского счета", + "name": "bank_account_id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "Банковский счет удален", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "400": { + "description": "Неверные параметры запроса", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "500": { + "description": "Внутренняя ошибка сервера", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + } + } + }, + "/api/v1/distributor/{distributor_id}/companies": { + "get": { + "security": [ + { + "BearerAuth": [] + } + ], + "description": "Получение списка всех компаний, принадлежащих дистрибьютору", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "distributors" + ], + "summary": "Получить список компаний дистрибьютора", + "parameters": [ + { + "type": "string", + "description": "ID дистрибьютора", + "name": "distributor_id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "Список компаний", + "schema": { + "$ref": "#/definitions/git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.CompanyListGetResponse" + } + }, + "400": { + "description": "Неверные данные запроса", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "401": { + "description": "Неавторизованный доступ", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "500": { + "description": "Внутренняя ошибка сервера", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + } + } + }, + "/api/v1/distributor/{distributor_id}/company": { + "post": { + "security": [ + { + "BearerAuth": [] + } + ], + "description": "Создание новой компании для дистрибьютора", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "distributors" + ], + "summary": "Создать компанию дистрибьютора", + "parameters": [ + { + "type": "string", + "description": "ID дистрибьютора", + "name": "distributor_id", + "in": "path", + "required": true + }, + { + "description": "Данные для создания компании", + "name": "request", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.CompanyCreateRequest" + } + } + ], + "responses": { + "201": { + "description": "Компания создана", + "schema": { + "$ref": "#/definitions/git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.CompanyCreateResponse" + } + }, + "400": { + "description": "Неверные данные запроса", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "401": { + "description": "Неавторизованный доступ", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "500": { + "description": "Внутренняя ошибка сервера", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + } + } + }, + "/api/v1/distributor/{distributor_id}/company/{company_id}": { + "get": { + "security": [ + { + "BearerAuth": [] + } + ], + "description": "Получение детальной информации о компании дистрибьютора", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "distributors" + ], + "summary": "Получить компанию дистрибьютора по ID", + "parameters": [ + { + "type": "string", + "description": "ID дистрибьютора", + "name": "distributor_id", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "ID компании", + "name": "company_id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "Информация о компании", + "schema": { + "$ref": "#/definitions/git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.CompanyByIdGetResponse" + } + }, + "400": { + "description": "Неверные данные запроса", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "401": { + "description": "Неавторизованный доступ", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "404": { + "description": "Компания не найдена", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "500": { + "description": "Внутренняя ошибка сервера", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + } + }, + "post": { + "security": [ + { + "BearerAuth": [] + } + ], + "description": "Добавление нового участника в компанию дистрибьютора", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "distributors" + ], + "summary": "Добавить участника в компанию", + "parameters": [ + { + "type": "string", + "description": "ID дистрибьютора", + "name": "distributor_id", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "ID компании", + "name": "company_id", + "in": "path", + "required": true + }, + { + "description": "Данные участника", + "name": "request", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.AddDistributorCompanyMemberRequest" + } + } + ], + "responses": { + "201": { + "description": "Участник добавлен" + }, + "400": { + "description": "Неверные данные запроса", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "401": { + "description": "Неавторизованный доступ", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "404": { + "description": "Компания не найдена", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "500": { + "description": "Внутренняя ошибка сервера", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + } + }, + "patch": { + "security": [ + { + "BearerAuth": [] + } + ], + "description": "Обновление информации о компании дистрибьютора", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "distributors" + ], + "summary": "Обновить компанию дистрибьютора", + "parameters": [ + { + "type": "string", + "description": "ID дистрибьютора", + "name": "distributor_id", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "ID компании", + "name": "company_id", + "in": "path", + "required": true + }, + { + "description": "Данные для обновления", + "name": "request", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.CompanyUpdateRequest" + } + } + ], + "responses": { + "204": { + "description": "Компания обновлена" + }, + "400": { + "description": "Неверные данные запроса", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "401": { + "description": "Неавторизованный доступ", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "404": { + "description": "Компания не найдена", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "500": { + "description": "Внутренняя ошибка сервера", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + } + } + }, + "/api/v1/distributor/{distributor_id}/company/{company_id}/balance": { + "get": { + "security": [ + { + "BearerAuth": [] + } + ], + "description": "Получение баланса конкретной компании дистрибьютора", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "distributors" + ], + "summary": "Получить баланс компании дистрибьютора", + "parameters": [ + { + "type": "string", + "description": "ID дистрибьютора", + "name": "distributor_id", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "ID компании", + "name": "company_id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "Баланс компании", + "schema": { + "$ref": "#/definitions/git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.BalanceGetResponse" + } + }, + "400": { + "description": "Неверные параметры запроса", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "500": { + "description": "Внутренняя ошибка сервера", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + } + } + }, + "/api/v1/distributor/{distributor_id}/company/{company_id}/bank_accounts": { + "get": { + "security": [ + { + "BearerAuth": [] + } + ], + "description": "Получение списка банковских счетов конкретной компании дистрибьютора", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "distributors" + ], + "summary": "Получить список банковских счетов компании дистрибьютора", + "parameters": [ + { + "type": "string", + "description": "ID дистрибьютора", + "name": "distributor_id", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "ID компании", + "name": "company_id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "Список банковских счетов компании", + "schema": { + "$ref": "#/definitions/git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.BankAccountListGetResponse" + } + }, + "400": { + "description": "Неверные параметры запроса", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "500": { + "description": "Внутренняя ошибка сервера", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + } + }, + "post": { + "security": [ + { + "BearerAuth": [] + } + ], + "description": "Создание нового банковского счета для компании дистрибьютора", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "distributors" + ], + "summary": "Создать банковский счет компании дистрибьютора", + "parameters": [ + { + "type": "string", + "description": "ID дистрибьютора", + "name": "distributor_id", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "ID компании", + "name": "company_id", + "in": "path", + "required": true + }, + { + "description": "Данные банковского счета", + "name": "request", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.BankAccountCreateRequest" + } + } + ], + "responses": { + "201": { + "description": "Банковский счет создан", + "schema": { + "$ref": "#/definitions/git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.BankAccountCreateResponse" + } + }, + "400": { + "description": "Неверные данные запроса", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "500": { + "description": "Внутренняя ошибка сервера", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + } + } + }, + "/api/v1/distributor/{distributor_id}/company/{company_id}/logo": { + "get": { + "security": [ + { + "BearerAuth": [] + } + ], + "description": "Получение логотипа компании дистрибьютора", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "distributors" + ], + "summary": "Получить логотип компании", + "parameters": [ + { + "type": "string", + "description": "ID дистрибьютора", + "name": "distributor_id", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "ID компании", + "name": "company_id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "Логотип компании", + "schema": { + "type": "file" + } + }, + "400": { + "description": "Неверные параметры запроса", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "404": { + "description": "Логотип не найден", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "500": { + "description": "Внутренняя ошибка сервера", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + } + }, + "put": { + "security": [ + { + "BearerAuth": [] + } + ], + "description": "Обновление логотипа компании дистрибьютора", + "consumes": [ + "multipart/form-data" + ], + "produces": [ + "application/json" + ], + "tags": [ + "distributors" + ], + "summary": "Обновить логотип компании", + "parameters": [ + { + "type": "string", + "description": "ID дистрибьютора", + "name": "distributor_id", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "ID компании", + "name": "company_id", + "in": "path", + "required": true + }, + { + "type": "file", + "description": "Новый файл логотипа", + "name": "logo", + "in": "formData", + "required": true + } + ], + "responses": { + "200": { + "description": "Логотип обновлен", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "400": { + "description": "Неверные данные запроса", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "500": { + "description": "Внутренняя ошибка сервера", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + } + }, + "post": { + "security": [ + { + "BearerAuth": [] + } + ], + "description": "Загрузка нового логотипа для компании дистрибьютора", + "consumes": [ + "multipart/form-data" + ], + "produces": [ + "application/json" + ], + "tags": [ + "distributors" + ], + "summary": "Создать логотип компании", + "parameters": [ + { + "type": "string", + "description": "ID дистрибьютора", + "name": "distributor_id", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "ID компании", + "name": "company_id", + "in": "path", + "required": true + }, + { + "type": "file", + "description": "Файл логотипа", + "name": "logo", + "in": "formData", + "required": true + } + ], + "responses": { + "201": { + "description": "Логотип загружен", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "400": { + "description": "Неверные данные запроса", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "500": { + "description": "Внутренняя ошибка сервера", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + } + }, + "delete": { + "security": [ + { + "BearerAuth": [] + } + ], + "description": "Удаление логотипа компании дистрибьютора", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "distributors" + ], + "summary": "Удалить логотип компании", + "parameters": [ + { + "type": "string", + "description": "ID дистрибьютора", + "name": "distributor_id", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "ID компании", + "name": "company_id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "Логотип удален", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "400": { + "description": "Неверные параметры запроса", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "500": { + "description": "Внутренняя ошибка сервера", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + } + } + }, + "/api/v1/distributor/{distributor_id}/company/{company_id}/transactions": { + "get": { + "security": [ + { + "BearerAuth": [] + } + ], + "description": "Получение списка транзакций конкретной компании дистрибьютора", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "distributors" + ], + "summary": "Получить список транзакций компании дистрибьютора", + "parameters": [ + { + "type": "string", + "description": "ID дистрибьютора", + "name": "distributor_id", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "ID компании", + "name": "company_id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "Список транзакций компании", + "schema": { + "$ref": "#/definitions/git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.TransactionListGetResponse" + } + }, + "400": { + "description": "Неверные параметры запроса", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "500": { + "description": "Внутренняя ошибка сервера", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + } + } + }, + "/api/v1/distributor/{distributor_id}/profile": { + "get": { + "security": [ + { + "BearerAuth": [] + } + ], + "description": "Получение профиля дистрибьютора по ID", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "distributors" + ], + "summary": "Получить профиль дистрибьютора", + "parameters": [ + { + "type": "string", + "description": "ID дистрибьютора", + "name": "distributor_id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "Профиль дистрибьютора", + "schema": { + "$ref": "#/definitions/git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.ProfileGetResponse" + } + }, + "400": { + "description": "Неверные параметры запроса", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "500": { + "description": "Внутренняя ошибка сервера", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + } + }, + "put": { + "security": [ + { + "BearerAuth": [] + } + ], + "description": "Обновление профиля дистрибьютора", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "distributors" + ], + "summary": "Обновить профиль дистрибьютора", + "parameters": [ + { + "type": "string", + "description": "ID дистрибьютора", + "name": "distributor_id", + "in": "path", + "required": true + }, + { + "description": "Данные для обновления профиля", + "name": "request", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.ProfileUpdateRequest" + } + } + ], + "responses": { + "200": { + "description": "Профиль обновлен", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "400": { + "description": "Неверные данные запроса", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "500": { + "description": "Внутренняя ошибка сервера", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + } + } + }, + "/api/v1/distributor/{distributor_id}/transactions": { + "get": { + "security": [ + { + "BearerAuth": [] + } + ], + "description": "Получение списка транзакций дистрибьютора с возможностью фильтрации", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "distributors" + ], + "summary": "Получить список транзакций дистрибьютора", + "parameters": [ + { + "type": "string", + "description": "ID дистрибьютора", + "name": "distributor_id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "Список транзакций", + "schema": { + "$ref": "#/definitions/git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.TransactionListGetResponse" + } + }, + "400": { + "description": "Неверные параметры запроса", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "500": { + "description": "Внутренняя ошибка сервера", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + } + }, + "post": { + "security": [ + { + "BearerAuth": [] + } + ], + "description": "Создание новой транзакции для дистрибьютора", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "distributors" + ], + "summary": "Создать транзакцию дистрибьютора", + "parameters": [ + { + "type": "string", + "description": "ID дистрибьютора", + "name": "distributor_id", + "in": "path", + "required": true + }, + { + "description": "Данные транзакции", + "name": "request", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.TransactionCreateRequest" + } + } + ], + "responses": { + "201": { + "description": "Транзакция создана", + "schema": { + "$ref": "#/definitions/git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.TransactionCreateResponse" + } + }, + "400": { + "description": "Неверные данные запроса", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "500": { + "description": "Внутренняя ошибка сервера", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + } + } + }, + "/api/v1/distributor/{distributor_id}/vacancies": { + "get": { + "security": [ + { + "BearerAuth": [] + } + ], + "description": "Получение списка вакансий дистрибьютора с возможностью фильтрации", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "distributors" + ], + "summary": "Получить список вакансий дистрибьютора", + "parameters": [ + { + "type": "string", + "description": "ID дистрибьютора", + "name": "distributor_id", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "ID компании", + "name": "company_id", + "in": "query" + }, + { + "type": "string", + "description": "Регион", + "name": "region", + "in": "query" + }, + { + "type": "integer", + "description": "Минимальная зарплата", + "name": "salary_bottom", + "in": "query" + }, + { + "type": "integer", + "description": "Максимальная зарплата", + "name": "salary_top", + "in": "query" + }, + { + "type": "boolean", + "description": "Архивные вакансии", + "name": "is_archived", + "in": "query" + }, + { + "type": "string", + "description": "Статус вакансии", + "name": "status", + "in": "query" + }, + { + "type": "integer", + "description": "Номер страницы", + "name": "page", + "in": "query" + }, + { + "type": "integer", + "description": "Размер страницы", + "name": "page_size", + "in": "query" + } + ], + "responses": { + "200": { + "description": "Список вакансий", + "schema": { + "$ref": "#/definitions/git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.VacancyListGetResponse" + } + }, + "400": { + "description": "Неверные данные запроса", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "401": { + "description": "Неавторизованный доступ", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "500": { + "description": "Внутренняя ошибка сервера", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + } + }, + "post": { + "security": [ + { + "BearerAuth": [] + } + ], + "description": "Создание новой вакансии дистрибьютором", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "distributors" + ], + "summary": "Создать вакансию", + "parameters": [ + { + "type": "string", + "description": "ID дистрибьютора", + "name": "distributor_id", + "in": "path", + "required": true + }, + { + "description": "Данные для создания вакансии", + "name": "request", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.VacancyCreateRequest" + } + } + ], + "responses": { + "201": { + "description": "Вакансия создана", + "schema": { + "$ref": "#/definitions/git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.VacancyCreateResponse" + } + }, + "400": { + "description": "Неверные данные запроса", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "401": { + "description": "Неавторизованный доступ", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "500": { + "description": "Внутренняя ошибка сервера", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + } + } + }, + "/api/v1/distributor/{distributor_id}/vacancies/{vacancy_id}": { + "delete": { + "security": [ + { + "BearerAuth": [] + } + ], + "description": "Удаление вакансии дистрибьютора", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "distributors" + ], + "summary": "Удалить вакансию", + "parameters": [ + { + "type": "string", + "description": "ID дистрибьютора", + "name": "distributor_id", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "ID вакансии", + "name": "vacancy_id", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "description": "Вакансия удалена" + }, + "400": { + "description": "Неверные данные запроса", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "401": { + "description": "Неавторизованный доступ", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "404": { + "description": "Вакансия не найдена", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "500": { + "description": "Внутренняя ошибка сервера", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + } + }, + "patch": { + "security": [ + { + "BearerAuth": [] + } + ], + "description": "Обновление информации о вакансии дистрибьютора", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "distributors" + ], + "summary": "Обновить вакансию", + "parameters": [ + { + "type": "string", + "description": "ID дистрибьютора", + "name": "distributor_id", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "ID вакансии", + "name": "vacancy_id", + "in": "path", + "required": true + }, + { + "description": "Данные для обновления", + "name": "request", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.VacancyUpdateRequest" + } + } + ], + "responses": { + "204": { + "description": "Вакансия обновлена" + }, + "400": { + "description": "Неверные данные запроса", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "401": { + "description": "Неавторизованный доступ", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "404": { + "description": "Вакансия не найдена", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "500": { + "description": "Внутренняя ошибка сервера", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + } + } + }, + "/api/v1/distributor/{distributor_id}/vacancies/{vacancy_id}/moderation": { + "post": { + "security": [ + { + "BearerAuth": [] + } + ], + "description": "Отправка вакансии дистрибьютора на модерацию", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "distributors" + ], + "summary": "Отправить вакансию на модерацию", + "parameters": [ + { + "type": "string", + "description": "ID дистрибьютора", + "name": "distributor_id", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "ID вакансии", + "name": "vacancy_id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "Вакансия отправлена на модерацию", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "400": { + "description": "Неверные параметры запроса", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "500": { + "description": "Внутренняя ошибка сервера", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + } + } + }, + "/api/v1/distributor/{distributor_id}/vacancies/{vacancy_id}/submissions": { + "get": { + "security": [ + { + "BearerAuth": [] + } + ], + "description": "Получение списка заявок дистрибьютора с возможностью фильтрации", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "distributors" + ], + "summary": "Получить список заявок дистрибьютора", + "parameters": [ + { + "type": "string", + "description": "ID дистрибьютора", + "name": "distributor_id", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "ID вакансии", + "name": "vacancy_id", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Статус заявки", + "name": "status", + "in": "query" + }, + { + "type": "integer", + "description": "Номер страницы", + "name": "page", + "in": "query" + }, + { + "type": "integer", + "description": "Размер страницы", + "name": "page_size", + "in": "query" + } + ], + "responses": { + "200": { + "description": "Список заявок", + "schema": { + "$ref": "#/definitions/git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.SubmissionListGetResponse" + } + }, + "400": { + "description": "Неверные данные запроса", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "401": { + "description": "Неавторизованный доступ", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "500": { + "description": "Внутренняя ошибка сервера", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + } + } + }, + "/api/v1/distributor/{distributor_id}/vacancies/{vacancy_id}/submissions/{submission_id}/status": { + "post": { + "security": [ + { + "BearerAuth": [] + } + ], + "description": "Обновление статуса заявки дистрибьютором", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "distributors" + ], + "summary": "Обновить статус заявки", + "parameters": [ + { + "type": "string", + "description": "ID дистрибьютора", + "name": "distributor_id", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "ID вакансии", + "name": "vacancy_id", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "ID заявки", + "name": "submission_id", + "in": "path", + "required": true + }, + { + "description": "Новый статус заявки", + "name": "request", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.SubmissionStatusUpdateRequest" + } + } + ], + "responses": { + "200": { + "description": "Статус обновлен" + }, + "400": { + "description": "Неверные данные запроса", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "401": { + "description": "Неавторизованный доступ", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "404": { + "description": "Заявка не найдена", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "500": { + "description": "Внутренняя ошибка сервера", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + } + } + }, + "/api/v1/docs/{file}": { + "get": { + "description": "Получение файла документа по имени", + "consumes": [ + "application/json" + ], + "produces": [ + "application/octet-stream" + ], + "tags": [ + "system" + ], + "summary": "Получить файл документа", + "parameters": [ + { + "type": "string", + "description": "Имя файла", + "name": "file", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "Файл документа", + "schema": { + "type": "file" + } + }, + "404": { + "description": "Файл не найден", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "500": { + "description": "Внутренняя ошибка сервера", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + } + } + }, + "/api/v1/feed/{uid}/events": { + "get": { + "security": [ + { + "BearerAuth": [] + } + ], + "description": "Получение ленты событий пользователя с возможностью фильтрации", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "feed" + ], + "summary": "Получить события пользователя", + "parameters": [ + { + "type": "string", + "description": "ID пользователя", + "name": "uid", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Тип пользователя (agent/distributor)", + "name": "user_type", + "in": "query", + "required": true + }, + { + "type": "string", + "description": "Тип события (через запятую)", + "name": "event_type", + "in": "query" + }, + { + "type": "boolean", + "description": "Показывать отмененные события", + "name": "show_cancelled", + "in": "query" + }, + { + "type": "integer", + "description": "Лимит событий", + "name": "limit", + "in": "query" + }, + { + "type": "integer", + "description": "Смещение", + "name": "offset", + "in": "query" + } + ], + "responses": { + "200": { + "description": "Список событий", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/git-molva_ru_Molva_molva-backend_services_api_gateway_internal_feed.Event" + } + } + }, + "400": { + "description": "Неверные данные запроса", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "401": { + "description": "Неавторизованный доступ", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "500": { + "description": "Внутренняя ошибка сервера", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + } + } + }, + "/api/v1/forgot_password": { + "post": { + "description": "Отправка OTP кода на email для восстановления пароля", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "auth" + ], + "summary": "Запрос восстановления пароля", + "parameters": [ + { + "description": "Данные для восстановления пароля", + "name": "request", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.ForgotPasswordRequest" + } + } + ], + "responses": { + "200": { + "description": "OTP код отправлен", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "400": { + "description": "Неверные данные запроса", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "500": { + "description": "Внутренняя ошибка сервера", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + } + } + }, + "/api/v1/healthcheck": { + "get": { + "description": "Получение информации о версии, коммите и дате сборки приложения", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "system" + ], + "summary": "Получить информацию о сборке", + "responses": { + "200": { + "description": "Информация о сборке", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + } + } + }, + "/api/v1/integration/vkusvill/callback": { + "post": { + "description": "Обработка callback запросов от интеграции с ВкусВилл", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "integration" + ], + "summary": "Callback интеграции с ВкусВилл", + "parameters": [ + { + "description": "Данные callback от ВкусВилл", + "name": "request", + "in": "body", + "required": true, + "schema": { + "type": "object", + "additionalProperties": true + } + } + ], + "responses": { + "200": { + "description": "Callback обработан", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "400": { + "description": "Неверные данные запроса", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "500": { + "description": "Внутренняя ошибка сервера", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + } + } + }, + "/api/v1/login": { + "post": { + "description": "Аутентификация пользователя по email и паролю", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "auth" + ], + "summary": "Вход пользователя", + "parameters": [ + { + "description": "Данные для входа", + "name": "request", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.LoginUserRequest" + } + } + ], + "responses": { + "200": { + "description": "Успешная аутентификация", + "schema": { + "$ref": "#/definitions/git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.LoginUserResponse" + } + }, + "400": { + "description": "Неверные данные запроса", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "401": { + "description": "Неверные учетные данные", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "500": { + "description": "Внутренняя ошибка сервера", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + } + } + }, + "/api/v1/logout": { + "post": { + "description": "Завершение сессии пользователя", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "auth" + ], + "summary": "Выход пользователя", + "parameters": [ + { + "description": "Токен для выхода", + "name": "request", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.LogoutUserRequest" + } + } + ], + "responses": { + "200": { + "description": "Успешный выход" + }, + "400": { + "description": "Неверные данные запроса", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "401": { + "description": "Неверный токен", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "500": { + "description": "Внутренняя ошибка сервера", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + } + } + }, + "/api/v1/refresh-token": { + "post": { + "description": "Получение нового access token по refresh token", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "auth" + ], + "summary": "Обновление токена доступа", + "parameters": [ + { + "description": "Refresh token", + "name": "request", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.RefreshTokenRequest" + } + } + ], + "responses": { + "200": { + "description": "Новые токены", + "schema": { + "$ref": "#/definitions/git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.RefreshTokenResponse" + } + }, + "400": { + "description": "Неверные данные запроса", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "401": { + "description": "Неверный refresh token", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "500": { + "description": "Внутренняя ошибка сервера", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + } + } + }, + "/api/v1/register": { + "post": { + "description": "Создание нового пользователя в системе", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "auth" + ], + "summary": "Регистрация пользователя", + "parameters": [ + { + "description": "Данные для регистрации", + "name": "request", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.UserCredentials" + } + } + ], + "responses": { + "201": { + "description": "Пользователь успешно создан", + "schema": { + "$ref": "#/definitions/git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.RegisterResponse" + } + }, + "400": { + "description": "Неверные данные запроса", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "409": { + "description": "Пользователь уже существует", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "500": { + "description": "Внутренняя ошибка сервера", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + } + } + }, + "/api/v1/reset_password": { + "put": { + "description": "Установка нового пароля после валидации OTP кода", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "auth" + ], + "summary": "Сброс пароля", + "parameters": [ + { + "description": "Данные для сброса пароля", + "name": "request", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.ResetPasswordRequest" + } + } + ], + "responses": { + "200": { + "description": "Пароль успешно изменен", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "400": { + "description": "Неверные данные запроса", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "500": { + "description": "Внутренняя ошибка сервера", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + } + } + }, + "/api/v1/validate_otp": { + "get": { + "description": "Проверка OTP кода для восстановления пароля", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "auth" + ], + "summary": "Валидация OTP кода", + "parameters": [ + { + "type": "string", + "description": "OTP код", + "name": "otp", + "in": "query", + "required": true + }, + { + "type": "string", + "description": "Email пользователя", + "name": "email", + "in": "query", + "required": true + } + ], + "responses": { + "200": { + "description": "OTP код валиден", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "400": { + "description": "Неверные параметры запроса", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "500": { + "description": "Внутренняя ошибка сервера", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + } + } + }, + "/api/v1/verify_email": { + "get": { + "description": "Получение статуса подтверждения email адреса пользователя", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "auth" + ], + "summary": "Статус подтверждения email", + "parameters": [ + { + "type": "string", + "description": "ID пользователя", + "name": "uid", + "in": "query", + "required": true + } + ], + "responses": { + "200": { + "description": "Статус подтверждения email", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "400": { + "description": "Неверные параметры запроса", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "500": { + "description": "Внутренняя ошибка сервера", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + } + }, + "patch": { + "description": "Подтверждение email адреса пользователя по токену", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "auth" + ], + "summary": "Подтверждение email", + "parameters": [ + { + "type": "string", + "description": "ID пользователя", + "name": "uid", + "in": "query", + "required": true + }, + { + "type": "string", + "description": "Токен подтверждения", + "name": "token", + "in": "query", + "required": true + } + ], + "responses": { + "200": { + "description": "Email успешно подтвержден", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "400": { + "description": "Неверные параметры запроса", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "500": { + "description": "Внутренняя ошибка сервера", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + } + } + }, + "/api/v1/{uid}/validation": { + "get": { + "description": "Получение статуса валидации пользователя по UID", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "system" + ], + "summary": "Получить статус валидации пользователя", + "parameters": [ + { + "type": "string", + "description": "UID пользователя", + "name": "uid", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "Статус валидации", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "400": { + "description": "Неверные параметры запроса", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "500": { + "description": "Внутренняя ошибка сервера", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + } + } + } + }, + "definitions": { + "git-molva_ru_Molva_molva-backend_services_api_gateway_internal_constants.PermissionValue": { + "type": "string", + "enum": [ + "no_permission", + "can_view", + "can_edit" + ], + "x-enum-varnames": [ + "NoPermission", + "CanView", + "CanEdit" + ] + }, + "git-molva_ru_Molva_molva-backend_services_api_gateway_internal_feed.AttachmentType": { + "type": "string", + "enum": [ + "vacancy", + "cv", + "profile", + "company", + "bank_account", + "submission" + ], + "x-enum-varnames": [ + "AttachmentTypeVacancy", + "AttachmentTypeCV", + "AttachmentTypeProfile", + "AttachmentTypeCompany", + "AttachmentTypeBankAccount", + "AttachmentTypeSubmission" + ] + }, + "git-molva_ru_Molva_molva-backend_services_api_gateway_internal_feed.Event": { + "type": "object", + "properties": { + "cancellation_reason": { + "type": "string" + }, + "company_id": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "event_type": { + "$ref": "#/definitions/git-molva_ru_Molva_molva-backend_services_api_gateway_internal_feed.EventType" + }, + "id": { + "type": "string" + }, + "is_cancelled": { + "type": "boolean" + }, + "message": { + "type": "string" + }, + "owner_id": { + "type": "string" + }, + "owner_type": { + "$ref": "#/definitions/git-molva_ru_Molva_molva-backend_services_api_gateway_internal_feed.UserRole" + }, + "payload": { + "$ref": "#/definitions/git-molva_ru_Molva_molva-backend_services_api_gateway_internal_feed.EventPayload" + }, + "updated_at": { + "type": "string" + }, + "visibility": { + "$ref": "#/definitions/git-molva_ru_Molva_molva-backend_services_api_gateway_internal_feed.Visibility" + } + } + }, + "git-molva_ru_Molva_molva-backend_services_api_gateway_internal_feed.EventPayload": { + "type": "object", + "properties": { + "additional_receiver": { + "description": "may be uid or company id", + "type": "string" + }, + "attachment_id": { + "type": "string" + }, + "attachment_type": { + "$ref": "#/definitions/git-molva_ru_Molva_molva-backend_services_api_gateway_internal_feed.AttachmentType" + }, + "custom_data": { + "type": "string" + } + } + }, + "git-molva_ru_Molva_molva-backend_services_api_gateway_internal_feed.EventType": { + "type": "string", + "enum": [ + "welcome", + "new_company_member", + "profile_changed", + "company_created", + "company_changed", + "vacancy_created", + "vacancy_changed", + "vacancy_moderation_sent", + "submission_status_changed", + "transaction_created", + "bank_details_changed", + "bank_account_created", + "post_anketa" + ], + "x-enum-varnames": [ + "EventWelcome", + "EventNewCompanyMember", + "EventProfileChanged", + "EventCompanyCreated", + "EventCompanyChanged", + "EventVacancyCreated", + "EventVacancyChanged", + "EventVacancyModerationSent", + "EventSubmissionStatusChanged", + "EventTransactionCreated", + "EventBankAccountChanged", + "EventBankAccountCreated", + "EventPostAnketa" + ] + }, + "git-molva_ru_Molva_molva-backend_services_api_gateway_internal_feed.UserRole": { + "type": "string", + "enum": [ + "agent", + "distributor" + ], + "x-enum-varnames": [ + "RoleAgent", + "RoleDistributor" + ] + }, + "git-molva_ru_Molva_molva-backend_services_api_gateway_internal_feed.Visibility": { + "type": "string", + "enum": [ + "public", + "private", + "company_wide" + ], + "x-enum-comments": { + "VisibilityCompanyWide": "Показывается всем в компании", + "VisibilityPrivate": "Показывается только инициатору события", + "VisibilityPublic": "Показывается всем агентам(инициатор может быть только дистр)" + }, + "x-enum-varnames": [ + "VisibilityPublic", + "VisibilityPrivate", + "VisibilityCompanyWide" + ] + }, + "git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.AddDistributorCompanyMemberRequest": { + "type": "object", + "properties": { + "companyId": { + "type": "string" + }, + "id": { + "type": "string" + } + } + }, + "git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.AgentInfo": { + "type": "object", + "properties": { + "id": { + "type": "string" + } + } + }, + "git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.Balance": { + "type": "object", + "properties": { + "clean_balance": { + "type": "integer" + }, + "raw_balance": { + "type": "integer" + } + } + }, + "git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.BalanceGetResponse": { + "type": "object", + "properties": { + "balance": { + "$ref": "#/definitions/git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.Balance" + } + } + }, + "git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.BankAccount": { + "type": "object", + "properties": { + "account_name": { + "type": "string" + }, + "account_number": { + "type": "string" + }, + "bank_name": { + "type": "string" + }, + "bik": { + "type": "string" + }, + "correspondent_account": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "id": { + "type": "string" + }, + "owner_id": { + "type": "string" + }, + "updated_at": { + "type": "string" + } + } + }, + "git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.BankAccountCreateRequest": { + "type": "object", + "properties": { + "account_name": { + "type": "string" + }, + "account_number": { + "type": "string" + }, + "bank_name": { + "type": "string" + }, + "bik": { + "type": "string" + }, + "correspondent_account": { + "type": "string" + }, + "is_primary": { + "type": "boolean" + }, + "ownerId": { + "type": "string" + } + } + }, + "git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.BankAccountCreateResponse": { + "type": "object", + "properties": { + "id": { + "type": "string" + } + } + }, + "git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.BankAccountInfo": { + "type": "object", + "properties": { + "account_name": { + "type": "string" + }, + "account_number": { + "type": "string" + }, + "bank_name": { + "type": "string" + }, + "bik": { + "type": "string" + }, + "correspondent_account": { + "type": "string" + }, + "id": { + "type": "string" + }, + "owner_type": { + "type": "string" + } + } + }, + "git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.BankAccountListGetResponse": { + "type": "object", + "properties": { + "bank_accounts": { + "type": "array", + "items": { + "$ref": "#/definitions/git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.BankAccount" + } + } + } + }, + "git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.BankAccountUpdateRequest": { + "type": "object", + "properties": { + "account_name": { + "type": "string" + }, + "account_number": { + "type": "string" + }, + "bank_name": { + "type": "string" + }, + "bik": { + "type": "string" + }, + "correspondent_account": { + "type": "string" + }, + "id": { + "type": "string" + }, + "is_primary": { + "type": "boolean" + }, + "ownerId": { + "type": "string" + } + } + }, + "git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.CandidateInfo": { + "type": "object", + "properties": { + "birthday": { + "type": "string" + }, + "cv_link": { + "type": "string" + }, + "email": { + "type": "string" + }, + "first_name": { + "type": "string" + }, + "id": { + "type": "string" + }, + "last_name": { + "type": "string" + }, + "middle_name": { + "type": "string" + }, + "phone_number": { + "type": "string" + }, + "resume": { + "type": "string" + } + } + }, + "git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.Company": { + "type": "object", + "properties": { + "description": { + "type": "string" + }, + "extra_fields_template": { + "type": "string" + }, + "has_moderation_ticket": { + "type": "boolean" + }, + "id": { + "type": "string" + }, + "inn": { + "type": "string" + }, + "is_active": { + "type": "boolean" + }, + "kpp": { + "type": "string" + }, + "legal_address": { + "type": "string" + }, + "legal_person": { + "type": "string" + }, + "metadata": { + "type": "string" + }, + "name": { + "type": "string" + }, + "owner_id": { + "type": "string" + }, + "physical_address": { + "type": "string" + }, + "staff": { + "type": "array", + "items": { + "type": "string" + } + }, + "website": { + "type": "string" + } + } + }, + "git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.CompanyByIdGetResponse": { + "type": "object", + "properties": { + "company": { + "$ref": "#/definitions/git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.Company" + } + } + }, + "git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.CompanyCreateRequest": { + "type": "object", + "properties": { + "description": { + "type": "string" + }, + "extra_fields_template": { + "type": "string" + }, + "inn": { + "type": "string" + }, + "kpp": { + "type": "string" + }, + "legal_address": { + "type": "string" + }, + "legal_person": { + "type": "string" + }, + "metadata": { + "type": "string" + }, + "name": { + "type": "string" + }, + "ownerId": { + "type": "string" + }, + "physical_address": { + "type": "string" + }, + "staff": { + "type": "array", + "items": { + "type": "string" + } + }, + "website": { + "type": "string" + } + } + }, + "git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.CompanyCreateResponse": { + "type": "object", + "properties": { + "id": { + "type": "string" + } + } + }, + "git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.CompanyListGetResponse": { + "type": "object", + "properties": { + "companies": { + "type": "array", + "items": { + "$ref": "#/definitions/git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.Company" + } + } + } + }, + "git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.CompanyUpdateRequest": { + "type": "object", + "properties": { + "description": { + "type": "string" + }, + "extra_fields": { + "type": "string" + }, + "id": { + "type": "string" + }, + "inn": { + "type": "string" + }, + "kpp": { + "type": "string" + }, + "legal_address": { + "type": "string" + }, + "legal_person": { + "type": "string" + }, + "metadata": { + "type": "string" + }, + "name": { + "type": "string" + }, + "physical_address": { + "type": "string" + }, + "staff": { + "type": "array", + "items": { + "type": "string" + } + }, + "website": { + "type": "string" + } + } + }, + "git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.EmployeeResponse": { + "type": "object", + "properties": { + "company_id": { + "type": "string" + }, + "employees": { + "type": "array", + "items": { + "$ref": "#/definitions/git-molva_ru_Molva_molva-backend_services_api_gateway_internal_types.Employee" + } + } + } + }, + "git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.ForgotPasswordRequest": { + "type": "object", + "properties": { + "email": { + "type": "string" + } + } + }, + "git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.LoginUserRequest": { + "type": "object", + "properties": { + "email": { + "type": "string" + }, + "password": { + "type": "string" + } + } + }, + "git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.LoginUserResponse": { + "type": "object", + "properties": { + "access_token": { + "type": "string" + }, + "email_confirmed": { + "type": "boolean" + }, + "permissions": { + "$ref": "#/definitions/git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.Permissions" + }, + "refresh_token": { + "type": "string" + }, + "uid": { + "type": "string" + }, + "user_type": { + "type": "integer" + } + } + }, + "git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.LogoutUserRequest": { + "type": "object", + "properties": { + "refresh_token": { + "type": "string" + } + } + }, + "git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.Permissions": { + "type": "object", + "properties": { + "balance": { + "type": "string" + }, + "company": { + "type": "string" + }, + "employees": { + "type": "string" + }, + "profile": { + "type": "string" + }, + "submissions": { + "type": "string" + }, + "vacancies": { + "type": "string" + } + } + }, + "git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.Profile": { + "type": "object", + "properties": { + "email": { + "type": "string" + }, + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "phone_number": { + "type": "string" + } + } + }, + "git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.ProfileGetResponse": { + "type": "object", + "properties": { + "profile": { + "$ref": "#/definitions/git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.Profile" + } + } + }, + "git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.ProfileUpdateRequest": { + "type": "object", + "properties": { + "email": { + "type": "string" + }, + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "phone_number": { + "type": "string" + } + } + }, + "git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.RefreshTokenRequest": { + "type": "object", + "properties": { + "refresh_token": { + "type": "string" + } + } + }, + "git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.RefreshTokenResponse": { + "type": "object", + "properties": { + "access_token": { + "type": "string" + }, + "refresh_token": { + "type": "string" + } + } + }, + "git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.RegisterResponse": { + "type": "object", + "properties": { + "uid": { + "type": "string" + } + } + }, + "git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.ResetPasswordRequest": { + "type": "object", + "properties": { + "email": { + "type": "string" + }, + "new_password": { + "type": "string" + }, + "token": { + "type": "string" + } + } + }, + "git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.Submission": { + "type": "object", + "properties": { + "agent_info": { + "$ref": "#/definitions/git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.AgentInfo" + }, + "candidate_info": { + "$ref": "#/definitions/git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.CandidateInfo" + }, + "id": { + "type": "string" + }, + "status": { + "$ref": "#/definitions/git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.SubmissionStatus" + }, + "vacancy_info": { + "$ref": "#/definitions/git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.VacancyInfo" + } + } + }, + "git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.SubmissionListGetResponse": { + "type": "object", + "properties": { + "submissions": { + "type": "array", + "items": { + "$ref": "#/definitions/git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.Submission" + } + } + } + }, + "git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.SubmissionStatus": { + "type": "string", + "enum": [ + "unspecified", + "new", + "pending", + "on_interview", + "approved", + "cancelled", + "rejected" + ], + "x-enum-varnames": [ + "SubStatusUnspecified", + "SubStatusNew", + "SubStatusPending", + "SubStatusOnInterview", + "SubStatusApproved", + "SubStatusCancelled", + "SubStatusRejected" + ] + }, + "git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.SubmissionStatusUpdateRequest": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "status": { + "$ref": "#/definitions/git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.SubmissionStatus" + } + } + }, + "git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.Transaction": { + "type": "object", + "properties": { + "amount": { + "type": "integer" + }, + "bank_account_info": { + "$ref": "#/definitions/git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.BankAccountInfo" + }, + "created_at": { + "type": "string" + }, + "currency": { + "type": "string" + }, + "id": { + "type": "string" + }, + "owner_info": { + "$ref": "#/definitions/git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.TransactionOwnerInfo" + }, + "payload": { + "$ref": "#/definitions/git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.TransactionPayload" + }, + "status": { + "$ref": "#/definitions/git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.TransactionStatus" + }, + "type": { + "$ref": "#/definitions/git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.TransactionType" + } + } + }, + "git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.TransactionCreateRequest": { + "type": "object", + "properties": { + "amount": { + "type": "integer" + }, + "bank_account_id": { + "type": "string" + }, + "currency": { + "type": "string" + }, + "ownerId": { + "type": "string" + }, + "payload": { + "$ref": "#/definitions/git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.TransactionPayload" + }, + "request_id": { + "type": "string" + } + } + }, + "git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.TransactionCreateResponse": { + "type": "object", + "properties": { + "id": { + "type": "string" + } + } + }, + "git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.TransactionListGetResponse": { + "type": "object", + "properties": { + "transactions": { + "type": "array", + "items": { + "$ref": "#/definitions/git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.Transaction" + } + } + } + }, + "git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.TransactionOwnerInfo": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + } + } + }, + "git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.TransactionPayload": { + "type": "object", + "properties": { + "company_id": { + "type": "string" + }, + "company_name": { + "type": "string" + }, + "origin": { + "type": "string" + }, + "vacancy_id": { + "type": "string" + }, + "vacancy_name": { + "type": "string" + } + } + }, + "git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.TransactionStatus": { + "type": "string", + "enum": [ + "new", + "pending", + "approved", + "rejected" + ], + "x-enum-varnames": [ + "TransactionStatusNew", + "TransactionStatusPending", + "TransactionStatusApproved", + "TransactionStatusRejected" + ] + }, + "git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.TransactionType": { + "type": "string", + "enum": [ + "deposit", + "withdrawal" + ], + "x-enum-varnames": [ + "TransactionTypeDeposit", + "TransactionTypeWithdrawal" + ] + }, + "git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.UserCredentials": { + "type": "object", + "properties": { + "email": { + "type": "string" + }, + "first_name": { + "type": "string" + }, + "last_name": { + "type": "string" + }, + "middle_name": { + "type": "string" + }, + "password": { + "type": "string" + }, + "permissions": { + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "phone": { + "type": "string" + }, + "user_type": { + "type": "integer" + } + } + }, + "git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.Vacancy": { + "type": "object", + "properties": { + "address": { + "type": "string" + }, + "agent_reward": { + "type": "integer" + }, + "company": { + "$ref": "#/definitions/git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.VacancyCompanyInfo" + }, + "created_at": { + "type": "string" + }, + "current_candidates": { + "type": "integer" + }, + "extra_fields": { + "type": "string" + }, + "extra_info": { + "type": "string" + }, + "id": { + "type": "string" + }, + "is_archived": { + "type": "boolean" + }, + "moderation": { + "$ref": "#/definitions/git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.VacancyModeration" + }, + "name": { + "type": "string" + }, + "region": { + "type": "string" + }, + "required_candidates": { + "type": "integer" + }, + "requirements": { + "type": "string" + }, + "responsibilities": { + "type": "string" + }, + "salary_bottom": { + "type": "integer" + }, + "salary_top": { + "type": "integer" + }, + "target_action": { + "$ref": "#/definitions/git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.VacancyTargetAction" + }, + "work_format": { + "type": "string" + } + } + }, + "git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.VacancyCompanyInfo": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "logo_link": { + "type": "string" + }, + "name": { + "type": "string" + } + } + }, + "git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.VacancyCreateRequest": { + "type": "object", + "properties": { + "address": { + "type": "string" + }, + "agent_reward": { + "type": "integer" + }, + "company_id": { + "type": "string" + }, + "current_candidates": { + "type": "integer" + }, + "extra_fields": { + "type": "string" + }, + "extra_info": { + "type": "string" + }, + "name": { + "type": "string" + }, + "region": { + "type": "string" + }, + "required_candidates": { + "type": "integer" + }, + "requirements": { + "type": "string" + }, + "responsibilities": { + "type": "string" + }, + "salary_bottom": { + "type": "integer" + }, + "salary_top": { + "type": "integer" + }, + "target_action": { + "$ref": "#/definitions/git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.VacancyTargetAction" + }, + "work_format": { + "type": "string" + } + } + }, + "git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.VacancyCreateResponse": { + "type": "object", + "properties": { + "id": { + "type": "string" + } + } + }, + "git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.VacancyInfo": { + "type": "object", + "properties": { + "id": { + "type": "string" + } + } + }, + "git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.VacancyListGetResponse": { + "type": "object", + "properties": { + "vacancies": { + "type": "array", + "items": { + "$ref": "#/definitions/git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.Vacancy" + } + } + } + }, + "git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.VacancyModeration": { + "type": "object", + "properties": { + "description_history": { + "type": "array", + "items": { + "$ref": "#/definitions/git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.VacancyModerationDescription" + } + }, + "status": { + "$ref": "#/definitions/git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.VacancyStatus" + } + } + }, + "git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.VacancyModerationDescription": { + "type": "object", + "properties": { + "created_at": { + "type": "string" + }, + "description": { + "type": "string" + } + } + }, + "git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.VacancyStatus": { + "type": "string", + "enum": [ + "unspecified", + "new", + "pending", + "approved", + "rejected" + ], + "x-enum-varnames": [ + "VacUnspecified", + "VacNew", + "VacPending", + "VacApproved", + "VacRejected" + ] + }, + "git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.VacancyTargetAction": { + "type": "object", + "properties": { + "action": { + "type": "string" + }, + "duration": { + "type": "integer" + } + } + }, + "git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.VacancyTargetActionForUpdate": { + "type": "object", + "properties": { + "action": { + "type": "string" + }, + "duration": { + "type": "integer" + } + } + }, + "git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.VacancyUpdateRequest": { + "type": "object", + "properties": { + "address": { + "type": "string" + }, + "agent_reward": { + "type": "integer" + }, + "extra_fields": { + "type": "string" + }, + "extra_info": { + "type": "string" + }, + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "region": { + "type": "string" + }, + "required_candidates": { + "type": "integer" + }, + "requirements": { + "type": "string" + }, + "responsibilities": { + "type": "string" + }, + "salary_bottom": { + "type": "integer" + }, + "salary_top": { + "type": "integer" + }, + "target_action": { + "$ref": "#/definitions/git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.VacancyTargetActionForUpdate" + }, + "work_format": { + "type": "string" + } + } + }, + "git-molva_ru_Molva_molva-backend_services_api_gateway_internal_types.Employee": { + "type": "object", + "properties": { + "email": { + "type": "string" + }, + "first_name": { + "type": "string" + }, + "last_name": { + "type": "string" + }, + "middle_name": { + "type": "string" + }, + "permissions": { + "description": "Phone string `json:\"phone\"` // не уверен, что это нужно", + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/git-molva_ru_Molva_molva-backend_services_api_gateway_internal_constants.PermissionValue" + } + }, + "uid": { + "type": "string" + } + } + }, + "git-molva_ru_Molva_molva-backend_services_api_gateway_internal_types.PersonalLinkResponse": { + "type": "object", + "properties": { + "link": { + "type": "string" + } + } + } + }, + "securityDefinitions": { + "BearerAuth": { + "description": "Type \"Bearer\" followed by a space and JWT token.", + "type": "apiKey", + "name": "Authorization", + "in": "header" + } + } +} \ No newline at end of file diff --git a/internal/http/swagger/docs/swagger.yaml b/internal/http/swagger/docs/swagger.yaml new file mode 100644 index 0000000..61bc4ed --- /dev/null +++ b/internal/http/swagger/docs/swagger.yaml @@ -0,0 +1,3599 @@ +basePath: / +definitions: + git-molva_ru_Molva_molva-backend_services_api_gateway_internal_constants.PermissionValue: + enum: + - no_permission + - can_view + - can_edit + type: string + x-enum-varnames: + - NoPermission + - CanView + - CanEdit + git-molva_ru_Molva_molva-backend_services_api_gateway_internal_feed.AttachmentType: + enum: + - vacancy + - cv + - profile + - company + - bank_account + - submission + type: string + x-enum-varnames: + - AttachmentTypeVacancy + - AttachmentTypeCV + - AttachmentTypeProfile + - AttachmentTypeCompany + - AttachmentTypeBankAccount + - AttachmentTypeSubmission + git-molva_ru_Molva_molva-backend_services_api_gateway_internal_feed.Event: + properties: + cancellation_reason: + type: string + company_id: + type: string + created_at: + type: string + event_type: + $ref: '#/definitions/git-molva_ru_Molva_molva-backend_services_api_gateway_internal_feed.EventType' + id: + type: string + is_cancelled: + type: boolean + message: + type: string + owner_id: + type: string + owner_type: + $ref: '#/definitions/git-molva_ru_Molva_molva-backend_services_api_gateway_internal_feed.UserRole' + payload: + $ref: '#/definitions/git-molva_ru_Molva_molva-backend_services_api_gateway_internal_feed.EventPayload' + updated_at: + type: string + visibility: + $ref: '#/definitions/git-molva_ru_Molva_molva-backend_services_api_gateway_internal_feed.Visibility' + type: object + git-molva_ru_Molva_molva-backend_services_api_gateway_internal_feed.EventPayload: + properties: + additional_receiver: + description: may be uid or company id + type: string + attachment_id: + type: string + attachment_type: + $ref: '#/definitions/git-molva_ru_Molva_molva-backend_services_api_gateway_internal_feed.AttachmentType' + custom_data: + type: string + type: object + git-molva_ru_Molva_molva-backend_services_api_gateway_internal_feed.EventType: + enum: + - welcome + - new_company_member + - profile_changed + - company_created + - company_changed + - vacancy_created + - vacancy_changed + - vacancy_moderation_sent + - submission_status_changed + - transaction_created + - bank_details_changed + - bank_account_created + - post_anketa + type: string + x-enum-varnames: + - EventWelcome + - EventNewCompanyMember + - EventProfileChanged + - EventCompanyCreated + - EventCompanyChanged + - EventVacancyCreated + - EventVacancyChanged + - EventVacancyModerationSent + - EventSubmissionStatusChanged + - EventTransactionCreated + - EventBankAccountChanged + - EventBankAccountCreated + - EventPostAnketa + git-molva_ru_Molva_molva-backend_services_api_gateway_internal_feed.UserRole: + enum: + - agent + - distributor + type: string + x-enum-varnames: + - RoleAgent + - RoleDistributor + git-molva_ru_Molva_molva-backend_services_api_gateway_internal_feed.Visibility: + enum: + - public + - private + - company_wide + type: string + x-enum-comments: + VisibilityCompanyWide: Показывается всем в компании + VisibilityPrivate: Показывается только инициатору события + VisibilityPublic: Показывается всем агентам(инициатор может быть только дистр) + x-enum-varnames: + - VisibilityPublic + - VisibilityPrivate + - VisibilityCompanyWide + git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.AddDistributorCompanyMemberRequest: + properties: + companyId: + type: string + id: + type: string + type: object + git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.AgentInfo: + properties: + id: + type: string + type: object + git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.Balance: + properties: + clean_balance: + type: integer + raw_balance: + type: integer + type: object + git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.BalanceGetResponse: + properties: + balance: + $ref: '#/definitions/git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.Balance' + type: object + git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.BankAccount: + properties: + account_name: + type: string + account_number: + type: string + bank_name: + type: string + bik: + type: string + correspondent_account: + type: string + created_at: + type: string + id: + type: string + owner_id: + type: string + updated_at: + type: string + type: object + git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.BankAccountCreateRequest: + properties: + account_name: + type: string + account_number: + type: string + bank_name: + type: string + bik: + type: string + correspondent_account: + type: string + is_primary: + type: boolean + ownerId: + type: string + type: object + git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.BankAccountCreateResponse: + properties: + id: + type: string + type: object + git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.BankAccountInfo: + properties: + account_name: + type: string + account_number: + type: string + bank_name: + type: string + bik: + type: string + correspondent_account: + type: string + id: + type: string + owner_type: + type: string + type: object + git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.BankAccountListGetResponse: + properties: + bank_accounts: + items: + $ref: '#/definitions/git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.BankAccount' + type: array + type: object + git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.BankAccountUpdateRequest: + properties: + account_name: + type: string + account_number: + type: string + bank_name: + type: string + bik: + type: string + correspondent_account: + type: string + id: + type: string + is_primary: + type: boolean + ownerId: + type: string + type: object + git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.CandidateInfo: + properties: + birthday: + type: string + cv_link: + type: string + email: + type: string + first_name: + type: string + id: + type: string + last_name: + type: string + middle_name: + type: string + phone_number: + type: string + resume: + type: string + type: object + git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.Company: + properties: + description: + type: string + extra_fields_template: + type: string + has_moderation_ticket: + type: boolean + id: + type: string + inn: + type: string + is_active: + type: boolean + kpp: + type: string + legal_address: + type: string + legal_person: + type: string + metadata: + type: string + name: + type: string + owner_id: + type: string + physical_address: + type: string + staff: + items: + type: string + type: array + website: + type: string + type: object + git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.CompanyByIdGetResponse: + properties: + company: + $ref: '#/definitions/git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.Company' + type: object + git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.CompanyCreateRequest: + properties: + description: + type: string + extra_fields_template: + type: string + inn: + type: string + kpp: + type: string + legal_address: + type: string + legal_person: + type: string + metadata: + type: string + name: + type: string + ownerId: + type: string + physical_address: + type: string + staff: + items: + type: string + type: array + website: + type: string + type: object + git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.CompanyCreateResponse: + properties: + id: + type: string + type: object + git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.CompanyListGetResponse: + properties: + companies: + items: + $ref: '#/definitions/git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.Company' + type: array + type: object + git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.CompanyUpdateRequest: + properties: + description: + type: string + extra_fields: + type: string + id: + type: string + inn: + type: string + kpp: + type: string + legal_address: + type: string + legal_person: + type: string + metadata: + type: string + name: + type: string + physical_address: + type: string + staff: + items: + type: string + type: array + website: + type: string + type: object + git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.EmployeeResponse: + properties: + company_id: + type: string + employees: + items: + $ref: '#/definitions/git-molva_ru_Molva_molva-backend_services_api_gateway_internal_types.Employee' + type: array + type: object + git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.ForgotPasswordRequest: + properties: + email: + type: string + type: object + git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.LoginUserRequest: + properties: + email: + type: string + password: + type: string + type: object + git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.LoginUserResponse: + properties: + access_token: + type: string + email_confirmed: + type: boolean + permissions: + $ref: '#/definitions/git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.Permissions' + refresh_token: + type: string + uid: + type: string + user_type: + type: integer + type: object + git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.LogoutUserRequest: + properties: + refresh_token: + type: string + type: object + git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.Permissions: + properties: + balance: + type: string + company: + type: string + employees: + type: string + profile: + type: string + submissions: + type: string + vacancies: + type: string + type: object + git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.Profile: + properties: + email: + type: string + id: + type: string + name: + type: string + phone_number: + type: string + type: object + git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.ProfileGetResponse: + properties: + profile: + $ref: '#/definitions/git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.Profile' + type: object + git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.ProfileUpdateRequest: + properties: + email: + type: string + id: + type: string + name: + type: string + phone_number: + type: string + type: object + git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.RefreshTokenRequest: + properties: + refresh_token: + type: string + type: object + git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.RefreshTokenResponse: + properties: + access_token: + type: string + refresh_token: + type: string + type: object + git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.RegisterResponse: + properties: + uid: + type: string + type: object + git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.ResetPasswordRequest: + properties: + email: + type: string + new_password: + type: string + token: + type: string + type: object + git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.Submission: + properties: + agent_info: + $ref: '#/definitions/git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.AgentInfo' + candidate_info: + $ref: '#/definitions/git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.CandidateInfo' + id: + type: string + status: + $ref: '#/definitions/git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.SubmissionStatus' + vacancy_info: + $ref: '#/definitions/git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.VacancyInfo' + type: object + git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.SubmissionListGetResponse: + properties: + submissions: + items: + $ref: '#/definitions/git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.Submission' + type: array + type: object + git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.SubmissionStatus: + enum: + - unspecified + - new + - pending + - on_interview + - approved + - cancelled + - rejected + type: string + x-enum-varnames: + - SubStatusUnspecified + - SubStatusNew + - SubStatusPending + - SubStatusOnInterview + - SubStatusApproved + - SubStatusCancelled + - SubStatusRejected + git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.SubmissionStatusUpdateRequest: + properties: + id: + type: string + status: + $ref: '#/definitions/git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.SubmissionStatus' + type: object + git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.Transaction: + properties: + amount: + type: integer + bank_account_info: + $ref: '#/definitions/git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.BankAccountInfo' + created_at: + type: string + currency: + type: string + id: + type: string + owner_info: + $ref: '#/definitions/git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.TransactionOwnerInfo' + payload: + $ref: '#/definitions/git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.TransactionPayload' + status: + $ref: '#/definitions/git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.TransactionStatus' + type: + $ref: '#/definitions/git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.TransactionType' + type: object + git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.TransactionCreateRequest: + properties: + amount: + type: integer + bank_account_id: + type: string + currency: + type: string + ownerId: + type: string + payload: + $ref: '#/definitions/git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.TransactionPayload' + request_id: + type: string + type: object + git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.TransactionCreateResponse: + properties: + id: + type: string + type: object + git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.TransactionListGetResponse: + properties: + transactions: + items: + $ref: '#/definitions/git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.Transaction' + type: array + type: object + git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.TransactionOwnerInfo: + properties: + id: + type: string + name: + type: string + type: object + git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.TransactionPayload: + properties: + company_id: + type: string + company_name: + type: string + origin: + type: string + vacancy_id: + type: string + vacancy_name: + type: string + type: object + git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.TransactionStatus: + enum: + - new + - pending + - approved + - rejected + type: string + x-enum-varnames: + - TransactionStatusNew + - TransactionStatusPending + - TransactionStatusApproved + - TransactionStatusRejected + git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.TransactionType: + enum: + - deposit + - withdrawal + type: string + x-enum-varnames: + - TransactionTypeDeposit + - TransactionTypeWithdrawal + git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.UserCredentials: + properties: + email: + type: string + first_name: + type: string + last_name: + type: string + middle_name: + type: string + password: + type: string + permissions: + additionalProperties: + type: string + type: object + phone: + type: string + user_type: + type: integer + type: object + git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.Vacancy: + properties: + address: + type: string + agent_reward: + type: integer + company: + $ref: '#/definitions/git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.VacancyCompanyInfo' + created_at: + type: string + current_candidates: + type: integer + extra_fields: + type: string + extra_info: + type: string + id: + type: string + is_archived: + type: boolean + moderation: + $ref: '#/definitions/git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.VacancyModeration' + name: + type: string + region: + type: string + required_candidates: + type: integer + requirements: + type: string + responsibilities: + type: string + salary_bottom: + type: integer + salary_top: + type: integer + target_action: + $ref: '#/definitions/git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.VacancyTargetAction' + work_format: + type: string + type: object + git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.VacancyCompanyInfo: + properties: + id: + type: string + logo_link: + type: string + name: + type: string + type: object + git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.VacancyCreateRequest: + properties: + address: + type: string + agent_reward: + type: integer + company_id: + type: string + current_candidates: + type: integer + extra_fields: + type: string + extra_info: + type: string + name: + type: string + region: + type: string + required_candidates: + type: integer + requirements: + type: string + responsibilities: + type: string + salary_bottom: + type: integer + salary_top: + type: integer + target_action: + $ref: '#/definitions/git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.VacancyTargetAction' + work_format: + type: string + type: object + git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.VacancyCreateResponse: + properties: + id: + type: string + type: object + git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.VacancyInfo: + properties: + id: + type: string + type: object + git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.VacancyListGetResponse: + properties: + vacancies: + items: + $ref: '#/definitions/git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.Vacancy' + type: array + type: object + git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.VacancyModeration: + properties: + description_history: + items: + $ref: '#/definitions/git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.VacancyModerationDescription' + type: array + status: + $ref: '#/definitions/git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.VacancyStatus' + type: object + git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.VacancyModerationDescription: + properties: + created_at: + type: string + description: + type: string + type: object + git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.VacancyStatus: + enum: + - unspecified + - new + - pending + - approved + - rejected + type: string + x-enum-varnames: + - VacUnspecified + - VacNew + - VacPending + - VacApproved + - VacRejected + git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.VacancyTargetAction: + properties: + action: + type: string + duration: + type: integer + type: object + git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.VacancyTargetActionForUpdate: + properties: + action: + type: string + duration: + type: integer + type: object + git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.VacancyUpdateRequest: + properties: + address: + type: string + agent_reward: + type: integer + extra_fields: + type: string + extra_info: + type: string + id: + type: string + name: + type: string + region: + type: string + required_candidates: + type: integer + requirements: + type: string + responsibilities: + type: string + salary_bottom: + type: integer + salary_top: + type: integer + target_action: + $ref: '#/definitions/git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.VacancyTargetActionForUpdate' + work_format: + type: string + type: object + git-molva_ru_Molva_molva-backend_services_api_gateway_internal_types.Employee: + properties: + email: + type: string + first_name: + type: string + last_name: + type: string + middle_name: + type: string + permissions: + additionalProperties: + $ref: '#/definitions/git-molva_ru_Molva_molva-backend_services_api_gateway_internal_constants.PermissionValue' + description: Phone string `json:"phone"` // не уверен, что + это нужно + type: object + uid: + type: string + type: object + git-molva_ru_Molva_molva-backend_services_api_gateway_internal_types.PersonalLinkResponse: + properties: + link: + type: string + type: object +host: dev-molva.ru +info: + contact: + email: support@swagger.io + name: API Support + url: http://www.swagger.io/support + description: API Gateway для системы Molva - платформы для управления вакансиями + и агентами + license: + name: MIT + url: https://opensource.org/licenses/MIT + termsOfService: http://swagger.io/terms/ + title: Molva API Gateway + version: "1.0" +paths: + /api/v1/{uid}/validation: + get: + consumes: + - application/json + description: Получение статуса валидации пользователя по UID + parameters: + - description: UID пользователя + in: path + name: uid + required: true + type: string + produces: + - application/json + responses: + "200": + description: Статус валидации + schema: + additionalProperties: + type: string + type: object + "400": + description: Неверные параметры запроса + schema: + additionalProperties: + type: string + type: object + "500": + description: Внутренняя ошибка сервера + schema: + additionalProperties: + type: string + type: object + summary: Получить статус валидации пользователя + tags: + - system + /api/v1/agents/{agent_id}/balance: + get: + consumes: + - application/json + description: Получение текущего баланса агента + parameters: + - description: ID агента + in: path + name: agent_id + required: true + type: string + produces: + - application/json + responses: + "200": + description: Баланс агента + schema: + $ref: '#/definitions/git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.BalanceGetResponse' + "400": + description: Неверные параметры запроса + schema: + additionalProperties: + type: string + type: object + "500": + description: Внутренняя ошибка сервера + schema: + additionalProperties: + type: string + type: object + security: + - BearerAuth: [] + summary: Получить баланс агента + tags: + - agents + /api/v1/agents/{agent_id}/bank_accounts: + get: + consumes: + - application/json + description: Получение списка банковских счетов агента + parameters: + - description: ID агента + in: path + name: agent_id + required: true + type: string + produces: + - application/json + responses: + "200": + description: Список банковских счетов + schema: + $ref: '#/definitions/git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.BankAccountListGetResponse' + "400": + description: Неверные параметры запроса + schema: + additionalProperties: + type: string + type: object + "500": + description: Внутренняя ошибка сервера + schema: + additionalProperties: + type: string + type: object + security: + - BearerAuth: [] + summary: Получить список банковских счетов агента + tags: + - agents + post: + consumes: + - application/json + description: Создание нового банковского счета для агента + parameters: + - description: ID агента + in: path + name: agent_id + required: true + type: string + - description: Данные банковского счета + in: body + name: request + required: true + schema: + $ref: '#/definitions/git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.BankAccountCreateRequest' + produces: + - application/json + responses: + "201": + description: Банковский счет создан + schema: + $ref: '#/definitions/git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.BankAccountCreateResponse' + "400": + description: Неверные данные запроса + schema: + additionalProperties: + type: string + type: object + "500": + description: Внутренняя ошибка сервера + schema: + additionalProperties: + type: string + type: object + security: + - BearerAuth: [] + summary: Создать банковский счет агента + tags: + - agents + /api/v1/agents/{agent_id}/bank_accounts/{bank_account_id}: + delete: + consumes: + - application/json + description: Удаление банковского счета агента + parameters: + - description: ID агента + in: path + name: agent_id + required: true + type: string + - description: ID банковского счета + in: path + name: bank_account_id + required: true + type: string + produces: + - application/json + responses: + "200": + description: Банковский счет удален + schema: + additionalProperties: + type: string + type: object + "400": + description: Неверные параметры запроса + schema: + additionalProperties: + type: string + type: object + "500": + description: Внутренняя ошибка сервера + schema: + additionalProperties: + type: string + type: object + security: + - BearerAuth: [] + summary: Удалить банковский счет агента + tags: + - agents + put: + consumes: + - application/json + description: Обновление информации о банковском счете агента + parameters: + - description: ID агента + in: path + name: agent_id + required: true + type: string + - description: ID банковского счета + in: path + name: bank_account_id + required: true + type: string + - description: Данные для обновления + in: body + name: request + required: true + schema: + $ref: '#/definitions/git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.BankAccountUpdateRequest' + produces: + - application/json + responses: + "200": + description: Банковский счет обновлен + schema: + additionalProperties: + type: string + type: object + "400": + description: Неверные данные запроса + schema: + additionalProperties: + type: string + type: object + "500": + description: Внутренняя ошибка сервера + schema: + additionalProperties: + type: string + type: object + security: + - BearerAuth: [] + summary: Обновить банковский счет агента + tags: + - agents + /api/v1/agents/{agent_id}/companies: + get: + consumes: + - application/json + description: Получение списка всех компаний, принадлежащих агенту + parameters: + - description: ID агента + in: path + name: agent_id + required: true + type: string + produces: + - application/json + responses: + "200": + description: Список компаний + schema: + $ref: '#/definitions/git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.CompanyListGetResponse' + "400": + description: Неверные данные запроса + schema: + additionalProperties: + type: string + type: object + "401": + description: Неавторизованный доступ + schema: + additionalProperties: + type: string + type: object + "500": + description: Внутренняя ошибка сервера + schema: + additionalProperties: + type: string + type: object + security: + - BearerAuth: [] + summary: Получить список компаний агента + tags: + - agents + /api/v1/agents/{agent_id}/company: + post: + consumes: + - application/json + description: Создание новой компании для агента + parameters: + - description: ID агента + in: path + name: agent_id + required: true + type: string + - description: Данные для создания компании + in: body + name: request + required: true + schema: + $ref: '#/definitions/git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.CompanyCreateRequest' + produces: + - application/json + responses: + "201": + description: Компания создана + schema: + $ref: '#/definitions/git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.CompanyCreateResponse' + "400": + description: Неверные данные запроса + schema: + additionalProperties: + type: string + type: object + "401": + description: Неавторизованный доступ + schema: + additionalProperties: + type: string + type: object + "500": + description: Внутренняя ошибка сервера + schema: + additionalProperties: + type: string + type: object + security: + - BearerAuth: [] + summary: Создать компанию + tags: + - agents + /api/v1/agents/{agent_id}/company/{company_id}: + get: + consumes: + - application/json + description: Получение детальной информации о компании агента + parameters: + - description: ID агента + in: path + name: agent_id + required: true + type: string + - description: ID компании + in: path + name: company_id + required: true + type: string + produces: + - application/json + responses: + "200": + description: Информация о компании + schema: + $ref: '#/definitions/git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.CompanyByIdGetResponse' + "400": + description: Неверные данные запроса + schema: + additionalProperties: + type: string + type: object + "401": + description: Неавторизованный доступ + schema: + additionalProperties: + type: string + type: object + "404": + description: Компания не найдена + schema: + additionalProperties: + type: string + type: object + "500": + description: Внутренняя ошибка сервера + schema: + additionalProperties: + type: string + type: object + security: + - BearerAuth: [] + summary: Получить компанию по ID + tags: + - agents + /api/v1/agents/{agent_id}/profile: + get: + consumes: + - application/json + description: Получение профиля агента по ID + parameters: + - description: ID агента + in: path + name: agent_id + required: true + type: string + produces: + - application/json + responses: + "200": + description: Профиль агента + schema: + $ref: '#/definitions/git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.ProfileGetResponse' + "400": + description: Неверные параметры запроса + schema: + additionalProperties: + type: string + type: object + "500": + description: Внутренняя ошибка сервера + schema: + additionalProperties: + type: string + type: object + security: + - BearerAuth: [] + summary: Получить профиль агента + tags: + - agents + put: + consumes: + - application/json + description: Обновление профиля агента + parameters: + - description: ID агента + in: path + name: agent_id + required: true + type: string + - description: Данные для обновления профиля + in: body + name: request + required: true + schema: + $ref: '#/definitions/git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.ProfileUpdateRequest' + produces: + - application/json + responses: + "200": + description: Профиль обновлен + schema: + additionalProperties: + type: string + type: object + "400": + description: Неверные данные запроса + schema: + additionalProperties: + type: string + type: object + "500": + description: Внутренняя ошибка сервера + schema: + additionalProperties: + type: string + type: object + security: + - BearerAuth: [] + summary: Обновить профиль агента + tags: + - agents + /api/v1/agents/{agent_id}/submissions: + get: + consumes: + - application/json + description: Получение списка заявок агента с возможностью фильтрации + parameters: + - description: ID агента + in: path + name: agent_id + required: true + type: string + - description: ID вакансии + in: query + name: vacancy_id + type: string + - description: Статус заявки + in: query + name: status + type: string + - description: Номер страницы + in: query + name: page + type: integer + - description: Размер страницы + in: query + name: page_size + type: integer + produces: + - application/json + responses: + "200": + description: Список заявок + schema: + $ref: '#/definitions/git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.SubmissionListGetResponse' + "400": + description: Неверные данные запроса + schema: + additionalProperties: + type: string + type: object + "401": + description: Неавторизованный доступ + schema: + additionalProperties: + type: string + type: object + "500": + description: Внутренняя ошибка сервера + schema: + additionalProperties: + type: string + type: object + security: + - BearerAuth: [] + summary: Получить список заявок агента + tags: + - agents + /api/v1/agents/{agent_id}/submissions/{submission_id}: + delete: + consumes: + - application/json + description: Удаление заявки агента + parameters: + - description: ID агента + in: path + name: agent_id + required: true + type: string + - description: ID заявки + in: path + name: submission_id + required: true + type: string + produces: + - application/json + responses: + "204": + description: Заявка удалена + "400": + description: Неверные данные запроса + schema: + additionalProperties: + type: string + type: object + "401": + description: Неавторизованный доступ + schema: + additionalProperties: + type: string + type: object + "404": + description: Заявка не найдена + schema: + additionalProperties: + type: string + type: object + "500": + description: Внутренняя ошибка сервера + schema: + additionalProperties: + type: string + type: object + security: + - BearerAuth: [] + summary: Удалить заявку агента + tags: + - agents + /api/v1/agents/{agent_id}/submissions/{submission_id}/cv: + get: + consumes: + - application/json + description: Получение CV файла заявки + parameters: + - description: ID агента + in: path + name: agent_id + required: true + type: string + - description: ID заявки + in: path + name: submission_id + required: true + type: string + produces: + - application/octet-stream + responses: + "200": + description: CV файл + schema: + type: file + "400": + description: Неверные данные запроса + schema: + additionalProperties: + type: string + type: object + "401": + description: Неавторизованный доступ + schema: + additionalProperties: + type: string + type: object + "404": + description: CV не найден + schema: + additionalProperties: + type: string + type: object + "500": + description: Внутренняя ошибка сервера + schema: + additionalProperties: + type: string + type: object + security: + - BearerAuth: [] + summary: Получить CV заявки + tags: + - agents + /api/v1/agents/{agent_id}/transactions: + get: + consumes: + - application/json + description: Получение списка транзакций агента с возможностью фильтрации + parameters: + - description: ID агента + in: path + name: agent_id + required: true + type: string + produces: + - application/json + responses: + "200": + description: Список транзакций + schema: + $ref: '#/definitions/git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.TransactionListGetResponse' + "400": + description: Неверные параметры запроса + schema: + additionalProperties: + type: string + type: object + "500": + description: Внутренняя ошибка сервера + schema: + additionalProperties: + type: string + type: object + security: + - BearerAuth: [] + summary: Получить список транзакций агента + tags: + - agents + post: + consumes: + - application/json + description: Создание новой транзакции для агента + parameters: + - description: ID агента + in: path + name: agent_id + required: true + type: string + - description: Данные транзакции + in: body + name: request + required: true + schema: + $ref: '#/definitions/git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.TransactionCreateRequest' + produces: + - application/json + responses: + "201": + description: Транзакция создана + schema: + $ref: '#/definitions/git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.TransactionCreateResponse' + "400": + description: Неверные данные запроса + schema: + additionalProperties: + type: string + type: object + "500": + description: Внутренняя ошибка сервера + schema: + additionalProperties: + type: string + type: object + security: + - BearerAuth: [] + summary: Создать транзакцию агента + tags: + - agents + /api/v1/agents/{agent_id}/vacancies: + get: + consumes: + - application/json + description: Получение списка вакансий с возможностью фильтрации + parameters: + - description: ID агента + in: path + name: agent_id + required: true + type: string + - description: ID дистрибьютора + in: query + name: distributor_id + type: string + - description: ID компании + in: query + name: company_id + type: string + - description: Регион + in: query + name: region + type: string + - description: Минимальная зарплата + in: query + name: salary_bottom + type: integer + - description: Максимальная зарплата + in: query + name: salary_top + type: integer + - description: Архивные вакансии + in: query + name: is_archived + type: boolean + - description: Статус вакансии + in: query + name: status + type: string + - description: Номер страницы + in: query + name: page + type: integer + - description: Размер страницы + in: query + name: page_size + type: integer + produces: + - application/json + responses: + "200": + description: Список вакансий + schema: + $ref: '#/definitions/git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.VacancyListGetResponse' + "400": + description: Неверные данные запроса + schema: + additionalProperties: + type: string + type: object + "401": + description: Неавторизованный доступ + schema: + additionalProperties: + type: string + type: object + "500": + description: Внутренняя ошибка сервера + schema: + additionalProperties: + type: string + type: object + security: + - BearerAuth: [] + summary: Получить список вакансий для агента + tags: + - agents + /api/v1/agents/{agent_id}/vacancies/{vacancy_id}: + get: + consumes: + - application/json + description: Получение персональной ссылки агента для вакансии + parameters: + - description: ID агента + in: path + name: agent_id + required: true + type: string + - description: ID вакансии + in: path + name: vacancy_id + required: true + type: string + produces: + - application/json + responses: + "200": + description: Персональная ссылка + schema: + $ref: '#/definitions/git-molva_ru_Molva_molva-backend_services_api_gateway_internal_types.PersonalLinkResponse' + "400": + description: Неверные данные запроса + schema: + additionalProperties: + type: string + type: object + "401": + description: Неавторизованный доступ + schema: + additionalProperties: + type: string + type: object + "500": + description: Внутренняя ошибка сервера + schema: + additionalProperties: + type: string + type: object + security: + - BearerAuth: [] + summary: Получить персональную ссылку + tags: + - agents + /api/v1/anketa: + get: + consumes: + - application/json + description: Получение HTML формы анкеты для клиента + parameters: + - description: Зашифрованная ссылка с параметрами + in: query + name: link + required: true + type: string + produces: + - text/html + responses: + "200": + description: HTML форма анкеты + schema: + type: string + "400": + description: Неверные данные запроса + schema: + additionalProperties: + type: string + type: object + "404": + description: Вакансия не найдена + schema: + additionalProperties: + type: string + type: object + "500": + description: Внутренняя ошибка сервера + schema: + additionalProperties: + type: string + type: object + summary: Получить анкету + tags: + - clients + post: + consumes: + - application/json + description: Отправка заполненной анкеты клиента + parameters: + - description: Данные анкеты + in: body + name: request + required: true + schema: + additionalProperties: true + type: object + produces: + - application/json + responses: + "201": + description: Анкета отправлена + schema: + additionalProperties: + type: string + type: object + "400": + description: Неверные данные запроса + schema: + additionalProperties: + type: string + type: object + "500": + description: Внутренняя ошибка сервера + schema: + additionalProperties: + type: string + type: object + summary: Отправить анкету + tags: + - clients + /api/v1/companies/{company_id}/employees: + get: + consumes: + - application/json + description: Получение списка сотрудников компании + parameters: + - description: ID компании + in: path + name: company_id + required: true + type: string + - description: ID пользователя + in: query + name: uid + required: true + type: string + produces: + - application/json + responses: + "200": + description: Список сотрудников + schema: + $ref: '#/definitions/git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.EmployeeResponse' + "400": + description: Неверные данные запроса + schema: + additionalProperties: + type: string + type: object + "401": + description: Неавторизованный доступ + schema: + additionalProperties: + type: string + type: object + "500": + description: Внутренняя ошибка сервера + schema: + additionalProperties: + type: string + type: object + security: + - BearerAuth: [] + summary: Получить список сотрудников компании + tags: + - employees + /api/v1/confirm_email: + get: + consumes: + - text/html + description: HTML страница для подтверждения email адреса пользователя + parameters: + - description: ID пользователя + in: query + name: uid + required: true + type: string + - description: Токен подтверждения + in: query + name: token + required: true + type: string + produces: + - text/html + responses: + "200": + description: HTML страница подтверждения + schema: + type: string + "400": + description: Неверные параметры запроса + schema: + additionalProperties: + type: string + type: object + "500": + description: Внутренняя ошибка сервера + schema: + additionalProperties: + type: string + type: object + summary: Страница подтверждения email + tags: + - auth + /api/v1/distributor/{distributor_id}/balance: + get: + consumes: + - application/json + description: Получение текущего баланса дистрибьютора + parameters: + - description: ID дистрибьютора + in: path + name: distributor_id + required: true + type: string + produces: + - application/json + responses: + "200": + description: Баланс дистрибьютора + schema: + $ref: '#/definitions/git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.BalanceGetResponse' + "400": + description: Неверные параметры запроса + schema: + additionalProperties: + type: string + type: object + "500": + description: Внутренняя ошибка сервера + schema: + additionalProperties: + type: string + type: object + security: + - BearerAuth: [] + summary: Получить баланс дистрибьютора + tags: + - distributors + /api/v1/distributor/{distributor_id}/bank_accounts: + get: + consumes: + - application/json + description: Получение списка банковских счетов дистрибьютора + parameters: + - description: ID дистрибьютора + in: path + name: distributor_id + required: true + type: string + produces: + - application/json + responses: + "200": + description: Список банковских счетов + schema: + $ref: '#/definitions/git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.BankAccountListGetResponse' + "400": + description: Неверные параметры запроса + schema: + additionalProperties: + type: string + type: object + "500": + description: Внутренняя ошибка сервера + schema: + additionalProperties: + type: string + type: object + security: + - BearerAuth: [] + summary: Получить список банковских счетов дистрибьютора + tags: + - distributors + /api/v1/distributor/{distributor_id}/bank_accounts/{bank_account_id}: + delete: + consumes: + - application/json + description: Удаление банковского счета дистрибьютора + parameters: + - description: ID дистрибьютора + in: path + name: distributor_id + required: true + type: string + - description: ID банковского счета + in: path + name: bank_account_id + required: true + type: string + produces: + - application/json + responses: + "200": + description: Банковский счет удален + schema: + additionalProperties: + type: string + type: object + "400": + description: Неверные параметры запроса + schema: + additionalProperties: + type: string + type: object + "500": + description: Внутренняя ошибка сервера + schema: + additionalProperties: + type: string + type: object + security: + - BearerAuth: [] + summary: Удалить банковский счет дистрибьютора + tags: + - distributors + put: + consumes: + - application/json + description: Обновление информации о банковском счете дистрибьютора + parameters: + - description: ID дистрибьютора + in: path + name: distributor_id + required: true + type: string + - description: ID банковского счета + in: path + name: bank_account_id + required: true + type: string + - description: Данные для обновления + in: body + name: request + required: true + schema: + $ref: '#/definitions/git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.BankAccountUpdateRequest' + produces: + - application/json + responses: + "200": + description: Банковский счет обновлен + schema: + additionalProperties: + type: string + type: object + "400": + description: Неверные данные запроса + schema: + additionalProperties: + type: string + type: object + "500": + description: Внутренняя ошибка сервера + schema: + additionalProperties: + type: string + type: object + security: + - BearerAuth: [] + summary: Обновить банковский счет дистрибьютора + tags: + - distributors + /api/v1/distributor/{distributor_id}/companies: + get: + consumes: + - application/json + description: Получение списка всех компаний, принадлежащих дистрибьютору + parameters: + - description: ID дистрибьютора + in: path + name: distributor_id + required: true + type: string + produces: + - application/json + responses: + "200": + description: Список компаний + schema: + $ref: '#/definitions/git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.CompanyListGetResponse' + "400": + description: Неверные данные запроса + schema: + additionalProperties: + type: string + type: object + "401": + description: Неавторизованный доступ + schema: + additionalProperties: + type: string + type: object + "500": + description: Внутренняя ошибка сервера + schema: + additionalProperties: + type: string + type: object + security: + - BearerAuth: [] + summary: Получить список компаний дистрибьютора + tags: + - distributors + /api/v1/distributor/{distributor_id}/company: + post: + consumes: + - application/json + description: Создание новой компании для дистрибьютора + parameters: + - description: ID дистрибьютора + in: path + name: distributor_id + required: true + type: string + - description: Данные для создания компании + in: body + name: request + required: true + schema: + $ref: '#/definitions/git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.CompanyCreateRequest' + produces: + - application/json + responses: + "201": + description: Компания создана + schema: + $ref: '#/definitions/git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.CompanyCreateResponse' + "400": + description: Неверные данные запроса + schema: + additionalProperties: + type: string + type: object + "401": + description: Неавторизованный доступ + schema: + additionalProperties: + type: string + type: object + "500": + description: Внутренняя ошибка сервера + schema: + additionalProperties: + type: string + type: object + security: + - BearerAuth: [] + summary: Создать компанию дистрибьютора + tags: + - distributors + /api/v1/distributor/{distributor_id}/company/{company_id}: + get: + consumes: + - application/json + description: Получение детальной информации о компании дистрибьютора + parameters: + - description: ID дистрибьютора + in: path + name: distributor_id + required: true + type: string + - description: ID компании + in: path + name: company_id + required: true + type: string + produces: + - application/json + responses: + "200": + description: Информация о компании + schema: + $ref: '#/definitions/git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.CompanyByIdGetResponse' + "400": + description: Неверные данные запроса + schema: + additionalProperties: + type: string + type: object + "401": + description: Неавторизованный доступ + schema: + additionalProperties: + type: string + type: object + "404": + description: Компания не найдена + schema: + additionalProperties: + type: string + type: object + "500": + description: Внутренняя ошибка сервера + schema: + additionalProperties: + type: string + type: object + security: + - BearerAuth: [] + summary: Получить компанию дистрибьютора по ID + tags: + - distributors + patch: + consumes: + - application/json + description: Обновление информации о компании дистрибьютора + parameters: + - description: ID дистрибьютора + in: path + name: distributor_id + required: true + type: string + - description: ID компании + in: path + name: company_id + required: true + type: string + - description: Данные для обновления + in: body + name: request + required: true + schema: + $ref: '#/definitions/git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.CompanyUpdateRequest' + produces: + - application/json + responses: + "204": + description: Компания обновлена + "400": + description: Неверные данные запроса + schema: + additionalProperties: + type: string + type: object + "401": + description: Неавторизованный доступ + schema: + additionalProperties: + type: string + type: object + "404": + description: Компания не найдена + schema: + additionalProperties: + type: string + type: object + "500": + description: Внутренняя ошибка сервера + schema: + additionalProperties: + type: string + type: object + security: + - BearerAuth: [] + summary: Обновить компанию дистрибьютора + tags: + - distributors + post: + consumes: + - application/json + description: Добавление нового участника в компанию дистрибьютора + parameters: + - description: ID дистрибьютора + in: path + name: distributor_id + required: true + type: string + - description: ID компании + in: path + name: company_id + required: true + type: string + - description: Данные участника + in: body + name: request + required: true + schema: + $ref: '#/definitions/git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.AddDistributorCompanyMemberRequest' + produces: + - application/json + responses: + "201": + description: Участник добавлен + "400": + description: Неверные данные запроса + schema: + additionalProperties: + type: string + type: object + "401": + description: Неавторизованный доступ + schema: + additionalProperties: + type: string + type: object + "404": + description: Компания не найдена + schema: + additionalProperties: + type: string + type: object + "500": + description: Внутренняя ошибка сервера + schema: + additionalProperties: + type: string + type: object + security: + - BearerAuth: [] + summary: Добавить участника в компанию + tags: + - distributors + /api/v1/distributor/{distributor_id}/company/{company_id}/balance: + get: + consumes: + - application/json + description: Получение баланса конкретной компании дистрибьютора + parameters: + - description: ID дистрибьютора + in: path + name: distributor_id + required: true + type: string + - description: ID компании + in: path + name: company_id + required: true + type: string + produces: + - application/json + responses: + "200": + description: Баланс компании + schema: + $ref: '#/definitions/git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.BalanceGetResponse' + "400": + description: Неверные параметры запроса + schema: + additionalProperties: + type: string + type: object + "500": + description: Внутренняя ошибка сервера + schema: + additionalProperties: + type: string + type: object + security: + - BearerAuth: [] + summary: Получить баланс компании дистрибьютора + tags: + - distributors + /api/v1/distributor/{distributor_id}/company/{company_id}/bank_accounts: + get: + consumes: + - application/json + description: Получение списка банковских счетов конкретной компании дистрибьютора + parameters: + - description: ID дистрибьютора + in: path + name: distributor_id + required: true + type: string + - description: ID компании + in: path + name: company_id + required: true + type: string + produces: + - application/json + responses: + "200": + description: Список банковских счетов компании + schema: + $ref: '#/definitions/git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.BankAccountListGetResponse' + "400": + description: Неверные параметры запроса + schema: + additionalProperties: + type: string + type: object + "500": + description: Внутренняя ошибка сервера + schema: + additionalProperties: + type: string + type: object + security: + - BearerAuth: [] + summary: Получить список банковских счетов компании дистрибьютора + tags: + - distributors + post: + consumes: + - application/json + description: Создание нового банковского счета для компании дистрибьютора + parameters: + - description: ID дистрибьютора + in: path + name: distributor_id + required: true + type: string + - description: ID компании + in: path + name: company_id + required: true + type: string + - description: Данные банковского счета + in: body + name: request + required: true + schema: + $ref: '#/definitions/git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.BankAccountCreateRequest' + produces: + - application/json + responses: + "201": + description: Банковский счет создан + schema: + $ref: '#/definitions/git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.BankAccountCreateResponse' + "400": + description: Неверные данные запроса + schema: + additionalProperties: + type: string + type: object + "500": + description: Внутренняя ошибка сервера + schema: + additionalProperties: + type: string + type: object + security: + - BearerAuth: [] + summary: Создать банковский счет компании дистрибьютора + tags: + - distributors + /api/v1/distributor/{distributor_id}/company/{company_id}/logo: + delete: + consumes: + - application/json + description: Удаление логотипа компании дистрибьютора + parameters: + - description: ID дистрибьютора + in: path + name: distributor_id + required: true + type: string + - description: ID компании + in: path + name: company_id + required: true + type: string + produces: + - application/json + responses: + "200": + description: Логотип удален + schema: + additionalProperties: + type: string + type: object + "400": + description: Неверные параметры запроса + schema: + additionalProperties: + type: string + type: object + "500": + description: Внутренняя ошибка сервера + schema: + additionalProperties: + type: string + type: object + security: + - BearerAuth: [] + summary: Удалить логотип компании + tags: + - distributors + get: + consumes: + - application/json + description: Получение логотипа компании дистрибьютора + parameters: + - description: ID дистрибьютора + in: path + name: distributor_id + required: true + type: string + - description: ID компании + in: path + name: company_id + required: true + type: string + produces: + - application/json + responses: + "200": + description: Логотип компании + schema: + type: file + "400": + description: Неверные параметры запроса + schema: + additionalProperties: + type: string + type: object + "404": + description: Логотип не найден + schema: + additionalProperties: + type: string + type: object + "500": + description: Внутренняя ошибка сервера + schema: + additionalProperties: + type: string + type: object + security: + - BearerAuth: [] + summary: Получить логотип компании + tags: + - distributors + post: + consumes: + - multipart/form-data + description: Загрузка нового логотипа для компании дистрибьютора + parameters: + - description: ID дистрибьютора + in: path + name: distributor_id + required: true + type: string + - description: ID компании + in: path + name: company_id + required: true + type: string + - description: Файл логотипа + in: formData + name: logo + required: true + type: file + produces: + - application/json + responses: + "201": + description: Логотип загружен + schema: + additionalProperties: + type: string + type: object + "400": + description: Неверные данные запроса + schema: + additionalProperties: + type: string + type: object + "500": + description: Внутренняя ошибка сервера + schema: + additionalProperties: + type: string + type: object + security: + - BearerAuth: [] + summary: Создать логотип компании + tags: + - distributors + put: + consumes: + - multipart/form-data + description: Обновление логотипа компании дистрибьютора + parameters: + - description: ID дистрибьютора + in: path + name: distributor_id + required: true + type: string + - description: ID компании + in: path + name: company_id + required: true + type: string + - description: Новый файл логотипа + in: formData + name: logo + required: true + type: file + produces: + - application/json + responses: + "200": + description: Логотип обновлен + schema: + additionalProperties: + type: string + type: object + "400": + description: Неверные данные запроса + schema: + additionalProperties: + type: string + type: object + "500": + description: Внутренняя ошибка сервера + schema: + additionalProperties: + type: string + type: object + security: + - BearerAuth: [] + summary: Обновить логотип компании + tags: + - distributors + /api/v1/distributor/{distributor_id}/company/{company_id}/transactions: + get: + consumes: + - application/json + description: Получение списка транзакций конкретной компании дистрибьютора + parameters: + - description: ID дистрибьютора + in: path + name: distributor_id + required: true + type: string + - description: ID компании + in: path + name: company_id + required: true + type: string + produces: + - application/json + responses: + "200": + description: Список транзакций компании + schema: + $ref: '#/definitions/git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.TransactionListGetResponse' + "400": + description: Неверные параметры запроса + schema: + additionalProperties: + type: string + type: object + "500": + description: Внутренняя ошибка сервера + schema: + additionalProperties: + type: string + type: object + security: + - BearerAuth: [] + summary: Получить список транзакций компании дистрибьютора + tags: + - distributors + /api/v1/distributor/{distributor_id}/profile: + get: + consumes: + - application/json + description: Получение профиля дистрибьютора по ID + parameters: + - description: ID дистрибьютора + in: path + name: distributor_id + required: true + type: string + produces: + - application/json + responses: + "200": + description: Профиль дистрибьютора + schema: + $ref: '#/definitions/git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.ProfileGetResponse' + "400": + description: Неверные параметры запроса + schema: + additionalProperties: + type: string + type: object + "500": + description: Внутренняя ошибка сервера + schema: + additionalProperties: + type: string + type: object + security: + - BearerAuth: [] + summary: Получить профиль дистрибьютора + tags: + - distributors + put: + consumes: + - application/json + description: Обновление профиля дистрибьютора + parameters: + - description: ID дистрибьютора + in: path + name: distributor_id + required: true + type: string + - description: Данные для обновления профиля + in: body + name: request + required: true + schema: + $ref: '#/definitions/git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.ProfileUpdateRequest' + produces: + - application/json + responses: + "200": + description: Профиль обновлен + schema: + additionalProperties: + type: string + type: object + "400": + description: Неверные данные запроса + schema: + additionalProperties: + type: string + type: object + "500": + description: Внутренняя ошибка сервера + schema: + additionalProperties: + type: string + type: object + security: + - BearerAuth: [] + summary: Обновить профиль дистрибьютора + tags: + - distributors + /api/v1/distributor/{distributor_id}/transactions: + get: + consumes: + - application/json + description: Получение списка транзакций дистрибьютора с возможностью фильтрации + parameters: + - description: ID дистрибьютора + in: path + name: distributor_id + required: true + type: string + produces: + - application/json + responses: + "200": + description: Список транзакций + schema: + $ref: '#/definitions/git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.TransactionListGetResponse' + "400": + description: Неверные параметры запроса + schema: + additionalProperties: + type: string + type: object + "500": + description: Внутренняя ошибка сервера + schema: + additionalProperties: + type: string + type: object + security: + - BearerAuth: [] + summary: Получить список транзакций дистрибьютора + tags: + - distributors + post: + consumes: + - application/json + description: Создание новой транзакции для дистрибьютора + parameters: + - description: ID дистрибьютора + in: path + name: distributor_id + required: true + type: string + - description: Данные транзакции + in: body + name: request + required: true + schema: + $ref: '#/definitions/git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.TransactionCreateRequest' + produces: + - application/json + responses: + "201": + description: Транзакция создана + schema: + $ref: '#/definitions/git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.TransactionCreateResponse' + "400": + description: Неверные данные запроса + schema: + additionalProperties: + type: string + type: object + "500": + description: Внутренняя ошибка сервера + schema: + additionalProperties: + type: string + type: object + security: + - BearerAuth: [] + summary: Создать транзакцию дистрибьютора + tags: + - distributors + /api/v1/distributor/{distributor_id}/vacancies: + get: + consumes: + - application/json + description: Получение списка вакансий дистрибьютора с возможностью фильтрации + parameters: + - description: ID дистрибьютора + in: path + name: distributor_id + required: true + type: string + - description: ID компании + in: query + name: company_id + type: string + - description: Регион + in: query + name: region + type: string + - description: Минимальная зарплата + in: query + name: salary_bottom + type: integer + - description: Максимальная зарплата + in: query + name: salary_top + type: integer + - description: Архивные вакансии + in: query + name: is_archived + type: boolean + - description: Статус вакансии + in: query + name: status + type: string + - description: Номер страницы + in: query + name: page + type: integer + - description: Размер страницы + in: query + name: page_size + type: integer + produces: + - application/json + responses: + "200": + description: Список вакансий + schema: + $ref: '#/definitions/git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.VacancyListGetResponse' + "400": + description: Неверные данные запроса + schema: + additionalProperties: + type: string + type: object + "401": + description: Неавторизованный доступ + schema: + additionalProperties: + type: string + type: object + "500": + description: Внутренняя ошибка сервера + schema: + additionalProperties: + type: string + type: object + security: + - BearerAuth: [] + summary: Получить список вакансий дистрибьютора + tags: + - distributors + post: + consumes: + - application/json + description: Создание новой вакансии дистрибьютором + parameters: + - description: ID дистрибьютора + in: path + name: distributor_id + required: true + type: string + - description: Данные для создания вакансии + in: body + name: request + required: true + schema: + $ref: '#/definitions/git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.VacancyCreateRequest' + produces: + - application/json + responses: + "201": + description: Вакансия создана + schema: + $ref: '#/definitions/git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.VacancyCreateResponse' + "400": + description: Неверные данные запроса + schema: + additionalProperties: + type: string + type: object + "401": + description: Неавторизованный доступ + schema: + additionalProperties: + type: string + type: object + "500": + description: Внутренняя ошибка сервера + schema: + additionalProperties: + type: string + type: object + security: + - BearerAuth: [] + summary: Создать вакансию + tags: + - distributors + /api/v1/distributor/{distributor_id}/vacancies/{vacancy_id}: + delete: + consumes: + - application/json + description: Удаление вакансии дистрибьютора + parameters: + - description: ID дистрибьютора + in: path + name: distributor_id + required: true + type: string + - description: ID вакансии + in: path + name: vacancy_id + required: true + type: string + produces: + - application/json + responses: + "204": + description: Вакансия удалена + "400": + description: Неверные данные запроса + schema: + additionalProperties: + type: string + type: object + "401": + description: Неавторизованный доступ + schema: + additionalProperties: + type: string + type: object + "404": + description: Вакансия не найдена + schema: + additionalProperties: + type: string + type: object + "500": + description: Внутренняя ошибка сервера + schema: + additionalProperties: + type: string + type: object + security: + - BearerAuth: [] + summary: Удалить вакансию + tags: + - distributors + patch: + consumes: + - application/json + description: Обновление информации о вакансии дистрибьютора + parameters: + - description: ID дистрибьютора + in: path + name: distributor_id + required: true + type: string + - description: ID вакансии + in: path + name: vacancy_id + required: true + type: string + - description: Данные для обновления + in: body + name: request + required: true + schema: + $ref: '#/definitions/git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.VacancyUpdateRequest' + produces: + - application/json + responses: + "204": + description: Вакансия обновлена + "400": + description: Неверные данные запроса + schema: + additionalProperties: + type: string + type: object + "401": + description: Неавторизованный доступ + schema: + additionalProperties: + type: string + type: object + "404": + description: Вакансия не найдена + schema: + additionalProperties: + type: string + type: object + "500": + description: Внутренняя ошибка сервера + schema: + additionalProperties: + type: string + type: object + security: + - BearerAuth: [] + summary: Обновить вакансию + tags: + - distributors + /api/v1/distributor/{distributor_id}/vacancies/{vacancy_id}/moderation: + post: + consumes: + - application/json + description: Отправка вакансии дистрибьютора на модерацию + parameters: + - description: ID дистрибьютора + in: path + name: distributor_id + required: true + type: string + - description: ID вакансии + in: path + name: vacancy_id + required: true + type: string + produces: + - application/json + responses: + "200": + description: Вакансия отправлена на модерацию + schema: + additionalProperties: + type: string + type: object + "400": + description: Неверные параметры запроса + schema: + additionalProperties: + type: string + type: object + "500": + description: Внутренняя ошибка сервера + schema: + additionalProperties: + type: string + type: object + security: + - BearerAuth: [] + summary: Отправить вакансию на модерацию + tags: + - distributors + /api/v1/distributor/{distributor_id}/vacancies/{vacancy_id}/submissions: + get: + consumes: + - application/json + description: Получение списка заявок дистрибьютора с возможностью фильтрации + parameters: + - description: ID дистрибьютора + in: path + name: distributor_id + required: true + type: string + - description: ID вакансии + in: path + name: vacancy_id + required: true + type: string + - description: Статус заявки + in: query + name: status + type: string + - description: Номер страницы + in: query + name: page + type: integer + - description: Размер страницы + in: query + name: page_size + type: integer + produces: + - application/json + responses: + "200": + description: Список заявок + schema: + $ref: '#/definitions/git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.SubmissionListGetResponse' + "400": + description: Неверные данные запроса + schema: + additionalProperties: + type: string + type: object + "401": + description: Неавторизованный доступ + schema: + additionalProperties: + type: string + type: object + "500": + description: Внутренняя ошибка сервера + schema: + additionalProperties: + type: string + type: object + security: + - BearerAuth: [] + summary: Получить список заявок дистрибьютора + tags: + - distributors + /api/v1/distributor/{distributor_id}/vacancies/{vacancy_id}/submissions/{submission_id}/status: + post: + consumes: + - application/json + description: Обновление статуса заявки дистрибьютором + parameters: + - description: ID дистрибьютора + in: path + name: distributor_id + required: true + type: string + - description: ID вакансии + in: path + name: vacancy_id + required: true + type: string + - description: ID заявки + in: path + name: submission_id + required: true + type: string + - description: Новый статус заявки + in: body + name: request + required: true + schema: + $ref: '#/definitions/git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.SubmissionStatusUpdateRequest' + produces: + - application/json + responses: + "200": + description: Статус обновлен + "400": + description: Неверные данные запроса + schema: + additionalProperties: + type: string + type: object + "401": + description: Неавторизованный доступ + schema: + additionalProperties: + type: string + type: object + "404": + description: Заявка не найдена + schema: + additionalProperties: + type: string + type: object + "500": + description: Внутренняя ошибка сервера + schema: + additionalProperties: + type: string + type: object + security: + - BearerAuth: [] + summary: Обновить статус заявки + tags: + - distributors + /api/v1/docs/{file}: + get: + consumes: + - application/json + description: Получение файла документа по имени + parameters: + - description: Имя файла + in: path + name: file + required: true + type: string + produces: + - application/octet-stream + responses: + "200": + description: Файл документа + schema: + type: file + "404": + description: Файл не найден + schema: + additionalProperties: + type: string + type: object + "500": + description: Внутренняя ошибка сервера + schema: + additionalProperties: + type: string + type: object + summary: Получить файл документа + tags: + - system + /api/v1/feed/{uid}/events: + get: + consumes: + - application/json + description: Получение ленты событий пользователя с возможностью фильтрации + parameters: + - description: ID пользователя + in: path + name: uid + required: true + type: string + - description: Тип пользователя (agent/distributor) + in: query + name: user_type + required: true + type: string + - description: Тип события (через запятую) + in: query + name: event_type + type: string + - description: Показывать отмененные события + in: query + name: show_cancelled + type: boolean + - description: Лимит событий + in: query + name: limit + type: integer + - description: Смещение + in: query + name: offset + type: integer + produces: + - application/json + responses: + "200": + description: Список событий + schema: + items: + $ref: '#/definitions/git-molva_ru_Molva_molva-backend_services_api_gateway_internal_feed.Event' + type: array + "400": + description: Неверные данные запроса + schema: + additionalProperties: + type: string + type: object + "401": + description: Неавторизованный доступ + schema: + additionalProperties: + type: string + type: object + "500": + description: Внутренняя ошибка сервера + schema: + additionalProperties: + type: string + type: object + security: + - BearerAuth: [] + summary: Получить события пользователя + tags: + - feed + /api/v1/forgot_password: + post: + consumes: + - application/json + description: Отправка OTP кода на email для восстановления пароля + parameters: + - description: Данные для восстановления пароля + in: body + name: request + required: true + schema: + $ref: '#/definitions/git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.ForgotPasswordRequest' + produces: + - application/json + responses: + "200": + description: OTP код отправлен + schema: + additionalProperties: + type: string + type: object + "400": + description: Неверные данные запроса + schema: + additionalProperties: + type: string + type: object + "500": + description: Внутренняя ошибка сервера + schema: + additionalProperties: + type: string + type: object + summary: Запрос восстановления пароля + tags: + - auth + /api/v1/healthcheck: + get: + consumes: + - application/json + description: Получение информации о версии, коммите и дате сборки приложения + produces: + - application/json + responses: + "200": + description: Информация о сборке + schema: + additionalProperties: + type: string + type: object + summary: Получить информацию о сборке + tags: + - system + /api/v1/integration/vkusvill/callback: + post: + consumes: + - application/json + description: Обработка callback запросов от интеграции с ВкусВилл + parameters: + - description: Данные callback от ВкусВилл + in: body + name: request + required: true + schema: + additionalProperties: true + type: object + produces: + - application/json + responses: + "200": + description: Callback обработан + schema: + additionalProperties: + type: string + type: object + "400": + description: Неверные данные запроса + schema: + additionalProperties: + type: string + type: object + "500": + description: Внутренняя ошибка сервера + schema: + additionalProperties: + type: string + type: object + summary: Callback интеграции с ВкусВилл + tags: + - integration + /api/v1/login: + post: + consumes: + - application/json + description: Аутентификация пользователя по email и паролю + parameters: + - description: Данные для входа + in: body + name: request + required: true + schema: + $ref: '#/definitions/git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.LoginUserRequest' + produces: + - application/json + responses: + "200": + description: Успешная аутентификация + schema: + $ref: '#/definitions/git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.LoginUserResponse' + "400": + description: Неверные данные запроса + schema: + additionalProperties: + type: string + type: object + "401": + description: Неверные учетные данные + schema: + additionalProperties: + type: string + type: object + "500": + description: Внутренняя ошибка сервера + schema: + additionalProperties: + type: string + type: object + summary: Вход пользователя + tags: + - auth + /api/v1/logout: + post: + consumes: + - application/json + description: Завершение сессии пользователя + parameters: + - description: Токен для выхода + in: body + name: request + required: true + schema: + $ref: '#/definitions/git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.LogoutUserRequest' + produces: + - application/json + responses: + "200": + description: Успешный выход + "400": + description: Неверные данные запроса + schema: + additionalProperties: + type: string + type: object + "401": + description: Неверный токен + schema: + additionalProperties: + type: string + type: object + "500": + description: Внутренняя ошибка сервера + schema: + additionalProperties: + type: string + type: object + summary: Выход пользователя + tags: + - auth + /api/v1/refresh-token: + post: + consumes: + - application/json + description: Получение нового access token по refresh token + parameters: + - description: Refresh token + in: body + name: request + required: true + schema: + $ref: '#/definitions/git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.RefreshTokenRequest' + produces: + - application/json + responses: + "200": + description: Новые токены + schema: + $ref: '#/definitions/git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.RefreshTokenResponse' + "400": + description: Неверные данные запроса + schema: + additionalProperties: + type: string + type: object + "401": + description: Неверный refresh token + schema: + additionalProperties: + type: string + type: object + "500": + description: Внутренняя ошибка сервера + schema: + additionalProperties: + type: string + type: object + summary: Обновление токена доступа + tags: + - auth + /api/v1/register: + post: + consumes: + - application/json + description: Создание нового пользователя в системе + parameters: + - description: Данные для регистрации + in: body + name: request + required: true + schema: + $ref: '#/definitions/git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.UserCredentials' + produces: + - application/json + responses: + "201": + description: Пользователь успешно создан + schema: + $ref: '#/definitions/git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.RegisterResponse' + "400": + description: Неверные данные запроса + schema: + additionalProperties: + type: string + type: object + "409": + description: Пользователь уже существует + schema: + additionalProperties: + type: string + type: object + "500": + description: Внутренняя ошибка сервера + schema: + additionalProperties: + type: string + type: object + summary: Регистрация пользователя + tags: + - auth + /api/v1/reset_password: + put: + consumes: + - application/json + description: Установка нового пароля после валидации OTP кода + parameters: + - description: Данные для сброса пароля + in: body + name: request + required: true + schema: + $ref: '#/definitions/git-molva_ru_Molva_molva-backend_services_api_gateway_internal_request_model.ResetPasswordRequest' + produces: + - application/json + responses: + "200": + description: Пароль успешно изменен + schema: + additionalProperties: + type: string + type: object + "400": + description: Неверные данные запроса + schema: + additionalProperties: + type: string + type: object + "500": + description: Внутренняя ошибка сервера + schema: + additionalProperties: + type: string + type: object + summary: Сброс пароля + tags: + - auth + /api/v1/validate_otp: + get: + consumes: + - application/json + description: Проверка OTP кода для восстановления пароля + parameters: + - description: OTP код + in: query + name: otp + required: true + type: string + - description: Email пользователя + in: query + name: email + required: true + type: string + produces: + - application/json + responses: + "200": + description: OTP код валиден + schema: + additionalProperties: + type: string + type: object + "400": + description: Неверные параметры запроса + schema: + additionalProperties: + type: string + type: object + "500": + description: Внутренняя ошибка сервера + schema: + additionalProperties: + type: string + type: object + summary: Валидация OTP кода + tags: + - auth + /api/v1/verify_email: + get: + consumes: + - application/json + description: Получение статуса подтверждения email адреса пользователя + parameters: + - description: ID пользователя + in: query + name: uid + required: true + type: string + produces: + - application/json + responses: + "200": + description: Статус подтверждения email + schema: + additionalProperties: + type: string + type: object + "400": + description: Неверные параметры запроса + schema: + additionalProperties: + type: string + type: object + "500": + description: Внутренняя ошибка сервера + schema: + additionalProperties: + type: string + type: object + summary: Статус подтверждения email + tags: + - auth + patch: + consumes: + - application/json + description: Подтверждение email адреса пользователя по токену + parameters: + - description: ID пользователя + in: query + name: uid + required: true + type: string + - description: Токен подтверждения + in: query + name: token + required: true + type: string + produces: + - application/json + responses: + "200": + description: Email успешно подтвержден + schema: + additionalProperties: + type: string + type: object + "400": + description: Неверные параметры запроса + schema: + additionalProperties: + type: string + type: object + "500": + description: Внутренняя ошибка сервера + schema: + additionalProperties: + type: string + type: object + summary: Подтверждение email + tags: + - auth +schemes: +- http +- https +securityDefinitions: + BearerAuth: + description: Type "Bearer" followed by a space and JWT token. + in: header + name: Authorization + type: apiKey +swagger: "2.0" diff --git a/internal/http/swagger/models.go b/internal/http/swagger/models.go new file mode 100644 index 0000000..d497ad6 --- /dev/null +++ b/internal/http/swagger/models.go @@ -0,0 +1,14 @@ +package swagger + +// ErrorResponse представляет стандартный ответ об ошибке +type ErrorResponse struct { + Error string `json:"error" example:"Bad Request"` + Message string `json:"message" example:"Invalid request parameters"` + Code int `json:"code" example:"400"` +} + +// SuccessResponse представляет стандартный ответ об успехе +type SuccessResponse struct { + Message string `json:"message" example:"Operation completed successfully"` + Code int `json:"code" example:"200"` +} diff --git a/internal/http/vacancy.go b/internal/http/vacancy.go index f20640b..1e10b05 100644 --- a/internal/http/vacancy.go +++ b/internal/http/vacancy.go @@ -34,6 +34,27 @@ func (h *handler) setVacancyLogoLinks( } } +// @Summary Получить список вакансий для агента +// @Description Получение списка вакансий с возможностью фильтрации +// @Tags agents +// @Accept json +// @Produce json +// @Param agent_id path string true "ID агента" +// @Param distributor_id query string false "ID дистрибьютора" +// @Param company_id query string false "ID компании" +// @Param region query string false "Регион" +// @Param salary_bottom query int false "Минимальная зарплата" +// @Param salary_top query int false "Максимальная зарплата" +// @Param is_archived query bool false "Архивные вакансии" +// @Param status query string false "Статус вакансии" +// @Param page query int false "Номер страницы" +// @Param page_size query int false "Размер страницы" +// @Success 200 {object} rmodel.VacancyListGetResponse "Список вакансий" +// @Failure 400 {object} map[string]string "Неверные данные запроса" +// @Failure 401 {object} map[string]string "Неавторизованный доступ" +// @Failure 500 {object} map[string]string "Внутренняя ошибка сервера" +// @Security BearerAuth +// @Router /api/v1/agents/{agent_id}/vacancies [get] func (h *handler) getVacancyListAgentHandler(w http.ResponseWriter, r *http.Request) { const handlerName = "getVacancyListAgentHandler" @@ -71,6 +92,26 @@ func (h *handler) getVacancyListAgentHandler(w http.ResponseWriter, r *http.Requ } } +// @Summary Получить список вакансий дистрибьютора +// @Description Получение списка вакансий дистрибьютора с возможностью фильтрации +// @Tags distributors +// @Accept json +// @Produce json +// @Param distributor_id path string true "ID дистрибьютора" +// @Param company_id query string false "ID компании" +// @Param region query string false "Регион" +// @Param salary_bottom query int false "Минимальная зарплата" +// @Param salary_top query int false "Максимальная зарплата" +// @Param is_archived query bool false "Архивные вакансии" +// @Param status query string false "Статус вакансии" +// @Param page query int false "Номер страницы" +// @Param page_size query int false "Размер страницы" +// @Success 200 {object} rmodel.VacancyListGetResponse "Список вакансий" +// @Failure 400 {object} map[string]string "Неверные данные запроса" +// @Failure 401 {object} map[string]string "Неавторизованный доступ" +// @Failure 500 {object} map[string]string "Внутренняя ошибка сервера" +// @Security BearerAuth +// @Router /api/v1/distributor/{distributor_id}/vacancies [get] func (h *handler) getVacancyListDistributorHandler(w http.ResponseWriter, r *http.Request) { const handlerName = "getVacancyListDistributorHandler" @@ -106,6 +147,19 @@ func (h *handler) getVacancyListDistributorHandler(w http.ResponseWriter, r *htt } } +// @Summary Создать вакансию +// @Description Создание новой вакансии дистрибьютором +// @Tags distributors +// @Accept json +// @Produce json +// @Param distributor_id path string true "ID дистрибьютора" +// @Param request body rmodel.VacancyCreateRequest true "Данные для создания вакансии" +// @Success 201 {object} rmodel.VacancyCreateResponse "Вакансия создана" +// @Failure 400 {object} map[string]string "Неверные данные запроса" +// @Failure 401 {object} map[string]string "Неавторизованный доступ" +// @Failure 500 {object} map[string]string "Внутренняя ошибка сервера" +// @Security BearerAuth +// @Router /api/v1/distributor/{distributor_id}/vacancies [post] func (h *handler) createVacancyDistributorHandler(w http.ResponseWriter, r *http.Request) { const handlerName = "createVacancyDistributorHandler" @@ -158,6 +212,21 @@ func (h *handler) createVacancyDistributorHandler(w http.ResponseWriter, r *http } } +// @Summary Обновить вакансию +// @Description Обновление информации о вакансии дистрибьютора +// @Tags distributors +// @Accept json +// @Produce json +// @Param distributor_id path string true "ID дистрибьютора" +// @Param vacancy_id path string true "ID вакансии" +// @Param request body rmodel.VacancyUpdateRequest true "Данные для обновления" +// @Success 204 "Вакансия обновлена" +// @Failure 400 {object} map[string]string "Неверные данные запроса" +// @Failure 401 {object} map[string]string "Неавторизованный доступ" +// @Failure 404 {object} map[string]string "Вакансия не найдена" +// @Failure 500 {object} map[string]string "Внутренняя ошибка сервера" +// @Security BearerAuth +// @Router /api/v1/distributor/{distributor_id}/vacancies/{vacancy_id} [patch] func (h *handler) updateVacancyDistributorHandler(w http.ResponseWriter, r *http.Request) { const handlerName = "updateVacancyDistributorHandler" @@ -201,6 +270,20 @@ func (h *handler) updateVacancyDistributorHandler(w http.ResponseWriter, r *http w.WriteHeader(http.StatusNoContent) } +// @Summary Удалить вакансию +// @Description Удаление вакансии дистрибьютора +// @Tags distributors +// @Accept json +// @Produce json +// @Param distributor_id path string true "ID дистрибьютора" +// @Param vacancy_id path string true "ID вакансии" +// @Success 204 "Вакансия удалена" +// @Failure 400 {object} map[string]string "Неверные данные запроса" +// @Failure 401 {object} map[string]string "Неавторизованный доступ" +// @Failure 404 {object} map[string]string "Вакансия не найдена" +// @Failure 500 {object} map[string]string "Внутренняя ошибка сервера" +// @Security BearerAuth +// @Router /api/v1/distributor/{distributor_id}/vacancies/{vacancy_id} [delete] func (h *handler) deleteVacancyDistributorHandler(w http.ResponseWriter, r *http.Request) { const handlerName = "deleteDistributorVacancyHandler" @@ -235,6 +318,18 @@ func (h *handler) deleteVacancyDistributorHandler(w http.ResponseWriter, r *http w.WriteHeader(http.StatusNoContent) } +// @Summary Отправить вакансию на модерацию +// @Description Отправка вакансии дистрибьютора на модерацию +// @Tags distributors +// @Accept json +// @Produce json +// @Param distributor_id path string true "ID дистрибьютора" +// @Param vacancy_id path string true "ID вакансии" +// @Success 200 {object} map[string]string "Вакансия отправлена на модерацию" +// @Failure 400 {object} map[string]string "Неверные параметры запроса" +// @Failure 500 {object} map[string]string "Внутренняя ошибка сервера" +// @Security BearerAuth +// @Router /api/v1/distributor/{distributor_id}/vacancies/{vacancy_id}/moderation [post] func (h *handler) sendVacancyToModerationHandler(w http.ResponseWriter, r *http.Request) { const handlerName = "sendVacancyToModerationHandler"