@1interface/chat-core 0.4.4 → 0.4.5

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
 
@@ -850,6 +854,7 @@ export declare const profileApi: Api<BaseQueryFn<string | FetchArgs, unknown, Fe
850
854
  getProfile: QueryDefinition<void, BaseQueryFn<string | FetchArgs, unknown, FetchBaseQueryError>, "profile", Profile, "profileApi", unknown>;
851
855
  updateProfile: MutationDefinition<UpdateProfilePayload, BaseQueryFn<string | FetchArgs, unknown, FetchBaseQueryError>, "profile", void, "profileApi", unknown>;
852
856
  deleteAccount: MutationDefinition<void, BaseQueryFn<string | FetchArgs, unknown, FetchBaseQueryError>, "profile", void, "profileApi", unknown>;
857
+ updatePassword: MutationDefinition<UpdatePasswordPayload, BaseQueryFn<string | FetchArgs, unknown, FetchBaseQueryError>, "profile", string, "profileApi", unknown>;
853
858
  }, "profileApi", "profile", coreModuleName | reactHooksModuleName>;
854
859
 
855
860
  export declare class ProprietaryAdapter implements ProtocolAdapter {
@@ -1043,6 +1048,7 @@ profileApi: CombinedState< {
1043
1048
  getProfile: QueryDefinition<void, BaseQueryFn<string | FetchArgs, unknown, FetchBaseQueryError>, "profile", Profile, "profileApi", unknown>;
1044
1049
  updateProfile: MutationDefinition<UpdateProfilePayload, BaseQueryFn<string | FetchArgs, unknown, FetchBaseQueryError>, "profile", void, "profileApi", unknown>;
1045
1050
  deleteAccount: MutationDefinition<void, BaseQueryFn<string | FetchArgs, unknown, FetchBaseQueryError>, "profile", void, "profileApi", unknown>;
1051
+ updatePassword: MutationDefinition<UpdatePasswordPayload, BaseQueryFn<string | FetchArgs, unknown, FetchBaseQueryError>, "profile", string, "profileApi", unknown>;
1046
1052
  }, "profile", "profileApi">;
1047
1053
  }, UnknownAction, Tuple<[StoreEnhancer< {
1048
1054
  dispatch: ((action: Action<"listenerMiddleware/add">) => UnsubscribeListener) & ThunkDispatch< {
@@ -1119,6 +1125,7 @@ profileApi: CombinedState< {
1119
1125
  getProfile: QueryDefinition<void, BaseQueryFn<string | FetchArgs, unknown, FetchBaseQueryError>, "profile", Profile, "profileApi", unknown>;
1120
1126
  updateProfile: MutationDefinition<UpdateProfilePayload, BaseQueryFn<string | FetchArgs, unknown, FetchBaseQueryError>, "profile", void, "profileApi", unknown>;
1121
1127
  deleteAccount: MutationDefinition<void, BaseQueryFn<string | FetchArgs, unknown, FetchBaseQueryError>, "profile", void, "profileApi", unknown>;
1128
+ updatePassword: MutationDefinition<UpdatePasswordPayload, BaseQueryFn<string | FetchArgs, unknown, FetchBaseQueryError>, "profile", string, "profileApi", unknown>;
1122
1129
  }, "profile", "profileApi">;
1123
1130
  }, undefined, UnknownAction>;
1124
1131
  }>, StoreEnhancer]>>;
@@ -1168,6 +1175,11 @@ export declare interface ToolServer {
1168
1175
 
1169
1176
  export declare const TYPEWRITER_INTERVAL_MS = 28;
1170
1177
 
1178
+ export declare interface UpdatePasswordPayload {
1179
+ current_password: string;
1180
+ new_password: string;
1181
+ }
1182
+
1171
1183
  export declare interface UpdateProfilePayload {
1172
1184
  name?: string;
1173
1185
  phone?: string | null;
@@ -4115,6 +4127,168 @@ export declare function useTypewriter(text: string, intervalMs?: number): UseTyp
4115
4127
 
4116
4128
  export declare type UseTypewriterResult = string;
4117
4129
 
4130
+ export declare const useUpdatePasswordMutation: <R extends Record<string, any> = ({
4131
+ requestId?: undefined;
4132
+ status: QueryStatus.uninitialized;
4133
+ data?: undefined;
4134
+ error?: undefined;
4135
+ endpointName?: string;
4136
+ startedTimeStamp?: undefined;
4137
+ fulfilledTimeStamp?: undefined;
4138
+ } & {
4139
+ status: QueryStatus.uninitialized;
4140
+ isUninitialized: true;
4141
+ isLoading: false;
4142
+ isSuccess: false;
4143
+ isError: false;
4144
+ }) | ({
4145
+ status: QueryStatus.fulfilled;
4146
+ } & Omit<{
4147
+ requestId: string;
4148
+ data?: string;
4149
+ error?: FetchBaseQueryError | SerializedError;
4150
+ endpointName: string;
4151
+ startedTimeStamp: number;
4152
+ fulfilledTimeStamp?: number;
4153
+ }, "data" | "fulfilledTimeStamp"> & Required<Pick<{
4154
+ requestId: string;
4155
+ data?: string;
4156
+ error?: FetchBaseQueryError | SerializedError;
4157
+ endpointName: string;
4158
+ startedTimeStamp: number;
4159
+ fulfilledTimeStamp?: number;
4160
+ }, "data" | "fulfilledTimeStamp">> & {
4161
+ error: undefined;
4162
+ } & {
4163
+ status: QueryStatus.fulfilled;
4164
+ isUninitialized: false;
4165
+ isLoading: false;
4166
+ isSuccess: true;
4167
+ isError: false;
4168
+ }) | ({
4169
+ status: QueryStatus.pending;
4170
+ } & {
4171
+ requestId: string;
4172
+ data?: string;
4173
+ error?: FetchBaseQueryError | SerializedError;
4174
+ endpointName: string;
4175
+ startedTimeStamp: number;
4176
+ fulfilledTimeStamp?: number;
4177
+ } & {
4178
+ data?: undefined;
4179
+ } & {
4180
+ status: QueryStatus.pending;
4181
+ isUninitialized: false;
4182
+ isLoading: true;
4183
+ isSuccess: false;
4184
+ isError: false;
4185
+ }) | ({
4186
+ status: QueryStatus.rejected;
4187
+ } & Omit<{
4188
+ requestId: string;
4189
+ data?: string;
4190
+ error?: FetchBaseQueryError | SerializedError;
4191
+ endpointName: string;
4192
+ startedTimeStamp: number;
4193
+ fulfilledTimeStamp?: number;
4194
+ }, "error"> & Required<Pick<{
4195
+ requestId: string;
4196
+ data?: string;
4197
+ error?: FetchBaseQueryError | SerializedError;
4198
+ endpointName: string;
4199
+ startedTimeStamp: number;
4200
+ fulfilledTimeStamp?: number;
4201
+ }, "error">> & {
4202
+ status: QueryStatus.rejected;
4203
+ isUninitialized: false;
4204
+ isLoading: false;
4205
+ isSuccess: false;
4206
+ isError: true;
4207
+ })>(options?: {
4208
+ selectFromResult?: (state: ({
4209
+ requestId?: undefined;
4210
+ status: QueryStatus.uninitialized;
4211
+ data?: undefined;
4212
+ error?: undefined;
4213
+ endpointName?: string;
4214
+ startedTimeStamp?: undefined;
4215
+ fulfilledTimeStamp?: undefined;
4216
+ } & {
4217
+ status: QueryStatus.uninitialized;
4218
+ isUninitialized: true;
4219
+ isLoading: false;
4220
+ isSuccess: false;
4221
+ isError: false;
4222
+ }) | ({
4223
+ status: QueryStatus.fulfilled;
4224
+ } & Omit<{
4225
+ requestId: string;
4226
+ data?: string;
4227
+ error?: FetchBaseQueryError | SerializedError;
4228
+ endpointName: string;
4229
+ startedTimeStamp: number;
4230
+ fulfilledTimeStamp?: number;
4231
+ }, "data" | "fulfilledTimeStamp"> & Required<Pick<{
4232
+ requestId: string;
4233
+ data?: string;
4234
+ error?: FetchBaseQueryError | SerializedError;
4235
+ endpointName: string;
4236
+ startedTimeStamp: number;
4237
+ fulfilledTimeStamp?: number;
4238
+ }, "data" | "fulfilledTimeStamp">> & {
4239
+ error: undefined;
4240
+ } & {
4241
+ status: QueryStatus.fulfilled;
4242
+ isUninitialized: false;
4243
+ isLoading: false;
4244
+ isSuccess: true;
4245
+ isError: false;
4246
+ }) | ({
4247
+ status: QueryStatus.pending;
4248
+ } & {
4249
+ requestId: string;
4250
+ data?: string;
4251
+ error?: FetchBaseQueryError | SerializedError;
4252
+ endpointName: string;
4253
+ startedTimeStamp: number;
4254
+ fulfilledTimeStamp?: number;
4255
+ } & {
4256
+ data?: undefined;
4257
+ } & {
4258
+ status: QueryStatus.pending;
4259
+ isUninitialized: false;
4260
+ isLoading: true;
4261
+ isSuccess: false;
4262
+ isError: false;
4263
+ }) | ({
4264
+ status: QueryStatus.rejected;
4265
+ } & Omit<{
4266
+ requestId: string;
4267
+ data?: string;
4268
+ error?: FetchBaseQueryError | SerializedError;
4269
+ endpointName: string;
4270
+ startedTimeStamp: number;
4271
+ fulfilledTimeStamp?: number;
4272
+ }, "error"> & Required<Pick<{
4273
+ requestId: string;
4274
+ data?: string;
4275
+ error?: FetchBaseQueryError | SerializedError;
4276
+ endpointName: string;
4277
+ startedTimeStamp: number;
4278
+ fulfilledTimeStamp?: number;
4279
+ }, "error">> & {
4280
+ status: QueryStatus.rejected;
4281
+ isUninitialized: false;
4282
+ isLoading: false;
4283
+ isSuccess: false;
4284
+ isError: true;
4285
+ })) => R;
4286
+ fixedCacheKey?: string;
4287
+ }) => readonly [(arg: UpdatePasswordPayload) => MutationActionCreatorResult<MutationDefinition<UpdatePasswordPayload, BaseQueryFn<string | FetchArgs, unknown, FetchBaseQueryError>, "profile", string, "profileApi", unknown>>, TSHelpersNoInfer<R> & {
4288
+ originalArgs?: UpdatePasswordPayload;
4289
+ reset: () => void;
4290
+ }];
4291
+
4118
4292
  export declare const useUpdateProfileMutation: <R extends Record<string, any> = ({
4119
4293
  requestId?: undefined;
4120
4294
  status: QueryStatus.uninitialized;