@1interface/chat-core 0.4.4 → 0.5.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.ts CHANGED
@@ -145,6 +145,7 @@ getConfig: QueryDefinition<void, BaseQueryFn<string | FetchArgs, unknown, FetchB
145
145
  getProfile: QueryDefinition<void, BaseQueryFn<string | FetchArgs, unknown, FetchBaseQueryError>, "profile", Profile, "profileApi", unknown>;
146
146
  updateProfile: MutationDefinition<UpdateProfilePayload, BaseQueryFn<string | FetchArgs, unknown, FetchBaseQueryError>, "profile", void, "profileApi", unknown>;
147
147
  deleteAccount: MutationDefinition<void, BaseQueryFn<string | FetchArgs, unknown, FetchBaseQueryError>, "profile", void, "profileApi", unknown>;
148
+ updatePassword: MutationDefinition<UpdatePasswordPayload, BaseQueryFn<string | FetchArgs, unknown, FetchBaseQueryError>, "profile", string, "profileApi", unknown>;
148
149
  }, string, "profileApi">, ThunkDispatch<any, any, UnknownAction>>)[];
149
150
 
150
151
  export declare const apiReducers: {
@@ -199,6 +200,7 @@ export declare const apiReducers: {
199
200
  getProfile: QueryDefinition<void, BaseQueryFn<string | FetchArgs, unknown, FetchBaseQueryError>, "profile", Profile, "profileApi", unknown>;
200
201
  updateProfile: MutationDefinition<UpdateProfilePayload, BaseQueryFn<string | FetchArgs, unknown, FetchBaseQueryError>, "profile", void, "profileApi", unknown>;
201
202
  deleteAccount: MutationDefinition<void, BaseQueryFn<string | FetchArgs, unknown, FetchBaseQueryError>, "profile", void, "profileApi", unknown>;
203
+ updatePassword: MutationDefinition<UpdatePasswordPayload, BaseQueryFn<string | FetchArgs, unknown, FetchBaseQueryError>, "profile", string, "profileApi", unknown>;
202
204
  }, "profile", "profileApi">, UnknownAction>;
203
205
  };
204
206
 
@@ -426,6 +428,7 @@ profileApi: CombinedState< {
426
428
  getProfile: QueryDefinition<void, BaseQueryFn<string | FetchArgs, unknown, FetchBaseQueryError>, "profile", Profile, "profileApi", unknown>;
427
429
  updateProfile: MutationDefinition<UpdateProfilePayload, BaseQueryFn<string | FetchArgs, unknown, FetchBaseQueryError>, "profile", void, "profileApi", unknown>;
428
430
  deleteAccount: MutationDefinition<void, BaseQueryFn<string | FetchArgs, unknown, FetchBaseQueryError>, "profile", void, "profileApi", unknown>;
431
+ updatePassword: MutationDefinition<UpdatePasswordPayload, BaseQueryFn<string | FetchArgs, unknown, FetchBaseQueryError>, "profile", string, "profileApi", unknown>;
429
432
  }, "profile", "profileApi">;
430
433
  }, UnknownAction, Partial<{
431
434
  auth: AuthState;
@@ -501,6 +504,7 @@ profileApi: CombinedState< {
501
504
  getProfile: QueryDefinition<void, BaseQueryFn<string | FetchArgs, unknown, FetchBaseQueryError>, "profile", Profile, "profileApi", unknown>;
502
505
  updateProfile: MutationDefinition<UpdateProfilePayload, BaseQueryFn<string | FetchArgs, unknown, FetchBaseQueryError>, "profile", void, "profileApi", unknown>;
503
506
  deleteAccount: MutationDefinition<void, BaseQueryFn<string | FetchArgs, unknown, FetchBaseQueryError>, "profile", void, "profileApi", unknown>;
507
+ updatePassword: MutationDefinition<UpdatePasswordPayload, BaseQueryFn<string | FetchArgs, unknown, FetchBaseQueryError>, "profile", string, "profileApi", unknown>;
504
508
  }, "profile", "profileApi">;
505
509
  }>>;
506
510
 
@@ -585,6 +589,7 @@ export declare const clearMessageQueue: ActionCreatorWithoutPayload<"chat/clearM
585
589
  export declare interface ClientConfig {
586
590
  conversations: ConversationsConfig;
587
591
  voice_agent: VoiceAgentConfig;
592
+ stt: SttConfig;
588
593
  features?: string[];
589
594
  backend_version?: string;
590
595
  panel_switcher_enabled?: boolean;
@@ -850,6 +855,7 @@ export declare const profileApi: Api<BaseQueryFn<string | FetchArgs, unknown, Fe
850
855
  getProfile: QueryDefinition<void, BaseQueryFn<string | FetchArgs, unknown, FetchBaseQueryError>, "profile", Profile, "profileApi", unknown>;
851
856
  updateProfile: MutationDefinition<UpdateProfilePayload, BaseQueryFn<string | FetchArgs, unknown, FetchBaseQueryError>, "profile", void, "profileApi", unknown>;
852
857
  deleteAccount: MutationDefinition<void, BaseQueryFn<string | FetchArgs, unknown, FetchBaseQueryError>, "profile", void, "profileApi", unknown>;
858
+ updatePassword: MutationDefinition<UpdatePasswordPayload, BaseQueryFn<string | FetchArgs, unknown, FetchBaseQueryError>, "profile", string, "profileApi", unknown>;
853
859
  }, "profileApi", "profile", coreModuleName | reactHooksModuleName>;
854
860
 
855
861
  export declare class ProprietaryAdapter implements ProtocolAdapter {
@@ -1043,6 +1049,7 @@ profileApi: CombinedState< {
1043
1049
  getProfile: QueryDefinition<void, BaseQueryFn<string | FetchArgs, unknown, FetchBaseQueryError>, "profile", Profile, "profileApi", unknown>;
1044
1050
  updateProfile: MutationDefinition<UpdateProfilePayload, BaseQueryFn<string | FetchArgs, unknown, FetchBaseQueryError>, "profile", void, "profileApi", unknown>;
1045
1051
  deleteAccount: MutationDefinition<void, BaseQueryFn<string | FetchArgs, unknown, FetchBaseQueryError>, "profile", void, "profileApi", unknown>;
1052
+ updatePassword: MutationDefinition<UpdatePasswordPayload, BaseQueryFn<string | FetchArgs, unknown, FetchBaseQueryError>, "profile", string, "profileApi", unknown>;
1046
1053
  }, "profile", "profileApi">;
1047
1054
  }, UnknownAction, Tuple<[StoreEnhancer< {
1048
1055
  dispatch: ((action: Action<"listenerMiddleware/add">) => UnsubscribeListener) & ThunkDispatch< {
@@ -1119,6 +1126,7 @@ profileApi: CombinedState< {
1119
1126
  getProfile: QueryDefinition<void, BaseQueryFn<string | FetchArgs, unknown, FetchBaseQueryError>, "profile", Profile, "profileApi", unknown>;
1120
1127
  updateProfile: MutationDefinition<UpdateProfilePayload, BaseQueryFn<string | FetchArgs, unknown, FetchBaseQueryError>, "profile", void, "profileApi", unknown>;
1121
1128
  deleteAccount: MutationDefinition<void, BaseQueryFn<string | FetchArgs, unknown, FetchBaseQueryError>, "profile", void, "profileApi", unknown>;
1129
+ updatePassword: MutationDefinition<UpdatePasswordPayload, BaseQueryFn<string | FetchArgs, unknown, FetchBaseQueryError>, "profile", string, "profileApi", unknown>;
1122
1130
  }, "profile", "profileApi">;
1123
1131
  }, undefined, UnknownAction>;
1124
1132
  }>, StoreEnhancer]>>;
@@ -1149,6 +1157,10 @@ export declare interface StreamMessageParams {
1149
1157
  body?: Record<string, unknown>;
1150
1158
  }
1151
1159
 
1160
+ export declare interface SttConfig {
1161
+ enabled: boolean;
1162
+ }
1163
+
1152
1164
  export declare const THINKING_MESSAGES: {
1153
1165
  readonly INITIAL: readonly ["Working on it", "Just a moment", "Reviewing your request", "Looking into that", "One moment, please", "Checking"];
1154
1166
  readonly LATER: readonly ["Almost ready", "Gathering the details", "Finishing up", "Getting things in order", "Preparing your answer", "Wrapping this up"];
@@ -1168,6 +1180,11 @@ export declare interface ToolServer {
1168
1180
 
1169
1181
  export declare const TYPEWRITER_INTERVAL_MS = 28;
1170
1182
 
1183
+ export declare interface UpdatePasswordPayload {
1184
+ current_password: string;
1185
+ new_password: string;
1186
+ }
1187
+
1171
1188
  export declare interface UpdateProfilePayload {
1172
1189
  name?: string;
1173
1190
  phone?: string | null;
@@ -4115,6 +4132,168 @@ export declare function useTypewriter(text: string, intervalMs?: number): UseTyp
4115
4132
 
4116
4133
  export declare type UseTypewriterResult = string;
4117
4134
 
4135
+ export declare const useUpdatePasswordMutation: <R extends Record<string, any> = ({
4136
+ requestId?: undefined;
4137
+ status: QueryStatus.uninitialized;
4138
+ data?: undefined;
4139
+ error?: undefined;
4140
+ endpointName?: string;
4141
+ startedTimeStamp?: undefined;
4142
+ fulfilledTimeStamp?: undefined;
4143
+ } & {
4144
+ status: QueryStatus.uninitialized;
4145
+ isUninitialized: true;
4146
+ isLoading: false;
4147
+ isSuccess: false;
4148
+ isError: false;
4149
+ }) | ({
4150
+ status: QueryStatus.fulfilled;
4151
+ } & Omit<{
4152
+ requestId: string;
4153
+ data?: string;
4154
+ error?: FetchBaseQueryError | SerializedError;
4155
+ endpointName: string;
4156
+ startedTimeStamp: number;
4157
+ fulfilledTimeStamp?: number;
4158
+ }, "data" | "fulfilledTimeStamp"> & Required<Pick<{
4159
+ requestId: string;
4160
+ data?: string;
4161
+ error?: FetchBaseQueryError | SerializedError;
4162
+ endpointName: string;
4163
+ startedTimeStamp: number;
4164
+ fulfilledTimeStamp?: number;
4165
+ }, "data" | "fulfilledTimeStamp">> & {
4166
+ error: undefined;
4167
+ } & {
4168
+ status: QueryStatus.fulfilled;
4169
+ isUninitialized: false;
4170
+ isLoading: false;
4171
+ isSuccess: true;
4172
+ isError: false;
4173
+ }) | ({
4174
+ status: QueryStatus.pending;
4175
+ } & {
4176
+ requestId: string;
4177
+ data?: string;
4178
+ error?: FetchBaseQueryError | SerializedError;
4179
+ endpointName: string;
4180
+ startedTimeStamp: number;
4181
+ fulfilledTimeStamp?: number;
4182
+ } & {
4183
+ data?: undefined;
4184
+ } & {
4185
+ status: QueryStatus.pending;
4186
+ isUninitialized: false;
4187
+ isLoading: true;
4188
+ isSuccess: false;
4189
+ isError: false;
4190
+ }) | ({
4191
+ status: QueryStatus.rejected;
4192
+ } & Omit<{
4193
+ requestId: string;
4194
+ data?: string;
4195
+ error?: FetchBaseQueryError | SerializedError;
4196
+ endpointName: string;
4197
+ startedTimeStamp: number;
4198
+ fulfilledTimeStamp?: number;
4199
+ }, "error"> & Required<Pick<{
4200
+ requestId: string;
4201
+ data?: string;
4202
+ error?: FetchBaseQueryError | SerializedError;
4203
+ endpointName: string;
4204
+ startedTimeStamp: number;
4205
+ fulfilledTimeStamp?: number;
4206
+ }, "error">> & {
4207
+ status: QueryStatus.rejected;
4208
+ isUninitialized: false;
4209
+ isLoading: false;
4210
+ isSuccess: false;
4211
+ isError: true;
4212
+ })>(options?: {
4213
+ selectFromResult?: (state: ({
4214
+ requestId?: undefined;
4215
+ status: QueryStatus.uninitialized;
4216
+ data?: undefined;
4217
+ error?: undefined;
4218
+ endpointName?: string;
4219
+ startedTimeStamp?: undefined;
4220
+ fulfilledTimeStamp?: undefined;
4221
+ } & {
4222
+ status: QueryStatus.uninitialized;
4223
+ isUninitialized: true;
4224
+ isLoading: false;
4225
+ isSuccess: false;
4226
+ isError: false;
4227
+ }) | ({
4228
+ status: QueryStatus.fulfilled;
4229
+ } & Omit<{
4230
+ requestId: string;
4231
+ data?: string;
4232
+ error?: FetchBaseQueryError | SerializedError;
4233
+ endpointName: string;
4234
+ startedTimeStamp: number;
4235
+ fulfilledTimeStamp?: number;
4236
+ }, "data" | "fulfilledTimeStamp"> & Required<Pick<{
4237
+ requestId: string;
4238
+ data?: string;
4239
+ error?: FetchBaseQueryError | SerializedError;
4240
+ endpointName: string;
4241
+ startedTimeStamp: number;
4242
+ fulfilledTimeStamp?: number;
4243
+ }, "data" | "fulfilledTimeStamp">> & {
4244
+ error: undefined;
4245
+ } & {
4246
+ status: QueryStatus.fulfilled;
4247
+ isUninitialized: false;
4248
+ isLoading: false;
4249
+ isSuccess: true;
4250
+ isError: false;
4251
+ }) | ({
4252
+ status: QueryStatus.pending;
4253
+ } & {
4254
+ requestId: string;
4255
+ data?: string;
4256
+ error?: FetchBaseQueryError | SerializedError;
4257
+ endpointName: string;
4258
+ startedTimeStamp: number;
4259
+ fulfilledTimeStamp?: number;
4260
+ } & {
4261
+ data?: undefined;
4262
+ } & {
4263
+ status: QueryStatus.pending;
4264
+ isUninitialized: false;
4265
+ isLoading: true;
4266
+ isSuccess: false;
4267
+ isError: false;
4268
+ }) | ({
4269
+ status: QueryStatus.rejected;
4270
+ } & Omit<{
4271
+ requestId: string;
4272
+ data?: string;
4273
+ error?: FetchBaseQueryError | SerializedError;
4274
+ endpointName: string;
4275
+ startedTimeStamp: number;
4276
+ fulfilledTimeStamp?: number;
4277
+ }, "error"> & Required<Pick<{
4278
+ requestId: string;
4279
+ data?: string;
4280
+ error?: FetchBaseQueryError | SerializedError;
4281
+ endpointName: string;
4282
+ startedTimeStamp: number;
4283
+ fulfilledTimeStamp?: number;
4284
+ }, "error">> & {
4285
+ status: QueryStatus.rejected;
4286
+ isUninitialized: false;
4287
+ isLoading: false;
4288
+ isSuccess: false;
4289
+ isError: true;
4290
+ })) => R;
4291
+ fixedCacheKey?: string;
4292
+ }) => readonly [(arg: UpdatePasswordPayload) => MutationActionCreatorResult<MutationDefinition<UpdatePasswordPayload, BaseQueryFn<string | FetchArgs, unknown, FetchBaseQueryError>, "profile", string, "profileApi", unknown>>, TSHelpersNoInfer<R> & {
4293
+ originalArgs?: UpdatePasswordPayload;
4294
+ reset: () => void;
4295
+ }];
4296
+
4118
4297
  export declare const useUpdateProfileMutation: <R extends Record<string, any> = ({
4119
4298
  requestId?: undefined;
4120
4299
  status: QueryStatus.uninitialized;