feat: Ability to consume webhook notifications and forward to clients #595

- forward expo device tokens to users plugin instance
- added android notification icon
This commit is contained in:
herrrta
2025-03-10 01:05:51 -04:00
parent cbcb160bdd
commit 9b0ba285b3
5 changed files with 85 additions and 11 deletions

View File

@@ -13,6 +13,10 @@ declare module "@jellyfin/sdk" {
data: D,
config?: AxiosRequestConfig<D>
): Promise<AxiosResponse<T>>;
delete<T, D = any>(
url: string,
config?: AxiosRequestConfig<D>
): Promise<AxiosResponse<T>>;
getStreamyfinPluginConfig(): Promise<AxiosResponse<StreamyfinPluginConfig>>;
}
}
@@ -32,9 +36,18 @@ Api.prototype.post = function <T, D = any>(
data: D,
config: AxiosRequestConfig<D>
): Promise<AxiosResponse<T>> {
return this.axiosInstance.post<T>(`${this.basePath}${url}`, {
return this.axiosInstance.post<T>(`${this.basePath}${url}`, data, {
...(config || {}),
headers: { [AUTHORIZATION_HEADER]: this.authorizationHeader },
});
};
Api.prototype.delete = function <T, D = any>(
url: string,
config: AxiosRequestConfig<D>
): Promise<AxiosResponse<T>> {
return this.axiosInstance.delete<T>(`${this.basePath}${url}`, {
...(config || {}),
data,
headers: { [AUTHORIZATION_HEADER]: this.authorizationHeader },
});
};