@placeshakr/config 10.19.0-alpha.5 → 10.19.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/dist/config.cjs.development.js +232 -73
- 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 +232 -73
- 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 +3 -0
- package/dist/environment/types.d.ts.map +1 -1
- package/dist/events/index.d.ts +1 -1
- package/dist/events/index.d.ts.map +1 -1
- package/dist/helpers/index.d.ts +3 -2
- package/dist/helpers/index.d.ts.map +1 -1
- package/dist/plans/base.d.ts.map +1 -1
- package/dist/plans/index.d.ts.map +1 -1
- package/dist/plans/types.d.ts +179 -3
- package/dist/plans/types.d.ts.map +1 -1
- package/dist/types.d.ts +57 -6
- package/dist/types.d.ts.map +1 -1
- package/package.json +9 -12
- package/src/environment/base.ts +19 -6
- package/src/environment/decorators.ts +3 -1
- package/src/environment/types.ts +4 -1
- package/src/helpers/index.ts +2 -0
- package/src/helpers/uid.ts +1 -1
- package/src/plans/base.ts +65 -38
- package/src/plans/index.ts +46 -20
- package/src/plans/types.ts +91 -3
- package/src/types.ts +127 -67
- package/CHANGELOG.md +0 -1949
package/src/types.ts
CHANGED
|
@@ -46,7 +46,7 @@ export type ResourceType =
|
|
|
46
46
|
| OperationCatalog
|
|
47
47
|
| Nomenclature
|
|
48
48
|
| Operation
|
|
49
|
-
| OperationV2
|
|
49
|
+
| OperationV2;
|
|
50
50
|
|
|
51
51
|
/**
|
|
52
52
|
* Add timestampable behavior to any resource
|
|
@@ -176,13 +176,13 @@ export interface Enterprise extends Resource {
|
|
|
176
176
|
* Current subscription status
|
|
177
177
|
*/
|
|
178
178
|
status:
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
179
|
+
| 'incomplete'
|
|
180
|
+
| 'incomplete_expired'
|
|
181
|
+
| 'trialing'
|
|
182
|
+
| 'active'
|
|
183
|
+
| 'past_due'
|
|
184
|
+
| 'canceled'
|
|
185
|
+
| 'unpaid';
|
|
186
186
|
|
|
187
187
|
/**
|
|
188
188
|
* Kind of forfait
|
|
@@ -235,6 +235,30 @@ export interface Enterprise extends Resource {
|
|
|
235
235
|
*/
|
|
236
236
|
totalUsers: number;
|
|
237
237
|
|
|
238
|
+
/**
|
|
239
|
+
* Number of admin users contained within the subscription. This number will be used to calculate
|
|
240
|
+
* the amount to pay for additional admin user
|
|
241
|
+
*/
|
|
242
|
+
totalAdminUsers: number;
|
|
243
|
+
|
|
244
|
+
/**
|
|
245
|
+
* Number of agent users contained within the subscription. This number will be used to calculate
|
|
246
|
+
* the amount to pay for additional agent user
|
|
247
|
+
*/
|
|
248
|
+
totalAgentUsers: number;
|
|
249
|
+
|
|
250
|
+
/**
|
|
251
|
+
* Number of pro users contained within the subscription. This number will be used to calculate
|
|
252
|
+
* the amount to pay for additional pro user
|
|
253
|
+
*/
|
|
254
|
+
totalProUsers: number;
|
|
255
|
+
|
|
256
|
+
/**
|
|
257
|
+
* Number of seller users contained within the subscription. This number will be used to calculate
|
|
258
|
+
* the amount to pay for additional seller user
|
|
259
|
+
*/
|
|
260
|
+
totalSellerUsers: number;
|
|
261
|
+
|
|
238
262
|
/**
|
|
239
263
|
* Account mode
|
|
240
264
|
*/
|
|
@@ -245,6 +269,26 @@ export interface Enterprise extends Resource {
|
|
|
245
269
|
*/
|
|
246
270
|
additionalUserPriceId?: string;
|
|
247
271
|
|
|
272
|
+
/**
|
|
273
|
+
*
|
|
274
|
+
*/
|
|
275
|
+
additionalAdminPlanId?: string | null;
|
|
276
|
+
|
|
277
|
+
/**
|
|
278
|
+
*
|
|
279
|
+
*/
|
|
280
|
+
additionalAgentPlanId?: string | null;
|
|
281
|
+
|
|
282
|
+
/**
|
|
283
|
+
*
|
|
284
|
+
*/
|
|
285
|
+
additionalProPlanId?: string | null;
|
|
286
|
+
|
|
287
|
+
/**
|
|
288
|
+
*
|
|
289
|
+
*/
|
|
290
|
+
additionalSellerPlanId?: string | null;
|
|
291
|
+
|
|
248
292
|
/**
|
|
249
293
|
* Subscription on stripe
|
|
250
294
|
*/
|
|
@@ -268,13 +312,13 @@ export interface Enterprise extends Resource {
|
|
|
268
312
|
* state of subscription
|
|
269
313
|
*/
|
|
270
314
|
status:
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
315
|
+
| 'incomplete'
|
|
316
|
+
| 'incomplete_expired'
|
|
317
|
+
| 'trialing'
|
|
318
|
+
| 'active'
|
|
319
|
+
| 'past_due'
|
|
320
|
+
| 'canceled'
|
|
321
|
+
| 'unpaid';
|
|
278
322
|
};
|
|
279
323
|
|
|
280
324
|
insurance?: string;
|
|
@@ -1431,9 +1475,9 @@ export interface Devis extends Resource {
|
|
|
1431
1475
|
* Information to save devis PDF
|
|
1432
1476
|
*/
|
|
1433
1477
|
pdf?: {
|
|
1434
|
-
[DevisPdfType.ENTERPRISE]?: File
|
|
1435
|
-
[DevisPdfType.PROFESSIONAL]?: File
|
|
1436
|
-
[DevisPdfType.PROVIDER]?: File
|
|
1478
|
+
[DevisPdfType.ENTERPRISE]?: File;
|
|
1479
|
+
[DevisPdfType.PROFESSIONAL]?: File;
|
|
1480
|
+
[DevisPdfType.PROVIDER]?: File;
|
|
1437
1481
|
};
|
|
1438
1482
|
|
|
1439
1483
|
/**
|
|
@@ -1670,6 +1714,8 @@ export type BillIssued = Bill & {
|
|
|
1670
1714
|
// this value is calculated using adjustments in each element
|
|
1671
1715
|
adjustments?: number;
|
|
1672
1716
|
};
|
|
1717
|
+
// used in balance bills to display elements grouped by tva and types (materials, operations)
|
|
1718
|
+
isGrouped?: boolean;
|
|
1673
1719
|
};
|
|
1674
1720
|
|
|
1675
1721
|
export type Price = {
|
|
@@ -1914,7 +1960,7 @@ export enum DocumentsTypeEnum {
|
|
|
1914
1960
|
}
|
|
1915
1961
|
|
|
1916
1962
|
export enum EventsTypeEnum {
|
|
1917
|
-
OTHER = '
|
|
1963
|
+
OTHER = 'AUTRE',
|
|
1918
1964
|
VISIT = 'VISIT',
|
|
1919
1965
|
DELIVERY = 'DELIVERY',
|
|
1920
1966
|
CONSTRUCTION = 'CONSTRUCTION',
|
|
@@ -2343,6 +2389,7 @@ export enum EmailTemplate {
|
|
|
2343
2389
|
NEW_ENTERPRISE = 'new-enterprise',
|
|
2344
2390
|
USER_CONTACT = 'user-contact',
|
|
2345
2391
|
PLAN = 'plan',
|
|
2392
|
+
BILL = 'bill',
|
|
2346
2393
|
}
|
|
2347
2394
|
|
|
2348
2395
|
export enum DevisPdfType {
|
|
@@ -2457,36 +2504,43 @@ export interface Category extends Resource {
|
|
|
2457
2504
|
|
|
2458
2505
|
export enum CategoryEntityEnum {
|
|
2459
2506
|
MATERIAL = 'MATERIAL',
|
|
2460
|
-
OPERATION = 'OPERATION'
|
|
2507
|
+
OPERATION = 'OPERATION',
|
|
2461
2508
|
}
|
|
2462
2509
|
|
|
2463
2510
|
export interface OperationCatalog extends Resource {
|
|
2464
|
-
name: string
|
|
2465
|
-
status: boolean
|
|
2511
|
+
name: string;
|
|
2512
|
+
status: boolean;
|
|
2466
2513
|
sectors?: Array<{
|
|
2467
|
-
objectID: string
|
|
2468
|
-
name: string
|
|
2469
|
-
value: number
|
|
2514
|
+
objectID: string;
|
|
2515
|
+
name: string;
|
|
2516
|
+
value: number;
|
|
2470
2517
|
}>;
|
|
2471
2518
|
description?: string;
|
|
2472
|
-
materialsProvider?: Array<string
|
|
2473
|
-
image?: File | null
|
|
2519
|
+
materialsProvider?: Array<string>;
|
|
2520
|
+
image?: File | null;
|
|
2474
2521
|
}
|
|
2475
2522
|
|
|
2476
2523
|
export interface Nomenclature extends Resource {
|
|
2477
|
-
|
|
2478
|
-
status: boolean
|
|
2479
|
-
identifier: NomenclaturesIdentifier
|
|
2480
|
-
color?: string
|
|
2524
|
+
value: any;
|
|
2525
|
+
status: boolean;
|
|
2526
|
+
identifier: NomenclaturesIdentifier;
|
|
2527
|
+
color?: string;
|
|
2528
|
+
file?: File;
|
|
2529
|
+
order?: number;
|
|
2530
|
+
activeForPro?: boolean;
|
|
2531
|
+
setProjectDate?: boolean;
|
|
2481
2532
|
}
|
|
2482
2533
|
|
|
2483
2534
|
export enum NomenclaturesIdentifier {
|
|
2484
|
-
OPERATIONS_SECTOR =
|
|
2485
|
-
OPERATIONS_PIECE =
|
|
2486
|
-
OPERATIONS_LOT =
|
|
2535
|
+
OPERATIONS_SECTOR = 'OPERATIONS_SECTOR',
|
|
2536
|
+
OPERATIONS_PIECE = 'OPERATIONS_PIECE',
|
|
2537
|
+
OPERATIONS_LOT = 'OPERATIONS_LOT',
|
|
2538
|
+
EVENTS_TYPES = 'EVENTS_TYPES',
|
|
2539
|
+
PROJECTS_CATEGORY = 'PROJECTS_CATEGORY',
|
|
2540
|
+
TVA = 'TVA',
|
|
2541
|
+
SUPPLIERS = 'SUPPLIERS',
|
|
2487
2542
|
}
|
|
2488
2543
|
|
|
2489
|
-
|
|
2490
2544
|
/**
|
|
2491
2545
|
* New version of operations with more advanced config
|
|
2492
2546
|
*/
|
|
@@ -2535,17 +2589,17 @@ export interface OperationV2 extends Resource {
|
|
|
2535
2589
|
* Used at the moment of copy catalogs from system-operations to the enterprise
|
|
2536
2590
|
* to create the relation between operations and system-operations-materials
|
|
2537
2591
|
*/
|
|
2538
|
-
systemId?: string
|
|
2592
|
+
systemId?: string;
|
|
2539
2593
|
|
|
2540
2594
|
/**
|
|
2541
|
-
|
|
2542
|
-
|
|
2543
|
-
tva?: number | null
|
|
2595
|
+
*
|
|
2596
|
+
*/
|
|
2597
|
+
tva?: number | null;
|
|
2544
2598
|
|
|
2545
2599
|
/**
|
|
2546
2600
|
* Used to create relation between operations and his catalog
|
|
2547
2601
|
*/
|
|
2548
|
-
catalogId: string
|
|
2602
|
+
catalogId: string;
|
|
2549
2603
|
|
|
2550
2604
|
/**
|
|
2551
2605
|
* Used in operations page to assign categories
|
|
@@ -2570,47 +2624,53 @@ export interface OperationV2 extends Resource {
|
|
|
2570
2624
|
/**
|
|
2571
2625
|
* List of rules used to re-calculate the price
|
|
2572
2626
|
*/
|
|
2573
|
-
adjustments?: Array<OperationAdjustment
|
|
2627
|
+
adjustments?: Array<OperationAdjustment>;
|
|
2574
2628
|
|
|
2575
|
-
reserves?: string
|
|
2629
|
+
reserves?: string;
|
|
2576
2630
|
}
|
|
2577
2631
|
|
|
2578
2632
|
export interface OperationAdjustment {
|
|
2579
|
-
rule: OperationRulesEnum
|
|
2580
|
-
bigger?: number
|
|
2581
|
-
lower?: number
|
|
2582
|
-
equal?: number
|
|
2583
|
-
complement?: string
|
|
2584
|
-
percent: number
|
|
2633
|
+
rule: OperationRulesEnum;
|
|
2634
|
+
bigger?: number;
|
|
2635
|
+
lower?: number;
|
|
2636
|
+
equal?: number;
|
|
2637
|
+
complement?: string;
|
|
2638
|
+
percent: number;
|
|
2585
2639
|
}
|
|
2586
2640
|
|
|
2587
2641
|
export enum OperationQuantityEnum {
|
|
2588
|
-
NOT_DEFINED =
|
|
2589
|
-
PERIMETER =
|
|
2590
|
-
GROUND_CEILING_SURFACE =
|
|
2591
|
-
WALL_SURFACE =
|
|
2642
|
+
NOT_DEFINED = 'NOT_DEFINED',
|
|
2643
|
+
PERIMETER = 'PERIMETER',
|
|
2644
|
+
GROUND_CEILING_SURFACE = 'GROUND_CEILING_SURFACE',
|
|
2645
|
+
WALL_SURFACE = 'WALL_SURFACE',
|
|
2592
2646
|
}
|
|
2593
2647
|
|
|
2594
2648
|
export enum OperationRulesEnum {
|
|
2595
|
-
BIGGER_THAN =
|
|
2596
|
-
LOWER_THAN =
|
|
2597
|
-
EQUAL_TO =
|
|
2598
|
-
BETWEEN =
|
|
2649
|
+
BIGGER_THAN = 'BIGGER_THAN',
|
|
2650
|
+
LOWER_THAN = 'LOWER_THAN',
|
|
2651
|
+
EQUAL_TO = 'EQUAL_TO',
|
|
2652
|
+
BETWEEN = 'BETWEEN',
|
|
2599
2653
|
}
|
|
2600
2654
|
|
|
2601
2655
|
export interface OperationV2Material extends Material {
|
|
2602
|
-
quantity: number
|
|
2603
|
-
loss: number
|
|
2604
|
-
rounded: boolean
|
|
2605
|
-
responsible: string
|
|
2606
|
-
fixed: boolean
|
|
2607
|
-
optId: string
|
|
2656
|
+
quantity: number;
|
|
2657
|
+
loss: number;
|
|
2658
|
+
rounded: boolean;
|
|
2659
|
+
responsible: string;
|
|
2660
|
+
fixed: boolean;
|
|
2661
|
+
optId: string;
|
|
2608
2662
|
}
|
|
2609
2663
|
|
|
2610
2664
|
export enum MaterialResponsible {
|
|
2611
|
-
CLIENT =
|
|
2612
|
-
PRO =
|
|
2613
|
-
AGENT =
|
|
2614
|
-
SELLER =
|
|
2615
|
-
ENTERPRISE =
|
|
2665
|
+
CLIENT = 'CLIENT',
|
|
2666
|
+
PRO = 'PRO',
|
|
2667
|
+
AGENT = 'AGENT',
|
|
2668
|
+
SELLER = 'SELLER',
|
|
2669
|
+
ENTERPRISE = 'ENTERPRISE',
|
|
2670
|
+
}
|
|
2671
|
+
|
|
2672
|
+
export enum ProjectPriceTypeEnum {
|
|
2673
|
+
accepted = 'accepted',
|
|
2674
|
+
prospected = 'prospected',
|
|
2675
|
+
rejected = 'rejected',
|
|
2616
2676
|
}
|