@nextera.one/axis-server-sdk 2.3.5 → 2.3.7

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.
@@ -732,13 +732,13 @@ var CceEnvelopeValidationSensor = class {
732
732
  this.order = 5;
733
733
  this.phase = "PRE_DECODE";
734
734
  }
735
- async supports(input) {
736
- return input.metadata?.cce === true || input.metadata?.contentType === "application/axis-cce" ? { action: "ALLOW" } : {
737
- action: "DENY",
738
- code: "SENSOR_NOT_APPLICABLE",
739
- reason: "Not a CCE envelope"
740
- };
735
+ // supports() is a synchronous applicability gate.
736
+ // Return false to skip this sensor without producing a denial.
737
+ supports(input) {
738
+ return input.metadata?.cce === true || input.metadata?.contentType === "application/axis-cce";
741
739
  }
740
+ // run() executes only after supports() passes.
741
+ // Return the actual ALLOW/DENY/FLAG/THROTTLE decision here.
742
742
  async run(input) {
743
743
  const envelope = input.metadata?.cceEnvelope;
744
744
  if (!envelope) {
@@ -824,13 +824,13 @@ var CceClientSignatureSensor = class {
824
824
  this.order = 45;
825
825
  this.phase = "POST_DECODE";
826
826
  }
827
- async supports(input) {
828
- return input.metadata?.cceEnvelopeValid === true ? { action: "ALLOW" } : {
829
- action: "DENY",
830
- code: "SENSOR_NOT_APPLICABLE",
831
- reason: "CCE envelope not validated"
832
- };
827
+ // supports() is a synchronous applicability gate.
828
+ // Return false to skip this sensor without producing a denial.
829
+ supports(input) {
830
+ return input.metadata?.cceEnvelopeValid === true;
833
831
  }
832
+ // run() executes only after supports() passes.
833
+ // Return the actual ALLOW/DENY/FLAG/THROTTLE decision here.
834
834
  async run(input) {
835
835
  const envelope = input.metadata?.cceEnvelope;
836
836
  if (!envelope) {
@@ -905,13 +905,13 @@ var CceCapsuleVerificationSensor = class {
905
905
  this.order = 50;
906
906
  this.phase = "POST_DECODE";
907
907
  }
908
- async supports(input) {
909
- return input.metadata?.cceEnvelopeValid === true ? { action: "ALLOW" } : {
910
- action: "DENY",
911
- code: CCE_ERROR.CAPSULE_NOT_VERIFIED,
912
- reason: "CCE capsule not verified"
913
- };
908
+ // supports() is a synchronous applicability gate.
909
+ // Return false to skip this sensor without producing a denial.
910
+ supports(input) {
911
+ return input.metadata?.cceEnvelopeValid === true;
914
912
  }
913
+ // run() executes only after supports() passes.
914
+ // Return the actual ALLOW/DENY/FLAG/THROTTLE decision here.
915
915
  async run(input) {
916
916
  const capsule = input.metadata?.cceEnvelope?.capsule;
917
917
  if (!capsule) {
@@ -1023,13 +1023,13 @@ var CceTpsWindowSensor = class {
1023
1023
  this.order = 92;
1024
1024
  this.phase = "POST_DECODE";
1025
1025
  }
1026
- async supports(input) {
1027
- return input.metadata?.cceCapsuleVerified === true ? { action: "ALLOW" } : {
1028
- action: "DENY",
1029
- code: "SENSOR_NOT_APPLICABLE",
1030
- reason: "CCE capsule not verified"
1031
- };
1026
+ // supports() is a synchronous applicability gate.
1027
+ // Return false to skip this sensor without producing a denial.
1028
+ supports(input) {
1029
+ return input.metadata?.cceCapsuleVerified === true;
1032
1030
  }
1031
+ // run() executes only after supports() passes.
1032
+ // Return the actual ALLOW/DENY/FLAG/THROTTLE decision here.
1033
1033
  async run(input) {
1034
1034
  const capsule = input.metadata?.cceCapsule;
1035
1035
  if (!capsule) {
@@ -1080,13 +1080,13 @@ var CceAudienceIntentBindingSensor = class {
1080
1080
  this.order = 95;
1081
1081
  this.phase = "POST_DECODE";
1082
1082
  }
1083
- async supports(input) {
1084
- return input.metadata?.cceCapsuleVerified === true ? { action: "ALLOW" } : {
1085
- action: "DENY",
1086
- code: CCE_ERROR.CAPSULE_NOT_VERIFIED,
1087
- reason: "CCE capsule not verified"
1088
- };
1083
+ // supports() is a synchronous applicability gate.
1084
+ // Return false to skip this sensor without producing a denial.
1085
+ supports(input) {
1086
+ return input.metadata?.cceCapsuleVerified === true;
1089
1087
  }
1088
+ // run() executes only after supports() passes.
1089
+ // Return the actual ALLOW/DENY/FLAG/THROTTLE decision here.
1090
1090
  async run(input) {
1091
1091
  const capsule = input.metadata?.cceCapsule;
1092
1092
  const envelope = input.metadata?.cceEnvelope;
@@ -1181,13 +1181,13 @@ var CceReplayProtectionSensor = class {
1181
1181
  this.phase = "POST_DECODE";
1182
1182
  this.nonceTtlMs = options?.nonceTtlMs ?? 5 * 60 * 1e3;
1183
1183
  }
1184
- async supports(input) {
1185
- return input.metadata?.cceCapsuleVerified === true ? { action: "ALLOW" } : {
1186
- action: "DENY",
1187
- code: "SENSOR_NOT_APPLICABLE",
1188
- reason: "CCE capsule not verified"
1189
- };
1184
+ // supports() is a synchronous applicability gate.
1185
+ // Return false to skip this sensor without producing a denial.
1186
+ supports(input) {
1187
+ return input.metadata?.cceCapsuleVerified === true;
1190
1188
  }
1189
+ // run() executes only after supports() passes.
1190
+ // Return the actual ALLOW/DENY/FLAG/THROTTLE decision here.
1191
1191
  async run(input) {
1192
1192
  const capsule = input.metadata?.cceCapsule;
1193
1193
  const envelope = input.metadata?.cceEnvelope;
@@ -1265,13 +1265,13 @@ var CcePayloadDecryptionSensor = class {
1265
1265
  this.order = 145;
1266
1266
  this.phase = "POST_DECODE";
1267
1267
  }
1268
- async supports(input) {
1269
- return input.metadata?.cceEnvelopeValid === true && input.metadata?.cceClientSigVerified === true && input.metadata?.cceCapsuleVerified === true && input.metadata?.cceReplayClean === true ? { action: "ALLOW" } : {
1270
- action: "DENY",
1271
- code: "SENSOR_NOT_APPLICABLE",
1272
- reason: "CCE preconditions not met"
1273
- };
1268
+ // supports() is a synchronous applicability gate.
1269
+ // Return false to skip this sensor without producing a denial.
1270
+ supports(input) {
1271
+ return input.metadata?.cceEnvelopeValid === true && input.metadata?.cceClientSigVerified === true && input.metadata?.cceCapsuleVerified === true && input.metadata?.cceReplayClean === true;
1274
1272
  }
1273
+ // run() executes only after supports() passes.
1274
+ // Return the actual ALLOW/DENY/FLAG/THROTTLE decision here.
1275
1275
  async run(input) {
1276
1276
  const envelope = input.metadata?.cceEnvelope;
1277
1277
  if (!envelope) {