@nextera.one/axis-server-sdk 2.2.2 → 2.2.3

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.mjs CHANGED
@@ -456,92 +456,6 @@ var init_sensor_decorator = __esm({
456
456
  }
457
457
  });
458
458
 
459
- // src/decorators/priority-order.decorator.ts
460
- var require_priority_order_decorator = __commonJS({
461
- "src/decorators/priority-order.decorator.ts"(exports) {
462
- "use strict";
463
- Object.defineProperty(exports, "__esModule", { value: true });
464
- exports.priorityOrder = exports.PRIORITY_ORDER_METADATA_KEY = void 0;
465
- exports.getPriorityOrder = getPriorityOrder2;
466
- exports.comparePriorityOrder = comparePriorityOrder2;
467
- exports.getPriorityOrderedTargets = getPriorityOrderedTargets2;
468
- exports.PriorityOrder = PriorityOrder2;
469
- __require("reflect-metadata");
470
- exports.PRIORITY_ORDER_METADATA_KEY = "axis:priority-order";
471
- var PRIORITY_ORDER_WEIGHT = {
472
- HIGH: 0,
473
- MEDIUM: 1,
474
- LOW: 2
475
- };
476
- var priorityOrderRegistry = /* @__PURE__ */ new Set();
477
- function normalizePriority(priority) {
478
- const normalized = String(priority).toUpperCase();
479
- if (normalized === "HIGH" || normalized === "MEDIUM" || normalized === "LOW") {
480
- return normalized;
481
- }
482
- throw new Error(`@PriorityOrder() received invalid priority "${String(priority)}"`);
483
- }
484
- function normalizeOrder(order) {
485
- if (typeof order !== "number" || !Number.isInteger(order) || !Number.isFinite(order) || order < 0) {
486
- throw new Error(`@PriorityOrder() requires a non-negative integer order, received "${String(order)}"`);
487
- }
488
- return order;
489
- }
490
- function isPriorityOrderOptions(value) {
491
- return !!value && typeof value === "object" && !Array.isArray(value);
492
- }
493
- function resolvePriorityOrder(priorityOrOptions, order = 0) {
494
- if (isPriorityOrderOptions(priorityOrOptions)) {
495
- return {
496
- priority: normalizePriority(priorityOrOptions.priority ?? "MEDIUM"),
497
- order: normalizeOrder(priorityOrOptions.order ?? 0)
498
- };
499
- }
500
- return {
501
- priority: normalizePriority(priorityOrOptions ?? "MEDIUM"),
502
- order: normalizeOrder(order)
503
- };
504
- }
505
- function getPriorityOrder2(target) {
506
- return Reflect.getMetadata(exports.PRIORITY_ORDER_METADATA_KEY, target) ?? null;
507
- }
508
- function comparePriorityOrder2(left, right) {
509
- const priorityDelta = PRIORITY_ORDER_WEIGHT[left.priority] - PRIORITY_ORDER_WEIGHT[right.priority];
510
- if (priorityDelta !== 0) {
511
- return priorityDelta;
512
- }
513
- return left.order - right.order;
514
- }
515
- function getPriorityOrderedTargets2(targets) {
516
- const pool = targets ? Array.from(targets) : Array.from(priorityOrderRegistry);
517
- return pool.sort((left, right) => {
518
- const leftMeta = getPriorityOrder2(left);
519
- const rightMeta = getPriorityOrder2(right);
520
- if (!leftMeta && !rightMeta) {
521
- return (left.name || "").localeCompare(right.name || "");
522
- }
523
- if (!leftMeta)
524
- return 1;
525
- if (!rightMeta)
526
- return -1;
527
- const ordered = comparePriorityOrder2(leftMeta, rightMeta);
528
- if (ordered !== 0) {
529
- return ordered;
530
- }
531
- return (left.name || "").localeCompare(right.name || "");
532
- });
533
- }
534
- function PriorityOrder2(priorityOrOptions, order = 0) {
535
- const definition = resolvePriorityOrder(priorityOrOptions, order);
536
- return (target) => {
537
- Reflect.defineMetadata(exports.PRIORITY_ORDER_METADATA_KEY, definition, target);
538
- priorityOrderRegistry.add(target);
539
- };
540
- }
541
- exports.priorityOrder = PriorityOrder2;
542
- }
543
- });
544
-
545
459
  // src/decorators/tlv-field.decorator.ts
546
460
  var require_tlv_field_decorator = __commonJS({
547
461
  "src/decorators/tlv-field.decorator.ts"(exports) {
@@ -12634,7 +12548,6 @@ __export(index_exports, {
12634
12548
  ObserverDispatcherService: () => ObserverDispatcherService,
12635
12549
  ObserverRegistry: () => ObserverRegistry,
12636
12550
  PRE_DECODE_BOUNDARY: () => PRE_DECODE_BOUNDARY,
12637
- PRIORITY_ORDER_METADATA_KEY: () => import_priority_order.PRIORITY_ORDER_METADATA_KEY,
12638
12551
  PROOF_CAPABILITIES: () => PROOF_CAPABILITIES,
12639
12552
  PROOF_CAPSULE: () => PROOF_CAPSULE,
12640
12553
  PROOF_JWT: () => PROOF_JWT,
@@ -12642,7 +12555,6 @@ __export(index_exports, {
12642
12555
  PROOF_MTLS: () => PROOF_MTLS,
12643
12556
  PROOF_NONE: () => PROOF_NONE,
12644
12557
  PROOF_WITNESS: () => PROOF_WITNESS,
12645
- PriorityOrder: () => import_priority_order.PriorityOrder,
12646
12558
  ProofType: () => ProofType,
12647
12559
  ProofVerificationService: () => ProofVerificationService,
12648
12560
  REQUIRED_PROOF_METADATA_KEY: () => REQUIRED_PROOF_METADATA_KEY,
@@ -12734,7 +12646,6 @@ __export(index_exports, {
12734
12646
  canonicalizeObservation: () => canonicalizeObservation,
12735
12647
  canonicalizeWrit: () => canonicalizeWrit,
12736
12648
  classifyIntent: () => classifyIntent,
12737
- comparePriorityOrder: () => import_priority_order.comparePriorityOrder,
12738
12649
  computeReceiptHash: () => computeReceiptHash,
12739
12650
  computeSignaturePayload: () => computeSignaturePayload,
12740
12651
  createFabric: () => createFabric,
@@ -12779,8 +12690,6 @@ __export(index_exports, {
12779
12690
  getGrantStatus: () => getGrantStatus,
12780
12691
  getIrreversibleKnots: () => getIrreversibleKnots,
12781
12692
  getPresenceStatus: () => getPresenceStatus,
12782
- getPriorityOrder: () => import_priority_order.getPriorityOrder,
12783
- getPriorityOrderedTargets: () => import_priority_order.getPriorityOrderedTargets,
12784
12693
  getSignTarget: () => getSignTarget,
12785
12694
  grantCoversAction: () => grantCoversAction,
12786
12695
  hasScope: () => hasScope,
@@ -12805,7 +12714,6 @@ __export(index_exports, {
12805
12714
  parseAutoClaimEntries: () => parseAutoClaimEntries,
12806
12715
  parseScope: () => parseScope,
12807
12716
  parseStreamEntries: () => parseStreamEntries,
12808
- priorityOrder: () => import_priority_order.priorityOrder,
12809
12717
  projectAt: () => projectAt,
12810
12718
  queryFabric: () => queryFabric,
12811
12719
  recordOccurrence: () => recordOccurrence,
@@ -12842,7 +12750,7 @@ __export(index_exports, {
12842
12750
  weave: () => weave,
12843
12751
  withAxisExecutionContext: () => withAxisExecutionContext
12844
12752
  });
12845
- var import_priority_order, import_tlv_field2, import_dto_schema2, import_axis_id, import_axis_response;
12753
+ var import_tlv_field2, import_dto_schema2, import_axis_id, import_axis_response;
12846
12754
  var init_index = __esm({
12847
12755
  "src/index.ts"() {
12848
12756
  init_chain_decorator();
@@ -12855,7 +12763,6 @@ var init_index = __esm({
12855
12763
  init_observer_decorator();
12856
12764
  init_handler_sensors_decorator();
12857
12765
  init_sensor_decorator();
12858
- import_priority_order = __toESM(require_priority_order_decorator());
12859
12766
  import_tlv_field2 = __toESM(require_tlv_field_decorator());
12860
12767
  import_dto_schema2 = __toESM(require_dto_schema_util());
12861
12768
  init_axis_tlv_dto();
@@ -12927,8 +12834,6 @@ var init_index = __esm({
12927
12834
  init_index();
12928
12835
  var export_AxisIdDto = import_axis_id.AxisIdDto;
12929
12836
  var export_AxisResponseDto = import_axis_response.AxisResponseDto;
12930
- var export_PRIORITY_ORDER_METADATA_KEY = import_priority_order.PRIORITY_ORDER_METADATA_KEY;
12931
- var export_PriorityOrder = import_priority_order.PriorityOrder;
12932
12837
  var export_RESPONSE_TAG_CREATED_AT = import_axis_response.RESPONSE_TAG_CREATED_AT;
12933
12838
  var export_RESPONSE_TAG_CREATED_BY = import_axis_response.RESPONSE_TAG_CREATED_BY;
12934
12839
  var export_RESPONSE_TAG_ID = import_axis_response.RESPONSE_TAG_ID;
@@ -12943,11 +12848,7 @@ var export_TlvRange = import_tlv_field2.TlvRange;
12943
12848
  var export_TlvUtf8Pattern = import_tlv_field2.TlvUtf8Pattern;
12944
12849
  var export_TlvValidate = import_tlv_field2.TlvValidate;
12945
12850
  var export_buildDtoDecoder = import_dto_schema2.buildDtoDecoder;
12946
- var export_comparePriorityOrder = import_priority_order.comparePriorityOrder;
12947
12851
  var export_extractDtoSchema = import_dto_schema2.extractDtoSchema;
12948
- var export_getPriorityOrder = import_priority_order.getPriorityOrder;
12949
- var export_getPriorityOrderedTargets = import_priority_order.getPriorityOrderedTargets;
12950
- var export_priorityOrder = import_priority_order.priorityOrder;
12951
12852
  export {
12952
12853
  ATS1_HDR,
12953
12854
  ATS1_SCHEMA,
@@ -13045,7 +12946,6 @@ export {
13045
12946
  ObserverDispatcherService,
13046
12947
  ObserverRegistry,
13047
12948
  PRE_DECODE_BOUNDARY,
13048
- export_PRIORITY_ORDER_METADATA_KEY as PRIORITY_ORDER_METADATA_KEY,
13049
12949
  PROOF_CAPABILITIES,
13050
12950
  PROOF_CAPSULE,
13051
12951
  PROOF_JWT,
@@ -13053,7 +12953,6 @@ export {
13053
12953
  PROOF_MTLS,
13054
12954
  PROOF_NONE,
13055
12955
  PROOF_WITNESS,
13056
- export_PriorityOrder as PriorityOrder,
13057
12956
  ProofType,
13058
12957
  ProofVerificationService,
13059
12958
  REQUIRED_PROOF_METADATA_KEY,
@@ -13145,7 +13044,6 @@ export {
13145
13044
  canonicalizeObservation,
13146
13045
  canonicalizeWrit,
13147
13046
  classifyIntent,
13148
- export_comparePriorityOrder as comparePriorityOrder,
13149
13047
  computeReceiptHash,
13150
13048
  computeSignaturePayload,
13151
13049
  createFabric,
@@ -13190,8 +13088,6 @@ export {
13190
13088
  getGrantStatus,
13191
13089
  getIrreversibleKnots,
13192
13090
  getPresenceStatus,
13193
- export_getPriorityOrder as getPriorityOrder,
13194
- export_getPriorityOrderedTargets as getPriorityOrderedTargets,
13195
13091
  getSignTarget,
13196
13092
  grantCoversAction,
13197
13093
  hasScope,
@@ -13216,7 +13112,6 @@ export {
13216
13112
  parseAutoClaimEntries,
13217
13113
  parseScope,
13218
13114
  parseStreamEntries,
13219
- export_priorityOrder as priorityOrder,
13220
13115
  projectAt,
13221
13116
  queryFabric,
13222
13117
  recordOccurrence,