@develit-services/rbac 0.5.1 → 0.6.0

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.
Files changed (33) hide show
  1. package/dist/database/schema.cjs +1 -1
  2. package/dist/database/schema.d.cts +1 -1
  3. package/dist/database/schema.d.mts +1 -1
  4. package/dist/database/schema.d.ts +1 -1
  5. package/dist/database/schema.mjs +1 -1
  6. package/dist/export/worker.cjs +1 -1
  7. package/dist/export/worker.d.cts +2 -2
  8. package/dist/export/worker.d.mts +2 -2
  9. package/dist/export/worker.d.ts +2 -2
  10. package/dist/export/worker.mjs +2 -2
  11. package/dist/export/wrangler.d.cts +1 -1
  12. package/dist/export/wrangler.d.mts +1 -1
  13. package/dist/export/wrangler.d.ts +1 -1
  14. package/dist/shared/{rbac.BKJdHgo6.d.mts → rbac.4NEkwyHb.d.mts} +3 -3
  15. package/dist/shared/{rbac.Bv-9aL95.d.ts → rbac.B4swuPCq.d.ts} +3 -3
  16. package/dist/shared/{rbac.ClMKyW8J.d.mts → rbac.DUk_qXWk.d.cts} +1 -1
  17. package/dist/shared/{rbac.ClMKyW8J.d.ts → rbac.DUk_qXWk.d.mts} +1 -1
  18. package/dist/shared/{rbac.ClMKyW8J.d.cts → rbac.DUk_qXWk.d.ts} +1 -1
  19. package/dist/shared/{rbac.Dqh3yQbz.d.cts → rbac.DiIYl-FR.d.cts} +3 -3
  20. package/dist/shared/rbac.Dk5HPpHF.d.cts +247 -0
  21. package/dist/shared/rbac.Dk5HPpHF.d.mts +247 -0
  22. package/dist/shared/rbac.Dk5HPpHF.d.ts +247 -0
  23. package/dist/shared/{rbac.D5OV7UPA.mjs → rbac.H1LXb5Lk.mjs} +2 -2
  24. package/dist/shared/{rbac.Cra1T2nC.cjs → rbac.gXUvaSJ2.cjs} +1 -1
  25. package/dist/shared/{rbac.BdBAChkr.mjs → rbac.tv1QQcSW.mjs} +1 -1
  26. package/dist/types.d.cts +3 -3
  27. package/dist/types.d.mts +3 -3
  28. package/dist/types.d.ts +3 -3
  29. package/dist/types.mjs +1 -1
  30. package/package.json +7 -10
  31. package/dist/shared/rbac.CqpxM3E5.d.cts +0 -499
  32. package/dist/shared/rbac.CqpxM3E5.d.mts +0 -499
  33. package/dist/shared/rbac.CqpxM3E5.d.ts +0 -499
@@ -0,0 +1,247 @@
1
+ import * as drizzle_orm_sqlite_core from 'drizzle-orm/sqlite-core';
2
+
3
+ declare const roleScope: drizzle_orm_sqlite_core.SQLiteTableWithColumns<{
4
+ name: "roles_scopes";
5
+ schema: undefined;
6
+ columns: {
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";
29
+ dataType: "string";
30
+ columnType: "SQLiteText";
31
+ data: string;
32
+ driverParam: string;
33
+ notNull: true;
34
+ hasDefault: false;
35
+ isPrimaryKey: false;
36
+ isAutoincrement: false;
37
+ hasRuntimeDefault: false;
38
+ enumValues: [string, ...string[]];
39
+ baseColumn: never;
40
+ identity: undefined;
41
+ generated: undefined;
42
+ }, {}, {
43
+ length: number | undefined;
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
+ }>;
64
+ id: _packages_backend_sdk.IsPrimaryKey<_packages_backend_sdk.NotNull<_packages_backend_sdk.SQLiteTextBuilderInitial<"id", [string, ...string[]], number | undefined>>>;
65
+ createdAt: _packages_backend_sdk.HasDefault<_packages_backend_sdk.SQLiteTimestampBuilderInitial<"created_at">>;
66
+ createdBy: _packages_backend_sdk.SQLiteTextBuilderInitial<"created_by", [string, ...string[]], number | undefined>;
67
+ updatedAt: _packages_backend_sdk.HasDefault<_packages_backend_sdk.HasDefault<_packages_backend_sdk.SQLiteTimestampBuilderInitial<"updated_at">>>;
68
+ updatedBy: _packages_backend_sdk.SQLiteTextBuilderInitial<"updated_by", [string, ...string[]], number | undefined>;
69
+ deletedAt: _packages_backend_sdk.HasDefault<_packages_backend_sdk.SQLiteTimestampBuilderInitial<"deleted_at">>;
70
+ deletedBy: _packages_backend_sdk.SQLiteTextBuilderInitial<"deleted_by", [string, ...string[]], number | undefined>;
71
+ };
72
+ dialect: "sqlite";
73
+ }>;
74
+
75
+ declare const role: drizzle_orm_sqlite_core.SQLiteTableWithColumns<{
76
+ name: "roles";
77
+ schema: undefined;
78
+ columns: {
79
+ name: drizzle_orm_sqlite_core.SQLiteColumn<{
80
+ name: "name";
81
+ tableName: "roles";
82
+ dataType: "string";
83
+ columnType: "SQLiteText";
84
+ data: string;
85
+ driverParam: string;
86
+ notNull: true;
87
+ hasDefault: false;
88
+ isPrimaryKey: false;
89
+ isAutoincrement: false;
90
+ hasRuntimeDefault: false;
91
+ enumValues: [string, ...string[]];
92
+ baseColumn: never;
93
+ identity: undefined;
94
+ generated: undefined;
95
+ }, {}, {
96
+ length: number | undefined;
97
+ }>;
98
+ id: _packages_backend_sdk.IsPrimaryKey<_packages_backend_sdk.NotNull<_packages_backend_sdk.SQLiteTextBuilderInitial<"id", [string, ...string[]], number | undefined>>>;
99
+ createdAt: _packages_backend_sdk.HasDefault<_packages_backend_sdk.SQLiteTimestampBuilderInitial<"created_at">>;
100
+ createdBy: _packages_backend_sdk.SQLiteTextBuilderInitial<"created_by", [string, ...string[]], number | undefined>;
101
+ updatedAt: _packages_backend_sdk.HasDefault<_packages_backend_sdk.HasDefault<_packages_backend_sdk.SQLiteTimestampBuilderInitial<"updated_at">>>;
102
+ updatedBy: _packages_backend_sdk.SQLiteTextBuilderInitial<"updated_by", [string, ...string[]], number | undefined>;
103
+ deletedAt: _packages_backend_sdk.HasDefault<_packages_backend_sdk.SQLiteTimestampBuilderInitial<"deleted_at">>;
104
+ deletedBy: _packages_backend_sdk.SQLiteTextBuilderInitial<"deleted_by", [string, ...string[]], number | undefined>;
105
+ };
106
+ dialect: "sqlite";
107
+ }>;
108
+
109
+ declare const userRole: drizzle_orm_sqlite_core.SQLiteTableWithColumns<{
110
+ name: "user_roles";
111
+ schema: undefined;
112
+ columns: {
113
+ userId: drizzle_orm_sqlite_core.SQLiteColumn<{
114
+ name: "user_id";
115
+ tableName: "user_roles";
116
+ dataType: "string";
117
+ columnType: "SQLiteText";
118
+ data: string;
119
+ driverParam: string;
120
+ notNull: true;
121
+ hasDefault: false;
122
+ isPrimaryKey: false;
123
+ isAutoincrement: false;
124
+ hasRuntimeDefault: false;
125
+ enumValues: [string, ...string[]];
126
+ baseColumn: never;
127
+ identity: undefined;
128
+ generated: undefined;
129
+ }, {}, {
130
+ length: number | undefined;
131
+ }>;
132
+ roleId: drizzle_orm_sqlite_core.SQLiteColumn<{
133
+ name: "role_id";
134
+ tableName: "user_roles";
135
+ dataType: "string";
136
+ columnType: "SQLiteText";
137
+ data: string;
138
+ driverParam: string;
139
+ notNull: true;
140
+ hasDefault: false;
141
+ isPrimaryKey: false;
142
+ isAutoincrement: false;
143
+ hasRuntimeDefault: false;
144
+ enumValues: [string, ...string[]];
145
+ baseColumn: never;
146
+ identity: undefined;
147
+ generated: undefined;
148
+ }, {}, {
149
+ length: number | undefined;
150
+ }>;
151
+ id: _packages_backend_sdk.IsPrimaryKey<_packages_backend_sdk.NotNull<_packages_backend_sdk.SQLiteTextBuilderInitial<"id", [string, ...string[]], number | undefined>>>;
152
+ createdAt: _packages_backend_sdk.HasDefault<_packages_backend_sdk.SQLiteTimestampBuilderInitial<"created_at">>;
153
+ createdBy: _packages_backend_sdk.SQLiteTextBuilderInitial<"created_by", [string, ...string[]], number | undefined>;
154
+ updatedAt: _packages_backend_sdk.HasDefault<_packages_backend_sdk.HasDefault<_packages_backend_sdk.SQLiteTimestampBuilderInitial<"updated_at">>>;
155
+ updatedBy: _packages_backend_sdk.SQLiteTextBuilderInitial<"updated_by", [string, ...string[]], number | undefined>;
156
+ deletedAt: _packages_backend_sdk.HasDefault<_packages_backend_sdk.SQLiteTimestampBuilderInitial<"deleted_at">>;
157
+ deletedBy: _packages_backend_sdk.SQLiteTextBuilderInitial<"deleted_by", [string, ...string[]], number | undefined>;
158
+ };
159
+ dialect: "sqlite";
160
+ }>;
161
+
162
+ declare const userScope: drizzle_orm_sqlite_core.SQLiteTableWithColumns<{
163
+ name: "user_scopes";
164
+ schema: undefined;
165
+ columns: {
166
+ userId: drizzle_orm_sqlite_core.SQLiteColumn<{
167
+ name: "user_id";
168
+ tableName: "user_scopes";
169
+ dataType: "string";
170
+ columnType: "SQLiteText";
171
+ data: string;
172
+ driverParam: string;
173
+ notNull: true;
174
+ hasDefault: false;
175
+ isPrimaryKey: false;
176
+ isAutoincrement: false;
177
+ hasRuntimeDefault: false;
178
+ enumValues: [string, ...string[]];
179
+ baseColumn: never;
180
+ identity: undefined;
181
+ generated: undefined;
182
+ }, {}, {
183
+ length: number | undefined;
184
+ }>;
185
+ scope: drizzle_orm_sqlite_core.SQLiteColumn<{
186
+ name: "scope";
187
+ tableName: "user_scopes";
188
+ dataType: "string";
189
+ columnType: "SQLiteText";
190
+ data: string;
191
+ driverParam: string;
192
+ notNull: true;
193
+ hasDefault: false;
194
+ isPrimaryKey: false;
195
+ isAutoincrement: false;
196
+ hasRuntimeDefault: false;
197
+ enumValues: [string, ...string[]];
198
+ baseColumn: never;
199
+ identity: undefined;
200
+ generated: undefined;
201
+ }, {}, {
202
+ length: number | undefined;
203
+ }>;
204
+ resourceId: drizzle_orm_sqlite_core.SQLiteColumn<{
205
+ name: "resource_id";
206
+ tableName: "user_scopes";
207
+ dataType: "string";
208
+ columnType: "SQLiteText";
209
+ data: string;
210
+ driverParam: string;
211
+ notNull: false;
212
+ hasDefault: false;
213
+ isPrimaryKey: false;
214
+ isAutoincrement: false;
215
+ hasRuntimeDefault: false;
216
+ enumValues: [string, ...string[]];
217
+ baseColumn: never;
218
+ identity: undefined;
219
+ generated: undefined;
220
+ }, {}, {
221
+ length: number | undefined;
222
+ }>;
223
+ id: _packages_backend_sdk.IsPrimaryKey<_packages_backend_sdk.NotNull<_packages_backend_sdk.SQLiteTextBuilderInitial<"id", [string, ...string[]], number | undefined>>>;
224
+ createdAt: _packages_backend_sdk.HasDefault<_packages_backend_sdk.SQLiteTimestampBuilderInitial<"created_at">>;
225
+ createdBy: _packages_backend_sdk.SQLiteTextBuilderInitial<"created_by", [string, ...string[]], number | undefined>;
226
+ updatedAt: _packages_backend_sdk.HasDefault<_packages_backend_sdk.HasDefault<_packages_backend_sdk.SQLiteTimestampBuilderInitial<"updated_at">>>;
227
+ updatedBy: _packages_backend_sdk.SQLiteTextBuilderInitial<"updated_by", [string, ...string[]], number | undefined>;
228
+ deletedAt: _packages_backend_sdk.HasDefault<_packages_backend_sdk.SQLiteTimestampBuilderInitial<"deleted_at">>;
229
+ deletedBy: _packages_backend_sdk.SQLiteTextBuilderInitial<"deleted_by", [string, ...string[]], number | undefined>;
230
+ };
231
+ dialect: "sqlite";
232
+ }>;
233
+
234
+ declare const schema_role: typeof role;
235
+ declare const schema_roleScope: typeof roleScope;
236
+ declare const schema_userRole: typeof userRole;
237
+ declare const schema_userScope: typeof userScope;
238
+ declare namespace schema {
239
+ export {
240
+ schema_role as role,
241
+ schema_roleScope as roleScope,
242
+ schema_userRole as userRole,
243
+ schema_userScope as userScope,
244
+ };
245
+ }
246
+
247
+ export { roleScope as a, userScope as b, role as r, schema as s, userRole as u };
@@ -0,0 +1,247 @@
1
+ import * as drizzle_orm_sqlite_core from 'drizzle-orm/sqlite-core';
2
+
3
+ declare const roleScope: drizzle_orm_sqlite_core.SQLiteTableWithColumns<{
4
+ name: "roles_scopes";
5
+ schema: undefined;
6
+ columns: {
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";
29
+ dataType: "string";
30
+ columnType: "SQLiteText";
31
+ data: string;
32
+ driverParam: string;
33
+ notNull: true;
34
+ hasDefault: false;
35
+ isPrimaryKey: false;
36
+ isAutoincrement: false;
37
+ hasRuntimeDefault: false;
38
+ enumValues: [string, ...string[]];
39
+ baseColumn: never;
40
+ identity: undefined;
41
+ generated: undefined;
42
+ }, {}, {
43
+ length: number | undefined;
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
+ }>;
64
+ id: _packages_backend_sdk.IsPrimaryKey<_packages_backend_sdk.NotNull<_packages_backend_sdk.SQLiteTextBuilderInitial<"id", [string, ...string[]], number | undefined>>>;
65
+ createdAt: _packages_backend_sdk.HasDefault<_packages_backend_sdk.SQLiteTimestampBuilderInitial<"created_at">>;
66
+ createdBy: _packages_backend_sdk.SQLiteTextBuilderInitial<"created_by", [string, ...string[]], number | undefined>;
67
+ updatedAt: _packages_backend_sdk.HasDefault<_packages_backend_sdk.HasDefault<_packages_backend_sdk.SQLiteTimestampBuilderInitial<"updated_at">>>;
68
+ updatedBy: _packages_backend_sdk.SQLiteTextBuilderInitial<"updated_by", [string, ...string[]], number | undefined>;
69
+ deletedAt: _packages_backend_sdk.HasDefault<_packages_backend_sdk.SQLiteTimestampBuilderInitial<"deleted_at">>;
70
+ deletedBy: _packages_backend_sdk.SQLiteTextBuilderInitial<"deleted_by", [string, ...string[]], number | undefined>;
71
+ };
72
+ dialect: "sqlite";
73
+ }>;
74
+
75
+ declare const role: drizzle_orm_sqlite_core.SQLiteTableWithColumns<{
76
+ name: "roles";
77
+ schema: undefined;
78
+ columns: {
79
+ name: drizzle_orm_sqlite_core.SQLiteColumn<{
80
+ name: "name";
81
+ tableName: "roles";
82
+ dataType: "string";
83
+ columnType: "SQLiteText";
84
+ data: string;
85
+ driverParam: string;
86
+ notNull: true;
87
+ hasDefault: false;
88
+ isPrimaryKey: false;
89
+ isAutoincrement: false;
90
+ hasRuntimeDefault: false;
91
+ enumValues: [string, ...string[]];
92
+ baseColumn: never;
93
+ identity: undefined;
94
+ generated: undefined;
95
+ }, {}, {
96
+ length: number | undefined;
97
+ }>;
98
+ id: _packages_backend_sdk.IsPrimaryKey<_packages_backend_sdk.NotNull<_packages_backend_sdk.SQLiteTextBuilderInitial<"id", [string, ...string[]], number | undefined>>>;
99
+ createdAt: _packages_backend_sdk.HasDefault<_packages_backend_sdk.SQLiteTimestampBuilderInitial<"created_at">>;
100
+ createdBy: _packages_backend_sdk.SQLiteTextBuilderInitial<"created_by", [string, ...string[]], number | undefined>;
101
+ updatedAt: _packages_backend_sdk.HasDefault<_packages_backend_sdk.HasDefault<_packages_backend_sdk.SQLiteTimestampBuilderInitial<"updated_at">>>;
102
+ updatedBy: _packages_backend_sdk.SQLiteTextBuilderInitial<"updated_by", [string, ...string[]], number | undefined>;
103
+ deletedAt: _packages_backend_sdk.HasDefault<_packages_backend_sdk.SQLiteTimestampBuilderInitial<"deleted_at">>;
104
+ deletedBy: _packages_backend_sdk.SQLiteTextBuilderInitial<"deleted_by", [string, ...string[]], number | undefined>;
105
+ };
106
+ dialect: "sqlite";
107
+ }>;
108
+
109
+ declare const userRole: drizzle_orm_sqlite_core.SQLiteTableWithColumns<{
110
+ name: "user_roles";
111
+ schema: undefined;
112
+ columns: {
113
+ userId: drizzle_orm_sqlite_core.SQLiteColumn<{
114
+ name: "user_id";
115
+ tableName: "user_roles";
116
+ dataType: "string";
117
+ columnType: "SQLiteText";
118
+ data: string;
119
+ driverParam: string;
120
+ notNull: true;
121
+ hasDefault: false;
122
+ isPrimaryKey: false;
123
+ isAutoincrement: false;
124
+ hasRuntimeDefault: false;
125
+ enumValues: [string, ...string[]];
126
+ baseColumn: never;
127
+ identity: undefined;
128
+ generated: undefined;
129
+ }, {}, {
130
+ length: number | undefined;
131
+ }>;
132
+ roleId: drizzle_orm_sqlite_core.SQLiteColumn<{
133
+ name: "role_id";
134
+ tableName: "user_roles";
135
+ dataType: "string";
136
+ columnType: "SQLiteText";
137
+ data: string;
138
+ driverParam: string;
139
+ notNull: true;
140
+ hasDefault: false;
141
+ isPrimaryKey: false;
142
+ isAutoincrement: false;
143
+ hasRuntimeDefault: false;
144
+ enumValues: [string, ...string[]];
145
+ baseColumn: never;
146
+ identity: undefined;
147
+ generated: undefined;
148
+ }, {}, {
149
+ length: number | undefined;
150
+ }>;
151
+ id: _packages_backend_sdk.IsPrimaryKey<_packages_backend_sdk.NotNull<_packages_backend_sdk.SQLiteTextBuilderInitial<"id", [string, ...string[]], number | undefined>>>;
152
+ createdAt: _packages_backend_sdk.HasDefault<_packages_backend_sdk.SQLiteTimestampBuilderInitial<"created_at">>;
153
+ createdBy: _packages_backend_sdk.SQLiteTextBuilderInitial<"created_by", [string, ...string[]], number | undefined>;
154
+ updatedAt: _packages_backend_sdk.HasDefault<_packages_backend_sdk.HasDefault<_packages_backend_sdk.SQLiteTimestampBuilderInitial<"updated_at">>>;
155
+ updatedBy: _packages_backend_sdk.SQLiteTextBuilderInitial<"updated_by", [string, ...string[]], number | undefined>;
156
+ deletedAt: _packages_backend_sdk.HasDefault<_packages_backend_sdk.SQLiteTimestampBuilderInitial<"deleted_at">>;
157
+ deletedBy: _packages_backend_sdk.SQLiteTextBuilderInitial<"deleted_by", [string, ...string[]], number | undefined>;
158
+ };
159
+ dialect: "sqlite";
160
+ }>;
161
+
162
+ declare const userScope: drizzle_orm_sqlite_core.SQLiteTableWithColumns<{
163
+ name: "user_scopes";
164
+ schema: undefined;
165
+ columns: {
166
+ userId: drizzle_orm_sqlite_core.SQLiteColumn<{
167
+ name: "user_id";
168
+ tableName: "user_scopes";
169
+ dataType: "string";
170
+ columnType: "SQLiteText";
171
+ data: string;
172
+ driverParam: string;
173
+ notNull: true;
174
+ hasDefault: false;
175
+ isPrimaryKey: false;
176
+ isAutoincrement: false;
177
+ hasRuntimeDefault: false;
178
+ enumValues: [string, ...string[]];
179
+ baseColumn: never;
180
+ identity: undefined;
181
+ generated: undefined;
182
+ }, {}, {
183
+ length: number | undefined;
184
+ }>;
185
+ scope: drizzle_orm_sqlite_core.SQLiteColumn<{
186
+ name: "scope";
187
+ tableName: "user_scopes";
188
+ dataType: "string";
189
+ columnType: "SQLiteText";
190
+ data: string;
191
+ driverParam: string;
192
+ notNull: true;
193
+ hasDefault: false;
194
+ isPrimaryKey: false;
195
+ isAutoincrement: false;
196
+ hasRuntimeDefault: false;
197
+ enumValues: [string, ...string[]];
198
+ baseColumn: never;
199
+ identity: undefined;
200
+ generated: undefined;
201
+ }, {}, {
202
+ length: number | undefined;
203
+ }>;
204
+ resourceId: drizzle_orm_sqlite_core.SQLiteColumn<{
205
+ name: "resource_id";
206
+ tableName: "user_scopes";
207
+ dataType: "string";
208
+ columnType: "SQLiteText";
209
+ data: string;
210
+ driverParam: string;
211
+ notNull: false;
212
+ hasDefault: false;
213
+ isPrimaryKey: false;
214
+ isAutoincrement: false;
215
+ hasRuntimeDefault: false;
216
+ enumValues: [string, ...string[]];
217
+ baseColumn: never;
218
+ identity: undefined;
219
+ generated: undefined;
220
+ }, {}, {
221
+ length: number | undefined;
222
+ }>;
223
+ id: _packages_backend_sdk.IsPrimaryKey<_packages_backend_sdk.NotNull<_packages_backend_sdk.SQLiteTextBuilderInitial<"id", [string, ...string[]], number | undefined>>>;
224
+ createdAt: _packages_backend_sdk.HasDefault<_packages_backend_sdk.SQLiteTimestampBuilderInitial<"created_at">>;
225
+ createdBy: _packages_backend_sdk.SQLiteTextBuilderInitial<"created_by", [string, ...string[]], number | undefined>;
226
+ updatedAt: _packages_backend_sdk.HasDefault<_packages_backend_sdk.HasDefault<_packages_backend_sdk.SQLiteTimestampBuilderInitial<"updated_at">>>;
227
+ updatedBy: _packages_backend_sdk.SQLiteTextBuilderInitial<"updated_by", [string, ...string[]], number | undefined>;
228
+ deletedAt: _packages_backend_sdk.HasDefault<_packages_backend_sdk.SQLiteTimestampBuilderInitial<"deleted_at">>;
229
+ deletedBy: _packages_backend_sdk.SQLiteTextBuilderInitial<"deleted_by", [string, ...string[]], number | undefined>;
230
+ };
231
+ dialect: "sqlite";
232
+ }>;
233
+
234
+ declare const schema_role: typeof role;
235
+ declare const schema_roleScope: typeof roleScope;
236
+ declare const schema_userRole: typeof userRole;
237
+ declare const schema_userScope: typeof userScope;
238
+ declare namespace schema {
239
+ export {
240
+ schema_role as role,
241
+ schema_roleScope as roleScope,
242
+ schema_userRole as userRole,
243
+ schema_userScope as userScope,
244
+ };
245
+ }
246
+
247
+ export { roleScope as a, userScope as b, role as r, schema as s, userRole as u };
@@ -31,7 +31,7 @@ const userScope = sqliteTable(
31
31
  scope: text("scope").notNull(),
32
32
  resourceId: text("resource_id")
33
33
  },
34
- (t) => [unique().on(t.userId, t.scope)]
34
+ (t) => [unique().on(t.userId, t.scope, t.resourceId)]
35
35
  );
36
36
 
37
37
  const schema = {
@@ -42,4 +42,4 @@ const schema = {
42
42
  userScope: userScope
43
43
  };
44
44
 
45
- export { role as a, userScope as b, roleScope as r, schema as s, userRole as u };
45
+ export { roleScope as a, userScope as b, role as r, schema as s, userRole as u };
@@ -33,7 +33,7 @@ const userScope = sqliteCore.sqliteTable(
33
33
  scope: sqliteCore.text("scope").notNull(),
34
34
  resourceId: sqliteCore.text("resource_id")
35
35
  },
36
- (t) => [sqliteCore.unique().on(t.userId, t.scope)]
36
+ (t) => [sqliteCore.unique().on(t.userId, t.scope, t.resourceId)]
37
37
  );
38
38
 
39
39
  const schema = {
@@ -184,4 +184,4 @@ const verifyScopeOutputSchema = z.object({
184
184
  isVerified: z.boolean().default(false)
185
185
  });
186
186
 
187
- export { assignRoleToUserInputSchema as a, assignRolesToUserInputSchema as b, createRoleInputSchema as c, deleteRoleInputSchema as d, grantScopeToRoleInputSchema as e, grantScopeToUserInputSchema as f, getUserPermissionsInputSchema as g, grantScopesToUserInputSchema as h, revokeScopeFromRoleInputSchema as i, revokeScopeFromUserInputSchema as j, scopeConditionSchema as k, isScopeObject as l, isOrCondition as m, isAndCondition as n, isImplicitAndCondition as o, verifyScopeInputSchema as p, verifyScopeOutputSchema as q, revokeRoleFromUserInputSchema as r, scopeObjectSchema as s, updateRoleInputSchema as u, verifyAccessInputSchema as v };
187
+ export { assignRoleToUserInputSchema as a, assignRolesToUserInputSchema as b, createRoleInputSchema as c, deleteRoleInputSchema as d, grantScopeToRoleInputSchema as e, grantScopeToUserInputSchema as f, getUserPermissionsInputSchema as g, grantScopesToUserInputSchema as h, isAndCondition as i, isImplicitAndCondition as j, isOrCondition as k, isScopeObject as l, revokeScopeFromRoleInputSchema as m, revokeScopeFromUserInputSchema as n, scopeObjectSchema as o, verifyScopeInputSchema as p, verifyScopeOutputSchema as q, revokeRoleFromUserInputSchema as r, scopeConditionSchema as s, updateRoleInputSchema as u, verifyAccessInputSchema as v };
package/dist/types.d.cts CHANGED
@@ -1,8 +1,8 @@
1
- export { A as AssignRoleToUserInput, b as AssignRoleToUserOutput, c as AssignRolesToUserInput, d as AssignRolesToUserOutput, C as CreateRoleInput, a as CreateRoleOutput, D as DeleteRoleInput, s as DeleteRoleOutput, o as GetPermissionsOutput, p as GetUserPermissionsInput, q as GetUserPermissionsOutput, k as GrantScopeToRoleInput, l as GrantScopeToRoleOutput, G as GrantScopeToUserInput, f as GrantScopeToUserOutput, g as GrantScopesToUserInput, h as GrantScopesToUserOutput, L as LabeledScope, R as RevokeRoleFromUserInput, e as RevokeRoleFromUserOutput, m as RevokeScopeFromRoleInput, n as RevokeScopeFromRoleOutput, i as RevokeScopeFromUserInput, j as RevokeScopeFromUserOutput, y as RoleInsertType, w as RoleScopeInsertType, v as RoleScopeSelectType, x as RoleSelectType, S as Scope, _ as ScopeCondition, Z as ScopeObject, U as UpdateRoleInput, u as UpdateRoleOutput, B as UserRoleInsertType, z as UserRoleSelectType, F as UserScopeInsertType, E as UserScopeSelectType, V as VerifyAccessInput, r as VerifyAccessOutput, H as assignRoleToUserInputSchema, I as assignRolesToUserInputSchema, J as createRoleInputSchema, K as deleteRoleInputSchema, M as getUserPermissionsInputSchema, N as grantScopeToRoleInputSchema, O as grantScopeToUserInputSchema, P as grantScopesToUserInputSchema, a3 as isAndCondition, a4 as isImplicitAndCondition, a2 as isOrCondition, a1 as isScopeObject, Q as revokeRoleFromUserInputSchema, T as revokeScopeFromRoleInputSchema, W as revokeScopeFromUserInputSchema, $ as scopeConditionSchema, Y as scopeObjectSchema, X as updateRoleInputSchema, a0 as verifyAccessInputSchema } from './shared/rbac.Dqh3yQbz.cjs';
1
+ export { A as AssignRoleToUserInput, b as AssignRoleToUserOutput, c as AssignRolesToUserInput, d as AssignRolesToUserOutput, C as CreateRoleInput, a as CreateRoleOutput, D as DeleteRoleInput, s as DeleteRoleOutput, o as GetPermissionsOutput, p as GetUserPermissionsInput, q as GetUserPermissionsOutput, k as GrantScopeToRoleInput, l as GrantScopeToRoleOutput, G as GrantScopeToUserInput, f as GrantScopeToUserOutput, g as GrantScopesToUserInput, h as GrantScopesToUserOutput, L as LabeledScope, R as RevokeRoleFromUserInput, e as RevokeRoleFromUserOutput, m as RevokeScopeFromRoleInput, n as RevokeScopeFromRoleOutput, i as RevokeScopeFromUserInput, j as RevokeScopeFromUserOutput, v as RoleInsertType, w as RoleScopeInsertType, x as RoleScopeSelectType, y as RoleSelectType, S as Scope, z as ScopeCondition, B as ScopeObject, U as UpdateRoleInput, u as UpdateRoleOutput, E as UserRoleInsertType, F as UserRoleSelectType, H as UserScopeInsertType, I as UserScopeSelectType, V as VerifyAccessInput, r as VerifyAccessOutput, J as assignRoleToUserInputSchema, K as assignRolesToUserInputSchema, M as createRoleInputSchema, N as deleteRoleInputSchema, O as getUserPermissionsInputSchema, P as grantScopeToRoleInputSchema, Q as grantScopeToUserInputSchema, T as grantScopesToUserInputSchema, W as isAndCondition, X as isImplicitAndCondition, Y as isOrCondition, Z as isScopeObject, _ as revokeRoleFromUserInputSchema, $ as revokeScopeFromRoleInputSchema, a0 as revokeScopeFromUserInputSchema, a1 as scopeConditionSchema, a2 as scopeObjectSchema, a3 as updateRoleInputSchema, a4 as verifyAccessInputSchema } from './shared/rbac.DiIYl-FR.cjs';
2
2
  import { z } from 'zod';
3
- export { b as RbacServiceEnv, a as RbacServiceEnvironmentConfig, R as RbacServiceWranglerConfig } from './shared/rbac.ClMKyW8J.cjs';
3
+ export { a as RbacServiceEnv, b as RbacServiceEnvironmentConfig, R as RbacServiceWranglerConfig } from './shared/rbac.DUk_qXWk.cjs';
4
4
  import 'drizzle-orm';
5
- import './shared/rbac.CqpxM3E5.cjs';
5
+ import './shared/rbac.Dk5HPpHF.cjs';
6
6
  import 'drizzle-orm/sqlite-core';
7
7
 
8
8
  declare const verifyScopeInputSchema: z.ZodObject<{
package/dist/types.d.mts CHANGED
@@ -1,8 +1,8 @@
1
- export { A as AssignRoleToUserInput, b as AssignRoleToUserOutput, c as AssignRolesToUserInput, d as AssignRolesToUserOutput, C as CreateRoleInput, a as CreateRoleOutput, D as DeleteRoleInput, s as DeleteRoleOutput, o as GetPermissionsOutput, p as GetUserPermissionsInput, q as GetUserPermissionsOutput, k as GrantScopeToRoleInput, l as GrantScopeToRoleOutput, G as GrantScopeToUserInput, f as GrantScopeToUserOutput, g as GrantScopesToUserInput, h as GrantScopesToUserOutput, L as LabeledScope, R as RevokeRoleFromUserInput, e as RevokeRoleFromUserOutput, m as RevokeScopeFromRoleInput, n as RevokeScopeFromRoleOutput, i as RevokeScopeFromUserInput, j as RevokeScopeFromUserOutput, y as RoleInsertType, w as RoleScopeInsertType, v as RoleScopeSelectType, x as RoleSelectType, S as Scope, _ as ScopeCondition, Z as ScopeObject, U as UpdateRoleInput, u as UpdateRoleOutput, B as UserRoleInsertType, z as UserRoleSelectType, F as UserScopeInsertType, E as UserScopeSelectType, V as VerifyAccessInput, r as VerifyAccessOutput, H as assignRoleToUserInputSchema, I as assignRolesToUserInputSchema, J as createRoleInputSchema, K as deleteRoleInputSchema, M as getUserPermissionsInputSchema, N as grantScopeToRoleInputSchema, O as grantScopeToUserInputSchema, P as grantScopesToUserInputSchema, a3 as isAndCondition, a4 as isImplicitAndCondition, a2 as isOrCondition, a1 as isScopeObject, Q as revokeRoleFromUserInputSchema, T as revokeScopeFromRoleInputSchema, W as revokeScopeFromUserInputSchema, $ as scopeConditionSchema, Y as scopeObjectSchema, X as updateRoleInputSchema, a0 as verifyAccessInputSchema } from './shared/rbac.BKJdHgo6.mjs';
1
+ export { A as AssignRoleToUserInput, b as AssignRoleToUserOutput, c as AssignRolesToUserInput, d as AssignRolesToUserOutput, C as CreateRoleInput, a as CreateRoleOutput, D as DeleteRoleInput, s as DeleteRoleOutput, o as GetPermissionsOutput, p as GetUserPermissionsInput, q as GetUserPermissionsOutput, k as GrantScopeToRoleInput, l as GrantScopeToRoleOutput, G as GrantScopeToUserInput, f as GrantScopeToUserOutput, g as GrantScopesToUserInput, h as GrantScopesToUserOutput, L as LabeledScope, R as RevokeRoleFromUserInput, e as RevokeRoleFromUserOutput, m as RevokeScopeFromRoleInput, n as RevokeScopeFromRoleOutput, i as RevokeScopeFromUserInput, j as RevokeScopeFromUserOutput, v as RoleInsertType, w as RoleScopeInsertType, x as RoleScopeSelectType, y as RoleSelectType, S as Scope, z as ScopeCondition, B as ScopeObject, U as UpdateRoleInput, u as UpdateRoleOutput, E as UserRoleInsertType, F as UserRoleSelectType, H as UserScopeInsertType, I as UserScopeSelectType, V as VerifyAccessInput, r as VerifyAccessOutput, J as assignRoleToUserInputSchema, K as assignRolesToUserInputSchema, M as createRoleInputSchema, N as deleteRoleInputSchema, O as getUserPermissionsInputSchema, P as grantScopeToRoleInputSchema, Q as grantScopeToUserInputSchema, T as grantScopesToUserInputSchema, W as isAndCondition, X as isImplicitAndCondition, Y as isOrCondition, Z as isScopeObject, _ as revokeRoleFromUserInputSchema, $ as revokeScopeFromRoleInputSchema, a0 as revokeScopeFromUserInputSchema, a1 as scopeConditionSchema, a2 as scopeObjectSchema, a3 as updateRoleInputSchema, a4 as verifyAccessInputSchema } from './shared/rbac.4NEkwyHb.mjs';
2
2
  import { z } from 'zod';
3
- export { b as RbacServiceEnv, a as RbacServiceEnvironmentConfig, R as RbacServiceWranglerConfig } from './shared/rbac.ClMKyW8J.mjs';
3
+ export { a as RbacServiceEnv, b as RbacServiceEnvironmentConfig, R as RbacServiceWranglerConfig } from './shared/rbac.DUk_qXWk.mjs';
4
4
  import 'drizzle-orm';
5
- import './shared/rbac.CqpxM3E5.mjs';
5
+ import './shared/rbac.Dk5HPpHF.mjs';
6
6
  import 'drizzle-orm/sqlite-core';
7
7
 
8
8
  declare const verifyScopeInputSchema: z.ZodObject<{
package/dist/types.d.ts CHANGED
@@ -1,8 +1,8 @@
1
- export { A as AssignRoleToUserInput, b as AssignRoleToUserOutput, c as AssignRolesToUserInput, d as AssignRolesToUserOutput, C as CreateRoleInput, a as CreateRoleOutput, D as DeleteRoleInput, s as DeleteRoleOutput, o as GetPermissionsOutput, p as GetUserPermissionsInput, q as GetUserPermissionsOutput, k as GrantScopeToRoleInput, l as GrantScopeToRoleOutput, G as GrantScopeToUserInput, f as GrantScopeToUserOutput, g as GrantScopesToUserInput, h as GrantScopesToUserOutput, L as LabeledScope, R as RevokeRoleFromUserInput, e as RevokeRoleFromUserOutput, m as RevokeScopeFromRoleInput, n as RevokeScopeFromRoleOutput, i as RevokeScopeFromUserInput, j as RevokeScopeFromUserOutput, y as RoleInsertType, w as RoleScopeInsertType, v as RoleScopeSelectType, x as RoleSelectType, S as Scope, _ as ScopeCondition, Z as ScopeObject, U as UpdateRoleInput, u as UpdateRoleOutput, B as UserRoleInsertType, z as UserRoleSelectType, F as UserScopeInsertType, E as UserScopeSelectType, V as VerifyAccessInput, r as VerifyAccessOutput, H as assignRoleToUserInputSchema, I as assignRolesToUserInputSchema, J as createRoleInputSchema, K as deleteRoleInputSchema, M as getUserPermissionsInputSchema, N as grantScopeToRoleInputSchema, O as grantScopeToUserInputSchema, P as grantScopesToUserInputSchema, a3 as isAndCondition, a4 as isImplicitAndCondition, a2 as isOrCondition, a1 as isScopeObject, Q as revokeRoleFromUserInputSchema, T as revokeScopeFromRoleInputSchema, W as revokeScopeFromUserInputSchema, $ as scopeConditionSchema, Y as scopeObjectSchema, X as updateRoleInputSchema, a0 as verifyAccessInputSchema } from './shared/rbac.Bv-9aL95.js';
1
+ export { A as AssignRoleToUserInput, b as AssignRoleToUserOutput, c as AssignRolesToUserInput, d as AssignRolesToUserOutput, C as CreateRoleInput, a as CreateRoleOutput, D as DeleteRoleInput, s as DeleteRoleOutput, o as GetPermissionsOutput, p as GetUserPermissionsInput, q as GetUserPermissionsOutput, k as GrantScopeToRoleInput, l as GrantScopeToRoleOutput, G as GrantScopeToUserInput, f as GrantScopeToUserOutput, g as GrantScopesToUserInput, h as GrantScopesToUserOutput, L as LabeledScope, R as RevokeRoleFromUserInput, e as RevokeRoleFromUserOutput, m as RevokeScopeFromRoleInput, n as RevokeScopeFromRoleOutput, i as RevokeScopeFromUserInput, j as RevokeScopeFromUserOutput, v as RoleInsertType, w as RoleScopeInsertType, x as RoleScopeSelectType, y as RoleSelectType, S as Scope, z as ScopeCondition, B as ScopeObject, U as UpdateRoleInput, u as UpdateRoleOutput, E as UserRoleInsertType, F as UserRoleSelectType, H as UserScopeInsertType, I as UserScopeSelectType, V as VerifyAccessInput, r as VerifyAccessOutput, J as assignRoleToUserInputSchema, K as assignRolesToUserInputSchema, M as createRoleInputSchema, N as deleteRoleInputSchema, O as getUserPermissionsInputSchema, P as grantScopeToRoleInputSchema, Q as grantScopeToUserInputSchema, T as grantScopesToUserInputSchema, W as isAndCondition, X as isImplicitAndCondition, Y as isOrCondition, Z as isScopeObject, _ as revokeRoleFromUserInputSchema, $ as revokeScopeFromRoleInputSchema, a0 as revokeScopeFromUserInputSchema, a1 as scopeConditionSchema, a2 as scopeObjectSchema, a3 as updateRoleInputSchema, a4 as verifyAccessInputSchema } from './shared/rbac.B4swuPCq.js';
2
2
  import { z } from 'zod';
3
- export { b as RbacServiceEnv, a as RbacServiceEnvironmentConfig, R as RbacServiceWranglerConfig } from './shared/rbac.ClMKyW8J.js';
3
+ export { a as RbacServiceEnv, b as RbacServiceEnvironmentConfig, R as RbacServiceWranglerConfig } from './shared/rbac.DUk_qXWk.js';
4
4
  import 'drizzle-orm';
5
- import './shared/rbac.CqpxM3E5.js';
5
+ import './shared/rbac.Dk5HPpHF.js';
6
6
  import 'drizzle-orm/sqlite-core';
7
7
 
8
8
  declare const verifyScopeInputSchema: z.ZodObject<{
package/dist/types.mjs CHANGED
@@ -1,2 +1,2 @@
1
- export { a as assignRoleToUserInputSchema, b as assignRolesToUserInputSchema, c as createRoleInputSchema, d as deleteRoleInputSchema, g as getUserPermissionsInputSchema, e as grantScopeToRoleInputSchema, f as grantScopeToUserInputSchema, h as grantScopesToUserInputSchema, n as isAndCondition, o as isImplicitAndCondition, m as isOrCondition, l as isScopeObject, r as revokeRoleFromUserInputSchema, i as revokeScopeFromRoleInputSchema, j as revokeScopeFromUserInputSchema, k as scopeConditionSchema, s as scopeObjectSchema, u as updateRoleInputSchema, v as verifyAccessInputSchema, p as verifyScopeInputSchema, q as verifyScopeOutputSchema } from './shared/rbac.BdBAChkr.mjs';
1
+ export { a as assignRoleToUserInputSchema, b as assignRolesToUserInputSchema, c as createRoleInputSchema, d as deleteRoleInputSchema, g as getUserPermissionsInputSchema, e as grantScopeToRoleInputSchema, f as grantScopeToUserInputSchema, h as grantScopesToUserInputSchema, i as isAndCondition, j as isImplicitAndCondition, k as isOrCondition, l as isScopeObject, r as revokeRoleFromUserInputSchema, m as revokeScopeFromRoleInputSchema, n as revokeScopeFromUserInputSchema, s as scopeConditionSchema, o as scopeObjectSchema, u as updateRoleInputSchema, v as verifyAccessInputSchema, p as verifyScopeInputSchema, q as verifyScopeOutputSchema } from './shared/rbac.tv1QQcSW.mjs';
2
2
  import 'zod';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@develit-services/rbac",
3
- "version": "0.5.1",
3
+ "version": "0.6.0",
4
4
  "author": "Develit.io s.r.o.",
5
5
  "type": "module",
6
6
  "exports": {
@@ -33,9 +33,9 @@
33
33
  "dev": "wrangler dev --port 9237 --persist-to ../../.wrangler/state -c ./wrangler.jsonc -c ../../apps/secrets-store/wrangler.jsonc",
34
34
  "wrangler:generate": "bunx develit wrangler:generate --types",
35
35
  "db:init": "wrangler d1 execute develit-rbac --local --persist-to ../../.wrangler/state --command=\"SELECT 'Creating database...' AS status;\"",
36
- "db:generate": "drizzle-kit generate",
37
- "db:migrate": "drizzle-kit migrate",
38
- "db:explore": "drizzle-kit studio",
36
+ "db:generate": "NODE_OPTIONS='--import tsx' drizzle-kit generate",
37
+ "db:migrate": "NODE_OPTIONS='--import tsx' drizzle-kit migrate",
38
+ "db:explore": "NODE_OPTIONS='--import tsx' drizzle-kit studio",
39
39
  "types": "bash typegen.sh",
40
40
  "lint": "biome check",
41
41
  "lint:fix": "biome check --fix",
@@ -46,11 +46,8 @@
46
46
  "build": "unbuild"
47
47
  },
48
48
  "peerDependencies": {
49
- "@develit-io/backend-sdk": "9.1.6",
50
- "drizzle-kit": "0.31.8",
51
- "drizzle-orm": "0.45.0",
52
- "drizzle-seed": "*",
53
- "wrangler": "4.50.0",
54
- "zod": "4.1.13"
49
+ "@develit-io/backend-sdk": "^9.8.1",
50
+ "drizzle-orm": "^0.45.0",
51
+ "zod": "^4.1.13"
55
52
  }
56
53
  }