chrome-types 0.1.364 → 0.1.365

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.
Files changed (3) hide show
  1. package/_all.d.ts +215 -4
  2. package/index.d.ts +215 -4
  3. package/package.json +2 -2
package/_all.d.ts CHANGED
@@ -14,8 +14,8 @@
14
14
  * limitations under the License.
15
15
  */
16
16
 
17
- // Generated on Thu Jul 24 2025 22:33:54 GMT+0000 (Coordinated Universal Time)
18
- // Built at 16aab40117a3dacc9393cd3dd389e556ab3659c8
17
+ // Generated on Fri Jul 25 2025 10:14:07 GMT+0000 (Coordinated Universal Time)
18
+ // Built at f140a2e2a376335e7d3d1b341e99a78a63272e04
19
19
 
20
20
  // Includes all types, including MV2 + Platform Apps APIs.
21
21
 
@@ -726,6 +726,217 @@ declare namespace chrome {
726
726
  ): void;
727
727
  }
728
728
 
729
+ /**
730
+ * Use the `chrome.alarms` API to schedule code to run periodically or at a specified time in the future.
731
+ *
732
+ * @chrome-permission alarms
733
+ */
734
+ export namespace alarms {
735
+
736
+ export interface Alarm {
737
+
738
+ /**
739
+ * Name of this alarm.
740
+ */
741
+ name: string;
742
+
743
+ /**
744
+ * Time at which this alarm was scheduled to fire, in milliseconds past the epoch (e.g. `Date.now() + n`). For performance reasons, the alarm may have been delayed an arbitrary amount beyond this.
745
+ */
746
+ scheduledTime: number;
747
+
748
+ /**
749
+ * If not null, the alarm is a repeating alarm and will fire again in `periodInMinutes` minutes.
750
+ */
751
+ periodInMinutes?: number;
752
+ }
753
+
754
+ export interface AlarmCreateInfo {
755
+
756
+ /**
757
+ * Time at which the alarm should fire, in milliseconds past the epoch (e.g. `Date.now() + n`).
758
+ */
759
+ when?: number;
760
+
761
+ /**
762
+ * Length of time in minutes after which the `onAlarm` event should fire.
763
+ */
764
+ delayInMinutes?: number;
765
+
766
+ /**
767
+ * If set, the onAlarm event should fire every `periodInMinutes` minutes after the initial event specified by `when` or `delayInMinutes`. If not set, the alarm will only fire once.
768
+ */
769
+ periodInMinutes?: number;
770
+ }
771
+
772
+ /**
773
+ * Fired when an alarm has elapsed. Useful for event pages.
774
+ */
775
+ export const onAlarm: events.Event<(
776
+ alarm: Alarm,
777
+ ) => void>;
778
+
779
+ /**
780
+ * Creates an alarm. Near the time(s) specified by `alarmInfo`, the `onAlarm` event is fired. If there is another alarm with the same name (or no name if none is specified), it will be cancelled and replaced by this alarm.
781
+ *
782
+ * In order to reduce the load on the user's machine, Chrome limits alarms to at most once every 30 seconds but may delay them an arbitrary amount more. That is, setting `delayInMinutes` or `periodInMinutes` to less than `0.5` will not be honored and will cause a warning. `when` can be set to less than 30 seconds after "now" without warning but won't actually cause the alarm to fire for at least 30 seconds.
783
+ *
784
+ * To help you debug your app or extension, when you've loaded it unpacked, there's no limit to how often the alarm can fire.
785
+ *
786
+ * @chrome-returns-extra since Chrome 111
787
+ * @param name Optional name to identify this alarm. Defaults to the empty string.
788
+ * @param alarmInfo Describes when the alarm should fire. The initial time must be specified by either `when` or `delayInMinutes` (but not both). If `periodInMinutes` is set, the alarm will repeat every `periodInMinutes` minutes after the initial event. If neither `when` or `delayInMinutes` is set for a repeating alarm, `periodInMinutes` is used as the default for `delayInMinutes`.
789
+ */
790
+ export function create(
791
+
792
+ name: string,
793
+
794
+ alarmInfo: AlarmCreateInfo,
795
+ ): Promise<void>;
796
+
797
+ /**
798
+ * Creates an alarm. Near the time(s) specified by `alarmInfo`, the `onAlarm` event is fired. If there is another alarm with the same name (or no name if none is specified), it will be cancelled and replaced by this alarm.
799
+ *
800
+ * In order to reduce the load on the user's machine, Chrome limits alarms to at most once every 30 seconds but may delay them an arbitrary amount more. That is, setting `delayInMinutes` or `periodInMinutes` to less than `0.5` will not be honored and will cause a warning. `when` can be set to less than 30 seconds after "now" without warning but won't actually cause the alarm to fire for at least 30 seconds.
801
+ *
802
+ * To help you debug your app or extension, when you've loaded it unpacked, there's no limit to how often the alarm can fire.
803
+ *
804
+ * @chrome-returns-extra since Chrome 111
805
+ * @param alarmInfo Describes when the alarm should fire. The initial time must be specified by either `when` or `delayInMinutes` (but not both). If `periodInMinutes` is set, the alarm will repeat every `periodInMinutes` minutes after the initial event. If neither `when` or `delayInMinutes` is set for a repeating alarm, `periodInMinutes` is used as the default for `delayInMinutes`.
806
+ */
807
+ export function create(
808
+
809
+ alarmInfo: AlarmCreateInfo,
810
+ ): Promise<void>;
811
+
812
+ /**
813
+ * Creates an alarm. Near the time(s) specified by `alarmInfo`, the `onAlarm` event is fired. If there is another alarm with the same name (or no name if none is specified), it will be cancelled and replaced by this alarm.
814
+ *
815
+ * In order to reduce the load on the user's machine, Chrome limits alarms to at most once every 30 seconds but may delay them an arbitrary amount more. That is, setting `delayInMinutes` or `periodInMinutes` to less than `0.5` will not be honored and will cause a warning. `when` can be set to less than 30 seconds after "now" without warning but won't actually cause the alarm to fire for at least 30 seconds.
816
+ *
817
+ * To help you debug your app or extension, when you've loaded it unpacked, there's no limit to how often the alarm can fire.
818
+ *
819
+ * @param name Optional name to identify this alarm. Defaults to the empty string.
820
+ * @param alarmInfo Describes when the alarm should fire. The initial time must be specified by either `when` or `delayInMinutes` (but not both). If `periodInMinutes` is set, the alarm will repeat every `periodInMinutes` minutes after the initial event. If neither `when` or `delayInMinutes` is set for a repeating alarm, `periodInMinutes` is used as the default for `delayInMinutes`.
821
+ * @param callback Invoked when the alarm has been created.
822
+ */
823
+ export function create(
824
+
825
+ name: string,
826
+
827
+ alarmInfo: AlarmCreateInfo,
828
+
829
+ /**
830
+ * @since Chrome 111
831
+ */
832
+ callback?: () => void,
833
+ ): void;
834
+
835
+ /**
836
+ * Creates an alarm. Near the time(s) specified by `alarmInfo`, the `onAlarm` event is fired. If there is another alarm with the same name (or no name if none is specified), it will be cancelled and replaced by this alarm.
837
+ *
838
+ * In order to reduce the load on the user's machine, Chrome limits alarms to at most once every 30 seconds but may delay them an arbitrary amount more. That is, setting `delayInMinutes` or `periodInMinutes` to less than `0.5` will not be honored and will cause a warning. `when` can be set to less than 30 seconds after "now" without warning but won't actually cause the alarm to fire for at least 30 seconds.
839
+ *
840
+ * To help you debug your app or extension, when you've loaded it unpacked, there's no limit to how often the alarm can fire.
841
+ *
842
+ * @param alarmInfo Describes when the alarm should fire. The initial time must be specified by either `when` or `delayInMinutes` (but not both). If `periodInMinutes` is set, the alarm will repeat every `periodInMinutes` minutes after the initial event. If neither `when` or `delayInMinutes` is set for a repeating alarm, `periodInMinutes` is used as the default for `delayInMinutes`.
843
+ * @param callback Invoked when the alarm has been created.
844
+ */
845
+ export function create(
846
+
847
+ alarmInfo: AlarmCreateInfo,
848
+
849
+ /**
850
+ * @since Chrome 111
851
+ */
852
+ callback?: () => void,
853
+ ): void;
854
+
855
+ /**
856
+ * Retrieves details about the specified alarm.
857
+ *
858
+ * @chrome-returns-extra since Chrome 91
859
+ * @param name The name of the alarm to get. Defaults to the empty string.
860
+ */
861
+ export function get(
862
+
863
+ name?: string,
864
+ ): Promise<Alarm | undefined>;
865
+
866
+ /**
867
+ * Retrieves details about the specified alarm.
868
+ *
869
+ * @param name The name of the alarm to get. Defaults to the empty string.
870
+ */
871
+ export function get(
872
+
873
+ name?: string,
874
+
875
+ callback?: (
876
+ alarm?: Alarm,
877
+ ) => void,
878
+ ): void;
879
+
880
+ /**
881
+ * Gets an array of all the alarms.
882
+ *
883
+ * @chrome-returns-extra since Chrome 91
884
+ */
885
+ export function getAll(): Promise<Alarm[]>;
886
+
887
+ /**
888
+ * Gets an array of all the alarms.
889
+ */
890
+ export function getAll(
891
+
892
+ callback?: (
893
+ alarms: Alarm[],
894
+ ) => void,
895
+ ): void;
896
+
897
+ /**
898
+ * Clears the alarm with the given name.
899
+ *
900
+ * @chrome-returns-extra since Chrome 91
901
+ * @param name The name of the alarm to clear. Defaults to the empty string.
902
+ */
903
+ export function clear(
904
+
905
+ name?: string,
906
+ ): Promise<boolean>;
907
+
908
+ /**
909
+ * Clears the alarm with the given name.
910
+ *
911
+ * @param name The name of the alarm to clear. Defaults to the empty string.
912
+ */
913
+ export function clear(
914
+
915
+ name?: string,
916
+
917
+ callback?: (
918
+ wasCleared: boolean,
919
+ ) => void,
920
+ ): void;
921
+
922
+ /**
923
+ * Clears all alarms.
924
+ *
925
+ * @chrome-returns-extra since Chrome 91
926
+ */
927
+ export function clearAll(): Promise<boolean>;
928
+
929
+ /**
930
+ * Clears all alarms.
931
+ */
932
+ export function clearAll(
933
+
934
+ callback?: (
935
+ wasCleared: boolean,
936
+ ) => void,
937
+ ): void;
938
+ }
939
+
729
940
  /**
730
941
  * @chrome-disallow-service-workers
731
942
  * @chrome-max-manifest MV2
@@ -31627,7 +31838,7 @@ declare namespace chrome {
31627
31838
  groupId?: number,
31628
31839
 
31629
31840
  /**
31630
- * The ID of the Split View that the tabs are in, or {@link tabs.SPLIT_TAB_ID_NONE} for tabs that aren't in a Split View.
31841
+ * The ID of the Split View that the tabs are in, or {@link tabs.SPLIT_VIEW_ID_NONE} for tabs that aren't in a Split View.
31631
31842
  *
31632
31843
  * @since Pending
31633
31844
  */
@@ -31740,7 +31951,7 @@ declare namespace chrome {
31740
31951
  groupId?: number,
31741
31952
 
31742
31953
  /**
31743
- * The ID of the Split View that the tabs are in, or {@link tabs.SPLIT_TAB_ID_NONE} for tabs that aren't in a Split View.
31954
+ * The ID of the Split View that the tabs are in, or {@link tabs.SPLIT_VIEW_ID_NONE} for tabs that aren't in a Split View.
31744
31955
  *
31745
31956
  * @since Pending
31746
31957
  */
package/index.d.ts CHANGED
@@ -14,8 +14,8 @@
14
14
  * limitations under the License.
15
15
  */
16
16
 
17
- // Generated on Thu Jul 24 2025 22:33:49 GMT+0000 (Coordinated Universal Time)
18
- // Built at 16aab40117a3dacc9393cd3dd389e556ab3659c8
17
+ // Generated on Fri Jul 25 2025 10:14:03 GMT+0000 (Coordinated Universal Time)
18
+ // Built at f140a2e2a376335e7d3d1b341e99a78a63272e04
19
19
 
20
20
  // Includes MV3+ APIs only.
21
21
 
@@ -784,6 +784,217 @@ declare namespace chrome {
784
784
  ): void;
785
785
  }
786
786
 
787
+ /**
788
+ * Use the `chrome.alarms` API to schedule code to run periodically or at a specified time in the future.
789
+ *
790
+ * @chrome-permission alarms
791
+ */
792
+ export namespace alarms {
793
+
794
+ export interface Alarm {
795
+
796
+ /**
797
+ * Name of this alarm.
798
+ */
799
+ name: string;
800
+
801
+ /**
802
+ * Time at which this alarm was scheduled to fire, in milliseconds past the epoch (e.g. `Date.now() + n`). For performance reasons, the alarm may have been delayed an arbitrary amount beyond this.
803
+ */
804
+ scheduledTime: number;
805
+
806
+ /**
807
+ * If not null, the alarm is a repeating alarm and will fire again in `periodInMinutes` minutes.
808
+ */
809
+ periodInMinutes?: number;
810
+ }
811
+
812
+ export interface AlarmCreateInfo {
813
+
814
+ /**
815
+ * Time at which the alarm should fire, in milliseconds past the epoch (e.g. `Date.now() + n`).
816
+ */
817
+ when?: number;
818
+
819
+ /**
820
+ * Length of time in minutes after which the `onAlarm` event should fire.
821
+ */
822
+ delayInMinutes?: number;
823
+
824
+ /**
825
+ * If set, the onAlarm event should fire every `periodInMinutes` minutes after the initial event specified by `when` or `delayInMinutes`. If not set, the alarm will only fire once.
826
+ */
827
+ periodInMinutes?: number;
828
+ }
829
+
830
+ /**
831
+ * Fired when an alarm has elapsed. Useful for event pages.
832
+ */
833
+ export const onAlarm: events.Event<(
834
+ alarm: Alarm,
835
+ ) => void>;
836
+
837
+ /**
838
+ * Creates an alarm. Near the time(s) specified by `alarmInfo`, the `onAlarm` event is fired. If there is another alarm with the same name (or no name if none is specified), it will be cancelled and replaced by this alarm.
839
+ *
840
+ * In order to reduce the load on the user's machine, Chrome limits alarms to at most once every 30 seconds but may delay them an arbitrary amount more. That is, setting `delayInMinutes` or `periodInMinutes` to less than `0.5` will not be honored and will cause a warning. `when` can be set to less than 30 seconds after "now" without warning but won't actually cause the alarm to fire for at least 30 seconds.
841
+ *
842
+ * To help you debug your app or extension, when you've loaded it unpacked, there's no limit to how often the alarm can fire.
843
+ *
844
+ * @chrome-returns-extra since Chrome 111
845
+ * @param name Optional name to identify this alarm. Defaults to the empty string.
846
+ * @param alarmInfo Describes when the alarm should fire. The initial time must be specified by either `when` or `delayInMinutes` (but not both). If `periodInMinutes` is set, the alarm will repeat every `periodInMinutes` minutes after the initial event. If neither `when` or `delayInMinutes` is set for a repeating alarm, `periodInMinutes` is used as the default for `delayInMinutes`.
847
+ */
848
+ export function create(
849
+
850
+ name: string,
851
+
852
+ alarmInfo: AlarmCreateInfo,
853
+ ): Promise<void>;
854
+
855
+ /**
856
+ * Creates an alarm. Near the time(s) specified by `alarmInfo`, the `onAlarm` event is fired. If there is another alarm with the same name (or no name if none is specified), it will be cancelled and replaced by this alarm.
857
+ *
858
+ * In order to reduce the load on the user's machine, Chrome limits alarms to at most once every 30 seconds but may delay them an arbitrary amount more. That is, setting `delayInMinutes` or `periodInMinutes` to less than `0.5` will not be honored and will cause a warning. `when` can be set to less than 30 seconds after "now" without warning but won't actually cause the alarm to fire for at least 30 seconds.
859
+ *
860
+ * To help you debug your app or extension, when you've loaded it unpacked, there's no limit to how often the alarm can fire.
861
+ *
862
+ * @chrome-returns-extra since Chrome 111
863
+ * @param alarmInfo Describes when the alarm should fire. The initial time must be specified by either `when` or `delayInMinutes` (but not both). If `periodInMinutes` is set, the alarm will repeat every `periodInMinutes` minutes after the initial event. If neither `when` or `delayInMinutes` is set for a repeating alarm, `periodInMinutes` is used as the default for `delayInMinutes`.
864
+ */
865
+ export function create(
866
+
867
+ alarmInfo: AlarmCreateInfo,
868
+ ): Promise<void>;
869
+
870
+ /**
871
+ * Creates an alarm. Near the time(s) specified by `alarmInfo`, the `onAlarm` event is fired. If there is another alarm with the same name (or no name if none is specified), it will be cancelled and replaced by this alarm.
872
+ *
873
+ * In order to reduce the load on the user's machine, Chrome limits alarms to at most once every 30 seconds but may delay them an arbitrary amount more. That is, setting `delayInMinutes` or `periodInMinutes` to less than `0.5` will not be honored and will cause a warning. `when` can be set to less than 30 seconds after "now" without warning but won't actually cause the alarm to fire for at least 30 seconds.
874
+ *
875
+ * To help you debug your app or extension, when you've loaded it unpacked, there's no limit to how often the alarm can fire.
876
+ *
877
+ * @param name Optional name to identify this alarm. Defaults to the empty string.
878
+ * @param alarmInfo Describes when the alarm should fire. The initial time must be specified by either `when` or `delayInMinutes` (but not both). If `periodInMinutes` is set, the alarm will repeat every `periodInMinutes` minutes after the initial event. If neither `when` or `delayInMinutes` is set for a repeating alarm, `periodInMinutes` is used as the default for `delayInMinutes`.
879
+ * @param callback Invoked when the alarm has been created.
880
+ */
881
+ export function create(
882
+
883
+ name: string,
884
+
885
+ alarmInfo: AlarmCreateInfo,
886
+
887
+ /**
888
+ * @since Chrome 111
889
+ */
890
+ callback?: () => void,
891
+ ): void;
892
+
893
+ /**
894
+ * Creates an alarm. Near the time(s) specified by `alarmInfo`, the `onAlarm` event is fired. If there is another alarm with the same name (or no name if none is specified), it will be cancelled and replaced by this alarm.
895
+ *
896
+ * In order to reduce the load on the user's machine, Chrome limits alarms to at most once every 30 seconds but may delay them an arbitrary amount more. That is, setting `delayInMinutes` or `periodInMinutes` to less than `0.5` will not be honored and will cause a warning. `when` can be set to less than 30 seconds after "now" without warning but won't actually cause the alarm to fire for at least 30 seconds.
897
+ *
898
+ * To help you debug your app or extension, when you've loaded it unpacked, there's no limit to how often the alarm can fire.
899
+ *
900
+ * @param alarmInfo Describes when the alarm should fire. The initial time must be specified by either `when` or `delayInMinutes` (but not both). If `periodInMinutes` is set, the alarm will repeat every `periodInMinutes` minutes after the initial event. If neither `when` or `delayInMinutes` is set for a repeating alarm, `periodInMinutes` is used as the default for `delayInMinutes`.
901
+ * @param callback Invoked when the alarm has been created.
902
+ */
903
+ export function create(
904
+
905
+ alarmInfo: AlarmCreateInfo,
906
+
907
+ /**
908
+ * @since Chrome 111
909
+ */
910
+ callback?: () => void,
911
+ ): void;
912
+
913
+ /**
914
+ * Retrieves details about the specified alarm.
915
+ *
916
+ * @chrome-returns-extra since Chrome 91
917
+ * @param name The name of the alarm to get. Defaults to the empty string.
918
+ */
919
+ export function get(
920
+
921
+ name?: string,
922
+ ): Promise<Alarm | undefined>;
923
+
924
+ /**
925
+ * Retrieves details about the specified alarm.
926
+ *
927
+ * @param name The name of the alarm to get. Defaults to the empty string.
928
+ */
929
+ export function get(
930
+
931
+ name?: string,
932
+
933
+ callback?: (
934
+ alarm?: Alarm,
935
+ ) => void,
936
+ ): void;
937
+
938
+ /**
939
+ * Gets an array of all the alarms.
940
+ *
941
+ * @chrome-returns-extra since Chrome 91
942
+ */
943
+ export function getAll(): Promise<Alarm[]>;
944
+
945
+ /**
946
+ * Gets an array of all the alarms.
947
+ */
948
+ export function getAll(
949
+
950
+ callback?: (
951
+ alarms: Alarm[],
952
+ ) => void,
953
+ ): void;
954
+
955
+ /**
956
+ * Clears the alarm with the given name.
957
+ *
958
+ * @chrome-returns-extra since Chrome 91
959
+ * @param name The name of the alarm to clear. Defaults to the empty string.
960
+ */
961
+ export function clear(
962
+
963
+ name?: string,
964
+ ): Promise<boolean>;
965
+
966
+ /**
967
+ * Clears the alarm with the given name.
968
+ *
969
+ * @param name The name of the alarm to clear. Defaults to the empty string.
970
+ */
971
+ export function clear(
972
+
973
+ name?: string,
974
+
975
+ callback?: (
976
+ wasCleared: boolean,
977
+ ) => void,
978
+ ): void;
979
+
980
+ /**
981
+ * Clears all alarms.
982
+ *
983
+ * @chrome-returns-extra since Chrome 91
984
+ */
985
+ export function clearAll(): Promise<boolean>;
986
+
987
+ /**
988
+ * Clears all alarms.
989
+ */
990
+ export function clearAll(
991
+
992
+ callback?: (
993
+ wasCleared: boolean,
994
+ ) => void,
995
+ ): void;
996
+ }
997
+
787
998
  /**
788
999
  * The `chrome.audio` API is provided to allow users to get information about and control the audio devices attached to the system. This API is currently only available in kiosk mode for ChromeOS.
789
1000
  *
@@ -24666,7 +24877,7 @@ declare namespace chrome {
24666
24877
  groupId?: number,
24667
24878
 
24668
24879
  /**
24669
- * The ID of the Split View that the tabs are in, or {@link tabs.SPLIT_TAB_ID_NONE} for tabs that aren't in a Split View.
24880
+ * The ID of the Split View that the tabs are in, or {@link tabs.SPLIT_VIEW_ID_NONE} for tabs that aren't in a Split View.
24670
24881
  *
24671
24882
  * @since Pending
24672
24883
  */
@@ -24779,7 +24990,7 @@ declare namespace chrome {
24779
24990
  groupId?: number,
24780
24991
 
24781
24992
  /**
24782
- * The ID of the Split View that the tabs are in, or {@link tabs.SPLIT_TAB_ID_NONE} for tabs that aren't in a Split View.
24993
+ * The ID of the Split View that the tabs are in, or {@link tabs.SPLIT_VIEW_ID_NONE} for tabs that aren't in a Split View.
24783
24994
  *
24784
24995
  * @since Pending
24785
24996
  */
package/package.json CHANGED
@@ -5,7 +5,7 @@
5
5
  "type": "module",
6
6
  "name": "chrome-types",
7
7
  "config": {
8
- "build-hash": "4ac966aa8337ec1d"
8
+ "build-hash": "0cd8a45b28a2c2ec"
9
9
  },
10
10
  "repository": {
11
11
  "type": "git",
@@ -16,5 +16,5 @@
16
16
  "url": "https://github.com/GoogleChrome/chrome-types/issues"
17
17
  },
18
18
  "homepage": "https://github.com/GoogleChrome/chrome-types",
19
- "version": "0.1.364"
19
+ "version": "0.1.365"
20
20
  }