Skip to content

Commit

Permalink
run prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
toger5 committed Jan 23, 2025
1 parent 8368650 commit ac15148
Show file tree
Hide file tree
Showing 30 changed files with 5,261 additions and 4,670 deletions.
2 changes: 1 addition & 1 deletion src/Symbols.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,5 @@
*/

export enum Symbols {
AnyRoom = "*",
AnyRoom = "*",
}
1,757 changes: 969 additions & 788 deletions src/WidgetApi.ts

Large diffs are not rendered by default.

16 changes: 9 additions & 7 deletions src/interfaces/SetModalButtonEnabledAction.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,18 @@ import { WidgetApiFromWidgetAction } from "./WidgetApiAction";
import { IWidgetApiAcknowledgeResponseData } from "./IWidgetApiResponse";
import { ModalButtonID } from "./ModalWidgetActions";

export interface ISetModalButtonEnabledActionRequestData extends IWidgetApiRequestData {
enabled: boolean;
button: ModalButtonID;
export interface ISetModalButtonEnabledActionRequestData
extends IWidgetApiRequestData {
enabled: boolean;
button: ModalButtonID;
}

export interface ISetModalButtonEnabledActionRequest extends IWidgetApiRequest {
action: WidgetApiFromWidgetAction.SetModalButtonEnabled;
data: ISetModalButtonEnabledActionRequestData;
action: WidgetApiFromWidgetAction.SetModalButtonEnabled;
data: ISetModalButtonEnabledActionRequestData;
}

export interface ISetModalButtonEnabledActionResponse extends ISetModalButtonEnabledActionRequest {
response: IWidgetApiAcknowledgeResponseData;
export interface ISetModalButtonEnabledActionResponse
extends ISetModalButtonEnabledActionRequest {
response: IWidgetApiAcknowledgeResponseData;
}
40 changes: 20 additions & 20 deletions src/interfaces/StickerAction.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,31 +19,31 @@ import { WidgetApiFromWidgetAction } from "./WidgetApiAction";
import { IWidgetApiAcknowledgeResponseData } from "./IWidgetApiResponse";

export interface IStickerActionRequestData extends IWidgetApiRequestData {
name: string;
description?: string;
content: {
url: string;
info?: {
h?: number;
w?: number;
mimetype?: string;
size?: number;
thumbnail_info?: {
// eslint-disable-line camelcase
h?: number;
w?: number;
mimetype?: string;
size?: number;
};
};
name: string;
description?: string;
content: {
url: string;
info?: {
h?: number;
w?: number;
mimetype?: string;
size?: number;
thumbnail_info?: {
// eslint-disable-line camelcase
h?: number;
w?: number;
mimetype?: string;
size?: number;
};
};
};
}

export interface IStickerActionRequest extends IWidgetApiRequest {
action: WidgetApiFromWidgetAction.SendSticker;
data: IStickerActionRequestData;
action: WidgetApiFromWidgetAction.SendSticker;
data: IStickerActionRequestData;
}

export interface IStickerActionResponse extends IStickerActionRequest {
response: IWidgetApiAcknowledgeResponseData;
response: IWidgetApiAcknowledgeResponseData;
}
10 changes: 5 additions & 5 deletions src/interfaces/StickyAction.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,18 +19,18 @@ import { WidgetApiFromWidgetAction } from "./WidgetApiAction";
import { IWidgetApiResponseData } from "./IWidgetApiResponse";

export interface IStickyActionRequestData extends IWidgetApiRequestData {
value: boolean;
value: boolean;
}

export interface IStickyActionRequest extends IWidgetApiRequest {
action: WidgetApiFromWidgetAction.UpdateAlwaysOnScreen;
data: IStickyActionRequestData;
action: WidgetApiFromWidgetAction.UpdateAlwaysOnScreen;
data: IStickyActionRequestData;
}

export interface IStickyActionResponseData extends IWidgetApiResponseData {
success: boolean;
success: boolean;
}

export interface IStickyActionResponse extends IStickyActionRequest {
response: IStickyActionResponseData;
response: IStickyActionResponseData;
}
26 changes: 18 additions & 8 deletions src/interfaces/SupportedVersionsAction.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,20 +14,30 @@
* limitations under the License.
*/

import { IWidgetApiRequest, IWidgetApiRequestEmptyData } from "./IWidgetApiRequest";
import { WidgetApiFromWidgetAction, WidgetApiToWidgetAction } from "./WidgetApiAction";
import {
IWidgetApiRequest,
IWidgetApiRequestEmptyData,
} from "./IWidgetApiRequest";
import {
WidgetApiFromWidgetAction,
WidgetApiToWidgetAction,
} from "./WidgetApiAction";
import { ApiVersion } from "./ApiVersion";
import { IWidgetApiResponseData } from "./IWidgetApiResponse";

export interface ISupportedVersionsActionRequest extends IWidgetApiRequest {
action: WidgetApiFromWidgetAction.SupportedApiVersions | WidgetApiToWidgetAction.SupportedApiVersions;
data: IWidgetApiRequestEmptyData;
action:
| WidgetApiFromWidgetAction.SupportedApiVersions
| WidgetApiToWidgetAction.SupportedApiVersions;
data: IWidgetApiRequestEmptyData;
}

export interface ISupportedVersionsActionResponseData extends IWidgetApiResponseData {
supported_versions: ApiVersion[]; // eslint-disable-line camelcase
export interface ISupportedVersionsActionResponseData
extends IWidgetApiResponseData {
supported_versions: ApiVersion[]; // eslint-disable-line camelcase
}

export interface ISupportedVersionsActionResponse extends ISupportedVersionsActionRequest {
response: ISupportedVersionsActionResponseData;
export interface ISupportedVersionsActionResponse
extends ISupportedVersionsActionRequest {
response: ISupportedVersionsActionResponseData;
}
8 changes: 4 additions & 4 deletions src/interfaces/ThemeChangeAction.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,14 @@ import { WidgetApiToWidgetAction } from "./WidgetApiAction";
import { IWidgetApiAcknowledgeResponseData } from "./IWidgetApiResponse";

export interface IThemeChangeActionRequestData extends IWidgetApiRequestData {
// The format of a theme is deliberately unstandardized
// The format of a theme is deliberately unstandardized
}

export interface IThemeChangeActionRequest extends IWidgetApiRequest {
action: WidgetApiToWidgetAction.ThemeChange;
data: IThemeChangeActionRequestData;
action: WidgetApiToWidgetAction.ThemeChange;
data: IThemeChangeActionRequestData;
}

export interface IThemeChangeActionResponse extends IThemeChangeActionRequest {
response: IWidgetApiAcknowledgeResponseData;
response: IWidgetApiAcknowledgeResponseData;
}
44 changes: 28 additions & 16 deletions src/interfaces/TurnServerActions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,41 +14,53 @@
* limitations under the License.
*/

import { IWidgetApiRequest, IWidgetApiRequestData, IWidgetApiRequestEmptyData } from "./IWidgetApiRequest";
import { WidgetApiFromWidgetAction, WidgetApiToWidgetAction } from "./WidgetApiAction";
import { IWidgetApiAcknowledgeResponseData, IWidgetApiResponse } from "./IWidgetApiResponse";
import {
IWidgetApiRequest,
IWidgetApiRequestData,
IWidgetApiRequestEmptyData,
} from "./IWidgetApiRequest";
import {
WidgetApiFromWidgetAction,
WidgetApiToWidgetAction,
} from "./WidgetApiAction";
import {
IWidgetApiAcknowledgeResponseData,
IWidgetApiResponse,
} from "./IWidgetApiResponse";

export interface ITurnServer {
uris: string[];
username: string;
password: string;
uris: string[];
username: string;
password: string;
}

export interface IWatchTurnServersRequest extends IWidgetApiRequest {
action: WidgetApiFromWidgetAction.WatchTurnServers;
data: IWidgetApiRequestEmptyData;
action: WidgetApiFromWidgetAction.WatchTurnServers;
data: IWidgetApiRequestEmptyData;
}

export interface IWatchTurnServersResponse extends IWidgetApiResponse {
response: IWidgetApiAcknowledgeResponseData;
response: IWidgetApiAcknowledgeResponseData;
}

export interface IUnwatchTurnServersRequest extends IWidgetApiRequest {
action: WidgetApiFromWidgetAction.UnwatchTurnServers;
data: IWidgetApiRequestEmptyData;
action: WidgetApiFromWidgetAction.UnwatchTurnServers;
data: IWidgetApiRequestEmptyData;
}

export interface IUnwatchTurnServersResponse extends IWidgetApiResponse {
response: IWidgetApiAcknowledgeResponseData;
response: IWidgetApiAcknowledgeResponseData;
}

export interface IUpdateTurnServersRequestData extends IWidgetApiRequestData, ITurnServer {}
export interface IUpdateTurnServersRequestData
extends IWidgetApiRequestData,
ITurnServer {}

export interface IUpdateTurnServersRequest extends IWidgetApiRequest {
action: WidgetApiToWidgetAction.UpdateTurnServers;
data: IUpdateTurnServersRequestData;
action: WidgetApiToWidgetAction.UpdateTurnServers;
data: IUpdateTurnServersRequestData;
}

export interface IUpdateTurnServersResponse extends IWidgetApiResponse {
response: IWidgetApiAcknowledgeResponseData;
response: IWidgetApiAcknowledgeResponseData;
}
30 changes: 17 additions & 13 deletions src/interfaces/UpdateDelayedEventAction.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,25 +19,29 @@ import { WidgetApiFromWidgetAction } from "./WidgetApiAction";
import { IWidgetApiResponseData } from "./IWidgetApiResponse";

export enum UpdateDelayedEventAction {
Cancel = "cancel",
Restart = "restart",
Send = "send",
Cancel = "cancel",
Restart = "restart",
Send = "send",
}

export interface IUpdateDelayedEventFromWidgetRequestData extends IWidgetApiRequestData {
delay_id: string; // eslint-disable-line camelcase
action: UpdateDelayedEventAction;
export interface IUpdateDelayedEventFromWidgetRequestData
extends IWidgetApiRequestData {
delay_id: string; // eslint-disable-line camelcase
action: UpdateDelayedEventAction;
}

export interface IUpdateDelayedEventFromWidgetActionRequest extends IWidgetApiRequest {
action: WidgetApiFromWidgetAction.MSC4157UpdateDelayedEvent;
data: IUpdateDelayedEventFromWidgetRequestData;
export interface IUpdateDelayedEventFromWidgetActionRequest
extends IWidgetApiRequest {
action: WidgetApiFromWidgetAction.MSC4157UpdateDelayedEvent;
data: IUpdateDelayedEventFromWidgetRequestData;
}

export interface IUpdateDelayedEventFromWidgetResponseData extends IWidgetApiResponseData {
// nothing
export interface IUpdateDelayedEventFromWidgetResponseData
extends IWidgetApiResponseData {
// nothing
}

export interface IUpdateDelayedEventFromWidgetActionResponse extends IUpdateDelayedEventFromWidgetActionRequest {
response: IUpdateDelayedEventFromWidgetResponseData;
export interface IUpdateDelayedEventFromWidgetActionResponse
extends IUpdateDelayedEventFromWidgetActionRequest {
response: IUpdateDelayedEventFromWidgetResponseData;
}
16 changes: 9 additions & 7 deletions src/interfaces/UpdateStateAction.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,18 +20,20 @@ import { IWidgetApiResponseData } from "./IWidgetApiResponse";
import { IRoomEvent } from "./IRoomEvent";

export interface IUpdateStateToWidgetRequestData extends IWidgetApiRequestData {
state: IRoomEvent[];
state: IRoomEvent[];
}

export interface IUpdateStateToWidgetActionRequest extends IWidgetApiRequest {
action: WidgetApiToWidgetAction.UpdateState;
data: IUpdateStateToWidgetRequestData;
action: WidgetApiToWidgetAction.UpdateState;
data: IUpdateStateToWidgetRequestData;
}

export interface IUpdateStateToWidgetResponseData extends IWidgetApiResponseData {
// nothing
export interface IUpdateStateToWidgetResponseData
extends IWidgetApiResponseData {
// nothing
}

export interface IUpdateStateToWidgetActionResponse extends IUpdateStateToWidgetActionRequest {
response: IUpdateStateToWidgetResponseData;
export interface IUpdateStateToWidgetActionResponse
extends IUpdateStateToWidgetActionRequest {
response: IUpdateStateToWidgetResponseData;
}
22 changes: 13 additions & 9 deletions src/interfaces/UploadFileAction.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,19 +18,23 @@ import { IWidgetApiRequest, IWidgetApiRequestData } from "./IWidgetApiRequest";
import { IWidgetApiResponseData } from "./IWidgetApiResponse";
import { WidgetApiFromWidgetAction } from "./WidgetApiAction";

export interface IUploadFileActionFromWidgetRequestData extends IWidgetApiRequestData {
file: XMLHttpRequestBodyInit;
export interface IUploadFileActionFromWidgetRequestData
extends IWidgetApiRequestData {
file: XMLHttpRequestBodyInit;
}

export interface IUploadFileActionFromWidgetActionRequest extends IWidgetApiRequest {
action: WidgetApiFromWidgetAction.MSC4039UploadFileAction;
data: IUploadFileActionFromWidgetRequestData;
export interface IUploadFileActionFromWidgetActionRequest
extends IWidgetApiRequest {
action: WidgetApiFromWidgetAction.MSC4039UploadFileAction;
data: IUploadFileActionFromWidgetRequestData;
}

export interface IUploadFileActionFromWidgetResponseData extends IWidgetApiResponseData {
content_uri: string; // eslint-disable-line camelcase
export interface IUploadFileActionFromWidgetResponseData
extends IWidgetApiResponseData {
content_uri: string; // eslint-disable-line camelcase
}

export interface IUploadFileActionFromWidgetActionResponse extends IUploadFileActionFromWidgetActionRequest {
response: IUploadFileActionFromWidgetResponseData;
export interface IUploadFileActionFromWidgetActionResponse
extends IUploadFileActionFromWidgetActionRequest {
response: IUploadFileActionFromWidgetResponseData;
}
34 changes: 19 additions & 15 deletions src/interfaces/UserDirectorySearchAction.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,25 +18,29 @@ import { IWidgetApiRequest, IWidgetApiRequestData } from "./IWidgetApiRequest";
import { IWidgetApiResponseData } from "./IWidgetApiResponse";
import { WidgetApiFromWidgetAction } from "./WidgetApiAction";

export interface IUserDirectorySearchFromWidgetRequestData extends IWidgetApiRequestData {
search_term: string; // eslint-disable-line camelcase
limit?: number;
export interface IUserDirectorySearchFromWidgetRequestData
extends IWidgetApiRequestData {
search_term: string; // eslint-disable-line camelcase
limit?: number;
}

export interface IUserDirectorySearchFromWidgetActionRequest extends IWidgetApiRequest {
action: WidgetApiFromWidgetAction.MSC3973UserDirectorySearch;
data: IUserDirectorySearchFromWidgetRequestData;
export interface IUserDirectorySearchFromWidgetActionRequest
extends IWidgetApiRequest {
action: WidgetApiFromWidgetAction.MSC3973UserDirectorySearch;
data: IUserDirectorySearchFromWidgetRequestData;
}

export interface IUserDirectorySearchFromWidgetResponseData extends IWidgetApiResponseData {
limited: boolean;
results: Array<{
user_id: string; // eslint-disable-line camelcase
display_name?: string; // eslint-disable-line camelcase
avatar_url?: string; // eslint-disable-line camelcase
}>;
export interface IUserDirectorySearchFromWidgetResponseData
extends IWidgetApiResponseData {
limited: boolean;
results: Array<{
user_id: string; // eslint-disable-line camelcase
display_name?: string; // eslint-disable-line camelcase
avatar_url?: string; // eslint-disable-line camelcase
}>;
}

export interface IUserDirectorySearchFromWidgetActionResponse extends IUserDirectorySearchFromWidgetActionRequest {
response: IUserDirectorySearchFromWidgetResponseData;
export interface IUserDirectorySearchFromWidgetActionResponse
extends IUserDirectorySearchFromWidgetActionRequest {
response: IUserDirectorySearchFromWidgetResponseData;
}
Loading

0 comments on commit ac15148

Please sign in to comment.