@getstrata/core 0.5.6 → 0.5.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (42) hide show
  1. package/dist/bootstrap/discoverModules.d.ts +4 -0
  2. package/dist/bootstrap/modules.d.ts +1 -0
  3. package/dist/bootstrap/routeRegistry.d.ts +14 -0
  4. package/dist/core/audit/exportAuditLogs.d.ts +8 -0
  5. package/dist/core/audit/siemFormatter.d.ts +30 -0
  6. package/dist/core/auth/membershipScope.d.ts +16 -0
  7. package/dist/core/auth/membershipService.d.ts +20 -0
  8. package/dist/core/auth/scimAuthMiddleware.d.ts +3 -0
  9. package/dist/core/auth/sessionCookie.d.ts +6 -0
  10. package/dist/core/auth/sessionGuard.d.ts +9 -0
  11. package/dist/core/cache/createCacheStore.d.ts +11 -0
  12. package/dist/core/cache/keys.d.ts +2 -0
  13. package/dist/core/cache/modelCacheTags.d.ts +3 -0
  14. package/dist/core/cache/redisCacheStore.d.ts +23 -0
  15. package/dist/core/cache/simpleCache.d.ts +23 -0
  16. package/dist/core/cache/simpleCacheStore.d.ts +16 -0
  17. package/dist/core/config/envSchema.d.ts +12 -0
  18. package/dist/core/database/factory.d.ts +6 -0
  19. package/dist/core/http/scimThrottleMiddleware.d.ts +9 -0
  20. package/dist/core/jobs/dispatchWebhookJob.d.ts +14 -0
  21. package/dist/core/jobs/invalidateCacheTagsJob.d.ts +12 -0
  22. package/dist/core/openapi/generator.d.ts +22 -0
  23. package/dist/core/openapi/validate.d.ts +3 -0
  24. package/dist/core/queue/createAppQueue.d.ts +6 -0
  25. package/dist/core/queue/queueMetrics.d.ts +15 -0
  26. package/dist/core/security/oauthState.d.ts +8 -0
  27. package/dist/core/security/safeFetch.d.ts +8 -0
  28. package/dist/core/security/safeUrl.d.ts +5 -0
  29. package/dist/core/security/scimTenantTokens.d.ts +3 -0
  30. package/dist/core/security/stripeWebhook.d.ts +2 -0
  31. package/dist/core/security/timingSafeCompare.d.ts +2 -0
  32. package/dist/domain/scim.d.ts +9 -0
  33. package/dist/entries/auth/guard.js +6 -6
  34. package/dist/entries/database.js +6 -6
  35. package/dist/entries/http/webErrorResponse.js +6 -6
  36. package/dist/entries/http.js +6 -6
  37. package/dist/entries/queue/createAppQueue.js +6 -6
  38. package/dist/entries/queue/publicQueue.js +6 -6
  39. package/dist/entries/queue/queueMetrics.js +6 -6
  40. package/dist/entries/view.js +6 -6
  41. package/dist/index.js +6 -6
  42. package/package.json +58 -58
@@ -0,0 +1,4 @@
1
+ import type { AppModule } from "./contracts";
2
+ declare const appModules: AppModule[];
3
+ declare function discoverModules(): AppModule[];
4
+ export { appModules, discoverModules };
@@ -0,0 +1 @@
1
+ export { appModules, discoverModules } from "./discoverModules";
@@ -0,0 +1,14 @@
1
+ interface RegisteredRoute {
2
+ method: string;
3
+ path: string;
4
+ middleware: string[];
5
+ }
6
+ declare class RouteRegistry {
7
+ private readonly routes;
8
+ register(route: RegisteredRoute): void;
9
+ clear(): void;
10
+ list(): RegisteredRoute[];
11
+ }
12
+ declare const routeRegistry: RouteRegistry;
13
+ export type { RegisteredRoute };
14
+ export { RouteRegistry, routeRegistry };
@@ -0,0 +1,8 @@
1
+ interface AuditExportConfig {
2
+ endpoint: string;
3
+ format: "json" | "cef";
4
+ batchSize: number;
5
+ }
6
+ declare function resolveAuditExportConfig(): AuditExportConfig | null;
7
+ declare function exportPendingAuditLogs(): Promise<number>;
8
+ export { exportPendingAuditLogs, resolveAuditExportConfig };
@@ -0,0 +1,30 @@
1
+ interface SiemAuditEvent {
2
+ timestamp: string;
3
+ event_type: string;
4
+ actor_user_id: number | null;
5
+ tenant_id: number | null;
6
+ trace_id: string | null;
7
+ action: string;
8
+ subject_type: string;
9
+ subject_id: number | null;
10
+ ip_address: string | null;
11
+ user_agent: string | null;
12
+ checksum: string | null;
13
+ payload: Record<string, unknown>;
14
+ }
15
+ declare function formatSiemAuditEvent(input: {
16
+ action: string;
17
+ subject_type: string;
18
+ subject_id: number | null;
19
+ user_id: number | null;
20
+ tenant_id?: number | null;
21
+ trace_id?: string | null;
22
+ ip_address?: string | null;
23
+ user_agent?: string | null;
24
+ checksum?: string | null;
25
+ payload?: Record<string, unknown>;
26
+ created_at: Date;
27
+ }): SiemAuditEvent;
28
+ declare function formatCefLine(event: SiemAuditEvent): string;
29
+ export type { SiemAuditEvent };
30
+ export { formatCefLine, formatSiemAuditEvent };
@@ -0,0 +1,16 @@
1
+ declare function resolveOrganizationScope(): number[] | null;
2
+ declare function scopedOrganizationIds(requestedOrganizationId?: number): number[] | null;
3
+ declare function appendOrganizationScope<T extends object>(where: T, requestedOrganizationId?: number): T;
4
+ declare function appendProjectScope<T extends object>(where: T, accessibleProjectIds: number[] | null, requestedProjectId?: number): T;
5
+ declare function emptyPaginateResult<T>(page: number, perPage: number): {
6
+ data: T[];
7
+ meta: {
8
+ page: number;
9
+ per_page: number;
10
+ total: number;
11
+ last_page: number;
12
+ };
13
+ };
14
+ declare function assertResourceInCurrentTenant(resourceTenantId: number, resourceLabel: string, resourceId: number): void;
15
+ declare function assertOrganizationReadable(organizationId: number): void;
16
+ export { appendOrganizationScope, appendProjectScope, assertOrganizationReadable, assertResourceInCurrentTenant, emptyPaginateResult, resolveOrganizationScope, scopedOrganizationIds, };
@@ -0,0 +1,20 @@
1
+ import type { OrganizationMemberRole } from "../../modules/organization/memberTypes";
2
+ import { type AuthUser } from "./authContext";
3
+ declare class MembershipService {
4
+ constructor();
5
+ listOrganizationIdsForUser(userId: number): Promise<number[]>;
6
+ getOrgRole(userId: number, organizationId: number): Promise<OrganizationMemberRole | null>;
7
+ requireOrgAccess(organizationId: number, minimumRole?: OrganizationMemberRole, user?: AuthUser | null): Promise<OrganizationMemberRole>;
8
+ filterAccessibleOrganizationIds(organizationIds: number[], user?: AuthUser | null): Promise<number[]>;
9
+ addOwnerOnOrganizationCreate(organizationId: number, userId: number): Promise<void>;
10
+ listMembersForOrganization(organizationId: number): Promise<import("../../modules/organization/memberTypes").OrganizationMemberRecord[]>;
11
+ addMember(input: {
12
+ organizationId: number;
13
+ userId: number;
14
+ role?: OrganizationMemberRole;
15
+ }): Promise<import("../../modules/organization/memberTypes").OrganizationMemberRecord>;
16
+ removeMember(organizationId: number, userId: number): Promise<boolean>;
17
+ }
18
+ declare function resolveMembershipService(): MembershipService;
19
+ export default MembershipService;
20
+ export { resolveMembershipService };
@@ -0,0 +1,3 @@
1
+ import type { Middleware } from "../http/middleware";
2
+ declare function createScimAuthMiddleware(): Middleware;
3
+ export { createScimAuthMiddleware };
@@ -0,0 +1,6 @@
1
+ declare const SESSION_COOKIE = "workhub_session";
2
+ declare const SESSION_TTL_SECONDS: number;
3
+ declare function readSessionUserId(request: Request): number | null;
4
+ declare function createSessionCookie(userId: number): string;
5
+ declare function clearSessionCookie(): string;
6
+ export { clearSessionCookie, createSessionCookie, readSessionUserId, SESSION_COOKIE, SESSION_TTL_SECONDS, };
@@ -0,0 +1,9 @@
1
+ import type { ServiceContainer } from "../../bootstrap/contracts";
2
+ import type { AuthUser } from "./authContext";
3
+ import type { AuthGuard } from "./guard";
4
+ declare class SessionGuard implements AuthGuard {
5
+ private readonly container;
6
+ constructor(container: ServiceContainer);
7
+ resolve(request: Request): Promise<AuthUser | null>;
8
+ }
9
+ export { SessionGuard };
@@ -0,0 +1,11 @@
1
+ import type { CacheStore } from "./store";
2
+ type CacheDriver = "array" | "redis";
3
+ interface CreateCacheStoreOptions {
4
+ driver: CacheDriver;
5
+ ttlMs: number;
6
+ maxEntries: number;
7
+ redisUrl?: string;
8
+ }
9
+ declare function createCacheStore(options: CreateCacheStoreOptions): CacheStore;
10
+ export type { CacheDriver, CreateCacheStoreOptions };
11
+ export { createCacheStore };
@@ -0,0 +1,2 @@
1
+ declare function buildCacheKey(namespace: string, ...parts: Array<string | number>): string;
2
+ export { buildCacheKey };
@@ -0,0 +1,3 @@
1
+ declare function cacheTagsForModelWrite(tableName: string, action: string): string[];
2
+ declare function discoverModelTableNames(): string[];
3
+ export { cacheTagsForModelWrite, discoverModelTableNames };
@@ -0,0 +1,23 @@
1
+ import type { CacheStore } from "./store";
2
+ declare class RedisCacheStore implements CacheStore {
3
+ private readonly ttlMs;
4
+ private readonly maxEntries;
5
+ private readonly client;
6
+ private readonly inflight;
7
+ private readonly keyTags;
8
+ constructor(redisUrl: string, ttlMs: number, maxEntries: number);
9
+ get<T>(key: string): Promise<T | undefined>;
10
+ set<T>(key: string, value: T, ttlMs?: number): Promise<void>;
11
+ getOrSet<T>(key: string, loader: () => Promise<T>, ttlMs?: number): Promise<T>;
12
+ attachTags(key: string, tags: string[]): Promise<void>;
13
+ flushTags(tags: string[]): Promise<number>;
14
+ invalidate(key: string): Promise<boolean>;
15
+ invalidateByPrefix(prefix: string): Promise<number>;
16
+ clear(): Promise<void>;
17
+ size(): Promise<number>;
18
+ private storageKey;
19
+ private tagKey;
20
+ private detachKeyFromTags;
21
+ private enforceMaxEntries;
22
+ }
23
+ export default RedisCacheStore;
@@ -0,0 +1,23 @@
1
+ declare class SimpleCache {
2
+ private readonly ttlMs;
3
+ private readonly maxEntries;
4
+ private readonly cache;
5
+ private readonly inflight;
6
+ private readonly tagIndex;
7
+ private readonly keyTags;
8
+ constructor(ttlMs?: number, maxEntries?: number);
9
+ get<T>(key: string): T | undefined;
10
+ set<T>(key: string, value: T, ttlMs?: number): void;
11
+ getOrSet<T>(key: string, loader: () => Promise<T>, ttlMs?: number): Promise<T>;
12
+ attachTags(key: string, tags: string[]): void;
13
+ flushTags(tags: string[]): number;
14
+ invalidate(key: string): boolean;
15
+ invalidateByPrefix(prefix: string): number;
16
+ clear(): void;
17
+ size(): number;
18
+ private detachKeyFromTags;
19
+ private getFreshEntry;
20
+ private pruneExpired;
21
+ private evictOverflow;
22
+ }
23
+ export default SimpleCache;
@@ -0,0 +1,16 @@
1
+ import type SimpleCache from "./simpleCache";
2
+ import type { CacheStore } from "./store";
3
+ declare class SimpleCacheStore implements CacheStore {
4
+ private readonly cache;
5
+ constructor(cache: SimpleCache);
6
+ get<T>(key: string): Promise<T | undefined>;
7
+ set<T>(key: string, value: T, ttlMs?: number): Promise<void>;
8
+ getOrSet<T>(key: string, loader: () => Promise<T>, ttlMs?: number): Promise<T>;
9
+ attachTags(key: string, tags: string[]): Promise<void>;
10
+ flushTags(tags: string[]): Promise<number>;
11
+ invalidate(key: string): Promise<boolean>;
12
+ invalidateByPrefix(prefix: string): Promise<number>;
13
+ clear(): Promise<void>;
14
+ size(): Promise<number>;
15
+ }
16
+ export default SimpleCacheStore;
@@ -0,0 +1,12 @@
1
+ interface EnvRule {
2
+ required?: boolean;
3
+ integer?: boolean;
4
+ minimum?: number;
5
+ default?: string;
6
+ pattern?: RegExp;
7
+ }
8
+ type EnvSchema = Record<string, EnvRule>;
9
+ declare function defineEnvSchema(schema: EnvSchema): EnvSchema;
10
+ declare function validateEnv(schema: EnvSchema, env?: Record<string, string | undefined>): Record<string, string>;
11
+ export type { EnvRule, EnvSchema };
12
+ export { defineEnvSchema, validateEnv };
@@ -0,0 +1,6 @@
1
+ declare class Factory<TRecord extends object> {
2
+ constructor();
3
+ protected definition(): TRecord;
4
+ make(overrides?: Partial<TRecord>): TRecord;
5
+ }
6
+ export { Factory };
@@ -0,0 +1,9 @@
1
+ import type { Middleware } from "./middleware";
2
+ interface ScimThrottleOptions {
3
+ redisUrl?: string;
4
+ maxAttempts: number;
5
+ decaySeconds: number;
6
+ }
7
+ declare function createScimThrottleMiddleware(options: ScimThrottleOptions): Middleware;
8
+ export type { ScimThrottleOptions };
9
+ export { createScimThrottleMiddleware };
@@ -0,0 +1,14 @@
1
+ import { Job } from "../queue";
2
+ interface DispatchWebhookPayload {
3
+ webhookId: number;
4
+ event: string;
5
+ payload: Record<string, unknown>;
6
+ }
7
+ declare class DispatchWebhookJob extends Job<DispatchWebhookPayload> {
8
+ constructor();
9
+ readonly maxAttempts = 3;
10
+ readonly backoffMs = 2000;
11
+ handle(payload: DispatchWebhookPayload): Promise<void>;
12
+ }
13
+ export default DispatchWebhookJob;
14
+ export type { DispatchWebhookPayload };
@@ -0,0 +1,12 @@
1
+ import type { CacheLike } from "../../types/services";
2
+ import { Job } from "../queue";
3
+ interface InvalidateCacheTagsPayload {
4
+ tags: string[];
5
+ }
6
+ declare class InvalidateCacheTagsJob extends Job<InvalidateCacheTagsPayload> {
7
+ private readonly cache;
8
+ constructor(cache: CacheLike);
9
+ handle(payload: InvalidateCacheTagsPayload): Promise<void>;
10
+ }
11
+ export default InvalidateCacheTagsJob;
12
+ export type { InvalidateCacheTagsPayload };
@@ -0,0 +1,22 @@
1
+ import type { RegisteredRoute } from "../../bootstrap/routeRegistry";
2
+ interface OpenApiSpec {
3
+ openapi: string;
4
+ info: {
5
+ title: string;
6
+ version: string;
7
+ };
8
+ servers: Array<{
9
+ url: string;
10
+ description?: string;
11
+ }>;
12
+ paths: Record<string, Record<string, unknown>>;
13
+ components: {
14
+ securitySchemes: Record<string, unknown>;
15
+ schemas?: Record<string, unknown>;
16
+ };
17
+ }
18
+ declare function generateOpenApiSpec(routes: RegisteredRoute[]): OpenApiSpec;
19
+ declare function renderOpenApiDocument(spec: OpenApiSpec): string;
20
+ declare function renderTypeScriptSdk(spec: OpenApiSpec, apiPrefix?: string): string;
21
+ export type { OpenApiSpec };
22
+ export { generateOpenApiSpec, renderOpenApiDocument, renderTypeScriptSdk };
@@ -0,0 +1,3 @@
1
+ import type { OpenApiSpec } from "./generator";
2
+ declare function validateOpenApiSpec(spec: OpenApiSpec): string[];
3
+ export { validateOpenApiSpec };
@@ -0,0 +1,6 @@
1
+ import type { Queue } from "./index";
2
+ import { createFailedJobService, createQueueWorker, createTrackedJob, type FailedJobService } from "./publicQueue";
3
+ declare const FAILED_JOB_SERVICE_TOKEN = "core.failedJobs";
4
+ declare function registerDefaultJobs(): void;
5
+ declare function createAppQueue(driver: "sync" | "async" | "redis", redisUrl?: string, failedJobs?: FailedJobService): Queue;
6
+ export { createAppQueue, createFailedJobService, createQueueWorker, createTrackedJob, FAILED_JOB_SERVICE_TOKEN, registerDefaultJobs, };
@@ -0,0 +1,15 @@
1
+ interface QueueDepthMetrics {
2
+ high: number;
3
+ default: number;
4
+ low: number;
5
+ total: number;
6
+ }
7
+ interface QueueMetricsSnapshot {
8
+ driver: string;
9
+ pending: QueueDepthMetrics;
10
+ failedCount: number;
11
+ }
12
+ declare function readRedisQueueDepth(redisUrl: string): Promise<QueueDepthMetrics>;
13
+ declare function collectQueueMetrics(): Promise<QueueMetricsSnapshot>;
14
+ export type { QueueDepthMetrics, QueueMetricsSnapshot };
15
+ export { collectQueueMetrics, readRedisQueueDepth };
@@ -0,0 +1,8 @@
1
+ declare const OAUTH_STATE_COOKIE = "oauth_state";
2
+ declare function createOAuthStateCookie(): {
3
+ state: string;
4
+ cookie: string;
5
+ };
6
+ declare function verifyOAuthState(request: Request, returnedState: string | null): boolean;
7
+ declare function clearOAuthStateCookie(): string;
8
+ export { clearOAuthStateCookie, createOAuthStateCookie, OAUTH_STATE_COOKIE, verifyOAuthState };
@@ -0,0 +1,8 @@
1
+ declare const DEFAULT_FETCH_TIMEOUT_MS = 10000;
2
+ interface SafeFetchOptions {
3
+ timeoutMs?: number;
4
+ maxRedirects?: number;
5
+ }
6
+ declare function safeFetch(input: string, init?: RequestInit, options?: SafeFetchOptions): Promise<Response>;
7
+ export type { SafeFetchOptions };
8
+ export { DEFAULT_FETCH_TIMEOUT_MS, safeFetch };
@@ -0,0 +1,5 @@
1
+ declare function isBlockedHostname(hostname: string): boolean;
2
+ declare function assertSafeOutboundUrl(rawUrl: string, options?: {
3
+ allowHttp?: boolean;
4
+ }): URL;
5
+ export { assertSafeOutboundUrl, isBlockedHostname };
@@ -0,0 +1,3 @@
1
+ declare function parseScimTenantTokens(raw: string | undefined): Map<number, string>;
2
+ declare function resolveScimTenantFromToken(token: string): number | null;
3
+ export { parseScimTenantTokens, resolveScimTenantFromToken };
@@ -0,0 +1,2 @@
1
+ declare function verifyStripeWebhookSignature(rawBody: string, signatureHeader: string | null, secret: string, toleranceSeconds?: number): void;
2
+ export { verifyStripeWebhookSignature };
@@ -0,0 +1,2 @@
1
+ declare function timingSafeCompareString(left: string, right: string): boolean;
2
+ export { timingSafeCompareString };
@@ -0,0 +1,9 @@
1
+ export declare const TEST_SCIM_BEARER_TOKEN = "workhub-scim-test-token";
2
+ export declare const DEFAULT_SCIM_BEARER_TOKEN = "workhub-scim-test-token";
3
+ export declare const SCIM_SCHEMAS: {
4
+ readonly user: "urn:ietf:params:scim:schemas:core:2.0:User";
5
+ readonly group: "urn:ietf:params:scim:schemas:core:2.0:Group";
6
+ readonly listResponse: "urn:ietf:params:scim:api:messages:2.0:ListResponse";
7
+ readonly patchOp: "urn:ietf:params:scim:api:messages:2.0:PatchOp";
8
+ readonly serviceProviderConfig: "urn:ietf:params:scim:schemas:core:2.0:ServiceProviderConfig";
9
+ };
@@ -1555,24 +1555,24 @@ class Model {
1555
1555
  throw new Error(`${this.constructor.name}.primaryKey() is not implemented.`);
1556
1556
  }
1557
1557
  static primaryKeyField() {
1558
- return resolveModelRepository(Model).getTable().primaryKey;
1558
+ return resolveModelRepository(this).getTable().primaryKey;
1559
1559
  }
1560
1560
  static hydrateAttributes(attributes) {
1561
- const casts = modelStatics(Model).$casts ?? {};
1561
+ const casts = modelStatics(this).$casts ?? {};
1562
1562
  return applyCasts(attributes, casts, "hydrate");
1563
1563
  }
1564
1564
  static dehydrateAttributes(attributes) {
1565
- const casts = modelStatics(Model).$casts ?? {};
1565
+ const casts = modelStatics(this).$casts ?? {};
1566
1566
  return applyCasts(attributes, casts, "dehydrate");
1567
1567
  }
1568
1568
  static fromRecord(record, repository, exists = true) {
1569
- const statics = modelStatics(Model);
1569
+ const statics = modelStatics(this);
1570
1570
  const hydrated = statics.hydrateAttributes(record);
1571
1571
  return new statics(hydrated, repository, exists);
1572
1572
  }
1573
1573
  static boot() {}
1574
1574
  static addGlobalScope(_name, scope) {
1575
- ensureBooted(Model);
1575
+ ensureBooted(this);
1576
1576
  const existing = modelGlobalScopes.get(Model) ?? [];
1577
1577
  modelGlobalScopes.set(Model, [
1578
1578
  ...existing,
@@ -1604,7 +1604,7 @@ class Model {
1604
1604
  return statics.fromRecord(record, repository, true);
1605
1605
  }
1606
1606
  static async find(id) {
1607
- const statics = modelStatics(Model);
1607
+ const statics = modelStatics(this);
1608
1608
  const repository = resolveModelRepository(Model);
1609
1609
  const primaryKey = repository.getTable().primaryKey;
1610
1610
  const record = await Model.query.call(Model).where({ [primaryKey]: id }).first();
@@ -1353,24 +1353,24 @@ class Model {
1353
1353
  throw new Error(`${this.constructor.name}.primaryKey() is not implemented.`);
1354
1354
  }
1355
1355
  static primaryKeyField() {
1356
- return resolveModelRepository(Model).getTable().primaryKey;
1356
+ return resolveModelRepository(this).getTable().primaryKey;
1357
1357
  }
1358
1358
  static hydrateAttributes(attributes) {
1359
- const casts = modelStatics(Model).$casts ?? {};
1359
+ const casts = modelStatics(this).$casts ?? {};
1360
1360
  return applyCasts(attributes, casts, "hydrate");
1361
1361
  }
1362
1362
  static dehydrateAttributes(attributes) {
1363
- const casts = modelStatics(Model).$casts ?? {};
1363
+ const casts = modelStatics(this).$casts ?? {};
1364
1364
  return applyCasts(attributes, casts, "dehydrate");
1365
1365
  }
1366
1366
  static fromRecord(record, repository, exists = true) {
1367
- const statics = modelStatics(Model);
1367
+ const statics = modelStatics(this);
1368
1368
  const hydrated = statics.hydrateAttributes(record);
1369
1369
  return new statics(hydrated, repository, exists);
1370
1370
  }
1371
1371
  static boot() {}
1372
1372
  static addGlobalScope(_name, scope) {
1373
- ensureBooted(Model);
1373
+ ensureBooted(this);
1374
1374
  const existing = modelGlobalScopes.get(Model) ?? [];
1375
1375
  modelGlobalScopes.set(Model, [
1376
1376
  ...existing,
@@ -1402,7 +1402,7 @@ class Model {
1402
1402
  return statics.fromRecord(record, repository, true);
1403
1403
  }
1404
1404
  static async find(id) {
1405
- const statics = modelStatics(Model);
1405
+ const statics = modelStatics(this);
1406
1406
  const repository = resolveModelRepository(Model);
1407
1407
  const primaryKey = repository.getTable().primaryKey;
1408
1408
  const record = await Model.query.call(Model).where({ [primaryKey]: id }).first();
@@ -1577,24 +1577,24 @@ class Model {
1577
1577
  throw new Error(`${this.constructor.name}.primaryKey() is not implemented.`);
1578
1578
  }
1579
1579
  static primaryKeyField() {
1580
- return resolveModelRepository(Model).getTable().primaryKey;
1580
+ return resolveModelRepository(this).getTable().primaryKey;
1581
1581
  }
1582
1582
  static hydrateAttributes(attributes) {
1583
- const casts = modelStatics(Model).$casts ?? {};
1583
+ const casts = modelStatics(this).$casts ?? {};
1584
1584
  return applyCasts(attributes, casts, "hydrate");
1585
1585
  }
1586
1586
  static dehydrateAttributes(attributes) {
1587
- const casts = modelStatics(Model).$casts ?? {};
1587
+ const casts = modelStatics(this).$casts ?? {};
1588
1588
  return applyCasts(attributes, casts, "dehydrate");
1589
1589
  }
1590
1590
  static fromRecord(record, repository, exists = true) {
1591
- const statics = modelStatics(Model);
1591
+ const statics = modelStatics(this);
1592
1592
  const hydrated = statics.hydrateAttributes(record);
1593
1593
  return new statics(hydrated, repository, exists);
1594
1594
  }
1595
1595
  static boot() {}
1596
1596
  static addGlobalScope(_name, scope) {
1597
- ensureBooted(Model);
1597
+ ensureBooted(this);
1598
1598
  const existing = modelGlobalScopes.get(Model) ?? [];
1599
1599
  modelGlobalScopes.set(Model, [
1600
1600
  ...existing,
@@ -1626,7 +1626,7 @@ class Model {
1626
1626
  return statics.fromRecord(record, repository, true);
1627
1627
  }
1628
1628
  static async find(id) {
1629
- const statics = modelStatics(Model);
1629
+ const statics = modelStatics(this);
1630
1630
  const repository = resolveModelRepository(Model);
1631
1631
  const primaryKey = repository.getTable().primaryKey;
1632
1632
  const record = await Model.query.call(Model).where({ [primaryKey]: id }).first();
@@ -1577,24 +1577,24 @@ class Model {
1577
1577
  throw new Error(`${this.constructor.name}.primaryKey() is not implemented.`);
1578
1578
  }
1579
1579
  static primaryKeyField() {
1580
- return resolveModelRepository(Model).getTable().primaryKey;
1580
+ return resolveModelRepository(this).getTable().primaryKey;
1581
1581
  }
1582
1582
  static hydrateAttributes(attributes) {
1583
- const casts = modelStatics(Model).$casts ?? {};
1583
+ const casts = modelStatics(this).$casts ?? {};
1584
1584
  return applyCasts(attributes, casts, "hydrate");
1585
1585
  }
1586
1586
  static dehydrateAttributes(attributes) {
1587
- const casts = modelStatics(Model).$casts ?? {};
1587
+ const casts = modelStatics(this).$casts ?? {};
1588
1588
  return applyCasts(attributes, casts, "dehydrate");
1589
1589
  }
1590
1590
  static fromRecord(record, repository, exists = true) {
1591
- const statics = modelStatics(Model);
1591
+ const statics = modelStatics(this);
1592
1592
  const hydrated = statics.hydrateAttributes(record);
1593
1593
  return new statics(hydrated, repository, exists);
1594
1594
  }
1595
1595
  static boot() {}
1596
1596
  static addGlobalScope(_name, scope) {
1597
- ensureBooted(Model);
1597
+ ensureBooted(this);
1598
1598
  const existing = modelGlobalScopes.get(Model) ?? [];
1599
1599
  modelGlobalScopes.set(Model, [
1600
1600
  ...existing,
@@ -1626,7 +1626,7 @@ class Model {
1626
1626
  return statics.fromRecord(record, repository, true);
1627
1627
  }
1628
1628
  static async find(id) {
1629
- const statics = modelStatics(Model);
1629
+ const statics = modelStatics(this);
1630
1630
  const repository = resolveModelRepository(Model);
1631
1631
  const primaryKey = repository.getTable().primaryKey;
1632
1632
  const record = await Model.query.call(Model).where({ [primaryKey]: id }).first();
@@ -1751,24 +1751,24 @@ class Model {
1751
1751
  throw new Error(`${this.constructor.name}.primaryKey() is not implemented.`);
1752
1752
  }
1753
1753
  static primaryKeyField() {
1754
- return resolveModelRepository(Model).getTable().primaryKey;
1754
+ return resolveModelRepository(this).getTable().primaryKey;
1755
1755
  }
1756
1756
  static hydrateAttributes(attributes) {
1757
- const casts = modelStatics(Model).$casts ?? {};
1757
+ const casts = modelStatics(this).$casts ?? {};
1758
1758
  return applyCasts(attributes, casts, "hydrate");
1759
1759
  }
1760
1760
  static dehydrateAttributes(attributes) {
1761
- const casts = modelStatics(Model).$casts ?? {};
1761
+ const casts = modelStatics(this).$casts ?? {};
1762
1762
  return applyCasts(attributes, casts, "dehydrate");
1763
1763
  }
1764
1764
  static fromRecord(record, repository, exists = true) {
1765
- const statics = modelStatics(Model);
1765
+ const statics = modelStatics(this);
1766
1766
  const hydrated = statics.hydrateAttributes(record);
1767
1767
  return new statics(hydrated, repository, exists);
1768
1768
  }
1769
1769
  static boot() {}
1770
1770
  static addGlobalScope(_name, scope) {
1771
- ensureBooted(Model);
1771
+ ensureBooted(this);
1772
1772
  const existing = modelGlobalScopes.get(Model) ?? [];
1773
1773
  modelGlobalScopes.set(Model, [
1774
1774
  ...existing,
@@ -1800,7 +1800,7 @@ class Model {
1800
1800
  return statics.fromRecord(record, repository, true);
1801
1801
  }
1802
1802
  static async find(id) {
1803
- const statics = modelStatics(Model);
1803
+ const statics = modelStatics(this);
1804
1804
  const repository = resolveModelRepository(Model);
1805
1805
  const primaryKey = repository.getTable().primaryKey;
1806
1806
  const record = await Model.query.call(Model).where({ [primaryKey]: id }).first();
@@ -1353,24 +1353,24 @@ class Model {
1353
1353
  throw new Error(`${this.constructor.name}.primaryKey() is not implemented.`);
1354
1354
  }
1355
1355
  static primaryKeyField() {
1356
- return resolveModelRepository(Model).getTable().primaryKey;
1356
+ return resolveModelRepository(this).getTable().primaryKey;
1357
1357
  }
1358
1358
  static hydrateAttributes(attributes) {
1359
- const casts = modelStatics(Model).$casts ?? {};
1359
+ const casts = modelStatics(this).$casts ?? {};
1360
1360
  return applyCasts(attributes, casts, "hydrate");
1361
1361
  }
1362
1362
  static dehydrateAttributes(attributes) {
1363
- const casts = modelStatics(Model).$casts ?? {};
1363
+ const casts = modelStatics(this).$casts ?? {};
1364
1364
  return applyCasts(attributes, casts, "dehydrate");
1365
1365
  }
1366
1366
  static fromRecord(record, repository, exists = true) {
1367
- const statics = modelStatics(Model);
1367
+ const statics = modelStatics(this);
1368
1368
  const hydrated = statics.hydrateAttributes(record);
1369
1369
  return new statics(hydrated, repository, exists);
1370
1370
  }
1371
1371
  static boot() {}
1372
1372
  static addGlobalScope(_name, scope) {
1373
- ensureBooted(Model);
1373
+ ensureBooted(this);
1374
1374
  const existing = modelGlobalScopes.get(Model) ?? [];
1375
1375
  modelGlobalScopes.set(Model, [
1376
1376
  ...existing,
@@ -1402,7 +1402,7 @@ class Model {
1402
1402
  return statics.fromRecord(record, repository, true);
1403
1403
  }
1404
1404
  static async find(id) {
1405
- const statics = modelStatics(Model);
1405
+ const statics = modelStatics(this);
1406
1406
  const repository = resolveModelRepository(Model);
1407
1407
  const primaryKey = repository.getTable().primaryKey;
1408
1408
  const record = await Model.query.call(Model).where({ [primaryKey]: id }).first();
@@ -1761,24 +1761,24 @@ class Model {
1761
1761
  throw new Error(`${this.constructor.name}.primaryKey() is not implemented.`);
1762
1762
  }
1763
1763
  static primaryKeyField() {
1764
- return resolveModelRepository(Model).getTable().primaryKey;
1764
+ return resolveModelRepository(this).getTable().primaryKey;
1765
1765
  }
1766
1766
  static hydrateAttributes(attributes) {
1767
- const casts = modelStatics(Model).$casts ?? {};
1767
+ const casts = modelStatics(this).$casts ?? {};
1768
1768
  return applyCasts(attributes, casts, "hydrate");
1769
1769
  }
1770
1770
  static dehydrateAttributes(attributes) {
1771
- const casts = modelStatics(Model).$casts ?? {};
1771
+ const casts = modelStatics(this).$casts ?? {};
1772
1772
  return applyCasts(attributes, casts, "dehydrate");
1773
1773
  }
1774
1774
  static fromRecord(record, repository, exists = true) {
1775
- const statics = modelStatics(Model);
1775
+ const statics = modelStatics(this);
1776
1776
  const hydrated = statics.hydrateAttributes(record);
1777
1777
  return new statics(hydrated, repository, exists);
1778
1778
  }
1779
1779
  static boot() {}
1780
1780
  static addGlobalScope(_name, scope) {
1781
- ensureBooted(Model);
1781
+ ensureBooted(this);
1782
1782
  const existing = modelGlobalScopes.get(Model) ?? [];
1783
1783
  modelGlobalScopes.set(Model, [
1784
1784
  ...existing,
@@ -1810,7 +1810,7 @@ class Model {
1810
1810
  return statics.fromRecord(record, repository, true);
1811
1811
  }
1812
1812
  static async find(id) {
1813
- const statics = modelStatics(Model);
1813
+ const statics = modelStatics(this);
1814
1814
  const repository = resolveModelRepository(Model);
1815
1815
  const primaryKey = repository.getTable().primaryKey;
1816
1816
  const record = await Model.query.call(Model).where({ [primaryKey]: id }).first();
@@ -1562,24 +1562,24 @@ class Model {
1562
1562
  throw new Error(`${this.constructor.name}.primaryKey() is not implemented.`);
1563
1563
  }
1564
1564
  static primaryKeyField() {
1565
- return resolveModelRepository(Model).getTable().primaryKey;
1565
+ return resolveModelRepository(this).getTable().primaryKey;
1566
1566
  }
1567
1567
  static hydrateAttributes(attributes) {
1568
- const casts = modelStatics(Model).$casts ?? {};
1568
+ const casts = modelStatics(this).$casts ?? {};
1569
1569
  return applyCasts(attributes, casts, "hydrate");
1570
1570
  }
1571
1571
  static dehydrateAttributes(attributes) {
1572
- const casts = modelStatics(Model).$casts ?? {};
1572
+ const casts = modelStatics(this).$casts ?? {};
1573
1573
  return applyCasts(attributes, casts, "dehydrate");
1574
1574
  }
1575
1575
  static fromRecord(record, repository, exists = true) {
1576
- const statics = modelStatics(Model);
1576
+ const statics = modelStatics(this);
1577
1577
  const hydrated = statics.hydrateAttributes(record);
1578
1578
  return new statics(hydrated, repository, exists);
1579
1579
  }
1580
1580
  static boot() {}
1581
1581
  static addGlobalScope(_name, scope) {
1582
- ensureBooted(Model);
1582
+ ensureBooted(this);
1583
1583
  const existing = modelGlobalScopes.get(Model) ?? [];
1584
1584
  modelGlobalScopes.set(Model, [
1585
1585
  ...existing,
@@ -1611,7 +1611,7 @@ class Model {
1611
1611
  return statics.fromRecord(record, repository, true);
1612
1612
  }
1613
1613
  static async find(id) {
1614
- const statics = modelStatics(Model);
1614
+ const statics = modelStatics(this);
1615
1615
  const repository = resolveModelRepository(Model);
1616
1616
  const primaryKey = repository.getTable().primaryKey;
1617
1617
  const record = await Model.query.call(Model).where({ [primaryKey]: id }).first();
package/dist/index.js CHANGED
@@ -1747,24 +1747,24 @@ class Model {
1747
1747
  throw new Error(`${this.constructor.name}.primaryKey() is not implemented.`);
1748
1748
  }
1749
1749
  static primaryKeyField() {
1750
- return resolveModelRepository(Model).getTable().primaryKey;
1750
+ return resolveModelRepository(this).getTable().primaryKey;
1751
1751
  }
1752
1752
  static hydrateAttributes(attributes) {
1753
- const casts = modelStatics(Model).$casts ?? {};
1753
+ const casts = modelStatics(this).$casts ?? {};
1754
1754
  return applyCasts(attributes, casts, "hydrate");
1755
1755
  }
1756
1756
  static dehydrateAttributes(attributes) {
1757
- const casts = modelStatics(Model).$casts ?? {};
1757
+ const casts = modelStatics(this).$casts ?? {};
1758
1758
  return applyCasts(attributes, casts, "dehydrate");
1759
1759
  }
1760
1760
  static fromRecord(record, repository, exists = true) {
1761
- const statics = modelStatics(Model);
1761
+ const statics = modelStatics(this);
1762
1762
  const hydrated = statics.hydrateAttributes(record);
1763
1763
  return new statics(hydrated, repository, exists);
1764
1764
  }
1765
1765
  static boot() {}
1766
1766
  static addGlobalScope(_name, scope) {
1767
- ensureBooted(Model);
1767
+ ensureBooted(this);
1768
1768
  const existing = modelGlobalScopes.get(Model) ?? [];
1769
1769
  modelGlobalScopes.set(Model, [
1770
1770
  ...existing,
@@ -1796,7 +1796,7 @@ class Model {
1796
1796
  return statics.fromRecord(record, repository, true);
1797
1797
  }
1798
1798
  static async find(id) {
1799
- const statics = modelStatics(Model);
1799
+ const statics = modelStatics(this);
1800
1800
  const repository = resolveModelRepository(Model);
1801
1801
  const primaryKey = repository.getTable().primaryKey;
1802
1802
  const record = await Model.query.call(Model).where({ [primaryKey]: id }).first();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@getstrata/core",
3
- "version": "0.5.6",
3
+ "version": "0.5.8",
4
4
  "description": "Strata — Laravel-inspired Bun framework public API",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -16,287 +16,287 @@
16
16
  "default": "./dist/index.js"
17
17
  },
18
18
  "./auth/accessControl": {
19
- "types": "./dist/entries/auth/accessControl.d.ts",
19
+ "types": "./dist/core/auth/accessControl.d.ts",
20
20
  "import": "./dist/entries/auth/accessControl.js",
21
21
  "default": "./dist/entries/auth/accessControl.js"
22
22
  },
23
23
  "./auth/authContext": {
24
- "types": "./dist/entries/auth/authContext.d.ts",
24
+ "types": "./dist/core/auth/authContext.d.ts",
25
25
  "import": "./dist/entries/auth/authContext.js",
26
26
  "default": "./dist/entries/auth/authContext.js"
27
27
  },
28
28
  "./auth/guard": {
29
- "types": "./dist/entries/auth/guard.d.ts",
29
+ "types": "./dist/core/auth/guard.d.ts",
30
30
  "import": "./dist/entries/auth/guard.js",
31
31
  "default": "./dist/entries/auth/guard.js"
32
32
  },
33
33
  "./auth/membershipContext": {
34
- "types": "./dist/entries/auth/membershipContext.d.ts",
34
+ "types": "./dist/core/auth/membershipContext.d.ts",
35
35
  "import": "./dist/entries/auth/membershipContext.js",
36
36
  "default": "./dist/entries/auth/membershipContext.js"
37
37
  },
38
38
  "./auth/membershipScope": {
39
- "types": "./dist/entries/auth/membershipScope.d.ts",
39
+ "types": "./dist/core/auth/membershipScope.d.ts",
40
40
  "import": "./dist/entries/auth/membershipScope.js",
41
41
  "default": "./dist/entries/auth/membershipScope.js"
42
42
  },
43
43
  "./auth/membershipService": {
44
- "types": "./dist/entries/auth/membershipService.d.ts",
44
+ "types": "./dist/core/auth/membershipService.d.ts",
45
45
  "import": "./dist/entries/auth/membershipService.js",
46
46
  "default": "./dist/entries/auth/membershipService.js"
47
47
  },
48
48
  "./auth/oauth/oidcProvider": {
49
- "types": "./dist/entries/auth/oauth/oidcProvider.d.ts",
49
+ "types": "./dist/core/auth/oauth/oidcProvider.d.ts",
50
50
  "import": "./dist/entries/auth/oauth/oidcProvider.js",
51
51
  "default": "./dist/entries/auth/oauth/oidcProvider.js"
52
52
  },
53
53
  "./auth/oauth/providers": {
54
- "types": "./dist/entries/auth/oauth/providers.d.ts",
54
+ "types": "./dist/core/auth/oauth/providers.d.ts",
55
55
  "import": "./dist/entries/auth/oauth/providers.js",
56
56
  "default": "./dist/entries/auth/oauth/providers.js"
57
57
  },
58
58
  "./auth/oauth/samlProvider": {
59
- "types": "./dist/entries/auth/oauth/samlProvider.d.ts",
59
+ "types": "./dist/core/auth/oauth/samlProvider.d.ts",
60
60
  "import": "./dist/entries/auth/oauth/samlProvider.js",
61
61
  "default": "./dist/entries/auth/oauth/samlProvider.js"
62
62
  },
63
63
  "./auth/oauth/types": {
64
- "types": "./dist/entries/auth/oauth/types.d.ts",
64
+ "types": "./dist/core/auth/oauth/types.d.ts",
65
65
  "import": "./dist/entries/auth/oauth/types.js",
66
66
  "default": "./dist/entries/auth/oauth/types.js"
67
67
  },
68
68
  "./auth/password": {
69
- "types": "./dist/entries/auth/password.d.ts",
69
+ "types": "./dist/core/auth/password.d.ts",
70
70
  "import": "./dist/entries/auth/password.js",
71
71
  "default": "./dist/entries/auth/password.js"
72
72
  },
73
73
  "./auth/policy": {
74
- "types": "./dist/entries/auth/policy.d.ts",
74
+ "types": "./dist/core/auth/policy.d.ts",
75
75
  "import": "./dist/entries/auth/policy.js",
76
76
  "default": "./dist/entries/auth/policy.js"
77
77
  },
78
78
  "./auth/sessionCookie": {
79
- "types": "./dist/entries/auth/sessionCookie.d.ts",
79
+ "types": "./dist/core/auth/sessionCookie.d.ts",
80
80
  "import": "./dist/entries/auth/sessionCookie.js",
81
81
  "default": "./dist/entries/auth/sessionCookie.js"
82
82
  },
83
83
  "./auth/tokenHash": {
84
- "types": "./dist/entries/auth/tokenHash.d.ts",
84
+ "types": "./dist/core/auth/tokenHash.d.ts",
85
85
  "import": "./dist/entries/auth/tokenHash.js",
86
86
  "default": "./dist/entries/auth/tokenHash.js"
87
87
  },
88
88
  "./cache/tags": {
89
- "types": "./dist/entries/cache/tags.d.ts",
89
+ "types": "./dist/core/cache/tags.d.ts",
90
90
  "import": "./dist/entries/cache/tags.js",
91
91
  "default": "./dist/entries/cache/tags.js"
92
92
  },
93
93
  "./crypto/fieldEncryption": {
94
- "types": "./dist/entries/crypto/fieldEncryption.d.ts",
94
+ "types": "./dist/core/crypto/fieldEncryption.d.ts",
95
95
  "import": "./dist/entries/crypto/fieldEncryption.js",
96
96
  "default": "./dist/entries/crypto/fieldEncryption.js"
97
97
  },
98
98
  "./crypto/mfaSecret": {
99
- "types": "./dist/entries/crypto/mfaSecret.d.ts",
99
+ "types": "./dist/core/crypto/mfaSecret.d.ts",
100
100
  "import": "./dist/entries/crypto/mfaSecret.js",
101
101
  "default": "./dist/entries/crypto/mfaSecret.js"
102
102
  },
103
103
  "./database": {
104
- "types": "./dist/entries/database.d.ts",
104
+ "types": "./dist/core/database/index.d.ts",
105
105
  "import": "./dist/entries/database.js",
106
106
  "default": "./dist/entries/database.js"
107
107
  },
108
108
  "./database/factory": {
109
- "types": "./dist/entries/database/factory.d.ts",
109
+ "types": "./dist/core/database/factory.d.ts",
110
110
  "import": "./dist/entries/database/factory.js",
111
111
  "default": "./dist/entries/database/factory.js"
112
112
  },
113
113
  "./database/seeders": {
114
- "types": "./dist/entries/database/seeders.d.ts",
114
+ "types": "./dist/core/database/seeders/runner.d.ts",
115
115
  "import": "./dist/entries/database/seeders.js",
116
116
  "default": "./dist/entries/database/seeders.js"
117
117
  },
118
118
  "./database/types": {
119
- "types": "./dist/entries/database/types.d.ts",
119
+ "types": "./dist/core/database/types.d.ts",
120
120
  "import": "./dist/entries/database/types.js",
121
121
  "default": "./dist/entries/database/types.js"
122
122
  },
123
123
  "./errors/http": {
124
- "types": "./dist/entries/errors/http.d.ts",
124
+ "types": "./dist/core/errors/http.d.ts",
125
125
  "import": "./dist/entries/errors/http.js",
126
126
  "default": "./dist/entries/errors/http.js"
127
127
  },
128
128
  "./http": {
129
- "types": "./dist/entries/http.d.ts",
129
+ "types": "./dist/core/http/index.d.ts",
130
130
  "import": "./dist/entries/http.js",
131
131
  "default": "./dist/entries/http.js"
132
132
  },
133
133
  "./http/contentNegotiation": {
134
- "types": "./dist/entries/http/contentNegotiation.d.ts",
134
+ "types": "./dist/core/http/contentNegotiation.d.ts",
135
135
  "import": "./dist/entries/http/contentNegotiation.js",
136
136
  "default": "./dist/entries/http/contentNegotiation.js"
137
137
  },
138
138
  "./http/csrfToken": {
139
- "types": "./dist/entries/http/csrfToken.d.ts",
139
+ "types": "./dist/core/http/csrfToken.d.ts",
140
140
  "import": "./dist/entries/http/csrfToken.js",
141
141
  "default": "./dist/entries/http/csrfToken.js"
142
142
  },
143
143
  "./http/etag": {
144
- "types": "./dist/entries/http/etag.d.ts",
144
+ "types": "./dist/core/http/etag.d.ts",
145
145
  "import": "./dist/entries/http/etag.js",
146
146
  "default": "./dist/entries/http/etag.js"
147
147
  },
148
148
  "./http/flashSession": {
149
- "types": "./dist/entries/http/flashSession.d.ts",
149
+ "types": "./dist/core/http/flashSession.d.ts",
150
150
  "import": "./dist/entries/http/flashSession.js",
151
151
  "default": "./dist/entries/http/flashSession.js"
152
152
  },
153
153
  "./http/middleware": {
154
- "types": "./dist/entries/http/middleware.d.ts",
154
+ "types": "./dist/core/http/middleware.d.ts",
155
155
  "import": "./dist/entries/http/middleware.js",
156
156
  "default": "./dist/entries/http/middleware.js"
157
157
  },
158
158
  "./http/parseFormBody": {
159
- "types": "./dist/entries/http/parseFormBody.d.ts",
159
+ "types": "./dist/core/http/parseFormBody.d.ts",
160
160
  "import": "./dist/entries/http/parseFormBody.js",
161
161
  "default": "./dist/entries/http/parseFormBody.js"
162
162
  },
163
163
  "./http/resources": {
164
- "types": "./dist/entries/http/resources.d.ts",
164
+ "types": "./dist/core/http/resources.d.ts",
165
165
  "import": "./dist/entries/http/resources.js",
166
166
  "default": "./dist/entries/http/resources.js"
167
167
  },
168
168
  "./http/requestMetaContext": {
169
- "types": "./dist/entries/http/requestMetaContext.d.ts",
169
+ "types": "./dist/core/http/requestMetaContext.d.ts",
170
170
  "import": "./dist/entries/http/requestMetaContext.js",
171
171
  "default": "./dist/entries/http/requestMetaContext.js"
172
172
  },
173
173
  "./http/webErrorResponse": {
174
- "types": "./dist/entries/http/webErrorResponse.d.ts",
174
+ "types": "./dist/core/http/webErrorResponse.d.ts",
175
175
  "import": "./dist/entries/http/webErrorResponse.js",
176
176
  "default": "./dist/entries/http/webErrorResponse.js"
177
177
  },
178
178
  "./http/webFormRequest": {
179
- "types": "./dist/entries/http/webFormRequest.d.ts",
179
+ "types": "./dist/core/http/webFormRequest.d.ts",
180
180
  "import": "./dist/entries/http/webFormRequest.js",
181
181
  "default": "./dist/entries/http/webFormRequest.js"
182
182
  },
183
183
  "./jobs/dispatchWebhookJob": {
184
- "types": "./dist/entries/jobs/dispatchWebhookJob.d.ts",
184
+ "types": "./dist/core/jobs/dispatchWebhookJob.d.ts",
185
185
  "import": "./dist/entries/jobs/dispatchWebhookJob.js",
186
186
  "default": "./dist/entries/jobs/dispatchWebhookJob.js"
187
187
  },
188
188
  "./lifecycle/gracefulShutdown": {
189
- "types": "./dist/entries/lifecycle/gracefulShutdown.d.ts",
189
+ "types": "./dist/core/lifecycle/gracefulShutdown.d.ts",
190
190
  "import": "./dist/entries/lifecycle/gracefulShutdown.js",
191
191
  "default": "./dist/entries/lifecycle/gracefulShutdown.js"
192
192
  },
193
193
  "./metrics/prometheus": {
194
- "types": "./dist/entries/metrics/prometheus.d.ts",
194
+ "types": "./dist/core/metrics/prometheus.d.ts",
195
195
  "import": "./dist/entries/metrics/prometheus.js",
196
196
  "default": "./dist/entries/metrics/prometheus.js"
197
197
  },
198
198
  "./pagination": {
199
- "types": "./dist/entries/pagination.d.ts",
199
+ "types": "./dist/core/pagination/index.d.ts",
200
200
  "import": "./dist/entries/pagination.js",
201
201
  "default": "./dist/entries/pagination.js"
202
202
  },
203
203
  "./queue/createAppQueue": {
204
- "types": "./dist/entries/queue/createAppQueue.d.ts",
204
+ "types": "./dist/core/queue/createAppQueue.d.ts",
205
205
  "import": "./dist/entries/queue/createAppQueue.js",
206
206
  "default": "./dist/entries/queue/createAppQueue.js"
207
207
  },
208
208
  "./queue/failedJobService": {
209
- "types": "./dist/entries/queue/failedJobService.d.ts",
209
+ "types": "./dist/core/queue/failedJobService.d.ts",
210
210
  "import": "./dist/entries/queue/failedJobService.js",
211
211
  "default": "./dist/entries/queue/failedJobService.js"
212
212
  },
213
213
  "./queue/jobRegistry": {
214
- "types": "./dist/entries/queue/jobRegistry.d.ts",
214
+ "types": "./dist/core/queue/jobRegistry.d.ts",
215
215
  "import": "./dist/entries/queue/jobRegistry.js",
216
216
  "default": "./dist/entries/queue/jobRegistry.js"
217
217
  },
218
218
  "./queue/jobRunner": {
219
- "types": "./dist/entries/queue/jobRunner.d.ts",
219
+ "types": "./dist/core/queue/jobRunner.d.ts",
220
220
  "import": "./dist/entries/queue/jobRunner.js",
221
221
  "default": "./dist/entries/queue/jobRunner.js"
222
222
  },
223
223
  "./queue/queueMetrics": {
224
- "types": "./dist/entries/queue/queueMetrics.d.ts",
224
+ "types": "./dist/core/queue/queueMetrics.d.ts",
225
225
  "import": "./dist/entries/queue/queueMetrics.js",
226
226
  "default": "./dist/entries/queue/queueMetrics.js"
227
227
  },
228
228
  "./queue/publicQueue": {
229
- "types": "./dist/entries/queue/publicQueue.d.ts",
229
+ "types": "./dist/core/queue/publicQueue.d.ts",
230
230
  "import": "./dist/entries/queue/publicQueue.js",
231
231
  "default": "./dist/entries/queue/publicQueue.js"
232
232
  },
233
233
  "./queue/types": {
234
- "types": "./dist/entries/queue/types.d.ts",
234
+ "types": "./dist/core/queue/types.d.ts",
235
235
  "import": "./dist/entries/queue/types.js",
236
236
  "default": "./dist/entries/queue/types.js"
237
237
  },
238
238
  "./security/oauthState": {
239
- "types": "./dist/entries/security/oauthState.d.ts",
239
+ "types": "./dist/core/security/oauthState.d.ts",
240
240
  "import": "./dist/entries/security/oauthState.js",
241
241
  "default": "./dist/entries/security/oauthState.js"
242
242
  },
243
243
  "./security/publicReads": {
244
- "types": "./dist/entries/security/publicReads.d.ts",
244
+ "types": "./dist/core/security/publicReads.d.ts",
245
245
  "import": "./dist/entries/security/publicReads.js",
246
246
  "default": "./dist/entries/security/publicReads.js"
247
247
  },
248
248
  "./security/safeUrl": {
249
- "types": "./dist/entries/security/safeUrl.d.ts",
249
+ "types": "./dist/core/security/safeUrl.d.ts",
250
250
  "import": "./dist/entries/security/safeUrl.js",
251
251
  "default": "./dist/entries/security/safeUrl.js"
252
252
  },
253
253
  "./security/securityEvents": {
254
- "types": "./dist/entries/security/securityEvents.d.ts",
254
+ "types": "./dist/core/security/securityEvents.d.ts",
255
255
  "import": "./dist/entries/security/securityEvents.js",
256
256
  "default": "./dist/entries/security/securityEvents.js"
257
257
  },
258
258
  "./security/stripeWebhook": {
259
- "types": "./dist/entries/security/stripeWebhook.d.ts",
259
+ "types": "./dist/core/security/stripeWebhook.d.ts",
260
260
  "import": "./dist/entries/security/stripeWebhook.js",
261
261
  "default": "./dist/entries/security/stripeWebhook.js"
262
262
  },
263
263
  "./security/tokenExpiry": {
264
- "types": "./dist/entries/security/tokenExpiry.d.ts",
264
+ "types": "./dist/core/security/tokenExpiry.d.ts",
265
265
  "import": "./dist/entries/security/tokenExpiry.js",
266
266
  "default": "./dist/entries/security/tokenExpiry.js"
267
267
  },
268
268
  "./security/totp": {
269
- "types": "./dist/entries/security/totp.d.ts",
269
+ "types": "./dist/core/security/totp.d.ts",
270
270
  "import": "./dist/entries/security/totp.js",
271
271
  "default": "./dist/entries/security/totp.js"
272
272
  },
273
273
  "./storage/storage": {
274
- "types": "./dist/entries/storage/storage.d.ts",
274
+ "types": "./dist/core/storage/storage.d.ts",
275
275
  "import": "./dist/entries/storage/storage.js",
276
276
  "default": "./dist/entries/storage/storage.js"
277
277
  },
278
278
  "./tenant/tenantContext": {
279
- "types": "./dist/entries/tenant/tenantContext.d.ts",
279
+ "types": "./dist/core/tenant/tenantContext.d.ts",
280
280
  "import": "./dist/entries/tenant/tenantContext.js",
281
281
  "default": "./dist/entries/tenant/tenantContext.js"
282
282
  },
283
283
  "./tenant/tenantMiddleware": {
284
- "types": "./dist/entries/tenant/tenantMiddleware.d.ts",
284
+ "types": "./dist/core/tenant/tenantMiddleware.d.ts",
285
285
  "import": "./dist/entries/tenant/tenantMiddleware.js",
286
286
  "default": "./dist/entries/tenant/tenantMiddleware.js"
287
287
  },
288
288
  "./tracing/traceContext": {
289
- "types": "./dist/entries/tracing/traceContext.d.ts",
289
+ "types": "./dist/core/tracing/traceContext.d.ts",
290
290
  "import": "./dist/entries/tracing/traceContext.js",
291
291
  "default": "./dist/entries/tracing/traceContext.js"
292
292
  },
293
293
  "./validation/rules": {
294
- "types": "./dist/entries/validation/rules.d.ts",
294
+ "types": "./dist/core/validation/rules.d.ts",
295
295
  "import": "./dist/entries/validation/rules.js",
296
296
  "default": "./dist/entries/validation/rules.js"
297
297
  },
298
298
  "./view": {
299
- "types": "./dist/entries/view.d.ts",
299
+ "types": "./dist/core/view/index.d.ts",
300
300
  "import": "./dist/entries/view.js",
301
301
  "default": "./dist/entries/view.js"
302
302
  }