@vencord/types 1.13.1 → 1.13.2
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/VencordNative.d.ts +51 -0
- package/nativeModules.d.ts +12 -0
- package/package.json +5 -1
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import type { Settings } from "./api/Settings";
|
|
2
|
+
import { CspRequestResult } from "./main/csp/manager";
|
|
3
|
+
import type { UserThemeHeader } from "./main/themes";
|
|
4
|
+
import { IpcEvents } from "./shared/IpcEvents";
|
|
5
|
+
import { IpcRes } from "./utils/types";
|
|
6
|
+
export declare function sendSync<T = any>(event: IpcEvents, ...args: any[]): T;
|
|
7
|
+
declare const _default: {
|
|
8
|
+
themes: {
|
|
9
|
+
uploadTheme: (fileName: string, fileData: string) => Promise<void>;
|
|
10
|
+
deleteTheme: (fileName: string) => Promise<void>;
|
|
11
|
+
getThemesList: () => Promise<UserThemeHeader[]>;
|
|
12
|
+
getThemeData: (fileName: string) => Promise<string | undefined>;
|
|
13
|
+
getSystemValues: () => Promise<Record<string, string>>;
|
|
14
|
+
openFolder: () => Promise<void>;
|
|
15
|
+
};
|
|
16
|
+
updater: {
|
|
17
|
+
getUpdates: () => Promise<IpcRes<Record<"message" | "author" | "hash", string>[]>>;
|
|
18
|
+
update: () => Promise<IpcRes<boolean>>;
|
|
19
|
+
rebuild: () => Promise<IpcRes<boolean>>;
|
|
20
|
+
getRepo: () => Promise<IpcRes<string>>;
|
|
21
|
+
};
|
|
22
|
+
settings: {
|
|
23
|
+
get: () => Settings;
|
|
24
|
+
set: (settings: Settings, pathToNotify?: string) => Promise<void>;
|
|
25
|
+
openFolder: () => Promise<void>;
|
|
26
|
+
};
|
|
27
|
+
quickCss: {
|
|
28
|
+
get: () => Promise<string>;
|
|
29
|
+
set: (css: string) => Promise<void>;
|
|
30
|
+
addChangeListener(cb: (newCss: string) => void): void;
|
|
31
|
+
addThemeChangeListener(cb: () => void): void;
|
|
32
|
+
openFile: () => Promise<void>;
|
|
33
|
+
openEditor: () => Promise<void>;
|
|
34
|
+
};
|
|
35
|
+
native: {
|
|
36
|
+
getVersions: () => Partial<NodeJS.ProcessVersions>;
|
|
37
|
+
openExternal: (url: string) => Promise<void>;
|
|
38
|
+
};
|
|
39
|
+
csp: {
|
|
40
|
+
/**
|
|
41
|
+
* Note: Only supports full explicit matches, not wildcards.
|
|
42
|
+
*
|
|
43
|
+
* If `*.example.com` is allowed, `isDomainAllowed("https://sub.example.com")` will return false.
|
|
44
|
+
*/
|
|
45
|
+
isDomainAllowed: (url: string, directives: string[]) => Promise<boolean>;
|
|
46
|
+
removeOverride: (url: string) => Promise<boolean>;
|
|
47
|
+
requestAddOverride: (url: string, directives: string[], callerName: string) => Promise<CspRequestResult>;
|
|
48
|
+
};
|
|
49
|
+
pluginHelpers: Record<string, Record<string, (...args: any[]) => Promise<any>>>;
|
|
50
|
+
};
|
|
51
|
+
export default _default;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Vencord, a Discord client mod
|
|
3
|
+
* Copyright (c) 2025 Vendicated and contributors
|
|
4
|
+
* SPDX-License-Identifier: GPL-3.0-or-later
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
/// <reference types="standalone-electron-types"/>
|
|
8
|
+
|
|
9
|
+
declare module "~pluginNatives" {
|
|
10
|
+
const pluginNatives: Record<string, Record<string, (event: Electron.IpcMainInvokeEvent, ...args: unknown[]) => unknown>>;
|
|
11
|
+
export default pluginNatives;
|
|
12
|
+
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vencord/types",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "1.13.
|
|
4
|
+
"version": "1.13.2",
|
|
5
5
|
"description": "",
|
|
6
6
|
"types": "index.d.ts",
|
|
7
7
|
"scripts": {
|
|
@@ -19,6 +19,10 @@
|
|
|
19
19
|
"dependencies": {
|
|
20
20
|
"@types/lodash": "4.17.15",
|
|
21
21
|
"@types/node": "^22.13.4",
|
|
22
|
+
"@vencord/discord-types": "^1.0.0",
|
|
23
|
+
"highlight.js": "11.11.1",
|
|
24
|
+
"moment": "^2.22.2",
|
|
25
|
+
"ts-pattern": "^5.6.0",
|
|
22
26
|
"type-fest": "^4.35.0"
|
|
23
27
|
},
|
|
24
28
|
"peerDependencies": {
|