ecotransac-shared-js 1.2.3 → 1.2.5

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/dist/index.d.mts CHANGED
@@ -76,7 +76,20 @@ type Advert = {
76
76
  title: Scalars['String']['output'];
77
77
  updatedAt: Scalars['DateTime']['output'];
78
78
  };
79
- type AirConditioningType = 'CLASSIC' | 'INTEGRATED_HEAT_PUMP' | 'NONE';
79
+ type Article = {
80
+ __typename?: 'Article';
81
+ createdAt: Scalars['DateTime']['output'];
82
+ description: Scalars['String']['output'];
83
+ id: Scalars['ID']['output'];
84
+ isAccessible: Scalars['Boolean']['output'];
85
+ isFrontPage: Scalars['Boolean']['output'];
86
+ markdownContent?: Maybe<Scalars['String']['output']>;
87
+ pictureUrl: Scalars['String']['output'];
88
+ title: Scalars['String']['output'];
89
+ videoUrl?: Maybe<Scalars['String']['output']>;
90
+ viewedByUser: Scalars['Boolean']['output'];
91
+ views: Array<UserView>;
92
+ };
80
93
  type Attachment = {
81
94
  __typename?: 'Attachment';
82
95
  author: User;
@@ -356,7 +369,6 @@ type Lesson = {
356
369
  userProgress: Scalars['Int']['output'];
357
370
  };
358
371
  type LessonType = 'ALUR' | 'ENERGY_RENOVATION' | 'TUTORIAL';
359
- type LightingType = 'CLASSIC' | 'LOW_CONSUMPTION' | 'MIXED';
360
372
  type Mandate = {
361
373
  __typename?: 'Mandate';
362
374
  agencyFeePercentage?: Maybe<Scalars['Float']['output']>;
@@ -381,6 +393,8 @@ type Mandate = {
381
393
  isLowPrice: Scalars['Boolean']['output'];
382
394
  leaseRightsPrice?: Maybe<Scalars['Float']['output']>;
383
395
  netOwnerPrice?: Maybe<Scalars['Float']['output']>;
396
+ nonWithdrawalEndDate?: Maybe<Scalars['DateTime']['output']>;
397
+ nonWithdrawalStartDate?: Maybe<Scalars['DateTime']['output']>;
384
398
  /** entity ID */
385
399
  number: Scalars['Int']['output'];
386
400
  property: Property;
@@ -390,20 +404,10 @@ type Mandate = {
390
404
  /** Duration in months */
391
405
  status: MandateStatus;
392
406
  withdrawalDate?: Maybe<Scalars['DateTime']['output']>;
393
- withdrawalStartDate?: Maybe<Scalars['DateTime']['output']>;
394
407
  };
395
408
  type MandateExclusivity = 'EXCLUSIVE' | 'SEMI_EXCLUSIVE' | 'SIMPLE';
396
409
  type MandateStatus = 'AWAITING_AGENT_SIGNATURE' | 'AWAITING_OWNER_SIGNATURE' | 'AWAITING_STAFF_VALIDATION' | 'CANCELED' | 'EXPIRED' | 'PROCESSING' | 'REJECTED' | 'WITHDRAWN';
397
410
  type MaritalStatus = 'CIVIL_PARTNERSHIP' | 'DIVORCED' | 'MARRIED_WITHOUT_PRENUP' | 'MARRIED_WITH_PRENUP' | 'SINGLE' | 'WIDOWED';
398
- type MultimediaUsage = 'INTENSE' | 'LOW' | 'MODERATE';
399
- type Partner = {
400
- __typename?: 'Partner';
401
- id: Scalars['ID']['output'];
402
- isDeleted: Scalars['Boolean']['output'];
403
- name: Scalars['String']['output'];
404
- representative: User;
405
- userId: Scalars['String']['output'];
406
- };
407
411
  type Photo = {
408
412
  __typename?: 'Photo';
409
413
  deletedAt?: Maybe<Scalars['DateTime']['output']>;
@@ -416,9 +420,7 @@ type Photo = {
416
420
  propertyId?: Maybe<Scalars['String']['output']>;
417
421
  url: Scalars['String']['output'];
418
422
  };
419
- type PoolType = 'ABOVE_GROUND' | 'IN_GROUND' | 'NONE' | 'OTHER';
420
423
  type PrenupType = 'COMMUNITY_OF_PROPERTY_WITHOUT_GAINS' | 'NOTARIZED_MARRIAGE_CONTRACT' | 'PARTICIPATION_IN_ACQUISITIONS' | 'PARTICIPATION_IN_ACQUISITIONS_WITH_FULL_ATTRIBUTION_TO_SURVIVOR' | 'SEPARATION_OF_PROPERTY' | 'UNIVERSAL_COMMUNITY';
421
- type PresenceProfile = 'ALL_DAY' | 'MORNING_EVENING' | 'MORNING_NOON_EVENING';
422
424
  type Product = {
423
425
  __typename?: 'Product';
424
426
  category: Scalars['String']['output'];
@@ -609,44 +611,30 @@ type Renovation = {
609
611
  __typename?: 'Renovation';
610
612
  address: Address;
611
613
  agent: User;
612
- airConditioning?: Maybe<AirConditioningType>;
613
614
  annualElectricityBill?: Maybe<Scalars['Int']['output']>;
614
615
  annualElectricityConsumption?: Maybe<Scalars['Int']['output']>;
615
616
  attachments: Array<Attachment>;
617
+ budget?: Maybe<Scalars['Float']['output']>;
616
618
  comments: Array<Comment>;
619
+ constraints?: Maybe<Scalars['String']['output']>;
620
+ constructionYear?: Maybe<Scalars['DateTime']['output']>;
617
621
  coverPhotoUrl?: Maybe<Scalars['String']['output']>;
618
- exposures?: Maybe<Array<CardinalPoints>>;
619
- hasAmericanFridge?: Maybe<Scalars['Boolean']['output']>;
620
- hasDishwasher?: Maybe<Scalars['Boolean']['output']>;
621
- hasDryer?: Maybe<Scalars['Boolean']['output']>;
622
- hasElectricOven?: Maybe<Scalars['Boolean']['output']>;
623
- hasElectricVehicleCharging?: Maybe<Scalars['Boolean']['output']>;
624
- hasFreezer?: Maybe<Scalars['Boolean']['output']>;
625
- hasFridge?: Maybe<Scalars['Boolean']['output']>;
626
- hasFridgeFreezer?: Maybe<Scalars['Boolean']['output']>;
627
- hasHotPlate?: Maybe<Scalars['Boolean']['output']>;
628
- hasWashingMachine?: Maybe<Scalars['Boolean']['output']>;
622
+ currentDPEScore?: Maybe<EnergyScore>;
623
+ floorCount?: Maybe<Scalars['Int']['output']>;
624
+ hasDPE?: Maybe<Scalars['Boolean']['output']>;
629
625
  heatingEnergy?: Maybe<HeatingEnergy>;
630
- hotWaterEnergy?: Maybe<Scalars['String']['output']>;
631
626
  id: Scalars['ID']['output'];
632
- inhabitantCount?: Maybe<Scalars['Int']['output']>;
633
627
  insulationLevel?: Maybe<InsulationLevel>;
634
- isFullService: Scalars['Boolean']['output'];
635
- isUpgrade: Scalars['Boolean']['output'];
636
- lighting?: Maybe<LightingType>;
628
+ interestedByServices?: Maybe<Scalars['String']['output']>;
637
629
  livingArea?: Maybe<Scalars['Int']['output']>;
638
- multimediaUsage?: Maybe<MultimediaUsage>;
639
630
  owners: Array<Contact>;
640
631
  photos: Array<Photo>;
641
- pool?: Maybe<PoolType>;
642
- presenceProfile?: Maybe<PresenceProfile>;
643
632
  propertyType: Scalars['String']['output'];
644
- roofType?: Maybe<RoofType>;
645
- step: RenovationStep;
633
+ renovationType: RenovationType;
634
+ roomCount?: Maybe<Scalars['Int']['output']>;
646
635
  };
647
- type RenovationStep = 'IN_PREPARATION' | 'PROJECT_SENT_TO_PARTNER' | 'QUOTE_SENT_TO_CLIENT' | 'WORK_COMPLETED_INVOICE_SENT' | 'WORK_IN_PROGRESS' | 'WORK_PAID';
636
+ type RenovationType = 'RENOVATION' | 'UPGRADE';
648
637
  type RequiredFor = 'DIFFUSION' | 'MANDATE_CREATION' | 'PROFILE';
649
- type RoofType = 'FOUR_SLOPES' | 'L_SHAPE' | 'ONE_SLOPE' | 'TWO_SLOPES' | 'T_SHAPE';
650
638
  type SearchFilters = {
651
639
  __typename?: 'SearchFilters';
652
640
  area: Array<Coordinate>;
@@ -707,15 +695,30 @@ type User = {
707
695
  isSubscribed: Scalars['Boolean']['output'];
708
696
  lastLogin: Scalars['DateTime']['output'];
709
697
  lastName: Scalars['String']['output'];
710
- partner?: Maybe<Partner>;
711
698
  profile?: Maybe<Profile>;
712
699
  properties: Array<Property>;
700
+ recentViews: Array<UserView>;
713
701
  renovations: Array<Renovation>;
714
702
  role: UserRole;
715
703
  slug: Scalars['String']['output'];
716
704
  stripePortalUrl?: Maybe<Scalars['String']['output']>;
717
705
  };
718
706
  type UserRole = 'ADMIN' | 'LIFETIME_FREE_MEMBER' | 'MEMBER' | 'PARTNER';
707
+ type UserView = {
708
+ __typename?: 'UserView';
709
+ article?: Maybe<Article>;
710
+ articleId?: Maybe<Scalars['String']['output']>;
711
+ contact?: Maybe<Contact>;
712
+ contactId?: Maybe<Scalars['String']['output']>;
713
+ id: Scalars['ID']['output'];
714
+ lesson?: Maybe<Lesson>;
715
+ lessonId?: Maybe<Scalars['String']['output']>;
716
+ property?: Maybe<Property>;
717
+ propertyId?: Maybe<Scalars['String']['output']>;
718
+ user: User;
719
+ userId: Scalars['String']['output'];
720
+ viewedAt: Scalars['DateTime']['output'];
721
+ };
719
722
 
720
723
  type Field = {
721
724
  name: string;
@@ -786,8 +789,15 @@ declare const LEASE_TRANSFERT_PERMISSIONS: SelectOption<LeaseTransfertPermission
786
789
  declare const KITCHEN_TYPE: SelectOption<KitchenType>[];
787
790
  declare const HEATING_ENERGY: SelectOption<HeatingEnergy>[];
788
791
 
789
- type StateType$1 = Pick<Property, "isForProfessionalUse" | "propertyType" | "isOccupied" | "isCoOwnership" | "isHousingScheme" | "isBusinessAssetsTransfer" | "isLeaseRightsTransfer" | "isCommercialWallsSale" | "isDpeCompleted" | "isEnergyAuditCompleted" | "leaseEstablishedUnder" | "constructionYear">;
790
- declare const getPropertyState: (property: StateType$1) => State;
792
+ type StateType$2 = Pick<Property, "isForProfessionalUse" | "propertyType" | "isOccupied" | "isCoOwnership" | "isHousingScheme" | "isBusinessAssetsTransfer" | "isLeaseRightsTransfer" | "isCommercialWallsSale" | "isDpeCompleted" | "isEnergyAuditCompleted" | "leaseEstablishedUnder" | "constructionYear">;
793
+ declare const getPropertyState: (property: StateType$2) => State;
794
+
795
+ declare const renovationFormFields: Field[];
796
+
797
+ declare const RENOVATION_TYPES: SelectOption<RenovationType>[];
798
+
799
+ type StateType$1 = Pick<Renovation, "hasDPE">;
800
+ declare const getRenovationState: (renovation: StateType$1) => State;
791
801
 
792
802
  declare const mandateFormFields: Field[];
793
803
 
@@ -846,4 +856,4 @@ declare const COUNTRIES: SelectOption<string>[];
846
856
 
847
857
  declare const LEGAL_STATUS: SelectOption<LegalStatus>[];
848
858
 
849
- export { COMPANY_INFO, CONDITIONS, COUNTRIES, type Condition, ESTATE_CONDITION, EXPOSURES, type Field, GENDER, HEATING_ENERGY, KITCHEN_TYPE, LEASE_ESTABLISHMENT, LEASE_TRANSFERT_PERMISSIONS, LEGAL_NATURE, LEGAL_STATUS, MANDATE_EXCLUSIVITY, MARITAL_STATUS, PRENUP_TYPES, SHARING_CONFIGURATION, STANDINGS, type SelectOption, type State, VIEWS, and, contactFormFields, featuresFormFields, formatAddress, formatAgentLegalData, formatDate, formatMandateNumber, formatNumber, formatPhone, formatPrice, formatReference, formatRegistrationNumber, formatSeconds, getAgencyFees, getContactState, getDisplayedPrice, getFeesPercentage, getIsLowPrice, getLabel, getLowThreshold, getNetPrice, getPropertyState, getPropertyTitle, getValue, mandateFormFields, not, only, or, propertyFields, shouldRender, surfacesFormFields, technicalFormFields };
859
+ export { COMPANY_INFO, CONDITIONS, COUNTRIES, type Condition, ESTATE_CONDITION, EXPOSURES, type Field, GENDER, HEATING_ENERGY, KITCHEN_TYPE, LEASE_ESTABLISHMENT, LEASE_TRANSFERT_PERMISSIONS, LEGAL_NATURE, LEGAL_STATUS, MANDATE_EXCLUSIVITY, MARITAL_STATUS, PRENUP_TYPES, RENOVATION_TYPES, SHARING_CONFIGURATION, STANDINGS, type SelectOption, type State, VIEWS, and, contactFormFields, featuresFormFields, formatAddress, formatAgentLegalData, formatDate, formatMandateNumber, formatNumber, formatPhone, formatPrice, formatReference, formatRegistrationNumber, formatSeconds, getAgencyFees, getContactState, getDisplayedPrice, getFeesPercentage, getIsLowPrice, getLabel, getLowThreshold, getNetPrice, getPropertyState, getPropertyTitle, getRenovationState, getValue, mandateFormFields, not, only, or, propertyFields, renovationFormFields, shouldRender, surfacesFormFields, technicalFormFields };
package/dist/index.d.ts CHANGED
@@ -76,7 +76,20 @@ type Advert = {
76
76
  title: Scalars['String']['output'];
77
77
  updatedAt: Scalars['DateTime']['output'];
78
78
  };
79
- type AirConditioningType = 'CLASSIC' | 'INTEGRATED_HEAT_PUMP' | 'NONE';
79
+ type Article = {
80
+ __typename?: 'Article';
81
+ createdAt: Scalars['DateTime']['output'];
82
+ description: Scalars['String']['output'];
83
+ id: Scalars['ID']['output'];
84
+ isAccessible: Scalars['Boolean']['output'];
85
+ isFrontPage: Scalars['Boolean']['output'];
86
+ markdownContent?: Maybe<Scalars['String']['output']>;
87
+ pictureUrl: Scalars['String']['output'];
88
+ title: Scalars['String']['output'];
89
+ videoUrl?: Maybe<Scalars['String']['output']>;
90
+ viewedByUser: Scalars['Boolean']['output'];
91
+ views: Array<UserView>;
92
+ };
80
93
  type Attachment = {
81
94
  __typename?: 'Attachment';
82
95
  author: User;
@@ -356,7 +369,6 @@ type Lesson = {
356
369
  userProgress: Scalars['Int']['output'];
357
370
  };
358
371
  type LessonType = 'ALUR' | 'ENERGY_RENOVATION' | 'TUTORIAL';
359
- type LightingType = 'CLASSIC' | 'LOW_CONSUMPTION' | 'MIXED';
360
372
  type Mandate = {
361
373
  __typename?: 'Mandate';
362
374
  agencyFeePercentage?: Maybe<Scalars['Float']['output']>;
@@ -381,6 +393,8 @@ type Mandate = {
381
393
  isLowPrice: Scalars['Boolean']['output'];
382
394
  leaseRightsPrice?: Maybe<Scalars['Float']['output']>;
383
395
  netOwnerPrice?: Maybe<Scalars['Float']['output']>;
396
+ nonWithdrawalEndDate?: Maybe<Scalars['DateTime']['output']>;
397
+ nonWithdrawalStartDate?: Maybe<Scalars['DateTime']['output']>;
384
398
  /** entity ID */
385
399
  number: Scalars['Int']['output'];
386
400
  property: Property;
@@ -390,20 +404,10 @@ type Mandate = {
390
404
  /** Duration in months */
391
405
  status: MandateStatus;
392
406
  withdrawalDate?: Maybe<Scalars['DateTime']['output']>;
393
- withdrawalStartDate?: Maybe<Scalars['DateTime']['output']>;
394
407
  };
395
408
  type MandateExclusivity = 'EXCLUSIVE' | 'SEMI_EXCLUSIVE' | 'SIMPLE';
396
409
  type MandateStatus = 'AWAITING_AGENT_SIGNATURE' | 'AWAITING_OWNER_SIGNATURE' | 'AWAITING_STAFF_VALIDATION' | 'CANCELED' | 'EXPIRED' | 'PROCESSING' | 'REJECTED' | 'WITHDRAWN';
397
410
  type MaritalStatus = 'CIVIL_PARTNERSHIP' | 'DIVORCED' | 'MARRIED_WITHOUT_PRENUP' | 'MARRIED_WITH_PRENUP' | 'SINGLE' | 'WIDOWED';
398
- type MultimediaUsage = 'INTENSE' | 'LOW' | 'MODERATE';
399
- type Partner = {
400
- __typename?: 'Partner';
401
- id: Scalars['ID']['output'];
402
- isDeleted: Scalars['Boolean']['output'];
403
- name: Scalars['String']['output'];
404
- representative: User;
405
- userId: Scalars['String']['output'];
406
- };
407
411
  type Photo = {
408
412
  __typename?: 'Photo';
409
413
  deletedAt?: Maybe<Scalars['DateTime']['output']>;
@@ -416,9 +420,7 @@ type Photo = {
416
420
  propertyId?: Maybe<Scalars['String']['output']>;
417
421
  url: Scalars['String']['output'];
418
422
  };
419
- type PoolType = 'ABOVE_GROUND' | 'IN_GROUND' | 'NONE' | 'OTHER';
420
423
  type PrenupType = 'COMMUNITY_OF_PROPERTY_WITHOUT_GAINS' | 'NOTARIZED_MARRIAGE_CONTRACT' | 'PARTICIPATION_IN_ACQUISITIONS' | 'PARTICIPATION_IN_ACQUISITIONS_WITH_FULL_ATTRIBUTION_TO_SURVIVOR' | 'SEPARATION_OF_PROPERTY' | 'UNIVERSAL_COMMUNITY';
421
- type PresenceProfile = 'ALL_DAY' | 'MORNING_EVENING' | 'MORNING_NOON_EVENING';
422
424
  type Product = {
423
425
  __typename?: 'Product';
424
426
  category: Scalars['String']['output'];
@@ -609,44 +611,30 @@ type Renovation = {
609
611
  __typename?: 'Renovation';
610
612
  address: Address;
611
613
  agent: User;
612
- airConditioning?: Maybe<AirConditioningType>;
613
614
  annualElectricityBill?: Maybe<Scalars['Int']['output']>;
614
615
  annualElectricityConsumption?: Maybe<Scalars['Int']['output']>;
615
616
  attachments: Array<Attachment>;
617
+ budget?: Maybe<Scalars['Float']['output']>;
616
618
  comments: Array<Comment>;
619
+ constraints?: Maybe<Scalars['String']['output']>;
620
+ constructionYear?: Maybe<Scalars['DateTime']['output']>;
617
621
  coverPhotoUrl?: Maybe<Scalars['String']['output']>;
618
- exposures?: Maybe<Array<CardinalPoints>>;
619
- hasAmericanFridge?: Maybe<Scalars['Boolean']['output']>;
620
- hasDishwasher?: Maybe<Scalars['Boolean']['output']>;
621
- hasDryer?: Maybe<Scalars['Boolean']['output']>;
622
- hasElectricOven?: Maybe<Scalars['Boolean']['output']>;
623
- hasElectricVehicleCharging?: Maybe<Scalars['Boolean']['output']>;
624
- hasFreezer?: Maybe<Scalars['Boolean']['output']>;
625
- hasFridge?: Maybe<Scalars['Boolean']['output']>;
626
- hasFridgeFreezer?: Maybe<Scalars['Boolean']['output']>;
627
- hasHotPlate?: Maybe<Scalars['Boolean']['output']>;
628
- hasWashingMachine?: Maybe<Scalars['Boolean']['output']>;
622
+ currentDPEScore?: Maybe<EnergyScore>;
623
+ floorCount?: Maybe<Scalars['Int']['output']>;
624
+ hasDPE?: Maybe<Scalars['Boolean']['output']>;
629
625
  heatingEnergy?: Maybe<HeatingEnergy>;
630
- hotWaterEnergy?: Maybe<Scalars['String']['output']>;
631
626
  id: Scalars['ID']['output'];
632
- inhabitantCount?: Maybe<Scalars['Int']['output']>;
633
627
  insulationLevel?: Maybe<InsulationLevel>;
634
- isFullService: Scalars['Boolean']['output'];
635
- isUpgrade: Scalars['Boolean']['output'];
636
- lighting?: Maybe<LightingType>;
628
+ interestedByServices?: Maybe<Scalars['String']['output']>;
637
629
  livingArea?: Maybe<Scalars['Int']['output']>;
638
- multimediaUsage?: Maybe<MultimediaUsage>;
639
630
  owners: Array<Contact>;
640
631
  photos: Array<Photo>;
641
- pool?: Maybe<PoolType>;
642
- presenceProfile?: Maybe<PresenceProfile>;
643
632
  propertyType: Scalars['String']['output'];
644
- roofType?: Maybe<RoofType>;
645
- step: RenovationStep;
633
+ renovationType: RenovationType;
634
+ roomCount?: Maybe<Scalars['Int']['output']>;
646
635
  };
647
- type RenovationStep = 'IN_PREPARATION' | 'PROJECT_SENT_TO_PARTNER' | 'QUOTE_SENT_TO_CLIENT' | 'WORK_COMPLETED_INVOICE_SENT' | 'WORK_IN_PROGRESS' | 'WORK_PAID';
636
+ type RenovationType = 'RENOVATION' | 'UPGRADE';
648
637
  type RequiredFor = 'DIFFUSION' | 'MANDATE_CREATION' | 'PROFILE';
649
- type RoofType = 'FOUR_SLOPES' | 'L_SHAPE' | 'ONE_SLOPE' | 'TWO_SLOPES' | 'T_SHAPE';
650
638
  type SearchFilters = {
651
639
  __typename?: 'SearchFilters';
652
640
  area: Array<Coordinate>;
@@ -707,15 +695,30 @@ type User = {
707
695
  isSubscribed: Scalars['Boolean']['output'];
708
696
  lastLogin: Scalars['DateTime']['output'];
709
697
  lastName: Scalars['String']['output'];
710
- partner?: Maybe<Partner>;
711
698
  profile?: Maybe<Profile>;
712
699
  properties: Array<Property>;
700
+ recentViews: Array<UserView>;
713
701
  renovations: Array<Renovation>;
714
702
  role: UserRole;
715
703
  slug: Scalars['String']['output'];
716
704
  stripePortalUrl?: Maybe<Scalars['String']['output']>;
717
705
  };
718
706
  type UserRole = 'ADMIN' | 'LIFETIME_FREE_MEMBER' | 'MEMBER' | 'PARTNER';
707
+ type UserView = {
708
+ __typename?: 'UserView';
709
+ article?: Maybe<Article>;
710
+ articleId?: Maybe<Scalars['String']['output']>;
711
+ contact?: Maybe<Contact>;
712
+ contactId?: Maybe<Scalars['String']['output']>;
713
+ id: Scalars['ID']['output'];
714
+ lesson?: Maybe<Lesson>;
715
+ lessonId?: Maybe<Scalars['String']['output']>;
716
+ property?: Maybe<Property>;
717
+ propertyId?: Maybe<Scalars['String']['output']>;
718
+ user: User;
719
+ userId: Scalars['String']['output'];
720
+ viewedAt: Scalars['DateTime']['output'];
721
+ };
719
722
 
720
723
  type Field = {
721
724
  name: string;
@@ -786,8 +789,15 @@ declare const LEASE_TRANSFERT_PERMISSIONS: SelectOption<LeaseTransfertPermission
786
789
  declare const KITCHEN_TYPE: SelectOption<KitchenType>[];
787
790
  declare const HEATING_ENERGY: SelectOption<HeatingEnergy>[];
788
791
 
789
- type StateType$1 = Pick<Property, "isForProfessionalUse" | "propertyType" | "isOccupied" | "isCoOwnership" | "isHousingScheme" | "isBusinessAssetsTransfer" | "isLeaseRightsTransfer" | "isCommercialWallsSale" | "isDpeCompleted" | "isEnergyAuditCompleted" | "leaseEstablishedUnder" | "constructionYear">;
790
- declare const getPropertyState: (property: StateType$1) => State;
792
+ type StateType$2 = Pick<Property, "isForProfessionalUse" | "propertyType" | "isOccupied" | "isCoOwnership" | "isHousingScheme" | "isBusinessAssetsTransfer" | "isLeaseRightsTransfer" | "isCommercialWallsSale" | "isDpeCompleted" | "isEnergyAuditCompleted" | "leaseEstablishedUnder" | "constructionYear">;
793
+ declare const getPropertyState: (property: StateType$2) => State;
794
+
795
+ declare const renovationFormFields: Field[];
796
+
797
+ declare const RENOVATION_TYPES: SelectOption<RenovationType>[];
798
+
799
+ type StateType$1 = Pick<Renovation, "hasDPE">;
800
+ declare const getRenovationState: (renovation: StateType$1) => State;
791
801
 
792
802
  declare const mandateFormFields: Field[];
793
803
 
@@ -846,4 +856,4 @@ declare const COUNTRIES: SelectOption<string>[];
846
856
 
847
857
  declare const LEGAL_STATUS: SelectOption<LegalStatus>[];
848
858
 
849
- export { COMPANY_INFO, CONDITIONS, COUNTRIES, type Condition, ESTATE_CONDITION, EXPOSURES, type Field, GENDER, HEATING_ENERGY, KITCHEN_TYPE, LEASE_ESTABLISHMENT, LEASE_TRANSFERT_PERMISSIONS, LEGAL_NATURE, LEGAL_STATUS, MANDATE_EXCLUSIVITY, MARITAL_STATUS, PRENUP_TYPES, SHARING_CONFIGURATION, STANDINGS, type SelectOption, type State, VIEWS, and, contactFormFields, featuresFormFields, formatAddress, formatAgentLegalData, formatDate, formatMandateNumber, formatNumber, formatPhone, formatPrice, formatReference, formatRegistrationNumber, formatSeconds, getAgencyFees, getContactState, getDisplayedPrice, getFeesPercentage, getIsLowPrice, getLabel, getLowThreshold, getNetPrice, getPropertyState, getPropertyTitle, getValue, mandateFormFields, not, only, or, propertyFields, shouldRender, surfacesFormFields, technicalFormFields };
859
+ export { COMPANY_INFO, CONDITIONS, COUNTRIES, type Condition, ESTATE_CONDITION, EXPOSURES, type Field, GENDER, HEATING_ENERGY, KITCHEN_TYPE, LEASE_ESTABLISHMENT, LEASE_TRANSFERT_PERMISSIONS, LEGAL_NATURE, LEGAL_STATUS, MANDATE_EXCLUSIVITY, MARITAL_STATUS, PRENUP_TYPES, RENOVATION_TYPES, SHARING_CONFIGURATION, STANDINGS, type SelectOption, type State, VIEWS, and, contactFormFields, featuresFormFields, formatAddress, formatAgentLegalData, formatDate, formatMandateNumber, formatNumber, formatPhone, formatPrice, formatReference, formatRegistrationNumber, formatSeconds, getAgencyFees, getContactState, getDisplayedPrice, getFeesPercentage, getIsLowPrice, getLabel, getLowThreshold, getNetPrice, getPropertyState, getPropertyTitle, getRenovationState, getValue, mandateFormFields, not, only, or, propertyFields, renovationFormFields, shouldRender, surfacesFormFields, technicalFormFields };
package/dist/index.js CHANGED
@@ -45,6 +45,7 @@ __export(src_exports, {
45
45
  MANDATE_EXCLUSIVITY: () => MANDATE_EXCLUSIVITY,
46
46
  MARITAL_STATUS: () => MARITAL_STATUS,
47
47
  PRENUP_TYPES: () => PRENUP_TYPES,
48
+ RENOVATION_TYPES: () => RENOVATION_TYPES,
48
49
  SHARING_CONFIGURATION: () => SHARING_CONFIGURATION,
49
50
  STANDINGS: () => STANDINGS,
50
51
  VIEWS: () => VIEWS,
@@ -71,12 +72,14 @@ __export(src_exports, {
71
72
  getNetPrice: () => getNetPrice,
72
73
  getPropertyState: () => getPropertyState,
73
74
  getPropertyTitle: () => getPropertyTitle,
75
+ getRenovationState: () => getRenovationState,
74
76
  getValue: () => getValue,
75
77
  mandateFormFields: () => mandateFormFields,
76
78
  not: () => not,
77
79
  only: () => only,
78
80
  or: () => or,
79
81
  propertyFields: () => propertyFields,
82
+ renovationFormFields: () => renovationFormFields,
80
83
  shouldRender: () => shouldRender,
81
84
  surfacesFormFields: () => surfacesFormFields,
82
85
  technicalFormFields: () => technicalFormFields
@@ -1278,6 +1281,130 @@ var getPropertyState = (property) => ({
1278
1281
  isUnderTenYearsOld: property.constructionYear ? (0, import_date_fns2.isAfter)(property.constructionYear, (0, import_date_fns2.sub)(/* @__PURE__ */ new Date(), { years: 10 })) : false
1279
1282
  });
1280
1283
 
1284
+ // src/static/select-options.ts
1285
+ var HEATING_ENERGY2 = [
1286
+ { label: "Bois", value: "WOOD" },
1287
+ { label: "\xC9lectricit\xE9", value: "ELECTRICITY" },
1288
+ { label: "Gaz", value: "GAS" },
1289
+ { label: "G\xE9othermie", value: "GEOTHERMAL" },
1290
+ { label: "Fioul", value: "FUEL" },
1291
+ { label: "Autre", value: "OTHER" }
1292
+ ];
1293
+
1294
+ // src/static/renovation/select-options.ts
1295
+ var RENOVATION_TYPES = [
1296
+ { value: "RENOVATION", label: "R\xE9novation \xE9nerg\xE9tique" },
1297
+ { value: "UPGRADE", label: "Am\xE9lioration \xE9nerg\xE9tique" }
1298
+ ];
1299
+
1300
+ // src/static/renovation/fields.ts
1301
+ var renovationFormFields = [
1302
+ {
1303
+ name: "renovationType",
1304
+ fieldType: "radio",
1305
+ label: "Prestation",
1306
+ props: { options: RENOVATION_TYPES }
1307
+ },
1308
+ {
1309
+ name: "livingArea",
1310
+ fieldType: "number",
1311
+ label: "Surface habitable du logement",
1312
+ props: { suffix: "m\xB2" }
1313
+ },
1314
+ {
1315
+ name: "roomCount",
1316
+ fieldType: "number",
1317
+ label: "Nombre de pi\xE8ces",
1318
+ props: { suffix: "pi\xE8ce(s)" }
1319
+ },
1320
+ {
1321
+ name: "floorCount",
1322
+ fieldType: "number",
1323
+ label: "Nombre d'\xE9tages",
1324
+ props: { suffix: "\xE9tages" }
1325
+ },
1326
+ {
1327
+ name: "constructionYear",
1328
+ fieldType: "year",
1329
+ label: "Ann\xE9e de construction",
1330
+ requiredFor: []
1331
+ },
1332
+ {
1333
+ name: "hasDPE",
1334
+ fieldType: "radio",
1335
+ label: "DPE r\xE9alis\xE9"
1336
+ },
1337
+ {
1338
+ name: "currentDPEScore",
1339
+ fieldType: "grade",
1340
+ label: "Score \xE9nerg\xE9tique actuel",
1341
+ condition: only("hasDPE")
1342
+ },
1343
+ {
1344
+ name: "propertyType",
1345
+ fieldType: "propertyType",
1346
+ label: "Nature du bien"
1347
+ },
1348
+ {
1349
+ name: "address",
1350
+ fieldType: "address",
1351
+ label: ""
1352
+ },
1353
+ {
1354
+ name: "interestedByServices",
1355
+ fieldType: "textarea",
1356
+ label: "Services souhait\xE9s"
1357
+ },
1358
+ {
1359
+ name: "budget",
1360
+ fieldType: "number",
1361
+ label: "Budget disponible pour les travaux",
1362
+ props: { suffix: "\u20AC" }
1363
+ },
1364
+ {
1365
+ name: "constraints",
1366
+ fieldType: "textarea",
1367
+ label: "Contraintes sp\xE9cifiques",
1368
+ props: { tooltip: "Acc\xE8s ou d\xE9lais par exemple" },
1369
+ requiredFor: []
1370
+ },
1371
+ {
1372
+ name: "insulationLevel",
1373
+ fieldType: "select",
1374
+ label: "Niveau d\u2019isolation actuel",
1375
+ requiredFor: []
1376
+ },
1377
+ {
1378
+ name: "heatingEnergy",
1379
+ fieldType: "select",
1380
+ label: "Chauffage principal",
1381
+ props: { options: HEATING_ENERGY2 },
1382
+ requiredFor: []
1383
+ },
1384
+ {
1385
+ name: "annualElectricityConsumption",
1386
+ fieldType: "number",
1387
+ label: "Consommation annuelle d'\xE9lectricit\xE9",
1388
+ props: { suffix: "Kwh" },
1389
+ requiredFor: []
1390
+ },
1391
+ {
1392
+ name: "annualElectricityBill",
1393
+ fieldType: "number",
1394
+ label: "Facture d'\xE9lectricit\xE9 annuelle (hors abonnement)",
1395
+ props: {
1396
+ suffix: "\u20AC/an",
1397
+ tooltip: "Le prix du kWh TTC de l'\xE9lectricit\xE9 est de 0.2516 \u20AC en juillet 2024 en France"
1398
+ },
1399
+ requiredFor: []
1400
+ }
1401
+ ];
1402
+
1403
+ // src/static/renovation/state.ts
1404
+ var getRenovationState = (renovation) => ({
1405
+ hasDPE: Boolean(renovation.hasDPE)
1406
+ });
1407
+
1281
1408
  // src/static/mandate/select-options.ts
1282
1409
  var MANDATE_EXCLUSIVITY = [
1283
1410
  { value: "EXCLUSIVE", label: "Mandat exclusif" },
@@ -1694,6 +1821,7 @@ var COMPANY_INFO = {
1694
1821
  MANDATE_EXCLUSIVITY,
1695
1822
  MARITAL_STATUS,
1696
1823
  PRENUP_TYPES,
1824
+ RENOVATION_TYPES,
1697
1825
  SHARING_CONFIGURATION,
1698
1826
  STANDINGS,
1699
1827
  VIEWS,
@@ -1720,12 +1848,14 @@ var COMPANY_INFO = {
1720
1848
  getNetPrice,
1721
1849
  getPropertyState,
1722
1850
  getPropertyTitle,
1851
+ getRenovationState,
1723
1852
  getValue,
1724
1853
  mandateFormFields,
1725
1854
  not,
1726
1855
  only,
1727
1856
  or,
1728
1857
  propertyFields,
1858
+ renovationFormFields,
1729
1859
  shouldRender,
1730
1860
  surfacesFormFields,
1731
1861
  technicalFormFields
package/dist/index.mjs CHANGED
@@ -1193,6 +1193,130 @@ var getPropertyState = (property) => ({
1193
1193
  isUnderTenYearsOld: property.constructionYear ? isAfter(property.constructionYear, sub(/* @__PURE__ */ new Date(), { years: 10 })) : false
1194
1194
  });
1195
1195
 
1196
+ // src/static/select-options.ts
1197
+ var HEATING_ENERGY2 = [
1198
+ { label: "Bois", value: "WOOD" },
1199
+ { label: "\xC9lectricit\xE9", value: "ELECTRICITY" },
1200
+ { label: "Gaz", value: "GAS" },
1201
+ { label: "G\xE9othermie", value: "GEOTHERMAL" },
1202
+ { label: "Fioul", value: "FUEL" },
1203
+ { label: "Autre", value: "OTHER" }
1204
+ ];
1205
+
1206
+ // src/static/renovation/select-options.ts
1207
+ var RENOVATION_TYPES = [
1208
+ { value: "RENOVATION", label: "R\xE9novation \xE9nerg\xE9tique" },
1209
+ { value: "UPGRADE", label: "Am\xE9lioration \xE9nerg\xE9tique" }
1210
+ ];
1211
+
1212
+ // src/static/renovation/fields.ts
1213
+ var renovationFormFields = [
1214
+ {
1215
+ name: "renovationType",
1216
+ fieldType: "radio",
1217
+ label: "Prestation",
1218
+ props: { options: RENOVATION_TYPES }
1219
+ },
1220
+ {
1221
+ name: "livingArea",
1222
+ fieldType: "number",
1223
+ label: "Surface habitable du logement",
1224
+ props: { suffix: "m\xB2" }
1225
+ },
1226
+ {
1227
+ name: "roomCount",
1228
+ fieldType: "number",
1229
+ label: "Nombre de pi\xE8ces",
1230
+ props: { suffix: "pi\xE8ce(s)" }
1231
+ },
1232
+ {
1233
+ name: "floorCount",
1234
+ fieldType: "number",
1235
+ label: "Nombre d'\xE9tages",
1236
+ props: { suffix: "\xE9tages" }
1237
+ },
1238
+ {
1239
+ name: "constructionYear",
1240
+ fieldType: "year",
1241
+ label: "Ann\xE9e de construction",
1242
+ requiredFor: []
1243
+ },
1244
+ {
1245
+ name: "hasDPE",
1246
+ fieldType: "radio",
1247
+ label: "DPE r\xE9alis\xE9"
1248
+ },
1249
+ {
1250
+ name: "currentDPEScore",
1251
+ fieldType: "grade",
1252
+ label: "Score \xE9nerg\xE9tique actuel",
1253
+ condition: only("hasDPE")
1254
+ },
1255
+ {
1256
+ name: "propertyType",
1257
+ fieldType: "propertyType",
1258
+ label: "Nature du bien"
1259
+ },
1260
+ {
1261
+ name: "address",
1262
+ fieldType: "address",
1263
+ label: ""
1264
+ },
1265
+ {
1266
+ name: "interestedByServices",
1267
+ fieldType: "textarea",
1268
+ label: "Services souhait\xE9s"
1269
+ },
1270
+ {
1271
+ name: "budget",
1272
+ fieldType: "number",
1273
+ label: "Budget disponible pour les travaux",
1274
+ props: { suffix: "\u20AC" }
1275
+ },
1276
+ {
1277
+ name: "constraints",
1278
+ fieldType: "textarea",
1279
+ label: "Contraintes sp\xE9cifiques",
1280
+ props: { tooltip: "Acc\xE8s ou d\xE9lais par exemple" },
1281
+ requiredFor: []
1282
+ },
1283
+ {
1284
+ name: "insulationLevel",
1285
+ fieldType: "select",
1286
+ label: "Niveau d\u2019isolation actuel",
1287
+ requiredFor: []
1288
+ },
1289
+ {
1290
+ name: "heatingEnergy",
1291
+ fieldType: "select",
1292
+ label: "Chauffage principal",
1293
+ props: { options: HEATING_ENERGY2 },
1294
+ requiredFor: []
1295
+ },
1296
+ {
1297
+ name: "annualElectricityConsumption",
1298
+ fieldType: "number",
1299
+ label: "Consommation annuelle d'\xE9lectricit\xE9",
1300
+ props: { suffix: "Kwh" },
1301
+ requiredFor: []
1302
+ },
1303
+ {
1304
+ name: "annualElectricityBill",
1305
+ fieldType: "number",
1306
+ label: "Facture d'\xE9lectricit\xE9 annuelle (hors abonnement)",
1307
+ props: {
1308
+ suffix: "\u20AC/an",
1309
+ tooltip: "Le prix du kWh TTC de l'\xE9lectricit\xE9 est de 0.2516 \u20AC en juillet 2024 en France"
1310
+ },
1311
+ requiredFor: []
1312
+ }
1313
+ ];
1314
+
1315
+ // src/static/renovation/state.ts
1316
+ var getRenovationState = (renovation) => ({
1317
+ hasDPE: Boolean(renovation.hasDPE)
1318
+ });
1319
+
1196
1320
  // src/static/mandate/select-options.ts
1197
1321
  var MANDATE_EXCLUSIVITY = [
1198
1322
  { value: "EXCLUSIVE", label: "Mandat exclusif" },
@@ -1608,6 +1732,7 @@ export {
1608
1732
  MANDATE_EXCLUSIVITY,
1609
1733
  MARITAL_STATUS,
1610
1734
  PRENUP_TYPES,
1735
+ RENOVATION_TYPES,
1611
1736
  SHARING_CONFIGURATION,
1612
1737
  STANDINGS,
1613
1738
  VIEWS,
@@ -1634,12 +1759,14 @@ export {
1634
1759
  getNetPrice,
1635
1760
  getPropertyState,
1636
1761
  getPropertyTitle,
1762
+ getRenovationState,
1637
1763
  getValue,
1638
1764
  mandateFormFields,
1639
1765
  not,
1640
1766
  only,
1641
1767
  or,
1642
1768
  propertyFields,
1769
+ renovationFormFields,
1643
1770
  shouldRender,
1644
1771
  surfacesFormFields,
1645
1772
  technicalFormFields
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ecotransac-shared-js",
3
- "version": "1.2.3",
3
+ "version": "1.2.5",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "modules": "dist/index.mjs",