@cotofe/service-of-oms
Version:
OpenAPI client for @cotofe/service-of-oms
302 lines (301 loc) • 12.5 kB
JavaScript
/**
* Platform
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: 1.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
import * as runtime from '../runtime';
/**
*
*/
export class UserControllerApi extends runtime.BaseAPI {
/**
* activate account
* activate account
*/
activateAccountUsingPOSTRaw(requestParameters, initOverrides) {
return __awaiter(this, void 0, void 0, function* () {
const queryParameters = {};
const headerParameters = {};
headerParameters['Content-Type'] = 'application/json';
if (this.configuration && this.configuration.apiKey) {
headerParameters.authorization =
yield this.configuration.apiKey('authorization'); // apikey-header-authorization authentication
}
const response = yield this.request({
path: `/api/v1/user/activateAccount`,
method: 'POST',
headers: headerParameters,
query: queryParameters,
body: requestParameters.activateAccountDto,
}, initOverrides);
return new runtime.JSONApiResponse(response);
});
}
/**
* activate account
* activate account
*/
activateAccountUsingPOST() {
return __awaiter(this, arguments, void 0, function* (requestParameters = {}, initOverrides) {
const response = yield this.activateAccountUsingPOSTRaw(requestParameters, initOverrides);
return yield response.value();
});
}
/**
* add user rate config
* addUserRateConfig
*/
addUserRateConfigUsingPOSTRaw(requestParameters, initOverrides) {
return __awaiter(this, void 0, void 0, function* () {
const queryParameters = {};
const headerParameters = {};
headerParameters['Content-Type'] = 'application/json';
if (this.configuration && this.configuration.apiKey) {
headerParameters.authorization =
yield this.configuration.apiKey('authorization'); // apikey-header-authorization authentication
}
const response = yield this.request({
path: `/api/v1/user/addUserRateConfig`,
method: 'POST',
headers: headerParameters,
query: queryParameters,
body: requestParameters.userRateConfigDto,
}, initOverrides);
return new runtime.JSONApiResponse(response);
});
}
/**
* add user rate config
* addUserRateConfig
*/
addUserRateConfigUsingPOST() {
return __awaiter(this, arguments, void 0, function* (requestParameters = {}, initOverrides) {
const response = yield this.addUserRateConfigUsingPOSTRaw(requestParameters, initOverrides);
return yield response.value();
});
}
/**
* delete user rate config
* deleteUserRateConfig
*/
deleteUserRateConfigUsingPOSTRaw(requestParameters, initOverrides) {
return __awaiter(this, void 0, void 0, function* () {
const queryParameters = {};
const headerParameters = {};
headerParameters['Content-Type'] = 'application/json';
if (this.configuration && this.configuration.apiKey) {
headerParameters.authorization =
yield this.configuration.apiKey('authorization'); // apikey-header-authorization authentication
}
const response = yield this.request({
path: `/api/v1/user/deleteUserRateConfig`,
method: 'POST',
headers: headerParameters,
query: queryParameters,
body: requestParameters.userRateConfigDto,
}, initOverrides);
return new runtime.JSONApiResponse(response);
});
}
/**
* delete user rate config
* deleteUserRateConfig
*/
deleteUserRateConfigUsingPOST() {
return __awaiter(this, arguments, void 0, function* (requestParameters = {}, initOverrides) {
const response = yield this.deleteUserRateConfigUsingPOSTRaw(requestParameters, initOverrides);
return yield response.value();
});
}
/**
* initApiKey
* initApiKey
*/
initApiKeyUsingPOSTRaw(initOverrides) {
return __awaiter(this, void 0, void 0, function* () {
const queryParameters = {};
const headerParameters = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters.authorization =
yield this.configuration.apiKey('authorization'); // apikey-header-authorization authentication
}
const response = yield this.request({
path: `/api/v1/user/initApiKey`,
method: 'POST',
headers: headerParameters,
query: queryParameters,
}, initOverrides);
return new runtime.JSONApiResponse(response);
});
}
/**
* initApiKey
* initApiKey
*/
initApiKeyUsingPOST(initOverrides) {
return __awaiter(this, void 0, void 0, function* () {
const response = yield this.initApiKeyUsingPOSTRaw(initOverrides);
return yield response.value();
});
}
/**
* queryAccountList
* queryAccountList
*/
queryAccountListUsingPOSTRaw(requestParameters, initOverrides) {
return __awaiter(this, void 0, void 0, function* () {
const queryParameters = {};
const headerParameters = {};
headerParameters['Content-Type'] = 'application/json';
if (this.configuration && this.configuration.apiKey) {
headerParameters.authorization =
yield this.configuration.apiKey('authorization'); // apikey-header-authorization authentication
}
const response = yield this.request({
path: `/api/v1/user/queryAccountList`,
method: 'POST',
headers: headerParameters,
query: queryParameters,
body: requestParameters.account,
}, initOverrides);
return new runtime.JSONApiResponse(response);
});
}
/**
* queryAccountList
* queryAccountList
*/
queryAccountListUsingPOST() {
return __awaiter(this, arguments, void 0, function* (requestParameters = {}, initOverrides) {
const response = yield this.queryAccountListUsingPOSTRaw(requestParameters, initOverrides);
return yield response.value();
});
}
/**
* querySupplierList
* querySupplierList
*/
querySupplierListUsingPOSTRaw(requestParameters, initOverrides) {
return __awaiter(this, void 0, void 0, function* () {
const queryParameters = {};
const headerParameters = {};
headerParameters['Content-Type'] = 'application/json';
if (this.configuration && this.configuration.apiKey) {
headerParameters.authorization =
yield this.configuration.apiKey('authorization'); // apikey-header-authorization authentication
}
const response = yield this.request({
path: `/api/v1/user/querySupplierList`,
method: 'POST',
headers: headerParameters,
query: queryParameters,
body: requestParameters.merchantUserDto,
}, initOverrides);
return new runtime.JSONApiResponse(response);
});
}
/**
* querySupplierList
* querySupplierList
*/
querySupplierListUsingPOST() {
return __awaiter(this, arguments, void 0, function* (requestParameters = {}, initOverrides) {
const response = yield this.querySupplierListUsingPOSTRaw(requestParameters, initOverrides);
return yield response.value();
});
}
/**
* query user rate config
* queryUserRateConfig
*/
queryUserRateConfigUsingGETRaw(requestParameters, initOverrides) {
return __awaiter(this, void 0, void 0, function* () {
if (requestParameters.pageNum == null) {
throw new runtime.RequiredError('pageNum', 'Required parameter "pageNum" was null or undefined when calling queryUserRateConfigUsingGET().');
}
if (requestParameters.pageSize == null) {
throw new runtime.RequiredError('pageSize', 'Required parameter "pageSize" was null or undefined when calling queryUserRateConfigUsingGET().');
}
const queryParameters = {};
if (requestParameters.pageNum != null) {
queryParameters.pageNum = requestParameters.pageNum;
}
if (requestParameters.pageSize != null) {
queryParameters.pageSize = requestParameters.pageSize;
}
if (requestParameters.userId != null) {
queryParameters.userId = requestParameters.userId;
}
const headerParameters = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters.authorization =
yield this.configuration.apiKey('authorization'); // apikey-header-authorization authentication
}
const response = yield this.request({
path: `/api/v1/user/queryUserRateConfig`,
method: 'GET',
headers: headerParameters,
query: queryParameters,
}, initOverrides);
return new runtime.JSONApiResponse(response);
});
}
/**
* query user rate config
* queryUserRateConfig
*/
queryUserRateConfigUsingGET(requestParameters, initOverrides) {
return __awaiter(this, void 0, void 0, function* () {
const response = yield this.queryUserRateConfigUsingGETRaw(requestParameters, initOverrides);
return yield response.value();
});
}
/**
* update user rate config
* updateUserRateConfig
*/
updateUserRateConfigUsingPOSTRaw(requestParameters, initOverrides) {
return __awaiter(this, void 0, void 0, function* () {
const queryParameters = {};
const headerParameters = {};
headerParameters['Content-Type'] = 'application/json';
if (this.configuration && this.configuration.apiKey) {
headerParameters.authorization =
yield this.configuration.apiKey('authorization'); // apikey-header-authorization authentication
}
const response = yield this.request({
path: `/api/v1/user/updateUserRateConfig`,
method: 'POST',
headers: headerParameters,
query: queryParameters,
body: requestParameters.userRateConfigDto,
}, initOverrides);
return new runtime.JSONApiResponse(response);
});
}
/**
* update user rate config
* updateUserRateConfig
*/
updateUserRateConfigUsingPOST() {
return __awaiter(this, arguments, void 0, function* (requestParameters = {}, initOverrides) {
const response = yield this.updateUserRateConfigUsingPOSTRaw(requestParameters, initOverrides);
return yield response.value();
});
}
}