@kl1/contracts 1.3.60 → 1.3.61

Sign up to get free protection for your applications and to get access to all the features.
package/dist/index.mjs CHANGED
@@ -6901,19 +6901,18 @@ var userContract = initContract27().router(
6901
6901
  pageSize: z82.coerce.number().optional(),
6902
6902
  // Don't add default 10. In some places, we need to fetch all users.
6903
6903
  keyword: z82.string().optional(),
6904
- userIds: z82.array(z82.string()).optional(),
6905
- // userIds: z
6906
- // .union([
6907
- // z.array(z.string()), // If it's an array
6908
- // z.record(z.string()), // If it's an object
6909
- // ])
6910
- // .transform((val) => {
6911
- // if (Array.isArray(val)) {
6912
- // return val; // Leave it as is if it's an array
6913
- // }
6914
- // return Object.values(val); // Convert object to array
6915
- // })
6916
- // .optional(),
6904
+ // userIds: z.array(z.string()).optional(),
6905
+ userIds: z82.union([
6906
+ z82.array(z82.string()),
6907
+ // If it's an array
6908
+ z82.record(z82.string())
6909
+ // If it's an object
6910
+ ]).transform((val) => {
6911
+ if (Array.isArray(val)) {
6912
+ return val;
6913
+ }
6914
+ return Object.values(val);
6915
+ }).optional(),
6917
6916
  withPresenceStatus: z82.string().transform((val) => val === "true").optional()
6918
6917
  }).optional(),
6919
6918
  responses: {