@develit-services/rbac 0.0.2 → 0.1.1

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.
@@ -0,0 +1,236 @@
1
+ import { z } from 'zod';
2
+ import { InferSelectModel, InferInsertModel } from 'drizzle-orm';
3
+ import { s as schema } from './rbac.CqpxM3E5.cjs';
4
+
5
+ declare const tables: typeof schema;
6
+
7
+ interface RoleScopeSelectType extends InferSelectModel<typeof tables.roleScope> {
8
+ }
9
+ interface RoleScopeInsertType extends InferInsertModel<typeof tables.roleScope> {
10
+ }
11
+
12
+ interface RoleSelectType extends InferSelectModel<typeof tables.role> {
13
+ }
14
+ interface RoleInsertType extends InferInsertModel<typeof tables.role> {
15
+ }
16
+
17
+ type Scope = string;
18
+ type LabeledScope = {
19
+ label: string;
20
+ value: Scope;
21
+ };
22
+
23
+ interface UserRoleSelectType extends InferSelectModel<typeof tables.userRole> {
24
+ }
25
+ interface UserRoleInsertType extends InferInsertModel<typeof tables.userRole> {
26
+ }
27
+
28
+ interface UserScopeSelectType extends InferSelectModel<typeof tables.userScope> {
29
+ }
30
+ interface UserScopeInsertType extends InferInsertModel<typeof tables.userScope> {
31
+ }
32
+
33
+ declare const assignRoleToUserInputSchema: z.ZodObject<{
34
+ userId: z.ZodUUID;
35
+ roleId: z.ZodUUID;
36
+ }, z.core.$strip>;
37
+ interface AssignRoleToUserInput extends z.infer<typeof assignRoleToUserInputSchema> {
38
+ }
39
+ interface AssignRoleToUserOutput extends UserRoleSelectType {
40
+ }
41
+
42
+ declare const assignRolesToUserInputSchema: z.ZodObject<{
43
+ userId: z.ZodUUID;
44
+ roles: z.ZodArray<z.ZodUUID>;
45
+ }, z.core.$strip>;
46
+ interface AssignRolesToUserInput extends z.infer<typeof assignRolesToUserInputSchema> {
47
+ }
48
+ interface AssignRolesToUserOutput extends UserRoleSelectType {
49
+ }
50
+
51
+ declare const createRoleInputSchema: z.ZodObject<{
52
+ name: z.ZodString;
53
+ }, z.core.$strip>;
54
+ interface CreateRoleInput extends z.infer<typeof createRoleInputSchema> {
55
+ }
56
+ interface CreateRoleOutput extends RoleSelectType {
57
+ }
58
+
59
+ declare const deleteRoleInputSchema: z.ZodObject<{
60
+ id: z.ZodUUID;
61
+ }, z.core.$strip>;
62
+ interface DeleteRoleInput extends z.infer<typeof deleteRoleInputSchema> {
63
+ }
64
+ interface DeleteRoleOutput {
65
+ }
66
+
67
+ interface GetPermissionsOutput {
68
+ roles: {
69
+ id: string;
70
+ name: string;
71
+ numberOfScopes: number;
72
+ numberOfUsers: number;
73
+ }[];
74
+ rolesCount: number;
75
+ scopes: Scope[];
76
+ scopesCount: number;
77
+ roleScopes: {
78
+ roleId: string;
79
+ roleName: string;
80
+ scopes: {
81
+ id: string;
82
+ scope: Scope;
83
+ resourceId: string | null;
84
+ }[];
85
+ }[];
86
+ roleScopesCount: number;
87
+ }
88
+
89
+ declare const getUserPermissionsInputSchema: z.ZodObject<{
90
+ userId: z.ZodUUID;
91
+ }, z.core.$strip>;
92
+ interface GetUserPermissionsInput extends z.infer<typeof getUserPermissionsInputSchema> {
93
+ }
94
+ interface GetUserPermissionsOutput {
95
+ roles: {
96
+ id: string;
97
+ name: string;
98
+ }[];
99
+ rolesCount: number;
100
+ roleScopes: {
101
+ id: string;
102
+ scope: Scope;
103
+ resourceId: string | null;
104
+ }[];
105
+ roleScopesCount: number;
106
+ scopes: {
107
+ id: string;
108
+ scope: Scope;
109
+ resourceId: string | null;
110
+ }[];
111
+ scopesCount: number;
112
+ }
113
+
114
+ declare const grantScopeToRoleInputSchema: z.ZodObject<{
115
+ roleId: z.ZodUUID;
116
+ scope: z.ZodString;
117
+ resourceId: z.ZodOptional<z.ZodString>;
118
+ }, z.core.$strip>;
119
+ interface GrantScopeToRoleInput extends z.infer<typeof grantScopeToRoleInputSchema> {
120
+ }
121
+ interface GrantScopeToRoleOutput extends RoleScopeSelectType {
122
+ }
123
+
124
+ declare const grantScopeToUserInputSchema: z.ZodObject<{
125
+ userId: z.ZodUUID;
126
+ scope: z.ZodString;
127
+ resourceId: z.ZodOptional<z.ZodString>;
128
+ }, z.core.$strip>;
129
+ interface GrantScopeToUserInput extends z.infer<typeof grantScopeToUserInputSchema> {
130
+ }
131
+ interface GrantScopeToUserOutput extends UserScopeSelectType {
132
+ }
133
+
134
+ declare const grantScopesToUserInputSchema: z.ZodObject<{
135
+ userId: z.ZodUUID;
136
+ scopes: z.ZodArray<z.ZodObject<{
137
+ scope: z.ZodString;
138
+ resourceId: z.ZodOptional<z.ZodString>;
139
+ }, z.core.$strip>>;
140
+ }, z.core.$strip>;
141
+ interface GrantScopesToUserInput extends z.infer<typeof grantScopesToUserInputSchema> {
142
+ }
143
+ interface GrantScopesToUserOutput extends UserScopeSelectType {
144
+ }
145
+
146
+ declare const revokeRoleFromUserInputSchema: z.ZodObject<{
147
+ userId: z.ZodUUID;
148
+ roleId: z.ZodUUID;
149
+ }, z.core.$strip>;
150
+ interface RevokeRoleFromUserInput extends z.infer<typeof revokeRoleFromUserInputSchema> {
151
+ }
152
+ interface RevokeRoleFromUserOutput {
153
+ }
154
+
155
+ declare const revokeScopeFromRoleInputSchema: z.ZodObject<{
156
+ roleId: z.ZodUUID;
157
+ scope: z.ZodString;
158
+ resourceId: z.ZodOptional<z.ZodString>;
159
+ }, z.core.$strip>;
160
+ interface RevokeScopeFromRoleInput extends z.infer<typeof revokeScopeFromRoleInputSchema> {
161
+ }
162
+ interface RevokeScopeFromRoleOutput {
163
+ }
164
+
165
+ declare const revokeScopeFromUserInputSchema: z.ZodObject<{
166
+ userId: z.ZodUUID;
167
+ scope: z.ZodString;
168
+ resourceId: z.ZodOptional<z.ZodString>;
169
+ }, z.core.$strip>;
170
+ interface RevokeScopeFromUserInput extends z.infer<typeof revokeScopeFromUserInputSchema> {
171
+ }
172
+ interface RevokeScopeFromUserOutput {
173
+ }
174
+
175
+ declare const updateRoleInputSchema: z.ZodObject<{
176
+ id: z.ZodUUID;
177
+ name: z.ZodString;
178
+ }, z.core.$strip>;
179
+ interface UpdateRoleInput extends z.infer<typeof updateRoleInputSchema> {
180
+ }
181
+ interface UpdateRoleOutput {
182
+ }
183
+
184
+ declare const verifyAccessInputSchema: z.ZodObject<{
185
+ userId: z.ZodUUID;
186
+ accessRequests: z.ZodArray<z.ZodObject<{
187
+ scope: z.ZodString;
188
+ resourceId: z.ZodOptional<z.ZodString>;
189
+ resourcePath: z.ZodOptional<z.ZodString>;
190
+ }, z.core.$strip>>;
191
+ jwt: z.ZodOptional<z.ZodObject<{
192
+ sub: z.ZodString;
193
+ iat: z.ZodNumber;
194
+ exp: z.ZodNumber;
195
+ userData: z.ZodOptional<z.ZodObject<{
196
+ referenceId: z.ZodString;
197
+ email: z.ZodOptional<z.ZodString>;
198
+ role: z.ZodOptional<z.ZodString>;
199
+ }, z.core.$strip>>;
200
+ createdAt: z.ZodOptional<z.ZodNullable<z.ZodCoercedDate<unknown>>>;
201
+ updatedAt: z.ZodOptional<z.ZodNullable<z.ZodCoercedDate<unknown>>>;
202
+ deletedAt: z.ZodOptional<z.ZodNullable<z.ZodCoercedDate<unknown>>>;
203
+ lastSignInAt: z.ZodOptional<z.ZodNullable<z.ZodCoercedDate<unknown>>>;
204
+ emailConfirmedAt: z.ZodOptional<z.ZodNullable<z.ZodCoercedDate<unknown>>>;
205
+ confirmationSentAt: z.ZodOptional<z.ZodNullable<z.ZodCoercedDate<unknown>>>;
206
+ recoverySentAt: z.ZodOptional<z.ZodNullable<z.ZodCoercedDate<unknown>>>;
207
+ emailChangeSentAt: z.ZodOptional<z.ZodNullable<z.ZodCoercedDate<unknown>>>;
208
+ user: z.ZodObject<{
209
+ id: z.ZodUUID;
210
+ role: z.ZodString;
211
+ email: z.ZodEmail;
212
+ rawAppMetaData: z.ZodAny;
213
+ rawUserMetaData: z.ZodAny;
214
+ isSuperAdmin: z.ZodDefault<z.ZodBoolean>;
215
+ isSsoUser: z.ZodDefault<z.ZodBoolean>;
216
+ emailChangeToken: z.ZodOptional<z.ZodNullable<z.ZodString>>;
217
+ isBanned: z.ZodOptional<z.ZodNullable<z.ZodDefault<z.ZodBoolean>>>;
218
+ createdAt: z.ZodOptional<z.ZodNullable<z.ZodCoercedDate<unknown>>>;
219
+ updatedAt: z.ZodOptional<z.ZodNullable<z.ZodCoercedDate<unknown>>>;
220
+ deletedAt: z.ZodOptional<z.ZodNullable<z.ZodCoercedDate<unknown>>>;
221
+ lastSignInAt: z.ZodOptional<z.ZodNullable<z.ZodCoercedDate<unknown>>>;
222
+ emailConfirmedAt: z.ZodOptional<z.ZodNullable<z.ZodCoercedDate<unknown>>>;
223
+ confirmationSentAt: z.ZodOptional<z.ZodNullable<z.ZodCoercedDate<unknown>>>;
224
+ recoverySentAt: z.ZodOptional<z.ZodNullable<z.ZodCoercedDate<unknown>>>;
225
+ emailChangeSentAt: z.ZodOptional<z.ZodNullable<z.ZodCoercedDate<unknown>>>;
226
+ }, z.core.$strip>;
227
+ }, z.core.$strip>>;
228
+ }, z.core.$strip>;
229
+ interface VerifyAccessInput extends z.infer<typeof verifyAccessInputSchema> {
230
+ }
231
+ interface VerifyAccessOutput {
232
+ isVerified: boolean;
233
+ }
234
+
235
+ export { assignRoleToUserInputSchema as H, assignRolesToUserInputSchema as I, createRoleInputSchema as J, deleteRoleInputSchema as K, getUserPermissionsInputSchema as M, grantScopeToRoleInputSchema as N, grantScopeToUserInputSchema as O, grantScopesToUserInputSchema as P, revokeRoleFromUserInputSchema as Q, revokeScopeFromRoleInputSchema as T, revokeScopeFromUserInputSchema as W, updateRoleInputSchema as X, verifyAccessInputSchema as Y, tables as t };
236
+ export type { AssignRoleToUserInput as A, UserRoleInsertType as B, CreateRoleInput as C, DeleteRoleInput as D, UserScopeSelectType as E, UserScopeInsertType as F, GrantScopeToUserInput as G, LabeledScope as L, RevokeRoleFromUserInput as R, Scope as S, UpdateRoleInput as U, VerifyAccessInput as V, CreateRoleOutput as a, AssignRoleToUserOutput as b, AssignRolesToUserInput as c, AssignRolesToUserOutput as d, RevokeRoleFromUserOutput as e, GrantScopeToUserOutput as f, GrantScopesToUserInput as g, GrantScopesToUserOutput as h, RevokeScopeFromUserInput as i, RevokeScopeFromUserOutput as j, GrantScopeToRoleInput as k, GrantScopeToRoleOutput as l, RevokeScopeFromRoleInput as m, RevokeScopeFromRoleOutput as n, GetPermissionsOutput as o, GetUserPermissionsInput as p, GetUserPermissionsOutput as q, VerifyAccessOutput as r, DeleteRoleOutput as s, UpdateRoleOutput as u, RoleScopeSelectType as v, RoleScopeInsertType as w, RoleSelectType as x, RoleInsertType as y, UserRoleSelectType as z };
@@ -1,12 +1,31 @@
1
1
  import * as drizzle_orm_sqlite_core from 'drizzle-orm/sqlite-core';
2
2
 
3
- declare const role: drizzle_orm_sqlite_core.SQLiteTableWithColumns<{
4
- name: "roles";
3
+ declare const roleScope: drizzle_orm_sqlite_core.SQLiteTableWithColumns<{
4
+ name: "roles_scopes";
5
5
  schema: undefined;
6
6
  columns: {
7
- name: drizzle_orm_sqlite_core.SQLiteColumn<{
8
- name: "name";
9
- tableName: "roles";
7
+ roleId: drizzle_orm_sqlite_core.SQLiteColumn<{
8
+ name: "role_id";
9
+ tableName: "roles_scopes";
10
+ dataType: "string";
11
+ columnType: "SQLiteText";
12
+ data: string;
13
+ driverParam: string;
14
+ notNull: true;
15
+ hasDefault: false;
16
+ isPrimaryKey: false;
17
+ isAutoincrement: false;
18
+ hasRuntimeDefault: false;
19
+ enumValues: [string, ...string[]];
20
+ baseColumn: never;
21
+ identity: undefined;
22
+ generated: undefined;
23
+ }, {}, {
24
+ length: number | undefined;
25
+ }>;
26
+ scope: drizzle_orm_sqlite_core.SQLiteColumn<{
27
+ name: "scope";
28
+ tableName: "roles_scopes";
10
29
  dataType: "string";
11
30
  columnType: "SQLiteText";
12
31
  data: string;
@@ -23,9 +42,28 @@ declare const role: drizzle_orm_sqlite_core.SQLiteTableWithColumns<{
23
42
  }, {}, {
24
43
  length: number | undefined;
25
44
  }>;
45
+ resourceId: drizzle_orm_sqlite_core.SQLiteColumn<{
46
+ name: "resource_id";
47
+ tableName: "roles_scopes";
48
+ dataType: "string";
49
+ columnType: "SQLiteText";
50
+ data: string;
51
+ driverParam: string;
52
+ notNull: false;
53
+ hasDefault: false;
54
+ isPrimaryKey: false;
55
+ isAutoincrement: false;
56
+ hasRuntimeDefault: false;
57
+ enumValues: [string, ...string[]];
58
+ baseColumn: never;
59
+ identity: undefined;
60
+ generated: undefined;
61
+ }, {}, {
62
+ length: number | undefined;
63
+ }>;
26
64
  id: drizzle_orm_sqlite_core.SQLiteColumn<{
27
65
  name: "id";
28
- tableName: "roles";
66
+ tableName: "roles_scopes";
29
67
  dataType: "string";
30
68
  columnType: "SQLiteText";
31
69
  data: string;
@@ -44,7 +82,7 @@ declare const role: drizzle_orm_sqlite_core.SQLiteTableWithColumns<{
44
82
  }>;
45
83
  createdAt: drizzle_orm_sqlite_core.SQLiteColumn<{
46
84
  name: "created_at";
47
- tableName: "roles";
85
+ tableName: "roles_scopes";
48
86
  dataType: "date";
49
87
  columnType: "SQLiteTimestamp";
50
88
  data: Date;
@@ -61,7 +99,7 @@ declare const role: drizzle_orm_sqlite_core.SQLiteTableWithColumns<{
61
99
  }, {}, {}>;
62
100
  updatedAt: drizzle_orm_sqlite_core.SQLiteColumn<{
63
101
  name: "updated_at";
64
- tableName: "roles";
102
+ tableName: "roles_scopes";
65
103
  dataType: "date";
66
104
  columnType: "SQLiteTimestamp";
67
105
  data: Date;
@@ -78,7 +116,7 @@ declare const role: drizzle_orm_sqlite_core.SQLiteTableWithColumns<{
78
116
  }, {}, {}>;
79
117
  deletedAt: drizzle_orm_sqlite_core.SQLiteColumn<{
80
118
  name: "deleted_at";
81
- tableName: "roles";
119
+ tableName: "roles_scopes";
82
120
  dataType: "date";
83
121
  columnType: "SQLiteTimestamp";
84
122
  data: Date;
@@ -97,32 +135,13 @@ declare const role: drizzle_orm_sqlite_core.SQLiteTableWithColumns<{
97
135
  dialect: "sqlite";
98
136
  }>;
99
137
 
100
- declare const roleScope: drizzle_orm_sqlite_core.SQLiteTableWithColumns<{
101
- name: "roles_scopes";
138
+ declare const role: drizzle_orm_sqlite_core.SQLiteTableWithColumns<{
139
+ name: "roles";
102
140
  schema: undefined;
103
141
  columns: {
104
- roleId: drizzle_orm_sqlite_core.SQLiteColumn<{
105
- name: "role_id";
106
- tableName: "roles_scopes";
107
- dataType: "string";
108
- columnType: "SQLiteText";
109
- data: string;
110
- driverParam: string;
111
- notNull: true;
112
- hasDefault: false;
113
- isPrimaryKey: false;
114
- isAutoincrement: false;
115
- hasRuntimeDefault: false;
116
- enumValues: [string, ...string[]];
117
- baseColumn: never;
118
- identity: undefined;
119
- generated: undefined;
120
- }, {}, {
121
- length: number | undefined;
122
- }>;
123
- scope: drizzle_orm_sqlite_core.SQLiteColumn<{
124
- name: "scope";
125
- tableName: "roles_scopes";
142
+ name: drizzle_orm_sqlite_core.SQLiteColumn<{
143
+ name: "name";
144
+ tableName: "roles";
126
145
  dataType: "string";
127
146
  columnType: "SQLiteText";
128
147
  data: string;
@@ -139,28 +158,9 @@ declare const roleScope: drizzle_orm_sqlite_core.SQLiteTableWithColumns<{
139
158
  }, {}, {
140
159
  length: number | undefined;
141
160
  }>;
142
- resourceId: drizzle_orm_sqlite_core.SQLiteColumn<{
143
- name: "resource_id";
144
- tableName: "roles_scopes";
145
- dataType: "string";
146
- columnType: "SQLiteText";
147
- data: string;
148
- driverParam: string;
149
- notNull: false;
150
- hasDefault: false;
151
- isPrimaryKey: false;
152
- isAutoincrement: false;
153
- hasRuntimeDefault: false;
154
- enumValues: [string, ...string[]];
155
- baseColumn: never;
156
- identity: undefined;
157
- generated: undefined;
158
- }, {}, {
159
- length: number | undefined;
160
- }>;
161
161
  id: drizzle_orm_sqlite_core.SQLiteColumn<{
162
162
  name: "id";
163
- tableName: "roles_scopes";
163
+ tableName: "roles";
164
164
  dataType: "string";
165
165
  columnType: "SQLiteText";
166
166
  data: string;
@@ -179,7 +179,7 @@ declare const roleScope: drizzle_orm_sqlite_core.SQLiteTableWithColumns<{
179
179
  }>;
180
180
  createdAt: drizzle_orm_sqlite_core.SQLiteColumn<{
181
181
  name: "created_at";
182
- tableName: "roles_scopes";
182
+ tableName: "roles";
183
183
  dataType: "date";
184
184
  columnType: "SQLiteTimestamp";
185
185
  data: Date;
@@ -196,7 +196,7 @@ declare const roleScope: drizzle_orm_sqlite_core.SQLiteTableWithColumns<{
196
196
  }, {}, {}>;
197
197
  updatedAt: drizzle_orm_sqlite_core.SQLiteColumn<{
198
198
  name: "updated_at";
199
- tableName: "roles_scopes";
199
+ tableName: "roles";
200
200
  dataType: "date";
201
201
  columnType: "SQLiteTimestamp";
202
202
  data: Date;
@@ -213,7 +213,7 @@ declare const roleScope: drizzle_orm_sqlite_core.SQLiteTableWithColumns<{
213
213
  }, {}, {}>;
214
214
  deletedAt: drizzle_orm_sqlite_core.SQLiteColumn<{
215
215
  name: "deleted_at";
216
- tableName: "roles_scopes";
216
+ tableName: "roles";
217
217
  dataType: "date";
218
218
  columnType: "SQLiteTimestamp";
219
219
  data: Date;
@@ -496,4 +496,4 @@ declare namespace schema {
496
496
  };
497
497
  }
498
498
 
499
- export { roleScope as a, userScope as b, role as r, schema as s, userRole as u };
499
+ export { role as a, userScope as b, roleScope as r, schema as s, userRole as u };
@@ -1,12 +1,31 @@
1
1
  import * as drizzle_orm_sqlite_core from 'drizzle-orm/sqlite-core';
2
2
 
3
- declare const role: drizzle_orm_sqlite_core.SQLiteTableWithColumns<{
4
- name: "roles";
3
+ declare const roleScope: drizzle_orm_sqlite_core.SQLiteTableWithColumns<{
4
+ name: "roles_scopes";
5
5
  schema: undefined;
6
6
  columns: {
7
- name: drizzle_orm_sqlite_core.SQLiteColumn<{
8
- name: "name";
9
- tableName: "roles";
7
+ roleId: drizzle_orm_sqlite_core.SQLiteColumn<{
8
+ name: "role_id";
9
+ tableName: "roles_scopes";
10
+ dataType: "string";
11
+ columnType: "SQLiteText";
12
+ data: string;
13
+ driverParam: string;
14
+ notNull: true;
15
+ hasDefault: false;
16
+ isPrimaryKey: false;
17
+ isAutoincrement: false;
18
+ hasRuntimeDefault: false;
19
+ enumValues: [string, ...string[]];
20
+ baseColumn: never;
21
+ identity: undefined;
22
+ generated: undefined;
23
+ }, {}, {
24
+ length: number | undefined;
25
+ }>;
26
+ scope: drizzle_orm_sqlite_core.SQLiteColumn<{
27
+ name: "scope";
28
+ tableName: "roles_scopes";
10
29
  dataType: "string";
11
30
  columnType: "SQLiteText";
12
31
  data: string;
@@ -23,9 +42,28 @@ declare const role: drizzle_orm_sqlite_core.SQLiteTableWithColumns<{
23
42
  }, {}, {
24
43
  length: number | undefined;
25
44
  }>;
45
+ resourceId: drizzle_orm_sqlite_core.SQLiteColumn<{
46
+ name: "resource_id";
47
+ tableName: "roles_scopes";
48
+ dataType: "string";
49
+ columnType: "SQLiteText";
50
+ data: string;
51
+ driverParam: string;
52
+ notNull: false;
53
+ hasDefault: false;
54
+ isPrimaryKey: false;
55
+ isAutoincrement: false;
56
+ hasRuntimeDefault: false;
57
+ enumValues: [string, ...string[]];
58
+ baseColumn: never;
59
+ identity: undefined;
60
+ generated: undefined;
61
+ }, {}, {
62
+ length: number | undefined;
63
+ }>;
26
64
  id: drizzle_orm_sqlite_core.SQLiteColumn<{
27
65
  name: "id";
28
- tableName: "roles";
66
+ tableName: "roles_scopes";
29
67
  dataType: "string";
30
68
  columnType: "SQLiteText";
31
69
  data: string;
@@ -44,7 +82,7 @@ declare const role: drizzle_orm_sqlite_core.SQLiteTableWithColumns<{
44
82
  }>;
45
83
  createdAt: drizzle_orm_sqlite_core.SQLiteColumn<{
46
84
  name: "created_at";
47
- tableName: "roles";
85
+ tableName: "roles_scopes";
48
86
  dataType: "date";
49
87
  columnType: "SQLiteTimestamp";
50
88
  data: Date;
@@ -61,7 +99,7 @@ declare const role: drizzle_orm_sqlite_core.SQLiteTableWithColumns<{
61
99
  }, {}, {}>;
62
100
  updatedAt: drizzle_orm_sqlite_core.SQLiteColumn<{
63
101
  name: "updated_at";
64
- tableName: "roles";
102
+ tableName: "roles_scopes";
65
103
  dataType: "date";
66
104
  columnType: "SQLiteTimestamp";
67
105
  data: Date;
@@ -78,7 +116,7 @@ declare const role: drizzle_orm_sqlite_core.SQLiteTableWithColumns<{
78
116
  }, {}, {}>;
79
117
  deletedAt: drizzle_orm_sqlite_core.SQLiteColumn<{
80
118
  name: "deleted_at";
81
- tableName: "roles";
119
+ tableName: "roles_scopes";
82
120
  dataType: "date";
83
121
  columnType: "SQLiteTimestamp";
84
122
  data: Date;
@@ -97,32 +135,13 @@ declare const role: drizzle_orm_sqlite_core.SQLiteTableWithColumns<{
97
135
  dialect: "sqlite";
98
136
  }>;
99
137
 
100
- declare const roleScope: drizzle_orm_sqlite_core.SQLiteTableWithColumns<{
101
- name: "roles_scopes";
138
+ declare const role: drizzle_orm_sqlite_core.SQLiteTableWithColumns<{
139
+ name: "roles";
102
140
  schema: undefined;
103
141
  columns: {
104
- roleId: drizzle_orm_sqlite_core.SQLiteColumn<{
105
- name: "role_id";
106
- tableName: "roles_scopes";
107
- dataType: "string";
108
- columnType: "SQLiteText";
109
- data: string;
110
- driverParam: string;
111
- notNull: true;
112
- hasDefault: false;
113
- isPrimaryKey: false;
114
- isAutoincrement: false;
115
- hasRuntimeDefault: false;
116
- enumValues: [string, ...string[]];
117
- baseColumn: never;
118
- identity: undefined;
119
- generated: undefined;
120
- }, {}, {
121
- length: number | undefined;
122
- }>;
123
- scope: drizzle_orm_sqlite_core.SQLiteColumn<{
124
- name: "scope";
125
- tableName: "roles_scopes";
142
+ name: drizzle_orm_sqlite_core.SQLiteColumn<{
143
+ name: "name";
144
+ tableName: "roles";
126
145
  dataType: "string";
127
146
  columnType: "SQLiteText";
128
147
  data: string;
@@ -139,28 +158,9 @@ declare const roleScope: drizzle_orm_sqlite_core.SQLiteTableWithColumns<{
139
158
  }, {}, {
140
159
  length: number | undefined;
141
160
  }>;
142
- resourceId: drizzle_orm_sqlite_core.SQLiteColumn<{
143
- name: "resource_id";
144
- tableName: "roles_scopes";
145
- dataType: "string";
146
- columnType: "SQLiteText";
147
- data: string;
148
- driverParam: string;
149
- notNull: false;
150
- hasDefault: false;
151
- isPrimaryKey: false;
152
- isAutoincrement: false;
153
- hasRuntimeDefault: false;
154
- enumValues: [string, ...string[]];
155
- baseColumn: never;
156
- identity: undefined;
157
- generated: undefined;
158
- }, {}, {
159
- length: number | undefined;
160
- }>;
161
161
  id: drizzle_orm_sqlite_core.SQLiteColumn<{
162
162
  name: "id";
163
- tableName: "roles_scopes";
163
+ tableName: "roles";
164
164
  dataType: "string";
165
165
  columnType: "SQLiteText";
166
166
  data: string;
@@ -179,7 +179,7 @@ declare const roleScope: drizzle_orm_sqlite_core.SQLiteTableWithColumns<{
179
179
  }>;
180
180
  createdAt: drizzle_orm_sqlite_core.SQLiteColumn<{
181
181
  name: "created_at";
182
- tableName: "roles_scopes";
182
+ tableName: "roles";
183
183
  dataType: "date";
184
184
  columnType: "SQLiteTimestamp";
185
185
  data: Date;
@@ -196,7 +196,7 @@ declare const roleScope: drizzle_orm_sqlite_core.SQLiteTableWithColumns<{
196
196
  }, {}, {}>;
197
197
  updatedAt: drizzle_orm_sqlite_core.SQLiteColumn<{
198
198
  name: "updated_at";
199
- tableName: "roles_scopes";
199
+ tableName: "roles";
200
200
  dataType: "date";
201
201
  columnType: "SQLiteTimestamp";
202
202
  data: Date;
@@ -213,7 +213,7 @@ declare const roleScope: drizzle_orm_sqlite_core.SQLiteTableWithColumns<{
213
213
  }, {}, {}>;
214
214
  deletedAt: drizzle_orm_sqlite_core.SQLiteColumn<{
215
215
  name: "deleted_at";
216
- tableName: "roles_scopes";
216
+ tableName: "roles";
217
217
  dataType: "date";
218
218
  columnType: "SQLiteTimestamp";
219
219
  data: Date;
@@ -496,4 +496,4 @@ declare namespace schema {
496
496
  };
497
497
  }
498
498
 
499
- export { roleScope as a, userScope as b, role as r, schema as s, userRole as u };
499
+ export { role as a, userScope as b, roleScope as r, schema as s, userRole as u };