@pagelines/sdk 1.0.571 → 1.0.573

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.
@@ -23,6 +23,9 @@ export interface ChatMessage {
23
23
  text: string;
24
24
  sender: 'user' | 'agent' | 'system';
25
25
  timestamp: string;
26
+ conversationId?: string;
27
+ sequence?: string;
28
+ systemKind?: string | null;
26
29
  attachments?: ChatAttachment[];
27
30
  issue?: ChatMessageIssue;
28
31
  }
@@ -92,7 +92,7 @@ declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {
92
92
  detail?: string | undefined;
93
93
  blocker?: {
94
94
  bucket: "error" | "account";
95
- code: "billing_no_plan" | "billing_seat_limit" | "billing_past_due" | "billing_runaway_cap" | "billing_budget_reached" | "agent_deleted" | "agent_not_deployed" | "agent_boot_failed" | "agent_unreachable" | "agent_wake_timeout" | "stream_timeout" | "stream_disconnect" | "empty_stream" | "rate_limit";
95
+ code: "billing_no_plan" | "billing_seat_limit" | "billing_past_due" | "billing_runaway_cap" | "billing_budget_reached" | "trial_ended" | "agent_deleted" | "agent_not_deployed" | "agent_boot_failed" | "agent_unreachable" | "agent_wake_timeout" | "stream_timeout" | "stream_disconnect" | "empty_stream" | "rate_limit";
96
96
  title: string;
97
97
  actionLabel: string;
98
98
  actionUrl: string;
@@ -189,7 +189,7 @@ declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {
189
189
  detail?: string | undefined;
190
190
  blocker?: {
191
191
  bucket: "error" | "account";
192
- code: "billing_no_plan" | "billing_seat_limit" | "billing_past_due" | "billing_runaway_cap" | "billing_budget_reached" | "agent_deleted" | "agent_not_deployed" | "agent_boot_failed" | "agent_unreachable" | "agent_wake_timeout" | "stream_timeout" | "stream_disconnect" | "empty_stream" | "rate_limit";
192
+ code: "billing_no_plan" | "billing_seat_limit" | "billing_past_due" | "billing_runaway_cap" | "billing_budget_reached" | "trial_ended" | "agent_deleted" | "agent_not_deployed" | "agent_boot_failed" | "agent_unreachable" | "agent_wake_timeout" | "stream_timeout" | "stream_disconnect" | "empty_stream" | "rate_limit";
193
193
  title: string;
194
194
  actionLabel: string;
195
195
  actionUrl: string;
@@ -101,7 +101,7 @@ export declare function getDemoAgentByHandle(handle: string): Partial<{
101
101
  detail?: string | undefined;
102
102
  blocker?: {
103
103
  bucket: "error" | "account";
104
- code: "billing_no_plan" | "billing_seat_limit" | "billing_past_due" | "billing_runaway_cap" | "billing_budget_reached" | "agent_deleted" | "agent_not_deployed" | "agent_boot_failed" | "agent_unreachable" | "agent_wake_timeout" | "stream_timeout" | "stream_disconnect" | "empty_stream" | "rate_limit";
104
+ code: "billing_no_plan" | "billing_seat_limit" | "billing_past_due" | "billing_runaway_cap" | "billing_budget_reached" | "trial_ended" | "agent_deleted" | "agent_not_deployed" | "agent_boot_failed" | "agent_unreachable" | "agent_wake_timeout" | "stream_timeout" | "stream_disconnect" | "empty_stream" | "rate_limit";
105
105
  title: string;
106
106
  actionLabel: string;
107
107
  actionUrl: string;
package/dist/sdkClient.js CHANGED
@@ -1,9 +1,9 @@
1
- var ae = Object.defineProperty;
2
- var ve = (n, e, t) => e in n ? ae(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t;
3
- var u = (n, e) => ae(n, "name", { value: e, configurable: !0 });
1
+ var oe = Object.defineProperty;
2
+ var ve = (n, e, t) => e in n ? oe(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t;
3
+ var u = (n, e) => oe(n, "name", { value: e, configurable: !0 });
4
4
  var c = (n, e, t) => ve(n, typeof e != "symbol" ? e + "" : e, t);
5
5
  import { APP_PORT as pe, APP_PROD_URL as me, createRefreshingFetch as ye, cookieUtil as U, createLogger as we, shortId as xe, objectId as C, SettingsObject as Se } from "@pagelines/core";
6
- import { watch as N, ref as R, computed as oe } from "vue";
6
+ import { watch as N, ref as R, computed as ae } from "vue";
7
7
  function I(n, e) {
8
8
  return n || (e ? `http://localhost:${pe}` : me);
9
9
  }
@@ -16,12 +16,12 @@ function Ie(n, e, t) {
16
16
  onAccessTokenRefreshed: t.onAccessTokenRefreshed,
17
17
  onTerminalFailure: t.onTerminalFailure
18
18
  }) : globalThis.fetch.bind(globalThis);
19
- return async (a, i) => {
20
- const h = U.getAuthToken(), o = new Headers(i?.headers);
21
- o.has("Content-Type") || o.set("Content-Type", "application/json"), h && !o.has("Authorization") && o.set("Authorization", `Bearer ${h}`);
22
- const p = typeof a == "string" && a.startsWith("/") ? `${r}${a}` : a, g = await s(p, {
19
+ return async (o, i) => {
20
+ const h = U.getAuthToken(), a = new Headers(i?.headers);
21
+ a.has("Content-Type") || a.set("Content-Type", "application/json"), h && !a.has("Authorization") && a.set("Authorization", `Bearer ${h}`);
22
+ const p = typeof o == "string" && o.startsWith("/") ? `${r}${o}` : o, g = await s(p, {
23
23
  ...i,
24
- headers: o,
24
+ headers: a,
25
25
  credentials: "include"
26
26
  });
27
27
  if (e) {
@@ -47,18 +47,18 @@ const P = 4, be = globalThis.nanostoresGlobal || (globalThis.nanostoresGlobal =
47
47
  lc: 0,
48
48
  listen(r) {
49
49
  return t.lc = e.push(r), () => {
50
- for (let a = b + P; a < y.length; )
51
- y[a] === r ? y.splice(a, P) : a += P;
50
+ for (let o = b + P; o < y.length; )
51
+ y[o] === r ? y.splice(o, P) : o += P;
52
52
  let s = e.indexOf(r);
53
53
  ~s && (e.splice(s, 1), --t.lc || t.off());
54
54
  };
55
55
  },
56
56
  notify(r, s) {
57
57
  be.epoch++;
58
- let a = !y.length;
58
+ let o = !y.length;
59
59
  for (let i of e)
60
60
  y.push(i, t.value, r, s);
61
- if (a) {
61
+ if (o) {
62
62
  for (b = 0; b < y.length; b += P)
63
63
  y[b](
64
64
  y[b + 1],
@@ -99,13 +99,13 @@ const P = 4, be = globalThis.nanostoresGlobal || (globalThis.nanostoresGlobal =
99
99
  * Sync Vue reactive refs with global nanostores for cross-bundle persistence.
100
100
  */
101
101
  syncWithGlobalStores(e) {
102
- const { activeUser: t, token: r, deviceId: s } = e, a = D.get(), i = B.get(), h = _.get();
103
- a && (t.value = a), i && (r.value = i), h && (s.value = h), N(t, (o) => D.set(o), { immediate: !0 }), N(r, (o) => B.set(o), { immediate: !0 }), N(s, (o) => _.set(o), { immediate: !0 }), D.subscribe((o) => {
104
- o !== t.value && (t.value = o);
105
- }), B.subscribe((o) => {
106
- o !== r.value && (r.value = o);
107
- }), _.subscribe((o) => {
108
- o !== s.value && (s.value = o);
102
+ const { activeUser: t, token: r, deviceId: s } = e, o = D.get(), i = B.get(), h = _.get();
103
+ o && (t.value = o), i && (r.value = i), h && (s.value = h), N(t, (a) => D.set(a), { immediate: !0 }), N(r, (a) => B.set(a), { immediate: !0 }), N(s, (a) => _.set(a), { immediate: !0 }), D.subscribe((a) => {
104
+ a !== t.value && (t.value = a);
105
+ }), B.subscribe((a) => {
106
+ a !== r.value && (r.value = a);
107
+ }), _.subscribe((a) => {
108
+ a !== s.value && (s.value = a);
109
109
  });
110
110
  }
111
111
  /**
@@ -186,7 +186,7 @@ const Q = class Q {
186
186
  this.ctx = e;
187
187
  }
188
188
  async create(e) {
189
- const t = e.orgId || this.resolveOrgId(), r = I(this.ctx.apiBase, this.ctx.isDev), a = await (await fetch(`${r}/api/agents`, {
189
+ const t = e.orgId || this.resolveOrgId(), r = I(this.ctx.apiBase, this.ctx.isDev), o = await (await fetch(`${r}/api/agents`, {
190
190
  method: "POST",
191
191
  headers: {
192
192
  "Content-Type": "application/json",
@@ -194,11 +194,11 @@ const Q = class Q {
194
194
  },
195
195
  body: JSON.stringify({ name: e.name, orgId: t })
196
196
  })).json();
197
- if (!a.ok || !a.data?.[0]) {
198
- const i = a.error || "Failed to create agent";
197
+ if (!o.ok || !o.data?.[0]) {
198
+ const i = o.error || "Failed to create agent";
199
199
  throw this.ctx.error.value = i, new Error(i);
200
200
  }
201
- return this.ctx.processApiResponse(a), a.data[0];
201
+ return this.ctx.processApiResponse(o), o.data[0];
202
202
  }
203
203
  async getStatus(e) {
204
204
  const t = I(this.ctx.apiBase, this.ctx.isDev), s = await (await fetch(`${t}/api/agents/${e.agentId}/status`, {
@@ -218,17 +218,17 @@ const Q = class Q {
218
218
  * names to user copy at the call site.
219
219
  */
220
220
  async waitUntilReady(e) {
221
- const { agentId: t, onStatus: r, timeoutMs: s = 3e5, pollIntervalMs: a = 3e3 } = e, i = Date.now();
221
+ const { agentId: t, onStatus: r, timeoutMs: s = 3e5, pollIntervalMs: o = 3e3 } = e, i = Date.now();
222
222
  let h;
223
223
  for (; Date.now() - i < s; ) {
224
- const o = await this.getStatus({ agentId: t });
225
- if (o.ready) {
224
+ const a = await this.getStatus({ agentId: t });
225
+ if (a.ready) {
226
226
  r?.("running");
227
227
  return;
228
228
  }
229
- if (o.status === "error")
230
- throw new Error(o.error || "Provisioning failed");
231
- o.status !== h && (r?.(o.status), h = o.status), await new Promise((p) => setTimeout(p, a));
229
+ if (a.status === "error")
230
+ throw new Error(a.error || "Provisioning failed");
231
+ a.status !== h && (r?.(a.status), h = a.status), await new Promise((p) => setTimeout(p, o));
232
232
  }
233
233
  throw new Error("Agent provisioning timed out — please try again");
234
234
  }
@@ -236,16 +236,16 @@ const Q = class Q {
236
236
  async webhook(e) {
237
237
  const r = `${I(this.ctx.apiBase, this.ctx.isDev)}/api/bot-api/webhooks/agents/${e.agentId}`, s = { type: e.type, data: e.data };
238
238
  e.meta && (s.meta = e.meta);
239
- const a = await fetch(r, {
239
+ const o = await fetch(r, {
240
240
  method: "POST",
241
241
  headers: { "Content-Type": "application/json" },
242
242
  body: JSON.stringify(s)
243
243
  });
244
- if (!a.ok) {
245
- const i = await a.text().catch(() => "Unknown error");
246
- throw new Error(`Webhook delivery failed (${a.status}): ${i.slice(0, 200)}`);
244
+ if (!o.ok) {
245
+ const i = await o.text().catch(() => "Unknown error");
246
+ throw new Error(`Webhook delivery failed (${o.status}): ${i.slice(0, 200)}`);
247
247
  }
248
- return a.json();
248
+ return o.json();
249
249
  }
250
250
  resolveOrgId() {
251
251
  const t = this.ctx.activeUser.value?.orgs?.[0]?.orgId;
@@ -361,10 +361,10 @@ const X = class X {
361
361
  this.ctx.logger.error("loginWithGoogle: Only available in browser");
362
362
  return;
363
363
  }
364
- const t = I(this.ctx.apiBase, this.ctx.isDev), r = window.location.origin, s = `${t}/auth/google-popup?origin=${encodeURIComponent(r)}`, a = 500, i = 600, h = window.screenX + (window.outerWidth - a) / 2, o = window.screenY + (window.outerHeight - i) / 2, p = window.open(
364
+ const t = I(this.ctx.apiBase, this.ctx.isDev), r = window.location.origin, s = `${t}/auth/google-popup?origin=${encodeURIComponent(r)}`, o = 500, i = 600, h = window.screenX + (window.outerWidth - o) / 2, a = window.screenY + (window.outerHeight - i) / 2, p = window.open(
365
365
  s,
366
366
  "google-auth",
367
- `width=${a},height=${i},left=${h},top=${o},popup=yes`
367
+ `width=${o},height=${i},left=${h},top=${a},popup=yes`
368
368
  );
369
369
  if (!p) {
370
370
  const l = "Popup was blocked. Please allow popups for this site.";
@@ -392,14 +392,14 @@ const X = class X {
392
392
  }
393
393
  };
394
394
  u(X, "AuthClient");
395
- let z = X;
395
+ let q = X;
396
396
  const Y = class Y {
397
397
  constructor(e) {
398
398
  c(this, "ctx");
399
399
  this.ctx = e;
400
400
  }
401
401
  async startTrial(e) {
402
- const t = this.resolveOrgId(), r = I(this.ctx.apiBase, this.ctx.isDev), a = await (await fetch(`${r}/api/billing/checkout/create`, {
402
+ const t = this.resolveOrgId(), r = I(this.ctx.apiBase, this.ctx.isDev), o = await (await fetch(`${r}/api/billing/checkout/create`, {
403
403
  method: "POST",
404
404
  headers: {
405
405
  "Content-Type": "application/json",
@@ -411,11 +411,11 @@ const Y = class Y {
411
411
  ...e?.planKey && { planKey: e.planKey }
412
412
  })
413
413
  })).json();
414
- if (!a.ok || !a.data?.url) {
415
- const i = a.error || "Failed to create checkout session";
414
+ if (!o.ok || !o.data?.url) {
415
+ const i = o.error || "Failed to create checkout session";
416
416
  throw this.ctx.error.value = i, new Error(i);
417
417
  }
418
- window.location.href = a.data.url;
418
+ window.location.href = o.data.url;
419
419
  }
420
420
  async confirmCheckout(e) {
421
421
  return this.getStatus();
@@ -433,11 +433,11 @@ const Y = class Y {
433
433
  hasActiveBilling: !1,
434
434
  maxAgents: 0
435
435
  };
436
- const a = ["active", "trialing"];
436
+ const o = ["active", "trialing"];
437
437
  return {
438
438
  plan: s.data.plan,
439
439
  status: s.data.status,
440
- hasActiveBilling: a.includes(s.data.status),
440
+ hasActiveBilling: o.includes(s.data.status),
441
441
  maxAgents: s.data.maxAgents,
442
442
  ...s.data.trialEnd && { trialEnd: s.data.trialEnd },
443
443
  ...s.data.trialDaysRemaining !== void 0 && { trialDaysRemaining: s.data.trialDaysRemaining }
@@ -451,7 +451,7 @@ const Y = class Y {
451
451
  }
452
452
  };
453
453
  u(Y, "BillingClient");
454
- let W = Y;
454
+ let z = Y;
455
455
  const Te = /* @__PURE__ */ new Set(["status", "message", "message_delta", "working_state", "working_end", "error", "stream_end"]);
456
456
  function ie(n) {
457
457
  const e = n.split(`
@@ -475,6 +475,9 @@ function ne(n) {
475
475
  text: n.content,
476
476
  sender: n.role === "system" ? "system" : "agent",
477
477
  timestamp: n.createdAt,
478
+ conversationId: n.conversationId,
479
+ sequence: n.sequence,
480
+ systemKind: n.systemKind,
478
481
  ...n.metadata?.attachments?.length ? { attachments: n.metadata.attachments } : {},
479
482
  ...n.metadata?.issue ? { issue: n.metadata.issue } : {}
480
483
  };
@@ -497,9 +500,9 @@ const Z = class Z {
497
500
  */
498
501
  async chatStreamPublic(e) {
499
502
  const r = `${I(this.ctx.apiBase, this.ctx.isDev)}/api/agents/public/${encodeURIComponent(e.handle)}/chat/v2/stream`;
500
- let s = "", a = !1, i = !1, h;
503
+ let s = "", o = !1, i = !1, h;
501
504
  try {
502
- const o = await fetch(r, {
505
+ const a = await fetch(r, {
503
506
  method: "POST",
504
507
  headers: { "Content-Type": "application/json" },
505
508
  body: JSON.stringify({
@@ -509,12 +512,12 @@ const Z = class Z {
509
512
  ...e.context ? { context: e.context } : {}
510
513
  })
511
514
  });
512
- if (!o.ok) {
513
- const w = await o.json().catch(() => ({ error: "Request failed" }));
514
- e.onError(w.error || `HTTP ${o.status}`);
515
+ if (!a.ok) {
516
+ const w = await a.json().catch(() => ({ error: "Request failed" }));
517
+ e.onError(w.error || `HTTP ${a.status}`);
515
518
  return;
516
519
  }
517
- if (s = o.headers.get("X-Conversation-Id") || "", h = o.body?.getReader(), !h) {
520
+ if (s = a.headers.get("X-Conversation-Id") || "", h = a.body?.getReader(), !h) {
518
521
  e.onError("No response stream");
519
522
  return;
520
523
  }
@@ -538,7 +541,7 @@ const Z = class Z {
538
541
  else if (f.event === "message_delta")
539
542
  e.onDelta(f.data.delta, f.data.role);
540
543
  else if (f.event === "error") {
541
- a = !0, e.onError(f.data.message);
544
+ o = !0, e.onError(f.data.message);
542
545
  break e;
543
546
  } else if (f.event === "message" && (f.data.message.role === "assistant" || f.data.message.role === "system")) {
544
547
  i = !0;
@@ -552,9 +555,9 @@ const Z = class Z {
552
555
  `);
553
556
  }
554
557
  }
555
- !a && i ? e.onDone(s) : a || e.onError("Stream ended before reply arrived");
556
- } catch (o) {
557
- e.onError(o instanceof Error ? o.message : "Stream failed");
558
+ !o && i ? e.onDone(s) : o || e.onError("Stream ended before reply arrived");
559
+ } catch (a) {
560
+ e.onError(a instanceof Error ? a.message : "Stream failed");
558
561
  } finally {
559
562
  try {
560
563
  await h?.cancel();
@@ -572,7 +575,7 @@ const Z = class Z {
572
575
  */
573
576
  async chatStreamAuthenticated(e) {
574
577
  const t = I(this.ctx.apiBase, this.ctx.isDev), r = this.ctx.token.value ? { Authorization: `Bearer ${this.ctx.token.value}` } : {};
575
- let s, a = null;
578
+ let s, o = null;
576
579
  try {
577
580
  const d = await fetch(`${t}/api/conversations`, {
578
581
  method: "POST",
@@ -583,12 +586,12 @@ const Z = class Z {
583
586
  e.onError(S.error || `Conversation failed: HTTP ${d.status}`);
584
587
  return;
585
588
  }
586
- s = S.data.conversationId, a = S.data.latestSequence ?? null;
589
+ s = S.data.conversationId, o = S.data.latestSequence ?? null;
587
590
  } catch (d) {
588
591
  e.onError(d instanceof Error ? d.message : "Conversation failed");
589
592
  return;
590
593
  }
591
- let i = !1, h = !1, o = !1, p = !1, g = !1, w = !1, l;
594
+ let i = !1, h = !1, a = !1, p = !1, g = !1, w = !1, l;
592
595
  const m = new AbortController();
593
596
  let x = !1, f, A = /* @__PURE__ */ u(() => {
594
597
  }, "resolveStreamReady");
@@ -599,9 +602,9 @@ const Z = class Z {
599
602
  }, "settleStreamReady"), re = /* @__PURE__ */ u(() => {
600
603
  l?.cancel().catch(() => {
601
604
  });
602
- }, "cancelReader"), de = a ? `${t}/api/conversations/${encodeURIComponent(s)}/stream?since=${encodeURIComponent(a)}` : `${t}/api/conversations/${encodeURIComponent(s)}/stream`;
605
+ }, "cancelReader"), de = o ? `${t}/api/conversations/${encodeURIComponent(s)}/stream?since=${encodeURIComponent(o)}` : `${t}/api/conversations/${encodeURIComponent(s)}/stream`;
603
606
  f = setTimeout(() => {
604
- w = !0, o = !0, e.onError("Timed out opening stream"), m.abort(), $("failed");
607
+ w = !0, a = !0, e.onError("Timed out opening stream"), m.abort(), $("failed");
605
608
  }, 1e4);
606
609
  const O = (async () => {
607
610
  try {
@@ -610,11 +613,11 @@ const Z = class Z {
610
613
  signal: m.signal
611
614
  });
612
615
  if (!d.ok) {
613
- o = !0, $("failed"), e.onError(`Stream failed: HTTP ${d.status}`);
616
+ a = !0, $("failed"), e.onError(`Stream failed: HTTP ${d.status}`);
614
617
  return;
615
618
  }
616
619
  if (l = d.body?.getReader(), !l) {
617
- o = !0, $("failed"), e.onError("No response stream");
620
+ a = !0, $("failed"), e.onError("No response stream");
618
621
  return;
619
622
  }
620
623
  $("ready");
@@ -638,7 +641,7 @@ const Z = class Z {
638
641
  else if (v.event === "message_delta")
639
642
  i && e.onDelta(v.data.delta, v.data.role);
640
643
  else if (v.event === "error") {
641
- o = !0, e.onError(v.data.message);
644
+ a = !0, e.onError(v.data.message);
642
645
  break e;
643
646
  } else if (v.event === "message" && (v.data.message.role === "assistant" || v.data.message.role === "system")) {
644
647
  if (!i)
@@ -655,9 +658,9 @@ const Z = class Z {
655
658
  `);
656
659
  }
657
660
  }
658
- !o && p ? e.onDone(s) : !o && i && !h && e.onError("Stream ended before reply arrived");
661
+ !a && p ? e.onDone(s) : !a && i && !h && e.onError("Stream ended before reply arrived");
659
662
  } catch (d) {
660
- !h && !w && (o = !0, $("failed"), e.onError(d instanceof Error ? d.message : "Stream failed"));
663
+ !h && !w && (a = !0, $("failed"), e.onError(d instanceof Error ? d.message : "Stream failed"));
661
664
  } finally {
662
665
  g = !0;
663
666
  try {
@@ -699,7 +702,7 @@ const Z = class Z {
699
702
  }
700
703
  };
701
704
  u(Z, "ChatClient");
702
- let q = Z;
705
+ let W = Z;
703
706
  const ee = class ee {
704
707
  constructor(e) {
705
708
  c(this, "ctx");
@@ -795,7 +798,7 @@ const j = new K(), L = class L extends Se {
795
798
  // Auto-managed session ID for usage tracking
796
799
  c(this, "sessionId", C({ prefix: "ses" }));
797
800
  // Computed properties derived from activeUser (matches UserClient pattern)
798
- c(this, "currentAgent", oe(() => {
801
+ c(this, "currentAgent", ae(() => {
799
802
  const t = this.activeUser.value;
800
803
  if (!t?.agents)
801
804
  return;
@@ -803,7 +806,7 @@ const j = new K(), L = class L extends Se {
803
806
  if (r)
804
807
  return t.agents.find((s) => s.agentId === r);
805
808
  }));
806
- c(this, "currentOrg", oe(() => {
809
+ c(this, "currentOrg", ae(() => {
807
810
  const t = this.currentAgent.value;
808
811
  if (!t?.orgId)
809
812
  return;
@@ -821,7 +824,7 @@ const j = new K(), L = class L extends Se {
821
824
  c(this, "chat");
822
825
  c(this, "user");
823
826
  j.set(this);
824
- const a = {
827
+ const o = {
825
828
  apiFetch: Ie(
826
829
  { isDev: this.isDev, apiBase: this.apiBase },
827
830
  this.processApiResponse.bind(this),
@@ -847,7 +850,7 @@ const j = new K(), L = class L extends Se {
847
850
  logger: this.logger,
848
851
  processApiResponse: this.processApiResponse.bind(this)
849
852
  };
850
- this.agent = new G(a), this.auth = new z(a), this.billing = new W(a), this.chat = new q(a), this.user = new M(a), this.logger.info("PageLinesSDK initialized"), this.storage.loadFromStorage(this.authRefs()), this.storage.syncWithGlobalStores(this.authRefs()), this.initialized = new Promise((i) => {
853
+ this.agent = new G(o), this.auth = new q(o), this.billing = new z(o), this.chat = new W(o), this.user = new M(o), this.logger.info("PageLinesSDK initialized"), this.storage.loadFromStorage(this.authRefs()), this.storage.syncWithGlobalStores(this.authRefs()), this.initialized = new Promise((i) => {
851
854
  this.resolveUser = i;
852
855
  }), this.token.value && !this.activeUser.value ? this.auth.getCurrentUser().then((i) => {
853
856
  this.resolveUser && (this.resolveUser(i), this.resolveUser = void 0);
@@ -897,11 +900,11 @@ u(L, "PageLinesSDK");
897
900
  let ce = L;
898
901
  export {
899
902
  G as A,
900
- W as B,
901
- q as C,
903
+ z as B,
904
+ W as C,
902
905
  ce as P,
903
906
  M as U,
904
- z as a,
907
+ q as a,
905
908
  I as r
906
909
  };
907
910
  //# sourceMappingURL=sdkClient.js.map