Socket
Socket
Sign inDemoInstall

@intuned/sdk-dev-types

Package Overview
Dependencies
Maintainers
0
Versions
212
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@intuned/sdk-dev-types - npm Package Compare versions

Comparing version 1.0.22-better-download.3 to 1.0.22-better-download.4

126

files/index.d.ts

@@ -251,2 +251,65 @@ import type { Page, Locator } from "@intuned/playwright-core";

/**
* Downloads a file from a URL.
*
* @param {Page} page - The Playwright Page object.
* @param {string} url - The URL of the file to download.
* @returns {Promise<Download>} A promise that resolves to a Download object.
*
* @example
* ```typescript
* import { downloadFile } from "@intuned/sdk/files";
*
* const download = await downloadFile(page, "https://example.com/file.pdf");
* console.log(await download.path());
* ```
*/
export declare function downloadFile(
page: Page,
url: string
): Promise<Download>;
/**
* Downloads a file using the specified locator.
*
* @param {Page} page - The Playwright Page object.
* @param {Locator} locator - The locator of the element to click to download the file.
* @returns {Promise<Download>} A promise that resolves to a Download object.
*
* @example
* ```typescript
* import { downloadFile } from "@intuned/sdk/files";
*
* const download = await downloadFile(page, page.locator(".download_button"));
* console.log(await download.path());
* ```
*/
export declare function downloadFile(
page: Page,
locator: Locator
): Promise<Download>;
/**
* Downloads a file using the specified trigger function.
*
* @param {Page} page - The Playwright Page object.
* @param {(page: Page) => Promise<void>} trigger - The function to trigger the download.
* @returns {Promise<Download>} A promise that resolves to a Download object.
*
* @example
* ```typescript
* import { downloadFile } from "@intuned/sdk/files";
*
* const download = await downloadFile(page, async (page) => {
* await page.locator(".download_button").click();
* });
*
* console.log(await download.path());
* ```
*/
export declare function downloadFile(
page: Page,
trigger: (page: Page) => Promise<void>
): Promise<Download>;
/**
* Downloads a file using the specified strategy.

@@ -330,65 +393,2 @@ *

/**
* Downloads a file from a URL.
*
* @param {Page} page - The Playwright Page object.
* @param {string} url - The URL of the file to download.
* @returns {Promise<Download>} A promise that resolves to a Download object.
*
* @example
* ```typescript
* import { downloadFile } from "@intuned/sdk/files";
*
* const download = await downloadFile(page, "https://example.com/file.pdf");
* console.log(await download.path());
* ```
*/
export declare function autoDownloadFile(
page: Page,
url: string
): Promise<Download>;
/**
* Downloads a file using the specified locator.
*
* @param {Page} page - The Playwright Page object.
* @param {Locator} locator - The locator of the element to click to download the file.
* @returns {Promise<Download>} A promise that resolves to a Download object.
*
* @example
* ```typescript
* import { downloadFile } from "@intuned/sdk/files";
*
* const download = await downloadFile(page, page.locator(".download_button"));
* console.log(await download.path());
* ```
*/
export declare function autoDownloadFile(
page: Page,
locator: Locator
): Promise<Download>;
/**
* Downloads a file using the specified trigger function.
*
* @param {Page} page - The Playwright Page object.
* @param {(page: Page) => Promise<void>} trigger - The function to trigger the download.
* @returns {Promise<Download>} A promise that resolves to a Download object.
*
* @example
* ```typescript
* import { downloadFile } from "@intuned/sdk/files";
*
* const download = await downloadFile(page, async (page) => {
* await page.locator(".download_button").click();
* });
*
* console.log(await download.path());
* ```
*/
export declare function autoDownloadFile(
page: Page,
trigger: (page: Page) => Promise<void>
): Promise<Download>;
/**
* Represents a downloaded file.

@@ -395,0 +395,0 @@ *

{
"name": "@intuned/sdk-dev-types",
"version": "1.0.22-better-download.3",
"version": "1.0.22-better-download.4",
"description": "intuned runner types",

@@ -5,0 +5,0 @@ "author": "Intuned Team",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc