@levo-so/core 0.1.26 → 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/dist/index.js CHANGED
@@ -77,7 +77,9 @@ var LevoClient = class {
77
77
  if (this.#pageContext && typeof this.#pageContext === "object" && Object.keys(this.#pageContext).length > 0) {
78
78
  options.headers = {
79
79
  ...options?.headers || {},
80
- "Levo-Page-Context": JSON.stringify(this.#pageContext)
80
+ "Levo-Page-Context": encodeURIComponent(
81
+ JSON.stringify(this.#pageContext)
82
+ )
81
83
  };
82
84
  }
83
85
  return wretch(this.apiUrl, options).addon(QueryStringAddon);
@@ -4,9 +4,7 @@ import { LevoPlugin } from "./LevoPlugin";
4
4
  export declare class LevoAudience extends LevoPlugin {
5
5
  #private;
6
6
  instance: AnalyticsInstance | null;
7
- request(url: string, data: any): Promise<unknown>;
8
- isIdentified: boolean;
9
- requestBatch: any[];
7
+ request<ResponseBody = unknown, RequestBody = unknown>(url: string, data: RequestBody): Promise<Awaited<ResponseBody>>;
10
8
  initiate(properties: ILevoAudience.Properties): Promise<any>;
11
9
  getReferrer(): {
12
10
  type?: undefined;
@@ -14,15 +12,14 @@ export declare class LevoAudience extends LevoPlugin {
14
12
  data?: undefined;
15
13
  raw?: undefined;
16
14
  } | {
17
- type: any;
18
- referrer: any;
19
- data: any;
15
+ type: string;
16
+ referrer: Record<string, string>;
17
+ data: Record<string, string>;
20
18
  raw: string;
21
19
  };
22
20
  startActivityListener(): any;
23
21
  track(event: string, properties: ILevoAudience.Properties): Promise<any>;
24
- bounce: (properties?: ILevoAudience.Properties) => void;
25
- getCurrentTabId(): string | null;
26
- getTabCount(): number | null;
22
+ getCurrentTabId(): string;
23
+ getTabCount(): number;
27
24
  }
28
25
  //# sourceMappingURL=LevoAudience.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"LevoAudience.d.ts","sourceRoot":"","sources":["../../src/plugins/LevoAudience.ts"],"names":[],"mappings":"AAEA,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WAAW;CAYZ"}
@@ -172,11 +172,11 @@ var isIncognito_default = isIncognito;
172
172
 
173
173
  // src/utils/getUserProperties.ts
174
174
  var getUserProperties = async () => {
175
+ let locale = "";
176
+ let timezone = "";
177
+ let dark_mode = false;
178
+ let private_mode = false;
175
179
  if (window) {
176
- let locale = null;
177
- let timezone = null;
178
- let dark_mode = false;
179
- let private_mode = false;
180
180
  try {
181
181
  ({ isPrivate: private_mode } = await isIncognito_default());
182
182
  } catch (e) {
@@ -197,22 +197,27 @@ var getUserProperties = async () => {
197
197
  } catch (e) {
198
198
  console.error(e);
199
199
  }
200
- return {
201
- locale,
202
- timezone,
203
- dark_mode,
204
- private_mode
205
- };
206
200
  }
201
+ return {
202
+ locale,
203
+ timezone,
204
+ dark_mode,
205
+ private_mode
206
+ };
207
207
  };
208
208
 
209
209
  // src/plugins/LevoAudience.ts
210
210
  var LevoAudience = class extends LevoPlugin {
211
211
  instance = null;
212
212
  #IDLE_THROTTLE = 1 * 1e3;
213
- // every 1 second we check for idlness
213
+ // every 1 second we check for idleness
214
214
  #IDLE_TIMEOUT = 60 * 1e3;
215
215
  // 60 seconds till we consider user idle
216
+ #session = "";
217
+ #device = "";
218
+ #is_identified = false;
219
+ #batch = [];
220
+ #events = [];
216
221
  request(url, data) {
217
222
  const headers = {
218
223
  Accept: "application/json",
@@ -223,7 +228,9 @@ var LevoAudience = class extends LevoPlugin {
223
228
  }
224
229
  const pageContext = this.client.getPageContext();
225
230
  if (pageContext) {
226
- headers["Levo-Page-Context"] = JSON.stringify(pageContext);
231
+ headers["Levo-Page-Context"] = encodeURIComponent(
232
+ JSON.stringify(pageContext)
233
+ );
227
234
  }
228
235
  return wretch(url, {
229
236
  credentials: "include"
@@ -231,8 +238,6 @@ var LevoAudience = class extends LevoPlugin {
231
238
  keepAlive: true
232
239
  }).headers(headers).post(data).json();
233
240
  }
234
- isIdentified = false;
235
- requestBatch = [];
236
241
  async initiate(properties) {
237
242
  if (this.client.NODE_ENV === "development") {
238
243
  return;
@@ -240,29 +245,45 @@ var LevoAudience = class extends LevoPlugin {
240
245
  const plugin = {
241
246
  name: this.client.workspace,
242
247
  track: ({ payload }) => {
243
- if (!this?.client?.insightsUrl) {
248
+ if (!this?.client?.insightsUrl || !this.client.workspace) {
244
249
  return;
245
250
  }
246
251
  const payloadProperties = payload?.properties || {};
247
- this.request(`${this?.client?.insightsUrl}/v1/insights/event/collect`, {
252
+ const collectInput = {
253
+ session_id: this.#session,
254
+ device_id: this.#device,
248
255
  event: payload.event,
256
+ workspace_id: this.client.workspace,
249
257
  properties: {
250
258
  ...properties,
251
259
  ...payloadProperties,
252
260
  resource: void 0,
253
- identifier: void 0
261
+ identifier: void 0,
262
+ hostname: void 0,
263
+ pathname: void 0,
264
+ url: void 0,
265
+ page_title: void 0,
266
+ created_at: void 0
254
267
  },
255
- hostname: window.location.hostname,
256
- pathname: window.location.pathname,
257
- url: window.location.href,
258
- page_title: document.title,
268
+ hostname: payload?.hostname || window.location.hostname,
269
+ pathname: payload?.pathname || window.location.pathname,
270
+ url: payload?.url || window.location.href,
271
+ page_title: payload?.page_title || document.title,
259
272
  resource: payloadProperties?.resource || "page",
260
273
  identifier: payloadProperties?.identifier || properties?.id,
261
- workspace_id: this.client.workspace,
262
- created_at: (/* @__PURE__ */ new Date()).toISOString(),
274
+ created_at: payload?.created_at || (/* @__PURE__ */ new Date()).toISOString(),
263
275
  tab_id: this.getCurrentTabId(),
264
276
  tab_count: this.getTabCount()
265
- }).catch((e) => getLevoError(e));
277
+ };
278
+ const isQueued = navigator.sendBeacon(
279
+ `${this?.client?.insightsUrl}/v1/insights/event/collect`,
280
+ JSON.stringify(collectInput)
281
+ );
282
+ this.#events.push({
283
+ input: payload,
284
+ payload: collectInput,
285
+ queued: isQueued
286
+ });
266
287
  },
267
288
  page: ({ payload }) => {
268
289
  if (!this?.client?.insightsUrl) {
@@ -275,35 +296,38 @@ var LevoAudience = class extends LevoPlugin {
275
296
  title: document.title,
276
297
  identifier: properties.id,
277
298
  resource: "page"
278
- }).catch((e) => getLevoError(e));
299
+ });
279
300
  },
280
301
  identify: ({ payload }) => {
281
- if (!this?.client?.insightsUrl) {
302
+ if (!this?.client?.insightsUrl || !this.client.workspace) {
282
303
  return;
283
304
  }
305
+ const welcomeInput = {
306
+ private_mode: payload.traits.private_mode,
307
+ dark_mode: payload.traits.dark_mode,
308
+ timezone: payload.traits.timezone,
309
+ locale: payload.traits.locale,
310
+ referrer: payload.traits.referrer,
311
+ workspace_id: this.client.workspace,
312
+ hostname: window.location.hostname,
313
+ pathname: window.location.pathname,
314
+ page_title: document.title,
315
+ url: window.location.href,
316
+ created_at: (/* @__PURE__ */ new Date()).toISOString(),
317
+ tab_id: this.getCurrentTabId(),
318
+ tab_count: this.getTabCount()
319
+ };
284
320
  this.request(
285
- `${this?.client?.insightsUrl}/v1/insights/visits/welcome`,
286
- {
287
- private_mode: payload.traits.private_mode,
288
- dark_mode: payload.traits.dark_mode,
289
- timezone: payload.traits.timezone,
290
- locale: payload.traits.locale,
291
- referrer: payload.traits.referrer,
292
- workspace_id: this.client.workspace,
293
- hostname: window.location.hostname,
294
- pathname: window.location.pathname,
295
- page_title: document.title,
296
- url: window.location.href,
297
- created_at: (/* @__PURE__ */ new Date()).toISOString(),
298
- tab_id: this.getCurrentTabId(),
299
- tab_count: this.getTabCount()
300
- }
301
- ).then(() => {
302
- this.isIdentified = true;
303
- this.request(
304
- `${this?.client?.insightsUrl}/v1/insights/event/collect/bulk`,
305
- this.requestBatch
306
- ).catch((e) => getLevoError(e));
321
+ `${this?.client?.insightsUrl}/v1/insights/event/welcome`,
322
+ welcomeInput
323
+ ).then((data) => {
324
+ this.#is_identified = true;
325
+ this.#session = data.content.data.session;
326
+ this.#device = data.content.data.device;
327
+ navigator.sendBeacon(
328
+ `${this?.client?.insightsUrl}/v1/insights/event/bulk?workspace=${this?.client?.workspace}`,
329
+ JSON.stringify(this.#batch)
330
+ );
307
331
  }).catch((e) => getLevoError(e));
308
332
  }
309
333
  };
@@ -363,15 +387,23 @@ var LevoAudience = class extends LevoPlugin {
363
387
  return null;
364
388
  }
365
389
  async track(event, properties) {
366
- if (this.instance && this.isIdentified) {
390
+ if (!this.client.workspace) {
391
+ return;
392
+ }
393
+ if (this.instance && this.#is_identified) {
367
394
  return this.instance.track(event, properties);
368
395
  }
369
- return this.requestBatch.push({
396
+ return this.#batch.push({
370
397
  event,
371
398
  properties: {
372
399
  ...properties,
373
400
  resource: void 0,
374
- identifier: void 0
401
+ identifier: void 0,
402
+ hostname: void 0,
403
+ pathname: void 0,
404
+ url: void 0,
405
+ page_title: void 0,
406
+ created_at: void 0
375
407
  },
376
408
  hostname: window.location.hostname,
377
409
  pathname: window.location.pathname,
@@ -385,46 +417,21 @@ var LevoAudience = class extends LevoPlugin {
385
417
  tab_count: this.getTabCount()
386
418
  });
387
419
  }
388
- bounce = (properties) => {
389
- const payload = {
390
- event: "page.bounce",
391
- properties: {
392
- ...properties,
393
- tab_count: this.getTabCount,
394
- resource: void 0,
395
- identifier: void 0
396
- },
397
- hostname: window.location.hostname,
398
- pathname: window.location.pathname,
399
- url: window.location.href,
400
- page_title: document.title,
401
- resource: properties?.resource || "page",
402
- identifier: properties?.identifier || properties?.id,
403
- workspace_id: this.client.workspace,
404
- created_at: (/* @__PURE__ */ new Date()).toISOString(),
405
- tab_id: this.getCurrentTabId(),
406
- tab_count: this.getTabCount()
407
- };
408
- navigator.sendBeacon(
409
- `${this?.client?.insightsUrl}/v1/insights/event/collect`,
410
- JSON.stringify(payload)
411
- );
412
- };
413
420
  getCurrentTabId() {
414
421
  try {
415
422
  if (typeof window === "undefined" || !("sessionStorage" in window)) {
416
- return null;
423
+ return "";
417
424
  }
418
425
  const CURRENT_TAB_LOCAL_STORAGE_KEY = "lv_insights_ct";
419
- return window.sessionStorage.getItem(CURRENT_TAB_LOCAL_STORAGE_KEY) || null;
426
+ return window.sessionStorage.getItem(CURRENT_TAB_LOCAL_STORAGE_KEY) || "";
420
427
  } catch (_) {
421
- return null;
428
+ return "";
422
429
  }
423
430
  }
424
431
  getTabCount() {
425
432
  try {
426
433
  if (typeof window === "undefined" || !("localStorage" in window)) {
427
- return null;
434
+ return 0;
428
435
  }
429
436
  const OT_LOCAL_STORAGE_KEY = "lv_insights_ot";
430
437
  return Number(window.localStorage.getItem(OT_LOCAL_STORAGE_KEY)) || 0;
@@ -1,17 +1,19 @@
1
1
  export declare namespace ILevoAudience {
2
- interface BaseProperties {
2
+ interface Traits {
3
3
  private_mode: boolean;
4
4
  dark_mode: boolean;
5
5
  locale: string;
6
6
  timezone: string;
7
- resource: string;
8
- identifier: string;
9
7
  referrer: {
10
- type: any;
11
- referrer: any;
12
- data: any;
8
+ type: string;
9
+ referrer: Record<string, string>;
10
+ data: Record<string, string>;
13
11
  };
14
12
  }
13
+ type BaseProperties = Traits & {
14
+ resource: string;
15
+ identifier: string;
16
+ };
15
17
  interface BlockProperties {
16
18
  id: string;
17
19
  }
@@ -22,13 +24,36 @@ export declare namespace ILevoAudience {
22
24
  interface ScrollProperties {
23
25
  percent: number;
24
26
  }
25
- type Properties = Partial<BaseProperties & BlockProperties & ActivityProperties & ScrollProperties> & Record<string, any>;
27
+ type Properties = Partial<BaseProperties & BlockProperties & ActivityProperties & ScrollProperties> & Partial<Omit<BaseInput, "workspace_id" | "tab_count" | "tab_id">> & Record<string, any>;
26
28
  type EventProperties = {
27
29
  properties: Properties;
28
- traits: Properties;
30
+ traits: Traits;
29
31
  event: string;
30
32
  type: "track" | "page" | "identify";
31
33
  userId: string | null;
32
34
  };
35
+ type BaseInput = {
36
+ workspace_id: string;
37
+ hostname: string;
38
+ pathname: string;
39
+ page_title: string;
40
+ url: string;
41
+ created_at: string;
42
+ tab_id: string;
43
+ tab_count: number;
44
+ };
45
+ type WelcomeInput = Traits & BaseInput;
46
+ type WelcomeResponse = {
47
+ session: string;
48
+ device: string;
49
+ };
50
+ type CollectInput = BaseInput & {
51
+ session_id?: string;
52
+ device_id?: string;
53
+ event: string;
54
+ properties: Properties;
55
+ resource: string;
56
+ identifier: string | undefined;
57
+ };
33
58
  }
34
59
  //# sourceMappingURL=audience.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"audience.d.ts","sourceRoot":"","sources":["../../src/types/audience.ts"],"names":[],"mappings":"AAAA,yBAAiB,aAAa,CAAC;IAC7B,UAAiB,cAAc;QAC7B,YAAY,EAAE,OAAO,CAAC;QACtB,SAAS,EAAE,OAAO,CAAC;QACnB,MAAM,EAAE,MAAM,CAAC;QACf,QAAQ,EAAE,MAAM,CAAC;QAEjB,QAAQ,EAAE,MAAM,CAAC;QACjB,UAAU,EAAE,MAAM,CAAC;QACnB,QAAQ,EAAE;YACR,IAAI,EAAE,GAAG,CAAC;YACV,QAAQ,EAAE,GAAG,CAAC;YACd,IAAI,EAAE,GAAG,CAAC;SACX,CAAC;KACH;IAED,UAAiB,eAAe;QAC9B,EAAE,EAAE,MAAM,CAAC;KACZ;IAED,UAAiB,kBAAkB;QACjC,YAAY,CAAC,EAAE,MAAM,CAAC;QACtB,cAAc,CAAC,EAAE,MAAM,CAAC;KACzB;IAED,UAAiB,gBAAgB;QAC/B,OAAO,EAAE,MAAM,CAAC;KACjB;IAED,KAAY,UAAU,GAAG,OAAO,CAC9B,cAAc,GAAG,eAAe,GAAG,kBAAkB,GAAG,gBAAgB,CACzE,GACC,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAEtB,KAAY,eAAe,GAAG;QAC5B,UAAU,EAAE,UAAU,CAAC;QACvB,MAAM,EAAE,UAAU,CAAC;QACnB,KAAK,EAAE,MAAM,CAAC;QACd,IAAI,EAAE,OAAO,GAAG,MAAM,GAAG,UAAU,CAAC;QACpC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;KACvB,CAAC;CACH"}
1
+ {"version":3,"file":"audience.d.ts","sourceRoot":"","sources":["../../src/types/audience.ts"],"names":[],"mappings":"AACA,yBAAiB,aAAa,CAAC;IAC7B,UAAiB,MAAM;QACrB,YAAY,EAAE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QACZ,UAAU,EAAE,MAAM,CAAC;QACnB,MAAM,EAAE,MAAM,CAAC;QACf,SAAS,EAAE,MAAM,CAAC;KACnB,CAAC;IAEF,KAAY,YAAY,GAAG,MAAM,GAAG,SAAS,CAAC;IAE9C,KAAY,eAAe,GAAG;QAC5B,OAAO,EAAE,MAAM,CAAC;QAChB,MAAM,EAAE,MAAM,CAAC;KAChB,CAAC;IAEF,KAAY,YAAY,GAAG,SAAS,GAAG;QACrC,UAAU,CAAC,EAAE,MAAM,CAAC;QACpB,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB,KAAK,EAAE,MAAM,CAAC;QACd,UAAU,EAAE,UAAU,CAAC;QACvB,QAAQ,EAAE,MAAM,CAAC;QACjB,UAAU,EAAE,MAAM,GAAG,SAAS,CAAC;KAChC,CAAC;CACH"}
@@ -13,7 +13,7 @@ export interface IResponseSingle<T = Record<string, unknown>, Meta = any> {
13
13
  status: boolean;
14
14
  content: {
15
15
  data: T;
16
- meta: Meta;
16
+ meta?: Meta;
17
17
  };
18
18
  }
19
19
  export interface IResponseMyCategory<T = Record<string, unknown>> {
@@ -1 +1 @@
1
- {"version":3,"file":"query.d.ts","sourceRoot":"","sources":["../../src/types/query.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,KAAK;IACpB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,iBAAiB,CAAC,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IAC5D,MAAM,EAAE,OAAO,CAAC;IAChB,OAAO,EAAE;QACP,IAAI,EAAE,KAAK,CAAC;QACZ,IAAI,EAAE,CAAC,EAAE,CAAC;KACX,CAAC;CACH;AAED,MAAM,WAAW,eAAe,CAAC,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,IAAI,GAAG,GAAG;IACtE,MAAM,EAAE,OAAO,CAAC;IAChB,OAAO,EAAE;QACP,IAAI,EAAE,C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AAO,CAAC,EAAE,IAAI,GAAG,GAAG;IACtE,MAAM,EAAE,OAAO,CAAC;IAChB,OAAO,EAAE;QACP,IAAI,EAAE,CAAC,CAAC;QACR,IAAI,CAAC,EAAE,IAAI,CAAC;KACb,CAAC;CACH;AAED,MAAM,WAAW,mBAAmB,CAAC,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IAC9D,MAAM,EAAE,OAAO,CAAC;IAChB,OAAO,EAAE;QACP,IAAI,EAAE,CAAC,EAAE,CAAC;KACX,CAAC;CACH;AAED,MAAM,MAAM,cAAc,CAAC,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,IAAI;IACxD,MAAM,EAAE,KAAK,CAAC;IACd,MAAM,CAAC,EAAE,CAAC,EAAE,CAAC;IACb,OAAO,CAAC,EAAE;QACR,MAAM,EAAE,MAAM,CAAC;QACf,IAAI,EAAE,MAAM,CAAC;QACb,KAAK,EAAE,MAAM,CAAC;QACd,WAAW,EAAE,MAAM,CAAC;QACpB,IAAI,EAAE,MAAM,CAAC;QACb,YAAY,EAAE,MAAM,CAAC;KACtB,GAAG,CAAC,CAAC;CACP,CAAC;AAEF,MAAM,MAAM,OAAO,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AAE9C,MAAM,MAAM,YAAY,GAAG;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAAC"}
@@ -1,7 +1,7 @@
1
1
  export declare const getUserProperties: () => Promise<{
2
- locale: string | null;
3
- timezone: string | null;
2
+ locale: string;
3
+ timezone: string;
4
4
  dark_mode: boolean;
5
5
  private_mode: boolean;
6
- } | undefined>;
6
+ }>;
7
7
  //# sourceMappingURL=getUserProperties.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"getUserProperties.d.ts","sourceRoot":"","sources":["../../src/utils/getUserProperties.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,iBAAiB;;;;;cAsC7B,CAAC"}
1
+ {"version":3,"file":"getUserProperties.d.ts","sourceRoot":"","sources":["../../src/utils/getUserProperties.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,iBAAiB;;;;;EAoC7B,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@levo-so/core",
3
- "version": "0.1.26",
3
+ "version": "0.1.28",
4
4
  "author": "Levo Engineering <devs@theinternetfolks.com>",
5
5
  "description": "Levo common utilities",
6
6
  "type": "module",
@@ -24,8 +24,8 @@
24
24
  "devDependencies": {
25
25
  "tsup": "8.2.4",
26
26
  "typescript": "5.5.4",
27
- "@levo/ts-config": "0.0.0",
28
- "@levo/eslint-config": "0.0.0"
27
+ "@levo/eslint-config": "0.0.0",
28
+ "@levo/ts-config": "0.0.0"
29
29
  },
30
30
  "main": "./dist/index.js",
31
31
  "module": "./dist/index.js",