@devlider001/washlab-backend 1.0.1 → 1.0.3

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/convex/admin.d.ts CHANGED
@@ -5,6 +5,20 @@ import { Id } from "./_generated/dataModel";
5
5
  * Handles admin operations: branch management, attendant management,
6
6
  * system-wide order viewing, analytics, and customer management.
7
7
  */
8
+ /**
9
+ * Get current admin profile (from authenticated Clerk session)
10
+ */
11
+ export declare const getCurrentUser: import("convex/server").RegisteredQuery<"public", {}, Promise<{
12
+ _id: import("convex/values").GenericId<"admins">;
13
+ _creationTime: number;
14
+ lastLoginAt?: number | undefined;
15
+ email: string;
16
+ name: string;
17
+ clerkUserId: string;
18
+ createdAt: number;
19
+ isDeleted: boolean;
20
+ role: "super_admin" | "admin";
21
+ }>>;
8
22
  /**
9
23
  * Get all branches - Paginated
10
24
  * Supports usePaginatedQuery for infinite scroll
@@ -224,4 +238,15 @@ export declare const assignAttendantToBranch: import("convex/server").Registered
224
238
  branchId: import("convex/values").GenericId<"branches">;
225
239
  attendantId: import("convex/values").GenericId<"attendants">;
226
240
  }, Promise<import("convex/values").GenericId<"attendants">>>;
241
+ /**
242
+ * Create admin account
243
+ * Only super admins can create other admins
244
+ * Note: Clerk user must be created separately, then link clerkUserId
245
+ */
246
+ export declare const createAdmin: import("convex/server").RegisteredMutation<"public", {
247
+ email: string;
248
+ name: string;
249
+ clerkUserId: string;
250
+ role: "super_admin" | "admin";
251
+ }, Promise<import("convex/values").GenericId<"admins">>>;
227
252
  //# sourceMappingURL=admin.d.ts.map
package/convex/clerk.d.ts CHANGED
@@ -21,18 +21,19 @@ export declare const syncUserCreated: import("convex/server").RegisteredMutation
21
21
  export declare const syncUserUpdated: import("convex/server").RegisteredMutation<"internal", {
22
22
  phoneNumber?: string | undefined;
23
23
  email?: string | undefined;
24
+ userType?: "admin" | "customer" | "attendant" | undefined;
24
25
  name: string;
25
26
  clerkUserId: string;
26
27
  emailVerified: boolean;
27
28
  }, Promise<{
28
29
  type: string;
29
- id: import("convex/values").GenericId<"users">;
30
+ id: import("convex/values").GenericId<"admins">;
30
31
  } | {
31
32
  type: string;
32
- id: import("convex/values").GenericId<"attendants">;
33
+ id: import("convex/values").GenericId<"users">;
33
34
  } | {
34
35
  type: string;
35
- id: import("convex/values").GenericId<"admins">;
36
+ id: import("convex/values").GenericId<"attendants">;
36
37
  } | null>>;
37
38
  /**
38
39
  * Sync user deleted event from Clerk
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@devlider001/washlab-backend",
3
- "version": "1.0.1",
3
+ "version": "1.0.3",
4
4
  "description": "Washlab backend - Convex API package for Lider Technology Ltd",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",