@psmarketplace/config 10.23.1
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/LICENSE +21 -0
- package/README.md +26 -0
- package/dist/auth/index.js +58 -0
- package/dist/auth/index.js.map +1 -0
- package/dist/auth/policy.js +120 -0
- package/dist/auth/policy.js.map +1 -0
- package/dist/environment/base.js +560 -0
- package/dist/environment/base.js.map +1 -0
- package/dist/environment/decorators.js +98 -0
- package/dist/environment/decorators.js.map +1 -0
- package/dist/environment/index.js +37 -0
- package/dist/environment/index.js.map +1 -0
- package/dist/environment/types.js +3 -0
- package/dist/environment/types.js.map +1 -0
- package/dist/events/index.js +12 -0
- package/dist/events/index.js.map +1 -0
- package/dist/helpers/index.js +68 -0
- package/dist/helpers/index.js.map +1 -0
- package/dist/helpers/uid.js +87 -0
- package/dist/helpers/uid.js.map +1 -0
- package/dist/index.js +30 -0
- package/dist/index.js.map +1 -0
- package/dist/metrics.js +6 -0
- package/dist/metrics.js.map +1 -0
- package/dist/path/index.js +47 -0
- package/dist/path/index.js.map +1 -0
- package/dist/plans/base.js +117 -0
- package/dist/plans/base.js.map +1 -0
- package/dist/plans/index.js +223 -0
- package/dist/plans/index.js.map +1 -0
- package/dist/plans/types.js +3 -0
- package/dist/plans/types.js.map +1 -0
- package/dist/types/auth/index.d.ts +22 -0
- package/dist/types/auth/index.d.ts.map +1 -0
- package/dist/types/auth/policy.d.ts +13 -0
- package/dist/types/auth/policy.d.ts.map +1 -0
- package/dist/types/environment/base.d.ts +4 -0
- package/dist/types/environment/base.d.ts.map +1 -0
- package/dist/types/environment/decorators.d.ts +7 -0
- package/dist/types/environment/decorators.d.ts.map +1 -0
- package/dist/types/environment/index.d.ts +16 -0
- package/dist/types/environment/index.d.ts.map +1 -0
- package/dist/types/environment/types.d.ts +162 -0
- package/dist/types/environment/types.d.ts.map +1 -0
- package/dist/types/events/index.d.ts +59 -0
- package/dist/types/events/index.d.ts.map +1 -0
- package/dist/types/helpers/index.d.ts +66 -0
- package/dist/types/helpers/index.d.ts.map +1 -0
- package/dist/types/helpers/uid.d.ts +6 -0
- package/dist/types/helpers/uid.d.ts.map +1 -0
- package/dist/types/index.d.ts +14 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/metrics.d.ts +3 -0
- package/dist/types/metrics.d.ts.map +1 -0
- package/dist/types/path/index.d.ts +8 -0
- package/dist/types/path/index.d.ts.map +1 -0
- package/dist/types/plans/base.d.ts +9 -0
- package/dist/types/plans/base.d.ts.map +1 -0
- package/dist/types/plans/index.d.ts +10 -0
- package/dist/types/plans/index.d.ts.map +1 -0
- package/dist/types/plans/types.d.ts +179 -0
- package/dist/types/plans/types.d.ts.map +1 -0
- package/dist/types/types.d.ts +3641 -0
- package/dist/types/types.d.ts.map +1 -0
- package/dist/types/utils/flatten.d.ts +9 -0
- package/dist/types/utils/flatten.d.ts.map +1 -0
- package/dist/types/whatsapp/index.d.ts +4 -0
- package/dist/types/whatsapp/index.d.ts.map +1 -0
- package/dist/types/whatsapp/requests.d.ts +82 -0
- package/dist/types/whatsapp/requests.d.ts.map +1 -0
- package/dist/types/whatsapp/responses.d.ts +170 -0
- package/dist/types/whatsapp/responses.d.ts.map +1 -0
- package/dist/types.js +734 -0
- package/dist/types.js.map +1 -0
- package/dist/utils/flatten.js +43 -0
- package/dist/utils/flatten.js.map +1 -0
- package/dist/whatsapp/index.js +7 -0
- package/dist/whatsapp/index.js.map +1 -0
- package/dist/whatsapp/requests.js +3 -0
- package/dist/whatsapp/requests.js.map +1 -0
- package/dist/whatsapp/responses.js +3 -0
- package/dist/whatsapp/responses.js.map +1 -0
- package/package.json +32 -0
- package/src/auth/index.ts +72 -0
- package/src/auth/policy.ts +277 -0
- package/src/environment/base.ts +602 -0
- package/src/environment/decorators.ts +97 -0
- package/src/environment/index.ts +35 -0
- package/src/environment/types.ts +174 -0
- package/src/events/index.ts +80 -0
- package/src/helpers/index.ts +121 -0
- package/src/helpers/uid.ts +108 -0
- package/src/index.ts +52 -0
- package/src/metrics.ts +3 -0
- package/src/path/index.ts +61 -0
- package/src/plans/base.ts +121 -0
- package/src/plans/index.ts +233 -0
- package/src/plans/types.ts +208 -0
- package/src/types.ts +4362 -0
- package/src/utils/flatten.ts +60 -0
- package/src/whatsapp/index.ts +4 -0
- package/src/whatsapp/requests.ts +113 -0
- package/src/whatsapp/responses.ts +197 -0
|
@@ -0,0 +1,602 @@
|
|
|
1
|
+
// tslint:disable-next-line: object-literal-sort-keys
|
|
2
|
+
import { Environment } from './index';
|
|
3
|
+
|
|
4
|
+
const productionEnvironment: Environment = {
|
|
5
|
+
credentials: {
|
|
6
|
+
algolia: {},
|
|
7
|
+
cloudinary: {},
|
|
8
|
+
stripe: {},
|
|
9
|
+
},
|
|
10
|
+
isTest: false,
|
|
11
|
+
name: 'production',
|
|
12
|
+
|
|
13
|
+
security: {
|
|
14
|
+
search: {
|
|
15
|
+
// this field is used to set the scope of the record (the enterprise owner of record)
|
|
16
|
+
scopeField: 'searchable(scope)',
|
|
17
|
+
visibleBy: 'visibility',
|
|
18
|
+
ownerField: 'owner',
|
|
19
|
+
},
|
|
20
|
+
claims: {
|
|
21
|
+
enterprise: 'enterprise',
|
|
22
|
+
role: 'role',
|
|
23
|
+
secureSearchApiKey: 'searchKey',
|
|
24
|
+
},
|
|
25
|
+
},
|
|
26
|
+
realtime: {
|
|
27
|
+
default: 'enterprises/{enterpriseId}/indexes/{indexName}',
|
|
28
|
+
projects:
|
|
29
|
+
'enterprises/{enterpriseId}/indexes/{indexName}/projects/{projectId}',
|
|
30
|
+
},
|
|
31
|
+
schema: {
|
|
32
|
+
collections: {
|
|
33
|
+
users: 'users',
|
|
34
|
+
enterprises: 'enterprises',
|
|
35
|
+
// tslint:disable-next-line: object-literal-sort-keys
|
|
36
|
+
billing: 'enterprises/{enterpriseId}/billing',
|
|
37
|
+
projects: 'enterprises/{enterpriseId}/projects',
|
|
38
|
+
medias: 'enterprises/{enterpriseId}/projects/{projectId}/medias',
|
|
39
|
+
events: 'enterprises/{enterpriseId}/projects/{projectId}/events',
|
|
40
|
+
notes: 'enterprises/{enterpriseId}/projects/{projectId}/notes',
|
|
41
|
+
visitReports:
|
|
42
|
+
'enterprises/{enterpriseId}/projects/{projectId}/visitReports',
|
|
43
|
+
documents: 'enterprises/{enterpriseId}/projects/{projectId}/documents',
|
|
44
|
+
devis: 'enterprises/{enterpriseId}/projects/{projectId}/devis',
|
|
45
|
+
plans: 'enterprises/{enterpriseId}/projects/{projectId}/plans',
|
|
46
|
+
downPayments:
|
|
47
|
+
'enterprises/{enterpriseId}/projects/{projectId}/downPayments',
|
|
48
|
+
providers: 'enterprises/{enterpriseId}/providers',
|
|
49
|
+
statuses: 'enterprises/{enterpriseId}/statuses',
|
|
50
|
+
orders: 'enterprises/{enterpriseId}/projects/{projectId}/orders',
|
|
51
|
+
bills: 'enterprises/{enterpriseId}/projects/{projectId}/bills',
|
|
52
|
+
counters: 'counters',
|
|
53
|
+
invoices: 'enterprises/{enterpriseId}/invoices',
|
|
54
|
+
materialsProvider: 'enterprises/{enterpriseId}/materialsProvider',
|
|
55
|
+
materials:
|
|
56
|
+
'enterprises/{enterpriseId}/materialsProvider/{materialsProviderId}/materials',
|
|
57
|
+
invitations: 'enterprises/{enterpriseId}/invitations',
|
|
58
|
+
devisTemplates: 'enterprises/{enterpriseId}/devisTemplates',
|
|
59
|
+
estimations: 'enterprises/{enterpriseId}/estimations',
|
|
60
|
+
userNotifications: 'users/{userId}/profiles/{enterpriseId}/notifications',
|
|
61
|
+
histories: 'enterprises/{enterpriseId}/histories',
|
|
62
|
+
receptionVouchers:
|
|
63
|
+
'enterprises/{enterpriseId}/projects/{projectId}/receptionVouchers',
|
|
64
|
+
indexes: 'enterprises/{enterpriseId}/indexes',
|
|
65
|
+
notifications: 'enterprises/{enterpriseId}/notifications',
|
|
66
|
+
nomenclatures: 'enterprises/{enterpriseId}/nomenclatures',
|
|
67
|
+
categories: 'enterprises/{enterpriseId}/categories',
|
|
68
|
+
operationsCatalogs: 'enterprises/{enterpriseId}/operationsCatalogs',
|
|
69
|
+
operationsGroups: 'enterprises/{enterpriseId}/operationsGroups',
|
|
70
|
+
operations:
|
|
71
|
+
'enterprises/{enterpriseId}/operationsCatalogs/{operationsCatalogId}/operations',
|
|
72
|
+
operationMaterials:
|
|
73
|
+
'enterprises/{enterpriseId}/operationsCatalogs/{operationsCatalogId}/operations/{operationId}/materials',
|
|
74
|
+
devisVersions:
|
|
75
|
+
'enterprises/{enterpriseId}/projects/{projectId}/devis/{devisId}/versions',
|
|
76
|
+
enterpriseDocuments: 'enterprises/{enterpriseId}/documents',
|
|
77
|
+
enterpriseMedias: 'enterprises/{enterpriseId}/medias',
|
|
78
|
+
configurations: 'enterprises/{enterpriseId}/configurations',
|
|
79
|
+
logs: 'enterprises/{enterpriseId}/logs',
|
|
80
|
+
systemVersions: 'systemVersions',
|
|
81
|
+
userProfiles: 'users/{userId}/profiles',
|
|
82
|
+
evaluationsConfig: 'enterprises/{enterpriseId}/evaluationsConfig',
|
|
83
|
+
evaluations: 'enterprises/{enterpriseId}/evaluations',
|
|
84
|
+
devisCandidates:
|
|
85
|
+
'enterprises/{enterpriseId}/projects/{projectId}/devisCandidates',
|
|
86
|
+
workOrders: 'enterprises/{enterpriseId}/workOrders',
|
|
87
|
+
candidatures:
|
|
88
|
+
'enterprises/{enterpriseId}/projects/{projectId}/candidatures',
|
|
89
|
+
serviceOrders:
|
|
90
|
+
'enterprises/{enterpriseId}/projects/{projectId}/serviceOrders',
|
|
91
|
+
marketplaceOrders:
|
|
92
|
+
'enterprises/{enterpriseId}/projects/{projectId}/marketplaceOrders',
|
|
93
|
+
marketplaceNotifications:
|
|
94
|
+
'enterprises/{enterpriseId}/projects/{projectId}/marketplaceNotifications',
|
|
95
|
+
},
|
|
96
|
+
docs: {
|
|
97
|
+
user: 'users/{userId}',
|
|
98
|
+
userProfile: 'users/{userId}/profiles/{enterpriseId}',
|
|
99
|
+
billing: 'enterprises/{enterpriseId}/billing/{billingId}',
|
|
100
|
+
enterprise: 'enterprises/{enterpriseId}',
|
|
101
|
+
|
|
102
|
+
global: 'global/stats',
|
|
103
|
+
project: 'enterprises/{enterpriseId}/projects/{projectId}',
|
|
104
|
+
medias:
|
|
105
|
+
'enterprises/{enterpriseId}/projects/{projectId}/medias/{mediaId}',
|
|
106
|
+
events:
|
|
107
|
+
'enterprises/{enterpriseId}/projects/{projectId}/events/{eventId}',
|
|
108
|
+
notes: 'enterprises/{enterpriseId}/projects/{projectId}/notes/{noteId}',
|
|
109
|
+
visitReports:
|
|
110
|
+
'enterprises/{enterpriseId}/projects/{projectId}/visitReports/{visitReportId}',
|
|
111
|
+
documents:
|
|
112
|
+
'enterprises/{enterpriseId}/projects/{projectId}/documents/{documentId}',
|
|
113
|
+
devis: 'enterprises/{enterpriseId}/projects/{projectId}/devis/{devisId}',
|
|
114
|
+
plans: 'enterprises/{enterpriseId}/projects/{projectId}/plans/{planId}',
|
|
115
|
+
downPayments:
|
|
116
|
+
'enterprises/{enterpriseId}/projects/{projectId}/downPayments/{downPaymentId}',
|
|
117
|
+
paymentMethods:
|
|
118
|
+
'enterprises/{enterpriseId}/paymentMethods/{paymentMethodId}',
|
|
119
|
+
provider: 'enterprises/{enterpriseId}/providers/{providerId}',
|
|
120
|
+
status: 'enterprises/{enterpriseId}/statuses/{statusId}',
|
|
121
|
+
orders:
|
|
122
|
+
'enterprises/{enterpriseId}/projects/{projectId}/orders/{orderId}',
|
|
123
|
+
bills: 'enterprises/{enterpriseId}/projects/{projectId}/bills/{billId}',
|
|
124
|
+
indexes:
|
|
125
|
+
'enterprises/{enterpriseId}/projects/{projectId}/indexes/{indexId}',
|
|
126
|
+
counter: 'counters/{counterId}',
|
|
127
|
+
invoice: 'enterprises/{enterpriseId}/invoices/{invoiceId}',
|
|
128
|
+
materialsProvider:
|
|
129
|
+
'enterprises/{enterpriseId}/materialsProvider/{materialsProviderId}',
|
|
130
|
+
material:
|
|
131
|
+
'enterprises/{enterpriseId}/materialsProvider/{materialsProviderId}/materials/{materialId}',
|
|
132
|
+
invitation: 'enterprises/{enterpriseId}/invitations/{invitationId}',
|
|
133
|
+
devisTemplate:
|
|
134
|
+
'enterprises/{enterpriseId}/devisTemplates/{devisTemplateId}',
|
|
135
|
+
estimation: 'enterprises/{enterpriseId}/estimations/{estimationId}',
|
|
136
|
+
userNotification:
|
|
137
|
+
'users/{userId}/profiles/{enterpriseId}/notifications/{notificationId}',
|
|
138
|
+
history: 'enterprises/{enterpriseId}/histories/{historyId}',
|
|
139
|
+
receptionVouchers:
|
|
140
|
+
'enterprises/{enterpriseId}/projects/{projectId}/receptionVouchers/{receptionVoucherId}',
|
|
141
|
+
notification: 'enterprises/{enterpriseId}/notifications/{notificationId}',
|
|
142
|
+
nomenclatures:
|
|
143
|
+
'enterprises/{enterpriseId}/nomenclatures/{nomenclatureId}',
|
|
144
|
+
category: 'enterprises/{enterpriseId}/categories/{categoryId}',
|
|
145
|
+
operationsCatalogs:
|
|
146
|
+
'enterprises/{enterpriseId}/operationsCatalogs/{operationsCatalogId}',
|
|
147
|
+
operationsGroups:
|
|
148
|
+
'enterprises/{enterpriseId}/operationsGroups/{operationsGroupId}',
|
|
149
|
+
operation:
|
|
150
|
+
'enterprises/{enterpriseId}/operationsCatalogs/{operationsCatalogId}/operations/{operationId}',
|
|
151
|
+
operationMaterial:
|
|
152
|
+
'enterprises/{enterpriseId}/operationsCatalogs/{operationsCatalogId}/operations/{operationId}/materials/{operationMaterialId}',
|
|
153
|
+
devisVersion:
|
|
154
|
+
'enterprises/{enterpriseId}/projects/{projectId}/devis/{devisId}/versions/{versionId}',
|
|
155
|
+
enterpriseDocument: 'enterprises/{enterpriseId}/documents/{documentId}',
|
|
156
|
+
enterpriseMedia: 'enterprises/{enterpriseId}/medias/{mediaId}',
|
|
157
|
+
configuration:
|
|
158
|
+
'enterprises/{enterpriseId}/configurations/{configurationId}',
|
|
159
|
+
log: 'enterprises/{enterpriseId}/logs/{logId}',
|
|
160
|
+
systemVersion: 'systemVersions/{systemVersionId}',
|
|
161
|
+
evaluationConfig:
|
|
162
|
+
'enterprises/{enterpriseId}/evaluationsConfig/{evaluationConfigId}',
|
|
163
|
+
evaluation: 'enterprises/{enterpriseId}/evaluations/{evaluationId}',
|
|
164
|
+
devisCandidate:
|
|
165
|
+
'enterprises/{enterpriseId}/projects/{projectId}/devisCandidates/{devisCandidateId}',
|
|
166
|
+
workOrder: 'enterprises/{enterpriseId}/workOrders/{workOrderId}',
|
|
167
|
+
candidature:
|
|
168
|
+
'enterprises/{enterpriseId}/projects/{projectId}/candidatures/{candidatureId}',
|
|
169
|
+
serviceOrder:
|
|
170
|
+
'enterprises/{enterpriseId}/projects/{projectId}/serviceOrders/{serviceOrderId}',
|
|
171
|
+
marketplaceOrder:
|
|
172
|
+
'enterprises/{enterpriseId}/projects/{projectId}/marketplaceOrders/{marketplaceOrderId}',
|
|
173
|
+
marketplaceNotification:
|
|
174
|
+
'enterprises/{enterpriseId}/projects/{projectId}/marketplaceNotifications/{marketplaceNotificationId}',
|
|
175
|
+
},
|
|
176
|
+
indexes: {
|
|
177
|
+
// users
|
|
178
|
+
admins: 'admins', // 1
|
|
179
|
+
agents: 'agents', // 2
|
|
180
|
+
pros: 'pros', // 3
|
|
181
|
+
sellers: 'sellers', // 4
|
|
182
|
+
clients: 'clients', // 5
|
|
183
|
+
// projects
|
|
184
|
+
projects: 'projects', // 6
|
|
185
|
+
medias: 'projects-medias', // 7
|
|
186
|
+
events: 'projects-events', // 8
|
|
187
|
+
devis: 'projects-devis', // 9
|
|
188
|
+
// configuration
|
|
189
|
+
providers: 'providers', // 10
|
|
190
|
+
materials: 'materials', // 11
|
|
191
|
+
operations: 'operations', // 12
|
|
192
|
+
operationsMaterials: 'operations-materials', // 13
|
|
193
|
+
estimations: 'estimations', // 14
|
|
194
|
+
nomenclatures: 'nomenclatures', // 15
|
|
195
|
+
workOrders: 'workOrders', // 16
|
|
196
|
+
// used only for managment
|
|
197
|
+
systemMaterials: 'system-materials', // 17
|
|
198
|
+
systemOperations: 'system-operations', // 18
|
|
199
|
+
systemOperationsMaterials: 'system-operations-materials', // 19
|
|
200
|
+
systemMaterialsProvider: 'system-materials-provider', // 20
|
|
201
|
+
systemStatus: 'system-status', // 21
|
|
202
|
+
systemNomenclatures: 'system-nomenclatures', // 22
|
|
203
|
+
systemCategories: 'system-categories', // 23
|
|
204
|
+
},
|
|
205
|
+
},
|
|
206
|
+
search: {
|
|
207
|
+
// users
|
|
208
|
+
agents: {
|
|
209
|
+
searchableAttributes: [
|
|
210
|
+
'email',
|
|
211
|
+
'displayName',
|
|
212
|
+
'address',
|
|
213
|
+
'phone.mobile',
|
|
214
|
+
'jobTitle',
|
|
215
|
+
],
|
|
216
|
+
attributesForFaceting: [
|
|
217
|
+
'active',
|
|
218
|
+
'isLeader',
|
|
219
|
+
'leader',
|
|
220
|
+
'searchable(userId)',
|
|
221
|
+
'has_leader',
|
|
222
|
+
'searchable(email)',
|
|
223
|
+
'searchable(scope)',
|
|
224
|
+
'status',
|
|
225
|
+
],
|
|
226
|
+
maxValuesPerFacet: 1000,
|
|
227
|
+
maxFacetHits: 100,
|
|
228
|
+
},
|
|
229
|
+
pros: {
|
|
230
|
+
searchableAttributes: [
|
|
231
|
+
'email',
|
|
232
|
+
'displayName',
|
|
233
|
+
'address',
|
|
234
|
+
'phone.mobile',
|
|
235
|
+
'jobTitle',
|
|
236
|
+
],
|
|
237
|
+
attributesForFaceting: [
|
|
238
|
+
'active',
|
|
239
|
+
'searchable(userId)',
|
|
240
|
+
'searchable(email)',
|
|
241
|
+
'searchable(specialities)',
|
|
242
|
+
'searchable(skills)',
|
|
243
|
+
'searchable(regions)',
|
|
244
|
+
'searchable(scope)',
|
|
245
|
+
'status',
|
|
246
|
+
'siren',
|
|
247
|
+
'searchable(leaderId)',
|
|
248
|
+
],
|
|
249
|
+
maxValuesPerFacet: 1000,
|
|
250
|
+
maxFacetHits: 100,
|
|
251
|
+
},
|
|
252
|
+
admins: {
|
|
253
|
+
searchableAttributes: [
|
|
254
|
+
'email',
|
|
255
|
+
'displayName',
|
|
256
|
+
'address',
|
|
257
|
+
'phone.mobile',
|
|
258
|
+
'jobTitle',
|
|
259
|
+
'status',
|
|
260
|
+
],
|
|
261
|
+
attributesForFaceting: [
|
|
262
|
+
'active',
|
|
263
|
+
'searchable(email)',
|
|
264
|
+
'searchable(userId)',
|
|
265
|
+
'searchable(scope)',
|
|
266
|
+
'status',
|
|
267
|
+
],
|
|
268
|
+
maxValuesPerFacet: 1000,
|
|
269
|
+
maxFacetHits: 100,
|
|
270
|
+
},
|
|
271
|
+
sellers: {
|
|
272
|
+
searchableAttributes: [
|
|
273
|
+
'email',
|
|
274
|
+
'displayName',
|
|
275
|
+
'address',
|
|
276
|
+
'phone.mobile',
|
|
277
|
+
'jobTitle',
|
|
278
|
+
],
|
|
279
|
+
attributesForFaceting: [
|
|
280
|
+
'active',
|
|
281
|
+
'isLeader',
|
|
282
|
+
'leader',
|
|
283
|
+
'has_leader',
|
|
284
|
+
'searchable(userId)',
|
|
285
|
+
'searchable(email)',
|
|
286
|
+
'searchable(provider)',
|
|
287
|
+
'searchable(scope)',
|
|
288
|
+
'status',
|
|
289
|
+
],
|
|
290
|
+
maxValuesPerFacet: 1000,
|
|
291
|
+
maxFacetHits: 100,
|
|
292
|
+
},
|
|
293
|
+
clients: {
|
|
294
|
+
searchableAttributes: ['email', 'displayName', 'address', 'phone.mobile'],
|
|
295
|
+
attributesForFaceting: [
|
|
296
|
+
'active',
|
|
297
|
+
'userId',
|
|
298
|
+
'searchable(email)',
|
|
299
|
+
'searchable(scope)',
|
|
300
|
+
],
|
|
301
|
+
maxValuesPerFacet: 1000,
|
|
302
|
+
maxFacetHits: 100,
|
|
303
|
+
},
|
|
304
|
+
// projects
|
|
305
|
+
projects: {
|
|
306
|
+
searchableAttributes: [
|
|
307
|
+
'name',
|
|
308
|
+
'address',
|
|
309
|
+
'description',
|
|
310
|
+
'price.total',
|
|
311
|
+
'client.displayName',
|
|
312
|
+
'client.email',
|
|
313
|
+
'client.address',
|
|
314
|
+
'client.phone.number',
|
|
315
|
+
'pro.displayName',
|
|
316
|
+
'pro.email',
|
|
317
|
+
'agents.displayName',
|
|
318
|
+
'agents.email',
|
|
319
|
+
'sellers.displayName',
|
|
320
|
+
'sellers.email',
|
|
321
|
+
'provider.name',
|
|
322
|
+
'status',
|
|
323
|
+
'workOrderId.region',
|
|
324
|
+
'workOrderId.skills',
|
|
325
|
+
],
|
|
326
|
+
attributesForFaceting: [
|
|
327
|
+
'parent.id',
|
|
328
|
+
'price.total',
|
|
329
|
+
'searchable(type)',
|
|
330
|
+
'searchable(priority)',
|
|
331
|
+
'searchable(status)',
|
|
332
|
+
'client.userId',
|
|
333
|
+
'searchable(client.displayName)',
|
|
334
|
+
'searchable(client.email)',
|
|
335
|
+
'agents.userId',
|
|
336
|
+
'searchable(agents.displayName)',
|
|
337
|
+
'searchable(agents.email)',
|
|
338
|
+
'searchable(pro.userId)',
|
|
339
|
+
'searchable(pro.displayName)',
|
|
340
|
+
'searchable(pro.email)',
|
|
341
|
+
'searchable(sellers.userId)',
|
|
342
|
+
'searchable(sellers.displayName)',
|
|
343
|
+
'searchable(sellers.email)',
|
|
344
|
+
'searchable(provider.id)',
|
|
345
|
+
'searchable(provider.name)',
|
|
346
|
+
'searchable(category)',
|
|
347
|
+
'searchable(agentManager)',
|
|
348
|
+
'searchable(agentReference)',
|
|
349
|
+
'searchable(sellerManager)',
|
|
350
|
+
'searchable(sellerReference)',
|
|
351
|
+
'searchable(scope)',
|
|
352
|
+
'searchable(marketplaceStatus)',
|
|
353
|
+
'searchable(candidates)',
|
|
354
|
+
'searchable(workOrderId.region)',
|
|
355
|
+
'searchable(workOrderId.skills)',
|
|
356
|
+
'searchable(professionals)',
|
|
357
|
+
'searchable(marketplaceEntity)',
|
|
358
|
+
],
|
|
359
|
+
ranking: [
|
|
360
|
+
'attribute',
|
|
361
|
+
'desc(updatedAt)',
|
|
362
|
+
'proximity',
|
|
363
|
+
'typo',
|
|
364
|
+
'geo',
|
|
365
|
+
'words',
|
|
366
|
+
'filters',
|
|
367
|
+
'exact',
|
|
368
|
+
],
|
|
369
|
+
maxValuesPerFacet: 1000,
|
|
370
|
+
maxFacetHits: 100,
|
|
371
|
+
},
|
|
372
|
+
medias: {
|
|
373
|
+
searchableAttributes: ['name'],
|
|
374
|
+
attributesForFaceting: [
|
|
375
|
+
'owner',
|
|
376
|
+
'searchable(tags)',
|
|
377
|
+
'projectId',
|
|
378
|
+
'searchable(scope)',
|
|
379
|
+
'createdDate',
|
|
380
|
+
],
|
|
381
|
+
ranking: ['desc(createdAt)'],
|
|
382
|
+
maxValuesPerFacet: 1000,
|
|
383
|
+
maxFacetHits: 100,
|
|
384
|
+
},
|
|
385
|
+
events: {
|
|
386
|
+
searchableAttributes: ['title', 'type'],
|
|
387
|
+
attributesForFaceting: [
|
|
388
|
+
'type',
|
|
389
|
+
'searchable(start)',
|
|
390
|
+
'searchable(end)',
|
|
391
|
+
'owner',
|
|
392
|
+
'projectId',
|
|
393
|
+
'searchable(scope)',
|
|
394
|
+
],
|
|
395
|
+
ranking: ['desc(start)'],
|
|
396
|
+
maxValuesPerFacet: 1000,
|
|
397
|
+
maxFacetHits: 100,
|
|
398
|
+
},
|
|
399
|
+
devis: {
|
|
400
|
+
searchableAttributes: ['name', 'status'],
|
|
401
|
+
attributesForFaceting: [
|
|
402
|
+
'searchable(status)',
|
|
403
|
+
'operationsCatalog',
|
|
404
|
+
'projectId',
|
|
405
|
+
'searchable(scope)',
|
|
406
|
+
'pdf_generated',
|
|
407
|
+
],
|
|
408
|
+
ranking: ['desc(dateApproved)', 'desc(status)', 'desc(updatedAt)'],
|
|
409
|
+
maxValuesPerFacet: 1000,
|
|
410
|
+
maxFacetHits: 100,
|
|
411
|
+
},
|
|
412
|
+
// configuration
|
|
413
|
+
providers: {
|
|
414
|
+
searchableAttributes: [
|
|
415
|
+
'name',
|
|
416
|
+
'contact.name',
|
|
417
|
+
'contact.email',
|
|
418
|
+
'address',
|
|
419
|
+
'siret',
|
|
420
|
+
],
|
|
421
|
+
attributesForFaceting: [
|
|
422
|
+
'tva',
|
|
423
|
+
'commission.enterprise',
|
|
424
|
+
'commission.pro',
|
|
425
|
+
'commission.provider',
|
|
426
|
+
'searchable(scope)',
|
|
427
|
+
],
|
|
428
|
+
maxValuesPerFacet: 1000,
|
|
429
|
+
maxFacetHits: 100,
|
|
430
|
+
},
|
|
431
|
+
materials: {
|
|
432
|
+
searchableAttributes: ['name', 'unitPrice', 'provider'],
|
|
433
|
+
attributesForFaceting: [
|
|
434
|
+
'unitPrice',
|
|
435
|
+
'searchable(scope)',
|
|
436
|
+
'searchable(provider)',
|
|
437
|
+
'searchable(category)',
|
|
438
|
+
'margin.id',
|
|
439
|
+
'supplier.id',
|
|
440
|
+
],
|
|
441
|
+
ranking: ['asc(name)'],
|
|
442
|
+
maxValuesPerFacet: 1000,
|
|
443
|
+
maxFacetHits: 100,
|
|
444
|
+
},
|
|
445
|
+
operations: {
|
|
446
|
+
searchableAttributes: ['name', 'unitPrice', 'objectID'],
|
|
447
|
+
attributesForFaceting: [
|
|
448
|
+
'unitPrice',
|
|
449
|
+
'searchable(lot)',
|
|
450
|
+
'searchable(scope)',
|
|
451
|
+
'searchable(catalogId)',
|
|
452
|
+
'searchable(category)',
|
|
453
|
+
],
|
|
454
|
+
maxValuesPerFacet: 1000,
|
|
455
|
+
maxFacetHits: 100,
|
|
456
|
+
},
|
|
457
|
+
operationsMaterials: {
|
|
458
|
+
searchableAttributes: ['name', 'unitPrice', 'unit', 'externalId'],
|
|
459
|
+
attributesForFaceting: [
|
|
460
|
+
'searchable(scope)',
|
|
461
|
+
'searchable(provider)',
|
|
462
|
+
'searchable(optId)',
|
|
463
|
+
'searchable(externalId)',
|
|
464
|
+
],
|
|
465
|
+
ranking: ['asc(order)'],
|
|
466
|
+
maxValuesPerFacet: 1000,
|
|
467
|
+
maxFacetHits: 100,
|
|
468
|
+
},
|
|
469
|
+
estimations: {
|
|
470
|
+
searchableAttributes: [
|
|
471
|
+
'name',
|
|
472
|
+
'address',
|
|
473
|
+
'type',
|
|
474
|
+
'typeProject',
|
|
475
|
+
'client.displayName',
|
|
476
|
+
'client.email',
|
|
477
|
+
'client.address',
|
|
478
|
+
'client.phone.mobile',
|
|
479
|
+
'sellers.displayName',
|
|
480
|
+
'sellers.email',
|
|
481
|
+
'sellers.phone.mobile',
|
|
482
|
+
'provider.name',
|
|
483
|
+
],
|
|
484
|
+
attributesForFaceting: [
|
|
485
|
+
'searchable(type)',
|
|
486
|
+
'searchable(typeProject)',
|
|
487
|
+
'searchable(scope)',
|
|
488
|
+
'searchable(owner.userId)',
|
|
489
|
+
],
|
|
490
|
+
ranking: ['desc(updatedAt)'],
|
|
491
|
+
maxValuesPerFacet: 1000,
|
|
492
|
+
maxFacetHits: 100,
|
|
493
|
+
},
|
|
494
|
+
nomenclatures: {
|
|
495
|
+
searchableAttributes: ['value'],
|
|
496
|
+
attributesForFaceting: [
|
|
497
|
+
'searchable(scope)',
|
|
498
|
+
'searchable(identifier)',
|
|
499
|
+
'searchable(status)',
|
|
500
|
+
],
|
|
501
|
+
ranking: ['asc(value)'],
|
|
502
|
+
maxValuesPerFacet: 1000,
|
|
503
|
+
maxFacetHits: 100,
|
|
504
|
+
},
|
|
505
|
+
workOrders: {
|
|
506
|
+
searchableAttributes: [
|
|
507
|
+
'reference',
|
|
508
|
+
'address',
|
|
509
|
+
'estimatedPrice',
|
|
510
|
+
'owner.displayName',
|
|
511
|
+
],
|
|
512
|
+
attributesForFaceting: [
|
|
513
|
+
'owner',
|
|
514
|
+
'searchable(scope)',
|
|
515
|
+
'searchable(priority)',
|
|
516
|
+
'searchable(status)',
|
|
517
|
+
'searchable(skills)',
|
|
518
|
+
'searchable(region)',
|
|
519
|
+
'searchable(agenceName)',
|
|
520
|
+
'searchable(client)',
|
|
521
|
+
'searchable(owner.userId)',
|
|
522
|
+
'searchable(region)',
|
|
523
|
+
'searchable(agenceName)',
|
|
524
|
+
'searchable(skills)',
|
|
525
|
+
'searchable(client)',
|
|
526
|
+
'searchable(marketplaceEntity)',
|
|
527
|
+
],
|
|
528
|
+
ranking: ['desc(createdAt)'],
|
|
529
|
+
maxValuesPerFacet: 1000,
|
|
530
|
+
maxFacetHits: 100,
|
|
531
|
+
},
|
|
532
|
+
// used only for managment
|
|
533
|
+
systemMaterials: {
|
|
534
|
+
searchableAttributes: ['name', 'unitPrice'],
|
|
535
|
+
attributesForFaceting: [
|
|
536
|
+
'unitPrice',
|
|
537
|
+
'searchable(provider)',
|
|
538
|
+
'searchable(category)',
|
|
539
|
+
],
|
|
540
|
+
ranking: ['desc(updatedAt)'],
|
|
541
|
+
maxValuesPerFacet: 1000,
|
|
542
|
+
maxFacetHits: 100,
|
|
543
|
+
},
|
|
544
|
+
systemOperations: {
|
|
545
|
+
searchableAttributes: ['name', 'unitPrice'],
|
|
546
|
+
attributesForFaceting: ['searchable(lot)'],
|
|
547
|
+
ranking: ['desc(updatedAt)'],
|
|
548
|
+
maxValuesPerFacet: 1000,
|
|
549
|
+
maxFacetHits: 100,
|
|
550
|
+
},
|
|
551
|
+
systemOperationsMaterials: {
|
|
552
|
+
searchableAttributes: ['name', 'unitPrice', 'unit', 'externalId'],
|
|
553
|
+
attributesForFaceting: ['searchable(provider)', 'searchable(optId)'],
|
|
554
|
+
ranking: ['asc(order)'],
|
|
555
|
+
maxValuesPerFacet: 1000,
|
|
556
|
+
maxFacetHits: 100,
|
|
557
|
+
},
|
|
558
|
+
systemMaterialsProvider: {
|
|
559
|
+
searchableAttributes: ['name', 'status'],
|
|
560
|
+
attributesForFaceting: [
|
|
561
|
+
'searchable(status)',
|
|
562
|
+
'searchable(identifier)',
|
|
563
|
+
'searchable(addMaterials)',
|
|
564
|
+
'searchable(editable)',
|
|
565
|
+
'searchable(type)',
|
|
566
|
+
],
|
|
567
|
+
ranking: ['desc(updatedAt)'],
|
|
568
|
+
maxValuesPerFacet: 1000,
|
|
569
|
+
maxFacetHits: 100,
|
|
570
|
+
},
|
|
571
|
+
systemStatus: {
|
|
572
|
+
searchableAttributes: ['name', 'color'],
|
|
573
|
+
attributesForFaceting: [
|
|
574
|
+
'searchable(forDashboard)',
|
|
575
|
+
'searchable(default)',
|
|
576
|
+
],
|
|
577
|
+
ranking: ['asc(order)'],
|
|
578
|
+
maxValuesPerFacet: 1000,
|
|
579
|
+
maxFacetHits: 100,
|
|
580
|
+
},
|
|
581
|
+
systemNomenclatures: {
|
|
582
|
+
searchableAttributes: ['identifier', 'value'],
|
|
583
|
+
attributesForFaceting: ['searchable(identifier)', 'searchable(status)'],
|
|
584
|
+
ranking: ['desc(updatedAt)'],
|
|
585
|
+
maxValuesPerFacet: 1000,
|
|
586
|
+
maxFacetHits: 100,
|
|
587
|
+
},
|
|
588
|
+
systemCategories: {
|
|
589
|
+
searchableAttributes: ['name'],
|
|
590
|
+
attributesForFaceting: [
|
|
591
|
+
'searchable(entity)',
|
|
592
|
+
'searchable(parent)',
|
|
593
|
+
'searchable(provider)',
|
|
594
|
+
],
|
|
595
|
+
ranking: ['asc(name)'],
|
|
596
|
+
maxValuesPerFacet: 1000,
|
|
597
|
+
maxFacetHits: 100,
|
|
598
|
+
},
|
|
599
|
+
},
|
|
600
|
+
};
|
|
601
|
+
|
|
602
|
+
export default productionEnvironment;
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
import { Environment, EnvironmentDecorator } from './types';
|
|
2
|
+
|
|
3
|
+
const dev: EnvironmentDecorator = (base: Environment) => ({
|
|
4
|
+
...base,
|
|
5
|
+
isTest: true,
|
|
6
|
+
name: 'development',
|
|
7
|
+
});
|
|
8
|
+
|
|
9
|
+
const staging: EnvironmentDecorator = (base: Environment) => ({
|
|
10
|
+
...base,
|
|
11
|
+
isTest: false,
|
|
12
|
+
name: 'staging',
|
|
13
|
+
});
|
|
14
|
+
|
|
15
|
+
const test: EnvironmentDecorator = (base: Environment) => ({
|
|
16
|
+
...base,
|
|
17
|
+
schema: {
|
|
18
|
+
...base.schema,
|
|
19
|
+
indexes: {
|
|
20
|
+
// tslint:disable-next-line: object-literal-sort-keys
|
|
21
|
+
clients: 'tests-clients',
|
|
22
|
+
pros: 'tests-pros',
|
|
23
|
+
agents: 'tests-agents',
|
|
24
|
+
sellers: 'tests-sellers',
|
|
25
|
+
projects: 'tests-projects',
|
|
26
|
+
medias: 'tests-projects-medias',
|
|
27
|
+
events: 'tests-projects-events',
|
|
28
|
+
devis: 'tests-projects-devis',
|
|
29
|
+
admins: 'tests-admins',
|
|
30
|
+
providers: 'tests-providers',
|
|
31
|
+
materials: 'tests-materials',
|
|
32
|
+
operations: 'tests-operations',
|
|
33
|
+
operationsMaterials: 'test-operations-materials',
|
|
34
|
+
materialsProvider: 'materials-provider',
|
|
35
|
+
devisTemplates: 'devis-templates',
|
|
36
|
+
estimations: 'estimations',
|
|
37
|
+
categories: 'categories',
|
|
38
|
+
operationsCatalogs: 'operations-catalogs',
|
|
39
|
+
nomenclatures: 'nomenclatures',
|
|
40
|
+
operationsGroups: 'operations-groups',
|
|
41
|
+
workOrders: 'work-orders',
|
|
42
|
+
// used only for managment
|
|
43
|
+
systemMaterials: 'system-materials',
|
|
44
|
+
systemOperations: 'system-operations',
|
|
45
|
+
systemOperationsMaterials: 'system-operations-materials',
|
|
46
|
+
systemMaterialsProvider: 'system-materials-provider',
|
|
47
|
+
systemStatus: 'test-system-status',
|
|
48
|
+
systemNomenclatures: 'test-system-nomenclatures',
|
|
49
|
+
systemCategories: 'system-categories',
|
|
50
|
+
},
|
|
51
|
+
},
|
|
52
|
+
isTest: true,
|
|
53
|
+
name: 'test',
|
|
54
|
+
});
|
|
55
|
+
|
|
56
|
+
const emulator: EnvironmentDecorator = (base: Environment) => ({
|
|
57
|
+
...base,
|
|
58
|
+
schema: {
|
|
59
|
+
...base.schema,
|
|
60
|
+
indexes: {
|
|
61
|
+
// tslint:disable-next-line: object-literal-sort-keys
|
|
62
|
+
clients: 'emulator-clients',
|
|
63
|
+
pros: 'emulator-pros',
|
|
64
|
+
agents: 'emulator-agents',
|
|
65
|
+
sellers: 'emulator-sellers',
|
|
66
|
+
projects: 'emulator-projects',
|
|
67
|
+
medias: 'emulator-projects-medias',
|
|
68
|
+
events: 'emulator-projects-events',
|
|
69
|
+
devis: 'emulator-projects-devis',
|
|
70
|
+
admins: 'emulator-admins',
|
|
71
|
+
providers: 'emulator-providers',
|
|
72
|
+
materials: 'emulator-materials',
|
|
73
|
+
operations: 'emulator-operations',
|
|
74
|
+
operationsMaterials: 'emulator-operations-materials',
|
|
75
|
+
materialsProvider: 'materials-provider',
|
|
76
|
+
devisTemplates: 'devis-templates',
|
|
77
|
+
estimations: 'estimations',
|
|
78
|
+
categories: 'categories',
|
|
79
|
+
operationsCatalogs: 'operations-catalogs',
|
|
80
|
+
nomenclatures: 'nomenclatures',
|
|
81
|
+
operationsGroups: 'operations-groups',
|
|
82
|
+
workOrders: 'work-orders',
|
|
83
|
+
// used only for managment
|
|
84
|
+
systemMaterials: 'system-materials',
|
|
85
|
+
systemOperations: 'system-operations',
|
|
86
|
+
systemOperationsMaterials: 'system-operations-materials',
|
|
87
|
+
systemMaterialsProvider: 'system-materials-provider',
|
|
88
|
+
systemStatus: 'emulator-system-status',
|
|
89
|
+
systemNomenclatures: 'emulator-system-nomenclatures',
|
|
90
|
+
systemCategories: 'system-categories',
|
|
91
|
+
},
|
|
92
|
+
},
|
|
93
|
+
isTest: true,
|
|
94
|
+
name: 'emulator',
|
|
95
|
+
});
|
|
96
|
+
|
|
97
|
+
export { dev, staging, test, emulator };
|