@classytic/arc 2.3.0 → 2.4.2

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 (175) hide show
  1. package/README.md +187 -18
  2. package/bin/arc.js +11 -3
  3. package/dist/BaseController-CkM5dUh_.mjs +1031 -0
  4. package/dist/{EventTransport-BkUDYZEb.d.mts → EventTransport-wc5hSLik.d.mts} +1 -1
  5. package/dist/{HookSystem-BsGV-j2l.mjs → HookSystem-COkyWztM.mjs} +2 -3
  6. package/dist/{ResourceRegistry-7Ic20ZMw.mjs → ResourceRegistry-DeCIFlix.mjs} +8 -5
  7. package/dist/adapters/index.d.mts +3 -5
  8. package/dist/adapters/index.mjs +2 -3
  9. package/dist/{prisma-DJbMt3yf.mjs → adapters-DTC4Ug66.mjs} +45 -12
  10. package/dist/audit/index.d.mts +4 -7
  11. package/dist/audit/index.mjs +2 -29
  12. package/dist/audit/mongodb.d.mts +1 -4
  13. package/dist/audit/mongodb.mjs +2 -3
  14. package/dist/auth/index.d.mts +7 -9
  15. package/dist/auth/index.mjs +65 -63
  16. package/dist/auth/redis-session.d.mts +1 -1
  17. package/dist/auth/redis-session.mjs +1 -2
  18. package/dist/{betterAuthOpenApi-DjWDddNc.mjs → betterAuthOpenApi-lz0IRbXJ.mjs} +4 -6
  19. package/dist/cache/index.d.mts +23 -23
  20. package/dist/cache/index.mjs +4 -6
  21. package/dist/{caching-GSDJcA6-.mjs → caching-BSXB-Xr7.mjs} +2 -24
  22. package/dist/chunk-BpYLSNr0.mjs +14 -0
  23. package/dist/circuitBreaker-BOBOpN2w.mjs +284 -0
  24. package/dist/circuitBreaker-JP2GdJ4b.d.mts +206 -0
  25. package/dist/cli/commands/describe.mjs +24 -7
  26. package/dist/cli/commands/docs.mjs +6 -7
  27. package/dist/cli/commands/doctor.d.mts +10 -0
  28. package/dist/cli/commands/doctor.mjs +156 -0
  29. package/dist/cli/commands/generate.mjs +66 -17
  30. package/dist/cli/commands/init.mjs +315 -45
  31. package/dist/cli/commands/introspect.mjs +2 -4
  32. package/dist/cli/index.d.mts +1 -10
  33. package/dist/cli/index.mjs +4 -153
  34. package/dist/{constants-DdXFXQtN.mjs → constants-Cxde4rpC.mjs} +1 -2
  35. package/dist/core/index.d.mts +3 -5
  36. package/dist/core/index.mjs +5 -4
  37. package/dist/core-C1XCMtqM.mjs +185 -0
  38. package/dist/{createApp-CgKOPhA4.mjs → createApp-ByWNRsZj.mjs} +64 -35
  39. package/dist/{defineResource-DWbpJYtm.mjs → defineResource-D9aY5Cy6.mjs} +108 -1157
  40. package/dist/discovery/index.mjs +37 -5
  41. package/dist/docs/index.d.mts +6 -9
  42. package/dist/docs/index.mjs +3 -21
  43. package/dist/dynamic/index.d.mts +93 -0
  44. package/dist/dynamic/index.mjs +122 -0
  45. package/dist/{elevation-DSTbVvYj.mjs → elevation-BEdACOLB.mjs} +5 -36
  46. package/dist/{elevation-DGo5shaX.d.mts → elevation-Ca_yveIO.d.mts} +41 -7
  47. package/dist/{errorHandler-C3GY3_ow.mjs → errorHandler--zp54tGc.mjs} +3 -5
  48. package/dist/errorHandler-Do4vVQ1f.d.mts +139 -0
  49. package/dist/{errors-DBANPbGr.mjs → errors-rxhfP7Hf.mjs} +1 -2
  50. package/dist/{eventPlugin-BEOvaDqo.mjs → eventPlugin-Ba00swHF.mjs} +25 -27
  51. package/dist/{eventPlugin-H6wDDjGO.d.mts → eventPlugin-iGrSEmwJ.d.mts} +105 -5
  52. package/dist/events/index.d.mts +72 -7
  53. package/dist/events/index.mjs +216 -4
  54. package/dist/events/transports/redis-stream-entry.d.mts +1 -1
  55. package/dist/events/transports/redis-stream-entry.mjs +19 -7
  56. package/dist/events/transports/redis.d.mts +1 -1
  57. package/dist/events/transports/redis.mjs +3 -4
  58. package/dist/factory/index.d.mts +23 -9
  59. package/dist/factory/index.mjs +48 -3
  60. package/dist/{fields-Bi_AVKSo.d.mts → fields-DFwdaWCq.d.mts} +1 -1
  61. package/dist/{fields-CTd_CrKr.mjs → fields-ipsbIRPK.mjs} +1 -2
  62. package/dist/hooks/index.d.mts +1 -3
  63. package/dist/hooks/index.mjs +2 -3
  64. package/dist/idempotency/index.d.mts +5 -5
  65. package/dist/idempotency/index.mjs +3 -7
  66. package/dist/idempotency/mongodb.d.mts +1 -1
  67. package/dist/idempotency/mongodb.mjs +4 -5
  68. package/dist/idempotency/redis.d.mts +1 -1
  69. package/dist/idempotency/redis.mjs +2 -5
  70. package/dist/{fastifyAdapter-6b_eRDBw.d.mts → index-BL8CaQih.d.mts} +56 -57
  71. package/dist/index-Diqcm14c.d.mts +369 -0
  72. package/dist/{prisma-Dy5S5F5i.d.mts → index-yhxyjqNb.d.mts} +4 -5
  73. package/dist/index.d.mts +100 -105
  74. package/dist/index.mjs +85 -58
  75. package/dist/integrations/event-gateway.d.mts +1 -1
  76. package/dist/integrations/event-gateway.mjs +8 -4
  77. package/dist/integrations/index.d.mts +4 -2
  78. package/dist/integrations/index.mjs +1 -1
  79. package/dist/integrations/jobs.d.mts +2 -2
  80. package/dist/integrations/jobs.mjs +63 -14
  81. package/dist/integrations/mcp/index.d.mts +219 -0
  82. package/dist/integrations/mcp/index.mjs +572 -0
  83. package/dist/integrations/mcp/testing.d.mts +53 -0
  84. package/dist/integrations/mcp/testing.mjs +104 -0
  85. package/dist/integrations/streamline.mjs +39 -19
  86. package/dist/integrations/webhooks.d.mts +56 -0
  87. package/dist/integrations/webhooks.mjs +139 -0
  88. package/dist/integrations/websocket-redis.d.mts +46 -0
  89. package/dist/integrations/websocket-redis.mjs +50 -0
  90. package/dist/integrations/websocket.d.mts +68 -2
  91. package/dist/integrations/websocket.mjs +96 -13
  92. package/dist/{interface-CSNjltAc.d.mts → interface-B4awm1RJ.d.mts} +2 -2
  93. package/dist/interface-DGmPxakH.d.mts +2213 -0
  94. package/dist/{keys-DhqDRxv3.mjs → keys-qcD-TVJl.mjs} +3 -4
  95. package/dist/{logger-ByrvQWZO.mjs → logger-Dz3j1ItV.mjs} +2 -4
  96. package/dist/{memory-B2v7KrCB.mjs → memory-Cb_7iy9e.mjs} +2 -4
  97. package/dist/metrics-Csh4nsvv.mjs +224 -0
  98. package/dist/migrations/index.d.mts +113 -44
  99. package/dist/migrations/index.mjs +84 -102
  100. package/dist/{mongodb-DNKEExbf.mjs → mongodb-BuQ7fNTg.mjs} +1 -4
  101. package/dist/{mongodb-ClykrfGo.d.mts → mongodb-CUpYfxfD.d.mts} +2 -3
  102. package/dist/{mongodb-Dg8O_gvd.d.mts → mongodb-bga9AbkD.d.mts} +2 -2
  103. package/dist/{openapi-9nB_kiuR.mjs → openapi-CBmZ6EQN.mjs} +4 -21
  104. package/dist/org/index.d.mts +12 -14
  105. package/dist/org/index.mjs +92 -119
  106. package/dist/org/types.d.mts +2 -2
  107. package/dist/org/types.mjs +1 -1
  108. package/dist/permissions/index.d.mts +4 -278
  109. package/dist/permissions/index.mjs +4 -579
  110. package/dist/permissions-CA5zg0yK.mjs +751 -0
  111. package/dist/plugins/index.d.mts +104 -107
  112. package/dist/plugins/index.mjs +203 -313
  113. package/dist/plugins/response-cache.mjs +4 -69
  114. package/dist/plugins/tracing-entry.d.mts +1 -1
  115. package/dist/plugins/tracing-entry.mjs +24 -11
  116. package/dist/{pluralize-CM-jZg7p.mjs → pluralize-CcT6qF0a.mjs} +12 -13
  117. package/dist/policies/index.d.mts +2 -2
  118. package/dist/policies/index.mjs +80 -83
  119. package/dist/presets/index.d.mts +26 -19
  120. package/dist/presets/index.mjs +2 -142
  121. package/dist/presets/multiTenant.d.mts +1 -4
  122. package/dist/presets/multiTenant.mjs +4 -6
  123. package/dist/presets-C9QXJV1u.mjs +422 -0
  124. package/dist/{queryCachePlugin-B6R0d4av.mjs → queryCachePlugin-ClosZdNS.mjs} +6 -27
  125. package/dist/{queryCachePlugin-Q6SYuHZ6.d.mts → queryCachePlugin-DcmETvcB.d.mts} +3 -3
  126. package/dist/queryParser-CgCtsjti.mjs +352 -0
  127. package/dist/{redis-UwjEp8Ea.d.mts → redis-CQ5YxMC5.d.mts} +2 -2
  128. package/dist/{redis-stream-CBg0upHI.d.mts → redis-stream-BW9UKLZM.d.mts} +9 -2
  129. package/dist/registry/index.d.mts +1 -4
  130. package/dist/registry/index.mjs +3 -4
  131. package/dist/{introspectionPlugin-B3JkrjwU.mjs → registry-I-ogLgL9.mjs} +1 -8
  132. package/dist/{requestContext-xi6OKBL-.mjs → requestContext-DYtmNpm5.mjs} +1 -3
  133. package/dist/resourceToTools-PMFE8HIv.mjs +533 -0
  134. package/dist/rpc/index.d.mts +90 -0
  135. package/dist/rpc/index.mjs +248 -0
  136. package/dist/{schemaConverter-Dtg0Kt9T.mjs → schemaConverter-DjzHpFam.mjs} +1 -2
  137. package/dist/schemas/index.d.mts +30 -30
  138. package/dist/schemas/index.mjs +2 -4
  139. package/dist/scope/index.d.mts +13 -2
  140. package/dist/scope/index.mjs +18 -5
  141. package/dist/{sessionManager-D_iEHjQl.d.mts → sessionManager-wbkYj2HL.d.mts} +2 -2
  142. package/dist/{sse-DkqQ1uxb.mjs → sse-BkViJPlT.mjs} +4 -25
  143. package/dist/testing/index.d.mts +551 -567
  144. package/dist/testing/index.mjs +1744 -1799
  145. package/dist/{tracing-8CEbhF0w.d.mts → tracing-bz_U4EM1.d.mts} +6 -1
  146. package/dist/{typeGuards-DwxA1t_L.mjs → typeGuards-Cj5Rgvlg.mjs} +1 -2
  147. package/dist/types/index.d.mts +4 -946
  148. package/dist/types/index.mjs +2 -4
  149. package/dist/types-BJmgxNbF.d.mts +275 -0
  150. package/dist/{types-RLkFVgaw.d.mts → types-BNUccdcf.d.mts} +2 -2
  151. package/dist/{types-Beqn1Un7.mjs → types-C6TQjtdi.mjs} +30 -2
  152. package/dist/{types-tKwaViYB.d.mts → types-Dt0-AI6E.d.mts} +68 -27
  153. package/dist/{types-DelU6kln.mjs → types-ZUu_h0jp.mjs} +1 -2
  154. package/dist/utils/index.d.mts +254 -351
  155. package/dist/utils/index.mjs +7 -6
  156. package/dist/utils-Dc0WhlIl.mjs +594 -0
  157. package/dist/versioning-BzfeHmhj.mjs +37 -0
  158. package/package.json +44 -10
  159. package/skills/arc/SKILL.md +518 -0
  160. package/skills/arc/references/auth.md +250 -0
  161. package/skills/arc/references/events.md +272 -0
  162. package/skills/arc/references/integrations.md +385 -0
  163. package/skills/arc/references/mcp.md +431 -0
  164. package/skills/arc/references/production.md +610 -0
  165. package/skills/arc/references/testing.md +183 -0
  166. package/dist/audited-CGdLiSlE.mjs +0 -140
  167. package/dist/chunk-C7Uep-_p.mjs +0 -20
  168. package/dist/circuitBreaker-CSS2VvL6.mjs +0 -1109
  169. package/dist/errorHandler-CW3OOeYq.d.mts +0 -72
  170. package/dist/interface-BtdYtQUA.d.mts +0 -1114
  171. package/dist/presets-BTeYbw7h.d.mts +0 -57
  172. package/dist/presets-CeFtfDR8.mjs +0 -119
  173. /package/dist/{errors-DAWRdiYP.d.mts → errors-CPpvPHT0.d.mts} +0 -0
  174. /package/dist/{externalPaths-SyPF2tgK.d.mts → externalPaths-DpO-s7r8.d.mts} +0 -0
  175. /package/dist/{interface-DTbsvIWe.d.mts → interface-D_BWALyZ.d.mts} +0 -0
@@ -1,278 +1,4 @@
1
- import { a as applyFieldWritePermissions, i as applyFieldReadPermissions, n as FieldPermissionMap, o as fields, r as FieldPermissionType, s as resolveEffectiveRoles, t as FieldPermission } from "../fields-Bi_AVKSo.mjs";
2
- import { a as getUserRoles, i as UserBase, n as PermissionContext, o as normalizeRoles, r as PermissionResult, t as PermissionCheck } from "../types-RLkFVgaw.mjs";
3
- import { i as CacheStore, t as CacheLogger } from "../interface-DTbsvIWe.mjs";
4
- import { a as presets_d_exports, c as readOnly, i as ownerWithAdminBypass, n as authenticated, o as publicRead, r as fullPublic, s as publicReadAdminWrite, t as adminOnly } from "../presets-BTeYbw7h.mjs";
5
-
6
- //#region src/permissions/index.d.ts
7
- interface DynamicPermissionMatrixConfig {
8
- /**
9
- * Resolve role → resource → actions map dynamically (DB/API/config service).
10
- * Called at permission-check time (or cache miss if cache enabled).
11
- */
12
- resolveRolePermissions: (ctx: PermissionContext) => Record<string, Record<string, readonly string[]>> | Promise<Record<string, Record<string, readonly string[]>>>;
13
- /**
14
- * Optional cache store adapter.
15
- * Use MemoryCacheStore for single-instance apps or RedisCacheStore for distributed setups.
16
- */
17
- cacheStore?: CacheStore<Record<string, Record<string, readonly string[]>>>;
18
- /** Optional logger for cache/runtime failures (default: console) */
19
- logger?: CacheLogger;
20
- /**
21
- * Legacy convenience in-memory cache config.
22
- * If `cacheStore` is not provided and ttlMs > 0, Arc creates an internal MemoryCacheStore.
23
- */
24
- cache?: {
25
- /** Cache TTL in milliseconds */ttlMs: number; /** Optional custom cache key builder */
26
- key?: (ctx: PermissionContext) => string | null | undefined; /** Hard entry cap for internal memory store (default: 1000) */
27
- maxEntries?: number;
28
- };
29
- }
30
- /** Minimal publish/subscribe interface for cross-node cache invalidation. */
31
- interface PermissionEventBus {
32
- publish: <T>(type: string, payload: T) => Promise<void>;
33
- subscribe: (pattern: string, handler: (event: {
34
- payload: unknown;
35
- }) => void | Promise<void>) => Promise<(() => void) | void>;
36
- }
37
- interface ConnectEventsOptions {
38
- /** Called on remote invalidation for app-specific cleanup (e.g., resolver cache) */
39
- onRemoteInvalidation?: (orgId: string) => void | Promise<void>;
40
- /** Custom event type (default: 'arc.permissions.invalidated') */
41
- eventType?: string;
42
- }
43
- interface DynamicPermissionMatrix {
44
- can: (permissions: Record<string, readonly string[]>) => PermissionCheck;
45
- canAction: (resource: string, action: string) => PermissionCheck;
46
- requireRole: (...roles: string[]) => PermissionCheck;
47
- requireMembership: () => PermissionCheck;
48
- requireTeamMembership: () => PermissionCheck;
49
- /** Invalidate cached permissions for a specific organization */
50
- invalidateByOrg: (orgId: string) => Promise<void>;
51
- clearCache: () => Promise<void>;
52
- /**
53
- * Connect to an event system for cross-node cache invalidation.
54
- *
55
- * Late-binding: call after the event plugin is registered (e.g., in onReady hook).
56
- * Once connected, `invalidateByOrg()` auto-publishes an event, and incoming
57
- * events from other nodes trigger local cache invalidation.
58
- * Echo is suppressed via per-process nodeId matching.
59
- */
60
- connectEvents(events: PermissionEventBus, options?: ConnectEventsOptions): Promise<void>;
61
- /** Disconnect from the event system. Safe to call even if never connected. */
62
- disconnectEvents(): Promise<void>;
63
- /** Whether events are currently connected. */
64
- readonly eventsConnected: boolean;
65
- }
66
- /**
67
- * Allow public access (no authentication required)
68
- *
69
- * @example
70
- * ```typescript
71
- * permissions: {
72
- * list: allowPublic(),
73
- * get: allowPublic(),
74
- * }
75
- * ```
76
- */
77
- declare function allowPublic(): PermissionCheck;
78
- /**
79
- * Require authentication (any authenticated user)
80
- *
81
- * @example
82
- * ```typescript
83
- * permissions: {
84
- * create: requireAuth(),
85
- * update: requireAuth(),
86
- * }
87
- * ```
88
- */
89
- declare function requireAuth(): PermissionCheck;
90
- /**
91
- * Require specific roles
92
- *
93
- * @param roles - Required roles (user needs at least one)
94
- * @param options - Optional bypass roles
95
- *
96
- * @example
97
- * ```typescript
98
- * permissions: {
99
- * create: requireRoles(['admin', 'editor']),
100
- * delete: requireRoles(['admin']),
101
- * }
102
- *
103
- * // With bypass roles
104
- * permissions: {
105
- * update: requireRoles(['owner'], { bypassRoles: ['admin', 'superadmin'] }),
106
- * }
107
- * ```
108
- */
109
- declare function requireRoles(roles: readonly string[], options?: {
110
- bypassRoles?: readonly string[];
111
- }): PermissionCheck;
112
- /**
113
- * Require resource ownership
114
- *
115
- * Returns filters to scope queries to user's owned resources.
116
- *
117
- * @param ownerField - Field containing owner ID (default: 'userId')
118
- * @param options - Optional bypass roles
119
- *
120
- * @example
121
- * ```typescript
122
- * permissions: {
123
- * update: requireOwnership('userId'),
124
- * delete: requireOwnership('createdBy', { bypassRoles: ['admin'] }),
125
- * }
126
- * ```
127
- */
128
- declare function requireOwnership<TDoc = any>(ownerField?: Extract<keyof TDoc, string> | string, options?: {
129
- bypassRoles?: readonly string[];
130
- }): PermissionCheck<TDoc>;
131
- /**
132
- * Combine multiple checks - ALL must pass (AND logic)
133
- *
134
- * @example
135
- * ```typescript
136
- * permissions: {
137
- * update: allOf(
138
- * requireAuth(),
139
- * requireRoles(['editor']),
140
- * requireOwnership('createdBy')
141
- * ),
142
- * }
143
- * ```
144
- */
145
- declare function allOf(...checks: PermissionCheck[]): PermissionCheck;
146
- /**
147
- * Combine multiple checks - ANY must pass (OR logic)
148
- *
149
- * @example
150
- * ```typescript
151
- * permissions: {
152
- * update: anyOf(
153
- * requireRoles(['admin']),
154
- * requireOwnership('createdBy')
155
- * ),
156
- * }
157
- * ```
158
- */
159
- declare function anyOf(...checks: PermissionCheck[]): PermissionCheck;
160
- /**
161
- * Deny all access
162
- *
163
- * @example
164
- * ```typescript
165
- * permissions: {
166
- * delete: denyAll('Deletion not allowed'),
167
- * }
168
- * ```
169
- */
170
- declare function denyAll(reason?: string): PermissionCheck;
171
- /**
172
- * Dynamic permission based on context
173
- *
174
- * @example
175
- * ```typescript
176
- * permissions: {
177
- * update: when((ctx) => ctx.data?.status === 'draft'),
178
- * }
179
- * ```
180
- */
181
- declare function when<TDoc = any>(condition: (ctx: PermissionContext<TDoc>) => boolean | Promise<boolean>): PermissionCheck<TDoc>;
182
- /**
183
- * Require membership in the active organization.
184
- * User must be authenticated AND have an active org (member or elevated scope).
185
- *
186
- * Reads `request.scope` set by auth adapters.
187
- *
188
- * @example
189
- * ```typescript
190
- * permissions: {
191
- * list: requireOrgMembership(),
192
- * get: requireOrgMembership(),
193
- * }
194
- * ```
195
- */
196
- declare function requireOrgMembership<TDoc = any>(): PermissionCheck<TDoc>;
197
- /**
198
- * Require specific org-level roles.
199
- * Reads `request.scope.orgRoles` (set by auth adapters).
200
- * Elevated scope always passes (platform admin bypass).
201
- *
202
- * @param roles - Required org roles (user needs at least one)
203
- *
204
- * @example
205
- * ```typescript
206
- * permissions: {
207
- * create: requireOrgRole('admin', 'owner'),
208
- * delete: requireOrgRole('owner'),
209
- * }
210
- * ```
211
- */
212
- declare function requireOrgRole<TDoc = any>(...args: string[] | [readonly string[]]): PermissionCheck<TDoc>;
213
- /**
214
- * Create a scoped permission system for resource-action patterns.
215
- * Maps org roles to fine-grained permissions without external API calls.
216
- *
217
- * @example
218
- * ```typescript
219
- * const perms = createOrgPermissions({
220
- * statements: {
221
- * product: ['create', 'update', 'delete'],
222
- * order: ['create', 'approve'],
223
- * },
224
- * roles: {
225
- * owner: { product: ['create', 'update', 'delete'], order: ['create', 'approve'] },
226
- * admin: { product: ['create', 'update'], order: ['create'] },
227
- * member: { product: [], order: [] },
228
- * },
229
- * });
230
- *
231
- * defineResource({
232
- * permissions: {
233
- * create: perms.can({ product: ['create'] }),
234
- * delete: perms.can({ product: ['delete'] }),
235
- * }
236
- * });
237
- * ```
238
- */
239
- declare function createOrgPermissions(config: {
240
- statements: Record<string, readonly string[]>;
241
- roles: Record<string, Record<string, readonly string[]>>;
242
- }): {
243
- can: (permissions: Record<string, string[]>) => PermissionCheck;
244
- requireRole: (...roles: string[]) => PermissionCheck;
245
- requireMembership: () => PermissionCheck;
246
- requireTeamMembership: () => PermissionCheck;
247
- };
248
- /**
249
- * Create a dynamic role-based permission matrix.
250
- *
251
- * Use this when role/action mappings are managed outside code
252
- * (e.g., admin UI matrix, DB-stored ACLs, remote policy service).
253
- *
254
- * Supports:
255
- * - org role union (any assigned org role can grant)
256
- * - global bypass roles
257
- * - wildcard resource/action (`*`)
258
- * - optional in-memory cache
259
- */
260
- declare function createDynamicPermissionMatrix(config: DynamicPermissionMatrixConfig): DynamicPermissionMatrix;
261
- /**
262
- * Require membership in the active team.
263
- * User must be authenticated, a member of the active org, AND have an active team.
264
- *
265
- * Better Auth teams are flat member groups (no team-level roles).
266
- * Reads `request.scope.teamId` set by the Better Auth adapter.
267
- *
268
- * @example
269
- * ```typescript
270
- * permissions: {
271
- * list: requireTeamMembership(),
272
- * create: requireTeamMembership(),
273
- * }
274
- * ```
275
- */
276
- declare function requireTeamMembership<TDoc = any>(): PermissionCheck<TDoc>;
277
- //#endregion
278
- export { ConnectEventsOptions, DynamicPermissionMatrix, DynamicPermissionMatrixConfig, type FieldPermission, type FieldPermissionMap, type FieldPermissionType, type PermissionCheck, type PermissionContext, PermissionEventBus, type PermissionResult, type UserBase, adminOnly, allOf, allowPublic, anyOf, applyFieldReadPermissions, applyFieldWritePermissions, authenticated, createDynamicPermissionMatrix, createOrgPermissions, denyAll, fields, fullPublic, getUserRoles, normalizeRoles, ownerWithAdminBypass, presets_d_exports as permissions, publicRead, publicReadAdminWrite, readOnly, requireAuth, requireOrgMembership, requireOrgRole, requireOwnership, requireRoles, requireTeamMembership, resolveEffectiveRoles, when };
1
+ import { a as applyFieldWritePermissions, i as applyFieldReadPermissions, n as FieldPermissionMap, o as fields, r as FieldPermissionType, s as resolveEffectiveRoles, t as FieldPermission } from "../fields-DFwdaWCq.mjs";
2
+ import { a as getUserRoles, i as UserBase, n as PermissionContext, o as normalizeRoles, r as PermissionResult, t as PermissionCheck } from "../types-BNUccdcf.mjs";
3
+ import { C as publicRead, D as createRoleHierarchy, E as RoleHierarchy, S as presets_d_exports, T as readOnly, _ as when, a as allOf, b as fullPublic, c as createDynamicPermissionMatrix, d as requireAuth, f as requireOrgMembership, g as requireTeamMembership, h as requireRoles, i as PermissionEventBus, l as createOrgPermissions, m as requireOwnership, n as DynamicPermissionMatrix, o as allowPublic, p as requireOrgRole, r as DynamicPermissionMatrixConfig, s as anyOf, t as ConnectEventsOptions, u as denyAll, v as adminOnly, w as publicReadAdminWrite, x as ownerWithAdminBypass, y as authenticated } from "../index-Diqcm14c.mjs";
4
+ export { ConnectEventsOptions, DynamicPermissionMatrix, DynamicPermissionMatrixConfig, FieldPermission, FieldPermissionMap, FieldPermissionType, PermissionCheck, PermissionContext, PermissionEventBus, PermissionResult, RoleHierarchy, UserBase, adminOnly, allOf, allowPublic, anyOf, applyFieldReadPermissions, applyFieldWritePermissions, authenticated, createDynamicPermissionMatrix, createOrgPermissions, createRoleHierarchy, denyAll, fields, fullPublic, getUserRoles, normalizeRoles, ownerWithAdminBypass, presets_d_exports as permissions, publicRead, publicReadAdminWrite, readOnly, requireAuth, requireOrgMembership, requireOrgRole, requireOwnership, requireRoles, requireTeamMembership, resolveEffectiveRoles, when };