diff --git a/package.json b/package.json index e14550bf16..dd49c3a007 100644 --- a/package.json +++ b/package.json @@ -120,6 +120,7 @@ "@types/throttle-debounce": "^5.0.2", "@types/tinycolor2": "^1.4.5", "@types/turndown": "^5.0.1", + "@types/winchan": "^0.2.0", "@typescript-eslint/eslint-plugin": "^8.2.0", "@typescript-eslint/parser": "^8.2.0", "babel-plugin-istanbul": "^7.0.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 576e9c0ec6..b198535ab1 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -377,6 +377,9 @@ importers: '@types/turndown': specifier: ^5.0.1 version: 5.0.5 + '@types/winchan': + specifier: ^0.2.0 + version: 0.2.0 '@typescript-eslint/eslint-plugin': specifier: ^8.2.0 version: 8.32.0(@typescript-eslint/parser@8.32.0(eslint@9.26.0(jiti@1.21.7))(typescript@5.8.3))(eslint@9.26.0(jiti@1.21.7))(typescript@5.8.3) @@ -2810,6 +2813,9 @@ packages: '@types/unist@3.0.3': resolution: {integrity: sha512-ko/gIFJRv177XgZsZcBwnqJN5x/Gien8qNOn0D5bQU/zAzVf9Zt3BlcUiLqhV9y4ARk0GbT3tnUiPNgnTXzc/Q==} + '@types/winchan@0.2.0': + resolution: {integrity: sha512-1NyyjFkmpFf9T5hpyB1KgS4kljPwy45nxaq/I6CndEU2kw6BpxzFIAa0SXs620EtnEsvkFljquX+yRdlLxqDkA==} + '@types/ws@8.18.1': resolution: {integrity: sha512-ThVF6DCVhA8kUGy+aazFQ4kXQ7E1Ty7A3ypFOe0IcJV8O/M511G99AW24irKrW56Wt44yG9+ij8FaqoBGkuBXg==} @@ -12190,6 +12196,8 @@ snapshots: '@types/unist@3.0.3': {} + '@types/winchan@0.2.0': {} + '@types/ws@8.18.1': dependencies: '@types/node': 22.15.6 diff --git a/version.py b/version.py index 1230d435c7..1fe8743b08 100644 --- a/version.py +++ b/version.py @@ -49,4 +49,4 @@ API_FEATURE_LEVEL = 390 # historical commits sharing the same major version, in which case a # minor version bump suffices. -PROVISION_VERSION = (326, 6) # bumped 2025-05-20 to add pydantic-partials +PROVISION_VERSION = (326, 7) # bumped 2025-05-23 to add @types/winchan diff --git a/web/src/types/winchan.d.ts b/web/src/types/winchan.d.ts deleted file mode 100644 index c6cda08d7b..0000000000 --- a/web/src/types/winchan.d.ts +++ /dev/null @@ -1,64 +0,0 @@ -// Types for https://www.npmjs.com/package/winchan - -/** - * Opens a window and initiates a cross-domain request. Call this from the - * "untrusted" or "client" site. - * - * @param options - Options for `open` - * @param responseCallback - Called when the request completes with a response - * or an error - */ -export function open( - options: { - /** - * URL of the "trusted" window - */ - url: string; - /** - * URL of the `relay.html` iframe (used for Internet Explorer support) - */ - relay_url: string; - /** - * Target name passed to `window.open` - */ - window_name?: string | undefined; - /** - * Comma-separated features passed to `window.open` - */ - window_features?: string | undefined; - /** - * Application-defined parameters for the request - */ - params?: unknown; - }, - responseCallback: (err: string | null, response?: unknown) => void, -): { - /** - * Closes the window. - */ - close: () => void; - /** - * Tries to move the focus to the window. - */ - focus: () => void; -}; - -/** - * Listens for a request. Call this from the "trusted" site providing the - * window. - * - * @param requestCallback - Called to initiate the request - */ -export function onOpen( - requestCallback: ( - origin: string, - params: unknown, - sendResponse: (response: unknown) => void, - ) => void, -): { - /** - * Detaches the channel without sending a response yet. Call this before - * navigating to another page in a multi-page dialog. - */ - detach: () => void; -};