@coralogix/browser 2.8.5 → 2.8.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +15 -0
- package/index.esm.js +2 -3
- package/index.esm2.js +622 -797
- package/package.json +1 -1
- package/sessionRecorder.esm.js +28 -1291
- package/src/constants.d.ts +0 -4
- package/src/custom-spans/custom-spans.consts.d.ts +1 -0
- package/src/custom-spans/custom-spans.utils.d.ts +4 -0
- package/src/otel/otel.consts.d.ts +0 -10
- package/src/session/session.model.d.ts +0 -40
- package/src/session/sessionManager.d.ts +1 -0
- package/src/tools/addEventListener.d.ts +0 -7
- package/src/tools/getZoneJsOriginalDom.d.ts +0 -3
- package/src/types.d.ts +0 -87
- package/src/utils/array.d.ts +0 -9
- package/src/utils/general.d.ts +0 -6
- package/src/utils/object.d.ts +0 -26
- package/src/utils/string.d.ts +0 -4
- package/src/version.d.ts +1 -1
package/src/constants.d.ts
CHANGED
|
@@ -19,10 +19,6 @@ export declare const MASKED_TEXT = "***";
|
|
|
19
19
|
export declare const MASK_CLASS_DEFAULT = "cx-mask";
|
|
20
20
|
export declare const MASK_INPUT_TYPES_DEFAULT: InputType[];
|
|
21
21
|
export declare const OPTIONS_DEFAULTS: Partial<CoralogixBrowserSdkConfig>;
|
|
22
|
-
/**
|
|
23
|
-
* Note: For any instrumentation added to CoralogixOtelWebOptionsInstrumentations,
|
|
24
|
-
* The `confKey` must match one of its keys.
|
|
25
|
-
*/
|
|
26
22
|
export declare const INSTRUMENTATIONS: readonly InternalInstrumentationConfig[];
|
|
27
23
|
export declare const CoralogixAttributes: {
|
|
28
24
|
EVENT_TYPE: string;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
export declare const GLOBAL_SPAN_KEY = "__globalSpan__";
|
|
2
|
+
export declare const GLOBAL_SPAN_MAP_KEY = "__globalSpanMap__";
|
|
2
3
|
export declare const CUSTOM_TRACER_KEY = "__customTracer__";
|
|
3
4
|
export declare const CUSTOM_TRACER_IGNORED_INSTRUMENTS = "__customTracerIgnoredInstruments__";
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import { CustomTracerIgnoredInstruments, GlobalSpan } from './custom-spans.types';
|
|
2
2
|
import { Tracer } from '@opentelemetry/sdk-trace-base';
|
|
3
3
|
import { Span } from '@opentelemetry/api';
|
|
4
|
+
export declare function addGlobalSpanByTraceId(traceId: string, globalSpan: GlobalSpan): void;
|
|
5
|
+
export declare function getGlobalSpanByTraceId(traceId: string): GlobalSpan | undefined;
|
|
6
|
+
export declare function clearGlobalSpanMap(): void;
|
|
4
7
|
export declare function setGlobalSpan(globalSpan: GlobalSpan): void;
|
|
5
8
|
export declare function getGlobalSpan(): GlobalSpan;
|
|
6
9
|
export declare function clearGlobalSpan(): void;
|
|
@@ -10,4 +13,5 @@ export declare function clearCustomTracer(): void;
|
|
|
10
13
|
export declare function setCustomTracerIgnoredInstruments(ignoredInstruments: CustomTracerIgnoredInstruments[]): void;
|
|
11
14
|
export declare function getCustomTracerIgnoredInstruments(): CustomTracerIgnoredInstruments[];
|
|
12
15
|
export declare function shouldAttachSpanToGlobalSpan(instrumentationType: CustomTracerIgnoredInstruments): boolean;
|
|
16
|
+
export declare function isInstrumentationIgnored(instrumentationType: CustomTracerIgnoredInstruments): boolean;
|
|
13
17
|
export declare function attachChildSpanToGlobalSpan(name: string): Span;
|
|
@@ -2,17 +2,7 @@ export declare const IS_OTEL_READY = "otelReady";
|
|
|
2
2
|
export declare const MAIN_TRACER_KEY = "@";
|
|
3
3
|
export declare const ATTR_PROCESSOR_KEY = "attrProcessor";
|
|
4
4
|
export declare enum SpanStatusCode {
|
|
5
|
-
/**
|
|
6
|
-
* The default status.
|
|
7
|
-
*/
|
|
8
5
|
UNSET = 0,
|
|
9
|
-
/**
|
|
10
|
-
* The operation has been validated by an Application developer or
|
|
11
|
-
* Operator to have completed successfully.
|
|
12
|
-
*/
|
|
13
6
|
OK = 1,
|
|
14
|
-
/**
|
|
15
|
-
* The operation contains an error.
|
|
16
|
-
*/
|
|
17
7
|
ERROR = 2
|
|
18
8
|
}
|
|
@@ -2,47 +2,12 @@ import { eventWithTime } from '@rrweb/types';
|
|
|
2
2
|
import { SlimDOMOptions } from 'rrweb-snapshot';
|
|
3
3
|
import { CoralogixEventType } from '../types';
|
|
4
4
|
import { recordOptions } from 'rrweb';
|
|
5
|
-
/**
|
|
6
|
-
* Record config properties - based on rrweb
|
|
7
|
-
*
|
|
8
|
-
* | key | default | description |
|
|
9
|
-
* | ------------------------ | ------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
10
|
-
* | emit | required | the callback function to get emitted events |
|
|
11
|
-
* | checkoutEveryNth | - | take a full snapshot after every N events<br />refer to the [checkout](#checkout) chapter |
|
|
12
|
-
* | checkoutEveryNms | - | take a full snapshot after every N ms<br />refer to the [checkout](#checkout) chapter |
|
|
13
|
-
* | blockClass | 'rr-block' | Use a string or RegExp to configure which elements should be blocked, refer to the [privacy](#privacy) chapter |
|
|
14
|
-
* | blockSelector | null | Use a string to configure which selector should be blocked, refer to the [privacy](#privacy) chapter |
|
|
15
|
-
* | ignoreClass | 'rr-ignore' | Use a string or RegExp to configure which elements should be ignored, refer to the [privacy](#privacy) chapter |
|
|
16
|
-
* | ignoreSelector | null | Use a string to configure which selector should be ignored, refer to the [privacy](#privacy) chapter |
|
|
17
|
-
* | ignoreCSSAttributes | null | array of CSS attributes that should be ignored |
|
|
18
|
-
* | maskTextClass | 'rr-mask' | Use a string or RegExp to configure which elements should be masked, refer to the [privacy](#privacy) chapter |
|
|
19
|
-
* | maskTextSelector | null | Use a string to configure which selector should be masked, refer to the [privacy](#privacy) chapter |
|
|
20
|
-
* | maskAllInputs | false | mask all input content as \* |
|
|
21
|
-
* | maskInputOptions | { password: true } | mask some kinds of input \*<br />refer to the [list](https://github.com/rrweb-io/rrweb/blob/588164aa12f1d94576f89ae0210b98f6e971c895/packages/rrweb-snapshot/src/types.ts#L77-L95) |
|
|
22
|
-
* | maskInputFn | - | customize mask input content recording logic |
|
|
23
|
-
* | maskTextFn | - | customize mask text content recording logic |
|
|
24
|
-
* | slimDOMOptions | {} | remove unnecessary parts of the DOM <br />refer to the [list](https://github.com/rrweb-io/rrweb/blob/588164aa12f1d94576f89ae0210b98f6e971c895/packages/rrweb-snapshot/src/types.ts#L97-L108) |
|
|
25
|
-
* | dataURLOptions | {} | Canvas image format and quality ,This parameter will be passed to the OffscreenCanvas.convertToBlob(),Using this parameter effectively reduces the size of the recorded data |
|
|
26
|
-
* | inlineStylesheet | true | whether to inline the stylesheet in the events |
|
|
27
|
-
* | hooks | {} | hooks for events<br />refer to the [list](https://github.com/rrweb-io/rrweb/blob/9488deb6d54a5f04350c063d942da5e96ab74075/src/types.ts#L207) |
|
|
28
|
-
* | packFn | - | refer to the [storage optimization recipe](./docs/recipes/optimize-storage.md) |
|
|
29
|
-
* | sampling | - | refer to the [storage optimization recipe](./docs/recipes/optimize-storage.md) |
|
|
30
|
-
* | recordCanvas | false | Whether to record the canvas element. Available options:<br/>`false`, <br/>`true` |
|
|
31
|
-
* | recordCrossOriginIframes | false | Whether to record cross origin iframes. rrweb has to be injected in each child iframe for this to work. Available options:<br/>`false`, <br/>`true` |
|
|
32
|
-
* | recordAfter | 'load' | If the document is not ready, then the recorder will start recording after the specified event is fired. Available options: `DOMContentLoaded`, `load` |
|
|
33
|
-
* | inlineImages | false | whether to record the image content |
|
|
34
|
-
* | collectFonts | false | whether to collect fonts in the website |
|
|
35
|
-
* | userTriggeredOnInput | false | whether to add `userTriggered` on input events that indicates if this event was triggered directly by the user or not. [What is `userTriggered`?](https://github.com/rrweb-io/rrweb/pull/495) |
|
|
36
|
-
* | plugins | [] | load plugins to provide extended record functions. [What is plugins?](./docs/recipes/plugin.md) |
|
|
37
|
-
* | errorHandler | - | A callback that is called if something inside of rrweb throws an error. The callback receives the error as argument.
|
|
38
|
-
*/
|
|
39
5
|
export interface SessionRecordingConfig extends Omit<recordOptions<eventWithTime>, 'emit' | 'packFn' | 'plugins' | 'hooks' | 'slimDOMOptions'> {
|
|
40
6
|
enable: boolean;
|
|
41
7
|
autoStartSessionRecording: boolean;
|
|
42
8
|
recordConsoleEvents?: boolean;
|
|
43
9
|
maxMutations?: number;
|
|
44
10
|
excludeDOMOptions?: SlimDOMOptions;
|
|
45
|
-
/** Percentage of overall sessions recording being tracked, defaults to 100% and applied after the overall sample rate sessionSampleRate */
|
|
46
11
|
sessionRecordingSampleRate?: number;
|
|
47
12
|
workerUrl?: string;
|
|
48
13
|
}
|
|
@@ -50,11 +15,6 @@ export interface SessionWithErrorConfig {
|
|
|
50
15
|
enable: boolean;
|
|
51
16
|
maxRumEvents?: number;
|
|
52
17
|
maxRecordTime?: number;
|
|
53
|
-
/**
|
|
54
|
-
* Specifies the instrumentation data to be sent for sessions with errors, defaulting to web-vitals only.
|
|
55
|
-
* The instrumentation data will only be sent if it is enabled in the main configuration.
|
|
56
|
-
* This data will be sent immediately, even if no error has occurred.
|
|
57
|
-
*/
|
|
58
18
|
instrumentationsToSend?: Partial<Record<CoralogixEventType, boolean>>;
|
|
59
19
|
}
|
|
60
20
|
export interface SessionConfig {
|
|
@@ -34,6 +34,7 @@ export declare class SessionManager extends SessionIdle {
|
|
|
34
34
|
private clearSessionWhenIdle;
|
|
35
35
|
private clearPrevSession;
|
|
36
36
|
private clearSession;
|
|
37
|
+
private clearGlobalSpans;
|
|
37
38
|
private clearSessionWithErrorMode;
|
|
38
39
|
private handleRefreshedSessions;
|
|
39
40
|
private createNewSession;
|
|
@@ -10,16 +10,9 @@ type EventMap<T> = T extends Window ? WindowEventMap & {
|
|
|
10
10
|
freeze: Event;
|
|
11
11
|
resume: Event;
|
|
12
12
|
} : T extends Document ? DocumentEventMap : T extends HTMLElement ? HTMLElementEventMap : T extends VisualViewport ? VisualViewportEventMap : T extends ShadowRoot ? GlobalEventHandlersEventMap : T extends XMLHttpRequest ? XMLHttpRequestEventMap : T extends Performance ? PerformanceEventMap : T extends Worker ? WorkerEventMap : Record<never, never>;
|
|
13
|
-
/**
|
|
14
|
-
* Add an event listener to an event target object (Window, Element, mock...).
|
|
15
|
-
* Returns a `stop` function to remove the listener
|
|
16
|
-
*/
|
|
17
13
|
export declare function addEventListener<Target extends EventTarget, EventName extends keyof EventMap<Target> & string>(eventTarget: Target, eventName: EventName, listener: (event: EventMap<Target>[EventName]) => void, options?: AddEventListenerOptions): {
|
|
18
14
|
stop: () => void;
|
|
19
15
|
};
|
|
20
|
-
/**
|
|
21
|
-
* Add event listeners to an event target object.
|
|
22
|
-
*/
|
|
23
16
|
export declare function addEventListeners<Target extends EventTarget, EventName extends keyof EventMap<Target> & string>(eventTarget: Target, eventNames: EventName[], listener: (event: EventMap<Target>[EventName]) => void, { once, capture, passive }?: AddEventListenerOptions): {
|
|
24
17
|
stop: () => void;
|
|
25
18
|
};
|
|
@@ -3,7 +3,4 @@ export interface BrowserWindowWithZoneJs extends Window {
|
|
|
3
3
|
__symbol__?: (name: string) => string;
|
|
4
4
|
};
|
|
5
5
|
}
|
|
6
|
-
/**
|
|
7
|
-
* Gets the original value for a DOM API that was potentially patched by Zone.js.
|
|
8
|
-
*/
|
|
9
6
|
export declare function getZoneJsOriginalDom<Target, Name extends keyof Target & string>(target: Target, name: Name): Target[Name];
|
package/src/types.d.ts
CHANGED
|
@@ -81,15 +81,9 @@ export interface ApplicationContextConfig {
|
|
|
81
81
|
export interface TraceHeaderConfiguration {
|
|
82
82
|
enabled: boolean;
|
|
83
83
|
options?: {
|
|
84
|
-
/** urls outside of origin that should also add Traceparent to header */
|
|
85
84
|
propagateTraceHeaderCorsUrls?: Array<string | RegExp>;
|
|
86
|
-
/** first-party origins urls called by your browser application.
|
|
87
|
-
* If array is passed, only urls that match the array will add Traceparent to header.
|
|
88
|
-
* */
|
|
89
85
|
allowedTracingUrls?: Array<string | RegExp>;
|
|
90
|
-
/** provides HTTP header propagation for systems that are using AWS X-Amzn-Trace-Id format. */
|
|
91
86
|
propagateAwsXrayTraceHeader?: boolean;
|
|
92
|
-
/** provides HTTP header propagation for systems that are using B3 format. */
|
|
93
87
|
propagateB3TraceHeader?: {
|
|
94
88
|
singleHeader?: boolean;
|
|
95
89
|
multiHeader?: boolean;
|
|
@@ -133,134 +127,53 @@ export interface NetworkExtraConfig {
|
|
|
133
127
|
collectResPayload?: boolean;
|
|
134
128
|
}
|
|
135
129
|
export interface CoralogixBrowserSdkConfig {
|
|
136
|
-
/** Publicly-visible `public_key` value */
|
|
137
130
|
public_key?: string;
|
|
138
|
-
/** Sets a value for the `application` attribute */
|
|
139
131
|
application: string;
|
|
140
|
-
/** Coralogix account domain */
|
|
141
132
|
coralogixDomain: CoralogixDomain;
|
|
142
|
-
/** Sets a value for the 'app.version' attribute */
|
|
143
133
|
version: string;
|
|
144
|
-
/** Configuration for user context. */
|
|
145
134
|
user_context?: UserContextConfig;
|
|
146
|
-
/** Turns on/off internal debug logging */
|
|
147
135
|
debug?: boolean;
|
|
148
|
-
/** Sets labels added to every Span. */
|
|
149
136
|
labels?: CoralogixRumLabels;
|
|
150
|
-
/**
|
|
151
|
-
* Applies for XHR and Fetch URLs. URLs that partially match any regex in ignoreUrls will not be traced.
|
|
152
|
-
* In addition, URLs that are _exact matches_ of strings in ignoreUrls will also not be traced.
|
|
153
|
-
* */
|
|
154
137
|
ignoreUrls?: Array<string | RegExp>;
|
|
155
|
-
/**
|
|
156
|
-
A pattern for error messages which should not be sent to Coralogix. By default, all errors will be sent.
|
|
157
|
-
* */
|
|
158
138
|
ignoreErrors?: Array<string | RegExp>;
|
|
159
|
-
/** Configuration for instrumentation modules. */
|
|
160
139
|
instrumentations?: CoralogixOtelWebOptionsInstrumentations;
|
|
161
|
-
/** Add trace context propagation in headers across service boundaries */
|
|
162
140
|
traceParentInHeader?: TraceHeaderConfiguration;
|
|
163
|
-
/** Sets a value for the `environment` attribute */
|
|
164
141
|
environment?: string;
|
|
165
|
-
/** Stringify custom log data property */
|
|
166
142
|
stringifyCustomLogData?: boolean;
|
|
167
|
-
/** Modify the event's page or network url based on custom-defined functions */
|
|
168
143
|
urlBlueprinters?: UrlBlueprinters;
|
|
169
|
-
/** Sets recording config for session replay */
|
|
170
144
|
sessionRecordingConfig?: SessionRecordingConfig;
|
|
171
|
-
/** Sets session config */
|
|
172
145
|
sessionConfig?: SessionConfig;
|
|
173
|
-
/** Provide labels based on url or event */
|
|
174
146
|
labelProviders?: Array<LabelProvider>;
|
|
175
|
-
/**
|
|
176
|
-
* @deprecated Use `sessionConfig` instead.
|
|
177
|
-
* Percentage of overall sessions being tracked, defaults to 100%
|
|
178
|
-
* */
|
|
179
147
|
sessionSampleRate?: number;
|
|
180
|
-
/** Mask input types, defaults to ['password', 'email', 'tel'] */
|
|
181
148
|
maskInputTypes?: InputType[];
|
|
182
|
-
/** Class name that will mask elements, string or RegExp. defaults to 'cx-mask' */
|
|
183
149
|
maskClass?: string | RegExp;
|
|
184
|
-
/** Enable event access and modification before sending to Coralogix, supporting content modification, and event discarding. */
|
|
185
150
|
beforeSend?: (event: EditableCxRumEvent) => BeforeSendResult;
|
|
186
|
-
/** Send requests through a proxy */
|
|
187
151
|
proxyUrl?: string;
|
|
188
|
-
/** Collect IP address and geolocation data. Defaults to true. */
|
|
189
152
|
collectIPData?: boolean;
|
|
190
|
-
/** Track soft navigations such as SPA navigations. Defaults to false */
|
|
191
153
|
trackSoftNavigations?: boolean;
|
|
192
|
-
/** Measure memory usage
|
|
193
|
-
* @prop enabled Enable memory usage measurement. Defaults to false
|
|
194
|
-
* @prop interval usage will be measured every `interval` millisecond. Default to 5 minutes.
|
|
195
|
-
* */
|
|
196
154
|
memoryUsageConfig?: MemoryUsageConfig;
|
|
197
|
-
/** networkExtraConfig is an array of rules for capturing and enhancing network request and response data,
|
|
198
|
-
* including headers and payloads, from Fetch and XMLHttpRequest. */
|
|
199
155
|
networkExtraConfig?: NetworkExtraConfig[];
|
|
200
|
-
/** Enable MFE support. Defaults to false */
|
|
201
156
|
supportMfe?: boolean;
|
|
202
|
-
/** Enable Web Worker support. Defaults to false */
|
|
203
157
|
workerSupport?: boolean;
|
|
204
158
|
}
|
|
205
159
|
export interface CoralogixOtelWebType extends SendLog {
|
|
206
|
-
/**
|
|
207
|
-
* Init CoralogixRum.
|
|
208
|
-
*/
|
|
209
160
|
init: (options: CoralogixBrowserSdkConfig) => void;
|
|
210
|
-
/**
|
|
211
|
-
* Turn CoralogixRum off.
|
|
212
|
-
*/
|
|
213
161
|
shutdown: () => void;
|
|
214
|
-
/** Sets labels to be added to every log after CoralogixRum initialization. */
|
|
215
162
|
setLabels: (labels: CoralogixRumLabels) => void;
|
|
216
|
-
/**
|
|
217
|
-
* Provides access to computed, final value of global attributes, which are applied to all created logs.
|
|
218
|
-
*/
|
|
219
163
|
getLabels: () => CoralogixRumLabels;
|
|
220
|
-
/** Sets user context to be added to every log after CoralogixRum initialization. */
|
|
221
164
|
setUserContext: (userContext: UserContextConfig) => void;
|
|
222
|
-
/** Sets application context to be added to every log after CoralogixRum initialization. */
|
|
223
165
|
setApplicationContext: (applicationContext: ApplicationContextConfig) => void;
|
|
224
|
-
/** Manually capture error. */
|
|
225
166
|
captureError: (error: Error, customData?: unknown, labels?: CoralogixRumLabels) => void;
|
|
226
|
-
/** Manually send custom measurement. */
|
|
227
167
|
sendCustomMeasurement: (name: string, value: CustomMeasurementData) => void;
|
|
228
|
-
/** Add extra performance timing. */
|
|
229
168
|
addTiming: (name: string, duration?: number) => void;
|
|
230
|
-
/** Manually measure user-agent-specific memory. */
|
|
231
169
|
measureUserAgentSpecificMemory: () => void;
|
|
232
|
-
/**
|
|
233
|
-
* Provides access to computed, final value of user context, which applied to all created logs.
|
|
234
|
-
*/
|
|
235
170
|
getUserContext: () => UserContextConfig | undefined;
|
|
236
|
-
/**
|
|
237
|
-
* Provides the session id.
|
|
238
|
-
*/
|
|
239
171
|
getSessionId: () => string | undefined;
|
|
240
|
-
/**
|
|
241
|
-
* Stop session recording
|
|
242
|
-
*/
|
|
243
172
|
stopSessionRecording: () => void;
|
|
244
|
-
/**
|
|
245
|
-
* Start session recording
|
|
246
|
-
*/
|
|
247
173
|
startSessionRecording: () => void;
|
|
248
|
-
/**
|
|
249
|
-
* Take screenshot
|
|
250
|
-
*/
|
|
251
174
|
screenshot: (description?: string) => string | undefined;
|
|
252
|
-
/**
|
|
253
|
-
* Starts measuring time for a given key. Key should be a unique identifier for the measurement.
|
|
254
|
-
*/
|
|
255
175
|
startTimeMeasure: (name: string, labels?: CoralogixRumLabels) => void;
|
|
256
|
-
/**
|
|
257
|
-
* Ends the measurement for a given key.
|
|
258
|
-
*/
|
|
259
176
|
endTimeMeasure: (name: string) => void;
|
|
260
|
-
/**
|
|
261
|
-
* Starts a new custom trace.
|
|
262
|
-
@param ignoredInstruments - list of instruments to ignore in the trace
|
|
263
|
-
*/
|
|
264
177
|
getCustomTracer: (ignoredList?: {
|
|
265
178
|
ignoredInstruments: CustomTracerIgnoredInstruments[];
|
|
266
179
|
}) => CustomTracer | undefined;
|
package/src/utils/array.d.ts
CHANGED
|
@@ -1,10 +1 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Ensures a given value is converted into an array of elements.
|
|
3
|
-
*
|
|
4
|
-
* @template T - The type of the input value and the elements in the resulting array.
|
|
5
|
-
*
|
|
6
|
-
* @param value - The input value, which can be a single instance of type `T`, an array of instances of type `T`, or a Set of instances of type `T`.
|
|
7
|
-
*
|
|
8
|
-
* @returns An array of elements of type `T`. If the input is `null` or `undefined`, returns an empty array.
|
|
9
|
-
*/
|
|
10
1
|
export declare function coerceArray<T>(value: T | T[]): T[];
|
package/src/utils/general.d.ts
CHANGED
package/src/utils/object.d.ts
CHANGED
|
@@ -2,34 +2,8 @@ export declare function isObject(value: unknown): boolean;
|
|
|
2
2
|
type NestedKeyOf<ObjectType extends Record<string, any>> = {
|
|
3
3
|
[Key in keyof ObjectType & (string | number)]: ObjectType[Key] extends object ? `${Key}` | `${Key}.${NestedKeyOf<ObjectType[Key]>}` : `${Key}`;
|
|
4
4
|
}[keyof ObjectType & (string | number)];
|
|
5
|
-
/**
|
|
6
|
-
* Creates an object composed of the properties of the input object, excluding the specified paths.
|
|
7
|
-
*
|
|
8
|
-
* @param object The source object from which to omit properties.
|
|
9
|
-
* @param paths An array or a single path (including nested paths) to omit from the source object.
|
|
10
|
-
* @returns Returns a new object with the specified paths omitted.
|
|
11
|
-
*/
|
|
12
5
|
export declare function omit<const T extends Record<string, any>, const K extends string | NestedKeyOf<T>>(object?: T, ...paths: K[]): Omit<T, K> | Partial<T> | T;
|
|
13
|
-
/**
|
|
14
|
-
* Creates an object composed of the picked object properties, including support for nested paths.
|
|
15
|
-
*
|
|
16
|
-
* @param object The source object from which to pick properties.
|
|
17
|
-
* @param keys An array or a single key (including nested paths) to pick from the source object.
|
|
18
|
-
* @returns Returns a new object with properties picked from the source object.
|
|
19
|
-
*/
|
|
20
6
|
export declare function pick<const T extends Record<string, any>, const K extends string | NestedKeyOf<T>>(object?: T, ...keys: K[]): Pick<T, K> | Partial<T> | T;
|
|
21
|
-
/**
|
|
22
|
-
* Checks if a Set, Array, Map, or Object is empty.
|
|
23
|
-
*
|
|
24
|
-
* @param value - The value to check.
|
|
25
|
-
* @returns Returns true if the value is an empty Set, Map, Array, String or Object, else false.
|
|
26
|
-
*/
|
|
27
7
|
export declare function isEmpty(value: any): boolean;
|
|
28
|
-
/**
|
|
29
|
-
* Checks if a Set, Array, Map, or Object is not empty.
|
|
30
|
-
*
|
|
31
|
-
* @param value - The value to check.
|
|
32
|
-
* @returns Returns false if the value is an empty Set, Map, Array, String or Object, else true.
|
|
33
|
-
*/
|
|
34
8
|
export declare function isNotEmpty(value: any): boolean;
|
|
35
9
|
export {};
|
package/src/utils/string.d.ts
CHANGED
|
@@ -1,7 +1,3 @@
|
|
|
1
1
|
export declare function isMatchingPattern(value: string, pattern: RegExp | string, requireExactStringMatch?: boolean): boolean;
|
|
2
2
|
export declare function stringMatchesSomePattern(testString: string, patterns?: Array<string | RegExp>, requireExactStringMatch?: boolean): boolean;
|
|
3
|
-
/**
|
|
4
|
-
* UUID v4
|
|
5
|
-
* https://gist.github.com/jed/982883
|
|
6
|
-
*/
|
|
7
3
|
export declare function generateUUID(placeholder?: string): string;
|
package/src/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "2.8.
|
|
1
|
+
export declare const SDK_VERSION = "2.8.7";
|