@cossistant/core 0.0.25 → 0.0.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/_virtual/rolldown_runtime.js +1 -10
- package/client.d.ts +37 -5
- package/client.d.ts.map +1 -1
- package/client.js +19 -1
- package/client.js.map +1 -1
- package/contact.d.ts +19 -22
- package/contact.d.ts.map +1 -1
- package/conversation.d.ts +314 -315
- package/conversation.d.ts.map +1 -1
- package/index.d.ts +6 -4
- package/index.js +3 -1
- package/package.json +4 -2
- package/realtime-events.d.ts +359 -322
- package/realtime-events.d.ts.map +1 -1
- package/rest-client.d.ts +32 -1
- package/rest-client.d.ts.map +1 -1
- package/rest-client.js +75 -0
- package/rest-client.js.map +1 -1
- package/schemas.d.ts +101 -670
- package/schemas.d.ts.map +1 -1
- package/store/conversations-store.d.ts +6 -6
- package/store/conversations-store.d.ts.map +1 -1
- package/store/conversations-store.js +2 -1
- package/store/conversations-store.js.map +1 -1
- package/store/create-store.d.ts.map +1 -1
- package/store/seen-store.d.ts +1 -1
- package/store/timeline-items-store.js +1 -1
- package/store/typing-store.d.ts.map +1 -1
- package/store/typing-store.js +6 -6
- package/store/typing-store.js.map +1 -1
- package/timeline-item.d.ts +189 -193
- package/timeline-item.d.ts.map +1 -1
- package/types/src/api/timeline-item.js +120 -0
- package/types/src/api/timeline-item.js.map +1 -0
- package/types/src/enums.js.map +1 -0
- package/typing-reporter.d.ts +71 -0
- package/typing-reporter.d.ts.map +1 -0
- package/typing-reporter.js +145 -0
- package/typing-reporter.js.map +1 -0
- package/upload-constants.d.ts +40 -0
- package/upload-constants.d.ts.map +1 -0
- package/upload-constants.js +70 -0
- package/upload-constants.js.map +1 -0
- package/upload.d.ts +47 -0
- package/upload.d.ts.map +1 -0
- package/api.d.ts +0 -71
- package/api.d.ts.map +0 -1
- package/checks.d.ts +0 -189
- package/checks.d.ts.map +0 -1
- package/coerce.d.ts +0 -9
- package/coerce.d.ts.map +0 -1
- package/core.d.ts +0 -35
- package/core.d.ts.map +0 -1
- package/errors.d.ts +0 -121
- package/errors.d.ts.map +0 -1
- package/errors2.d.ts +0 -24
- package/errors2.d.ts.map +0 -1
- package/index2.d.ts +0 -4
- package/index3.d.ts +0 -1
- package/metadata.d.ts +0 -1
- package/openapi-generator.d.ts +0 -1
- package/openapi-generator2.d.ts +0 -1
- package/openapi-generator3.d.ts +0 -1
- package/openapi30.d.ts +0 -125
- package/openapi30.d.ts.map +0 -1
- package/openapi31.d.ts +0 -131
- package/openapi31.d.ts.map +0 -1
- package/packages/types/src/api/timeline-item.js +0 -122
- package/packages/types/src/api/timeline-item.js.map +0 -1
- package/packages/types/src/enums.js.map +0 -1
- package/parse.d.ts +0 -17
- package/parse.d.ts.map +0 -1
- package/registries.d.ts +0 -32
- package/registries.d.ts.map +0 -1
- package/schemas2.d.ts +0 -320
- package/schemas2.d.ts.map +0 -1
- package/schemas3.d.ts +0 -105
- package/schemas3.d.ts.map +0 -1
- package/specification-extension.d.ts +0 -9
- package/specification-extension.d.ts.map +0 -1
- package/standard-schema.d.ts +0 -59
- package/standard-schema.d.ts.map +0 -1
- package/util.d.ts +0 -41
- package/util.d.ts.map +0 -1
- package/versions.d.ts +0 -9
- package/versions.d.ts.map +0 -1
- package/zod-extensions.d.ts +0 -39
- package/zod-extensions.d.ts.map +0 -1
- /package/{packages/types → types}/src/enums.js +0 -0
package/conversation.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"conversation.d.ts","names":[],"sources":["../../types/src/api/conversation.ts"],"sourcesContent":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"conversation.d.ts","names":[],"sources":["../../types/src/api/conversation.ts"],"sourcesContent":[],"mappings":";;;cAIa,iCAA+B,CAAA,CAAA;;EAA/B,cAAA,eAAA,YAoBV,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAES,6BA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;;;;;;;;;;;;;;;;;;;KAQD,uBAAA,GAA0B,CAAA,CAAE,aAChC;cAGK,mCAAiC,CAAA,CAAA;;;KAYlC,+BAAA,GAAkC,CAAA,CAAE,aACxC;cAGK,oCAAkC,CAAA,CAAA;;;;KAcnC,gCAAA,GAAmC,CAAA,CAAE,aACzC;cA0BK,qCAAmC,CAAA,CAAA;;;;;;KAoBpC,iCAAA,GAAoC,CAAA,CAAE,aAC1C;cAGK,uCAAqC,CAAA,CAAA;;;;;;IA7FR,SAAA,eAAA,YAAA,CAAA;IAAA,UAAA,aAAA;IAQ9B,SAAA,aAAuB;IAItB,SAAA,aAAA;;;;AAAiC,KAwHlC,+BAAA,GAAkC,CAAA,CAAE,KAxHF,CAAA,OAyHtC,qCAzHsC,CAAA"}
|
package/index.d.ts
CHANGED
|
@@ -1,16 +1,18 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { CossistantAPIError } from "./types.js";
|
|
2
|
+
import { CossistantRestClient } from "./rest-client.js";
|
|
3
|
+
import { ConversationPagination, ConversationWithSeen, ConversationsState, ConversationsStore, createConversationsStore, getConversationById, getConversationPagination, getConversations } from "./store/conversations-store.js";
|
|
2
4
|
import { ConversationTimelineItemsState, TimelineItemsState, TimelineItemsStore, createTimelineItemsStore, getConversationTimelineItems } from "./store/timeline-items-store.js";
|
|
3
5
|
import { WebsiteError, WebsiteState, WebsiteStatus, WebsiteStore, createWebsiteStore, getWebsiteState } from "./store/website-store.js";
|
|
4
|
-
import { CossistantAPIError } from "./types.js";
|
|
5
6
|
import { CossistantClient } from "./client.js";
|
|
6
7
|
import { normalizeLocale } from "./locale-utils.js";
|
|
7
|
-
import { CossistantRestClient } from "./rest-client.js";
|
|
8
8
|
import { ConversationSeenState, SeenActorType, SeenEntry, SeenState, SeenStore, applyConversationSeenEvent, createSeenStore, hydrateConversationSeen, upsertConversationSeen } from "./store/seen-store.js";
|
|
9
9
|
import { DefaultRoutes, NavigationState, RouteRegistry, SUPPORT_PAGES, SupportConfig, SupportNavigation, SupportPage, SupportStore, SupportStoreActions, SupportStoreOptions, SupportStoreState, SupportStoreStorage, createSupportStore } from "./store/support-store.js";
|
|
10
10
|
import { ConversationTypingState, TypingActorType, TypingEntry, TypingState, TypingStore, TypingStoreDependencies, applyConversationTypingEvent, clearTypingFromTimelineItem, clearTypingState, createTypingStore, getConversationTyping, setTypingState } from "./store/typing-store.js";
|
|
11
|
+
import { TYPING_KEEP_ALIVE_MS, TYPING_PREVIEW_MAX_LENGTH, TYPING_SEND_INTERVAL_MS, TYPING_STOP_DELAY_MS, TypingReporter, TypingReporterConfig, createTypingReporter } from "./typing-reporter.js";
|
|
12
|
+
import { ALLOWED_FILE_TYPES_DESCRIPTION, ALLOWED_MIME_TYPES, FILE_INPUT_ACCEPT, MAX_FILES_PER_MESSAGE, MAX_FILE_SIZE, formatFileSize, isAllowedMimeType, isImageMimeType, validateFile, validateFiles } from "./upload-constants.js";
|
|
11
13
|
import { generateConversationId, generateMessageId } from "./utils.js";
|
|
12
14
|
import { VisitorData, collectVisitorData } from "./visitor-data.js";
|
|
13
15
|
import { generateVisitorName, getVisitorNameWithFallback } from "./visitor-name.js";
|
|
14
16
|
import { clearAllVisitorIds, clearVisitorId, getVisitorId, setVisitorId } from "./visitor-tracker.js";
|
|
15
17
|
import { CossistantConfig, CossistantError } from "@cossistant/types";
|
|
16
|
-
export { type ConversationPagination, type ConversationSeenState, type ConversationTimelineItemsState, type ConversationTypingState, type ConversationsState, type ConversationsStore, CossistantAPIError, CossistantClient, type CossistantConfig, type CossistantError, CossistantRestClient, type DefaultRoutes, type NavigationState, type RouteRegistry, type SUPPORT_PAGES, type SeenActorType, type SeenEntry, type SeenState, type SeenStore, type SupportConfig, type SupportNavigation, type SupportPage, type SupportStore, type SupportStoreActions, type SupportStoreOptions, type SupportStoreState, type SupportStoreStorage, type TimelineItemsState, type TimelineItemsStore, type TypingActorType, type TypingEntry, type TypingState, type TypingStore, type TypingStoreDependencies, type VisitorData, type WebsiteError, type WebsiteState, type WebsiteStatus, type WebsiteStore, applyConversationSeenEvent, applyConversationTypingEvent, clearAllVisitorIds, clearTypingFromTimelineItem, clearTypingState, clearVisitorId, collectVisitorData, createConversationsStore, createSeenStore, createSupportStore, createTimelineItemsStore, createTypingStore, createWebsiteStore, CossistantClient as default, generateConversationId, generateMessageId, generateVisitorName, getConversationById, getConversationPagination, getConversationTimelineItems, getConversationTyping, getConversations, getVisitorId, getVisitorNameWithFallback, getWebsiteState, hydrateConversationSeen, normalizeLocale, setTypingState, setVisitorId, upsertConversationSeen };
|
|
18
|
+
export { ALLOWED_FILE_TYPES_DESCRIPTION, ALLOWED_MIME_TYPES, type ConversationPagination, type ConversationSeenState, type ConversationTimelineItemsState, type ConversationTypingState, type ConversationWithSeen, type ConversationsState, type ConversationsStore, CossistantAPIError, CossistantClient, type CossistantConfig, type CossistantError, CossistantRestClient, type DefaultRoutes, FILE_INPUT_ACCEPT, MAX_FILES_PER_MESSAGE, MAX_FILE_SIZE, type NavigationState, type RouteRegistry, type SUPPORT_PAGES, type SeenActorType, type SeenEntry, type SeenState, type SeenStore, type SupportConfig, type SupportNavigation, type SupportPage, type SupportStore, type SupportStoreActions, type SupportStoreOptions, type SupportStoreState, type SupportStoreStorage, TYPING_KEEP_ALIVE_MS, TYPING_PREVIEW_MAX_LENGTH, TYPING_SEND_INTERVAL_MS, TYPING_STOP_DELAY_MS, type TimelineItemsState, type TimelineItemsStore, type TypingActorType, type TypingEntry, type TypingReporter, type TypingReporterConfig, type TypingState, type TypingStore, type TypingStoreDependencies, type VisitorData, type WebsiteError, type WebsiteState, type WebsiteStatus, type WebsiteStore, applyConversationSeenEvent, applyConversationTypingEvent, clearAllVisitorIds, clearTypingFromTimelineItem, clearTypingState, clearVisitorId, collectVisitorData, createConversationsStore, createSeenStore, createSupportStore, createTimelineItemsStore, createTypingReporter, createTypingStore, createWebsiteStore, CossistantClient as default, formatFileSize, generateConversationId, generateMessageId, generateVisitorName, getConversationById, getConversationPagination, getConversationTimelineItems, getConversationTyping, getConversations, getVisitorId, getVisitorNameWithFallback, getWebsiteState, hydrateConversationSeen, isAllowedMimeType, isImageMimeType, normalizeLocale, setTypingState, setVisitorId, upsertConversationSeen, validateFile, validateFiles };
|
package/index.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { CossistantAPIError } from "./types.js";
|
|
2
|
+
import { ALLOWED_FILE_TYPES_DESCRIPTION, ALLOWED_MIME_TYPES, FILE_INPUT_ACCEPT, MAX_FILES_PER_MESSAGE, MAX_FILE_SIZE, formatFileSize, isAllowedMimeType, isImageMimeType, validateFile, validateFiles } from "./upload-constants.js";
|
|
2
3
|
import { generateConversationId, generateMessageId } from "./utils.js";
|
|
3
4
|
import { collectVisitorData } from "./visitor-data.js";
|
|
4
5
|
import { clearAllVisitorIds, clearVisitorId, getVisitorId, setVisitorId } from "./visitor-tracker.js";
|
|
@@ -11,6 +12,7 @@ import { normalizeLocale } from "./locale-utils.js";
|
|
|
11
12
|
import { applyConversationSeenEvent, createSeenStore, hydrateConversationSeen, upsertConversationSeen } from "./store/seen-store.js";
|
|
12
13
|
import { createSupportStore } from "./store/support-store.js";
|
|
13
14
|
import { applyConversationTypingEvent, clearTypingFromTimelineItem, clearTypingState, createTypingStore, getConversationTyping, setTypingState } from "./store/typing-store.js";
|
|
15
|
+
import { TYPING_KEEP_ALIVE_MS, TYPING_PREVIEW_MAX_LENGTH, TYPING_SEND_INTERVAL_MS, TYPING_STOP_DELAY_MS, createTypingReporter } from "./typing-reporter.js";
|
|
14
16
|
import { generateVisitorName, getVisitorNameWithFallback } from "./visitor-name.js";
|
|
15
17
|
|
|
16
|
-
export { CossistantAPIError, CossistantClient, CossistantRestClient, applyConversationSeenEvent, applyConversationTypingEvent, clearAllVisitorIds, clearTypingFromTimelineItem, clearTypingState, clearVisitorId, collectVisitorData, createConversationsStore, createSeenStore, createSupportStore, createTimelineItemsStore, createTypingStore, createWebsiteStore, CossistantClient as default, generateConversationId, generateMessageId, generateVisitorName, getConversationById, getConversationPagination, getConversationTimelineItems, getConversationTyping, getConversations, getVisitorId, getVisitorNameWithFallback, getWebsiteState, hydrateConversationSeen, normalizeLocale, setTypingState, setVisitorId, upsertConversationSeen };
|
|
18
|
+
export { ALLOWED_FILE_TYPES_DESCRIPTION, ALLOWED_MIME_TYPES, CossistantAPIError, CossistantClient, CossistantRestClient, FILE_INPUT_ACCEPT, MAX_FILES_PER_MESSAGE, MAX_FILE_SIZE, TYPING_KEEP_ALIVE_MS, TYPING_PREVIEW_MAX_LENGTH, TYPING_SEND_INTERVAL_MS, TYPING_STOP_DELAY_MS, applyConversationSeenEvent, applyConversationTypingEvent, clearAllVisitorIds, clearTypingFromTimelineItem, clearTypingState, clearVisitorId, collectVisitorData, createConversationsStore, createSeenStore, createSupportStore, createTimelineItemsStore, createTypingReporter, createTypingStore, createWebsiteStore, CossistantClient as default, formatFileSize, generateConversationId, generateMessageId, generateVisitorName, getConversationById, getConversationPagination, getConversationTimelineItems, getConversationTyping, getConversations, getVisitorId, getVisitorNameWithFallback, getWebsiteState, hydrateConversationSeen, isAllowedMimeType, isImageMimeType, normalizeLocale, setTypingState, setVisitorId, upsertConversationSeen, validateFile, validateFiles };
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cossistant/core",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.28",
|
|
5
5
|
"private": false,
|
|
6
6
|
"author": "Cossistant Team",
|
|
7
7
|
"description": "Core library for connecting to Cossistant API and managing data fetching",
|
|
@@ -28,7 +28,9 @@
|
|
|
28
28
|
"access": "public"
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
|
+
"@hono/zod-openapi": "^1.1.0",
|
|
31
32
|
"nanoid": "^5.1.5",
|
|
32
|
-
"ulid": "^3.0.1"
|
|
33
|
+
"ulid": "^3.0.1",
|
|
34
|
+
"zod": "^4.1.8"
|
|
33
35
|
}
|
|
34
36
|
}
|