@ttt-productions/query-core 0.5.0 → 0.6.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.
@@ -39,7 +39,7 @@ export interface FirestoreDocOptions<T> extends FirestoreBaseOptions {
39
39
  * Options for collection queries.
40
40
  */
41
41
  export interface FirestoreCollectionOptions<T> extends FirestoreBaseOptions {
42
- /** Collection path (e.g., 'users' or 'projects/abc/members') */
42
+ /** Collection path (e.g., 'users' or 'entities/abc/members') */
43
43
  collectionPath: string;
44
44
  /** Firestore query constraints (where, orderBy, etc.) */
45
45
  constraints?: QueryConstraint[];
package/dist/keys.d.ts CHANGED
@@ -37,7 +37,7 @@ export declare const keys: {
37
37
  readonly list: (param?: SerializedKeyPart) => QueryKey;
38
38
  readonly custom: (...parts: SerializedKeyPart[]) => QueryKey;
39
39
  };
40
- readonly projects: {
40
+ readonly entities: {
41
41
  readonly all: QueryKey;
42
42
  readonly detail: (id: string) => QueryKey;
43
43
  readonly list: (param?: SerializedKeyPart) => QueryKey;
package/dist/keys.js CHANGED
@@ -21,11 +21,11 @@ export const keys = {
21
21
  list: (param) => withScope('skills', 'list', param),
22
22
  custom: (...parts) => withScope('skills', ...parts),
23
23
  },
24
- projects: {
25
- all: withScope('projects'),
26
- detail: (id) => withScope('projects', 'detail', id),
27
- list: (param) => withScope('projects', 'list', param),
28
- custom: (...parts) => withScope('projects', ...parts),
24
+ entities: {
25
+ all: withScope('entities'),
26
+ detail: (id) => withScope('entities', 'detail', id),
27
+ list: (param) => withScope('entities', 'list', param),
28
+ custom: (...parts) => withScope('entities', ...parts),
29
29
  },
30
30
  messages: {
31
31
  all: withScope('messages'),
@@ -7,16 +7,16 @@ import type { FirestoreCollectionOptions, WithId } from '../../firestore/types.j
7
7
  * For large collections, use useFirestoreInfinite or useFirestorePaginated.
8
8
  * * @example
9
9
  * ```tsx
10
- * // Fetch all channels in a project
10
+ * // Fetch all channels in an entity
11
11
  * const { data: channels } = useFirestoreCollection<Channel>({
12
- * collectionPath: `projects/${projectId}/channels`,
13
- * queryKey: ['channels', projectId],
12
+ * collectionPath: `entities/${entityId}/channels`,
13
+ * queryKey: ['channels', entityId],
14
14
  * constraints: [orderBy('createdAt', 'asc')],
15
15
  * });
16
16
  * * // With realtime updates
17
17
  * const { data: members } = useFirestoreCollection<Member>({
18
- * collectionPath: `projects/${projectId}/members`,
19
- * queryKey: ['members', projectId],
18
+ * collectionPath: `entities/${entityId}/members`,
19
+ * queryKey: ['members', entityId],
20
20
  * subscribe: true,
21
21
  * });
22
22
  * ```
@@ -9,16 +9,16 @@ import { useFirestoreDb } from './context.js';
9
9
  * For large collections, use useFirestoreInfinite or useFirestorePaginated.
10
10
  * * @example
11
11
  * ```tsx
12
- * // Fetch all channels in a project
12
+ * // Fetch all channels in an entity
13
13
  * const { data: channels } = useFirestoreCollection<Channel>({
14
- * collectionPath: `projects/${projectId}/channels`,
15
- * queryKey: ['channels', projectId],
14
+ * collectionPath: `entities/${entityId}/channels`,
15
+ * queryKey: ['channels', entityId],
16
16
  * constraints: [orderBy('createdAt', 'asc')],
17
17
  * });
18
18
  * * // With realtime updates
19
19
  * const { data: members } = useFirestoreCollection<Member>({
20
- * collectionPath: `projects/${projectId}/members`,
21
- * queryKey: ['members', projectId],
20
+ * collectionPath: `entities/${entityId}/members`,
21
+ * queryKey: ['members', entityId],
22
22
  * subscribe: true,
23
23
  * });
24
24
  * ```
@@ -11,9 +11,9 @@ import type { FirestoreDocOptions, WithId } from '../../firestore/types.js';
11
11
  * queryKey: ['user', userId],
12
12
  * });
13
13
  * * // With realtime updates
14
- * const { data: project } = useFirestoreDoc<Project>({
15
- * docPath: `projects/${projectId}`,
16
- * queryKey: ['project', projectId],
14
+ * const { data: entity } = useFirestoreDoc<Entity>({
15
+ * docPath: `entities/${entityId}`,
16
+ * queryKey: ['entity', entityId],
17
17
  * subscribe: true,
18
18
  * });
19
19
  * * // Conditional fetch
@@ -13,9 +13,9 @@ import { useFirestoreDb } from './context.js';
13
13
  * queryKey: ['user', userId],
14
14
  * });
15
15
  * * // With realtime updates
16
- * const { data: project } = useFirestoreDoc<Project>({
17
- * docPath: `projects/${projectId}`,
18
- * queryKey: ['project', projectId],
16
+ * const { data: entity } = useFirestoreDoc<Entity>({
17
+ * docPath: `entities/${entityId}`,
18
+ * queryKey: ['entity', entityId],
19
19
  * subscribe: true,
20
20
  * });
21
21
  * * // Conditional fetch
@@ -5,7 +5,7 @@ export type BatchFirestoreDocsOptions = {
5
5
  */
6
6
  db: Firestore;
7
7
  /**
8
- * Full collection path (e.g., 'publicUsers', 'projects/public')
8
+ * Full collection path (e.g., 'publicUsers', 'entities/public')
9
9
  */
10
10
  collectionPath: string;
11
11
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ttt-productions/query-core",
3
- "version": "0.5.0",
3
+ "version": "0.6.0",
4
4
  "description": "Shared TanStack Query (React Query) client defaults, query key helpers, and Firestore integration hooks for TTT Productions apps",
5
5
  "repository": {
6
6
  "type": "git",