@joai/core 0.9.0 → 0.10.0

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
@@ -1,4 +1,4 @@
1
- import { n as IHttpService, r as IRequestOptions, t as IAppResponse } from "./types-C4eYYzWF.mjs";
1
+ import { n as IHttpService, r as IRequestOptions, t as IAppResponse } from "./types-CWSaEVa7.mjs";
2
2
  import { Warp, WarpActionInput, WarpBrandUrls, WarpChainInfo, WarpChainName, WarpI18nText, WarpLocale, WarpSecret, WarpText, WarpWalletProvider } from "@joai/warps";
3
3
 
4
4
  //#region src/auth/types.d.ts
@@ -51,6 +51,7 @@ declare class HttpService implements IHttpService {
51
51
  get: <T>(url: string, options?: IRequestOptions) => Promise<IAppResponse<T>>;
52
52
  post: <T>(url: string, data?: any, options?: IRequestOptions) => Promise<IAppResponse<T>>;
53
53
  put: <T>(url: string, data?: any, options?: IRequestOptions) => Promise<IAppResponse<T>>;
54
+ patch: <T>(url: string, data?: any, options?: IRequestOptions) => Promise<IAppResponse<T>>;
54
55
  delete: <T>(url: string, options?: IRequestOptions) => Promise<IAppResponse<T>>;
55
56
  private getCsrfToken;
56
57
  private request;
@@ -304,8 +305,7 @@ type PlanExtra = {
304
305
  unitName: string;
305
306
  };
306
307
  type BillingAddress = {
307
- firstName: string;
308
- lastName: string;
308
+ name: string;
309
309
  addressOne: string | null;
310
310
  city: string | null;
311
311
  state: string | null;
@@ -413,6 +413,7 @@ type Order = {
413
413
  status: OrderStatus;
414
414
  invoiceUrl: string;
415
415
  createdAt: string;
416
+ invoiceDate: string;
416
417
  items: OrderItem[];
417
418
  plan: Plan | null;
418
419
  user: UserPrivate | null;
@@ -660,6 +661,173 @@ type Skill = {
660
661
  screenshots: string[];
661
662
  };
662
663
  //#endregion
664
+ //#region src/integration/types.d.ts
665
+ type IntegrationType = 'none' | 'webhook' | 'api-token' | 'telegram' | 'slack' | 'whatsapp' | 'twilio' | 'n8n' | 'ai-nexus' | 'apple-health' | 'mcp' | 'x' | 'email' | 'calendar' | 'embed' | 'discord' | 'github' | 'sentry' | 'readwise';
666
+ type IntegrationDetails = {
667
+ type: IntegrationType;
668
+ name: string;
669
+ description?: string;
670
+ logoUrl?: string;
671
+ logoUrlDark?: string;
672
+ slug?: string;
673
+ category?: string;
674
+ [key: string]: unknown;
675
+ };
676
+ type Integration = {
677
+ id: string;
678
+ type: IntegrationType;
679
+ name: string;
680
+ active: boolean;
681
+ createdAt: string;
682
+ details?: IntegrationDetails;
683
+ };
684
+ type SocialPlatform = 'telegram' | 'slack' | 'whatsapp' | 'twilio' | 'discord' | 'github';
685
+ type SocialBot = {
686
+ name: string;
687
+ createdAt: string;
688
+ phoneNumberId?: string;
689
+ phoneNumber?: string;
690
+ applicationId?: string;
691
+ appId?: string;
692
+ installationId?: string;
693
+ };
694
+ type XIntegrationStatus = {
695
+ enabled: boolean;
696
+ integrationId: string | null;
697
+ xAccountLinked: boolean;
698
+ currentAgentName: string | null;
699
+ };
700
+ type EmbedStatus = {
701
+ integrationId: string;
702
+ agentName: string;
703
+ agentAvatar: string | null;
704
+ active: boolean;
705
+ allowedDomains: string[];
706
+ };
707
+ type EmailProvider = 'resend' | 'mailgun' | 'sendgrid';
708
+ type CalendarProvider = 'google' | 'apple' | 'microsoft';
709
+ type CalendarStatus = {
710
+ connected: boolean;
711
+ provider?: CalendarProvider;
712
+ providerDisplayName?: string;
713
+ accountEmail?: string;
714
+ lastSynced?: string;
715
+ tokenHealthy?: boolean;
716
+ upcomingEvents?: {
717
+ title: string;
718
+ startAt: string;
719
+ endAt: string;
720
+ allDay: boolean;
721
+ }[];
722
+ };
723
+ //#endregion
724
+ //#region src/room/types.d.ts
725
+ type RoomId = string;
726
+ type RoomKind = 'default' | 'phone' | 'meeting';
727
+ type Room = {
728
+ id: string;
729
+ name: string;
730
+ description: string | null;
731
+ public: boolean;
732
+ default: boolean;
733
+ active: boolean;
734
+ kind?: RoomKind | null;
735
+ archivedAt?: string | null;
736
+ secKey: string | null;
737
+ createdAt: string | null;
738
+ contactId?: string | null;
739
+ agent: AgentSimple;
740
+ integration: Integration | null;
741
+ };
742
+ //#endregion
743
+ //#region src/agent/types.d.ts
744
+ type AgentCharacter = {
745
+ name: string | null;
746
+ system: string | null;
747
+ bio: string | null;
748
+ };
749
+ type Agent = {
750
+ uuid: string;
751
+ name: string;
752
+ description: string;
753
+ avatar: string;
754
+ wallets: Wallet[];
755
+ settings: AgentSettings;
756
+ marketplace: MarketplaceInfo;
757
+ character?: AgentCharacter | null;
758
+ room: Room;
759
+ role: string | null;
760
+ blueprint: Blueprint | null;
761
+ team: string;
762
+ };
763
+ type AgentPrivate = {
764
+ uuid: string;
765
+ name: string;
766
+ description: string;
767
+ avatar: string;
768
+ wallets: Wallet[];
769
+ settings: AgentSettings;
770
+ marketplace: MarketplaceInfo;
771
+ password: string | null;
772
+ authKey: string | null;
773
+ secKey: string;
774
+ emailAddress: string | null;
775
+ phoneNumber: string | null;
776
+ room: Room;
777
+ role: string | null;
778
+ blueprint: Blueprint | null;
779
+ justCreated?: boolean;
780
+ team: string;
781
+ };
782
+ type AgentActionHistoryEntry = {
783
+ id: string;
784
+ action: string | null;
785
+ outcome: 'succeeded' | 'failed';
786
+ outcomeDetail: string | null;
787
+ warpIdentifier: string | null;
788
+ meta: Record<string, unknown> | null;
789
+ createdAt: string | null;
790
+ };
791
+ type AgentSimple = {
792
+ uuid: string;
793
+ name: string;
794
+ };
795
+ type AgentWalletMode = 'local' | 'cloud' | 'external';
796
+ type AgentEngine = 'cortex' | 'openclaw';
797
+ type AgentGender = 'male' | 'female' | 'neutral';
798
+ type AgentSettings = {
799
+ auto: boolean;
800
+ 'model.url': string;
801
+ 'voice.output': boolean;
802
+ 'voice.id': string;
803
+ 'agent.gender'?: AgentGender;
804
+ 'proactivity.enabled': boolean;
805
+ 'proactivity.quietHoursStart'?: number;
806
+ 'proactivity.quietHoursEnd'?: number;
807
+ 'proactivity.maxMessagesPerDay'?: number;
808
+ 'proactivity.timezone'?: string;
809
+ 'proactivity.blockedBehaviors'?: string[];
810
+ engine: AgentEngine;
811
+ 'training.url'?: string | null;
812
+ 'training.status'?: 'idle' | 'training' | 'completed' | 'failed' | null;
813
+ 'training.recrawlInterval'?: number | null;
814
+ 'email_provider'?: EmailProvider | null;
815
+ };
816
+ type LocalAgentWallet = {
817
+ provider: WarpWalletProvider;
818
+ address: string;
819
+ mnemonic?: string | null;
820
+ privateKey?: string | null;
821
+ };
822
+ type AgentExecuteHandler = (prompt: string, options?: AgentExecuteOptions) => void;
823
+ type AgentExecuteOptions = {
824
+ audio?: File;
825
+ sender?: string;
826
+ media?: Media[];
827
+ ghost?: boolean;
828
+ context?: Record<string, unknown>;
829
+ };
830
+ //#endregion
663
831
  //#region src/warp/types.d.ts
664
832
  type WarpExtrasFaq = {
665
833
  question: string;
@@ -692,6 +860,7 @@ type WarpBackend = {
692
860
  brand: BrandBackend | null;
693
861
  definition?: Record<string, any> | null;
694
862
  extras?: WarpExtras | null;
863
+ agent?: AgentSimple | null;
695
864
  };
696
865
  type WarpBackendStatus = 'unverified' | 'verified' | 'blacklisted';
697
866
  type WarpBackendCategory = 'none';
@@ -948,173 +1117,6 @@ declare const getWarpScreenshotUrl: (brandSlug: string, warpAlias: string, varia
948
1117
  //#region src/helpers/warp.d.ts
949
1118
  declare function resolveWarpText(text?: WarpText | null, locale?: string): string;
950
1119
  //#endregion
951
- //#region src/integration/types.d.ts
952
- type IntegrationType = 'none' | 'webhook' | 'api-token' | 'telegram' | 'slack' | 'whatsapp' | 'twilio' | 'n8n' | 'ai-nexus' | 'apple-health' | 'mcp' | 'x' | 'email' | 'calendar' | 'embed' | 'discord' | 'github' | 'sentry' | 'readwise';
953
- type IntegrationDetails = {
954
- type: IntegrationType;
955
- name: string;
956
- description?: string;
957
- logoUrl?: string;
958
- logoUrlDark?: string;
959
- slug?: string;
960
- category?: string;
961
- [key: string]: unknown;
962
- };
963
- type Integration = {
964
- id: string;
965
- type: IntegrationType;
966
- name: string;
967
- active: boolean;
968
- createdAt: string;
969
- details?: IntegrationDetails;
970
- };
971
- type SocialPlatform = 'telegram' | 'slack' | 'whatsapp' | 'twilio' | 'discord' | 'github';
972
- type SocialBot = {
973
- name: string;
974
- createdAt: string;
975
- phoneNumberId?: string;
976
- phoneNumber?: string;
977
- applicationId?: string;
978
- appId?: string;
979
- installationId?: string;
980
- };
981
- type XIntegrationStatus = {
982
- enabled: boolean;
983
- integrationId: string | null;
984
- xAccountLinked: boolean;
985
- currentAgentName: string | null;
986
- };
987
- type EmbedStatus = {
988
- integrationId: string;
989
- agentName: string;
990
- agentAvatar: string | null;
991
- active: boolean;
992
- allowedDomains: string[];
993
- };
994
- type EmailProvider = 'resend' | 'mailgun' | 'sendgrid';
995
- type CalendarProvider = 'google' | 'apple' | 'microsoft';
996
- type CalendarStatus = {
997
- connected: boolean;
998
- provider?: CalendarProvider;
999
- providerDisplayName?: string;
1000
- accountEmail?: string;
1001
- lastSynced?: string;
1002
- tokenHealthy?: boolean;
1003
- upcomingEvents?: {
1004
- title: string;
1005
- startAt: string;
1006
- endAt: string;
1007
- allDay: boolean;
1008
- }[];
1009
- };
1010
- //#endregion
1011
- //#region src/room/types.d.ts
1012
- type RoomId = string;
1013
- type RoomKind = 'default' | 'phone' | 'meeting';
1014
- type Room = {
1015
- id: string;
1016
- name: string;
1017
- description: string | null;
1018
- public: boolean;
1019
- default: boolean;
1020
- active: boolean;
1021
- kind?: RoomKind | null;
1022
- archivedAt?: string | null;
1023
- secKey: string | null;
1024
- createdAt: string | null;
1025
- contactId?: string | null;
1026
- agent: AgentSimple;
1027
- integration: Integration | null;
1028
- };
1029
- //#endregion
1030
- //#region src/agent/types.d.ts
1031
- type AgentCharacter = {
1032
- name: string | null;
1033
- system: string | null;
1034
- bio: string | null;
1035
- };
1036
- type Agent = {
1037
- uuid: string;
1038
- name: string;
1039
- description: string;
1040
- avatar: string;
1041
- wallets: Wallet[];
1042
- settings: AgentSettings;
1043
- marketplace: MarketplaceInfo;
1044
- character?: AgentCharacter | null;
1045
- room: Room;
1046
- role: string | null;
1047
- blueprint: Blueprint | null;
1048
- team: string;
1049
- };
1050
- type AgentPrivate = {
1051
- uuid: string;
1052
- name: string;
1053
- description: string;
1054
- avatar: string;
1055
- wallets: Wallet[];
1056
- settings: AgentSettings;
1057
- marketplace: MarketplaceInfo;
1058
- password: string | null;
1059
- authKey: string | null;
1060
- secKey: string;
1061
- emailAddress: string | null;
1062
- phoneNumber: string | null;
1063
- room: Room;
1064
- role: string | null;
1065
- blueprint: Blueprint | null;
1066
- justCreated?: boolean;
1067
- team: string;
1068
- };
1069
- type AgentActionHistoryEntry = {
1070
- id: string;
1071
- action: string | null;
1072
- outcome: 'succeeded' | 'failed';
1073
- outcomeDetail: string | null;
1074
- warpIdentifier: string | null;
1075
- meta: Record<string, unknown> | null;
1076
- createdAt: string | null;
1077
- };
1078
- type AgentSimple = {
1079
- uuid: string;
1080
- name: string;
1081
- };
1082
- type AgentWalletMode = 'local' | 'cloud' | 'external';
1083
- type AgentEngine = 'cortex' | 'openclaw';
1084
- type AgentGender = 'male' | 'female' | 'neutral';
1085
- type AgentSettings = {
1086
- auto: boolean;
1087
- 'model.url': string;
1088
- 'voice.output': boolean;
1089
- 'voice.id': string;
1090
- 'agent.gender'?: AgentGender;
1091
- 'proactivity.enabled': boolean;
1092
- 'proactivity.quietHoursStart'?: number;
1093
- 'proactivity.quietHoursEnd'?: number;
1094
- 'proactivity.maxMessagesPerDay'?: number;
1095
- 'proactivity.timezone'?: string;
1096
- 'proactivity.blockedBehaviors'?: string[];
1097
- engine: AgentEngine;
1098
- 'training.url'?: string | null;
1099
- 'training.status'?: 'idle' | 'training' | 'completed' | 'failed' | null;
1100
- 'training.recrawlInterval'?: number | null;
1101
- 'email_provider'?: EmailProvider | null;
1102
- };
1103
- type LocalAgentWallet = {
1104
- provider: WarpWalletProvider;
1105
- address: string;
1106
- mnemonic?: string | null;
1107
- privateKey?: string | null;
1108
- };
1109
- type AgentExecuteHandler = (prompt: string, options?: AgentExecuteOptions) => void;
1110
- type AgentExecuteOptions = {
1111
- audio?: File;
1112
- sender?: string;
1113
- media?: Media[];
1114
- ghost?: boolean;
1115
- context?: Record<string, unknown>;
1116
- };
1117
- //#endregion
1118
1120
  //#region src/alert/types.d.ts
1119
1121
  type Alert = {
1120
1122
  id: string;
@@ -2590,11 +2592,11 @@ type Reminder = {
2590
2592
  type Service = {
2591
2593
  id: string;
2592
2594
  slug: string;
2593
- name: string;
2595
+ name: TranslatableValue;
2594
2596
  price: number;
2595
2597
  durationMinutes: number;
2596
2598
  category: string | null;
2597
- description: string | null;
2599
+ description: TranslatableValue | null;
2598
2600
  active: boolean;
2599
2601
  digital: boolean;
2600
2602
  public: boolean;
package/dist/index.mjs CHANGED
@@ -65,6 +65,7 @@ var HttpService = class {
65
65
  this.get = async (url, options) => await this.request("GET", url, void 0, options);
66
66
  this.post = async (url, data, options) => await this.request("POST", url, data, options);
67
67
  this.put = async (url, data, options) => await this.request("PUT", url, data, options);
68
+ this.patch = async (url, data, options) => await this.request("PATCH", url, data, options);
68
69
  this.delete = async (url, options) => await this.request("DELETE", url, void 0, options);
69
70
  this.getCsrfToken = () => {
70
71
  if (typeof document === "undefined") return null;
@@ -1,4 +1,4 @@
1
- import { n as IHttpService } from "../types-C4eYYzWF.mjs";
1
+ import { n as IHttpService } from "../types-CWSaEVa7.mjs";
2
2
  import * as react from "react";
3
3
  import { ReactNode } from "react";
4
4
 
@@ -9,6 +9,7 @@ interface IHttpService {
9
9
  get: <T>(url: string, options?: IRequestOptions) => Promise<IAppResponse<T>>;
10
10
  post: <T>(url: string, data?: any, options?: IRequestOptions) => Promise<IAppResponse<T>>;
11
11
  put: <T>(url: string, data?: any, options?: IRequestOptions) => Promise<IAppResponse<T>>;
12
+ patch: <T>(url: string, data?: any, options?: IRequestOptions) => Promise<IAppResponse<T>>;
12
13
  delete: <T>(url: string, options?: IRequestOptions) => Promise<IAppResponse<T>>;
13
14
  }
14
15
  interface IAppResponse<T> {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@joai/core",
3
- "version": "0.9.0",
3
+ "version": "0.10.0",
4
4
  "description": "JoAi shared types, HTTP service, and config",
5
5
  "license": "MIT",
6
6
  "type": "module",