@nextera.one/axis-server-sdk 2.3.16 → 2.3.18

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.
@@ -462,10 +462,7 @@ function appendRequiredProof(target, propertyKey, proof) {
462
462
  REQUIRED_PROOF_METADATA_KEY,
463
463
  target,
464
464
  propertyKey
465
- ) ?? [] : Reflect.getMetadata(
466
- REQUIRED_PROOF_METADATA_KEY,
467
- target
468
- ) ?? [];
465
+ ) ?? [] : Reflect.getMetadata(REQUIRED_PROOF_METADATA_KEY, target) ?? [];
469
466
  const merged = existing.includes(proof) ? existing : [...existing, proof];
470
467
  if (propertyKey !== void 0) {
471
468
  Reflect.defineMetadata(
@@ -543,6 +540,21 @@ function Axis() {
543
540
  Reflect.defineMetadata(AXIS_META_KEY, { entry: true }, target);
544
541
  };
545
542
  }
543
+ function AxisStream(options = {}) {
544
+ return (target) => {
545
+ Reflect.defineMetadata(
546
+ AXIS_STREAM_META_KEY,
547
+ {
548
+ entry: true,
549
+ transport: "stream",
550
+ role: "entry",
551
+ path: options.path,
552
+ protocol: options.protocol
553
+ },
554
+ target
555
+ );
556
+ };
557
+ }
546
558
  function AxisPublic() {
547
559
  return (target, propertyKey, descriptor) => {
548
560
  if (propertyKey !== void 0) {
@@ -585,10 +597,11 @@ function AxisRateLimit(config) {
585
597
  return descriptor;
586
598
  };
587
599
  }
588
- var AXIS_META_KEY, SENSITIVITY_METADATA_KEY, CONTRACT_METADATA_KEY, REQUIRED_PROOF_METADATA_KEY, AXIS_PUBLIC_KEY, AXIS_ANONYMOUS_KEY, AXIS_AUTHORIZED_KEY, AXIS_RATE_LIMIT_KEY;
600
+ var AXIS_META_KEY, AXIS_STREAM_META_KEY, SENSITIVITY_METADATA_KEY, CONTRACT_METADATA_KEY, REQUIRED_PROOF_METADATA_KEY, AXIS_PUBLIC_KEY, AXIS_ANONYMOUS_KEY, AXIS_AUTHORIZED_KEY, AXIS_RATE_LIMIT_KEY;
589
601
  var init_intent_policy_decorator = __esm({
590
602
  "src/decorators/intent-policy.decorator.ts"() {
591
603
  AXIS_META_KEY = "axis:axis";
604
+ AXIS_STREAM_META_KEY = "axis:stream";
592
605
  SENSITIVITY_METADATA_KEY = "axis:sensitivity";
593
606
  CONTRACT_METADATA_KEY = "axis:contract";
594
607
  REQUIRED_PROOF_METADATA_KEY = "axis:required_proof";
@@ -2674,7 +2687,10 @@ var intent_router_exports = {};
2674
2687
  __export(intent_router_exports, {
2675
2688
  IntentRouter: () => IntentRouter
2676
2689
  });
2677
- import { decodeChainEnvelope, decodeChainRequest } from "@nextera.one/axis-protocol";
2690
+ import {
2691
+ decodeChainEnvelope,
2692
+ decodeChainRequest
2693
+ } from "@nextera.one/axis-protocol";
2678
2694
  function observerRefKey(ref) {
2679
2695
  return typeof ref === "string" ? ref : ref.name;
2680
2696
  }
@@ -2866,7 +2882,9 @@ var init_intent_router = __esm({
2866
2882
  */
2867
2883
  register(intent, handler) {
2868
2884
  if (this.handlers.has(intent)) {
2869
- this.logger.warn(`Intent ${intent} is already registered; replacing handler`);
2885
+ this.logger.warn(
2886
+ `Intent ${intent} is already registered; replacing handler`
2887
+ );
2870
2888
  }
2871
2889
  this.handlers.set(intent, handler);
2872
2890
  if (typeof handler === "function" && handler.name) {
@@ -3137,7 +3155,9 @@ var init_intent_router = __esm({
3137
3155
  body: bodyRes
3138
3156
  };
3139
3157
  }
3140
- throw new Error(`Handler for ${intent} does not implement handle or execute`);
3158
+ throw new Error(
3159
+ `Handler for ${intent} does not implement handle or execute`
3160
+ );
3141
3161
  }
3142
3162
  logIntent(intent, start, ok, error) {
3143
3163
  const diff = process.hrtime(start);
@@ -3845,6 +3865,7 @@ var init_intent_router = __esm({
3845
3865
  intent: meta.intent,
3846
3866
  version: 1,
3847
3867
  bodyProfile: meta.bodyProfile || "TLV_MAP",
3868
+ dtoName: meta.dto.name || void 0,
3848
3869
  fields: extracted.fields.map((f) => ({
3849
3870
  name: f.name,
3850
3871
  tlv: f.tag,
@@ -10935,6 +10956,7 @@ __export(index_exports, {
10935
10956
  AXIS_OPCODES: () => AXIS_OPCODES,
10936
10957
  AXIS_PUBLIC_KEY: () => AXIS_PUBLIC_KEY,
10937
10958
  AXIS_RATE_LIMIT_KEY: () => AXIS_RATE_LIMIT_KEY,
10959
+ AXIS_STREAM_META_KEY: () => AXIS_STREAM_META_KEY,
10938
10960
  AXIS_UPLOAD_FILE_STORE: () => AXIS_UPLOAD_FILE_STORE,
10939
10961
  AXIS_UPLOAD_RECEIPT_SIGNER: () => AXIS_UPLOAD_RECEIPT_SIGNER,
10940
10962
  AXIS_UPLOAD_SESSION_STORE: () => AXIS_UPLOAD_SESSION_STORE,
@@ -10954,6 +10976,7 @@ __export(index_exports, {
10954
10976
  AxisRateLimit: () => AxisRateLimit,
10955
10977
  AxisResponseDto: () => import_axis_response.AxisResponseDto,
10956
10978
  AxisSensorChainService: () => AxisSensorChainService,
10979
+ AxisStream: () => AxisStream,
10957
10980
  AxisTlvDto: () => AxisTlvDto,
10958
10981
  BAND: () => BAND,
10959
10982
  BodyProfile: () => BodyProfile2,