@snugdesk/core 0.2.11 → 0.2.13
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/fesm2022/snugdesk-core.mjs +190 -1
- package/fesm2022/snugdesk-core.mjs.map +1 -1
- package/index.d.ts +37 -2
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -1986,6 +1986,41 @@ declare class UserService {
|
|
|
1986
1986
|
static ɵprov: i0.ɵɵInjectableDeclaration<UserService>;
|
|
1987
1987
|
}
|
|
1988
1988
|
|
|
1989
|
+
declare enum StorageType {
|
|
1990
|
+
SessionStorage = "sessionStorage",
|
|
1991
|
+
LocalStorage = "localStorage"
|
|
1992
|
+
}
|
|
1993
|
+
interface EncryptedStorageKeys {
|
|
1994
|
+
dataKey: string;
|
|
1995
|
+
cryptoKey: string;
|
|
1996
|
+
cryptoKeyCreatedAt: string;
|
|
1997
|
+
}
|
|
1998
|
+
declare class EncryptedStorageService {
|
|
1999
|
+
private authenticationService;
|
|
2000
|
+
private readonly DEFAULT_TTL_SECONDS;
|
|
2001
|
+
constructor(authenticationService: SnugdeskAuthenticationService);
|
|
2002
|
+
buildKeys(baseKey: string): EncryptedStorageKeys;
|
|
2003
|
+
getJsonByKey<T>(storageType: StorageType, baseKey: string, ttlSeconds?: number): Promise<T | null>;
|
|
2004
|
+
setJsonByKey<T>(storageType: StorageType, baseKey: string, value: T, ttlSeconds?: number): Promise<void>;
|
|
2005
|
+
updateJsonByKey<T>(storageType: StorageType, baseKey: string, value: T, ttlSeconds?: number): Promise<void>;
|
|
2006
|
+
clearByKey(storageType: StorageType, baseKey: string): void;
|
|
2007
|
+
getJson<T>(storageType: StorageType, keys: EncryptedStorageKeys, ttlSeconds?: number): Promise<T | null>;
|
|
2008
|
+
setJson<T>(storageType: StorageType, keys: EncryptedStorageKeys, value: T, ttlSeconds?: number): Promise<void>;
|
|
2009
|
+
updateJson<T>(storageType: StorageType, keys: EncryptedStorageKeys, ttlSeconds: number | undefined, updater: (current: T | null) => T | null | Promise<T | null>): Promise<void>;
|
|
2010
|
+
clear(storageType: StorageType, keys: EncryptedStorageKeys): void;
|
|
2011
|
+
private getStorage;
|
|
2012
|
+
private scopedKey;
|
|
2013
|
+
private nowSeconds;
|
|
2014
|
+
private resolveTtlSeconds;
|
|
2015
|
+
private getOrCreateCryptoKey;
|
|
2016
|
+
private encryptString;
|
|
2017
|
+
private decryptString;
|
|
2018
|
+
private bytesToBase64;
|
|
2019
|
+
private base64ToBytes;
|
|
2020
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<EncryptedStorageService, never>;
|
|
2021
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<EncryptedStorageService>;
|
|
2022
|
+
}
|
|
2023
|
+
|
|
1989
2024
|
declare class CleanDeep {
|
|
1990
2025
|
static clean(obj: any): typeof obj;
|
|
1991
2026
|
}
|
|
@@ -2015,5 +2050,5 @@ declare class CustomValidators {
|
|
|
2015
2050
|
static trimLength(minLength: number): ValidatorFn;
|
|
2016
2051
|
}
|
|
2017
2052
|
|
|
2018
|
-
export { AMPLIFY_CONFIG, AppSyncHelperService, CleanDeep, CustomPipesModule, CustomValidators, DomainNamePipe, EntityConversationService, EntityService, ErrorComponent, FIELDS_ENTITY, FIELDS_ENTITY_CONVERSATION, FIELDS_ENTITY_CONVERSATION_EXPANDED, 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, TeamService, TenantSSOConfigurationProtocol, TenantService, TicketService, UserService, UserSessionService, UserStatus, UserType, provideAmplifyConfig };
|
|
2019
|
-
export type { AmplifyConfig, Country, CountryCurrency, CreateEntityConversationInput, CreateEntityInput, CreateInteractionAttendeeInput, CreateInteractionHostInput, CreateInteractionInput, CreateInteractionInviteeInput, CreateInteractionMessageAttachmentInput, CreateInteractionMessageInput, CreateTeamInput, CreateTeamMemberInput, Entity, EntityContactPreferences, EntityConversation, EntityPreferences, EntityType, Interaction, InteractionAttendee, InteractionEndpoint, InteractionEndpointPriceDetails, InteractionEndpointRegulatoryComplianceDocument, InteractionHost, InteractionInvitee, InteractionMessage, InteractionMessageAttachment, InteractionRouteConfiguration, InteractionRouteConfigurationInput, InteractionWidget, InteractionWidgetUserSetting, Language, List, ModelBooleanInput, ModelEntityConditionInput, ModelEntityConversationConditionInput, ModelEntityConversationFilterInput, ModelEntityFilterInput, ModelEntityTypeConditionInput, ModelEntityTypeFilterInput, ModelIDInput, ModelIDKeyConditionInput, ModelIntInput, ModelIntKeyConditionInput, ModelInteractionAttendeeConditionInput, ModelInteractionAttendeeFilterInput, ModelInteractionChannelInput, ModelInteractionConditionInput, ModelInteractionContextInput, ModelInteractionDirectionInput, ModelInteractionFilterInput, ModelInteractionHostConditionInput, ModelInteractionHostFilterInput, ModelInteractionInviteeConditionInput, ModelInteractionInviteeFilterInput, ModelInteractionMessageAttachmentConditionInput, ModelInteractionMessageAttachmentFilterInput, ModelInteractionMessageConditionInput, ModelInteractionMessageFilterInput, ModelInteractionProviderInput, ModelInteractionStatusInput, ModelInteractionWidgetConditionInput, ModelInteractionWidgetFilterInput, ModelInteractionWidgetUserSettingFilterInput, ModelSizeInput, ModelStringInput, ModelStringKeyConditionInput, ModelTeamConditionInput, ModelTeamFilterInput, ModelTeamMemberConditionInput, ModelTeamMemberFilterInput, ModelTicketConditionInput, ModelTicketFilterInput, ModelTicketPriorityConditionInput, ModelTicketPriorityFilterInput, ModelTicketStatusConditionInput, ModelTicketStatusFilterInput, ModelTicketTypeConditionInput, ModelTicketTypeFilterInput, ModelUserSessionConditionInput, ModelUserSessionFilterInput, ModelUserStatusInput, OpenSearchHit, OpenSearchResponse, PhoneNumber, S3Config, S3Credentials, S3Object, SubscriptionResponse, Team, TeamMember, Tenant, TenantBillingInformation, TenantContactInformation, TenantPreferences, TenantSSOConfiguration, TenantSecurity, Ticket, TicketPriority, TicketStatus, TicketType, UpdateEntityConversationInput, UpdateEntityInput, UpdateInteractionAttendeeInput, UpdateInteractionHostInput, UpdateInteractionInput, UpdateInteractionInviteeInput, UpdateTeamInput, UpdateTeamMemberInput, UpdateUserSessionInput, User, UserNotificationSettings, UserPreferences, UserSession };
|
|
2053
|
+
export { AMPLIFY_CONFIG, AppSyncHelperService, CleanDeep, CustomPipesModule, CustomValidators, DomainNamePipe, EncryptedStorageService, EntityConversationService, EntityService, ErrorComponent, FIELDS_ENTITY, FIELDS_ENTITY_CONVERSATION, FIELDS_ENTITY_CONVERSATION_EXPANDED, 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 };
|
|
2054
|
+
export type { AmplifyConfig, Country, CountryCurrency, CreateEntityConversationInput, CreateEntityInput, CreateInteractionAttendeeInput, CreateInteractionHostInput, CreateInteractionInput, CreateInteractionInviteeInput, CreateInteractionMessageAttachmentInput, CreateInteractionMessageInput, CreateTeamInput, CreateTeamMemberInput, EncryptedStorageKeys, Entity, EntityContactPreferences, EntityConversation, EntityPreferences, EntityType, Interaction, InteractionAttendee, InteractionEndpoint, InteractionEndpointPriceDetails, InteractionEndpointRegulatoryComplianceDocument, InteractionHost, InteractionInvitee, InteractionMessage, InteractionMessageAttachment, InteractionRouteConfiguration, InteractionRouteConfigurationInput, InteractionWidget, InteractionWidgetUserSetting, Language, List, ModelBooleanInput, ModelEntityConditionInput, ModelEntityConversationConditionInput, ModelEntityConversationFilterInput, ModelEntityFilterInput, ModelEntityTypeConditionInput, ModelEntityTypeFilterInput, ModelIDInput, ModelIDKeyConditionInput, ModelIntInput, ModelIntKeyConditionInput, ModelInteractionAttendeeConditionInput, ModelInteractionAttendeeFilterInput, ModelInteractionChannelInput, ModelInteractionConditionInput, ModelInteractionContextInput, ModelInteractionDirectionInput, ModelInteractionFilterInput, ModelInteractionHostConditionInput, ModelInteractionHostFilterInput, ModelInteractionInviteeConditionInput, ModelInteractionInviteeFilterInput, ModelInteractionMessageAttachmentConditionInput, ModelInteractionMessageAttachmentFilterInput, ModelInteractionMessageConditionInput, ModelInteractionMessageFilterInput, ModelInteractionProviderInput, ModelInteractionStatusInput, ModelInteractionWidgetConditionInput, ModelInteractionWidgetFilterInput, ModelInteractionWidgetUserSettingFilterInput, ModelSizeInput, ModelStringInput, ModelStringKeyConditionInput, ModelTeamConditionInput, ModelTeamFilterInput, ModelTeamMemberConditionInput, ModelTeamMemberFilterInput, ModelTicketConditionInput, ModelTicketFilterInput, ModelTicketPriorityConditionInput, ModelTicketPriorityFilterInput, ModelTicketStatusConditionInput, ModelTicketStatusFilterInput, ModelTicketTypeConditionInput, ModelTicketTypeFilterInput, ModelUserSessionConditionInput, ModelUserSessionFilterInput, ModelUserStatusInput, OpenSearchHit, OpenSearchResponse, PhoneNumber, S3Config, S3Credentials, S3Object, SubscriptionResponse, Team, TeamMember, Tenant, TenantBillingInformation, TenantContactInformation, TenantPreferences, TenantSSOConfiguration, TenantSecurity, Ticket, TicketPriority, TicketStatus, TicketType, UpdateEntityConversationInput, UpdateEntityInput, UpdateInteractionAttendeeInput, UpdateInteractionHostInput, UpdateInteractionInput, UpdateInteractionInviteeInput, UpdateTeamInput, UpdateTeamMemberInput, UpdateUserSessionInput, User, UserNotificationSettings, UserPreferences, UserSession };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@snugdesk/core",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.13",
|
|
4
4
|
"description": "Core utility and session management library required for all Snugdesk widgets. Handles authentication, configuration, and shared services.",
|
|
5
5
|
"peerDependencies": {
|
|
6
6
|
"@angular/common": ">=19.0.0",
|