@nextera.one/axis-server-sdk 0.9.3 → 1.0.0

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 CHANGED
@@ -335,7 +335,7 @@ interface AxisCapsuleConstraints {
335
335
  sessionIdLock?: string;
336
336
  nonceRequired?: boolean;
337
337
  }
338
- interface TickWindow$1 {
338
+ interface TickWindow {
339
339
  start: number;
340
340
  end: number;
341
341
  }
@@ -352,7 +352,7 @@ interface AxisCapsulePayload {
352
352
  iat: number;
353
353
  nbf?: number;
354
354
  exp: number;
355
- tickWindow?: TickWindow$1;
355
+ tickWindow?: TickWindow;
356
356
  mode: CapsuleMode;
357
357
  maxUses: number;
358
358
  nonceSeed?: string;
@@ -681,246 +681,4 @@ interface IntentDefinition {
681
681
  declare function validateFrameShape(frame: any): boolean;
682
682
  declare function isTimestampValid(ts: number, skewSeconds?: number): boolean;
683
683
 
684
- declare enum DeviceType {
685
- MOBILE = "mobile",
686
- BROWSER = "browser",
687
- CLI = "cli",
688
- SERVICE = "service"
689
- }
690
- declare enum DeviceTrustLevel {
691
- PRIMARY = "primary",
692
- TRUSTED = "trusted",
693
- EPHEMERAL = "ephemeral"
694
- }
695
- declare enum DeviceStatus {
696
- ACTIVE = "active",
697
- REVOKED = "revoked",
698
- SUSPENDED = "suspended"
699
- }
700
- interface DeviceRecord {
701
- device_uid: string;
702
- user_uid: string;
703
- name: string;
704
- type: DeviceType;
705
- trust_level: DeviceTrustLevel;
706
- status: DeviceStatus;
707
- public_key: string;
708
- key_algorithm: string;
709
- created_at: string;
710
- last_seen_at?: string;
711
- revoked_at?: string;
712
- revoked_reason?: string;
713
- }
714
- declare enum LoginChallengeStatus {
715
- PENDING = "pending",
716
- SCANNED = "scanned",
717
- APPROVED = "approved",
718
- REJECTED = "rejected",
719
- EXPIRED = "expired"
720
- }
721
- interface LoginChallengeRecord {
722
- challenge_uid: string;
723
- status: LoginChallengeStatus;
724
- browser_public_key: string;
725
- browser_key_algorithm: string;
726
- browser_label?: string;
727
- requested_trust: DeviceTrustLevel;
728
- origin?: string;
729
- qr_hash: string;
730
- created_at: string;
731
- expires_at: string;
732
- scanned_at?: string;
733
- scanned_by_device_uid?: string;
734
- approved_at?: string;
735
- }
736
- declare enum TickAuthChallengeStatus {
737
- PENDING = "pending",
738
- FULFILLED = "fulfilled",
739
- REJECTED = "rejected",
740
- EXPIRED = "expired"
741
- }
742
- interface TickWindow {
743
- start: string;
744
- end: string;
745
- }
746
- interface TickAuthChallengeRecord {
747
- challenge_uid: string;
748
- login_challenge_uid?: string;
749
- status: TickAuthChallengeStatus;
750
- tick_window: TickWindow;
751
- purpose: string;
752
- payload_hash?: string;
753
- fulfilled_at?: string;
754
- fulfilled_by_device_uid?: string;
755
- }
756
- declare enum NestFlowCapsuleType {
757
- LOGIN = "login",
758
- DEVICE_REGISTRATION = "device_registration",
759
- STEP_UP = "step_up",
760
- RECOVERY = "recovery"
761
- }
762
- declare enum CapsuleStatus {
763
- ACTIVE = "active",
764
- CONSUMED = "consumed",
765
- REVOKED = "revoked",
766
- EXPIRED = "expired"
767
- }
768
- interface NestFlowCapsuleScope {
769
- type: NestFlowCapsuleType;
770
- intents: string[];
771
- device_uid?: string;
772
- login_challenge_uid?: string;
773
- }
774
- declare enum SessionStatus {
775
- ACTIVE = "active",
776
- EXPIRED = "expired",
777
- REVOKED = "revoked"
778
- }
779
- interface SessionRecord {
780
- session_uid: string;
781
- user_uid: string;
782
- device_uid: string;
783
- capsule_uid: string;
784
- status: SessionStatus;
785
- issued_at: string;
786
- expires_at: string;
787
- last_refreshed_at?: string;
788
- revoked_at?: string;
789
- revoked_reason?: string;
790
- }
791
- declare enum TrustLinkType {
792
- LOGIN = "login",
793
- PROMOTION = "promotion",
794
- RECOVERY = "recovery"
795
- }
796
- declare enum TrustLinkStatus {
797
- ACTIVE = "active",
798
- REVOKED = "revoked"
799
- }
800
- interface DeviceTrustLinkRecord {
801
- link_uid: string;
802
- issuer_device_uid: string;
803
- target_device_uid: string;
804
- type: TrustLinkType;
805
- status: TrustLinkStatus;
806
- issued_at: string;
807
- revoked_at?: string;
808
- }
809
- declare enum AuthLevel {
810
- SESSION = "session",
811
- SESSION_BROWSER = "session_browser",
812
- STEP_UP = "step_up",
813
- PRIMARY_DEVICE = "primary_device"
814
- }
815
- interface BrowserProof {
816
- server_nonce: string;
817
- signature: string;
818
- signature_algorithm: string;
819
- }
820
-
821
- declare const NESTFLOW_INTENTS: {
822
- readonly AUTH_WEB_LOGIN_REQUEST: "auth.web.login.request";
823
- readonly AUTH_WEB_LOGIN_SCAN: "auth.web.login.scan";
824
- readonly TICKAUTH_CHALLENGE_CREATE: "tickauth.challenge.create";
825
- readonly TICKAUTH_CHALLENGE_FULFILL: "tickauth.challenge.fulfill";
826
- readonly TICKAUTH_CHALLENGE_REJECT: "tickauth.challenge.reject";
827
- readonly CAPSULE_ISSUE_LOGIN: "capsule.issue.login";
828
- readonly CAPSULE_ISSUE_DEVICE_REGISTRATION: "capsule.issue.device_registration";
829
- readonly CAPSULE_ISSUE_STEP_UP: "capsule.issue.step_up";
830
- readonly CAPSULE_ISSUE_RECOVERY: "capsule.issue.recovery";
831
- readonly SESSION_ACTIVATE: "session.activate";
832
- readonly SESSION_REFRESH: "session.refresh";
833
- readonly SESSION_LOGOUT: "session.logout";
834
- readonly DEVICE_TRUST_REQUEST: "device.trust.request";
835
- readonly DEVICE_TRUST_PROMOTE: "device.trust.promote";
836
- readonly DEVICE_REVOKE: "device.revoke";
837
- readonly DEVICE_LIST: "device.list";
838
- readonly DEVICE_RENAME: "device.rename";
839
- readonly FLOW_PUBLISH: "flow.publish";
840
- readonly FLOW_DELETE: "flow.delete";
841
- readonly NODE_DELETE: "node.delete";
842
- readonly SECRET_ROTATE: "secret.rotate";
843
- readonly ORG_SECURITY_UPDATE: "org.security.update";
844
- readonly PRODUCTION_EXECUTION_APPROVE: "production.execution.approve";
845
- readonly IDENTITY_RECOVERY_START: "identity.recovery.start";
846
- readonly IDENTITY_RECOVERY_COMPLETE: "identity.recovery.complete";
847
- readonly PRIMARY_DEVICE_ROTATE: "primary.device.rotate";
848
- readonly IDENTITY_LOCK: "identity.lock";
849
- readonly IDENTITY_UNLOCK: "identity.unlock";
850
- };
851
- type NestFlowIntent = (typeof NESTFLOW_INTENTS)[keyof typeof NESTFLOW_INTENTS];
852
- declare const NESTFLOW_INTENT_SET: Set<string>;
853
- declare function isNestFlowIntent(intent: string): boolean;
854
-
855
- declare const NESTFLOW_POLICY_MAP: Record<string, AuthLevel>;
856
- declare function getRequiredAuthLevel(intent: string): AuthLevel | undefined;
857
- declare function satisfiesAuthLevel(provided: AuthLevel, required: AuthLevel): boolean;
858
-
859
- interface GuardResult {
860
- allowed: boolean;
861
- reason?: string;
862
- step_up_intent?: string;
863
- }
864
- declare function checkIntentPolicy(intent: string, currentAuthLevel: AuthLevel): GuardResult;
865
- interface SessionContext {
866
- session_uid: string;
867
- status: SessionStatus;
868
- expires_at: string;
869
- device_uid: string;
870
- user_uid: string;
871
- }
872
- declare function checkSession(session: SessionContext | null): GuardResult;
873
- declare function checkBrowserProof(proof: BrowserProof | null | undefined, expectedNonce: string): GuardResult;
874
- interface DeviceContext {
875
- device_uid: string;
876
- trust_level: DeviceTrustLevel;
877
- status: DeviceStatus;
878
- }
879
- declare function checkDeviceTrust(device: DeviceContext | null, minimumTrust: DeviceTrustLevel): GuardResult;
880
- interface CapsuleContext {
881
- capsule_uid: string;
882
- status: CapsuleStatus;
883
- type: string;
884
- intents: string[];
885
- device_uid?: string;
886
- expires_at: string;
887
- }
888
- declare function checkCapsule(capsule: CapsuleContext | null, intent: string, requestingDeviceUid?: string): GuardResult;
889
- interface LoginChallengeContext {
890
- challenge_uid: string;
891
- status: LoginChallengeStatus;
892
- expires_at: string;
893
- }
894
- declare function checkLoginChallenge(challenge: LoginChallengeContext | null, expectedStatus: LoginChallengeStatus): GuardResult;
895
- interface TickAuthContext {
896
- challenge_uid: string;
897
- status: TickAuthChallengeStatus;
898
- tick_window: {
899
- start: string;
900
- end: string;
901
- };
902
- }
903
- declare function checkTickAuth(challenge: TickAuthContext | null): GuardResult;
904
- interface NonceStore {
905
- has(nonce: string): Promise<boolean>;
906
- add(nonce: string, expiresAt: Date): Promise<void>;
907
- }
908
- declare function checkReplayProtection(nonce: string, store: NonceStore, windowMs?: number): Promise<GuardResult>;
909
-
910
- interface TransitionResult {
911
- valid: boolean;
912
- reason?: string;
913
- }
914
- declare function validateLoginChallengeTransition(from: LoginChallengeStatus, to: LoginChallengeStatus): TransitionResult;
915
- declare function validateTickAuthTransition(from: TickAuthChallengeStatus, to: TickAuthChallengeStatus): TransitionResult;
916
- declare function validateCapsuleTransition(from: CapsuleStatus, to: CapsuleStatus): TransitionResult;
917
- declare function validateSessionTransition(from: SessionStatus, to: SessionStatus): TransitionResult;
918
- declare function validateDeviceTransition(from: DeviceStatus, to: DeviceStatus): TransitionResult;
919
- declare function validateTrustLinkTransition(from: TrustLinkStatus, to: TrustLinkStatus): TransitionResult;
920
- declare function isLoginChallengeTerminal(status: LoginChallengeStatus): boolean;
921
- declare function isTickAuthTerminal(status: TickAuthChallengeStatus): boolean;
922
- declare function isCapsuleTerminal(status: CapsuleStatus): boolean;
923
- declare function isSessionTerminal(status: SessionStatus): boolean;
924
- declare function isDeviceTerminal(status: DeviceStatus): boolean;
925
-
926
- export { ATS1_HDR, ATS1_SCHEMA, AXIS_OPCODES, ats1 as Ats1Codec, AuthLevel, type Axis1DecodedFrame, type Axis1FrameToEncode, type AxisAlg$1 as AxisAlg, type AxisPacket as AxisBinaryPacket, type AxisCapsuleConstraints, type AxisCapsulePayload, type AxisCrudHandler, type AxisEffect, type AxisHandler, type AxisHandlerInit, type AxisAlg as AxisJsonAlg, type AxisFrame as AxisJsonFrame, type AxisResponse as AxisJsonResponse, type AxisSig as AxisJsonSig, type AxisObservedContext, type AxisPacket$1 as AxisPacket, T as AxisPacketTags, type AxisPostSensor, type AxisPreSensor, type AxisRequestContext, type AxisSensor, type AxisSensorInit, type AxisSig$1 as AxisSig, type BrowserProof, CAPABILITIES, type Capability, type CapsuleContext, type CapsuleMode, CapsuleStatus, ContractViolationError, DEFAULT_CONTRACTS, DEFAULT_TIMEOUT, Decision, type DeviceContext, type DeviceRecord, DeviceStatus, DeviceTrustLevel, type DeviceTrustLinkRecord, DeviceType, type ExecutionContract, ExecutionMeter, type ExecutionMetrics, FALLBACK_CONTRACT, type GuardResult, HANDLER_METADATA_KEY, Handler, INTENT_REQUIREMENTS, INTENT_ROUTES_KEY, INTENT_SENSITIVITY_MAP, INTENT_TIMEOUTS, Intent, type IntentDefinition, type IntentOptions, type IntentRoute, IntentRouter, IntentSensitivity, type KeyStatus, type LoginChallengeContext, type LoginChallengeRecord, LoginChallengeStatus, NESTFLOW_INTENTS, NESTFLOW_INTENT_SET, NESTFLOW_POLICY_MAP, type NestFlowCapsuleScope, NestFlowCapsuleType, type NestFlowIntent, type NonceStore, PROOF_CAPABILITIES, type ReceiptEffect, RiskDecision, type RiskEvaluation, type RiskSignal, Schema2002_PasskeyLoginOptionsRes, Schema2011_PasskeyLoginVerifyReq, Schema2012_PasskeyLoginVerifyRes, Schema2021_PasskeyRegisterOptionsReq, type SensorDecision, SensorDecisions, type SensorInput, type SensorMinifiedDecision, type SensorPhaseMetadata, type SessionContext, type SessionRecord, SessionStatus, type TickAuthChallengeRecord, TickAuthChallengeStatus, type TickAuthContext, type TickWindow, type TransitionResult, TrustLinkStatus, TrustLinkType, axis1SigningBytes, b64urlDecode, b64urlDecodeString, b64urlEncode, b64urlEncodeString, buildAts1Hdr, buildPacket, buildReceiptHash, buildTLVs, bytes, canAccessResource, canonicalJson, canonicalJsonExcluding, checkBrowserProof, checkCapsule, checkDeviceTrust, checkIntentPolicy, checkLoginChallenge, checkReplayProtection, checkSession, checkTickAuth, classifyIntent, decodeAxis1Frame, encVarint, encodeAxis1Frame, getRequiredAuthLevel, hasScope, isAdminOpcode, isCapsuleTerminal, isDeviceTerminal, isKnownOpcode, isLoginChallengeTerminal, isNestFlowIntent, isSessionTerminal, isTickAuthTerminal, isTimestampValid, nonce16, normalizeSensorDecision, packPasskeyLoginOptionsReq, packPasskeyLoginOptionsRes, packPasskeyLoginVerifyReq, packPasskeyLoginVerifyRes, packPasskeyRegisterOptionsReq, parseScope, resolveTimeout, satisfiesAuthLevel, sensitivityName, tlv, u64be, unpackPasskeyLoginOptionsReq, unpackPasskeyLoginVerifyReq, unpackPasskeyRegisterOptionsReq, utf8, validateCapsuleTransition, validateDeviceTransition, validateFrameShape, validateLoginChallengeTransition, validateSessionTransition, validateTickAuthTransition, validateTrustLinkTransition, varintU };
684
+ export { ATS1_HDR, ATS1_SCHEMA, AXIS_OPCODES, ats1 as Ats1Codec, type Axis1DecodedFrame, type Axis1FrameToEncode, type AxisAlg$1 as AxisAlg, type AxisPacket as AxisBinaryPacket, type AxisCapsuleConstraints, type AxisCapsulePayload, type AxisCrudHandler, type AxisEffect, type AxisHandler, type AxisHandlerInit, type AxisAlg as AxisJsonAlg, type AxisFrame as AxisJsonFrame, type AxisResponse as AxisJsonResponse, type AxisSig as AxisJsonSig, type AxisObservedContext, type AxisPacket$1 as AxisPacket, T as AxisPacketTags, type AxisPostSensor, type AxisPreSensor, type AxisRequestContext, type AxisSensor, type AxisSensorInit, type AxisSig$1 as AxisSig, CAPABILITIES, type Capability, type CapsuleMode, ContractViolationError, DEFAULT_CONTRACTS, DEFAULT_TIMEOUT, Decision, type ExecutionContract, ExecutionMeter, type ExecutionMetrics, FALLBACK_CONTRACT, HANDLER_METADATA_KEY, Handler, INTENT_REQUIREMENTS, INTENT_ROUTES_KEY, INTENT_SENSITIVITY_MAP, INTENT_TIMEOUTS, Intent, type IntentDefinition, type IntentOptions, type IntentRoute, IntentRouter, IntentSensitivity, type KeyStatus, PROOF_CAPABILITIES, type ReceiptEffect, RiskDecision, type RiskEvaluation, type RiskSignal, Schema2002_PasskeyLoginOptionsRes, Schema2011_PasskeyLoginVerifyReq, Schema2012_PasskeyLoginVerifyRes, Schema2021_PasskeyRegisterOptionsReq, type SensorDecision, SensorDecisions, type SensorInput, type SensorMinifiedDecision, type SensorPhaseMetadata, axis1SigningBytes, b64urlDecode, b64urlDecodeString, b64urlEncode, b64urlEncodeString, buildAts1Hdr, buildPacket, buildReceiptHash, buildTLVs, bytes, canAccessResource, canonicalJson, canonicalJsonExcluding, classifyIntent, decodeAxis1Frame, encVarint, encodeAxis1Frame, hasScope, isAdminOpcode, isKnownOpcode, isTimestampValid, nonce16, normalizeSensorDecision, packPasskeyLoginOptionsReq, packPasskeyLoginOptionsRes, packPasskeyLoginVerifyReq, packPasskeyLoginVerifyRes, packPasskeyRegisterOptionsReq, parseScope, resolveTimeout, sensitivityName, tlv, u64be, unpackPasskeyLoginOptionsReq, unpackPasskeyLoginVerifyReq, unpackPasskeyRegisterOptionsReq, utf8, validateFrameShape, varintU };
package/dist/index.d.ts CHANGED
@@ -335,7 +335,7 @@ interface AxisCapsuleConstraints {
335
335
  sessionIdLock?: string;
336
336
  nonceRequired?: boolean;
337
337
  }
338
- interface TickWindow$1 {
338
+ interface TickWindow {
339
339
  start: number;
340
340
  end: number;
341
341
  }
@@ -352,7 +352,7 @@ interface AxisCapsulePayload {
352
352
  iat: number;
353
353
  nbf?: number;
354
354
  exp: number;
355
- tickWindow?: TickWindow$1;
355
+ tickWindow?: TickWindow;
356
356
  mode: CapsuleMode;
357
357
  maxUses: number;
358
358
  nonceSeed?: string;
@@ -681,246 +681,4 @@ interface IntentDefinition {
681
681
  declare function validateFrameShape(frame: any): boolean;
682
682
  declare function isTimestampValid(ts: number, skewSeconds?: number): boolean;
683
683
 
684
- declare enum DeviceType {
685
- MOBILE = "mobile",
686
- BROWSER = "browser",
687
- CLI = "cli",
688
- SERVICE = "service"
689
- }
690
- declare enum DeviceTrustLevel {
691
- PRIMARY = "primary",
692
- TRUSTED = "trusted",
693
- EPHEMERAL = "ephemeral"
694
- }
695
- declare enum DeviceStatus {
696
- ACTIVE = "active",
697
- REVOKED = "revoked",
698
- SUSPENDED = "suspended"
699
- }
700
- interface DeviceRecord {
701
- device_uid: string;
702
- user_uid: string;
703
- name: string;
704
- type: DeviceType;
705
- trust_level: DeviceTrustLevel;
706
- status: DeviceStatus;
707
- public_key: string;
708
- key_algorithm: string;
709
- created_at: string;
710
- last_seen_at?: string;
711
- revoked_at?: string;
712
- revoked_reason?: string;
713
- }
714
- declare enum LoginChallengeStatus {
715
- PENDING = "pending",
716
- SCANNED = "scanned",
717
- APPROVED = "approved",
718
- REJECTED = "rejected",
719
- EXPIRED = "expired"
720
- }
721
- interface LoginChallengeRecord {
722
- challenge_uid: string;
723
- status: LoginChallengeStatus;
724
- browser_public_key: string;
725
- browser_key_algorithm: string;
726
- browser_label?: string;
727
- requested_trust: DeviceTrustLevel;
728
- origin?: string;
729
- qr_hash: string;
730
- created_at: string;
731
- expires_at: string;
732
- scanned_at?: string;
733
- scanned_by_device_uid?: string;
734
- approved_at?: string;
735
- }
736
- declare enum TickAuthChallengeStatus {
737
- PENDING = "pending",
738
- FULFILLED = "fulfilled",
739
- REJECTED = "rejected",
740
- EXPIRED = "expired"
741
- }
742
- interface TickWindow {
743
- start: string;
744
- end: string;
745
- }
746
- interface TickAuthChallengeRecord {
747
- challenge_uid: string;
748
- login_challenge_uid?: string;
749
- status: TickAuthChallengeStatus;
750
- tick_window: TickWindow;
751
- purpose: string;
752
- payload_hash?: string;
753
- fulfilled_at?: string;
754
- fulfilled_by_device_uid?: string;
755
- }
756
- declare enum NestFlowCapsuleType {
757
- LOGIN = "login",
758
- DEVICE_REGISTRATION = "device_registration",
759
- STEP_UP = "step_up",
760
- RECOVERY = "recovery"
761
- }
762
- declare enum CapsuleStatus {
763
- ACTIVE = "active",
764
- CONSUMED = "consumed",
765
- REVOKED = "revoked",
766
- EXPIRED = "expired"
767
- }
768
- interface NestFlowCapsuleScope {
769
- type: NestFlowCapsuleType;
770
- intents: string[];
771
- device_uid?: string;
772
- login_challenge_uid?: string;
773
- }
774
- declare enum SessionStatus {
775
- ACTIVE = "active",
776
- EXPIRED = "expired",
777
- REVOKED = "revoked"
778
- }
779
- interface SessionRecord {
780
- session_uid: string;
781
- user_uid: string;
782
- device_uid: string;
783
- capsule_uid: string;
784
- status: SessionStatus;
785
- issued_at: string;
786
- expires_at: string;
787
- last_refreshed_at?: string;
788
- revoked_at?: string;
789
- revoked_reason?: string;
790
- }
791
- declare enum TrustLinkType {
792
- LOGIN = "login",
793
- PROMOTION = "promotion",
794
- RECOVERY = "recovery"
795
- }
796
- declare enum TrustLinkStatus {
797
- ACTIVE = "active",
798
- REVOKED = "revoked"
799
- }
800
- interface DeviceTrustLinkRecord {
801
- link_uid: string;
802
- issuer_device_uid: string;
803
- target_device_uid: string;
804
- type: TrustLinkType;
805
- status: TrustLinkStatus;
806
- issued_at: string;
807
- revoked_at?: string;
808
- }
809
- declare enum AuthLevel {
810
- SESSION = "session",
811
- SESSION_BROWSER = "session_browser",
812
- STEP_UP = "step_up",
813
- PRIMARY_DEVICE = "primary_device"
814
- }
815
- interface BrowserProof {
816
- server_nonce: string;
817
- signature: string;
818
- signature_algorithm: string;
819
- }
820
-
821
- declare const NESTFLOW_INTENTS: {
822
- readonly AUTH_WEB_LOGIN_REQUEST: "auth.web.login.request";
823
- readonly AUTH_WEB_LOGIN_SCAN: "auth.web.login.scan";
824
- readonly TICKAUTH_CHALLENGE_CREATE: "tickauth.challenge.create";
825
- readonly TICKAUTH_CHALLENGE_FULFILL: "tickauth.challenge.fulfill";
826
- readonly TICKAUTH_CHALLENGE_REJECT: "tickauth.challenge.reject";
827
- readonly CAPSULE_ISSUE_LOGIN: "capsule.issue.login";
828
- readonly CAPSULE_ISSUE_DEVICE_REGISTRATION: "capsule.issue.device_registration";
829
- readonly CAPSULE_ISSUE_STEP_UP: "capsule.issue.step_up";
830
- readonly CAPSULE_ISSUE_RECOVERY: "capsule.issue.recovery";
831
- readonly SESSION_ACTIVATE: "session.activate";
832
- readonly SESSION_REFRESH: "session.refresh";
833
- readonly SESSION_LOGOUT: "session.logout";
834
- readonly DEVICE_TRUST_REQUEST: "device.trust.request";
835
- readonly DEVICE_TRUST_PROMOTE: "device.trust.promote";
836
- readonly DEVICE_REVOKE: "device.revoke";
837
- readonly DEVICE_LIST: "device.list";
838
- readonly DEVICE_RENAME: "device.rename";
839
- readonly FLOW_PUBLISH: "flow.publish";
840
- readonly FLOW_DELETE: "flow.delete";
841
- readonly NODE_DELETE: "node.delete";
842
- readonly SECRET_ROTATE: "secret.rotate";
843
- readonly ORG_SECURITY_UPDATE: "org.security.update";
844
- readonly PRODUCTION_EXECUTION_APPROVE: "production.execution.approve";
845
- readonly IDENTITY_RECOVERY_START: "identity.recovery.start";
846
- readonly IDENTITY_RECOVERY_COMPLETE: "identity.recovery.complete";
847
- readonly PRIMARY_DEVICE_ROTATE: "primary.device.rotate";
848
- readonly IDENTITY_LOCK: "identity.lock";
849
- readonly IDENTITY_UNLOCK: "identity.unlock";
850
- };
851
- type NestFlowIntent = (typeof NESTFLOW_INTENTS)[keyof typeof NESTFLOW_INTENTS];
852
- declare const NESTFLOW_INTENT_SET: Set<string>;
853
- declare function isNestFlowIntent(intent: string): boolean;
854
-
855
- declare const NESTFLOW_POLICY_MAP: Record<string, AuthLevel>;
856
- declare function getRequiredAuthLevel(intent: string): AuthLevel | undefined;
857
- declare function satisfiesAuthLevel(provided: AuthLevel, required: AuthLevel): boolean;
858
-
859
- interface GuardResult {
860
- allowed: boolean;
861
- reason?: string;
862
- step_up_intent?: string;
863
- }
864
- declare function checkIntentPolicy(intent: string, currentAuthLevel: AuthLevel): GuardResult;
865
- interface SessionContext {
866
- session_uid: string;
867
- status: SessionStatus;
868
- expires_at: string;
869
- device_uid: string;
870
- user_uid: string;
871
- }
872
- declare function checkSession(session: SessionContext | null): GuardResult;
873
- declare function checkBrowserProof(proof: BrowserProof | null | undefined, expectedNonce: string): GuardResult;
874
- interface DeviceContext {
875
- device_uid: string;
876
- trust_level: DeviceTrustLevel;
877
- status: DeviceStatus;
878
- }
879
- declare function checkDeviceTrust(device: DeviceContext | null, minimumTrust: DeviceTrustLevel): GuardResult;
880
- interface CapsuleContext {
881
- capsule_uid: string;
882
- status: CapsuleStatus;
883
- type: string;
884
- intents: string[];
885
- device_uid?: string;
886
- expires_at: string;
887
- }
888
- declare function checkCapsule(capsule: CapsuleContext | null, intent: string, requestingDeviceUid?: string): GuardResult;
889
- interface LoginChallengeContext {
890
- challenge_uid: string;
891
- status: LoginChallengeStatus;
892
- expires_at: string;
893
- }
894
- declare function checkLoginChallenge(challenge: LoginChallengeContext | null, expectedStatus: LoginChallengeStatus): GuardResult;
895
- interface TickAuthContext {
896
- challenge_uid: string;
897
- status: TickAuthChallengeStatus;
898
- tick_window: {
899
- start: string;
900
- end: string;
901
- };
902
- }
903
- declare function checkTickAuth(challenge: TickAuthContext | null): GuardResult;
904
- interface NonceStore {
905
- has(nonce: string): Promise<boolean>;
906
- add(nonce: string, expiresAt: Date): Promise<void>;
907
- }
908
- declare function checkReplayProtection(nonce: string, store: NonceStore, windowMs?: number): Promise<GuardResult>;
909
-
910
- interface TransitionResult {
911
- valid: boolean;
912
- reason?: string;
913
- }
914
- declare function validateLoginChallengeTransition(from: LoginChallengeStatus, to: LoginChallengeStatus): TransitionResult;
915
- declare function validateTickAuthTransition(from: TickAuthChallengeStatus, to: TickAuthChallengeStatus): TransitionResult;
916
- declare function validateCapsuleTransition(from: CapsuleStatus, to: CapsuleStatus): TransitionResult;
917
- declare function validateSessionTransition(from: SessionStatus, to: SessionStatus): TransitionResult;
918
- declare function validateDeviceTransition(from: DeviceStatus, to: DeviceStatus): TransitionResult;
919
- declare function validateTrustLinkTransition(from: TrustLinkStatus, to: TrustLinkStatus): TransitionResult;
920
- declare function isLoginChallengeTerminal(status: LoginChallengeStatus): boolean;
921
- declare function isTickAuthTerminal(status: TickAuthChallengeStatus): boolean;
922
- declare function isCapsuleTerminal(status: CapsuleStatus): boolean;
923
- declare function isSessionTerminal(status: SessionStatus): boolean;
924
- declare function isDeviceTerminal(status: DeviceStatus): boolean;
925
-
926
- export { ATS1_HDR, ATS1_SCHEMA, AXIS_OPCODES, ats1 as Ats1Codec, AuthLevel, type Axis1DecodedFrame, type Axis1FrameToEncode, type AxisAlg$1 as AxisAlg, type AxisPacket as AxisBinaryPacket, type AxisCapsuleConstraints, type AxisCapsulePayload, type AxisCrudHandler, type AxisEffect, type AxisHandler, type AxisHandlerInit, type AxisAlg as AxisJsonAlg, type AxisFrame as AxisJsonFrame, type AxisResponse as AxisJsonResponse, type AxisSig as AxisJsonSig, type AxisObservedContext, type AxisPacket$1 as AxisPacket, T as AxisPacketTags, type AxisPostSensor, type AxisPreSensor, type AxisRequestContext, type AxisSensor, type AxisSensorInit, type AxisSig$1 as AxisSig, type BrowserProof, CAPABILITIES, type Capability, type CapsuleContext, type CapsuleMode, CapsuleStatus, ContractViolationError, DEFAULT_CONTRACTS, DEFAULT_TIMEOUT, Decision, type DeviceContext, type DeviceRecord, DeviceStatus, DeviceTrustLevel, type DeviceTrustLinkRecord, DeviceType, type ExecutionContract, ExecutionMeter, type ExecutionMetrics, FALLBACK_CONTRACT, type GuardResult, HANDLER_METADATA_KEY, Handler, INTENT_REQUIREMENTS, INTENT_ROUTES_KEY, INTENT_SENSITIVITY_MAP, INTENT_TIMEOUTS, Intent, type IntentDefinition, type IntentOptions, type IntentRoute, IntentRouter, IntentSensitivity, type KeyStatus, type LoginChallengeContext, type LoginChallengeRecord, LoginChallengeStatus, NESTFLOW_INTENTS, NESTFLOW_INTENT_SET, NESTFLOW_POLICY_MAP, type NestFlowCapsuleScope, NestFlowCapsuleType, type NestFlowIntent, type NonceStore, PROOF_CAPABILITIES, type ReceiptEffect, RiskDecision, type RiskEvaluation, type RiskSignal, Schema2002_PasskeyLoginOptionsRes, Schema2011_PasskeyLoginVerifyReq, Schema2012_PasskeyLoginVerifyRes, Schema2021_PasskeyRegisterOptionsReq, type SensorDecision, SensorDecisions, type SensorInput, type SensorMinifiedDecision, type SensorPhaseMetadata, type SessionContext, type SessionRecord, SessionStatus, type TickAuthChallengeRecord, TickAuthChallengeStatus, type TickAuthContext, type TickWindow, type TransitionResult, TrustLinkStatus, TrustLinkType, axis1SigningBytes, b64urlDecode, b64urlDecodeString, b64urlEncode, b64urlEncodeString, buildAts1Hdr, buildPacket, buildReceiptHash, buildTLVs, bytes, canAccessResource, canonicalJson, canonicalJsonExcluding, checkBrowserProof, checkCapsule, checkDeviceTrust, checkIntentPolicy, checkLoginChallenge, checkReplayProtection, checkSession, checkTickAuth, classifyIntent, decodeAxis1Frame, encVarint, encodeAxis1Frame, getRequiredAuthLevel, hasScope, isAdminOpcode, isCapsuleTerminal, isDeviceTerminal, isKnownOpcode, isLoginChallengeTerminal, isNestFlowIntent, isSessionTerminal, isTickAuthTerminal, isTimestampValid, nonce16, normalizeSensorDecision, packPasskeyLoginOptionsReq, packPasskeyLoginOptionsRes, packPasskeyLoginVerifyReq, packPasskeyLoginVerifyRes, packPasskeyRegisterOptionsReq, parseScope, resolveTimeout, satisfiesAuthLevel, sensitivityName, tlv, u64be, unpackPasskeyLoginOptionsReq, unpackPasskeyLoginVerifyReq, unpackPasskeyRegisterOptionsReq, utf8, validateCapsuleTransition, validateDeviceTransition, validateFrameShape, validateLoginChallengeTransition, validateSessionTransition, validateTickAuthTransition, validateTrustLinkTransition, varintU };
684
+ export { ATS1_HDR, ATS1_SCHEMA, AXIS_OPCODES, ats1 as Ats1Codec, type Axis1DecodedFrame, type Axis1FrameToEncode, type AxisAlg$1 as AxisAlg, type AxisPacket as AxisBinaryPacket, type AxisCapsuleConstraints, type AxisCapsulePayload, type AxisCrudHandler, type AxisEffect, type AxisHandler, type AxisHandlerInit, type AxisAlg as AxisJsonAlg, type AxisFrame as AxisJsonFrame, type AxisResponse as AxisJsonResponse, type AxisSig as AxisJsonSig, type AxisObservedContext, type AxisPacket$1 as AxisPacket, T as AxisPacketTags, type AxisPostSensor, type AxisPreSensor, type AxisRequestContext, type AxisSensor, type AxisSensorInit, type AxisSig$1 as AxisSig, CAPABILITIES, type Capability, type CapsuleMode, ContractViolationError, DEFAULT_CONTRACTS, DEFAULT_TIMEOUT, Decision, type ExecutionContract, ExecutionMeter, type ExecutionMetrics, FALLBACK_CONTRACT, HANDLER_METADATA_KEY, Handler, INTENT_REQUIREMENTS, INTENT_ROUTES_KEY, INTENT_SENSITIVITY_MAP, INTENT_TIMEOUTS, Intent, type IntentDefinition, type IntentOptions, type IntentRoute, IntentRouter, IntentSensitivity, type KeyStatus, PROOF_CAPABILITIES, type ReceiptEffect, RiskDecision, type RiskEvaluation, type RiskSignal, Schema2002_PasskeyLoginOptionsRes, Schema2011_PasskeyLoginVerifyReq, Schema2012_PasskeyLoginVerifyRes, Schema2021_PasskeyRegisterOptionsReq, type SensorDecision, SensorDecisions, type SensorInput, type SensorMinifiedDecision, type SensorPhaseMetadata, axis1SigningBytes, b64urlDecode, b64urlDecodeString, b64urlEncode, b64urlEncodeString, buildAts1Hdr, buildPacket, buildReceiptHash, buildTLVs, bytes, canAccessResource, canonicalJson, canonicalJsonExcluding, classifyIntent, decodeAxis1Frame, encVarint, encodeAxis1Frame, hasScope, isAdminOpcode, isKnownOpcode, isTimestampValid, nonce16, normalizeSensorDecision, packPasskeyLoginOptionsReq, packPasskeyLoginOptionsRes, packPasskeyLoginVerifyReq, packPasskeyLoginVerifyRes, packPasskeyRegisterOptionsReq, parseScope, resolveTimeout, sensitivityName, tlv, u64be, unpackPasskeyLoginOptionsReq, unpackPasskeyLoginVerifyReq, unpackPasskeyRegisterOptionsReq, utf8, validateFrameShape, varintU };