@chrryai/chrry 1.2.27 → 1.2.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.d.mts CHANGED
@@ -175,14 +175,34 @@ type session = {
175
175
  guest?: sessionGuest;
176
176
  user?: sessionUser;
177
177
  };
178
+ type messages = {
179
+ message: message & {
180
+ isStreaming?: boolean;
181
+ isStreamingStop?: boolean;
182
+ };
183
+ user?: user;
184
+ guest?: guest;
185
+ aiAgent?: aiAgent;
186
+ thread?: thread;
187
+ }[];
188
+ type paginatedMessages = {
189
+ messages: messages;
190
+ nextPage?: number;
191
+ totalCount?: number;
192
+ };
178
193
  type thread = {
194
+ characterProfile?: characterProfile;
195
+ placeHolder?: placeHolder;
179
196
  collaborations?: {
180
197
  thread?: thread;
181
198
  collaboration: collaboration;
182
199
  user: user;
183
200
  }[] | null;
184
201
  isMainThread: boolean;
202
+ user?: user;
203
+ guest?: guest;
185
204
  appId: string | null;
205
+ app?: appWithStore;
186
206
  id: string;
187
207
  userId: string | null;
188
208
  guestId: string | null;
@@ -582,6 +602,8 @@ type instruction = {
582
602
  updatedOn: Date;
583
603
  };
584
604
 
605
+ type locale = "en" | "de" | "es" | "fr" | "ja" | "ko" | "pt" | "zh" | "nl" | "tr";
606
+
585
607
  /**
586
608
  * Hook to get device info with server-side and client-side detection merged
587
609
  *
@@ -892,7 +914,10 @@ declare const getThread: ({ pageSize, id, token, liked, onError, API_URL, }: {
892
914
  liked?: boolean;
893
915
  onError?: (status: number) => void;
894
916
  API_URL?: string;
895
- }) => Promise<any>;
917
+ }) => Promise<{
918
+ thread: thread;
919
+ messages: paginatedMessages;
920
+ } | undefined>;
896
921
  declare const getUser: ({ token, API_URL, }: {
897
922
  token: string;
898
923
  API_URL?: string;
@@ -1103,7 +1128,10 @@ declare const getActions: ({ API_URL, token, }: {
1103
1128
  id: string;
1104
1129
  liked?: boolean;
1105
1130
  onError?: (status: number) => void;
1106
- }) => Promise<any>;
1131
+ }) => Promise<{
1132
+ thread: thread;
1133
+ messages: paginatedMessages;
1134
+ } | undefined>;
1107
1135
  updateThread: (params: {
1108
1136
  id: string;
1109
1137
  star?: number | null;
@@ -1256,7 +1284,7 @@ declare const getHourlyLimit: ({ member, guest, app, }: {
1256
1284
  declare function generateAppMetadata({ app, store, locale, currentDomain, }: {
1257
1285
  app: appWithStore;
1258
1286
  store: storeWithApps;
1259
- locale?: string;
1287
+ locale?: locale | string;
1260
1288
  currentDomain: string;
1261
1289
  }): Metadata;
1262
1290
 
@@ -1271,6 +1299,8 @@ declare const PLUS_PRICE = 9.99;
1271
1299
  declare const PRO_PRICE = 19.99;
1272
1300
  declare const CREDITS_PRICE = 5;
1273
1301
  declare const ADDITIONAL_CREDITS = 600;
1302
+ declare function isValidUuidV4(uuid: string): boolean;
1303
+ declare function getThreadId(pathname?: string): string | undefined;
1274
1304
  declare const isDevelopment: boolean;
1275
1305
  declare const MAX_TOOL_CALLS_PER_MESSAGE = 7;
1276
1306
  declare const WS_URL: string;
@@ -1371,7 +1401,7 @@ declare const isFirefox: boolean;
1371
1401
  declare function getFlag({ code }: {
1372
1402
  code?: string;
1373
1403
  }): string;
1374
- declare const VERSION = "1.2.27";
1404
+ declare const VERSION = "1.2.28";
1375
1405
  type instructionBase = {
1376
1406
  id: string;
1377
1407
  title: string;
@@ -1512,4 +1542,4 @@ interface HistoryRouterProviderProps {
1512
1542
  */
1513
1543
  declare function HistoryRouterProvider({ children, }: HistoryRouterProviderProps): React.JSX.Element;
1514
1544
 
1515
- export { ADDITIONAL_CREDITS, API_URL, type ApiActions, BrowserInstance, CHRRY_URL, CREDITS_PRICE, type CalendarEventFormData, Chrry, FREE_DAYS, FRONTEND_URL, HistoryRouterProvider, MAX_FILE_SIZES, MAX_TOOL_CALLS_PER_MESSAGE, OWNER_CREDITS, PDF_LIMITS, PLUS_PRICE, PROD_FRONTEND_URL, PROMPT_LIMITS, PRO_PRICE, Sidebar, Store, VERSION, WS_URL, addParam, apiFetch, budgetCategory, capitalizeFirstLetter, checkIsExtension, checkThreadSummaryLimit, createApp, createCalendarEvent, deleteApp, deleteCalendarEvent, deleteMemories, deleteMessage, deleteSubscription, exampleInstructions, expenseCategory, type expenseCategoryType, exportToGoogleCalendar, extensionSuggestions, generateAppMetadata, getActions, getApps, getBrowserAPI, getBrowserIdentity, getCalendarEvents, getDailyImageLimit, getExampleInstructions, getExtensionUrl, getFlag, getGuest, getHourlyLimit, getImageSrc, getInstructionConfig, getLastMessage, getMetadata, getRedirectURL, getSession, getSlugFromPathname, getThread, getThreads, getUser, getUsers, getWeatherCacheTime, type instructionBase, isCI, isCollaborator, isDeepEqual, isDevelopment, isE2E, isFirefox, isOwner, isValidUsername, pageSizes, removeParam, removeUser, reorderApps, storage, syncGoogleCalendar, updateApp, updateCalendarEvent, updateCollaboration, updateGuest, updateMessage, updateThread, updateUser, uploadUserImage, useCountdown, useDeviceInfo, useHasHydrated, useLocalStorage, usePWAInstall };
1545
+ export { ADDITIONAL_CREDITS, API_URL, type ApiActions, BrowserInstance, CHRRY_URL, CREDITS_PRICE, type CalendarEventFormData, Chrry, FREE_DAYS, FRONTEND_URL, HistoryRouterProvider, MAX_FILE_SIZES, MAX_TOOL_CALLS_PER_MESSAGE, OWNER_CREDITS, PDF_LIMITS, PLUS_PRICE, PROD_FRONTEND_URL, PROMPT_LIMITS, PRO_PRICE, Sidebar, Store, VERSION, WS_URL, addParam, apiFetch, budgetCategory, capitalizeFirstLetter, checkIsExtension, checkThreadSummaryLimit, createApp, createCalendarEvent, deleteApp, deleteCalendarEvent, deleteMemories, deleteMessage, deleteSubscription, exampleInstructions, expenseCategory, type expenseCategoryType, exportToGoogleCalendar, extensionSuggestions, generateAppMetadata, getActions, getApps, getBrowserAPI, getBrowserIdentity, getCalendarEvents, getDailyImageLimit, getExampleInstructions, getExtensionUrl, getFlag, getGuest, getHourlyLimit, getImageSrc, getInstructionConfig, getLastMessage, getMetadata, getRedirectURL, getSession, getSlugFromPathname, getThread, getThreadId, getThreads, getUser, getUsers, getWeatherCacheTime, type instructionBase, isCI, isCollaborator, isDeepEqual, isDevelopment, isE2E, isFirefox, isOwner, isValidUsername, isValidUuidV4, pageSizes, removeParam, removeUser, reorderApps, storage, syncGoogleCalendar, updateApp, updateCalendarEvent, updateCollaboration, updateGuest, updateMessage, updateThread, updateUser, uploadUserImage, useCountdown, useDeviceInfo, useHasHydrated, useLocalStorage, usePWAInstall };
package/dist/index.d.ts CHANGED
@@ -175,14 +175,34 @@ type session = {
175
175
  guest?: sessionGuest;
176
176
  user?: sessionUser;
177
177
  };
178
+ type messages = {
179
+ message: message & {
180
+ isStreaming?: boolean;
181
+ isStreamingStop?: boolean;
182
+ };
183
+ user?: user;
184
+ guest?: guest;
185
+ aiAgent?: aiAgent;
186
+ thread?: thread;
187
+ }[];
188
+ type paginatedMessages = {
189
+ messages: messages;
190
+ nextPage?: number;
191
+ totalCount?: number;
192
+ };
178
193
  type thread = {
194
+ characterProfile?: characterProfile;
195
+ placeHolder?: placeHolder;
179
196
  collaborations?: {
180
197
  thread?: thread;
181
198
  collaboration: collaboration;
182
199
  user: user;
183
200
  }[] | null;
184
201
  isMainThread: boolean;
202
+ user?: user;
203
+ guest?: guest;
185
204
  appId: string | null;
205
+ app?: appWithStore;
186
206
  id: string;
187
207
  userId: string | null;
188
208
  guestId: string | null;
@@ -582,6 +602,8 @@ type instruction = {
582
602
  updatedOn: Date;
583
603
  };
584
604
 
605
+ type locale = "en" | "de" | "es" | "fr" | "ja" | "ko" | "pt" | "zh" | "nl" | "tr";
606
+
585
607
  /**
586
608
  * Hook to get device info with server-side and client-side detection merged
587
609
  *
@@ -892,7 +914,10 @@ declare const getThread: ({ pageSize, id, token, liked, onError, API_URL, }: {
892
914
  liked?: boolean;
893
915
  onError?: (status: number) => void;
894
916
  API_URL?: string;
895
- }) => Promise<any>;
917
+ }) => Promise<{
918
+ thread: thread;
919
+ messages: paginatedMessages;
920
+ } | undefined>;
896
921
  declare const getUser: ({ token, API_URL, }: {
897
922
  token: string;
898
923
  API_URL?: string;
@@ -1103,7 +1128,10 @@ declare const getActions: ({ API_URL, token, }: {
1103
1128
  id: string;
1104
1129
  liked?: boolean;
1105
1130
  onError?: (status: number) => void;
1106
- }) => Promise<any>;
1131
+ }) => Promise<{
1132
+ thread: thread;
1133
+ messages: paginatedMessages;
1134
+ } | undefined>;
1107
1135
  updateThread: (params: {
1108
1136
  id: string;
1109
1137
  star?: number | null;
@@ -1256,7 +1284,7 @@ declare const getHourlyLimit: ({ member, guest, app, }: {
1256
1284
  declare function generateAppMetadata({ app, store, locale, currentDomain, }: {
1257
1285
  app: appWithStore;
1258
1286
  store: storeWithApps;
1259
- locale?: string;
1287
+ locale?: locale | string;
1260
1288
  currentDomain: string;
1261
1289
  }): Metadata;
1262
1290
 
@@ -1271,6 +1299,8 @@ declare const PLUS_PRICE = 9.99;
1271
1299
  declare const PRO_PRICE = 19.99;
1272
1300
  declare const CREDITS_PRICE = 5;
1273
1301
  declare const ADDITIONAL_CREDITS = 600;
1302
+ declare function isValidUuidV4(uuid: string): boolean;
1303
+ declare function getThreadId(pathname?: string): string | undefined;
1274
1304
  declare const isDevelopment: boolean;
1275
1305
  declare const MAX_TOOL_CALLS_PER_MESSAGE = 7;
1276
1306
  declare const WS_URL: string;
@@ -1371,7 +1401,7 @@ declare const isFirefox: boolean;
1371
1401
  declare function getFlag({ code }: {
1372
1402
  code?: string;
1373
1403
  }): string;
1374
- declare const VERSION = "1.2.27";
1404
+ declare const VERSION = "1.2.28";
1375
1405
  type instructionBase = {
1376
1406
  id: string;
1377
1407
  title: string;
@@ -1512,4 +1542,4 @@ interface HistoryRouterProviderProps {
1512
1542
  */
1513
1543
  declare function HistoryRouterProvider({ children, }: HistoryRouterProviderProps): React.JSX.Element;
1514
1544
 
1515
- export { ADDITIONAL_CREDITS, API_URL, type ApiActions, BrowserInstance, CHRRY_URL, CREDITS_PRICE, type CalendarEventFormData, Chrry, FREE_DAYS, FRONTEND_URL, HistoryRouterProvider, MAX_FILE_SIZES, MAX_TOOL_CALLS_PER_MESSAGE, OWNER_CREDITS, PDF_LIMITS, PLUS_PRICE, PROD_FRONTEND_URL, PROMPT_LIMITS, PRO_PRICE, Sidebar, Store, VERSION, WS_URL, addParam, apiFetch, budgetCategory, capitalizeFirstLetter, checkIsExtension, checkThreadSummaryLimit, createApp, createCalendarEvent, deleteApp, deleteCalendarEvent, deleteMemories, deleteMessage, deleteSubscription, exampleInstructions, expenseCategory, type expenseCategoryType, exportToGoogleCalendar, extensionSuggestions, generateAppMetadata, getActions, getApps, getBrowserAPI, getBrowserIdentity, getCalendarEvents, getDailyImageLimit, getExampleInstructions, getExtensionUrl, getFlag, getGuest, getHourlyLimit, getImageSrc, getInstructionConfig, getLastMessage, getMetadata, getRedirectURL, getSession, getSlugFromPathname, getThread, getThreads, getUser, getUsers, getWeatherCacheTime, type instructionBase, isCI, isCollaborator, isDeepEqual, isDevelopment, isE2E, isFirefox, isOwner, isValidUsername, pageSizes, removeParam, removeUser, reorderApps, storage, syncGoogleCalendar, updateApp, updateCalendarEvent, updateCollaboration, updateGuest, updateMessage, updateThread, updateUser, uploadUserImage, useCountdown, useDeviceInfo, useHasHydrated, useLocalStorage, usePWAInstall };
1545
+ export { ADDITIONAL_CREDITS, API_URL, type ApiActions, BrowserInstance, CHRRY_URL, CREDITS_PRICE, type CalendarEventFormData, Chrry, FREE_DAYS, FRONTEND_URL, HistoryRouterProvider, MAX_FILE_SIZES, MAX_TOOL_CALLS_PER_MESSAGE, OWNER_CREDITS, PDF_LIMITS, PLUS_PRICE, PROD_FRONTEND_URL, PROMPT_LIMITS, PRO_PRICE, Sidebar, Store, VERSION, WS_URL, addParam, apiFetch, budgetCategory, capitalizeFirstLetter, checkIsExtension, checkThreadSummaryLimit, createApp, createCalendarEvent, deleteApp, deleteCalendarEvent, deleteMemories, deleteMessage, deleteSubscription, exampleInstructions, expenseCategory, type expenseCategoryType, exportToGoogleCalendar, extensionSuggestions, generateAppMetadata, getActions, getApps, getBrowserAPI, getBrowserIdentity, getCalendarEvents, getDailyImageLimit, getExampleInstructions, getExtensionUrl, getFlag, getGuest, getHourlyLimit, getImageSrc, getInstructionConfig, getLastMessage, getMetadata, getRedirectURL, getSession, getSlugFromPathname, getThread, getThreadId, getThreads, getUser, getUsers, getWeatherCacheTime, type instructionBase, isCI, isCollaborator, isDeepEqual, isDevelopment, isE2E, isFirefox, isOwner, isValidUsername, isValidUuidV4, pageSizes, removeParam, removeUser, reorderApps, storage, syncGoogleCalendar, updateApp, updateCalendarEvent, updateCollaboration, updateGuest, updateMessage, updateThread, updateUser, uploadUserImage, useCountdown, useDeviceInfo, useHasHydrated, useLocalStorage, usePWAInstall };