@becollective/utils 2.0.0 → 2.0.2

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.
@@ -3,27 +3,27 @@ declare const _default: {
3
3
  code: string;
4
4
  name: string;
5
5
  minorUnit: number;
6
- symbol: any;
6
+ symbol: string | undefined;
7
7
  prefix: string;
8
8
  };
9
9
  NZD: {
10
10
  code: string;
11
11
  name: string;
12
12
  minorUnit: number;
13
- symbol: any;
13
+ symbol: string | undefined;
14
14
  prefix: string;
15
15
  };
16
16
  GBP: {
17
17
  code: string;
18
18
  name: string;
19
19
  minorUnit: number;
20
- symbol: any;
20
+ symbol: string | undefined;
21
21
  };
22
22
  EUR: {
23
23
  code: string;
24
24
  name: string;
25
25
  minorUnit: number;
26
- symbol: any;
26
+ symbol: string | undefined;
27
27
  };
28
28
  };
29
29
  export default _default;
@@ -1 +1,677 @@
1
- export {};
1
+ export declare const constants: {
2
+ allowedHtmlTags: {
3
+ allowedTags: string[];
4
+ allowedAttributes: {
5
+ a: string[];
6
+ };
7
+ };
8
+ avatarColours: {
9
+ watusi: {
10
+ backgroundColour: string;
11
+ textColour: string;
12
+ };
13
+ hawkesBlue: {
14
+ backgroundColour: string;
15
+ textColour: string;
16
+ };
17
+ botticelli: {
18
+ backgroundColour: string;
19
+ textColour: string;
20
+ };
21
+ surfCrest: {
22
+ backgroundColour: string;
23
+ textColour: string;
24
+ };
25
+ quarterSpanishWhite: {
26
+ backgroundColour: string;
27
+ textColour: string;
28
+ };
29
+ buttermilk: {
30
+ backgroundColour: string;
31
+ textColour: string;
32
+ };
33
+ fog: {
34
+ backgroundColour: string;
35
+ textColour: string;
36
+ };
37
+ mabel: {
38
+ backgroundColour: string;
39
+ textColour: string;
40
+ };
41
+ };
42
+ currencies: {
43
+ AUD: {
44
+ code: string;
45
+ name: string;
46
+ minorUnit: number;
47
+ symbol: string | undefined;
48
+ prefix: string;
49
+ };
50
+ NZD: {
51
+ code: string;
52
+ name: string;
53
+ minorUnit: number;
54
+ symbol: string | undefined;
55
+ prefix: string;
56
+ };
57
+ GBP: {
58
+ code: string;
59
+ name: string;
60
+ minorUnit: number;
61
+ symbol: string | undefined;
62
+ };
63
+ EUR: {
64
+ code: string;
65
+ name: string;
66
+ minorUnit: number;
67
+ symbol: string | undefined;
68
+ };
69
+ };
70
+ customFields: {
71
+ maxMongoStringLength: number;
72
+ maxFileSizeBytes: number;
73
+ emailReferenceHeadingString: string;
74
+ uploadBatchSize: number;
75
+ fNameReferenceHeadingString: string;
76
+ lNameReferenceHeadingString: string;
77
+ maxNumberOfRows: number;
78
+ templateFileName: string;
79
+ };
80
+ countries: {
81
+ BD: string;
82
+ BE: string;
83
+ BF: string;
84
+ BG: string;
85
+ BA: string;
86
+ BB: string;
87
+ WF: string;
88
+ BL: string;
89
+ BM: string;
90
+ BN: string;
91
+ BO: string;
92
+ BH: string;
93
+ BI: string;
94
+ BJ: string;
95
+ BT: string;
96
+ JM: string;
97
+ BV: string;
98
+ BW: string;
99
+ WS: string;
100
+ BQ: string;
101
+ BR: string;
102
+ BS: string;
103
+ JE: string;
104
+ BY: string;
105
+ BZ: string;
106
+ RU: string;
107
+ RW: string;
108
+ RS: string;
109
+ TL: string;
110
+ RE: string;
111
+ TM: string;
112
+ TJ: string;
113
+ RO: string;
114
+ TK: string;
115
+ GW: string;
116
+ GU: string;
117
+ GT: string;
118
+ GS: string;
119
+ GR: string;
120
+ GQ: string;
121
+ GP: string;
122
+ JP: string;
123
+ GY: string;
124
+ GG: string;
125
+ GF: string;
126
+ GE: string;
127
+ GD: string;
128
+ GB: string;
129
+ GA: string;
130
+ SV: string;
131
+ GN: string;
132
+ GM: string;
133
+ GL: string;
134
+ GI: string;
135
+ GH: string;
136
+ OM: string;
137
+ TN: string;
138
+ JO: string;
139
+ HR: string;
140
+ HT: string;
141
+ HU: string;
142
+ HK: string;
143
+ HN: string;
144
+ HM: string;
145
+ VE: string;
146
+ PR: string;
147
+ PS: string;
148
+ PW: string;
149
+ PT: string;
150
+ SJ: string;
151
+ PY: string;
152
+ IQ: string;
153
+ PA: string;
154
+ PF: string;
155
+ PG: string;
156
+ PE: string;
157
+ PK: string;
158
+ PH: string;
159
+ PN: string;
160
+ PL: string;
161
+ PM: string;
162
+ ZM: string;
163
+ EH: string;
164
+ EE: string;
165
+ EG: string;
166
+ ZA: string;
167
+ EC: string;
168
+ IT: string;
169
+ VN: string;
170
+ SB: string;
171
+ ET: string;
172
+ SO: string;
173
+ ZW: string;
174
+ SA: string;
175
+ ES: string;
176
+ ER: string;
177
+ ME: string;
178
+ MD: string;
179
+ MG: string;
180
+ MF: string;
181
+ MA: string;
182
+ MC: string;
183
+ UZ: string;
184
+ MM: string;
185
+ ML: string;
186
+ MO: string;
187
+ MN: string;
188
+ MH: string;
189
+ MK: string;
190
+ MU: string;
191
+ MT: string;
192
+ MW: string;
193
+ MV: string;
194
+ MQ: string;
195
+ MP: string;
196
+ MS: string;
197
+ MR: string;
198
+ IM: string;
199
+ UG: string;
200
+ TZ: string;
201
+ MY: string;
202
+ MX: string;
203
+ IL: string;
204
+ FR: string;
205
+ IO: string;
206
+ SH: string;
207
+ FI: string;
208
+ FJ: string;
209
+ FK: string;
210
+ FM: string;
211
+ FO: string;
212
+ NI: string;
213
+ NL: string;
214
+ NO: string;
215
+ NA: string;
216
+ VU: string;
217
+ NC: string;
218
+ NE: string;
219
+ NF: string;
220
+ NG: string;
221
+ NZ: string;
222
+ NP: string;
223
+ NR: string;
224
+ NU: string;
225
+ CK: string;
226
+ XK: string;
227
+ CI: string;
228
+ CH: string;
229
+ CO: string;
230
+ CN: string;
231
+ CM: string;
232
+ CL: string;
233
+ CC: string;
234
+ CA: string;
235
+ CG: string;
236
+ CF: string;
237
+ CD: string;
238
+ CZ: string;
239
+ CY: string;
240
+ CX: string;
241
+ CR: string;
242
+ CW: string;
243
+ CV: string;
244
+ CU: string;
245
+ SZ: string;
246
+ SY: string;
247
+ SX: string;
248
+ KG: string;
249
+ KE: string;
250
+ SS: string;
251
+ SR: string;
252
+ KI: string;
253
+ KH: string;
254
+ KN: string;
255
+ KM: string;
256
+ ST: string;
257
+ SK: string;
258
+ KR: string;
259
+ SI: string;
260
+ KP: string;
261
+ KW: string;
262
+ SN: string;
263
+ SM: string;
264
+ SL: string;
265
+ SC: string;
266
+ KZ: string;
267
+ KY: string;
268
+ SG: string;
269
+ SE: string;
270
+ SD: string;
271
+ DO: string;
272
+ DM: string;
273
+ DJ: string;
274
+ DK: string;
275
+ VG: string;
276
+ DE: string;
277
+ YE: string;
278
+ DZ: string;
279
+ US: string;
280
+ UY: string;
281
+ YT: string;
282
+ UM: string;
283
+ LB: string;
284
+ LC: string;
285
+ LA: string;
286
+ TV: string;
287
+ TW: string;
288
+ TT: string;
289
+ TR: string;
290
+ LK: string;
291
+ LI: string;
292
+ LV: string;
293
+ TO: string;
294
+ LT: string;
295
+ LU: string;
296
+ LR: string;
297
+ LS: string;
298
+ TH: string;
299
+ TF: string;
300
+ TG: string;
301
+ TD: string;
302
+ TC: string;
303
+ LY: string;
304
+ VA: string;
305
+ VC: string;
306
+ AE: string;
307
+ AD: string;
308
+ AG: string;
309
+ AF: string;
310
+ AI: string;
311
+ VI: string;
312
+ IS: string;
313
+ IR: string;
314
+ AM: string;
315
+ AL: string;
316
+ AO: string;
317
+ AQ: string;
318
+ AS: string;
319
+ AR: string;
320
+ AU: string;
321
+ AT: string;
322
+ AW: string;
323
+ IN: string;
324
+ AX: string;
325
+ AZ: string;
326
+ IE: string;
327
+ ID: string;
328
+ UA: string;
329
+ QA: string;
330
+ MZ: string;
331
+ };
332
+ languages: string[];
333
+ distanceUnits: {
334
+ km: {
335
+ long: string;
336
+ short: string;
337
+ };
338
+ mi: {
339
+ long: string;
340
+ short: string;
341
+ };
342
+ };
343
+ groups: {
344
+ maxNumberOfGroupMembers: number;
345
+ defaultOptions: {
346
+ details: string[];
347
+ requirements: string[];
348
+ industries: string[];
349
+ };
350
+ groupTypes: {
351
+ name: string;
352
+ value: string;
353
+ }[];
354
+ };
355
+ insuranceStatuses: {
356
+ INSURED: {
357
+ value: string;
358
+ label: string;
359
+ };
360
+ UNINSURED: {
361
+ value: string;
362
+ label: string;
363
+ };
364
+ AUSPICED: {
365
+ value: string;
366
+ label: string;
367
+ };
368
+ };
369
+ insuranceTypes: {
370
+ publicLiabilityAU: {
371
+ type: string;
372
+ label: string;
373
+ };
374
+ volunteerAccidentAU: {
375
+ type: string;
376
+ label: string;
377
+ };
378
+ publicLiabilityGB: {
379
+ type: string;
380
+ label: string;
381
+ };
382
+ volunteerAccidentGB: {
383
+ type: string;
384
+ label: string;
385
+ };
386
+ publicLiabilityNZ: {
387
+ type: string;
388
+ label: string;
389
+ };
390
+ volunteerAccidentNZ: {
391
+ type: string;
392
+ label: string;
393
+ };
394
+ publicLiabilityOthers: {
395
+ type: string;
396
+ label: string;
397
+ };
398
+ volunteerAccidentOthers: {
399
+ type: string;
400
+ label: string;
401
+ };
402
+ };
403
+ locales: {
404
+ europeanCountryCodes: string[];
405
+ regionOptions: {
406
+ au: {
407
+ name: string;
408
+ domain: string;
409
+ hostname: string;
410
+ trademark: string;
411
+ twitter: string;
412
+ facebook: string;
413
+ instagram: string;
414
+ linkedin: string;
415
+ privacyPolicyUrl: string;
416
+ termsAndConditionsUrl: string;
417
+ privacyPolicyVersion: number;
418
+ termsAndConditionsVersion: number;
419
+ address: string;
420
+ };
421
+ nz: {
422
+ name: string;
423
+ domain: string;
424
+ hostname: string;
425
+ trademark: string;
426
+ twitter: string;
427
+ facebook: string;
428
+ instagram: string;
429
+ linkedin: string;
430
+ privacyPolicyUrl: string;
431
+ termsAndConditionsUrl: string;
432
+ privacyPolicyVersion: number;
433
+ termsAndConditionsVersion: number;
434
+ address: string;
435
+ };
436
+ uk: {
437
+ name: string;
438
+ domain: string;
439
+ hostname: string;
440
+ trademark: string;
441
+ twitter: string;
442
+ facebook: string;
443
+ instagram: string;
444
+ linkedin: string;
445
+ privacyPolicyUrl: string;
446
+ termsAndConditionsUrl: string;
447
+ privacyPolicyVersion: number;
448
+ termsAndConditionsVersion: number;
449
+ address: string;
450
+ };
451
+ };
452
+ countryOptions: {
453
+ AU: {
454
+ financialYearEndDate: {
455
+ month: number;
456
+ date: number;
457
+ };
458
+ distanceUnit: {
459
+ long: string;
460
+ short: string;
461
+ };
462
+ regions: {
463
+ long: string;
464
+ short: string;
465
+ }[];
466
+ insuranceTypes: {
467
+ type: string;
468
+ label: string;
469
+ }[];
470
+ };
471
+ NZ: {
472
+ financialYearEndDate: {
473
+ month: number;
474
+ date: number;
475
+ };
476
+ distanceUnit: {
477
+ long: string;
478
+ short: string;
479
+ };
480
+ insuranceTypes: {
481
+ type: string;
482
+ label: string;
483
+ }[];
484
+ };
485
+ GB: {
486
+ financialYearEndDate: {
487
+ month: number;
488
+ date: number;
489
+ };
490
+ distanceUnit: {
491
+ long: string;
492
+ short: string;
493
+ };
494
+ insuranceTypes: {
495
+ type: string;
496
+ label: string;
497
+ }[];
498
+ };
499
+ IE: {
500
+ financialYearEndDate: {
501
+ month: number;
502
+ date: number;
503
+ };
504
+ distanceUnit: {
505
+ long: string;
506
+ short: string;
507
+ };
508
+ insuranceTypes: {
509
+ type: string;
510
+ label: string;
511
+ }[];
512
+ };
513
+ Others: {
514
+ insuranceTypes: {
515
+ type: string;
516
+ label: string;
517
+ }[];
518
+ };
519
+ };
520
+ };
521
+ notifications: {
522
+ types: (string | {
523
+ messengerUpdates: string;
524
+ volunteerUpdates: string;
525
+ groupMemberUpdates: string;
526
+ groupInvitations: string;
527
+ opportunityInvitations: string;
528
+ opportunitiesSharedWithMe: string;
529
+ licenseCertificateExpiryNotice: string;
530
+ certificates: string;
531
+ } | {
532
+ membershipApplications: string;
533
+ volunteerApplications: string;
534
+ opportunityUpdates: string;
535
+ timesheets: string;
536
+ partnerships: string;
537
+ endorsements: string;
538
+ socialCurrency: string;
539
+ groupUpdates: string;
540
+ licenseCertificateExpiryNotice: string;
541
+ })[];
542
+ typesMap: {
543
+ volunteer: {
544
+ messengerUpdates: string;
545
+ volunteerUpdates: string;
546
+ groupMemberUpdates: string;
547
+ groupInvitations: string;
548
+ opportunityInvitations: string;
549
+ opportunitiesSharedWithMe: string;
550
+ licenseCertificateExpiryNotice: string;
551
+ certificates: string;
552
+ };
553
+ manager: {
554
+ membershipApplications: string;
555
+ volunteerApplications: string;
556
+ opportunityUpdates: string;
557
+ timesheets: string;
558
+ partnerships: string;
559
+ endorsements: string;
560
+ socialCurrency: string;
561
+ groupUpdates: string;
562
+ licenseCertificateExpiryNotice: string;
563
+ };
564
+ acquired: string;
565
+ };
566
+ };
567
+ opportunities: {
568
+ types: string[];
569
+ typesMap: {
570
+ roleFixed: string;
571
+ roleFlexible: string;
572
+ ongoing: string;
573
+ };
574
+ typesV2: string[];
575
+ typesMapV2: {
576
+ shift: string;
577
+ flexible: string;
578
+ };
579
+ statuses: string[];
580
+ volunteer: {
581
+ shiftStatus: {
582
+ approved: string;
583
+ cancelled: string;
584
+ left: string;
585
+ };
586
+ ruleStatus: {
587
+ approved: string;
588
+ cancelled: string;
589
+ };
590
+ volunteerStatus: {
591
+ approved: string;
592
+ pending: string;
593
+ invited: string;
594
+ declined: string;
595
+ left: string;
596
+ };
597
+ };
598
+ checklist: {
599
+ key: string;
600
+ value: string;
601
+ }[];
602
+ defaultOptions: {
603
+ details: {
604
+ currentJobTitle: string;
605
+ dateOfBirth: string;
606
+ emergencyContactDetails: string;
607
+ gender: string;
608
+ homeAddress: string;
609
+ phoneNumber: string;
610
+ };
611
+ requirements: {
612
+ driversLicense: string;
613
+ firstAidCertificate: string;
614
+ orientation: string;
615
+ policeCheck: string;
616
+ training: string;
617
+ workingWithChildrenCheck: string;
618
+ };
619
+ suitability: {
620
+ families: string;
621
+ deafHardOfHearing: string;
622
+ intellectuallyDisabled: string;
623
+ largeGroups: string;
624
+ skilledVolunteers: string;
625
+ travellingShortTermVolunteers: string;
626
+ blindLowVision: string;
627
+ volunteersWithLimitedEnglish: string;
628
+ wheelchairUsers: string;
629
+ workingExperience: string;
630
+ employeeVolunteers: string;
631
+ socialPrescribing: string;
632
+ publicTransportUsers: string;
633
+ LGBTQIAPlusCommunity: string;
634
+ LongTermVolunteers: string;
635
+ };
636
+ };
637
+ };
638
+ qualificationTypes: string[];
639
+ licencesAndCertifications: string[];
640
+ educationalQualifications: string[];
641
+ surveys: {
642
+ participantStatuses: {
643
+ notSent: string;
644
+ sent: string;
645
+ reSent: string;
646
+ responded: string;
647
+ };
648
+ subscriptionDowngradeReasons: {
649
+ featureLack: string;
650
+ expense: string;
651
+ difficulty: string;
652
+ technicalIssues: string;
653
+ other: string;
654
+ };
655
+ };
656
+ subscriptions: {
657
+ tierValues: {
658
+ none: number;
659
+ standard: number;
660
+ plus: number;
661
+ pro: number;
662
+ };
663
+ };
664
+ rules: {
665
+ daysOfTheWeek: {
666
+ label: string;
667
+ value: import("rrule").Weekday;
668
+ selected: boolean;
669
+ }[];
670
+ frequencyOptions: {
671
+ value: number;
672
+ label: string;
673
+ description: string;
674
+ }[];
675
+ };
676
+ };
677
+ export default constants;
package/lib/constants.js CHANGED
@@ -36,6 +36,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
36
36
  return (mod && mod.__esModule) ? mod : { "default": mod };
37
37
  };
38
38
  Object.defineProperty(exports, "__esModule", { value: true });
39
+ exports.constants = void 0;
39
40
  const allowedHtmlTags_1 = __importDefault(require("./constants/allowedHtmlTags"));
40
41
  const avatarColours_1 = __importDefault(require("./constants/avatarColours"));
41
42
  const countries_1 = __importDefault(require("./constants/countries"));
@@ -53,7 +54,7 @@ const rules_1 = __importDefault(require("./constants/rules"));
53
54
  const subscriptions_1 = __importDefault(require("./constants/subscriptions"));
54
55
  const surveys_1 = __importDefault(require("./constants/surveys"));
55
56
  const qualificationTypes_1 = __importStar(require("./constants/qualificationTypes"));
56
- module.exports = {
57
+ exports.constants = {
57
58
  allowedHtmlTags: allowedHtmlTags_1.default,
58
59
  avatarColours: avatarColours_1.default,
59
60
  currencies: currencies_1.default,
@@ -74,3 +75,4 @@ module.exports = {
74
75
  subscriptions: subscriptions_1.default,
75
76
  rules: rules_1.default,
76
77
  };
78
+ exports.default = exports.constants;
package/package.json CHANGED
@@ -1,8 +1,9 @@
1
1
  {
2
2
  "name": "@becollective/utils",
3
- "version": "2.0.0",
3
+ "version": "2.0.2",
4
4
  "description": "Common utilities",
5
- "main": "bundle.js",
5
+ "main": "lib/index.js",
6
+ "types": "lib/index.d.ts",
6
7
  "scripts": {
7
8
  "test": "npm run build && NODE_ENV=localtest jest --config jestconfig.json --detectOpenHandles --verbose --forceExit",
8
9
  "build": "tsc",
@@ -23,8 +24,8 @@
23
24
  "typescript": "^6.0.3"
24
25
  },
25
26
  "dependencies": {
26
- "@becollective/constants": "^3.11.0",
27
27
  "ajv": "^8.20.0",
28
+ "currency-symbol-map": "^5.1.0",
28
29
  "libphonenumber-js": "^1.13.5",
29
30
  "luxon": "^3.7.2",
30
31
  "rrule": "^2.8.1"
package/src/constants.ts CHANGED
@@ -17,7 +17,7 @@ import surveys from './constants/surveys';
17
17
 
18
18
  import qualificationTypes, { licencesAndCertifications, educationalQualifications } from './constants/qualificationTypes';
19
19
 
20
- module.exports = {
20
+ export const constants = {
21
21
  allowedHtmlTags,
22
22
  avatarColours,
23
23
  currencies,
@@ -38,3 +38,5 @@ module.exports = {
38
38
  subscriptions,
39
39
  rules,
40
40
  };
41
+
42
+ export default constants;