@snugdesk/core 0.2.6 → 0.2.8
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 +241 -22
- package/fesm2022/snugdesk-core.mjs.map +1 -1
- package/index.d.ts +547 -219
- package/package.json +1 -1
|
@@ -1116,6 +1116,62 @@ var ModelSortDirection;
|
|
|
1116
1116
|
ModelSortDirection["DESC"] = "DESC";
|
|
1117
1117
|
})(ModelSortDirection || (ModelSortDirection = {}));
|
|
1118
1118
|
|
|
1119
|
+
var InteractionChannel;
|
|
1120
|
+
(function (InteractionChannel) {
|
|
1121
|
+
InteractionChannel["EMAIL"] = "EMAIL";
|
|
1122
|
+
InteractionChannel["PHONE"] = "PHONE";
|
|
1123
|
+
InteractionChannel["SMS"] = "SMS";
|
|
1124
|
+
InteractionChannel["WEB_CHAT"] = "WEB_CHAT";
|
|
1125
|
+
InteractionChannel["SOCIAL_CHAT"] = "SOCIAL_CHAT";
|
|
1126
|
+
})(InteractionChannel || (InteractionChannel = {}));
|
|
1127
|
+
var InteractionContext;
|
|
1128
|
+
(function (InteractionContext) {
|
|
1129
|
+
InteractionContext["INTERNAL"] = "INTERNAL";
|
|
1130
|
+
InteractionContext["EXTERNAL"] = "EXTERNAL";
|
|
1131
|
+
})(InteractionContext || (InteractionContext = {}));
|
|
1132
|
+
var InteractionDirection;
|
|
1133
|
+
(function (InteractionDirection) {
|
|
1134
|
+
InteractionDirection["IN"] = "IN";
|
|
1135
|
+
InteractionDirection["OUT"] = "OUT";
|
|
1136
|
+
})(InteractionDirection || (InteractionDirection = {}));
|
|
1137
|
+
var InteractionStatus;
|
|
1138
|
+
(function (InteractionStatus) {
|
|
1139
|
+
InteractionStatus["INITIATED"] = "INITIATED";
|
|
1140
|
+
InteractionStatus["QUEUED"] = "QUEUED";
|
|
1141
|
+
InteractionStatus["RINGING"] = "RINGING";
|
|
1142
|
+
InteractionStatus["CONNECTED_TO_AGENT"] = "CONNECTED_TO_AGENT";
|
|
1143
|
+
InteractionStatus["CONNECTED_TO_BOT"] = "CONNECTED_TO_BOT";
|
|
1144
|
+
InteractionStatus["HELD"] = "HELD";
|
|
1145
|
+
InteractionStatus["DISCONNECTED"] = "DISCONNECTED";
|
|
1146
|
+
InteractionStatus["CANCELLED"] = "CANCELLED";
|
|
1147
|
+
InteractionStatus["REJECTED"] = "REJECTED";
|
|
1148
|
+
InteractionStatus["NO_ANSWER"] = "NO_ANSWER";
|
|
1149
|
+
InteractionStatus["MISSED"] = "MISSED";
|
|
1150
|
+
InteractionStatus["FAILED"] = "FAILED";
|
|
1151
|
+
})(InteractionStatus || (InteractionStatus = {}));
|
|
1152
|
+
var InteractionProvider;
|
|
1153
|
+
(function (InteractionProvider) {
|
|
1154
|
+
InteractionProvider["AVAYA_IPO"] = "AVAYA_IPO";
|
|
1155
|
+
InteractionProvider["FACEBOOK"] = "FACEBOOK";
|
|
1156
|
+
InteractionProvider["INSTAGRAM"] = "INSTAGRAM";
|
|
1157
|
+
InteractionProvider["OZONETEL"] = "OZONETEL";
|
|
1158
|
+
InteractionProvider["SNUGDESK"] = "SNUGDESK";
|
|
1159
|
+
InteractionProvider["TELEGRAM"] = "TELEGRAM";
|
|
1160
|
+
InteractionProvider["TELNYX"] = "TELNYX";
|
|
1161
|
+
InteractionProvider["WHATSAPP"] = "WHATSAPP";
|
|
1162
|
+
})(InteractionProvider || (InteractionProvider = {}));
|
|
1163
|
+
var InteractionRouteLogic;
|
|
1164
|
+
(function (InteractionRouteLogic) {
|
|
1165
|
+
InteractionRouteLogic["MOST_IDLE_AGENT"] = "MOST_IDLE_AGENT";
|
|
1166
|
+
InteractionRouteLogic["PARALLEL"] = "PARALLEL";
|
|
1167
|
+
})(InteractionRouteLogic || (InteractionRouteLogic = {}));
|
|
1168
|
+
|
|
1169
|
+
var TenantSSOConfigurationProtocol;
|
|
1170
|
+
(function (TenantSSOConfigurationProtocol) {
|
|
1171
|
+
TenantSSOConfigurationProtocol["SAML"] = "SAML";
|
|
1172
|
+
TenantSSOConfigurationProtocol["OIDC"] = "OIDC";
|
|
1173
|
+
})(TenantSSOConfigurationProtocol || (TenantSSOConfigurationProtocol = {}));
|
|
1174
|
+
|
|
1119
1175
|
var UserStatus;
|
|
1120
1176
|
(function (UserStatus) {
|
|
1121
1177
|
UserStatus["READY"] = "READY";
|
|
@@ -2748,6 +2804,169 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImpo
|
|
|
2748
2804
|
}]
|
|
2749
2805
|
}], ctorParameters: () => [{ type: AppSyncHelperService }] });
|
|
2750
2806
|
|
|
2807
|
+
const FIELDS_TICKET_PRIORITY = `
|
|
2808
|
+
id
|
|
2809
|
+
externalId
|
|
2810
|
+
tenantId
|
|
2811
|
+
teamId
|
|
2812
|
+
name
|
|
2813
|
+
description
|
|
2814
|
+
colorCode
|
|
2815
|
+
createdAt
|
|
2816
|
+
updatedAt
|
|
2817
|
+
deletedAt
|
|
2818
|
+
`;
|
|
2819
|
+
const FIELDS_TICKET_STATUS = `
|
|
2820
|
+
id
|
|
2821
|
+
externalId
|
|
2822
|
+
tenantId
|
|
2823
|
+
teamId
|
|
2824
|
+
name
|
|
2825
|
+
description
|
|
2826
|
+
percent
|
|
2827
|
+
colorCode
|
|
2828
|
+
createdAt
|
|
2829
|
+
updatedAt
|
|
2830
|
+
deletedAt
|
|
2831
|
+
`;
|
|
2832
|
+
const FIELDS_TICKET_TYPE = `
|
|
2833
|
+
id
|
|
2834
|
+
externalId
|
|
2835
|
+
tenantId
|
|
2836
|
+
teamId
|
|
2837
|
+
name
|
|
2838
|
+
description
|
|
2839
|
+
colorCode
|
|
2840
|
+
createdAt
|
|
2841
|
+
updatedAt
|
|
2842
|
+
deletedAt
|
|
2843
|
+
`;
|
|
2844
|
+
class TicketService {
|
|
2845
|
+
appSyncService;
|
|
2846
|
+
constructor(appSyncService) {
|
|
2847
|
+
this.appSyncService = appSyncService;
|
|
2848
|
+
}
|
|
2849
|
+
async ListTicketPrioritiesByTenantId(tenantId, name, sortDirection, filter, limit, nextToken) {
|
|
2850
|
+
const statement = `query ListTicketPrioritiesByTenantId($tenantId: ID!, $name: ModelStringKeyConditionInput, $sortDirection: ModelSortDirection, $filter: ModelTicketPriorityFilterInput, $limit: Int, $nextToken: String) {
|
|
2851
|
+
listTicketPrioritiesByTenantId(
|
|
2852
|
+
tenantId: $tenantId
|
|
2853
|
+
name: $name
|
|
2854
|
+
sortDirection: $sortDirection
|
|
2855
|
+
filter: $filter
|
|
2856
|
+
limit: $limit
|
|
2857
|
+
nextToken: $nextToken
|
|
2858
|
+
) {
|
|
2859
|
+
items {
|
|
2860
|
+
${FIELDS_TICKET_PRIORITY}
|
|
2861
|
+
}
|
|
2862
|
+
nextToken
|
|
2863
|
+
}
|
|
2864
|
+
}`;
|
|
2865
|
+
const gqlAPIServiceArguments = {
|
|
2866
|
+
tenantId,
|
|
2867
|
+
};
|
|
2868
|
+
if (name) {
|
|
2869
|
+
gqlAPIServiceArguments.name = name;
|
|
2870
|
+
}
|
|
2871
|
+
if (sortDirection) {
|
|
2872
|
+
gqlAPIServiceArguments.sortDirection = sortDirection;
|
|
2873
|
+
}
|
|
2874
|
+
if (filter) {
|
|
2875
|
+
gqlAPIServiceArguments.filter = filter;
|
|
2876
|
+
}
|
|
2877
|
+
if (limit) {
|
|
2878
|
+
gqlAPIServiceArguments.limit = limit;
|
|
2879
|
+
}
|
|
2880
|
+
if (nextToken) {
|
|
2881
|
+
gqlAPIServiceArguments.nextToken = nextToken;
|
|
2882
|
+
}
|
|
2883
|
+
const response = await this.appSyncService.query(statement, gqlAPIServiceArguments);
|
|
2884
|
+
return response.data.listTicketPrioritiesByTenantId;
|
|
2885
|
+
}
|
|
2886
|
+
async ListTicketStatusesByTenantId(tenantId, name, sortDirection, filter, limit, nextToken) {
|
|
2887
|
+
const statement = `query ListTicketStatusesByTenantId($tenantId: ID!, $name: ModelStringKeyConditionInput, $sortDirection: ModelSortDirection, $filter: ModelTicketStatusFilterInput, $limit: Int, $nextToken: String) {
|
|
2888
|
+
listTicketStatusesByTenantId(
|
|
2889
|
+
tenantId: $tenantId
|
|
2890
|
+
name: $name
|
|
2891
|
+
sortDirection: $sortDirection
|
|
2892
|
+
filter: $filter
|
|
2893
|
+
limit: $limit
|
|
2894
|
+
nextToken: $nextToken
|
|
2895
|
+
) {
|
|
2896
|
+
items {
|
|
2897
|
+
${FIELDS_TICKET_STATUS}
|
|
2898
|
+
}
|
|
2899
|
+
nextToken
|
|
2900
|
+
}
|
|
2901
|
+
}`;
|
|
2902
|
+
const gqlAPIServiceArguments = {
|
|
2903
|
+
tenantId,
|
|
2904
|
+
};
|
|
2905
|
+
if (name) {
|
|
2906
|
+
gqlAPIServiceArguments.name = name;
|
|
2907
|
+
}
|
|
2908
|
+
if (sortDirection) {
|
|
2909
|
+
gqlAPIServiceArguments.sortDirection = sortDirection;
|
|
2910
|
+
}
|
|
2911
|
+
if (filter) {
|
|
2912
|
+
gqlAPIServiceArguments.filter = filter;
|
|
2913
|
+
}
|
|
2914
|
+
if (limit) {
|
|
2915
|
+
gqlAPIServiceArguments.limit = limit;
|
|
2916
|
+
}
|
|
2917
|
+
if (nextToken) {
|
|
2918
|
+
gqlAPIServiceArguments.nextToken = nextToken;
|
|
2919
|
+
}
|
|
2920
|
+
const response = await this.appSyncService.query(statement, gqlAPIServiceArguments);
|
|
2921
|
+
return response.data.listTicketStatusesByTenantId;
|
|
2922
|
+
}
|
|
2923
|
+
async ListTicketTypesByTenantId(tenantId, name, sortDirection, filter, limit, nextToken) {
|
|
2924
|
+
const statement = `query ListTicketTypesByTenantId($tenantId: ID!, $name: ModelStringKeyConditionInput, $sortDirection: ModelSortDirection, $filter: ModelTicketTypeFilterInput, $limit: Int, $nextToken: String) {
|
|
2925
|
+
listTicketTypesByTenantId(
|
|
2926
|
+
tenantId: $tenantId
|
|
2927
|
+
name: $name
|
|
2928
|
+
sortDirection: $sortDirection
|
|
2929
|
+
filter: $filter
|
|
2930
|
+
limit: $limit
|
|
2931
|
+
nextToken: $nextToken
|
|
2932
|
+
) {
|
|
2933
|
+
items {
|
|
2934
|
+
${FIELDS_TICKET_TYPE}
|
|
2935
|
+
}
|
|
2936
|
+
nextToken
|
|
2937
|
+
}
|
|
2938
|
+
}`;
|
|
2939
|
+
const gqlAPIServiceArguments = {
|
|
2940
|
+
tenantId,
|
|
2941
|
+
};
|
|
2942
|
+
if (name) {
|
|
2943
|
+
gqlAPIServiceArguments.name = name;
|
|
2944
|
+
}
|
|
2945
|
+
if (sortDirection) {
|
|
2946
|
+
gqlAPIServiceArguments.sortDirection = sortDirection;
|
|
2947
|
+
}
|
|
2948
|
+
if (filter) {
|
|
2949
|
+
gqlAPIServiceArguments.filter = filter;
|
|
2950
|
+
}
|
|
2951
|
+
if (limit) {
|
|
2952
|
+
gqlAPIServiceArguments.limit = limit;
|
|
2953
|
+
}
|
|
2954
|
+
if (nextToken) {
|
|
2955
|
+
gqlAPIServiceArguments.nextToken = nextToken;
|
|
2956
|
+
}
|
|
2957
|
+
const response = await this.appSyncService.query(statement, gqlAPIServiceArguments);
|
|
2958
|
+
return response.data.listTicketTypesByTenantId;
|
|
2959
|
+
}
|
|
2960
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: TicketService, deps: [{ token: AppSyncHelperService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
2961
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: TicketService, providedIn: 'root' });
|
|
2962
|
+
}
|
|
2963
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: TicketService, decorators: [{
|
|
2964
|
+
type: Injectable,
|
|
2965
|
+
args: [{
|
|
2966
|
+
providedIn: 'root',
|
|
2967
|
+
}]
|
|
2968
|
+
}], ctorParameters: () => [{ type: AppSyncHelperService }] });
|
|
2969
|
+
|
|
2751
2970
|
const FIELDS_USER_SESSION = `
|
|
2752
2971
|
id
|
|
2753
2972
|
tenantId
|
|
@@ -2843,6 +3062,27 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImpo
|
|
|
2843
3062
|
}]
|
|
2844
3063
|
}], ctorParameters: () => [{ type: AppSyncHelperService }] });
|
|
2845
3064
|
|
|
3065
|
+
class CleanDeep {
|
|
3066
|
+
static clean(obj) {
|
|
3067
|
+
Object.keys(obj).forEach((key) => {
|
|
3068
|
+
if (obj[key] === undefined || obj[key] === null) {
|
|
3069
|
+
delete obj[key];
|
|
3070
|
+
// obj[key] = null;
|
|
3071
|
+
}
|
|
3072
|
+
else if (typeof obj[key] === 'string') {
|
|
3073
|
+
if (String(obj[key]).trim().length === 0) {
|
|
3074
|
+
delete obj[key];
|
|
3075
|
+
// obj[key] = null;
|
|
3076
|
+
}
|
|
3077
|
+
else {
|
|
3078
|
+
obj[key] = String(obj[key]).trim();
|
|
3079
|
+
}
|
|
3080
|
+
}
|
|
3081
|
+
});
|
|
3082
|
+
return obj;
|
|
3083
|
+
}
|
|
3084
|
+
}
|
|
3085
|
+
|
|
2846
3086
|
class CustomValidators {
|
|
2847
3087
|
/**
|
|
2848
3088
|
* Validator that checks for whitespace-only input.
|
|
@@ -2917,27 +3157,6 @@ class CustomValidators {
|
|
|
2917
3157
|
}
|
|
2918
3158
|
}
|
|
2919
3159
|
|
|
2920
|
-
class CleanDeep {
|
|
2921
|
-
static clean(obj) {
|
|
2922
|
-
Object.keys(obj).forEach((key) => {
|
|
2923
|
-
if (obj[key] === undefined || obj[key] === null) {
|
|
2924
|
-
delete obj[key];
|
|
2925
|
-
// obj[key] = null;
|
|
2926
|
-
}
|
|
2927
|
-
else if (typeof obj[key] === 'string') {
|
|
2928
|
-
if (String(obj[key]).trim().length === 0) {
|
|
2929
|
-
delete obj[key];
|
|
2930
|
-
// obj[key] = null;
|
|
2931
|
-
}
|
|
2932
|
-
else {
|
|
2933
|
-
obj[key] = String(obj[key]).trim();
|
|
2934
|
-
}
|
|
2935
|
-
}
|
|
2936
|
-
});
|
|
2937
|
-
return obj;
|
|
2938
|
-
}
|
|
2939
|
-
}
|
|
2940
|
-
|
|
2941
3160
|
/*
|
|
2942
3161
|
* Public API Surface of core
|
|
2943
3162
|
*/
|
|
@@ -2946,5 +3165,5 @@ class CleanDeep {
|
|
|
2946
3165
|
* Generated bundle index. Do not edit.
|
|
2947
3166
|
*/
|
|
2948
3167
|
|
|
2949
|
-
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_USER, FooterComponent, FormatEpochTimestampPipe, InteractionEndpointService, InteractionService, InteractionWidgetService, LoaderComponent, ModelAttributeTypes, ModelSortDirection, OpenSearchHelperService, S3HelperService, SafeHtmlPipe, SearchInnerFieldPipe, SearchPipe, SingularizePipe, SnugdeskAuthenticationService, SnugdeskCoreModule, SnugdeskIPRegistryService, TeamService, TenantService, UserService, UserSessionService, UserStatus, UserType, provideAmplifyConfig };
|
|
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 };
|
|
2950
3169
|
//# sourceMappingURL=snugdesk-core.mjs.map
|