@joai/core 1.0.2 → 1.1.1

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.mjs CHANGED
@@ -96,7 +96,7 @@ var HttpService = class {
96
96
  return response;
97
97
  };
98
98
  this.refreshCsrfToken = async () => {
99
- await this.fetchFn(`${this.baseUrl}/sanctum/csrf-cookie`, {
99
+ await this.fetchFn(`${this.csrfBaseUrl}/sanctum/csrf-cookie`, {
100
100
  method: "GET",
101
101
  credentials: "include",
102
102
  headers: {
@@ -156,6 +156,7 @@ var HttpService = class {
156
156
  this.baseUrl = baseUrl;
157
157
  this.authToken = authToken || null;
158
158
  this.fetchFn = options?.customFetch ?? globalThis.fetch.bind(globalThis);
159
+ this.csrfBaseUrl = options?.csrfBaseUrl ?? baseUrl;
159
160
  this.onNetworkError = () => {};
160
161
  this.onSuccessfulResponse = () => {};
161
162
  this.onUnauthorized = () => {};
@@ -361,4 +362,19 @@ const SkillScope = {
361
362
  Team: "team"
362
363
  };
363
364
  //#endregion
364
- export { ContractCategoryDisplayNames, DefaultCodeMetadata, HttpService, JoaiUrls, OG_IMAGE_CONFIG, OG_IMAGE_HEIGHT, OG_IMAGE_WIDTH, OgImageColors, PeriodTypeLabels, PeriodTypeOptions, SkillMediaBindingRole, SkillScope, SkillType, abbreviateNumber, getAgentsBaseUrl, getApiBaseUrl, getAppBaseUrl, getAssetAppLogoUrl, getAssetChainLogoUrl, getAssetPartnerLogoUrl, getAssetTokenLogoUrl, getAssetWalletLogoUrl, getCortexBaseUrl, getDigestBaseUrl, getFormsBaseUrl, getMcpServerAgentUrl, getSiteUrl, getSitesRootDomain, getStoreBaseUrl, getWarpScreenshotUrl, isFileFormatAudio, isFileFormatImage, isFileFormatVideo, localize, ogImageUrl, resolveWarpText, sanitizeAlphanumeric, sanitizeNumeric, toCurrencyDisplay, toHexEncodedNonce, toNameInitials, toNftId, toPreviewText, withRetry };
365
+ //#region src/team/constants.ts
366
+ const teamCategories = [
367
+ "general",
368
+ "food-drink",
369
+ "retail",
370
+ "beauty-wellness",
371
+ "health",
372
+ "sports-fitness",
373
+ "trades-services",
374
+ "professional-services",
375
+ "education-culture",
376
+ "clubs-organizations",
377
+ "leisure-tourism"
378
+ ];
379
+ //#endregion
380
+ export { ContractCategoryDisplayNames, DefaultCodeMetadata, HttpService, JoaiUrls, OG_IMAGE_CONFIG, OG_IMAGE_HEIGHT, OG_IMAGE_WIDTH, OgImageColors, PeriodTypeLabels, PeriodTypeOptions, SkillMediaBindingRole, SkillScope, SkillType, abbreviateNumber, getAgentsBaseUrl, getApiBaseUrl, getAppBaseUrl, getAssetAppLogoUrl, getAssetChainLogoUrl, getAssetPartnerLogoUrl, getAssetTokenLogoUrl, getAssetWalletLogoUrl, getCortexBaseUrl, getDigestBaseUrl, getFormsBaseUrl, getMcpServerAgentUrl, getSiteUrl, getSitesRootDomain, getStoreBaseUrl, getWarpScreenshotUrl, isFileFormatAudio, isFileFormatImage, isFileFormatVideo, localize, ogImageUrl, resolveWarpText, sanitizeAlphanumeric, sanitizeNumeric, teamCategories, toCurrencyDisplay, toHexEncodedNonce, toNameInitials, toNftId, toPreviewText, withRetry };
@@ -1,5 +1,5 @@
1
1
  import { n as IHttpService } from "../types-CWSaEVa7.mjs";
2
- import * as react from "react";
2
+ import * as _$react from "react";
3
3
  import { ReactNode } from "react";
4
4
 
5
5
  //#region src/react/types.d.ts
@@ -48,7 +48,7 @@ declare function EmbedChatList({
48
48
  classNames,
49
49
  renderEmptyState,
50
50
  renderAgentContent
51
- }: EmbedChatListProps): string | number | bigint | boolean | Iterable<ReactNode> | Promise<string | number | bigint | boolean | react.ReactPortal | react.ReactElement<unknown, string | react.JSXElementConstructor<any>> | Iterable<ReactNode> | null | undefined> | react.JSX.Element | null | undefined;
51
+ }: EmbedChatListProps): string | number | bigint | boolean | Iterable<ReactNode> | Promise<string | number | bigint | boolean | _$react.ReactPortal | _$react.ReactElement<unknown, string | _$react.JSXElementConstructor<any>> | Iterable<ReactNode> | null | undefined> | _$react.JSX.Element | null | undefined;
52
52
  type EmbedChatInputProps = {
53
53
  onSend: (message: string) => void;
54
54
  disabled: boolean;
@@ -70,7 +70,7 @@ declare function EmbedChatInput({
70
70
  maxLength,
71
71
  classNames,
72
72
  renderSendButton
73
- }: EmbedChatInputProps): react.JSX.Element;
73
+ }: EmbedChatInputProps): _$react.JSX.Element;
74
74
  //#endregion
75
75
  //#region src/react/use-embed-chat.d.ts
76
76
  type Options = {
@@ -92,11 +92,11 @@ declare function useEmbedChat({
92
92
  extraPayload
93
93
  }: Options): {
94
94
  items: EmbedChatItem[];
95
- setItems: react.Dispatch<react.SetStateAction<EmbedChatItem[]>>;
95
+ setItems: _$react.Dispatch<_$react.SetStateAction<EmbedChatItem[]>>;
96
96
  sending: boolean;
97
97
  awaitingResponse: boolean;
98
98
  roomId: string | null;
99
- setRoomId: react.Dispatch<react.SetStateAction<string | null>>;
99
+ setRoomId: _$react.Dispatch<_$react.SetStateAction<string | null>>;
100
100
  send: (message: string) => Promise<void>;
101
101
  connectionError: boolean;
102
102
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@joai/core",
3
- "version": "1.0.2",
3
+ "version": "1.1.1",
4
4
  "description": "JoAi shared types, HTTP service, and config",
5
5
  "license": "MIT",
6
6
  "type": "module",