@repliqo/sdk-react-native 0.1.0 → 0.1.1
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/core/client.js +2 -2
- package/dist/core/config.d.ts +2 -1
- package/dist/core/config.js +2 -1
- package/dist/types/events.d.ts +0 -1
- package/package.json +1 -1
- package/src/core/client.ts +3 -3
- package/src/core/config.ts +3 -1
- package/src/types/events.ts +0 -1
package/dist/core/client.js
CHANGED
|
@@ -20,7 +20,7 @@ class AppAnalytics {
|
|
|
20
20
|
this.appStateSubscription = null;
|
|
21
21
|
this.config = (0, config_1.resolveConfig)(config);
|
|
22
22
|
this.logger = new logger_1.Logger(this.config.debug);
|
|
23
|
-
this.apiClient = new api_client_1.ApiClient(
|
|
23
|
+
this.apiClient = new api_client_1.ApiClient(config_1.REPLIQO_API_URL, this.config.apiKey, this.logger);
|
|
24
24
|
this.eventQueue = new batch_queue_1.BatchQueue(this.config.batchSize, this.config.flushInterval, async (events) => {
|
|
25
25
|
if (!this.sessionId) {
|
|
26
26
|
this.logger.warn('Cannot flush events: no active session');
|
|
@@ -58,7 +58,7 @@ class AppAnalytics {
|
|
|
58
58
|
}
|
|
59
59
|
this.setupAppStateListener();
|
|
60
60
|
this.logger.log('SDK initialized with config:', {
|
|
61
|
-
|
|
61
|
+
apiUrl: config_1.REPLIQO_API_URL,
|
|
62
62
|
appId: this.config.appId,
|
|
63
63
|
batchSize: this.config.batchSize,
|
|
64
64
|
flushInterval: this.config.flushInterval,
|
package/dist/core/config.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { SDKConfig } from '../types/events';
|
|
2
|
-
export declare const
|
|
2
|
+
export declare const REPLIQO_API_URL = "https://api-repliqo.odmservice.site";
|
|
3
|
+
export declare const DEFAULT_CONFIG: Required<Omit<SDKConfig, 'apiKey' | 'appId'>>;
|
|
3
4
|
export type ResolvedConfig = SDKConfig & typeof DEFAULT_CONFIG;
|
|
4
5
|
export declare function resolveConfig(config: SDKConfig): ResolvedConfig;
|
package/dist/core/config.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.DEFAULT_CONFIG = void 0;
|
|
3
|
+
exports.DEFAULT_CONFIG = exports.REPLIQO_API_URL = void 0;
|
|
4
4
|
exports.resolveConfig = resolveConfig;
|
|
5
|
+
exports.REPLIQO_API_URL = 'https://api-repliqo.odmservice.site';
|
|
5
6
|
exports.DEFAULT_CONFIG = {
|
|
6
7
|
batchSize: 20,
|
|
7
8
|
flushInterval: 30000,
|
package/dist/types/events.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@repliqo/sdk-react-native",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"description": "Session replay & analytics SDK for React Native. Captures screenshots (including modals/alerts), navigation, screen visits, and custom events.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
package/src/core/client.ts
CHANGED
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
} from '../types/events';
|
|
8
8
|
import { SnapshotPayload } from '../types/snapshot';
|
|
9
9
|
import { SnapshotCapture } from '../snapshot/capture';
|
|
10
|
-
import { ResolvedConfig, resolveConfig } from './config';
|
|
10
|
+
import { ResolvedConfig, resolveConfig, REPLIQO_API_URL } from './config';
|
|
11
11
|
import { Logger } from './logger';
|
|
12
12
|
import { ApiClient } from '../transport/api.client';
|
|
13
13
|
import { BatchQueue } from '../transport/batch-queue';
|
|
@@ -35,7 +35,7 @@ export class AppAnalytics {
|
|
|
35
35
|
this.config = resolveConfig(config);
|
|
36
36
|
this.logger = new Logger(this.config.debug);
|
|
37
37
|
this.apiClient = new ApiClient(
|
|
38
|
-
|
|
38
|
+
REPLIQO_API_URL,
|
|
39
39
|
this.config.apiKey,
|
|
40
40
|
this.logger,
|
|
41
41
|
);
|
|
@@ -104,7 +104,7 @@ export class AppAnalytics {
|
|
|
104
104
|
this.setupAppStateListener();
|
|
105
105
|
|
|
106
106
|
this.logger.log('SDK initialized with config:', {
|
|
107
|
-
|
|
107
|
+
apiUrl: REPLIQO_API_URL,
|
|
108
108
|
appId: this.config.appId,
|
|
109
109
|
batchSize: this.config.batchSize,
|
|
110
110
|
flushInterval: this.config.flushInterval,
|
package/src/core/config.ts
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { SDKConfig } from '../types/events';
|
|
2
2
|
|
|
3
|
-
export const
|
|
3
|
+
export const REPLIQO_API_URL = 'https://api-repliqo.odmservice.site';
|
|
4
|
+
|
|
5
|
+
export const DEFAULT_CONFIG: Required<Omit<SDKConfig, 'apiKey' | 'appId'>> = {
|
|
4
6
|
batchSize: 20,
|
|
5
7
|
flushInterval: 30000,
|
|
6
8
|
enableTouchTracking: true,
|