@iii-dev/helpers 0.22.0 → 0.22.1-alpha.1

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.
@@ -54,7 +54,13 @@ type OnTriggerRegistrationInput = {
54
54
  trigger_type: string; /** ID of the function this trigger is bound to. */
55
55
  function_id: string; /** Trigger-specific configuration. */
56
56
  config: unknown; /** Arbitrary metadata attached to the trigger. */
57
- metadata?: Record<string, unknown>; /** Auth context from `AuthResult.context` for this session. */
57
+ metadata?: Record<string, unknown>;
58
+ /**
59
+ * Namespace the trigger's target resolves in (explicit, or `default` when
60
+ * absent). The same function id can exist in several namespaces, so the hook
61
+ * needs this to authorize per target namespace.
62
+ */
63
+ namespace?: string; /** Auth context from `AuthResult.context` for this session. */
58
64
  context: Record<string, unknown>;
59
65
  };
60
66
  /**
@@ -77,7 +83,12 @@ type OnTriggerRegistrationResult = {
77
83
  type OnFunctionRegistrationInput = {
78
84
  /** ID of the function being registered. */function_id: string; /** Human-readable description of the function. */
79
85
  description?: string; /** Arbitrary metadata attached to the function. */
80
- metadata?: Record<string, unknown>; /** Auth context from `AuthResult.context` for this session. */
86
+ metadata?: Record<string, unknown>;
87
+ /**
88
+ * Namespace the function registers in. The same id can exist in several
89
+ * namespaces, so the hook needs this to authorize per namespace.
90
+ */
91
+ namespace?: string; /** Auth context from `AuthResult.context` for this session. */
81
92
  context: Record<string, unknown>;
82
93
  };
83
94
  /**
@@ -54,7 +54,13 @@ type OnTriggerRegistrationInput = {
54
54
  trigger_type: string; /** ID of the function this trigger is bound to. */
55
55
  function_id: string; /** Trigger-specific configuration. */
56
56
  config: unknown; /** Arbitrary metadata attached to the trigger. */
57
- metadata?: Record<string, unknown>; /** Auth context from `AuthResult.context` for this session. */
57
+ metadata?: Record<string, unknown>;
58
+ /**
59
+ * Namespace the trigger's target resolves in (explicit, or `default` when
60
+ * absent). The same function id can exist in several namespaces, so the hook
61
+ * needs this to authorize per target namespace.
62
+ */
63
+ namespace?: string; /** Auth context from `AuthResult.context` for this session. */
58
64
  context: Record<string, unknown>;
59
65
  };
60
66
  /**
@@ -77,7 +83,12 @@ type OnTriggerRegistrationResult = {
77
83
  type OnFunctionRegistrationInput = {
78
84
  /** ID of the function being registered. */function_id: string; /** Human-readable description of the function. */
79
85
  description?: string; /** Arbitrary metadata attached to the function. */
80
- metadata?: Record<string, unknown>; /** Auth context from `AuthResult.context` for this session. */
86
+ metadata?: Record<string, unknown>;
87
+ /**
88
+ * Namespace the function registers in. The same id can exist in several
89
+ * namespaces, so the hook needs this to authorize per namespace.
90
+ */
91
+ namespace?: string; /** Auth context from `AuthResult.context` for this session. */
81
92
  context: Record<string, unknown>;
82
93
  };
83
94
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@iii-dev/helpers",
3
- "version": "0.22.0",
3
+ "version": "0.22.1-alpha.1",
4
4
  "private": false,
5
5
  "publishConfig": {
6
6
  "access": "public"