@krak-stack/auth 0.1.43 → 0.1.45

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
@@ -66,7 +66,15 @@ The extra subpath also exports `ExtraApiClient` for Atom-based browser state.
66
66
 
67
67
  ```tsx
68
68
  import { OrganizationSwitcher, UserButton } from "@krak-stack/auth";
69
-
70
- <OrganizationSwitcher side="bottom" />
69
+ import { DropdownMenuItem } from "@/components/ui/dropdown-menu";
70
+
71
+ <OrganizationSwitcher
72
+ menuActions={
73
+ <DropdownMenuItem render={<a href="/organization" />}>
74
+ Dashboard
75
+ </DropdownMenuItem>
76
+ }
77
+ side="bottom"
78
+ />
71
79
  <UserButton signOutRedirect="/" side="bottom" />
72
80
  ```
@@ -32,6 +32,7 @@ export declare const AdminApiGroup: HttpApiGroup.HttpApiGroup<"admin", HttpApiEn
32
32
  readonly slug: Schema.String;
33
33
  readonly logo: Schema.optional<Schema.NullOr<Schema.String>>;
34
34
  readonly metadata: Schema.optional<Schema.NullOr<Schema.String>>;
35
+ readonly memberCount: Schema.optional<Schema.Number>;
35
36
  readonly createdAt: Schema.Date;
36
37
  }>>, HttpApiEndpoint.Json<typeof HttpApiError.Unauthorized | typeof HttpApiError.Forbidden | typeof HttpApiError.InternalServerError>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"dashboardStats", "GET", "/admin/dashboard-stats", HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.StringTree<Schema.Struct<{
37
38
  readonly days: Schema.optional<Schema.Union<readonly [Schema.Literal<"7">, Schema.Literal<"14">, Schema.Literal<"30">, Schema.Literal<"90">]>>;
@@ -82,6 +83,7 @@ export declare const AdminApiGroup: HttpApiGroup.HttpApiGroup<"admin", HttpApiEn
82
83
  readonly slug: Schema.String;
83
84
  readonly logo: Schema.optional<Schema.NullOr<Schema.String>>;
84
85
  readonly metadata: Schema.optional<Schema.NullOr<Schema.String>>;
86
+ readonly memberCount: Schema.optional<Schema.Number>;
85
87
  readonly createdAt: Schema.Date;
86
88
  }>>, HttpApiEndpoint.Json<typeof HttpApiError.Unauthorized | typeof HttpApiError.Forbidden | typeof HttpApiError.NotFound | typeof HttpApiError.InternalServerError>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"getDomainRecords", "GET", "/admin/domains/:id/records", HttpApiEndpoint.StringTree<Schema.Struct<{
87
89
  readonly id: Schema.NonEmptyString;
@@ -122,6 +124,7 @@ export declare const AdminApiGroup: HttpApiGroup.HttpApiGroup<"admin", HttpApiEn
122
124
  readonly slug: string;
123
125
  readonly logo?: string | null | undefined;
124
126
  readonly metadata?: string | null | undefined;
127
+ readonly memberCount?: number | undefined;
125
128
  readonly createdAt: Date;
126
129
  }>>;
127
130
  readonly meta: Schema.Struct<{
@@ -140,18 +143,19 @@ export declare const AdminApiGroup: HttpApiGroup.HttpApiGroup<"admin", HttpApiEn
140
143
  }>>, Schema.String, never, never>, never, never>>;
141
144
  readonly projectId: Schema.optional<Schema.String>;
142
145
  }>>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<Schema.Struct<{
143
- readonly data: Schema.$Array<Schema.Schema<Schema.Struct.ReadonlySide<{
144
- readonly id: Schema.String;
145
- readonly name: Schema.String;
146
- readonly email: Schema.String;
147
- readonly emailVerified: Schema.Boolean;
148
- readonly image: Schema.NullOr<Schema.String>;
149
- readonly createdAt: Schema.Date;
150
- readonly role: Schema.NullOr<Schema.String>;
151
- readonly banned: Schema.NullOr<Schema.Boolean>;
152
- readonly banReason: Schema.NullOr<Schema.String>;
153
- readonly banExpires: Schema.NullOr<Schema.Date>;
154
- }, "Type">>>;
146
+ readonly data: Schema.$Array<Schema.Schema<{
147
+ readonly id: string;
148
+ readonly name: string;
149
+ readonly email: string;
150
+ readonly emailVerified: boolean;
151
+ readonly image: string | null;
152
+ readonly createdAt: Date;
153
+ readonly lastSignedIn: Date | null;
154
+ readonly role: string | null;
155
+ readonly banned: boolean | null;
156
+ readonly banReason: string | null;
157
+ readonly banExpires: Date | null;
158
+ }>>;
155
159
  readonly meta: Schema.Struct<{
156
160
  readonly page: Schema.Int;
157
161
  readonly pageSize: Schema.Int;
@@ -193,5 +197,6 @@ export declare const AdminApiGroup: HttpApiGroup.HttpApiGroup<"admin", HttpApiEn
193
197
  readonly slug: Schema.String;
194
198
  readonly logo: Schema.optional<Schema.NullOr<Schema.String>>;
195
199
  readonly metadata: Schema.optional<Schema.NullOr<Schema.String>>;
200
+ readonly memberCount: Schema.optional<Schema.Number>;
196
201
  readonly createdAt: Schema.Date;
197
202
  }>>, HttpApiEndpoint.Json<typeof HttpApiError.Unauthorized | typeof HttpApiError.Forbidden | typeof HttpApiError.NotFound | typeof HttpApiError.InternalServerError>, never, never>, false>;
@@ -17,6 +17,7 @@ export declare const AdminUser: Schema.Struct<{
17
17
  readonly emailVerified: Schema.Boolean;
18
18
  readonly image: Schema.NullOr<Schema.String>;
19
19
  readonly createdAt: Schema.Date;
20
+ readonly lastSignedIn: Schema.NullOr<Schema.Date>;
20
21
  readonly role: Schema.NullOr<Schema.String>;
21
22
  readonly banned: Schema.NullOr<Schema.Boolean>;
22
23
  readonly banReason: Schema.NullOr<Schema.String>;
@@ -28,6 +29,7 @@ export declare const AdminOrganization: Schema.Struct<{
28
29
  readonly slug: Schema.String;
29
30
  readonly logo: Schema.optional<Schema.NullOr<Schema.String>>;
30
31
  readonly metadata: Schema.optional<Schema.NullOr<Schema.String>>;
32
+ readonly memberCount: Schema.optional<Schema.Number>;
31
33
  readonly createdAt: Schema.Date;
32
34
  }>;
33
35
  export declare const AdminOrganizationIdParams: Schema.Struct<{
@@ -84,18 +86,19 @@ export declare const DashboardStatsResponse: Schema.Struct<{
84
86
  }>>;
85
87
  }>;
86
88
  export declare const PaginatedAdminUsers: Schema.Struct<{
87
- readonly data: Schema.$Array<Schema.Schema<Schema.Struct.ReadonlySide<{
88
- readonly id: Schema.String;
89
- readonly name: Schema.String;
90
- readonly email: Schema.String;
91
- readonly emailVerified: Schema.Boolean;
92
- readonly image: Schema.NullOr<Schema.String>;
93
- readonly createdAt: Schema.Date;
94
- readonly role: Schema.NullOr<Schema.String>;
95
- readonly banned: Schema.NullOr<Schema.Boolean>;
96
- readonly banReason: Schema.NullOr<Schema.String>;
97
- readonly banExpires: Schema.NullOr<Schema.Date>;
98
- }, "Type">>>;
89
+ readonly data: Schema.$Array<Schema.Schema<{
90
+ readonly id: string;
91
+ readonly name: string;
92
+ readonly email: string;
93
+ readonly emailVerified: boolean;
94
+ readonly image: string | null;
95
+ readonly createdAt: Date;
96
+ readonly lastSignedIn: Date | null;
97
+ readonly role: string | null;
98
+ readonly banned: boolean | null;
99
+ readonly banReason: string | null;
100
+ readonly banExpires: Date | null;
101
+ }>>;
99
102
  readonly meta: Schema.Struct<{
100
103
  readonly page: Schema.Int;
101
104
  readonly pageSize: Schema.Int;
@@ -110,6 +113,7 @@ export declare const PaginatedAdminOrganizations: Schema.Struct<{
110
113
  readonly slug: string;
111
114
  readonly logo?: string | null | undefined;
112
115
  readonly metadata?: string | null | undefined;
116
+ readonly memberCount?: number | undefined;
113
117
  readonly createdAt: Date;
114
118
  }>>;
115
119
  readonly meta: Schema.Struct<{
@@ -17,6 +17,7 @@ export const AdminUser = Schema.Struct({
17
17
  emailVerified: Schema.Boolean,
18
18
  image: Schema.NullOr(Schema.String),
19
19
  createdAt: Schema.Date,
20
+ lastSignedIn: Schema.NullOr(Schema.Date),
20
21
  role: Schema.NullOr(Schema.String),
21
22
  banned: Schema.NullOr(Schema.Boolean),
22
23
  banReason: Schema.NullOr(Schema.String),
@@ -33,6 +34,7 @@ export const AdminUser = Schema.Struct({
33
34
  emailVerified: true,
34
35
  image: null,
35
36
  createdAt: new Date("2026-01-01T00:00:00.000Z"),
37
+ lastSignedIn: new Date("2026-01-02T00:00:00.000Z"),
36
38
  role: "admin",
37
39
  banned: false,
38
40
  banReason: null,
@@ -46,6 +48,7 @@ export const AdminOrganization = Schema.Struct({
46
48
  slug: Schema.String,
47
49
  logo: Schema.optional(Schema.NullOr(Schema.String)),
48
50
  metadata: Schema.optional(Schema.NullOr(Schema.String)),
51
+ memberCount: Schema.optional(Schema.Number),
49
52
  createdAt: Schema.Date,
50
53
  }).annotate({
51
54
  identifier: "AdminOrganization",
@@ -58,6 +61,7 @@ export const AdminOrganization = Schema.Struct({
58
61
  slug: "krakstack",
59
62
  logo: "https://example.com/logo.svg",
60
63
  metadata: '{"tier":"internal"}',
64
+ memberCount: 12,
61
65
  createdAt: new Date("2026-01-01T00:00:00.000Z"),
62
66
  },
63
67
  ],