@diia-inhouse/analytics 1.72.30 → 2.3.1

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
@@ -1 +0,0 @@
1
- {"version":3,"file":"analytics.js","sourceRoot":"","sources":["../../src/services/analytics.ts"],"names":[],"mappings":";;;AAKA,+CAA4C;AAE5C,8CAesB;AAEtB,MAAa,gBAAgB;IAEJ;IACA;IAFrB,YACqB,MAAc,EACd,iBAA6C;QAD7C,WAAM,GAAN,MAAM,CAAQ;QACd,sBAAiB,GAAjB,iBAAiB,CAA4B;IAC/D,CAAC;IAEJ,WAAW,CACP,QAA2B,EAC3B,UAAoB,EACpB,UAA+B,EAC/B,YAAmC,EACnC,OAA+B,EAC/B,IAA4B;QAE5B,MAAM,SAAS,GAAsB;YACjC,IAAI,EAAE,IAA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YACrB,QAAQ,EAAE;gBACN,IAAI,EAAE,YAAY;gBAClB,OAAO,EAAE,eAAe;aAC3B;SACJ,CAAA;IACL,CAAC;IAEO,YAAY,CAAC,SAAoB;QACrC,MAAM,GAAG,GAAiB,EAAE,SAAS,EAAE,CAAA;QAEvC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,WAAW,EAAE,GAAG,CAAC,CAAA;IACtC,CAAC;CACJ;AAhMD,4CAgMC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/services/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,8CAA2B"}
@@ -1,4 +0,0 @@
1
- export * from './interfaces';
2
- export * from './services';
3
- export * from './utils';
4
- export * from './mocks';
@@ -1,23 +0,0 @@
1
- export declare enum AnalyticsActionResult {
2
- Error = "error",
3
- Success = "success",
4
- NotFound = "notFound",
5
- NoPhoto = "noPhoto",
6
- NeedVerification = "needVerification",
7
- Confirming = "confirming",
8
- NotConfirmed = "notConfirmed",
9
- Declined = "declined",
10
- Inactive = "inactive",
11
- UnavailableLegalReasons = "unavailableLegalReasons",
12
- Booked = "booked",
13
- NotBooked = "notBooked",
14
- Allowed = "allowed",
15
- NotAllowed = "notAllowed",
16
- Prepared = "prepared",
17
- NotPrepared = "notPrepared",
18
- Delivered = "delivered",
19
- NotDelivered = "notDelivered",
20
- Available = "available",
21
- NotAvailable = "notAvailable",
22
- NewUser = "newUser"
23
- }
@@ -1,21 +0,0 @@
1
- export declare enum AnalyticsActionType {
2
- AddBranch = "addBranch",
3
- UpdateBranch = "updateBranch",
4
- RemoveBranch = "removeBranch",
5
- AddOffer = "addOffer",
6
- RemoveOffer = "removeOffer",
7
- Booking = "booking",
8
- Permission = "permission",
9
- Preparation = "preparation",
10
- Delivery = "delivery",
11
- Push = "push",
12
- AddAppVersion = "addAppVersion",
13
- RemoveAppVersion = "removeAppVersion",
14
- AppStatus = "appStatus",
15
- Attestation = "attestation",
16
- Validation = "validation",
17
- Check = "check",
18
- GetGroups = "getGroups",
19
- SignUp = "signUp",
20
- SignOut = "signOut"
21
- }
@@ -1,37 +0,0 @@
1
- import { ObjectId } from 'bson';
2
- import { AnalyticsActionResult } from './actionResult';
3
- import { AnalyticsActionType } from './actionType';
4
- import { AnalyticsCategory } from './categories';
5
- import { AcquirerAnalyticsData, NotificationAnalyticsData, UserAnalyticsData } from './data';
6
- import { AnalyticsDevice } from './device';
7
- interface BaseAnalytics {
8
- date: string;
9
- category: AnalyticsCategory;
10
- action: {
11
- type: AnalyticsActionType;
12
- result: AnalyticsActionResult;
13
- };
14
- appVersion?: string;
15
- device?: AnalyticsDevice;
16
- }
17
- export interface AcquirerAnalytics extends BaseAnalytics {
18
- acquirer?: ObjectId;
19
- identifier?: string;
20
- data?: AcquirerAnalyticsData;
21
- }
22
- export interface NotificationAnalytics extends BaseAnalytics {
23
- data?: NotificationAnalyticsData;
24
- }
25
- export interface UserAnalytics extends BaseAnalytics {
26
- identifier: string;
27
- data?: UserAnalyticsData;
28
- }
29
- export interface AuthAnalytics extends BaseAnalytics {
30
- identifier: string;
31
- data?: Record<string, unknown>;
32
- }
33
- export type Analytics = AcquirerAnalytics | NotificationAnalytics | UserAnalytics | AuthAnalytics;
34
- export interface AnalyticsLog {
35
- analytics: Analytics;
36
- }
37
- export {};
@@ -1,8 +0,0 @@
1
- export declare enum AnalyticsCategory {
2
- Acquirers = "acquirers",
3
- AcquirersRequest = "acquirersRequest",
4
- Notification = "notification",
5
- Users = "users",
6
- Auth = "auth",
7
- Vaccination = "vaccination"
8
- }
@@ -1,25 +0,0 @@
1
- export interface AcquirerAnalyticsPackageItem {
2
- scope: string;
3
- document: string;
4
- }
5
- export interface AcquirerAnalyticsData {
6
- branch?: string;
7
- branchScopes?: Record<string, unknown>;
8
- offer?: string;
9
- scopeType?: string;
10
- offerScopes?: Record<string, unknown>;
11
- request?: string;
12
- scopeList?: Record<string, unknown>;
13
- scopes?: Record<string, unknown> | unknown[];
14
- reason?: string;
15
- package?: AcquirerAnalyticsPackageItem[];
16
- offerRequestType?: string;
17
- deliveryTypes?: string[];
18
- }
19
- export interface UserAnalyticsData {
20
- lastActivityDate: string;
21
- lastDocumentUpdate: string;
22
- }
23
- export interface NotificationAnalyticsData {
24
- reason: string;
25
- }
@@ -1,8 +0,0 @@
1
- import { PlatformType } from '@diia-inhouse/types';
2
- export interface AnalyticsDevice {
3
- identifier?: string;
4
- platform: {
5
- type?: PlatformType;
6
- version?: string;
7
- };
8
- }
@@ -1,8 +0,0 @@
1
- export * from './actionResult';
2
- export * from './actionType';
3
- export * from './analytics';
4
- export * from './categories';
5
- export * from './data';
6
- export * from './device';
7
- export * from './nextGenAnalytics';
8
- export * from './rating';
@@ -1,14 +0,0 @@
1
- import { AnalyticsDevice } from './device';
2
- export interface NextGenAnalytics {
3
- date: string;
4
- category: string;
5
- action: {
6
- type: string;
7
- result: string;
8
- };
9
- identifier?: string;
10
- acquirer?: string;
11
- appVersion?: string;
12
- device?: AnalyticsDevice;
13
- data?: Record<string, unknown>;
14
- }
@@ -1,441 +0,0 @@
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
- }
@@ -1,2 +0,0 @@
1
- import { RatingForm } from '@diia-inhouse/types';
2
- export declare function getRatingFormMock(ratingForm?: Partial<RatingForm>): RatingForm;
@@ -1 +0,0 @@
1
- export * from './analytics';
@@ -1,18 +0,0 @@
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
- }
@@ -1 +0,0 @@
1
- export * from './analytics';
@@ -1 +0,0 @@
1
- export * from './rating';
@@ -1,9 +0,0 @@
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
- }