@nextera.one/axis-server-sdk 2.3.24 → 2.3.25
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.mts +34 -1
- package/dist/index.d.ts +34 -1
- package/dist/index.js +100 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +100 -3
- package/dist/index.mjs.map +1 -1
- package/dist/sensors/index.js +99 -3
- package/dist/sensors/index.js.map +1 -1
- package/dist/sensors/index.mjs +99 -3
- package/dist/sensors/index.mjs.map +1 -1
- package/package.json +2 -2
package/dist/index.d.mts
CHANGED
|
@@ -749,6 +749,36 @@ declare class AxisSensorChainService {
|
|
|
749
749
|
private normalizeProofKinds;
|
|
750
750
|
}
|
|
751
751
|
|
|
752
|
+
type AxisTlvVisibilityRule = IntentTlvField["encode"];
|
|
753
|
+
interface AxisTlvVisibilityOverride {
|
|
754
|
+
intent?: string;
|
|
755
|
+
dtoName?: string;
|
|
756
|
+
field?: string;
|
|
757
|
+
tag?: number;
|
|
758
|
+
encode: AxisTlvVisibilityRule;
|
|
759
|
+
enabled?: boolean;
|
|
760
|
+
}
|
|
761
|
+
interface AxisTlvVisibilityResolveInput<T extends object = object> {
|
|
762
|
+
intent?: string;
|
|
763
|
+
dtoName?: string;
|
|
764
|
+
field: IntentTlvField;
|
|
765
|
+
value: unknown;
|
|
766
|
+
data: Partial<Record<keyof T, unknown>>;
|
|
767
|
+
context: unknown;
|
|
768
|
+
}
|
|
769
|
+
interface AxisTlvVisibilityResolver<T extends object = object> {
|
|
770
|
+
resolve(input: AxisTlvVisibilityResolveInput<T>): AxisTlvVisibilityRule | undefined;
|
|
771
|
+
}
|
|
772
|
+
declare class AxisTlvVisibilityRegistry<T extends object = object> implements AxisTlvVisibilityResolver<T> {
|
|
773
|
+
private overrides;
|
|
774
|
+
constructor(overrides?: AxisTlvVisibilityOverride[]);
|
|
775
|
+
setOverrides(overrides: AxisTlvVisibilityOverride[]): void;
|
|
776
|
+
listOverrides(): AxisTlvVisibilityOverride[];
|
|
777
|
+
upsert(override: AxisTlvVisibilityOverride): void;
|
|
778
|
+
remove(match: Omit<AxisTlvVisibilityOverride, "encode">): number;
|
|
779
|
+
resolve(input: AxisTlvVisibilityResolveInput<T>): AxisTlvVisibilityRule | undefined;
|
|
780
|
+
}
|
|
781
|
+
|
|
752
782
|
type AxisTlvDtoCtor<T = object> = new (...args: never[]) => T;
|
|
753
783
|
interface AxisTlvFieldPolicyInput<T extends object = object> {
|
|
754
784
|
field: IntentTlvField;
|
|
@@ -758,10 +788,13 @@ interface AxisTlvFieldPolicyInput<T extends object = object> {
|
|
|
758
788
|
}
|
|
759
789
|
type AxisTlvFieldPolicy<T extends object = object> = (input: AxisTlvFieldPolicyInput<T>) => boolean;
|
|
760
790
|
interface AxisTlvEncodeContext<T extends object = object> {
|
|
791
|
+
intent?: string;
|
|
792
|
+
dtoName?: string;
|
|
761
793
|
roles?: readonly string[];
|
|
762
794
|
actorId?: string;
|
|
763
795
|
phase?: 'request' | 'response';
|
|
764
796
|
policies?: Record<string, AxisTlvFieldPolicy<T>>;
|
|
797
|
+
visibilityRegistry?: AxisTlvVisibilityResolver<T>;
|
|
765
798
|
}
|
|
766
799
|
declare function encodeAxisTlvDto<T extends object>(dtoClass: AxisTlvDtoCtor<T>, data: Partial<Record<keyof T, unknown>>, context?: AxisTlvEncodeContext<T>): Uint8Array;
|
|
767
800
|
declare function projectAxisTlvDto<T extends object>(dtoClass: AxisTlvDtoCtor<T>, data: Partial<Record<keyof T, unknown>>, context?: AxisTlvEncodeContext<T>): Partial<Record<keyof T, unknown>>;
|
|
@@ -801,4 +834,4 @@ declare function executeLoomPipeline(writ: Writ, publicKeyHex: string, presence:
|
|
|
801
834
|
code: string;
|
|
802
835
|
};
|
|
803
836
|
|
|
804
|
-
export { ATS1_HDR, ATS1_SCHEMA, AXIS_EXECUTION_CONTEXT_KEY, AXIS_OPCODES, AXIS_UPLOAD_FILE_STORE, AXIS_UPLOAD_RECEIPT_SIGNER, AXIS_UPLOAD_SESSION_STORE, ats1 as Ats1Codec, Axis1DecodedFrame, type AxisPacket as AxisBinaryPacket, AxisCapsuleRef, AxisChainEnvelope, AxisChainExecutor, AxisChainResult, AxisChainStep, type AxisCrudHandler, type AxisDecoded, type AxisExecutionContext, type AxisHandler, type AxisHandlerInit, AxisIdDto, AxisIntentSensorBindingInput, AxisIntentSensorOptions, AxisMediaTypes, AxisObservation, AxisObserverBindingInput, T as AxisPacketTags, AxisPartialType, AxisResponseDto, AxisSensorChainService, AxisTlvDto, type AxisTlvEncodeContext, type AxisTlvFieldPolicy, type AxisTlvFieldPolicyInput, BAND, BodyProfile, type BodyProfileValidation, BodyProfileValidator, CAPABILITIES, CHAIN_METADATA_KEY, type Capability, Chain, ChainOptions, type ChainResult, ContractViolationError, DEFAULT_TIMEOUT, type DeviceSEContext, DiskUploadFileStore, type DtoSchema, ExecutionMeter, type ExecutionMetrics, Grant, GrantCapability, GrantStatus, GrantValidationResult, HANDLER_METADATA_KEY, HANDLER_SENSORS_KEY, Handler, type HandlerOptions, HandlerSensors, INTENT_BODY_KEY, INTENT_REQUIREMENTS, INTENT_SENSITIVITY_MAP, INTENT_SENSORS_KEY, INTENT_TIMEOUTS, IntentBody, type IntentDefinition, IntentRouter, IntentSensitivity, IntentSensors, IntentTlvField, type LoomExecutionResult, LoomReceipt, type MTLSContext, type ObservationQueueConfig, type ObservationQueueMessage, type ObservationStreamEntry, type ObservationWitnessSummary, ObserverDispatcherService, type ObserverVerdict, PRE_DECODE_BOUNDARY, PROOF_CAPABILITIES, PresenceChallenge, PresenceDeclaration, PresenceProof, PresenceReceipt, PresenceStatus, PresenceVerifyResult, type ProofType, type ProofVerificationResult, ProofVerificationService, RESPONSE_TAG_CREATED_AT, RESPONSE_TAG_CREATED_BY, RESPONSE_TAG_ID, RESPONSE_TAG_UPDATED_AT, RESPONSE_TAG_UPDATED_BY, type ReceiptEffect, RequiredProofKind, type ResponseContract, ResponseObserver, type ResponseObserverContext, Revocation, SENSOR_METADATA_KEY, Schema2002_PasskeyLoginOptionsRes, Schema2011_PasskeyLoginVerifyReq, Schema2012_PasskeyLoginVerifyRes, Schema2021_PasskeyRegisterOptionsReq, Sensor, type SensorBand, SensorDecision, SensorInput, type SensorOptions, type SensorPhase, SensorRegistry, ThreadState, TlvValidatorFn, type UnsignedObservationWitness, type UploadFileStat, type UploadFileStore, type UploadReceiptSigner, type UploadSessionRecord, type UploadSessionStatus, type UploadSessionStore, Writ, WritBody, WritMeta, WritValidationResult, b64urlDecode, b64urlDecodeString, b64urlEncode, b64urlEncodeString, buildAts1Hdr, buildDtoDecoder, buildPacket, buildQueueMessage, buildReceiptHash, buildTLVs, buildUnsignedWitness, bytes, canAccessResource, canonicalJson, canonicalJsonExcluding, canonicalizeObservation, classifyIntent, createGrant, createPresenceChallenge, createReceipt, createRevocation, createWrit, decodeQueueMessage, encVarint, encodeAxisTlvDto, encodeQueueMessage, executeLoomPipeline, extractDtoSchema, getAxisExecutionContext, getGrantStatus, getPresenceStatus, grantCoversAction, hasScope, hashObservation, isAdminOpcode, isKnownOpcode, isRevoked, isTimestampValid, mergeAxisExecutionContext, nonce16, packPasskeyLoginOptionsReq, packPasskeyLoginOptionsRes, packPasskeyLoginVerifyReq, packPasskeyLoginVerifyRes, packPasskeyRegisterOptionsReq, parseAutoClaimEntries, parseScope, parseStreamEntries, projectAxisTlvDto, renewPresence, resolveTimeout, sensitivityName, signPresenceChallenge, stableJsonStringify, tlv, u64be, unpackPasskeyLoginOptionsReq, unpackPasskeyLoginVerifyReq, unpackPasskeyRegisterOptionsReq, updateThreadState, utf8, validateFrameShape, validateGrant, validateWrit, varintU, verifyPresenceProof, verifyReceiptChain, verifyResponse, withAxisExecutionContext };
|
|
837
|
+
export { ATS1_HDR, ATS1_SCHEMA, AXIS_EXECUTION_CONTEXT_KEY, AXIS_OPCODES, AXIS_UPLOAD_FILE_STORE, AXIS_UPLOAD_RECEIPT_SIGNER, AXIS_UPLOAD_SESSION_STORE, ats1 as Ats1Codec, Axis1DecodedFrame, type AxisPacket as AxisBinaryPacket, AxisCapsuleRef, AxisChainEnvelope, AxisChainExecutor, AxisChainResult, AxisChainStep, type AxisCrudHandler, type AxisDecoded, type AxisExecutionContext, type AxisHandler, type AxisHandlerInit, AxisIdDto, AxisIntentSensorBindingInput, AxisIntentSensorOptions, AxisMediaTypes, AxisObservation, AxisObserverBindingInput, T as AxisPacketTags, AxisPartialType, AxisResponseDto, AxisSensorChainService, AxisTlvDto, type AxisTlvEncodeContext, type AxisTlvFieldPolicy, type AxisTlvFieldPolicyInput, type AxisTlvVisibilityOverride, AxisTlvVisibilityRegistry, type AxisTlvVisibilityResolveInput, type AxisTlvVisibilityResolver, type AxisTlvVisibilityRule, BAND, BodyProfile, type BodyProfileValidation, BodyProfileValidator, CAPABILITIES, CHAIN_METADATA_KEY, type Capability, Chain, ChainOptions, type ChainResult, ContractViolationError, DEFAULT_TIMEOUT, type DeviceSEContext, DiskUploadFileStore, type DtoSchema, ExecutionMeter, type ExecutionMetrics, Grant, GrantCapability, GrantStatus, GrantValidationResult, HANDLER_METADATA_KEY, HANDLER_SENSORS_KEY, Handler, type HandlerOptions, HandlerSensors, INTENT_BODY_KEY, INTENT_REQUIREMENTS, INTENT_SENSITIVITY_MAP, INTENT_SENSORS_KEY, INTENT_TIMEOUTS, IntentBody, type IntentDefinition, IntentRouter, IntentSensitivity, IntentSensors, IntentTlvField, type LoomExecutionResult, LoomReceipt, type MTLSContext, type ObservationQueueConfig, type ObservationQueueMessage, type ObservationStreamEntry, type ObservationWitnessSummary, ObserverDispatcherService, type ObserverVerdict, PRE_DECODE_BOUNDARY, PROOF_CAPABILITIES, PresenceChallenge, PresenceDeclaration, PresenceProof, PresenceReceipt, PresenceStatus, PresenceVerifyResult, type ProofType, type ProofVerificationResult, ProofVerificationService, RESPONSE_TAG_CREATED_AT, RESPONSE_TAG_CREATED_BY, RESPONSE_TAG_ID, RESPONSE_TAG_UPDATED_AT, RESPONSE_TAG_UPDATED_BY, type ReceiptEffect, RequiredProofKind, type ResponseContract, ResponseObserver, type ResponseObserverContext, Revocation, SENSOR_METADATA_KEY, Schema2002_PasskeyLoginOptionsRes, Schema2011_PasskeyLoginVerifyReq, Schema2012_PasskeyLoginVerifyRes, Schema2021_PasskeyRegisterOptionsReq, Sensor, type SensorBand, SensorDecision, SensorInput, type SensorOptions, type SensorPhase, SensorRegistry, ThreadState, TlvValidatorFn, type UnsignedObservationWitness, type UploadFileStat, type UploadFileStore, type UploadReceiptSigner, type UploadSessionRecord, type UploadSessionStatus, type UploadSessionStore, Writ, WritBody, WritMeta, WritValidationResult, b64urlDecode, b64urlDecodeString, b64urlEncode, b64urlEncodeString, buildAts1Hdr, buildDtoDecoder, buildPacket, buildQueueMessage, buildReceiptHash, buildTLVs, buildUnsignedWitness, bytes, canAccessResource, canonicalJson, canonicalJsonExcluding, canonicalizeObservation, classifyIntent, createGrant, createPresenceChallenge, createReceipt, createRevocation, createWrit, decodeQueueMessage, encVarint, encodeAxisTlvDto, encodeQueueMessage, executeLoomPipeline, extractDtoSchema, getAxisExecutionContext, getGrantStatus, getPresenceStatus, grantCoversAction, hasScope, hashObservation, isAdminOpcode, isKnownOpcode, isRevoked, isTimestampValid, mergeAxisExecutionContext, nonce16, packPasskeyLoginOptionsReq, packPasskeyLoginOptionsRes, packPasskeyLoginVerifyReq, packPasskeyLoginVerifyRes, packPasskeyRegisterOptionsReq, parseAutoClaimEntries, parseScope, parseStreamEntries, projectAxisTlvDto, renewPresence, resolveTimeout, sensitivityName, signPresenceChallenge, stableJsonStringify, tlv, u64be, unpackPasskeyLoginOptionsReq, unpackPasskeyLoginVerifyReq, unpackPasskeyRegisterOptionsReq, updateThreadState, utf8, validateFrameShape, validateGrant, validateWrit, varintU, verifyPresenceProof, verifyReceiptChain, verifyResponse, withAxisExecutionContext };
|
package/dist/index.d.ts
CHANGED
|
@@ -749,6 +749,36 @@ declare class AxisSensorChainService {
|
|
|
749
749
|
private normalizeProofKinds;
|
|
750
750
|
}
|
|
751
751
|
|
|
752
|
+
type AxisTlvVisibilityRule = IntentTlvField["encode"];
|
|
753
|
+
interface AxisTlvVisibilityOverride {
|
|
754
|
+
intent?: string;
|
|
755
|
+
dtoName?: string;
|
|
756
|
+
field?: string;
|
|
757
|
+
tag?: number;
|
|
758
|
+
encode: AxisTlvVisibilityRule;
|
|
759
|
+
enabled?: boolean;
|
|
760
|
+
}
|
|
761
|
+
interface AxisTlvVisibilityResolveInput<T extends object = object> {
|
|
762
|
+
intent?: string;
|
|
763
|
+
dtoName?: string;
|
|
764
|
+
field: IntentTlvField;
|
|
765
|
+
value: unknown;
|
|
766
|
+
data: Partial<Record<keyof T, unknown>>;
|
|
767
|
+
context: unknown;
|
|
768
|
+
}
|
|
769
|
+
interface AxisTlvVisibilityResolver<T extends object = object> {
|
|
770
|
+
resolve(input: AxisTlvVisibilityResolveInput<T>): AxisTlvVisibilityRule | undefined;
|
|
771
|
+
}
|
|
772
|
+
declare class AxisTlvVisibilityRegistry<T extends object = object> implements AxisTlvVisibilityResolver<T> {
|
|
773
|
+
private overrides;
|
|
774
|
+
constructor(overrides?: AxisTlvVisibilityOverride[]);
|
|
775
|
+
setOverrides(overrides: AxisTlvVisibilityOverride[]): void;
|
|
776
|
+
listOverrides(): AxisTlvVisibilityOverride[];
|
|
777
|
+
upsert(override: AxisTlvVisibilityOverride): void;
|
|
778
|
+
remove(match: Omit<AxisTlvVisibilityOverride, "encode">): number;
|
|
779
|
+
resolve(input: AxisTlvVisibilityResolveInput<T>): AxisTlvVisibilityRule | undefined;
|
|
780
|
+
}
|
|
781
|
+
|
|
752
782
|
type AxisTlvDtoCtor<T = object> = new (...args: never[]) => T;
|
|
753
783
|
interface AxisTlvFieldPolicyInput<T extends object = object> {
|
|
754
784
|
field: IntentTlvField;
|
|
@@ -758,10 +788,13 @@ interface AxisTlvFieldPolicyInput<T extends object = object> {
|
|
|
758
788
|
}
|
|
759
789
|
type AxisTlvFieldPolicy<T extends object = object> = (input: AxisTlvFieldPolicyInput<T>) => boolean;
|
|
760
790
|
interface AxisTlvEncodeContext<T extends object = object> {
|
|
791
|
+
intent?: string;
|
|
792
|
+
dtoName?: string;
|
|
761
793
|
roles?: readonly string[];
|
|
762
794
|
actorId?: string;
|
|
763
795
|
phase?: 'request' | 'response';
|
|
764
796
|
policies?: Record<string, AxisTlvFieldPolicy<T>>;
|
|
797
|
+
visibilityRegistry?: AxisTlvVisibilityResolver<T>;
|
|
765
798
|
}
|
|
766
799
|
declare function encodeAxisTlvDto<T extends object>(dtoClass: AxisTlvDtoCtor<T>, data: Partial<Record<keyof T, unknown>>, context?: AxisTlvEncodeContext<T>): Uint8Array;
|
|
767
800
|
declare function projectAxisTlvDto<T extends object>(dtoClass: AxisTlvDtoCtor<T>, data: Partial<Record<keyof T, unknown>>, context?: AxisTlvEncodeContext<T>): Partial<Record<keyof T, unknown>>;
|
|
@@ -801,4 +834,4 @@ declare function executeLoomPipeline(writ: Writ, publicKeyHex: string, presence:
|
|
|
801
834
|
code: string;
|
|
802
835
|
};
|
|
803
836
|
|
|
804
|
-
export { ATS1_HDR, ATS1_SCHEMA, AXIS_EXECUTION_CONTEXT_KEY, AXIS_OPCODES, AXIS_UPLOAD_FILE_STORE, AXIS_UPLOAD_RECEIPT_SIGNER, AXIS_UPLOAD_SESSION_STORE, ats1 as Ats1Codec, Axis1DecodedFrame, type AxisPacket as AxisBinaryPacket, AxisCapsuleRef, AxisChainEnvelope, AxisChainExecutor, AxisChainResult, AxisChainStep, type AxisCrudHandler, type AxisDecoded, type AxisExecutionContext, type AxisHandler, type AxisHandlerInit, AxisIdDto, AxisIntentSensorBindingInput, AxisIntentSensorOptions, AxisMediaTypes, AxisObservation, AxisObserverBindingInput, T as AxisPacketTags, AxisPartialType, AxisResponseDto, AxisSensorChainService, AxisTlvDto, type AxisTlvEncodeContext, type AxisTlvFieldPolicy, type AxisTlvFieldPolicyInput, BAND, BodyProfile, type BodyProfileValidation, BodyProfileValidator, CAPABILITIES, CHAIN_METADATA_KEY, type Capability, Chain, ChainOptions, type ChainResult, ContractViolationError, DEFAULT_TIMEOUT, type DeviceSEContext, DiskUploadFileStore, type DtoSchema, ExecutionMeter, type ExecutionMetrics, Grant, GrantCapability, GrantStatus, GrantValidationResult, HANDLER_METADATA_KEY, HANDLER_SENSORS_KEY, Handler, type HandlerOptions, HandlerSensors, INTENT_BODY_KEY, INTENT_REQUIREMENTS, INTENT_SENSITIVITY_MAP, INTENT_SENSORS_KEY, INTENT_TIMEOUTS, IntentBody, type IntentDefinition, IntentRouter, IntentSensitivity, IntentSensors, IntentTlvField, type LoomExecutionResult, LoomReceipt, type MTLSContext, type ObservationQueueConfig, type ObservationQueueMessage, type ObservationStreamEntry, type ObservationWitnessSummary, ObserverDispatcherService, type ObserverVerdict, PRE_DECODE_BOUNDARY, PROOF_CAPABILITIES, PresenceChallenge, PresenceDeclaration, PresenceProof, PresenceReceipt, PresenceStatus, PresenceVerifyResult, type ProofType, type ProofVerificationResult, ProofVerificationService, RESPONSE_TAG_CREATED_AT, RESPONSE_TAG_CREATED_BY, RESPONSE_TAG_ID, RESPONSE_TAG_UPDATED_AT, RESPONSE_TAG_UPDATED_BY, type ReceiptEffect, RequiredProofKind, type ResponseContract, ResponseObserver, type ResponseObserverContext, Revocation, SENSOR_METADATA_KEY, Schema2002_PasskeyLoginOptionsRes, Schema2011_PasskeyLoginVerifyReq, Schema2012_PasskeyLoginVerifyRes, Schema2021_PasskeyRegisterOptionsReq, Sensor, type SensorBand, SensorDecision, SensorInput, type SensorOptions, type SensorPhase, SensorRegistry, ThreadState, TlvValidatorFn, type UnsignedObservationWitness, type UploadFileStat, type UploadFileStore, type UploadReceiptSigner, type UploadSessionRecord, type UploadSessionStatus, type UploadSessionStore, Writ, WritBody, WritMeta, WritValidationResult, b64urlDecode, b64urlDecodeString, b64urlEncode, b64urlEncodeString, buildAts1Hdr, buildDtoDecoder, buildPacket, buildQueueMessage, buildReceiptHash, buildTLVs, buildUnsignedWitness, bytes, canAccessResource, canonicalJson, canonicalJsonExcluding, canonicalizeObservation, classifyIntent, createGrant, createPresenceChallenge, createReceipt, createRevocation, createWrit, decodeQueueMessage, encVarint, encodeAxisTlvDto, encodeQueueMessage, executeLoomPipeline, extractDtoSchema, getAxisExecutionContext, getGrantStatus, getPresenceStatus, grantCoversAction, hasScope, hashObservation, isAdminOpcode, isKnownOpcode, isRevoked, isTimestampValid, mergeAxisExecutionContext, nonce16, packPasskeyLoginOptionsReq, packPasskeyLoginOptionsRes, packPasskeyLoginVerifyReq, packPasskeyLoginVerifyRes, packPasskeyRegisterOptionsReq, parseAutoClaimEntries, parseScope, parseStreamEntries, projectAxisTlvDto, renewPresence, resolveTimeout, sensitivityName, signPresenceChallenge, stableJsonStringify, tlv, u64be, unpackPasskeyLoginOptionsReq, unpackPasskeyLoginVerifyReq, unpackPasskeyRegisterOptionsReq, updateThreadState, utf8, validateFrameShape, validateGrant, validateWrit, varintU, verifyPresenceProof, verifyReceiptChain, verifyResponse, withAxisExecutionContext };
|
|
837
|
+
export { ATS1_HDR, ATS1_SCHEMA, AXIS_EXECUTION_CONTEXT_KEY, AXIS_OPCODES, AXIS_UPLOAD_FILE_STORE, AXIS_UPLOAD_RECEIPT_SIGNER, AXIS_UPLOAD_SESSION_STORE, ats1 as Ats1Codec, Axis1DecodedFrame, type AxisPacket as AxisBinaryPacket, AxisCapsuleRef, AxisChainEnvelope, AxisChainExecutor, AxisChainResult, AxisChainStep, type AxisCrudHandler, type AxisDecoded, type AxisExecutionContext, type AxisHandler, type AxisHandlerInit, AxisIdDto, AxisIntentSensorBindingInput, AxisIntentSensorOptions, AxisMediaTypes, AxisObservation, AxisObserverBindingInput, T as AxisPacketTags, AxisPartialType, AxisResponseDto, AxisSensorChainService, AxisTlvDto, type AxisTlvEncodeContext, type AxisTlvFieldPolicy, type AxisTlvFieldPolicyInput, type AxisTlvVisibilityOverride, AxisTlvVisibilityRegistry, type AxisTlvVisibilityResolveInput, type AxisTlvVisibilityResolver, type AxisTlvVisibilityRule, BAND, BodyProfile, type BodyProfileValidation, BodyProfileValidator, CAPABILITIES, CHAIN_METADATA_KEY, type Capability, Chain, ChainOptions, type ChainResult, ContractViolationError, DEFAULT_TIMEOUT, type DeviceSEContext, DiskUploadFileStore, type DtoSchema, ExecutionMeter, type ExecutionMetrics, Grant, GrantCapability, GrantStatus, GrantValidationResult, HANDLER_METADATA_KEY, HANDLER_SENSORS_KEY, Handler, type HandlerOptions, HandlerSensors, INTENT_BODY_KEY, INTENT_REQUIREMENTS, INTENT_SENSITIVITY_MAP, INTENT_SENSORS_KEY, INTENT_TIMEOUTS, IntentBody, type IntentDefinition, IntentRouter, IntentSensitivity, IntentSensors, IntentTlvField, type LoomExecutionResult, LoomReceipt, type MTLSContext, type ObservationQueueConfig, type ObservationQueueMessage, type ObservationStreamEntry, type ObservationWitnessSummary, ObserverDispatcherService, type ObserverVerdict, PRE_DECODE_BOUNDARY, PROOF_CAPABILITIES, PresenceChallenge, PresenceDeclaration, PresenceProof, PresenceReceipt, PresenceStatus, PresenceVerifyResult, type ProofType, type ProofVerificationResult, ProofVerificationService, RESPONSE_TAG_CREATED_AT, RESPONSE_TAG_CREATED_BY, RESPONSE_TAG_ID, RESPONSE_TAG_UPDATED_AT, RESPONSE_TAG_UPDATED_BY, type ReceiptEffect, RequiredProofKind, type ResponseContract, ResponseObserver, type ResponseObserverContext, Revocation, SENSOR_METADATA_KEY, Schema2002_PasskeyLoginOptionsRes, Schema2011_PasskeyLoginVerifyReq, Schema2012_PasskeyLoginVerifyRes, Schema2021_PasskeyRegisterOptionsReq, Sensor, type SensorBand, SensorDecision, SensorInput, type SensorOptions, type SensorPhase, SensorRegistry, ThreadState, TlvValidatorFn, type UnsignedObservationWitness, type UploadFileStat, type UploadFileStore, type UploadReceiptSigner, type UploadSessionRecord, type UploadSessionStatus, type UploadSessionStore, Writ, WritBody, WritMeta, WritValidationResult, b64urlDecode, b64urlDecodeString, b64urlEncode, b64urlEncodeString, buildAts1Hdr, buildDtoDecoder, buildPacket, buildQueueMessage, buildReceiptHash, buildTLVs, buildUnsignedWitness, bytes, canAccessResource, canonicalJson, canonicalJsonExcluding, canonicalizeObservation, classifyIntent, createGrant, createPresenceChallenge, createReceipt, createRevocation, createWrit, decodeQueueMessage, encVarint, encodeAxisTlvDto, encodeQueueMessage, executeLoomPipeline, extractDtoSchema, getAxisExecutionContext, getGrantStatus, getPresenceStatus, grantCoversAction, hasScope, hashObservation, isAdminOpcode, isKnownOpcode, isRevoked, isTimestampValid, mergeAxisExecutionContext, nonce16, packPasskeyLoginOptionsReq, packPasskeyLoginOptionsRes, packPasskeyLoginVerifyReq, packPasskeyLoginVerifyRes, packPasskeyRegisterOptionsReq, parseAutoClaimEntries, parseScope, parseStreamEntries, projectAxisTlvDto, renewPresence, resolveTimeout, sensitivityName, signPresenceChallenge, stableJsonStringify, tlv, u64be, unpackPasskeyLoginOptionsReq, unpackPasskeyLoginVerifyReq, unpackPasskeyRegisterOptionsReq, updateThreadState, utf8, validateFrameShape, validateGrant, validateWrit, varintU, verifyPresenceProof, verifyReceiptChain, verifyResponse, withAxisExecutionContext };
|
package/dist/index.js
CHANGED
|
@@ -9360,9 +9360,10 @@ var init_timeline_store = __esm({
|
|
|
9360
9360
|
// src/utils/axis-tlv-codec.ts
|
|
9361
9361
|
function encodeAxisTlvDto(dtoClass, data, context = {}) {
|
|
9362
9362
|
const schema = (0, import_dto_schema2.extractDtoSchema)(dtoClass);
|
|
9363
|
+
const effectiveContext = withDtoName(dtoClass, context);
|
|
9363
9364
|
const items = schema.fields.flatMap((field) => {
|
|
9364
9365
|
const value = data[field.name];
|
|
9365
|
-
if (!shouldEncodeField(field, value, data,
|
|
9366
|
+
if (!shouldEncodeField(field, value, data, effectiveContext)) return [];
|
|
9366
9367
|
if (value === void 0 || value === null) {
|
|
9367
9368
|
if (field.required) {
|
|
9368
9369
|
throw new Error(`Missing required TLV response field: ${field.name}`);
|
|
@@ -9375,17 +9376,18 @@ function encodeAxisTlvDto(dtoClass, data, context = {}) {
|
|
|
9375
9376
|
}
|
|
9376
9377
|
function projectAxisTlvDto(dtoClass, data, context = {}) {
|
|
9377
9378
|
const schema = (0, import_dto_schema2.extractDtoSchema)(dtoClass);
|
|
9379
|
+
const effectiveContext = withDtoName(dtoClass, context);
|
|
9378
9380
|
const result = {};
|
|
9379
9381
|
for (const field of schema.fields) {
|
|
9380
9382
|
const value = data[field.name];
|
|
9381
|
-
if (!shouldEncodeField(field, value, data,
|
|
9383
|
+
if (!shouldEncodeField(field, value, data, effectiveContext)) continue;
|
|
9382
9384
|
if (value === void 0 || value === null) continue;
|
|
9383
9385
|
result[field.name] = value;
|
|
9384
9386
|
}
|
|
9385
9387
|
return result;
|
|
9386
9388
|
}
|
|
9387
9389
|
function shouldEncodeField(field, value, data, context) {
|
|
9388
|
-
const rule = field
|
|
9390
|
+
const rule = resolveEncodeRule(field, value, data, context);
|
|
9389
9391
|
if (rule === void 0) return true;
|
|
9390
9392
|
if (rule === false) return false;
|
|
9391
9393
|
if (rule.onlyRoles?.length && !hasAnyRole(context, rule.onlyRoles)) {
|
|
@@ -9405,6 +9407,22 @@ function shouldEncodeField(field, value, data, context) {
|
|
|
9405
9407
|
}
|
|
9406
9408
|
return true;
|
|
9407
9409
|
}
|
|
9410
|
+
function withDtoName(dtoClass, context) {
|
|
9411
|
+
return {
|
|
9412
|
+
...context,
|
|
9413
|
+
dtoName: context.dtoName ?? dtoClass.name
|
|
9414
|
+
};
|
|
9415
|
+
}
|
|
9416
|
+
function resolveEncodeRule(field, value, data, context) {
|
|
9417
|
+
return context.visibilityRegistry?.resolve({
|
|
9418
|
+
intent: context.intent,
|
|
9419
|
+
dtoName: context.dtoName,
|
|
9420
|
+
field,
|
|
9421
|
+
value,
|
|
9422
|
+
data,
|
|
9423
|
+
context
|
|
9424
|
+
}) ?? field.encode;
|
|
9425
|
+
}
|
|
9408
9426
|
function hasAnyRole(context, expectedRoles) {
|
|
9409
9427
|
const actualRoles = context.roles ?? [];
|
|
9410
9428
|
return expectedRoles.some((role) => actualRoles.includes(role));
|
|
@@ -9452,6 +9470,82 @@ var init_axis_tlv_codec = __esm({
|
|
|
9452
9470
|
}
|
|
9453
9471
|
});
|
|
9454
9472
|
|
|
9473
|
+
// src/utils/axis-tlv-visibility-registry.ts
|
|
9474
|
+
function overrideKey(override) {
|
|
9475
|
+
return [
|
|
9476
|
+
normalizeKey(override.intent),
|
|
9477
|
+
normalizeKey(override.dtoName),
|
|
9478
|
+
normalizeKey(override.field),
|
|
9479
|
+
override.tag ?? ""
|
|
9480
|
+
].join("|");
|
|
9481
|
+
}
|
|
9482
|
+
function normalizeKey(value) {
|
|
9483
|
+
return typeof value === "string" ? value.trim() : "";
|
|
9484
|
+
}
|
|
9485
|
+
function matchScore(override, input) {
|
|
9486
|
+
if (override.enabled === false) return -1;
|
|
9487
|
+
const intent = normalizeKey(input.intent);
|
|
9488
|
+
const dtoName = normalizeKey(input.dtoName);
|
|
9489
|
+
const overrideIntent = normalizeKey(override.intent);
|
|
9490
|
+
const overrideDtoName = normalizeKey(override.dtoName);
|
|
9491
|
+
const overrideField = normalizeKey(override.field);
|
|
9492
|
+
const fieldName = normalizeKey(input.field.name);
|
|
9493
|
+
if (overrideIntent && overrideIntent !== intent) return -1;
|
|
9494
|
+
if (overrideDtoName && overrideDtoName !== dtoName) return -1;
|
|
9495
|
+
const fieldMatches = Boolean(overrideField && overrideField === fieldName);
|
|
9496
|
+
const tagMatches = typeof override.tag === "number" && override.tag === input.field.tag;
|
|
9497
|
+
if (!fieldMatches && !tagMatches) return -1;
|
|
9498
|
+
return (overrideIntent ? 100 : 0) + (overrideDtoName ? 50 : 0) + (fieldMatches ? 10 : 0) + (tagMatches ? 8 : 0);
|
|
9499
|
+
}
|
|
9500
|
+
var AxisTlvVisibilityRegistry;
|
|
9501
|
+
var init_axis_tlv_visibility_registry = __esm({
|
|
9502
|
+
"src/utils/axis-tlv-visibility-registry.ts"() {
|
|
9503
|
+
AxisTlvVisibilityRegistry = class {
|
|
9504
|
+
constructor(overrides = []) {
|
|
9505
|
+
this.overrides = [];
|
|
9506
|
+
this.setOverrides(overrides);
|
|
9507
|
+
}
|
|
9508
|
+
setOverrides(overrides) {
|
|
9509
|
+
this.overrides = overrides.map((override) => ({ ...override }));
|
|
9510
|
+
}
|
|
9511
|
+
listOverrides() {
|
|
9512
|
+
return this.overrides.map((override) => ({ ...override }));
|
|
9513
|
+
}
|
|
9514
|
+
upsert(override) {
|
|
9515
|
+
const key = overrideKey(override);
|
|
9516
|
+
const index = this.overrides.findIndex((item) => overrideKey(item) === key);
|
|
9517
|
+
if (index >= 0) {
|
|
9518
|
+
this.overrides[index] = { ...override };
|
|
9519
|
+
return;
|
|
9520
|
+
}
|
|
9521
|
+
this.overrides.push({ ...override });
|
|
9522
|
+
}
|
|
9523
|
+
remove(match) {
|
|
9524
|
+
const before = this.overrides.length;
|
|
9525
|
+
this.overrides = this.overrides.filter(
|
|
9526
|
+
(item) => overrideKey(item) !== overrideKey(match)
|
|
9527
|
+
);
|
|
9528
|
+
return before - this.overrides.length;
|
|
9529
|
+
}
|
|
9530
|
+
resolve(input) {
|
|
9531
|
+
let bestScore = -1;
|
|
9532
|
+
let bestIndex = -1;
|
|
9533
|
+
let best;
|
|
9534
|
+
this.overrides.forEach((override, index) => {
|
|
9535
|
+
const score = matchScore(override, input);
|
|
9536
|
+
if (score < 0) return;
|
|
9537
|
+
if (score > bestScore || score === bestScore && index > bestIndex) {
|
|
9538
|
+
bestScore = score;
|
|
9539
|
+
bestIndex = index;
|
|
9540
|
+
best = override;
|
|
9541
|
+
}
|
|
9542
|
+
});
|
|
9543
|
+
return best?.encode;
|
|
9544
|
+
}
|
|
9545
|
+
};
|
|
9546
|
+
}
|
|
9547
|
+
});
|
|
9548
|
+
|
|
9455
9549
|
// src/loom/loom.types.ts
|
|
9456
9550
|
function deriveAnchorReflection(softid, context = "openlogs", scope = "loom") {
|
|
9457
9551
|
return `ar:${context}:${scope}:${softid}`;
|
|
@@ -13190,6 +13284,7 @@ __export(index_exports, {
|
|
|
13190
13284
|
AxisSensorChainService: () => AxisSensorChainService,
|
|
13191
13285
|
AxisStream: () => AxisStream,
|
|
13192
13286
|
AxisTlvDto: () => AxisTlvDto,
|
|
13287
|
+
AxisTlvVisibilityRegistry: () => AxisTlvVisibilityRegistry,
|
|
13193
13288
|
BAND: () => BAND,
|
|
13194
13289
|
BodyProfile: () => BodyProfile2,
|
|
13195
13290
|
BodyProfileValidator: () => BodyProfileValidator,
|
|
@@ -13536,6 +13631,7 @@ var init_index = __esm({
|
|
|
13536
13631
|
init_cce_pipeline();
|
|
13537
13632
|
init_cce_types();
|
|
13538
13633
|
init_axis_tlv_codec();
|
|
13634
|
+
init_axis_tlv_visibility_registry();
|
|
13539
13635
|
init_loom_types();
|
|
13540
13636
|
init_loom_engine();
|
|
13541
13637
|
init_idel_compiler();
|
|
@@ -13582,6 +13678,7 @@ init_index();
|
|
|
13582
13678
|
AxisSensorChainService,
|
|
13583
13679
|
AxisStream,
|
|
13584
13680
|
AxisTlvDto,
|
|
13681
|
+
AxisTlvVisibilityRegistry,
|
|
13585
13682
|
BAND,
|
|
13586
13683
|
BodyProfile,
|
|
13587
13684
|
BodyProfileValidator,
|