@placeshakr/config 10.14.1-alpha.1 → 10.16.0

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
@@ -42,7 +42,7 @@ export type ResourceType =
42
42
  | UserNotification
43
43
  | ReceptionVoucher
44
44
  | Provider
45
- | Category
45
+ | Category;
46
46
 
47
47
  /**
48
48
  * Add timestampable behavior to any resource
@@ -108,6 +108,11 @@ export interface Enterprise extends Resource {
108
108
  */
109
109
  commercialName: string;
110
110
 
111
+ /**
112
+ * Display the company name next to the logo
113
+ */
114
+ displayName: boolean;
115
+
111
116
  /** The enterprise commercial status */
112
117
  commercialStatus: CommercialStatusEnum;
113
118
 
@@ -167,13 +172,13 @@ export interface Enterprise extends Resource {
167
172
  * Current subscription status
168
173
  */
169
174
  status:
170
- | 'incomplete'
171
- | 'incomplete_expired'
172
- | 'trialing'
173
- | 'active'
174
- | 'past_due'
175
- | 'canceled'
176
- | 'unpaid';
175
+ | 'incomplete'
176
+ | 'incomplete_expired'
177
+ | 'trialing'
178
+ | 'active'
179
+ | 'past_due'
180
+ | 'canceled'
181
+ | 'unpaid';
177
182
 
178
183
  /**
179
184
  * Kind of forfait
@@ -259,13 +264,13 @@ export interface Enterprise extends Resource {
259
264
  * state of subscription
260
265
  */
261
266
  status:
262
- | 'incomplete'
263
- | 'incomplete_expired'
264
- | 'trialing'
265
- | 'active'
266
- | 'past_due'
267
- | 'canceled'
268
- | 'unpaid';
267
+ | 'incomplete'
268
+ | 'incomplete_expired'
269
+ | 'trialing'
270
+ | 'active'
271
+ | 'past_due'
272
+ | 'canceled'
273
+ | 'unpaid';
269
274
  };
270
275
 
271
276
  insurance?: string;
@@ -310,7 +315,7 @@ export interface Enterprise extends Resource {
310
315
  /**
311
316
  * Geographical area covered, used in bills PDF data
312
317
  */
313
- areaCovered?: string
318
+ areaCovered?: string;
314
319
  }
315
320
 
316
321
  /**
@@ -624,7 +629,7 @@ export interface Commissions {
624
629
  * Percentage corresponding to the provider
625
630
  */
626
631
  provider: number;
627
- };
632
+ }
628
633
 
629
634
  /**
630
635
  * Represents an provider
@@ -727,18 +732,17 @@ export interface Status extends Resource {
727
732
  /**
728
733
  * Used to order status list
729
734
  */
730
- order: number
735
+ order: number;
731
736
 
732
737
  /**
733
738
  * To know if status comes from system-status Algolia index and avoid delete or modify it
734
739
  */
735
- system?: boolean
740
+ system?: boolean;
736
741
 
737
742
  /**
738
743
  * To know if status is fix in the position
739
744
  */
740
- locked?: boolean
741
-
745
+ locked?: boolean;
742
746
 
743
747
  /**
744
748
  * Identifier to relate the status to its correspondent in system status algolia index
@@ -804,13 +808,13 @@ export interface Operation extends Resource {
804
808
  * Used at the moment of copy catalogs from system-operations to the enterprise
805
809
  * to create the relation between operations and system-operations-materials
806
810
  */
807
- systemId?: string
811
+ systemId?: string;
808
812
 
809
813
  /**
810
- * by default this value will be null, at time to use this operation
811
- * in devis will get tva from provider assigned to the project
812
- */
813
- tva?: number | null
814
+ * by default this value will be null, at time to use this operation
815
+ * in devis will get tva from provider assigned to the project
816
+ */
817
+ tva?: number | null;
814
818
  }
815
819
 
816
820
  /**
@@ -915,7 +919,7 @@ export interface Project extends Resource {
915
919
  * Used when a bill is approved
916
920
  * if is true project can't be removed
917
921
  */
918
- blocked?: boolean
922
+ blocked?: boolean;
919
923
  }
920
924
 
921
925
  /**
@@ -947,7 +951,7 @@ export interface Media extends Resource {
947
951
  /**
948
952
  * When this resource has been created but onlu the date (not time)
949
953
  */
950
- createdDate?: number
954
+ createdDate?: number;
951
955
  /**
952
956
  * The media name
953
957
  */
@@ -1044,9 +1048,9 @@ export interface Event extends Resource {
1044
1048
  }
1045
1049
 
1046
1050
  export interface PlanPage {
1047
- fileId: string,
1048
- source: string,
1049
- id: string
1051
+ fileId: string;
1052
+ source: string;
1053
+ id: string;
1050
1054
  }
1051
1055
 
1052
1056
  /**
@@ -1057,13 +1061,13 @@ export interface Plan extends Resource {
1057
1061
  description: string;
1058
1062
  file: File;
1059
1063
  files: File[];
1060
- pages: PlanPage[]
1064
+ pages: PlanPage[];
1061
1065
  elements: any[];
1062
1066
  validation?: {
1063
- userName: string
1064
- date: number
1065
- } | null
1066
- updatedByUsers?: any
1067
+ userName: string;
1068
+ date: number;
1069
+ } | null;
1070
+ updatedByUsers?: any;
1067
1071
  pdf?: File;
1068
1072
  }
1069
1073
 
@@ -1171,9 +1175,9 @@ export interface Material extends Resource {
1171
1175
  order?: number;
1172
1176
 
1173
1177
  /**
1174
- * by default this value will be null, at time to use this operation
1175
- * in devis will get tva from operation
1176
- */
1178
+ * by default this value will be null, at time to use this operation
1179
+ * in devis will get tva from operation
1180
+ */
1177
1181
  tva?: number | null;
1178
1182
 
1179
1183
  /**
@@ -1194,7 +1198,7 @@ export interface Material extends Resource {
1194
1198
  /**
1195
1199
  * Custom reference defined by user
1196
1200
  */
1197
- reference?: string
1201
+ reference?: string;
1198
1202
  }
1199
1203
 
1200
1204
  export interface DevisMaterial extends Material {
@@ -1250,7 +1254,7 @@ export interface DevisMaterial extends Material {
1250
1254
  */
1251
1255
  devisId?: string;
1252
1256
 
1253
- tva?: number
1257
+ tva?: number;
1254
1258
  }
1255
1259
 
1256
1260
  export interface Order extends Resource {
@@ -1437,29 +1441,29 @@ export interface Devis extends Resource {
1437
1441
  /**
1438
1442
  * Define which type of pdf will be created together with pro
1439
1443
  */
1440
- contractingEntity?: DevisContractingEntity
1444
+ contractingEntity?: DevisContractingEntity;
1441
1445
 
1442
1446
  /**
1443
1447
  * Save the information of devis bill after apply any changes
1444
1448
  */
1445
1449
  accounting?: {
1446
- percent: number
1447
- paid: number,
1448
- type?: BillIssuedType
1449
- date?: Date
1450
- }
1450
+ percent: number;
1451
+ paid: number;
1452
+ type?: BillIssuedType;
1453
+ date?: Date;
1454
+ };
1451
1455
  /**
1452
1456
  * Used on devis pdf and accounting
1453
1457
  */
1454
- reference?: string
1458
+ reference?: string;
1455
1459
 
1456
1460
  /**
1457
1461
  * Used to copy commission values and TVA from provider when devis is created
1458
1462
  * whit this is possible to change provider config values and don't affect devis already created
1459
1463
  */
1460
1464
  providerData?: Commissions & {
1461
- tva: number
1462
- }
1465
+ tva: number;
1466
+ };
1463
1467
 
1464
1468
  /**
1465
1469
  * Save percent and its value assigned to each entity on devis after apply modifications
@@ -1467,10 +1471,10 @@ export interface Devis extends Resource {
1467
1471
  * used on accounting to display devis price block and dashboards
1468
1472
  */
1469
1473
  commissions?: {
1470
- pro: { percent: number, value: number },
1471
- provider: { percent: number, value: number },
1472
- enterprise: { percent: number, value: number }
1473
- }
1474
+ pro: { percent: number; value: number };
1475
+ provider: { percent: number; value: number };
1476
+ enterprise: { percent: number; value: number };
1477
+ };
1474
1478
  }
1475
1479
 
1476
1480
  /**
@@ -1531,22 +1535,22 @@ export type Payment = Resource & {
1531
1535
  };
1532
1536
 
1533
1537
  /**
1534
- * Used on accounting
1538
+ * Used on accounting
1535
1539
  */
1536
1540
 
1537
1541
  export type DownPayment = Payment & {
1538
- devisPrice: number
1539
- devisTVA: number
1542
+ devisPrice: number;
1543
+ devisTVA: number;
1540
1544
  bill?: {
1541
- id: string,
1542
- date: Date,
1543
- price: number
1544
- }
1545
+ id: string;
1546
+ date: Date;
1547
+ price: number;
1548
+ };
1545
1549
  /**
1546
1550
  * This will change to true if any custom bill is created on the devis related with it
1547
1551
  */
1548
- locked?: boolean
1549
- }
1552
+ locked?: boolean;
1553
+ };
1550
1554
 
1551
1555
  export type BillElement = {
1552
1556
  id: string;
@@ -1563,34 +1567,35 @@ export type BillElement = {
1563
1567
  totalTTC: number;
1564
1568
  isUpdated: boolean;
1565
1569
  isInvoiced: boolean;
1566
- devisId: string
1570
+ devisId: string;
1567
1571
  };
1568
1572
 
1569
1573
  export type EntityData = {
1570
- name: string,
1571
- id?: string,
1572
- address?: string,
1573
- email?: string,
1574
- siret?: string,
1575
- tva?: string
1576
- }
1574
+ name: string;
1575
+ id?: string;
1576
+ address?: string;
1577
+ email?: string;
1578
+ siret?: string;
1579
+ tva?: string;
1580
+ };
1577
1581
 
1578
1582
  export type ReceptionVoucher = Resource & {
1579
- status: ReceptionVoucherStatus,
1580
- title: string,
1581
- files: File[],
1582
- statusComment?: string,
1583
- statusDate?: number
1584
- }
1583
+ status: ReceptionVoucherStatus;
1584
+ title: string;
1585
+ files: File[];
1586
+ statusComment?: string;
1587
+ statusDate?: number;
1588
+ };
1585
1589
 
1586
1590
  export type Bill = Resource & {
1587
1591
  title: string;
1588
1592
  projectId: string;
1589
1593
  devisIds: Array<string>;
1590
- date: number; providerCommission?: boolean;
1594
+ date: number;
1595
+ providerCommission?: boolean;
1591
1596
  reference?: string;
1592
1597
  pdf?: File;
1593
- entityData?: EntityData
1598
+ entityData?: EntityData;
1594
1599
  statusDate?: number;
1595
1600
  statusComment?: string;
1596
1601
  statusHistory?: any;
@@ -1630,16 +1635,16 @@ export type BillIssued = Bill & {
1630
1635
  downPaymentsIds?: Array<string>;
1631
1636
  // used by subType CREDIT_NOTE to create the relation between bills
1632
1637
  billSource?: {
1633
- id: string,
1634
- reference: string,
1638
+ id: string;
1639
+ reference: string;
1635
1640
  status?: BillIssuedStatus;
1636
1641
  };
1637
1642
  // bills list of CREDIT_NOTE associated with this bill
1638
- creditNotes?: Array<{ id: string, reference: string }>
1643
+ creditNotes?: Array<{ id: string; reference: string }>;
1639
1644
  // set the incremental number of bills on the enterprise
1640
1645
  referenceNumber?: number;
1641
1646
  // check if bill was imported from external documents or system
1642
- imported?: boolean
1647
+ imported?: boolean;
1643
1648
  dateSent?: number;
1644
1649
 
1645
1650
  // prices related with the bill
@@ -1767,7 +1772,7 @@ export type File = {
1767
1772
  format?: string;
1768
1773
 
1769
1774
  /**
1770
- *
1775
+ *
1771
1776
  */
1772
1777
  resourceType?: string;
1773
1778
 
@@ -1788,8 +1793,8 @@ export type File = {
1788
1793
  size?: string;
1789
1794
 
1790
1795
  /**
1791
- * The file name used to download files
1792
- */
1796
+ * The file name used to download files
1797
+ */
1793
1798
  name?: string;
1794
1799
 
1795
1800
  /**
@@ -1828,7 +1833,7 @@ export interface UserNotification extends Resource {
1828
1833
  totalUnread: number;
1829
1834
  notifications: {
1830
1835
  [key: string]: Notification;
1831
- }
1836
+ };
1832
1837
  }
1833
1838
 
1834
1839
  export type SelectOption = { label: string; value: string };
@@ -1888,7 +1893,7 @@ export enum DevisViewMode {
1888
1893
  HOME,
1889
1894
  GENERAL,
1890
1895
  PRO,
1891
- CLIENT
1896
+ CLIENT,
1892
1897
  }
1893
1898
 
1894
1899
  export enum DocumentsTypeEnum {
@@ -1903,9 +1908,9 @@ export enum EventsTypeEnum {
1903
1908
  VISIT = 'VISIT',
1904
1909
  DELIVERY = 'DELIVERY',
1905
1910
  CONSTRUCTION = 'CONSTRUCTION',
1906
- SAV = "SAV",
1907
- TECHNICAL_STATEMENT = "TECHNICAL_STATEMENT",
1908
- TS_DESIGN = "TS_DESIGN",
1911
+ SAV = 'SAV',
1912
+ TECHNICAL_STATEMENT = 'TECHNICAL_STATEMENT',
1913
+ TS_DESIGN = 'TS_DESIGN',
1909
1914
  }
1910
1915
 
1911
1916
  export enum ExternalPlanTypeEnum {
@@ -1918,7 +1923,7 @@ export enum BillIssuedStatus {
1918
1923
  CREATED = 'CREATED',
1919
1924
  SENT = 'SENT',
1920
1925
  WAITING = 'WAITING',
1921
- BLOCKED = "BLOCKED",
1926
+ BLOCKED = 'BLOCKED',
1922
1927
  PAID = 'PAID',
1923
1928
  CANCELED = 'CANCELED',
1924
1929
  }
@@ -1933,7 +1938,7 @@ export enum BillReceivedStatus {
1933
1938
  WITHOUT_INVOICE = 'WITHOUT_INVOICE',
1934
1939
  PAID = 'PAID',
1935
1940
  REFUSED = 'REFUSED',
1936
- BLOCKED = "BLOCKED"
1941
+ BLOCKED = 'BLOCKED',
1937
1942
  }
1938
1943
 
1939
1944
  export enum ReceptionVoucherStatus {
@@ -1958,23 +1963,23 @@ export enum BillReceivedEntity {
1958
1963
 
1959
1964
  export enum BillReceivedType {
1960
1965
  FACTURE = 'FACTURE',
1961
- CREDIT_NOTE = 'CREDIT_NOTE'
1966
+ CREDIT_NOTE = 'CREDIT_NOTE',
1962
1967
  }
1963
1968
 
1964
1969
  export enum BillIssuedEntity {
1965
1970
  CLIENT = 'CLIENT',
1966
1971
  PRO = 'PRO',
1967
1972
  PROVIDER = 'PROVIDER',
1968
- MATERIAL_PROVIDER = "MATERIAL_PROVIDER",
1969
- SERVICE_PROVIDER = "SERVICE_PROVIDER",
1970
- OTHER = "OTHER"
1973
+ MATERIAL_PROVIDER = 'MATERIAL_PROVIDER',
1974
+ SERVICE_PROVIDER = 'SERVICE_PROVIDER',
1975
+ OTHER = 'OTHER',
1971
1976
  }
1972
1977
 
1973
1978
  export enum BillIssuedType {
1974
1979
  CUSTOM = 'CUSTOM',
1975
1980
  DOWN_PAYMENT = 'DOWN_PAYMENT',
1976
1981
  BALANCE = 'BALANCE',
1977
- CREDIT_NOTE = "CREDIT_NOTE"
1982
+ CREDIT_NOTE = 'CREDIT_NOTE',
1978
1983
  }
1979
1984
 
1980
1985
  export enum BillElementType {
@@ -1983,7 +1988,7 @@ export enum BillElementType {
1983
1988
  DAYS = 'DAYS',
1984
1989
  PRODUCT = 'PRODUCT',
1985
1990
  SERVICE = 'SERVICE',
1986
- PROVIDER_COMMISSION = 'PROVIDER_COMMISSION'
1991
+ PROVIDER_COMMISSION = 'PROVIDER_COMMISSION',
1987
1992
  }
1988
1993
 
1989
1994
  export enum BillDiscountType {
@@ -2019,7 +2024,7 @@ export enum ProjectCategoriesEnum {
2019
2024
  WALL_COVERING = 'WALL_COVERING',
2020
2025
  STAIRS = 'STAIRS',
2021
2026
  OUTSIDE = 'OUTSIDE',
2022
- COMMERCE = "COMMERCE",
2027
+ COMMERCE = 'COMMERCE',
2023
2028
  }
2024
2029
 
2025
2030
  export enum TaskStatus {
@@ -2308,8 +2313,8 @@ export interface Estimation extends Resource {
2308
2313
  files?: Array<File>;
2309
2314
  comment?: string;
2310
2315
  /*
2311
- * link to project if estimate generated one
2312
- */
2316
+ * link to project if estimate generated one
2317
+ */
2313
2318
  projectId?: string;
2314
2319
  }
2315
2320
 
@@ -2322,23 +2327,23 @@ export enum EmailTemplate {
2322
2327
  CLIENT_ESTIMATION_WEBSITE = 'client-estimation-website',
2323
2328
  CLIENT_ESTIMATION_ARTICHO = 'client-estimation-articho',
2324
2329
  ENTERPRISE_ESTIMATION = 'enterprise-estimation',
2325
- RESET_PASSWORD = "reset-password",
2326
- WELCOME_TO_ENTERPRISE = "welcome-to-enterprise",
2327
- WELCOME_TO_NEW_ENTERPRISE = "welcome-to-new-enterprise",
2328
- NEW_ENTERPRISE = "new-enterprise",
2330
+ RESET_PASSWORD = 'reset-password',
2331
+ WELCOME_TO_ENTERPRISE = 'welcome-to-enterprise',
2332
+ WELCOME_TO_NEW_ENTERPRISE = 'welcome-to-new-enterprise',
2333
+ NEW_ENTERPRISE = 'new-enterprise',
2329
2334
  USER_CONTACT = 'user-contact',
2330
- PLAN = 'plan'
2335
+ PLAN = 'plan',
2331
2336
  }
2332
2337
 
2333
2338
  export enum DevisPdfType {
2334
2339
  PROVIDER = 'provider',
2335
2340
  PROFESSIONAL = 'professional',
2336
- ENTERPRISE = 'enterprise'
2341
+ ENTERPRISE = 'enterprise',
2337
2342
  }
2338
2343
 
2339
2344
  export enum DevisContractingEntity {
2340
2345
  PROVIDER = 'provider',
2341
- ENTERPRISE = 'enterprise'
2346
+ ENTERPRISE = 'enterprise',
2342
2347
  }
2343
2348
 
2344
2349
  export enum EnterpriseStatusEnum {
@@ -2348,19 +2353,19 @@ export enum EnterpriseStatusEnum {
2348
2353
  ACTIVE = 'active',
2349
2354
  PAST_DUE = 'past_due',
2350
2355
  CANCELED = 'canceled',
2351
- UNPAID = 'unpaid'
2356
+ UNPAID = 'unpaid',
2352
2357
  }
2353
2358
 
2354
2359
  export enum EnterpriseProductEnum {
2355
2360
  STANDARD = 'standard',
2356
2361
  PLUS = 'plus',
2357
- PREMIUM = 'premium'
2362
+ PREMIUM = 'premium',
2358
2363
  }
2359
2364
 
2360
2365
  export enum EstimationStatusEnum {
2361
2366
  WAITING = 'WAITING',
2362
2367
  APPROVED = 'APPROVED',
2363
- REFUSED = 'REFUSED'
2368
+ REFUSED = 'REFUSED',
2364
2369
  }
2365
2370
 
2366
2371
  export enum HistoryActionEnum {
@@ -2373,13 +2378,13 @@ export enum HistoryActionEnum {
2373
2378
  UNASSIGN_PRO = 'UNASSIGN_PRO',
2374
2379
  ASSIGN_SELLER = 'ASSIGN_SELLER',
2375
2380
  UNASSIGN_SELLER = 'UNASSIGN_SELLER',
2376
- APPROVED_R_V = 'APPROVED_R_V'
2381
+ APPROVED_R_V = 'APPROVED_R_V',
2377
2382
  }
2378
2383
 
2379
2384
  export interface History {
2380
2385
  /**
2381
- * The internal ID of this resource
2382
- */
2386
+ * The internal ID of this resource
2387
+ */
2383
2388
  id?: string;
2384
2389
 
2385
2390
  /**
@@ -2398,7 +2403,7 @@ export interface History {
2398
2403
  export enum HistoryEntityType {
2399
2404
  PROJECT = 'PROJECT',
2400
2405
  NOTE = 'NOTE',
2401
- RECEPTION_VOUCHER = 'RECEPTION_VOUCHER'
2406
+ RECEPTION_VOUCHER = 'RECEPTION_VOUCHER',
2402
2407
  }
2403
2408
 
2404
2409
  export interface HistoryAction {
@@ -2429,19 +2434,18 @@ export interface HistoryAction {
2429
2434
  data?: any;
2430
2435
  }
2431
2436
 
2432
-
2433
2437
  export interface Category extends Resource {
2434
- name: string,
2438
+ name: string;
2435
2439
  // 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,
2440
+ entity: CategoryEntityEnum;
2441
+ order?: number;
2442
+ description?: string;
2443
+ parent?: string;
2440
2444
  // create the relation between materials providers or operations catalogues
2441
- provider?: string
2445
+ provider?: string;
2442
2446
  }
2443
2447
 
2444
2448
  export enum CategoryEntityEnum {
2445
- MATERIAL = "MATERIAL",
2446
- OPERATION = "OPERATION"
2447
- }
2449
+ MATERIAL = 'MATERIAL',
2450
+ OPERATION = 'OPERATION',
2451
+ }