@burdenoff/be-sdk 2026.1123.2 → 2026.1123.4
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/auth/index.d.ts +1 -1
- package/dist/auth/index.js +1 -1
- package/dist/{auth-C5ctwSLp.js → auth-DqD4_tHM.js} +39 -6
- package/dist/auth-DqD4_tHM.js.map +1 -0
- package/dist/{client-BgAEvDC2.d.ts → client-NknQrWsP.d.ts} +3 -1
- package/dist/feature-flags/index.d.ts +1 -1
- package/dist/graph/index.d.ts +1 -1
- package/dist/graph/index.js +2 -2
- package/dist/{graph-Egewc_K7.js → graph-BdoM7_90.js} +2 -2
- package/dist/{graph-Egewc_K7.js.map → graph-BdoM7_90.js.map} +1 -1
- package/dist/{index-HeUeEsMU.d.ts → index-BaskMO3C.d.ts} +8 -2
- package/dist/{index-479i3w77.d.ts → index-BgOU0pxB.d.ts} +30 -5
- package/dist/{index-FKohsiex.d.ts → index-BrRQe24P.d.ts} +3 -2
- package/dist/{index-BiTzGUZP.d.ts → index-BwgBHUuX.d.ts} +2 -2
- package/dist/{index-DMeQh75K.d.ts → index-CIayzveI.d.ts} +1 -1
- package/dist/{index-DSA8h4W3.d.ts → index-CUiL43SY.d.ts} +2 -2
- package/dist/{index-CzMD97-N.d.ts → index-CkQieKSy.d.ts} +16 -2
- package/dist/{index-nP7g1FZm.d.ts → index-DFEKBKBE.d.ts} +4 -1
- package/dist/{index-DhFP_AIB.d.ts → index-DkitHCtV.d.ts} +1 -1
- package/dist/index.d.ts +8 -8
- package/dist/index.js +7 -7
- package/dist/init/index.js +1 -1
- package/dist/{init-BCLZQ1Gz.js → init-4vv4gYEm.js} +2 -2
- package/dist/{init-BCLZQ1Gz.js.map → init-4vv4gYEm.js.map} +1 -1
- package/dist/instrumentation/index.d.ts +2 -2
- package/dist/instrumentation/index.js +3 -3
- package/dist/{instrumentation-xkkmDgJ0.js → instrumentation-C738xDj8.js} +45 -6
- package/dist/instrumentation-C738xDj8.js.map +1 -0
- package/dist/lake/index.d.ts +52 -3
- package/dist/lake/index.js +238 -9
- package/dist/lake/index.js.map +1 -1
- package/dist/metrics/index.js +1 -1
- package/dist/{metrics-BrLwNUrb.js → metrics-CQaHT12m.js} +2 -2
- package/dist/{metrics-BrLwNUrb.js.map → metrics-CQaHT12m.js.map} +1 -1
- package/dist/{metrics-collector-C2eShrlW.js → metrics-collector-DXQrMUle.js} +216 -139
- package/dist/metrics-collector-DXQrMUle.js.map +1 -0
- package/dist/{middleware-B9eyLP7A.js → middleware-z8KzMFU_.js} +95 -5
- package/dist/middleware-z8KzMFU_.js.map +1 -0
- package/dist/prisma/index.d.ts +3 -3
- package/dist/prisma/index.js +3 -3
- package/dist/{prisma-CML_Prrn.js → prisma-J-ZUmVWJ.js} +4 -2
- package/dist/{prisma-CML_Prrn.js.map → prisma-J-ZUmVWJ.js.map} +1 -1
- package/dist/{rate-limit-CBrK_U5H.js → rate-limit-ISSpByjW.js} +25 -25
- package/dist/rate-limit-ISSpByjW.js.map +1 -0
- package/dist/resource-caps/index.d.ts +77 -0
- package/dist/resource-caps/index.js +235 -31
- package/dist/resource-caps/index.js.map +1 -1
- package/dist/security/index.d.ts +1 -1
- package/dist/security/index.js +1 -1
- package/dist/security/rate-limit/index.d.ts +1 -1
- package/dist/security/rate-limit/index.js +1 -1
- package/dist/server/index.d.ts +4 -4
- package/dist/server/index.js +112 -6
- package/dist/server/index.js.map +1 -1
- package/dist/tags/index.d.ts +1 -1
- package/dist/tags/index.js +1 -1
- package/dist/{tags-CbijgoqR.js → tags-C316oA9r.js} +14 -3
- package/dist/{tags-CbijgoqR.js.map → tags-C316oA9r.js.map} +1 -1
- package/dist/telemetry/index.d.ts +1 -1
- package/dist/telemetry/index.js +1 -1
- package/dist/{types-De_pO1Wz.d.ts → types-BWN8tMdF.d.ts} +5 -1
- package/dist/utils/index.d.ts +2 -2
- package/dist/utils/index.js +2 -2
- package/dist/{utils-DL85Tnbn.js → utils-DpW6K_iB.js} +24 -7
- package/dist/{utils-DL85Tnbn.js.map → utils-DpW6K_iB.js.map} +1 -1
- package/package.json +1 -1
- package/dist/auth-C5ctwSLp.js.map +0 -1
- package/dist/instrumentation-xkkmDgJ0.js.map +0 -1
- package/dist/metrics-collector-C2eShrlW.js.map +0 -1
- package/dist/middleware-B9eyLP7A.js.map +0 -1
- package/dist/rate-limit-CBrK_U5H.js.map +0 -1
package/dist/auth/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as AuthCookieHelper, i as VerifyTokenResult, n as RefreshTokenResult, o as CookieOptions, r as TokenPayload, t as AuthModule } from "../index-
|
|
1
|
+
import { a as AuthCookieHelper, i as VerifyTokenResult, n as RefreshTokenResult, o as CookieOptions, r as TokenPayload, t as AuthModule } from "../index-DFEKBKBE.js";
|
|
2
2
|
export { AuthCookieHelper, AuthModule, CookieOptions, RefreshTokenResult, TokenPayload, VerifyTokenResult };
|
package/dist/auth/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { AuthenticationError } from "./types/index.js";
|
|
2
2
|
import { a as logger } from "./logger-B6rCpb7D.js";
|
|
3
|
-
import {
|
|
3
|
+
import { c as isTokenExpiredUnverified, u as parseJWT } from "./utils-DpW6K_iB.js";
|
|
4
4
|
|
|
5
5
|
// src/auth/cookie-helper.ts
|
|
6
6
|
var AuthCookieHelper = class {
|
|
@@ -92,7 +92,7 @@ var AuthCookieHelper = class {
|
|
|
92
92
|
/**
|
|
93
93
|
* Authentication Module
|
|
94
94
|
*/
|
|
95
|
-
var AuthModule = class {
|
|
95
|
+
var AuthModule = class AuthModule {
|
|
96
96
|
client;
|
|
97
97
|
context;
|
|
98
98
|
constructor(client, context) {
|
|
@@ -104,7 +104,7 @@ var AuthModule = class {
|
|
|
104
104
|
*/
|
|
105
105
|
async verifyToken(token) {
|
|
106
106
|
logger.debug("[Auth] Verifying token");
|
|
107
|
-
if (
|
|
107
|
+
if (isTokenExpiredUnverified(token)) return {
|
|
108
108
|
valid: false,
|
|
109
109
|
error: "Token expired"
|
|
110
110
|
};
|
|
@@ -189,11 +189,44 @@ var AuthModule = class {
|
|
|
189
189
|
return false;
|
|
190
190
|
}
|
|
191
191
|
}
|
|
192
|
+
static warnedDeprecatedIsTokenValid = false;
|
|
192
193
|
/**
|
|
193
|
-
*
|
|
194
|
+
* Verify token authenticity and validity via the auth service.
|
|
195
|
+
*
|
|
196
|
+
* Unlike {@link isTokenUnexpiredUnverified}, this performs full server-side
|
|
197
|
+
* cryptographic verification and is safe to use as an authentication check.
|
|
198
|
+
*/
|
|
199
|
+
async isVerifiedTokenValid(token) {
|
|
200
|
+
return (await this.verifyToken(token)).valid === true;
|
|
201
|
+
}
|
|
202
|
+
/**
|
|
203
|
+
* Inspect ONLY the unverified `exp` claim to determine whether a token appears
|
|
204
|
+
* unexpired locally.
|
|
205
|
+
*
|
|
206
|
+
* SECURITY: Does NOT verify cryptographic signature, issuer, audience, or
|
|
207
|
+
* revocation. NEVER use this as an authentication or authorization predicate;
|
|
208
|
+
* use {@link verifyToken} or {@link isVerifiedTokenValid} instead.
|
|
209
|
+
*/
|
|
210
|
+
isTokenUnexpiredUnverified(token) {
|
|
211
|
+
return !isTokenExpiredUnverified(token);
|
|
212
|
+
}
|
|
213
|
+
/**
|
|
214
|
+
* Unverified local expiry check retained only for backwards compatibility.
|
|
215
|
+
*
|
|
216
|
+
* SECURITY WARNING: Despite its name, this method ONLY inspects the unverified
|
|
217
|
+
* `exp` claim and does NOT verify the token signature. It MUST NOT be used for
|
|
218
|
+
* authentication or authorization decisions.
|
|
219
|
+
*
|
|
220
|
+
* @deprecated Use {@link isVerifiedTokenValid} (or {@link verifyToken}) for
|
|
221
|
+
* verified token validation, or {@link isTokenUnexpiredUnverified} when you
|
|
222
|
+
* explicitly intend unverified local expiry inspection only (BOFF-15985).
|
|
194
223
|
*/
|
|
195
224
|
isTokenValid(token) {
|
|
196
|
-
|
|
225
|
+
if (!AuthModule.warnedDeprecatedIsTokenValid) {
|
|
226
|
+
AuthModule.warnedDeprecatedIsTokenValid = true;
|
|
227
|
+
logger.warn("[Auth] AuthModule.isTokenValid() is deprecated: it performs unverified expiry inspection only and does NOT verify signatures. Use isVerifiedTokenValid() / verifyToken() for authentication or isTokenUnexpiredUnverified() for expiry-only checks.");
|
|
228
|
+
}
|
|
229
|
+
return this.isTokenUnexpiredUnverified(token);
|
|
197
230
|
}
|
|
198
231
|
/**
|
|
199
232
|
* Get user ID from token
|
|
@@ -225,4 +258,4 @@ var AuthModule = class {
|
|
|
225
258
|
};
|
|
226
259
|
|
|
227
260
|
export { AuthCookieHelper as n, AuthModule as t };
|
|
228
|
-
//# sourceMappingURL=auth-
|
|
261
|
+
//# sourceMappingURL=auth-DqD4_tHM.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"auth-DqD4_tHM.js","names":[],"sources":["../src/auth/cookie-helper.ts","../src/auth/index.ts"],"sourcesContent":["/**\n * Auth Cookie Helper\n *\n * Utilities for setting secure, HttpOnly cookies for authentication.\n * Used by auth services to transition from localStorage to secure cookies.\n */\n\nimport type { GraphQLContext } from '../server/types.js';\n\nexport interface CookieOptions {\n name: string;\n value: string;\n maxAge?: number;\n domain?: string;\n path?: string;\n httpOnly?: boolean;\n secure?: boolean;\n sameSite?: 'Strict' | 'Lax' | 'None';\n}\n\nexport class AuthCookieHelper {\n private static readonly ACCESS_TOKEN_COOKIE = 'bf_at';\n private static readonly REFRESH_TOKEN_COOKIE = 'bf_rt';\n private static readonly PROFILE_ID_COOKIE = 'bf_pid';\n\n /**\n * Set authentication cookies in the context response headers\n */\n public static setAuthCookies(\n context: GraphQLContext,\n tokens: { accessToken: string; refreshToken?: string },\n options: { profileId?: string; rememberMe?: boolean } = {}\n ): void {\n const isProd = process.env['NODE_ENV'] === 'production';\n const domain = process.env['COOKIE_DOMAIN'];\n\n // Access token cookie (short-lived, 15m)\n this.setCookie(context, {\n name: this.ACCESS_TOKEN_COOKIE,\n value: tokens.accessToken,\n maxAge: 15 * 60,\n httpOnly: true,\n secure: isProd,\n sameSite: 'Lax',\n domain,\n path: '/',\n });\n\n // Refresh token cookie (long-lived, 7d or 30d)\n if (tokens.refreshToken) {\n this.setCookie(context, {\n name: this.REFRESH_TOKEN_COOKIE,\n value: tokens.refreshToken,\n maxAge: options.rememberMe ? 30 * 24 * 60 * 60 : 7 * 24 * 60 * 60,\n httpOnly: true,\n secure: isProd,\n sameSite: 'Lax',\n domain,\n path: '/global/graphql', // Only send to global gateway for refresh\n });\n }\n\n // Profile ID cookie (not HttpOnly, needed for UI profile resolution)\n if (options.profileId) {\n this.setCookie(context, {\n name: this.PROFILE_ID_COOKIE,\n value: options.profileId,\n maxAge: 30 * 24 * 60 * 60,\n httpOnly: false,\n secure: isProd,\n sameSite: 'Lax',\n domain,\n path: '/',\n });\n }\n }\n\n /**\n * Clear authentication cookies\n */\n public static clearAuthCookies(context: GraphQLContext): void {\n const domain = process.env['COOKIE_DOMAIN'];\n const isProd = process.env['NODE_ENV'] === 'production';\n\n const clearOptions = {\n value: '',\n maxAge: 0,\n domain,\n path: '/',\n secure: isProd,\n sameSite: 'Lax' as const,\n };\n\n this.setCookie(context, { ...clearOptions, name: this.ACCESS_TOKEN_COOKIE, httpOnly: true });\n this.setCookie(context, {\n ...clearOptions,\n name: this.REFRESH_TOKEN_COOKIE,\n httpOnly: true,\n path: '/global/graphql',\n });\n this.setCookie(context, { ...clearOptions, name: this.PROFILE_ID_COOKIE, httpOnly: false });\n }\n\n /**\n * Internal helper to set a cookie header\n */\n private static setCookie(context: GraphQLContext, options: CookieOptions): void {\n let cookie = `${options.name}=${options.value}`;\n\n if (options.maxAge !== undefined) {\n cookie += `; Max-Age=${options.maxAge}`;\n }\n\n if (options.domain) {\n cookie += `; Domain=${options.domain}`;\n }\n\n if (options.path) {\n cookie += `; Path=${options.path}`;\n }\n\n if (options.httpOnly) {\n cookie += '; HttpOnly';\n }\n\n if (options.secure) {\n cookie += '; Secure';\n }\n\n if (options.sameSite) {\n cookie += `; SameSite=${options.sameSite}`;\n }\n\n context.responseHeaders.append('Set-Cookie', cookie);\n }\n}\n","/**\n * Authentication Module\n * JWT verification, token management, and user authentication\n */\n\nimport type { BurdenoffGraphQLClient } from '../client/graphql.js';\nimport type { SDKContext } from '../types/index.js';\nimport { AuthenticationError } from '../types/index.js';\nimport { logger } from '../logger/index.js';\nimport { parseJWT, isTokenExpiredUnverified } from '../utils/index.js';\n\nexport { AuthCookieHelper } from './cookie-helper.js';\n\nexport interface TokenPayload {\n jti: string;\n sub: string;\n user_id: string;\n workspace_id?: string;\n org_id?: string;\n tenant_endpoint?: string;\n iat: number;\n exp: number;\n scope?: string;\n}\n\nexport interface VerifyTokenResult {\n valid: boolean;\n payload?: TokenPayload;\n error?: string;\n}\n\nexport interface RefreshTokenResult {\n accessToken: string;\n refreshToken: string;\n expiresIn: number;\n}\n\nexport * from './cookie-helper.js';\n\n/**\n * Authentication Module\n */\nexport class AuthModule {\n constructor(\n private client: BurdenoffGraphQLClient,\n private context: SDKContext\n ) {}\n\n /**\n * Verify JWT token\n */\n public async verifyToken(token: string): Promise<VerifyTokenResult> {\n logger.debug('[Auth] Verifying token');\n\n // Fast-path reject locally expired tokens before calling the auth service\n if (isTokenExpiredUnverified(token)) {\n return {\n valid: false,\n error: 'Token expired',\n };\n }\n\n const query = `\n query VerifyToken($token: String!) {\n verifyToken(token: $token) {\n valid\n payload\n error\n }\n }\n `;\n\n try {\n const response = await this.client.query<{ verifyToken: VerifyTokenResult }>(query, { token }, this.context);\n\n logger.debug('[Auth] Token verification result', { valid: response.verifyToken.valid });\n\n return response.verifyToken;\n } catch (error) {\n logger.error('[Auth] Token verification failed', { error });\n return {\n valid: false,\n error: error instanceof Error ? error.message : 'Unknown error',\n };\n }\n }\n\n /**\n * Decode token without verification\n */\n public decodeToken(token: string): TokenPayload | null {\n const payload = parseJWT(token);\n if (!payload) {\n return null;\n }\n return payload as unknown as TokenPayload;\n }\n\n /**\n * Refresh access token using refresh token\n */\n public async refreshToken(refreshToken: string): Promise<RefreshTokenResult> {\n logger.debug('[Auth] Refreshing token');\n\n const mutation = `\n mutation RefreshToken($refreshToken: String!) {\n refreshToken(refreshToken: $refreshToken) {\n accessToken\n refreshToken\n expiresIn\n }\n }\n `;\n\n try {\n const response = await this.client.query<{ refreshToken: RefreshTokenResult }>(\n mutation,\n { refreshToken },\n this.context\n );\n\n logger.info('[Auth] Token refreshed successfully');\n\n return response.refreshToken;\n } catch (error) {\n logger.error('[Auth] Token refresh failed', { error });\n throw new AuthenticationError('Failed to refresh token', {\n error: error instanceof Error ? error.message : 'Unknown error',\n });\n }\n }\n\n /**\n * Validate user has specific permission\n */\n public async validatePermission(userId: string, permission: string, resourceId?: string): Promise<boolean> {\n logger.debug('[Auth] Validating permission', { userId, permission, resourceId });\n\n const query = `\n query ValidatePermission($userId: ID!, $permission: String!, $resourceId: ID) {\n validatePermission(userId: $userId, permission: $permission, resourceId: $resourceId) {\n allowed\n }\n }\n `;\n\n try {\n const response = await this.client.query<{\n validatePermission: { allowed: boolean };\n }>(query, { userId, permission, resourceId }, this.context);\n\n logger.debug('[Auth] Permission validation result', {\n allowed: response.validatePermission.allowed,\n });\n\n return response.validatePermission.allowed;\n } catch (error) {\n logger.error('[Auth] Permission validation failed', { error });\n return false;\n }\n }\n\n private static warnedDeprecatedIsTokenValid = false;\n\n /**\n * Verify token authenticity and validity via the auth service.\n *\n * Unlike {@link isTokenUnexpiredUnverified}, this performs full server-side\n * cryptographic verification and is safe to use as an authentication check.\n */\n public async isVerifiedTokenValid(token: string): Promise<boolean> {\n const result = await this.verifyToken(token);\n return result.valid === true;\n }\n\n /**\n * Inspect ONLY the unverified `exp` claim to determine whether a token appears\n * unexpired locally.\n *\n * SECURITY: Does NOT verify cryptographic signature, issuer, audience, or\n * revocation. NEVER use this as an authentication or authorization predicate;\n * use {@link verifyToken} or {@link isVerifiedTokenValid} instead.\n */\n public isTokenUnexpiredUnverified(token: string): boolean {\n return !isTokenExpiredUnverified(token);\n }\n\n /**\n * Unverified local expiry check retained only for backwards compatibility.\n *\n * SECURITY WARNING: Despite its name, this method ONLY inspects the unverified\n * `exp` claim and does NOT verify the token signature. It MUST NOT be used for\n * authentication or authorization decisions.\n *\n * @deprecated Use {@link isVerifiedTokenValid} (or {@link verifyToken}) for\n * verified token validation, or {@link isTokenUnexpiredUnverified} when you\n * explicitly intend unverified local expiry inspection only (BOFF-15985).\n */\n public isTokenValid(token: string): boolean {\n if (!AuthModule.warnedDeprecatedIsTokenValid) {\n AuthModule.warnedDeprecatedIsTokenValid = true;\n logger.warn(\n '[Auth] AuthModule.isTokenValid() is deprecated: it performs unverified expiry inspection only and does NOT verify signatures. Use isVerifiedTokenValid() / verifyToken() for authentication or isTokenUnexpiredUnverified() for expiry-only checks.'\n );\n }\n return this.isTokenUnexpiredUnverified(token);\n }\n\n /**\n * Get user ID from token\n */\n public getUserIdFromToken(token: string): string | null {\n const payload = this.decodeToken(token);\n return payload?.user_id || null;\n }\n\n /**\n * Get workspace ID from token\n */\n public getWorkspaceIdFromToken(token: string): string | null {\n const payload = this.decodeToken(token);\n return payload?.workspace_id || null;\n }\n\n /**\n * Extract all claims from token\n */\n public getTokenClaims(token: string): Record<string, unknown> | null {\n const payload = parseJWT(token);\n return payload;\n }\n\n /**\n * Check if token will expire soon (within given seconds)\n */\n public willExpireSoon(token: string, withinSeconds: number = 300): boolean {\n const payload = this.decodeToken(token);\n if (!payload || typeof payload.exp !== 'number') {\n return true;\n }\n\n const now = Math.floor(Date.now() / 1000);\n return payload.exp - now < withinSeconds;\n }\n}\n"],"mappings":";;;;;AAoBA,IAAa,mBAAb,MAA8B;CAC5B,OAAwB,sBAAsB;CAC9C,OAAwB,uBAAuB;CAC/C,OAAwB,oBAAoB;;;;CAK5C,OAAc,eACZ,SACA,QACA,UAAwD,CAAC,GACnD;EACN,MAAM,SAAS,QAAQ,IAAI,gBAAgB;EAC3C,MAAM,SAAS,QAAQ,IAAI;E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AAM,KAAK,OAAO,MAEhC,OAAO;IAAE;IAAQ;IAAY;GAAW,GAAG,KAAK,OAAO;GAE1D,OAAO,MAAM,uCAAuC,EAClD,SAAS,SAAS,mBAAmB,QACvC,CAAC;GAED,OAAO,SAAS,mBAAmB;EACrC,SAAS,OAAO;GACd,OAAO,MAAM,uCAAuC,EAAE,MAAM,CAAC;GAC7D,OAAO;EACT;CACF;CAEA,OAAe,+BAA+B;;;;;;;CAQ9C,MAAa,qBAAqB,OAAiC;EAEjE,QAAO,MADc,KAAK,YAAY,KAAK,EAC9B,CAAC,UAAU;CAC1B;;;;;;;;;CAUA,AAAO,2BAA2B,OAAwB;EACxD,OAAO,CAAC,yBAAyB,KAAK;CACxC;;;;;;;;;;;;CAaA,AAAO,aAAa,OAAwB;EAC1C,IAAI,CAAC,WAAW,8BAA8B;GAC5C,WAAW,+BAA+B;GAC1C,OAAO,KACL,qPACF;EACF;EACA,OAAO,KAAK,2BAA2B,KAAK;CAC9C;;;;CAKA,AAAO,mBAAmB,OAA8B;EAEtD,OADgB,KAAK,YAAY,KACpB,CAAC,EAAE,WAAW;CAC7B;;;;CAKA,AAAO,wBAAwB,OAA8B;EAE3D,OADgB,KAAK,YAAY,KACpB,CAAC,EAAE,gBAAgB;CAClC;;;;CAKA,AAAO,eAAe,OAA+C;EAEnE,OADgB,SAAS,KACZ;CACf;;;;CAKA,AAAO,eAAe,OAAe,gBAAwB,KAAc;EACzE,MAAM,UAAU,KAAK,YAAY,KAAK;EACtC,IAAI,CAAC,WAAW,OAAO,QAAQ,QAAQ,UACrC,OAAO;EAGT,MAAM,MAAM,KAAK,MAAM,KAAK,IAAI,IAAI,GAAI;EACxC,OAAO,QAAQ,MAAM,MAAM;CAC7B;AACF"}
|
|
@@ -59,6 +59,8 @@ declare function isTransientAcquireError(error: unknown): boolean;
|
|
|
59
59
|
declare function installAcquireRetry(pool: Pool, retries: number, baseDelayMillis: number): void;
|
|
60
60
|
declare function ensureServiceApplicationName(productName: string | undefined): void;
|
|
61
61
|
declare function createPrismaAdapter(pool: Pool): PrismaPg;
|
|
62
|
+
declare function normalizeSqlTemplate(sql: string): string;
|
|
63
|
+
declare function fingerprintSqlQuery(normalizedQuery: string): string;
|
|
62
64
|
declare function configurePrismaLogging<T extends PrismaClientBase>(client: T, config: PrismaClientConfig): T;
|
|
63
65
|
declare class PrismaClientWrapper<T extends PrismaClientBase> {
|
|
64
66
|
private client;
|
|
@@ -83,4 +85,4 @@ interface PrismaClientConstructorOptions {
|
|
|
83
85
|
log?: (PrismaLogLevel | PrismaLogDefinition)[];
|
|
84
86
|
}
|
|
85
87
|
declare function createPrismaClient<T extends PrismaClientBase>(PrismaClientConstructor: new (options: PrismaClientConstructorOptions) => T, config: PrismaClientConfig): PrismaClientWrapper<T>;
|
|
86
|
-
export {
|
|
88
|
+
export { PrismaClientConfig as S, installAcquireRetry as _, PrismaEvent as a, ConnectionState as b, PrismaLogLevel as c, configurePrismaLogging as d, createConnectionPool as f, fingerprintSqlQuery as g, ensureServiceApplicationName as h, PrismaClientWrapper as i, PrismaQueryEvent as l, createPrismaClient as m, PrismaClientBase as n, PrismaLogDefinition as o, createPrismaAdapter as p, PrismaClientConstructorOptions as r, PrismaLogEvent as s, DatabaseReturnType as t, PrismaTransactionOptions as u, isTransientAcquireError as v, DatabaseHealth as x, normalizeSqlTemplate as y };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as FeatureFlagProvider, c as FlagEvaluation, i as createOperationsFlagGatePlugin, l as FlagType, n as GatedOperationType, o as EvaluationContext, r as OperationsFlagGatePluginOptions, s as FeatureFlagProviderConfig, u as ResolutionDetails } from "../index-
|
|
1
|
+
import { a as FeatureFlagProvider, c as FlagEvaluation, i as createOperationsFlagGatePlugin, l as FlagType, n as GatedOperationType, o as EvaluationContext, r as OperationsFlagGatePluginOptions, s as FeatureFlagProviderConfig, u as ResolutionDetails } from "../index-CUiL43SY.js";
|
|
2
2
|
export { type EvaluationContext, FeatureFlagProvider, type FeatureFlagProviderConfig, type FlagEvaluation, type FlagType, type GatedOperationType, type OperationsFlagGatePluginOptions, type ResolutionDetails, createOperationsFlagGatePlugin };
|
package/dist/graph/index.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { _ as SearchResponse, a as EdgeDocument, c as EntityVertex, d as ModuleGraphConfig, f as ProductFacet, g as SearchFilters, h as SearchFacets, i as addGraphExtension, l as GraphEvent, m as RelationshipGraphConfig, n as GraphEventEmitter, o as EntityBulkOperationsConfig, r as GraphMiddlewareConfig, s as EntityGraphConfig, t as EntityEventType, u as GraphEventType, v as SearchResult, y as TypeFacet } from "../prisma-extension-Cfl09swM.js";
|
|
2
|
-
import { $ as createGraphEventsHelper, A as GraphSchema, B as GraphExportService, C as defineGraphConfig, Ct as shouldSyncRelationship, D as EntityEventHook, E as EntityEventContext, F as RelationshipExportData, G as createRelationshipFromEntity, H as GraphRelationshipExport, I as defineModuleGraph, J as GraphEventPublishOptions, K as EntityEventData, L as EntityFetcher, M as ModuleGraphDefinition, N as RelationshipDefinition, O as EntityRbacConfig, P as RelationshipEventData, Q as GraphRelationshipData, R as GraphEntityExport, S as defineEntity, St as shouldSyncEntity, T as EntityDefinition, U as RelationshipFetcher, V as GraphExportServiceConfig, W as createGraphExportService, X as GraphEventsHelperConfig, Y as GraphEventsHelper, Z as GraphEventsPublisher, _ as DefineGraphConfigOptions, _t as createRelationshipEvent, a as GraphNode, at as createPrismaGraphIntegration, b as STANDARD_FIELDS, bt as getCollectionForEntity, c as TraverseOptions, ct as ExtractedRelationshipData, d as InitializeGraphOptions, dt as GenericGraphConfig, et as getGraphEventsPublisher, f as getGraphStats, ft as GenericRelationshipConfig, g as DefineEntityConfigOptions, gt as createEntityEvent, h as AUDIT_FIELDS, ht as ValidationErrorType, i as GraphModule, it as PrismaGraphIntegrationOptions, j as ModuleGraph, k as GraphEventOptions, l as TraverseResult, lt as FieldMapper, m as isGraphInitialized, mt as GraphValidationResult, n as CreateNodeOptions, nt as withDeferredGraphEvents, o as QueryGraphOptions, ot as EntityRbacConfig$1, p as initializeGraph, pt as GraphValidationError, q as GraphEntityConfig, r as GraphEdge, rt as PrismaGraphIntegration, s as TraverseDirection, st as ExtractedEntityData, t as CreateEdgeOptions, tt as DeferredGraphResult, ut as GenericEntityConfig, v as DefineRelationshipConfigOptions, vt as extractEntityTitle, w as defineRelationship, wt as GraphRegistry, x as TENANT_FIELDS, xt as parseRelationship, y as SOFT_DELETE_FIELDS, yt as extractMinimalFields, z as GraphExportResponse } from "../index-
|
|
2
|
+
import { $ as createGraphEventsHelper, A as GraphSchema, B as GraphExportService, C as defineGraphConfig, Ct as shouldSyncRelationship, D as EntityEventHook, E as EntityEventContext, F as RelationshipExportData, G as createRelationshipFromEntity, H as GraphRelationshipExport, I as defineModuleGraph, J as GraphEventPublishOptions, K as EntityEventData, L as EntityFetcher, M as ModuleGraphDefinition, N as RelationshipDefinition, O as EntityRbacConfig, P as RelationshipEventData, Q as GraphRelationshipData, R as GraphEntityExport, S as defineEntity, St as shouldSyncEntity, T as EntityDefinition, U as RelationshipFetcher, V as GraphExportServiceConfig, W as createGraphExportService, X as GraphEventsHelperConfig, Y as GraphEventsHelper, Z as GraphEventsPublisher, _ as DefineGraphConfigOptions, _t as createRelationshipEvent, a as GraphNode, at as createPrismaGraphIntegration, b as STANDARD_FIELDS, bt as getCollectionForEntity, c as TraverseOptions, ct as ExtractedRelationshipData, d as InitializeGraphOptions, dt as GenericGraphConfig, et as getGraphEventsPublisher, f as getGraphStats, ft as GenericRelationshipConfig, g as DefineEntityConfigOptions, gt as createEntityEvent, h as AUDIT_FIELDS, ht as ValidationErrorType, i as GraphModule, it as PrismaGraphIntegrationOptions, j as ModuleGraph, k as GraphEventOptions, l as TraverseResult, lt as FieldMapper, m as isGraphInitialized, mt as GraphValidationResult, n as CreateNodeOptions, nt as withDeferredGraphEvents, o as QueryGraphOptions, ot as EntityRbacConfig$1, p as initializeGraph, pt as GraphValidationError, q as GraphEntityConfig, r as GraphEdge, rt as PrismaGraphIntegration, s as TraverseDirection, st as ExtractedEntityData, t as CreateEdgeOptions, tt as DeferredGraphResult, ut as GenericEntityConfig, v as DefineRelationshipConfigOptions, vt as extractEntityTitle, w as defineRelationship, wt as GraphRegistry, x as TENANT_FIELDS, xt as parseRelationship, y as SOFT_DELETE_FIELDS, yt as extractMinimalFields, z as GraphExportResponse } from "../index-CIayzveI.js";
|
|
3
3
|
export { AUDIT_FIELDS, CreateEdgeOptions, CreateNodeOptions, type DeferredGraphResult, type DefineEntityConfigOptions, type DefineGraphConfigOptions, type DefineRelationshipConfigOptions, type EdgeDocument, type EntityBulkOperationsConfig, type EntityDefinition, type EntityEventContext, type EntityEventData, type EntityEventHook, type EntityEventType, type EntityFetcher, type EntityGraphConfig, type EntityRbacConfig, type EntityVertex, type ExtractedEntityData, type ExtractedRelationshipData, type FieldMapper, type GenericEntityConfig, type EntityRbacConfig$1 as GenericEntityRbacConfig, type GenericGraphConfig, type GenericRelationshipConfig, GraphEdge, type GraphEntityConfig, type GraphEntityExport, type GraphEvent, type GraphEventEmitter, type GraphEventOptions, type GraphEventPublishOptions, type GraphEventType, type GraphEventsHelper, type GraphEventsHelperConfig, GraphEventsPublisher, type GraphExportResponse, GraphExportService, type GraphExportServiceConfig, type GraphMiddlewareConfig, GraphModule, GraphNode, GraphRegistry, type GraphRelationshipData, type GraphRelationshipExport, type GraphSchema, type GraphValidationError, type GraphValidationResult, type InitializeGraphOptions, type ModuleGraph, type ModuleGraphConfig, type ModuleGraphDefinition, type PrismaGraphIntegration, type PrismaGraphIntegrationOptions, type ProductFacet, QueryGraphOptions, type RelationshipDefinition, type RelationshipEventData, type RelationshipExportData, type RelationshipFetcher, type RelationshipGraphConfig, SOFT_DELETE_FIELDS, STANDARD_FIELDS, type SearchFacets, type SearchFilters, type SearchResponse, type SearchResult, TENANT_FIELDS, TraverseDirection, TraverseOptions, TraverseResult, type TypeFacet, type ValidationErrorType, addGraphExtension, createEntityEvent, createGraphEventsHelper, createGraphExportService, createPrismaGraphIntegration, createRelationshipEvent, createRelationshipFromEntity, defineEntity, defineGraphConfig, defineModuleGraph, defineRelationship, extractEntityTitle, extractMinimalFields, getCollectionForEntity, getGraphEventsPublisher, getGraphStats, initializeGraph, isGraphInitialized, parseRelationship, shouldSyncEntity, shouldSyncRelationship, withDeferredGraphEvents };
|
package/dist/graph/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { _ as
|
|
2
|
-
import { _ as GraphEventsPublisher, a as isGraphInitialized, b as createPrismaGraphIntegration, c as STANDARD_FIELDS, d as defineGraphConfig, f as defineRelationship, g as createRelationshipFromEntity, h as createGraphExportService, i as initializeGraph, l as TENANT_FIELDS, m as GraphExportService, o as AUDIT_FIELDS, p as defineModuleGraph, r as getGraphStats, s as SOFT_DELETE_FIELDS, t as GraphModule, u as defineEntity, v as createGraphEventsHelper, y as getGraphEventsPublisher } from "../graph-
|
|
1
|
+
import { _ as getCollectionForEntity, b as shouldSyncRelationship, g as extractMinimalFields, h as extractEntityTitle, m as createRelationshipEvent, n as withDeferredGraphEvents, p as createEntityEvent, t as addGraphExtension, v as parseRelationship, x as GraphRegistry, y as shouldSyncEntity } from "../middleware-z8KzMFU_.js";
|
|
2
|
+
import { _ as GraphEventsPublisher, a as isGraphInitialized, b as createPrismaGraphIntegration, c as STANDARD_FIELDS, d as defineGraphConfig, f as defineRelationship, g as createRelationshipFromEntity, h as createGraphExportService, i as initializeGraph, l as TENANT_FIELDS, m as GraphExportService, o as AUDIT_FIELDS, p as defineModuleGraph, r as getGraphStats, s as SOFT_DELETE_FIELDS, t as GraphModule, u as defineEntity, v as createGraphEventsHelper, y as getGraphEventsPublisher } from "../graph-BdoM7_90.js";
|
|
3
3
|
|
|
4
4
|
export { AUDIT_FIELDS, GraphEventsPublisher, GraphExportService, GraphModule, GraphRegistry, SOFT_DELETE_FIELDS, STANDARD_FIELDS, TENANT_FIELDS, addGraphExtension, createEntityEvent, createGraphEventsHelper, createGraphExportService, createPrismaGraphIntegration, createRelationshipEvent, createRelationshipFromEntity, defineEntity, defineGraphConfig, defineModuleGraph, defineRelationship, extractEntityTitle, extractMinimalFields, getCollectionForEntity, getGraphEventsPublisher, getGraphStats, initializeGraph, isGraphInitialized, parseRelationship, shouldSyncEntity, shouldSyncRelationship, withDeferredGraphEvents };
|
|
5
5
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-ad2WFvuA.js";
|
|
2
2
|
import { ValidationError } from "./types/index.js";
|
|
3
3
|
import { a as logger } from "./logger-B6rCpb7D.js";
|
|
4
|
-
import { _ as
|
|
4
|
+
import { _ as getCollectionForEntity, b as shouldSyncRelationship, c as ensureServiceApplicationName, g as extractMinimalFields, h as extractEntityTitle, m as createRelationshipEvent, n as withDeferredGraphEvents, p as createEntityEvent, t as addGraphExtension, v as parseRelationship, x as GraphRegistry, y as shouldSyncEntity } from "./middleware-z8KzMFU_.js";
|
|
5
5
|
import "./event-queue-CKvgAqF3.js";
|
|
6
6
|
import { r as getGraphEventEmitter, t as GraphEventEmitterImpl } from "./graph-emitter-DpaWxRBp.js";
|
|
7
7
|
|
|
@@ -2149,4 +2149,4 @@ var GraphModule = class {
|
|
|
2149
2149
|
};
|
|
2150
2150
|
|
|
2151
2151
|
export { GraphEventsPublisher as _, isGraphInitialized as a, createPrismaGraphIntegration as b, STANDARD_FIELDS as c, defineGraphConfig as d, defineRelationship as f, createRelationshipFromEntity as g, createGraphExportService as h, initializeGraph as i, TENANT_FIELDS as l, GraphExportService as m, graph_exports as n, AUDIT_FIELDS as o, defineModuleGraph as p, getGraphStats as r, SOFT_DELETE_FIELDS as s, GraphModule as t, defineEntity as u, createGraphEventsHelper as v, getGraphEventsPublisher as y };
|
|
2152
|
-
//# sourceMappingURL=graph-
|
|
2152
|
+
//# sourceMappingURL=graph-BdoM7_90.js.map
|