@diia-inhouse/analytics 1.72.27 → 1.72.29
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/dist/index.js +21 -0
- package/dist/index.js.map +1 -0
- package/dist/interfaces/actionResult.js +28 -0
- package/dist/interfaces/actionResult.js.map +1 -0
- package/dist/interfaces/actionType.js +26 -0
- package/dist/interfaces/actionType.js.map +1 -0
- package/dist/interfaces/analytics.js +3 -0
- package/dist/interfaces/analytics.js.map +1 -0
- package/dist/interfaces/categories.js +13 -0
- package/dist/interfaces/categories.js.map +1 -0
- package/dist/interfaces/data.js +3 -0
- package/dist/interfaces/data.js.map +1 -0
- package/dist/interfaces/device.js +3 -0
- package/dist/interfaces/device.js.map +1 -0
- package/dist/interfaces/index.js +25 -0
- package/dist/interfaces/index.js.map +1 -0
- package/dist/interfaces/nextGenAnalytics.js +3 -0
- package/dist/interfaces/nextGenAnalytics.js.map +1 -0
- package/dist/interfaces/rating.js +356 -0
- package/dist/interfaces/rating.js.map +1 -0
- package/dist/mocks/analytics.js +81 -0
- package/dist/mocks/analytics.js.map +1 -0
- package/dist/mocks/index.js +18 -0
- package/dist/mocks/index.js.map +1 -0
- package/dist/services/analytics.js +146 -0
- package/dist/services/analytics.js.map +1 -0
- package/dist/services/index.js +18 -0
- package/dist/services/index.js.map +1 -0
- package/dist/types/index.d.ts +4 -0
- package/dist/types/interfaces/actionResult.d.ts +23 -0
- package/dist/types/interfaces/actionType.d.ts +21 -0
- package/dist/types/interfaces/analytics.d.ts +37 -0
- package/dist/types/interfaces/categories.d.ts +8 -0
- package/dist/types/interfaces/data.d.ts +25 -0
- package/dist/types/interfaces/device.d.ts +8 -0
- package/dist/types/interfaces/index.d.ts +8 -0
- package/dist/types/interfaces/nextGenAnalytics.d.ts +14 -0
- package/dist/types/interfaces/rating.d.ts +441 -0
- package/dist/types/mocks/analytics.d.ts +2 -0
- package/dist/types/mocks/index.d.ts +1 -0
- package/dist/types/services/analytics.d.ts +18 -0
- package/dist/types/services/index.d.ts +1 -0
- package/dist/types/utils/index.d.ts +1 -0
- package/dist/types/utils/rating.d.ts +9 -0
- package/dist/utils/index.js +18 -0
- package/dist/utils/index.js.map +1 -0
- package/dist/utils/rating.js +157 -0
- package/dist/utils/rating.js.map +1 -0
- package/package.json +4 -4
|
@@ -0,0 +1,441 @@
|
|
|
1
|
+
import { NotificationTemplateParams, RatingForm } from '@diia-inhouse/types';
|
|
2
|
+
export declare enum RatingCategory {
|
|
3
|
+
PublicService = "public-service",
|
|
4
|
+
Document = "document",
|
|
5
|
+
DiiaId = "diia-id"
|
|
6
|
+
}
|
|
7
|
+
export declare enum DiiaIdServiceCode {
|
|
8
|
+
Authorization = "authorization",
|
|
9
|
+
Signing = "signing"
|
|
10
|
+
}
|
|
11
|
+
export declare enum RatingType {
|
|
12
|
+
UserInitiative = "userInitiative",
|
|
13
|
+
ByRequest = "byRequest"
|
|
14
|
+
}
|
|
15
|
+
export declare enum RatingAvailabilityProcessCode {
|
|
16
|
+
RatingAlreadySaved = 47101002,
|
|
17
|
+
RatingMissingTaxpayerCard = 47101003
|
|
18
|
+
}
|
|
19
|
+
export declare enum RatingChipCommon {
|
|
20
|
+
RegistryUnavailable = "registryUnavailable",
|
|
21
|
+
IncorrectData = "incorrectData",
|
|
22
|
+
MoreOneTry = "moreOneTry",
|
|
23
|
+
Other = "other",
|
|
24
|
+
LongServiceSearch = "longServiceSearch",
|
|
25
|
+
LongApplicationProcessing = "longApplicationProcessing",
|
|
26
|
+
NotComprehensibleText = "notComprehensibleText",
|
|
27
|
+
ComprehensibleText = "comprehensibleText",
|
|
28
|
+
EnoughHints = "enoughHints",
|
|
29
|
+
NotEnoughHints = "notEnoughHints",
|
|
30
|
+
Design = "design",
|
|
31
|
+
BadDesign = "badDesign",
|
|
32
|
+
EasyFast = "easyFast",
|
|
33
|
+
WasWaitingForService = "wasWaitingForService",
|
|
34
|
+
PostOfficeInteraction = "postOfficeInteraction",
|
|
35
|
+
UsefulService = "usefulService",
|
|
36
|
+
SeveralPaymentAttempts = "severalPaymentAttempts",
|
|
37
|
+
SigningError = "signingError",
|
|
38
|
+
LicenseWasNotDisplayed = "licenseWasNotDisplayed",
|
|
39
|
+
LicensePlateSelection = "licensePlateSelection",
|
|
40
|
+
LongRegistration = "longRegistration",
|
|
41
|
+
AddressError = "addressError",
|
|
42
|
+
DigitalDocument = "digitalDocument",
|
|
43
|
+
DemocracyInSmartphone = "democracyInSmartphone",
|
|
44
|
+
UntimelyCert = "UntimelyCert",
|
|
45
|
+
GotError = "gotError",
|
|
46
|
+
GeolocationNotConfirmed = "geolocationNotConfirmed",
|
|
47
|
+
StreetMissing = "streetMissing",
|
|
48
|
+
GotRefuse = "gotRefuse",
|
|
49
|
+
AutomaticService = "automaticService",
|
|
50
|
+
NeededHelp = "neededHelp",
|
|
51
|
+
MissingData = "missingData",
|
|
52
|
+
EmploymentCenterInteraction = "employmentCenterInteraction",
|
|
53
|
+
NoNotification = "noNotification",
|
|
54
|
+
PaymentFee = "paymentFee",
|
|
55
|
+
PaymentOptions = "paymentOptions",
|
|
56
|
+
PaymentProcessing = "paymentProcessing",
|
|
57
|
+
PaymentIssues = "paymentIssues",
|
|
58
|
+
Delivery = "delivery",
|
|
59
|
+
FastPayment = "fastPayment",
|
|
60
|
+
InconvenientPlayer = "inconvenientPlayer",
|
|
61
|
+
SlowLoading = "slowLoading",
|
|
62
|
+
NotEnoughRadioWaves = "notEnoughRadioWaves",
|
|
63
|
+
NotEnoughChannels = "notEnoughChannels",
|
|
64
|
+
NotTheFirstTimePayment = "notTheFirstTimePayment",
|
|
65
|
+
Convenient = "convenient",
|
|
66
|
+
Inconvenient = "inconvenient",
|
|
67
|
+
IntuitiveInterface = "intuitiveInterface",
|
|
68
|
+
NoTariffing = "noTariffing",
|
|
69
|
+
NoTVProgram = "noTVProgram",
|
|
70
|
+
PushNotReceived = "pushNotReceived",
|
|
71
|
+
VehicleLicenseIsStillActive = "vehicleLicenseIsStillActive",
|
|
72
|
+
Mobility = "mobility",
|
|
73
|
+
BadConditions = "badConditions",
|
|
74
|
+
LostPayment = "lostPayment",
|
|
75
|
+
FrequentUse = "frequentUse",
|
|
76
|
+
InteractionWithServiceCenter = "interactionWithServiceCenter",
|
|
77
|
+
BadInteractionWithServiceCenter = "badInteractionWithServiceCenter",
|
|
78
|
+
DownloadSolutionFile = "downloadSolutionFile",
|
|
79
|
+
AddMeetingCalendar = "addMeetingCalendar",
|
|
80
|
+
NoFineCame = "noFineCame",
|
|
81
|
+
TakesALongToLoad = "takesALongToLoad",
|
|
82
|
+
IrrelevantInformation = "irrelevantInformation",
|
|
83
|
+
AlwayRelevantInformation = "alwayRelevantInformation",
|
|
84
|
+
NotUnderstandingWhatNext = "notUnderstandingWhatNext",
|
|
85
|
+
WrongfulRefusal = "wrongfulRefusal",
|
|
86
|
+
UploadingPhoto = "uploadingPhoto",
|
|
87
|
+
BankInteraction = "bankInteraction",
|
|
88
|
+
BadBankInteraction = "badBankInteraction",
|
|
89
|
+
LimitedSelectionCities = "limitedSelectionCities",
|
|
90
|
+
BadPartnersInteraction = "badPartnersInteraction",
|
|
91
|
+
ContributionVictory = "contributionVictory",
|
|
92
|
+
PartnersInteraction = "partnersInteraction"
|
|
93
|
+
}
|
|
94
|
+
export type RatingServiceCode = DiiaIdServiceCode | string;
|
|
95
|
+
/** @deprecated */
|
|
96
|
+
export declare enum RatingChip {
|
|
97
|
+
NeedesHelp = "needesHelp" /** @deprecated use NeededHelp instead */,
|
|
98
|
+
RegistryUnavailable = "registryUnavailable",
|
|
99
|
+
OutdatedData = "outdatedData" /** @deprecated use IncorrectData instead */,
|
|
100
|
+
IncorrectData = "incorrectData",
|
|
101
|
+
MoreOneTry = "moreOneTry",
|
|
102
|
+
Other = "other",
|
|
103
|
+
LongServiceSearch = "longServiceSearch",
|
|
104
|
+
LongProcessing = "longProcessing" /** @deprecated use LongApplicationProcessing instead */,
|
|
105
|
+
LongApplicationProcessing = "longApplicationProcessing",
|
|
106
|
+
NotComprehensibleText = "notComprehensibleText",
|
|
107
|
+
ComprehensibleText = "comprehensibleText",
|
|
108
|
+
EnoughHints = "enoughHints",
|
|
109
|
+
NotEnoughHints = "notEnoughHints",
|
|
110
|
+
Design = "design",
|
|
111
|
+
BadDesign = "badDesign",
|
|
112
|
+
EasyFast = "easyFast",
|
|
113
|
+
WasWaitingForService = "wasWaitingForService",
|
|
114
|
+
PostOfficeInteraction = "postOfficeInteraction",
|
|
115
|
+
UsefulService = "usefulService",
|
|
116
|
+
SeveralPaymentAttempts = "severalPaymentAttempts",
|
|
117
|
+
SigningError = "signingError",
|
|
118
|
+
LicenseWasNotDisplayed = "licenseWasNotDisplayed",
|
|
119
|
+
AddressError = "addressError",
|
|
120
|
+
DigitalDocument = "digitalDocument",
|
|
121
|
+
UntimelyCert = "UntimelyCert",
|
|
122
|
+
NotTheFirstTime = "notTheFirstTime",
|
|
123
|
+
GotError = "gotError",
|
|
124
|
+
GeolocationNotConfirmed = "geolocationNotConfirmed",
|
|
125
|
+
StreetMissing = "streetMissing",
|
|
126
|
+
GotRefuse = "gotRefuse",
|
|
127
|
+
AutomaticService = "automaticService",
|
|
128
|
+
InteractionWithCommission = "interactionWithCommission",
|
|
129
|
+
WrongfulRefusal = "wrongfulRefusal",
|
|
130
|
+
RefusalDueToRepairsMade = "RefusalDueToRepairsMade",
|
|
131
|
+
NeededHelp = "neededHelp",
|
|
132
|
+
MissingData = "missingData",
|
|
133
|
+
EmploymentCenterInteraction = "employmentCenterInteraction",
|
|
134
|
+
NoNotification = "noNotification",
|
|
135
|
+
PaymentFee = "paymentFee",
|
|
136
|
+
PaymentOptions = "paymentOptions",
|
|
137
|
+
FastPayment = "fastPayment",
|
|
138
|
+
InconvenientPlayer = "inconvenientPlayer",
|
|
139
|
+
SlowLoading = "slowLoading",
|
|
140
|
+
NotEnoughRadioWaves = "notEnoughRadioWaves",
|
|
141
|
+
NotEnoughChannels = "notEnoughChannels",
|
|
142
|
+
Convenient = "convenient",
|
|
143
|
+
Inconvenient = "inconvenient",
|
|
144
|
+
IntuitiveInterface = "intuitiveInterface",
|
|
145
|
+
NoTariffing = "noTariffing",
|
|
146
|
+
NoTVProgram = "noTVProgram",
|
|
147
|
+
PushNotReceived = "pushNotReceived",
|
|
148
|
+
VehicleLicenseIsStillActive = "vehicleLicenseIsStillActive",
|
|
149
|
+
AllInSmartphone = "allInSmartphone" /** @deprecated use Mobility instead */,
|
|
150
|
+
ComplexServices = "complexServices" /** @deprecated use Mobility instead */,
|
|
151
|
+
Mobility = "mobility",
|
|
152
|
+
BadConditions = "badConditions",
|
|
153
|
+
LostPayment = "lostPayment",
|
|
154
|
+
FrequentUse = "frequentUse",
|
|
155
|
+
NotAcceptDocument = "notAcceptDocument",
|
|
156
|
+
UsePlastic = "usePlastic",
|
|
157
|
+
NotUsePlastic = "notUsePlastic",
|
|
158
|
+
DocumentNotDisplayedSometimes = "documentNotDisplayedSometimes",
|
|
159
|
+
GoogleServices = "googleServices",
|
|
160
|
+
ForwardingFromApplication = "forwardingFromApplication",
|
|
161
|
+
NotFindColleagues = "notFindColleagues",
|
|
162
|
+
MissingUnit = "missingUnit",
|
|
163
|
+
ProblemsApproval = "problemsApproval",
|
|
164
|
+
QrCodeError = "qrCodeError",
|
|
165
|
+
ApplicationSubmission = "applicationSubmission",
|
|
166
|
+
BadBankInteraction = "badBankInteraction",
|
|
167
|
+
NoLiquidatedBank = "noLiquidatedBank",
|
|
168
|
+
AccountOpeningProblems = "accountOpeningProblems",
|
|
169
|
+
BankInteraction = "bankInteraction",
|
|
170
|
+
SetUpNotifications = "setUpNotifications",
|
|
171
|
+
AddPostOffices = "addPostOffices",
|
|
172
|
+
ImproveDelivery = "improveDelivery",
|
|
173
|
+
AwardOffline = "awardOffline",
|
|
174
|
+
EverythingYouDo = "everythingYouDo",
|
|
175
|
+
ConvenientDelivery = "convenientDelivery",
|
|
176
|
+
DeleteFunction = "deleteFunction",
|
|
177
|
+
OnlineOfflineVersions = "onlineOfflineVersions"
|
|
178
|
+
}
|
|
179
|
+
export declare enum RatingScore {
|
|
180
|
+
Awful = "1",
|
|
181
|
+
Bad = "2",
|
|
182
|
+
Ok = "3",
|
|
183
|
+
Good = "4",
|
|
184
|
+
Excellent = "5"
|
|
185
|
+
}
|
|
186
|
+
export declare enum CustomRatingFormCode {
|
|
187
|
+
PenaltiesPaid = "penaltiesPaid",
|
|
188
|
+
PenaltiesPaidOutside = "penaltiesPaidOutside",
|
|
189
|
+
CancelProperUser = "cancelProperUser",
|
|
190
|
+
PollClosed = "pollClosed",
|
|
191
|
+
DebtsIn = "debtsIn",
|
|
192
|
+
DebtsOut = "debtsOut",
|
|
193
|
+
ResidenceRegistrationApplicant = "residenceRegistrationApplicant",
|
|
194
|
+
ResidenceRegistrationOwner = "residenceRegistrationOwner",
|
|
195
|
+
ResidenceRegistrationParent = "residenceRegistrationParent",
|
|
196
|
+
DepositGuaranteePaymentsDoneRefuse = "depositGuaranteePaymentsDoneRefuse",
|
|
197
|
+
ReplacementDriverLicenseWithPlastic = "replacementDriverLicenseWithPlastic" /** @deprecated use ReplacementDriverLicenseWithPlasticPickup instead */,
|
|
198
|
+
ReplacementDriverLicenseWithPlasticPickup = "replacementDriverLicenseWithPlasticPickup",
|
|
199
|
+
ReplacementDriverLicenseWithPlasticPost = "replacementDriverLicenseWithPlasticPost",
|
|
200
|
+
ReplacementDriverLicenseDigitalOnly = "replacementDriverLicenseDigitalOnly",
|
|
201
|
+
DamagedPropertyDecision = "damagedPropertyDecision",
|
|
202
|
+
DestroyedPropertyDecision = "destroyedPropertyDecision",
|
|
203
|
+
DamagedPropertyRepairMessage = "damagedPropertyRepairMessage",
|
|
204
|
+
CourtPenaltiesPaid = "courtPenaltiesPaid",
|
|
205
|
+
MortgageDone = "mortgageDone",
|
|
206
|
+
TargetFeedbackShelters = "targetFeedbackShelters",
|
|
207
|
+
TargetFeedbackInvincibility = "targetFeedbackInvincibility",
|
|
208
|
+
MilitaryBondsDoneRefuse = "militaryBondsDoneRefuse",
|
|
209
|
+
SmartMobilizationSuccess = "smartMobilizationSuccess"
|
|
210
|
+
}
|
|
211
|
+
export type ScreenCode = StaticScreenCode | string;
|
|
212
|
+
export declare enum StaticScreenCode {
|
|
213
|
+
Document = "document",
|
|
214
|
+
Start = "start",
|
|
215
|
+
Home = "home",
|
|
216
|
+
Status = "status",
|
|
217
|
+
ChildrenCertificatesSelection = "childrenCertificatesSelection",
|
|
218
|
+
ReasonSelection = "reasonSelection",
|
|
219
|
+
CertTypeSelection = "certTypeSelection",
|
|
220
|
+
RequesterData = "requesterData",
|
|
221
|
+
BirthPlace = "birthPlace",
|
|
222
|
+
Nationality = "nationality",
|
|
223
|
+
RegistrationPlace = "registrationPlace",
|
|
224
|
+
RegistrationPlaceSelection = "registrationPlaceSelection",
|
|
225
|
+
Contacts = "contacts",
|
|
226
|
+
Application = "application",
|
|
227
|
+
VehicleSelection = "vehicleSelection",
|
|
228
|
+
VehiclePrice = "vehiclePrice",
|
|
229
|
+
LicensePlateType = "licensePlateType",
|
|
230
|
+
GenLicensePlate = "genLicensePlate",
|
|
231
|
+
LicensePlates = "licensePlates",
|
|
232
|
+
VehicleLicenseType = "vehicleLicenseType",
|
|
233
|
+
ExpirationDateSelection = "expirationDateSelection",
|
|
234
|
+
Sharing = "sharing",
|
|
235
|
+
SharingCancelProperUser = "sharingCancelProperUser",
|
|
236
|
+
ConfirmationRequest = "confirmationRequest",
|
|
237
|
+
ProperUsers = "properUsers",
|
|
238
|
+
ProperUser = "properUser",
|
|
239
|
+
StartCancelProperUser = "startCancelProperUser",
|
|
240
|
+
StatusCancelProperUser = "statusCancelProperUser",
|
|
241
|
+
ApplicationCancelProperUser = "applicationCancelProperUser",
|
|
242
|
+
LedSelection = "ledSelection",
|
|
243
|
+
PostOfficeSelection = "postOfficeSelection",
|
|
244
|
+
DocumentTypeSelection = "documentTypeSelection",
|
|
245
|
+
ResidenceCert = "residenceCert",
|
|
246
|
+
CurrentResidencePlaceSelection = "currentResidencePlaceSelection",
|
|
247
|
+
CurrentResidencePlaceConfirmation = "currentResidencePlaceConfirmation",
|
|
248
|
+
BankAccountSelection = "bankAccountSelection",
|
|
249
|
+
AssistanceTypes = "assistanceTypes",
|
|
250
|
+
Payment = "payment",
|
|
251
|
+
AllCertificatesDoneOk5 = "allCertificatesDoneOk5",
|
|
252
|
+
AllCertificatesDoneOk7 = "allCertificatesDoneOk7",
|
|
253
|
+
ConfirmJobLoss = "confirmJobLoss",
|
|
254
|
+
EmploymentCenterRegistration = "employmentCenterRegistration",
|
|
255
|
+
AddPassportData = "addPassportData",
|
|
256
|
+
ConfirmationAwaiting = "confirmationAwaiting",
|
|
257
|
+
PropertyTypes = "propertyTypes",
|
|
258
|
+
ObjectApplications = "objectApplications",
|
|
259
|
+
ObjectMessages = "objectMessages",
|
|
260
|
+
ApplicationStatus = "applicationStatus",
|
|
261
|
+
MessageStatus = "messageStatus",
|
|
262
|
+
ApplicationMessages = "applicationMessages",
|
|
263
|
+
Onboarding = "onboarding",
|
|
264
|
+
RepairsQuestions = "repairsQuestions",
|
|
265
|
+
BenefitsQuestions = "benefitsQuestions",
|
|
266
|
+
CardAwaiting = "cardAwaiting",
|
|
267
|
+
LinkDrrp = "linkDrrp",
|
|
268
|
+
DiiaRadio = "diiaRadio",
|
|
269
|
+
DiiaRadioPlaying = "diiaRadioPlaying",
|
|
270
|
+
DiiaRadioPaused = "diiaRadioPaused",
|
|
271
|
+
DiiaTVPlaying = "diiaTVPlaying",
|
|
272
|
+
TvChannelSelection = "tvChannelSelection",
|
|
273
|
+
DamageMessages = "damageMessages",
|
|
274
|
+
DamagedPropertyRecovery = "damagedPropertyRecovery",
|
|
275
|
+
ChooseDrrpObject = "chooseDrrpObject",
|
|
276
|
+
AddManualObject = "addManualObject",
|
|
277
|
+
AddManualObjectAddress = "addManualObjectAddress",
|
|
278
|
+
DamageAssessment = "damageAssessment",
|
|
279
|
+
DamagesFixing = "damagesFixing",
|
|
280
|
+
NewAdultRegistration = "newAdultRegistration",
|
|
281
|
+
NewChildRegistration = "newChildRegistration",
|
|
282
|
+
Adult = "adult",
|
|
283
|
+
AddBirthCertificate = "addBirthCertificate",
|
|
284
|
+
AddBirthCertificateOwnersChild = "addBirthCertificateOwnersChild",
|
|
285
|
+
ApproveOwnerData = "approveOwnerData",
|
|
286
|
+
LiquidatedBanks = "liquidatedBanks",
|
|
287
|
+
CurrentAdultRegistration = "currentAdultRegistration",
|
|
288
|
+
CurrentChildRegistration = "currentChildRegistration",
|
|
289
|
+
ContactsOwner = "contactsOwner",
|
|
290
|
+
PenaltiesPaidOutside = "penaltiesPaidOutside",
|
|
291
|
+
Penalties = "penalties",
|
|
292
|
+
CriminalRecordCertificate = "criminalRecordCertificate",
|
|
293
|
+
ReplacementDriverLicense = "replacementDriverLicense",
|
|
294
|
+
QuizArchive = "quizArchive",
|
|
295
|
+
QuizDetailsActive = "quizDetailsActive",
|
|
296
|
+
QuizDetailsClose = "quizDetailsClose",
|
|
297
|
+
OfficialsPoll = "officialsPoll",
|
|
298
|
+
OfficialsWorkspace = "officialsWorkspace",
|
|
299
|
+
OfficialsBadges = "officialsBadges",
|
|
300
|
+
OfficialsSearchColleagues = "officialsSearchColleagues",
|
|
301
|
+
BenefitsConfirmation = "benefitsConfirmation",
|
|
302
|
+
OwnersConfirmation = "ownersConfirmation",
|
|
303
|
+
CourtCasesDetails = "courtCasesDetails",
|
|
304
|
+
CourtCasesDecisions = "courtCasesDecisions",
|
|
305
|
+
CourtCasesDecisionsDetails = "courtCasesDecisionsDetails",
|
|
306
|
+
CourtCasesHearings = "courtCasesHearings",
|
|
307
|
+
CourtCasesHearingsDetails = "courtCasesHearingsDetails",
|
|
308
|
+
AllApplications = "allApplications",
|
|
309
|
+
DownloadList = "downloadList",
|
|
310
|
+
Map = "map",
|
|
311
|
+
MaritalStatus = "maritalStatus",
|
|
312
|
+
ChildrenNumber = "childrenNumber",
|
|
313
|
+
Income = "income",
|
|
314
|
+
MortgageApartment = "mortgageApartment",
|
|
315
|
+
AddressMortgageApartment = "addressMortgageApartment",
|
|
316
|
+
MortgageBanks = "mortgageBanks",
|
|
317
|
+
SelectionRepairStage = "selectionRepairStage",
|
|
318
|
+
MediaUpload = "mediaUpload",
|
|
319
|
+
StartBookingFunds = "startBookingFunds",
|
|
320
|
+
SelectionBookingCertificate = "selectionBookingCertificate",
|
|
321
|
+
MapPointDetails = "mapPointDetails",
|
|
322
|
+
TargetFeedbackInvincibility = "targetFeedbackInvincibility",
|
|
323
|
+
TargetFeedbackShelters = "targetFeedbackShelters",
|
|
324
|
+
Specialities = "specialities",
|
|
325
|
+
AvailableBonds = "availableBonds",
|
|
326
|
+
AvailableBondsPartners = "availableBondsPartners",
|
|
327
|
+
AvailableBondsPartnersCart = "availableBondsPartnersCart",
|
|
328
|
+
CompensationType = "compensationType",
|
|
329
|
+
RepeatedDeliveryApplication = "repeatedDeliveryApplication",
|
|
330
|
+
RepeatedDeliveryContacts = "repeatedDeliveryContacts",
|
|
331
|
+
RepeatedDeliveryMethodsOfObtaining = "repeatedDeliveryMethodsOfObtaining",
|
|
332
|
+
DepartmentSelection = "departmentSelection",
|
|
333
|
+
DeliveryAddressDefinition = "deliveryAddressDefinition",
|
|
334
|
+
ConstructingStartMessage = "constructingStartMessage",
|
|
335
|
+
ConstructingCompletionMessage = "constructingCompletionMessage",
|
|
336
|
+
OnlyDuringBlackout = "onlyDuringBlackout",
|
|
337
|
+
MobileOperators = "mobileOperators",
|
|
338
|
+
TypeOfConnection = "typeOfConnection",
|
|
339
|
+
Place = "place"
|
|
340
|
+
}
|
|
341
|
+
export type RatingFormCode = RatingServiceCode | CustomRatingFormCode;
|
|
342
|
+
export interface ChipBlock<T> {
|
|
343
|
+
label: string;
|
|
344
|
+
description?: string;
|
|
345
|
+
chips: RatingChipMeta<T>[];
|
|
346
|
+
}
|
|
347
|
+
export interface RatingChipMeta<T = string> {
|
|
348
|
+
code: T;
|
|
349
|
+
name: string;
|
|
350
|
+
}
|
|
351
|
+
export interface GetRatingFormParams {
|
|
352
|
+
userIdentifier: string;
|
|
353
|
+
category: RatingCategory;
|
|
354
|
+
serviceCode: RatingServiceCode;
|
|
355
|
+
statusDate: Date;
|
|
356
|
+
resourceId?: string;
|
|
357
|
+
ratingFormCode?: RatingFormCode;
|
|
358
|
+
screenCode?: ScreenCode;
|
|
359
|
+
hasRatingSubmitThreshold?: boolean;
|
|
360
|
+
daysAfterLastRatingSubmitThreshold?: number;
|
|
361
|
+
intervalDelay?: number;
|
|
362
|
+
intervalDuration?: number;
|
|
363
|
+
}
|
|
364
|
+
export interface GetRatingFormResponse {
|
|
365
|
+
ratingForm?: RatingForm;
|
|
366
|
+
ratingStartsAtUnixTime: number;
|
|
367
|
+
}
|
|
368
|
+
export interface RateServiceEventPayload {
|
|
369
|
+
userIdentifier: string;
|
|
370
|
+
category: RatingCategory;
|
|
371
|
+
serviceCode: RatingServiceCode;
|
|
372
|
+
ratingFormCode?: RatingFormCode;
|
|
373
|
+
resourceId?: string;
|
|
374
|
+
notificationParams?: NotificationTemplateParams;
|
|
375
|
+
delay?: number;
|
|
376
|
+
/**
|
|
377
|
+
* delay in milliseconds before resending a rating push.
|
|
378
|
+
* if a new rating push arrives before this time expires, it is ignored.
|
|
379
|
+
* @type {number|undefined}
|
|
380
|
+
*/
|
|
381
|
+
throttleMs?: number;
|
|
382
|
+
}
|
|
383
|
+
export interface ChipsRateGroup<T> {
|
|
384
|
+
rate: RatingScore[];
|
|
385
|
+
chips: T[];
|
|
386
|
+
}
|
|
387
|
+
export interface ChipsBlockRateGroup<T> {
|
|
388
|
+
rate: RatingScore[];
|
|
389
|
+
chipBlocks: ChipBlock<T>[];
|
|
390
|
+
}
|
|
391
|
+
export interface TextParams {
|
|
392
|
+
title?: string;
|
|
393
|
+
ratingLabel?: string;
|
|
394
|
+
chipLabels?: Partial<Record<RatingScore, string>>;
|
|
395
|
+
chipDescription?: string;
|
|
396
|
+
commentLabel?: string;
|
|
397
|
+
commentHint?: string;
|
|
398
|
+
mainButton?: string;
|
|
399
|
+
}
|
|
400
|
+
export interface ChipParams<T extends string> {
|
|
401
|
+
chipsRateGroups?: ChipsRateGroup<T>[];
|
|
402
|
+
chipValueMap?: Partial<Record<T, string>>;
|
|
403
|
+
chipBlockRateGroups?: ChipsBlockRateGroup<T>[];
|
|
404
|
+
}
|
|
405
|
+
export interface GetUserInitiativeRatingFormRequest {
|
|
406
|
+
screenCode?: ScreenCode;
|
|
407
|
+
resourceId?: string;
|
|
408
|
+
}
|
|
409
|
+
export interface GetUserInitiativeRatingFormResponse {
|
|
410
|
+
ratingForm?: RatingForm;
|
|
411
|
+
processCode?: number;
|
|
412
|
+
}
|
|
413
|
+
export interface IsUserInitiativeRatingAvailableRequest {
|
|
414
|
+
userIdentifier: string;
|
|
415
|
+
category: RatingCategory;
|
|
416
|
+
serviceCode: RatingServiceCode;
|
|
417
|
+
screenCode?: ScreenCode;
|
|
418
|
+
resourceId?: string;
|
|
419
|
+
checkTaxpayerCard?: boolean;
|
|
420
|
+
ignoreScreenCodes?: ScreenCode[];
|
|
421
|
+
ignoreTimeout?: boolean;
|
|
422
|
+
}
|
|
423
|
+
export interface IsByRequestRatingAvailableRequest {
|
|
424
|
+
userIdentifier: string;
|
|
425
|
+
category: RatingCategory;
|
|
426
|
+
serviceCode: RatingServiceCode;
|
|
427
|
+
statusDate: Date;
|
|
428
|
+
resourceId?: string;
|
|
429
|
+
ratingFormCode?: RatingFormCode;
|
|
430
|
+
screenCode?: ScreenCode;
|
|
431
|
+
hasRatingSubmitThreshold?: boolean;
|
|
432
|
+
daysAfterLastRatingSubmitThreshold?: number;
|
|
433
|
+
intervalDelay?: number;
|
|
434
|
+
intervalDuration?: number;
|
|
435
|
+
}
|
|
436
|
+
export interface RatingService<T, K extends Partial<RateServiceEventPayload> = Partial<RateServiceEventPayload>> {
|
|
437
|
+
sendRatingPush(model: T, userIdentifier: string, params?: K): Promise<void>;
|
|
438
|
+
getRatingForm(model: T, userIdentifier: string, params?: K): Promise<RatingForm | undefined>;
|
|
439
|
+
getUserInitiativeRatingForm?(userIdentifier: string, serviceCode: RatingServiceCode): Promise<GetUserInitiativeRatingFormResponse>;
|
|
440
|
+
getUserInitiativeRatingFormByResourceId?(userIdentifier: string, serviceCode: RatingServiceCode, resourceId: string): Promise<GetUserInitiativeRatingFormResponse>;
|
|
441
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './analytics';
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { AsyncLocalStorage } from 'node:async_hooks';
|
|
2
|
+
import { ObjectId } from 'bson';
|
|
3
|
+
import { ActHeaders, AlsData, Logger } from '@diia-inhouse/types';
|
|
4
|
+
import { AcquirerAnalyticsData, AnalyticsActionResult, AnalyticsActionType, AnalyticsCategory, NotificationAnalyticsData, UserAnalyticsData } from '../interfaces';
|
|
5
|
+
export declare class AnalyticsService {
|
|
6
|
+
private readonly logger;
|
|
7
|
+
private readonly asyncLocalStorage;
|
|
8
|
+
constructor(logger: Logger, asyncLocalStorage: AsyncLocalStorage<AlsData>);
|
|
9
|
+
acquirerLog(category: AnalyticsCategory, acquirerId: ObjectId, actionType: AnalyticsActionType, actionResult: AnalyticsActionResult, headers: ActHeaders | undefined, data?: AcquirerAnalyticsData): void;
|
|
10
|
+
userAcquirerLog(category: AnalyticsCategory, userIdentifier: string, acquirerId: ObjectId | undefined, actionType: AnalyticsActionType, actionResult: AnalyticsActionResult, headers: ActHeaders | undefined, data?: AcquirerAnalyticsData): void;
|
|
11
|
+
notificationLog(actionType: AnalyticsActionType, actionResult: AnalyticsActionResult, headers: ActHeaders, data?: NotificationAnalyticsData): void;
|
|
12
|
+
userLog(actionType: AnalyticsActionType, actionResult: AnalyticsActionResult, userIdentifier: string, headers: ActHeaders, data?: UserAnalyticsData): void;
|
|
13
|
+
authLog(actionType: AnalyticsActionType, actionResult: AnalyticsActionResult, userIdentifier: string, headers: ActHeaders, data?: Record<string, unknown>): void;
|
|
14
|
+
log(category: string, actionType: string, actionResult: string, data?: Record<string, unknown>): void;
|
|
15
|
+
private getDate;
|
|
16
|
+
private getDevice;
|
|
17
|
+
private logAnalytics;
|
|
18
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './analytics';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './rating';
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { RatingForm } from '@diia-inhouse/types';
|
|
2
|
+
import { ChipParams, RatingCategory, RatingFormCode, TextParams } from '../interfaces';
|
|
3
|
+
export declare class RatingUtils {
|
|
4
|
+
private readonly chipCodeToValueDefaultMap;
|
|
5
|
+
private readonly chipLabelMap;
|
|
6
|
+
private readonly ratingLabelMap;
|
|
7
|
+
private readonly commentLabelMap;
|
|
8
|
+
getRatingForm<T extends string>(formCode: RatingFormCode, category: RatingCategory, chipParams: ChipParams<T>, textParams?: TextParams, resourceId?: string, showInAppReview?: boolean): RatingForm;
|
|
9
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./rating"), exports);
|
|
18
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2CAAwB"}
|
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.RatingUtils = void 0;
|
|
4
|
+
const interfaces_1 = require("../interfaces");
|
|
5
|
+
class RatingUtils {
|
|
6
|
+
chipCodeToValueDefaultMap = {
|
|
7
|
+
[interfaces_1.RatingChipCommon.RegistryUnavailable]: 'Реєстр недоступний',
|
|
8
|
+
[interfaces_1.RatingChipCommon.IncorrectData]: 'Неактуальні дані',
|
|
9
|
+
[interfaces_1.RatingChipCommon.MoreOneTry]: 'Не з 1 разу вийшло',
|
|
10
|
+
[interfaces_1.RatingChipCommon.Other]: 'Інше',
|
|
11
|
+
[interfaces_1.RatingChipCommon.LongServiceSearch]: 'Довго шукав послугу',
|
|
12
|
+
[interfaces_1.RatingChipCommon.LongApplicationProcessing]: 'Заявку опрацьовували довго',
|
|
13
|
+
[interfaces_1.RatingChipCommon.LicensePlateSelection]: 'Вибір номерного знака',
|
|
14
|
+
[interfaces_1.RatingChipCommon.LongRegistration]: 'Довго реєстрували',
|
|
15
|
+
[interfaces_1.RatingChipCommon.PaymentIssues]: 'Проблеми з оплатою',
|
|
16
|
+
[interfaces_1.RatingChipCommon.Delivery]: 'Доставка',
|
|
17
|
+
[interfaces_1.RatingChipCommon.ComprehensibleText]: 'Зрозумілі тексти',
|
|
18
|
+
[interfaces_1.RatingChipCommon.NotComprehensibleText]: 'Незрозумілий текст',
|
|
19
|
+
[interfaces_1.RatingChipCommon.EasyFast]: 'Легко і швидко',
|
|
20
|
+
[interfaces_1.RatingChipCommon.NotEnoughHints]: 'Мало підказок',
|
|
21
|
+
[interfaces_1.RatingChipCommon.EnoughHints]: 'Вдосталь підказок',
|
|
22
|
+
[interfaces_1.RatingChipCommon.Design]: 'Дизайн',
|
|
23
|
+
[interfaces_1.RatingChipCommon.WasWaitingForService]: 'Давно чекав на цю послугу',
|
|
24
|
+
[interfaces_1.RatingChipCommon.BadDesign]: 'Дизайн',
|
|
25
|
+
[interfaces_1.RatingChipCommon.PostOfficeInteraction]: 'Взаємодія з поштою',
|
|
26
|
+
[interfaces_1.RatingChipCommon.UsefulService]: 'Корисна послуга',
|
|
27
|
+
[interfaces_1.RatingChipCommon.SeveralPaymentAttempts]: 'Не з 1 разу оплатили',
|
|
28
|
+
[interfaces_1.RatingChipCommon.SigningError]: 'Помилка з підписанням',
|
|
29
|
+
[interfaces_1.RatingChipCommon.LicenseWasNotDisplayed]: 'Не відобразилось посвідчення',
|
|
30
|
+
[interfaces_1.RatingChipCommon.AddressError]: 'Помилка з адресою',
|
|
31
|
+
[interfaces_1.RatingChipCommon.DigitalDocument]: 'Цифровий документ',
|
|
32
|
+
[interfaces_1.RatingChipCommon.UntimelyCert]: 'Витяг не прийшов за 30 днів',
|
|
33
|
+
[interfaces_1.RatingChipCommon.GotError]: 'На жаль, сталася помилка',
|
|
34
|
+
[interfaces_1.RatingChipCommon.GeolocationNotConfirmed]: 'Не підтверджувалася геолокація',
|
|
35
|
+
[interfaces_1.RatingChipCommon.StreetMissing]: 'Відсутня моя адреса',
|
|
36
|
+
[interfaces_1.RatingChipCommon.GotRefuse]: 'Отримую відмову',
|
|
37
|
+
[interfaces_1.RatingChipCommon.AutomaticService]: 'Автоматична послуга',
|
|
38
|
+
[interfaces_1.RatingChipCommon.NeededHelp]: 'Потрібна була допомога',
|
|
39
|
+
[interfaces_1.RatingChipCommon.MissingData]: 'Не знайшли мої дані',
|
|
40
|
+
[interfaces_1.RatingChipCommon.EmploymentCenterInteraction]: 'Взаємодія з центром зайнятості',
|
|
41
|
+
[interfaces_1.RatingChipCommon.NoNotification]: 'Немає сповіщення',
|
|
42
|
+
[interfaces_1.RatingChipCommon.PushNotReceived]: 'Не прийшов пуш',
|
|
43
|
+
[interfaces_1.RatingChipCommon.PaymentFee]: 'Оплата з комісією',
|
|
44
|
+
[interfaces_1.RatingChipCommon.PaymentOptions]: 'Декілька варіантів оплати',
|
|
45
|
+
[interfaces_1.RatingChipCommon.PaymentProcessing]: 'Опрацювання оплати',
|
|
46
|
+
[interfaces_1.RatingChipCommon.FastPayment]: 'Швидко опрацювали оплату',
|
|
47
|
+
[interfaces_1.RatingChipCommon.InconvenientPlayer]: 'Незручний плеєр',
|
|
48
|
+
[interfaces_1.RatingChipCommon.SlowLoading]: 'Повільно завантажується',
|
|
49
|
+
[interfaces_1.RatingChipCommon.NotEnoughRadioWaves]: 'Мало радіохвиль',
|
|
50
|
+
[interfaces_1.RatingChipCommon.NotEnoughChannels]: 'Мало каналів',
|
|
51
|
+
[interfaces_1.RatingChipCommon.NotTheFirstTimePayment]: 'Не з 1 разу оплатили',
|
|
52
|
+
[interfaces_1.RatingChipCommon.Convenient]: 'Зручно',
|
|
53
|
+
[interfaces_1.RatingChipCommon.Inconvenient]: 'Незручно',
|
|
54
|
+
[interfaces_1.RatingChipCommon.IntuitiveInterface]: 'Зрозумілий інтерфейс',
|
|
55
|
+
[interfaces_1.RatingChipCommon.NoTariffing]: 'Відсутня тарифікація',
|
|
56
|
+
[interfaces_1.RatingChipCommon.NoTVProgram]: 'Немає телепрограми',
|
|
57
|
+
[interfaces_1.RatingChipCommon.Mobility]: 'Все у смартфоні',
|
|
58
|
+
[interfaces_1.RatingChipCommon.BadConditions]: 'Не підходять умови',
|
|
59
|
+
[interfaces_1.RatingChipCommon.LostPayment]: 'Боюся, що оплата загубиться',
|
|
60
|
+
[interfaces_1.RatingChipCommon.VehicleLicenseIsStillActive]: 'Досі активний техпаспорт',
|
|
61
|
+
[interfaces_1.RatingChipCommon.FrequentUse]: 'Часто користуюся',
|
|
62
|
+
[interfaces_1.RatingChipCommon.InteractionWithServiceCenter]: 'Взаємодія з сервісним центром',
|
|
63
|
+
[interfaces_1.RatingChipCommon.BadInteractionWithServiceCenter]: 'Взаємодія з сервісним центром',
|
|
64
|
+
[interfaces_1.RatingChipCommon.DemocracyInSmartphone]: 'Демократія в смартфоні',
|
|
65
|
+
[interfaces_1.RatingChipCommon.DownloadSolutionFile]: 'Завантаження файлу рішення',
|
|
66
|
+
[interfaces_1.RatingChipCommon.AddMeetingCalendar]: 'Додавання засідання в календар',
|
|
67
|
+
[interfaces_1.RatingChipCommon.NoFineCame]: 'Не прийшов штраф',
|
|
68
|
+
[interfaces_1.RatingChipCommon.TakesALongToLoad]: 'Довго завантажується інформація',
|
|
69
|
+
[interfaces_1.RatingChipCommon.IrrelevantInformation]: 'Неактуальна інформація',
|
|
70
|
+
[interfaces_1.RatingChipCommon.AlwayRelevantInformation]: 'Завжди актуальна інформація',
|
|
71
|
+
[interfaces_1.RatingChipCommon.NotUnderstandingWhatNext]: 'Не розумію, що буде далі',
|
|
72
|
+
[interfaces_1.RatingChipCommon.WrongfulRefusal]: 'Неправомірна відмова',
|
|
73
|
+
[interfaces_1.RatingChipCommon.UploadingPhoto]: 'Завантаження фото',
|
|
74
|
+
[interfaces_1.RatingChipCommon.BankInteraction]: 'Взаємодія з банком',
|
|
75
|
+
[interfaces_1.RatingChipCommon.BadBankInteraction]: 'Взаємодія з банком',
|
|
76
|
+
[interfaces_1.RatingChipCommon.LimitedSelectionCities]: 'Обмежений вибір міст',
|
|
77
|
+
[interfaces_1.RatingChipCommon.BadPartnersInteraction]: 'Взаємодія з партнерами',
|
|
78
|
+
[interfaces_1.RatingChipCommon.ContributionVictory]: 'Внесок у перемогу',
|
|
79
|
+
[interfaces_1.RatingChipCommon.PartnersInteraction]: 'Взаємодія з партнерами',
|
|
80
|
+
};
|
|
81
|
+
chipLabelMap = {
|
|
82
|
+
[interfaces_1.RatingScore.Awful]: 'Що засмутило?',
|
|
83
|
+
[interfaces_1.RatingScore.Bad]: 'Що засмутило?',
|
|
84
|
+
[interfaces_1.RatingScore.Ok]: 'На що команді звернути увагу?',
|
|
85
|
+
[interfaces_1.RatingScore.Good]: 'Що сподобалось?',
|
|
86
|
+
[interfaces_1.RatingScore.Excellent]: 'Що сподобалось?',
|
|
87
|
+
};
|
|
88
|
+
ratingLabelMap = {
|
|
89
|
+
[interfaces_1.RatingCategory.PublicService]: 'Задоволені послугою в Дії?',
|
|
90
|
+
[interfaces_1.RatingCategory.Document]: 'Задоволені документом у Дії?',
|
|
91
|
+
[interfaces_1.RatingCategory.DiiaId]: 'Задоволені Дія.Підпис?',
|
|
92
|
+
};
|
|
93
|
+
commentLabelMap = {
|
|
94
|
+
[interfaces_1.RatingCategory.PublicService]: 'Як можна покращити послугу?',
|
|
95
|
+
[interfaces_1.RatingCategory.Document]: 'Як можна покращити документ?',
|
|
96
|
+
[interfaces_1.RatingCategory.DiiaId]: 'Як можна покращити послугу?',
|
|
97
|
+
};
|
|
98
|
+
getRatingForm(formCode, category, chipParams, textParams, resourceId, showInAppReview = false) {
|
|
99
|
+
const { title, ratingLabel, chipLabels, chipDescription, commentLabel, commentHint, mainButton } = textParams || {};
|
|
100
|
+
const { chipsRateGroups = [], chipValueMap, chipBlockRateGroups } = chipParams;
|
|
101
|
+
const chipValueMergedMap = Object.assign(this.chipCodeToValueDefaultMap, chipValueMap);
|
|
102
|
+
return {
|
|
103
|
+
formCode,
|
|
104
|
+
resourceId,
|
|
105
|
+
title: title || 'Поділіться враженнями',
|
|
106
|
+
rating: {
|
|
107
|
+
label: ratingLabel || this.ratingLabelMap[category],
|
|
108
|
+
items: [
|
|
109
|
+
{ rate: interfaces_1.RatingScore.Awful, emoji: '😡', accessibilityDescription: 'Дуже незадоволений' },
|
|
110
|
+
{ rate: interfaces_1.RatingScore.Bad, emoji: '😢', accessibilityDescription: 'Незадоволений' },
|
|
111
|
+
{ rate: interfaces_1.RatingScore.Ok, emoji: '😐', accessibilityDescription: 'Нейтральне враження' },
|
|
112
|
+
{ rate: interfaces_1.RatingScore.Good, emoji: '😁', accessibilityDescription: 'Задоволений' },
|
|
113
|
+
{ rate: interfaces_1.RatingScore.Excellent, emoji: '😍', accessibilityDescription: 'Дуже задоволений' },
|
|
114
|
+
].map(({ rate, emoji, accessibilityDescription }) => {
|
|
115
|
+
if (chipBlockRateGroups) {
|
|
116
|
+
const chipsBlockGroup = chipBlockRateGroups.find((group) => group.rate.includes(rate));
|
|
117
|
+
const { chipBlocks = [] } = chipsBlockGroup || {};
|
|
118
|
+
return {
|
|
119
|
+
rate,
|
|
120
|
+
emoji,
|
|
121
|
+
accessibilityDescription,
|
|
122
|
+
chip: { label: '', description: '', chips: [] },
|
|
123
|
+
chipBlocks,
|
|
124
|
+
};
|
|
125
|
+
}
|
|
126
|
+
const chipsRateGroup = chipsRateGroups.find((group) => group.rate.includes(rate));
|
|
127
|
+
const { chips = [] } = chipsRateGroup || {};
|
|
128
|
+
const chipItems = chips.map((chip) => ({
|
|
129
|
+
code: chip,
|
|
130
|
+
name: chipValueMergedMap[chip] || '',
|
|
131
|
+
}));
|
|
132
|
+
return {
|
|
133
|
+
rate,
|
|
134
|
+
emoji,
|
|
135
|
+
accessibilityDescription,
|
|
136
|
+
chip: chipItems.length > 0
|
|
137
|
+
? {
|
|
138
|
+
label: chipLabels?.[rate] || this.chipLabelMap[rate],
|
|
139
|
+
description: chipDescription ?? 'Оберіть один або кілька варіантів.',
|
|
140
|
+
chips: chipItems,
|
|
141
|
+
}
|
|
142
|
+
: { label: '', description: '', chips: [] },
|
|
143
|
+
chipBlocks: [],
|
|
144
|
+
};
|
|
145
|
+
}),
|
|
146
|
+
},
|
|
147
|
+
comment: {
|
|
148
|
+
label: commentLabel || this.commentLabelMap[category],
|
|
149
|
+
hint: commentHint || 'Розкажіть більше про враження (необовʼязково)',
|
|
150
|
+
},
|
|
151
|
+
mainButton: mainButton || 'Надіслати відгук',
|
|
152
|
+
showInAppReview,
|
|
153
|
+
};
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
exports.RatingUtils = RatingUtils;
|
|
157
|
+
//# sourceMappingURL=rating.js.map
|