UNPKG

677 BPlain TextView Raw
1/**
2 * @license
3 * Copyright 2024 Google Inc.
4 * SPDX-License-Identifier: Apache-2.0
5 */
6
7/**
8 * @public
9 */
10export type DownloadPolicy = 'deny' | 'allow' | 'allowAndName' | 'default';
11
12/**
13 * @public
14 */
15export interface DownloadBehavior {
16 /**
17 * Whether to allow all or deny all download requests, or use default behavior if
18 * available.
19 *
20 * @remarks
21 * Setting this to `allowAndName` will name all files according to their download guids.
22 */
23 policy: DownloadPolicy;
24 /**
25 * The default path to save downloaded files to.
26 *
27 * @remarks
28 * Setting this is required if behavior is set to `allow` or `allowAndName`.
29 */
30 downloadPath?: string;
31}