@snugdesk/core 0.2.19 → 0.2.21

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.
@@ -590,11 +590,13 @@ class SnugdeskAuthenticationService {
590
590
  this.isAuthenticated$.next(this.isAuthenticated());
591
591
  }
592
592
  getToken() {
593
- return sessionStorage.getItem(this.TOKEN_KEY);
593
+ // return sessionStorage.getItem(this.TOKEN_KEY);
594
+ return localStorage.getItem(this.TOKEN_KEY);
594
595
  }
595
596
  setToken(token) {
596
597
  const isValid = this.checkToken(token);
597
- token ? sessionStorage.setItem(this.TOKEN_KEY, token) : sessionStorage.removeItem(this.TOKEN_KEY);
598
+ // token ? sessionStorage.setItem(this.TOKEN_KEY, token) : sessionStorage.removeItem(this.TOKEN_KEY);
599
+ token ? localStorage.setItem(this.TOKEN_KEY, token) : localStorage.removeItem(this.TOKEN_KEY);
598
600
  this.isAuthenticated$.next(isValid);
599
601
  }
600
602
  checkToken(token) {
@@ -748,7 +750,8 @@ class SnugdeskAuthenticationService {
748
750
  console.error(error);
749
751
  }
750
752
  finally {
751
- sessionStorage.removeItem(this.TOKEN_KEY);
753
+ // sessionStorage.removeItem(this.TOKEN_KEY);
754
+ localStorage.removeItem(this.TOKEN_KEY);
752
755
  this.userSessionSubscription?.unsubscribe();
753
756
  this.isAuthenticated$?.next(false);
754
757
  this.userSession$?.next(null);
@@ -1883,6 +1886,43 @@ const FIELDS_INTERACTION_HOST = `
1883
1886
  updatedAt
1884
1887
  deletedAt
1885
1888
  `;
1889
+ const FIELDS_INTERACTION_MINIMAL = `
1890
+ id
1891
+ tenantId
1892
+ widgetId
1893
+ endpointId
1894
+ entityConversationId
1895
+ entityId
1896
+ teamId
1897
+ hostId
1898
+ providerInteractionId
1899
+ channel
1900
+ provider
1901
+ context
1902
+ direction
1903
+ status
1904
+ last_status
1905
+ metadata
1906
+ subject
1907
+ summary
1908
+ transcription {
1909
+ location
1910
+ }
1911
+ recording {
1912
+ location
1913
+ }
1914
+ routeConfiguration {
1915
+ teamId
1916
+ routingLogic
1917
+ maxWaitTimeoutSeconds
1918
+ }
1919
+ startedAt
1920
+ completedAt
1921
+ duration
1922
+ createdAt
1923
+ updatedAt
1924
+ deletedAt
1925
+ `;
1886
1926
  const FIELDS_INTERACTION = `
1887
1927
  id
1888
1928
  tenantId
@@ -2070,8 +2110,6 @@ const FIELDS_INTERACTION_MESSAGE_ATTACHMENT = `
2070
2110
  size
2071
2111
  type
2072
2112
  file {
2073
- key
2074
- bucket
2075
2113
  location
2076
2114
  }
2077
2115
  createdAt
@@ -2169,7 +2207,7 @@ class InteractionService {
2169
2207
  async CreateInteraction(input, condition) {
2170
2208
  const statement = `mutation CreateInteraction($input: CreateInteractionInput!, $condition: ModelInteractionConditionInput) {
2171
2209
  createInteraction(input: $input, condition: $condition) {
2172
- ${FIELDS_INTERACTION}
2210
+ ${FIELDS_INTERACTION_MINIMAL}
2173
2211
  }
2174
2212
  }`;
2175
2213
  const gqlAPIServiceArguments = { input };
@@ -2182,7 +2220,7 @@ class InteractionService {
2182
2220
  async UpdateInteraction(input, condition) {
2183
2221
  const statement = `mutation UpdateInteraction($input: UpdateInteractionInput!, $condition: ModelInteractionConditionInput) {
2184
2222
  updateInteraction(input: $input, condition: $condition) {
2185
- ${FIELDS_INTERACTION}
2223
+ ${FIELDS_INTERACTION_MINIMAL}
2186
2224
  }
2187
2225
  }`;
2188
2226
  const gqlAPIServiceArguments = { input };
@@ -3610,5 +3648,5 @@ class CustomValidators {
3610
3648
  * Generated bundle index. Do not edit.
3611
3649
  */
3612
3650
 
3613
- export { AMPLIFY_CONFIG, AppSyncHelperService, CleanDeep, CustomPipesModule, CustomValidators, DomainNamePipe, EncryptedStorageService, EntityConversationService, EntityService, ErrorComponent, FIELDS_ENTITY, FIELDS_ENTITY_CONVERSATION, FIELDS_ENTITY_CONVERSATION_EXPANDED, FIELDS_ENTITY_CONVERSATION_MINIMAL, FIELDS_ENTITY_EXPANDED, FIELDS_ENTITY_MINIMAL, FIELDS_ENTITY_TYPE, FIELDS_INTERACTION, FIELDS_INTERACTION_ATTENDEE, FIELDS_INTERACTION_ATTENDEE_EXPANDED, FIELDS_INTERACTION_ENDPOINT, FIELDS_INTERACTION_EXPANDED, FIELDS_INTERACTION_HOST, FIELDS_INTERACTION_INVITEE, FIELDS_INTERACTION_MESSAGE, FIELDS_INTERACTION_MESSAGE_ATTACHMENT, FIELDS_INTERACTION_MESSAGE_EXPANDED, FIELDS_INTERACTION_WIDGET, FIELDS_INTERACTION_WIDGET_USER_SETTING, FIELDS_TEAM, FIELDS_TEAM_MEMBER, FIELDS_TENANT, FIELDS_TICKET, FIELDS_TICKET_PRIORITY, FIELDS_TICKET_STATUS, FIELDS_TICKET_TYPE, FIELDS_USER, FIELDS_USER_SESSION, FooterComponent, FormatEpochTimestampPipe, InteractionChannel, InteractionContext, InteractionDirection, InteractionEndpointService, InteractionProvider, InteractionRouteLogic, InteractionService, InteractionStatus, InteractionWidgetService, LoaderComponent, ModelAttributeTypes, ModelSortDirection, OpenSearchHelperService, S3HelperService, SafeHtmlPipe, SearchInnerFieldPipe, SearchPipe, SingularizePipe, SnugdeskAuthenticationService, SnugdeskCoreModule, SnugdeskIPRegistryService, StorageType, TeamService, TenantSSOConfigurationProtocol, TenantService, TicketService, UserService, UserSessionService, UserStatus, UserType, provideAmplifyConfig };
3651
+ export { AMPLIFY_CONFIG, AppSyncHelperService, CleanDeep, CustomPipesModule, CustomValidators, DomainNamePipe, EncryptedStorageService, EntityConversationService, EntityService, ErrorComponent, FIELDS_ENTITY, FIELDS_ENTITY_CONVERSATION, FIELDS_ENTITY_CONVERSATION_EXPANDED, FIELDS_ENTITY_CONVERSATION_MINIMAL, FIELDS_ENTITY_EXPANDED, FIELDS_ENTITY_MINIMAL, FIELDS_ENTITY_TYPE, FIELDS_INTERACTION, FIELDS_INTERACTION_ATTENDEE, FIELDS_INTERACTION_ATTENDEE_EXPANDED, FIELDS_INTERACTION_ENDPOINT, FIELDS_INTERACTION_EXPANDED, FIELDS_INTERACTION_HOST, FIELDS_INTERACTION_INVITEE, FIELDS_INTERACTION_MESSAGE, FIELDS_INTERACTION_MESSAGE_ATTACHMENT, FIELDS_INTERACTION_MESSAGE_EXPANDED, FIELDS_INTERACTION_MINIMAL, FIELDS_INTERACTION_WIDGET, FIELDS_INTERACTION_WIDGET_USER_SETTING, FIELDS_TEAM, FIELDS_TEAM_MEMBER, FIELDS_TENANT, FIELDS_TICKET, FIELDS_TICKET_PRIORITY, FIELDS_TICKET_STATUS, FIELDS_TICKET_TYPE, FIELDS_USER, FIELDS_USER_SESSION, FooterComponent, FormatEpochTimestampPipe, InteractionChannel, InteractionContext, InteractionDirection, InteractionEndpointService, InteractionProvider, InteractionRouteLogic, InteractionService, InteractionStatus, InteractionWidgetService, LoaderComponent, ModelAttributeTypes, ModelSortDirection, OpenSearchHelperService, S3HelperService, SafeHtmlPipe, SearchInnerFieldPipe, SearchPipe, SingularizePipe, SnugdeskAuthenticationService, SnugdeskCoreModule, SnugdeskIPRegistryService, StorageType, TeamService, TenantSSOConfigurationProtocol, TenantService, TicketService, UserService, UserSessionService, UserStatus, UserType, provideAmplifyConfig };
3614
3652
  //# sourceMappingURL=snugdesk-core.mjs.map