@raycast/api 1.47.3 → 1.48.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/api.d.ts CHANGED
@@ -121,6 +121,12 @@ export declare namespace Action {
121
121
  * Props of the {@link Action.PickDate} React component.
122
122
  */
123
123
  export type Props = PickDateProps;
124
+ /**
125
+ * The types of date components the user can pick
126
+ * * `Date` - only year, month, and day can be picked
127
+ * * `DateTime` - hour and second can be picked in addition to year, month and day
128
+ */
129
+ export type Type = DatePickerType_2;
124
130
  }
125
131
  }
126
132
 
@@ -403,7 +409,7 @@ declare interface ActionProps {
403
409
  * @internal
404
410
  * Some actions require some custom integration on the native side. That's how we recognise them
405
411
  */
406
- type?: "submit-form" | "date-picker";
412
+ type?: "submit-form" | "date-picker" | "date-time-picker";
407
413
  }
408
414
 
409
415
  /**
@@ -715,6 +721,7 @@ export declare namespace Clipboard {
715
721
  * Copies content to the clipboard.
716
722
  *
717
723
  * @param content - The content to copy to the clipboard.
724
+ * @param options - Options for the copy operation.
718
725
  * @returns A Promise that resolves when the content is copied to the clipboard.
719
726
  *
720
727
  * @example
@@ -735,10 +742,12 @@ export declare namespace Clipboard {
735
742
  * }
736
743
  *
737
744
  * await Clipboard.copy(fileContent);
745
+ *
746
+ * await Clipboard.copy("SecretPassword", { transient: true });
738
747
  * };
739
748
  * ```
740
749
  */
741
- export function copy(content: string | number | Content): Promise<void>;
750
+ export function copy(content: string | number | Content, options?: CopyOptions): Promise<void>;
742
751
  /**
743
752
  * Clears the current clipboard contents.
744
753
  *
@@ -859,6 +868,12 @@ export declare namespace Clipboard {
859
868
  */
860
869
  text?: string;
861
870
  };
871
+ export type CopyOptions = {
872
+ /**
873
+ * Indicates whether the content should be copied to the clipboard temporarily or not.
874
+ */
875
+ transient: boolean;
876
+ };
862
877
  }
863
878
 
864
879
  /**
@@ -1405,6 +1420,11 @@ declare interface CopyToClipboardProps {
1405
1420
  * @defaultValue {@link Icon.Clipboard}
1406
1421
  */
1407
1422
  icon?: Image.ImageLike;
1423
+ /**
1424
+ * Indicates whether the content should be copied to the clipboard temporarily or not.
1425
+ * @defaultValue false
1426
+ */
1427
+ transient?: boolean;
1408
1428
  /**
1409
1429
  * The keyboard shortcut for the Action.
1410
1430
  */
@@ -1477,6 +1497,15 @@ declare interface DatePickerMembers {
1477
1497
  Type: typeof DatePickerType;
1478
1498
  }
1479
1499
 
1500
+ declare interface DatePickerMembers_2 {
1501
+ /**
1502
+ * The types of date components the user can pick
1503
+ * * `Date` - only year, month, and day can be picked
1504
+ * * `DateTime` - hour and second can be picked in addition to year, month and day
1505
+ */
1506
+ Type: typeof DatePickerType_2;
1507
+ }
1508
+
1480
1509
  declare interface DatePickerProps extends FormItemProps_2<Date | null> {
1481
1510
  /**
1482
1511
  * Indicates what types of date components can be picked
@@ -1505,6 +1534,20 @@ declare enum DatePickerType {
1505
1534
  DateTime = "date_time"
1506
1535
  }
1507
1536
 
1537
+ /**
1538
+ * See {@link Action.PickDate.Type}
1539
+ */
1540
+ declare enum DatePickerType_2 {
1541
+ /**
1542
+ * Only year, month, and day can be picked
1543
+ */
1544
+ Date = "date",
1545
+ /**
1546
+ * hour and second can be picked in addition to year, month and day
1547
+ */
1548
+ DateTime = "date_time"
1549
+ }
1550
+
1508
1551
  declare interface DeprecatedActionPanelMembers {
1509
1552
  /**
1510
1553
  * @deprecated Use {@link Action} instead.
@@ -4359,6 +4402,8 @@ export declare enum Icon {
4359
4402
  ArrowUp = "arrow-up-16",
4360
4403
  ArrowUpCircle = "arrow-up-circle-16",
4361
4404
  ArrowUpCircleFilled = "arrow-up-circle-filled-16",
4405
+ ArrowsContract = "arrows-contract-16",
4406
+ ArrowsExpand = "arrows-expand-16",
4362
4407
  AtSymbol = "at-symbol-16",
4363
4408
  BandAid = "band-aid-16",
4364
4409
  BankNote = "bank-note-16",
@@ -4385,6 +4430,7 @@ export declare enum Icon {
4385
4430
  Brush = "brush-16",
4386
4431
  Bubble = "speech-bubble-16",
4387
4432
  Bug = "bug-16",
4433
+ Building = "building-16",
4388
4434
  BulletPoints = "bullet-points-16",
4389
4435
  BullsEye = "bulls-eye-16",
4390
4436
  Buoy = "buoy-16",
@@ -4397,6 +4443,7 @@ export declare enum Icon {
4397
4443
  Center = "center-16",
4398
4444
  Check = "check-16",
4399
4445
  CheckCircle = "check-circle-16",
4446
+ CheckRosette = "check-rosette-16",
4400
4447
  Checkmark = "check-circle-16",
4401
4448
  ChessPiece = "chess-piece-16",
4402
4449
  ChevronDown = "chevron-down-16",
@@ -4428,6 +4475,7 @@ export declare enum Icon {
4428
4475
  Cog = "cog-16",
4429
4476
  Coin = "coin-16",
4430
4477
  Coins = "coins-16",
4478
+ CommandSymbol = "command-symbol-16",
4431
4479
  Compass = "compass-16",
4432
4480
  ComputerChip = "computer-chip-16",
4433
4481
  Contrast = "contrast-16",
@@ -4461,6 +4509,7 @@ export declare enum Icon {
4461
4509
  Filter = "filter-16",
4462
4510
  Finder = "finder-16",
4463
4511
  Fingerprint = "fingerprint-16",
4512
+ Flag = "flag-16",
4464
4513
  Folder = "folder-16",
4465
4514
  Footprints = "footprints-16",
4466
4515
  Forward = "forward-16",
@@ -4636,6 +4685,7 @@ export declare enum Icon {
4636
4685
  Number98 = "number-98-16",
4637
4686
  Number99 = "number-99-16",
4638
4687
  Paperclip = "paperclip-16",
4688
+ Paragraph = "paragraph-16",
4639
4689
  Patch = "patch-16",
4640
4690
  Pause = "pause-16",
4641
4691
  PauseFilled = "pause-filled-16",
@@ -4656,6 +4706,8 @@ export declare enum Icon {
4656
4706
  PlusCircle = "plus-circle-16",
4657
4707
  PlusCircleFilled = "plus-circle-filled-16",
4658
4708
  PlusMinusDivideMultiply = "plus-minus-divide-multiply-16",
4709
+ PlusSquare = "plus-square-16",
4710
+ PlusTopRightSquare = "plus-top-right-square-16",
4659
4711
  Power = "power-16",
4660
4712
  Print = "print-16",
4661
4713
  QuestionMark = "question-mark-circle-16",
@@ -4680,6 +4732,7 @@ export declare enum Icon {
4680
4732
  Ruler = "ruler-16",
4681
4733
  SaveDocument = "save-document-16",
4682
4734
  Shield = "shield-01-16",
4735
+ ShortParagraph = "short-paragraph-16",
4683
4736
  Shuffle = "shuffle-16",
4684
4737
  Sidebar = "app-window-sidebar-right-16",
4685
4738
  Signal1 = "signal-1-16",
@@ -4741,6 +4794,7 @@ export declare enum Icon {
4741
4794
  WristWatch = "wrist-watch-16",
4742
4795
  XMarkCircle = "x-mark-circle-16",
4743
4796
  XMarkCircleFilled = "x-mark-circle-filled-16",
4797
+ XMarkTopRightSquare = "x-mark-top-right-square-16",
4744
4798
  /** @deprecated Use {@link Icon.ArrowClockwise} instead. */
4745
4799
  TwoArrowsClockwise = "arrow-clockwise-16",
4746
4800
  /** @deprecated Use {@link Icon.EyeDisabled} instead. */
@@ -6677,7 +6731,7 @@ export declare const pasteText: typeof Clipboard.paste;
6677
6731
  /**
6678
6732
  * See {@link Action.PickDate}
6679
6733
  */
6680
- declare const PickDate: FunctionComponent<PickDateProps>;
6734
+ declare const PickDate: FunctionComponent<PickDateProps> & DatePickerMembers_2;
6681
6735
 
6682
6736
  /**
6683
6737
  * See {@link Action.PickDate.Props}
@@ -6700,6 +6754,12 @@ declare interface PickDateProps {
6700
6754
  * Callback when the Date was picked
6701
6755
  */
6702
6756
  onChange: (date: Date | null) => void;
6757
+ /**
6758
+ * Indicates what types of date components can be picked
6759
+ *
6760
+ * Defaults to {@link Action.PickDate.Type.DateTime}
6761
+ */
6762
+ type?: DatePickerType_2;
6703
6763
  }
6704
6764
 
6705
6765
  /**
@@ -7795,6 +7855,25 @@ declare interface TrashProps {
7795
7855
  onTrash?: (paths: PathLike | PathLike[]) => void;
7796
7856
  }
7797
7857
 
7858
+ /**
7859
+ * @beta
7860
+ */
7861
+ export declare namespace unstable_AI {
7862
+ /**
7863
+ *
7864
+ */
7865
+ export function answer(prompt: string, options?: AnswerOptions): Promise<string> & {
7866
+ on(event: "data", listener: (chunk: string) => void): void;
7867
+ };
7868
+ export type AnswerOptions = {
7869
+ /**
7870
+ * Between 0 and 1
7871
+ */
7872
+ temperature?: number;
7873
+ maxTokens?: number;
7874
+ };
7875
+ }
7876
+
7798
7877
  /**
7799
7878
  * Update the values of properties declared in the manifest of a command.
7800
7879
  *
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@raycast/api",
3
- "version": "1.47.3",
3
+ "version": "1.48.1",
4
4
  "description": "Build extensions for Raycast with React and Node.js.",
5
5
  "author": "Raycast Technologies Ltd.",
6
6
  "homepage": "https://developers.raycast.com",
package/types/index.d.ts CHANGED
@@ -121,6 +121,12 @@ export declare namespace Action {
121
121
  * Props of the {@link Action.PickDate} React component.
122
122
  */
123
123
  export type Props = PickDateProps;
124
+ /**
125
+ * The types of date components the user can pick
126
+ * * `Date` - only year, month, and day can be picked
127
+ * * `DateTime` - hour and second can be picked in addition to year, month and day
128
+ */
129
+ export type Type = DatePickerType_2;
124
130
  }
125
131
  }
126
132
 
@@ -711,6 +717,7 @@ export declare namespace Clipboard {
711
717
  * Copies content to the clipboard.
712
718
  *
713
719
  * @param content - The content to copy to the clipboard.
720
+ * @param options - Options for the copy operation.
714
721
  * @returns A Promise that resolves when the content is copied to the clipboard.
715
722
  *
716
723
  * @example
@@ -731,10 +738,12 @@ export declare namespace Clipboard {
731
738
  * }
732
739
  *
733
740
  * await Clipboard.copy(fileContent);
741
+ *
742
+ * await Clipboard.copy("SecretPassword", { transient: true });
734
743
  * };
735
744
  * ```
736
745
  */
737
- export function copy(content: string | number | Content): Promise<void>;
746
+ export function copy(content: string | number | Content, options?: CopyOptions): Promise<void>;
738
747
  /**
739
748
  * Clears the current clipboard contents.
740
749
  *
@@ -855,6 +864,12 @@ export declare namespace Clipboard {
855
864
  */
856
865
  text?: string;
857
866
  };
867
+ export type CopyOptions = {
868
+ /**
869
+ * Indicates whether the content should be copied to the clipboard temporarily or not.
870
+ */
871
+ transient: boolean;
872
+ };
858
873
  }
859
874
 
860
875
  /**
@@ -1401,6 +1416,11 @@ declare interface CopyToClipboardProps {
1401
1416
  * @defaultValue {@link Icon.Clipboard}
1402
1417
  */
1403
1418
  icon?: Image.ImageLike;
1419
+ /**
1420
+ * Indicates whether the content should be copied to the clipboard temporarily or not.
1421
+ * @defaultValue false
1422
+ */
1423
+ transient?: boolean;
1404
1424
  /**
1405
1425
  * The keyboard shortcut for the Action.
1406
1426
  */
@@ -1473,6 +1493,15 @@ declare interface DatePickerMembers {
1473
1493
  Type: typeof DatePickerType;
1474
1494
  }
1475
1495
 
1496
+ declare interface DatePickerMembers_2 {
1497
+ /**
1498
+ * The types of date components the user can pick
1499
+ * * `Date` - only year, month, and day can be picked
1500
+ * * `DateTime` - hour and second can be picked in addition to year, month and day
1501
+ */
1502
+ Type: typeof DatePickerType_2;
1503
+ }
1504
+
1476
1505
  declare interface DatePickerProps extends FormItemProps_2<Date | null> {
1477
1506
  /**
1478
1507
  * Indicates what types of date components can be picked
@@ -1501,6 +1530,20 @@ declare enum DatePickerType {
1501
1530
  DateTime = "date_time"
1502
1531
  }
1503
1532
 
1533
+ /**
1534
+ * See {@link Action.PickDate.Type}
1535
+ */
1536
+ declare enum DatePickerType_2 {
1537
+ /**
1538
+ * Only year, month, and day can be picked
1539
+ */
1540
+ Date = "date",
1541
+ /**
1542
+ * hour and second can be picked in addition to year, month and day
1543
+ */
1544
+ DateTime = "date_time"
1545
+ }
1546
+
1504
1547
  declare interface DeprecatedActionPanelMembers {
1505
1548
  /**
1506
1549
  * @deprecated Use {@link Action} instead.
@@ -4355,6 +4398,8 @@ export declare enum Icon {
4355
4398
  ArrowUp = "arrow-up-16",
4356
4399
  ArrowUpCircle = "arrow-up-circle-16",
4357
4400
  ArrowUpCircleFilled = "arrow-up-circle-filled-16",
4401
+ ArrowsContract = "arrows-contract-16",
4402
+ ArrowsExpand = "arrows-expand-16",
4358
4403
  AtSymbol = "at-symbol-16",
4359
4404
  BandAid = "band-aid-16",
4360
4405
  BankNote = "bank-note-16",
@@ -4381,6 +4426,7 @@ export declare enum Icon {
4381
4426
  Brush = "brush-16",
4382
4427
  Bubble = "speech-bubble-16",
4383
4428
  Bug = "bug-16",
4429
+ Building = "building-16",
4384
4430
  BulletPoints = "bullet-points-16",
4385
4431
  BullsEye = "bulls-eye-16",
4386
4432
  Buoy = "buoy-16",
@@ -4393,6 +4439,7 @@ export declare enum Icon {
4393
4439
  Center = "center-16",
4394
4440
  Check = "check-16",
4395
4441
  CheckCircle = "check-circle-16",
4442
+ CheckRosette = "check-rosette-16",
4396
4443
  Checkmark = "check-circle-16",
4397
4444
  ChessPiece = "chess-piece-16",
4398
4445
  ChevronDown = "chevron-down-16",
@@ -4424,6 +4471,7 @@ export declare enum Icon {
4424
4471
  Cog = "cog-16",
4425
4472
  Coin = "coin-16",
4426
4473
  Coins = "coins-16",
4474
+ CommandSymbol = "command-symbol-16",
4427
4475
  Compass = "compass-16",
4428
4476
  ComputerChip = "computer-chip-16",
4429
4477
  Contrast = "contrast-16",
@@ -4457,6 +4505,7 @@ export declare enum Icon {
4457
4505
  Filter = "filter-16",
4458
4506
  Finder = "finder-16",
4459
4507
  Fingerprint = "fingerprint-16",
4508
+ Flag = "flag-16",
4460
4509
  Folder = "folder-16",
4461
4510
  Footprints = "footprints-16",
4462
4511
  Forward = "forward-16",
@@ -4632,6 +4681,7 @@ export declare enum Icon {
4632
4681
  Number98 = "number-98-16",
4633
4682
  Number99 = "number-99-16",
4634
4683
  Paperclip = "paperclip-16",
4684
+ Paragraph = "paragraph-16",
4635
4685
  Patch = "patch-16",
4636
4686
  Pause = "pause-16",
4637
4687
  PauseFilled = "pause-filled-16",
@@ -4652,6 +4702,8 @@ export declare enum Icon {
4652
4702
  PlusCircle = "plus-circle-16",
4653
4703
  PlusCircleFilled = "plus-circle-filled-16",
4654
4704
  PlusMinusDivideMultiply = "plus-minus-divide-multiply-16",
4705
+ PlusSquare = "plus-square-16",
4706
+ PlusTopRightSquare = "plus-top-right-square-16",
4655
4707
  Power = "power-16",
4656
4708
  Print = "print-16",
4657
4709
  QuestionMark = "question-mark-circle-16",
@@ -4676,6 +4728,7 @@ export declare enum Icon {
4676
4728
  Ruler = "ruler-16",
4677
4729
  SaveDocument = "save-document-16",
4678
4730
  Shield = "shield-01-16",
4731
+ ShortParagraph = "short-paragraph-16",
4679
4732
  Shuffle = "shuffle-16",
4680
4733
  Sidebar = "app-window-sidebar-right-16",
4681
4734
  Signal1 = "signal-1-16",
@@ -4737,6 +4790,7 @@ export declare enum Icon {
4737
4790
  WristWatch = "wrist-watch-16",
4738
4791
  XMarkCircle = "x-mark-circle-16",
4739
4792
  XMarkCircleFilled = "x-mark-circle-filled-16",
4793
+ XMarkTopRightSquare = "x-mark-top-right-square-16",
4740
4794
  /** @deprecated Use {@link Icon.ArrowClockwise} instead. */
4741
4795
  TwoArrowsClockwise = "arrow-clockwise-16",
4742
4796
  /** @deprecated Use {@link Icon.EyeDisabled} instead. */
@@ -6673,7 +6727,7 @@ export declare const pasteText: typeof Clipboard.paste;
6673
6727
  /**
6674
6728
  * See {@link Action.PickDate}
6675
6729
  */
6676
- declare const PickDate: FunctionComponent<PickDateProps>;
6730
+ declare const PickDate: FunctionComponent<PickDateProps> & DatePickerMembers_2;
6677
6731
 
6678
6732
  /**
6679
6733
  * See {@link Action.PickDate.Props}
@@ -6696,6 +6750,12 @@ declare interface PickDateProps {
6696
6750
  * Callback when the Date was picked
6697
6751
  */
6698
6752
  onChange: (date: Date | null) => void;
6753
+ /**
6754
+ * Indicates what types of date components can be picked
6755
+ *
6756
+ * Defaults to {@link Action.PickDate.Type.DateTime}
6757
+ */
6758
+ type?: DatePickerType_2;
6699
6759
  }
6700
6760
 
6701
6761
  /**