@classytic/arc 2.1.2 → 2.1.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +6 -5
- package/bin/arc.js +1 -0
- package/dist/{EventTransport-BD2U0BTc.d.mts → EventTransport-BkUDYZEb.d.mts} +1 -2
- package/dist/HookSystem-BsGV-j2l.mjs +1 -2
- package/dist/{ResourceRegistry-DsN4KJjV.mjs → ResourceRegistry-7Ic20ZMw.mjs} +1 -2
- package/dist/adapters/index.d.mts +4 -4
- package/dist/audit/index.d.mts +5 -6
- package/dist/audit/index.mjs +2 -3
- package/dist/audit/mongodb.d.mts +4 -4
- package/dist/audit/mongodb.mjs +1 -1
- package/dist/{audited-C3T5DTUx.mjs → audited-CGdLiSlE.mjs} +1 -2
- package/dist/auth/index.d.mts +6 -7
- package/dist/auth/index.mjs +10 -16
- package/dist/auth/redis-session.d.mts +2 -3
- package/dist/auth/redis-session.mjs +1 -2
- package/dist/{betterAuthOpenApi-BrHKeSAx.mjs → betterAuthOpenApi-DjWDddNc.mjs} +2 -3
- package/dist/cache/index.d.mts +3 -4
- package/dist/cache/index.mjs +4 -5
- package/dist/{caching-Bl28lYsR.mjs → caching-GSDJcA6-.mjs} +1 -2
- package/dist/{circuitBreaker-DeY4FCjs.mjs → circuitBreaker-DYhWBW_D.mjs} +1 -2
- package/dist/cli/commands/describe.d.mts +1 -2
- package/dist/cli/commands/describe.mjs +1 -2
- package/dist/cli/commands/docs.d.mts +1 -2
- package/dist/cli/commands/docs.mjs +3 -4
- package/dist/cli/commands/generate.d.mts +6 -2
- package/dist/cli/commands/generate.mjs +89 -58
- package/dist/cli/commands/init.d.mts +1 -2
- package/dist/cli/commands/init.mjs +15 -19
- package/dist/cli/commands/introspect.d.mts +1 -2
- package/dist/cli/commands/introspect.mjs +2 -3
- package/dist/cli/index.d.mts +1 -2
- package/dist/cli/index.mjs +1 -2
- package/dist/constants-DdXFXQtN.mjs +1 -2
- package/dist/core/index.d.mts +4 -4
- package/dist/core/index.mjs +1 -1
- package/dist/{createApp-CUgNqegw.mjs → createApp-D2D5XXaV.mjs} +9 -10
- package/dist/{defineResource-k0_BDn8v.mjs → defineResource-DZVbwsFb.mjs} +17 -39
- package/dist/discovery/index.d.mts +1 -2
- package/dist/discovery/index.mjs +1 -2
- package/dist/docs/index.d.mts +5 -6
- package/dist/docs/index.mjs +5 -4
- package/dist/{elevation-B_2dRLVP.d.mts → elevation-DGo5shaX.d.mts} +1 -2
- package/dist/{elevation-BRy3yFWT.mjs → elevation-DSTbVvYj.mjs} +4 -4
- package/dist/{errorHandler-C1okiriz.mjs → errorHandler-C3GY3_ow.mjs} +2 -3
- package/dist/{errorHandler-BbcgBmIH.d.mts → errorHandler-CW3OOeYq.d.mts} +2 -3
- package/dist/{errors-ChKiFz62.d.mts → errors-DAWRdiYP.d.mts} +1 -2
- package/dist/{errors-B9bZok84.mjs → errors-DBANPbGr.mjs} +1 -2
- package/dist/{eventPlugin-DGR_B2on.mjs → eventPlugin-BEOvaDqo.mjs} +2 -3
- package/dist/{eventPlugin-CTrLH3mt.d.mts → eventPlugin-H6wDDjGO.d.mts} +2 -3
- package/dist/events/index.d.mts +4 -5
- package/dist/events/index.mjs +2 -3
- package/dist/events/transports/redis-stream-entry.d.mts +1 -1
- package/dist/events/transports/redis-stream-entry.mjs +1 -2
- package/dist/events/transports/redis.d.mts +2 -3
- package/dist/events/transports/redis.mjs +1 -2
- package/dist/{externalPaths-DlINfKbP.d.mts → externalPaths-SyPF2tgK.d.mts} +1 -2
- package/dist/factory/index.d.mts +8 -9
- package/dist/factory/index.mjs +1 -1
- package/dist/{fastifyAdapter-BkrGrlFi.d.mts → fastifyAdapter-sGkvUvf5.d.mts} +4 -5
- package/dist/{fields-DyaDVX4J.d.mts → fields-Bi_AVKSo.d.mts} +2 -3
- package/dist/{fields-iagOozy0.mjs → fields-CTd_CrKr.mjs} +2 -3
- package/dist/hooks/index.d.mts +3 -3
- package/dist/idempotency/index.d.mts +4 -5
- package/dist/idempotency/index.mjs +1 -2
- package/dist/idempotency/mongodb.d.mts +1 -1
- package/dist/idempotency/mongodb.mjs +1 -2
- package/dist/idempotency/redis.d.mts +1 -1
- package/dist/idempotency/redis.mjs +1 -2
- package/dist/index.d.mts +9 -10
- package/dist/index.mjs +7 -8
- package/dist/integrations/event-gateway.d.mts +2 -3
- package/dist/integrations/event-gateway.mjs +2 -3
- package/dist/integrations/jobs.d.mts +1 -2
- package/dist/integrations/jobs.mjs +1 -2
- package/dist/integrations/streamline.d.mts +1 -2
- package/dist/integrations/streamline.mjs +1 -2
- package/dist/integrations/websocket.d.mts +1 -2
- package/dist/integrations/websocket.mjs +1 -2
- package/dist/{interface-B01JvPVc.d.mts → interface-CSNjltAc.d.mts} +1 -2
- package/dist/{interface-Ch8HU9uM.d.mts → interface-Cb2klgid.d.mts} +10 -10
- package/dist/{interface-CZe8IkMf.d.mts → interface-DTbsvIWe.d.mts} +1 -2
- package/dist/{introspectionPlugin-rFdO8ZUa.mjs → introspectionPlugin-B3JkrjwU.mjs} +1 -2
- package/dist/{keys-BqNejWup.mjs → keys-DhqDRxv3.mjs} +1 -2
- package/dist/{logger-Df2O2WsW.mjs → logger-ByrvQWZO.mjs} +1 -2
- package/dist/{memory-cQgelFOj.mjs → memory-B2v7KrCB.mjs} +1 -2
- package/dist/migrations/index.d.mts +1 -2
- package/dist/migrations/index.mjs +1 -2
- package/dist/{mongodb-CGzRbfAK.d.mts → mongodb-ClykrfGo.d.mts} +2 -3
- package/dist/{mongodb-BfJVlUJH.mjs → mongodb-DNKEExbf.mjs} +1 -2
- package/dist/{mongodb-JN-9JA7K.d.mts → mongodb-Dg8O_gvd.d.mts} +2 -3
- package/dist/{openapi-G3Cw7XuM.mjs → openapi-9nB_kiuR.mjs} +5 -4
- package/dist/org/index.d.mts +4 -5
- package/dist/org/index.mjs +1 -2
- package/dist/org/types.d.mts +1 -2
- package/dist/permissions/index.d.mts +5 -6
- package/dist/permissions/index.mjs +7 -7
- package/dist/plugins/index.d.mts +7 -8
- package/dist/plugins/index.mjs +7 -8
- package/dist/plugins/response-cache.d.mts +1 -2
- package/dist/plugins/response-cache.mjs +2 -3
- package/dist/plugins/tracing-entry.d.mts +1 -1
- package/dist/plugins/tracing-entry.mjs +1 -2
- package/dist/{pluralize-CEweyOEm.mjs → pluralize-CM-jZg7p.mjs} +1 -2
- package/dist/policies/index.d.mts +4 -5
- package/dist/policies/index.mjs +1 -2
- package/dist/presets/index.d.mts +4 -5
- package/dist/presets/index.mjs +2 -3
- package/dist/presets/multiTenant.d.mts +4 -5
- package/dist/presets/multiTenant.mjs +1 -2
- package/dist/{presets-DzSMwlKj.d.mts → presets-BTeYbw7h.d.mts} +2 -3
- package/dist/{presets-BITljm96.mjs → presets-CeFtfDR8.mjs} +1 -2
- package/dist/prisma-DJbMt3yf.mjs +1 -2
- package/dist/{prisma-Dg9GoVdj.d.mts → prisma-DQBSSHAB.d.mts} +2 -3
- package/dist/{queryCachePlugin-DMBnp2Q0.mjs → queryCachePlugin-B6R0d4av.mjs} +4 -5
- package/dist/{queryCachePlugin-7THaI5mt.d.mts → queryCachePlugin-Q6SYuHZ6.d.mts} +2 -3
- package/dist/{redis-D-JAeLtm.d.mts → redis-UwjEp8Ea.d.mts} +2 -3
- package/dist/{redis-stream-Bdh_vUU8.d.mts → redis-stream-CBg0upHI.d.mts} +2 -3
- package/dist/registry/index.d.mts +4 -5
- package/dist/registry/index.mjs +2 -2
- package/dist/{requestContext-QQD6ROJc.mjs → requestContext-xi6OKBL-.mjs} +1 -2
- package/dist/{schemaConverter-BwrmWroW.mjs → schemaConverter-Dtg0Kt9T.mjs} +1 -2
- package/dist/schemas/index.d.mts +1 -2
- package/dist/schemas/index.mjs +1 -2
- package/dist/scope/index.d.mts +2 -3
- package/dist/scope/index.mjs +2 -3
- package/dist/{sessionManager-jPKLbHE0.d.mts → sessionManager-D_iEHjQl.d.mts} +1 -2
- package/dist/{sse-B3c3_yZp.mjs → sse-DkqQ1uxb.mjs} +2 -3
- package/dist/testing/index.d.mts +8 -9
- package/dist/testing/index.mjs +3 -4
- package/dist/{tracing-Cc7vVQPp.d.mts → tracing-8CEbhF0w.d.mts} +1 -2
- package/dist/{typeGuards-DhMNLuvU.mjs → typeGuards-DwxA1t_L.mjs} +1 -2
- package/dist/types/index.d.mts +7 -8
- package/dist/types/index.mjs +1 -2
- package/dist/{types-CIgB7UUl.d.mts → types-B0dhNrnd.d.mts} +9 -10
- package/dist/types-Beqn1Un7.mjs +1 -2
- package/dist/types-DelU6kln.mjs +25 -0
- package/dist/{types-aYB4V7uN.d.mts → types-RLkFVgaw.d.mts} +18 -4
- package/dist/utils/index.d.mts +5 -6
- package/dist/utils/index.mjs +4 -4
- package/package.json +1 -1
- package/dist/EventTransport-BD2U0BTc.d.mts.map +0 -1
- package/dist/HookSystem-BsGV-j2l.mjs.map +0 -1
- package/dist/ResourceRegistry-DsN4KJjV.mjs.map +0 -1
- package/dist/audit/index.d.mts.map +0 -1
- package/dist/audit/index.mjs.map +0 -1
- package/dist/audited-C3T5DTUx.mjs.map +0 -1
- package/dist/auth/index.d.mts.map +0 -1
- package/dist/auth/index.mjs.map +0 -1
- package/dist/auth/redis-session.d.mts.map +0 -1
- package/dist/auth/redis-session.mjs.map +0 -1
- package/dist/betterAuthOpenApi-BrHKeSAx.mjs.map +0 -1
- package/dist/cache/index.d.mts.map +0 -1
- package/dist/cache/index.mjs.map +0 -1
- package/dist/caching-Bl28lYsR.mjs.map +0 -1
- package/dist/circuitBreaker-DeY4FCjs.mjs.map +0 -1
- package/dist/cli/commands/describe.d.mts.map +0 -1
- package/dist/cli/commands/describe.mjs.map +0 -1
- package/dist/cli/commands/docs.d.mts.map +0 -1
- package/dist/cli/commands/docs.mjs.map +0 -1
- package/dist/cli/commands/generate.d.mts.map +0 -1
- package/dist/cli/commands/generate.mjs.map +0 -1
- package/dist/cli/commands/init.d.mts.map +0 -1
- package/dist/cli/commands/init.mjs.map +0 -1
- package/dist/cli/commands/introspect.d.mts.map +0 -1
- package/dist/cli/commands/introspect.mjs.map +0 -1
- package/dist/cli/index.d.mts.map +0 -1
- package/dist/cli/index.mjs.map +0 -1
- package/dist/constants-DdXFXQtN.mjs.map +0 -1
- package/dist/createApp-CUgNqegw.mjs.map +0 -1
- package/dist/defineResource-k0_BDn8v.mjs.map +0 -1
- package/dist/discovery/index.d.mts.map +0 -1
- package/dist/discovery/index.mjs.map +0 -1
- package/dist/docs/index.d.mts.map +0 -1
- package/dist/docs/index.mjs.map +0 -1
- package/dist/elevation-BRy3yFWT.mjs.map +0 -1
- package/dist/elevation-B_2dRLVP.d.mts.map +0 -1
- package/dist/errorHandler-BbcgBmIH.d.mts.map +0 -1
- package/dist/errorHandler-C1okiriz.mjs.map +0 -1
- package/dist/errors-B9bZok84.mjs.map +0 -1
- package/dist/errors-ChKiFz62.d.mts.map +0 -1
- package/dist/eventPlugin-CTrLH3mt.d.mts.map +0 -1
- package/dist/eventPlugin-DGR_B2on.mjs.map +0 -1
- package/dist/events/index.d.mts.map +0 -1
- package/dist/events/index.mjs.map +0 -1
- package/dist/events/transports/redis-stream-entry.mjs.map +0 -1
- package/dist/events/transports/redis.d.mts.map +0 -1
- package/dist/events/transports/redis.mjs.map +0 -1
- package/dist/externalPaths-DlINfKbP.d.mts.map +0 -1
- package/dist/factory/index.d.mts.map +0 -1
- package/dist/fastifyAdapter-BkrGrlFi.d.mts.map +0 -1
- package/dist/fields-DyaDVX4J.d.mts.map +0 -1
- package/dist/fields-iagOozy0.mjs.map +0 -1
- package/dist/idempotency/index.d.mts.map +0 -1
- package/dist/idempotency/index.mjs.map +0 -1
- package/dist/idempotency/mongodb.mjs.map +0 -1
- package/dist/idempotency/redis.mjs.map +0 -1
- package/dist/index.d.mts.map +0 -1
- package/dist/index.mjs.map +0 -1
- package/dist/integrations/event-gateway.d.mts.map +0 -1
- package/dist/integrations/event-gateway.mjs.map +0 -1
- package/dist/integrations/jobs.d.mts.map +0 -1
- package/dist/integrations/jobs.mjs.map +0 -1
- package/dist/integrations/streamline.d.mts.map +0 -1
- package/dist/integrations/streamline.mjs.map +0 -1
- package/dist/integrations/websocket.d.mts.map +0 -1
- package/dist/integrations/websocket.mjs.map +0 -1
- package/dist/interface-B01JvPVc.d.mts.map +0 -1
- package/dist/interface-CZe8IkMf.d.mts.map +0 -1
- package/dist/interface-Ch8HU9uM.d.mts.map +0 -1
- package/dist/introspectionPlugin-rFdO8ZUa.mjs.map +0 -1
- package/dist/keys-BqNejWup.mjs.map +0 -1
- package/dist/logger-Df2O2WsW.mjs.map +0 -1
- package/dist/memory-cQgelFOj.mjs.map +0 -1
- package/dist/migrations/index.d.mts.map +0 -1
- package/dist/migrations/index.mjs.map +0 -1
- package/dist/mongodb-BfJVlUJH.mjs.map +0 -1
- package/dist/mongodb-CGzRbfAK.d.mts.map +0 -1
- package/dist/mongodb-JN-9JA7K.d.mts.map +0 -1
- package/dist/openapi-G3Cw7XuM.mjs.map +0 -1
- package/dist/org/index.d.mts.map +0 -1
- package/dist/org/index.mjs.map +0 -1
- package/dist/org/types.d.mts.map +0 -1
- package/dist/permissions/index.d.mts.map +0 -1
- package/dist/permissions/index.mjs.map +0 -1
- package/dist/plugins/index.d.mts.map +0 -1
- package/dist/plugins/index.mjs.map +0 -1
- package/dist/plugins/response-cache.d.mts.map +0 -1
- package/dist/plugins/response-cache.mjs.map +0 -1
- package/dist/plugins/tracing-entry.mjs.map +0 -1
- package/dist/pluralize-CEweyOEm.mjs.map +0 -1
- package/dist/policies/index.d.mts.map +0 -1
- package/dist/policies/index.mjs.map +0 -1
- package/dist/presets/index.d.mts.map +0 -1
- package/dist/presets/index.mjs.map +0 -1
- package/dist/presets/multiTenant.d.mts.map +0 -1
- package/dist/presets/multiTenant.mjs.map +0 -1
- package/dist/presets-BITljm96.mjs.map +0 -1
- package/dist/presets-DzSMwlKj.d.mts.map +0 -1
- package/dist/prisma-DJbMt3yf.mjs.map +0 -1
- package/dist/prisma-Dg9GoVdj.d.mts.map +0 -1
- package/dist/queryCachePlugin-7THaI5mt.d.mts.map +0 -1
- package/dist/queryCachePlugin-DMBnp2Q0.mjs.map +0 -1
- package/dist/redis-D-JAeLtm.d.mts.map +0 -1
- package/dist/redis-stream-Bdh_vUU8.d.mts.map +0 -1
- package/dist/registry/index.d.mts.map +0 -1
- package/dist/requestContext-QQD6ROJc.mjs.map +0 -1
- package/dist/schemaConverter-BwrmWroW.mjs.map +0 -1
- package/dist/schemas/index.d.mts.map +0 -1
- package/dist/schemas/index.mjs.map +0 -1
- package/dist/scope/index.d.mts.map +0 -1
- package/dist/scope/index.mjs.map +0 -1
- package/dist/sessionManager-jPKLbHE0.d.mts.map +0 -1
- package/dist/sse-B3c3_yZp.mjs.map +0 -1
- package/dist/testing/index.d.mts.map +0 -1
- package/dist/testing/index.mjs.map +0 -1
- package/dist/tracing-Cc7vVQPp.d.mts.map +0 -1
- package/dist/typeGuards-DhMNLuvU.mjs.map +0 -1
- package/dist/types/index.d.mts.map +0 -1
- package/dist/types/index.mjs.map +0 -1
- package/dist/types-Beqn1Un7.mjs.map +0 -1
- package/dist/types-CIgB7UUl.d.mts.map +0 -1
- package/dist/types-aYB4V7uN.d.mts.map +0 -1
- package/dist/utils/index.d.mts.map +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as DomainEvent } from "../EventTransport-
|
|
1
|
+
import { t as DomainEvent } from "../EventTransport-BkUDYZEb.mjs";
|
|
2
2
|
import { WebSocketClient, WebSocketMessage } from "./websocket.mjs";
|
|
3
3
|
import { FastifyPluginAsync, FastifyRequest } from "fastify";
|
|
4
4
|
|
|
@@ -43,5 +43,4 @@ interface EventGatewayOptions {
|
|
|
43
43
|
}
|
|
44
44
|
declare const eventGatewayPlugin: FastifyPluginAsync<EventGatewayOptions>;
|
|
45
45
|
//#endregion
|
|
46
|
-
export { EventGatewayOptions, eventGatewayPlugin as default, eventGatewayPlugin };
|
|
47
|
-
//# sourceMappingURL=event-gateway.d.mts.map
|
|
46
|
+
export { EventGatewayOptions, eventGatewayPlugin as default, eventGatewayPlugin };
|
|
@@ -5,7 +5,7 @@ const eventGatewayPluginImpl = async (fastify, opts = {}) => {
|
|
|
5
5
|
const { auth = true, orgScoped = false, roomPolicy, maxMessageBytes, maxSubscriptionsPerClient, authenticate } = opts;
|
|
6
6
|
if (auth && !authenticate && !fastify.hasDecorator("authenticate")) throw new Error("[arc-event-gateway] auth is true but fastify.authenticate is not registered. Register an auth plugin first, provide a custom authenticate function, or set auth: false.");
|
|
7
7
|
if (opts.sse !== false) {
|
|
8
|
-
const { default: ssePlugin } = await import("../sse-
|
|
8
|
+
const { default: ssePlugin } = await import("../sse-DkqQ1uxb.mjs").then((n) => n.r);
|
|
9
9
|
await fastify.register(ssePlugin, {
|
|
10
10
|
path: opts.sse?.path ?? "/events/stream",
|
|
11
11
|
requireAuth: auth,
|
|
@@ -40,5 +40,4 @@ const eventGatewayPlugin = fp(eventGatewayPluginImpl, {
|
|
|
40
40
|
});
|
|
41
41
|
|
|
42
42
|
//#endregion
|
|
43
|
-
export { eventGatewayPlugin as default, eventGatewayPlugin };
|
|
44
|
-
//# sourceMappingURL=event-gateway.mjs.map
|
|
43
|
+
export { eventGatewayPlugin as default, eventGatewayPlugin };
|
|
@@ -100,5 +100,4 @@ declare function defineJob<TData = unknown, TResult = unknown>(definition: JobDe
|
|
|
100
100
|
/** Pluggable BullMQ job queue integration for Arc */
|
|
101
101
|
declare const jobsPlugin: FastifyPluginAsync<JobsPluginOptions>;
|
|
102
102
|
//#endregion
|
|
103
|
-
export { JobDefinition, JobDispatchOptions, JobDispatcher, JobMeta, JobsPluginOptions, QueueStats, jobsPlugin as default, jobsPlugin, defineJob };
|
|
104
|
-
//# sourceMappingURL=jobs.d.mts.map
|
|
103
|
+
export { JobDefinition, JobDispatchOptions, JobDispatcher, JobMeta, JobsPluginOptions, QueueStats, jobsPlugin as default, jobsPlugin, defineJob };
|
|
@@ -120,5 +120,4 @@ const jobsPluginImpl = async (fastify, options) => {
|
|
|
120
120
|
const jobsPlugin = jobsPluginImpl;
|
|
121
121
|
|
|
122
122
|
//#endregion
|
|
123
|
-
export { jobsPlugin as default, jobsPlugin, defineJob };
|
|
124
|
-
//# sourceMappingURL=jobs.mjs.map
|
|
123
|
+
export { jobsPlugin as default, jobsPlugin, defineJob };
|
|
@@ -57,5 +57,4 @@ interface StreamlinePluginOptions {
|
|
|
57
57
|
/** Pluggable streamline integration for Arc */
|
|
58
58
|
declare const streamlinePlugin: FastifyPluginAsync<StreamlinePluginOptions>;
|
|
59
59
|
//#endregion
|
|
60
|
-
export { StreamlinePluginOptions, WorkflowLike, WorkflowRunLike, streamlinePlugin as default, streamlinePlugin };
|
|
61
|
-
//# sourceMappingURL=streamline.d.mts.map
|
|
60
|
+
export { StreamlinePluginOptions, WorkflowLike, WorkflowRunLike, streamlinePlugin as default, streamlinePlugin };
|
|
@@ -122,5 +122,4 @@ const streamlinePluginImpl = async (fastify, options) => {
|
|
|
122
122
|
const streamlinePlugin = streamlinePluginImpl;
|
|
123
123
|
|
|
124
124
|
//#endregion
|
|
125
|
-
export { streamlinePlugin as default, streamlinePlugin };
|
|
126
|
-
//# sourceMappingURL=streamline.mjs.map
|
|
125
|
+
export { streamlinePlugin as default, streamlinePlugin };
|
|
@@ -79,5 +79,4 @@ declare class RoomManager {
|
|
|
79
79
|
/** Pluggable WebSocket integration for Arc */
|
|
80
80
|
declare const websocketPlugin: FastifyPluginAsync<WebSocketPluginOptions>;
|
|
81
81
|
//#endregion
|
|
82
|
-
export { RoomManager, WebSocketClient, WebSocketMessage, WebSocketPluginOptions, websocketPlugin as default, websocketPlugin };
|
|
83
|
-
//# sourceMappingURL=websocket.d.mts.map
|
|
82
|
+
export { RoomManager, WebSocketClient, WebSocketMessage, WebSocketPluginOptions, websocketPlugin as default, websocketPlugin };
|
|
@@ -285,5 +285,4 @@ const websocketPlugin = fp(websocketPluginImpl, {
|
|
|
285
285
|
});
|
|
286
286
|
|
|
287
287
|
//#endregion
|
|
288
|
-
export { RoomManager, websocketPlugin as default, websocketPlugin };
|
|
289
|
-
//# sourceMappingURL=websocket.mjs.map
|
|
288
|
+
export { RoomManager, websocketPlugin as default, websocketPlugin };
|
|
@@ -74,5 +74,4 @@ interface IdempotencyStore {
|
|
|
74
74
|
*/
|
|
75
75
|
declare function createIdempotencyResult(statusCode: number, body: unknown, headers: Record<string, string>, ttlMs: number): Omit<IdempotencyResult, 'key'>;
|
|
76
76
|
//#endregion
|
|
77
|
-
export { createIdempotencyResult as i, IdempotencyResult as n, IdempotencyStore as r, IdempotencyLock as t };
|
|
78
|
-
//# sourceMappingURL=interface-B01JvPVc.d.mts.map
|
|
77
|
+
export { createIdempotencyResult as i, IdempotencyResult as n, IdempotencyStore as r, IdempotencyLock as t };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { n as FieldPermissionMap } from "./fields-
|
|
2
|
-
import { i as UserBase } from "./types-
|
|
1
|
+
import { n as FieldPermissionMap } from "./fields-Bi_AVKSo.mjs";
|
|
2
|
+
import { i as UserBase } from "./types-RLkFVgaw.mjs";
|
|
3
3
|
import { AdditionalRoute, AnyRecord, ArcInternalMetadata, ControllerQueryOptions, CrudRouteKey, CrudSchemas, EventDefinition, IntrospectionData, MiddlewareConfig, OpenApiSchemas, QueryParserInterface, RateLimitConfig, RegistryEntry, RegistryStats, RequestContext, ResourceCacheConfig, ResourceConfig, ResourceMetadata, ResourcePermissions, RouteSchemaOptions } from "./types/index.mjs";
|
|
4
4
|
import { FastifyPluginAsync, FastifyReply, FastifyRequest } from "fastify";
|
|
5
5
|
|
|
@@ -759,8 +759,8 @@ interface ControllerLike {
|
|
|
759
759
|
//#endregion
|
|
760
760
|
//#region src/core/AccessControl.d.ts
|
|
761
761
|
interface AccessControlConfig {
|
|
762
|
-
/** Field name used for multi-tenant scoping (default: 'organizationId') */
|
|
763
|
-
tenantField: string;
|
|
762
|
+
/** Field name used for multi-tenant scoping (default: 'organizationId'). Set to `false` to disable org filtering. */
|
|
763
|
+
tenantField: string | false;
|
|
764
764
|
/** Primary key field name (default: '_id') */
|
|
765
765
|
idField: string;
|
|
766
766
|
/**
|
|
@@ -876,8 +876,8 @@ interface QueryResolverConfig {
|
|
|
876
876
|
defaultSort?: string;
|
|
877
877
|
/** Schema options for field sanitization */
|
|
878
878
|
schemaOptions?: RouteSchemaOptions;
|
|
879
|
-
/** Field name used for multi-tenant scoping (default: 'organizationId') */
|
|
880
|
-
tenantField?: string;
|
|
879
|
+
/** Field name used for multi-tenant scoping (default: 'organizationId'). Set to `false` to disable. */
|
|
880
|
+
tenantField?: string | false;
|
|
881
881
|
}
|
|
882
882
|
declare class QueryResolver {
|
|
883
883
|
private queryParser;
|
|
@@ -926,8 +926,9 @@ interface BaseControllerOptions {
|
|
|
926
926
|
/**
|
|
927
927
|
* Field name used for multi-tenant scoping (default: 'organizationId').
|
|
928
928
|
* Override to match your schema: 'workspaceId', 'tenantId', 'teamId', etc.
|
|
929
|
+
* Set to `false` to disable org filtering for platform-universal resources.
|
|
929
930
|
*/
|
|
930
|
-
tenantField?: string;
|
|
931
|
+
tenantField?: string | false;
|
|
931
932
|
/**
|
|
932
933
|
* Primary key field name (default: '_id').
|
|
933
934
|
* Override for non-MongoDB adapters (e.g., 'id' for SQL databases).
|
|
@@ -965,7 +966,7 @@ declare class BaseController<TDoc = AnyRecord, TRepository extends RepositoryLik
|
|
|
965
966
|
protected defaultLimit: number;
|
|
966
967
|
protected defaultSort: string;
|
|
967
968
|
protected resourceName?: string;
|
|
968
|
-
protected tenantField: string;
|
|
969
|
+
protected tenantField: string | false;
|
|
969
970
|
protected idField: string;
|
|
970
971
|
/** Composable access control (ID filtering, policy checks, org scope, ownership) */
|
|
971
972
|
readonly accessControl: AccessControl;
|
|
@@ -1094,5 +1095,4 @@ interface ValidationResult {
|
|
|
1094
1095
|
}
|
|
1095
1096
|
type AdapterFactory<TDoc> = (config: unknown) => DataAdapter<TDoc>;
|
|
1096
1097
|
//#endregion
|
|
1097
|
-
export { beforeUpdate as $, PaginationParams as A, DefineHookOptions as B, RegisterOptions as C, CrudRepository as D, defineResource as E, OperationFilter as F, HookRegistration as G, HookHandler as H, PipelineConfig as I, afterCreate as J, HookSystem as K, PipelineContext as L, Guard as M, Interceptor as N, InferDoc as O, NextFunction as P, beforeDelete as Q, PipelineStep as R, RouteHandler as S, ResourceDefinition as T, HookOperation as U, HookContext as V, HookPhase as W, afterUpdate as X, afterDelete as Y, beforeCreate as Z, ControllerLike as _, RepositoryLike as a, IControllerResponse as b, BaseController as c, QueryResolverConfig as d, createHookSystem as et, BodySanitizer as f, ControllerHandler as g, AccessControlConfig as h, RelationMetadata as i, QueryOptions as j, PaginatedResult as k, BaseControllerOptions as l, AccessControl as m, DataAdapter as n, SchemaMetadata as o, BodySanitizerConfig as p, HookSystemOptions as q, FieldMetadata as r, ValidationResult as s, AdapterFactory as t, defineHook as tt, QueryResolver as u, FastifyHandler as v, ResourceRegistry as w, IRequestContext as x, IController as y, Transform as z };
|
|
1098
|
-
//# sourceMappingURL=interface-Ch8HU9uM.d.mts.map
|
|
1098
|
+
export { beforeUpdate as $, PaginationParams as A, DefineHookOptions as B, RegisterOptions as C, CrudRepository as D, defineResource as E, OperationFilter as F, HookRegistration as G, HookHandler as H, PipelineConfig as I, afterCreate as J, HookSystem as K, PipelineContext as L, Guard as M, Interceptor as N, InferDoc as O, NextFunction as P, beforeDelete as Q, PipelineStep as R, RouteHandler as S, ResourceDefinition as T, HookOperation as U, HookContext as V, HookPhase as W, afterUpdate as X, afterDelete as Y, beforeCreate as Z, ControllerLike as _, RepositoryLike as a, IControllerResponse as b, BaseController as c, QueryResolverConfig as d, createHookSystem as et, BodySanitizer as f, ControllerHandler as g, AccessControlConfig as h, RelationMetadata as i, QueryOptions as j, PaginatedResult as k, BaseControllerOptions as l, AccessControl as m, DataAdapter as n, SchemaMetadata as o, BodySanitizerConfig as p, HookSystemOptions as q, FieldMetadata as r, ValidationResult as s, AdapterFactory as t, defineHook as tt, QueryResolver as u, FastifyHandler as v, ResourceRegistry as w, IRequestContext as x, IController as y, Transform as z };
|
|
@@ -51,5 +51,4 @@ interface CacheStore<TValue = unknown> {
|
|
|
51
51
|
stats?(): CacheStats;
|
|
52
52
|
}
|
|
53
53
|
//#endregion
|
|
54
|
-
export { CacheStore as i, CacheSetOptions as n, CacheStats as r, CacheLogger as t };
|
|
55
|
-
//# sourceMappingURL=interface-CZe8IkMf.d.mts.map
|
|
54
|
+
export { CacheStore as i, CacheSetOptions as n, CacheStats as r, CacheLogger as t };
|
|
@@ -50,5 +50,4 @@ const introspectionPlugin = async (fastify, opts = {}) => {
|
|
|
50
50
|
var introspectionPlugin_default = fp(introspectionPlugin, { name: "arc-introspection" });
|
|
51
51
|
|
|
52
52
|
//#endregion
|
|
53
|
-
export { introspectionPlugin_default as n, introspectionPlugin as t };
|
|
54
|
-
//# sourceMappingURL=introspectionPlugin-rFdO8ZUa.mjs.map
|
|
53
|
+
export { introspectionPlugin_default as n, introspectionPlugin as t };
|
|
@@ -153,5 +153,4 @@ declare const migrationHelpers: {
|
|
|
153
153
|
createIndex: (collection: string, fields: Record<string, 1 | -1>, options?: Record<string, unknown>) => Migration;
|
|
154
154
|
};
|
|
155
155
|
//#endregion
|
|
156
|
-
export { Migration, MigrationRecord, MigrationRegistry, MigrationRunner, SchemaVersion, defineMigration, migrationHelpers, migrationRegistry, withSchemaVersion };
|
|
157
|
-
//# sourceMappingURL=index.d.mts.map
|
|
156
|
+
export { Migration, MigrationRecord, MigrationRegistry, MigrationRunner, SchemaVersion, defineMigration, migrationHelpers, migrationRegistry, withSchemaVersion };
|
|
@@ -257,5 +257,4 @@ const migrationHelpers = {
|
|
|
257
257
|
};
|
|
258
258
|
|
|
259
259
|
//#endregion
|
|
260
|
-
export { MigrationRegistry, MigrationRunner, defineMigration, migrationHelpers, migrationRegistry, withSchemaVersion };
|
|
261
|
-
//# sourceMappingURL=index.mjs.map
|
|
260
|
+
export { MigrationRegistry, MigrationRunner, defineMigration, migrationHelpers, migrationRegistry, withSchemaVersion };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { i as UserBase } from "./types-
|
|
1
|
+
import { i as UserBase } from "./types-RLkFVgaw.mjs";
|
|
2
2
|
|
|
3
3
|
//#region src/audit/stores/interface.d.ts
|
|
4
4
|
type AuditAction = 'create' | 'update' | 'delete' | 'restore' | 'custom';
|
|
@@ -115,5 +115,4 @@ declare class MongoAuditStore implements AuditStore {
|
|
|
115
115
|
query(options?: AuditQueryOptions): Promise<AuditEntry[]>;
|
|
116
116
|
}
|
|
117
117
|
//#endregion
|
|
118
|
-
export { AuditContext as a, AuditStore as c, AuditAction as i, AuditStoreOptions as l, MongoAuditStoreOptions as n, AuditEntry as o, MongoConnection as r, AuditQueryOptions as s, MongoAuditStore as t, createAuditEntry as u };
|
|
119
|
-
//# sourceMappingURL=mongodb-CGzRbfAK.d.mts.map
|
|
118
|
+
export { AuditContext as a, AuditStore as c, AuditAction as i, AuditStoreOptions as l, MongoAuditStoreOptions as n, AuditEntry as o, MongoConnection as r, AuditQueryOptions as s, MongoAuditStore as t, createAuditEntry as u };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as IdempotencyResult, r as IdempotencyStore } from "./interface-
|
|
1
|
+
import { n as IdempotencyResult, r as IdempotencyStore } from "./interface-CSNjltAc.mjs";
|
|
2
2
|
|
|
3
3
|
//#region src/idempotency/stores/mongodb.d.ts
|
|
4
4
|
interface MongoConnection {
|
|
@@ -68,5 +68,4 @@ declare class MongoIdempotencyStore implements IdempotencyStore {
|
|
|
68
68
|
close(): Promise<void>;
|
|
69
69
|
}
|
|
70
70
|
//#endregion
|
|
71
|
-
export { MongoIdempotencyStoreOptions as n, MongoIdempotencyStore as t };
|
|
72
|
-
//# sourceMappingURL=mongodb-JN-9JA7K.d.mts.map
|
|
71
|
+
export { MongoIdempotencyStoreOptions as n, MongoIdempotencyStore as t };
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { t as getUserRoles } from "./types-DelU6kln.mjs";
|
|
2
|
+
import { n as convertRouteSchema } from "./schemaConverter-Dtg0Kt9T.mjs";
|
|
2
3
|
import fp from "fastify-plugin";
|
|
3
4
|
|
|
4
5
|
//#region src/docs/openapi.ts
|
|
@@ -34,7 +35,8 @@ const openApiPlugin = async (fastify, opts = {}) => {
|
|
|
34
35
|
fastify.get(`${prefix}/openapi.json`, async (request, reply) => {
|
|
35
36
|
if (authRoles.length > 0) {
|
|
36
37
|
const user = request.user;
|
|
37
|
-
|
|
38
|
+
const roles = getUserRoles(user);
|
|
39
|
+
if (!authRoles.some((r) => roles.includes(r)) && !roles.includes("superadmin")) {
|
|
38
40
|
reply.code(403).send({ error: "Access denied" });
|
|
39
41
|
return;
|
|
40
42
|
}
|
|
@@ -520,5 +522,4 @@ var openapi_default = fp(openApiPlugin, {
|
|
|
520
522
|
});
|
|
521
523
|
|
|
522
524
|
//#endregion
|
|
523
|
-
export { openApiPlugin as n, openapi_default as r, buildOpenApiSpec as t };
|
|
524
|
-
//# sourceMappingURL=openapi-G3Cw7XuM.mjs.map
|
|
525
|
+
export { openApiPlugin as n, openapi_default as r, buildOpenApiSpec as t };
|
package/dist/org/index.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import "../elevation-
|
|
2
|
-
import { S as RouteHandler } from "../interface-
|
|
3
|
-
import { i as UserBase } from "../types-
|
|
1
|
+
import "../elevation-DGo5shaX.mjs";
|
|
2
|
+
import { S as RouteHandler } from "../interface-Cb2klgid.mjs";
|
|
3
|
+
import { i as UserBase } from "../types-RLkFVgaw.mjs";
|
|
4
4
|
import "../types/index.mjs";
|
|
5
5
|
import { InvitationAdapter, InvitationDoc, MemberDoc, OrgAdapter, OrgDoc, OrgPermissionStatement, OrgRole, OrganizationPluginOptions } from "./types.mjs";
|
|
6
6
|
import { FastifyPluginAsync, RouteHandlerMethod } from "fastify";
|
|
@@ -65,5 +65,4 @@ declare module 'fastify' {
|
|
|
65
65
|
declare const organizationPlugin: FastifyPluginAsync<OrganizationPluginOptions>;
|
|
66
66
|
declare const _default: FastifyPluginAsync<OrganizationPluginOptions>;
|
|
67
67
|
//#endregion
|
|
68
|
-
export { type InvitationAdapter, type InvitationDoc, type MemberDoc, type OrgAdapter, type OrgDoc, type OrgGuardOptions, type OrgMembershipOptions, type OrgPermissionStatement, type OrgRole, type OrgRolesOptions, type OrganizationPluginOptions, getUserOrgRoles, hasOrgRole, orgGuard, orgMembershipCheck, _default as organizationPlugin, organizationPlugin as organizationPluginFn, requireOrg, requireOrgRole };
|
|
69
|
-
//# sourceMappingURL=index.d.mts.map
|
|
68
|
+
export { type InvitationAdapter, type InvitationDoc, type MemberDoc, type OrgAdapter, type OrgDoc, type OrgGuardOptions, type OrgMembershipOptions, type OrgPermissionStatement, type OrgRole, type OrgRolesOptions, type OrganizationPluginOptions, getUserOrgRoles, hasOrgRole, orgGuard, orgMembershipCheck, _default as organizationPlugin, organizationPlugin as organizationPluginFn, requireOrg, requireOrgRole };
|
package/dist/org/index.mjs
CHANGED
|
@@ -510,5 +510,4 @@ var organizationPlugin_default = fp(organizationPlugin, {
|
|
|
510
510
|
});
|
|
511
511
|
|
|
512
512
|
//#endregion
|
|
513
|
-
export { getUserOrgRoles, hasOrgRole, orgGuard, orgMembershipCheck, organizationPlugin_default as organizationPlugin, organizationPlugin as organizationPluginFn, requireOrg, requireOrgRole };
|
|
514
|
-
//# sourceMappingURL=index.mjs.map
|
|
513
|
+
export { getUserOrgRoles, hasOrgRole, orgGuard, orgMembershipCheck, organizationPlugin_default as organizationPlugin, organizationPlugin as organizationPluginFn, requireOrg, requireOrgRole };
|
package/dist/org/types.d.mts
CHANGED
|
@@ -79,5 +79,4 @@ interface OrganizationPluginOptions {
|
|
|
79
79
|
enableInvitations?: boolean;
|
|
80
80
|
}
|
|
81
81
|
//#endregion
|
|
82
|
-
export { InvitationAdapter, InvitationDoc, MemberDoc, OrgAdapter, OrgDoc, OrgPermissionStatement, OrgRole, OrganizationPluginOptions };
|
|
83
|
-
//# sourceMappingURL=types.d.mts.map
|
|
82
|
+
export { InvitationAdapter, InvitationDoc, MemberDoc, OrgAdapter, OrgDoc, OrgPermissionStatement, OrgRole, OrganizationPluginOptions };
|
|
@@ -1,7 +1,7 @@
|
|
|
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-
|
|
2
|
-
import { i as UserBase, n as PermissionContext, r as PermissionResult, t as PermissionCheck } from "../types-
|
|
3
|
-
import { i as CacheStore, t as CacheLogger } from "../interface-
|
|
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-
|
|
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
5
|
|
|
6
6
|
//#region src/permissions/index.d.ts
|
|
7
7
|
interface DynamicPermissionMatrixConfig {
|
|
@@ -275,5 +275,4 @@ declare function createDynamicPermissionMatrix(config: DynamicPermissionMatrixCo
|
|
|
275
275
|
*/
|
|
276
276
|
declare function requireTeamMembership<TDoc = any>(): PermissionCheck<TDoc>;
|
|
277
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, ownerWithAdminBypass, presets_d_exports as permissions, publicRead, publicReadAdminWrite, readOnly, requireAuth, requireOrgMembership, requireOrgRole, requireOwnership, requireRoles, requireTeamMembership, resolveEffectiveRoles, when };
|
|
279
|
-
//# sourceMappingURL=index.d.mts.map
|
|
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,7 +1,8 @@
|
|
|
1
1
|
import { a as getTeamId, c as isElevated, l as isMember, n as PUBLIC_SCOPE } from "../types-Beqn1Un7.mjs";
|
|
2
|
-
import { i as resolveEffectiveRoles, n as applyFieldWritePermissions, r as fields, t as applyFieldReadPermissions } from "../fields-
|
|
3
|
-
import { t as
|
|
4
|
-
import {
|
|
2
|
+
import { i as resolveEffectiveRoles, n as applyFieldWritePermissions, r as fields, t as applyFieldReadPermissions } from "../fields-CTd_CrKr.mjs";
|
|
3
|
+
import { n as normalizeRoles, t as getUserRoles } from "../types-DelU6kln.mjs";
|
|
4
|
+
import { t as MemoryCacheStore } from "../memory-B2v7KrCB.mjs";
|
|
5
|
+
import { a as presets_exports, c as readOnly, i as ownerWithAdminBypass, n as authenticated, o as publicRead, r as fullPublic, s as publicReadAdminWrite, t as adminOnly } from "../presets-CeFtfDR8.mjs";
|
|
5
6
|
import { randomUUID } from "node:crypto";
|
|
6
7
|
|
|
7
8
|
//#region src/permissions/index.ts
|
|
@@ -67,7 +68,7 @@ function requireRoles(roles, options) {
|
|
|
67
68
|
granted: false,
|
|
68
69
|
reason: "Authentication required"
|
|
69
70
|
};
|
|
70
|
-
const userRoles = ctx.user
|
|
71
|
+
const userRoles = getUserRoles(ctx.user);
|
|
71
72
|
if (options?.bypassRoles?.some((r) => userRoles.includes(r))) return true;
|
|
72
73
|
if (roles.some((r) => userRoles.includes(r))) return true;
|
|
73
74
|
return {
|
|
@@ -100,7 +101,7 @@ function requireOwnership(ownerField = "userId", options) {
|
|
|
100
101
|
granted: false,
|
|
101
102
|
reason: "Authentication required"
|
|
102
103
|
};
|
|
103
|
-
const userRoles = ctx.user
|
|
104
|
+
const userRoles = getUserRoles(ctx.user);
|
|
104
105
|
if (options?.bypassRoles?.some((r) => userRoles.includes(r))) return true;
|
|
105
106
|
const userId = ctx.user.id ?? ctx.user._id;
|
|
106
107
|
if (!userId) return {
|
|
@@ -575,5 +576,4 @@ function requireTeamMembership() {
|
|
|
575
576
|
}
|
|
576
577
|
|
|
577
578
|
//#endregion
|
|
578
|
-
export { adminOnly, allOf, allowPublic, anyOf, applyFieldReadPermissions, applyFieldWritePermissions, authenticated, createDynamicPermissionMatrix, createOrgPermissions, denyAll, fields, fullPublic, ownerWithAdminBypass, presets_exports as permissions, publicRead, publicReadAdminWrite, readOnly, requireAuth, requireOrgMembership, requireOrgRole, requireOwnership, requireRoles, requireTeamMembership, resolveEffectiveRoles, when };
|
|
579
|
-
//# sourceMappingURL=index.mjs.map
|
|
579
|
+
export { adminOnly, allOf, allowPublic, anyOf, applyFieldReadPermissions, applyFieldWritePermissions, authenticated, createDynamicPermissionMatrix, createOrgPermissions, denyAll, fields, fullPublic, getUserRoles, normalizeRoles, ownerWithAdminBypass, presets_exports as permissions, publicRead, publicReadAdminWrite, readOnly, requireAuth, requireOrgMembership, requireOrgRole, requireOwnership, requireRoles, requireTeamMembership, resolveEffectiveRoles, when };
|
package/dist/plugins/index.d.mts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import "../elevation-
|
|
2
|
-
import { K as HookSystem, w as ResourceRegistry } from "../interface-
|
|
3
|
-
import "../types-
|
|
1
|
+
import "../elevation-DGo5shaX.mjs";
|
|
2
|
+
import { K as HookSystem, w as ResourceRegistry } from "../interface-Cb2klgid.mjs";
|
|
3
|
+
import "../types-RLkFVgaw.mjs";
|
|
4
4
|
import { AdditionalRoute, AnyRecord, MiddlewareConfig, PresetHook, RouteSchemaOptions } from "../types/index.mjs";
|
|
5
|
-
import { t as ExternalOpenApiPaths } from "../externalPaths-
|
|
6
|
-
import { a as ssePlugin, c as _default$1, i as _default$5, l as cachingPlugin, n as errorHandlerPlugin, o as CachingOptions, r as SSEOptions, s as CachingRule, t as ErrorHandlerOptions } from "../errorHandler-
|
|
7
|
-
import { t as TracingOptions } from "../tracing-
|
|
5
|
+
import { t as ExternalOpenApiPaths } from "../externalPaths-SyPF2tgK.mjs";
|
|
6
|
+
import { a as ssePlugin, c as _default$1, i as _default$5, l as cachingPlugin, n as errorHandlerPlugin, o as CachingOptions, r as SSEOptions, s as CachingRule, t as ErrorHandlerOptions } from "../errorHandler-CW3OOeYq.mjs";
|
|
7
|
+
import { t as TracingOptions } from "../tracing-8CEbhF0w.mjs";
|
|
8
8
|
import { FastifyInstance, FastifyPluginAsync } from "fastify";
|
|
9
9
|
|
|
10
10
|
//#region src/plugins/requestId.d.ts
|
|
@@ -169,5 +169,4 @@ declare module 'fastify' {
|
|
|
169
169
|
declare const arcCorePlugin: FastifyPluginAsync<ArcCorePluginOptions>;
|
|
170
170
|
declare const _default: FastifyPluginAsync<ArcCorePluginOptions>;
|
|
171
171
|
//#endregion
|
|
172
|
-
export { type ArcCore, type ArcCorePluginOptions, type ArcPlugin, type CachingOptions, type CachingRule, type CreatePluginDefinition, type ErrorHandlerOptions, type GracefulShutdownOptions, type HealthCheck, type HealthOptions, type PluginMeta, type PluginResourceResult, type RequestIdOptions, type SSEOptions, type TracingOptions, _default as arcCorePlugin, arcCorePlugin as arcCorePluginFn, _default$1 as cachingPlugin, cachingPlugin as cachingPluginFn, createPlugin, errorHandlerPlugin, errorHandlerPlugin as errorHandlerPluginFn, _default$2 as gracefulShutdownPlugin, gracefulShutdownPlugin as gracefulShutdownPluginFn, _default$3 as healthPlugin, healthPlugin as healthPluginFn, _default$4 as requestIdPlugin, requestIdPlugin as requestIdPluginFn, _default$5 as ssePlugin, ssePlugin as ssePluginFn };
|
|
173
|
-
//# sourceMappingURL=index.d.mts.map
|
|
172
|
+
export { type ArcCore, type ArcCorePluginOptions, type ArcPlugin, type CachingOptions, type CachingRule, type CreatePluginDefinition, type ErrorHandlerOptions, type GracefulShutdownOptions, type HealthCheck, type HealthOptions, type PluginMeta, type PluginResourceResult, type RequestIdOptions, type SSEOptions, type TracingOptions, _default as arcCorePlugin, arcCorePlugin as arcCorePluginFn, _default$1 as cachingPlugin, cachingPlugin as cachingPluginFn, createPlugin, errorHandlerPlugin, errorHandlerPlugin as errorHandlerPluginFn, _default$2 as gracefulShutdownPlugin, gracefulShutdownPlugin as gracefulShutdownPluginFn, _default$3 as healthPlugin, healthPlugin as healthPluginFn, _default$4 as requestIdPlugin, requestIdPlugin as requestIdPluginFn, _default$5 as ssePlugin, ssePlugin as ssePluginFn };
|
package/dist/plugins/index.mjs
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { p as MUTATION_OPERATIONS } from "../constants-DdXFXQtN.mjs";
|
|
2
2
|
import { r as getOrgId } from "../types-Beqn1Un7.mjs";
|
|
3
3
|
import { t as HookSystem } from "../HookSystem-BsGV-j2l.mjs";
|
|
4
|
-
import { t as hasEvents } from "../typeGuards-
|
|
5
|
-
import { t as requestContext } from "../requestContext-
|
|
6
|
-
import { t as ResourceRegistry } from "../ResourceRegistry-
|
|
7
|
-
import { t as errorHandlerPlugin } from "../errorHandler-
|
|
8
|
-
import { n as caching_default, t as cachingPlugin } from "../caching-
|
|
9
|
-
import { n as sse_default, t as ssePlugin } from "../sse-
|
|
4
|
+
import { t as hasEvents } from "../typeGuards-DwxA1t_L.mjs";
|
|
5
|
+
import { t as requestContext } from "../requestContext-xi6OKBL-.mjs";
|
|
6
|
+
import { t as ResourceRegistry } from "../ResourceRegistry-7Ic20ZMw.mjs";
|
|
7
|
+
import { t as errorHandlerPlugin } from "../errorHandler-C3GY3_ow.mjs";
|
|
8
|
+
import { n as caching_default, t as cachingPlugin } from "../caching-GSDJcA6-.mjs";
|
|
9
|
+
import { n as sse_default, t as ssePlugin } from "../sse-DkqQ1uxb.mjs";
|
|
10
10
|
import fp from "fastify-plugin";
|
|
11
11
|
import { randomUUID } from "crypto";
|
|
12
12
|
|
|
@@ -519,5 +519,4 @@ var arcCorePlugin_default = fp(arcCorePlugin, {
|
|
|
519
519
|
});
|
|
520
520
|
|
|
521
521
|
//#endregion
|
|
522
|
-
export { arcCorePlugin_default as arcCorePlugin, arcCorePlugin as arcCorePluginFn, caching_default as cachingPlugin, cachingPlugin as cachingPluginFn, createPlugin, errorHandlerPlugin, errorHandlerPlugin as errorHandlerPluginFn, gracefulShutdown_default as gracefulShutdownPlugin, gracefulShutdownPlugin as gracefulShutdownPluginFn, health_default as healthPlugin, healthPlugin as healthPluginFn, requestId_default as requestIdPlugin, requestIdPlugin as requestIdPluginFn, sse_default as ssePlugin, ssePlugin as ssePluginFn };
|
|
523
|
-
//# sourceMappingURL=index.mjs.map
|
|
522
|
+
export { arcCorePlugin_default as arcCorePlugin, arcCorePlugin as arcCorePluginFn, caching_default as cachingPlugin, cachingPlugin as cachingPluginFn, createPlugin, errorHandlerPlugin, errorHandlerPlugin as errorHandlerPluginFn, gracefulShutdown_default as gracefulShutdownPlugin, gracefulShutdownPlugin as gracefulShutdownPluginFn, health_default as healthPlugin, healthPlugin as healthPluginFn, requestId_default as requestIdPlugin, requestIdPlugin as requestIdPluginFn, sse_default as ssePlugin, ssePlugin as ssePluginFn };
|
|
@@ -84,5 +84,4 @@ declare module "fastify" {
|
|
|
84
84
|
}
|
|
85
85
|
declare const responseCachePlugin: FastifyPluginAsync<ResponseCacheOptions>;
|
|
86
86
|
//#endregion
|
|
87
|
-
export { ResponseCacheOptions, ResponseCacheRule, ResponseCacheStats, responseCachePlugin as default, responseCachePlugin };
|
|
88
|
-
//# sourceMappingURL=response-cache.d.mts.map
|
|
87
|
+
export { ResponseCacheOptions, ResponseCacheRule, ResponseCacheStats, responseCachePlugin as default, responseCachePlugin };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as hasEvents } from "../typeGuards-
|
|
1
|
+
import { t as hasEvents } from "../typeGuards-DwxA1t_L.mjs";
|
|
2
2
|
import fp from "fastify-plugin";
|
|
3
3
|
|
|
4
4
|
//#region src/plugins/response-cache.ts
|
|
@@ -280,5 +280,4 @@ const responseCachePlugin = fp(responseCachePluginImpl, {
|
|
|
280
280
|
});
|
|
281
281
|
|
|
282
282
|
//#endregion
|
|
283
|
-
export { responseCachePlugin as default, responseCachePlugin };
|
|
284
|
-
//# sourceMappingURL=response-cache.mjs.map
|
|
283
|
+
export { responseCachePlugin as default, responseCachePlugin };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as traced, i as isTracingAvailable, n as _default, r as createSpan, t as TracingOptions } from "../tracing-
|
|
1
|
+
import { a as traced, i as isTracingAvailable, n as _default, r as createSpan, t as TracingOptions } from "../tracing-8CEbhF0w.mjs";
|
|
2
2
|
export { type TracingOptions, createSpan, isTracingAvailable, traced, _default as tracingPlugin };
|
|
@@ -182,5 +182,4 @@ var tracing_default = fp(tracingPlugin, {
|
|
|
182
182
|
});
|
|
183
183
|
|
|
184
184
|
//#endregion
|
|
185
|
-
export { createSpan, isTracingAvailable, traced, tracing_default as tracingPlugin };
|
|
186
|
-
//# sourceMappingURL=tracing-entry.mjs.map
|
|
185
|
+
export { createSpan, isTracingAvailable, traced, tracing_default as tracingPlugin };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as PermissionCheck } from "../types-
|
|
1
|
+
import { t as PermissionCheck } from "../types-RLkFVgaw.mjs";
|
|
2
2
|
import { FastifyReply, FastifyRequest } from "fastify";
|
|
3
3
|
|
|
4
4
|
//#region src/policies/PolicyInterface.d.ts
|
|
@@ -106,7 +106,7 @@ interface PolicyContext {
|
|
|
106
106
|
* can(user, operation, context) {
|
|
107
107
|
* // Check RBAC
|
|
108
108
|
* const allowedRoles = this.config.roles[operation] || [];
|
|
109
|
-
* if (!user.
|
|
109
|
+
* if (!getUserRoles(user).some(r => allowedRoles.includes(r))) {
|
|
110
110
|
* return { allowed: false, reason: 'Insufficient permissions' };
|
|
111
111
|
* }
|
|
112
112
|
*
|
|
@@ -321,7 +321,7 @@ declare module 'fastify' {
|
|
|
321
321
|
interface FastifyRequest {
|
|
322
322
|
policyResult?: PolicyResult;
|
|
323
323
|
}
|
|
324
|
-
}
|
|
324
|
+
}
|
|
325
325
|
//#endregion
|
|
326
326
|
//#region src/policies/helpers.d.ts
|
|
327
327
|
/**
|
|
@@ -429,5 +429,4 @@ declare function allowAll(): PolicyEngine;
|
|
|
429
429
|
*/
|
|
430
430
|
declare function denyAll(reason?: string): PolicyEngine;
|
|
431
431
|
//#endregion
|
|
432
|
-
export { type AccessControlPolicyOptions, type AccessControlStatement, type PolicyContext, type PolicyEngine, type PolicyFactory, type PolicyResult, allowAll, anyPolicy, combinePolicies, createAccessControlPolicy, createPolicyMiddleware, denyAll };
|
|
433
|
-
//# sourceMappingURL=index.d.mts.map
|
|
432
|
+
export { type AccessControlPolicyOptions, type AccessControlStatement, type PolicyContext, type PolicyEngine, type PolicyFactory, type PolicyResult, allowAll, anyPolicy, combinePolicies, createAccessControlPolicy, createPolicyMiddleware, denyAll };
|
package/dist/policies/index.mjs
CHANGED
|
@@ -318,5 +318,4 @@ function denyAll(reason = "Operation not allowed") {
|
|
|
318
318
|
}
|
|
319
319
|
|
|
320
320
|
//#endregion
|
|
321
|
-
export { allowAll, anyPolicy, combinePolicies, createAccessControlPolicy, createPolicyMiddleware, denyAll };
|
|
322
|
-
//# sourceMappingURL=index.mjs.map
|
|
321
|
+
export { allowAll, anyPolicy, combinePolicies, createAccessControlPolicy, createPolicyMiddleware, denyAll };
|
package/dist/presets/index.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import "../elevation-
|
|
2
|
-
import { b as IControllerResponse, k as PaginatedResult, x as IRequestContext } from "../interface-
|
|
3
|
-
import "../types-
|
|
1
|
+
import "../elevation-DGo5shaX.mjs";
|
|
2
|
+
import { b as IControllerResponse, k as PaginatedResult, x as IRequestContext } from "../interface-Cb2klgid.mjs";
|
|
3
|
+
import "../types-RLkFVgaw.mjs";
|
|
4
4
|
import { AnyRecord, PresetResult, ResourceConfig } from "../types/index.mjs";
|
|
5
5
|
import multiTenantPreset, { MultiTenantOptions } from "./multiTenant.mjs";
|
|
6
6
|
|
|
@@ -264,5 +264,4 @@ type PresetInput = string | PresetResult | {
|
|
|
264
264
|
*/
|
|
265
265
|
declare function applyPresets<TDoc = AnyRecord>(config: ResourceConfig<TDoc>, presets?: PresetInput[]): ResourceConfig<TDoc>;
|
|
266
266
|
//#endregion
|
|
267
|
-
export { type AuditedPresetOptions, type IAuditedPreset, type IMultiTenantPreset, type IOwnedByUserPreset, type IPresetController, type ISlugLookupController, type ISoftDeleteController, type ITreeController, type MultiTenantOptions, type OwnedByUserOptions, type SlugLookupOptions, type TreeOptions, applyPresets, auditedPreset, flexibleMultiTenantPreset, getAvailablePresets, getPreset, multiTenantPreset, ownedByUserPreset, registerPreset, slugLookupPreset, softDeletePreset, treePreset };
|
|
268
|
-
//# sourceMappingURL=index.d.mts.map
|
|
267
|
+
export { type AuditedPresetOptions, type IAuditedPreset, type IMultiTenantPreset, type IOwnedByUserPreset, type IPresetController, type ISlugLookupController, type ISoftDeleteController, type ITreeController, type MultiTenantOptions, type OwnedByUserOptions, type SlugLookupOptions, type TreeOptions, applyPresets, auditedPreset, flexibleMultiTenantPreset, getAvailablePresets, getPreset, multiTenantPreset, ownedByUserPreset, registerPreset, slugLookupPreset, softDeletePreset, treePreset };
|
package/dist/presets/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as softDeletePreset, i as slugLookupPreset, n as treePreset, r as ownedByUserPreset, t as auditedPreset } from "../audited-
|
|
1
|
+
import { a as softDeletePreset, i as slugLookupPreset, n as treePreset, r as ownedByUserPreset, t as auditedPreset } from "../audited-CGdLiSlE.mjs";
|
|
2
2
|
import multiTenantPreset from "./multiTenant.mjs";
|
|
3
3
|
|
|
4
4
|
//#region src/presets/index.ts
|
|
@@ -140,5 +140,4 @@ function mergePreset(config, preset) {
|
|
|
140
140
|
}
|
|
141
141
|
|
|
142
142
|
//#endregion
|
|
143
|
-
export { applyPresets, auditedPreset, flexibleMultiTenantPreset, getAvailablePresets, getPreset, multiTenantPreset, ownedByUserPreset, registerPreset, slugLookupPreset, softDeletePreset, treePreset };
|
|
144
|
-
//# sourceMappingURL=index.mjs.map
|
|
143
|
+
export { applyPresets, auditedPreset, flexibleMultiTenantPreset, getAvailablePresets, getPreset, multiTenantPreset, ownedByUserPreset, registerPreset, slugLookupPreset, softDeletePreset, treePreset };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import "../elevation-
|
|
2
|
-
import "../interface-
|
|
3
|
-
import "../types-
|
|
1
|
+
import "../elevation-DGo5shaX.mjs";
|
|
2
|
+
import "../interface-Cb2klgid.mjs";
|
|
3
|
+
import "../types-RLkFVgaw.mjs";
|
|
4
4
|
import { CrudRouteKey, PresetResult } from "../types/index.mjs";
|
|
5
5
|
|
|
6
6
|
//#region src/presets/multiTenant.d.ts
|
|
@@ -21,5 +21,4 @@ interface MultiTenantOptions {
|
|
|
21
21
|
}
|
|
22
22
|
declare function multiTenantPreset(options?: MultiTenantOptions): PresetResult;
|
|
23
23
|
//#endregion
|
|
24
|
-
export { MultiTenantOptions, multiTenantPreset as default, multiTenantPreset };
|
|
25
|
-
//# sourceMappingURL=multiTenant.d.mts.map
|
|
24
|
+
export { MultiTenantOptions, multiTenantPreset as default, multiTenantPreset };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as PermissionCheck } from "./types-
|
|
1
|
+
import { t as PermissionCheck } from "./types-RLkFVgaw.mjs";
|
|
2
2
|
|
|
3
3
|
//#region src/permissions/presets.d.ts
|
|
4
4
|
declare namespace presets_d_exports {
|
|
@@ -54,5 +54,4 @@ declare function fullPublic<TDoc = any>(overrides?: PermissionOverrides<TDoc>):
|
|
|
54
54
|
*/
|
|
55
55
|
declare function readOnly<TDoc = any>(overrides?: PermissionOverrides<TDoc>): ResourcePermissions<TDoc>;
|
|
56
56
|
//#endregion
|
|
57
|
-
export { presets_d_exports as a, readOnly as c, ownerWithAdminBypass as i, authenticated as n, publicRead as o, fullPublic as r, publicReadAdminWrite as s, adminOnly as t };
|
|
58
|
-
//# sourceMappingURL=presets-DzSMwlKj.d.mts.map
|
|
57
|
+
export { presets_d_exports as a, readOnly as c, ownerWithAdminBypass as i, authenticated as n, publicRead as o, fullPublic as r, publicReadAdminWrite as s, adminOnly as t };
|
|
@@ -116,5 +116,4 @@ function readOnly(overrides) {
|
|
|
116
116
|
}
|
|
117
117
|
|
|
118
118
|
//#endregion
|
|
119
|
-
export { presets_exports as a, readOnly as c, ownerWithAdminBypass as i, authenticated as n, publicRead as o, fullPublic as r, publicReadAdminWrite as s, adminOnly as t };
|
|
120
|
-
//# sourceMappingURL=presets-BITljm96.mjs.map
|
|
119
|
+
export { presets_exports as a, readOnly as c, ownerWithAdminBypass as i, authenticated as n, publicRead as o, fullPublic as r, publicReadAdminWrite as s, adminOnly as t };
|
package/dist/prisma-DJbMt3yf.mjs
CHANGED
|
@@ -624,5 +624,4 @@ function createPrismaAdapter(options) {
|
|
|
624
624
|
}
|
|
625
625
|
|
|
626
626
|
//#endregion
|
|
627
|
-
export { createMongooseAdapter as a, MongooseAdapter as i, PrismaQueryParser as n, createPrismaAdapter as r, PrismaAdapter as t };
|
|
628
|
-
//# sourceMappingURL=prisma-DJbMt3yf.mjs.map
|
|
627
|
+
export { createMongooseAdapter as a, MongooseAdapter as i, PrismaQueryParser as n, createPrismaAdapter as r, PrismaAdapter as t };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { D as CrudRepository, a as RepositoryLike, n as DataAdapter, o as SchemaMetadata, s as ValidationResult } from "./interface-
|
|
1
|
+
import { D as CrudRepository, a as RepositoryLike, n as DataAdapter, o as SchemaMetadata, s as ValidationResult } from "./interface-Cb2klgid.mjs";
|
|
2
2
|
import { OpenApiSchemas, ParsedQuery, QueryParserInterface, RouteSchemaOptions } from "./types/index.mjs";
|
|
3
3
|
import { Model } from "mongoose";
|
|
4
4
|
|
|
@@ -271,5 +271,4 @@ declare class PrismaAdapter<TModel = unknown> implements DataAdapter<TModel> {
|
|
|
271
271
|
*/
|
|
272
272
|
declare function createPrismaAdapter<TModel>(options: PrismaAdapterOptions<TModel>): PrismaAdapter<TModel>;
|
|
273
273
|
//#endregion
|
|
274
|
-
export { PrismaQueryParserOptions as a, MongooseAdapterOptions as c, PrismaQueryParser as i, createMongooseAdapter as l, PrismaAdapterOptions as n, createPrismaAdapter as o, PrismaQueryOptions as r, MongooseAdapter as s, PrismaAdapter as t };
|
|
275
|
-
//# sourceMappingURL=prisma-Dg9GoVdj.d.mts.map
|
|
274
|
+
export { PrismaQueryParserOptions as a, MongooseAdapterOptions as c, PrismaQueryParser as i, createMongooseAdapter as l, PrismaAdapterOptions as n, createPrismaAdapter as o, PrismaQueryOptions as r, MongooseAdapter as s, PrismaAdapter as t };
|