@diia-inhouse/analytics 1.72.30 → 2.3.0

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