76 lines
1.4 KiB
TypeScript
76 lines
1.4 KiB
TypeScript
/**
|
|
* API of the server (auto-generated code)
|
|
*/
|
|
import {
|
|
HTTPMimeType,
|
|
HTTPRequestModel,
|
|
ModelResponseHttp,
|
|
RESTCallbacks,
|
|
RESTConfig,
|
|
RESTRequestJson,
|
|
RESTRequestJsonArray,
|
|
RESTRequestVoid
|
|
} from "./rest-tools"
|
|
import {
|
|
GetSignUpAvailable,
|
|
isGetSignUpAvailable,
|
|
} from "./model"
|
|
export namespace SystemConfigResource {
|
|
|
|
export function getKey({
|
|
restConfig,
|
|
params,
|
|
}: {
|
|
restConfig: RESTConfig,
|
|
params: {
|
|
key: string,
|
|
},
|
|
}): Promise<any> {
|
|
return RESTRequestJson({
|
|
restModel: {
|
|
endPoint: "/system_config/key/{key}",
|
|
requestType: HTTPRequestModel.GET,
|
|
accept: HTTPMimeType.JSON,
|
|
},
|
|
restConfig,
|
|
params,
|
|
}, null);
|
|
};
|
|
export function isSignUpAvailable({
|
|
restConfig,
|
|
}: {
|
|
restConfig: RESTConfig,
|
|
}): Promise<GetSignUpAvailable> {
|
|
return RESTRequestJson({
|
|
restModel: {
|
|
endPoint: "/system_config/is_sign_up_availlable",
|
|
requestType: HTTPRequestModel.GET,
|
|
accept: HTTPMimeType.JSON,
|
|
},
|
|
restConfig,
|
|
}, isGetSignUpAvailable);
|
|
};
|
|
export function setKey({
|
|
restConfig,
|
|
params,
|
|
data,
|
|
}: {
|
|
restConfig: RESTConfig,
|
|
params: {
|
|
key: string,
|
|
},
|
|
data: any,
|
|
}): Promise<void> {
|
|
return RESTRequestVoid({
|
|
restModel: {
|
|
endPoint: "/system_config/key/{key}",
|
|
requestType: HTTPRequestModel.PATCH,
|
|
contentType: HTTPMimeType.JSON,
|
|
},
|
|
restConfig,
|
|
params,
|
|
data,
|
|
});
|
|
};
|
|
}
|