@lpdjs/firestore-repo-service 2.1.9 → 2.1.11

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.
@@ -1,5 +1,5 @@
1
1
  import { z } from 'zod';
2
- import { C as ConfiguredRepository, R as RepositoryConfig, F as FieldPath, n as FieldRole } from './types-B2_0shja.cjs';
2
+ import { C as ConfiguredRepository, R as RepositoryConfig, F as FieldPath, n as FieldRole } from './types-CYVwoOQx.js';
3
3
 
4
4
  /**
5
5
  * Minimal zero-dependency HTTP router for Firebase Functions.
@@ -123,13 +123,19 @@ interface PageOptions {
123
123
  href?: string;
124
124
  }[];
125
125
  flash?: {
126
- type: "success" | "error";
126
+ type: "success" | "error" | "warning";
127
127
  message: string;
128
+ /** Optional call-to-action button rendered next to the message */
129
+ action?: {
130
+ href: string;
131
+ label: string;
132
+ external?: boolean;
133
+ };
128
134
  };
129
135
  basePath?: string;
130
136
  }
131
137
  /** Firestore WHERE operator */
132
- type WhereOp = "==" | "!=" | "<" | "<=" | ">" | ">=" | "array-contains" | "array-contains-any";
138
+ type WhereOp = "==" | "!=" | "<" | "<=" | ">" | ">=" | "in" | "not-in" | "array-contains" | "array-contains-any";
133
139
  /** One active filter — serialized in URL as fv_{field} + fo_{field} */
134
140
  interface FilterState {
135
141
  field: string;
@@ -151,6 +157,14 @@ interface SortState {
151
157
  * Metadata for one relational action column appended to the list table.
152
158
  * Each entry produces a dedicated button column (not a cell replacement).
153
159
  */
160
+ /** Query error state displayed at the top of the list page. */
161
+ interface QueryError {
162
+ /** "index" = missing composite index; "error" = generic query failure */
163
+ type: "index" | "error";
164
+ message: string;
165
+ /** Firebase Console URL to create the missing index (always present for "index" type) */
166
+ indexUrl?: string;
167
+ }
154
168
  interface RelationalFieldMeta {
155
169
  /** Field in this document whose value is used to build the link */
156
170
  key: string;
@@ -540,4 +554,4 @@ declare function createAdminServer<TRepos extends Record<string, ConfiguredRepos
540
554
  httpsOptions?: Record<string, unknown>;
541
555
  };
542
556
 
543
- export { type AdminRepoConfig as A, type BasicAuthConfig as B, type ColumnMeta as C, type FilterState as F, MiniRouter as M, type PageOptions as P, type RelationalFieldMeta as R, type SortState as S, type AdminRepoEntry as a, type AdminServerOptions as b, createAdminServer as c, type Middleware as d, type RepoRegistry as e, type RouteHandler as f };
557
+ export { type AdminRepoConfig as A, type BasicAuthConfig as B, type ColumnMeta as C, type FilterState as F, MiniRouter as M, type PageOptions as P, type QueryError as Q, type RelationalFieldMeta as R, type SortState as S, type AdminRepoEntry as a, type AdminServerOptions as b, createAdminServer as c, type Middleware as d, type RepoRegistry as e, type RouteHandler as f };
@@ -1,5 +1,5 @@
1
1
  import { z } from 'zod';
2
- import { C as ConfiguredRepository, R as RepositoryConfig, F as FieldPath, n as FieldRole } from './types-B2_0shja.js';
2
+ import { C as ConfiguredRepository, R as RepositoryConfig, F as FieldPath, n as FieldRole } from './types-CYVwoOQx.cjs';
3
3
 
4
4
  /**
5
5
  * Minimal zero-dependency HTTP router for Firebase Functions.
@@ -123,13 +123,19 @@ interface PageOptions {
123
123
  href?: string;
124
124
  }[];
125
125
  flash?: {
126
- type: "success" | "error";
126
+ type: "success" | "error" | "warning";
127
127
  message: string;
128
+ /** Optional call-to-action button rendered next to the message */
129
+ action?: {
130
+ href: string;
131
+ label: string;
132
+ external?: boolean;
133
+ };
128
134
  };
129
135
  basePath?: string;
130
136
  }
131
137
  /** Firestore WHERE operator */
132
- type WhereOp = "==" | "!=" | "<" | "<=" | ">" | ">=" | "array-contains" | "array-contains-any";
138
+ type WhereOp = "==" | "!=" | "<" | "<=" | ">" | ">=" | "in" | "not-in" | "array-contains" | "array-contains-any";
133
139
  /** One active filter — serialized in URL as fv_{field} + fo_{field} */
134
140
  interface FilterState {
135
141
  field: string;
@@ -151,6 +157,14 @@ interface SortState {
151
157
  * Metadata for one relational action column appended to the list table.
152
158
  * Each entry produces a dedicated button column (not a cell replacement).
153
159
  */
160
+ /** Query error state displayed at the top of the list page. */
161
+ interface QueryError {
162
+ /** "index" = missing composite index; "error" = generic query failure */
163
+ type: "index" | "error";
164
+ message: string;
165
+ /** Firebase Console URL to create the missing index (always present for "index" type) */
166
+ indexUrl?: string;
167
+ }
154
168
  interface RelationalFieldMeta {
155
169
  /** Field in this document whose value is used to build the link */
156
170
  key: string;
@@ -540,4 +554,4 @@ declare function createAdminServer<TRepos extends Record<string, ConfiguredRepos
540
554
  httpsOptions?: Record<string, unknown>;
541
555
  };
542
556
 
543
- export { type AdminRepoConfig as A, type BasicAuthConfig as B, type ColumnMeta as C, type FilterState as F, MiniRouter as M, type PageOptions as P, type RelationalFieldMeta as R, type SortState as S, type AdminRepoEntry as a, type AdminServerOptions as b, createAdminServer as c, type Middleware as d, type RepoRegistry as e, type RouteHandler as f };
557
+ export { type AdminRepoConfig as A, type BasicAuthConfig as B, type ColumnMeta as C, type FilterState as F, MiniRouter as M, type PageOptions as P, type QueryError as Q, type RelationalFieldMeta as R, type SortState as S, type AdminRepoEntry as a, type AdminServerOptions as b, createAdminServer as c, type Middleware as d, type RepoRegistry as e, type RouteHandler as f };