@fuzdev/fuz_app 0.157.0 → 0.158.0

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.
@@ -88,6 +88,7 @@ non-`remote_notification` kind.
88
88
  `create_rpc_endpoint` and `register_action_ws`. Validates these checks in
89
89
  order and returns the `Map<method, RpcAction>` the dispatchers use:
90
90
 
91
+ - **Schema slots** — `input` and `output` each hold a Zod or a fuz_schema schema (via `assert_validation_schema`, `schema_issues.ts`), on every spec; a value of neither library throws naming the action and the slot.
91
92
  - **Auth-shape cross-axis invariants** — roles imply a required actor, no accountless actor, nothing to gate on unrestricted auth (via `assert_route_auth_invariants`).
92
93
  - **Auth-shape biconditional** — `actor !== 'none' ⟺ input declares acting?: ActingActor` (via `assert_route_auth_acting_biconditional`).
93
94
  - **No `auth.required_scope`** — the slot is route-spec-only; nothing mounts a guard from it on an action, so declaring it would be a control that silently does nothing. Narrowed tokens are gated per method by the scope check in `perform_action`, which derives the `rpc:<method>` capability from `spec.method` rather than trusting a hand-written one.
@@ -7,6 +7,10 @@
7
7
  * numbered — "registry-time invariant N" elsewhere in the codebase refers to
8
8
  * the `RouteAuth` cross-axis set in `http/auth_shape.ts`, a different list):
9
9
  *
10
+ * - **Schema slots** — `input` and `output` each hold a Zod or a
11
+ * `@fuzdev/fuz_schema` schema (`assert_validation_schema`); a value of
12
+ * neither library throws naming the action and the slot. Fires for every
13
+ * spec, before the checks that read the schemas.
10
14
  * - **Auth-shape cross-axis invariants** — per `assert_route_auth_invariants`
11
15
  * in `http/auth_shape.ts`: roles imply a required actor, no accountless
12
16
  * actor, nothing to gate on unrestricted auth (that set's invariants 1, 3,
@@ -62,7 +66,7 @@ export interface ActionRegistryCompileResult {
62
66
  *
63
67
  * @param actions - polymorphic action array; HTTP RPC passes `RpcAction[]` (narrower), WebSocket passes `Action[]` (kind-polymorphic — handler-less notification specs are accepted)
64
68
  * @param ctx_label - per-spec error-message prefix, e.g. `'RPC action'` or `'WS action'`. Combined with the spec method as `${ctx_label} "${method}"`.
65
- * @throws Error on a cross-axis invariant or biconditional violation, rate-limit/account-axis mismatch, JSON-RPC null-input or void-output, or duplicate method.
69
+ * @throws Error on a schema slot holding a value of neither library, a cross-axis invariant or biconditional violation, rate-limit/account-axis mismatch, JSON-RPC null-input or void-output, or duplicate method.
66
70
  */
67
71
  export declare const compile_action_registry: (actions: ReadonlyArray<Action>, ctx_label: string) => ActionRegistryCompileResult;
68
72
  //# sourceMappingURL=compile_action_registry.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"compile_action_registry.d.ts","sourceRoot":"../src/lib/","sources":["../../src/lib/actions/compile_action_registry.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8CG;AAEH,OAAO,KAAK,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAO3D,oDAAoD;AACpD,MAAM,WAAW,2BAA2B;IAC3C;;;;;OAKG;IACH,UAAU,EAAE,GAAG,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC;CACnC;AAED;;;;;;;GAOG;AACH,eAAO,MAAM,uBAAuB,GACnC,SAAS,aAAa,CAAC,MAAM,CAAC,EAC9B,WAAW,MAAM,KACf,2BAqDF,CAAC"}
1
+ {"version":3,"file":"compile_action_registry.d.ts","sourceRoot":"../src/lib/","sources":["../../src/lib/actions/compile_action_registry.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkDG;AAEH,OAAO,KAAK,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAQ3D,oDAAoD;AACpD,MAAM,WAAW,2BAA2B;IAC3C;;;;;OAKG;IACH,UAAU,EAAE,GAAG,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC;CACnC;AAED;;;;;;;GAOG;AACH,eAAO,MAAM,uBAAuB,GACnC,SAAS,aAAa,CAAC,MAAM,CAAC,EAC9B,WAAW,MAAM,KACf,2BAuDF,CAAC"}
@@ -7,6 +7,10 @@
7
7
  * numbered — "registry-time invariant N" elsewhere in the codebase refers to
8
8
  * the `RouteAuth` cross-axis set in `http/auth_shape.ts`, a different list):
9
9
  *
10
+ * - **Schema slots** — `input` and `output` each hold a Zod or a
11
+ * `@fuzdev/fuz_schema` schema (`assert_validation_schema`); a value of
12
+ * neither library throws naming the action and the slot. Fires for every
13
+ * spec, before the checks that read the schemas.
10
14
  * - **Auth-shape cross-axis invariants** — per `assert_route_auth_invariants`
11
15
  * in `http/auth_shape.ts`: roles imply a required actor, no accountless
12
16
  * actor, nothing to gate on unrestricted auth (that set's invariants 1, 3,
@@ -47,13 +51,14 @@
47
51
  */
48
52
  import { assert_route_auth_acting_biconditional, assert_route_auth_invariants } from '../http/auth_shape.js';
49
53
  import { is_null_schema, is_void_schema } from '../http/schema_helpers.js';
54
+ import { assert_validation_schema } from '../schema_issues.js';
50
55
  /**
51
56
  * Validate registry-time invariants and build the dispatcher's
52
57
  * method → action lookup.
53
58
  *
54
59
  * @param actions - polymorphic action array; HTTP RPC passes `RpcAction[]` (narrower), WebSocket passes `Action[]` (kind-polymorphic — handler-less notification specs are accepted)
55
60
  * @param ctx_label - per-spec error-message prefix, e.g. `'RPC action'` or `'WS action'`. Combined with the spec method as `${ctx_label} "${method}"`.
56
- * @throws Error on a cross-axis invariant or biconditional violation, rate-limit/account-axis mismatch, JSON-RPC null-input or void-output, or duplicate method.
61
+ * @throws Error on a schema slot holding a value of neither library, a cross-axis invariant or biconditional violation, rate-limit/account-axis mismatch, JSON-RPC null-input or void-output, or duplicate method.
57
62
  */
58
63
  export const compile_action_registry = (actions, ctx_label) => {
59
64
  const action_map = new Map();
@@ -65,6 +70,8 @@ export const compile_action_registry = (actions, ctx_label) => {
65
70
  throw new Error(`Duplicate ${ctx_label} method: ${spec.method}`);
66
71
  }
67
72
  seen_methods.add(spec.method);
73
+ assert_validation_schema(spec.input, `${ctx}: input`);
74
+ assert_validation_schema(spec.output, `${ctx}: output`);
68
75
  // Auth-shape invariants apply to any spec with non-null auth (which
69
76
  // per the spec union means `kind === 'request_response'`).
70
77
  if (spec.auth !== null) {
@@ -995,7 +995,8 @@ columns, grantor labels, picker UIs):
995
995
  `scope_ids`.
996
996
 
997
997
  Both: `auth: {account: 'required', actor: 'none'}` + `rate_limit: 'account'`,
998
- pure reads (no audit, no side effects). `ActorLookupEntryJson` deliberately
998
+ pure reads (no audit, no side effects), their input and output schemas
999
+ `@fuzdev/fuz_schema` `object`s, which refuse unknown keys. `ActorLookupEntryJson` deliberately
999
1000
  omits `account_id`, `email`, credentials, timestamps, and role state —
1000
1001
  control-plane details, timing-oracle avoidance, separation of concern. LIKE
1001
1002
  wildcards in the user-supplied query are escaped at the JS layer so
@@ -47,31 +47,91 @@
47
47
  *
48
48
  * @module
49
49
  */
50
- import { z } from 'zod';
50
+ import { type Infer } from '@fuzdev/fuz_schema/schema.ts';
51
51
  /**
52
52
  * Hard cap on the number of ids resolvable in one call. Bounds the
53
53
  * batched username-enumeration surface.
54
54
  */
55
55
  export declare const ACTOR_LOOKUP_IDS_MAX = 50;
56
- /** One resolved actor row. `display_name` omitted when blank. */
57
- export declare const ActorLookupEntryJson: z.ZodObject<{
58
- id: z.ZodUUID & z.ZodType<import("@fuzdev/fuz_schema/schema.js").Branded<string, "Uuid">, string, z.core.$ZodTypeInternals<import("@fuzdev/fuz_schema/schema.js").Branded<string, "Uuid">, string>>;
59
- username: z.ZodString;
60
- display_name: z.ZodOptional<z.ZodString>;
61
- }, z.core.$strict>;
62
- export type ActorLookupEntryJson = z.infer<typeof ActorLookupEntryJson>;
63
- export declare const ActorLookupInput: z.ZodObject<{
64
- ids: z.ZodArray<z.ZodUUID & z.ZodType<import("@fuzdev/fuz_schema/schema.js").Branded<string, "Uuid">, string, z.core.$ZodTypeInternals<import("@fuzdev/fuz_schema/schema.js").Branded<string, "Uuid">, string>>>;
65
- }, z.core.$strict>;
66
- export type ActorLookupInput = z.infer<typeof ActorLookupInput>;
67
- export declare const ActorLookupOutput: z.ZodObject<{
68
- actors: z.ZodArray<z.ZodObject<{
69
- id: z.ZodUUID & z.ZodType<import("@fuzdev/fuz_schema/schema.js").Branded<string, "Uuid">, string, z.core.$ZodTypeInternals<import("@fuzdev/fuz_schema/schema.js").Branded<string, "Uuid">, string>>;
70
- username: z.ZodString;
71
- display_name: z.ZodOptional<z.ZodString>;
72
- }, z.core.$strict>>;
73
- }, z.core.$strict>;
74
- export type ActorLookupOutput = z.infer<typeof ActorLookupOutput>;
56
+ /**
57
+ * One resolved actor row, a `@fuzdev/fuz_schema` schema. `display_name`
58
+ * omitted when blank.
59
+ */
60
+ export declare const ActorLookupEntryJson: import("@fuzdev/fuz_schema/schema.ts").Schema<{
61
+ id: import("@fuzdev/fuz_schema/schema.ts").Branded<string, "Uuid">;
62
+ username: string;
63
+ display_name?: string | undefined;
64
+ }, {
65
+ id: string;
66
+ username: string;
67
+ display_name?: string | undefined;
68
+ }, "object", {
69
+ id: import("@fuzdev/fuz_schema/schema.ts").Schema<import("@fuzdev/fuz_schema/schema.ts").Branded<string, "Uuid">, string, "pipe", readonly (import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"string"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"number"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"bigint"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"boolean"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"object"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"check"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"uuid"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"unknown"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"record"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"array"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"union"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"literal"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"nullable"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"optional"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"transform"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"pipe"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"lazy"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"regex"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"to_lower_case"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"one_of"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"with_default"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"with_default_fn"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"loose_object"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"strip_object"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"object_with_rest"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"variant"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"min_length"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"max_length"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"min_value"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"max_value"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"integer"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"safe_integer"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"iso_datetime">)[]> & {
70
+ readonly '~types'?: {
71
+ readonly input: string;
72
+ readonly first: import("@fuzdev/fuz_schema/schema.ts").Schema<string, string, "string", undefined>;
73
+ } | undefined;
74
+ };
75
+ username: import("@fuzdev/fuz_schema/schema.ts").Schema<string, string, "string", undefined>;
76
+ display_name: import("@fuzdev/fuz_schema/schema.ts").Schema<string | undefined, string | undefined, "optional", import("@fuzdev/fuz_schema/schema.ts").SchemaWrapperDef<import("@fuzdev/fuz_schema/schema.ts").Schema<string, string, "string", undefined>>>;
77
+ }>;
78
+ export type ActorLookupEntryJson = Infer<typeof ActorLookupEntryJson>;
79
+ /** Input for `actor_lookup`, a `@fuzdev/fuz_schema` schema. */
80
+ export declare const ActorLookupInput: import("@fuzdev/fuz_schema/schema.ts").Schema<{
81
+ ids: import("@fuzdev/fuz_schema/schema.ts").Branded<string, "Uuid">[];
82
+ }, {
83
+ ids: string[];
84
+ }, "object", {
85
+ ids: import("@fuzdev/fuz_schema/schema.ts").PipeSchema<import("@fuzdev/fuz_schema/schema.ts").Branded<string, "Uuid">[], import("@fuzdev/fuz_schema/schema.ts").Schema<import("@fuzdev/fuz_schema/schema.ts").Branded<string, "Uuid">[], string[], "array", import("@fuzdev/fuz_schema/schema.ts").Schema<import("@fuzdev/fuz_schema/schema.ts").Branded<string, "Uuid">, string, "pipe", readonly (import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"string"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"number"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"bigint"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"boolean"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"object"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"check"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"uuid"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"unknown"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"record"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"array"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"union"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"literal"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"nullable"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"optional"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"transform"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"pipe"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"lazy"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"regex"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"to_lower_case"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"one_of"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"with_default"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"with_default_fn"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"loose_object"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"strip_object"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"object_with_rest"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"variant"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"min_length"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"max_length"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"min_value"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"max_value"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"integer"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"safe_integer"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"iso_datetime">)[]> & {
86
+ readonly '~types'?: {
87
+ readonly input: string;
88
+ readonly first: import("@fuzdev/fuz_schema/schema.ts").Schema<string, string, "string", undefined>;
89
+ } | undefined;
90
+ }>>;
91
+ }>;
92
+ export type ActorLookupInput = Infer<typeof ActorLookupInput>;
93
+ /** Output for `actor_lookup`, a `@fuzdev/fuz_schema` schema. */
94
+ export declare const ActorLookupOutput: import("@fuzdev/fuz_schema/schema.ts").Schema<{
95
+ actors: {
96
+ id: import("@fuzdev/fuz_schema/schema.ts").Branded<string, "Uuid">;
97
+ username: string;
98
+ display_name?: string | undefined;
99
+ }[];
100
+ }, {
101
+ actors: {
102
+ id: string;
103
+ username: string;
104
+ display_name?: string | undefined;
105
+ }[];
106
+ }, "object", {
107
+ actors: import("@fuzdev/fuz_schema/schema.ts").Schema<{
108
+ id: import("@fuzdev/fuz_schema/schema.ts").Branded<string, "Uuid">;
109
+ username: string;
110
+ display_name?: string | undefined;
111
+ }[], {
112
+ id: string;
113
+ username: string;
114
+ display_name?: string | undefined;
115
+ }[], "array", import("@fuzdev/fuz_schema/schema.ts").Schema<{
116
+ id: import("@fuzdev/fuz_schema/schema.ts").Branded<string, "Uuid">;
117
+ username: string;
118
+ display_name?: string | undefined;
119
+ }, {
120
+ id: string;
121
+ username: string;
122
+ display_name?: string | undefined;
123
+ }, "object", {
124
+ id: import("@fuzdev/fuz_schema/schema.ts").Schema<import("@fuzdev/fuz_schema/schema.ts").Branded<string, "Uuid">, string, "pipe", readonly (import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"string"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"number"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"bigint"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"boolean"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"object"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"check"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"uuid"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"unknown"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"record"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"array"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"union"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"literal"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"nullable"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"optional"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"transform"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"pipe"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"lazy"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"regex"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"to_lower_case"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"one_of"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"with_default"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"with_default_fn"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"loose_object"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"strip_object"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"object_with_rest"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"variant"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"min_length"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"max_length"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"min_value"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"max_value"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"integer"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"safe_integer"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"iso_datetime">)[]> & {
125
+ readonly '~types'?: {
126
+ readonly input: string;
127
+ readonly first: import("@fuzdev/fuz_schema/schema.ts").Schema<string, string, "string", undefined>;
128
+ } | undefined;
129
+ };
130
+ username: import("@fuzdev/fuz_schema/schema.ts").Schema<string, string, "string", undefined>;
131
+ display_name: import("@fuzdev/fuz_schema/schema.ts").Schema<string | undefined, string | undefined, "optional", import("@fuzdev/fuz_schema/schema.ts").SchemaWrapperDef<import("@fuzdev/fuz_schema/schema.ts").Schema<string, string, "string", undefined>>>;
132
+ }>>;
133
+ }>;
134
+ export type ActorLookupOutput = Infer<typeof ActorLookupOutput>;
75
135
  export declare const actor_lookup_action_spec: {
76
136
  method: string;
77
137
  kind: "request_response";
@@ -81,16 +141,58 @@ export declare const actor_lookup_action_spec: {
81
141
  actor: "none";
82
142
  };
83
143
  side_effects: false;
84
- input: z.ZodObject<{
85
- ids: z.ZodArray<z.ZodUUID & z.ZodType<import("@fuzdev/fuz_schema/schema.js").Branded<string, "Uuid">, string, z.core.$ZodTypeInternals<import("@fuzdev/fuz_schema/schema.js").Branded<string, "Uuid">, string>>>;
86
- }, z.core.$strict>;
87
- output: z.ZodObject<{
88
- actors: z.ZodArray<z.ZodObject<{
89
- id: z.ZodUUID & z.ZodType<import("@fuzdev/fuz_schema/schema.js").Branded<string, "Uuid">, string, z.core.$ZodTypeInternals<import("@fuzdev/fuz_schema/schema.js").Branded<string, "Uuid">, string>>;
90
- username: z.ZodString;
91
- display_name: z.ZodOptional<z.ZodString>;
92
- }, z.core.$strict>>;
93
- }, z.core.$strict>;
144
+ input: import("@fuzdev/fuz_schema/schema.ts").Schema<{
145
+ ids: import("@fuzdev/fuz_schema/schema.ts").Branded<string, "Uuid">[];
146
+ }, {
147
+ ids: string[];
148
+ }, "object", {
149
+ ids: import("@fuzdev/fuz_schema/schema.ts").PipeSchema<import("@fuzdev/fuz_schema/schema.ts").Branded<string, "Uuid">[], import("@fuzdev/fuz_schema/schema.ts").Schema<import("@fuzdev/fuz_schema/schema.ts").Branded<string, "Uuid">[], string[], "array", import("@fuzdev/fuz_schema/schema.ts").Schema<import("@fuzdev/fuz_schema/schema.ts").Branded<string, "Uuid">, string, "pipe", readonly (import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"string"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"number"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"bigint"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"boolean"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"object"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"check"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"uuid"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"unknown"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"record"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"array"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"union"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"literal"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"nullable"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"optional"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"transform"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"pipe"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"lazy"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"regex"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"to_lower_case"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"one_of"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"with_default"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"with_default_fn"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"loose_object"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"strip_object"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"object_with_rest"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"variant"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"min_length"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"max_length"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"min_value"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"max_value"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"integer"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"safe_integer"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"iso_datetime">)[]> & {
150
+ readonly '~types'?: {
151
+ readonly input: string;
152
+ readonly first: import("@fuzdev/fuz_schema/schema.ts").Schema<string, string, "string", undefined>;
153
+ } | undefined;
154
+ }>>;
155
+ }>;
156
+ output: import("@fuzdev/fuz_schema/schema.ts").Schema<{
157
+ actors: {
158
+ id: import("@fuzdev/fuz_schema/schema.ts").Branded<string, "Uuid">;
159
+ username: string;
160
+ display_name?: string | undefined;
161
+ }[];
162
+ }, {
163
+ actors: {
164
+ id: string;
165
+ username: string;
166
+ display_name?: string | undefined;
167
+ }[];
168
+ }, "object", {
169
+ actors: import("@fuzdev/fuz_schema/schema.ts").Schema<{
170
+ id: import("@fuzdev/fuz_schema/schema.ts").Branded<string, "Uuid">;
171
+ username: string;
172
+ display_name?: string | undefined;
173
+ }[], {
174
+ id: string;
175
+ username: string;
176
+ display_name?: string | undefined;
177
+ }[], "array", import("@fuzdev/fuz_schema/schema.ts").Schema<{
178
+ id: import("@fuzdev/fuz_schema/schema.ts").Branded<string, "Uuid">;
179
+ username: string;
180
+ display_name?: string | undefined;
181
+ }, {
182
+ id: string;
183
+ username: string;
184
+ display_name?: string | undefined;
185
+ }, "object", {
186
+ id: import("@fuzdev/fuz_schema/schema.ts").Schema<import("@fuzdev/fuz_schema/schema.ts").Branded<string, "Uuid">, string, "pipe", readonly (import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"string"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"number"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"bigint"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"boolean"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"object"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"check"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"uuid"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"unknown"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"record"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"array"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"union"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"literal"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"nullable"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"optional"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"transform"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"pipe"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"lazy"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"regex"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"to_lower_case"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"one_of"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"with_default"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"with_default_fn"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"loose_object"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"strip_object"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"object_with_rest"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"variant"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"min_length"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"max_length"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"min_value"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"max_value"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"integer"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"safe_integer"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"iso_datetime">)[]> & {
187
+ readonly '~types'?: {
188
+ readonly input: string;
189
+ readonly first: import("@fuzdev/fuz_schema/schema.ts").Schema<string, string, "string", undefined>;
190
+ } | undefined;
191
+ };
192
+ username: import("@fuzdev/fuz_schema/schema.ts").Schema<string, string, "string", undefined>;
193
+ display_name: import("@fuzdev/fuz_schema/schema.ts").Schema<string | undefined, string | undefined, "optional", import("@fuzdev/fuz_schema/schema.ts").SchemaWrapperDef<import("@fuzdev/fuz_schema/schema.ts").Schema<string, string, "string", undefined>>>;
194
+ }>>;
195
+ }>;
94
196
  async: true;
95
197
  rate_limit: "account";
96
198
  description: string;
@@ -110,16 +212,58 @@ export declare const all_actor_lookup_action_specs: readonly [{
110
212
  actor: "none";
111
213
  };
112
214
  side_effects: false;
113
- input: z.ZodObject<{
114
- ids: z.ZodArray<z.ZodUUID & z.ZodType<import("@fuzdev/fuz_schema/schema.js").Branded<string, "Uuid">, string, z.core.$ZodTypeInternals<import("@fuzdev/fuz_schema/schema.js").Branded<string, "Uuid">, string>>>;
115
- }, z.core.$strict>;
116
- output: z.ZodObject<{
117
- actors: z.ZodArray<z.ZodObject<{
118
- id: z.ZodUUID & z.ZodType<import("@fuzdev/fuz_schema/schema.js").Branded<string, "Uuid">, string, z.core.$ZodTypeInternals<import("@fuzdev/fuz_schema/schema.js").Branded<string, "Uuid">, string>>;
119
- username: z.ZodString;
120
- display_name: z.ZodOptional<z.ZodString>;
121
- }, z.core.$strict>>;
122
- }, z.core.$strict>;
215
+ input: import("@fuzdev/fuz_schema/schema.ts").Schema<{
216
+ ids: import("@fuzdev/fuz_schema/schema.ts").Branded<string, "Uuid">[];
217
+ }, {
218
+ ids: string[];
219
+ }, "object", {
220
+ ids: import("@fuzdev/fuz_schema/schema.ts").PipeSchema<import("@fuzdev/fuz_schema/schema.ts").Branded<string, "Uuid">[], import("@fuzdev/fuz_schema/schema.ts").Schema<import("@fuzdev/fuz_schema/schema.ts").Branded<string, "Uuid">[], string[], "array", import("@fuzdev/fuz_schema/schema.ts").Schema<import("@fuzdev/fuz_schema/schema.ts").Branded<string, "Uuid">, string, "pipe", readonly (import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"string"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"number"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"bigint"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"boolean"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"object"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"check"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"uuid"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"unknown"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"record"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"array"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"union"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"literal"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"nullable"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"optional"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"transform"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"pipe"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"lazy"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"regex"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"to_lower_case"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"one_of"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"with_default"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"with_default_fn"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"loose_object"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"strip_object"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"object_with_rest"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"variant"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"min_length"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"max_length"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"min_value"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"max_value"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"integer"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"safe_integer"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"iso_datetime">)[]> & {
221
+ readonly '~types'?: {
222
+ readonly input: string;
223
+ readonly first: import("@fuzdev/fuz_schema/schema.ts").Schema<string, string, "string", undefined>;
224
+ } | undefined;
225
+ }>>;
226
+ }>;
227
+ output: import("@fuzdev/fuz_schema/schema.ts").Schema<{
228
+ actors: {
229
+ id: import("@fuzdev/fuz_schema/schema.ts").Branded<string, "Uuid">;
230
+ username: string;
231
+ display_name?: string | undefined;
232
+ }[];
233
+ }, {
234
+ actors: {
235
+ id: string;
236
+ username: string;
237
+ display_name?: string | undefined;
238
+ }[];
239
+ }, "object", {
240
+ actors: import("@fuzdev/fuz_schema/schema.ts").Schema<{
241
+ id: import("@fuzdev/fuz_schema/schema.ts").Branded<string, "Uuid">;
242
+ username: string;
243
+ display_name?: string | undefined;
244
+ }[], {
245
+ id: string;
246
+ username: string;
247
+ display_name?: string | undefined;
248
+ }[], "array", import("@fuzdev/fuz_schema/schema.ts").Schema<{
249
+ id: import("@fuzdev/fuz_schema/schema.ts").Branded<string, "Uuid">;
250
+ username: string;
251
+ display_name?: string | undefined;
252
+ }, {
253
+ id: string;
254
+ username: string;
255
+ display_name?: string | undefined;
256
+ }, "object", {
257
+ id: import("@fuzdev/fuz_schema/schema.ts").Schema<import("@fuzdev/fuz_schema/schema.ts").Branded<string, "Uuid">, string, "pipe", readonly (import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"string"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"number"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"bigint"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"boolean"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"object"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"check"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"uuid"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"unknown"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"record"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"array"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"union"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"literal"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"nullable"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"optional"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"transform"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"pipe"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"lazy"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"regex"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"to_lower_case"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"one_of"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"with_default"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"with_default_fn"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"loose_object"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"strip_object"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"object_with_rest"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"variant"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"min_length"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"max_length"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"min_value"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"max_value"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"integer"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"safe_integer"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"iso_datetime">)[]> & {
258
+ readonly '~types'?: {
259
+ readonly input: string;
260
+ readonly first: import("@fuzdev/fuz_schema/schema.ts").Schema<string, string, "string", undefined>;
261
+ } | undefined;
262
+ };
263
+ username: import("@fuzdev/fuz_schema/schema.ts").Schema<string, string, "string", undefined>;
264
+ display_name: import("@fuzdev/fuz_schema/schema.ts").Schema<string | undefined, string | undefined, "optional", import("@fuzdev/fuz_schema/schema.ts").SchemaWrapperDef<import("@fuzdev/fuz_schema/schema.ts").Schema<string, string, "string", undefined>>>;
265
+ }>>;
266
+ }>;
123
267
  async: true;
124
268
  rate_limit: "account";
125
269
  description: string;
@@ -1 +1 @@
1
- {"version":3,"file":"actor_lookup_action_specs.d.ts","sourceRoot":"../src/lib/","sources":["../../src/lib/auth/actor_lookup_action_specs.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgDG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB;;;GAGG;AACH,eAAO,MAAM,oBAAoB,KAAK,CAAC;AAEvC,iEAAiE;AACjE,eAAO,MAAM,oBAAoB;;;;kBAI/B,CAAC;AACH,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAExE,eAAO,MAAM,gBAAgB;;kBAU3B,CAAC;AACH,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAEhE,eAAO,MAAM,iBAAiB;;;;;;kBAE5B,CAAC;AACH,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAElE,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;CAaA,CAAC;AAEtC;;;;;GAKG;AACH,eAAO,MAAM,6BAA6B;;;;;;;;;;;;;;;;;;;;;;EAAsC,CAAC"}
1
+ {"version":3,"file":"actor_lookup_action_specs.d.ts","sourceRoot":"../src/lib/","sources":["../../src/lib/auth/actor_lookup_action_specs.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgDG;AAGH,OAAO,EAQN,KAAK,KAAK,EACV,MAAM,8BAA8B,CAAC;AAMtC;;;GAGG;AACH,eAAO,MAAM,oBAAoB,KAAK,CAAC;AAEvC;;;GAGG;AACH,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;EAI/B,CAAC;AACH,MAAM,MAAM,oBAAoB,GAAG,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAEtE,+DAA+D;AAC/D,eAAO,MAAM,gBAAgB;;;;;;;;;;;EAM3B,CAAC;AACH,MAAM,MAAM,gBAAgB,GAAG,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAE9D,gEAAgE;AAChE,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAE5B,CAAC;AACH,MAAM,MAAM,iBAAiB,GAAG,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAEhE,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAaA,CAAC;AAEtC;;;;;GAKG;AACH,eAAO,MAAM,6BAA6B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAAsC,CAAC"}
@@ -47,30 +47,32 @@
47
47
  *
48
48
  * @module
49
49
  */
50
- import { z } from 'zod';
51
- import { Uuid } from '../primitive_schemas.js';
50
+ import { meta } from '@fuzdev/fuz_schema/meta.ts';
51
+ import { array, max_length, min_length, object, optional, pipe, string } from '@fuzdev/fuz_schema/schema.ts';
52
+ import { Uuid } from '../primitive_schemas_fuz.js';
52
53
  /**
53
54
  * Hard cap on the number of ids resolvable in one call. Bounds the
54
55
  * batched username-enumeration surface.
55
56
  */
56
57
  export const ACTOR_LOOKUP_IDS_MAX = 50;
57
- /** One resolved actor row. `display_name` omitted when blank. */
58
- export const ActorLookupEntryJson = z.strictObject({
58
+ /**
59
+ * One resolved actor row, a `@fuzdev/fuz_schema` schema. `display_name`
60
+ * omitted when blank.
61
+ */
62
+ export const ActorLookupEntryJson = object({
59
63
  id: Uuid,
60
- username: z.string(),
61
- display_name: z.string().optional()
64
+ username: string,
65
+ display_name: optional(string)
62
66
  });
63
- export const ActorLookupInput = z.strictObject({
64
- ids: z
65
- .array(Uuid)
66
- .min(1)
67
- .max(ACTOR_LOOKUP_IDS_MAX)
68
- .meta({
67
+ /** Input for `actor_lookup`, a `@fuzdev/fuz_schema` schema. */
68
+ export const ActorLookupInput = object({
69
+ ids: meta(pipe(array(Uuid), min_length(1), max_length(ACTOR_LOOKUP_IDS_MAX)), {
69
70
  description: `Actor ids to resolve. Capped at ${ACTOR_LOOKUP_IDS_MAX}; unknown ids are silently absent from the response.`
70
71
  })
71
72
  });
72
- export const ActorLookupOutput = z.strictObject({
73
- actors: z.array(ActorLookupEntryJson)
73
+ /** Output for `actor_lookup`, a `@fuzdev/fuz_schema` schema. */
74
+ export const ActorLookupOutput = object({
75
+ actors: array(ActorLookupEntryJson)
74
76
  });
75
77
  export const actor_lookup_action_spec = {
76
78
  method: 'actor_lookup',