@camstack/addon-smtp-nodemailer 1.2.109 → 1.2.110

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.
@@ -5397,7 +5397,7 @@ var ZodIssueCode = {
5397
5397
  var ZodFirstPartyTypeKind;
5398
5398
  ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
5399
5399
  //#endregion
5400
- //#region ../types/dist/sleep-BDR76Ykr.mjs
5400
+ //#region ../types/dist/sleep-B1y0Fo1U.mjs
5401
5401
  /**
5402
5402
  * The audio chunk plane's byte format, and the ONE expansion from a coded
5403
5403
  * window to float samples (D455).
@@ -28736,14 +28736,81 @@ DeviceType.Camera, method(object({ deviceId: number() }), PrivacyMaskOptionsSche
28736
28736
  kind: "mutation",
28737
28737
  auth: "admin"
28738
28738
  });
28739
+ /**
28740
+ * What a preset id DOES on this camera.
28741
+ *
28742
+ * On several PTZ firmwares the preset namespace is shared: low ids are stored
28743
+ * positions, a reserved band triggers camera FUNCTIONS. The dispensa camera
28744
+ * (Hikvision) returns its own reserved band in the preset list, named by the
28745
+ * firmware:
28746
+ *
28747
+ * 34 Back to origin · 39 Day mode · 40 Night mode · 46 Day/Night Auto Mode
28748
+ * 92 Set manual limits · 93 Save manual limits · 94 Remote reboot
28749
+ * 95 Call OSD menu
28750
+ *
28751
+ * We used to hand all of these to the UI as ordinary presets. Saving over one
28752
+ * is what produced `PUT /ISAPI/PTZCtrl/channels/1/presets/34 -> HTTP 500`: the
28753
+ * camera refusing to let "Back to origin" be overwritten, surfaced to the
28754
+ * operator as a transport failure.
28755
+ *
28756
+ * A function preset stays fully usable as a DESTINATION -- `goToPreset('34')`
28757
+ * is the single most useful thing that camera can do. Only `savePreset` and
28758
+ * `deletePreset` are gated.
28759
+ */
28760
+ var PtzPresetFunctionSchema = _enum([
28761
+ "home",
28762
+ "day-mode",
28763
+ "night-mode",
28764
+ "day-night-auto",
28765
+ "set-limits",
28766
+ "save-limits",
28767
+ "reboot",
28768
+ "osd-menu"
28769
+ ]);
28739
28770
  var PtzPresetSchema = object({
28740
28771
  id: string(),
28741
- name: string()
28772
+ name: string(),
28773
+ /**
28774
+ * The firmware function this id performs, when the provider KNOWS the id is
28775
+ * reserved. `null` = an ordinary stored position, OR a reserved id this
28776
+ * provider does not recognise -- the two are told apart by `writable`.
28777
+ */
28778
+ fn: PtzPresetFunctionSchema.nullable(),
28779
+ /**
28780
+ * Whether `savePreset` / `deletePreset` may target this id. A provider sets
28781
+ * it false only for a band it KNOWS is reserved; where the firmware is not
28782
+ * documented it stays true and a refusal comes from the camera, named.
28783
+ */
28784
+ writable: boolean()
28742
28785
  });
28786
+ /**
28787
+ * Where the head is pointing -- per axis, and `null` when the driver cannot
28788
+ * read it.
28789
+ *
28790
+ * It used to be three REQUIRED numbers, which left a provider that cannot read
28791
+ * position no way to say so. All four said `0`:
28792
+ *
28793
+ * reolink `return { pan: 0, tilt: 0, zoom: 0 }` "until a position-query
28794
+ * path lands upstream"
28795
+ * hikvision stub, "firmware-dependent and frequently absent"
28796
+ * amcrest stub, "no generic absolute-position read for this model family"
28797
+ * onvif throws
28798
+ *
28799
+ * So every consumer asking where a camera points was told "perfectly centred"
28800
+ * by four cameras that had never looked. That is D393 -- a measurement that
28801
+ * FAILED is `null`, never `0`, and the type says so all the way to the
28802
+ * decision -- the same shape as the unreadable `statfs` folded into "0 bytes of
28803
+ * headroom", which evacuated a healthy disk.
28804
+ *
28805
+ * D393 also says to check for a narrower structural TWIN of the result type.
28806
+ * There is one: `PtzStatusSchema` extends this, so the lie had already
28807
+ * propagated into `getStatus`, which is the surface `getPosition`'s own comment
28808
+ * tells callers to migrate to.
28809
+ */
28743
28810
  var PtzPositionSchema = object({
28744
- pan: number(),
28745
- tilt: number(),
28746
- zoom: number()
28811
+ pan: number().nullable(),
28812
+ tilt: number().nullable(),
28813
+ zoom: number().nullable()
28747
28814
  });
28748
28815
  var PtzMoveCommandSchema = object({
28749
28816
  pan: number().optional(),
@@ -28762,7 +28829,72 @@ var PtzOptionsSchema = object({
28762
28829
  maxPresets: number().optional(),
28763
28830
  /** Whether the camera exposes a controllable autofocus toggle
28764
28831
  * (boolean `hasX` per the getOptions availability convention). */
28765
- hasAutofocus: boolean()
28832
+ hasAutofocus: boolean(),
28833
+ /**
28834
+ * How many distinct speeds this camera's NATIVE scale offers.
28835
+ *
28836
+ * The cap's `speed` is normalized 0..1 and each provider maps it down --
28837
+ * Baichuan 1..63, Dahua 1..8, ISAPI's percentage -100..100. The normalized
28838
+ * value hides how coarse that really is: asking an amcrest for `0.37` is
28839
+ * meaningless, because it has eight steps and three of them round to the
28840
+ * same one. A loop that tunes its own gain has to know the granularity of
28841
+ * the knob it is turning.
28842
+ *
28843
+ * `null` = the driver does not know, or the scale is continuous (ONVIF takes
28844
+ * a float). Never a made-up number.
28845
+ */
28846
+ speedSteps: number().int().positive().nullable(),
28847
+ /**
28848
+ * How long ONE `move` pulse runs on this driver, ms.
28849
+ *
28850
+ * `move` is a self-terminating burst everywhere, but every provider hardcoded
28851
+ * its own duration in private -- 200 reolink, 350 amcrest, 500 hikvision,
28852
+ * 1000 onvif -- so no caller could read it. It is the DENOMINATOR of "how far
28853
+ * did the head travel per pulse": without it a measured displacement has no
28854
+ * gain to be divided into.
28855
+ *
28856
+ * `null` = the driver cannot say.
28857
+ */
28858
+ moveImpulseMs: number().int().positive().nullable()
28859
+ });
28860
+ /**
28861
+ * Which preset `goHome` goes to, and WHO decided.
28862
+ *
28863
+ * `goHome` used to be three vendor "conventions" written in three comments --
28864
+ * Reolink preset 0, Hikvision preset '1', Dahua preset 1 -- and on this fleet
28865
+ * not one of the three cameras honours its own:
28866
+ *
28867
+ * 592 Videocamera camera Daniel (reolink) preset 0 holds "stanza"
28868
+ * 1438 Videocamera dispensa (hikvision) preset 1 holds "Credenza"
28869
+ * 3836 Videocamera studio (amcrest) preset 1 holds "Preset1"
28870
+ *
28871
+ * So `goHome` meant "go wherever the operator happened to save in slot 0 or 1",
28872
+ * and two of the three swallowed the failure in a bare `catch`. For autotrack
28873
+ * this is the HOTTEST path -- it runs every time a subject is released -- so it
28874
+ * needs an answer that is true per camera and audible when it is missing.
28875
+ *
28876
+ * `source` is what makes it honest:
28877
+ * - `operator` -- picked in the UI, stored by the provider.
28878
+ * - `firmware` -- the camera itself named a preset `fn: 'home'` (Hikvision's
28879
+ * "Back to origin"), adopted as the default with nothing to configure.
28880
+ * - `native` -- the driver homes WITHOUT a preset at all. ONVIF does:
28881
+ * `goHome` is `ptzAbsoluteMove({x:0, y:0, zoom:0})`. `presetId` is null and
28882
+ * that is not a failure -- there is nothing to pick, and the UI must offer
28883
+ * no picker.
28884
+ * - `none` -- nothing is configured and the camera names nothing.
28885
+ * `goHome` REFUSES rather than moving the head somewhere arbitrary.
28886
+ *
28887
+ * `source === 'none'` is the refusal condition, NOT `presetId === null`: the
28888
+ * native case has no preset and homes perfectly well.
28889
+ */
28890
+ var PtzHomePresetSchema = object({
28891
+ presetId: string().nullable(),
28892
+ source: _enum([
28893
+ "operator",
28894
+ "firmware",
28895
+ "native",
28896
+ "none"
28897
+ ])
28766
28898
  });
28767
28899
  DeviceType.Camera, method(PtzMoveCommandSchema.extend({ deviceId: number() }), _void(), { kind: "mutation" }), method(PtzMoveCommandSchema.extend({ deviceId: number() }), _void(), { kind: "mutation" }), method(object({ deviceId: number() }), _void(), { kind: "mutation" }), method(object({ deviceId: number() }), array(PtzPresetSchema)), method(object({
28768
28900
  deviceId: number(),
@@ -28780,7 +28912,13 @@ DeviceType.Camera, method(PtzMoveCommandSchema.extend({ deviceId: number() }), _
28780
28912
  }), _void(), {
28781
28913
  kind: "mutation",
28782
28914
  auth: "admin"
28783
- }), method(object({ deviceId: number() }), PtzOptionsSchema), method(object({ deviceId: number() }), _void(), { kind: "mutation" }), method(object({ deviceId: number() }), PtzPositionSchema), method(object({
28915
+ }), method(object({ deviceId: number() }), PtzOptionsSchema), method(object({ deviceId: number() }), _void(), { kind: "mutation" }), method(object({ deviceId: number() }), PtzHomePresetSchema), method(object({
28916
+ deviceId: number(),
28917
+ presetId: string().nullable()
28918
+ }), _void(), {
28919
+ kind: "mutation",
28920
+ auth: "admin"
28921
+ }), method(object({ deviceId: number() }), PtzPositionSchema), method(object({
28784
28922
  deviceId: number(),
28785
28923
  enabled: boolean()
28786
28924
  }), _void(), { kind: "mutation" });
@@ -35795,6 +35933,12 @@ Object.freeze({
35795
35933
  addonId: null,
35796
35934
  access: "delete"
35797
35935
  },
35936
+ "ptz.getHomePreset": {
35937
+ capName: "ptz",
35938
+ capScope: "device",
35939
+ addonId: null,
35940
+ access: "view"
35941
+ },
35798
35942
  "ptz.getOptions": {
35799
35943
  capName: "ptz",
35800
35944
  capScope: "device",
@@ -35843,6 +35987,12 @@ Object.freeze({
35843
35987
  addonId: null,
35844
35988
  access: "create"
35845
35989
  },
35990
+ "ptz.setHomePreset": {
35991
+ capName: "ptz",
35992
+ capScope: "device",
35993
+ addonId: null,
35994
+ access: "create"
35995
+ },
35846
35996
  "ptz.stop": {
35847
35997
  capName: "ptz",
35848
35998
  capScope: "device",
@@ -39016,6 +39166,11 @@ Object.freeze({
39016
39166
  form: "single",
39017
39167
  optional: false
39018
39168
  }],
39169
+ "ptz.getHomePreset": [{
39170
+ name: "deviceId",
39171
+ form: "single",
39172
+ optional: false
39173
+ }],
39019
39174
  "ptz.getOptions": [{
39020
39175
  name: "deviceId",
39021
39176
  form: "single",
@@ -39056,6 +39211,11 @@ Object.freeze({
39056
39211
  form: "single",
39057
39212
  optional: false
39058
39213
  }],
39214
+ "ptz.setHomePreset": [{
39215
+ name: "deviceId",
39216
+ form: "single",
39217
+ optional: false
39218
+ }],
39059
39219
  "ptz.stop": [{
39060
39220
  name: "deviceId",
39061
39221
  form: "single",
@@ -5395,7 +5395,7 @@ var ZodIssueCode = {
5395
5395
  var ZodFirstPartyTypeKind;
5396
5396
  ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
5397
5397
  //#endregion
5398
- //#region ../types/dist/sleep-BDR76Ykr.mjs
5398
+ //#region ../types/dist/sleep-B1y0Fo1U.mjs
5399
5399
  /**
5400
5400
  * The audio chunk plane's byte format, and the ONE expansion from a coded
5401
5401
  * window to float samples (D455).
@@ -28734,14 +28734,81 @@ DeviceType.Camera, method(object({ deviceId: number() }), PrivacyMaskOptionsSche
28734
28734
  kind: "mutation",
28735
28735
  auth: "admin"
28736
28736
  });
28737
+ /**
28738
+ * What a preset id DOES on this camera.
28739
+ *
28740
+ * On several PTZ firmwares the preset namespace is shared: low ids are stored
28741
+ * positions, a reserved band triggers camera FUNCTIONS. The dispensa camera
28742
+ * (Hikvision) returns its own reserved band in the preset list, named by the
28743
+ * firmware:
28744
+ *
28745
+ * 34 Back to origin · 39 Day mode · 40 Night mode · 46 Day/Night Auto Mode
28746
+ * 92 Set manual limits · 93 Save manual limits · 94 Remote reboot
28747
+ * 95 Call OSD menu
28748
+ *
28749
+ * We used to hand all of these to the UI as ordinary presets. Saving over one
28750
+ * is what produced `PUT /ISAPI/PTZCtrl/channels/1/presets/34 -> HTTP 500`: the
28751
+ * camera refusing to let "Back to origin" be overwritten, surfaced to the
28752
+ * operator as a transport failure.
28753
+ *
28754
+ * A function preset stays fully usable as a DESTINATION -- `goToPreset('34')`
28755
+ * is the single most useful thing that camera can do. Only `savePreset` and
28756
+ * `deletePreset` are gated.
28757
+ */
28758
+ var PtzPresetFunctionSchema = _enum([
28759
+ "home",
28760
+ "day-mode",
28761
+ "night-mode",
28762
+ "day-night-auto",
28763
+ "set-limits",
28764
+ "save-limits",
28765
+ "reboot",
28766
+ "osd-menu"
28767
+ ]);
28737
28768
  var PtzPresetSchema = object({
28738
28769
  id: string(),
28739
- name: string()
28770
+ name: string(),
28771
+ /**
28772
+ * The firmware function this id performs, when the provider KNOWS the id is
28773
+ * reserved. `null` = an ordinary stored position, OR a reserved id this
28774
+ * provider does not recognise -- the two are told apart by `writable`.
28775
+ */
28776
+ fn: PtzPresetFunctionSchema.nullable(),
28777
+ /**
28778
+ * Whether `savePreset` / `deletePreset` may target this id. A provider sets
28779
+ * it false only for a band it KNOWS is reserved; where the firmware is not
28780
+ * documented it stays true and a refusal comes from the camera, named.
28781
+ */
28782
+ writable: boolean()
28740
28783
  });
28784
+ /**
28785
+ * Where the head is pointing -- per axis, and `null` when the driver cannot
28786
+ * read it.
28787
+ *
28788
+ * It used to be three REQUIRED numbers, which left a provider that cannot read
28789
+ * position no way to say so. All four said `0`:
28790
+ *
28791
+ * reolink `return { pan: 0, tilt: 0, zoom: 0 }` "until a position-query
28792
+ * path lands upstream"
28793
+ * hikvision stub, "firmware-dependent and frequently absent"
28794
+ * amcrest stub, "no generic absolute-position read for this model family"
28795
+ * onvif throws
28796
+ *
28797
+ * So every consumer asking where a camera points was told "perfectly centred"
28798
+ * by four cameras that had never looked. That is D393 -- a measurement that
28799
+ * FAILED is `null`, never `0`, and the type says so all the way to the
28800
+ * decision -- the same shape as the unreadable `statfs` folded into "0 bytes of
28801
+ * headroom", which evacuated a healthy disk.
28802
+ *
28803
+ * D393 also says to check for a narrower structural TWIN of the result type.
28804
+ * There is one: `PtzStatusSchema` extends this, so the lie had already
28805
+ * propagated into `getStatus`, which is the surface `getPosition`'s own comment
28806
+ * tells callers to migrate to.
28807
+ */
28741
28808
  var PtzPositionSchema = object({
28742
- pan: number(),
28743
- tilt: number(),
28744
- zoom: number()
28809
+ pan: number().nullable(),
28810
+ tilt: number().nullable(),
28811
+ zoom: number().nullable()
28745
28812
  });
28746
28813
  var PtzMoveCommandSchema = object({
28747
28814
  pan: number().optional(),
@@ -28760,7 +28827,72 @@ var PtzOptionsSchema = object({
28760
28827
  maxPresets: number().optional(),
28761
28828
  /** Whether the camera exposes a controllable autofocus toggle
28762
28829
  * (boolean `hasX` per the getOptions availability convention). */
28763
- hasAutofocus: boolean()
28830
+ hasAutofocus: boolean(),
28831
+ /**
28832
+ * How many distinct speeds this camera's NATIVE scale offers.
28833
+ *
28834
+ * The cap's `speed` is normalized 0..1 and each provider maps it down --
28835
+ * Baichuan 1..63, Dahua 1..8, ISAPI's percentage -100..100. The normalized
28836
+ * value hides how coarse that really is: asking an amcrest for `0.37` is
28837
+ * meaningless, because it has eight steps and three of them round to the
28838
+ * same one. A loop that tunes its own gain has to know the granularity of
28839
+ * the knob it is turning.
28840
+ *
28841
+ * `null` = the driver does not know, or the scale is continuous (ONVIF takes
28842
+ * a float). Never a made-up number.
28843
+ */
28844
+ speedSteps: number().int().positive().nullable(),
28845
+ /**
28846
+ * How long ONE `move` pulse runs on this driver, ms.
28847
+ *
28848
+ * `move` is a self-terminating burst everywhere, but every provider hardcoded
28849
+ * its own duration in private -- 200 reolink, 350 amcrest, 500 hikvision,
28850
+ * 1000 onvif -- so no caller could read it. It is the DENOMINATOR of "how far
28851
+ * did the head travel per pulse": without it a measured displacement has no
28852
+ * gain to be divided into.
28853
+ *
28854
+ * `null` = the driver cannot say.
28855
+ */
28856
+ moveImpulseMs: number().int().positive().nullable()
28857
+ });
28858
+ /**
28859
+ * Which preset `goHome` goes to, and WHO decided.
28860
+ *
28861
+ * `goHome` used to be three vendor "conventions" written in three comments --
28862
+ * Reolink preset 0, Hikvision preset '1', Dahua preset 1 -- and on this fleet
28863
+ * not one of the three cameras honours its own:
28864
+ *
28865
+ * 592 Videocamera camera Daniel (reolink) preset 0 holds "stanza"
28866
+ * 1438 Videocamera dispensa (hikvision) preset 1 holds "Credenza"
28867
+ * 3836 Videocamera studio (amcrest) preset 1 holds "Preset1"
28868
+ *
28869
+ * So `goHome` meant "go wherever the operator happened to save in slot 0 or 1",
28870
+ * and two of the three swallowed the failure in a bare `catch`. For autotrack
28871
+ * this is the HOTTEST path -- it runs every time a subject is released -- so it
28872
+ * needs an answer that is true per camera and audible when it is missing.
28873
+ *
28874
+ * `source` is what makes it honest:
28875
+ * - `operator` -- picked in the UI, stored by the provider.
28876
+ * - `firmware` -- the camera itself named a preset `fn: 'home'` (Hikvision's
28877
+ * "Back to origin"), adopted as the default with nothing to configure.
28878
+ * - `native` -- the driver homes WITHOUT a preset at all. ONVIF does:
28879
+ * `goHome` is `ptzAbsoluteMove({x:0, y:0, zoom:0})`. `presetId` is null and
28880
+ * that is not a failure -- there is nothing to pick, and the UI must offer
28881
+ * no picker.
28882
+ * - `none` -- nothing is configured and the camera names nothing.
28883
+ * `goHome` REFUSES rather than moving the head somewhere arbitrary.
28884
+ *
28885
+ * `source === 'none'` is the refusal condition, NOT `presetId === null`: the
28886
+ * native case has no preset and homes perfectly well.
28887
+ */
28888
+ var PtzHomePresetSchema = object({
28889
+ presetId: string().nullable(),
28890
+ source: _enum([
28891
+ "operator",
28892
+ "firmware",
28893
+ "native",
28894
+ "none"
28895
+ ])
28764
28896
  });
28765
28897
  DeviceType.Camera, method(PtzMoveCommandSchema.extend({ deviceId: number() }), _void(), { kind: "mutation" }), method(PtzMoveCommandSchema.extend({ deviceId: number() }), _void(), { kind: "mutation" }), method(object({ deviceId: number() }), _void(), { kind: "mutation" }), method(object({ deviceId: number() }), array(PtzPresetSchema)), method(object({
28766
28898
  deviceId: number(),
@@ -28778,7 +28910,13 @@ DeviceType.Camera, method(PtzMoveCommandSchema.extend({ deviceId: number() }), _
28778
28910
  }), _void(), {
28779
28911
  kind: "mutation",
28780
28912
  auth: "admin"
28781
- }), method(object({ deviceId: number() }), PtzOptionsSchema), method(object({ deviceId: number() }), _void(), { kind: "mutation" }), method(object({ deviceId: number() }), PtzPositionSchema), method(object({
28913
+ }), method(object({ deviceId: number() }), PtzOptionsSchema), method(object({ deviceId: number() }), _void(), { kind: "mutation" }), method(object({ deviceId: number() }), PtzHomePresetSchema), method(object({
28914
+ deviceId: number(),
28915
+ presetId: string().nullable()
28916
+ }), _void(), {
28917
+ kind: "mutation",
28918
+ auth: "admin"
28919
+ }), method(object({ deviceId: number() }), PtzPositionSchema), method(object({
28782
28920
  deviceId: number(),
28783
28921
  enabled: boolean()
28784
28922
  }), _void(), { kind: "mutation" });
@@ -35793,6 +35931,12 @@ Object.freeze({
35793
35931
  addonId: null,
35794
35932
  access: "delete"
35795
35933
  },
35934
+ "ptz.getHomePreset": {
35935
+ capName: "ptz",
35936
+ capScope: "device",
35937
+ addonId: null,
35938
+ access: "view"
35939
+ },
35796
35940
  "ptz.getOptions": {
35797
35941
  capName: "ptz",
35798
35942
  capScope: "device",
@@ -35841,6 +35985,12 @@ Object.freeze({
35841
35985
  addonId: null,
35842
35986
  access: "create"
35843
35987
  },
35988
+ "ptz.setHomePreset": {
35989
+ capName: "ptz",
35990
+ capScope: "device",
35991
+ addonId: null,
35992
+ access: "create"
35993
+ },
35844
35994
  "ptz.stop": {
35845
35995
  capName: "ptz",
35846
35996
  capScope: "device",
@@ -39014,6 +39164,11 @@ Object.freeze({
39014
39164
  form: "single",
39015
39165
  optional: false
39016
39166
  }],
39167
+ "ptz.getHomePreset": [{
39168
+ name: "deviceId",
39169
+ form: "single",
39170
+ optional: false
39171
+ }],
39017
39172
  "ptz.getOptions": [{
39018
39173
  name: "deviceId",
39019
39174
  form: "single",
@@ -39054,6 +39209,11 @@ Object.freeze({
39054
39209
  form: "single",
39055
39210
  optional: false
39056
39211
  }],
39212
+ "ptz.setHomePreset": [{
39213
+ name: "deviceId",
39214
+ form: "single",
39215
+ optional: false
39216
+ }],
39057
39217
  "ptz.stop": [{
39058
39218
  name: "deviceId",
39059
39219
  form: "single",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-smtp-nodemailer",
3
- "version": "1.2.109",
3
+ "version": "1.2.110",
4
4
  "description": "SMTP email provider addon for CamStack — wraps `nodemailer` and registers a `smtp-provider` cap collection entry. Used by magic-link login + notifier addons.",
5
5
  "keywords": [
6
6
  "camstack",