kui-crm_actions 0.0.113 → 0.0.115

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/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import * as kui_crm from 'kui-crm';
2
- import { InputParams, ResourceTypes, MeterTypes, FileStore, InputFileWithVisibilityFields, MeterFeaturesFormFields, InspectionTypes, InspectionRoomPhotoTypes, ParkingTypes as ParkingTypes$1, CityParams, RoomTypes, RenovationParams, RoomParams, HouseTypes as HouseTypes$1, WallMaterials as WallMaterials$1, OverlapTypes as OverlapTypes$1, GasTypes as GasTypes$1, ImageStore, ApartmentDescriptionParams, ApartmentMetroStationsParams, PhoneParams, WifiParams, InternetProviderParams, TVTypes, CompanyAutocompleteFields, CountryAutocompleteFields, TaxesTypes, MetersCountParams, FillingTagsAutocompleteFields, ApartmentFillingVariants, ImageBodyRequest, FillingInfoFormFields as FillingInfoFormFields$1, ContractLinkModel, FileBodyRequest, RoomType, ApartmentMainInfoModelFields, PostInspectionFillingListModel, ApartmentDetailInfoModelFields as ApartmentDetailInfoModelFields$1, ApartmentModel, ApartmentPartialDescriptionParams, MainObjectInfoInterface, ApartmentMainInfoParams, SecurityObjectInfoInterface, ApartmentSecurityInfoParams, DetailObjectInfoInterface, ApartmentDetailInfoParams, ApartmentTelecommunicationInfoParams, ApartmentHouseInfoParams, MaxMetersInfoParams, LatLonParams, InspectionRoomPhotoModel, InspectionFillingModel, ApartmentMetroParams, TransferInspectionMeterModel, InventoryInspectionMeterModel, InspectionPartialMetersInfoParams, ApartmentPaymentInfoParams, FullInspectionCommonFields, InspectionPaymentInfoParams, InspectionMeterCommonInfo, InspectionMeterInfoParams, InventoryInspectionFields, InspectionMetersInfoParams, BasicMeterFeaturesFormFields, BasicMeterFieldsSettings, InputByTypeProps, InspectionFeedbackParams, FillingTypes, FillingListItemModel, GeolocationParams } from 'kui-crm';
2
+ import { InputParams, ResourceTypes, MeterTypes, FileStore, InputFileWithVisibilityFields, MeterFeaturesFormFields, InspectionTypes, InspectionRoomPhotoTypes, ParkingTypes as ParkingTypes$1, CityParams, ApartmentMetroStationsParams, RoomTypes, RenovationParams, RoomParams, HouseTypes as HouseTypes$1, WallMaterials as WallMaterials$1, OverlapTypes as OverlapTypes$1, GasTypes as GasTypes$1, ImageStore, ApartmentDescriptionParams, PhoneParams, WifiParams, InternetProviderParams, TVTypes, CompanyAutocompleteFields, CountryAutocompleteFields, TaxesTypes, MetersCountParams, FillingTagsAutocompleteFields, ApartmentFillingVariants, ImageBodyRequest, FillingInfoFormFields as FillingInfoFormFields$1, ContractLinkModel, FileBodyRequest, RoomType, ApartmentMainInfoModelFields, PostInspectionFillingListModel, ApartmentDetailInfoModelFields as ApartmentDetailInfoModelFields$1, ApartmentModel, ApartmentPartialDescriptionParams, MainObjectInfoInterface, ApartmentMainInfoParams, SecurityObjectInfoInterface, ApartmentSecurityInfoParams, DetailObjectInfoInterface, ApartmentDetailInfoParams, ApartmentTelecommunicationInfoParams, ApartmentHouseInfoParams, MaxMetersInfoParams, LatLonParams, InspectionRoomPhotoModel, InspectionFillingModel, ApartmentMetroParams as ApartmentMetroParams$1, TransferInspectionMeterModel, InventoryInspectionMeterModel, InspectionPartialMetersInfoParams, ApartmentPaymentInfoParams, FullInspectionCommonFields, InspectionPaymentInfoParams, InspectionMeterCommonInfo, InspectionMeterInfoParams, InventoryInspectionFields, InspectionMetersInfoParams, BasicMeterFeaturesFormFields, BasicMeterFieldsSettings, InputByTypeProps, InspectionFeedbackParams, FillingTypes, FillingListItemModel, GeolocationParams } from 'kui-crm';
3
3
  import { DateTime } from 'luxon';
4
4
  import { Loader, MultistepForm, PhoneParams as PhoneParams$1 } from 'kui-utils';
5
5
  import * as yup from 'yup';
@@ -103,7 +103,7 @@ type BasicApartmentInfoStepFields = {
103
103
  apartmentNumber: number | string | null
104
104
  city: CityParams | null
105
105
  zipCode?: string
106
- }
106
+ } & ApartmentMetroStationsParams
107
107
 
108
108
  type SecurityApartmentInfoStepFields = {
109
109
  typeOfObject: RoomTypes | null
@@ -312,6 +312,13 @@ declare type GasTypes = "not_have" | "stove" | "stove_and_heater";
312
312
  declare type WallMaterials = "brick" | "panel" | "wood" | "block" | "stone";
313
313
  declare type HouseTypes = "ST" | "MB" | "M" | "BR" | "P" | "W" | "BL" | "WP" | "apart_hotel" | "apartment" | "townhouse" | "private_residence";
314
314
  declare type OverlapTypes = "wood" | "stone" | "brick" | "reinforced_concrete" | "metal" | "combined";
315
+ declare type ApartmentMetroParams = {
316
+ name: string;
317
+ metro_station_id: number;
318
+ distance_walk_meters?: number;
319
+ distance_car_kilometers?: string | number;
320
+ time_car_minutes?: number;
321
+ };
315
322
  declare type ApartmentDetailInfoModelFields = {
316
323
  financial_personal_account: string;
317
324
  max_electricity_counters: number | null;
@@ -440,6 +447,7 @@ declare type InitialInspectionFieldsBody = {
440
447
  ceiling_height: string | number | null;
441
448
  parking_type: ParkingTypes | null;
442
449
  parking_number: string;
450
+ metro: ApartmentMetroParams[];
443
451
  } & Omit<Partial<ApartmentMainInfoModelFields>, "city" | "rooms"> & HouseInfoModelFields;
444
452
  declare type RegularlyInspectionFieldsBody = {
445
453
  meters: PartialMeterModel[];
@@ -589,7 +597,7 @@ declare const apartmentFields: {
589
597
  type: ApartmentFillingVariants;
590
598
  };
591
599
  getApartmentDescriptionWithMetro(apartment: ApartmentModel): ApartmentDescriptionWithMetro;
592
- getMetroStationsParams(metroStations?: ApartmentMetroParams[] | undefined): {
600
+ getMetroStationsParams(metroStations?: ApartmentMetroParams$1[] | undefined): {
593
601
  id: number;
594
602
  name: string;
595
603
  walkDistance: number | undefined;
package/index.js CHANGED
@@ -199,6 +199,13 @@ var inspectionsRequestBody = {
199
199
  room_type: room.type,
200
200
  order_number: index,
201
201
  }); }),
202
+ metro: inspection.metroStations.map(function (station) { return ({
203
+ name: station.name || "",
204
+ metro_station_id: station.id,
205
+ distance_walk_meters: station.walkDistance,
206
+ distance_car_kilometers: station.carDistance,
207
+ time_car_minutes: station.carTime,
208
+ }); }),
202
209
  };
203
210
  },
204
211
  getPostBodyRegularInspection: function (inspection, roomsImages) {