@brizz/sdk 0.1.27 → 0.1.28
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +39 -1
- package/dist/index.cjs +304 -215
- package/dist/index.d.cts +17 -1
- package/dist/index.d.ts +17 -1
- package/dist/index.js +300 -215
- package/dist/preload.cjs +15 -9
- package/dist/preload.js +15 -9
- package/package.json +41 -41
package/dist/index.d.cts
CHANGED
|
@@ -130,6 +130,7 @@ declare class _Brizz {
|
|
|
130
130
|
declare const Brizz: _Brizz;
|
|
131
131
|
|
|
132
132
|
declare function emitEvent(name: string, attributes?: Record<string, string | number | boolean>, body?: LogBody, severityNumber?: SeverityNumber): void;
|
|
133
|
+
declare function emitEventWithSessionId(sessionId: string, name: string, attributes?: Record<string, string | number | boolean>, body?: LogBody, severityNumber?: SeverityNumber): void;
|
|
133
134
|
|
|
134
135
|
declare function getSpanExporter(): SpanExporter;
|
|
135
136
|
declare function getSpanProcessor(): SpanProcessor;
|
|
@@ -141,6 +142,12 @@ declare function callWithProperties<A extends unknown[], F extends (...args: A)
|
|
|
141
142
|
declare function withProperties<F extends (this: any, ...args: any[]) => any>(properties: {
|
|
142
143
|
[name: string]: string;
|
|
143
144
|
}, fn: F, thisArg?: ThisParameterType<F>): F;
|
|
145
|
+
interface IMuteOptions {
|
|
146
|
+
input?: boolean;
|
|
147
|
+
output?: boolean;
|
|
148
|
+
}
|
|
149
|
+
declare function callWithMute<A extends unknown[], F extends (...args: A) => ReturnType<F>>(options: IMuteOptions, fn: F, thisArg?: ThisParameterType<F>, ...args: A): ReturnType<F>;
|
|
150
|
+
declare function withMute<F extends (this: any, ...args: any[]) => any>(options: IMuteOptions, fn: F, thisArg?: ThisParameterType<F>): F;
|
|
144
151
|
declare function withSessionId<F extends (this: any, ...args: any[]) => any>(sessionId: string, fn: F, thisArg?: ThisParameterType<F>, extraProperties?: Record<string, string>): F;
|
|
145
152
|
declare function callWithSessionId<A extends unknown[], F extends (...args: A) => ReturnType<F>>(sessionId: string, fn: F, thisArg?: ThisParameterType<F>, ...args: A): ReturnType<F>;
|
|
146
153
|
declare class Session {
|
|
@@ -155,6 +162,10 @@ declare class Session {
|
|
|
155
162
|
setOutput(text: string | null, context?: Record<string, AttributeValue>): void;
|
|
156
163
|
setTitle(title: string): void;
|
|
157
164
|
updateProperties(properties: Record<string, AttributeValue>): void;
|
|
165
|
+
addExternalLink(url: string, options?: {
|
|
166
|
+
title?: string;
|
|
167
|
+
linkType?: string;
|
|
168
|
+
}): void;
|
|
158
169
|
}
|
|
159
170
|
declare class SessionTitle {
|
|
160
171
|
private readonly span;
|
|
@@ -162,6 +173,11 @@ declare class SessionTitle {
|
|
|
162
173
|
setTitle(title: string): void;
|
|
163
174
|
}
|
|
164
175
|
declare function getActiveSession(): Session | undefined;
|
|
176
|
+
declare function addExternalLink(url: string, options?: {
|
|
177
|
+
sessionId?: string;
|
|
178
|
+
title?: string;
|
|
179
|
+
linkType?: string;
|
|
180
|
+
}): void;
|
|
165
181
|
declare function startSession<T>(sessionId: string, callback: (session: Session) => T, extraProperties?: Record<string, AttributeValue>, options?: {
|
|
166
182
|
mode?: 'default' | 'title';
|
|
167
183
|
}): T;
|
|
@@ -185,4 +201,4 @@ declare namespace init {
|
|
|
185
201
|
export { };
|
|
186
202
|
}
|
|
187
203
|
|
|
188
|
-
export { Brizz, DEFAULT_PII_PATTERNS, type IAttributesMaskingRule, type IBrizzInitializeOptions, type IEventMaskingConfig, type IEventMaskingRule, type IInstrumentModules, type ILogMaskingConfig, type ILogger, type IMCPManualModules, type IMaskingConfig, type ISpanMaskingConfig, LogLevel, type MaskingMode, type RuntimeInfo, Session, SessionTitle, callWithProperties, callWithSessionId, detectRuntime, emitEvent, getActiveSession, getLogLevel, getMetricsExporter, getMetricsReader, getSpanExporter, getSpanProcessor, init, logger, maskAttributes, maskValue, setCurrentSpanCustomProperties, setLogLevel, startSession, startSessionTitle, withProperties, withSessionId };
|
|
204
|
+
export { Brizz, DEFAULT_PII_PATTERNS, type IAttributesMaskingRule, type IBrizzInitializeOptions, type IEventMaskingConfig, type IEventMaskingRule, type IInstrumentModules, type ILogMaskingConfig, type ILogger, type IMCPManualModules, type IMaskingConfig, type IMuteOptions, type ISpanMaskingConfig, LogLevel, type MaskingMode, type RuntimeInfo, Session, SessionTitle, addExternalLink, callWithMute, callWithProperties, callWithSessionId, detectRuntime, emitEvent, emitEventWithSessionId, getActiveSession, getLogLevel, getMetricsExporter, getMetricsReader, getSpanExporter, getSpanProcessor, init, logger, maskAttributes, maskValue, setCurrentSpanCustomProperties, setLogLevel, startSession, startSessionTitle, withMute, withProperties, withSessionId };
|
package/dist/index.d.ts
CHANGED
|
@@ -130,6 +130,7 @@ declare class _Brizz {
|
|
|
130
130
|
declare const Brizz: _Brizz;
|
|
131
131
|
|
|
132
132
|
declare function emitEvent(name: string, attributes?: Record<string, string | number | boolean>, body?: LogBody, severityNumber?: SeverityNumber): void;
|
|
133
|
+
declare function emitEventWithSessionId(sessionId: string, name: string, attributes?: Record<string, string | number | boolean>, body?: LogBody, severityNumber?: SeverityNumber): void;
|
|
133
134
|
|
|
134
135
|
declare function getSpanExporter(): SpanExporter;
|
|
135
136
|
declare function getSpanProcessor(): SpanProcessor;
|
|
@@ -141,6 +142,12 @@ declare function callWithProperties<A extends unknown[], F extends (...args: A)
|
|
|
141
142
|
declare function withProperties<F extends (this: any, ...args: any[]) => any>(properties: {
|
|
142
143
|
[name: string]: string;
|
|
143
144
|
}, fn: F, thisArg?: ThisParameterType<F>): F;
|
|
145
|
+
interface IMuteOptions {
|
|
146
|
+
input?: boolean;
|
|
147
|
+
output?: boolean;
|
|
148
|
+
}
|
|
149
|
+
declare function callWithMute<A extends unknown[], F extends (...args: A) => ReturnType<F>>(options: IMuteOptions, fn: F, thisArg?: ThisParameterType<F>, ...args: A): ReturnType<F>;
|
|
150
|
+
declare function withMute<F extends (this: any, ...args: any[]) => any>(options: IMuteOptions, fn: F, thisArg?: ThisParameterType<F>): F;
|
|
144
151
|
declare function withSessionId<F extends (this: any, ...args: any[]) => any>(sessionId: string, fn: F, thisArg?: ThisParameterType<F>, extraProperties?: Record<string, string>): F;
|
|
145
152
|
declare function callWithSessionId<A extends unknown[], F extends (...args: A) => ReturnType<F>>(sessionId: string, fn: F, thisArg?: ThisParameterType<F>, ...args: A): ReturnType<F>;
|
|
146
153
|
declare class Session {
|
|
@@ -155,6 +162,10 @@ declare class Session {
|
|
|
155
162
|
setOutput(text: string | null, context?: Record<string, AttributeValue>): void;
|
|
156
163
|
setTitle(title: string): void;
|
|
157
164
|
updateProperties(properties: Record<string, AttributeValue>): void;
|
|
165
|
+
addExternalLink(url: string, options?: {
|
|
166
|
+
title?: string;
|
|
167
|
+
linkType?: string;
|
|
168
|
+
}): void;
|
|
158
169
|
}
|
|
159
170
|
declare class SessionTitle {
|
|
160
171
|
private readonly span;
|
|
@@ -162,6 +173,11 @@ declare class SessionTitle {
|
|
|
162
173
|
setTitle(title: string): void;
|
|
163
174
|
}
|
|
164
175
|
declare function getActiveSession(): Session | undefined;
|
|
176
|
+
declare function addExternalLink(url: string, options?: {
|
|
177
|
+
sessionId?: string;
|
|
178
|
+
title?: string;
|
|
179
|
+
linkType?: string;
|
|
180
|
+
}): void;
|
|
165
181
|
declare function startSession<T>(sessionId: string, callback: (session: Session) => T, extraProperties?: Record<string, AttributeValue>, options?: {
|
|
166
182
|
mode?: 'default' | 'title';
|
|
167
183
|
}): T;
|
|
@@ -185,4 +201,4 @@ declare namespace init {
|
|
|
185
201
|
export { };
|
|
186
202
|
}
|
|
187
203
|
|
|
188
|
-
export { Brizz, DEFAULT_PII_PATTERNS, type IAttributesMaskingRule, type IBrizzInitializeOptions, type IEventMaskingConfig, type IEventMaskingRule, type IInstrumentModules, type ILogMaskingConfig, type ILogger, type IMCPManualModules, type IMaskingConfig, type ISpanMaskingConfig, LogLevel, type MaskingMode, type RuntimeInfo, Session, SessionTitle, callWithProperties, callWithSessionId, detectRuntime, emitEvent, getActiveSession, getLogLevel, getMetricsExporter, getMetricsReader, getSpanExporter, getSpanProcessor, init, logger, maskAttributes, maskValue, setCurrentSpanCustomProperties, setLogLevel, startSession, startSessionTitle, withProperties, withSessionId };
|
|
204
|
+
export { Brizz, DEFAULT_PII_PATTERNS, type IAttributesMaskingRule, type IBrizzInitializeOptions, type IEventMaskingConfig, type IEventMaskingRule, type IInstrumentModules, type ILogMaskingConfig, type ILogger, type IMCPManualModules, type IMaskingConfig, type IMuteOptions, type ISpanMaskingConfig, LogLevel, type MaskingMode, type RuntimeInfo, Session, SessionTitle, addExternalLink, callWithMute, callWithProperties, callWithSessionId, detectRuntime, emitEvent, emitEventWithSessionId, getActiveSession, getLogLevel, getMetricsExporter, getMetricsReader, getSpanExporter, getSpanProcessor, init, logger, maskAttributes, maskValue, setCurrentSpanCustomProperties, setLogLevel, startSession, startSessionTitle, withMute, withProperties, withSessionId };
|