@snugdesk/core 0.2.9 → 0.2.11
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 +138 -2
- package/fesm2022/snugdesk-core.mjs.map +1 -1
- package/index.d.ts +72 -3
- package/package.json +1 -1
|
@@ -1438,6 +1438,43 @@ class EntityService {
|
|
|
1438
1438
|
const response = await this.appSyncService.query(statement, gqlAPIServiceArguments);
|
|
1439
1439
|
return response.data.listEntitiesByTenantId;
|
|
1440
1440
|
}
|
|
1441
|
+
async ListEntitiesByTenantIdAndExternalId(tenantId, externalId, sortDirection, filter, limit, nextToken) {
|
|
1442
|
+
const statement = `query ListEntitiesByTenantIdAndExternalId($tenantId: ID!, $externalId: ModelStringKeyConditionInput, $sortDirection: ModelSortDirection, $filter: ModelEntityFilterInput, $limit: Int, $nextToken: String) {
|
|
1443
|
+
listEntitiesByTenantIdAndExternalId(
|
|
1444
|
+
tenantId: $tenantId
|
|
1445
|
+
externalId: $externalId
|
|
1446
|
+
sortDirection: $sortDirection
|
|
1447
|
+
filter: $filter
|
|
1448
|
+
limit: $limit
|
|
1449
|
+
nextToken: $nextToken
|
|
1450
|
+
) {
|
|
1451
|
+
items {
|
|
1452
|
+
${FIELDS_ENTITY_EXPANDED}
|
|
1453
|
+
}
|
|
1454
|
+
nextToken
|
|
1455
|
+
}
|
|
1456
|
+
}`;
|
|
1457
|
+
const gqlAPIServiceArguments = {
|
|
1458
|
+
tenantId,
|
|
1459
|
+
};
|
|
1460
|
+
if (externalId) {
|
|
1461
|
+
gqlAPIServiceArguments.externalId = externalId;
|
|
1462
|
+
}
|
|
1463
|
+
if (sortDirection) {
|
|
1464
|
+
gqlAPIServiceArguments.sortDirection = sortDirection;
|
|
1465
|
+
}
|
|
1466
|
+
if (filter) {
|
|
1467
|
+
gqlAPIServiceArguments.filter = filter;
|
|
1468
|
+
}
|
|
1469
|
+
if (limit) {
|
|
1470
|
+
gqlAPIServiceArguments.limit = limit;
|
|
1471
|
+
}
|
|
1472
|
+
if (nextToken) {
|
|
1473
|
+
gqlAPIServiceArguments.nextToken = nextToken;
|
|
1474
|
+
}
|
|
1475
|
+
const response = await this.appSyncService.query(statement, gqlAPIServiceArguments);
|
|
1476
|
+
return response.data.listEntitiesByTenantIdAndExternalId;
|
|
1477
|
+
}
|
|
1441
1478
|
async ListEntitiesByTenantIdAndPhoneNumberE164(tenantId, phoneNumberE164, sortDirection, filter, limit, nextToken) {
|
|
1442
1479
|
const statement = `query ListEntitiesByTenantIdAndPhoneNumberE164($tenantId: ID!, $phoneNumberE164: ModelStringKeyConditionInput, $sortDirection: ModelSortDirection, $filter: ModelEntityFilterInput, $limit: Int, $nextToken: String) {
|
|
1443
1480
|
listEntitiesByTenantIdAndPhoneNumberE164(
|
|
@@ -1892,7 +1929,24 @@ const FIELDS_INTERACTION_EXPANDED = `
|
|
|
1892
1929
|
}
|
|
1893
1930
|
entityConversationId
|
|
1894
1931
|
entityConversation {
|
|
1895
|
-
|
|
1932
|
+
id
|
|
1933
|
+
tenantId
|
|
1934
|
+
entityId
|
|
1935
|
+
entityAddress
|
|
1936
|
+
interactionChannel
|
|
1937
|
+
interactionProvider
|
|
1938
|
+
isCampaignEngaged
|
|
1939
|
+
campaignId
|
|
1940
|
+
lastCampaignFlowNodeId
|
|
1941
|
+
lastInteractionMessageId
|
|
1942
|
+
metadata
|
|
1943
|
+
lastActivityAt
|
|
1944
|
+
lastMessageAt
|
|
1945
|
+
archivedAt
|
|
1946
|
+
blockedAt
|
|
1947
|
+
createdAt
|
|
1948
|
+
updatedAt
|
|
1949
|
+
deletedAt
|
|
1896
1950
|
}
|
|
1897
1951
|
entityId
|
|
1898
1952
|
entity {
|
|
@@ -2841,11 +2895,93 @@ const FIELDS_TICKET_TYPE = `
|
|
|
2841
2895
|
updatedAt
|
|
2842
2896
|
deletedAt
|
|
2843
2897
|
`;
|
|
2898
|
+
const FIELDS_TICKET = `
|
|
2899
|
+
id
|
|
2900
|
+
externalId
|
|
2901
|
+
tenantId
|
|
2902
|
+
entityId
|
|
2903
|
+
entity {
|
|
2904
|
+
${FIELDS_ENTITY}
|
|
2905
|
+
}
|
|
2906
|
+
parentEntityId
|
|
2907
|
+
parentEntity {
|
|
2908
|
+
${FIELDS_ENTITY}
|
|
2909
|
+
}
|
|
2910
|
+
subject
|
|
2911
|
+
description
|
|
2912
|
+
typeId
|
|
2913
|
+
type {
|
|
2914
|
+
${FIELDS_TICKET_TYPE}
|
|
2915
|
+
}
|
|
2916
|
+
statusId
|
|
2917
|
+
status {
|
|
2918
|
+
${FIELDS_TICKET_STATUS}
|
|
2919
|
+
}
|
|
2920
|
+
priorityId
|
|
2921
|
+
priority {
|
|
2922
|
+
${FIELDS_TICKET_PRIORITY}
|
|
2923
|
+
}
|
|
2924
|
+
resolvedAt
|
|
2925
|
+
notes
|
|
2926
|
+
createdByUserId
|
|
2927
|
+
createdAt
|
|
2928
|
+
updatedAt
|
|
2929
|
+
deletedAt
|
|
2930
|
+
`;
|
|
2844
2931
|
class TicketService {
|
|
2845
2932
|
appSyncService;
|
|
2846
2933
|
constructor(appSyncService) {
|
|
2847
2934
|
this.appSyncService = appSyncService;
|
|
2848
2935
|
}
|
|
2936
|
+
async GetTicket(id) {
|
|
2937
|
+
const statement = `query GetTicket($id: ID!) {
|
|
2938
|
+
getTicket(id: $id) {
|
|
2939
|
+
${FIELDS_TICKET}
|
|
2940
|
+
}
|
|
2941
|
+
}`;
|
|
2942
|
+
const gqlAPIServiceArguments = {
|
|
2943
|
+
id,
|
|
2944
|
+
};
|
|
2945
|
+
const response = await this.appSyncService.query(statement, gqlAPIServiceArguments);
|
|
2946
|
+
return response.data.getTicket;
|
|
2947
|
+
}
|
|
2948
|
+
async ListTicketsByTenantIdAndExternalId(tenantId, externalId, sortDirection, filter, limit, nextToken) {
|
|
2949
|
+
const statement = `query ListTicketsByTenantIdAndExternalId($tenantId: ID!, $externalId: ModelStringKeyConditionInput, $sortDirection: ModelSortDirection, $filter: ModelTicketFilterInput, $limit: Int, $nextToken: String) {
|
|
2950
|
+
listTicketsByTenantIdAndExternalId(
|
|
2951
|
+
tenantId: $tenantId
|
|
2952
|
+
externalId: $externalId
|
|
2953
|
+
sortDirection: $sortDirection
|
|
2954
|
+
filter: $filter
|
|
2955
|
+
limit: $limit
|
|
2956
|
+
nextToken: $nextToken
|
|
2957
|
+
) {
|
|
2958
|
+
items {
|
|
2959
|
+
${FIELDS_TICKET}
|
|
2960
|
+
}
|
|
2961
|
+
nextToken
|
|
2962
|
+
}
|
|
2963
|
+
}`;
|
|
2964
|
+
const gqlAPIServiceArguments = {
|
|
2965
|
+
tenantId,
|
|
2966
|
+
};
|
|
2967
|
+
if (externalId) {
|
|
2968
|
+
gqlAPIServiceArguments.externalId = externalId;
|
|
2969
|
+
}
|
|
2970
|
+
if (sortDirection) {
|
|
2971
|
+
gqlAPIServiceArguments.sortDirection = sortDirection;
|
|
2972
|
+
}
|
|
2973
|
+
if (filter) {
|
|
2974
|
+
gqlAPIServiceArguments.filter = filter;
|
|
2975
|
+
}
|
|
2976
|
+
if (limit) {
|
|
2977
|
+
gqlAPIServiceArguments.limit = limit;
|
|
2978
|
+
}
|
|
2979
|
+
if (nextToken) {
|
|
2980
|
+
gqlAPIServiceArguments.nextToken = nextToken;
|
|
2981
|
+
}
|
|
2982
|
+
const response = await this.appSyncService.query(statement, gqlAPIServiceArguments);
|
|
2983
|
+
return response.data.listTicketsByTenantIdAndExternalId;
|
|
2984
|
+
}
|
|
2849
2985
|
async ListTicketPrioritiesByTenantId(tenantId, name, sortDirection, filter, limit, nextToken) {
|
|
2850
2986
|
const statement = `query ListTicketPrioritiesByTenantId($tenantId: ID!, $name: ModelStringKeyConditionInput, $sortDirection: ModelSortDirection, $filter: ModelTicketPriorityFilterInput, $limit: Int, $nextToken: String) {
|
|
2851
2987
|
listTicketPrioritiesByTenantId(
|
|
@@ -3165,5 +3301,5 @@ class CustomValidators {
|
|
|
3165
3301
|
* Generated bundle index. Do not edit.
|
|
3166
3302
|
*/
|
|
3167
3303
|
|
|
3168
|
-
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_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 };
|
|
3304
|
+
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 };
|
|
3169
3305
|
//# sourceMappingURL=snugdesk-core.mjs.map
|