@matrix-widget-toolkit/api 3.2.1 → 3.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/build/cjs/index.js +1105 -1083
- package/build/esm/index.js +1107 -1085
- package/build/index.d.ts +18 -0
- package/package.json +6 -6
package/build/index.d.ts
CHANGED
|
@@ -4,11 +4,13 @@
|
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
import { Capability } from 'matrix-widget-api';
|
|
7
|
+
import { IGetMediaConfigActionFromWidgetResponseData } from 'matrix-widget-api';
|
|
7
8
|
import { IModalWidgetCreateData } from 'matrix-widget-api';
|
|
8
9
|
import { IModalWidgetOpenRequestDataButton } from 'matrix-widget-api';
|
|
9
10
|
import { IModalWidgetReturnData } from 'matrix-widget-api';
|
|
10
11
|
import { IOpenIDCredentials } from 'matrix-widget-api';
|
|
11
12
|
import { IRoomEvent } from 'matrix-widget-api';
|
|
13
|
+
import { IUploadFileActionFromWidgetResponseData } from 'matrix-widget-api';
|
|
12
14
|
import { IWidget } from 'matrix-widget-api';
|
|
13
15
|
import { IWidgetApiRequest } from 'matrix-widget-api';
|
|
14
16
|
import { IWidgetApiRequestData } from 'matrix-widget-api';
|
|
@@ -744,6 +746,18 @@ export declare type WidgetApi = {
|
|
|
744
746
|
avatarUrl?: string;
|
|
745
747
|
}>;
|
|
746
748
|
}>;
|
|
749
|
+
/**
|
|
750
|
+
* Get the config for the media repository.
|
|
751
|
+
* @returns Promise which resolves with an object containing the config.
|
|
752
|
+
*/
|
|
753
|
+
getMediaConfig(): Promise<IGetMediaConfigActionFromWidgetResponseData>;
|
|
754
|
+
/**
|
|
755
|
+
* Upload a file to the media repository on the homeserver.
|
|
756
|
+
* @param file - The object to upload. Something that can be sent to
|
|
757
|
+
* XMLHttpRequest.send (typically a File).
|
|
758
|
+
* @returns Resolves to the location of the uploaded file.
|
|
759
|
+
*/
|
|
760
|
+
uploadFile(file: XMLHttpRequestBodyInit): Promise<IUploadFileActionFromWidgetResponseData>;
|
|
747
761
|
};
|
|
748
762
|
|
|
749
763
|
/**
|
|
@@ -900,6 +914,10 @@ export declare class WidgetApiImpl implements WidgetApi {
|
|
|
900
914
|
avatarUrl?: string;
|
|
901
915
|
}>;
|
|
902
916
|
}>;
|
|
917
|
+
/** {@inheritdoc WidgetApi.getMediaConfig} */
|
|
918
|
+
getMediaConfig(): Promise<IGetMediaConfigActionFromWidgetResponseData>;
|
|
919
|
+
/** {@inheritdoc WidgetApi.uploadFile} */
|
|
920
|
+
uploadFile(file: XMLHttpRequestBodyInit): Promise<IUploadFileActionFromWidgetResponseData>;
|
|
903
921
|
}
|
|
904
922
|
|
|
905
923
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@matrix-widget-toolkit/api",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.3.0",
|
|
4
4
|
"description": "A simplified layer on top of matrix-widget-api to use build widgets.",
|
|
5
5
|
"author": "Nordeck IT + Consulting GmbH",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -8,11 +8,11 @@
|
|
|
8
8
|
"module": "./build/esm/index.js",
|
|
9
9
|
"types": "./build/index.d.ts",
|
|
10
10
|
"devDependencies": {
|
|
11
|
-
"@craco/craco": "^
|
|
11
|
+
"@craco/craco": "^7.1.0",
|
|
12
12
|
"@types/jest": "^27.5.2",
|
|
13
|
-
"@types/node": "^
|
|
14
|
-
"@types/qs": "^6.9.
|
|
15
|
-
"typescript": "^
|
|
13
|
+
"@types/node": "^20.8.6",
|
|
14
|
+
"@types/qs": "^6.9.8",
|
|
15
|
+
"typescript": "^5.2.2"
|
|
16
16
|
},
|
|
17
17
|
"scripts": {
|
|
18
18
|
"build": "tsc && rollup --config ../../rollup.config.mjs",
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"generate-api-report": "tsc && api-extractor run --verbose --local"
|
|
28
28
|
},
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"matrix-widget-api": "^1.
|
|
30
|
+
"matrix-widget-api": "^1.6.0",
|
|
31
31
|
"qs": "^6.11.2",
|
|
32
32
|
"rxjs": "^7.8.1"
|
|
33
33
|
},
|