@snugdesk/core 0.0.12 → 0.0.15

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
@@ -1,11 +1,12 @@
1
1
  import * as i0 from '@angular/core';
2
- import { OnChanges, ChangeDetectorRef, SimpleChanges, PipeTransform } from '@angular/core';
2
+ import { OnChanges, ChangeDetectorRef, SimpleChanges, PipeTransform, InjectionToken, ValueProvider } from '@angular/core';
3
3
  import * as i7 from '@angular/common';
4
4
  import * as i5 from '@angular/forms';
5
5
  import { ValidatorFn, FormGroup } from '@angular/forms';
6
6
  import { DomSanitizer } from '@angular/platform-browser';
7
+ import { BehaviorSubject, Subscription, Observable } from 'rxjs';
7
8
  import { HttpClient } from '@angular/common/http';
8
- import { BehaviorSubject, Subscription } from 'rxjs';
9
+ import { GraphQLResult } from '@aws-amplify/api-graphql';
9
10
 
10
11
  declare class ErrorComponent implements OnChanges {
11
12
  private cdr;
@@ -85,6 +86,113 @@ declare class SnugdeskCoreModule {
85
86
  static ɵinj: i0.ɵɵInjectorDeclaration<SnugdeskCoreModule>;
86
87
  }
87
88
 
89
+ declare class SnugdeskIPRegistryService {
90
+ private http;
91
+ private readonly IP_REGISTRY_API;
92
+ private readonly SESSION_KEY;
93
+ constructor(http: HttpClient);
94
+ private get cachedIPDetails();
95
+ private set cachedIPDetails(value);
96
+ getIPDetails(): Promise<any>;
97
+ static ɵfac: i0.ɵɵFactoryDeclaration<SnugdeskIPRegistryService, never>;
98
+ static ɵprov: i0.ɵɵInjectableDeclaration<SnugdeskIPRegistryService>;
99
+ }
100
+
101
+ declare class SnugdeskAuthenticationHelperService {
102
+ private httpClient;
103
+ private ipRegistryService;
104
+ private readonly headers;
105
+ private readonly authEndpointURL;
106
+ constructor(httpClient: HttpClient, ipRegistryService: SnugdeskIPRegistryService);
107
+ getSessionToken(tenantId: string, userId: string): Promise<any>;
108
+ static ɵfac: i0.ɵɵFactoryDeclaration<SnugdeskAuthenticationHelperService, never>;
109
+ static ɵprov: i0.ɵɵInjectableDeclaration<SnugdeskAuthenticationHelperService>;
110
+ }
111
+
112
+ declare class SnugdeskAuthenticationService {
113
+ private authenticationHelperService;
114
+ isAuthenticated$: BehaviorSubject<boolean>;
115
+ tenant$: BehaviorSubject<any>;
116
+ user$: BehaviorSubject<any>;
117
+ userSession$: BehaviorSubject<any>;
118
+ tenantSubscription: Subscription;
119
+ userSubscription: Subscription;
120
+ userSessionSubscription: Subscription;
121
+ private readonly jwtHelper;
122
+ private readonly TOKEN_KEY;
123
+ constructor(authenticationHelperService: SnugdeskAuthenticationHelperService);
124
+ getToken(): string | null;
125
+ setToken(token: string): void;
126
+ checkToken(token: string): boolean;
127
+ getDecodedToken(): any;
128
+ getTenantId(): string;
129
+ getUserId(): string;
130
+ getUserSessionId(): string;
131
+ getUserPreferences(): any;
132
+ isAuthenticated(): boolean;
133
+ authenticate(token?: string, tenantId?: string, userId?: string): Promise<boolean>;
134
+ login(tenantId: string, userId: string): Promise<Boolean>;
135
+ logout(userSessionId?: string): Promise<void>;
136
+ endUserSession(userSessionId?: string): Promise<void>;
137
+ static ɵfac: i0.ɵɵFactoryDeclaration<SnugdeskAuthenticationService, never>;
138
+ static ɵprov: i0.ɵɵInjectableDeclaration<SnugdeskAuthenticationService>;
139
+ }
140
+
141
+ interface AmplifyConfig {
142
+ aws_project_region: string;
143
+ aws_appsync_graphqlEndpoint: string;
144
+ aws_appsync_region: string;
145
+ aws_appsync_authenticationType: string;
146
+ aws_appsync_apiKey?: string;
147
+ }
148
+ declare const AMPLIFY_CONFIG: InjectionToken<AmplifyConfig>;
149
+ declare function provideAmplifyConfig(config: AmplifyConfig): ValueProvider;
150
+ declare class AppSyncHelperService {
151
+ private readonly authenticationService;
152
+ private configured;
153
+ private authMode;
154
+ private readonly amplifyConfig?;
155
+ constructor(amplifyConfig: AmplifyConfig | null, authenticationService: SnugdeskAuthenticationService);
156
+ query<T>(statement: string, variables?: Record<string, unknown>): Promise<GraphQLResult<T>>;
157
+ mutate<T>(statement: string, variables?: Record<string, unknown>): Promise<GraphQLResult<T>>;
158
+ subscribe<T>(statement: string, variables?: Record<string, unknown>): Observable<GraphQLResult<T>>;
159
+ private ensureConfigured;
160
+ private getHostConfig;
161
+ private normalizeAuthMode;
162
+ private getAuthModeFromConfig;
163
+ private buildAuthHeaders;
164
+ private getToken;
165
+ static ɵfac: i0.ɵɵFactoryDeclaration<AppSyncHelperService, [{ optional: true; }, null]>;
166
+ static ɵprov: i0.ɵɵInjectableDeclaration<AppSyncHelperService>;
167
+ }
168
+
169
+ interface S3Credentials {
170
+ accessKeyId: string;
171
+ secretAccessKey: string;
172
+ }
173
+ interface S3Config {
174
+ region: string;
175
+ credentials: S3Credentials;
176
+ }
177
+ declare class S3HelperService {
178
+ private http;
179
+ private readonly API_BASE;
180
+ private readonly jwt;
181
+ constructor(http: HttpClient);
182
+ getS3Config(token: string, region: string): Promise<S3Config>;
183
+ /**
184
+ * Validates and decodes the JWT token.
185
+ * @throws Error if the token is empty, expired, or invalid.
186
+ * @returns The decoded JWT payload.
187
+ */
188
+ private parseToken;
189
+ private fetchEncryptedCredentials;
190
+ private base64ToBytes;
191
+ private decryptCredentials;
192
+ static ɵfac: i0.ɵɵFactoryDeclaration<S3HelperService, never>;
193
+ static ɵprov: i0.ɵɵInjectableDeclaration<S3HelperService>;
194
+ }
195
+
88
196
  declare enum ModelAttributeTypes {
89
197
  binary = "binary",
90
198
  binarySet = "binarySet",
@@ -183,6 +291,27 @@ type ModelStringKeyConditionInput = {
183
291
  between?: Array<string | null> | null;
184
292
  beginsWith?: string | null;
185
293
  };
294
+ type List<T> = {
295
+ items: Array<T | null>;
296
+ nextToken?: string | null;
297
+ };
298
+ interface SubscriptionResponse<T> {
299
+ value: GraphQLResult<T>;
300
+ }
301
+ type Country = {
302
+ code: string;
303
+ nameEn: string;
304
+ nameLocal?: string | null;
305
+ currency?: CountryCurrency | null;
306
+ officialLanguage?: Language | null;
307
+ callingCode?: string | null;
308
+ region?: string | null;
309
+ flag?: string | null;
310
+ };
311
+ type CountryCurrency = {
312
+ code: string;
313
+ nameEn: string;
314
+ };
186
315
  type Language = {
187
316
  code: string;
188
317
  nameEn: string;
@@ -202,146 +331,279 @@ type S3Object = {
202
331
  location: string;
203
332
  };
204
333
 
205
- declare class SnugdeskIPRegistryService {
206
- private http;
207
- private readonly IP_REGISTRY_API;
208
- private readonly SESSION_KEY;
209
- constructor(http: HttpClient);
210
- private get cachedIPDetails();
211
- private set cachedIPDetails(value);
212
- getIPDetails(): Promise<any>;
213
- static ɵfac: i0.ɵɵFactoryDeclaration<SnugdeskIPRegistryService, never>;
214
- static ɵprov: i0.ɵɵInjectableDeclaration<SnugdeskIPRegistryService>;
215
- }
216
-
217
- declare class SnugdeskAuthenticationHelperService {
218
- private httpClient;
219
- private ipRegistryService;
220
- private readonly headers;
221
- private readonly authEndpointURL;
222
- constructor(httpClient: HttpClient, ipRegistryService: SnugdeskIPRegistryService);
223
- getSessionToken(tenantId: string, userId: string): Promise<any>;
224
- static ɵfac: i0.ɵɵFactoryDeclaration<SnugdeskAuthenticationHelperService, never>;
225
- static ɵprov: i0.ɵɵInjectableDeclaration<SnugdeskAuthenticationHelperService>;
226
- }
227
-
228
- declare class SnugdeskAuthenticationService {
229
- private authHelperService;
230
- isAuthenticated$: BehaviorSubject<boolean>;
231
- tenant$: BehaviorSubject<any>;
232
- user$: BehaviorSubject<any>;
233
- userSession$: BehaviorSubject<any>;
234
- tenantSubscription: Subscription;
235
- userSubscription: Subscription;
236
- userSessionSubscription: Subscription;
237
- private readonly jwtHelper;
238
- private readonly TOKEN_KEY;
239
- constructor(authHelperService: SnugdeskAuthenticationHelperService);
240
- getToken(): string | null;
241
- setToken(token: string): void;
242
- checkToken(token: string): boolean;
243
- getDecodedToken(): any;
244
- getTenantId(): string;
245
- getUserId(): string;
246
- getUserSessionId(): string;
247
- getUserPreferences(): any;
248
- isAuthenticated(): boolean;
249
- authenticate(token?: string, tenantId?: string, userId?: string): Promise<boolean>;
250
- login(tenantId: string, userId: string): Promise<Boolean>;
251
- logout(userSessionId?: string): Promise<void>;
252
- endUserSession(userSessionId?: string): Promise<void>;
253
- static ɵfac: i0.ɵɵFactoryDeclaration<SnugdeskAuthenticationService, never>;
254
- static ɵprov: i0.ɵɵInjectableDeclaration<SnugdeskAuthenticationService>;
255
- }
256
-
257
- declare class GraphQLHelperService {
258
- private http;
259
- private authenticationService;
260
- private readonly GRAPHQL_API;
261
- constructor(http: HttpClient, authenticationService: SnugdeskAuthenticationService);
262
- /**
263
- * Executes a GraphQL query with the provided variables.
264
- * @param query The GraphQL query string.
265
- * @param variables Optional variables for the query.
266
- * @returns A promise that resolves with the response data.
267
- */
268
- executeQuery(query: string, variables?: any): Promise<any>;
269
- static ɵfac: i0.ɵɵFactoryDeclaration<GraphQLHelperService, never>;
270
- static ɵprov: i0.ɵɵInjectableDeclaration<GraphQLHelperService>;
271
- }
272
-
273
- interface S3Credentials {
274
- accessKeyId: string;
275
- secretAccessKey: string;
276
- }
277
- interface S3Config {
278
- region: string;
279
- credentials: S3Credentials;
280
- }
281
- declare class S3HelperService {
282
- private http;
283
- private readonly API_BASE;
284
- private readonly jwt;
285
- constructor(http: HttpClient);
286
- getS3Config(token: string, region: string): Promise<S3Config>;
287
- /**
288
- * Validates and decodes the JWT token.
289
- * @throws Error if the token is empty, expired, or invalid.
290
- * @returns The decoded JWT payload.
291
- */
292
- private parseToken;
293
- private fetchEncryptedCredentials;
294
- private base64ToBytes;
295
- private decryptCredentials;
296
- static ɵfac: i0.ɵɵFactoryDeclaration<S3HelperService, never>;
297
- static ɵprov: i0.ɵɵInjectableDeclaration<S3HelperService>;
334
+ type Entity = {
335
+ id: string;
336
+ externalId?: string | null;
337
+ tenantId: string;
338
+ name: string;
339
+ image?: S3Object | null;
340
+ email?: string | null;
341
+ phoneNumber?: PhoneNumber | null;
342
+ phoneNumberE164?: string | null;
343
+ preferences?: EntityPreferences | null;
344
+ contactPreferences?: EntityContactPreferences | null;
345
+ createdAt: number;
346
+ updatedAt: number;
347
+ blockedAt?: number | null;
348
+ deletedAt?: number | null;
349
+ };
350
+ type EntityPreferences = {
351
+ timezoneName?: string | null;
352
+ language?: Language | null;
353
+ };
354
+ type EntityContactPreferences = {
355
+ allowCall?: boolean | null;
356
+ allowEmail?: boolean | null;
357
+ allowSMS?: boolean | null;
358
+ allowWhatsApp?: boolean | null;
359
+ };
360
+ type CreateEntityInput = {
361
+ id?: string | null;
362
+ externalId?: string | null;
363
+ tenantId: string;
364
+ name: string;
365
+ image?: S3Object | null;
366
+ email?: string | null;
367
+ phoneNumber?: PhoneNumber | null;
368
+ phoneNumberE164?: string | null;
369
+ isOrganization: boolean;
370
+ createdAt: number;
371
+ updatedAt: number;
372
+ blockedAt?: number | null;
373
+ deletedAt?: number | null;
374
+ updatedByUserId: string;
375
+ updatedByUserSessionId?: string | null;
376
+ };
377
+ type UpdateEntityInput = {
378
+ id: string;
379
+ externalId?: string | null;
380
+ tenantId?: string | null;
381
+ name?: string | null;
382
+ image?: S3Object | null;
383
+ email?: string | null;
384
+ phoneNumber?: PhoneNumber | null;
385
+ phoneNumberE164?: string | null;
386
+ isOrganization?: boolean | null;
387
+ createdAt?: number | null;
388
+ updatedAt: number;
389
+ blockedAt?: number | null;
390
+ deletedAt?: number | null;
391
+ updatedByUserId?: string | null;
392
+ updatedByUserSessionId?: string | null;
393
+ };
394
+ type ModelEntityConditionInput = {
395
+ externalId?: ModelStringInput | null;
396
+ tenantId?: ModelIDInput | null;
397
+ entityTypeId?: ModelIDInput | null;
398
+ parentId?: ModelIDInput | null;
399
+ name?: ModelStringInput | null;
400
+ email?: ModelStringInput | null;
401
+ phoneNumberE164?: ModelStringInput | null;
402
+ isOrganization?: ModelBooleanInput | null;
403
+ createdAt?: ModelIntInput | null;
404
+ updatedAt?: ModelIntInput | null;
405
+ blockedAt?: ModelIntInput | null;
406
+ deletedAt?: ModelIntInput | null;
407
+ and?: Array<ModelEntityConditionInput | null> | null;
408
+ or?: Array<ModelEntityConditionInput | null> | null;
409
+ not?: ModelEntityConditionInput | null;
410
+ };
411
+ type ModelEntityFilterInput = {
412
+ id?: ModelIDInput | null;
413
+ externalId?: ModelStringInput | null;
414
+ tenantId?: ModelIDInput | null;
415
+ entityTypeId?: ModelIDInput | null;
416
+ parentId?: ModelIDInput | null;
417
+ name?: ModelStringInput | null;
418
+ email?: ModelStringInput | null;
419
+ phoneNumberE164?: ModelStringInput | null;
420
+ isOrganization?: ModelBooleanInput | null;
421
+ createdAt?: ModelIntInput | null;
422
+ updatedAt?: ModelIntInput | null;
423
+ blockedAt?: ModelIntInput | null;
424
+ deletedAt?: ModelIntInput | null;
425
+ and?: Array<ModelEntityFilterInput | null> | null;
426
+ or?: Array<ModelEntityFilterInput | null> | null;
427
+ not?: ModelEntityFilterInput | null;
428
+ };
429
+ declare class EntityService {
430
+ private readonly appSyncService;
431
+ constructor(appSyncService: AppSyncHelperService);
432
+ GetEntity(id: string): Promise<Entity>;
433
+ CreateEntity(input: CreateEntityInput, condition?: ModelEntityConditionInput): Promise<Entity>;
434
+ UpdateEntity(input: UpdateEntityInput, condition?: ModelEntityConditionInput): Promise<Entity>;
435
+ ListEntitiesByTenantId(tenantId: string, name?: ModelStringKeyConditionInput, sortDirection?: ModelSortDirection, filter?: ModelEntityFilterInput, limit?: number, nextToken?: string): Promise<List<Entity>>;
436
+ ListEntitiesByTenantIdAndPhoneNumberE164(tenantId: string, phoneNumberE164?: ModelStringKeyConditionInput, sortDirection?: ModelSortDirection, filter?: ModelEntityFilterInput, limit?: number, nextToken?: string): Promise<List<Entity>>;
437
+ static ɵfac: i0.ɵɵFactoryDeclaration<EntityService, never>;
438
+ static ɵprov: i0.ɵɵInjectableDeclaration<EntityService>;
298
439
  }
299
440
 
441
+ type TenantPreferences = {
442
+ timezoneName?: string | null;
443
+ language?: Language | null;
444
+ allowUserToChangePreferences?: boolean | null;
445
+ };
446
+ type TenantSecurity = {
447
+ domainValidationTokenExpiry?: number | null;
448
+ userValidationTokenExpiry?: number | null;
449
+ secretTokenExpiry?: number | null;
450
+ sessionTokenExpiry?: number | null;
451
+ sessionIdleTimeout?: number | null;
452
+ };
300
453
  type Tenant = {
301
454
  id: string;
455
+ externalId?: string | null;
302
456
  tenantDomain: string;
303
457
  organizationName: string;
304
458
  websiteURL?: string | null;
305
- image?: {
306
- key: string;
307
- bucket: string;
308
- location: string;
309
- } | null;
310
- preferences?: {
311
- timezoneName?: string | null;
312
- language?: Language | null;
313
- allowUserToChangePreferences?: boolean | null;
314
- } | null;
315
- security?: {
316
- domainValidationTokenExpiry?: number | null;
317
- userValidationTokenExpiry?: number | null;
318
- secretTokenExpiry?: number | null;
319
- sessionTokenExpiry?: number | null;
320
- sessionIdleTimeout?: number | null;
321
- } | null;
459
+ image?: S3Object | null;
460
+ preferences?: TenantPreferences | null;
461
+ security?: TenantSecurity | null;
322
462
  activatedAt?: number | null;
323
463
  blockedAt?: number | null;
324
464
  createdAt: number;
325
465
  updatedAt: number;
326
466
  deletedAt?: number | null;
327
- interactionWidgets?: {
328
- nextToken?: string | null;
329
- } | null;
467
+ };
468
+ type __SubscriptionContainer$4 = {
469
+ OnTenantById: Tenant;
330
470
  };
331
471
  declare class TenantService {
332
- private graphQLHelperService;
333
- constructor(graphQLHelperService: GraphQLHelperService);
472
+ private readonly appSyncService;
473
+ constructor(appSyncService: AppSyncHelperService);
334
474
  getTenantById(id: string): Promise<Tenant>;
335
475
  private GetTenant;
476
+ OnTenantByIdListener(id: string): Observable<SubscriptionResponse<Pick<__SubscriptionContainer$4, 'OnTenantById'>>>;
336
477
  static ɵfac: i0.ɵɵFactoryDeclaration<TenantService, never>;
337
478
  static ɵprov: i0.ɵɵInjectableDeclaration<TenantService>;
338
479
  }
339
480
 
340
- declare enum UserType {
341
- AGENT = "AGENT",
342
- SUPERVISOR = "SUPERVISOR",
343
- ADMINISTRATOR = "ADMINISTRATOR"
481
+ type InteractionWidget = {
482
+ id: string;
483
+ tenantId: string;
484
+ tenant?: Tenant | null;
485
+ channel: InteractionChannel;
486
+ provider: InteractionProvider;
487
+ providerAccountId?: string | null;
488
+ name: string;
489
+ description?: string | null;
490
+ configuration?: string | null;
491
+ isRecordingEnabledByDefault: boolean;
492
+ isRecordingEnabledOnDemand: boolean;
493
+ isTranscriptionEnabledByDefault: boolean;
494
+ isTranscriptionEnabledOnDemand: boolean;
495
+ routeConfiguration?: InteractionRouteConfiguration | null;
496
+ createdAt: number;
497
+ updatedAt: number;
498
+ deletedAt?: number | null;
499
+ };
500
+ type ModelInteractionWidgetConditionInput = {
501
+ tenantId?: ModelIDInput | null;
502
+ channel?: ModelInteractionChannelInput | null;
503
+ provider?: ModelInteractionProviderInput | null;
504
+ providerAccountId?: ModelStringInput | null;
505
+ name?: ModelStringInput | null;
506
+ description?: ModelStringInput | null;
507
+ configuration?: ModelStringInput | null;
508
+ isRecordingEnabledByDefault?: ModelBooleanInput | null;
509
+ isRecordingEnabledOnDemand?: ModelBooleanInput | null;
510
+ isTranscriptionEnabledByDefault?: ModelBooleanInput | null;
511
+ isTranscriptionEnabledOnDemand?: ModelBooleanInput | null;
512
+ createdAt?: ModelIntInput | null;
513
+ updatedAt?: ModelIntInput | null;
514
+ updatedByUserId?: ModelIDInput | null;
515
+ updatedByUserSessionId?: ModelIDInput | null;
516
+ deletedAt?: ModelIntInput | null;
517
+ and?: Array<ModelInteractionWidgetConditionInput | null> | null;
518
+ or?: Array<ModelInteractionWidgetConditionInput | null> | null;
519
+ not?: ModelInteractionWidgetConditionInput | null;
520
+ };
521
+ type ModelInteractionWidgetFilterInput = {
522
+ id?: ModelIDInput | null;
523
+ tenantId?: ModelIDInput | null;
524
+ channel?: ModelInteractionChannelInput | null;
525
+ provider?: ModelInteractionProviderInput | null;
526
+ providerAccountId?: ModelStringInput | null;
527
+ name?: ModelStringInput | null;
528
+ description?: ModelStringInput | null;
529
+ configuration?: ModelStringInput | null;
530
+ isRecordingEnabledByDefault?: ModelBooleanInput | null;
531
+ isRecordingEnabledOnDemand?: ModelBooleanInput | null;
532
+ isTranscriptionEnabledByDefault?: ModelBooleanInput | null;
533
+ isTranscriptionEnabledOnDemand?: ModelBooleanInput | null;
534
+ createdAt?: ModelIntInput | null;
535
+ updatedAt?: ModelIntInput | null;
536
+ updatedByUserId?: ModelIDInput | null;
537
+ updatedByUserSessionId?: ModelIDInput | null;
538
+ deletedAt?: ModelIntInput | null;
539
+ and?: Array<ModelInteractionWidgetFilterInput | null> | null;
540
+ or?: Array<ModelInteractionWidgetFilterInput | null> | null;
541
+ not?: ModelInteractionWidgetFilterInput | null;
542
+ };
543
+ declare const FIELDS_INTERACTION_WIDGET = "\n id\n tenantId\n channel\n provider\n providerAccountId\n name\n description\n configuration\n isRecordingEnabledByDefault\n isRecordingEnabledOnDemand\n isTranscriptionEnabledByDefault\n isTranscriptionEnabledOnDemand\n routeConfiguration {\n teamId\n routingLogic\n maxWaitTimeoutSeconds\n }\n createdAt\n updatedAt\n deletedAt\n";
544
+ declare class InteractionWidgetService {
545
+ private readonly appSyncService;
546
+ constructor(appSyncService: AppSyncHelperService);
547
+ GetInteractionWidget(id: string): Promise<InteractionWidget>;
548
+ ListInteractionWidgetsByTenantId(tenantId: string, name?: ModelStringKeyConditionInput, sortDirection?: ModelSortDirection, filter?: ModelInteractionWidgetFilterInput, limit?: number, nextToken?: string): Promise<List<InteractionWidget>>;
549
+ static ɵfac: i0.ɵɵFactoryDeclaration<InteractionWidgetService, never>;
550
+ static ɵprov: i0.ɵɵInjectableDeclaration<InteractionWidgetService>;
551
+ }
552
+
553
+ type InteractionEndpoint = {
554
+ id: string;
555
+ externalId: string;
556
+ tenantId: string;
557
+ widgetId: string;
558
+ widget?: InteractionWidget | null;
559
+ address: string;
560
+ configuration?: string | null;
561
+ sellPrice?: InteractionEndpointPriceDetails | null;
562
+ documents?: Array<InteractionEndpointRegulatoryComplianceDocument | null> | null;
563
+ createdAt: number;
564
+ updatedAt: number;
565
+ deletedAt?: number | null;
566
+ };
567
+ type InteractionEndpointPriceDetails = {
568
+ currency: string;
569
+ upfrontCost: number;
570
+ monthlyCost: number;
571
+ inboundCost: number;
572
+ outboundCost: number;
573
+ };
574
+ type InteractionEndpointRegulatoryComplianceDocument = {
575
+ fileName: string;
576
+ documentType?: string | null;
577
+ contentType?: string | null;
578
+ file?: S3Object | null;
579
+ };
580
+ declare class InteractionEndpointService {
581
+ static ɵfac: i0.ɵɵFactoryDeclaration<InteractionEndpointService, never>;
582
+ static ɵprov: i0.ɵɵInjectableDeclaration<InteractionEndpointService>;
344
583
  }
584
+
585
+ type Team = {
586
+ id: string;
587
+ tenantId: string;
588
+ name: string;
589
+ description?: string | null;
590
+ image?: S3Object | null;
591
+ ticketFields?: Array<string | null> | null;
592
+ createdAt: number;
593
+ updatedAt: number;
594
+ deletedAt?: number | null;
595
+ };
596
+
597
+ type UserPreferences = {
598
+ timezoneName?: string | null;
599
+ language?: Language | null;
600
+ };
601
+ type UserNotificationSettings = {
602
+ allowPush?: boolean | null;
603
+ allowEmail?: boolean | null;
604
+ allowSMS?: boolean | null;
605
+ allowWhatsApp?: boolean | null;
606
+ };
345
607
  declare enum UserStatus {
346
608
  READY = "READY",
347
609
  NOT_READY = "NOT_READY",
@@ -349,34 +611,21 @@ declare enum UserStatus {
349
611
  BUSY = "BUSY",
350
612
  AFTER_CALL_WORK = "AFTER_CALL_WORK"
351
613
  }
614
+ declare enum UserType {
615
+ AGENT = "AGENT",
616
+ SUPERVISOR = "SUPERVISOR",
617
+ ADMINISTRATOR = "ADMINISTRATOR"
618
+ }
352
619
  type User = {
353
620
  id: string;
621
+ externalId?: string | null;
354
622
  tenantId: string;
355
623
  email: string;
356
624
  name?: string | null;
357
- image?: {
358
- key: string;
359
- bucket: string;
360
- location: string;
361
- } | null;
362
- phoneNumber?: {
363
- countryCode?: string | null;
364
- dialCode?: string | null;
365
- e164Number?: string | null;
366
- internationalNumber?: string | null;
367
- nationalNumber?: string | null;
368
- number?: string | null;
369
- } | null;
370
- preferences?: {
371
- timezoneName?: string | null;
372
- language?: Language | null;
373
- } | null;
374
- notificationSettings?: {
375
- allowPush?: boolean | null;
376
- allowEmail?: boolean | null;
377
- allowSMS?: boolean | null;
378
- allowWhatsApp?: boolean | null;
379
- } | null;
625
+ image?: S3Object | null;
626
+ phoneNumber?: PhoneNumber | null;
627
+ preferences?: UserPreferences | null;
628
+ notificationSettings?: UserNotificationSettings | null;
380
629
  type?: UserType | null;
381
630
  activatedAt?: number | null;
382
631
  blockedAt?: number | null;
@@ -384,15 +633,710 @@ type User = {
384
633
  updatedAt: number;
385
634
  deletedAt?: number | null;
386
635
  };
636
+ type ModelUserStatusInput = {
637
+ eq?: UserStatus | null;
638
+ ne?: UserStatus | null;
639
+ };
640
+ type __SubscriptionContainer$3 = {
641
+ OnUserById: User;
642
+ };
387
643
  declare class UserService {
388
- private graphQLHelperService;
389
- constructor(graphQLHelperService: GraphQLHelperService);
644
+ private readonly appSyncService;
645
+ constructor(appSyncService: AppSyncHelperService);
390
646
  getUserById(id: string): Promise<User>;
391
647
  GetUser(id: string): Promise<User>;
648
+ OnUserByIdListener(id: string): Observable<SubscriptionResponse<Pick<__SubscriptionContainer$3, 'OnUserById'>>>;
392
649
  static ɵfac: i0.ɵɵFactoryDeclaration<UserService, never>;
393
650
  static ɵprov: i0.ɵɵInjectableDeclaration<UserService>;
394
651
  }
395
652
 
653
+ type UserSession = {
654
+ id: string;
655
+ tenantId: string;
656
+ userId: string;
657
+ user?: User | null;
658
+ ipDetails?: string | null;
659
+ status?: UserStatus | null;
660
+ teamIds?: Array<string | null> | null;
661
+ temp_isLocked?: boolean | null;
662
+ temp_isAvailableTenantIdUnion?: string | null;
663
+ createdAt: number;
664
+ updatedAt: number;
665
+ expiryAt: number;
666
+ loggedOutAt?: number | null;
667
+ blockedAt?: number | null;
668
+ };
669
+ type UpdateUserSessionInput = {
670
+ id: string;
671
+ tenantId?: string | null;
672
+ userId?: string | null;
673
+ ipDetails?: string | null;
674
+ status?: UserStatus | null;
675
+ teamIds?: Array<string | null> | null;
676
+ temp_isLocked?: boolean | null;
677
+ temp_isAvailableTenantIdUnion?: string | null;
678
+ createdAt?: number | null;
679
+ updatedAt?: number | null;
680
+ expiryAt?: number | null;
681
+ loggedOutAt?: number | null;
682
+ blockedAt?: number | null;
683
+ };
684
+ type ModelUserSessionConditionInput = {
685
+ tenantId?: ModelIDInput | null;
686
+ userId?: ModelIDInput | null;
687
+ ipDetails?: ModelStringInput | null;
688
+ status?: ModelUserStatusInput | null;
689
+ teamIds?: ModelStringInput | null;
690
+ temp_isLocked?: ModelBooleanInput | null;
691
+ temp_isAvailableTenantIdUnion?: ModelStringInput | null;
692
+ createdAt?: ModelIntInput | null;
693
+ updatedAt?: ModelIntInput | null;
694
+ expiryAt?: ModelIntInput | null;
695
+ loggedOutAt?: ModelIntInput | null;
696
+ blockedAt?: ModelIntInput | null;
697
+ and?: Array<ModelUserSessionConditionInput | null> | null;
698
+ or?: Array<ModelUserSessionConditionInput | null> | null;
699
+ not?: ModelUserSessionConditionInput | null;
700
+ };
701
+ type ModelUserSessionFilterInput = {
702
+ id?: ModelIDInput | null;
703
+ tenantId?: ModelIDInput | null;
704
+ userId?: ModelIDInput | null;
705
+ ipDetails?: ModelStringInput | null;
706
+ status?: ModelUserStatusInput | null;
707
+ teamIds?: ModelStringInput | null;
708
+ temp_isLocked?: ModelBooleanInput | null;
709
+ temp_isAvailableTenantIdUnion?: ModelStringInput | null;
710
+ createdAt?: ModelIntInput | null;
711
+ updatedAt?: ModelIntInput | null;
712
+ expiryAt?: ModelIntInput | null;
713
+ loggedOutAt?: ModelIntInput | null;
714
+ blockedAt?: ModelIntInput | null;
715
+ and?: Array<ModelUserSessionFilterInput | null> | null;
716
+ or?: Array<ModelUserSessionFilterInput | null> | null;
717
+ not?: ModelUserSessionFilterInput | null;
718
+ };
719
+ type __SubscriptionContainer$2 = {
720
+ OnUserSessionById: UserSession;
721
+ };
722
+ declare class UserSessionService {
723
+ private readonly appSyncService;
724
+ constructor(appSyncService: AppSyncHelperService);
725
+ getUserSessionById(id: string): Promise<UserSession>;
726
+ GetUserSession(id: string): Promise<UserSession>;
727
+ ListUserSessionsByUserId(userId: string, createdAt?: ModelIntKeyConditionInput, sortDirection?: ModelSortDirection, filter?: ModelUserSessionFilterInput, limit?: number, nextToken?: string): Promise<List<UserSession>>;
728
+ UpdateUserSession(input: UpdateUserSessionInput, condition?: ModelUserSessionConditionInput): Promise<UserSession>;
729
+ OnUserSessionByIdListener(id: string): Observable<SubscriptionResponse<Pick<__SubscriptionContainer$2, 'OnUserSessionById'>>>;
730
+ static ɵfac: i0.ɵɵFactoryDeclaration<UserSessionService, never>;
731
+ static ɵprov: i0.ɵɵInjectableDeclaration<UserSessionService>;
732
+ }
733
+
734
+ declare enum InteractionChannel {
735
+ EMAIL = "EMAIL",
736
+ PHONE = "PHONE",
737
+ SMS = "SMS",
738
+ WEB_CHAT = "WEB_CHAT",
739
+ SOCIAL_CHAT = "SOCIAL_CHAT"
740
+ }
741
+ declare enum InteractionContext {
742
+ INTERNAL = "INTERNAL",
743
+ EXTERNAL = "EXTERNAL"
744
+ }
745
+ declare enum InteractionDirection {
746
+ IN = "IN",
747
+ OUT = "OUT"
748
+ }
749
+ declare enum InteractionStatus {
750
+ INITIATED = "INITIATED",
751
+ QUEUED = "QUEUED",
752
+ RINGING = "RINGING",
753
+ CONNECTED_TO_AGENT = "CONNECTED_TO_AGENT",
754
+ CONNECTED_TO_BOT = "CONNECTED_TO_BOT",
755
+ HELD = "HELD",
756
+ DISCONNECTED = "DISCONNECTED",
757
+ CANCELLED = "CANCELLED",
758
+ REJECTED = "REJECTED",
759
+ NO_ANSWER = "NO_ANSWER",
760
+ MISSED = "MISSED",
761
+ FAILED = "FAILED"
762
+ }
763
+ declare enum InteractionProvider {
764
+ AVAYA_IPO = "AVAYA_IPO",
765
+ TELNYX = "TELNYX",
766
+ WHATSAPP = "WHATSAPP",
767
+ TELEGRAM = "TELEGRAM",
768
+ SNUGDESK = "SNUGDESK"
769
+ }
770
+ type InteractionRouteConfiguration = {
771
+ teamId?: string | null;
772
+ routingLogic?: InteractionRouteLogic | null;
773
+ maxWaitTimeoutSeconds?: number | null;
774
+ };
775
+ declare enum InteractionRouteLogic {
776
+ MOST_IDLE_AGENT = "MOST_IDLE_AGENT",
777
+ PARALLEL = "PARALLEL"
778
+ }
779
+ type Interaction = {
780
+ id: string;
781
+ tenantId: string;
782
+ widgetId: string;
783
+ widget?: InteractionWidget | null;
784
+ endpointId: string;
785
+ endpoint?: InteractionEndpoint | null;
786
+ entityConversationId?: string | null;
787
+ entityConversation?: EntityConversation | null;
788
+ entityId?: string | null;
789
+ entity?: Entity | null;
790
+ teamId?: string | null;
791
+ team?: Team | null;
792
+ hostId?: string | null;
793
+ host?: InteractionHost | null;
794
+ providerInteractionId?: string | null;
795
+ channel: InteractionChannel;
796
+ provider: InteractionProvider;
797
+ context: InteractionContext;
798
+ direction: InteractionDirection;
799
+ status?: InteractionStatus | null;
800
+ last_status?: InteractionStatus | null;
801
+ metadata?: string | null;
802
+ subject?: string | null;
803
+ routeConfiguration?: InteractionRouteConfiguration | null;
804
+ startedAt?: number | null;
805
+ completedAt?: number | null;
806
+ duration?: number | null;
807
+ summary?: string | null;
808
+ createdAt: number;
809
+ updatedAt: number;
810
+ deletedAt?: number | null;
811
+ };
812
+ type InteractionHost = {
813
+ id: string;
814
+ interactionId: string;
815
+ interaction?: Interaction | null;
816
+ entityId?: string | null;
817
+ entity?: Entity | null;
818
+ teamId?: string | null;
819
+ team?: Team | null;
820
+ userId?: string | null;
821
+ user?: User | null;
822
+ createdAt: number;
823
+ updatedAt: number;
824
+ deletedAt?: number | null;
825
+ };
826
+ type InteractionInvitee = {
827
+ id: string;
828
+ interactionId: string;
829
+ interaction?: Interaction | null;
830
+ entityId?: string | null;
831
+ entity?: Entity | null;
832
+ teamId?: string | null;
833
+ team?: Team | null;
834
+ userId?: string | null;
835
+ user?: User | null;
836
+ isAdministrator: boolean;
837
+ temp_expiringAt?: number | null;
838
+ expiredAt?: number | null;
839
+ createdAt: number;
840
+ updatedAt: number;
841
+ deletedAt?: number | null;
842
+ };
843
+ type InteractionAttendee = {
844
+ id: string;
845
+ interactionId: string;
846
+ interaction?: Interaction | null;
847
+ entityId?: string | null;
848
+ entity?: Entity | null;
849
+ interactionWidgetSessionId?: string | null;
850
+ teamId?: string | null;
851
+ team?: Team | null;
852
+ userId?: string | null;
853
+ user?: User | null;
854
+ userSessionId?: string | null;
855
+ userSession?: UserSession | null;
856
+ name: string;
857
+ metadata?: string | null;
858
+ customFields?: Array<string | null> | null;
859
+ isAdministrator: boolean;
860
+ joinedAt?: number | null;
861
+ exitedAt?: number | null;
862
+ createdAt: number;
863
+ updatedAt: number;
864
+ deletedAt?: number | null;
865
+ };
866
+ type InteractionMessage = {
867
+ id: string;
868
+ externalId?: string | null;
869
+ endpointId?: string | null;
870
+ endpoint?: InteractionEndpoint | null;
871
+ campaignId?: string | null;
872
+ campaignFlowNodeId?: string | null;
873
+ entityConversationId: string;
874
+ entityConversation?: EntityConversation | null;
875
+ interactionId: string;
876
+ interaction?: Interaction | null;
877
+ interactionAttendeeId?: string | null;
878
+ interactionAttendee?: InteractionAttendee | null;
879
+ referenceMessageId?: string | null;
880
+ body?: string | null;
881
+ metadata?: string | null;
882
+ createdAt: number;
883
+ updatedAt: number;
884
+ deletedAt?: number | null;
885
+ messageAttachments?: List<InteractionMessageAttachment> | null;
886
+ temp_isSending?: boolean | null;
887
+ };
888
+ type InteractionMessageAttachment = {
889
+ id: string;
890
+ externalId?: string | null;
891
+ interactionId: string;
892
+ interactionMessageId: string;
893
+ name: string;
894
+ size?: number | null;
895
+ type?: string | null;
896
+ file: S3Object;
897
+ createdAt: number;
898
+ updatedAt: number;
899
+ deletedAt?: number | null;
900
+ };
901
+ type CreateInteractionInput = {
902
+ id?: string | null;
903
+ tenantId: string;
904
+ widgetId: string;
905
+ endpointId: string;
906
+ entityConversationId?: string | null;
907
+ entityId?: string | null;
908
+ teamId?: string | null;
909
+ hostId?: string | null;
910
+ providerInteractionId?: string | null;
911
+ channel: InteractionChannel;
912
+ provider: InteractionProvider;
913
+ context: InteractionContext;
914
+ direction: InteractionDirection;
915
+ status?: InteractionStatus | null;
916
+ last_status?: InteractionStatus | null;
917
+ metadata?: string | null;
918
+ subject?: string | null;
919
+ routeConfiguration?: InteractionRouteConfigurationInput | null;
920
+ startedAt?: number | null;
921
+ completedAt?: number | null;
922
+ duration?: number | null;
923
+ summary?: string | null;
924
+ temp_isLocked?: boolean | null;
925
+ temp_isAvailableTenantIdUnion?: string | null;
926
+ createdAt: number;
927
+ updatedAt: number;
928
+ deletedAt?: number | null;
929
+ };
930
+ type UpdateInteractionInput = {
931
+ id: string;
932
+ tenantId?: string | null;
933
+ widgetId?: string | null;
934
+ endpointId?: string | null;
935
+ entityConversationId?: string | null;
936
+ entityId?: string | null;
937
+ teamId?: string | null;
938
+ hostId?: string | null;
939
+ providerInteractionId?: string | null;
940
+ channel?: InteractionChannel | null;
941
+ provider?: InteractionProvider | null;
942
+ context?: InteractionContext | null;
943
+ direction?: InteractionDirection | null;
944
+ status?: InteractionStatus | null;
945
+ last_status?: InteractionStatus | null;
946
+ metadata?: string | null;
947
+ subject?: string | null;
948
+ routeConfiguration?: InteractionRouteConfigurationInput | null;
949
+ startedAt?: number | null;
950
+ completedAt?: number | null;
951
+ duration?: number | null;
952
+ summary?: string | null;
953
+ temp_isLocked?: boolean | null;
954
+ temp_isAvailableTenantIdUnion?: string | null;
955
+ createdAt?: number | null;
956
+ updatedAt?: number | null;
957
+ deletedAt?: number | null;
958
+ };
959
+ type CreateInteractionAttendeeInput = {
960
+ id?: string | null;
961
+ interactionId: string;
962
+ entityId?: string | null;
963
+ interactionWidgetSessionId?: string | null;
964
+ teamId?: string | null;
965
+ userId?: string | null;
966
+ userSessionId?: string | null;
967
+ name: string;
968
+ metadata?: string | null;
969
+ customFields?: Array<string | null> | null;
970
+ isAdministrator: boolean;
971
+ joinedAt?: number | null;
972
+ exitedAt?: number | null;
973
+ createdAt: number;
974
+ updatedAt: number;
975
+ deletedAt?: number | null;
976
+ };
977
+ type CreateInteractionMessageInput = {
978
+ id?: string | null;
979
+ externalId?: string | null;
980
+ endpointId?: string | null;
981
+ campaignId?: string | null;
982
+ campaignFlowNodeId?: string | null;
983
+ entityConversationId: string;
984
+ interactionId: string;
985
+ interactionAttendeeId?: string | null;
986
+ referenceMessageId?: string | null;
987
+ body?: string | null;
988
+ metadata?: string | null;
989
+ createdAt: number;
990
+ updatedAt: number;
991
+ deletedAt?: number | null;
992
+ };
993
+ type CreateInteractionMessageAttachmentInput = {
994
+ id?: string | null;
995
+ externalId?: string | null;
996
+ interactionId: string;
997
+ interactionMessageId: string;
998
+ name: string;
999
+ size?: number | null;
1000
+ type?: string | null;
1001
+ file: S3Object;
1002
+ createdAt: number;
1003
+ updatedAt: number;
1004
+ deletedAt?: number | null;
1005
+ };
1006
+ type ModelInteractionConditionInput = {
1007
+ tenantId?: ModelIDInput | null;
1008
+ widgetId?: ModelIDInput | null;
1009
+ endpointId?: ModelIDInput | null;
1010
+ entityConversationId?: ModelIDInput | null;
1011
+ entityId?: ModelIDInput | null;
1012
+ teamId?: ModelIDInput | null;
1013
+ hostId?: ModelIDInput | null;
1014
+ providerInteractionId?: ModelStringInput | null;
1015
+ channel?: ModelInteractionChannelInput | null;
1016
+ provider?: ModelInteractionProviderInput | null;
1017
+ context?: ModelInteractionContextInput | null;
1018
+ direction?: ModelInteractionDirectionInput | null;
1019
+ status?: ModelInteractionStatusInput | null;
1020
+ last_status?: ModelInteractionStatusInput | null;
1021
+ metadata?: ModelStringInput | null;
1022
+ subject?: ModelStringInput | null;
1023
+ startedAt?: ModelIntInput | null;
1024
+ completedAt?: ModelIntInput | null;
1025
+ duration?: ModelIntInput | null;
1026
+ summary?: ModelStringInput | null;
1027
+ temp_isLocked?: ModelBooleanInput | null;
1028
+ temp_isAvailableTenantIdUnion?: ModelStringInput | null;
1029
+ createdAt?: ModelIntInput | null;
1030
+ updatedAt?: ModelIntInput | null;
1031
+ deletedAt?: ModelIntInput | null;
1032
+ and?: Array<ModelInteractionConditionInput | null> | null;
1033
+ or?: Array<ModelInteractionConditionInput | null> | null;
1034
+ not?: ModelInteractionConditionInput | null;
1035
+ };
1036
+ type ModelInteractionInviteeFilterInput = {
1037
+ id?: ModelIDInput | null;
1038
+ interactionId?: ModelIDInput | null;
1039
+ entityId?: ModelIDInput | null;
1040
+ teamId?: ModelIDInput | null;
1041
+ userId?: ModelIDInput | null;
1042
+ isAdministrator?: ModelBooleanInput | null;
1043
+ temp_expiringAt?: ModelIntInput | null;
1044
+ expiredAt?: ModelIntInput | null;
1045
+ createdAt?: ModelIntInput | null;
1046
+ updatedAt?: ModelIntInput | null;
1047
+ deletedAt?: ModelIntInput | null;
1048
+ and?: Array<ModelInteractionInviteeFilterInput | null> | null;
1049
+ or?: Array<ModelInteractionInviteeFilterInput | null> | null;
1050
+ not?: ModelInteractionInviteeFilterInput | null;
1051
+ };
1052
+ type ModelInteractionAttendeeConditionInput = {
1053
+ interactionId?: ModelIDInput | null;
1054
+ entityId?: ModelIDInput | null;
1055
+ interactionWidgetSessionId?: ModelIDInput | null;
1056
+ teamId?: ModelIDInput | null;
1057
+ userId?: ModelIDInput | null;
1058
+ userSessionId?: ModelIDInput | null;
1059
+ name?: ModelStringInput | null;
1060
+ metadata?: ModelStringInput | null;
1061
+ customFields?: ModelStringInput | null;
1062
+ isAdministrator?: ModelBooleanInput | null;
1063
+ joinedAt?: ModelIntInput | null;
1064
+ exitedAt?: ModelIntInput | null;
1065
+ createdAt?: ModelIntInput | null;
1066
+ updatedAt?: ModelIntInput | null;
1067
+ deletedAt?: ModelIntInput | null;
1068
+ and?: Array<ModelInteractionAttendeeConditionInput | null> | null;
1069
+ or?: Array<ModelInteractionAttendeeConditionInput | null> | null;
1070
+ not?: ModelInteractionAttendeeConditionInput | null;
1071
+ };
1072
+ type ModelInteractionAttendeeFilterInput = {
1073
+ id?: ModelIDInput | null;
1074
+ interactionId?: ModelIDInput | null;
1075
+ entityId?: ModelIDInput | null;
1076
+ interactionWidgetSessionId?: ModelIDInput | null;
1077
+ teamId?: ModelIDInput | null;
1078
+ userId?: ModelIDInput | null;
1079
+ userSessionId?: ModelIDInput | null;
1080
+ name?: ModelStringInput | null;
1081
+ metadata?: ModelStringInput | null;
1082
+ customFields?: ModelStringInput | null;
1083
+ isAdministrator?: ModelBooleanInput | null;
1084
+ joinedAt?: ModelIntInput | null;
1085
+ exitedAt?: ModelIntInput | null;
1086
+ createdAt?: ModelIntInput | null;
1087
+ updatedAt?: ModelIntInput | null;
1088
+ deletedAt?: ModelIntInput | null;
1089
+ and?: Array<ModelInteractionAttendeeFilterInput | null> | null;
1090
+ or?: Array<ModelInteractionAttendeeFilterInput | null> | null;
1091
+ not?: ModelInteractionAttendeeFilterInput | null;
1092
+ };
1093
+ type ModelInteractionMessageConditionInput = {
1094
+ externalId?: ModelStringInput | null;
1095
+ endpointId?: ModelIDInput | null;
1096
+ campaignId?: ModelIDInput | null;
1097
+ campaignFlowNodeId?: ModelIDInput | null;
1098
+ entityConversationId?: ModelIDInput | null;
1099
+ interactionId?: ModelIDInput | null;
1100
+ interactionAttendeeId?: ModelIDInput | null;
1101
+ referenceMessageId?: ModelIDInput | null;
1102
+ body?: ModelStringInput | null;
1103
+ metadata?: ModelStringInput | null;
1104
+ createdAt?: ModelIntInput | null;
1105
+ updatedAt?: ModelIntInput | null;
1106
+ deletedAt?: ModelIntInput | null;
1107
+ and?: Array<ModelInteractionMessageConditionInput | null> | null;
1108
+ or?: Array<ModelInteractionMessageConditionInput | null> | null;
1109
+ not?: ModelInteractionMessageConditionInput | null;
1110
+ };
1111
+ type ModelInteractionMessageFilterInput = {
1112
+ id?: ModelIDInput | null;
1113
+ externalId?: ModelStringInput | null;
1114
+ endpointId?: ModelIDInput | null;
1115
+ campaignId?: ModelIDInput | null;
1116
+ campaignFlowNodeId?: ModelIDInput | null;
1117
+ entityConversationId?: ModelIDInput | null;
1118
+ interactionId?: ModelIDInput | null;
1119
+ interactionAttendeeId?: ModelIDInput | null;
1120
+ referenceMessageId?: ModelIDInput | null;
1121
+ body?: ModelStringInput | null;
1122
+ metadata?: ModelStringInput | null;
1123
+ createdAt?: ModelIntInput | null;
1124
+ updatedAt?: ModelIntInput | null;
1125
+ deletedAt?: ModelIntInput | null;
1126
+ and?: Array<ModelInteractionMessageFilterInput | null> | null;
1127
+ or?: Array<ModelInteractionMessageFilterInput | null> | null;
1128
+ not?: ModelInteractionMessageFilterInput | null;
1129
+ };
1130
+ type ModelInteractionMessageAttachmentConditionInput = {
1131
+ externalId?: ModelStringInput | null;
1132
+ interactionId?: ModelIDInput | null;
1133
+ interactionMessageId?: ModelIDInput | null;
1134
+ name?: ModelStringInput | null;
1135
+ size?: ModelIntInput | null;
1136
+ type?: ModelStringInput | null;
1137
+ createdAt?: ModelIntInput | null;
1138
+ updatedAt?: ModelIntInput | null;
1139
+ deletedAt?: ModelIntInput | null;
1140
+ and?: Array<ModelInteractionMessageAttachmentConditionInput | null> | null;
1141
+ or?: Array<ModelInteractionMessageAttachmentConditionInput | null> | null;
1142
+ not?: ModelInteractionMessageAttachmentConditionInput | null;
1143
+ };
1144
+ type ModelInteractionMessageAttachmentFilterInput = {
1145
+ id?: ModelIDInput | null;
1146
+ externalId?: ModelStringInput | null;
1147
+ interactionId?: ModelIDInput | null;
1148
+ interactionMessageId?: ModelIDInput | null;
1149
+ name?: ModelStringInput | null;
1150
+ size?: ModelIntInput | null;
1151
+ type?: ModelStringInput | null;
1152
+ createdAt?: ModelIntInput | null;
1153
+ updatedAt?: ModelIntInput | null;
1154
+ deletedAt?: ModelIntInput | null;
1155
+ and?: Array<ModelInteractionMessageAttachmentFilterInput | null> | null;
1156
+ or?: Array<ModelInteractionMessageAttachmentFilterInput | null> | null;
1157
+ not?: ModelInteractionMessageAttachmentFilterInput | null;
1158
+ };
1159
+ type ModelInteractionChannelInput = {
1160
+ eq?: InteractionChannel | null;
1161
+ ne?: InteractionChannel | null;
1162
+ };
1163
+ type ModelInteractionContextInput = {
1164
+ eq?: InteractionContext | null;
1165
+ ne?: InteractionContext | null;
1166
+ };
1167
+ type ModelInteractionDirectionInput = {
1168
+ eq?: InteractionDirection | null;
1169
+ ne?: InteractionDirection | null;
1170
+ };
1171
+ type ModelInteractionProviderInput = {
1172
+ eq?: InteractionProvider | null;
1173
+ ne?: InteractionProvider | null;
1174
+ };
1175
+ type ModelInteractionStatusInput = {
1176
+ eq?: InteractionStatus | null;
1177
+ ne?: InteractionStatus | null;
1178
+ };
1179
+ type InteractionRouteConfigurationInput = {
1180
+ teamId?: string | null;
1181
+ routingLogic?: InteractionRouteLogic | null;
1182
+ maxWaitTimeoutSeconds?: number | null;
1183
+ };
1184
+ type __SubscriptionContainer$1 = {
1185
+ OnInteractionInviteeByUserId: InteractionInvitee;
1186
+ OnInteractionMessageByEntityConversationId: InteractionMessage;
1187
+ };
1188
+ declare class InteractionService {
1189
+ private readonly appSyncService;
1190
+ newInteractionInviteObservable$: BehaviorSubject<any>;
1191
+ constructor(appSyncService: AppSyncHelperService);
1192
+ GetInteraction(id: string): Promise<Interaction>;
1193
+ GetInteractionAttendee(id: string): Promise<InteractionAttendee>;
1194
+ GetInteractionMessage(id: string): Promise<InteractionMessage>;
1195
+ CreateInteraction(input: CreateInteractionInput, condition?: ModelInteractionConditionInput): Promise<Interaction>;
1196
+ UpdateInteraction(input: UpdateInteractionInput, condition?: ModelInteractionConditionInput): Promise<Interaction>;
1197
+ CreateInteractionAttendee(input: CreateInteractionAttendeeInput, condition?: ModelInteractionAttendeeConditionInput): Promise<InteractionAttendee>;
1198
+ CreateInteractionMessage(input: CreateInteractionMessageInput, condition?: ModelInteractionMessageConditionInput): Promise<InteractionMessage>;
1199
+ CreateInteractionMessageAttachment(input: CreateInteractionMessageAttachmentInput, condition?: ModelInteractionMessageAttachmentConditionInput): Promise<InteractionMessageAttachment>;
1200
+ ListInteractionInviteesByUserId(userId: string, createdAt?: ModelIntKeyConditionInput, sortDirection?: ModelSortDirection, filter?: ModelInteractionInviteeFilterInput, limit?: number, nextToken?: string): Promise<List<InteractionInvitee>>;
1201
+ ListInteractionAttendeesByInteractionIdAndEntityId(interactionId: string, entityId?: ModelIDKeyConditionInput, sortDirection?: ModelSortDirection, filter?: ModelInteractionAttendeeFilterInput, limit?: number, nextToken?: string): Promise<List<InteractionAttendee>>;
1202
+ ListInteractionAttendeesByInteractionIdAndUserId(interactionId: string, userId?: ModelIDKeyConditionInput, sortDirection?: ModelSortDirection, filter?: ModelInteractionAttendeeFilterInput, limit?: number, nextToken?: string): Promise<List<InteractionAttendee>>;
1203
+ ListInteractionMessagesByEntityConversationId(entityConversationId: string, createdAt?: ModelIntKeyConditionInput, sortDirection?: ModelSortDirection, filter?: ModelInteractionMessageFilterInput, limit?: number, nextToken?: string): Promise<List<InteractionMessage>>;
1204
+ ListInteractionMessagesByExternalMessageId(externalMessageId: string, createdAt?: ModelIntKeyConditionInput, sortDirection?: ModelSortDirection, filter?: ModelInteractionMessageFilterInput, limit?: number, nextToken?: string): Promise<List<InteractionMessage>>;
1205
+ ListInteractionMessagesByInteractionAttendeeId(interactionAttendeeId: string, createdAt?: ModelIntKeyConditionInput, sortDirection?: ModelSortDirection, filter?: ModelInteractionMessageFilterInput, limit?: number, nextToken?: string): Promise<List<InteractionMessage>>;
1206
+ ListInteractionMessageAttachmentsByInteractionMessageId(interactionMessageId: string, createdAt?: ModelIntKeyConditionInput, sortDirection?: ModelSortDirection, filter?: ModelInteractionMessageAttachmentFilterInput, limit?: number, nextToken?: string): Promise<List<InteractionMessageAttachment>>;
1207
+ OnInteractionInviteeByUserIdListener(userId: string): Observable<SubscriptionResponse<Pick<__SubscriptionContainer$1, 'OnInteractionInviteeByUserId'>>>;
1208
+ OnInteractionMessageByEntityConversationIdListener(entityConversationId: string): Observable<SubscriptionResponse<Pick<__SubscriptionContainer$1, 'OnInteractionMessageByEntityConversationId'>>>;
1209
+ static ɵfac: i0.ɵɵFactoryDeclaration<InteractionService, never>;
1210
+ static ɵprov: i0.ɵɵInjectableDeclaration<InteractionService>;
1211
+ }
1212
+
1213
+ type EntityConversation = {
1214
+ id: string;
1215
+ tenantId: string;
1216
+ entityId?: string | null;
1217
+ entity?: Entity | null;
1218
+ entityAddress: string;
1219
+ interactionChannel: InteractionChannel;
1220
+ interactionProvider: InteractionProvider;
1221
+ isCampaignEngaged: boolean;
1222
+ campaignId?: string | null;
1223
+ lastCampaignFlowNodeId?: string | null;
1224
+ lastInteractionMessageId?: string | null;
1225
+ metadata?: string | null;
1226
+ lastActivityAt?: number | null;
1227
+ lastMessageAt?: number | null;
1228
+ archivedAt?: number | null;
1229
+ blockedAt?: number | null;
1230
+ createdAt: number;
1231
+ updatedAt: number;
1232
+ deletedAt?: number | null;
1233
+ interactions?: List<Interaction> | null;
1234
+ messages?: List<InteractionMessage> | null;
1235
+ };
1236
+ type CreateEntityConversationInput = {
1237
+ id?: string | null;
1238
+ tenantId: string;
1239
+ entityId?: string | null;
1240
+ entityAddress: string;
1241
+ interactionChannel: InteractionChannel;
1242
+ interactionProvider: InteractionProvider;
1243
+ isCampaignEngaged: boolean;
1244
+ campaignId?: string | null;
1245
+ lastCampaignFlowNodeId?: string | null;
1246
+ lastInteractionMessageId?: string | null;
1247
+ metadata?: string | null;
1248
+ lastActivityAt?: number | null;
1249
+ lastMessageAt?: number | null;
1250
+ archivedAt?: number | null;
1251
+ blockedAt?: number | null;
1252
+ createdAt: number;
1253
+ updatedAt: number;
1254
+ deletedAt?: number | null;
1255
+ };
1256
+ type UpdateEntityConversationInput = {
1257
+ id: string;
1258
+ tenantId?: string | null;
1259
+ entityId?: string | null;
1260
+ entityAddress?: string | null;
1261
+ interactionChannel?: InteractionChannel | null;
1262
+ interactionProvider?: InteractionProvider | null;
1263
+ isCampaignEngaged?: boolean | null;
1264
+ campaignId?: string | null;
1265
+ lastCampaignFlowNodeId?: string | null;
1266
+ lastInteractionMessageId?: string | null;
1267
+ metadata?: string | null;
1268
+ lastActivityAt?: number | null;
1269
+ lastMessageAt?: number | null;
1270
+ archivedAt?: number | null;
1271
+ blockedAt?: number | null;
1272
+ createdAt?: number | null;
1273
+ updatedAt?: number | null;
1274
+ deletedAt?: number | null;
1275
+ };
1276
+ type ModelEntityConversationConditionInput = {
1277
+ tenantId?: ModelIDInput | null;
1278
+ entityId?: ModelIDInput | null;
1279
+ entityAddress?: ModelStringInput | null;
1280
+ interactionChannel?: ModelInteractionChannelInput | null;
1281
+ interactionProvider?: ModelInteractionProviderInput | null;
1282
+ isCampaignEngaged?: ModelBooleanInput | null;
1283
+ campaignId?: ModelIDInput | null;
1284
+ lastCampaignFlowNodeId?: ModelIDInput | null;
1285
+ lastInteractionMessageId?: ModelIDInput | null;
1286
+ metadata?: ModelStringInput | null;
1287
+ lastActivityAt?: ModelIntInput | null;
1288
+ lastMessageAt?: ModelIntInput | null;
1289
+ archivedAt?: ModelIntInput | null;
1290
+ blockedAt?: ModelIntInput | null;
1291
+ createdAt?: ModelIntInput | null;
1292
+ updatedAt?: ModelIntInput | null;
1293
+ deletedAt?: ModelIntInput | null;
1294
+ and?: Array<ModelEntityConversationConditionInput | null> | null;
1295
+ or?: Array<ModelEntityConversationConditionInput | null> | null;
1296
+ not?: ModelEntityConversationConditionInput | null;
1297
+ };
1298
+ type ModelEntityConversationFilterInput = {
1299
+ id?: ModelIDInput | null;
1300
+ tenantId?: ModelIDInput | null;
1301
+ entityId?: ModelIDInput | null;
1302
+ entityAddress?: ModelStringInput | null;
1303
+ interactionChannel?: ModelInteractionChannelInput | null;
1304
+ interactionProvider?: ModelInteractionProviderInput | null;
1305
+ isCampaignEngaged?: ModelBooleanInput | null;
1306
+ campaignId?: ModelIDInput | null;
1307
+ lastCampaignFlowNodeId?: ModelIDInput | null;
1308
+ lastInteractionMessageId?: ModelIDInput | null;
1309
+ metadata?: ModelStringInput | null;
1310
+ lastActivityAt?: ModelIntInput | null;
1311
+ lastMessageAt?: ModelIntInput | null;
1312
+ archivedAt?: ModelIntInput | null;
1313
+ blockedAt?: ModelIntInput | null;
1314
+ createdAt?: ModelIntInput | null;
1315
+ updatedAt?: ModelIntInput | null;
1316
+ deletedAt?: ModelIntInput | null;
1317
+ and?: Array<ModelEntityConversationFilterInput | null> | null;
1318
+ or?: Array<ModelEntityConversationFilterInput | null> | null;
1319
+ not?: ModelEntityConversationFilterInput | null;
1320
+ };
1321
+ type __SubscriptionContainer = {
1322
+ OnEntityConversationByTenantId: EntityConversation;
1323
+ };
1324
+ declare const FIELDS_ENTITY_CONVERSATION: string;
1325
+ declare const FIELDS_ENTITY_CONVERSATION_EXPANDED = "\n id\n tenantId\n entityId\n entity {\n id\n externalId\n tenantId\n entityTypeId\n parentId\n name\n image {\n key\n bucket\n location\n }\n isOrganization\n email\n phoneNumber {\n countryCode\n dialCode\n e164Number\n internationalNumber\n nationalNumber\n number\n }\n notes\n customFields\n preferences {\n timezoneName\n language {\n code\n nameEn\n nameLocal\n }\n }\n contactPreferences {\n allowCall\n allowEmail\n allowSMS\n allowWhatsApp\n }\n createdAt\n updatedAt\n blockedAt\n deletedAt\n }\n entityAddress\n interactionChannel\n interactionProvider\n isCampaignEngaged\n campaignId\n lastCampaignFlowNodeId\n lastInteractionMessageId\n metadata\n lastActivityAt\n lastMessageAt\n archivedAt\n blockedAt\n createdAt\n updatedAt\n deletedAt\n interactions (limit: 1, sortDirection: DESC) {\n items {\n id\n tenantId\n entityId\n entityConversationId\n teamId\n widgetId\n metadata\n subject\n direction\n status\n last_status\n hostId\n startedAt\n completedAt\n createdAt\n updatedAt\n deletedAt\n }\n nextToken\n }\n messages (limit: 1, sortDirection: DESC) {\n items {\n id\n externalId\n endpointId\n entityConversationId\n interactionId\n interactionAttendeeId\n referenceMessageId\n body\n metadata\n createdAt\n updatedAt\n deletedAt\n messageAttachments {\n items {\n id\n externalId\n interactionId\n interactionMessageId\n interactionId\n name\n size\n type\n file {\n key\n bucket\n location\n }\n createdAt\n updatedAt\n deletedAt\n }\n nextToken\n }\n }\n nextToken\n }\n";
1326
+ declare class EntityConversationService {
1327
+ private readonly appSyncService;
1328
+ constructor(appSyncService: AppSyncHelperService);
1329
+ GetEntityConversation(id: string): Promise<EntityConversation>;
1330
+ CreateEntityConversation(input: CreateEntityConversationInput, condition?: ModelEntityConversationConditionInput): Promise<EntityConversation>;
1331
+ UpdateEntityConversation(input: UpdateEntityConversationInput, condition?: ModelEntityConversationConditionInput): Promise<EntityConversation>;
1332
+ ListEntityConversationsByTenantIdAndEntityAddress(tenantId: string, entityAddress?: ModelStringKeyConditionInput, sortDirection?: ModelSortDirection, filter?: ModelEntityConversationFilterInput, limit?: number, nextToken?: string): Promise<List<EntityConversation>>;
1333
+ ListEntityConversationsByTenantIdAndArchivedAt(tenantId: string, archivedAt?: ModelIntKeyConditionInput, sortDirection?: ModelSortDirection, filter?: ModelEntityConversationFilterInput, limit?: number, nextToken?: string): Promise<List<EntityConversation>>;
1334
+ ListEntityConversationsByTenantIdAndLastMessageAt(tenantId: string, lastMessageAt?: ModelIntKeyConditionInput, sortDirection?: ModelSortDirection, filter?: ModelEntityConversationFilterInput, limit?: number, nextToken?: string): Promise<List<EntityConversation>>;
1335
+ OnEntityConversationByTenantIdListener(tenantId: string): Observable<SubscriptionResponse<Pick<__SubscriptionContainer, 'OnEntityConversationByTenantId'>>>;
1336
+ static ɵfac: i0.ɵɵFactoryDeclaration<EntityConversationService, never>;
1337
+ static ɵprov: i0.ɵɵInjectableDeclaration<EntityConversationService>;
1338
+ }
1339
+
396
1340
  declare class CustomValidators {
397
1341
  #private;
398
1342
  /**
@@ -422,5 +1366,5 @@ declare class CleanDeep {
422
1366
  static clean(obj: any): typeof obj;
423
1367
  }
424
1368
 
425
- export { CleanDeep, CustomPipesModule, CustomValidators, DomainNamePipe, ErrorComponent, FooterComponent, FormatEpochTimestampPipe, GraphQLHelperService, LoaderComponent, ModelAttributeTypes, ModelSortDirection, S3HelperService, SafeHtmlPipe, SearchInnerFieldPipe, SearchPipe, SingularizePipe, SnugdeskAuthenticationService, SnugdeskCoreModule, SnugdeskIPRegistryService, TenantService, UserService, UserStatus, UserType };
426
- export type { Language, ModelBooleanInput, ModelIDInput, ModelIDKeyConditionInput, ModelIntInput, ModelIntKeyConditionInput, ModelSizeInput, ModelStringInput, ModelStringKeyConditionInput, PhoneNumber, S3Config, S3Credentials, S3Object, Tenant, User };
1369
+ export { AMPLIFY_CONFIG, AppSyncHelperService, CleanDeep, CustomPipesModule, CustomValidators, DomainNamePipe, EntityConversationService, EntityService, ErrorComponent, FIELDS_ENTITY_CONVERSATION, FIELDS_ENTITY_CONVERSATION_EXPANDED, FIELDS_INTERACTION_WIDGET, FooterComponent, FormatEpochTimestampPipe, InteractionChannel, InteractionContext, InteractionDirection, InteractionEndpointService, InteractionProvider, InteractionRouteLogic, InteractionService, InteractionStatus, InteractionWidgetService, LoaderComponent, ModelAttributeTypes, ModelSortDirection, S3HelperService, SafeHtmlPipe, SearchInnerFieldPipe, SearchPipe, SingularizePipe, SnugdeskAuthenticationService, SnugdeskCoreModule, SnugdeskIPRegistryService, TenantService, UserService, UserSessionService, UserStatus, UserType, provideAmplifyConfig };
1370
+ export type { AmplifyConfig, Country, CountryCurrency, CreateEntityConversationInput, CreateEntityInput, CreateInteractionAttendeeInput, CreateInteractionInput, CreateInteractionMessageAttachmentInput, CreateInteractionMessageInput, Entity, EntityContactPreferences, EntityConversation, EntityPreferences, Interaction, InteractionAttendee, InteractionEndpoint, InteractionEndpointPriceDetails, InteractionEndpointRegulatoryComplianceDocument, InteractionHost, InteractionInvitee, InteractionMessage, InteractionMessageAttachment, InteractionRouteConfiguration, InteractionRouteConfigurationInput, InteractionWidget, Language, List, ModelBooleanInput, ModelEntityConditionInput, ModelEntityConversationConditionInput, ModelEntityConversationFilterInput, ModelEntityFilterInput, ModelIDInput, ModelIDKeyConditionInput, ModelIntInput, ModelIntKeyConditionInput, ModelInteractionAttendeeConditionInput, ModelInteractionAttendeeFilterInput, ModelInteractionChannelInput, ModelInteractionConditionInput, ModelInteractionContextInput, ModelInteractionDirectionInput, ModelInteractionInviteeFilterInput, ModelInteractionMessageAttachmentConditionInput, ModelInteractionMessageAttachmentFilterInput, ModelInteractionMessageConditionInput, ModelInteractionMessageFilterInput, ModelInteractionProviderInput, ModelInteractionStatusInput, ModelInteractionWidgetConditionInput, ModelInteractionWidgetFilterInput, ModelSizeInput, ModelStringInput, ModelStringKeyConditionInput, ModelUserSessionConditionInput, ModelUserSessionFilterInput, ModelUserStatusInput, PhoneNumber, S3Config, S3Credentials, S3Object, SubscriptionResponse, Team, Tenant, TenantPreferences, TenantSecurity, UpdateEntityConversationInput, UpdateEntityInput, UpdateInteractionInput, UpdateUserSessionInput, User, UserNotificationSettings, UserPreferences, UserSession };