@raycast/api 1.72.1 → 1.73.1
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/package.json +1 -1
- package/types/index.d.ts +32 -18
package/package.json
CHANGED
package/types/index.d.ts
CHANGED
|
@@ -437,6 +437,9 @@ export declare namespace AI {
|
|
|
437
437
|
/**
|
|
438
438
|
* Returns a prompt completion.
|
|
439
439
|
*
|
|
440
|
+
* @param prompt - The prompt to ask the AI.
|
|
441
|
+
* @param options - Options to control which and how the AI model should behave.
|
|
442
|
+
*
|
|
440
443
|
* @example
|
|
441
444
|
* ```typescript
|
|
442
445
|
* import { Detail, AI, LaunchProps } from "@raycast/api";
|
|
@@ -652,9 +655,9 @@ export declare interface ArgumentsLaunchProps {
|
|
|
652
655
|
export declare namespace BrowserExtension {
|
|
653
656
|
|
|
654
657
|
/**
|
|
655
|
-
* Get the content of
|
|
656
|
-
*
|
|
657
|
-
* @returns A Promise that resolves with the content.
|
|
658
|
+
* Get the content of an opened tab.
|
|
659
|
+
* @param options - Options to control which content to get.
|
|
660
|
+
* @returns A Promise that resolves with the content of the tab.
|
|
658
661
|
*
|
|
659
662
|
* @example
|
|
660
663
|
* ```typescript
|
|
@@ -666,8 +669,7 @@ export declare namespace BrowserExtension {
|
|
|
666
669
|
* };
|
|
667
670
|
* ```
|
|
668
671
|
*/
|
|
669
|
-
export function getContent(options?:
|
|
670
|
-
export type GetContentOptions = {
|
|
672
|
+
export function getContent(options?: {
|
|
671
673
|
/**
|
|
672
674
|
* The format of the content.
|
|
673
675
|
*
|
|
@@ -691,7 +693,7 @@ export declare namespace BrowserExtension {
|
|
|
691
693
|
* The ID of the tab to get the content from. If not specified, the content of the active tab of the focused window is returned.
|
|
692
694
|
*/
|
|
693
695
|
tabId?: number;
|
|
694
|
-
}
|
|
696
|
+
}): Promise<string>;
|
|
695
697
|
export interface Tab {
|
|
696
698
|
/**
|
|
697
699
|
* The ID of the tab. Tab IDs are unique within a browser session.
|
|
@@ -5326,26 +5328,39 @@ export declare const ImageMask: typeof Image.Mask;
|
|
|
5326
5328
|
*/
|
|
5327
5329
|
export declare type ImageSource = Image.Source;
|
|
5328
5330
|
|
|
5329
|
-
|
|
5330
|
-
|
|
5331
|
+
/**
|
|
5332
|
+
* Options for launching a command from another extension.
|
|
5333
|
+
*/
|
|
5334
|
+
declare type InterExtensionLaunchOptions = {
|
|
5335
|
+
/** When launching command from a different extension, the owner or author (as defined in the extension's manifest) is necessary */
|
|
5331
5336
|
ownerOrAuthorName: string;
|
|
5332
|
-
/**
|
|
5337
|
+
/** When launching command from a different extension, the extension name (as defined in the extension's manifest) is necessary */
|
|
5333
5338
|
extensionName: string;
|
|
5339
|
+
/** Command name as defined in the extension's manifest */
|
|
5340
|
+
name: string;
|
|
5341
|
+
/** {@link LaunchType.UserInitiated} or {@link LaunchType.Background} */
|
|
5342
|
+
type: LaunchType;
|
|
5343
|
+
/** Optional object for the argument properties and values as defined in the extension's manifest, for example: `{ "argument1": "value1" }` */
|
|
5344
|
+
arguments?: Arguments | null;
|
|
5345
|
+
/** Arbitrary object for custom data that should be passed to the command and accessible as `environment.launchContext`; the object must be JSON serializable (Dates and Buffers supported) */
|
|
5346
|
+
context?: LaunchContext | null;
|
|
5347
|
+
/** Optional string to send as fallback text to the command */
|
|
5348
|
+
fallbackText?: string | null;
|
|
5334
5349
|
};
|
|
5335
5350
|
|
|
5336
5351
|
/**
|
|
5337
5352
|
* Options for launching a command from the same extension.
|
|
5338
5353
|
*/
|
|
5339
5354
|
declare type IntraExtensionLaunchOptions = {
|
|
5340
|
-
/**
|
|
5355
|
+
/** Command name as defined in the extension's manifest */
|
|
5341
5356
|
name: string;
|
|
5342
5357
|
/** {@link LaunchType.UserInitiated} or {@link LaunchType.Background} */
|
|
5343
5358
|
type: LaunchType;
|
|
5344
|
-
/**
|
|
5359
|
+
/** Optional object for the argument properties and values as defined in the extension's manifest, for example: `{ "argument1": "value1" }` */
|
|
5345
5360
|
arguments?: Arguments | null;
|
|
5346
|
-
/**
|
|
5361
|
+
/** Arbitrary object for custom data that should be passed to the command and accessible as `environment.launchContext`; the object must be JSON serializable (Dates and Buffers supported) */
|
|
5347
5362
|
context?: LaunchContext | null;
|
|
5348
|
-
/**
|
|
5363
|
+
/** Optional string to send as fallback text to the command */
|
|
5349
5364
|
fallbackText?: string | null;
|
|
5350
5365
|
};
|
|
5351
5366
|
|
|
@@ -5806,11 +5821,7 @@ declare interface LabelProps {
|
|
|
5806
5821
|
* Use this method if your command needs to open another command based on user interaction,
|
|
5807
5822
|
* or when an immediate background refresh should be triggered, for example when a command needs to update an associated menu-bar command.
|
|
5808
5823
|
*
|
|
5809
|
-
* @param options -
|
|
5810
|
-
* `name`: command name as defined in the extension's manifest
|
|
5811
|
-
* `type`: {@link LaunchType.UserInitiated} or {@link LaunchType.Background}
|
|
5812
|
-
* `arguments`: optional object for the argument properties and values as defined in the extension's manifest, for example: `{ "argument1": "value1" }`
|
|
5813
|
-
* `context`: arbitrary object for custom data that should be passed to the command and accessible as `environment.launchContext`; the object must be JSON serializable (Dates and Buffers supported)
|
|
5824
|
+
* @param options - Options to launch a command within the same extension or in another extension.
|
|
5814
5825
|
* @returns A Promise that resolves when the command has been launched. (Note that this does not indicate that the launched command has finished executing.)
|
|
5815
5826
|
*
|
|
5816
5827
|
* @throws {@link Error} if the command does not exist or is not enabled.
|
|
@@ -5833,6 +5844,9 @@ declare interface LabelProps {
|
|
|
5833
5844
|
[item: string]: any;
|
|
5834
5845
|
}
|
|
5835
5846
|
|
|
5847
|
+
/**
|
|
5848
|
+
* Options for launching a command from the same extension or from another extension.
|
|
5849
|
+
*/
|
|
5836
5850
|
declare type LaunchOptions = IntraExtensionLaunchOptions | InterExtensionLaunchOptions;
|
|
5837
5851
|
|
|
5838
5852
|
/**
|