@aakash58/chatbot 1.0.56 → 1.0.58

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/index.d.ts CHANGED
@@ -35,6 +35,11 @@ declare class ThemeService {
35
35
  }
36
36
 
37
37
  declare class DoohbotInput {
38
+ username: string;
39
+ password: string;
40
+ authToken?: string;
41
+ DOOHBOT_API_URL?: string;
42
+ skipAuthentication?: boolean;
38
43
  userAvatarUrl: string;
39
44
  readonly appTitle = "DoohBot";
40
45
  readonly appSubtitle = "Welcome to DoohBot";
@@ -144,6 +149,18 @@ declare class AccountService {
144
149
  static ɵprov: i0.ɵɵInjectableDeclaration<AccountService>;
145
150
  }
146
151
 
152
+ declare class CryptoHelperService {
153
+ private encoder;
154
+ private decoder;
155
+ private secretKey;
156
+ setSecretKey(key: string): void;
157
+ private getKey;
158
+ encrypt(value: string): Promise<string | null>;
159
+ decrypt(value: string): Promise<string | null>;
160
+ static ɵfac: i0.ɵɵFactoryDeclaration<CryptoHelperService, never>;
161
+ static ɵprov: i0.ɵɵInjectableDeclaration<CryptoHelperService>;
162
+ }
163
+
147
164
  declare global {
148
165
  interface Window {
149
166
  storageEventAdded?: boolean;
@@ -153,12 +170,13 @@ declare global {
153
170
  declare class AuthService {
154
171
  private router;
155
172
  private http;
173
+ private cryptoHelper;
156
174
  apiUrl: string;
157
175
  storageKey: string;
158
176
  secretKey: string;
159
177
  companyCode: string;
160
178
  jwtHelper: JwtHelperService;
161
- constructor(router: Router, http: HttpClient);
179
+ constructor(router: Router, http: HttpClient, cryptoHelper: CryptoHelperService);
162
180
  logout(): Observable<boolean>;
163
181
  setSession(session: AuthResult): void;
164
182
  setLocalStorage(key: string, value: any): void;
@@ -177,6 +195,13 @@ declare class AuthService {
177
195
  static ɵprov: i0.ɵɵInjectableDeclaration<AuthService>;
178
196
  }
179
197
 
198
+ interface UserContext {
199
+ userId: string;
200
+ userName: string;
201
+ userEmail: string;
202
+ metadata?: Record<string, any>;
203
+ }
204
+
180
205
  declare class Doohbot extends DoohbotInput implements OnDestroy {
181
206
  private elementRef;
182
207
  private renderer;
@@ -191,6 +216,7 @@ declare class Doohbot extends DoohbotInput implements OnDestroy {
191
216
  enableResize: boolean;
192
217
  primaryColor: string | undefined;
193
218
  apiConfig?: DoohbotApiConfig;
219
+ userContext?: UserContext;
194
220
  isFullScreen: boolean;
195
221
  isChatOpen: i0.WritableSignal<boolean>;
196
222
  isBotTyping: i0.WritableSignal<boolean>;
@@ -235,7 +261,7 @@ declare class Doohbot extends DoohbotInput implements OnDestroy {
235
261
  } | null;
236
262
  toggleFullScreen(): void;
237
263
  static ɵfac: i0.ɵɵFactoryDeclaration<Doohbot, never>;
238
- static ɵcmp: i0.ɵɵComponentDeclaration<Doohbot, "app-doohbot", never, { "config": { "alias": "config"; "required": false; }; "platformTenant": { "alias": "platformTenant"; "required": false; }; "subTenant": { "alias": "subTenant"; "required": false; }; "agent": { "alias": "agent"; "required": false; }; "buttonStyle": { "alias": "buttonStyle"; "required": false; }; "enableDrag": { "alias": "enableDrag"; "required": false; }; "enableResize": { "alias": "enableResize"; "required": false; }; "primaryColor": { "alias": "primaryColor"; "required": false; }; "apiConfig": { "alias": "apiConfig"; "required": false; }; }, {}, never, never, true, never>;
264
+ static ɵcmp: i0.ɵɵComponentDeclaration<Doohbot, "app-doohbot", never, { "config": { "alias": "config"; "required": false; }; "platformTenant": { "alias": "platformTenant"; "required": false; }; "subTenant": { "alias": "subTenant"; "required": false; }; "agent": { "alias": "agent"; "required": false; }; "buttonStyle": { "alias": "buttonStyle"; "required": false; }; "enableDrag": { "alias": "enableDrag"; "required": false; }; "enableResize": { "alias": "enableResize"; "required": false; }; "primaryColor": { "alias": "primaryColor"; "required": false; }; "apiConfig": { "alias": "apiConfig"; "required": false; }; "userContext": { "alias": "userContext"; "required": false; }; }, {}, never, never, true, never>;
239
265
  }
240
266
 
241
267
  export { Doohbot };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@aakash58/chatbot",
3
- "version": "1.0.56",
4
- "description": "Auth configuration",
3
+ "version": "1.0.58",
4
+ "description": "Angular chatbot package",
5
5
  "peerDependencies": {
6
6
  "@angular/common": "^20.3.0",
7
7
  "@angular/core": "^20.3.0"
Binary file
Binary file
@@ -1,8 +0,0 @@
1
- {
2
- "environment": "Dev",
3
- "apiBaseUrl": "http://localhost:4000/",
4
- "apiSegment": "api/",
5
- "apiKey": "api/v1/",
6
- "secretKey": "Nz3eQWWXAU",
7
- "storageKey": "doohbot_storage"
8
- }
@@ -1,8 +0,0 @@
1
- {
2
- "environment": "Prod",
3
- "apiBaseUrl": "http://localhost:5200/",
4
- "apiSegment": "api/v1/",
5
- "apiKey": "api/v1/",
6
- "secretKey": "Nz3eQWWXAU",
7
- "storageKey": "doohbot_storage"
8
- }
Binary file
Binary file