@classytic/arc 2.43.0 → 2.45.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.
- package/dist/{EventTransport-tzA7CAB4.mjs → EventTransport-Ci6hGO1Y.mjs} +2 -2
- package/dist/{HookSystem-B6UaKRbF.mjs → HookSystem-CtnnYHME.mjs} +2 -2
- package/dist/{ResourceRegistry-CuCARu2B.mjs → ResourceRegistry-BNoHOx-D.mjs} +2 -2
- package/dist/acquire-BW_2Dt60.mjs +35 -0
- package/dist/{actionPermissions-BotX1YOa.mjs → actionPermissions-TAc_6LCw.mjs} +13 -17
- package/dist/audit/index.d.mts +6 -6
- package/dist/audit/index.mjs +4 -4
- package/dist/auth/audit.d.mts +8 -8
- package/dist/auth/audit.mjs +1 -1
- package/dist/auth/index.d.mts +5 -5
- package/dist/auth/index.mjs +14 -12
- package/dist/auth/redis-session.d.mts +4 -5
- package/dist/auth/redis-session.mjs +1 -1
- package/dist/{authorizationDecision-DQYrkl5f.mjs → authorizationDecision-BixzgirP.mjs} +4 -4
- package/dist/{boundedMap-BULzfXYU.mjs → boundedMap-DQfXgxMo.mjs} +1 -1
- package/dist/{buildHandler-CRQ8EcX5.mjs → buildHandler-mEUmO2_u.mjs} +4 -4
- package/dist/cache/index.d.mts +9 -9
- package/dist/cache/index.mjs +4 -4
- package/dist/{caching-Cc2M1DwO.mjs → caching-TQfW2QX7.mjs} +2 -2
- package/dist/{claimed-B10RTfkM.mjs → claimed-CnEEOHuL.mjs} +1 -1
- package/dist/cleanup/index.d.mts +14 -14
- package/dist/cleanup/index.mjs +4 -4
- package/dist/cli/commands/describe.d.mts +5 -5
- package/dist/cli/commands/describe.mjs +3 -3
- package/dist/cli/commands/docs.d.mts +2 -3
- package/dist/cli/commands/docs.mjs +3 -3
- package/dist/cli/commands/doctor.d.mts +2 -3
- package/dist/cli/commands/doctor.mjs +1 -1
- package/dist/cli/commands/generate.mjs +2 -3
- package/dist/cli/commands/init.mjs +2 -3
- package/dist/cli/commands/introspect.d.mts +2 -3
- package/dist/cli/commands/introspect.mjs +2 -2
- package/dist/cli/index.mjs +3 -3
- package/dist/{constants-Cu7Mx7_U.mjs → constants-B90SnSQn.mjs} +1 -1
- package/dist/context/index.d.mts +9 -9
- package/dist/context/index.mjs +5 -5
- package/dist/core/index.d.mts +3 -3
- package/dist/core/index.mjs +8 -8
- package/dist/{core-Cb0LjccA.mjs → core-DV9PSXtr.mjs} +13 -4
- package/dist/{createActionRouter-xjqonMRO.mjs → createActionRouter-BgPCYU2U.mjs} +18 -8
- package/dist/{createAggregationRouter-zRYWw_5D.mjs → createAggregationRouter-lNCkDwKe.mjs} +7 -7
- package/dist/{createApp-D-953ZAq.mjs → createApp-BSBPntOQ.mjs} +34 -32
- package/dist/{createMcpServer-C9cxS8zt.d.mts → createMcpServer-DSztofa9.d.mts} +1 -1
- package/dist/{defineAggregation-Bm8RjMbq.mjs → defineAggregation-CwD8_XNd.mjs} +1 -1
- package/dist/{defineResource-DIC7JZGU.mjs → defineResource-CRkhRRSj.mjs} +7 -7
- package/dist/discovery/index.d.mts +6 -7
- package/dist/discovery/index.mjs +1 -1
- package/dist/docs/index.d.mts +3 -3
- package/dist/docs/index.mjs +3 -3
- package/dist/{elevation-DG8SrLN-.mjs → elevation-BAfsnnO0.mjs} +5 -5
- package/dist/encryption/index.d.mts +5 -5
- package/dist/encryption/index.mjs +3 -3
- package/dist/{errorHandler-BnfDviL1.mjs → errorHandler-DbHGwrQM.mjs} +3 -3
- package/dist/{errors-CtrywMHP.mjs → errors-C9G4A8cN.mjs} +1 -1
- package/dist/{eventPlugin-Q6BhzHzs.mjs → eventPlugin-Dghr7iL5.mjs} +8 -8
- package/dist/{eventTypes-Cdhm6ZlV.mjs → eventTypes-DDy7BMAn.mjs} +2 -2
- package/dist/events/index.d.mts +14 -14
- package/dist/events/index.mjs +7 -7
- package/dist/events/transports/redis-stream-entry.mjs +4 -4
- package/dist/events/transports/redis.d.mts +4 -5
- package/dist/events/transports/redis.mjs +2 -2
- package/dist/factory/index.d.mts +16 -16
- package/dist/factory/index.mjs +6 -6
- package/dist/{fastify-augmentation-DhUJ-mvo.d.mts → fastify-augmentation-DRlCIWE9.d.mts} +2 -2
- package/dist/{fields-ToPYpMqS.mjs → fields-Da--1DNS.mjs} +1 -1
- package/dist/{filter-merge-IpGywvym.mjs → filter-merge-BYKBa9b2.mjs} +1 -1
- package/dist/{generate-DRTkLlIl.mjs → generate-Cm5Ct81v.mjs} +2 -2
- package/dist/{headers-BbkIF6vA.mjs → headers-B6DRXXzT.mjs} +2 -2
- package/dist/{health-D-Ft6JM6.mjs → health-hRGgxnOC.mjs} +1 -1
- package/dist/{health-DqbsG-_w.mjs → health-pLbfckGB.mjs} +1 -1
- package/dist/hooks/index.d.mts +1 -1
- package/dist/hooks/index.mjs +2 -3
- package/dist/idempotency/index.d.mts +8 -6
- package/dist/idempotency/index.mjs +108 -46
- package/dist/idempotency/redis.d.mts +1 -1
- package/dist/idempotency/redis.mjs +30 -2
- package/dist/{index-CRoPtISf.d.mts → index-Beg3aNnK.d.mts} +3 -31
- package/dist/{index-JdbZAIsm.d.mts → index-CUJvoyw3.d.mts} +1 -1
- package/dist/{index-mqaqZNpe.d.mts → index-WH7xgvxS.d.mts} +52 -1
- package/dist/{index-C8zVGYsk.d.mts → index-uhkUA5-U.d.mts} +4 -4
- package/dist/index.d.mts +5 -5
- package/dist/index.mjs +11 -11
- package/dist/{init-B_oUYDXI.mjs → init-lpaUB-Ph.mjs} +1 -1
- package/dist/integrations/event-gateway.d.mts +3 -4
- package/dist/integrations/event-gateway.mjs +2 -2
- package/dist/integrations/index.d.mts +1 -1
- package/dist/integrations/index.mjs +1 -1
- package/dist/integrations/jobs/index.mjs +3 -3
- package/dist/integrations/mcp/index.d.mts +36 -36
- package/dist/integrations/mcp/index.mjs +2 -2
- package/dist/integrations/mcp/testing.d.mts +8 -9
- package/dist/integrations/mcp/testing.mjs +2 -2
- package/dist/integrations/streamline.d.mts +12 -13
- package/dist/integrations/streamline.mjs +18 -4
- package/dist/integrations/webhooks.d.mts +23 -23
- package/dist/integrations/webhooks.mjs +3 -3
- package/dist/integrations/websocket-pushref-redis.d.mts +4 -5
- package/dist/integrations/websocket-pushref-redis.mjs +1 -1
- package/dist/integrations/websocket-redis.d.mts +4 -5
- package/dist/integrations/websocket-redis.mjs +1 -1
- package/dist/integrations/websocket.mjs +2 -2
- package/dist/{interface-C0395yUN.d.mts → interface-JJzwH4Ro.d.mts} +22 -2
- package/dist/{jsonBody-B4YVGcql.mjs → jsonBody-CzKHE-Fg.mjs} +2 -2
- package/dist/{keys-B2KtgMLJ.mjs → keys-BoZKnBel.mjs} +1 -1
- package/dist/{loadResources-Dn4lalw2.mjs → loadResources-BEKG6bP9.mjs} +3 -3
- package/dist/{loadResourcesFromEntry-3sLYbuse.mjs → loadResourcesFromEntry-BEPA0ptL.mjs} +2 -2
- package/dist/logger/index.d.mts +9 -10
- package/dist/logger/index.mjs +2 -3
- package/dist/{logger-DXjfIqjV.mjs → logger-vxu0DXf_.mjs} +1 -1
- package/dist/{mcpPlugin-C08HalN5.mjs → mcpPlugin-DP_UB0LK.mjs} +42 -29
- package/dist/{memory-9Cp7611C.mjs → memory-DJN6kyC8.mjs} +3 -3
- package/dist/{metrics-CWI11eRu.mjs → metrics-wfr7XFE7.mjs} +3 -3
- package/dist/middleware/index.d.mts +5 -5
- package/dist/middleware/index.mjs +3 -3
- package/dist/migrations/index.d.mts +13 -13
- package/dist/migrations/index.mjs +2 -2
- package/dist/{module-BSvOQC7E.mjs → module-BtdcGn_E.mjs} +1 -1
- package/dist/mongodb-memory-server-Cn57YIsc.mjs +35539 -0
- package/dist/mongoose-DzFjTtBN.mjs +67451 -0
- package/dist/{multiTenant-cY0FkDiA.d.mts → multiTenant-CAtYlW6H.d.mts} +1 -1
- package/dist/{multipartBody-CXM2a-Dy.mjs → multipartBody-NHGOuUnG.mjs} +1 -1
- package/dist/node-C0HB_V6E.mjs +41236 -0
- package/dist/{openapi-DT_G4VhY.mjs → openapi-BCOaGAgE.mjs} +6 -6
- package/dist/outbox-admin/index.d.mts +2 -2
- package/dist/outbox-admin/index.mjs +5 -5
- package/dist/{outbox-module-Bjgzl6tg.mjs → outbox-module-BVDiMwXb.mjs} +9 -9
- package/dist/permissions/index.mjs +7 -7
- package/dist/{permissions-Cm0uYHvd.mjs → permissions-IdHJ0_5V.mjs} +9 -9
- package/dist/{pipe-BqeGT6UO.mjs → pipe-BPJPifhi.mjs} +2 -2
- package/dist/pipeline/index.d.mts +7 -7
- package/dist/pipeline/index.mjs +2 -2
- package/dist/{plan-FVR6LP59.mjs → plan-CEedaMlr.mjs} +1 -1
- package/dist/{plugin-BccET1tL.mjs → plugin-BDBOS3-c.mjs} +39 -27
- package/dist/plugins/index.d.mts +8 -8
- package/dist/plugins/index.mjs +17 -17
- package/dist/plugins/response-cache.d.mts +5 -6
- package/dist/plugins/response-cache.mjs +4 -4
- package/dist/plugins/tracing-entry.mjs +2 -2
- package/dist/{pluralize-CVIOcgMF.mjs → pluralize-B4FcZEyI.mjs} +1 -1
- package/dist/presets/filesUpload.d.mts +7 -7
- package/dist/presets/filesUpload.mjs +5 -5
- package/dist/presets/index.d.mts +14 -14
- package/dist/presets/index.mjs +2 -2
- package/dist/presets/multiTenant.d.mts +1 -1
- package/dist/presets/multiTenant.mjs +5 -5
- package/dist/presets/search.d.mts +8 -9
- package/dist/presets/search.mjs +2 -2
- package/dist/{presets-Cpvj6fGO.mjs → presets-BPjNc-Np.mjs} +4 -4
- package/dist/{projection-Ce4aQhQk.mjs → projection-BXUOYosj.mjs} +2 -2
- package/dist/{queryCachePlugin-CFWNH8aT.mjs → queryCachePlugin-s4pBvjFF.mjs} +6 -6
- package/dist/{rateLimitKey-C4O-kPm0.mjs → rateLimitKey-C4mkCwQ-.mjs} +1 -1
- package/dist/{realtime-DmPE9S54.mjs → realtime-MPj6eIoV.mjs} +11 -11
- package/dist/{redis-vLvtcGy_.d.mts → redis-BDgv9Glw.d.mts} +5 -1
- package/dist/registry/index.d.mts +9 -9
- package/dist/registry/index.mjs +3 -3
- package/dist/{registry-Bcz9G1bh.mjs → registry-DIdh6mWE.mjs} +5 -4
- package/dist/{renewingLease-qODa7KJQ.mjs → renewingLease-boGRXWCr.mjs} +1 -1
- package/dist/{replyHelpers-CG_VtVgS.mjs → replyHelpers-BW_p67QD.mjs} +2 -2
- package/dist/{requestContext-Dsu9P1bV.mjs → requestContext-B8JKbeb7.mjs} +1 -1
- package/dist/{requirement-KDdoRcOP.mjs → requirement-tXpcD56f.mjs} +1 -1
- package/dist/{resourceRateLimit-dSjVr1pk.mjs → resourceRateLimit-DWob9nQ8.mjs} +2 -2
- package/dist/rolldown-runtime-AD16t29l.mjs +45 -0
- package/dist/{routeValidator-D36SW8qt.mjs → routeValidator-CnmenC4Y.mjs} +1 -1
- package/dist/{runtimeCapabilities-0tccjRlj.mjs → runtimeCapabilities-C7gAbIxC.mjs} +1 -1
- package/dist/{schedules-C-OpmHBq.mjs → schedules-Dr9gNFzx.mjs} +5 -5
- package/dist/{schemaConverter-BORek3O-.mjs → schemaConverter-rzBovk00.mjs} +2 -2
- package/dist/{schemaIR-C7Vbp71I.mjs → schemaIR-GrOK1JO4.mjs} +2 -2
- package/dist/schemas/index.d.mts +10 -10
- package/dist/schemas/index.mjs +1 -1
- package/dist/scim/index.d.mts +13 -13
- package/dist/scim/index.mjs +2 -2
- package/dist/scope/index.d.mts +3 -3
- package/dist/scope/index.mjs +5 -5
- package/dist/{scope-DQthe88b.mjs → scope-DpOpxyHT.mjs} +4 -4
- package/dist/{shutdown-MqA81z_P.mjs → shutdown-BW8qwgpx.mjs} +1 -1
- package/dist/{simpleEqualityMatcher-auW8QjXN.mjs → simpleEqualityMatcher-WdZw6GOt.mjs} +1 -1
- package/dist/sse-D8AgoUN3.mjs +212 -0
- package/dist/{sseStream-B5_Afiqn.mjs → sseStream-B7rPhIQw.mjs} +2 -2
- package/dist/{store-helpers-BOzk-CuX.mjs → store-helpers-Bxk7TDgG.mjs} +1 -1
- package/dist/{streaming-DjTQhZrN.mjs → streaming-BLg1buwL.mjs} +1 -1
- package/dist/{subscriberIdentity-CW39uA8G.mjs → subscriberIdentity-Cxp19Ked.mjs} +1 -1
- package/dist/{tenancy--ed9eH_z.mjs → tenancy-D7jo78AP.mjs} +2 -2
- package/dist/{tenantPreparation-BKon6Yox.mjs → tenantPreparation-DqJnokDW.mjs} +4 -4
- package/dist/testing/cleanupStoreContract.d.mts +4 -5
- package/dist/testing/cleanupStoreContract.mjs +1 -1
- package/dist/testing/index.d.mts +35 -35
- package/dist/testing/index.mjs +16 -15
- package/dist/testing/outboxStoreContract.d.mts +4 -5
- package/dist/testing/outboxStoreContract.mjs +2 -2
- package/dist/testing/requiredPorts.d.mts +4 -5
- package/dist/testing/requiredPorts.mjs +2 -2
- package/dist/testing/storageContract.d.mts +4 -5
- package/dist/testing/storageContract.mjs +1 -1
- package/dist/{timing-qczZ0YC-.mjs → timing-Y6_ZpoYG.mjs} +1 -1
- package/dist/{transactionContext-DjFkrNG6.mjs → transactionContext-BWp0MBGL.mjs} +1 -1
- package/dist/{typeGuards-CySF12G-.mjs → typeGuards-CtZJypJO.mjs} +1 -1
- package/dist/types/index.d.mts +1 -1
- package/dist/types/index.mjs +1 -1
- package/dist/types/storage.mjs +1 -1
- package/dist/{types-Bk9NOgOC.mjs → types-4JKkSvds.mjs} +4 -4
- package/dist/{types-B4Aq4Sdj.d.mts → types-D3Ixsh00.d.mts} +1 -1
- package/dist/usage/index.d.mts +4 -4
- package/dist/usage/index.mjs +4 -4
- package/dist/{userHelpers-aklawRaK.mjs → userHelpers-Nc5ePCsf.mjs} +1 -1
- package/dist/utils/index.d.mts +47 -47
- package/dist/utils/index.mjs +12 -12
- package/dist/{utils-ec1oTo1n.mjs → utils-QWSIKqAk.mjs} +4 -4
- package/dist/{validate-9yzHC1e2.mjs → validate-CT4umNhp.mjs} +3 -3
- package/dist/{versioning-Bsb51gGT.d.mts → versioning-Bqm_57Qt.d.mts} +23 -1
- package/dist/{versioning-fhhWHV74.mjs → versioning-JIqxO64K.mjs} +3 -3
- package/dist/{workScope-zpPyge4t.mjs → workScope-BDjGXwU9.mjs} +2 -2
- package/package.json +47 -52
- package/dist/rolldown-runtime-D1w9Y1VJ.mjs +0 -15
- package/dist/sse-CYzQBVFe.mjs +0 -89
package/dist/presets/index.d.mts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
|
|
2
2
|
import { t as AnyRecord } from "../base-CZyixEQR.mjs";
|
|
3
|
-
import {
|
|
3
|
+
import { Hn as IRequestContext, L as ResourceConfig, Vn as IControllerResponse, W as PresetResult, i as PaginationResult } from "../index-WH7xgvxS.mjs";
|
|
4
4
|
import { FilesUploadPresetOptions, FilesUploadPresetPermissions, FilesUploadPresetRoutes, filesUploadPreset } from "./filesUpload.mjs";
|
|
5
|
-
import { n as multiTenantPreset, r as TenantFieldSpec, t as MultiTenantOptions } from "../multiTenant-
|
|
5
|
+
import { n as multiTenantPreset, r as TenantFieldSpec, t as MultiTenantOptions } from "../multiTenant-CAtYlW6H.mjs";
|
|
6
6
|
import { SearchHandler, SearchPresetOptions, SearchRouteConfig, searchPreset } from "./search.mjs";
|
|
7
7
|
//#region src/presets/audited.d.ts
|
|
8
8
|
interface AuditedPresetOptions {
|
|
@@ -14,7 +14,7 @@ interface AuditedPresetOptions {
|
|
|
14
14
|
/**
|
|
15
15
|
* Audited preset - adds createdBy/updatedBy tracking
|
|
16
16
|
*/
|
|
17
|
-
declare function auditedPreset(options?: AuditedPresetOptions): PresetResult;
|
|
17
|
+
export declare function auditedPreset(options?: AuditedPresetOptions): PresetResult;
|
|
18
18
|
//#endregion
|
|
19
19
|
//#region src/presets/bulk.d.ts
|
|
20
20
|
type BulkOperation = "createMany" | "updateMany" | "deleteMany";
|
|
@@ -24,7 +24,7 @@ interface BulkPresetOptions {
|
|
|
24
24
|
/** Max items per bulk create (default: 1000) */
|
|
25
25
|
maxCreateItems?: number;
|
|
26
26
|
}
|
|
27
|
-
declare function bulkPreset(opts?: BulkPresetOptions): PresetResult;
|
|
27
|
+
export declare function bulkPreset(opts?: BulkPresetOptions): PresetResult;
|
|
28
28
|
//#endregion
|
|
29
29
|
//#region src/presets/ownedByUser.d.ts
|
|
30
30
|
interface OwnedByUserOptions {
|
|
@@ -42,22 +42,22 @@ interface OwnedByUserOptions {
|
|
|
42
42
|
*/
|
|
43
43
|
missingOwner?: "deny" | "allow";
|
|
44
44
|
}
|
|
45
|
-
declare function ownedByUserPreset(options?: OwnedByUserOptions): PresetResult;
|
|
45
|
+
export declare function ownedByUserPreset(options?: OwnedByUserOptions): PresetResult;
|
|
46
46
|
//#endregion
|
|
47
47
|
//#region src/presets/slugLookup.d.ts
|
|
48
48
|
interface SlugLookupOptions {
|
|
49
49
|
slugField?: string;
|
|
50
50
|
}
|
|
51
|
-
declare function slugLookupPreset(options?: SlugLookupOptions): PresetResult;
|
|
51
|
+
export declare function slugLookupPreset(options?: SlugLookupOptions): PresetResult;
|
|
52
52
|
//#endregion
|
|
53
53
|
//#region src/presets/softDelete.d.ts
|
|
54
|
-
declare function softDeletePreset(): PresetResult;
|
|
54
|
+
export declare function softDeletePreset(): PresetResult;
|
|
55
55
|
//#endregion
|
|
56
56
|
//#region src/presets/tree.d.ts
|
|
57
57
|
interface TreeOptions {
|
|
58
58
|
parentField?: string;
|
|
59
59
|
}
|
|
60
|
-
declare function treePreset(options?: TreeOptions): PresetResult;
|
|
60
|
+
export declare function treePreset(options?: TreeOptions): PresetResult;
|
|
61
61
|
//#endregion
|
|
62
62
|
//#region src/presets/types.d.ts
|
|
63
63
|
/**
|
|
@@ -271,21 +271,21 @@ type PresetFactory = (options?: AnyRecord) => PresetResult;
|
|
|
271
271
|
/**
|
|
272
272
|
* Get preset by name with options
|
|
273
273
|
*/
|
|
274
|
-
declare function getPreset(nameOrConfig: string | {
|
|
274
|
+
export declare function getPreset(nameOrConfig: string | {
|
|
275
275
|
name: string;
|
|
276
276
|
[key: string]: unknown;
|
|
277
277
|
}): PresetResult;
|
|
278
278
|
/**
|
|
279
279
|
* Register a custom preset
|
|
280
280
|
*/
|
|
281
|
-
declare function registerPreset(name: string, factory: PresetFactory, options?: {
|
|
281
|
+
export declare function registerPreset(name: string, factory: PresetFactory, options?: {
|
|
282
282
|
override?: boolean;
|
|
283
283
|
}): void;
|
|
284
284
|
/**
|
|
285
285
|
* Get all available preset names
|
|
286
286
|
*/
|
|
287
|
-
declare function getAvailablePresets(): string[];
|
|
288
|
-
type PresetInput = string | PresetResult | {
|
|
287
|
+
export declare function getAvailablePresets(): string[];
|
|
288
|
+
export type PresetInput = string | PresetResult | {
|
|
289
289
|
name: string;
|
|
290
290
|
[key: string]: unknown;
|
|
291
291
|
};
|
|
@@ -293,6 +293,6 @@ type PresetInput = string | PresetResult | {
|
|
|
293
293
|
* Apply presets to resource config.
|
|
294
294
|
* Validates preset combinations for conflicts before merging.
|
|
295
295
|
*/
|
|
296
|
-
declare function applyPresets<TDoc = AnyRecord>(config: ResourceConfig<TDoc>, presets?: PresetInput[]): ResourceConfig<TDoc>;
|
|
296
|
+
export declare function applyPresets<TDoc = AnyRecord>(config: ResourceConfig<TDoc>, presets?: PresetInput[]): ResourceConfig<TDoc>;
|
|
297
297
|
//#endregion
|
|
298
|
-
export { type AuditedPresetOptions, type BulkOperation, type BulkPresetOptions, type FilesUploadPresetOptions, type FilesUploadPresetPermissions, type FilesUploadPresetRoutes, type IAuditedPreset, type IMultiTenantPreset, type IOwnedByUserPreset, type IPresetController, type ISlugLookupController, type ISoftDeleteController, type ITreeController, type MultiTenantOptions, type OwnedByUserOptions,
|
|
298
|
+
export { type AuditedPresetOptions, type BulkOperation, type BulkPresetOptions, type FilesUploadPresetOptions, type FilesUploadPresetPermissions, type FilesUploadPresetRoutes, type IAuditedPreset, type IMultiTenantPreset, type IOwnedByUserPreset, type IPresetController, type ISlugLookupController, type ISoftDeleteController, type ITreeController, type MultiTenantOptions, type OwnedByUserOptions, type SearchHandler, type SearchPresetOptions, type SearchRouteConfig, type SlugLookupOptions, type TenantFieldSpec, type TreeOptions, filesUploadPreset, multiTenantPreset, searchPreset };
|
package/dist/presets/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { a as treePreset, c as ownedByUserPreset, i as registerPreset, l as bulkPreset, n as getAvailablePresets, o as softDeletePreset, r as getPreset, s as slugLookupPreset, t as applyPresets, u as auditedPreset } from "../presets-
|
|
1
|
+
/*! @classytic/arc v2.45.0 | MIT | https://classytic.com */
|
|
2
|
+
import { a as treePreset, c as ownedByUserPreset, i as registerPreset, l as bulkPreset, n as getAvailablePresets, o as softDeletePreset, r as getPreset, s as slugLookupPreset, t as applyPresets, u as auditedPreset } from "../presets-BPjNc-Np.mjs";
|
|
3
3
|
import { filesUploadPreset } from "./filesUpload.mjs";
|
|
4
4
|
import { multiTenantPreset } from "./multiTenant.mjs";
|
|
5
5
|
import { searchPreset } from "./search.mjs";
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
|
|
2
|
-
import { n as multiTenantPreset, r as TenantFieldSpec, t as MultiTenantOptions } from "../multiTenant-
|
|
2
|
+
import { n as multiTenantPreset, r as TenantFieldSpec, t as MultiTenantOptions } from "../multiTenant-CAtYlW6H.mjs";
|
|
3
3
|
export { MultiTenantOptions, type TenantFieldSpec, multiTenantPreset };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import "../constants-
|
|
3
|
-
import { t as ArcError } from "../errors-
|
|
4
|
-
import { u as getRequestScope } from "../types-
|
|
5
|
-
import { i as tagTenantPreparation, t as applyTenantPreparation } from "../tenantPreparation-
|
|
1
|
+
/*! @classytic/arc v2.45.0 | MIT | https://classytic.com */
|
|
2
|
+
import "../constants-B90SnSQn.mjs";
|
|
3
|
+
import { t as ArcError } from "../errors-C9G4A8cN.mjs";
|
|
4
|
+
import { u as getRequestScope } from "../types-4JKkSvds.mjs";
|
|
5
|
+
import { i as tagTenantPreparation, t as applyTenantPreparation } from "../tenantPreparation-DqJnokDW.mjs";
|
|
6
6
|
//#region src/presets/multiTenant.ts
|
|
7
7
|
function createTenantMiddleware(specs, mode) {
|
|
8
8
|
const preparation = {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
2
|
import { l as PermissionCheck } from "../base-CZyixEQR.mjs";
|
|
3
|
-
import { Dt as RouteMcpConfig, Et as RouteDefinition,
|
|
3
|
+
import { Dt as RouteMcpConfig, Et as RouteDefinition, Ln as ControllerHandler, W as PresetResult } from "../index-WH7xgvxS.mjs";
|
|
4
4
|
//#region src/presets/search.d.ts
|
|
5
5
|
/**
|
|
6
6
|
* Search Preset — backend-agnostic search / vector / embed routes
|
|
@@ -46,7 +46,7 @@ import { Dt as RouteMcpConfig, Et as RouteDefinition, Mn as ControllerHandler, W
|
|
|
46
46
|
* kit happens to ship these methods, without forcing every repo to declare
|
|
47
47
|
* them.
|
|
48
48
|
*/
|
|
49
|
-
interface SearchableRepository {
|
|
49
|
+
export interface SearchableRepository {
|
|
50
50
|
search?(query: unknown, options?: unknown): Promise<unknown>;
|
|
51
51
|
searchSimilar?(query: unknown, options?: unknown): Promise<unknown>;
|
|
52
52
|
embed?(input: unknown): Promise<number[]>;
|
|
@@ -56,8 +56,8 @@ interface SearchableRepository {
|
|
|
56
56
|
* non-raw route handler) and returns either the raw result (wrapped into
|
|
57
57
|
* `{ success: true, data }` by arc) or an explicit `IControllerResponse`.
|
|
58
58
|
*/
|
|
59
|
-
type SearchHandler = ControllerHandler;
|
|
60
|
-
interface SearchRouteConfig {
|
|
59
|
+
export type SearchHandler = ControllerHandler;
|
|
60
|
+
export interface SearchRouteConfig {
|
|
61
61
|
/**
|
|
62
62
|
* User-supplied handler. When omitted, the preset auto-synthesises a handler
|
|
63
63
|
* from `options.repository` (calling `repo.search` / `repo.searchSimilar` /
|
|
@@ -95,8 +95,8 @@ interface SearchRouteConfig {
|
|
|
95
95
|
* - `true` → mount with defaults, auto-wire from `repository`
|
|
96
96
|
* - `SearchRouteConfig` → explicit config (and optional handler override)
|
|
97
97
|
*/
|
|
98
|
-
type SearchSection = true | SearchRouteConfig;
|
|
99
|
-
interface SearchPresetOptions {
|
|
98
|
+
export type SearchSection = true | SearchRouteConfig;
|
|
99
|
+
export interface SearchPresetOptions {
|
|
100
100
|
/**
|
|
101
101
|
* Repository exposing `search`/`searchSimilar`/`embed`. When provided,
|
|
102
102
|
* any section without an explicit `handler` is auto-wired to the matching
|
|
@@ -135,6 +135,5 @@ interface SearchPresetOptions {
|
|
|
135
135
|
* The preset itself stays DB-agnostic: nothing is imported from mongokit —
|
|
136
136
|
* it only feature-detects the optional methods on whatever repo you pass.
|
|
137
137
|
*/
|
|
138
|
-
declare function searchPreset(options?: SearchPresetOptions): PresetResult;
|
|
139
|
-
//#endregion
|
|
140
|
-
export { SearchHandler, SearchPresetOptions, SearchRouteConfig, SearchSection, SearchableRepository, searchPreset };
|
|
138
|
+
export declare function searchPreset(options?: SearchPresetOptions): PresetResult;
|
|
139
|
+
//#endregion
|
package/dist/presets/search.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { B as requireAuth, F as allowPublic } from "../permissions-
|
|
1
|
+
/*! @classytic/arc v2.45.0 | MIT | https://classytic.com */
|
|
2
|
+
import { B as requireAuth, F as allowPublic } from "../permissions-IdHJ0_5V.mjs";
|
|
3
3
|
//#region src/presets/search.ts
|
|
4
4
|
const BUILTINS = [
|
|
5
5
|
{
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { l as UnauthorizedError } from "./errors-
|
|
3
|
-
import { b as isElevated, n as PUBLIC_SCOPE } from "./types-
|
|
4
|
-
import { B as requireAuth, F as allowPublic, U as requireRoles } from "./permissions-
|
|
1
|
+
/*! @classytic/arc v2.45.0 | MIT | https://classytic.com */
|
|
2
|
+
import { l as UnauthorizedError } from "./errors-C9G4A8cN.mjs";
|
|
3
|
+
import { b as isElevated, n as PUBLIC_SCOPE } from "./types-4JKkSvds.mjs";
|
|
4
|
+
import { B as requireAuth, F as allowPublic, U as requireRoles } from "./permissions-IdHJ0_5V.mjs";
|
|
5
5
|
import { multiTenantPreset } from "./presets/multiTenant.mjs";
|
|
6
6
|
//#region src/presets/audited.ts
|
|
7
7
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { c as getOrgId, f as getScopeContextMap, g as getUserId, m as getTeamId, x as isMember } from "./types-
|
|
1
|
+
/*! @classytic/arc v2.45.0 | MIT | https://classytic.com */
|
|
2
|
+
import { c as getOrgId, f as getScopeContextMap, g as getUserId, m as getTeamId, x as isMember } from "./types-4JKkSvds.mjs";
|
|
3
3
|
//#region src/scope/projection.ts
|
|
4
4
|
/**
|
|
5
5
|
* Compute the request-scope projection. Returns `undefined` when no
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import {
|
|
3
|
-
import { i as versionKey, r as tagVersionKey } from "./keys-
|
|
4
|
-
import { n as declareRuntimeCapability } from "./runtimeCapabilities-
|
|
5
|
-
import { t as hasEvents } from "./typeGuards-
|
|
6
|
-
import { t as MemoryCacheStore } from "./memory-
|
|
1
|
+
/*! @classytic/arc v2.45.0 | MIT | https://classytic.com */
|
|
2
|
+
import { r as __exportAll } from "./rolldown-runtime-AD16t29l.mjs";
|
|
3
|
+
import { i as versionKey, r as tagVersionKey } from "./keys-BoZKnBel.mjs";
|
|
4
|
+
import { n as declareRuntimeCapability } from "./runtimeCapabilities-C7gAbIxC.mjs";
|
|
5
|
+
import { t as hasEvents } from "./typeGuards-CtZJypJO.mjs";
|
|
6
|
+
import { t as MemoryCacheStore } from "./memory-DJN6kyC8.mjs";
|
|
7
7
|
import fp from "fastify-plugin";
|
|
8
8
|
//#region src/cache/QueryCache.ts
|
|
9
9
|
const MISS = Object.freeze({
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import {
|
|
3
|
-
import { t as arcLog } from "./logger-
|
|
4
|
-
import { t as simpleEqualityMatcher } from "./simpleEqualityMatcher-
|
|
5
|
-
import { n as getUserRoles } from "./userHelpers-
|
|
6
|
-
import { n as isEventVisible, t as eventAudienceOf } from "./tenancy
|
|
7
|
-
import { t as applyFieldReadPermissions } from "./fields-
|
|
8
|
-
import { a as promoteStreamTokenToHeader } from "./streaming-
|
|
9
|
-
import { n as evaluateAndApplyPermission } from "./authorizationDecision-
|
|
10
|
-
import { t as openSseStream } from "./sseStream-
|
|
11
|
-
import { n as arcRouteValidatorCompiler } from "./routeValidator-
|
|
1
|
+
/*! @classytic/arc v2.45.0 | MIT | https://classytic.com */
|
|
2
|
+
import { r as __exportAll } from "./rolldown-runtime-AD16t29l.mjs";
|
|
3
|
+
import { t as arcLog } from "./logger-vxu0DXf_.mjs";
|
|
4
|
+
import { t as simpleEqualityMatcher } from "./simpleEqualityMatcher-WdZw6GOt.mjs";
|
|
5
|
+
import { n as getUserRoles } from "./userHelpers-Nc5ePCsf.mjs";
|
|
6
|
+
import { n as isEventVisible, t as eventAudienceOf } from "./tenancy-D7jo78AP.mjs";
|
|
7
|
+
import { t as applyFieldReadPermissions } from "./fields-Da--1DNS.mjs";
|
|
8
|
+
import { a as promoteStreamTokenToHeader } from "./streaming-BLg1buwL.mjs";
|
|
9
|
+
import { n as evaluateAndApplyPermission } from "./authorizationDecision-BixzgirP.mjs";
|
|
10
|
+
import { t as openSseStream } from "./sseStream-B7rPhIQw.mjs";
|
|
11
|
+
import { n as arcRouteValidatorCompiler } from "./routeValidator-CnmenC4Y.mjs";
|
|
12
12
|
import fp from "fastify-plugin";
|
|
13
13
|
//#region src/plugins/realtime.ts
|
|
14
14
|
var realtime_exports = /* @__PURE__ */ __exportAll({
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
2
|
import { n as UpstashKeyValueCommands, t as IoredisKeyValueCommands } from "./redisShapes-CQksY67q.mjs";
|
|
3
|
-
import {
|
|
3
|
+
import { i as IdempotencyStore, r as IdempotencyResult, t as IdempotencyAcquisition } from "./interface-JJzwH4Ro.mjs";
|
|
4
4
|
//#region src/idempotency/stores/redis.d.ts
|
|
5
5
|
interface RedisClient {
|
|
6
6
|
get(key: string): Promise<string | null>;
|
|
@@ -28,6 +28,8 @@ interface RedisIdempotencyStoreOptions {
|
|
|
28
28
|
declare class RedisIdempotencyStore implements IdempotencyStore {
|
|
29
29
|
readonly name = "redis";
|
|
30
30
|
readonly supportsFencedCompletion: boolean;
|
|
31
|
+
/** The fenced completion script deletes the lock; it needs `eval`, as fencing does. */
|
|
32
|
+
readonly completionReleasesLock: boolean;
|
|
31
33
|
private client;
|
|
32
34
|
private prefix;
|
|
33
35
|
private lockPrefix;
|
|
@@ -36,8 +38,10 @@ declare class RedisIdempotencyStore implements IdempotencyStore {
|
|
|
36
38
|
private resultKey;
|
|
37
39
|
private lockKey;
|
|
38
40
|
get(key: string): Promise<IdempotencyResult | undefined>;
|
|
41
|
+
private parseResult;
|
|
39
42
|
set(key: string, result: Omit<IdempotencyResult, "key">): Promise<void>;
|
|
40
43
|
tryLock(key: string, requestId: string, ttlMs: number): Promise<boolean>;
|
|
44
|
+
acquire(key: string, requestId: string, lockTtlMs: number): Promise<IdempotencyAcquisition>;
|
|
41
45
|
setIfLocked(key: string, requestId: string, result: Omit<IdempotencyResult, "key">): Promise<boolean>;
|
|
42
46
|
unlock(key: string, requestId: string): Promise<void>;
|
|
43
47
|
isLocked(key: string): Promise<boolean>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
|
-
import { F as ResourceDefinition, G as CrudRouteKey, M as ResourceRegistry, N as RouteRow, S as IntrospectionPluginOptions, V as ResolvedTenantPurge, j as RegisterOptions, o as RegistryEntry } from "../index-
|
|
3
|
-
import "../fastify-augmentation-
|
|
2
|
+
import { F as ResourceDefinition, G as CrudRouteKey, M as ResourceRegistry, N as RouteRow, S as IntrospectionPluginOptions, V as ResolvedTenantPurge, j as RegisterOptions, o as RegistryEntry } from "../index-WH7xgvxS.mjs";
|
|
3
|
+
import "../fastify-augmentation-DRlCIWE9.mjs";
|
|
4
4
|
import { TenantPurgeProgress, TenantPurgeStrategy } from "@classytic/repo-core/repository";
|
|
5
5
|
import { FastifyPluginAsync } from "fastify";
|
|
6
6
|
//#region src/registry/assertNoTenantData.d.ts
|
|
@@ -60,7 +60,7 @@ interface AssertNoTenantDataReport {
|
|
|
60
60
|
* });
|
|
61
61
|
* ```
|
|
62
62
|
*/
|
|
63
|
-
declare function assertNoTenantData(registry: ResourceRegistry, options: AssertNoTenantDataOptions): Promise<AssertNoTenantDataReport>;
|
|
63
|
+
export declare function assertNoTenantData(registry: ResourceRegistry, options: AssertNoTenantDataOptions): Promise<AssertNoTenantDataReport>;
|
|
64
64
|
//#endregion
|
|
65
65
|
//#region src/registry/purgeResource.d.ts
|
|
66
66
|
/**
|
|
@@ -232,7 +232,7 @@ interface CascadeCheckpoint {
|
|
|
232
232
|
* A resource is cascading when its resolved strategy isn't `disabled`
|
|
233
233
|
* (i.e. the host declared `onTenantDelete`).
|
|
234
234
|
*/
|
|
235
|
-
declare function getCascadingResources(registry: ResourceRegistry): readonly string[];
|
|
235
|
+
export declare function getCascadingResources(registry: ResourceRegistry): readonly string[];
|
|
236
236
|
/**
|
|
237
237
|
* Rich introspection — returns the resolved strategy + source per
|
|
238
238
|
* cascading resource. Use for audit dashboards that answer "what
|
|
@@ -245,7 +245,7 @@ declare function getCascadingResources(registry: ResourceRegistry): readonly str
|
|
|
245
245
|
* purge this" entry. Anonymize carries the field map. Custom carries
|
|
246
246
|
* the handler reference. Narrow on `.strategy.type` for typed access.
|
|
247
247
|
*/
|
|
248
|
-
declare function getCascadingResourcesWithMetadata(registry: ResourceRegistry): readonly {
|
|
248
|
+
export declare function getCascadingResourcesWithMetadata(registry: ResourceRegistry): readonly {
|
|
249
249
|
name: string;
|
|
250
250
|
tenantField: string;
|
|
251
251
|
strategy: TenantPurgeStrategy;
|
|
@@ -274,7 +274,7 @@ declare function getCascadingResourcesWithMetadata(registry: ResourceRegistry):
|
|
|
274
274
|
* @param registry The arc resource registry (`fastify.arc.registry`).
|
|
275
275
|
* @param options Org id + filters + logger + progress + signal.
|
|
276
276
|
*/
|
|
277
|
-
declare function cascadeDeleteForOrganization(registry: ResourceRegistry, options: CascadeOptions): Promise<CascadeReport>;
|
|
277
|
+
export declare function cascadeDeleteForOrganization(registry: ResourceRegistry, options: CascadeOptions): Promise<CascadeReport>;
|
|
278
278
|
//#endregion
|
|
279
279
|
//#region src/registry/introspectionPlugin.d.ts
|
|
280
280
|
declare const _default: FastifyPluginAsync<IntrospectionPluginOptions>;
|
|
@@ -337,7 +337,7 @@ interface ResourceManifest {
|
|
|
337
337
|
* `defineResource(...)`). Use at build time when you have direct access
|
|
338
338
|
* to the resource module — typically the simplest codegen path.
|
|
339
339
|
*/
|
|
340
|
-
declare function buildResourceManifest(resource: ResourceDefinition): ResourceManifest;
|
|
340
|
+
export declare function buildResourceManifest(resource: ResourceDefinition): ResourceManifest;
|
|
341
341
|
/**
|
|
342
342
|
* Build a manifest from a `RegistryEntry` — use when the resource is
|
|
343
343
|
* already registered (introspection endpoint, runtime audit script).
|
|
@@ -348,6 +348,6 @@ declare function buildResourceManifest(resource: ResourceDefinition): ResourceMa
|
|
|
348
348
|
* `/_resources` endpoint) gets the same output without dragging the resource
|
|
349
349
|
* module into the codegen path.
|
|
350
350
|
*/
|
|
351
|
-
declare function buildResourceManifestFromRegistry(entry: RegistryEntry): ResourceManifest;
|
|
351
|
+
export declare function buildResourceManifestFromRegistry(entry: RegistryEntry): ResourceManifest;
|
|
352
352
|
//#endregion
|
|
353
|
-
export { type ActionManifestEntry, type ActionMount, type AggregationManifestEntry, type AssertNoTenantDataOptions, type AssertNoTenantDataReport, type CascadeCheckpoint, type CascadeCheckpointState, type CascadeOptions, type CascadeReport, type CascadeResourceReport, type CustomRouteManifestEntry, type IntrospectionPluginOptions, type RegisterOptions, type ResourceManifest, ResourceRegistry, type RouteRow, type TenantDataLeak,
|
|
353
|
+
export { type ActionManifestEntry, type ActionMount, type AggregationManifestEntry, type AssertNoTenantDataOptions, type AssertNoTenantDataReport, type CascadeCheckpoint, type CascadeCheckpointState, type CascadeOptions, type CascadeReport, type CascadeResourceReport, type CustomRouteManifestEntry, type IntrospectionPluginOptions, type RegisterOptions, type ResourceManifest, ResourceRegistry, type RouteRow, type TenantDataLeak, _default as introspectionPlugin };
|
package/dist/registry/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { a as getCascadingResources, i as cascadeDeleteForOrganization, n as buildResourceManifestFromRegistry, o as getCascadingResourcesWithMetadata, r as introspectionPlugin_default, s as assertNoTenantData, t as buildResourceManifest } from "../registry-
|
|
3
|
-
import { t as ResourceRegistry } from "../ResourceRegistry-
|
|
1
|
+
/*! @classytic/arc v2.45.0 | MIT | https://classytic.com */
|
|
2
|
+
import { a as getCascadingResources, i as cascadeDeleteForOrganization, n as buildResourceManifestFromRegistry, o as getCascadingResourcesWithMetadata, r as introspectionPlugin_default, s as assertNoTenantData, t as buildResourceManifest } from "../registry-DIdh6mWE.mjs";
|
|
3
|
+
import { t as ResourceRegistry } from "../ResourceRegistry-BNoHOx-D.mjs";
|
|
4
4
|
export { ResourceRegistry, assertNoTenantData, buildResourceManifest, buildResourceManifestFromRegistry, cascadeDeleteForOrganization, getCascadingResources, getCascadingResourcesWithMetadata, introspectionPlugin_default as introspectionPlugin };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { t as CRUD_OPERATIONS } from "./constants-
|
|
1
|
+
/*! @classytic/arc v2.45.0 | MIT | https://classytic.com */
|
|
2
|
+
import { t as CRUD_OPERATIONS } from "./constants-B90SnSQn.mjs";
|
|
3
3
|
import fp from "fastify-plugin";
|
|
4
4
|
//#region src/registry/assertNoTenantData.ts
|
|
5
5
|
/**
|
|
@@ -405,7 +405,7 @@ const introspectionPlugin = async (fastify, opts = {}) => {
|
|
|
405
405
|
const typedFastify = fastify;
|
|
406
406
|
const authMiddleware = authRoles.length > 0 && typedFastify.authenticate ? [typedFastify.authenticate, typedFastify.authorize?.(...authRoles)].filter(Boolean) : [];
|
|
407
407
|
const getRegistry = () => fastify.arc?.registry;
|
|
408
|
-
|
|
408
|
+
const introspectionRoutes = async (instance) => {
|
|
409
409
|
instance.get("/", { preHandler: authMiddleware }, async (_req, _reply) => {
|
|
410
410
|
return getRegistry()?.getIntrospection() ?? {
|
|
411
411
|
resources: [],
|
|
@@ -434,7 +434,8 @@ const introspectionPlugin = async (fastify, opts = {}) => {
|
|
|
434
434
|
if (!resource) return reply.code(404).send({ error: `Resource '${req.params.name}' not found` });
|
|
435
435
|
return resource;
|
|
436
436
|
});
|
|
437
|
-
}
|
|
437
|
+
};
|
|
438
|
+
await fastify.register(introspectionRoutes, { prefix });
|
|
438
439
|
fastify.log?.debug?.(`Introspection API at ${prefix}`);
|
|
439
440
|
};
|
|
440
441
|
var introspectionPlugin_default = fp(introspectionPlugin, { name: "arc-introspection" });
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import {
|
|
1
|
+
/*! @classytic/arc v2.45.0 | MIT | https://classytic.com */
|
|
2
|
+
import { r as __exportAll } from "./rolldown-runtime-AD16t29l.mjs";
|
|
3
3
|
import { toCanonicalList } from "@classytic/repo-core/pagination";
|
|
4
4
|
import fp from "fastify-plugin";
|
|
5
5
|
//#region src/plugins/replyHelpers.ts
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
1
|
+
/*! @classytic/arc v2.45.0 | MIT | https://classytic.com */
|
|
2
2
|
//#region src/idempotency/requirement.ts
|
|
3
3
|
/** What is wrong with a route's idempotency declaration, or `undefined` when it is sound. */
|
|
4
4
|
function idempotencyConfigProblem(config) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { t as createTenantKeyGenerator } from "./rateLimitKey-
|
|
1
|
+
/*! @classytic/arc v2.45.0 | MIT | https://classytic.com */
|
|
2
|
+
import { t as createTenantKeyGenerator } from "./rateLimitKey-C4mkCwQ-.mjs";
|
|
3
3
|
//#region src/permissions/resourceRateLimit.ts
|
|
4
4
|
function decision(allowed, max, remaining, ttlSeconds) {
|
|
5
5
|
const reset = Math.max(1, ttlSeconds);
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/*! @classytic/arc v2.45.0 | MIT | https://classytic.com */
|
|
2
|
+
import { createRequire } from "node:module";
|
|
3
|
+
//#region \0rolldown/runtime.js
|
|
4
|
+
var __create = Object.create;
|
|
5
|
+
var __defProp = Object.defineProperty;
|
|
6
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
7
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
8
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
9
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
10
|
+
var __esmMin = (fn, res, err) => () => {
|
|
11
|
+
if (err) throw err[0];
|
|
12
|
+
try {
|
|
13
|
+
return fn && (res = fn(fn = 0)), res;
|
|
14
|
+
} catch (e) {
|
|
15
|
+
throw err = [e], e;
|
|
16
|
+
}
|
|
17
|
+
};
|
|
18
|
+
var __commonJSMin = (cb, mod) => () => (mod || (cb((mod = { exports: {} }).exports, mod, mod.exports), cb = null), mod.exports);
|
|
19
|
+
var __exportAll = (all, no_symbols) => {
|
|
20
|
+
let target = {};
|
|
21
|
+
for (var name in all) __defProp(target, name, {
|
|
22
|
+
get: all[name],
|
|
23
|
+
enumerable: true
|
|
24
|
+
});
|
|
25
|
+
if (!no_symbols) __defProp(target, Symbol.toStringTag, { value: "Module" });
|
|
26
|
+
return target;
|
|
27
|
+
};
|
|
28
|
+
var __copyProps = (to, from, except, desc) => {
|
|
29
|
+
if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
|
|
30
|
+
key = keys[i];
|
|
31
|
+
if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
32
|
+
get: ((k) => from[k]).bind(null, key),
|
|
33
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
return to;
|
|
37
|
+
};
|
|
38
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule || !__hasOwnProp.call(mod, "default") ? __defProp(target, "default", {
|
|
39
|
+
value: mod,
|
|
40
|
+
enumerable: true
|
|
41
|
+
}) : target, mod));
|
|
42
|
+
var __toCommonJS = (mod) => __hasOwnProp.call(mod, "module.exports") ? mod["module.exports"] : __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
43
|
+
var __require = /* #__PURE__ */ (() => createRequire(import.meta.url))();
|
|
44
|
+
//#endregion
|
|
45
|
+
export { __toCommonJS as a, __require as i, __esmMin as n, __toESM as o, __exportAll as r, __commonJSMin as t };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import {
|
|
3
|
-
import { a as runShutdown, i as runAdmittedWork, r as registerShutdownParticipant } from "./shutdown-
|
|
4
|
-
import { t as runWorkScope } from "./workScope-
|
|
5
|
-
import { t as startRenewingLease } from "./renewingLease-
|
|
1
|
+
/*! @classytic/arc v2.45.0 | MIT | https://classytic.com */
|
|
2
|
+
import { r as __exportAll } from "./rolldown-runtime-AD16t29l.mjs";
|
|
3
|
+
import { a as runShutdown, i as runAdmittedWork, r as registerShutdownParticipant } from "./shutdown-BW8qwgpx.mjs";
|
|
4
|
+
import { t as runWorkScope } from "./workScope-BDjGXwU9.mjs";
|
|
5
|
+
import { t as startRenewingLease } from "./renewingLease-boGRXWCr.mjs";
|
|
6
6
|
import fp from "fastify-plugin";
|
|
7
7
|
//#region src/plugins/schedules.ts
|
|
8
8
|
var schedules_exports = /* @__PURE__ */ __exportAll({
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { t as arcLog } from "./logger-
|
|
1
|
+
/*! @classytic/arc v2.45.0 | MIT | https://classytic.com */
|
|
2
|
+
import { t as arcLog } from "./logger-vxu0DXf_.mjs";
|
|
3
3
|
//#region src/utils/schemaConverter.ts
|
|
4
4
|
/**
|
|
5
5
|
* Schema Converter — Detect-First, Convert-Only-When-Needed
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { o as toJsonSchema } from "./schemaConverter-
|
|
1
|
+
/*! @classytic/arc v2.45.0 | MIT | https://classytic.com */
|
|
2
|
+
import { o as toJsonSchema } from "./schemaConverter-rzBovk00.mjs";
|
|
3
3
|
//#region src/core/schemaIR.ts
|
|
4
4
|
/**
|
|
5
5
|
* Schema IR — one canonical representation, two adapters.
|
package/dist/schemas/index.d.mts
CHANGED
|
@@ -17,7 +17,7 @@ import { FastifyPluginAsyncTypebox, FastifyPluginCallbackTypebox, TypeBoxTypePro
|
|
|
17
17
|
* variant when your endpoint never emits the others. HTTP status
|
|
18
18
|
* discriminates success vs error — no `success` field.
|
|
19
19
|
*/
|
|
20
|
-
declare function ArcListResponse<T extends TSchema$1>(itemSchema: T): Type$1.TUnion<[Type$1.TObject<{
|
|
20
|
+
export declare function ArcListResponse<T extends TSchema$1>(itemSchema: T): Type$1.TUnion<[Type$1.TObject<{
|
|
21
21
|
method: Type$1.TLiteral<"offset">;
|
|
22
22
|
data: Type$1.TArray<T>;
|
|
23
23
|
page: Type$1.TInteger;
|
|
@@ -50,7 +50,7 @@ declare function ArcListResponse<T extends TSchema$1>(itemSchema: T): Type$1.TUn
|
|
|
50
50
|
data: Type$1.TArray<T>;
|
|
51
51
|
}>]>;
|
|
52
52
|
/** Offset variant — `{ method: 'offset', data, page, limit, total, pages, hasNext, hasPrev }`. */
|
|
53
|
-
declare function ArcOffsetListResponse<T extends TSchema$1>(itemSchema: T): Type$1.TObject<{
|
|
53
|
+
export declare function ArcOffsetListResponse<T extends TSchema$1>(itemSchema: T): Type$1.TObject<{
|
|
54
54
|
method: Type$1.TLiteral<"offset">;
|
|
55
55
|
data: Type$1.TArray<T>;
|
|
56
56
|
page: Type$1.TInteger;
|
|
@@ -63,7 +63,7 @@ declare function ArcOffsetListResponse<T extends TSchema$1>(itemSchema: T): Type
|
|
|
63
63
|
countedAt: Type$1.TOptional<Type$1.TUnion<[Type$1.TString, Type$1.TNull]>>;
|
|
64
64
|
}>;
|
|
65
65
|
/** Keyset variant — `{ method: 'keyset', data, limit, hasMore, next: string | null }`. */
|
|
66
|
-
declare function ArcKeysetListResponse<T extends TSchema$1>(itemSchema: T): Type$1.TObject<{
|
|
66
|
+
export declare function ArcKeysetListResponse<T extends TSchema$1>(itemSchema: T): Type$1.TObject<{
|
|
67
67
|
method: Type$1.TLiteral<"keyset">;
|
|
68
68
|
data: Type$1.TArray<T>;
|
|
69
69
|
limit: Type$1.TInteger;
|
|
@@ -74,7 +74,7 @@ declare function ArcKeysetListResponse<T extends TSchema$1>(itemSchema: T): Type
|
|
|
74
74
|
end: Type$1.TOptional<Type$1.TUnion<[Type$1.TString, Type$1.TNull]>>;
|
|
75
75
|
}>;
|
|
76
76
|
/** Aggregate variant — `{ method: 'aggregate', ...same as offset }`. */
|
|
77
|
-
declare function ArcAggregateListResponse<T extends TSchema$1>(itemSchema: T): Type$1.TObject<{
|
|
77
|
+
export declare function ArcAggregateListResponse<T extends TSchema$1>(itemSchema: T): Type$1.TObject<{
|
|
78
78
|
method: Type$1.TLiteral<"aggregate">;
|
|
79
79
|
data: Type$1.TArray<T>;
|
|
80
80
|
page: Type$1.TInteger;
|
|
@@ -85,13 +85,13 @@ declare function ArcAggregateListResponse<T extends TSchema$1>(itemSchema: T): T
|
|
|
85
85
|
hasPrev: Type$1.TBoolean;
|
|
86
86
|
}>;
|
|
87
87
|
/** Bare variant — `{ data }`, no `method` discriminant. */
|
|
88
|
-
declare function ArcBareListResponse<T extends TSchema$1>(itemSchema: T): Type$1.TObject<{
|
|
88
|
+
export declare function ArcBareListResponse<T extends TSchema$1>(itemSchema: T): Type$1.TObject<{
|
|
89
89
|
data: Type$1.TArray<T>;
|
|
90
90
|
}>;
|
|
91
91
|
/**
|
|
92
92
|
* Delete response — `{ message, id?, soft? }` raw at the top level.
|
|
93
93
|
*/
|
|
94
|
-
declare function ArcDeleteResponse(): Type$1.TObject<{
|
|
94
|
+
export declare function ArcDeleteResponse(): Type$1.TObject<{
|
|
95
95
|
message: Type$1.TString;
|
|
96
96
|
id: Type$1.TOptional<Type$1.TString>;
|
|
97
97
|
soft: Type$1.TOptional<Type$1.TBoolean>;
|
|
@@ -106,7 +106,7 @@ declare function ArcDeleteResponse(): Type$1.TObject<{
|
|
|
106
106
|
* Exported standalone so hosts can embed it in custom 422 / 409 response
|
|
107
107
|
* schemas.
|
|
108
108
|
*/
|
|
109
|
-
declare function ArcErrorDetail(): Type$1.TUnsafe<ErrorDetail>;
|
|
109
|
+
export declare function ArcErrorDetail(): Type$1.TUnsafe<ErrorDetail>;
|
|
110
110
|
/**
|
|
111
111
|
* Error response schema — `Type.Unsafe<ErrorContract>` over the canonical
|
|
112
112
|
* JSON Schema `errorContractSchema` from `@classytic/repo-core/errors`.
|
|
@@ -115,7 +115,7 @@ declare function ArcErrorDetail(): Type$1.TUnsafe<ErrorDetail>;
|
|
|
115
115
|
* (`errorContractSchema`) and this TypeBox helper cannot drift —
|
|
116
116
|
* literally one source.
|
|
117
117
|
*/
|
|
118
|
-
declare function ArcErrorResponse(): Type$1.TUnsafe<ErrorContract>;
|
|
118
|
+
export declare function ArcErrorResponse(): Type$1.TUnsafe<ErrorContract>;
|
|
119
119
|
/**
|
|
120
120
|
* Standard pagination + sorting + filtering query parameters.
|
|
121
121
|
* Matches Arc's list endpoint conventions.
|
|
@@ -131,7 +131,7 @@ declare function ArcErrorResponse(): Type$1.TUnsafe<ErrorContract>;
|
|
|
131
131
|
* projection forms at the request-validation gate even though arc passes
|
|
132
132
|
* them through unchanged.
|
|
133
133
|
*/
|
|
134
|
-
declare function ArcPaginationQuery(): Type$1.TObject<{
|
|
134
|
+
export declare function ArcPaginationQuery(): Type$1.TObject<{
|
|
135
135
|
page: Type$1.TOptional<Type$1.TInteger>;
|
|
136
136
|
limit: Type$1.TOptional<Type$1.TInteger>;
|
|
137
137
|
sort: Type$1.TOptional<Type$1.TString>;
|
|
@@ -139,4 +139,4 @@ declare function ArcPaginationQuery(): Type$1.TObject<{
|
|
|
139
139
|
populate: Type$1.TOptional<Type$1.TAny>;
|
|
140
140
|
}>;
|
|
141
141
|
//#endregion
|
|
142
|
-
export {
|
|
142
|
+
export { type FastifyPluginAsyncTypebox, type FastifyPluginCallbackTypebox, type Static, type TObject, type TSchema, Type, type TypeBoxTypeProvider };
|
package/dist/schemas/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
1
|
+
/*! @classytic/arc v2.45.0 | MIT | https://classytic.com */
|
|
2
2
|
import { errorContractSchema, errorDetailSchema } from "@classytic/repo-core/errors";
|
|
3
3
|
import { Type, Type as Type$1 } from "typebox";
|
|
4
4
|
//#region src/schemas/index.ts
|