hl-core 0.0.7-beta.20 → 0.0.7-beta.21

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.
@@ -214,7 +214,7 @@ export const useMemberStore = defineStore('members', {
214
214
  if (!this.validateInitiator()) return null;
215
215
  this.dataStore.isLoading = true;
216
216
  let otpStatus: boolean = false;
217
- let otpResponse: any = {};
217
+ let otpResponse: SendOtpResponse = {};
218
218
  try {
219
219
  if (member.iin && member.phoneNumber && member.iin.length === useMask().iin.length && member.phoneNumber.length === useMask().phone.length) {
220
220
  const status = await this.getOtpStatus(member.iin, member.phoneNumber, processInstanceId);
package/store/messages.ts CHANGED
@@ -188,7 +188,7 @@ export const messages = {
188
188
  questionnaireType: {
189
189
  byHealth: 'Анкета по здоровью застрахованного',
190
190
  byCritical: 'Анкета по критической болезни Застрахованного',
191
- answerAllNo: 'Ответить везде Нет',
191
+ answerAllNo: 'Ответить везде "Нет"',
192
192
  pleaseAnswer: 'Пожалуйста ответьте на {text} вопросов',
193
193
  },
194
194
  questionnaireHealth: 'Анкета по здоровью Застрахованного',
package/types/index.ts CHANGED
@@ -117,4 +117,134 @@ declare global {
117
117
  zagsNameKZ?: string;
118
118
  zagsNameRU?: string;
119
119
  };
120
+
121
+ type AnketaBody = {
122
+ first: EachAnketa;
123
+ second: any[] | null;
124
+ };
125
+
126
+ type EachAnketa = {
127
+ id: string;
128
+ name: string;
129
+ answerType: AnswerType;
130
+ definedAnswers: DefinedAnswers;
131
+ defaultAnswer: string;
132
+ questOrder: number;
133
+ answerId: null | string;
134
+ answerName: AnswerName | null;
135
+ answerText: null | string;
136
+ };
137
+
138
+ enum AnswerName {
139
+ Нет = 'Нет',
140
+ Да = 'Да',
141
+ }
142
+
143
+ enum AnswerType {
144
+ N = 'N',
145
+ T = 'T',
146
+ D = 'D',
147
+ }
148
+
149
+ enum DefinedAnswers {
150
+ N = 'N',
151
+ Y = 'Y',
152
+ }
153
+
154
+ type AnketaFirst = {
155
+ id: string;
156
+ insuredId: string | null;
157
+ body: AnketaBody[];
158
+ type: 'health' | 'critical';
159
+ clientId: string | null;
160
+ };
161
+
162
+ type AnketaSecond = {
163
+ id: string;
164
+ name: string;
165
+ answerType: AnswerType;
166
+ definedAnswers: DefinedAnswers;
167
+ defaultAnswer: string | null;
168
+ questOrder: number;
169
+ answerId: string | null;
170
+ answerName: string | null;
171
+ answerText: string | null;
172
+ };
173
+
174
+ type SendOtpResponse = {
175
+ tokenId?: string;
176
+ errMessage?: string | null;
177
+ result?: string | null;
178
+ status?: string | number | null;
179
+ statusName?: string | null;
180
+ };
181
+
182
+ type OtpDataType = { iin: string; phoneNumber: string; type: string; processInstanceId?: string | number };
183
+
184
+ type StartApplicationType = {
185
+ clientId: string | number | null;
186
+ iin: string;
187
+ longName: string;
188
+ processCode: number;
189
+ policyId: number;
190
+ };
191
+
192
+ type ESBDValidationType = {
193
+ personType: number;
194
+ iin: string;
195
+ lastName: string;
196
+ firstName: string;
197
+ middleName: string;
198
+ birthDate: string;
199
+ sex: number;
200
+ docType: number;
201
+ docNumber: string;
202
+ docIssuedDate: string;
203
+ docIssuedBy: string;
204
+ activityKindId: number;
205
+ economicsSectorId: number;
206
+ resident: number;
207
+ countryId: number;
208
+ };
209
+
210
+ type ESBDResponseType = {
211
+ errorCode: number;
212
+ errorMsg: string;
213
+ esbdClientID: number;
214
+ verifiedDate: string;
215
+ };
216
+
217
+ type RecalculationDataType = {
218
+ signDate: string;
219
+ birthDate: string;
220
+ gender: number;
221
+ amount: number | null;
222
+ premium: number | null;
223
+ coverPeriod: string;
224
+ payPeriod: string;
225
+ indexRateId: string;
226
+ paymentPeriodId: string;
227
+ addCovers: AddCover[];
228
+ };
229
+
230
+ type RecalculationResponseType = {
231
+ amount: number;
232
+ premium: number;
233
+ mainCoverPremium: number;
234
+ addCovers: AddCover[];
235
+ };
236
+
237
+ type AddCover = {
238
+ id: string | null;
239
+ processInstanceId: string;
240
+ coverTypeId: string;
241
+ coverTypeName: string;
242
+ coverTypeCode: number;
243
+ coverSumId: string;
244
+ coverSumName: string;
245
+ coverSumCode: string;
246
+ amount: number;
247
+ premium: number;
248
+ isMigrate: boolean;
249
+ };
120
250
  }