5htp 0.3.8 → 0.4.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.
Files changed (99) hide show
  1. package/package.json +1 -1
  2. package/src/compiler/common/babel/routes/routes.ts +13 -2
  3. package/src/compiler/common/index.ts +3 -1
  4. package/src/compiler/common/plugins/indexage/icones-svg/index.ts +3 -3
  5. package/src/compiler/index.ts +34 -12
  6. package/skeleton/Dockerfile +0 -20
  7. package/skeleton/docker-compose.yml +0 -37
  8. package/skeleton/identity.yaml +0 -21
  9. package/skeleton/package.json +0 -48
  10. package/skeleton/src/client/assets/identity/logo.svg +0 -14
  11. package/skeleton/src/client/assets/identity/logoAndText.svg +0 -10
  12. package/skeleton/src/client/assets/identity/logoAndTextBlack.svg +0 -11
  13. package/skeleton/src/client/assets/illustration/landing/banner.webp +0 -0
  14. package/skeleton/src/client/assets/illustration/landing/candidate/employers.webp +0 -0
  15. package/skeleton/src/client/assets/illustration/landing/candidate/hero.webp +0 -0
  16. package/skeleton/src/client/assets/illustration/landing/candidate/mentors.webp +0 -0
  17. package/skeleton/src/client/assets/illustration/landing/headhunter/hero.webp +0 -0
  18. package/skeleton/src/client/assets/illustration/landing/hero.jpeg +0 -0
  19. package/skeleton/src/client/assets/illustration/landing/hero.webp +0 -0
  20. package/skeleton/src/client/assets/illustration/landing/hero.xcf +0 -0
  21. package/skeleton/src/client/assets/illustration/landing/recruiter/onboarding.webp +0 -0
  22. package/skeleton/src/client/assets/illustration/landing/team/andre.png +0 -0
  23. package/skeleton/src/client/assets/illustration/landing/team/emma.png +0 -0
  24. package/skeleton/src/client/assets/illustration/landing/team/fei.png +0 -0
  25. package/skeleton/src/client/assets/illustration/landing/team/gaetan.png +0 -0
  26. package/skeleton/src/client/assets/illustration/landing/team/jordan.png +0 -0
  27. package/skeleton/src/client/assets/illustration/landing/team/lery.png +0 -0
  28. package/skeleton/src/client/assets/illustration/landing/team/mehdi.png +0 -0
  29. package/skeleton/src/client/assets/illustration/landing/team/omkar.png +0 -0
  30. package/skeleton/src/client/assets/illustration/landing/team/thibaut.png +0 -0
  31. package/skeleton/src/client/assets/illustration/launch.jpg +0 -0
  32. package/skeleton/src/client/assets/img/background/header-blur.png +0 -0
  33. package/skeleton/src/client/assets/img/partners/citron.svg +0 -987
  34. package/skeleton/src/client/assets/logos/google-play-store.svg +0 -1
  35. package/skeleton/src/client/assets/logos/googleauth.svg +0 -9
  36. package/skeleton/src/client/assets/patterns/dots.png +0 -0
  37. package/skeleton/src/client/assets/patterns/interlaced.png +0 -0
  38. package/skeleton/src/client/assets/theme.less +0 -231
  39. package/skeleton/src/client/assets/vars.less +0 -54
  40. package/skeleton/src/client/context.ts +0 -23
  41. package/skeleton/src/client/index.ts +0 -59
  42. package/skeleton/src/client/pages/_messages/400.tsx +0 -45
  43. package/skeleton/src/client/pages/_messages/401.tsx +0 -39
  44. package/skeleton/src/client/pages/_messages/403.tsx +0 -43
  45. package/skeleton/src/client/pages/_messages/404.tsx +0 -42
  46. package/skeleton/src/client/pages/_messages/500.tsx +0 -42
  47. package/skeleton/src/client/pages/platform/Header.less +0 -12
  48. package/skeleton/src/client/pages/platform/Header.tsx +0 -119
  49. package/skeleton/src/client/pages/platform/_layout/index.less +0 -118
  50. package/skeleton/src/client/pages/platform/_layout/index.tsx +0 -131
  51. package/skeleton/src/client/pages/platform/_layout/mobile.less +0 -114
  52. package/skeleton/src/client/pages/platform/_page.tsx +0 -54
  53. package/skeleton/src/client/pages/platform/headhunters/index.tsx +0 -88
  54. package/skeleton/src/client/pages/platform/index.tsx +0 -58
  55. package/skeleton/src/client/pages/platform/missions/index.tsx +0 -149
  56. package/skeleton/src/client/pages/preload.json +0 -3
  57. package/skeleton/src/client/services/metrics/index.ts +0 -59
  58. package/skeleton/src/client/tsconfig.json +0 -31
  59. package/skeleton/src/common/config/router.ts +0 -16
  60. package/skeleton/src/common/forms/company/bookCall.ts +0 -25
  61. package/skeleton/src/common/forms/company/importJob.ts +0 -26
  62. package/skeleton/src/common/forms/company/signup.ts +0 -31
  63. package/skeleton/src/common/forms/headhunter/feedback.ts +0 -31
  64. package/skeleton/src/common/forms/headhunter/mission/cancel.ts +0 -26
  65. package/skeleton/src/common/forms/headhunter/mission/candidate/availability.ts +0 -31
  66. package/skeleton/src/common/forms/headhunter/mission/candidate/education.ts +0 -19
  67. package/skeleton/src/common/forms/headhunter/mission/candidate/identity.ts +0 -31
  68. package/skeleton/src/common/forms/headhunter/mission/candidate/others.ts +0 -19
  69. package/skeleton/src/common/forms/headhunter/mission/candidate/skills.ts +0 -21
  70. package/skeleton/src/common/forms/headhunter/mission/reject.ts +0 -23
  71. package/skeleton/src/common/forms/headhunter/mission/search.ts +0 -78
  72. package/skeleton/src/common/forms/headhunter/signup.ts +0 -34
  73. package/skeleton/src/common/libs/headhunter/candidate/index.ts +0 -155
  74. package/skeleton/src/common/libs/headhunter/mission/index.ts +0 -30
  75. package/skeleton/src/common/libs/hub/index.ts +0 -41
  76. package/skeleton/src/common/tsconfig.json +0 -10
  77. package/skeleton/src/server/config/communication.ts +0 -48
  78. package/skeleton/src/server/config/crosspath.ts +0 -9
  79. package/skeleton/src/server/config/data.ts +0 -34
  80. package/skeleton/src/server/config/database.ts +0 -26
  81. package/skeleton/src/server/config/internal.ts +0 -21
  82. package/skeleton/src/server/config/user.ts +0 -90
  83. package/skeleton/src/server/index.ts +0 -111
  84. package/skeleton/src/server/libs/utils/slug.ts +0 -11
  85. package/skeleton/src/server/routes/global.ts +0 -33
  86. package/skeleton/src/server/routes/headhunters.ts +0 -24
  87. package/skeleton/src/server/routes/missions.ts +0 -50
  88. package/skeleton/src/server/services/Headhunter/index.ts +0 -127
  89. package/skeleton/src/server/services/Headhunter/service.json +0 -6
  90. package/skeleton/src/server/services/Mission/index.ts +0 -174
  91. package/skeleton/src/server/services/Mission/service.json +0 -6
  92. package/skeleton/src/server/services/email/sendgrid/index.ts +0 -97
  93. package/skeleton/src/server/services/email/sendgrid/service.json +0 -6
  94. package/skeleton/src/server/services/slack/index.ts +0 -105
  95. package/skeleton/src/server/services/slack/service.json +0 -6
  96. package/skeleton/src/server/services/users/index.ts +0 -133
  97. package/skeleton/src/server/services/users/service.json +0 -6
  98. package/skeleton/src/server/tsconfig.json +0 -32
  99. package/skeleton/var/typings/routes.d.ts +0 -541
@@ -1,133 +0,0 @@
1
- /*----------------------------------
2
- - DEPENDANCES
3
- ----------------------------------*/
4
-
5
- // npm
6
- import sha1 from 'sha1';
7
- import hInterval from 'human-interval';
8
-
9
- // Core
10
- import type { Request as ServerRequest } from '@server/services/router';
11
- import jsonMask from '@server/services/router/response/mask';
12
-
13
- // App
14
- import { SQL, AES } from '@app';
15
- import { InternalCollaborator } from '@/server/models';
16
- import UsersManagementService, { THttpRequest } from '@server/services/users';
17
- import { Forbidden } from '@common/errors';
18
-
19
- /*----------------------------------
20
- - CONFIG
21
- ----------------------------------*/
22
-
23
- const ssrMask = `
24
- firstName
25
- name
26
- `
27
-
28
- /*----------------------------------
29
- - TYPES
30
- ----------------------------------*/
31
-
32
- export type User = InternalCollaborator
33
-
34
- type TJwtSession = {
35
- email: string
36
- }
37
-
38
- /*----------------------------------
39
- - SERVICE
40
- ----------------------------------*/
41
- export default class UsersManagement extends UsersManagementService<User, CrossPathCSM, TJwtSession> {
42
-
43
- protected displayName(user?: User | null) {
44
- return user ? user.email : 'Guest';
45
- }
46
-
47
- protected displaySessionName(session: TJwtSession) {
48
- return session.email;
49
- }
50
-
51
- public forSSR( request: ServerRequest ) {
52
- return request.user
53
- ? jsonMask(request.user, ssrMask, request.user)
54
- : null
55
- }
56
-
57
- /*----------------------------------
58
- - ACTIONS
59
- ----------------------------------*/
60
- public async login( email: string, password: string, request: ServerRequest ) {
61
-
62
- console.log(`try to login ${email} with ${password}`);
63
-
64
- // Check password
65
- const user = await SQL`
66
- SELECT *
67
- FROM InternalCollaborator
68
- WHERE email = ${email}
69
- `.first<User>();
70
-
71
- // Account not activated yet
72
- if (!user)
73
- throw new Forbidden(`No account exists with this email.`);
74
-
75
- console.log(user.airtableId, password);
76
-
77
- // Check password
78
- if (user.airtableId !== password)
79
- throw new Forbidden(`Bad password`);
80
-
81
- const token = await this.createSession({ email }, request);
82
-
83
- return { token, user }
84
- }
85
-
86
- public async decodeSession( session: TJwtSession, req: THttpRequest ): Promise<User | null> {
87
-
88
- // Email is mandatory for indentifying the sessin
89
- if (!session.email) {
90
- console.warn("No email provided in JWT decrypted session:", session);
91
- throw new Forbidden(`Unvalid session`);
92
- }
93
-
94
- let user = await SQL`
95
- SELECT *
96
- FROM InternalCollaborator
97
- WHERE email = ${session.email}
98
- `.first<User>();
99
-
100
- if (!user)
101
- return null;
102
-
103
- user = {
104
- ...user,
105
- roles: ['USER']
106
- }
107
-
108
- return user;
109
- }
110
-
111
- public decodeToken( token: string ) {
112
-
113
- // Decode
114
- let decoded: string;
115
- try {
116
- decoded = AES.decrypt('activationToken', token);
117
- } catch (error) {
118
- throw new Forbidden("This activation token is invalid.");
119
- }
120
-
121
- // Extract data
122
- const [email, expirationTimeStr] = decoded.split('::::');
123
-
124
- // Check expiration date
125
- if (!!expirationTimeStr) {
126
- const expirationTime = parseInt(expirationTimeStr);
127
- if (Date.now() > expirationTime)
128
- throw new Forbidden("This link has expired. Please renew your password reset request.");
129
- }
130
-
131
- return email;
132
- }
133
- }
@@ -1,6 +0,0 @@
1
- {
2
- "id": "CrossPath/Users",
3
- "name": "CrossPathUsers",
4
- "parent": "app",
5
- "dependences": []
6
- }
@@ -1,32 +0,0 @@
1
- {
2
- "extends": "../../node_modules/5htp-core/tsconfig.common.json",
3
- "compilerOptions": {
4
- "rootDir": "..",
5
- "baseUrl": "..",
6
- "paths": {
7
-
8
- // Temp workaround because rootDir ignored in the package for type check
9
- "5htp-airtable/*": ["../node_modules/5htp-airtable/src/*"],
10
-
11
- "@/server/models": ["./server/.generated/models"],
12
-
13
- "@client/*": ["../node_modules/5htp-core/src/client/*"],
14
- "@common/*": ["../node_modules/5htp-core/src/common/*"],
15
- "@server/*": ["../node_modules/5htp-core/src/server/*"],
16
-
17
- "@/*": ["./*"],
18
-
19
- // ATTENTION: Les références à preact doivent toujours pointer vers la même instance
20
- "react": ["preact/compat"],
21
- "react-dom/test-utils": ["preact/test-utils"],
22
- "react-dom": ["preact/compat"], // Must be below test-utils
23
- "react/jsx-runtime": ["preact/jsx-runtime"]
24
- }
25
- },
26
-
27
- "include": [
28
- ".",
29
- "../../var/typings",
30
- ".generated/services.d.ts",
31
- ]
32
- }
@@ -1,541 +0,0 @@
1
-
2
- declare type Routes = {
3
-
4
- '/admin/heahdunters/kpis': {
5
- params: {
6
-
7
- }
8
- }
9
- ,
10
- '/admin/headhunters': {
11
- params: {
12
-
13
- }
14
- }
15
- ,
16
- '/admin/headhunters/:id': {
17
- params: {
18
- 'id': string
19
- }
20
- }
21
- ,
22
- '/admin/headhunters/:recordId/login': {
23
- params: {
24
- 'recordId': string
25
- }
26
- }
27
- ,
28
- '/admin/headhunters/missions/current': {
29
- params: {
30
-
31
- }
32
- }
33
- ,
34
- '/admin/headhunters/missions/suggested': {
35
- params: {
36
-
37
- }
38
- }
39
- ,
40
- '/admin/headhunters/missions/candidates': {
41
- params: {
42
-
43
- }
44
- }
45
- ,
46
- '/companies/signup/import/:companyName': {
47
- params: {
48
- 'companyName': string
49
- }
50
- }
51
- ,
52
- '/companies/signup/import/:companyName': {
53
- params: {
54
- 'companyName': string
55
- }
56
- }
57
- ,
58
- '/companies/signup': {
59
- params: {
60
-
61
- }
62
- }
63
- ,
64
- '/companies/r/:referrerId': {
65
- params: {
66
- 'referrerId': string
67
- }
68
- }
69
- ,
70
- '/company/:companySlug/:resourceType(logo|cover).webp': {
71
- params: {
72
- 'companySlug': string,
73
- 'resourceType': string
74
- }
75
- }
76
- ,
77
- '/recruiter/:slug/photo.webp': {
78
- params: {
79
- 'slug': string
80
- }
81
- }
82
- ,
83
- '*': {
84
- params: {
85
- '0': string
86
- }
87
- }
88
- ,
89
- '/send-activation-links': {
90
- params: {
91
-
92
- }
93
- }
94
- ,
95
- '/headhunters/signup': {
96
- params: {
97
-
98
- }
99
- }
100
- ,
101
- '/headhunters/login': {
102
- params: {
103
-
104
- }
105
- }
106
- ,
107
- '/headhunters/login': {
108
- params: {
109
-
110
- }
111
- }
112
- ,
113
- '/headhunters/login/reset': {
114
- params: {
115
-
116
- }
117
- }
118
- ,
119
- '/headhunters/login/reset/:token': {
120
- params: {
121
- 'token': string
122
- }
123
- }
124
- ,
125
- '/headhunters/logout': {
126
- params: {
127
-
128
- }
129
- }
130
- ,
131
- '/headhunters/r/:referrerId': {
132
- params: {
133
- 'referrerId': string
134
- }
135
- }
136
- ,
137
- '/headhunters/signup/linkedin': {
138
- params: {
139
-
140
- }
141
- }
142
- ,
143
- '/headhunters/signup/linkedin/response': {
144
- params: {
145
-
146
- }
147
- }
148
- ,
149
- '/headhunter/awards': {
150
- params: {
151
-
152
- }
153
- }
154
- ,
155
- '/headhunter/refer': {
156
- params: {
157
-
158
- }
159
- }
160
- ,
161
- '/help/terms-and-conditions': {
162
- params: {
163
-
164
- }
165
- }
166
- ,
167
- '/headhunters/consent/terms-and-conditions': {
168
- params: {
169
-
170
- }
171
- }
172
- ,
173
- '/headhunter/kpis': {
174
- params: {
175
-
176
- }
177
- }
178
- ,
179
- '/headhunter/missions': {
180
- params: {
181
-
182
- }
183
- }
184
- ,
185
- '/headhunter/missions/suggest': {
186
- params: {
187
-
188
- }
189
- }
190
- ,
191
- '/headhunter/mission/:missionStatus(suggested|accepted)/:missionId': {
192
- params: {
193
- 'missionStatus': string,
194
- 'missionId': string
195
- }
196
- }
197
- ,
198
- '/headhunter/mission/accepted/:missionId/summary': {
199
- params: {
200
- 'missionId': string
201
- }
202
- }
203
- ,
204
- '/headhunter/mission/suggested/:missionId/accept': {
205
- params: {
206
- 'missionId': string
207
- }
208
- }
209
- ,
210
- '/headhunter/mission/suggested/:missionId/reject': {
211
- params: {
212
- 'missionId': string
213
- }
214
- }
215
- ,
216
- '/headhunter/mission/accepted/:missionId/cancel': {
217
- params: {
218
- 'missionId': string
219
- }
220
- }
221
- ,
222
- '/headhunter/mission/accepted/:missionId/candidate': {
223
- params: {
224
- 'missionId': string
225
- }
226
- }
227
- ,
228
- '/headhunter/mission/accepted/:mission/candidates': {
229
- params: {
230
- 'mission': string
231
- }
232
- }
233
- ,
234
- '/headhunter/mission/accepted/:missionId/cv/:cvFileName': {
235
- params: {
236
- 'missionId': string,
237
- 'cvFileName': string
238
- }
239
- }
240
- ,
241
- '/headhunter/onboarding': {
242
- params: {
243
-
244
- }
245
- }
246
- ,
247
- '/headhunter/onboarding/:questionId(introduction|country|sectors|positions|companySizes|hardSkills|targetLocations|languages|school|agency|clientsServed|usedTools|communities|seniorityAsRecruiter|seniorityAsFreelancer|minAcceptedBountyPc|finished)?': {
248
- params: {
249
- 'questionId': string
250
- }
251
- }
252
- ,
253
- '/headhunter/onboarding/status': {
254
- params: {
255
-
256
- }
257
- }
258
- ,
259
- '/hub/locations': {
260
- params: {
261
-
262
- }
263
- }
264
- ,
265
- '/hub/sectors': {
266
- params: {
267
-
268
- }
269
- }
270
- ,
271
- '/hub/positions': {
272
- params: {
273
-
274
- }
275
- }
276
- ,
277
- '/hub/languages': {
278
- params: {
279
-
280
- }
281
- }
282
- ,
283
- '/hub/companySizes': {
284
- params: {
285
-
286
- }
287
- }
288
- ,
289
- '/hub/skills/hard': {
290
- params: {
291
-
292
- }
293
- }
294
- ,
295
- '/hub/seniorities': {
296
- params: {
297
-
298
- }
299
- }
300
- ,
301
- '/hub/currencies': {
302
- params: {
303
-
304
- }
305
- }
306
- ,
307
- '/hub/team/:collaboratorSlug/:resourceType(photo).webp': {
308
- params: {
309
- 'collaboratorSlug': string,
310
- 'resourceType': string
311
- }
312
- }
313
- ,
314
- '/go/:recordId': {
315
- params: {
316
- 'recordId': string
317
- }
318
- }
319
- ,
320
- '/api/command': {
321
- params: {
322
-
323
- }
324
- }
325
- ,
326
- '/system/webhook/airtable': {
327
- params: {
328
-
329
- }
330
- }
331
- ,
332
- '/scraping/mission': {
333
- params: {
334
-
335
- }
336
- }
337
- ,
338
- '/companies/signup/import/:companyName?': {
339
- params: {
340
- 'companyName': string
341
- }
342
- }
343
- ,
344
- '/companies': {
345
- params: {
346
-
347
- }
348
- }
349
- ,
350
- '/companies/login': {
351
- params: {
352
-
353
- }
354
- }
355
- ,
356
- '/companies/pricing': {
357
- params: {
358
-
359
- }
360
- }
361
- ,
362
- '/companies/signup': {
363
- params: {
364
-
365
- }
366
- }
367
- ,
368
- '/faq': {
369
- params: {
370
-
371
- }
372
- }
373
- ,
374
- '/headhunters/signup/activate/:token': {
375
- params: {
376
- 'token': string
377
- }
378
- }
379
- ,
380
- '/headhunters': {
381
- params: {
382
-
383
- }
384
- }
385
- ,
386
- '/headhunters/login': {
387
- params: {
388
-
389
- }
390
- }
391
- ,
392
- '/headhunters/login/reset': {
393
- params: {
394
-
395
- }
396
- }
397
- ,
398
- '/headhunters/login/reset/:token': {
399
- params: {
400
- 'token': string
401
- }
402
- }
403
- ,
404
- '/headhunters/signup': {
405
- params: {
406
-
407
- }
408
- }
409
- ,
410
- '/help/privacy': {
411
- params: {
412
-
413
- }
414
- }
415
- ,
416
- '/help/terms-and-conditions': {
417
- params: {
418
-
419
- }
420
- }
421
- ,
422
- '/': {
423
- params: {
424
-
425
- }
426
- }
427
- ,
428
- '/admin/headhunters/missions/candidates': {
429
- params: {
430
-
431
- }
432
- }
433
- ,
434
- '/admin/headhunters/missions/current': {
435
- params: {
436
-
437
- }
438
- }
439
- ,
440
- '/admin/headhunters': {
441
- params: {
442
-
443
- }
444
- }
445
- ,
446
- '/admin/headhunters/missions/suggested': {
447
- params: {
448
-
449
- }
450
- }
451
- ,
452
- '/admin/headhunters/:id': {
453
- params: {
454
- 'id': string
455
- }
456
- }
457
- ,
458
- '/candidate': {
459
- params: {
460
-
461
- }
462
- }
463
- ,
464
- '/headhunter/awards': {
465
- params: {
466
-
467
- }
468
- }
469
- ,
470
- '/headhunter/candidates': {
471
- params: {
472
-
473
- }
474
- }
475
- ,
476
- '/headhunter/help': {
477
- params: {
478
-
479
- }
480
- }
481
- ,
482
- '/headhunter/learn': {
483
- params: {
484
-
485
- }
486
- }
487
- ,
488
- '/headhunter/:jobType(freelance|fullTime)?': {
489
- params: {
490
- 'jobType': string
491
- }
492
- }
493
- ,
494
- '/headhunter/mission/accepted/:companySlug/:missionId/submit': {
495
- params: {
496
- 'companySlug': string,
497
- 'missionId': string
498
- }
499
- }
500
- ,
501
- '/headhunter/mission/:status(suggested|accepted)/:companySlug/:missionId': {
502
- params: {
503
- 'status': string,
504
- 'companySlug': string,
505
- 'missionId': string
506
- }
507
- }
508
- ,
509
- '/headhunter/refer': {
510
- params: {
511
-
512
- }
513
- }
514
- ,
515
- '/headhunter/settings': {
516
- params: {
517
-
518
- }
519
- }
520
- ,
521
- '/headhunter/talent-pool': {
522
- params: {
523
-
524
- }
525
- }
526
- ,
527
- '/headhunter/consent/terms-and-conditions': {
528
- params: {
529
-
530
- }
531
- }
532
- ,
533
- '/headhunter/onboarding': {
534
- params: {
535
-
536
- }
537
- }
538
-
539
- }
540
- }
541
-