@iii-dev/helpers 0.22.1-alpha.11 → 0.22.1-alpha.13

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.
@@ -15,7 +15,17 @@ type AuthInput = {
15
15
  * middleware.
16
16
  */
17
17
  type AuthResult = {
18
- /** Additional function IDs to allow beyond the `expose_functions` config. Defaults to `[]` if omitted. */allowed_functions?: string[]; /** Function IDs to deny even if they match `expose_functions`. Takes precedence over allowed. Defaults to `[]` if omitted. */
18
+ /**
19
+ * Grants scoped to one namespace each: `{ orders: ['svc::*'] }`. A value is an
20
+ * exact function ID or a wildcard, in either the bare (`svc::*`) or the
21
+ * `match("svc::*")` spelling.
22
+ *
23
+ * The keys are also the namespaces the session may declare on
24
+ * `engine::workers::register`. Omit to scope nothing: the session declares any
25
+ * namespace, and only `allowed_functions` and `expose_functions` apply.
26
+ */
27
+ namespaces?: Record<string, string[]>; /** Additional function IDs to allow beyond the `expose_functions` config, in the `default` namespace only. Put per-namespace grants in `namespaces`. Defaults to `[]` if omitted. */
28
+ allowed_functions?: string[]; /** Function IDs to deny even if they match `expose_functions`. Takes precedence over allowed. Defaults to `[]` if omitted. */
19
29
  forbidden_functions?: string[]; /** Trigger type IDs the worker may register triggers for. When omitted, all types are allowed. */
20
30
  allowed_trigger_types?: string[]; /** Whether the worker may register new trigger types. Defaults to `false` if omitted. */
21
31
  allow_trigger_type_registration?: boolean; /** Whether the worker may register new functions. Defaults to `true` if omitted. */
@@ -15,7 +15,17 @@ type AuthInput = {
15
15
  * middleware.
16
16
  */
17
17
  type AuthResult = {
18
- /** Additional function IDs to allow beyond the `expose_functions` config. Defaults to `[]` if omitted. */allowed_functions?: string[]; /** Function IDs to deny even if they match `expose_functions`. Takes precedence over allowed. Defaults to `[]` if omitted. */
18
+ /**
19
+ * Grants scoped to one namespace each: `{ orders: ['svc::*'] }`. A value is an
20
+ * exact function ID or a wildcard, in either the bare (`svc::*`) or the
21
+ * `match("svc::*")` spelling.
22
+ *
23
+ * The keys are also the namespaces the session may declare on
24
+ * `engine::workers::register`. Omit to scope nothing: the session declares any
25
+ * namespace, and only `allowed_functions` and `expose_functions` apply.
26
+ */
27
+ namespaces?: Record<string, string[]>; /** Additional function IDs to allow beyond the `expose_functions` config, in the `default` namespace only. Put per-namespace grants in `namespaces`. Defaults to `[]` if omitted. */
28
+ allowed_functions?: string[]; /** Function IDs to deny even if they match `expose_functions`. Takes precedence over allowed. Defaults to `[]` if omitted. */
19
29
  forbidden_functions?: string[]; /** Trigger type IDs the worker may register triggers for. When omitted, all types are allowed. */
20
30
  allowed_trigger_types?: string[]; /** Whether the worker may register new trigger types. Defaults to `false` if omitted. */
21
31
  allow_trigger_type_registration?: boolean; /** Whether the worker may register new functions. Defaults to `true` if omitted. */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@iii-dev/helpers",
3
- "version": "0.22.1-alpha.11",
3
+ "version": "0.22.1-alpha.13",
4
4
  "private": false,
5
5
  "publishConfig": {
6
6
  "access": "public"