@opencx/widget 3.0.53 → 3.0.55

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.cjs CHANGED
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./widget.ctx-BxnHMoxD.cjs");exports.PrimitiveState=t.PrimitiveState;exports.WidgetCtx=t.WidgetCtx;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./widget.ctx-CpkDy8NJ.cjs");exports.PrimitiveState=t.PrimitiveState;exports.WidgetCtx=t.WidgetCtx;
2
2
  //# sourceMappingURL=index.cjs.map
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { P as i, W as a } from "./widget.ctx-DXznvVMa.js";
1
+ import { P as i, W as a } from "./widget.ctx-BQOGEEyO.js";
2
2
  export {
3
3
  i as PrimitiveState,
4
4
  a as WidgetCtx
package/dist/react.cjs CHANGED
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./useUploadFiles-DezH_NSW.cjs");function a(t,s,u){const{widgetCtx:{api:i}}=e.useWidget();return e._default(async o=>i.vote({action:o==="up"?"upvote":"downvote",messagePublicId:t,sessionId:s}).then(u),[i,t,s,u])}exports.WidgetProvider=e.WidgetProvider;exports.useConfig=e.useConfig;exports.useContact=e.useContact;exports.useIsAwaitingBotReply=e.useIsAwaitingBotReply;exports.useMessages=e.useMessages;exports.usePreludeData=e.usePreludeData;exports.usePrimitiveState=e.usePrimitiveState;exports.useSessions=e.useSessions;exports.useUploadFiles=e.useUploadFiles;exports.useWidget=e.useWidget;exports.useWidgetRouter=e.useWidgetRouter;exports.useVote=a;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./useUploadFiles-DyW8Xf7c.cjs");function a(t,s,u){const{widgetCtx:{api:i}}=e.useWidget();return e._default(async o=>i.vote({action:o==="up"?"upvote":"downvote",messagePublicId:t,sessionId:s}).then(u),[i,t,s,u])}exports.WidgetProvider=e.WidgetProvider;exports.useConfig=e.useConfig;exports.useContact=e.useContact;exports.useIsAwaitingBotReply=e.useIsAwaitingBotReply;exports.useMessages=e.useMessages;exports.usePreludeData=e.usePreludeData;exports.usePrimitiveState=e.usePrimitiveState;exports.useSessions=e.useSessions;exports.useUploadFiles=e.useUploadFiles;exports.useWidget=e.useWidget;exports.useWidgetRouter=e.useWidgetRouter;exports.useVote=a;
2
2
  //# sourceMappingURL=react.cjs.map
package/dist/react.js CHANGED
@@ -1,5 +1,5 @@
1
- import { u as o, _ as i } from "./useUploadFiles-Ddo3_Bdb.js";
2
- import { W as p, a as f, b as l, c, d as m, e as v, f as P, g as W, i as w, h as x } from "./useUploadFiles-Ddo3_Bdb.js";
1
+ import { u as o, _ as i } from "./useUploadFiles-D3SnciIE.js";
2
+ import { W as p, a as f, b as l, c, d as m, e as v, f as P, g as W, i as w, h as x } from "./useUploadFiles-D3SnciIE.js";
3
3
  function n(e, s, t) {
4
4
  const {
5
5
  widgetCtx: { api: a }
@@ -80,7 +80,10 @@ export declare const TestUtils: {
80
80
  };
81
81
  body: {
82
82
  email?: string;
83
- name?: string;
83
+ non_verified_name?: string;
84
+ non_verified_custom_data?: {
85
+ [key: string]: string;
86
+ };
84
87
  };
85
88
  }, `${string}/${string}`>> | undefined): void;
86
89
  getSessions(target: typeof ApiCaller, returnValue: Partial<import('openapi-fetch').FetchResponse<{
@@ -163,15 +166,6 @@ export declare const TestUtils: {
163
166
  query_params?: {
164
167
  [key: string]: string;
165
168
  } | null;
166
- user?: {
167
- email?: string;
168
- name?: string;
169
- phone?: string;
170
- avatar?: string;
171
- customData?: {
172
- [key: string]: string;
173
- };
174
- } | null;
175
169
  language?: string | null;
176
170
  attachments?: {
177
171
  id: string;
@@ -123,15 +123,6 @@ export declare class ApiCaller {
123
123
  query_params?: {
124
124
  [key: string]: string;
125
125
  } | null;
126
- user?: {
127
- email?: string;
128
- name?: string;
129
- phone?: string;
130
- avatar?: string;
131
- customData?: {
132
- [key: string]: string;
133
- };
134
- } | null;
135
126
  language?: string | null;
136
127
  attachments?: {
137
128
  id: string;
@@ -186,7 +177,10 @@ export declare class ApiCaller {
186
177
  };
187
178
  body: {
188
179
  email?: string;
189
- name?: string;
180
+ non_verified_name?: string;
181
+ non_verified_custom_data?: {
182
+ [key: string]: string;
183
+ };
190
184
  };
191
185
  }, `${string}/${string}`>>;
192
186
  createSession: (body: Dto["CreateWidgetSessionDto"]) => Promise<import('openapi-fetch').FetchResponse<{
@@ -35,22 +35,6 @@ export interface paths {
35
35
  patch?: never;
36
36
  trace?: never;
37
37
  };
38
- "/backend/widget/v2/session/{sessionId}": {
39
- parameters: {
40
- query?: never;
41
- header?: never;
42
- path?: never;
43
- cookie?: never;
44
- };
45
- get: operations["getSession"];
46
- put?: never;
47
- post?: never;
48
- delete?: never;
49
- options?: never;
50
- head?: never;
51
- patch?: never;
52
- trace?: never;
53
- };
54
38
  "/backend/widget/v2/sessions": {
55
39
  parameters: {
56
40
  query?: never;
@@ -185,7 +169,10 @@ export interface components {
185
169
  schemas: {
186
170
  CreateUnverifiedContactDto: {
187
171
  email?: string;
188
- name?: string;
172
+ non_verified_name?: string;
173
+ non_verified_custom_data?: {
174
+ [key: string]: string;
175
+ };
189
176
  };
190
177
  CreateWidgetSessionDto: {
191
178
  customData?: {
@@ -265,15 +252,6 @@ export interface components {
265
252
  query_params?: {
266
253
  [key: string]: string;
267
254
  } | null;
268
- user?: {
269
- email?: string;
270
- name?: string;
271
- phone?: string;
272
- avatar?: string;
273
- customData?: {
274
- [key: string]: string;
275
- };
276
- } | null;
277
255
  language?: string | null;
278
256
  attachments?: {
279
257
  id: string;
@@ -518,36 +496,6 @@ export interface operations {
518
496
  };
519
497
  };
520
498
  };
521
- getSession: {
522
- parameters: {
523
- query?: never;
524
- header?: never;
525
- path: {
526
- sessionId: string;
527
- };
528
- cookie?: never;
529
- };
530
- requestBody?: never;
531
- responses: {
532
- 200: {
533
- headers: {
534
- [name: string]: unknown;
535
- };
536
- content: {
537
- "application/json": components["schemas"]["WidgetSessionDto"];
538
- };
539
- };
540
- /** @description Internal Server Error */
541
- 500: {
542
- headers: {
543
- [name: string]: unknown;
544
- };
545
- content: {
546
- "application/json": components["schemas"]["ErrorDto"];
547
- };
548
- };
549
- };
550
- };
551
499
  getSessions: {
552
500
  parameters: {
553
501
  query: {
@@ -7,9 +7,8 @@ type UserBaseConfig = {
7
7
  data?: {
8
8
  name?: string;
9
9
  email?: string;
10
- phone?: string;
11
- customData?: Record<string, string>;
12
10
  avatarUrl?: string;
11
+ customData?: Record<string, string>;
13
12
  };
14
13
  };
15
14
  export type UserConfig = UserBaseConfig & {
@@ -1,6 +1,6 @@
1
1
  import z, { createContext as rt, useContext as ot, useRef as H, useState as st, useMemo as Ve, useEffect as Fe, useSyncExternalStore as Kt, useLayoutEffect as zt, useCallback as Ee, useDebugValue as Yt } from "react";
2
2
  import { jsx as kt } from "react/jsx-runtime";
3
- import { W as Jt } from "./widget.ctx-DXznvVMa.js";
3
+ import { W as Jt } from "./widget.ctx-BQOGEEyO.js";
4
4
  import { v4 as Xt } from "uuid";
5
5
  class Qt {
6
6
  constructor(t) {
@@ -36,7 +36,7 @@ function Zt(e) {
36
36
  return r;
37
37
  }, t.Provider];
38
38
  }
39
- const en = "3.0.53", [Y, tn] = Zt();
39
+ const en = "3.0.55", [Y, tn] = Zt();
40
40
  function Xn({
41
41
  options: e,
42
42
  children: t,
@@ -1333,4 +1333,4 @@ export {
1333
1333
  Dt as n,
1334
1334
  Y as u
1335
1335
  };
1336
- //# sourceMappingURL=useUploadFiles-Ddo3_Bdb.js.map
1336
+ //# sourceMappingURL=useUploadFiles-D3SnciIE.js.map