een-api-toolkit 0.3.55 → 0.3.60

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/dist/index.d.ts CHANGED
@@ -704,6 +704,252 @@ export declare interface CameraRtspConnectionSettings {
704
704
  transport?: 'tcp' | 'udp';
705
705
  }
706
706
 
707
+ /**
708
+ * Top-level camera settings response from EEN API v3.0.
709
+ *
710
+ * @remarks
711
+ * The response wraps `CameraSettingsData` in a `data` property.
712
+ * Optionally includes `schema` (JSON Schema) and `proposedValues`
713
+ * when requested via the `include` query parameter.
714
+ *
715
+ * @example
716
+ * ```typescript
717
+ * import { getCameraSettings, type CameraSettings } from 'een-api-toolkit'
718
+ *
719
+ * const { data, error } = await getCameraSettings('camera-123', {
720
+ * include: ['schema', 'proposedValues']
721
+ * })
722
+ * if (data) {
723
+ * console.log('Settings:', data.data)
724
+ * console.log('Schema:', data.schema)
725
+ * console.log('Proposed values:', data.proposedValues)
726
+ * }
727
+ * ```
728
+ *
729
+ * @category Cameras
730
+ */
731
+ export declare interface CameraSettings {
732
+ /** The camera settings data */
733
+ data: CameraSettingsData;
734
+ /** JSON Schema describing all settings fields (when include contains 'schema') */
735
+ schema?: object;
736
+ /** Proposed/recommended values (when include contains 'proposedValues') */
737
+ proposedValues?: object;
738
+ }
739
+
740
+ /**
741
+ * Camera analog video settings.
742
+ *
743
+ * @remarks
744
+ * Settings specific to analog cameras connected via encoders.
745
+ *
746
+ * @category Cameras
747
+ */
748
+ export declare interface CameraSettingsAnalog {
749
+ /** Video standard (e.g., "NTSC", "PAL") */
750
+ videoStandard?: string;
751
+ /** Whether bad signal protection is enabled */
752
+ badSignalProtection?: boolean;
753
+ /** Whether a bad signal has been detected */
754
+ badSignalDetected?: boolean;
755
+ }
756
+
757
+ /**
758
+ * Camera audio settings.
759
+ *
760
+ * @remarks
761
+ * Controls microphone and audio input configuration.
762
+ *
763
+ * @category Cameras
764
+ */
765
+ export declare interface CameraSettingsAudio {
766
+ /** Whether the microphone is enabled */
767
+ microphoneEnabled?: boolean;
768
+ /** Audio input source identifier */
769
+ inputSourceId?: string;
770
+ }
771
+
772
+ /**
773
+ * Camera credentials settings.
774
+ *
775
+ * @remarks
776
+ * Credentials used to authenticate with the camera device.
777
+ *
778
+ * @category Cameras
779
+ */
780
+ export declare interface CameraSettingsCredentials {
781
+ /** Username for camera authentication */
782
+ username?: string;
783
+ /** Password for camera authentication (write-only, may not be returned) */
784
+ password?: string;
785
+ }
786
+
787
+ /**
788
+ * Aggregated camera settings data.
789
+ *
790
+ * @remarks
791
+ * Contains all operational settings for a camera, including retention,
792
+ * audio, video, analog, operating, and talkdown settings.
793
+ *
794
+ * @example
795
+ * ```typescript
796
+ * import { getCameraSettings, type CameraSettingsData } from 'een-api-toolkit'
797
+ *
798
+ * const { data } = await getCameraSettings('camera-123')
799
+ * if (data) {
800
+ * console.log('Timezone:', data.data.timeZone)
801
+ * console.log('Retention cloud days:', data.data.retention?.cloudDays)
802
+ * }
803
+ * ```
804
+ *
805
+ * @category Cameras
806
+ */
807
+ export declare interface CameraSettingsData {
808
+ /** Camera timezone (IANA timezone name) */
809
+ timeZone?: string;
810
+ /** RTSP connection settings */
811
+ rtsp?: CameraRtspConnectionSettings;
812
+ /** Camera device credentials */
813
+ credentials?: CameraSettingsCredentials;
814
+ /** Retention settings */
815
+ retention?: CameraSettingsRetention;
816
+ /** Audio settings */
817
+ audio?: CameraSettingsAudio;
818
+ /** Preview video stream settings */
819
+ previewVideo?: CameraSettingsPreviewVideo;
820
+ /** Main video stream settings */
821
+ mainVideo?: CameraSettingsMainVideo;
822
+ /** Analog video settings */
823
+ analog?: CameraSettingsAnalog;
824
+ /** Operating on/off settings */
825
+ operatingSettings?: CameraSettingsOperating;
826
+ /** Talkdown (two-way audio) settings */
827
+ talkdown?: CameraSettingsTalkdown;
828
+ }
829
+
830
+ /**
831
+ * Valid include values for the camera settings endpoint.
832
+ *
833
+ * @remarks
834
+ * - `schema` - Returns the JSON Schema describing all settings fields
835
+ * - `proposedValues` - Returns proposed/recommended values for settings
836
+ *
837
+ * @category Cameras
838
+ */
839
+ export declare type CameraSettingsInclude = 'schema' | 'proposedValues';
840
+
841
+ /**
842
+ * Camera main video settings.
843
+ *
844
+ * @remarks
845
+ * Configuration for the full-resolution main stream.
846
+ *
847
+ * @category Cameras
848
+ */
849
+ export declare interface CameraSettingsMainVideo {
850
+ /** Transmit mode (e.g., "always", "event") */
851
+ transmitMode?: string;
852
+ /** Resolution of the main stream */
853
+ resolution?: string;
854
+ /** Quality setting for main stream */
855
+ quality?: string;
856
+ /** Bitrate factor in kbps */
857
+ kbpsFactor?: number;
858
+ /** Capture mode */
859
+ captureMode?: string;
860
+ /** List of supported resolutions */
861
+ supportedResolutions?: string[];
862
+ }
863
+
864
+ /**
865
+ * Camera operating settings.
866
+ *
867
+ * @remarks
868
+ * Controls whether the camera is on or off, with optional scheduled overrides.
869
+ *
870
+ * @category Cameras
871
+ */
872
+ export declare interface CameraSettingsOperating {
873
+ /** Whether the camera is currently on */
874
+ on?: boolean;
875
+ /** Optional scheduled override for on/off state */
876
+ scheduledOverride?: CameraSettingsScheduledOverride | null;
877
+ }
878
+
879
+ /**
880
+ * Camera preview video settings.
881
+ *
882
+ * @remarks
883
+ * Configuration for the lower-resolution preview stream.
884
+ *
885
+ * @category Cameras
886
+ */
887
+ export declare interface CameraSettingsPreviewVideo {
888
+ /** Transmit mode (e.g., "always", "event") */
889
+ transmitMode?: string;
890
+ /** Resolution of the preview stream */
891
+ resolution?: string;
892
+ /** Interval between preview frames in milliseconds */
893
+ intervalMs?: number;
894
+ /** Quality setting for preview stream */
895
+ quality?: string;
896
+ /** List of supported resolutions */
897
+ supportedResolutions?: string[];
898
+ }
899
+
900
+ /**
901
+ * Camera retention settings.
902
+ *
903
+ * @remarks
904
+ * Controls how long video data is retained in cloud and on-premise storage.
905
+ *
906
+ * @category Cameras
907
+ */
908
+ export declare interface CameraSettingsRetention {
909
+ /** Number of days to retain recordings in cloud */
910
+ cloudDays?: number;
911
+ /** Whether cloud stores only preview (lower resolution) video */
912
+ cloudPreviewOnly?: boolean;
913
+ /** Minimum days to retain on the bridge */
914
+ minimumOnPremiseDays?: number;
915
+ /** Maximum days to retain on the bridge */
916
+ maximumOnPremiseDays?: number;
917
+ /** Number of days to always record (regardless of motion) */
918
+ alwaysRecordingDays?: number;
919
+ }
920
+
921
+ /**
922
+ * Scheduled override for camera operating settings.
923
+ *
924
+ * @remarks
925
+ * Allows the camera to be turned on/off on a schedule.
926
+ *
927
+ * @category Cameras
928
+ */
929
+ export declare interface CameraSettingsScheduledOverride {
930
+ /** Whether the scheduled override is active */
931
+ on?: boolean;
932
+ /** Schedule definition */
933
+ schedule?: string;
934
+ }
935
+
936
+ /**
937
+ * Camera talkdown (two-way audio) settings.
938
+ *
939
+ * @remarks
940
+ * Configuration for cameras with speaker/talkdown capability.
941
+ *
942
+ * @category Cameras
943
+ */
944
+ export declare interface CameraSettingsTalkdown {
945
+ /** Communication protocol for talkdown */
946
+ protocol?: string;
947
+ /** Audio mode for talkdown */
948
+ audioMode?: string;
949
+ /** SIP credentials for talkdown, if applicable */
950
+ sipCredentials?: object;
951
+ }
952
+
707
953
  /**
708
954
  * Share details for shared cameras.
709
955
  *
@@ -2724,6 +2970,64 @@ export declare interface GetCameraParams {
2724
2970
  */
2725
2971
  export declare function getCameras(params?: ListCamerasParams): Promise<Result<PaginatedResult<Camera>>>;
2726
2972
 
2973
+ /**
2974
+ * Get operational settings for a specific camera.
2975
+ *
2976
+ * @remarks
2977
+ * Fetches camera settings from `/api/v3.0/cameras/{cameraId}/settings`.
2978
+ * Returns retention, audio, video, operating, and other settings.
2979
+ * Use the `include` parameter to request additional data like JSON Schema
2980
+ * or proposed values.
2981
+ *
2982
+ * For more details, see the
2983
+ * [EEN API Documentation](https://developer.eagleeyenetworks.com/reference/getcamerasettings).
2984
+ *
2985
+ * @param cameraId - The unique identifier of the camera
2986
+ * @param params - Optional parameters (e.g., include schema or proposedValues)
2987
+ * @returns A Result containing the camera settings or an error
2988
+ *
2989
+ * @example
2990
+ * ```typescript
2991
+ * import { getCameraSettings } from 'een-api-toolkit'
2992
+ *
2993
+ * // Basic usage
2994
+ * const { data, error } = await getCameraSettings('camera-123')
2995
+ * if (data) {
2996
+ * console.log('Retention:', data.data.retention?.cloudDays, 'days')
2997
+ * }
2998
+ *
2999
+ * // With schema and proposed values
3000
+ * const { data: settings } = await getCameraSettings('camera-123', {
3001
+ * include: ['schema', 'proposedValues']
3002
+ * })
3003
+ * ```
3004
+ *
3005
+ * @category Cameras
3006
+ */
3007
+ export declare function getCameraSettings(cameraId: string, params?: GetCameraSettingsParams): Promise<Result<CameraSettings>>;
3008
+
3009
+ /**
3010
+ * Parameters for getting camera settings.
3011
+ *
3012
+ * @remarks
3013
+ * Controls what additional data is returned with camera settings.
3014
+ *
3015
+ * @example
3016
+ * ```typescript
3017
+ * import { getCameraSettings } from 'een-api-toolkit'
3018
+ *
3019
+ * const { data } = await getCameraSettings('camera-123', {
3020
+ * include: ['schema', 'proposedValues']
3021
+ * })
3022
+ * ```
3023
+ *
3024
+ * @category Cameras
3025
+ */
3026
+ export declare interface GetCameraSettingsParams {
3027
+ /** Additional data to include: 'schema' and/or 'proposedValues' */
3028
+ include?: CameraSettingsInclude[];
3029
+ }
3030
+
2727
3031
  /**
2728
3032
  * Get the client ID
2729
3033
  */