@careflair/common 1.0.20 → 1.0.22

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/dist/index.d.ts CHANGED
@@ -5,4 +5,4 @@ export { AvailabilitiesSchemaZod, AvailabilityZodInput, } from "./schemas/availa
5
5
  export { HourlyRateInputZod, HourlyRateInputZodType, } from "./schemas/hourlyRateSchemaValidation";
6
6
  export { ServicesSchema, validateServices, } from "./schemas/businessServicesValidation";
7
7
  export { VideoProvider, VideoValidationResult, detectVideoProvider, isValidCommunityVideoUrl, isValidYouTubeOrVimeoUrl, validateVideoLink, } from "./utils/videoValidation";
8
- export { applicationSchema, ApplicationFormValues, isValidVideoUrl, } from "./schemas/applicationSchema";
8
+ export { ApplicationFormValues, applicationSchema, isValidVideoUrl, } from "./schemas/applicationSchema";
@@ -1,9 +1,9 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.applicationSchema = exports.isValidVideoUrl = void 0;
4
- const videoValidation_1 = require("../utils/videoValidation");
5
- const limits_1 = require("../constants/limits");
6
4
  const zod_1 = require("zod");
5
+ const limits_1 = require("../constants/limits");
6
+ const videoValidation_1 = require("../utils/videoValidation");
7
7
  // Helper function to validate YouTube or Vimeo URLs (using unified validation)
8
8
  const isValidVideoUrl = (url) => {
9
9
  return (0, videoValidation_1.isValidYouTubeOrVimeoUrl)(url);
@@ -1,8 +1,8 @@
1
- export { UserRegistrationInput, UserRegistrationSchema, } from "./userValiationSchema";
2
- export { EducationAndTrainingInputValidation, EducationAndTrainingSchema, } from "./educationSchemas";
3
- export { WorkHistoryInputValidation, WorkHistorySchema, } from "./workHistorySchema";
4
- export { AvailabilitiesSchemaZod, AvailabilityZodInput, } from "./availabilitySchemaValidation";
5
- export { HourlyRateInputZod, HourlyRateInputZodType, } from "./hourlyRateSchemaValidation";
6
- export { ServicesSchema, SupportWorkerServicesSchema, validateServices, validateSupportWorkerServices, } from "./businessServicesValidation";
7
- export { generalOTPSchema, pinSchema, ResetPasswordSchema } from "./otp";
8
- export { applicationSchema, ApplicationFormValues, isValidVideoUrl, } from "./applicationSchema";
1
+ export { UserRegistrationInput, UserRegistrationSchema } from "./userValiationSchema";
2
+ export { EducationAndTrainingInputValidation, EducationAndTrainingSchema } from "./educationSchemas";
3
+ export { WorkHistoryInputValidation, WorkHistorySchema } from "./workHistorySchema";
4
+ export { AvailabilitiesSchemaZod, AvailabilityZodInput } from "./availabilitySchemaValidation";
5
+ export { HourlyRateInputZod, HourlyRateInputZodType } from "./hourlyRateSchemaValidation";
6
+ export { ServicesSchema, SupportWorkerServicesSchema, validateServices, validateSupportWorkerServices } from "./businessServicesValidation";
7
+ export { ResetPasswordSchema, generalOTPSchema, pinSchema } from "./otp";
8
+ export { ApplicationFormValues, applicationSchema, isValidVideoUrl } from "./applicationSchema";
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.isValidVideoUrl = exports.applicationSchema = exports.ResetPasswordSchema = exports.pinSchema = exports.generalOTPSchema = exports.validateSupportWorkerServices = exports.validateServices = exports.SupportWorkerServicesSchema = exports.ServicesSchema = exports.HourlyRateInputZod = exports.AvailabilitiesSchemaZod = exports.WorkHistorySchema = exports.EducationAndTrainingSchema = exports.UserRegistrationSchema = void 0;
3
+ exports.isValidVideoUrl = exports.applicationSchema = exports.pinSchema = exports.generalOTPSchema = exports.ResetPasswordSchema = exports.validateSupportWorkerServices = exports.validateServices = exports.SupportWorkerServicesSchema = exports.ServicesSchema = exports.HourlyRateInputZod = exports.AvailabilitiesSchemaZod = exports.WorkHistorySchema = exports.EducationAndTrainingSchema = exports.UserRegistrationSchema = void 0;
4
4
  var userValiationSchema_1 = require("./userValiationSchema");
5
5
  Object.defineProperty(exports, "UserRegistrationSchema", { enumerable: true, get: function () { return userValiationSchema_1.UserRegistrationSchema; } });
6
6
  var educationSchemas_1 = require("./educationSchemas");
@@ -17,9 +17,9 @@ Object.defineProperty(exports, "SupportWorkerServicesSchema", { enumerable: true
17
17
  Object.defineProperty(exports, "validateServices", { enumerable: true, get: function () { return businessServicesValidation_1.validateServices; } });
18
18
  Object.defineProperty(exports, "validateSupportWorkerServices", { enumerable: true, get: function () { return businessServicesValidation_1.validateSupportWorkerServices; } });
19
19
  var otp_1 = require("./otp");
20
+ Object.defineProperty(exports, "ResetPasswordSchema", { enumerable: true, get: function () { return otp_1.ResetPasswordSchema; } });
20
21
  Object.defineProperty(exports, "generalOTPSchema", { enumerable: true, get: function () { return otp_1.generalOTPSchema; } });
21
22
  Object.defineProperty(exports, "pinSchema", { enumerable: true, get: function () { return otp_1.pinSchema; } });
22
- Object.defineProperty(exports, "ResetPasswordSchema", { enumerable: true, get: function () { return otp_1.ResetPasswordSchema; } });
23
23
  var applicationSchema_1 = require("./applicationSchema");
24
24
  Object.defineProperty(exports, "applicationSchema", { enumerable: true, get: function () { return applicationSchema_1.applicationSchema; } });
25
25
  Object.defineProperty(exports, "isValidVideoUrl", { enumerable: true, get: function () { return applicationSchema_1.isValidVideoUrl; } });
@@ -6,3 +6,4 @@ export * from "./enum";
6
6
  export * from "./video";
7
7
  export * from "./onboarding";
8
8
  export * from "./html";
9
+ export * from "./labels";
@@ -30,3 +30,5 @@ __exportStar(require("./video"), exports);
30
30
  __exportStar(require("./onboarding"), exports);
31
31
  // HTML sanitization utilities
32
32
  __exportStar(require("./html"), exports);
33
+ // Label helper utilities
34
+ __exportStar(require("./labels"), exports);
@@ -0,0 +1,4 @@
1
+ export declare const getSupportWorkerServiceLabel: (service: string) => string;
2
+ export declare const getGenderLabel: (gender: string) => string;
3
+ export declare const getPreferencesLabel: (preference: string) => string;
4
+ export declare const getAltCommunicationLabel: (altCommunication: string) => string;
@@ -0,0 +1,29 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getAltCommunicationLabel = exports.getPreferencesLabel = exports.getGenderLabel = exports.getSupportWorkerServiceLabel = void 0;
4
+ const constants_1 = require("../constants");
5
+ const enums_1 = require("../enums");
6
+ const getSupportWorkerServiceLabel = (service) => {
7
+ return (constants_1.SupportWorkerServiceLabels[service] || service);
8
+ };
9
+ exports.getSupportWorkerServiceLabel = getSupportWorkerServiceLabel;
10
+ const getGenderLabel = (gender) => {
11
+ return (enums_1.GenderOfAttendanceEnum[gender] ||
12
+ gender);
13
+ };
14
+ exports.getGenderLabel = getGenderLabel;
15
+ const getPreferencesLabel = (preference) => {
16
+ const preferences = {
17
+ SOLE_TRADER: 'Sole Trader',
18
+ ORGANISATION: 'Organisation',
19
+ ORGANIZATION: 'Organization',
20
+ NDIS_REGISTERED: 'NDIS Registered',
21
+ RATE_NEGOTIABLE: 'Rate Negotiable',
22
+ };
23
+ return preferences[preference] || preference;
24
+ };
25
+ exports.getPreferencesLabel = getPreferencesLabel;
26
+ const getAltCommunicationLabel = (altCommunication) => {
27
+ return (constants_1.altCommunicationLabels[altCommunication] || altCommunication);
28
+ };
29
+ exports.getAltCommunicationLabel = getAltCommunicationLabel;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@careflair/common",
3
- "version": "1.0.20",
3
+ "version": "1.0.22",
4
4
  "description": "Shared assets for CareFlair",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",