@raisindb/client 0.5.8 → 0.5.10
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/README.md +32 -0
- package/dist/{chunk-IFV4ECHC.mjs → chunk-ASOWGNQZ.mjs} +3 -3
- package/dist/{chunk-ZUUSBLVP.mjs → chunk-FYWYSNQG.mjs} +3 -3
- package/dist/{chunk-765DLJMZ.mjs → chunk-NOPZAMIV.mjs} +31 -2
- package/dist/chunk-NOPZAMIV.mjs.map +1 -0
- package/dist/{chunk-AULHRX5C.mjs → chunk-TPZNJNZR.mjs} +2 -2
- package/dist/{chunk-VMUT6PIO.mjs → chunk-ZCRYQCXS.mjs} +2 -2
- package/dist/{conversation-list-store-BaeGM2lx.d.mts → conversation-list-store-CqgIk8Rn.d.mts} +915 -3
- package/dist/{conversation-list-store-BaeGM2lx.d.ts → conversation-list-store-CqgIk8Rn.d.ts} +915 -3
- package/dist/{index-C4pX6FVI.d.mts → index-BD3rutlF.d.mts} +1 -1
- package/dist/{index-DCtNAWZ0.d.ts → index-CDUAMIub.d.ts} +1 -1
- package/dist/index.d.mts +4 -4
- package/dist/index.d.ts +4 -4
- package/dist/index.js +934 -6
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +902 -10
- package/dist/index.mjs.map +1 -1
- package/dist/react.d.mts +2 -2
- package/dist/react.d.ts +2 -2
- package/dist/react.js +30 -1
- package/dist/react.js.map +1 -1
- package/dist/react.mjs +3 -3
- package/dist/{svelte-sql-DN3NpM4c.d.ts → svelte-sql-D9YU1wYS.d.ts} +1 -1
- package/dist/{svelte-sql-BhMxrqn_.d.mts → svelte-sql-l1wmTWM4.d.mts} +1 -1
- package/dist/svelte.d.mts +2 -2
- package/dist/svelte.d.ts +2 -2
- package/dist/svelte.js +30 -1
- package/dist/svelte.js.map +1 -1
- package/dist/svelte.mjs +3 -3
- package/dist/vue.d.mts +2 -2
- package/dist/vue.d.ts +2 -2
- package/dist/vue.js +30 -1
- package/dist/vue.js.map +1 -1
- package/dist/vue.mjs +2 -2
- package/package.json +1 -1
- package/dist/chunk-765DLJMZ.mjs.map +0 -1
- /package/dist/{chunk-IFV4ECHC.mjs.map → chunk-ASOWGNQZ.mjs.map} +0 -0
- /package/dist/{chunk-ZUUSBLVP.mjs.map → chunk-FYWYSNQG.mjs.map} +0 -0
- /package/dist/{chunk-AULHRX5C.mjs.map → chunk-TPZNJNZR.mjs.map} +0 -0
- /package/dist/{chunk-VMUT6PIO.mjs.map → chunk-ZCRYQCXS.mjs.map} +0 -0
package/dist/react.mjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createRaisinReact
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import "./chunk-
|
|
5
|
-
import "./chunk-
|
|
3
|
+
} from "./chunk-ASOWGNQZ.mjs";
|
|
4
|
+
import "./chunk-TPZNJNZR.mjs";
|
|
5
|
+
import "./chunk-NOPZAMIV.mjs";
|
|
6
6
|
export {
|
|
7
7
|
createRaisinReact
|
|
8
8
|
};
|
package/dist/svelte.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { f as ConversationStoreOptions, c as ConversationStore, a as ConversationStoreSnapshot, b as ChatMessage, g as ConversationListStoreOptions, e as ConversationListStore, h as ConversationListSnapshot, d as ConversationListItem, R as RaisinClient, I as IdentityUser, C as ConnectionState, D as Database, S as SubscriptionFilters, E as EventMessage, A as AuthManager, F as FlowClientOptions, i as FlowsApi, j as FlowExecutionEvent } from './conversation-list-store-
|
|
2
|
-
export { b as SqlAdapter, S as SqlAdapterOptions, a as SqlSnapshot, c as createSqlAdapter } from './svelte-sql-
|
|
1
|
+
import { f as ConversationStoreOptions, c as ConversationStore, a as ConversationStoreSnapshot, b as ChatMessage, g as ConversationListStoreOptions, e as ConversationListStore, h as ConversationListSnapshot, d as ConversationListItem, R as RaisinClient, I as IdentityUser, C as ConnectionState, D as Database, S as SubscriptionFilters, E as EventMessage, A as AuthManager, F as FlowClientOptions, i as FlowsApi, j as FlowExecutionEvent } from './conversation-list-store-CqgIk8Rn.mjs';
|
|
2
|
+
export { b as SqlAdapter, S as SqlAdapterOptions, a as SqlSnapshot, c as createSqlAdapter } from './svelte-sql-l1wmTWM4.mjs';
|
|
3
3
|
import 'events';
|
|
4
4
|
import 'fs/promises';
|
|
5
5
|
|
package/dist/svelte.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { f as ConversationStoreOptions, c as ConversationStore, a as ConversationStoreSnapshot, b as ChatMessage, g as ConversationListStoreOptions, e as ConversationListStore, h as ConversationListSnapshot, d as ConversationListItem, R as RaisinClient, I as IdentityUser, C as ConnectionState, D as Database, S as SubscriptionFilters, E as EventMessage, A as AuthManager, F as FlowClientOptions, i as FlowsApi, j as FlowExecutionEvent } from './conversation-list-store-
|
|
2
|
-
export { b as SqlAdapter, S as SqlAdapterOptions, a as SqlSnapshot, c as createSqlAdapter } from './svelte-sql-
|
|
1
|
+
import { f as ConversationStoreOptions, c as ConversationStore, a as ConversationStoreSnapshot, b as ChatMessage, g as ConversationListStoreOptions, e as ConversationListStore, h as ConversationListSnapshot, d as ConversationListItem, R as RaisinClient, I as IdentityUser, C as ConnectionState, D as Database, S as SubscriptionFilters, E as EventMessage, A as AuthManager, F as FlowClientOptions, i as FlowsApi, j as FlowExecutionEvent } from './conversation-list-store-CqgIk8Rn.js';
|
|
2
|
+
export { b as SqlAdapter, S as SqlAdapterOptions, a as SqlSnapshot, c as createSqlAdapter } from './svelte-sql-D9YU1wYS.js';
|
|
3
3
|
import 'events';
|
|
4
4
|
import 'fs/promises';
|
|
5
5
|
|
package/dist/svelte.js
CHANGED
|
@@ -1590,6 +1590,34 @@ var ConversationStore = class {
|
|
|
1590
1590
|
this._watchdogIntervalMs = options.watchdogIntervalMs ?? 3e4;
|
|
1591
1591
|
if (this._conversationPath) {
|
|
1592
1592
|
this.ensureSubscription();
|
|
1593
|
+
} else if (this.createOptions?.anonymous) {
|
|
1594
|
+
void this.resumeAnonymous();
|
|
1595
|
+
}
|
|
1596
|
+
}
|
|
1597
|
+
anonymousOptions() {
|
|
1598
|
+
const a = this.createOptions?.anonymous;
|
|
1599
|
+
if (!a) return null;
|
|
1600
|
+
return a === true ? {} : a;
|
|
1601
|
+
}
|
|
1602
|
+
/**
|
|
1603
|
+
* Resume the visitor conversation this tab already has (the session secret
|
|
1604
|
+
* and conversation id live in sessionStorage), and load its history. A tab
|
|
1605
|
+
* without one starts nothing until the first message.
|
|
1606
|
+
*/
|
|
1607
|
+
async resumeAnonymous() {
|
|
1608
|
+
const opts = this.anonymousOptions();
|
|
1609
|
+
if (!opts || !this.createOptions || this._conversationPath) return;
|
|
1610
|
+
const agent = this.createOptions.participant;
|
|
1611
|
+
try {
|
|
1612
|
+
if (!this.manager.hasStoredAnonymous(agent, opts)) return;
|
|
1613
|
+
const convo = await this.manager.startAnonymous(agent, opts);
|
|
1614
|
+
if (this._conversationPath) return;
|
|
1615
|
+
this._conversationPath = convo.conversationPath;
|
|
1616
|
+
this._conversationType = convo.type;
|
|
1617
|
+
this.ensureSubscription();
|
|
1618
|
+
await this.loadMessages();
|
|
1619
|
+
} catch (err) {
|
|
1620
|
+
logger.debug("[ConversationStore] No visitor conversation to resume", err);
|
|
1593
1621
|
}
|
|
1594
1622
|
}
|
|
1595
1623
|
// ==========================================================================
|
|
@@ -1644,7 +1672,8 @@ var ConversationStore = class {
|
|
|
1644
1672
|
throw new Error("No conversationPath and no createOptions provided");
|
|
1645
1673
|
}
|
|
1646
1674
|
try {
|
|
1647
|
-
const
|
|
1675
|
+
const anonymous = this.anonymousOptions();
|
|
1676
|
+
const convo = anonymous ? await this.manager.startAnonymous(this.createOptions.participant, anonymous) : await this.manager.create({
|
|
1648
1677
|
participant: this.createOptions.participant,
|
|
1649
1678
|
input: this.createOptions.input
|
|
1650
1679
|
});
|