@snugdesk/core 0.2.31 → 0.2.33

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
@@ -359,6 +359,7 @@ type S3Object = {
359
359
  };
360
360
  declare enum ProcessingStatus {
361
361
  PENDING = "PENDING",
362
+ IN_PROGRESS = "IN_PROGRESS",
362
363
  SUCCESS = "SUCCESS",
363
364
  FAILED = "FAILED",
364
365
  RETRYING = "RETRYING"
@@ -1284,6 +1285,10 @@ declare enum InteractionDirection {
1284
1285
  IN = "IN",
1285
1286
  OUT = "OUT"
1286
1287
  }
1288
+ declare enum InteractionMessageDirection {
1289
+ IN = "IN",
1290
+ OUT = "OUT"
1291
+ }
1287
1292
  declare enum InteractionStatus {
1288
1293
  INITIATED = "INITIATED",
1289
1294
  QUEUED = "QUEUED",
@@ -1433,6 +1438,7 @@ type InteractionMessage = {
1433
1438
  referenceMessageId?: string | null;
1434
1439
  body?: string | null;
1435
1440
  metadata?: string | null;
1441
+ direction?: InteractionMessageDirection | null;
1436
1442
  createdAt: number;
1437
1443
  updatedAt: number;
1438
1444
  deletedAt?: number | null;
@@ -1794,6 +1800,7 @@ type CreateInteractionMessageInput = {
1794
1800
  referenceMessageId?: string | null;
1795
1801
  body?: string | null;
1796
1802
  metadata?: string | null;
1803
+ direction?: InteractionMessageDirection | null;
1797
1804
  createdAt: number;
1798
1805
  updatedAt: number;
1799
1806
  deletedAt?: number | null;
@@ -1809,6 +1816,7 @@ type ModelInteractionMessageConditionInput = {
1809
1816
  referenceMessageId?: ModelIDInput | null;
1810
1817
  body?: ModelStringInput | null;
1811
1818
  metadata?: ModelStringInput | null;
1819
+ direction?: ModelInteractionMessageDirectionInput | null;
1812
1820
  createdAt?: ModelIntInput | null;
1813
1821
  updatedAt?: ModelIntInput | null;
1814
1822
  deletedAt?: ModelIntInput | null;
@@ -1828,6 +1836,7 @@ type ModelInteractionMessageFilterInput = {
1828
1836
  referenceMessageId?: ModelIDInput | null;
1829
1837
  body?: ModelStringInput | null;
1830
1838
  metadata?: ModelStringInput | null;
1839
+ direction?: ModelInteractionMessageDirectionInput | null;
1831
1840
  createdAt?: ModelIntInput | null;
1832
1841
  updatedAt?: ModelIntInput | null;
1833
1842
  deletedAt?: ModelIntInput | null;
@@ -1889,6 +1898,10 @@ type ModelInteractionDirectionInput = {
1889
1898
  eq?: InteractionDirection | null;
1890
1899
  ne?: InteractionDirection | null;
1891
1900
  };
1901
+ type ModelInteractionMessageDirectionInput = {
1902
+ eq?: InteractionMessageDirection | null;
1903
+ ne?: InteractionMessageDirection | null;
1904
+ };
1892
1905
  type ModelInteractionProviderInput = {
1893
1906
  eq?: InteractionProvider | null;
1894
1907
  ne?: InteractionProvider | null;
@@ -1903,6 +1916,115 @@ type InteractionRouteConfigurationInput = {
1903
1916
  maxWaitTimeoutSeconds?: number | null;
1904
1917
  };
1905
1918
 
1919
+ type EntityConversation = {
1920
+ id: string;
1921
+ tenantId: string;
1922
+ entityId?: string | null;
1923
+ entity?: Entity | null;
1924
+ entityAddress: string;
1925
+ interactionChannel: InteractionChannel;
1926
+ interactionProvider: InteractionProvider;
1927
+ isCampaignEngaged: boolean;
1928
+ campaignId?: string | null;
1929
+ lastCampaignFlowNodeId?: string | null;
1930
+ lastInteractionMessageId?: string | null;
1931
+ metadata?: string | null;
1932
+ lastActivityAt?: number | null;
1933
+ lastMessageAt?: number | null;
1934
+ archivedAt?: number | null;
1935
+ blockedAt?: number | null;
1936
+ createdAt: number;
1937
+ updatedAt: number;
1938
+ deletedAt?: number | null;
1939
+ interactions?: List<Interaction> | null;
1940
+ messages?: List<InteractionMessage> | null;
1941
+ };
1942
+ type CreateEntityConversationInput = {
1943
+ id?: string | null;
1944
+ tenantId: string;
1945
+ entityId?: string | null;
1946
+ entityAddress: string;
1947
+ interactionChannel: InteractionChannel;
1948
+ interactionProvider: InteractionProvider;
1949
+ isCampaignEngaged: boolean;
1950
+ campaignId?: string | null;
1951
+ lastCampaignFlowNodeId?: string | null;
1952
+ lastInteractionMessageId?: string | null;
1953
+ metadata?: string | null;
1954
+ lastActivityAt?: number | null;
1955
+ lastMessageAt?: number | null;
1956
+ archivedAt?: number | null;
1957
+ blockedAt?: number | null;
1958
+ createdAt: number;
1959
+ updatedAt: number;
1960
+ deletedAt?: number | null;
1961
+ };
1962
+ type UpdateEntityConversationInput = {
1963
+ id: string;
1964
+ tenantId?: string | null;
1965
+ entityId?: string | null;
1966
+ entityAddress?: string | null;
1967
+ interactionChannel?: InteractionChannel | null;
1968
+ interactionProvider?: InteractionProvider | null;
1969
+ isCampaignEngaged?: boolean | null;
1970
+ campaignId?: string | null;
1971
+ lastCampaignFlowNodeId?: string | null;
1972
+ lastInteractionMessageId?: string | null;
1973
+ metadata?: string | null;
1974
+ lastActivityAt?: number | null;
1975
+ lastMessageAt?: number | null;
1976
+ archivedAt?: number | null;
1977
+ blockedAt?: number | null;
1978
+ createdAt?: number | null;
1979
+ updatedAt?: number | null;
1980
+ deletedAt?: number | null;
1981
+ };
1982
+ type ModelEntityConversationConditionInput = {
1983
+ tenantId?: ModelIDInput | null;
1984
+ entityId?: ModelIDInput | null;
1985
+ entityAddress?: ModelStringInput | null;
1986
+ interactionChannel?: ModelInteractionChannelInput | null;
1987
+ interactionProvider?: ModelInteractionProviderInput | null;
1988
+ isCampaignEngaged?: ModelBooleanInput | null;
1989
+ campaignId?: ModelIDInput | null;
1990
+ lastCampaignFlowNodeId?: ModelIDInput | null;
1991
+ lastInteractionMessageId?: ModelIDInput | null;
1992
+ metadata?: ModelStringInput | null;
1993
+ lastActivityAt?: ModelIntInput | null;
1994
+ lastMessageAt?: ModelIntInput | null;
1995
+ archivedAt?: ModelIntInput | null;
1996
+ blockedAt?: ModelIntInput | null;
1997
+ createdAt?: ModelIntInput | null;
1998
+ updatedAt?: ModelIntInput | null;
1999
+ deletedAt?: ModelIntInput | null;
2000
+ and?: Array<ModelEntityConversationConditionInput | null> | null;
2001
+ or?: Array<ModelEntityConversationConditionInput | null> | null;
2002
+ not?: ModelEntityConversationConditionInput | null;
2003
+ };
2004
+ type ModelEntityConversationFilterInput = {
2005
+ id?: ModelIDInput | null;
2006
+ tenantId?: ModelIDInput | null;
2007
+ entityId?: ModelIDInput | null;
2008
+ entityAddress?: ModelStringInput | null;
2009
+ interactionChannel?: ModelInteractionChannelInput | null;
2010
+ interactionProvider?: ModelInteractionProviderInput | null;
2011
+ isCampaignEngaged?: ModelBooleanInput | null;
2012
+ campaignId?: ModelIDInput | null;
2013
+ lastCampaignFlowNodeId?: ModelIDInput | null;
2014
+ lastInteractionMessageId?: ModelIDInput | null;
2015
+ metadata?: ModelStringInput | null;
2016
+ lastActivityAt?: ModelIntInput | null;
2017
+ lastMessageAt?: ModelIntInput | null;
2018
+ archivedAt?: ModelIntInput | null;
2019
+ blockedAt?: ModelIntInput | null;
2020
+ createdAt?: ModelIntInput | null;
2021
+ updatedAt?: ModelIntInput | null;
2022
+ deletedAt?: ModelIntInput | null;
2023
+ and?: Array<ModelEntityConversationFilterInput | null> | null;
2024
+ or?: Array<ModelEntityConversationFilterInput | null> | null;
2025
+ not?: ModelEntityConversationFilterInput | null;
2026
+ };
2027
+
1906
2028
  type Ticket = {
1907
2029
  id: string;
1908
2030
  externalId?: string | null;
@@ -2098,126 +2220,6 @@ type ModelTicketTypeFilterInput = {
2098
2220
  not?: ModelTicketTypeFilterInput | null;
2099
2221
  };
2100
2222
 
2101
- type EntityConversation = {
2102
- id: string;
2103
- tenantId: string;
2104
- entityId?: string | null;
2105
- entity?: Entity | null;
2106
- entityAddress: string;
2107
- interactionChannel: InteractionChannel;
2108
- interactionProvider: InteractionProvider;
2109
- isCampaignEngaged: boolean;
2110
- campaignId?: string | null;
2111
- lastCampaignFlowNodeId?: string | null;
2112
- lastInteractionMessageId?: string | null;
2113
- metadata?: string | null;
2114
- lastActivityAt?: number | null;
2115
- lastMessageAt?: number | null;
2116
- archivedAt?: number | null;
2117
- blockedAt?: number | null;
2118
- isTicketCreated: boolean;
2119
- ticketId?: string | null;
2120
- ticket?: Ticket | null;
2121
- createdAt: number;
2122
- updatedAt: number;
2123
- deletedAt?: number | null;
2124
- interactions?: List<Interaction> | null;
2125
- messages?: List<InteractionMessage> | null;
2126
- };
2127
- type CreateEntityConversationInput = {
2128
- id?: string | null;
2129
- tenantId: string;
2130
- entityId?: string | null;
2131
- entityAddress: string;
2132
- interactionChannel: InteractionChannel;
2133
- interactionProvider: InteractionProvider;
2134
- isCampaignEngaged: boolean;
2135
- campaignId?: string | null;
2136
- lastCampaignFlowNodeId?: string | null;
2137
- lastInteractionMessageId?: string | null;
2138
- metadata?: string | null;
2139
- lastActivityAt?: number | null;
2140
- lastMessageAt?: number | null;
2141
- archivedAt?: number | null;
2142
- blockedAt?: number | null;
2143
- isTicketCreated: boolean;
2144
- ticketId?: string | null;
2145
- createdAt: number;
2146
- updatedAt: number;
2147
- deletedAt?: number | null;
2148
- };
2149
- type UpdateEntityConversationInput = {
2150
- id: string;
2151
- tenantId?: string | null;
2152
- entityId?: string | null;
2153
- entityAddress?: string | null;
2154
- interactionChannel?: InteractionChannel | null;
2155
- interactionProvider?: InteractionProvider | null;
2156
- isCampaignEngaged?: boolean | null;
2157
- campaignId?: string | null;
2158
- lastCampaignFlowNodeId?: string | null;
2159
- lastInteractionMessageId?: string | null;
2160
- metadata?: string | null;
2161
- lastActivityAt?: number | null;
2162
- lastMessageAt?: number | null;
2163
- archivedAt?: number | null;
2164
- blockedAt?: number | null;
2165
- isTicketCreated?: boolean | null;
2166
- ticketId?: string | null;
2167
- createdAt?: number | null;
2168
- updatedAt?: number | null;
2169
- deletedAt?: number | null;
2170
- };
2171
- type ModelEntityConversationConditionInput = {
2172
- tenantId?: ModelIDInput | null;
2173
- entityId?: ModelIDInput | null;
2174
- entityAddress?: ModelStringInput | null;
2175
- interactionChannel?: ModelInteractionChannelInput | null;
2176
- interactionProvider?: ModelInteractionProviderInput | null;
2177
- isCampaignEngaged?: ModelBooleanInput | null;
2178
- campaignId?: ModelIDInput | null;
2179
- lastCampaignFlowNodeId?: ModelIDInput | null;
2180
- lastInteractionMessageId?: ModelIDInput | null;
2181
- metadata?: ModelStringInput | null;
2182
- lastActivityAt?: ModelIntInput | null;
2183
- lastMessageAt?: ModelIntInput | null;
2184
- archivedAt?: ModelIntInput | null;
2185
- blockedAt?: ModelIntInput | null;
2186
- isTicketCreated?: ModelBooleanInput | null;
2187
- ticketId?: ModelIDInput | null;
2188
- createdAt?: ModelIntInput | null;
2189
- updatedAt?: ModelIntInput | null;
2190
- deletedAt?: ModelIntInput | null;
2191
- and?: Array<ModelEntityConversationConditionInput | null> | null;
2192
- or?: Array<ModelEntityConversationConditionInput | null> | null;
2193
- not?: ModelEntityConversationConditionInput | null;
2194
- };
2195
- type ModelEntityConversationFilterInput = {
2196
- id?: ModelIDInput | null;
2197
- tenantId?: ModelIDInput | null;
2198
- entityId?: ModelIDInput | null;
2199
- entityAddress?: ModelStringInput | null;
2200
- interactionChannel?: ModelInteractionChannelInput | null;
2201
- interactionProvider?: ModelInteractionProviderInput | null;
2202
- isCampaignEngaged?: ModelBooleanInput | null;
2203
- campaignId?: ModelIDInput | null;
2204
- lastCampaignFlowNodeId?: ModelIDInput | null;
2205
- lastInteractionMessageId?: ModelIDInput | null;
2206
- metadata?: ModelStringInput | null;
2207
- lastActivityAt?: ModelIntInput | null;
2208
- lastMessageAt?: ModelIntInput | null;
2209
- archivedAt?: ModelIntInput | null;
2210
- blockedAt?: ModelIntInput | null;
2211
- isTicketCreated?: ModelBooleanInput | null;
2212
- ticketId?: ModelIDInput | null;
2213
- createdAt?: ModelIntInput | null;
2214
- updatedAt?: ModelIntInput | null;
2215
- deletedAt?: ModelIntInput | null;
2216
- and?: Array<ModelEntityConversationFilterInput | null> | null;
2217
- or?: Array<ModelEntityConversationFilterInput | null> | null;
2218
- not?: ModelEntityConversationFilterInput | null;
2219
- };
2220
-
2221
2223
  declare const FIELDS_LANGUAGE = "\n code\n nameEn\n nameLocal\n";
2222
2224
  declare const FIELDS_COUNTRY = "\n code\n nameEn\n nameLocal\n currency {\n code\n nameEn\n }\n officialLanguage {\n \n code\n nameEn\n nameLocal\n\n }\n callingCode\n region\n flag\n";
2223
2225
  declare const FIELDS_PHONE_NUMBER = "\n countryCode\n dialCode\n e164Number\n internationalNumber\n nationalNumber\n number\n";
@@ -2262,9 +2264,9 @@ declare class EntityService {
2262
2264
  type __SubscriptionContainer$4 = {
2263
2265
  OnEntityConversationByTenantId: EntityConversation;
2264
2266
  };
2265
- declare const FIELDS_ENTITY_CONVERSATION = "\n id\n tenantId\n entityId\n entity {\n \n id\n externalId\n tenantId\n entityTypeId\n entityType {\n \n id\n externalId\n tenantId\n name\n description\n image {\n key\n bucket\n location\n }\n createdAt\n updatedAt\n deletedAt\n\n }\n parentId\n name\n image {\n key\n bucket\n location\n }\n email\n phoneNumber {\n countryCode\n dialCode\n e164Number\n internationalNumber\n nationalNumber\n number\n }\n phoneNumberE164\n isOrganization\n customFields\n metadata\n notes\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 }\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 isTicketCreated\n ticketId\n createdAt\n updatedAt\n deletedAt\n";
2266
- declare const FIELDS_ENTITY_CONVERSATION_MINIMAL = "\n id\n tenantId\n entityId\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 isTicketCreated\n ticketId\n createdAt\n updatedAt\n deletedAt\n";
2267
- declare const FIELDS_ENTITY_CONVERSATION_EXPANDED = "\n id\n tenantId\n entityId\n entity {\n \n id\n externalId\n tenantId\n entityTypeId\n entityType {\n \n id\n externalId\n tenantId\n name\n description\n image {\n key\n bucket\n location\n }\n createdAt\n updatedAt\n deletedAt\n\n }\n parentId\n name\n image {\n key\n bucket\n location\n }\n email\n phoneNumber {\n countryCode\n dialCode\n e164Number\n internationalNumber\n nationalNumber\n number\n }\n phoneNumberE164\n isOrganization\n customFields\n metadata\n notes\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 }\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 isTicketCreated\n ticketId\n createdAt\n updatedAt\n deletedAt\n interactions (limit: 1, sortDirection: DESC) {\n items {\n \n id\n tenantId\n widgetId\n endpointId\n entityConversationId\n entityId\n teamId\n hostId\n host {\n \n id\n interactionId\n entityId\n teamId\n userId\n createdAt\n updatedAt\n deletedAt\n\n }\n providerInteractionId\n channel\n provider\n context\n direction\n status\n last_status\n subject\n metadata\n notes\n summary\n transcription {\n key\n bucket\n location\n }\n recording {\n key\n bucket\n location\n }\n routeConfiguration {\n teamId\n routingLogic\n maxWaitTimeoutSeconds\n }\n startedAt\n completedAt\n duration\n aiProcessingStatus\n aiProcessingCompletedAt\n postProcessingStatus\n postProcessingCompletedAt\n reportProcessingStatus\n reportProcessingCompletedAt\n temp_isLocked\n temp_isAvailableTenantIdUnion\n createdAt\n updatedAt\n deletedAt\n\n }\n nextToken\n }\n messages (limit: 1, sortDirection: DESC) {\n items {\n \n id\n externalId\n endpointId\n campaignId\n campaignFlowNodeId\n entityConversationId\n interactionId\n interactionAttendeeId\n body\n metadata\n referenceMessageId\n createdAt\n updatedAt\n deletedAt\n messageAttachments {\n items {\n \n id\n externalId\n interactionId\n interactionMessageId\n name\n size\n type\n file {\n key\n bucket\n location\n }\n createdAt\n updatedAt\n deletedAt\n\n }\n nextToken\n }\n\n }\n nextToken\n }\n";
2267
+ declare const FIELDS_ENTITY_CONVERSATION = "\n id\n tenantId\n entityId\n entity {\n \n id\n externalId\n tenantId\n entityTypeId\n entityType {\n \n id\n externalId\n tenantId\n name\n description\n image {\n key\n bucket\n location\n }\n createdAt\n updatedAt\n deletedAt\n\n }\n parentId\n name\n image {\n key\n bucket\n location\n }\n email\n phoneNumber {\n countryCode\n dialCode\n e164Number\n internationalNumber\n nationalNumber\n number\n }\n phoneNumberE164\n isOrganization\n customFields\n metadata\n notes\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 }\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";
2268
+ declare const FIELDS_ENTITY_CONVERSATION_MINIMAL = "\n id\n tenantId\n entityId\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";
2269
+ declare const FIELDS_ENTITY_CONVERSATION_EXPANDED = "\n id\n tenantId\n entityId\n entity {\n \n id\n externalId\n tenantId\n entityTypeId\n entityType {\n \n id\n externalId\n tenantId\n name\n description\n image {\n key\n bucket\n location\n }\n createdAt\n updatedAt\n deletedAt\n\n }\n parentId\n name\n image {\n key\n bucket\n location\n }\n email\n phoneNumber {\n countryCode\n dialCode\n e164Number\n internationalNumber\n nationalNumber\n number\n }\n phoneNumberE164\n isOrganization\n customFields\n metadata\n notes\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 }\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 \n id\n tenantId\n widgetId\n endpointId\n entityConversationId\n entityId\n teamId\n hostId\n host {\n \n id\n interactionId\n entityId\n teamId\n userId\n createdAt\n updatedAt\n deletedAt\n\n }\n providerInteractionId\n channel\n provider\n context\n direction\n status\n last_status\n subject\n metadata\n notes\n summary\n transcription {\n key\n bucket\n location\n }\n recording {\n key\n bucket\n location\n }\n routeConfiguration {\n teamId\n routingLogic\n maxWaitTimeoutSeconds\n }\n startedAt\n completedAt\n duration\n aiProcessingStatus\n aiProcessingCompletedAt\n postProcessingStatus\n postProcessingCompletedAt\n reportProcessingStatus\n reportProcessingCompletedAt\n temp_isLocked\n temp_isAvailableTenantIdUnion\n createdAt\n updatedAt\n deletedAt\n\n }\n nextToken\n }\n messages (limit: 1, sortDirection: DESC) {\n items {\n \n id\n externalId\n endpointId\n campaignId\n campaignFlowNodeId\n entityConversationId\n interactionId\n interactionAttendeeId\n body\n metadata\n referenceMessageId\n direction\n createdAt\n updatedAt\n deletedAt\n messageAttachments {\n items {\n \n id\n externalId\n interactionId\n interactionMessageId\n name\n size\n type\n file {\n key\n bucket\n location\n }\n createdAt\n updatedAt\n deletedAt\n\n }\n nextToken\n }\n\n }\n nextToken\n }\n";
2268
2270
  declare class EntityConversationService {
2269
2271
  private readonly appSyncService;
2270
2272
  constructor(appSyncService: AppSyncHelperService);
@@ -2293,8 +2295,8 @@ declare const FIELDS_INTERACTION_INVITEE = "\n id\n interactionId\n interacti
2293
2295
  declare const FIELDS_INTERACTION_ATTENDEE = "\n id\n interactionId\n entityId\n interactionWidgetSessionId\n teamId\n userId\n userSessionId\n name\n metadata\n customFields\n isAdministrator\n joinedAt\n exitedAt\n createdAt\n updatedAt\n deletedAt\n";
2294
2296
  declare const FIELDS_INTERACTION_ATTENDEE_EXPANDED = "\n id\n interactionId\n entityId\n entity {\n \n id\n externalId\n tenantId\n entityTypeId\n entityType {\n \n id\n externalId\n tenantId\n name\n description\n image {\n key\n bucket\n location\n }\n createdAt\n updatedAt\n deletedAt\n\n }\n parentId\n name\n image {\n key\n bucket\n location\n }\n email\n phoneNumber {\n countryCode\n dialCode\n e164Number\n internationalNumber\n nationalNumber\n number\n }\n phoneNumberE164\n isOrganization\n customFields\n metadata\n notes\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 }\n interactionWidgetSessionId\n teamId\n team {\n \n id\n tenantId\n name\n description\n image {\n key\n bucket\n location\n }\n ticketFields\n createdAt\n updatedAt\n deletedAt\n\n }\n userId\n user {\n \n id\n externalId\n tenantId\n email\n name\n image {\n key\n bucket\n location\n }\n phoneNumber {\n \n countryCode\n dialCode\n e164Number\n internationalNumber\n nationalNumber\n number\n\n }\n preferences {\n timezoneName\n language {\n \n code\n nameEn\n nameLocal\n\n }\n }\n notificationSettings {\n allowPush\n allowEmail\n allowSMS\n allowWhatsApp\n }\n type\n activatedAt\n blockedAt\n createdAt\n updatedAt\n deletedAt\n updatedByUserId\n updatedByUserSessionId\n\n }\n userSessionId\n name\n metadata\n customFields\n isAdministrator\n joinedAt\n exitedAt\n createdAt\n updatedAt\n deletedAt\n";
2295
2297
  declare const FIELDS_INTERACTION_MESSAGE_ATTACHMENT = "\n id\n externalId\n interactionId\n interactionMessageId\n name\n size\n type\n file {\n key\n bucket\n location\n }\n createdAt\n updatedAt\n deletedAt\n";
2296
- declare const FIELDS_INTERACTION_MESSAGE = "\n id\n externalId\n endpointId\n campaignId\n campaignFlowNodeId\n entityConversationId\n interactionId\n interactionAttendeeId\n body\n metadata\n referenceMessageId\n createdAt\n updatedAt\n deletedAt\n messageAttachments {\n items {\n \n id\n externalId\n interactionId\n interactionMessageId\n name\n size\n type\n file {\n key\n bucket\n location\n }\n createdAt\n updatedAt\n deletedAt\n\n }\n nextToken\n }\n";
2297
- declare const FIELDS_INTERACTION_MESSAGE_EXPANDED = "\n id\n externalId\n endpointId\n endpoint {\n \n id\n externalId\n tenantId\n widgetId\n address\n configuration\n createdAt\n updatedAt\n deletedAt\n\n }\n campaignId\n campaignFlowNodeId\n entityConversationId\n interactionId\n interactionAttendeeId\n interactionAttendee {\n \n id\n interactionId\n entityId\n interactionWidgetSessionId\n teamId\n userId\n userSessionId\n name\n metadata\n customFields\n isAdministrator\n joinedAt\n exitedAt\n createdAt\n updatedAt\n deletedAt\n\n }\n body\n metadata\n referenceMessageId\n createdAt\n updatedAt\n deletedAt\n messageAttachments {\n items {\n \n id\n externalId\n interactionId\n interactionMessageId\n name\n size\n type\n file {\n key\n bucket\n location\n }\n createdAt\n updatedAt\n deletedAt\n\n }\n nextToken\n }\n";
2298
+ declare const FIELDS_INTERACTION_MESSAGE = "\n id\n externalId\n endpointId\n campaignId\n campaignFlowNodeId\n entityConversationId\n interactionId\n interactionAttendeeId\n body\n metadata\n referenceMessageId\n direction\n createdAt\n updatedAt\n deletedAt\n messageAttachments {\n items {\n \n id\n externalId\n interactionId\n interactionMessageId\n name\n size\n type\n file {\n key\n bucket\n location\n }\n createdAt\n updatedAt\n deletedAt\n\n }\n nextToken\n }\n";
2299
+ declare const FIELDS_INTERACTION_MESSAGE_EXPANDED = "\n id\n externalId\n endpointId\n endpoint {\n \n id\n externalId\n tenantId\n widgetId\n address\n configuration\n createdAt\n updatedAt\n deletedAt\n\n }\n campaignId\n campaignFlowNodeId\n entityConversationId\n interactionId\n interactionAttendeeId\n interactionAttendee {\n \n id\n interactionId\n entityId\n interactionWidgetSessionId\n teamId\n userId\n userSessionId\n name\n metadata\n customFields\n isAdministrator\n joinedAt\n exitedAt\n createdAt\n updatedAt\n deletedAt\n\n }\n body\n metadata\n referenceMessageId\n direction\n createdAt\n updatedAt\n deletedAt\n messageAttachments {\n items {\n \n id\n externalId\n interactionId\n interactionMessageId\n name\n size\n type\n file {\n key\n bucket\n location\n }\n createdAt\n updatedAt\n deletedAt\n\n }\n nextToken\n }\n";
2298
2300
  declare class InteractionService {
2299
2301
  private readonly appSyncService;
2300
2302
  newInteractionInviteObservable$: BehaviorSubject<any>;
@@ -2537,19 +2539,21 @@ interface EmailMessageMetadata {
2537
2539
  spamReason?: string;
2538
2540
  }
2539
2541
 
2540
- interface EmailTemplate {
2542
+ interface InteractionMessageTemplate {
2541
2543
  id: string;
2542
2544
  tenantId: string;
2543
2545
  name: string;
2544
2546
  subject?: string;
2545
2547
  body: string;
2548
+ metadata?: Record<string, any>;
2546
2549
  variables?: Record<string, any>[];
2547
- category?: string;
2548
- isActive: boolean;
2549
- createdByUserId: string;
2550
+ interactionChannel?: string;
2551
+ interactionProvider?: string;
2550
2552
  createdAt: number;
2551
2553
  updatedAt: number;
2552
2554
  deletedAt?: number;
2555
+ updatedByUserId: string;
2556
+ updatedByUserSessionId?: string;
2553
2557
  }
2554
2558
 
2555
2559
  interface EmailConversationFilters {
@@ -2603,16 +2607,16 @@ declare class EmailConversationResolverService {
2603
2607
  static ɵprov: i0.ɵɵInjectableDeclaration<EmailConversationResolverService>;
2604
2608
  }
2605
2609
 
2606
- declare const FIELDS_EMAIL_TEMPLATE = "\n id\n tenantId\n name\n subject\n body\n variables\n category\n isActive\n createdByUserId\n createdAt\n updatedAt\n deletedAt\n";
2607
- declare class EmailTemplateService {
2610
+ declare const FIELDS_INTERACTION_MESSAGE_TEMPLATE = "\n id\n tenantId\n name\n subject\n body\n metadata\n variables\n interactionChannel\n InteractionProvider\n createdAt\n updatedAt\n deletedAt\n updatedByUserId\n updatedByUserSessionId\n";
2611
+ declare class InteractionMessageTemplateService {
2608
2612
  private appSyncHelperService;
2609
2613
  constructor(appSyncHelperService: AppSyncHelperService);
2610
- listTemplates(tenantId: string, category?: string): Promise<List<EmailTemplate>>;
2611
- getTemplate(templateId: string): Promise<EmailTemplate | null>;
2614
+ listTemplates(tenantId: string, interactionChannel?: string): Promise<List<InteractionMessageTemplate>>;
2615
+ getTemplate(templateId: string): Promise<InteractionMessageTemplate | null>;
2612
2616
  renderTemplate(body: string, variables: Record<string, any>): string;
2613
- static ɵfac: i0.ɵɵFactoryDeclaration<EmailTemplateService, never>;
2614
- static ɵprov: i0.ɵɵInjectableDeclaration<EmailTemplateService>;
2617
+ static ɵfac: i0.ɵɵFactoryDeclaration<InteractionMessageTemplateService, never>;
2618
+ static ɵprov: i0.ɵɵInjectableDeclaration<InteractionMessageTemplateService>;
2615
2619
  }
2616
2620
 
2617
- export { AMPLIFY_CONFIG, AppSyncHelperService, CleanDeep, CommonService, CustomPipesModule, CustomValidators, DomainNamePipe, EmailConversationResolverService, EmailEntityResolverService, EmailTemplateService, EncryptedStorageService, EntityConversationService, EntityService, ErrorComponent, FIELDS_COUNTRY, FIELDS_EMAIL_TEMPLATE, 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_ENDPOINT_MINIMAL, 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_LANGUAGE, FIELDS_PHONE_NUMBER, FIELDS_TEAM, FIELDS_TEAM_MEMBER, FIELDS_TENANT, FIELDS_TENANT_COMPLIANCE_DOCUMENT, FIELDS_TENANT_EXPANDED, FIELDS_TENANT_MINIMAL, 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, ProcessingStatus, S3HelperService, SafeHtmlPipe, SearchInnerFieldPipe, SearchPipe, SingularizePipe, SnugdeskAuthenticationService, SnugdeskCoreModule, SnugdeskIPRegistryService, StorageType, TeamService, TenantComplianceDocumentStatus, TenantComplianceDocumentType, TenantSSOConfigurationProtocol, TenantService, TicketService, UserService, UserSessionService, UserStatus, UserType, provideAmplifyConfig, sanitizeHtmlBody };
2618
- export type { AmplifyConfig, Country, CreateEntityConversationInput, CreateEntityInput, CreateInteractionAttendeeInput, CreateInteractionEndpointInput, CreateInteractionHostInput, CreateInteractionInput, CreateInteractionInviteeInput, CreateInteractionMessageAttachmentInput, CreateInteractionMessageInput, CreateTeamInput, CreateTeamMemberInput, CreateTenantComplianceDocumentInput, CreateTenantInput, CreateUserInput, Currency, EmailConversationFilters, EmailHeaders, EmailMessageMetadata, EmailTemplate, EncryptedStorageKeys, Entity, EntityContactPreferences, EntityConversation, EntityPreferences, EntityType, Interaction, InteractionAttendee, InteractionEndpoint, InteractionEndpointPriceDetails, InteractionEndpointRegulatoryComplianceDocument, InteractionHost, InteractionInvitee, InteractionMessage, InteractionMessageAttachment, InteractionRouteConfiguration, InteractionRouteConfigurationInput, InteractionWidget, InteractionWidgetUserSetting, Language, List, MailboxConfig, ModelBooleanInput, ModelEntityConditionInput, ModelEntityConversationConditionInput, ModelEntityConversationFilterInput, ModelEntityFilterInput, ModelEntityTypeConditionInput, ModelEntityTypeFilterInput, ModelIDInput, ModelIDKeyConditionInput, ModelIntInput, ModelIntKeyConditionInput, ModelInteractionAttendeeConditionInput, ModelInteractionAttendeeFilterInput, ModelInteractionChannelInput, ModelInteractionConditionInput, ModelInteractionContextInput, ModelInteractionDirectionInput, ModelInteractionEndpointConditionInput, ModelInteractionEndpointFilterInput, ModelInteractionFilterInput, ModelInteractionHostConditionInput, ModelInteractionHostFilterInput, ModelInteractionInviteeConditionInput, ModelInteractionInviteeFilterInput, ModelInteractionMessageAttachmentConditionInput, ModelInteractionMessageAttachmentFilterInput, ModelInteractionMessageConditionInput, ModelInteractionMessageFilterInput, ModelInteractionProviderInput, ModelInteractionStatusInput, ModelInteractionWidgetConditionInput, ModelInteractionWidgetFilterInput, ModelInteractionWidgetUserSettingFilterInput, ModelProcessingStatusInput, ModelSizeInput, ModelStringInput, ModelStringKeyConditionInput, ModelTeamConditionInput, ModelTeamFilterInput, ModelTeamMemberConditionInput, ModelTeamMemberFilterInput, ModelTenantComplianceDocumentConditionInput, ModelTenantComplianceDocumentFilterInput, ModelTenantComplianceDocumentStatusInput, ModelTenantComplianceDocumentTypeInput, ModelTenantConditionInput, ModelTicketConditionInput, ModelTicketFilterInput, ModelTicketPriorityConditionInput, ModelTicketPriorityFilterInput, ModelTicketStatusConditionInput, ModelTicketStatusFilterInput, ModelTicketTypeConditionInput, ModelTicketTypeFilterInput, ModelUserConditionInput, ModelUserFilterInput, ModelUserSessionConditionInput, ModelUserSessionFilterInput, ModelUserStatusInput, ModelUserTypeInput, OAuthConfig, OpenSearchHit, OpenSearchResponse, PhoneNumber, S3Config, S3Credentials, S3Object, SubscriptionResponse, Team, TeamMember, Tenant, TenantBillingInformation, TenantComplianceDocument, TenantContactInformation, TenantPreferences, TenantSSOConfiguration, TenantSecurity, Ticket, TicketPriority, TicketStatus, TicketType, UpdateEntityConversationInput, UpdateEntityInput, UpdateInteractionAttendeeInput, UpdateInteractionEndpointInput, UpdateInteractionHostInput, UpdateInteractionInput, UpdateInteractionInviteeInput, UpdateTeamInput, UpdateTeamMemberInput, UpdateTenantComplianceDocumentInput, UpdateTenantInput, UpdateUserInput, UpdateUserSessionInput, User, UserNotificationSettings, UserPreferences, UserSession };
2621
+ export { AMPLIFY_CONFIG, AppSyncHelperService, CleanDeep, CommonService, CustomPipesModule, CustomValidators, DomainNamePipe, EmailConversationResolverService, EmailEntityResolverService, EncryptedStorageService, EntityConversationService, EntityService, ErrorComponent, FIELDS_COUNTRY, 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_ENDPOINT_MINIMAL, FIELDS_INTERACTION_EXPANDED, FIELDS_INTERACTION_HOST, FIELDS_INTERACTION_INVITEE, FIELDS_INTERACTION_MESSAGE, FIELDS_INTERACTION_MESSAGE_ATTACHMENT, FIELDS_INTERACTION_MESSAGE_EXPANDED, FIELDS_INTERACTION_MESSAGE_TEMPLATE, FIELDS_INTERACTION_MINIMAL, FIELDS_INTERACTION_WIDGET, FIELDS_INTERACTION_WIDGET_USER_SETTING, FIELDS_LANGUAGE, FIELDS_PHONE_NUMBER, FIELDS_TEAM, FIELDS_TEAM_MEMBER, FIELDS_TENANT, FIELDS_TENANT_COMPLIANCE_DOCUMENT, FIELDS_TENANT_EXPANDED, FIELDS_TENANT_MINIMAL, FIELDS_TICKET, FIELDS_TICKET_PRIORITY, FIELDS_TICKET_STATUS, FIELDS_TICKET_TYPE, FIELDS_USER, FIELDS_USER_SESSION, FooterComponent, FormatEpochTimestampPipe, InteractionChannel, InteractionContext, InteractionDirection, InteractionEndpointService, InteractionMessageDirection, InteractionMessageTemplateService, InteractionProvider, InteractionRouteLogic, InteractionService, InteractionStatus, InteractionWidgetService, LoaderComponent, ModelAttributeTypes, ModelSortDirection, OpenSearchHelperService, ProcessingStatus, S3HelperService, SafeHtmlPipe, SearchInnerFieldPipe, SearchPipe, SingularizePipe, SnugdeskAuthenticationService, SnugdeskCoreModule, SnugdeskIPRegistryService, StorageType, TeamService, TenantComplianceDocumentStatus, TenantComplianceDocumentType, TenantSSOConfigurationProtocol, TenantService, TicketService, UserService, UserSessionService, UserStatus, UserType, provideAmplifyConfig, sanitizeHtmlBody };
2622
+ export type { AmplifyConfig, Country, CreateEntityConversationInput, CreateEntityInput, CreateInteractionAttendeeInput, CreateInteractionEndpointInput, CreateInteractionHostInput, CreateInteractionInput, CreateInteractionInviteeInput, CreateInteractionMessageAttachmentInput, CreateInteractionMessageInput, CreateTeamInput, CreateTeamMemberInput, CreateTenantComplianceDocumentInput, CreateTenantInput, CreateUserInput, Currency, EmailConversationFilters, EmailHeaders, EmailMessageMetadata, EncryptedStorageKeys, Entity, EntityContactPreferences, EntityConversation, EntityPreferences, EntityType, Interaction, InteractionAttendee, InteractionEndpoint, InteractionEndpointPriceDetails, InteractionEndpointRegulatoryComplianceDocument, InteractionHost, InteractionInvitee, InteractionMessage, InteractionMessageAttachment, InteractionMessageTemplate, InteractionRouteConfiguration, InteractionRouteConfigurationInput, InteractionWidget, InteractionWidgetUserSetting, Language, List, MailboxConfig, ModelBooleanInput, ModelEntityConditionInput, ModelEntityConversationConditionInput, ModelEntityConversationFilterInput, ModelEntityFilterInput, ModelEntityTypeConditionInput, ModelEntityTypeFilterInput, ModelIDInput, ModelIDKeyConditionInput, ModelIntInput, ModelIntKeyConditionInput, ModelInteractionAttendeeConditionInput, ModelInteractionAttendeeFilterInput, ModelInteractionChannelInput, ModelInteractionConditionInput, ModelInteractionContextInput, ModelInteractionDirectionInput, ModelInteractionEndpointConditionInput, ModelInteractionEndpointFilterInput, ModelInteractionFilterInput, ModelInteractionHostConditionInput, ModelInteractionHostFilterInput, ModelInteractionInviteeConditionInput, ModelInteractionInviteeFilterInput, ModelInteractionMessageAttachmentConditionInput, ModelInteractionMessageAttachmentFilterInput, ModelInteractionMessageConditionInput, ModelInteractionMessageDirectionInput, ModelInteractionMessageFilterInput, ModelInteractionProviderInput, ModelInteractionStatusInput, ModelInteractionWidgetConditionInput, ModelInteractionWidgetFilterInput, ModelInteractionWidgetUserSettingFilterInput, ModelProcessingStatusInput, ModelSizeInput, ModelStringInput, ModelStringKeyConditionInput, ModelTeamConditionInput, ModelTeamFilterInput, ModelTeamMemberConditionInput, ModelTeamMemberFilterInput, ModelTenantComplianceDocumentConditionInput, ModelTenantComplianceDocumentFilterInput, ModelTenantComplianceDocumentStatusInput, ModelTenantComplianceDocumentTypeInput, ModelTenantConditionInput, ModelTicketConditionInput, ModelTicketFilterInput, ModelTicketPriorityConditionInput, ModelTicketPriorityFilterInput, ModelTicketStatusConditionInput, ModelTicketStatusFilterInput, ModelTicketTypeConditionInput, ModelTicketTypeFilterInput, ModelUserConditionInput, ModelUserFilterInput, ModelUserSessionConditionInput, ModelUserSessionFilterInput, ModelUserStatusInput, ModelUserTypeInput, OAuthConfig, OpenSearchHit, OpenSearchResponse, PhoneNumber, S3Config, S3Credentials, S3Object, SubscriptionResponse, Team, TeamMember, Tenant, TenantBillingInformation, TenantComplianceDocument, TenantContactInformation, TenantPreferences, TenantSSOConfiguration, TenantSecurity, Ticket, TicketPriority, TicketStatus, TicketType, UpdateEntityConversationInput, UpdateEntityInput, UpdateInteractionAttendeeInput, UpdateInteractionEndpointInput, UpdateInteractionHostInput, UpdateInteractionInput, UpdateInteractionInviteeInput, UpdateTeamInput, UpdateTeamMemberInput, UpdateTenantComplianceDocumentInput, UpdateTenantInput, UpdateUserInput, UpdateUserSessionInput, User, UserNotificationSettings, UserPreferences, UserSession };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@snugdesk/core",
3
- "version": "0.2.31",
3
+ "version": "0.2.33",
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",