@placeshakr/config 10.19.0-alpha.6 → 10.19.6-alpha.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.
@@ -2,8 +2,6 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var reactI18next = require('react-i18next');
6
-
7
5
  (function (ROLE) {
8
6
  ROLE["CLIENT"] = "client";
9
7
  ROLE["SELLER"] = "seller";
@@ -160,7 +158,10 @@ var productionEnvironment = {
160
158
  histories: 'enterprises/{enterpriseId}/histories',
161
159
  receptionVouchers: 'enterprises/{enterpriseId}/projects/{projectId}/receptionVouchers',
162
160
  indexes: 'enterprises/{enterpriseId}/indexes',
163
- notifications: 'enterprises/{enterpriseId}/notifications'
161
+ notifications: 'enterprises/{enterpriseId}/notifications',
162
+ nomenclatures: 'enterprises/{enterpriseId}/nomenclatures',
163
+ operationsCatalogs: 'enterprises/{enterpriseId}/operationsCatalogs',
164
+ operationsGroups: 'enterprises/{enterpriseId}/operationsGroups'
164
165
  },
165
166
  docs: {
166
167
  user: 'users/{userId}',
@@ -201,7 +202,10 @@ var productionEnvironment = {
201
202
  userNotification: 'users/{userId}/profiles/{enterpriseId}/notifications/{notificationId}',
202
203
  history: 'enterprises/{enterpriseId}/histories/{historyId}',
203
204
  receptionVouchers: 'enterprises/{enterpriseId}/projects/{projectId}/receptionVouchers/{receptionVoucherId}',
204
- notification: 'enterprises/{enterpriseId}/notifications/{notificationId}'
205
+ notification: 'enterprises/{enterpriseId}/notifications/{notificationId}',
206
+ nomenclatures: 'enterprises/{enterpriseId}/nomenclatures/{nomenclatureId}',
207
+ operationsCatalogs: 'enterprises/{enterpriseId}/operationsCatalogs/{operationsCatalogId}',
208
+ operationsGroups: 'enterprises/{enterpriseId}/operationsGroups/{operationsGroupId}'
205
209
  },
206
210
  indexes: {
207
211
  users: 'users',
@@ -240,12 +244,14 @@ var productionEnvironment = {
240
244
  categories: 'categories',
241
245
  operationsCatalogs: 'operations-catalogs',
242
246
  nomenclatures: 'nomenclatures',
247
+ operationsGroups: 'operations-groups',
243
248
  // used only for managment
244
249
  systemMaterials: 'system-materials',
245
250
  systemOperations: 'system-operations',
246
251
  systemOperationsMaterials: 'system-operations-materials',
247
252
  systemMaterialsProvider: 'system-materials-provider',
248
253
  systemStatus: 'system-status',
254
+ systemNomenclatures: 'system-nomenclatures',
249
255
  systemCategories: 'system-categories'
250
256
  }
251
257
  },
@@ -312,14 +318,14 @@ var productionEnvironment = {
312
318
  },
313
319
  materials: {
314
320
  searchableAttributes: ['name', 'unitPrice', 'provider'],
315
- attributesForFaceting: ['unitPrice', 'searchable(scope)', 'searchable(provider)', 'searchable(category)'],
321
+ attributesForFaceting: ['unitPrice', 'searchable(scope)', 'searchable(provider)', 'searchable(category)', 'discount.id'],
316
322
  ranking: ['asc(name)'],
317
323
  maxValuesPerFacet: 1000,
318
324
  maxFacetHits: 100
319
325
  },
320
326
  operations: {
321
327
  searchableAttributes: ['name', 'unitPrice', 'objectID'],
322
- attributesForFaceting: ['searchable(pieces)', 'searchable(surface)', 'type', 'unitPrice', 'searchable(scope)', 'catalogId'],
328
+ attributesForFaceting: ['searchable(lot)', 'unitPrice', 'searchable(scope)', 'catalogId'],
323
329
  maxValuesPerFacet: 1000,
324
330
  maxFacetHits: 100
325
331
  },
@@ -360,7 +366,7 @@ var productionEnvironment = {
360
366
  },
361
367
  devis: {
362
368
  searchableAttributes: ['name', 'status'],
363
- attributesForFaceting: ['searchable(status)', 'projectId', 'searchable(scope)'],
369
+ attributesForFaceting: ['searchable(status)', 'operationsCatalog', 'projectId', 'searchable(scope)'],
364
370
  ranking: ['desc(dateApproved)', 'desc(status)', 'desc(updatedAt)'],
365
371
  maxValuesPerFacet: 1000,
366
372
  maxFacetHits: 100
@@ -441,7 +447,7 @@ var productionEnvironment = {
441
447
  },
442
448
  systemOperations: {
443
449
  searchableAttributes: ['name', 'unitPrice'],
444
- attributesForFaceting: ['searchable(pieces)', 'searchable(surface)', 'type', 'unitPrice'],
450
+ attributesForFaceting: ['searchable(lot)'],
445
451
  ranking: ['desc(updatedAt)'],
446
452
  maxValuesPerFacet: 1000,
447
453
  maxFacetHits: 100
@@ -467,6 +473,13 @@ var productionEnvironment = {
467
473
  maxValuesPerFacet: 1000,
468
474
  maxFacetHits: 100
469
475
  },
476
+ systemNomenclatures: {
477
+ searchableAttributes: ['identifier', 'value'],
478
+ attributesForFaceting: ['searchable(identifier)', 'searchable(status)'],
479
+ ranking: ['desc(updatedAt)'],
480
+ maxValuesPerFacet: 1000,
481
+ maxFacetHits: 100
482
+ },
470
483
  billing: {
471
484
  attributesForFaceting: ['searchable(scope)', 'customer', 'paid', 'searchable(status)'],
472
485
  maxValuesPerFacet: 1000,
@@ -474,7 +487,7 @@ var productionEnvironment = {
474
487
  },
475
488
  devisTemplates: {
476
489
  searchableAttributes: ['name'],
477
- attributesForFaceting: ['searchable(scope)', 'projectType', 'materialsProvider'],
490
+ attributesForFaceting: ['searchable(scope)', 'materialsProvider'],
478
491
  ranking: ['desc(updatedAt)'],
479
492
  maxValuesPerFacet: 1000,
480
493
  maxFacetHits: 100
@@ -514,8 +527,15 @@ var productionEnvironment = {
514
527
  maxFacetHits: 100
515
528
  },
516
529
  nomenclatures: {
517
- searchableAttributes: ['name'],
530
+ searchableAttributes: ['value'],
518
531
  attributesForFaceting: ['searchable(scope)', 'searchable(identifier)', 'searchable(status)'],
532
+ ranking: ['asc(value)'],
533
+ maxValuesPerFacet: 1000,
534
+ maxFacetHits: 100
535
+ },
536
+ operationsGroups: {
537
+ searchableAttributes: ['name'],
538
+ attributesForFaceting: ['searchable(scope)', 'searchable(status)', 'searchable(operationsCatalog)'],
519
539
  ranking: ['asc(name)'],
520
540
  maxValuesPerFacet: 1000,
521
541
  maxFacetHits: 100
@@ -595,12 +615,14 @@ var test = function test(base) {
595
615
  receptionVouchers: 'emulator-projects-reception-vouchers',
596
616
  operationsCatalogs: 'operations-catalogs',
597
617
  nomenclatures: 'nomenclatures',
618
+ operationsGroups: 'operations-groups',
598
619
  // used only for managment
599
620
  systemMaterials: 'system-materials',
600
621
  systemOperations: 'system-operations',
601
622
  systemOperationsMaterials: 'system-operations-materials',
602
623
  systemMaterialsProvider: 'system-materials-provider',
603
624
  systemStatus: 'test-system-status',
625
+ systemNomenclatures: 'test-system-nomenclatures',
604
626
  systemCategories: 'system-categories'
605
627
  }
606
628
  }),
@@ -649,12 +671,14 @@ var emulator = function emulator(base) {
649
671
  receptionVouchers: 'emulator-projects-reception-vouchers',
650
672
  operationsCatalogs: 'operations-catalogs',
651
673
  nomenclatures: 'nomenclatures',
674
+ operationsGroups: 'operations-groups',
652
675
  // used only for managment
653
676
  systemMaterials: 'system-materials',
654
677
  systemOperations: 'system-operations',
655
678
  systemOperationsMaterials: 'system-operations-materials',
656
679
  systemMaterialsProvider: 'system-materials-provider',
657
680
  systemStatus: 'emulator-system-status',
681
+ systemNomenclatures: 'emulator-system-nomenclatures',
658
682
  systemCategories: 'system-categories'
659
683
  }
660
684
  }),
@@ -705,9 +729,9 @@ var getEnv = function getEnv(envName) {
705
729
  var FactoryCreateFunction = function FactoryCreateFunction() {
706
730
  return {
707
731
  create: function create(id, data) {
708
- return _extends({}, (data === null || data === void 0 ? void 0 : data.createdAt) || (data === null || data === void 0 ? void 0 : data.updatedAt) ? {} : {
732
+ return _extends({}, data != null && data.createdAt || data != null && data.updatedAt ? {} : {
709
733
  createdAt: Date.now()
710
- }, (data === null || data === void 0 ? void 0 : data.updatedAt) ? {} : {
734
+ }, data != null && data.updatedAt ? {} : {
711
735
  updatedAt: Date.now()
712
736
  }, {
713
737
  objectID: id,
@@ -745,7 +769,10 @@ var helpers = {
745
769
  invitations: /*#__PURE__*/FactoryCreateFunction(),
746
770
  downPayment: /*#__PURE__*/FactoryCreateFunction(),
747
771
  histories: /*#__PURE__*/FactoryCreateFunction(),
748
- receptionVoucher: /*#__PURE__*/FactoryCreateFunction()
772
+ receptionVoucher: /*#__PURE__*/FactoryCreateFunction(),
773
+ nomenclatures: /*#__PURE__*/FactoryCreateFunction(),
774
+ operationsCatalog: /*#__PURE__*/FactoryCreateFunction(),
775
+ operationsGroups: /*#__PURE__*/FactoryCreateFunction()
749
776
  };
750
777
 
751
778
  /**
@@ -802,13 +829,13 @@ var uid = {
802
829
  // last push, use the same random number,
803
830
  // except incremented by 1.
804
831
  else {
805
- for (i = 11; i >= 0 && lastRandChars[i] === 61; i--) {
806
- lastRandChars[i] = 0;
807
- }
808
-
809
- lastRandChars[i]++;
832
+ for (i = 11; i >= 0 && lastRandChars[i] === 61; i--) {
833
+ lastRandChars[i] = 0;
810
834
  }
811
835
 
836
+ lastRandChars[i]++;
837
+ }
838
+
812
839
  for (i = 0; i < 12; i++) {
813
840
  id += ASCII_CHARS.charAt(lastRandChars[i]);
814
841
  }
@@ -825,7 +852,7 @@ var uid = {
825
852
  timestamp: /*#__PURE__*/function () {
826
853
  return function (id, asDate) {
827
854
  var time = 0;
828
- var data = id.substr(0, 8);
855
+ var data = id.substring(0, 8);
829
856
 
830
857
  for (var i = 0; i < 8; i++) {
831
858
  time = time * 62 + ASCII_CHARS.indexOf(data[i]);
@@ -891,90 +918,273 @@ var getPath = function getPath(path, params) {
891
918
  * @param envName
892
919
  * @param params
893
920
  */
894
-
895
921
  var createProducts = function createProducts(params) {
896
- var _useTranslation = reactI18next.useTranslation('homepage', {
897
- useSuspense: false
898
- }),
899
- t = _useTranslation.t;
900
-
901
922
  var products = {
902
923
  standard: {
903
924
  id: params.standard.id,
904
925
  internal: 'standard',
905
926
  product: {
906
- price: 6900,
907
- active: true,
908
- description: t('homepage-card-standard-text'),
909
- id: params.plus.id,
910
- name: t('homepage-card-standard-title'),
927
+ id: params.standard.id,
928
+ name: 'Standard',
929
+ description: 'Pour les entreprises unipersonnelles',
911
930
  type: 'service',
931
+ price: 69,
912
932
  main: true,
933
+ active: true,
934
+ isPrivate: true,
913
935
  rating: 1,
914
936
  order: 1,
915
937
  includes: {
916
- canCreateUser: false,
917
- maxTeamMembers: 1,
918
- accounting: true
938
+ maxAdminUsers: null,
939
+ maxAgentUsers: null,
940
+ maxProUsers: null,
941
+ maxSellerUsers: null,
942
+ authorizationManagement: true,
943
+ dashboard: true,
944
+ accounting: true,
945
+ projectStorage: true,
946
+ customCatalog: true,
947
+ customConfig: true,
948
+ exportReports: true,
949
+ externalApiIntegration: true,
950
+ support: true
919
951
  },
920
- plans: [params.standard.prices.monthly],
952
+ plans: Object.values(params.standard.tariffs).map(function (t) {
953
+ return t.id;
954
+ }),
921
955
  tax_rates: params.standard.tax_rates
922
956
  },
923
- additionalUser: params.standard.prices.additionalUser,
924
- additionalUserPrice: params.standard.additionalUserPrice
957
+ tariffs: params.standard.tariffs // additionalUser: params.standard.prices.additionalUser,
958
+ // additionalUserPrice: params.standard.additionalUserPrice,
959
+
925
960
  },
926
961
  plus: {
927
962
  id: params.plus.id,
928
963
  internal: 'plus',
929
964
  product: {
930
- active: true,
931
- description: t('homepage-card-plus-text'),
932
965
  id: params.plus.id,
933
- name: t('homepage-card-plus-title'),
966
+ name: 'Plus',
967
+ description: 'Idéal pour les agences et les entreprises de plus grande taille',
934
968
  type: 'service',
969
+ price: 159,
970
+ main: true,
971
+ active: true,
972
+ isPrivate: true,
935
973
  rating: 2,
974
+ order: 2,
975
+ includes: {
976
+ maxAdminUsers: null,
977
+ maxAgentUsers: null,
978
+ maxProUsers: null,
979
+ maxSellerUsers: null,
980
+ authorizationManagement: true,
981
+ dashboard: true,
982
+ accounting: true,
983
+ projectStorage: true,
984
+ customCatalog: true,
985
+ customConfig: true,
986
+ exportReports: true,
987
+ externalApiIntegration: true,
988
+ support: true
989
+ },
990
+ plans: Object.values(params.plus.tariffs).map(function (t) {
991
+ return t.id;
992
+ }),
993
+ tax_rates: params.plus.tax_rates
994
+ },
995
+ tariffs: params.plus.tariffs // additionalUser: params.plus.prices.additionalUser,
996
+ // additionalUserPrice: params.plus.additionalUserPrice,
997
+
998
+ },
999
+ classic: {
1000
+ id: params.classic.id,
1001
+ internal: 'classic',
1002
+ product: {
1003
+ id: params.classic.id,
1004
+ name: 'Abonnement Articho',
1005
+ description: '',
1006
+ type: 'service',
1007
+ price: 159,
936
1008
  main: true,
937
- price: 15900,
1009
+ active: true,
1010
+ isPrivate: true,
1011
+ rating: 3,
938
1012
  order: 3,
939
1013
  includes: {
940
- canCreateUser: true,
941
- maxTeamMembers: 10,
942
- importExport: true,
943
- accounting: true
1014
+ maxAdminUsers: 1,
1015
+ maxAgentUsers: 0,
1016
+ maxProUsers: 0,
1017
+ maxSellerUsers: 0,
1018
+ authorizationManagement: true,
1019
+ dashboard: true,
1020
+ accounting: true,
1021
+ projectStorage: true,
1022
+ customCatalog: true,
1023
+ customConfig: true,
1024
+ exportReports: true,
1025
+ externalApiIntegration: true,
1026
+ support: true
944
1027
  },
945
- tax_rates: params.plus.tax_rates,
946
- plans: [params.plus.prices.monthly]
1028
+ plans: Object.values(params.classic.tariffs).map(function (t) {
1029
+ return t.id;
1030
+ }),
1031
+ tax_rates: params.classic.tax_rates
947
1032
  },
948
- additionalUser: params.plus.prices.additionalUser,
949
- additionalUserPrice: params.plus.additionalUserPrice
1033
+ tariffs: params.classic.tariffs // additionalUser: params.classic.prices.additionalUser,
1034
+ // additionalUserPrice: params.classic.additionalUserPrice,
1035
+
950
1036
  },
951
- premium: {
952
- id: params.premium.id,
953
- internal: 'premium',
1037
+ test_1: {
1038
+ id: params.test_1.id,
1039
+ internal: 'test_1',
954
1040
  product: {
1041
+ id: params.test_1.id,
1042
+ name: 'Test 1',
1043
+ description: '',
1044
+ type: 'service',
1045
+ price: 50,
1046
+ main: true,
955
1047
  active: true,
956
- description: t('homepage-card-premium-title'),
957
- id: params.premium.id,
958
- name: t('homepage-card-premium-text'),
1048
+ isPrivate: false,
1049
+ rating: 1,
1050
+ order: 4,
1051
+ includes: {
1052
+ maxAdminUsers: 1,
1053
+ maxAgentUsers: 0,
1054
+ maxProUsers: 0,
1055
+ maxSellerUsers: 0,
1056
+ authorizationManagement: true,
1057
+ dashboard: true,
1058
+ accounting: true,
1059
+ projectStorage: true,
1060
+ customCatalog: true,
1061
+ customConfig: true,
1062
+ exportReports: true,
1063
+ externalApiIntegration: true,
1064
+ support: true
1065
+ },
1066
+ plans: Object.values(params.test_1.tariffs).map(function (t) {
1067
+ return t.id;
1068
+ }),
1069
+ tax_rates: params.test_1.tax_rates
1070
+ },
1071
+ tariffs: params.test_1.tariffs // additionalUser: params.test_1.prices.additionalUser,
1072
+ // additionalUserPrice: params.test_1.additionalUserPrice,
1073
+
1074
+ },
1075
+ test_2: {
1076
+ id: params.test_2.id,
1077
+ internal: 'test_2',
1078
+ product: {
1079
+ id: params.test_2.id,
1080
+ name: 'Test 2',
1081
+ description: '',
959
1082
  type: 'service',
960
- isDefault: true,
1083
+ price: 100,
961
1084
  main: true,
1085
+ active: true,
1086
+ isPrivate: false,
1087
+ rating: 2,
1088
+ order: 5,
1089
+ includes: {
1090
+ maxAdminUsers: 1,
1091
+ maxAgentUsers: 0,
1092
+ maxProUsers: 0,
1093
+ maxSellerUsers: 0,
1094
+ authorizationManagement: true,
1095
+ dashboard: true,
1096
+ accounting: true,
1097
+ projectStorage: true,
1098
+ customCatalog: true,
1099
+ customConfig: true,
1100
+ exportReports: true,
1101
+ externalApiIntegration: true,
1102
+ support: true
1103
+ },
1104
+ plans: Object.values(params.test_2.tariffs).map(function (t) {
1105
+ return t.id;
1106
+ }),
1107
+ tax_rates: params.test_2.tax_rates
1108
+ },
1109
+ tariffs: params.test_2.tariffs // additionalUser: params.test_2.prices.additionalUser,
1110
+ // additionalUserPrice: params.test_2.additionalUserPrice,
1111
+
1112
+ },
1113
+ test_3: {
1114
+ id: params.test_3.id,
1115
+ internal: 'test_3',
1116
+ product: {
1117
+ id: params.test_3.id,
1118
+ name: 'Test 3',
1119
+ description: '',
1120
+ type: 'service',
1121
+ price: 80,
1122
+ main: true,
1123
+ active: true,
1124
+ isPrivate: false,
962
1125
  rating: 3,
963
- tax_rates: params.premium.tax_rates,
964
- price: 29900,
965
- order: 2,
1126
+ order: 6,
966
1127
  includes: {
967
- canCreateUser: true,
1128
+ maxAdminUsers: null,
1129
+ maxAgentUsers: null,
1130
+ maxProUsers: null,
1131
+ maxSellerUsers: null,
1132
+ authorizationManagement: true,
1133
+ dashboard: true,
1134
+ accounting: true,
1135
+ projectStorage: true,
968
1136
  customCatalog: true,
969
- maxTeamMembers: 20,
970
- importExport: true,
1137
+ customConfig: true,
1138
+ exportReports: true,
1139
+ externalApiIntegration: true,
1140
+ support: true
1141
+ },
1142
+ plans: Object.values(params.test_3.tariffs).map(function (t) {
1143
+ return t.id;
1144
+ }),
1145
+ tax_rates: params.test_3.tax_rates
1146
+ },
1147
+ tariffs: params.test_3.tariffs // additionalUser: params.test_3.prices.additionalUser,
1148
+ // additionalUserPrice: params.test_3.additionalUserPrice,
1149
+
1150
+ },
1151
+ test_4: {
1152
+ id: params.test_4.id,
1153
+ internal: 'test_4',
1154
+ product: {
1155
+ id: params.test_4.id,
1156
+ name: 'Test 4',
1157
+ description: '',
1158
+ type: 'service',
1159
+ price: 65,
1160
+ main: true,
1161
+ active: true,
1162
+ isPrivate: false,
1163
+ rating: 3,
1164
+ order: 7,
1165
+ includes: {
1166
+ maxAdminUsers: 3,
1167
+ maxAgentUsers: 3,
1168
+ maxProUsers: 3,
1169
+ maxSellerUsers: 3,
1170
+ authorizationManagement: true,
1171
+ dashboard: true,
971
1172
  accounting: true,
972
- clientInterface: true
1173
+ projectStorage: true,
1174
+ customCatalog: true,
1175
+ customConfig: true,
1176
+ exportReports: true,
1177
+ externalApiIntegration: true,
1178
+ support: true
973
1179
  },
974
- plans: [params.premium.prices.monthly]
1180
+ plans: Object.values(params.test_4.tariffs).map(function (t) {
1181
+ return t.id;
1182
+ }),
1183
+ tax_rates: params.test_4.tax_rates
975
1184
  },
976
- additionalUser: params.plus.prices.additionalUser,
977
- additionalUserPrice: params.premium.additionalUserPrice
1185
+ tariffs: params.test_4.tariffs // additionalUser: params.test_4.prices.additionalUser,
1186
+ // additionalUserPrice: params.test_4.additionalUserPrice,
1187
+
978
1188
  }
979
1189
  };
980
1190
  return products;
@@ -982,60 +1192,436 @@ var createProducts = function createProducts(params) {
982
1192
 
983
1193
  var testing = {
984
1194
  standard: {
985
- id: 'prod_HzWVSbBrLFn02Y',
1195
+ id: 'prod_KzmEyS3UQ5lbnz',
986
1196
  tax_rates: ['txr_1HPXZVLFzcsAA7x6w0zpHu01'],
987
- prices: {
988
- monthly: 'price_1HPXSXLFzcsAA7x67BcgPhLS',
989
- additionalUser: 'price_1HRPbYLFzcsAA7x6FTmLOIGj'
990
- },
991
- additionalUserPrice: 1000
1197
+ tariffs: {
1198
+ base: {
1199
+ id: 'price_1KJmg4LFzcsAA7x6SMfj1iDu',
1200
+ price: 69,
1201
+ usageType: 'licensed',
1202
+ type: 'base'
1203
+ }
1204
+ } // prices: {
1205
+ // monthly: 'price_1KJmg4LFzcsAA7x6SMfj1iDu',
1206
+ // additionalUser: 'price_1KJmg4LFzcsAA7x6yzvGdoxe',
1207
+ // },
1208
+ // additionalUserPrice: 10,
1209
+
992
1210
  },
993
1211
  plus: {
994
- id: 'prod_HzWYKl09U12eLQ',
1212
+ id: 'prod_KzmyY1ysEOeK93',
995
1213
  tax_rates: ['txr_1HPXZVLFzcsAA7x6w0zpHu01'],
996
- prices: {
997
- monthly: 'price_1HPXVBLFzcsAA7x61LF40zVU',
998
- additionalUser: 'price_1HRPfVLFzcsAA7x6JcMj1DWr'
999
- },
1000
- additionalUserPrice: 1000
1214
+ tariffs: {
1215
+ base: {
1216
+ id: 'price_1KJnP0LFzcsAA7x6oDVeaPAv',
1217
+ price: 159,
1218
+ usageType: 'licensed',
1219
+ type: 'base'
1220
+ }
1221
+ } // prices: {
1222
+ // monthly: 'price_1KJnP0LFzcsAA7x6oDVeaPAv',
1223
+ // additionalUser: 'price_1KJnP0LFzcsAA7x6s3rO71QX',
1224
+ // },
1225
+ // additionalUserPrice: 5,
1226
+
1001
1227
  },
1002
- premium: {
1003
- id: 'prod_HzWZVpSP77M3Pt',
1228
+ classic: {
1229
+ id: 'prod_KzmO4rORyWl8cA',
1004
1230
  tax_rates: ['txr_1HPXZVLFzcsAA7x6w0zpHu01'],
1005
- prices: {
1006
- monthly: 'price_1HPXWPLFzcsAA7x6sjYdFXOR',
1007
- additionalUser: 'price_1HRPjhLFzcsAA7x6o28A8tDC'
1008
- },
1009
- additionalUserPrice: 500
1231
+ tariffs: {
1232
+ base: {
1233
+ id: 'price_1KJmpiLFzcsAA7x6rLA0GNZX',
1234
+ price: 159,
1235
+ usageType: 'licensed',
1236
+ type: 'base'
1237
+ },
1238
+ additionalAdmin: {
1239
+ id: 'price_1KJmpiLFzcsAA7x6VtCIuhqw',
1240
+ price: 30,
1241
+ usageType: 'metered',
1242
+ type: 'extra_user'
1243
+ },
1244
+ additionalAgent: {
1245
+ id: 'price_1KJmpiLFzcsAA7x6gFBgAXkr',
1246
+ price: 20,
1247
+ usageType: 'metered',
1248
+ type: 'extra_user'
1249
+ },
1250
+ additionalPro: {
1251
+ id: 'price_1KJmpiLFzcsAA7x6JxTnlLC8',
1252
+ price: 10,
1253
+ usageType: 'metered',
1254
+ type: 'extra_user'
1255
+ },
1256
+ additionalSeller: {
1257
+ id: 'price_1KJmpiLFzcsAA7x6XS9PBgQo',
1258
+ price: 2,
1259
+ usageType: 'metered',
1260
+ type: 'extra_user'
1261
+ }
1262
+ } // prices: {
1263
+ // monthly: 'price_1KJmpiLFzcsAA7x6rLA0GNZX',
1264
+ // additionalUser: 'price_1KJmpiLFzcsAA7x6VtCIuhqw',
1265
+ // },
1266
+ // additionalUserPrice: 30,
1267
+
1268
+ },
1269
+ test_1: {
1270
+ id: 'prod_L2ZqDUzF0HFuFN',
1271
+ tax_rates: ['txr_1HPXZVLFzcsAA7x6w0zpHu01'],
1272
+ tariffs: {
1273
+ base: {
1274
+ id: 'price_1KMUgwLFzcsAA7x6c3wk0Buy',
1275
+ price: 50,
1276
+ usageType: 'licensed',
1277
+ type: 'base'
1278
+ },
1279
+ additionalAdmin: {
1280
+ id: 'price_1KMUgwLFzcsAA7x6X8qYBxls',
1281
+ price: 10,
1282
+ usageType: 'metered',
1283
+ type: 'extra_user'
1284
+ },
1285
+ additionalAgent: {
1286
+ id: 'price_1KMUgwLFzcsAA7x6fyOLh2gM',
1287
+ price: 8,
1288
+ usageType: 'metered',
1289
+ type: 'extra_user'
1290
+ },
1291
+ additionalPro: {
1292
+ id: 'price_1KMUgwLFzcsAA7x6eB6Oevw2',
1293
+ price: 6,
1294
+ usageType: 'metered',
1295
+ type: 'extra_user'
1296
+ },
1297
+ additionalSeller: {
1298
+ id: 'price_1KMUgwLFzcsAA7x6s9WBpxTS',
1299
+ price: 4,
1300
+ usageType: 'metered',
1301
+ type: 'extra_user'
1302
+ }
1303
+ } // prices: {
1304
+ // monthly: 'price_1KMUgwLFzcsAA7x6c3wk0Buy',
1305
+ // additionalUser: 'price_1KMUgwLFzcsAA7x6X8qYBxls',
1306
+ // },
1307
+ // additionalUserPrice: 10,
1308
+
1309
+ },
1310
+ test_2: {
1311
+ id: 'prod_L2xmEk7gqqRJtS',
1312
+ tax_rates: ['txr_1HPXZVLFzcsAA7x6w0zpHu01'],
1313
+ tariffs: {
1314
+ base: {
1315
+ id: 'price_1KMrqrLFzcsAA7x62Ag7xwjU',
1316
+ price: 100,
1317
+ usageType: 'licensed',
1318
+ type: 'base'
1319
+ },
1320
+ additionalAdmin: {
1321
+ id: 'price_1KMrqrLFzcsAA7x6cu3it43A',
1322
+ price: 20,
1323
+ usageType: 'metered',
1324
+ type: 'extra_user'
1325
+ },
1326
+ additionalAgent: {
1327
+ id: 'price_1KMrqrLFzcsAA7x6eNCDb3D6',
1328
+ price: 16,
1329
+ usageType: 'metered',
1330
+ type: 'extra_user'
1331
+ },
1332
+ additionalPro: {
1333
+ id: 'price_1KMrqrLFzcsAA7x6wRuDxyyN',
1334
+ price: 12,
1335
+ usageType: 'metered',
1336
+ type: 'extra_user'
1337
+ },
1338
+ additionalSeller: {
1339
+ id: 'price_1KMrqsLFzcsAA7x61NRR9gne',
1340
+ price: 8,
1341
+ usageType: 'metered',
1342
+ type: 'extra_user'
1343
+ }
1344
+ } // prices: {
1345
+ // monthly: 'price_1KMrqrLFzcsAA7x62Ag7xwjU',
1346
+ // additionalUser: 'price_1KMrqrLFzcsAA7x6cu3it43A',
1347
+ // },
1348
+ // additionalUserPrice: 20,
1349
+
1350
+ },
1351
+ test_3: {
1352
+ id: 'prod_L2xnCHGi6QNgX8',
1353
+ tax_rates: ['txr_1HPXZVLFzcsAA7x6w0zpHu01'],
1354
+ tariffs: {
1355
+ base: {
1356
+ id: 'price_1KMrs0LFzcsAA7x6p2tkW6lu',
1357
+ price: 80,
1358
+ usageType: 'licensed',
1359
+ type: 'base'
1360
+ }
1361
+ } // prices: {
1362
+ // monthly: 'price_1KMrs0LFzcsAA7x6p2tkW6lu',
1363
+ // additionalUser: 'price_1KMUgwLFzcsAA7x6X8qYBxls',
1364
+ // },
1365
+ // additionalUserPrice: 10,
1366
+
1367
+ },
1368
+ test_4: {
1369
+ id: 'prod_L2yWF4ssugw8Ln',
1370
+ tax_rates: ['txr_1HPXZVLFzcsAA7x6w0zpHu01'],
1371
+ tariffs: {
1372
+ base: {
1373
+ id: 'price_1KMsZFLFzcsAA7x6qVbCQpuN',
1374
+ price: 65,
1375
+ usageType: 'licensed',
1376
+ type: 'base'
1377
+ },
1378
+ additionalAdmin: {
1379
+ id: 'price_1KMsZFLFzcsAA7x6EjaDfica',
1380
+ price: 15,
1381
+ usageType: 'metered',
1382
+ type: 'extra_user'
1383
+ },
1384
+ additionalAgent: {
1385
+ id: 'price_1KMsZFLFzcsAA7x6T1FI1WF4',
1386
+ price: 12,
1387
+ usageType: 'metered',
1388
+ type: 'extra_user'
1389
+ },
1390
+ additionalPro: {
1391
+ id: 'price_1KMsZFLFzcsAA7x6L6I0M1ND',
1392
+ price: 9,
1393
+ usageType: 'metered',
1394
+ type: 'extra_user'
1395
+ },
1396
+ additionalSeller: {
1397
+ id: 'price_1KMsZFLFzcsAA7x6G5GXzPeW',
1398
+ price: 6,
1399
+ usageType: 'metered',
1400
+ type: 'extra_user'
1401
+ }
1402
+ } // prices: {
1403
+ // monthly: 'price_1KMsZFLFzcsAA7x6qVbCQpuN',
1404
+ // additionalUser: 'price_1KMsZFLFzcsAA7x6EjaDfica',
1405
+ // },
1406
+ // additionalUserPrice: 15,
1407
+
1010
1408
  }
1011
1409
  };
1012
1410
  var production = {
1013
1411
  standard: {
1014
1412
  id: 'prod_HsAwETfIUblsAT',
1015
1413
  tax_rates: ['txr_1HIMA8LFzcsAA7x61nsqfrYU'],
1016
- prices: {
1017
- monthly: 'price_1HIQaILFzcsAA7x6NVk3cJu1',
1018
- additionalUser: 'price_1HRQFTLFzcsAA7x6X9wS7JUr'
1019
- },
1020
- additionalUserPrice: 1000
1414
+ tariffs: {
1415
+ base: {
1416
+ id: 'price_1HIQaILFzcsAA7x6NVk3cJu1',
1417
+ price: 69,
1418
+ usageType: 'licensed',
1419
+ type: 'base'
1420
+ }
1421
+ } // prices: {
1422
+ // monthly: 'price_1HIQaILFzcsAA7x6NVk3cJu1',
1423
+ // additionalUser: 'price_1HRQFTLFzcsAA7x6X9wS7JUr',
1424
+ // },
1425
+ // additionalUserPrice: 10,
1426
+
1021
1427
  },
1022
1428
  plus: {
1023
1429
  id: 'prod_HsB2YJPEZ9H98c',
1024
1430
  tax_rates: ['txr_1HIMA8LFzcsAA7x61nsqfrYU'],
1025
- prices: {
1026
- monthly: 'price_1HIQg0LFzcsAA7x6X6lfFUdv',
1027
- additionalUser: 'price_1HRg1fLFzcsAA7x6QYbtnty6'
1028
- },
1029
- additionalUserPrice: 1000
1431
+ tariffs: {
1432
+ base: {
1433
+ id: 'price_1HIQg0LFzcsAA7x6X6lfFUdv',
1434
+ price: 159,
1435
+ usageType: 'licensed',
1436
+ type: 'base'
1437
+ }
1438
+ } // prices: {
1439
+ // monthly: 'price_1HIQg0LFzcsAA7x6X6lfFUdv',
1440
+ // additionalUser: 'price_1HRg1fLFzcsAA7x6QYbtnty6',
1441
+ // },
1442
+ // additionalUserPrice: 5,
1443
+
1030
1444
  },
1031
- premium: {
1032
- id: 'prod_HsB1kn49KcAbL1',
1445
+ classic: {
1446
+ id: 'prod_KzmYFhrWXrzWdR',
1033
1447
  tax_rates: ['txr_1HIMA8LFzcsAA7x61nsqfrYU'],
1034
- prices: {
1035
- monthly: 'price_1HIQfYLFzcsAA7x6AFuSBinh',
1036
- additionalUser: 'price_1HRfz6LFzcsAA7x6dFDETn6N'
1037
- },
1038
- additionalUserPrice: 500
1448
+ tariffs: {
1449
+ base: {
1450
+ id: 'price_1KJmzNLFzcsAA7x6I6gNlCpY',
1451
+ price: 159,
1452
+ usageType: 'licensed',
1453
+ type: 'base'
1454
+ },
1455
+ additionalAdmin: {
1456
+ id: 'price_1KJmzNLFzcsAA7x6Tl6D8Wus',
1457
+ price: 30,
1458
+ usageType: 'metered',
1459
+ type: 'extra_user'
1460
+ },
1461
+ additionalAgent: {
1462
+ id: 'price_1KJmzNLFzcsAA7x6DeUQScKY',
1463
+ price: 20,
1464
+ usageType: 'metered',
1465
+ type: 'extra_user'
1466
+ },
1467
+ additionalPro: {
1468
+ id: 'price_1KJmzNLFzcsAA7x695wsj6rA',
1469
+ price: 10,
1470
+ usageType: 'metered',
1471
+ type: 'extra_user'
1472
+ },
1473
+ additionalSeller: {
1474
+ id: 'price_1KJmzNLFzcsAA7x6gF62MX41',
1475
+ price: 2,
1476
+ usageType: 'metered',
1477
+ type: 'extra_user'
1478
+ }
1479
+ } // prices: {
1480
+ // monthly: 'price_1KJmzNLFzcsAA7x6I6gNlCpY',
1481
+ // additionalUser: 'price_1KJmzNLFzcsAA7x6Tl6D8Wus',
1482
+ // },
1483
+ // additionalUserPrice: 30,
1484
+
1485
+ },
1486
+ test_1: {
1487
+ id: 'prod_L2ZqDUzF0HFuFN',
1488
+ tax_rates: ['txr_1HPXZVLFzcsAA7x6w0zpHu01'],
1489
+ tariffs: {
1490
+ base: {
1491
+ id: 'price_1KMUgwLFzcsAA7x6c3wk0Buy',
1492
+ price: 50,
1493
+ usageType: 'licensed',
1494
+ type: 'base'
1495
+ },
1496
+ additionalAdmin: {
1497
+ id: 'price_1KMUgwLFzcsAA7x6X8qYBxls',
1498
+ price: 10,
1499
+ usageType: 'metered',
1500
+ type: 'extra_user'
1501
+ },
1502
+ additionalAgent: {
1503
+ id: 'price_1KMUgwLFzcsAA7x6fyOLh2gM',
1504
+ price: 8,
1505
+ usageType: 'metered',
1506
+ type: 'extra_user'
1507
+ },
1508
+ additionalPro: {
1509
+ id: 'price_1KMUgwLFzcsAA7x6eB6Oevw2',
1510
+ price: 6,
1511
+ usageType: 'metered',
1512
+ type: 'extra_user'
1513
+ },
1514
+ additionalSeller: {
1515
+ id: 'price_1KMUgwLFzcsAA7x6s9WBpxTS',
1516
+ price: 4,
1517
+ usageType: 'metered',
1518
+ type: 'extra_user'
1519
+ }
1520
+ } // prices: {
1521
+ // monthly: 'price_1KMUgwLFzcsAA7x6c3wk0Buy',
1522
+ // additionalUser: 'price_1KMUgwLFzcsAA7x6X8qYBxls',
1523
+ // },
1524
+ // additionalUserPrice: 10,
1525
+
1526
+ },
1527
+ test_2: {
1528
+ id: 'prod_L2xmEk7gqqRJtS',
1529
+ tax_rates: ['txr_1HPXZVLFzcsAA7x6w0zpHu01'],
1530
+ tariffs: {
1531
+ base: {
1532
+ id: 'price_1KMrqrLFzcsAA7x62Ag7xwjU',
1533
+ price: 100,
1534
+ usageType: 'licensed',
1535
+ type: 'base'
1536
+ },
1537
+ additionalAdmin: {
1538
+ id: 'price_1KMrqrLFzcsAA7x6cu3it43A',
1539
+ price: 20,
1540
+ usageType: 'metered',
1541
+ type: 'extra_user'
1542
+ },
1543
+ additionalAgent: {
1544
+ id: 'price_1KMrqrLFzcsAA7x6eNCDb3D6',
1545
+ price: 16,
1546
+ usageType: 'metered',
1547
+ type: 'extra_user'
1548
+ },
1549
+ additionalPro: {
1550
+ id: 'price_1KMrqrLFzcsAA7x6wRuDxyyN',
1551
+ price: 12,
1552
+ usageType: 'metered',
1553
+ type: 'extra_user'
1554
+ },
1555
+ additionalSeller: {
1556
+ id: 'price_1KMrqsLFzcsAA7x61NRR9gne',
1557
+ price: 8,
1558
+ usageType: 'metered',
1559
+ type: 'extra_user'
1560
+ }
1561
+ } // prices: {
1562
+ // monthly: 'price_1KMrqrLFzcsAA7x62Ag7xwjU',
1563
+ // additionalUser: 'price_1KMrqrLFzcsAA7x6cu3it43A',
1564
+ // },
1565
+ // additionalUserPrice: 20,
1566
+
1567
+ },
1568
+ test_3: {
1569
+ id: 'prod_L2xnCHGi6QNgX8',
1570
+ tax_rates: ['txr_1HPXZVLFzcsAA7x6w0zpHu01'],
1571
+ tariffs: {
1572
+ base: {
1573
+ id: 'price_1KMrs0LFzcsAA7x6p2tkW6lu',
1574
+ price: 80,
1575
+ usageType: 'licensed',
1576
+ type: 'base'
1577
+ }
1578
+ } // prices: {
1579
+ // monthly: 'price_1KMrs0LFzcsAA7x6p2tkW6lu',
1580
+ // additionalUser: 'price_1KMUgwLFzcsAA7x6X8qYBxls',
1581
+ // },
1582
+ // additionalUserPrice: 10,
1583
+
1584
+ },
1585
+ test_4: {
1586
+ id: 'prod_L2yWF4ssugw8Ln',
1587
+ tax_rates: ['txr_1HPXZVLFzcsAA7x6w0zpHu01'],
1588
+ tariffs: {
1589
+ base: {
1590
+ id: 'price_1KMsZFLFzcsAA7x6qVbCQpuN',
1591
+ price: 65,
1592
+ usageType: 'licensed',
1593
+ type: 'base'
1594
+ },
1595
+ additionalAdmin: {
1596
+ id: 'price_1KMsZFLFzcsAA7x6EjaDfica',
1597
+ price: 15,
1598
+ usageType: 'metered',
1599
+ type: 'extra_user'
1600
+ },
1601
+ additionalAgent: {
1602
+ id: 'price_1KMsZFLFzcsAA7x6T1FI1WF4',
1603
+ price: 12,
1604
+ usageType: 'metered',
1605
+ type: 'extra_user'
1606
+ },
1607
+ additionalPro: {
1608
+ id: 'price_1KMsZFLFzcsAA7x6L6I0M1ND',
1609
+ price: 9,
1610
+ usageType: 'metered',
1611
+ type: 'extra_user'
1612
+ },
1613
+ additionalSeller: {
1614
+ id: 'price_1KMsZFLFzcsAA7x6G5GXzPeW',
1615
+ price: 6,
1616
+ usageType: 'metered',
1617
+ type: 'extra_user'
1618
+ }
1619
+ } // prices: {
1620
+ // monthly: 'price_1KMsZFLFzcsAA7x6qVbCQpuN',
1621
+ // additionalUser: 'price_1KMsZFLFzcsAA7x6EjaDfica',
1622
+ // },
1623
+ // additionalUserPrice: 15,
1624
+
1039
1625
  }
1040
1626
  };
1041
1627
  /**
@@ -1061,6 +1647,13 @@ var ROLE;
1061
1647
  ROLE["SUPERADMIN"] = "superadmin";
1062
1648
  })(ROLE || (ROLE = {}));
1063
1649
 
1650
+ var DevisHistoryType;
1651
+
1652
+ (function (DevisHistoryType) {
1653
+ DevisHistoryType["CHANGE_STATUS"] = "CHANGE_STATUS";
1654
+ DevisHistoryType["SENT_TO_CLIENT"] = "SENT_TO_CLIENT";
1655
+ })(DevisHistoryType || (DevisHistoryType = {}));
1656
+
1064
1657
  var MaterialsProviderType;
1065
1658
 
1066
1659
  (function (MaterialsProviderType) {
@@ -1147,7 +1740,7 @@ var DocumentsTypeEnum;
1147
1740
  var EventsTypeEnum;
1148
1741
 
1149
1742
  (function (EventsTypeEnum) {
1150
- EventsTypeEnum["OTHER"] = "OTHER";
1743
+ EventsTypeEnum["OTHER"] = "AUTRE";
1151
1744
  EventsTypeEnum["VISIT"] = "VISIT";
1152
1745
  EventsTypeEnum["DELIVERY"] = "DELIVERY";
1153
1746
  EventsTypeEnum["CONSTRUCTION"] = "CONSTRUCTION";
@@ -1462,6 +2055,7 @@ var EmailTemplate;
1462
2055
  EmailTemplate["NEW_ENTERPRISE"] = "new-enterprise";
1463
2056
  EmailTemplate["USER_CONTACT"] = "user-contact";
1464
2057
  EmailTemplate["PLAN"] = "plan";
2058
+ EmailTemplate["BILL"] = "bill";
1465
2059
  })(EmailTemplate || (EmailTemplate = {}));
1466
2060
 
1467
2061
  var DevisPdfType;
@@ -1546,6 +2140,13 @@ var NomenclaturesIdentifier;
1546
2140
  NomenclaturesIdentifier["EVENTS_TYPES"] = "EVENTS_TYPES";
1547
2141
  NomenclaturesIdentifier["PROJECTS_CATEGORY"] = "PROJECTS_CATEGORY";
1548
2142
  NomenclaturesIdentifier["TVA"] = "TVA";
2143
+ NomenclaturesIdentifier["SUPPLIERS"] = "SUPPLIERS";
2144
+ NomenclaturesIdentifier["DISCOUNTS"] = "DISCOUNTS";
2145
+ NomenclaturesIdentifier["TERMS_OF_SALE"] = "TERMS_OF_SALE";
2146
+ NomenclaturesIdentifier["NOTES_MODELS"] = "NOTES_MODELS";
2147
+ NomenclaturesIdentifier["DEVIS_TYPES"] = "DEVIS_TYPES";
2148
+ NomenclaturesIdentifier["COMMENTS_MODELS"] = "COMMENTS_MODELS";
2149
+ NomenclaturesIdentifier["EMAILS_COMMENTS_MODELS"] = "EMAILS_COMMENTS_MODELS";
1549
2150
  })(NomenclaturesIdentifier || (NomenclaturesIdentifier = {}));
1550
2151
 
1551
2152
  var OperationQuantityEnum;
@@ -1576,9 +2177,25 @@ var MaterialResponsible;
1576
2177
  MaterialResponsible["ENTERPRISE"] = "ENTERPRISE";
1577
2178
  })(MaterialResponsible || (MaterialResponsible = {}));
1578
2179
 
2180
+ var ProjectPriceTypeEnum;
2181
+
2182
+ (function (ProjectPriceTypeEnum) {
2183
+ ProjectPriceTypeEnum["accepted"] = "accepted";
2184
+ ProjectPriceTypeEnum["prospected"] = "prospected";
2185
+ ProjectPriceTypeEnum["rejected"] = "rejected";
2186
+ })(ProjectPriceTypeEnum || (ProjectPriceTypeEnum = {}));
2187
+
2188
+ var DevisFormatEnum;
2189
+
2190
+ (function (DevisFormatEnum) {
2191
+ DevisFormatEnum["PIECE"] = "PIECE";
2192
+ DevisFormatEnum["LOT"] = "LOT";
2193
+ })(DevisFormatEnum || (DevisFormatEnum = {}));
2194
+
1579
2195
  var types = {
1580
2196
  __proto__: null,
1581
2197
  get ROLE () { return ROLE; },
2198
+ get DevisHistoryType () { return DevisHistoryType; },
1582
2199
  get MaterialsProviderType () { return MaterialsProviderType; },
1583
2200
  get ProjectType () { return ProjectType; },
1584
2201
  get OperationStatusEnum () { return OperationStatusEnum; },
@@ -1628,7 +2245,9 @@ var types = {
1628
2245
  get NomenclaturesIdentifier () { return NomenclaturesIdentifier; },
1629
2246
  get OperationQuantityEnum () { return OperationQuantityEnum; },
1630
2247
  get OperationRulesEnum () { return OperationRulesEnum; },
1631
- get MaterialResponsible () { return MaterialResponsible; }
2248
+ get MaterialResponsible () { return MaterialResponsible; },
2249
+ get ProjectPriceTypeEnum () { return ProjectPriceTypeEnum; },
2250
+ get DevisFormatEnum () { return DevisFormatEnum; }
1632
2251
  };
1633
2252
 
1634
2253
  function isBuffer(obj) {