@nextera.one/axis-server-sdk 2.1.7 → 2.1.8
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 +3 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.js +13 -7
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +13 -7
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -334,12 +334,16 @@ __export(intent_decorator_exports, {
|
|
|
334
334
|
import "reflect-metadata";
|
|
335
335
|
function Intent(action, options) {
|
|
336
336
|
return (target, propertyKey) => {
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
337
|
+
const metadata = { intent: action, ...options };
|
|
338
|
+
Reflect.defineMetadata(INTENT_METADATA_KEY, metadata, target, propertyKey);
|
|
339
|
+
if (options?.sensitivity) {
|
|
340
|
+
Reflect.defineMetadata(
|
|
341
|
+
SENSITIVITY_METADATA_KEY,
|
|
342
|
+
options.sensitivity,
|
|
343
|
+
target,
|
|
344
|
+
propertyKey
|
|
345
|
+
);
|
|
346
|
+
}
|
|
343
347
|
const routes = Reflect.getMetadata(INTENT_ROUTES_KEY, target.constructor) || [];
|
|
344
348
|
routes.push({
|
|
345
349
|
action,
|
|
@@ -347,6 +351,7 @@ function Intent(action, options) {
|
|
|
347
351
|
absolute: options?.absolute,
|
|
348
352
|
frame: options?.frame,
|
|
349
353
|
kind: options?.kind,
|
|
354
|
+
sensitivity: options?.sensitivity,
|
|
350
355
|
chain: options?.chain,
|
|
351
356
|
bodyProfile: options?.bodyProfile,
|
|
352
357
|
tlv: options?.tlv,
|
|
@@ -359,6 +364,7 @@ function Intent(action, options) {
|
|
|
359
364
|
var INTENT_METADATA_KEY, INTENT_ROUTES_KEY;
|
|
360
365
|
var init_intent_decorator = __esm({
|
|
361
366
|
"src/decorators/intent.decorator.ts"() {
|
|
367
|
+
init_intent_policy_decorator();
|
|
362
368
|
INTENT_METADATA_KEY = "axis:intent";
|
|
363
369
|
INTENT_ROUTES_KEY = "axis:intent_routes";
|
|
364
370
|
}
|
|
@@ -2651,7 +2657,7 @@ var require_intent_router = __commonJS({
|
|
|
2651
2657
|
}
|
|
2652
2658
|
const methodSensitivity = Reflect.getMetadata(intent_policy_decorator_1.SENSITIVITY_METADATA_KEY, proto, methodName);
|
|
2653
2659
|
const classSensitivity = Reflect.getMetadata(intent_policy_decorator_1.SENSITIVITY_METADATA_KEY, proto.constructor);
|
|
2654
|
-
const sensitivity = methodSensitivity ?? classSensitivity;
|
|
2660
|
+
const sensitivity = meta?.sensitivity ?? methodSensitivity ?? classSensitivity;
|
|
2655
2661
|
if (sensitivity) {
|
|
2656
2662
|
this.intentSensitivity.set(intent, sensitivity);
|
|
2657
2663
|
}
|