@placeshakr/config 10.15.0 → 10.16.1-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/CHANGELOG.md +35 -0
- package/dist/config.cjs.development.js +74 -13
- package/dist/config.cjs.development.js.map +1 -1
- package/dist/config.cjs.production.min.js +1 -1
- package/dist/config.cjs.production.min.js.map +1 -1
- package/dist/config.esm.js +74 -13
- package/dist/config.esm.js.map +1 -1
- package/dist/environment/base.d.ts.map +1 -1
- package/dist/environment/decorators.d.ts.map +1 -1
- package/dist/environment/types.d.ts +5 -3
- package/dist/environment/types.d.ts.map +1 -1
- package/dist/types.d.ts +144 -11
- package/dist/types.d.ts.map +1 -1
- package/package.json +2 -2
- package/src/environment/base.ts +27 -3
- package/src/environment/decorators.ts +12 -8
- package/src/environment/types.ts +6 -4
- package/src/types.ts +273 -110
package/src/types.ts
CHANGED
|
@@ -43,6 +43,10 @@ export type ResourceType =
|
|
|
43
43
|
| ReceptionVoucher
|
|
44
44
|
| Provider
|
|
45
45
|
| Category
|
|
46
|
+
| OperationCatalog
|
|
47
|
+
| Nomenclature
|
|
48
|
+
| Operation
|
|
49
|
+
| OperationV2
|
|
46
50
|
|
|
47
51
|
/**
|
|
48
52
|
* Add timestampable behavior to any resource
|
|
@@ -108,6 +112,11 @@ export interface Enterprise extends Resource {
|
|
|
108
112
|
*/
|
|
109
113
|
commercialName: string;
|
|
110
114
|
|
|
115
|
+
/**
|
|
116
|
+
* Display the company name next to the logo
|
|
117
|
+
*/
|
|
118
|
+
displayName: boolean;
|
|
119
|
+
|
|
111
120
|
/** The enterprise commercial status */
|
|
112
121
|
commercialStatus: CommercialStatusEnum;
|
|
113
122
|
|
|
@@ -310,7 +319,7 @@ export interface Enterprise extends Resource {
|
|
|
310
319
|
/**
|
|
311
320
|
* Geographical area covered, used in bills PDF data
|
|
312
321
|
*/
|
|
313
|
-
areaCovered?: string
|
|
322
|
+
areaCovered?: string;
|
|
314
323
|
}
|
|
315
324
|
|
|
316
325
|
/**
|
|
@@ -624,7 +633,7 @@ export interface Commissions {
|
|
|
624
633
|
* Percentage corresponding to the provider
|
|
625
634
|
*/
|
|
626
635
|
provider: number;
|
|
627
|
-
}
|
|
636
|
+
}
|
|
628
637
|
|
|
629
638
|
/**
|
|
630
639
|
* Represents an provider
|
|
@@ -727,18 +736,17 @@ export interface Status extends Resource {
|
|
|
727
736
|
/**
|
|
728
737
|
* Used to order status list
|
|
729
738
|
*/
|
|
730
|
-
order: number
|
|
739
|
+
order: number;
|
|
731
740
|
|
|
732
741
|
/**
|
|
733
742
|
* To know if status comes from system-status Algolia index and avoid delete or modify it
|
|
734
743
|
*/
|
|
735
|
-
system?: boolean
|
|
744
|
+
system?: boolean;
|
|
736
745
|
|
|
737
746
|
/**
|
|
738
747
|
* To know if status is fix in the position
|
|
739
748
|
*/
|
|
740
|
-
locked?: boolean
|
|
741
|
-
|
|
749
|
+
locked?: boolean;
|
|
742
750
|
|
|
743
751
|
/**
|
|
744
752
|
* Identifier to relate the status to its correspondent in system status algolia index
|
|
@@ -804,13 +812,13 @@ export interface Operation extends Resource {
|
|
|
804
812
|
* Used at the moment of copy catalogs from system-operations to the enterprise
|
|
805
813
|
* to create the relation between operations and system-operations-materials
|
|
806
814
|
*/
|
|
807
|
-
systemId?: string
|
|
815
|
+
systemId?: string;
|
|
808
816
|
|
|
809
817
|
/**
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
tva?: number | null
|
|
818
|
+
* by default this value will be null, at time to use this operation
|
|
819
|
+
* in devis will get tva from provider assigned to the project
|
|
820
|
+
*/
|
|
821
|
+
tva?: number | null;
|
|
814
822
|
}
|
|
815
823
|
|
|
816
824
|
/**
|
|
@@ -915,7 +923,7 @@ export interface Project extends Resource {
|
|
|
915
923
|
* Used when a bill is approved
|
|
916
924
|
* if is true project can't be removed
|
|
917
925
|
*/
|
|
918
|
-
blocked?: boolean
|
|
926
|
+
blocked?: boolean;
|
|
919
927
|
}
|
|
920
928
|
|
|
921
929
|
/**
|
|
@@ -947,7 +955,7 @@ export interface Media extends Resource {
|
|
|
947
955
|
/**
|
|
948
956
|
* When this resource has been created but onlu the date (not time)
|
|
949
957
|
*/
|
|
950
|
-
createdDate?: number
|
|
958
|
+
createdDate?: number;
|
|
951
959
|
/**
|
|
952
960
|
* The media name
|
|
953
961
|
*/
|
|
@@ -1044,9 +1052,9 @@ export interface Event extends Resource {
|
|
|
1044
1052
|
}
|
|
1045
1053
|
|
|
1046
1054
|
export interface PlanPage {
|
|
1047
|
-
fileId: string
|
|
1048
|
-
source: string
|
|
1049
|
-
id: string
|
|
1055
|
+
fileId: string;
|
|
1056
|
+
source: string;
|
|
1057
|
+
id: string;
|
|
1050
1058
|
}
|
|
1051
1059
|
|
|
1052
1060
|
/**
|
|
@@ -1057,13 +1065,13 @@ export interface Plan extends Resource {
|
|
|
1057
1065
|
description: string;
|
|
1058
1066
|
file: File;
|
|
1059
1067
|
files: File[];
|
|
1060
|
-
pages: PlanPage[]
|
|
1068
|
+
pages: PlanPage[];
|
|
1061
1069
|
elements: any[];
|
|
1062
1070
|
validation?: {
|
|
1063
|
-
userName: string
|
|
1064
|
-
date: number
|
|
1065
|
-
} | null
|
|
1066
|
-
updatedByUsers?: any
|
|
1071
|
+
userName: string;
|
|
1072
|
+
date: number;
|
|
1073
|
+
} | null;
|
|
1074
|
+
updatedByUsers?: any;
|
|
1067
1075
|
pdf?: File;
|
|
1068
1076
|
}
|
|
1069
1077
|
|
|
@@ -1171,9 +1179,9 @@ export interface Material extends Resource {
|
|
|
1171
1179
|
order?: number;
|
|
1172
1180
|
|
|
1173
1181
|
/**
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
|
|
1182
|
+
* by default this value will be null, at time to use this operation
|
|
1183
|
+
* in devis will get tva from operation
|
|
1184
|
+
*/
|
|
1177
1185
|
tva?: number | null;
|
|
1178
1186
|
|
|
1179
1187
|
/**
|
|
@@ -1194,7 +1202,7 @@ export interface Material extends Resource {
|
|
|
1194
1202
|
/**
|
|
1195
1203
|
* Custom reference defined by user
|
|
1196
1204
|
*/
|
|
1197
|
-
reference?: string
|
|
1205
|
+
reference?: string;
|
|
1198
1206
|
}
|
|
1199
1207
|
|
|
1200
1208
|
export interface DevisMaterial extends Material {
|
|
@@ -1250,7 +1258,7 @@ export interface DevisMaterial extends Material {
|
|
|
1250
1258
|
*/
|
|
1251
1259
|
devisId?: string;
|
|
1252
1260
|
|
|
1253
|
-
tva?: number
|
|
1261
|
+
tva?: number;
|
|
1254
1262
|
}
|
|
1255
1263
|
|
|
1256
1264
|
export interface Order extends Resource {
|
|
@@ -1437,29 +1445,29 @@ export interface Devis extends Resource {
|
|
|
1437
1445
|
/**
|
|
1438
1446
|
* Define which type of pdf will be created together with pro
|
|
1439
1447
|
*/
|
|
1440
|
-
contractingEntity?: DevisContractingEntity
|
|
1448
|
+
contractingEntity?: DevisContractingEntity;
|
|
1441
1449
|
|
|
1442
1450
|
/**
|
|
1443
1451
|
* Save the information of devis bill after apply any changes
|
|
1444
1452
|
*/
|
|
1445
1453
|
accounting?: {
|
|
1446
|
-
percent: number
|
|
1447
|
-
paid: number
|
|
1448
|
-
type?: BillIssuedType
|
|
1449
|
-
date?: Date
|
|
1450
|
-
}
|
|
1454
|
+
percent: number;
|
|
1455
|
+
paid: number;
|
|
1456
|
+
type?: BillIssuedType;
|
|
1457
|
+
date?: Date;
|
|
1458
|
+
};
|
|
1451
1459
|
/**
|
|
1452
1460
|
* Used on devis pdf and accounting
|
|
1453
1461
|
*/
|
|
1454
|
-
reference?: string
|
|
1462
|
+
reference?: string;
|
|
1455
1463
|
|
|
1456
1464
|
/**
|
|
1457
1465
|
* Used to copy commission values and TVA from provider when devis is created
|
|
1458
1466
|
* whit this is possible to change provider config values and don't affect devis already created
|
|
1459
1467
|
*/
|
|
1460
1468
|
providerData?: Commissions & {
|
|
1461
|
-
tva: number
|
|
1462
|
-
}
|
|
1469
|
+
tva: number;
|
|
1470
|
+
};
|
|
1463
1471
|
|
|
1464
1472
|
/**
|
|
1465
1473
|
* Save percent and its value assigned to each entity on devis after apply modifications
|
|
@@ -1467,10 +1475,10 @@ export interface Devis extends Resource {
|
|
|
1467
1475
|
* used on accounting to display devis price block and dashboards
|
|
1468
1476
|
*/
|
|
1469
1477
|
commissions?: {
|
|
1470
|
-
pro: { percent: number
|
|
1471
|
-
provider: { percent: number
|
|
1472
|
-
enterprise: { percent: number
|
|
1473
|
-
}
|
|
1478
|
+
pro: { percent: number; value: number };
|
|
1479
|
+
provider: { percent: number; value: number };
|
|
1480
|
+
enterprise: { percent: number; value: number };
|
|
1481
|
+
};
|
|
1474
1482
|
}
|
|
1475
1483
|
|
|
1476
1484
|
/**
|
|
@@ -1531,22 +1539,22 @@ export type Payment = Resource & {
|
|
|
1531
1539
|
};
|
|
1532
1540
|
|
|
1533
1541
|
/**
|
|
1534
|
-
* Used on accounting
|
|
1542
|
+
* Used on accounting
|
|
1535
1543
|
*/
|
|
1536
1544
|
|
|
1537
1545
|
export type DownPayment = Payment & {
|
|
1538
|
-
devisPrice: number
|
|
1539
|
-
devisTVA: number
|
|
1546
|
+
devisPrice: number;
|
|
1547
|
+
devisTVA: number;
|
|
1540
1548
|
bill?: {
|
|
1541
|
-
id: string
|
|
1542
|
-
date: Date
|
|
1543
|
-
price: number
|
|
1544
|
-
}
|
|
1549
|
+
id: string;
|
|
1550
|
+
date: Date;
|
|
1551
|
+
price: number;
|
|
1552
|
+
};
|
|
1545
1553
|
/**
|
|
1546
1554
|
* This will change to true if any custom bill is created on the devis related with it
|
|
1547
1555
|
*/
|
|
1548
|
-
locked?: boolean
|
|
1549
|
-
}
|
|
1556
|
+
locked?: boolean;
|
|
1557
|
+
};
|
|
1550
1558
|
|
|
1551
1559
|
export type BillElement = {
|
|
1552
1560
|
id: string;
|
|
@@ -1563,34 +1571,35 @@ export type BillElement = {
|
|
|
1563
1571
|
totalTTC: number;
|
|
1564
1572
|
isUpdated: boolean;
|
|
1565
1573
|
isInvoiced: boolean;
|
|
1566
|
-
devisId: string
|
|
1574
|
+
devisId: string;
|
|
1567
1575
|
};
|
|
1568
1576
|
|
|
1569
1577
|
export type EntityData = {
|
|
1570
|
-
name: string
|
|
1571
|
-
id?: string
|
|
1572
|
-
address?: string
|
|
1573
|
-
email?: string
|
|
1574
|
-
siret?: string
|
|
1575
|
-
tva?: string
|
|
1576
|
-
}
|
|
1578
|
+
name: string;
|
|
1579
|
+
id?: string;
|
|
1580
|
+
address?: string;
|
|
1581
|
+
email?: string;
|
|
1582
|
+
siret?: string;
|
|
1583
|
+
tva?: string;
|
|
1584
|
+
};
|
|
1577
1585
|
|
|
1578
1586
|
export type ReceptionVoucher = Resource & {
|
|
1579
|
-
status: ReceptionVoucherStatus
|
|
1580
|
-
title: string
|
|
1581
|
-
files: File[]
|
|
1582
|
-
statusComment?: string
|
|
1583
|
-
statusDate?: number
|
|
1584
|
-
}
|
|
1587
|
+
status: ReceptionVoucherStatus;
|
|
1588
|
+
title: string;
|
|
1589
|
+
files: File[];
|
|
1590
|
+
statusComment?: string;
|
|
1591
|
+
statusDate?: number;
|
|
1592
|
+
};
|
|
1585
1593
|
|
|
1586
1594
|
export type Bill = Resource & {
|
|
1587
1595
|
title: string;
|
|
1588
1596
|
projectId: string;
|
|
1589
1597
|
devisIds: Array<string>;
|
|
1590
|
-
date: number;
|
|
1598
|
+
date: number;
|
|
1599
|
+
providerCommission?: boolean;
|
|
1591
1600
|
reference?: string;
|
|
1592
1601
|
pdf?: File;
|
|
1593
|
-
entityData?: EntityData
|
|
1602
|
+
entityData?: EntityData;
|
|
1594
1603
|
statusDate?: number;
|
|
1595
1604
|
statusComment?: string;
|
|
1596
1605
|
statusHistory?: any;
|
|
@@ -1630,16 +1639,16 @@ export type BillIssued = Bill & {
|
|
|
1630
1639
|
downPaymentsIds?: Array<string>;
|
|
1631
1640
|
// used by subType CREDIT_NOTE to create the relation between bills
|
|
1632
1641
|
billSource?: {
|
|
1633
|
-
id: string
|
|
1634
|
-
reference: string
|
|
1642
|
+
id: string;
|
|
1643
|
+
reference: string;
|
|
1635
1644
|
status?: BillIssuedStatus;
|
|
1636
1645
|
};
|
|
1637
1646
|
// bills list of CREDIT_NOTE associated with this bill
|
|
1638
|
-
creditNotes?: Array<{ id: string
|
|
1647
|
+
creditNotes?: Array<{ id: string; reference: string }>;
|
|
1639
1648
|
// set the incremental number of bills on the enterprise
|
|
1640
1649
|
referenceNumber?: number;
|
|
1641
1650
|
// check if bill was imported from external documents or system
|
|
1642
|
-
imported?: boolean
|
|
1651
|
+
imported?: boolean;
|
|
1643
1652
|
dateSent?: number;
|
|
1644
1653
|
|
|
1645
1654
|
// prices related with the bill
|
|
@@ -1767,7 +1776,7 @@ export type File = {
|
|
|
1767
1776
|
format?: string;
|
|
1768
1777
|
|
|
1769
1778
|
/**
|
|
1770
|
-
*
|
|
1779
|
+
*
|
|
1771
1780
|
*/
|
|
1772
1781
|
resourceType?: string;
|
|
1773
1782
|
|
|
@@ -1788,8 +1797,8 @@ export type File = {
|
|
|
1788
1797
|
size?: string;
|
|
1789
1798
|
|
|
1790
1799
|
/**
|
|
1791
|
-
|
|
1792
|
-
|
|
1800
|
+
* The file name used to download files
|
|
1801
|
+
*/
|
|
1793
1802
|
name?: string;
|
|
1794
1803
|
|
|
1795
1804
|
/**
|
|
@@ -1828,7 +1837,7 @@ export interface UserNotification extends Resource {
|
|
|
1828
1837
|
totalUnread: number;
|
|
1829
1838
|
notifications: {
|
|
1830
1839
|
[key: string]: Notification;
|
|
1831
|
-
}
|
|
1840
|
+
};
|
|
1832
1841
|
}
|
|
1833
1842
|
|
|
1834
1843
|
export type SelectOption = { label: string; value: string };
|
|
@@ -1888,7 +1897,7 @@ export enum DevisViewMode {
|
|
|
1888
1897
|
HOME,
|
|
1889
1898
|
GENERAL,
|
|
1890
1899
|
PRO,
|
|
1891
|
-
CLIENT
|
|
1900
|
+
CLIENT,
|
|
1892
1901
|
}
|
|
1893
1902
|
|
|
1894
1903
|
export enum DocumentsTypeEnum {
|
|
@@ -1903,9 +1912,9 @@ export enum EventsTypeEnum {
|
|
|
1903
1912
|
VISIT = 'VISIT',
|
|
1904
1913
|
DELIVERY = 'DELIVERY',
|
|
1905
1914
|
CONSTRUCTION = 'CONSTRUCTION',
|
|
1906
|
-
SAV =
|
|
1907
|
-
TECHNICAL_STATEMENT =
|
|
1908
|
-
TS_DESIGN =
|
|
1915
|
+
SAV = 'SAV',
|
|
1916
|
+
TECHNICAL_STATEMENT = 'TECHNICAL_STATEMENT',
|
|
1917
|
+
TS_DESIGN = 'TS_DESIGN',
|
|
1909
1918
|
}
|
|
1910
1919
|
|
|
1911
1920
|
export enum ExternalPlanTypeEnum {
|
|
@@ -1918,7 +1927,7 @@ export enum BillIssuedStatus {
|
|
|
1918
1927
|
CREATED = 'CREATED',
|
|
1919
1928
|
SENT = 'SENT',
|
|
1920
1929
|
WAITING = 'WAITING',
|
|
1921
|
-
BLOCKED =
|
|
1930
|
+
BLOCKED = 'BLOCKED',
|
|
1922
1931
|
PAID = 'PAID',
|
|
1923
1932
|
CANCELED = 'CANCELED',
|
|
1924
1933
|
}
|
|
@@ -1933,7 +1942,7 @@ export enum BillReceivedStatus {
|
|
|
1933
1942
|
WITHOUT_INVOICE = 'WITHOUT_INVOICE',
|
|
1934
1943
|
PAID = 'PAID',
|
|
1935
1944
|
REFUSED = 'REFUSED',
|
|
1936
|
-
BLOCKED =
|
|
1945
|
+
BLOCKED = 'BLOCKED',
|
|
1937
1946
|
}
|
|
1938
1947
|
|
|
1939
1948
|
export enum ReceptionVoucherStatus {
|
|
@@ -1958,23 +1967,23 @@ export enum BillReceivedEntity {
|
|
|
1958
1967
|
|
|
1959
1968
|
export enum BillReceivedType {
|
|
1960
1969
|
FACTURE = 'FACTURE',
|
|
1961
|
-
CREDIT_NOTE = 'CREDIT_NOTE'
|
|
1970
|
+
CREDIT_NOTE = 'CREDIT_NOTE',
|
|
1962
1971
|
}
|
|
1963
1972
|
|
|
1964
1973
|
export enum BillIssuedEntity {
|
|
1965
1974
|
CLIENT = 'CLIENT',
|
|
1966
1975
|
PRO = 'PRO',
|
|
1967
1976
|
PROVIDER = 'PROVIDER',
|
|
1968
|
-
MATERIAL_PROVIDER =
|
|
1969
|
-
SERVICE_PROVIDER =
|
|
1970
|
-
OTHER =
|
|
1977
|
+
MATERIAL_PROVIDER = 'MATERIAL_PROVIDER',
|
|
1978
|
+
SERVICE_PROVIDER = 'SERVICE_PROVIDER',
|
|
1979
|
+
OTHER = 'OTHER',
|
|
1971
1980
|
}
|
|
1972
1981
|
|
|
1973
1982
|
export enum BillIssuedType {
|
|
1974
1983
|
CUSTOM = 'CUSTOM',
|
|
1975
1984
|
DOWN_PAYMENT = 'DOWN_PAYMENT',
|
|
1976
1985
|
BALANCE = 'BALANCE',
|
|
1977
|
-
CREDIT_NOTE =
|
|
1986
|
+
CREDIT_NOTE = 'CREDIT_NOTE',
|
|
1978
1987
|
}
|
|
1979
1988
|
|
|
1980
1989
|
export enum BillElementType {
|
|
@@ -1983,7 +1992,7 @@ export enum BillElementType {
|
|
|
1983
1992
|
DAYS = 'DAYS',
|
|
1984
1993
|
PRODUCT = 'PRODUCT',
|
|
1985
1994
|
SERVICE = 'SERVICE',
|
|
1986
|
-
PROVIDER_COMMISSION = 'PROVIDER_COMMISSION'
|
|
1995
|
+
PROVIDER_COMMISSION = 'PROVIDER_COMMISSION',
|
|
1987
1996
|
}
|
|
1988
1997
|
|
|
1989
1998
|
export enum BillDiscountType {
|
|
@@ -2019,7 +2028,7 @@ export enum ProjectCategoriesEnum {
|
|
|
2019
2028
|
WALL_COVERING = 'WALL_COVERING',
|
|
2020
2029
|
STAIRS = 'STAIRS',
|
|
2021
2030
|
OUTSIDE = 'OUTSIDE',
|
|
2022
|
-
COMMERCE =
|
|
2031
|
+
COMMERCE = 'COMMERCE',
|
|
2023
2032
|
}
|
|
2024
2033
|
|
|
2025
2034
|
export enum TaskStatus {
|
|
@@ -2308,8 +2317,8 @@ export interface Estimation extends Resource {
|
|
|
2308
2317
|
files?: Array<File>;
|
|
2309
2318
|
comment?: string;
|
|
2310
2319
|
/*
|
|
2311
|
-
|
|
2312
|
-
|
|
2320
|
+
* link to project if estimate generated one
|
|
2321
|
+
*/
|
|
2313
2322
|
projectId?: string;
|
|
2314
2323
|
}
|
|
2315
2324
|
|
|
@@ -2322,23 +2331,23 @@ export enum EmailTemplate {
|
|
|
2322
2331
|
CLIENT_ESTIMATION_WEBSITE = 'client-estimation-website',
|
|
2323
2332
|
CLIENT_ESTIMATION_ARTICHO = 'client-estimation-articho',
|
|
2324
2333
|
ENTERPRISE_ESTIMATION = 'enterprise-estimation',
|
|
2325
|
-
RESET_PASSWORD =
|
|
2326
|
-
WELCOME_TO_ENTERPRISE =
|
|
2327
|
-
WELCOME_TO_NEW_ENTERPRISE =
|
|
2328
|
-
NEW_ENTERPRISE =
|
|
2334
|
+
RESET_PASSWORD = 'reset-password',
|
|
2335
|
+
WELCOME_TO_ENTERPRISE = 'welcome-to-enterprise',
|
|
2336
|
+
WELCOME_TO_NEW_ENTERPRISE = 'welcome-to-new-enterprise',
|
|
2337
|
+
NEW_ENTERPRISE = 'new-enterprise',
|
|
2329
2338
|
USER_CONTACT = 'user-contact',
|
|
2330
|
-
PLAN = 'plan'
|
|
2339
|
+
PLAN = 'plan',
|
|
2331
2340
|
}
|
|
2332
2341
|
|
|
2333
2342
|
export enum DevisPdfType {
|
|
2334
2343
|
PROVIDER = 'provider',
|
|
2335
2344
|
PROFESSIONAL = 'professional',
|
|
2336
|
-
ENTERPRISE = 'enterprise'
|
|
2345
|
+
ENTERPRISE = 'enterprise',
|
|
2337
2346
|
}
|
|
2338
2347
|
|
|
2339
2348
|
export enum DevisContractingEntity {
|
|
2340
2349
|
PROVIDER = 'provider',
|
|
2341
|
-
ENTERPRISE = 'enterprise'
|
|
2350
|
+
ENTERPRISE = 'enterprise',
|
|
2342
2351
|
}
|
|
2343
2352
|
|
|
2344
2353
|
export enum EnterpriseStatusEnum {
|
|
@@ -2348,19 +2357,19 @@ export enum EnterpriseStatusEnum {
|
|
|
2348
2357
|
ACTIVE = 'active',
|
|
2349
2358
|
PAST_DUE = 'past_due',
|
|
2350
2359
|
CANCELED = 'canceled',
|
|
2351
|
-
UNPAID = 'unpaid'
|
|
2360
|
+
UNPAID = 'unpaid',
|
|
2352
2361
|
}
|
|
2353
2362
|
|
|
2354
2363
|
export enum EnterpriseProductEnum {
|
|
2355
2364
|
STANDARD = 'standard',
|
|
2356
2365
|
PLUS = 'plus',
|
|
2357
|
-
PREMIUM = 'premium'
|
|
2366
|
+
PREMIUM = 'premium',
|
|
2358
2367
|
}
|
|
2359
2368
|
|
|
2360
2369
|
export enum EstimationStatusEnum {
|
|
2361
2370
|
WAITING = 'WAITING',
|
|
2362
2371
|
APPROVED = 'APPROVED',
|
|
2363
|
-
REFUSED = 'REFUSED'
|
|
2372
|
+
REFUSED = 'REFUSED',
|
|
2364
2373
|
}
|
|
2365
2374
|
|
|
2366
2375
|
export enum HistoryActionEnum {
|
|
@@ -2373,13 +2382,13 @@ export enum HistoryActionEnum {
|
|
|
2373
2382
|
UNASSIGN_PRO = 'UNASSIGN_PRO',
|
|
2374
2383
|
ASSIGN_SELLER = 'ASSIGN_SELLER',
|
|
2375
2384
|
UNASSIGN_SELLER = 'UNASSIGN_SELLER',
|
|
2376
|
-
APPROVED_R_V = 'APPROVED_R_V'
|
|
2385
|
+
APPROVED_R_V = 'APPROVED_R_V',
|
|
2377
2386
|
}
|
|
2378
2387
|
|
|
2379
2388
|
export interface History {
|
|
2380
2389
|
/**
|
|
2381
|
-
|
|
2382
|
-
|
|
2390
|
+
* The internal ID of this resource
|
|
2391
|
+
*/
|
|
2383
2392
|
id?: string;
|
|
2384
2393
|
|
|
2385
2394
|
/**
|
|
@@ -2398,7 +2407,7 @@ export interface History {
|
|
|
2398
2407
|
export enum HistoryEntityType {
|
|
2399
2408
|
PROJECT = 'PROJECT',
|
|
2400
2409
|
NOTE = 'NOTE',
|
|
2401
|
-
RECEPTION_VOUCHER = 'RECEPTION_VOUCHER'
|
|
2410
|
+
RECEPTION_VOUCHER = 'RECEPTION_VOUCHER',
|
|
2402
2411
|
}
|
|
2403
2412
|
|
|
2404
2413
|
export interface HistoryAction {
|
|
@@ -2429,19 +2438,173 @@ export interface HistoryAction {
|
|
|
2429
2438
|
data?: any;
|
|
2430
2439
|
}
|
|
2431
2440
|
|
|
2432
|
-
|
|
2433
2441
|
export interface Category extends Resource {
|
|
2434
|
-
name: string
|
|
2442
|
+
name: string;
|
|
2435
2443
|
// with this field is possible to use categories in multiples area of the system and filter by it
|
|
2436
|
-
entity: CategoryEntityEnum
|
|
2437
|
-
order?: number
|
|
2438
|
-
description?: string
|
|
2439
|
-
parent?: string
|
|
2444
|
+
entity: CategoryEntityEnum;
|
|
2445
|
+
order?: number;
|
|
2446
|
+
description?: string;
|
|
2447
|
+
parent?: string;
|
|
2440
2448
|
// create the relation between materials providers or operations catalogues
|
|
2441
|
-
provider?: string
|
|
2449
|
+
provider?: string;
|
|
2442
2450
|
}
|
|
2443
2451
|
|
|
2444
2452
|
export enum CategoryEntityEnum {
|
|
2445
|
-
MATERIAL =
|
|
2446
|
-
OPERATION =
|
|
2453
|
+
MATERIAL = 'MATERIAL',
|
|
2454
|
+
OPERATION = 'OPERATION'
|
|
2455
|
+
}
|
|
2456
|
+
|
|
2457
|
+
export interface OperationCatalog extends Resource {
|
|
2458
|
+
name: string,
|
|
2459
|
+
status: boolean,
|
|
2460
|
+
sectors?: Array<{
|
|
2461
|
+
objectID: string,
|
|
2462
|
+
name: string,
|
|
2463
|
+
value: number
|
|
2464
|
+
}>;
|
|
2465
|
+
description?: string;
|
|
2466
|
+
materialsProvider?: Array<string>,
|
|
2467
|
+
image?: File | null
|
|
2468
|
+
}
|
|
2469
|
+
|
|
2470
|
+
export interface Nomenclature extends Resource {
|
|
2471
|
+
name: string,
|
|
2472
|
+
status: boolean,
|
|
2473
|
+
identifier: NomenclaturesIdentifier,
|
|
2474
|
+
color?: string
|
|
2475
|
+
}
|
|
2476
|
+
|
|
2477
|
+
export enum NomenclaturesIdentifier {
|
|
2478
|
+
OPERATIONS_SECTOR = "OPERATIONS_SECTOR",
|
|
2479
|
+
OPERATIONS_PIECE = "OPERATIONS_PIECE",
|
|
2480
|
+
OPERATIONS_LOT = "OPERATIONS_LOT",
|
|
2481
|
+
}
|
|
2482
|
+
|
|
2483
|
+
|
|
2484
|
+
/**
|
|
2485
|
+
* New version of operations with more advanced config
|
|
2486
|
+
*/
|
|
2487
|
+
export interface OperationV2 extends Resource {
|
|
2488
|
+
/**
|
|
2489
|
+
* The operation id
|
|
2490
|
+
*/
|
|
2491
|
+
objectID?: string;
|
|
2492
|
+
|
|
2493
|
+
/**
|
|
2494
|
+
* The operation name
|
|
2495
|
+
*/
|
|
2496
|
+
name: string;
|
|
2497
|
+
|
|
2498
|
+
/**
|
|
2499
|
+
* The operation surface
|
|
2500
|
+
*/
|
|
2501
|
+
lot: string;
|
|
2502
|
+
|
|
2503
|
+
/**
|
|
2504
|
+
* The operation unit price
|
|
2505
|
+
*/
|
|
2506
|
+
price: number;
|
|
2507
|
+
|
|
2508
|
+
/**
|
|
2509
|
+
* The operation unit
|
|
2510
|
+
*/
|
|
2511
|
+
unit: string;
|
|
2512
|
+
|
|
2513
|
+
/**
|
|
2514
|
+
* The operation description
|
|
2515
|
+
*/
|
|
2516
|
+
description?: string;
|
|
2517
|
+
|
|
2518
|
+
/**
|
|
2519
|
+
* The materials added by default to the operation
|
|
2520
|
+
*/
|
|
2521
|
+
materials?: Material[] | [];
|
|
2522
|
+
|
|
2523
|
+
/**
|
|
2524
|
+
* Number of materials assigned to the operation
|
|
2525
|
+
*/
|
|
2526
|
+
numberOfMaterials?: number;
|
|
2527
|
+
|
|
2528
|
+
/**
|
|
2529
|
+
* Used at the moment of copy catalogs from system-operations to the enterprise
|
|
2530
|
+
* to create the relation between operations and system-operations-materials
|
|
2531
|
+
*/
|
|
2532
|
+
systemId?: string
|
|
2533
|
+
|
|
2534
|
+
/**
|
|
2535
|
+
*
|
|
2536
|
+
*/
|
|
2537
|
+
tva?: number | null
|
|
2538
|
+
|
|
2539
|
+
/**
|
|
2540
|
+
* Used to create relation between operations and his catalog
|
|
2541
|
+
*/
|
|
2542
|
+
catalogId: string
|
|
2543
|
+
|
|
2544
|
+
/**
|
|
2545
|
+
* Used in operations page to assign categories
|
|
2546
|
+
*/
|
|
2547
|
+
category: string;
|
|
2548
|
+
|
|
2549
|
+
/**
|
|
2550
|
+
* Used to restrict modification in devis page
|
|
2551
|
+
*/
|
|
2552
|
+
blockPrice?: boolean;
|
|
2553
|
+
|
|
2554
|
+
/**
|
|
2555
|
+
* Used to restrict modification in devis page
|
|
2556
|
+
*/
|
|
2557
|
+
blockTVA?: boolean;
|
|
2558
|
+
|
|
2559
|
+
/**
|
|
2560
|
+
* Quantity
|
|
2561
|
+
*/
|
|
2562
|
+
quantity?: OperationQuantityEnum;
|
|
2563
|
+
|
|
2564
|
+
/**
|
|
2565
|
+
* List of rules used to re-calculate the price
|
|
2566
|
+
*/
|
|
2567
|
+
adjustments?: Array<OperationAdjustment>
|
|
2568
|
+
|
|
2569
|
+
reserves?: string
|
|
2570
|
+
}
|
|
2571
|
+
|
|
2572
|
+
export interface OperationAdjustment {
|
|
2573
|
+
rule: OperationRulesEnum
|
|
2574
|
+
bigger?: number
|
|
2575
|
+
lower?: number
|
|
2576
|
+
equal?: number
|
|
2577
|
+
complement?: string
|
|
2578
|
+
percent: number
|
|
2579
|
+
}
|
|
2580
|
+
|
|
2581
|
+
export enum OperationQuantityEnum {
|
|
2582
|
+
NOT_DEFINED = "NOT_DEFINED",
|
|
2583
|
+
PERIMETER = "PERIMETER",
|
|
2584
|
+
GROUND_CEILING_SURFACE = "GROUND_CEILING_SURFACE",
|
|
2585
|
+
WALL_SURFACE = "WALL_SURFACE",
|
|
2586
|
+
}
|
|
2587
|
+
|
|
2588
|
+
export enum OperationRulesEnum {
|
|
2589
|
+
BIGGER_THAN = "BIGGER_THAN",
|
|
2590
|
+
LOWER_THAN = "LOWER_THAN",
|
|
2591
|
+
EQUAL_TO = "EQUAL_TO",
|
|
2592
|
+
BETWEEN = "BETWEEN"
|
|
2593
|
+
}
|
|
2594
|
+
|
|
2595
|
+
export interface OperationV2Material extends Material {
|
|
2596
|
+
quantity: number
|
|
2597
|
+
loss: number
|
|
2598
|
+
rounded: boolean
|
|
2599
|
+
responsible: string
|
|
2600
|
+
fixed: boolean
|
|
2601
|
+
optId: string
|
|
2602
|
+
}
|
|
2603
|
+
|
|
2604
|
+
export enum MaterialResponsible {
|
|
2605
|
+
CLIENT = "CLIENT",
|
|
2606
|
+
PRO = "PRO",
|
|
2607
|
+
AGENT = "AGENT",
|
|
2608
|
+
SELLER = "SELLER",
|
|
2609
|
+
ENTERPRISE = "ENTERPRISE",
|
|
2447
2610
|
}
|