@placeshakr/config 10.19.15 → 10.19.16-alpha.2

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/src/types.ts CHANGED
@@ -63,6 +63,46 @@ export interface Resource {
63
63
  */
64
64
  owner?: string | User;
65
65
 
66
+ /**
67
+ * owner data
68
+ */
69
+ ownerData?: {
70
+ /**
71
+ * Owner id
72
+ */
73
+ id: string;
74
+
75
+ /**
76
+ * User id
77
+ */
78
+ userId: string;
79
+
80
+ /**
81
+ * Owner's display name
82
+ */
83
+ displayName: string;
84
+
85
+ /**
86
+ * Owner's email
87
+ */
88
+ email: string;
89
+
90
+ /**
91
+ * Owner's phone numbers
92
+ */
93
+ phone: Phone[];
94
+
95
+ /**
96
+ * Owner's avatar
97
+ */
98
+ photo: File | null;
99
+
100
+ /**
101
+ * Owner's role
102
+ */
103
+ role: ROLE | null;
104
+ };
105
+
66
106
  /**
67
107
  * When this resource has been created
68
108
  */
@@ -340,6 +380,14 @@ export interface Enterprise extends Resource {
340
380
 
341
381
  notificationEstimation?: string[];
342
382
 
383
+ devisDocConfig: {
384
+ color: { label: DevisDocColorEnum; value: string }[];
385
+ sections: {
386
+ [key: DevisDocSectionEnum | string]: boolean;
387
+ };
388
+ presentation: string;
389
+ };
390
+
343
391
  /**
344
392
  * Computed subscription settings
345
393
  */
@@ -378,6 +426,9 @@ export interface Enterprise extends Resource {
378
426
 
379
427
  certificates: Certificate[];
380
428
 
429
+ /**
430
+ * Used to enabled or disable pluguins on the system
431
+ */
381
432
  pluginsConfig?: {
382
433
  visitReport?: boolean;
383
434
  };
@@ -386,9 +437,9 @@ export interface Enterprise extends Resource {
386
437
  * Used to save the last reference created for the two types of bills
387
438
  */
388
439
  billsReferences?: {
389
- bill: number,
390
- creditNote: number
391
- }
440
+ bill: number;
441
+ creditNote: number;
442
+ };
392
443
  }
393
444
 
394
445
  export type Certificate = { name: string; number: number };
@@ -733,15 +784,19 @@ export interface Commissions {
733
784
  /**
734
785
  * Percentage corresponding to the company
735
786
  */
736
- "enterprise": number;
787
+ enterprise: number;
737
788
  /**
738
789
  * Percentage corresponding to the pro
739
790
  */
740
- "pro": number;
791
+ pro: number;
741
792
  /**
742
793
  * Percentage corresponding to the provider
743
794
  */
744
- "provider": number;
795
+ provider: number;
796
+ /**
797
+ * Percentage corresponding to the client
798
+ */
799
+ client?: number;
745
800
  }
746
801
 
747
802
  /**
@@ -1143,18 +1198,19 @@ export interface VisitReport extends Resource {
1143
1198
  devisTypeDescription?: string;
1144
1199
 
1145
1200
  estimatedResult: {
1146
- power: number,
1147
- devis: string,
1148
- equipment: string,
1149
- equipmentSize: string,
1150
- helps: { name: string, value: number }[]
1201
+ power: number;
1202
+ m2Power: number;
1203
+ devis: string;
1204
+ equipment: string;
1205
+ equipmentSize: string;
1206
+ helps: { name: string; value: number }[];
1151
1207
  };
1152
1208
  customResult?: {
1153
- power: string,
1154
- devis: string,
1155
- equipment: string,
1156
- equipmentSize: string,
1157
- helps: { name: string, value: number }[]
1209
+ power: string;
1210
+ devis: string;
1211
+ equipment: string;
1212
+ equipmentSize: string;
1213
+ helps: { name: string; value: number }[];
1158
1214
  };
1159
1215
  title: string;
1160
1216
  status: VisitReportStatus;
@@ -1444,7 +1500,7 @@ export interface Material extends Resource {
1444
1500
  /**
1445
1501
  * Define if should be used to calculate devis prix
1446
1502
  */
1447
- include?: boolean
1503
+ include?: boolean;
1448
1504
  }
1449
1505
 
1450
1506
  export interface DevisMaterial extends Material {
@@ -1515,9 +1571,9 @@ export interface DevisMaterial extends Material {
1515
1571
 
1516
1572
  fixed?: boolean;
1517
1573
 
1518
- quantityConfig?: number
1574
+ quantityConfig?: number;
1519
1575
 
1520
- commissions?: Commissions
1576
+ commissions?: Commissions;
1521
1577
  }
1522
1578
 
1523
1579
  export interface Order extends Resource {
@@ -1568,7 +1624,13 @@ export interface DevisPiece extends Resource {
1568
1624
  */
1569
1625
  surfaces?: PieceSurfaces;
1570
1626
 
1571
- commissions?: Commissions
1627
+ commissions?: Commissions;
1628
+ }
1629
+
1630
+ export interface DevisOperationPiece {
1631
+ name: string;
1632
+ quantity: number;
1633
+ id: string
1572
1634
  }
1573
1635
 
1574
1636
  /**
@@ -1667,15 +1729,15 @@ export interface DevisOperation extends Resource {
1667
1729
 
1668
1730
  adjustments?: Array<OperationAdjustment>;
1669
1731
 
1670
- adjustmentComplement?: string
1732
+ adjustmentComplement?: string;
1671
1733
 
1672
- adjustmentsStatus?: boolean
1734
+ adjustmentsStatus?: boolean;
1673
1735
 
1674
- commissions?: Commissions
1736
+ commissions?: Commissions;
1675
1737
 
1676
1738
  responsible?: ItemResponsible;
1677
1739
 
1678
- barcode?: BarCode
1740
+ barcode?: BarCode;
1679
1741
  }
1680
1742
 
1681
1743
  /**
@@ -1804,7 +1866,7 @@ export interface Devis extends Resource {
1804
1866
  * used on accounting to display devis price block and dashboards
1805
1867
  */
1806
1868
  commissions?: {
1807
- [key: string]: { percent: number; value: number }
1869
+ [key: string]: { percent: number; value: number };
1808
1870
  };
1809
1871
 
1810
1872
  /**
@@ -1820,7 +1882,7 @@ export interface Devis extends Resource {
1820
1882
  /**
1821
1883
  * Payment planning (temporarily saved in the devis collection in Firestore)
1822
1884
  */
1823
- paymentPlanning?: { description: string; percent: number; }[];
1885
+ paymentPlanning?: { description: string; percent: number }[];
1824
1886
 
1825
1887
  /**
1826
1888
  * Allow user to add some additionals informations into the devis pdf depending on the section choose
@@ -1853,7 +1915,7 @@ export interface DocMetadataItem {
1853
1915
  export enum DevisCommissionsEntity {
1854
1916
  pro = 'pro',
1855
1917
  provider = 'provider',
1856
- enterprise = 'enterprise'
1918
+ enterprise = 'enterprise',
1857
1919
  }
1858
1920
 
1859
1921
  export enum DevisHistoryType {
@@ -1876,6 +1938,26 @@ export interface DevisHistoryItem {
1876
1938
  data: any;
1877
1939
  }
1878
1940
 
1941
+ export enum DevisDocSectionEnum {
1942
+ PRESENTATION = 'PRESENTATION',
1943
+ RESUME = 'RESUME',
1944
+ MATERIAL_IMAGE = 'MATERIAL_IMAGE',
1945
+ MATERIAL_FIXED = 'MATERIAL_FIXED',
1946
+ MATERIAL_VARIABLE = 'MATERIAL_VARIABLE',
1947
+ RENO_HELP = 'RENO_HELP',
1948
+ COMMENTS = 'COMMENTS',
1949
+ PAYMENTS_PLANNING = 'PAYMENTS_PLANNING',
1950
+ BANK_DETAILS = 'BANK_DETAILS',
1951
+ SIGNATURE_AREA = 'SIGNATURE_AREA',
1952
+ CGV = 'CGV',
1953
+ CERFA_CERTIFICATE = 'CERFA_CERTIFICATE',
1954
+ }
1955
+
1956
+ export enum DevisDocColorEnum {
1957
+ PRIMARY = 'PRIMARY',
1958
+ SECONDARY = 'SECONDARY',
1959
+ }
1960
+
1879
1961
  /**
1880
1962
  *
1881
1963
  */
@@ -1885,6 +1967,11 @@ export interface DevisTemplate extends Resource {
1885
1967
  */
1886
1968
  name: string;
1887
1969
 
1970
+ /**
1971
+ * The devis description
1972
+ */
1973
+ description?: string;
1974
+
1888
1975
  /**
1889
1976
  * Devis prices
1890
1977
  */
@@ -1924,6 +2011,8 @@ export interface DevisTemplate extends Resource {
1924
2011
  systemVersion?: number;
1925
2012
 
1926
2013
  format?: DevisFormatEnum;
2014
+
2015
+ category?: string
1927
2016
  }
1928
2017
 
1929
2018
  /**
@@ -2888,6 +2977,13 @@ export enum CategoryEntityEnum {
2888
2977
  OPERATION = 'OPERATION',
2889
2978
  RESOURCE_LIBRARY = 'RESOURCE_LIBRARY',
2890
2979
  IMAGE_LIBRARY = 'IMAGE_LIBRARY',
2980
+ DEVIS_TEMPLATE = 'DEVIS_TEMPLATE',
2981
+ }
2982
+
2983
+ export enum DevisTemplateCatProvider {
2984
+ BASIC = 'BASIC',
2985
+ ADVANCED_PIECE = 'ADVANCED_PIECE',
2986
+ ADVANCED_LOT = 'ADVANCED_LOT'
2891
2987
  }
2892
2988
 
2893
2989
  export interface OperationCatalog extends Resource {
@@ -3025,13 +3121,13 @@ export interface OperationV2 extends Resource {
3025
3121
 
3026
3122
  reserves?: string;
3027
3123
 
3028
- barcode?: BarCode
3124
+ barcode?: BarCode;
3029
3125
  }
3030
3126
 
3031
3127
  export type BarCode = {
3032
- value: string
3033
- format: BarCodeEnum
3034
- }
3128
+ value: string;
3129
+ format: BarCodeEnum;
3130
+ };
3035
3131
 
3036
3132
  export enum BarCodeEnum {
3037
3133
  CODE128 = 'code128',
@@ -3043,7 +3139,7 @@ export enum BarCodeEnum {
3043
3139
  CODE39 = 'code39',
3044
3140
  ITF14 = 'itf14',
3045
3141
  MSI = 'msi',
3046
- PHARMACODE = 'pharmacode'
3142
+ PHARMACODE = 'pharmacode',
3047
3143
  }
3048
3144
 
3049
3145
  export interface OperationAdjustment {
@@ -3076,7 +3172,7 @@ export interface OperationV2Material extends Material {
3076
3172
  responsible: ItemResponsible;
3077
3173
  fixed: boolean;
3078
3174
  optId: string;
3079
- complement?: string
3175
+ complement?: string;
3080
3176
  }
3081
3177
 
3082
3178
  export enum ItemResponsible {