@placeshakr/config 10.16.0-alpha.0 → 10.17.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/CHANGELOG.md +32 -0
- package/dist/config.cjs.development.js +73 -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 +73 -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 +130 -1
- 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 +175 -16
package/src/types.ts
CHANGED
|
@@ -42,7 +42,11 @@ export type ResourceType =
|
|
|
42
42
|
| UserNotification
|
|
43
43
|
| ReceptionVoucher
|
|
44
44
|
| Provider
|
|
45
|
-
| Category
|
|
45
|
+
| Category
|
|
46
|
+
| OperationCatalog
|
|
47
|
+
| Nomenclature
|
|
48
|
+
| Operation
|
|
49
|
+
| OperationV2
|
|
46
50
|
|
|
47
51
|
/**
|
|
48
52
|
* Add timestampable behavior to any resource
|
|
@@ -172,13 +176,13 @@ export interface Enterprise extends Resource {
|
|
|
172
176
|
* Current subscription status
|
|
173
177
|
*/
|
|
174
178
|
status:
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
179
|
+
| 'incomplete'
|
|
180
|
+
| 'incomplete_expired'
|
|
181
|
+
| 'trialing'
|
|
182
|
+
| 'active'
|
|
183
|
+
| 'past_due'
|
|
184
|
+
| 'canceled'
|
|
185
|
+
| 'unpaid';
|
|
182
186
|
|
|
183
187
|
/**
|
|
184
188
|
* Kind of forfait
|
|
@@ -264,13 +268,13 @@ export interface Enterprise extends Resource {
|
|
|
264
268
|
* state of subscription
|
|
265
269
|
*/
|
|
266
270
|
status:
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
271
|
+
| 'incomplete'
|
|
272
|
+
| 'incomplete_expired'
|
|
273
|
+
| 'trialing'
|
|
274
|
+
| 'active'
|
|
275
|
+
| 'past_due'
|
|
276
|
+
| 'canceled'
|
|
277
|
+
| 'unpaid';
|
|
274
278
|
};
|
|
275
279
|
|
|
276
280
|
insurance?: string;
|
|
@@ -2447,5 +2451,160 @@ export interface Category extends Resource {
|
|
|
2447
2451
|
|
|
2448
2452
|
export enum CategoryEntityEnum {
|
|
2449
2453
|
MATERIAL = 'MATERIAL',
|
|
2450
|
-
OPERATION = 'OPERATION'
|
|
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
|
|
2451
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",
|
|
2610
|
+
}
|