update methods from apigen

This commit is contained in:
Jacob Overgaard
2022-11-10 12:44:21 +01:00
parent 769bd1930a
commit a391e12adf
6 changed files with 13 additions and 13 deletions

View File

@@ -78,7 +78,7 @@ export class UmbApp extends UmbContextProviderMixin(LitElement) {
private async _setInitStatus() {
try {
const serverStatus = await ServerResource.status();
const serverStatus = await ServerResource.getServerStatus();
if (serverStatus.serverStatus) {
this._runtimeLevel = serverStatus.serverStatus;
}

View File

@@ -60,7 +60,7 @@ export class UmbDashboardPublishedStatusElement extends UmbContextConsumerMixin(
private async _getPublishedStatus() {
try {
const data = await PublishedCacheResource.status();
const data = await PublishedCacheResource.getPublishedCacheStatus();
this._publishedStatusText = data;
} catch (e) {
if (e instanceof ApiError) {
@@ -81,7 +81,7 @@ export class UmbDashboardPublishedStatusElement extends UmbContextConsumerMixin(
this._buttonStateReload = 'waiting';
this._buttonState = 'waiting';
try {
await PublishedCacheResource.reload();
await PublishedCacheResource.postPublishedCacheReload();
this._buttonStateReload = 'success';
this._getPublishedStatus();
this._buttonState = 'success';
@@ -111,7 +111,7 @@ export class UmbDashboardPublishedStatusElement extends UmbContextConsumerMixin(
private async _rebuildDatabaseCache() {
this._buttonStateRebuild = 'waiting';
try {
await PublishedCacheResource.rebuild();
await PublishedCacheResource.postPublishedCacheRebuild();
this._buttonStateRebuild = 'success';
} catch (e) {
this._buttonStateRebuild = 'failed';
@@ -137,7 +137,7 @@ export class UmbDashboardPublishedStatusElement extends UmbContextConsumerMixin(
//Collect
private async _cacheCollect() {
try {
await PublishedCacheResource.collect();
await PublishedCacheResource.postPublishedCacheCollect();
this._buttonStateCollect = 'success';
} catch (e) {
this._buttonStateCollect = 'failed';

View File

@@ -37,7 +37,7 @@ export class UmbDashboardTelemetryElement extends LitElement {
private async _setup() {
try {
const consentLevels = await TelemetryResource.getAll({});
const consentLevels = await TelemetryResource.getTelemetry({});
this._telemetryLevels = consentLevels.items ?? [];
} catch (e) {
if (e instanceof ApiError) {
@@ -47,7 +47,7 @@ export class UmbDashboardTelemetryElement extends LitElement {
}
try {
const consentSetting = await TelemetryResource.get();
const consentSetting = await TelemetryResource.getTelemetryLevel();
this._telemetryFormData = consentSetting.telemetryLevel ?? TelemetryLevel.BASIC;
} catch (e) {
if (e instanceof ApiError) {
@@ -60,7 +60,7 @@ export class UmbDashboardTelemetryElement extends LitElement {
private _handleSubmit = async (e: CustomEvent<SubmitEvent>) => {
e.stopPropagation();
try {
await TelemetryResource.setConsentLevel({
await TelemetryResource.postTelemetryLevel({
requestBody: { telemetryLevel: this._telemetryFormData },
});
} catch (e) {

View File

@@ -208,7 +208,7 @@ export class UmbInstallerDatabaseElement extends UmbContextConsumerMixin(UmbObse
providerName: selectedDatabase.providerName,
};
}
await InstallResource.validateDatabase({ requestBody: databaseDetails });
await InstallResource.postInstallValidateDatabase({ requestBody: databaseDetails });
} catch (e) {
if (e instanceof ApiError) {
const error = e.body as ProblemDetails;

View File

@@ -103,7 +103,7 @@ export class UmbInstallerContext {
*/
public requestInstall() {
// TODO: The post install will probably return a user in the future, so we have to set that context somewhere to let the client know that it is authenticated
return InstallResource.setup({ requestBody: this.getData() });
return InstallResource.postInstallSetup({ requestBody: this.getData() });
}
/**
@@ -122,7 +122,7 @@ export class UmbInstallerContext {
* @memberof UmbInstallerContext
*/
private _loadInstallerSettings() {
InstallResource.settings().then((installSettings) => {
InstallResource.getInstallSettings().then((installSettings) => {
this._settings.next(installSettings);
});
}

View File

@@ -42,7 +42,7 @@ export class UmbUpgrader extends LitElement {
this.fetching = true;
try {
const data = await UpgradeResource.settings();
const data = await UpgradeResource.getUpgradeSettings();
this.upgradeSettings = data;
} catch (e) {
if (e instanceof ApiError) {
@@ -60,7 +60,7 @@ export class UmbUpgrader extends LitElement {
this.upgrading = true;
try {
await UpgradeResource.authorize();
await UpgradeResource.postUpgradeAuthorize();
history.pushState(null, '', '/');
} catch (e) {
if (e instanceof ApiError) {