@snugdesk/core 0.2.10 → 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 +120 -1
- package/fesm2022/snugdesk-core.mjs.map +1 -1
- package/index.d.ts +71 -2
- 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(
|
|
@@ -2858,11 +2895,93 @@ const FIELDS_TICKET_TYPE = `
|
|
|
2858
2895
|
updatedAt
|
|
2859
2896
|
deletedAt
|
|
2860
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
|
+
`;
|
|
2861
2931
|
class TicketService {
|
|
2862
2932
|
appSyncService;
|
|
2863
2933
|
constructor(appSyncService) {
|
|
2864
2934
|
this.appSyncService = appSyncService;
|
|
2865
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
|
+
}
|
|
2866
2985
|
async ListTicketPrioritiesByTenantId(tenantId, name, sortDirection, filter, limit, nextToken) {
|
|
2867
2986
|
const statement = `query ListTicketPrioritiesByTenantId($tenantId: ID!, $name: ModelStringKeyConditionInput, $sortDirection: ModelSortDirection, $filter: ModelTicketPriorityFilterInput, $limit: Int, $nextToken: String) {
|
|
2868
2987
|
listTicketPrioritiesByTenantId(
|
|
@@ -3182,5 +3301,5 @@ class CustomValidators {
|
|
|
3182
3301
|
* Generated bundle index. Do not edit.
|
|
3183
3302
|
*/
|
|
3184
3303
|
|
|
3185
|
-
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 };
|
|
3186
3305
|
//# sourceMappingURL=snugdesk-core.mjs.map
|