zitejs 0.9.89 → 0.9.90

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.
package/README.md CHANGED
@@ -11,6 +11,7 @@ const contacts = await zite.contacts.findAll();
11
11
 
12
12
  // Query and update Zite auth users from backend endpoints
13
13
  const { records: users } = await zite.auth.findAllUsers({
14
+ appIds: ['app-1'],
14
15
  filters: { email: 'person@example.com' },
15
16
  });
16
17
  await zite.auth.updateUserProfile(users[0].id, {
@@ -65,7 +65,10 @@ export interface AuthUser {
65
65
  lastName: string | null;
66
66
  image: string | null;
67
67
  }
68
- export type FindAllAuthUsersOptions = Omit<TableFindAllOptions, "fields">;
68
+ export type FindAllAuthUsersOptions = Omit<TableFindAllOptions, "fields"> & {
69
+ /** Restrict results to users belonging to any of these apps. */
70
+ appIds?: string[];
71
+ };
69
72
  export type FindAllAuthUsersResult<T extends AuthUser = AuthUser> = {
70
73
  records: T[];
71
74
  total: number;
@@ -330,8 +330,9 @@ function generateDbTs(schema) {
330
330
  lines.push("// .bulkCreate({ records, matchOn? }) → { success: boolean, records: T[] }");
331
331
  lines.push("//");
332
332
  lines.push("// Zite auth users:");
333
- lines.push("// zite.auth.findAllUsers({ filter?, filters?, sort?, limit?, offset? })");
333
+ lines.push("// zite.auth.findAllUsers({ appIds?, filter?, filters?, sort?, limit?, offset? })");
334
334
  lines.push("// Supports the same filter, sort, and pagination options as table .findAll()");
335
+ lines.push("// appIds restricts results to users belonging to any listed app");
335
336
  lines.push("// zite.auth.updateUserProfile(userId, { firstName?, lastName?, image? })");
336
337
  lines.push("// User email addresses cannot be updated through this API");
337
338
  lines.push("//");
@@ -65,7 +65,10 @@ export interface AuthUser {
65
65
  lastName: string | null;
66
66
  image: string | null;
67
67
  }
68
- export type FindAllAuthUsersOptions = Omit<TableFindAllOptions, "fields">;
68
+ export type FindAllAuthUsersOptions = Omit<TableFindAllOptions, "fields"> & {
69
+ /** Restrict results to users belonging to any of these apps. */
70
+ appIds?: string[];
71
+ };
69
72
  export type FindAllAuthUsersResult<T extends AuthUser = AuthUser> = {
70
73
  records: T[];
71
74
  total: number;
@@ -320,8 +320,9 @@ export function generateDbTs(schema) {
320
320
  lines.push("// .bulkCreate({ records, matchOn? }) → { success: boolean, records: T[] }");
321
321
  lines.push("//");
322
322
  lines.push("// Zite auth users:");
323
- lines.push("// zite.auth.findAllUsers({ filter?, filters?, sort?, limit?, offset? })");
323
+ lines.push("// zite.auth.findAllUsers({ appIds?, filter?, filters?, sort?, limit?, offset? })");
324
324
  lines.push("// Supports the same filter, sort, and pagination options as table .findAll()");
325
+ lines.push("// appIds restricts results to users belonging to any listed app");
325
326
  lines.push("// zite.auth.updateUserProfile(userId, { firstName?, lastName?, image? })");
326
327
  lines.push("// User email addresses cannot be updated through this API");
327
328
  lines.push("//");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zitejs",
3
- "version": "0.9.89",
3
+ "version": "0.9.90",
4
4
  "description": "The Zite framework — build apps on Zite Database",
5
5
  "type": "module",
6
6
  "main": "./dist/cjs/index.js",