@nextera.one/axis-server-sdk 2.3.24 → 2.3.26
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-DiWSbPZ8.d.mts → index-CZbbGuUq.d.mts} +8 -0
- package/dist/{index-BRV_ohRW.d.ts → index-gFSt2xrf.d.ts} +8 -0
- package/dist/index.d.mts +36 -3
- package/dist/index.d.ts +36 -3
- package/dist/index.js +105 -4
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +105 -4
- package/dist/index.mjs.map +1 -1
- package/dist/sensors/index.d.mts +1 -1
- package/dist/sensors/index.d.ts +1 -1
- package/dist/sensors/index.js +104 -4
- package/dist/sensors/index.js.map +1 -1
- package/dist/sensors/index.mjs +104 -4
- package/dist/sensors/index.mjs.map +1 -1
- package/package.json +2 -2
package/dist/sensors/index.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { o as AccessProfileResolverSensor, a4 as BodyBudgetSensor, a7 as CapabilityEnforcementSensor, ac as ChunkHashSensor, af as EntropySensor, ah as ExecutionTimeoutSensor, aj as FrameBudgetSensor, ak as FrameHeaderSanitySensor, al as HeaderTLVLimitSensor, ap as IntentAllowlistSensor, as as IntentRegistrySensor, au as LawArticlePresenceMode, av as LawArticlePresenceSensor, aw as LawArticlePresenceSensorOptions, ax as LawEvaluationSensor, aD as ProofPresenceSensor, aE as ProtocolStrictSensor, aG as ReceiptPolicySensor, aL as RiskGateSensor, aM as RiskGateSensorOptions, aO as RiskSignalCollector, aQ as SchemaValidationSensor, aU as StreamScopeSensor, aV as TLVParseSensor, aY as TickAuthCapsuleRef, aZ as TickAuthSensor, a_ as TickAuthSensorOptions, a$ as TickAuthVerifier, bc as TpsSensor, bd as TpsSensorOptions, be as VarintHardeningSensor } from '../index-
|
|
1
|
+
export { o as AccessProfileResolverSensor, a4 as BodyBudgetSensor, a7 as CapabilityEnforcementSensor, ac as ChunkHashSensor, af as EntropySensor, ah as ExecutionTimeoutSensor, aj as FrameBudgetSensor, ak as FrameHeaderSanitySensor, al as HeaderTLVLimitSensor, ap as IntentAllowlistSensor, as as IntentRegistrySensor, au as LawArticlePresenceMode, av as LawArticlePresenceSensor, aw as LawArticlePresenceSensorOptions, ax as LawEvaluationSensor, aD as ProofPresenceSensor, aE as ProtocolStrictSensor, aG as ReceiptPolicySensor, aL as RiskGateSensor, aM as RiskGateSensorOptions, aO as RiskSignalCollector, aQ as SchemaValidationSensor, aU as StreamScopeSensor, aV as TLVParseSensor, aY as TickAuthCapsuleRef, aZ as TickAuthSensor, a_ as TickAuthSensorOptions, a$ as TickAuthVerifier, bc as TpsSensor, bd as TpsSensorOptions, be as VarintHardeningSensor } from '../index-CZbbGuUq.mjs';
|
|
2
2
|
import '../axis-sensor-BLUemDiZ.mjs';
|
|
3
3
|
import 'zod';
|
|
4
4
|
import '@nextera.one/axis-protocol';
|
package/dist/sensors/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { o as AccessProfileResolverSensor, a4 as BodyBudgetSensor, a7 as CapabilityEnforcementSensor, ac as ChunkHashSensor, af as EntropySensor, ah as ExecutionTimeoutSensor, aj as FrameBudgetSensor, ak as FrameHeaderSanitySensor, al as HeaderTLVLimitSensor, ap as IntentAllowlistSensor, as as IntentRegistrySensor, au as LawArticlePresenceMode, av as LawArticlePresenceSensor, aw as LawArticlePresenceSensorOptions, ax as LawEvaluationSensor, aD as ProofPresenceSensor, aE as ProtocolStrictSensor, aG as ReceiptPolicySensor, aL as RiskGateSensor, aM as RiskGateSensorOptions, aO as RiskSignalCollector, aQ as SchemaValidationSensor, aU as StreamScopeSensor, aV as TLVParseSensor, aY as TickAuthCapsuleRef, aZ as TickAuthSensor, a_ as TickAuthSensorOptions, a$ as TickAuthVerifier, bc as TpsSensor, bd as TpsSensorOptions, be as VarintHardeningSensor } from '../index-
|
|
1
|
+
export { o as AccessProfileResolverSensor, a4 as BodyBudgetSensor, a7 as CapabilityEnforcementSensor, ac as ChunkHashSensor, af as EntropySensor, ah as ExecutionTimeoutSensor, aj as FrameBudgetSensor, ak as FrameHeaderSanitySensor, al as HeaderTLVLimitSensor, ap as IntentAllowlistSensor, as as IntentRegistrySensor, au as LawArticlePresenceMode, av as LawArticlePresenceSensor, aw as LawArticlePresenceSensorOptions, ax as LawEvaluationSensor, aD as ProofPresenceSensor, aE as ProtocolStrictSensor, aG as ReceiptPolicySensor, aL as RiskGateSensor, aM as RiskGateSensorOptions, aO as RiskSignalCollector, aQ as SchemaValidationSensor, aU as StreamScopeSensor, aV as TLVParseSensor, aY as TickAuthCapsuleRef, aZ as TickAuthSensor, a_ as TickAuthSensorOptions, a$ as TickAuthVerifier, bc as TpsSensor, bd as TpsSensorOptions, be as VarintHardeningSensor } from '../index-gFSt2xrf.js';
|
|
2
2
|
import '../axis-sensor-BLUemDiZ.js';
|
|
3
3
|
import 'zod';
|
|
4
4
|
import '@nextera.one/axis-protocol';
|
package/dist/sensors/index.js
CHANGED
|
@@ -694,7 +694,11 @@ function Intent(action, options) {
|
|
|
694
694
|
bodyProfile: options?.bodyProfile,
|
|
695
695
|
tlv: options?.tlv,
|
|
696
696
|
dto: options?.dto,
|
|
697
|
-
is: options?.is
|
|
697
|
+
is: options?.is,
|
|
698
|
+
maxUseCount: options?.maxUseCount,
|
|
699
|
+
useCount: options?.useCount,
|
|
700
|
+
duration: options?.duration,
|
|
701
|
+
maxDuration: options?.maxDuration
|
|
698
702
|
});
|
|
699
703
|
Reflect.defineMetadata(INTENT_ROUTES_KEY, routes, target.constructor);
|
|
700
704
|
};
|
|
@@ -9464,9 +9468,10 @@ var init_timeline_store = __esm({
|
|
|
9464
9468
|
// src/utils/axis-tlv-codec.ts
|
|
9465
9469
|
function encodeAxisTlvDto(dtoClass, data, context = {}) {
|
|
9466
9470
|
const schema = (0, import_dto_schema2.extractDtoSchema)(dtoClass);
|
|
9471
|
+
const effectiveContext = withDtoName(dtoClass, context);
|
|
9467
9472
|
const items = schema.fields.flatMap((field) => {
|
|
9468
9473
|
const value = data[field.name];
|
|
9469
|
-
if (!shouldEncodeField(field, value, data,
|
|
9474
|
+
if (!shouldEncodeField(field, value, data, effectiveContext)) return [];
|
|
9470
9475
|
if (value === void 0 || value === null) {
|
|
9471
9476
|
if (field.required) {
|
|
9472
9477
|
throw new Error(`Missing required TLV response field: ${field.name}`);
|
|
@@ -9479,17 +9484,18 @@ function encodeAxisTlvDto(dtoClass, data, context = {}) {
|
|
|
9479
9484
|
}
|
|
9480
9485
|
function projectAxisTlvDto(dtoClass, data, context = {}) {
|
|
9481
9486
|
const schema = (0, import_dto_schema2.extractDtoSchema)(dtoClass);
|
|
9487
|
+
const effectiveContext = withDtoName(dtoClass, context);
|
|
9482
9488
|
const result = {};
|
|
9483
9489
|
for (const field of schema.fields) {
|
|
9484
9490
|
const value = data[field.name];
|
|
9485
|
-
if (!shouldEncodeField(field, value, data,
|
|
9491
|
+
if (!shouldEncodeField(field, value, data, effectiveContext)) continue;
|
|
9486
9492
|
if (value === void 0 || value === null) continue;
|
|
9487
9493
|
result[field.name] = value;
|
|
9488
9494
|
}
|
|
9489
9495
|
return result;
|
|
9490
9496
|
}
|
|
9491
9497
|
function shouldEncodeField(field, value, data, context) {
|
|
9492
|
-
const rule = field
|
|
9498
|
+
const rule = resolveEncodeRule(field, value, data, context);
|
|
9493
9499
|
if (rule === void 0) return true;
|
|
9494
9500
|
if (rule === false) return false;
|
|
9495
9501
|
if (rule.onlyRoles?.length && !hasAnyRole(context, rule.onlyRoles)) {
|
|
@@ -9509,6 +9515,22 @@ function shouldEncodeField(field, value, data, context) {
|
|
|
9509
9515
|
}
|
|
9510
9516
|
return true;
|
|
9511
9517
|
}
|
|
9518
|
+
function withDtoName(dtoClass, context) {
|
|
9519
|
+
return {
|
|
9520
|
+
...context,
|
|
9521
|
+
dtoName: context.dtoName ?? dtoClass.name
|
|
9522
|
+
};
|
|
9523
|
+
}
|
|
9524
|
+
function resolveEncodeRule(field, value, data, context) {
|
|
9525
|
+
return context.visibilityRegistry?.resolve({
|
|
9526
|
+
intent: context.intent,
|
|
9527
|
+
dtoName: context.dtoName,
|
|
9528
|
+
field,
|
|
9529
|
+
value,
|
|
9530
|
+
data,
|
|
9531
|
+
context
|
|
9532
|
+
}) ?? field.encode;
|
|
9533
|
+
}
|
|
9512
9534
|
function hasAnyRole(context, expectedRoles) {
|
|
9513
9535
|
const actualRoles = context.roles ?? [];
|
|
9514
9536
|
return expectedRoles.some((role) => actualRoles.includes(role));
|
|
@@ -9556,6 +9578,82 @@ var init_axis_tlv_codec = __esm({
|
|
|
9556
9578
|
}
|
|
9557
9579
|
});
|
|
9558
9580
|
|
|
9581
|
+
// src/utils/axis-tlv-visibility-registry.ts
|
|
9582
|
+
function overrideKey(override) {
|
|
9583
|
+
return [
|
|
9584
|
+
normalizeKey(override.intent),
|
|
9585
|
+
normalizeKey(override.dtoName),
|
|
9586
|
+
normalizeKey(override.field),
|
|
9587
|
+
override.tag ?? ""
|
|
9588
|
+
].join("|");
|
|
9589
|
+
}
|
|
9590
|
+
function normalizeKey(value) {
|
|
9591
|
+
return typeof value === "string" ? value.trim() : "";
|
|
9592
|
+
}
|
|
9593
|
+
function matchScore(override, input) {
|
|
9594
|
+
if (override.enabled === false) return -1;
|
|
9595
|
+
const intent = normalizeKey(input.intent);
|
|
9596
|
+
const dtoName = normalizeKey(input.dtoName);
|
|
9597
|
+
const overrideIntent = normalizeKey(override.intent);
|
|
9598
|
+
const overrideDtoName = normalizeKey(override.dtoName);
|
|
9599
|
+
const overrideField = normalizeKey(override.field);
|
|
9600
|
+
const fieldName = normalizeKey(input.field.name);
|
|
9601
|
+
if (overrideIntent && overrideIntent !== intent) return -1;
|
|
9602
|
+
if (overrideDtoName && overrideDtoName !== dtoName) return -1;
|
|
9603
|
+
const fieldMatches = Boolean(overrideField && overrideField === fieldName);
|
|
9604
|
+
const tagMatches = typeof override.tag === "number" && override.tag === input.field.tag;
|
|
9605
|
+
if (!fieldMatches && !tagMatches) return -1;
|
|
9606
|
+
return (overrideIntent ? 100 : 0) + (overrideDtoName ? 50 : 0) + (fieldMatches ? 10 : 0) + (tagMatches ? 8 : 0);
|
|
9607
|
+
}
|
|
9608
|
+
var AxisTlvVisibilityRegistry;
|
|
9609
|
+
var init_axis_tlv_visibility_registry = __esm({
|
|
9610
|
+
"src/utils/axis-tlv-visibility-registry.ts"() {
|
|
9611
|
+
AxisTlvVisibilityRegistry = class {
|
|
9612
|
+
constructor(overrides = []) {
|
|
9613
|
+
this.overrides = [];
|
|
9614
|
+
this.setOverrides(overrides);
|
|
9615
|
+
}
|
|
9616
|
+
setOverrides(overrides) {
|
|
9617
|
+
this.overrides = overrides.map((override) => ({ ...override }));
|
|
9618
|
+
}
|
|
9619
|
+
listOverrides() {
|
|
9620
|
+
return this.overrides.map((override) => ({ ...override }));
|
|
9621
|
+
}
|
|
9622
|
+
upsert(override) {
|
|
9623
|
+
const key = overrideKey(override);
|
|
9624
|
+
const index = this.overrides.findIndex((item) => overrideKey(item) === key);
|
|
9625
|
+
if (index >= 0) {
|
|
9626
|
+
this.overrides[index] = { ...override };
|
|
9627
|
+
return;
|
|
9628
|
+
}
|
|
9629
|
+
this.overrides.push({ ...override });
|
|
9630
|
+
}
|
|
9631
|
+
remove(match) {
|
|
9632
|
+
const before = this.overrides.length;
|
|
9633
|
+
this.overrides = this.overrides.filter(
|
|
9634
|
+
(item) => overrideKey(item) !== overrideKey(match)
|
|
9635
|
+
);
|
|
9636
|
+
return before - this.overrides.length;
|
|
9637
|
+
}
|
|
9638
|
+
resolve(input) {
|
|
9639
|
+
let bestScore = -1;
|
|
9640
|
+
let bestIndex = -1;
|
|
9641
|
+
let best;
|
|
9642
|
+
this.overrides.forEach((override, index) => {
|
|
9643
|
+
const score = matchScore(override, input);
|
|
9644
|
+
if (score < 0) return;
|
|
9645
|
+
if (score > bestScore || score === bestScore && index > bestIndex) {
|
|
9646
|
+
bestScore = score;
|
|
9647
|
+
bestIndex = index;
|
|
9648
|
+
best = override;
|
|
9649
|
+
}
|
|
9650
|
+
});
|
|
9651
|
+
return best?.encode;
|
|
9652
|
+
}
|
|
9653
|
+
};
|
|
9654
|
+
}
|
|
9655
|
+
});
|
|
9656
|
+
|
|
9559
9657
|
// src/loom/loom.types.ts
|
|
9560
9658
|
function deriveAnchorReflection(softid, context = "openlogs", scope = "loom") {
|
|
9561
9659
|
return `ar:${context}:${scope}:${softid}`;
|
|
@@ -11023,6 +11121,7 @@ __export(index_exports, {
|
|
|
11023
11121
|
AxisSensorChainService: () => AxisSensorChainService,
|
|
11024
11122
|
AxisStream: () => AxisStream,
|
|
11025
11123
|
AxisTlvDto: () => AxisTlvDto,
|
|
11124
|
+
AxisTlvVisibilityRegistry: () => AxisTlvVisibilityRegistry,
|
|
11026
11125
|
BAND: () => BAND,
|
|
11027
11126
|
BodyProfile: () => BodyProfile2,
|
|
11028
11127
|
BodyProfileValidator: () => BodyProfileValidator,
|
|
@@ -11368,6 +11467,7 @@ var init_index = __esm({
|
|
|
11368
11467
|
init_cce_pipeline();
|
|
11369
11468
|
init_cce_types();
|
|
11370
11469
|
init_axis_tlv_codec();
|
|
11470
|
+
init_axis_tlv_visibility_registry();
|
|
11371
11471
|
init_loom_types();
|
|
11372
11472
|
init_loom_engine();
|
|
11373
11473
|
init_idel_compiler();
|