ecotransac-shared-js 1.1.6 → 1.1.7

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
@@ -867,6 +867,29 @@ type User = {
867
867
  stripePortalUrl?: Maybe<Scalars['String']['output']>;
868
868
  };
869
869
 
870
+ declare const getLowThreshold: (isForPro: boolean) => {
871
+ limit: number;
872
+ fees: number;
873
+ };
874
+ declare const getFeesPercentage: (price: number, isForProfessionalUse: boolean) => 0 | 10 | 9 | 8 | 7 | 8.5 | 7.5 | 6.5 | 6 | 5;
875
+ type GetNetPriceMandate = Pick<Mandate, "isForProfessionalUse" | "isCommercialWallsSale" | "isBusinessAssetsTransfer" | "isLeaseRightsTransfer" | "netOwnerPrice" | "leaseRightsPrice" | "businessAssetsPrice">;
876
+ declare const getNetPrice: (mandate: GetNetPriceMandate) => number;
877
+ declare const getAgencyFees: (mandate: Mandate) => number;
878
+
879
+ declare const getLabel: <T>(list: {
880
+ value: T;
881
+ label: string;
882
+ }[], value: T) => string | null;
883
+ declare const formatAddress: (address: Pick<Address, "address" | "postalCode" | "locality">) => string;
884
+ declare const formatSeconds: (seconds: number) => string;
885
+ declare const formatDate: (date?: Date | null, withTime?: boolean) => string | null;
886
+ declare const formatPrice: (price: number) => string;
887
+ declare const formatPhone: (phone?: string | null) => string | null;
888
+ declare const formatMandateNumber: (number: number) => string;
889
+ declare const formatAgentLegalData: (profile?: Pick<Profile, "legalStatus" | "registrationNumber" | "registrationPlace"> | null) => string | null;
890
+ declare const getPropertyTitle: (property: Pick<Property, "propertyType" | "roomCount" | "livingArea" | "isForProfessionalUse" | "floorLevel">) => string;
891
+ declare const formatNumber: (number?: number | null) => string;
892
+
870
893
  type Field<T> = {
871
894
  name: keyof T;
872
895
  fieldType: FieldType;
@@ -888,26 +911,6 @@ type SelectOption = {
888
911
  label: string;
889
912
  };
890
913
 
891
- declare const getFieldValues: <D>(fields: Field<D>[], propertyState: State, data: Partial<D>) => ({
892
- label: string;
893
- value: string;
894
- isNotDefined: boolean;
895
- } | null)[];
896
-
897
- declare const getLabel: <T>(list: {
898
- value: T;
899
- label: string;
900
- }[], value: T) => string | null;
901
- declare const formatAddress: (address: Pick<Address, "address" | "postalCode" | "locality">) => string;
902
- declare const formatSeconds: (seconds: number) => string;
903
- declare const formatDate: (date?: Date | null, withTime?: boolean) => string | null;
904
- declare const formatPrice: (price: number) => string;
905
- declare const formatPhone: (phone?: string | null) => string | null;
906
- declare const formatMandateNumber: (number: number) => string;
907
- declare const formatAgentLegalData: (profile?: Pick<Profile, "legalStatus" | "registrationNumber" | "registrationPlace"> | null) => string | null;
908
- declare const getPropertyTitle: (property: Pick<Property, "propertyType" | "roomCount" | "livingArea" | "isForProfessionalUse" | "floorLevel">) => string;
909
- declare const formatNumber: (number?: number | null) => string;
910
-
911
914
  declare const featuresFormFields: Field<Property>[];
912
915
  declare const technicalFormFields: Field<Property>[];
913
916
  declare const surfacesFormFields: Field<Property>[];
@@ -972,4 +975,4 @@ declare const MANDATE_EXCLUSIVITY: {
972
975
  label: string;
973
976
  }[];
974
977
 
975
- export { COMPANY_INFO, CONDITIONS, COUNTRIES, ESTATE_CONDITION, EXPOSURES, GENDER, HEATING_ENERGY, IDENTIFICATION_DOCUMENTS, KITCHEN_TYPE, LEASE_ESTABLISHMENT, LEASE_TRANSFERT_PERMISSIONS, LEGAL_NATURE, MANDATE_EXCLUSIVITY, MARITAL_STATUS, PRENUP_TYPES, SHARING_CONFIGURATION, STANDINGS, VIEWS, featuresFormFields, formatAddress, formatAgentLegalData, formatDate, formatMandateNumber, formatNumber, formatPhone, formatPrice, formatSeconds, getFieldValues, getLabel, getPropertyTitle, propertyFields, surfacesFormFields, technicalFormFields };
978
+ export { COMPANY_INFO, CONDITIONS, COUNTRIES, ESTATE_CONDITION, EXPOSURES, GENDER, HEATING_ENERGY, IDENTIFICATION_DOCUMENTS, KITCHEN_TYPE, LEASE_ESTABLISHMENT, LEASE_TRANSFERT_PERMISSIONS, LEGAL_NATURE, MANDATE_EXCLUSIVITY, MARITAL_STATUS, PRENUP_TYPES, SHARING_CONFIGURATION, STANDINGS, VIEWS, featuresFormFields, formatAddress, formatAgentLegalData, formatDate, formatMandateNumber, formatNumber, formatPhone, formatPrice, formatSeconds, getAgencyFees, getFeesPercentage, getLabel, getLowThreshold, getNetPrice, getPropertyTitle, propertyFields, surfacesFormFields, technicalFormFields };
package/dist/index.d.ts CHANGED
@@ -867,6 +867,29 @@ type User = {
867
867
  stripePortalUrl?: Maybe<Scalars['String']['output']>;
868
868
  };
869
869
 
870
+ declare const getLowThreshold: (isForPro: boolean) => {
871
+ limit: number;
872
+ fees: number;
873
+ };
874
+ declare const getFeesPercentage: (price: number, isForProfessionalUse: boolean) => 0 | 10 | 9 | 8 | 7 | 8.5 | 7.5 | 6.5 | 6 | 5;
875
+ type GetNetPriceMandate = Pick<Mandate, "isForProfessionalUse" | "isCommercialWallsSale" | "isBusinessAssetsTransfer" | "isLeaseRightsTransfer" | "netOwnerPrice" | "leaseRightsPrice" | "businessAssetsPrice">;
876
+ declare const getNetPrice: (mandate: GetNetPriceMandate) => number;
877
+ declare const getAgencyFees: (mandate: Mandate) => number;
878
+
879
+ declare const getLabel: <T>(list: {
880
+ value: T;
881
+ label: string;
882
+ }[], value: T) => string | null;
883
+ declare const formatAddress: (address: Pick<Address, "address" | "postalCode" | "locality">) => string;
884
+ declare const formatSeconds: (seconds: number) => string;
885
+ declare const formatDate: (date?: Date | null, withTime?: boolean) => string | null;
886
+ declare const formatPrice: (price: number) => string;
887
+ declare const formatPhone: (phone?: string | null) => string | null;
888
+ declare const formatMandateNumber: (number: number) => string;
889
+ declare const formatAgentLegalData: (profile?: Pick<Profile, "legalStatus" | "registrationNumber" | "registrationPlace"> | null) => string | null;
890
+ declare const getPropertyTitle: (property: Pick<Property, "propertyType" | "roomCount" | "livingArea" | "isForProfessionalUse" | "floorLevel">) => string;
891
+ declare const formatNumber: (number?: number | null) => string;
892
+
870
893
  type Field<T> = {
871
894
  name: keyof T;
872
895
  fieldType: FieldType;
@@ -888,26 +911,6 @@ type SelectOption = {
888
911
  label: string;
889
912
  };
890
913
 
891
- declare const getFieldValues: <D>(fields: Field<D>[], propertyState: State, data: Partial<D>) => ({
892
- label: string;
893
- value: string;
894
- isNotDefined: boolean;
895
- } | null)[];
896
-
897
- declare const getLabel: <T>(list: {
898
- value: T;
899
- label: string;
900
- }[], value: T) => string | null;
901
- declare const formatAddress: (address: Pick<Address, "address" | "postalCode" | "locality">) => string;
902
- declare const formatSeconds: (seconds: number) => string;
903
- declare const formatDate: (date?: Date | null, withTime?: boolean) => string | null;
904
- declare const formatPrice: (price: number) => string;
905
- declare const formatPhone: (phone?: string | null) => string | null;
906
- declare const formatMandateNumber: (number: number) => string;
907
- declare const formatAgentLegalData: (profile?: Pick<Profile, "legalStatus" | "registrationNumber" | "registrationPlace"> | null) => string | null;
908
- declare const getPropertyTitle: (property: Pick<Property, "propertyType" | "roomCount" | "livingArea" | "isForProfessionalUse" | "floorLevel">) => string;
909
- declare const formatNumber: (number?: number | null) => string;
910
-
911
914
  declare const featuresFormFields: Field<Property>[];
912
915
  declare const technicalFormFields: Field<Property>[];
913
916
  declare const surfacesFormFields: Field<Property>[];
@@ -972,4 +975,4 @@ declare const MANDATE_EXCLUSIVITY: {
972
975
  label: string;
973
976
  }[];
974
977
 
975
- export { COMPANY_INFO, CONDITIONS, COUNTRIES, ESTATE_CONDITION, EXPOSURES, GENDER, HEATING_ENERGY, IDENTIFICATION_DOCUMENTS, KITCHEN_TYPE, LEASE_ESTABLISHMENT, LEASE_TRANSFERT_PERMISSIONS, LEGAL_NATURE, MANDATE_EXCLUSIVITY, MARITAL_STATUS, PRENUP_TYPES, SHARING_CONFIGURATION, STANDINGS, VIEWS, featuresFormFields, formatAddress, formatAgentLegalData, formatDate, formatMandateNumber, formatNumber, formatPhone, formatPrice, formatSeconds, getFieldValues, getLabel, getPropertyTitle, propertyFields, surfacesFormFields, technicalFormFields };
978
+ export { COMPANY_INFO, CONDITIONS, COUNTRIES, ESTATE_CONDITION, EXPOSURES, GENDER, HEATING_ENERGY, IDENTIFICATION_DOCUMENTS, KITCHEN_TYPE, LEASE_ESTABLISHMENT, LEASE_TRANSFERT_PERMISSIONS, LEGAL_NATURE, MANDATE_EXCLUSIVITY, MARITAL_STATUS, PRENUP_TYPES, SHARING_CONFIGURATION, STANDINGS, VIEWS, featuresFormFields, formatAddress, formatAgentLegalData, formatDate, formatMandateNumber, formatNumber, formatPhone, formatPrice, formatSeconds, getAgencyFees, getFeesPercentage, getLabel, getLowThreshold, getNetPrice, getPropertyTitle, propertyFields, surfacesFormFields, technicalFormFields };