Skip to content

Commit

Permalink
Bump OpenAPI schema
Browse files Browse the repository at this point in the history
  • Loading branch information
hhvrc committed Nov 8, 2024
1 parent f27999d commit 53a5674
Show file tree
Hide file tree
Showing 9 changed files with 130 additions and 152 deletions.
39 changes: 39 additions & 0 deletions src/lib/api/internal/v1/apis/AccountApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,18 @@ export interface AccountApiInterface {
*/
accountLogin(login?: Login, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ObjectBaseResponse>;

/**
*
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof AccountApiInterface
*/
accountLogoutRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;

/**
*/
accountLogout(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;

/**
*
* @summary Check if a password reset is in progress
Expand Down Expand Up @@ -243,6 +255,33 @@ export class AccountApi extends runtime.BaseAPI implements AccountApiInterface {
return await response.value();
}

/**
*/
async accountLogoutRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
const queryParameters: any = {};

const headerParameters: runtime.HTTPHeaders = {};

if (this.configuration && this.configuration.apiKey) {
headerParameters["OpenShockToken"] = await this.configuration.apiKey("OpenShockToken"); // OpenShockToken authentication
}

const response = await this.request({
path: `/1/account/logout`,
method: 'POST',
headers: headerParameters,
query: queryParameters,
}, initOverrides);

return new runtime.VoidApiResponse(response);
}

/**
*/
async accountLogout(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
await this.accountLogoutRaw(initOverrides);
}

/**
* Check if a password reset is in progress
*/
Expand Down
17 changes: 6 additions & 11 deletions src/lib/api/internal/v1/apis/AdminApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,12 @@ export interface AdminApiInterface {
* @throws {RequiredError}
* @memberof AdminApiInterface
*/
adminDeleteUserRaw(requestParameters: AdminDeleteUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<any>>;
adminDeleteUserRaw(requestParameters: AdminDeleteUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;

/**
* Deletes a user
*/
adminDeleteUser(userId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<any>;
adminDeleteUser(userId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;

/**
*
Expand Down Expand Up @@ -100,7 +100,7 @@ export class AdminApi extends runtime.BaseAPI implements AdminApiInterface {
/**
* Deletes a user
*/
async adminDeleteUserRaw(requestParameters: AdminDeleteUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<any>> {
async adminDeleteUserRaw(requestParameters: AdminDeleteUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
if (requestParameters['userId'] == null) {
throw new runtime.RequiredError(
'userId',
Expand All @@ -123,19 +123,14 @@ export class AdminApi extends runtime.BaseAPI implements AdminApiInterface {
query: queryParameters,
}, initOverrides);

if (this.isJsonMime(response.headers.get('content-type'))) {
return new runtime.JSONApiResponse<any>(response);
} else {
return new runtime.TextApiResponse(response) as any;
}
return new runtime.VoidApiResponse(response);
}

/**
* Deletes a user
*/
async adminDeleteUser(userId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<any> {
const response = await this.adminDeleteUserRaw({ userId: userId }, initOverrides);
return await response.value();
async adminDeleteUser(userId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
await this.adminDeleteUserRaw({ userId: userId }, initOverrides);
}

/**
Expand Down
34 changes: 12 additions & 22 deletions src/lib/api/internal/v1/apis/AuthenticatedAccountApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,12 +76,12 @@ export interface AuthenticatedAccountApiInterface {
* @throws {RequiredError}
* @memberof AuthenticatedAccountApiInterface
*/
authenticatedAccountChangePasswordRaw(requestParameters: AuthenticatedAccountChangePasswordRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<any>>;
authenticatedAccountChangePasswordRaw(requestParameters: AuthenticatedAccountChangePasswordRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;

/**
* Change the password of the current user
*/
authenticatedAccountChangePassword(changePasswordRequest?: ChangePasswordRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<any>;
authenticatedAccountChangePassword(changePasswordRequest?: ChangePasswordRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;

/**
*
Expand All @@ -91,12 +91,12 @@ export interface AuthenticatedAccountApiInterface {
* @throws {RequiredError}
* @memberof AuthenticatedAccountApiInterface
*/
authenticatedAccountChangeUsernameRaw(requestParameters: AuthenticatedAccountChangeUsernameRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<any>>;
authenticatedAccountChangeUsernameRaw(requestParameters: AuthenticatedAccountChangeUsernameRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;

/**
* Change the username of the current user
*/
authenticatedAccountChangeUsername(changeUsernameRequest?: ChangeUsernameRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<any>;
authenticatedAccountChangeUsername(changeUsernameRequest?: ChangeUsernameRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;

}

Expand Down Expand Up @@ -141,7 +141,7 @@ export class AuthenticatedAccountApi extends runtime.BaseAPI implements Authenti
/**
* Change the password of the current user
*/
async authenticatedAccountChangePasswordRaw(requestParameters: AuthenticatedAccountChangePasswordRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<any>> {
async authenticatedAccountChangePasswordRaw(requestParameters: AuthenticatedAccountChangePasswordRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
const queryParameters: any = {};

const headerParameters: runtime.HTTPHeaders = {};
Expand All @@ -160,25 +160,20 @@ export class AuthenticatedAccountApi extends runtime.BaseAPI implements Authenti
body: ChangePasswordRequestToJSON(requestParameters['changePasswordRequest']),
}, initOverrides);

if (this.isJsonMime(response.headers.get('content-type'))) {
return new runtime.JSONApiResponse<any>(response);
} else {
return new runtime.TextApiResponse(response) as any;
}
return new runtime.VoidApiResponse(response);
}

/**
* Change the password of the current user
*/
async authenticatedAccountChangePassword(changePasswordRequest?: ChangePasswordRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<any> {
const response = await this.authenticatedAccountChangePasswordRaw({ changePasswordRequest: changePasswordRequest }, initOverrides);
return await response.value();
async authenticatedAccountChangePassword(changePasswordRequest?: ChangePasswordRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
await this.authenticatedAccountChangePasswordRaw({ changePasswordRequest: changePasswordRequest }, initOverrides);
}

/**
* Change the username of the current user
*/
async authenticatedAccountChangeUsernameRaw(requestParameters: AuthenticatedAccountChangeUsernameRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<any>> {
async authenticatedAccountChangeUsernameRaw(requestParameters: AuthenticatedAccountChangeUsernameRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
const queryParameters: any = {};

const headerParameters: runtime.HTTPHeaders = {};
Expand All @@ -197,19 +192,14 @@ export class AuthenticatedAccountApi extends runtime.BaseAPI implements Authenti
body: ChangeUsernameRequestToJSON(requestParameters['changeUsernameRequest']),
}, initOverrides);

if (this.isJsonMime(response.headers.get('content-type'))) {
return new runtime.JSONApiResponse<any>(response);
} else {
return new runtime.TextApiResponse(response) as any;
}
return new runtime.VoidApiResponse(response);
}

/**
* Change the username of the current user
*/
async authenticatedAccountChangeUsername(changeUsernameRequest?: ChangeUsernameRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<any> {
const response = await this.authenticatedAccountChangeUsernameRaw({ changeUsernameRequest: changeUsernameRequest }, initOverrides);
return await response.value();
async authenticatedAccountChangeUsername(changeUsernameRequest?: ChangeUsernameRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
await this.authenticatedAccountChangeUsernameRaw({ changeUsernameRequest: changeUsernameRequest }, initOverrides);
}

}
51 changes: 18 additions & 33 deletions src/lib/api/internal/v1/apis/DevicesApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -106,12 +106,12 @@ export interface DevicesApiInterface {
* @throws {RequiredError}
* @memberof DevicesApiInterface
*/
devicesEditDeviceRaw(requestParameters: DevicesEditDeviceRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<any>>;
devicesEditDeviceRaw(requestParameters: DevicesEditDeviceRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;

/**
* Edit a device
*/
devicesEditDevice(deviceId: string, hubEditRequest?: HubEditRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<any>;
devicesEditDevice(deviceId: string, hubEditRequest?: HubEditRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;

/**
*
Expand Down Expand Up @@ -210,12 +210,12 @@ export interface DevicesApiInterface {
* @throws {RequiredError}
* @memberof DevicesApiInterface
*/
devicesRegenerateDeviceTokenRaw(requestParameters: DevicesRegenerateDeviceTokenRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<any>>;
devicesRegenerateDeviceTokenRaw(requestParameters: DevicesRegenerateDeviceTokenRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;

/**
* Regenerate a device token
*/
devicesRegenerateDeviceToken(deviceId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<any>;
devicesRegenerateDeviceToken(deviceId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;

/**
*
Expand All @@ -225,12 +225,12 @@ export interface DevicesApiInterface {
* @throws {RequiredError}
* @memberof DevicesApiInterface
*/
devicesRemoveDeviceRaw(requestParameters: DevicesRemoveDeviceRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<any>>;
devicesRemoveDeviceRaw(requestParameters: DevicesRemoveDeviceRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;

/**
* Remove a device from current user\'s account
*/
devicesRemoveDevice(deviceId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<any>;
devicesRemoveDevice(deviceId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;

}

Expand Down Expand Up @@ -276,7 +276,7 @@ export class DevicesApi extends runtime.BaseAPI implements DevicesApiInterface {
/**
* Edit a device
*/
async devicesEditDeviceRaw(requestParameters: DevicesEditDeviceRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<any>> {
async devicesEditDeviceRaw(requestParameters: DevicesEditDeviceRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
if (requestParameters['deviceId'] == null) {
throw new runtime.RequiredError(
'deviceId',
Expand All @@ -302,19 +302,14 @@ export class DevicesApi extends runtime.BaseAPI implements DevicesApiInterface {
body: HubEditRequestToJSON(requestParameters['hubEditRequest']),
}, initOverrides);

if (this.isJsonMime(response.headers.get('content-type'))) {
return new runtime.JSONApiResponse<any>(response);
} else {
return new runtime.TextApiResponse(response) as any;
}
return new runtime.VoidApiResponse(response);
}

/**
* Edit a device
*/
async devicesEditDevice(deviceId: string, hubEditRequest?: HubEditRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<any> {
const response = await this.devicesEditDeviceRaw({ deviceId: deviceId, hubEditRequest: hubEditRequest }, initOverrides);
return await response.value();
async devicesEditDevice(deviceId: string, hubEditRequest?: HubEditRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
await this.devicesEditDeviceRaw({ deviceId: deviceId, hubEditRequest: hubEditRequest }, initOverrides);
}

/**
Expand Down Expand Up @@ -535,7 +530,7 @@ export class DevicesApi extends runtime.BaseAPI implements DevicesApiInterface {
/**
* Regenerate a device token
*/
async devicesRegenerateDeviceTokenRaw(requestParameters: DevicesRegenerateDeviceTokenRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<any>> {
async devicesRegenerateDeviceTokenRaw(requestParameters: DevicesRegenerateDeviceTokenRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
if (requestParameters['deviceId'] == null) {
throw new runtime.RequiredError(
'deviceId',
Expand All @@ -558,25 +553,20 @@ export class DevicesApi extends runtime.BaseAPI implements DevicesApiInterface {
query: queryParameters,
}, initOverrides);

if (this.isJsonMime(response.headers.get('content-type'))) {
return new runtime.JSONApiResponse<any>(response);
} else {
return new runtime.TextApiResponse(response) as any;
}
return new runtime.VoidApiResponse(response);
}

/**
* Regenerate a device token
*/
async devicesRegenerateDeviceToken(deviceId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<any> {
const response = await this.devicesRegenerateDeviceTokenRaw({ deviceId: deviceId }, initOverrides);
return await response.value();
async devicesRegenerateDeviceToken(deviceId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
await this.devicesRegenerateDeviceTokenRaw({ deviceId: deviceId }, initOverrides);
}

/**
* Remove a device from current user\'s account
*/
async devicesRemoveDeviceRaw(requestParameters: DevicesRemoveDeviceRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<any>> {
async devicesRemoveDeviceRaw(requestParameters: DevicesRemoveDeviceRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
if (requestParameters['deviceId'] == null) {
throw new runtime.RequiredError(
'deviceId',
Expand All @@ -599,19 +589,14 @@ export class DevicesApi extends runtime.BaseAPI implements DevicesApiInterface {
query: queryParameters,
}, initOverrides);

if (this.isJsonMime(response.headers.get('content-type'))) {
return new runtime.JSONApiResponse<any>(response);
} else {
return new runtime.TextApiResponse(response) as any;
}
return new runtime.VoidApiResponse(response);
}

/**
* Remove a device from current user\'s account
*/
async devicesRemoveDevice(deviceId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<any> {
const response = await this.devicesRemoveDeviceRaw({ deviceId: deviceId }, initOverrides);
return await response.value();
async devicesRemoveDevice(deviceId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
await this.devicesRemoveDeviceRaw({ deviceId: deviceId }, initOverrides);
}

}
17 changes: 6 additions & 11 deletions src/lib/api/internal/v1/apis/SessionsApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,11 @@ export interface SessionsApiInterface {
* @throws {RequiredError}
* @memberof SessionsApiInterface
*/
sessionsDeleteSessionRaw(requestParameters: SessionsDeleteSessionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<any>>;
sessionsDeleteSessionRaw(requestParameters: SessionsDeleteSessionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;

/**
*/
sessionsDeleteSession(sessionId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<any>;
sessionsDeleteSession(sessionId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;

/**
*
Expand Down Expand Up @@ -84,7 +84,7 @@ export class SessionsApi extends runtime.BaseAPI implements SessionsApiInterface

/**
*/
async sessionsDeleteSessionRaw(requestParameters: SessionsDeleteSessionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<any>> {
async sessionsDeleteSessionRaw(requestParameters: SessionsDeleteSessionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
if (requestParameters['sessionId'] == null) {
throw new runtime.RequiredError(
'sessionId',
Expand All @@ -107,18 +107,13 @@ export class SessionsApi extends runtime.BaseAPI implements SessionsApiInterface
query: queryParameters,
}, initOverrides);

if (this.isJsonMime(response.headers.get('content-type'))) {
return new runtime.JSONApiResponse<any>(response);
} else {
return new runtime.TextApiResponse(response) as any;
}
return new runtime.VoidApiResponse(response);
}

/**
*/
async sessionsDeleteSession(sessionId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<any> {
const response = await this.sessionsDeleteSessionRaw({ sessionId: sessionId }, initOverrides);
return await response.value();
async sessionsDeleteSession(sessionId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
await this.sessionsDeleteSessionRaw({ sessionId: sessionId }, initOverrides);
}

/**
Expand Down
Loading

0 comments on commit 53a5674

Please sign in to comment.