@develit-services/rbac 0.6.0 → 0.6.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.
- package/dist/database/schema.d.cts +1 -1
- package/dist/database/schema.d.mts +1 -1
- package/dist/database/schema.d.ts +1 -1
- package/dist/export/worker.cjs +1 -1
- package/dist/export/worker.d.cts +2 -2
- package/dist/export/worker.d.mts +2 -2
- package/dist/export/worker.d.ts +2 -2
- package/dist/export/worker.mjs +1 -1
- package/dist/shared/{rbac.tv1QQcSW.mjs → rbac.BypNeIm_.mjs} +1 -4
- package/dist/shared/{rbac.DH2MYF0T.cjs → rbac.CZCpmLF8.cjs} +1 -4
- package/dist/shared/rbac.D5N_wrRb.d.cts +727 -0
- package/dist/shared/rbac.D5N_wrRb.d.mts +727 -0
- package/dist/shared/rbac.D5N_wrRb.d.ts +727 -0
- package/dist/shared/{rbac.B4swuPCq.d.ts → rbac.Pu6JbQGr.d.cts} +1 -3
- package/dist/shared/{rbac.4NEkwyHb.d.mts → rbac.pzUpSmwr.d.mts} +1 -3
- package/dist/shared/{rbac.DiIYl-FR.d.cts → rbac.zvG5RbZL.d.ts} +1 -3
- package/dist/types.cjs +1 -1
- package/dist/types.d.cts +2 -2
- package/dist/types.d.mts +2 -2
- package/dist/types.d.ts +2 -2
- package/dist/types.mjs +1 -1
- package/package.json +1 -1
- package/dist/shared/rbac.Dk5HPpHF.d.cts +0 -247
- package/dist/shared/rbac.Dk5HPpHF.d.mts +0 -247
- package/dist/shared/rbac.Dk5HPpHF.d.ts +0 -247
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { r as role, a as roleScope, u as userRole, b as userScope } from '../shared/rbac.
|
|
1
|
+
export { r as role, a as roleScope, u as userRole, b as userScope } from '../shared/rbac.D5N_wrRb.cjs';
|
|
2
2
|
import 'drizzle-orm/sqlite-core';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { r as role, a as roleScope, u as userRole, b as userScope } from '../shared/rbac.
|
|
1
|
+
export { r as role, a as roleScope, u as userRole, b as userScope } from '../shared/rbac.D5N_wrRb.mjs';
|
|
2
2
|
import 'drizzle-orm/sqlite-core';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { r as role, a as roleScope, u as userRole, b as userScope } from '../shared/rbac.
|
|
1
|
+
export { r as role, a as roleScope, u as userRole, b as userScope } from '../shared/rbac.D5N_wrRb.js';
|
|
2
2
|
import 'drizzle-orm/sqlite-core';
|
package/dist/export/worker.cjs
CHANGED
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
const backendSdk = require('@develit-io/backend-sdk');
|
|
6
6
|
const database_schema = require('../shared/rbac.gXUvaSJ2.cjs');
|
|
7
7
|
const drizzleOrm = require('drizzle-orm');
|
|
8
|
-
const verifyScope = require('../shared/rbac.
|
|
8
|
+
const verifyScope = require('../shared/rbac.CZCpmLF8.cjs');
|
|
9
9
|
const zod = require('zod');
|
|
10
10
|
const cloudflare_workers = require('cloudflare:workers');
|
|
11
11
|
const d1 = require('drizzle-orm/d1');
|
package/dist/export/worker.d.cts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import * as _develit_io_backend_sdk from '@develit-io/backend-sdk';
|
|
2
2
|
import { IRPCResponse } from '@develit-io/backend-sdk';
|
|
3
|
-
import { L as LabeledScope$1, t as tables, C as CreateRoleInput, a as CreateRoleOutput, A as AssignRoleToUserInput, b as AssignRoleToUserOutput, c as AssignRolesToUserInput, d as AssignRolesToUserOutput, R as RevokeRoleFromUserInput, e as RevokeRoleFromUserOutput, G as GrantScopeToUserInput, f as GrantScopeToUserOutput, g as GrantScopesToUserInput, h as GrantScopesToUserOutput, i as RevokeScopeFromUserInput, j as RevokeScopeFromUserOutput, k as GrantScopeToRoleInput, l as GrantScopeToRoleOutput, m as RevokeScopeFromRoleInput, n as RevokeScopeFromRoleOutput, o as GetPermissionsOutput, p as GetUserPermissionsInput, q as GetUserPermissionsOutput, V as VerifyAccessInput, r as VerifyAccessOutput, D as DeleteRoleInput, s as DeleteRoleOutput, U as UpdateRoleInput, u as UpdateRoleOutput } from '../shared/rbac.
|
|
3
|
+
import { L as LabeledScope$1, t as tables, C as CreateRoleInput, a as CreateRoleOutput, A as AssignRoleToUserInput, b as AssignRoleToUserOutput, c as AssignRolesToUserInput, d as AssignRolesToUserOutput, R as RevokeRoleFromUserInput, e as RevokeRoleFromUserOutput, G as GrantScopeToUserInput, f as GrantScopeToUserOutput, g as GrantScopesToUserInput, h as GrantScopesToUserOutput, i as RevokeScopeFromUserInput, j as RevokeScopeFromUserOutput, k as GrantScopeToRoleInput, l as GrantScopeToRoleOutput, m as RevokeScopeFromRoleInput, n as RevokeScopeFromRoleOutput, o as GetPermissionsOutput, p as GetUserPermissionsInput, q as GetUserPermissionsOutput, V as VerifyAccessInput, r as VerifyAccessOutput, D as DeleteRoleInput, s as DeleteRoleOutput, U as UpdateRoleInput, u as UpdateRoleOutput } from '../shared/rbac.Pu6JbQGr.cjs';
|
|
4
4
|
import { WorkerEntrypoint } from 'cloudflare:workers';
|
|
5
5
|
import { DrizzleD1Database } from 'drizzle-orm/d1';
|
|
6
6
|
import 'zod';
|
|
7
7
|
import 'drizzle-orm';
|
|
8
|
-
import '../shared/rbac.
|
|
8
|
+
import '../shared/rbac.D5N_wrRb.cjs';
|
|
9
9
|
import 'drizzle-orm/sqlite-core';
|
|
10
10
|
|
|
11
11
|
type TypedScopeObject<TScopes extends readonly LabeledScope$1[]> = {
|
package/dist/export/worker.d.mts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import * as _develit_io_backend_sdk from '@develit-io/backend-sdk';
|
|
2
2
|
import { IRPCResponse } from '@develit-io/backend-sdk';
|
|
3
|
-
import { L as LabeledScope$1, t as tables, C as CreateRoleInput, a as CreateRoleOutput, A as AssignRoleToUserInput, b as AssignRoleToUserOutput, c as AssignRolesToUserInput, d as AssignRolesToUserOutput, R as RevokeRoleFromUserInput, e as RevokeRoleFromUserOutput, G as GrantScopeToUserInput, f as GrantScopeToUserOutput, g as GrantScopesToUserInput, h as GrantScopesToUserOutput, i as RevokeScopeFromUserInput, j as RevokeScopeFromUserOutput, k as GrantScopeToRoleInput, l as GrantScopeToRoleOutput, m as RevokeScopeFromRoleInput, n as RevokeScopeFromRoleOutput, o as GetPermissionsOutput, p as GetUserPermissionsInput, q as GetUserPermissionsOutput, V as VerifyAccessInput, r as VerifyAccessOutput, D as DeleteRoleInput, s as DeleteRoleOutput, U as UpdateRoleInput, u as UpdateRoleOutput } from '../shared/rbac.
|
|
3
|
+
import { L as LabeledScope$1, t as tables, C as CreateRoleInput, a as CreateRoleOutput, A as AssignRoleToUserInput, b as AssignRoleToUserOutput, c as AssignRolesToUserInput, d as AssignRolesToUserOutput, R as RevokeRoleFromUserInput, e as RevokeRoleFromUserOutput, G as GrantScopeToUserInput, f as GrantScopeToUserOutput, g as GrantScopesToUserInput, h as GrantScopesToUserOutput, i as RevokeScopeFromUserInput, j as RevokeScopeFromUserOutput, k as GrantScopeToRoleInput, l as GrantScopeToRoleOutput, m as RevokeScopeFromRoleInput, n as RevokeScopeFromRoleOutput, o as GetPermissionsOutput, p as GetUserPermissionsInput, q as GetUserPermissionsOutput, V as VerifyAccessInput, r as VerifyAccessOutput, D as DeleteRoleInput, s as DeleteRoleOutput, U as UpdateRoleInput, u as UpdateRoleOutput } from '../shared/rbac.pzUpSmwr.mjs';
|
|
4
4
|
import { WorkerEntrypoint } from 'cloudflare:workers';
|
|
5
5
|
import { DrizzleD1Database } from 'drizzle-orm/d1';
|
|
6
6
|
import 'zod';
|
|
7
7
|
import 'drizzle-orm';
|
|
8
|
-
import '../shared/rbac.
|
|
8
|
+
import '../shared/rbac.D5N_wrRb.mjs';
|
|
9
9
|
import 'drizzle-orm/sqlite-core';
|
|
10
10
|
|
|
11
11
|
type TypedScopeObject<TScopes extends readonly LabeledScope$1[]> = {
|
package/dist/export/worker.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import * as _develit_io_backend_sdk from '@develit-io/backend-sdk';
|
|
2
2
|
import { IRPCResponse } from '@develit-io/backend-sdk';
|
|
3
|
-
import { L as LabeledScope$1, t as tables, C as CreateRoleInput, a as CreateRoleOutput, A as AssignRoleToUserInput, b as AssignRoleToUserOutput, c as AssignRolesToUserInput, d as AssignRolesToUserOutput, R as RevokeRoleFromUserInput, e as RevokeRoleFromUserOutput, G as GrantScopeToUserInput, f as GrantScopeToUserOutput, g as GrantScopesToUserInput, h as GrantScopesToUserOutput, i as RevokeScopeFromUserInput, j as RevokeScopeFromUserOutput, k as GrantScopeToRoleInput, l as GrantScopeToRoleOutput, m as RevokeScopeFromRoleInput, n as RevokeScopeFromRoleOutput, o as GetPermissionsOutput, p as GetUserPermissionsInput, q as GetUserPermissionsOutput, V as VerifyAccessInput, r as VerifyAccessOutput, D as DeleteRoleInput, s as DeleteRoleOutput, U as UpdateRoleInput, u as UpdateRoleOutput } from '../shared/rbac.
|
|
3
|
+
import { L as LabeledScope$1, t as tables, C as CreateRoleInput, a as CreateRoleOutput, A as AssignRoleToUserInput, b as AssignRoleToUserOutput, c as AssignRolesToUserInput, d as AssignRolesToUserOutput, R as RevokeRoleFromUserInput, e as RevokeRoleFromUserOutput, G as GrantScopeToUserInput, f as GrantScopeToUserOutput, g as GrantScopesToUserInput, h as GrantScopesToUserOutput, i as RevokeScopeFromUserInput, j as RevokeScopeFromUserOutput, k as GrantScopeToRoleInput, l as GrantScopeToRoleOutput, m as RevokeScopeFromRoleInput, n as RevokeScopeFromRoleOutput, o as GetPermissionsOutput, p as GetUserPermissionsInput, q as GetUserPermissionsOutput, V as VerifyAccessInput, r as VerifyAccessOutput, D as DeleteRoleInput, s as DeleteRoleOutput, U as UpdateRoleInput, u as UpdateRoleOutput } from '../shared/rbac.zvG5RbZL.js';
|
|
4
4
|
import { WorkerEntrypoint } from 'cloudflare:workers';
|
|
5
5
|
import { DrizzleD1Database } from 'drizzle-orm/d1';
|
|
6
6
|
import 'zod';
|
|
7
7
|
import 'drizzle-orm';
|
|
8
|
-
import '../shared/rbac.
|
|
8
|
+
import '../shared/rbac.D5N_wrRb.js';
|
|
9
9
|
import 'drizzle-orm/sqlite-core';
|
|
10
10
|
|
|
11
11
|
type TypedScopeObject<TScopes extends readonly LabeledScope$1[]> = {
|
package/dist/export/worker.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { uuidv4, first, createInternalError, develitWorker, action, service } from '@develit-io/backend-sdk';
|
|
2
2
|
import { s as schema } from '../shared/rbac.H1LXb5Lk.mjs';
|
|
3
3
|
import { eq, and, count, inArray } from 'drizzle-orm';
|
|
4
|
-
import { c as createRoleInputSchema, a as assignRoleToUserInputSchema, b as assignRolesToUserInputSchema, r as revokeRoleFromUserInputSchema, f as grantScopeToUserInputSchema, h as grantScopesToUserInputSchema, n as revokeScopeFromUserInputSchema, e as grantScopeToRoleInputSchema, m as revokeScopeFromRoleInputSchema, g as getUserPermissionsInputSchema, v as verifyAccessInputSchema, d as deleteRoleInputSchema, u as updateRoleInputSchema, l as isScopeObject, k as isOrCondition, i as isAndCondition, j as isImplicitAndCondition } from '../shared/rbac.
|
|
4
|
+
import { c as createRoleInputSchema, a as assignRoleToUserInputSchema, b as assignRolesToUserInputSchema, r as revokeRoleFromUserInputSchema, f as grantScopeToUserInputSchema, h as grantScopesToUserInputSchema, n as revokeScopeFromUserInputSchema, e as grantScopeToRoleInputSchema, m as revokeScopeFromRoleInputSchema, g as getUserPermissionsInputSchema, v as verifyAccessInputSchema, d as deleteRoleInputSchema, u as updateRoleInputSchema, l as isScopeObject, k as isOrCondition, i as isAndCondition, j as isImplicitAndCondition } from '../shared/rbac.BypNeIm_.mjs';
|
|
5
5
|
import { z } from 'zod';
|
|
6
6
|
import { WorkerEntrypoint } from 'cloudflare:workers';
|
|
7
7
|
import { drizzle } from 'drizzle-orm/d1';
|
|
@@ -72,8 +72,7 @@ const updateRoleInputSchema = z.object({
|
|
|
72
72
|
|
|
73
73
|
const userDataSchema = z.object({
|
|
74
74
|
referenceId: z.string(),
|
|
75
|
-
email: z.string().optional()
|
|
76
|
-
role: z.string().optional()
|
|
75
|
+
email: z.string().optional()
|
|
77
76
|
});
|
|
78
77
|
const jwtUserSchema = z.object({
|
|
79
78
|
id: z.uuid(),
|
|
@@ -83,7 +82,6 @@ const jwtUserSchema = z.object({
|
|
|
83
82
|
updatedBy: z.string().nullable().optional(),
|
|
84
83
|
deletedAt: z.date().nullable(),
|
|
85
84
|
deletedBy: z.string().nullable().optional(),
|
|
86
|
-
role: z.string(),
|
|
87
85
|
email: z.email(),
|
|
88
86
|
rawAppMetaData: z.any(),
|
|
89
87
|
rawUserMetaData: z.any(),
|
|
@@ -107,7 +105,6 @@ const jwtPayloadSchema = z.object({
|
|
|
107
105
|
updatedBy: z.string().nullable().optional(),
|
|
108
106
|
deletedAt: z.date().nullable(),
|
|
109
107
|
deletedBy: z.string().nullable().optional(),
|
|
110
|
-
role: z.string(),
|
|
111
108
|
email: z.email(),
|
|
112
109
|
rawAppMetaData: z.any(),
|
|
113
110
|
rawUserMetaData: z.any(),
|
|
@@ -74,8 +74,7 @@ const updateRoleInputSchema = zod.z.object({
|
|
|
74
74
|
|
|
75
75
|
const userDataSchema = zod.z.object({
|
|
76
76
|
referenceId: zod.z.string(),
|
|
77
|
-
email: zod.z.string().optional()
|
|
78
|
-
role: zod.z.string().optional()
|
|
77
|
+
email: zod.z.string().optional()
|
|
79
78
|
});
|
|
80
79
|
const jwtUserSchema = zod.z.object({
|
|
81
80
|
id: zod.z.uuid(),
|
|
@@ -85,7 +84,6 @@ const jwtUserSchema = zod.z.object({
|
|
|
85
84
|
updatedBy: zod.z.string().nullable().optional(),
|
|
86
85
|
deletedAt: zod.z.date().nullable(),
|
|
87
86
|
deletedBy: zod.z.string().nullable().optional(),
|
|
88
|
-
role: zod.z.string(),
|
|
89
87
|
email: zod.z.email(),
|
|
90
88
|
rawAppMetaData: zod.z.any(),
|
|
91
89
|
rawUserMetaData: zod.z.any(),
|
|
@@ -109,7 +107,6 @@ const jwtPayloadSchema = zod.z.object({
|
|
|
109
107
|
updatedBy: zod.z.string().nullable().optional(),
|
|
110
108
|
deletedAt: zod.z.date().nullable(),
|
|
111
109
|
deletedBy: zod.z.string().nullable().optional(),
|
|
112
|
-
role: zod.z.string(),
|
|
113
110
|
email: zod.z.email(),
|
|
114
111
|
rawAppMetaData: zod.z.any(),
|
|
115
112
|
rawUserMetaData: zod.z.any(),
|