@provis/provis-common-be-module 2.5.10 → 2.5.12

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.
@@ -1,2 +1,20 @@
1
- declare const config: any;
1
+ declare const config: {
2
+ date_time_type_for_time: string;
3
+ date_time_type_for_days: string;
4
+ date_time_type_for_set_time: string;
5
+ date_format_full_datetime_with_separator: string;
6
+ date_format_full_datetime_without_milisecond_with_separator: string;
7
+ date_simple_format: string;
8
+ date_simple_format_withoud_dash: string;
9
+ date_format_full_datetime_only: string;
10
+ date_format_timestamp: string;
11
+ date_format_indonesia_format: string;
12
+ date_format_english_format: string;
13
+ date_simple_indonesia_format: string;
14
+ GENDER_MALE: string;
15
+ GENDER_FEMALE: string;
16
+ HTTP_STATUS_OK: number;
17
+ HTTP_STATUS_SERVER_ERROR: number;
18
+ DEFAULT: string;
19
+ };
2
20
  export default config;
@@ -1,23 +1,26 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- const config = {};
4
- // DATE TIME TYPE
5
- config.date_time_type_for_time = 'time';
6
- config.date_time_type_for_days = 'day';
7
- config.date_time_type_for_set_time = 'settime';
8
- config.date_format_full_datetime_with_separator = 'YYYY-MM-DD HH:ii:ss.SSS';
9
- config.date_format_full_datetime_without_milisecond_with_separator = 'YYYY-MM-DD HH:ii:ss';
10
- config.date_simple_format = 'YYYY-MM-DD';
11
- config.date_simple_format_withoud_dash = 'YYYYMMDD';
12
- config.date_format_full_datetime_only = 'DD/MM/YYYY HH:ii:ss';
13
- config.date_format_timestamp = 'timestamp';
14
- config.date_format_indonesia_format = 'D M Y'; /** example: 16 Mei 2020 */
15
- config.date_format_english_format = 'DD MMM YYYY'; /** example: 16 May 2020 */
16
- config.date_simple_indonesia_format = 'DD-MM-YYYY';
17
- // GENDER
18
- config.GENDER_MALE = 'M';
19
- config.GENDER_FEMALE = 'F';
20
- // HTTP STATUS CODE
21
- config.HTTP_STATUS_OK = 200;
22
- config.HTTP_STATUS_SERVER_ERROR = 500;
3
+ const config = {
4
+ // DATE TIME TYPE
5
+ date_time_type_for_time: 'time',
6
+ date_time_type_for_days: 'day',
7
+ date_time_type_for_set_time: 'settime',
8
+ date_format_full_datetime_with_separator: 'YYYY-MM-DD HH:ii:ss.SSS',
9
+ date_format_full_datetime_without_milisecond_with_separator: 'YYYY-MM-DD HH:ii:ss',
10
+ date_simple_format: 'YYYY-MM-DD',
11
+ date_simple_format_withoud_dash: 'YYYYMMDD',
12
+ date_format_full_datetime_only: 'DD/MM/YYYY HH:ii:ss',
13
+ date_format_timestamp: 'timestamp',
14
+ date_format_indonesia_format: 'D M Y',
15
+ date_format_english_format: 'DD MMM YYYY',
16
+ date_simple_indonesia_format: 'DD-MM-YYYY',
17
+ // GENDER
18
+ GENDER_MALE: 'M',
19
+ GENDER_FEMALE: 'F',
20
+ // HTTP STATUS CODE
21
+ HTTP_STATUS_OK: 200,
22
+ HTTP_STATUS_SERVER_ERROR: 500,
23
+ // DEFAULT
24
+ DEFAULT: 'default',
25
+ };
23
26
  exports.default = config;
@@ -1,5 +1,5 @@
1
1
  declare const _default: {
2
- default: {
2
+ [x: string]: {
3
3
  order: number;
4
4
  desc: {
5
5
  id: string;
@@ -1,7 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ const config_1 = require("../../config");
3
4
  exports.default = {
4
- "default": [
5
+ [config_1.default.DEFAULT]: [
5
6
  {
6
7
  order: 1,
7
8
  desc: {
@@ -3,5 +3,7 @@ declare const _default: {
3
3
  VT002: string[];
4
4
  VT003: string[];
5
5
  VT004: string[];
6
+ VT005: string[];
7
+ VT006: string[];
6
8
  };
7
9
  export default _default;
@@ -4,8 +4,6 @@ exports.default = {
4
4
  "VT001": [
5
5
  "Audi",
6
6
  "BMW",
7
- "BYD",
8
- "Chery",
9
7
  "Chevrolet",
10
8
  "Citroën",
11
9
  "Daihatsu",
@@ -26,7 +24,6 @@ exports.default = {
26
24
  "MAN",
27
25
  "Mazda",
28
26
  "Mercedes-Benz",
29
- "MG",
30
27
  "MINI",
31
28
  "Mitsubishi",
32
29
  "Neta",
@@ -38,7 +35,6 @@ exports.default = {
38
35
  "Subaru",
39
36
  "Suzuki",
40
37
  "Tata Motors",
41
- "Tesla",
42
38
  "Toyota",
43
39
  "Volkswagen",
44
40
  "Volvo",
@@ -86,7 +82,6 @@ exports.default = {
86
82
  "Ducati",
87
83
  "EM1",
88
84
  "Energica",
89
- "Gesits",
90
85
  "Harley-Davidson",
91
86
  "Honda",
92
87
  "Italjet",
@@ -102,10 +97,30 @@ exports.default = {
102
97
  "Suzuki",
103
98
  "TVS",
104
99
  "Vespa",
100
+ "Yamaha",
101
+ "Zero Motorcycles"
102
+ ],
103
+ "VT005": [
104
+ "BMW",
105
+ "BYD",
106
+ "Chery",
107
+ "DFSK",
108
+ "Hyundai",
109
+ "Kia",
110
+ "Lexus",
111
+ "Mercedes-Benz",
112
+ "MG",
113
+ "MINI",
114
+ "Renault",
115
+ "Tesla",
116
+ "Toyota",
117
+ "Wuling"
118
+ ],
119
+ "VT006": [
120
+ "Gesits",
121
+ "Honda",
105
122
  "Viar",
106
123
  "Volta",
107
124
  "Yadea",
108
- "Yamaha",
109
- "Zero Motorcycles"
110
- ]
125
+ ],
111
126
  };
@@ -9,8 +9,12 @@ declare const insuranceType: {
9
9
  en: string;
10
10
  };
11
11
  deductible: {
12
- id: string;
13
- en: string;
12
+ VT001: string[];
13
+ VT002: string[];
14
+ VT003: string[];
15
+ VT004: string[];
16
+ VT005: string[];
17
+ VT006: string[];
14
18
  };
15
19
  }[];
16
20
  declare const regionCode: {
@@ -28,7 +32,7 @@ declare const vehicleTypeCode: {
28
32
  };
29
33
  maxAge: number;
30
34
  }[];
31
- declare const additionalCoverage: {
35
+ declare const additionalCoverage: ({
32
36
  code: string;
33
37
  desc: {
34
38
  id: string;
@@ -37,7 +41,18 @@ declare const additionalCoverage: {
37
41
  isVisible: boolean;
38
42
  isInputSumInsured: boolean;
39
43
  isInputQty: boolean;
40
- }[];
44
+ deductible: string[];
45
+ } | {
46
+ code: string;
47
+ desc: {
48
+ id: string;
49
+ en: string;
50
+ };
51
+ isVisible: boolean;
52
+ isInputSumInsured: boolean;
53
+ isInputQty: boolean;
54
+ deductible?: undefined;
55
+ })[];
41
56
  declare const vehicleUsage: {
42
57
  code: string;
43
58
  desc: {
@@ -45,4 +60,12 @@ declare const vehicleUsage: {
45
60
  en: string;
46
61
  };
47
62
  }[];
48
- export { insuranceType, regionCode, vehicleTypeCode, additionalCoverage, vehicleUsage, };
63
+ declare const deductible: {
64
+ code: string;
65
+ order: number;
66
+ desc: {
67
+ id: string;
68
+ en: string;
69
+ };
70
+ }[];
71
+ export { insuranceType, regionCode, vehicleTypeCode, additionalCoverage, vehicleUsage, deductible, };
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.vehicleUsage = exports.additionalCoverage = exports.vehicleTypeCode = exports.regionCode = exports.insuranceType = void 0;
3
+ exports.deductible = exports.vehicleUsage = exports.additionalCoverage = exports.vehicleTypeCode = exports.regionCode = exports.insuranceType = void 0;
4
4
  const insuranceType = [
5
5
  {
6
6
  code: "all-risk",
@@ -13,8 +13,12 @@ const insuranceType = [
13
13
  en: 'Covering Loss and/or physical damage to insured vehicle by cause not otherwise excluded in terms of the policy',
14
14
  },
15
15
  deductible: {
16
- id: '',
17
- en: 'Own Material Damage, theft, burglary: IDR 300.000 anyone occurrence and for anyone unit for partial loss, except for:\n- Act of God as per AAUI Definition (Earthquake, Volcanic Eruption and Tsunami & Typhoon, Windstorm, Flood, Landslide, Hail), Strike, Riot, Civil Commotion & Terrorism and Sabotage: 10% of adjusted losses minimum IDR500.000,- anyone occurrence and anyone unit\n- TPL, PA Driver, PA Passenger, Medical Expenses: NIL\n- Theft by Own Driver / Employee: 10% of claim amount any one claim or occurrence\n- Additional deductible for Electrical and Battery : 20% of TSI',
16
+ "VT001": ['MV_DEDUCT05'],
17
+ "VT002": ['MV_DEDUCT05'],
18
+ "VT003": ['MV_DEDUCT05'],
19
+ "VT004": ['MV_DEDUCT06'],
20
+ "VT005": ['MV_DEDUCT05'],
21
+ "VT006": ['MV_DEDUCT06', 'MV_DEDUCT01'],
18
22
  },
19
23
  },
20
24
  {
@@ -28,8 +32,12 @@ const insuranceType = [
28
32
  en: 'To pay loss or damage when the cost of such loss or damage exceeds 75% of the value of the vehicle at the time of loss by cause not otherwise excluded in terms of the policy',
29
33
  },
30
34
  deductible: {
31
- id: '',
32
- en: 'Own Material Damage, Theft, Burglary and Total Loss: IDR 300.000 anyone occurrence and for anyone unit Except for:\n- Act of God as per AAUI Definition (Earthquake, VolcanicEruption and Tsunami & Typhoon, Windstorm, Flood,Landslide, Hail), Strike, Riot, Civil Commotion & Terrorism and Sabotage: 10% of adjusted losses minimum IDR500.000,- anyone occurrence and anyone unit\n- TPL, PA Driver, PA Passenger, Medical Expenses: NIL',
35
+ "VT001": ['MV_DEDUCT07'],
36
+ "VT002": ['MV_DEDUCT07'],
37
+ "VT003": ['MV_DEDUCT07'],
38
+ "VT004": ['MV_DEDUCT08'],
39
+ "VT005": ['MV_DEDUCT07'],
40
+ "VT006": ['MV_DEDUCT08', 'MV_DEDUCT01'],
33
41
  },
34
42
  },
35
43
  ];
@@ -91,6 +99,22 @@ const vehicleTypeCode = [
91
99
  },
92
100
  maxAge: 5,
93
101
  },
102
+ {
103
+ code: "VT005",
104
+ desc: {
105
+ id: "Jenis Kendaraan Non Bus dan Non Truk Listrik",
106
+ en: "ypes of Non-Bus and Non-Truck Electrical Vehicles",
107
+ },
108
+ maxAge: 10,
109
+ },
110
+ {
111
+ code: "VT006",
112
+ desc: {
113
+ id: "Jenis Kendaraan Roda 2 (dua) Listrik",
114
+ en: "Type of 2 (two) Wheeled Electrical Vehicle",
115
+ },
116
+ maxAge: 5,
117
+ },
94
118
  ];
95
119
  exports.vehicleTypeCode = vehicleTypeCode;
96
120
  const additionalCoverage = [
@@ -103,6 +127,9 @@ const additionalCoverage = [
103
127
  isVisible: true,
104
128
  isInputSumInsured: false,
105
129
  isInputQty: false,
130
+ deductible: [
131
+ 'MV_DEDUCT02',
132
+ ],
106
133
  },
107
134
  {
108
135
  code: "EQVET",
@@ -113,6 +140,9 @@ const additionalCoverage = [
113
140
  isVisible: true,
114
141
  isInputSumInsured: false,
115
142
  isInputQty: false,
143
+ deductible: [
144
+ 'MV_DEDUCT02',
145
+ ],
116
146
  },
117
147
  {
118
148
  code: "SRCC",
@@ -123,6 +153,9 @@ const additionalCoverage = [
123
153
  isVisible: true,
124
154
  isInputSumInsured: false,
125
155
  isInputQty: false,
156
+ deductible: [
157
+ 'MV_DEDUCT02',
158
+ ],
126
159
  },
127
160
  {
128
161
  code: "PSATSI",
@@ -133,6 +166,9 @@ const additionalCoverage = [
133
166
  isVisible: true,
134
167
  isInputSumInsured: false,
135
168
  isInputQty: false,
169
+ deductible: [
170
+ 'MV_DEDUCT02',
171
+ ],
136
172
  },
137
173
  {
138
174
  code: "TPL",
@@ -143,6 +179,9 @@ const additionalCoverage = [
143
179
  isVisible: true,
144
180
  isInputSumInsured: true,
145
181
  isInputQty: false,
182
+ deductible: [
183
+ 'MV_DEDUCT03',
184
+ ],
146
185
  },
147
186
  {
148
187
  code: "PAD",
@@ -153,26 +192,36 @@ const additionalCoverage = [
153
192
  isVisible: true,
154
193
  isInputSumInsured: true,
155
194
  isInputQty: false,
195
+ deductible: [
196
+ 'MV_DEDUCT03',
197
+ ],
156
198
  },
157
199
  {
158
200
  code: "PAP",
159
201
  desc: {
160
- id: "Kcelakaan Penumpang",
202
+ id: "Kecelakaan Penumpang",
161
203
  en: "Personal Accident Passenger",
162
204
  },
163
205
  isVisible: true,
164
206
  isInputSumInsured: false,
165
207
  isInputQty: true,
208
+ deductible: [
209
+ 'MV_DEDUCT03',
210
+ ],
166
211
  },
167
212
  {
168
213
  code: "TBOD",
169
214
  desc: {
170
215
  id: "Biaya Medis, Izin Bengkel, Tunjangan Ambulans, Ban dan Velg",
171
- en: "TBOD, Authorize Workshop, Ambulance Allowance, Tire and Wheel",
216
+ en: "TBOD, Authorize Workshop, Ambulance Allowance, Tire and Wheel", // TBOD -> Theft By Own Driver / Employee
172
217
  },
173
218
  isVisible: true,
174
219
  isInputSumInsured: false,
175
220
  isInputQty: false,
221
+ deductible: [
222
+ 'MV_DEDUCT03',
223
+ 'MV_DEDUCT04',
224
+ ],
176
225
  },
177
226
  {
178
227
  code: "CASCO",
@@ -208,8 +257,82 @@ const vehicleUsage = [
208
257
  code: "BUSINESS",
209
258
  desc: {
210
259
  id: "Bisnis",
211
- en: "Office business",
260
+ en: "Office Business",
261
+ },
262
+ },
263
+ {
264
+ code: "PS",
265
+ desc: {
266
+ id: "Personal / Bisnis",
267
+ en: "Personal / Office Business",
212
268
  },
213
269
  },
214
270
  ];
215
271
  exports.vehicleUsage = vehicleUsage;
272
+ const deductible = [
273
+ {
274
+ code: 'MV_DEDUCT01',
275
+ order: 5,
276
+ desc: {
277
+ 'id': '- Deduktibel tambahan untuk Komponen Kelistrikan dan Baterai: 20% dari Nilai Pertanggungan (TSI)',
278
+ 'en': '- Additional deductible for Electrical and Battery : 20% of TSI',
279
+ },
280
+ },
281
+ {
282
+ code: 'MV_DEDUCT02',
283
+ order: 2,
284
+ desc: {
285
+ 'id': '- Bencana Alam sesuai Definisi AAUI (Gempa Bumi, Letusan Gunung Berapi dan Tsunami & Topan, Angin Kencang, Banjir, Tanah Longsor, Hujan Es), Pemogokan, Huru-hara, Kerusuhan Sipil serta Terorisme dan Sabotase: 10% dari kerugian yang disesuaikan, dengan minimum Rp 500.000,- untuk setiap kejadian dan setiap unit',
286
+ 'en': '- Act of God as per AAUI Definition (Earthquake, Volcanic Eruption and Tsunami & Typhoon, Windstorm, Flood, Landslide, Hail), Strike, Riot, Civil Commotion & Terrorism and Sabotage: 10% of adjusted losses minimum IDR 500.000,- anyone occurrence and anyone unit',
287
+ },
288
+ },
289
+ {
290
+ code: 'MV_DEDUCT03',
291
+ order: 3,
292
+ desc: {
293
+ 'id': '- TPL, PA Pengemudi, PA Penumpang, Biaya Medis: Nihil',
294
+ 'en': '- TPL, PA Driver, PA Passenger, Medical Expenses: NIL',
295
+ },
296
+ },
297
+ {
298
+ code: 'MV_DEDUCT04',
299
+ order: 4,
300
+ desc: {
301
+ 'id': '- Risiko Pencurian oleh Pengemudi atau Karyawan Sendiri dikenakan deductible sebesar 10% dari nilai klaim untuk setiap kejadian maupun setiap pengajuan klaim',
302
+ 'en': '- Theft by Own Driver / Employee: 10% of claim amount any one claim or occurrence',
303
+ },
304
+ },
305
+ {
306
+ code: 'MV_DEDUCT05',
307
+ order: 1,
308
+ desc: {
309
+ 'id': 'Kerusakan Material Sendiri, pencurian, dan pembobolan: Deductible sebesar IDR 300.000 untuk setiap kejadian dan untuk setiap unit atas kerugian sebagian (partial loss), kecuali untuk:',
310
+ 'en': 'Own Material Damage, theft, burglary: IDR 300.000 anyone occurrence and for anyone unit for partial loss, except for:',
311
+ },
312
+ },
313
+ {
314
+ code: 'MV_DEDUCT06',
315
+ order: 1,
316
+ desc: {
317
+ 'id': 'Kerusakan Material Sendiri, pencurian, dan pembobolan: Deductible sebesar IDR 150.000 untuk setiap kejadian dan untuk setiap unit atas kerugian sebagian (partial loss), kecuali untuk:',
318
+ 'en': 'Own Material Damage, theft, burglary: IDR 150.000 anyone occurrence and for anyone unit for partial loss, except for:',
319
+ },
320
+ },
321
+ {
322
+ code: 'MV_DEDUCT07',
323
+ order: 1,
324
+ desc: {
325
+ 'id': 'Kerusakan Material Sendiri, Pencurian, Pembobolan, dan Total Loss: Deductible sebesar IDR 300.000 untuk setiap kejadian dan untuk setiap unit, kecuali untuk:',
326
+ 'en': 'Own Material Damage, Theft, Burglary and Total Loss: IDR 300.000 anyone occurrence and for anyone unit Except for:',
327
+ },
328
+ },
329
+ {
330
+ code: 'MV_DEDUCT08',
331
+ order: 1,
332
+ desc: {
333
+ 'id': 'Kerusakan Material Sendiri, Pencurian, Pembobolan, dan Total Loss: Deductible sebesar IDR 150.000 untuk setiap kejadian dan untuk setiap unit, kecuali untuk:',
334
+ 'en': 'Own Material Damage, Theft, Burglary and Total Loss: IDR 150.000 anyone occurrence and for anyone unit Except for:',
335
+ },
336
+ },
337
+ ];
338
+ exports.deductible = deductible;
@@ -27,6 +27,20 @@ declare const quotation: {
27
27
  id: string;
28
28
  };
29
29
  };
30
+ TYPE_QUOTATION_ATTACHMENT_INSURER_GENERATED_QUOTATION: {
31
+ code: string;
32
+ desc: {
33
+ en: string;
34
+ id: string;
35
+ };
36
+ };
37
+ TYPE_QUOTATION_ATTACHMENT_CUSTOMER_GENERATED_QUOTATION: {
38
+ code: string;
39
+ desc: {
40
+ en: string;
41
+ id: string;
42
+ };
43
+ };
30
44
  LIST: any[];
31
45
  };
32
46
  export default quotation;
@@ -29,10 +29,26 @@ const quotation = {
29
29
  id: "Polis"
30
30
  },
31
31
  },
32
+ TYPE_QUOTATION_ATTACHMENT_INSURER_GENERATED_QUOTATION: {
33
+ code: 'INSURER_GENERATED_QUOTATION',
34
+ desc: {
35
+ en: "Insurer Quotation Auto Generated",
36
+ id: "Kutipan Pertanggungan dari Penanggung yang Dihasilkan Secara Otomatis"
37
+ },
38
+ },
39
+ TYPE_QUOTATION_ATTACHMENT_CUSTOMER_GENERATED_QUOTATION: {
40
+ code: 'CUSTOMER_GENERATED_QUOTATION',
41
+ desc: {
42
+ en: "Customer Quotation Auto Generated",
43
+ id: "Kutipan Pertanggungan untuk Nasabah yang Dihasilkan Secara Otomatis"
44
+ },
45
+ },
32
46
  LIST: [],
33
47
  };
34
48
  quotation.LIST.push(quotation.TYPE_QUOTATION_ATTACHMENT_PREMIUM_NOTE);
35
49
  quotation.LIST.push(quotation.TYPE_QUOTATION_ATTACHMENT_COMMISSION_NOTE);
36
50
  quotation.LIST.push(quotation.TYPE_QUOTATION_ATTACHMENT_DOC_OTHER);
37
51
  quotation.LIST.push(quotation.TYPE_QUOTATION_ATTACHMENT_POLICY);
52
+ quotation.LIST.push(quotation.TYPE_QUOTATION_ATTACHMENT_INSURER_GENERATED_QUOTATION);
53
+ quotation.LIST.push(quotation.TYPE_QUOTATION_ATTACHMENT_CUSTOMER_GENERATED_QUOTATION);
38
54
  exports.default = quotation;
@@ -2,4 +2,5 @@ declare function sum(a: number | null, b: number | null): number;
2
2
  declare function minus(a: number | null, b: number | null): number;
3
3
  declare function multiple(a: number | null, b: number | null): number;
4
4
  declare function divide(a: number | null, b: number | null): number;
5
- export { sum, minus, multiple, divide, };
5
+ declare const sumN: (...numbers: (number | null)[]) => any;
6
+ export { sum, minus, multiple, divide, sumN };
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.divide = exports.multiple = exports.minus = exports.sum = void 0;
3
+ exports.sumN = exports.divide = exports.multiple = exports.minus = exports.sum = void 0;
4
4
  function sum(a, b) {
5
5
  try {
6
6
  if (a == null && b == null)
@@ -45,3 +45,11 @@ function divide(a, b) {
45
45
  }
46
46
  }
47
47
  exports.divide = divide;
48
+ const sumN = (...numbers) => {
49
+ let result = null;
50
+ numbers.forEach(each => {
51
+ result = sum(result, each);
52
+ });
53
+ return result;
54
+ };
55
+ exports.sumN = sumN;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@provis/provis-common-be-module",
3
- "version": "2.5.10",
3
+ "version": "2.5.12",
4
4
  "description": "This common module for Provis internal backend use lib",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {