@tellescope/validation 1.224.0 → 1.226.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.
- package/lib/cjs/validation.d.ts +56 -2
- package/lib/cjs/validation.d.ts.map +1 -1
- package/lib/cjs/validation.js +92 -7
- package/lib/cjs/validation.js.map +1 -1
- package/lib/esm/validation.d.ts +56 -2
- package/lib/esm/validation.d.ts.map +1 -1
- package/lib/esm/validation.js +85 -0
- package/lib/esm/validation.js.map +1 -1
- package/lib/tsconfig.tsbuildinfo +1 -1
- package/package.json +7 -7
- package/src/validation.ts +97 -3
package/lib/cjs/validation.js
CHANGED
|
@@ -35,13 +35,13 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
35
35
|
};
|
|
36
36
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
37
37
|
exports.listValidatorUniqueOptionalEmptyOkay = exports.listValidatorUniqueEmptyOkay = exports.listValidatorUnique = exports.listValidatorOptionalOrEmptyOk = exports.listValidatorEmptyOk = exports.listValidator = exports.SMSMessageValidator = exports.stringValidator25000EmptyOkay = exports.stringValidator25000OptionalEmptyOkay = exports.stringValidator100000OptionalEmptyOkayEscapeHTML = exports.stringValidator100000OptionalEmptyOkay = exports.stringValidator100000EmptyOkay = exports.stringValidator25000 = exports.stringValidator5000Optional = exports.stringValidator5000EmptyOkay = exports.stringValidator20000ptional = exports.stringValidator5000 = exports.stringValidator1000Optional = exports.stringValidator1000 = exports.stringValidator250 = exports.stringValidator100EscapeHTML = exports.stringValidator100 = exports.stringValidator5000OptionalEmptyOkay = exports.stringValidatorOptionalEmptyOkay = exports.stringValidatorOptional = exports.stringValidator = exports.escapeString = exports.optionalAnyObjectValidator = exports.optionalEmptyObjectValidator = exports.objectAnyFieldsAnyValuesValidator = exports.objectAnyFieldsValidator = exports.listOfObjectsValidator = exports.objectValidator = exports.listValidatorOld = exports.objectValidatorOld = exports.convertCommands = exports.convertCommand = exports.filterCommandsValidator = exports.orValidator = exports.binaryOrValidator = exports.fieldsToValidationOld = exports.build_validator = exports.MAX_FILE_SIZE = exports.isURL = exports.isMimeType = exports.isMongoId = exports.isSlug = exports.isMobilePhone = exports.isEmail = exports.isDate = void 0;
|
|
38
|
-
exports.
|
|
39
|
-
exports.
|
|
40
|
-
exports.
|
|
41
|
-
exports.
|
|
42
|
-
exports.
|
|
43
|
-
exports.
|
|
44
|
-
exports.outOfOfficeBlocksValidator = exports.outOfOfficeBlockValidator = exports.recentViewersValidator = exports.recentViewerValidator = exports.enduserDiagnosisValidator = exports.bookingRestrictionsByTemplateValidator = exports.analyticsFrameGroupingCategoriesValidator = exports.analyticsFrameGroupingCategoryValidator = exports.fieldMappingsValidator = exports.fieldMappingValidator = exports.athenaSubscriptionsValidator = exports.athenaSubscriptionValidator = exports.athenaSubscriptionTypeValidator = exports.fieldsSyncValidator = exports.fieldSyncValidator = exports.syncDirectionValidator = exports.enduserProfileWebhooksValidator = exports.diagnosesValidator = exports.diagnosisValidator = exports.candidProcedureCodeValidator = exports.diagnosisTypeValidator = exports.DIAGNOSIS_TYPES = exports.sortingFieldsValidator = exports.groupMMSUserStatesValidator = exports.groupMMSUserStateValidator = exports.mmsMessagesValidator = exports.mmsMessageValidator = exports.imageAttachmentValidator = exports.isDateString = exports.phoneCallsReportQueriesValidator = exports.formResponsesReportQueriesValidator = exports.endusersReportQueriesValidator = exports.formFieldCalloutConditionsValidator = exports.tableViewColumnsValidator = exports.languageValidator = exports.formCustomizationValidator = exports.phoneTreeEnduserConditionValidator = exports.PHONE_TREE_ENDUSER_CONDITIONS = void 0;
|
|
38
|
+
exports.exactMatchValidatorOptional = exports.exactMatchValidator = exports.dateRangeOptionalValidator = exports.dateRangeValidator = exports.dateValidatorOptional = exports.dateOptionalOrEmptyStringValidator = exports.dateValidator = exports.numberOrStringValidatorOptional = exports.numberOrStringValidatorEmptyOkay = exports.fileSizeValidator = exports.numberValidatorMin0Max59Optional = exports.numberValidatorMin0Max23Optional = exports.numberValidatorMin1Max31 = exports.listOfNumbersValidatorUniqueOptionalOrEmptyOkay = exports.numberValidatorOptional = exports.numberValidator = exports.positiveNumberValidator = exports.nonNegNumberValidator = exports.numberValidatorBuilder = exports.emailValidatorEmptyOkay = exports.emailValidatorOptional = exports.emailValidator = exports.nameValidator = exports.escape_name = exports.first_letter_capitalized = exports.slugValidator = exports.sharedWithOrganizationIdsValidator = exports.listOfMongoIdStringValidatorOptionalOrEmptyOk = exports.listOfMongoIdStringValidatorEmptyOk = exports.listOfMongoIdStringValidatorOptional = exports.listOfMongoIdStringValidator = exports.mongoIdStringOptional = exports.mongoIdStringRequired = exports.listOfMongoIdValidator = exports.mongoIdOptional = exports.mongoIdRequired = exports.stringReadonlyValidator = exports.nullValidator = exports.buildMongoIdStringValidator = exports.mongoIdValidator = exports.escapeMongoId = exports.booleanValidatorOptional = exports.booleanValidator = exports.booleanValidatorBuilder = exports.listOfUniqueStringsValidatorEmptyOk = exports.listOfObjectAnyFieldsAnyValuesValidator = exports.listOfStringsValidatorUniqueOptionalOrEmptyOkay = exports.listOfStringsValidatorEmptyOk = exports.listOfStringsValidatorOptionalOrEmptyOk = exports.listOfStringsValidator = void 0;
|
|
39
|
+
exports.CHAT_ROOM_TYPES = exports.listOfFormFieldsValidator = exports.formFieldValidator = exports.intakeDateOfBirthValidator = exports.intakePhoneValidator = exports.formResponsesValidator = exports.formResponseValidator = exports.fullscriptDisabledForEnduser = exports.photonDisabledForEnduser = exports.mmddyyyyRegex = exports.formResponseAnswerValidator = exports.insuranceOptionalValidator = exports.tellescopeGenderOptionalValidator = exports.tellescopeGenderValidator = exports.TELLESCOPE_GENDER = exports.addressOptionalValidator = exports.addressValidator = exports.INTERNAL_NAME_TO_DISPLAY_FIELD = exports.RESERVED_INTAKE_FIELDS = exports.idStringToDateValidator = exports.numberToDateValidator = exports.rejectionWithMessage = exports.indexableNumberValidator = exports.indexableValidator = exports.validateIndexable = exports.emailEncodingValidator = exports.journeyStatesValidator = exports.journeyStateValidator = exports.journeyStatePriorityValidator = exports.updateOptionsValidator = exports.preferenceValidator = exports.fieldsValidator = exports.FORM_FIELD_VALIDATORS_BY_TYPE = exports.formFieldTypeValidator = exports.FORM_FIELD_TYPES = exports.labeledFieldsValidator = exports.signatureResponseValidator = exports.fileResponseValidator = exports.subdomainValidator = exports.safeBase64Validator = exports.urlValidator = exports.fileTypeValidator = exports.phoneValidatorOptional = exports.phoneValidator = exports.escape_phone_number = exports.journeysValidator = exports.stateValidatorOptional = exports.stateValidator = exports.VALID_STATES = exports.exactMatchListValidator = void 0;
|
|
40
|
+
exports.listOfCalendarEventRemindersValidator = exports.calendarEventReminderValidator = exports.messageTemplateModeValidator = exports.MESSAGE_TEMPLATE_MODES = exports.communicationsChannelValidatorOptional = exports.communicationsChannelValidator = exports.COMMUNICATIONS_CHANNELS = exports.automationActionTypeValidator = exports.AUTOMATION_ACTIONS = exports.automationEventTypeValidator = exports.AUTOMATION_EVENTS = exports.automatedActionStatusValidator = exports.AUTOMATION_ENDUSER_STATUS = exports.listOfStringsWithQualifierValidatorOptionalValuesEmptyOkay = exports.listOfStringsWithQualifierValidatorOptional = exports.listOfStringsWithQualifierValidator = exports.listQueryQualifiersValidator = exports.LIST_QUERY_QUALIFIERS = exports.chatRoomUserInfoValidator = exports.meetingDisplayInfoValidator = exports.userDisplayInfoValidator = exports.meetingsListValidator = exports.listOfGenericAttachmentsValidator = exports.genericAttachmentValidator = exports.listOfChatAttachmentsValidator = exports.chatAttachmentValidator = exports.calendarEventAttendeesValidator = exports.calendarEventAttendeeValidator = exports.listOfUserIndentitiesValidator = exports.userIdentityValidator = exports.meetingInfoValidator = exports.listOfAttendeesValidator = exports.attendeeValidator = exports.attendeeInfoValidator = exports.listOfDisplayNameInfo = exports.sessionTypeOrAnyoneValidatorOptional = exports.sessionTypeValidator = exports.WebhookSubscriptionValidator = exports.UnitOfTimeValidator = exports.UNITS_OF_TIME = exports.CUDValidator = exports.CUDStringValidator = exports.CUD = exports.meetingStatusValidator = exports.MEETING_STATUSES = exports.messageTemplateTypeValidator = exports.MESSAGE_TEMPLATE_TYPES = exports.accountTypeValidator = exports.ACCOUNT_TYPES = exports.chatRoomTypeValidator = void 0;
|
|
41
|
+
exports.blockValidator = exports.blockStyleValidator = exports.formFieldOptionsValidator = exports.formFieldFeedbackValidator = exports.tableInputChoiceValidator = exports.tableInputTypesValidator = exports.TABLE_INPUT_TYPES = exports.integrationAuthenticationsValidator = exports.flowchartUIValidator = exports.passwordValidator = exports.managedContentRecordAssignmentTypeValidator = exports.MANAGED_CONTENT_RECORD_ASSIGNMENT_TYPES = exports.managedContentRecordTypeValidator = exports.MANAGED_CONTENT_RECORD_TYPES = exports.organizationThemeValidator = exports.customPoliciesValidator = exports.portalSettingsValidator = exports.previousFormFieldsValidator = exports.previousFormFieldValidator = exports.FHIRObservationValueValidator = exports.FHIRObservationStatusCodeValidator = exports.FHIR_OBSERVATION_STATUS_CODES = exports.FHIRObservationCategoryValidator = exports.notificationPreferencesValidator = exports.notificationPreferenceValidator = exports.searchOptionsValidator = exports.relatedRecordsValidatorOptional = exports.listOfRelatedRecordsValidator = exports.relatedRecordValidator = exports.journeyContextValidator = exports.automationActionValidator = exports.AIDecisionSourceValidator = exports.canvasCodingValidatorOptional = exports.canvasCodingValidator = exports.developHealthMockResultValidator = exports.developHealthDiagnosesValidator = exports.developHealthDrugsValidator = exports.automationForMessageValidator = exports.smartMeterLinesValidator = exports.senderAssignmentStrategyValidatorOptional = exports.ticketActionsValidator = exports.ticketActionValidator = exports.ticketReminderValidator = exports.listOfAutomationConditionsValidator = exports.automationConditionValidator = exports.automationEventsValidator = exports.automationEventValidator = exports.cancelConditionsValidatorOptional = exports.cancelConditionsValidator = exports.cancelConditionValidator = void 0;
|
|
42
|
+
exports.vitalConfigurationRangeValidator = exports.vitalComparisonValidator = exports.calendarEventPortalSettingsValidator = exports.organizationSettingsValidator = exports.customDashboardViewValidator = exports.buildInFieldsValidator = exports.customEnduserFieldsValidatorOptionalOrEmpty = exports.customEnduserFieldValidator = exports.indexUpdatesValidator = exports.indexUpdateValidator = exports.availabilityEntitiesValidator = exports.AVAILABILITY_BLOCK_ENTITIES = exports.customEnduserFieldTypeValidator = exports.CUSTOM_ENDUSER_FIELD_TYPES = exports.accessValidator = exports.timezoneValidatorOptional = exports.timezoneValidator = exports.weeklyAvailabilitiesValidator = exports.weeklyAvailabilityValidator = exports.monthlyRestrictionOptionalValidator = exports.monthlyRestrictionValidator = exports.baseAvailabilityBlocksValidator = exports.baseAvailabilityBlockValidator = exports.stateCredentialsValidator = exports.stateCredentialValidator = exports.genericUnitWithQuantityValidator = exports.enduserFormResponsesForEventValidator = exports.enduserFormResponseForEventValidator = exports.enduserTasksForEventValidator = exports.enduserTaskForEventValidator = exports.portalTypeValidator = exports.PORTAL_BLOCK_TYPES = exports.portalBlocksValidator = exports.portalBlockValidator = exports.formTypeValidator = exports.FORM_TYPES = exports.portalPageValidator = exports.PORTAL_PAGES = exports.organizationAccessValidator = exports.databaseRecordValuesValidator = exports.databaseRecordValueValidator = exports.databaseFieldsValidator = exports.databaseFieldValidator = exports.is_database_record_field_type = exports.databaseRecordFieldTypeValidator = exports.DATABASE_RECORD_FIELD_TYPES = exports.blocksValidator = exports.is_block_type = exports.blockTypeValidator = exports.BLOCK_TYPES = void 0;
|
|
43
|
+
exports.phoneTreeEventValidator = exports.insurancesValidator = exports.enduserProfileViewBlocksValidator = exports.enduserProfileViewBlockValidator = exports.sharedEnduserProfileViewBlockFields = exports.externalChatGPTMessagesValidator = exports.userUIRestrictionsValidator = exports.userCallRoutingBehaviorValidator = exports.USER_CALL_ROUTING_BEHAVIORS = exports.analyticsQueryTypeValidator = exports.ANALYTICS_QUERY_TYPES = exports.analyticsFrameTypeValidator = exports.ANALYTICS_FRAME_TYPES = exports.analyticsQueriesValidatorOptional = exports.analyticsQueryValidator = exports.compoundFilterValidator = exports.basicFilterValidator = exports.formScoringValidator = exports.scheduledJourneysValidator = exports.analyticsQueryResultsValidator = exports.videoIntegrationTypesValidator = exports.VIDEO_INTEGRATION_TYPES = exports.integrationTitleValidator = exports.purchaseCreditValueValidator = exports.costValidator = exports.paymentProcessorValidator = exports.PAYMENT_PROCESSORS = exports.currencyValidator = exports.CURRENCIES = exports.appointmentTermsValidator = exports.loginFlowResultValidator = exports.LOGIN_FLOW_RESULTS = exports.organizationLimitsValidator = exports.accessPermissionsValidator = exports.accessPermissionValidator = exports.ticketSnoozesValidator = exports.superbillLineItemsValidator = exports.billingCodeValidatorOptional = exports.billingCodeValidator = exports.superbillProviderInfoValidator = exports.superbillPatientInfoValidator = exports.embeddingTypeValidator = exports.EMBEDDING_TYPES = exports.automatioNTriggerStatusValidator = exports.AUTOMATION_TRIGGER_STATUSES = exports.automationTriggerActionValidator = exports.AUTOMATION_TRIGGER_ACTION_TYPES = exports.automationTriggerEventValidator = exports.AUTOMATION_TRIGGER_EVENT_TYPES = exports.vitalConfigurationRangesValidator = void 0;
|
|
44
|
+
exports.outOfOfficeBlocksValidator = exports.outOfOfficeBlockValidator = exports.recentViewersValidator = exports.recentViewerValidator = exports.enduserDiagnosisValidator = exports.bookingRestrictionsByTemplateValidator = exports.analyticsFrameGroupingCategoriesValidator = exports.analyticsFrameGroupingCategoryValidator = exports.fieldMappingsValidator = exports.fieldMappingValidator = exports.athenaSubscriptionsValidator = exports.athenaSubscriptionValidator = exports.athenaSubscriptionTypeValidator = exports.fieldsSyncValidator = exports.fieldSyncValidator = exports.syncDirectionValidator = exports.enduserProfileWebhooksValidator = exports.diagnosesValidator = exports.diagnosisValidator = exports.candidProcedureCodeValidator = exports.diagnosisTypeValidator = exports.DIAGNOSIS_TYPES = exports.sortingFieldsValidator = exports.groupMMSUserStatesValidator = exports.groupMMSUserStateValidator = exports.mmsMessagesValidator = exports.mmsMessageValidator = exports.imageAttachmentValidator = exports.isDateString = exports.phoneCallsReportQueriesValidator = exports.formResponsesReportQueriesValidator = exports.endusersReportQueriesValidator = exports.formFieldCalloutConditionsValidator = exports.tableViewColumnsValidator = exports.languageValidator = exports.formCustomizationValidator = exports.phoneTreeEnduserConditionValidator = exports.PHONE_TREE_ENDUSER_CONDITIONS = exports.phoneTreeNodesValidator = exports.phoneTreeNodeValidator = exports.phoneTreeActionValidator = exports.phonePlaybackValidatorOptional = exports.phonePlaybackValidator = exports.phoneTreeEventsValidator = void 0;
|
|
45
45
|
var utilities_1 = require("@tellescope/utilities");
|
|
46
46
|
var types_models_1 = require("@tellescope/types-models");
|
|
47
47
|
Object.defineProperty(exports, "VALID_STATES", { enumerable: true, get: function () { return types_models_1.VALID_STATES; } });
|
|
@@ -898,6 +898,10 @@ exports.positiveNumberValidator = (0, exports.numberValidatorBuilder)({ lower: 1
|
|
|
898
898
|
exports.numberValidator = (0, exports.numberValidatorBuilder)({ lower: -10000000000000, upper: 10000000000000 }); // max is 2286 in UTC MS
|
|
899
899
|
exports.numberValidatorOptional = (0, exports.numberValidatorBuilder)({ lower: -10000000000000, upper: 10000000000000, isOptional: true, emptyStringOk: true }); // max is 2286 in UTC MS
|
|
900
900
|
exports.listOfNumbersValidatorUniqueOptionalOrEmptyOkay = (0, exports.listValidatorUniqueOptionalEmptyOkay)(exports.numberValidator, { isNumber: true });
|
|
901
|
+
// Day of month and time validators for automation events
|
|
902
|
+
exports.numberValidatorMin1Max31 = (0, exports.numberValidatorBuilder)({ lower: 1, upper: 31 });
|
|
903
|
+
exports.numberValidatorMin0Max23Optional = (0, exports.numberValidatorBuilder)({ lower: 0, upper: 23, isOptional: true });
|
|
904
|
+
exports.numberValidatorMin0Max59Optional = (0, exports.numberValidatorBuilder)({ lower: 0, upper: 59, isOptional: true });
|
|
901
905
|
exports.fileSizeValidator = (0, exports.numberValidatorBuilder)({ lower: 0, upper: exports.MAX_FILE_SIZE });
|
|
902
906
|
exports.numberOrStringValidatorEmptyOkay = (0, exports.orValidator)({
|
|
903
907
|
number: exports.numberValidator,
|
|
@@ -1975,6 +1979,7 @@ var _AUTOMATION_EVENTS = {
|
|
|
1975
1979
|
waitForTrigger: '',
|
|
1976
1980
|
onCallOutcome: '',
|
|
1977
1981
|
onAIDecision: '',
|
|
1982
|
+
onError: '',
|
|
1978
1983
|
};
|
|
1979
1984
|
exports.AUTOMATION_EVENTS = Object.keys(_AUTOMATION_EVENTS);
|
|
1980
1985
|
exports.automationEventTypeValidator = (0, exports.exactMatchValidator)(exports.AUTOMATION_EVENTS);
|
|
@@ -2141,6 +2146,10 @@ exports.automationEventValidator = (0, exports.orValidator)({
|
|
|
2141
2146
|
before: exports.booleanValidatorOptional,
|
|
2142
2147
|
}, { isOptional: true, emptyOk: true, }), eventCondition: (0, exports.objectValidator)({
|
|
2143
2148
|
before: exports.booleanValidatorOptional,
|
|
2149
|
+
}, { isOptional: true, emptyOk: true }), dayOfMonthCondition: (0, exports.objectValidator)({
|
|
2150
|
+
dayOfMonth: exports.numberValidatorMin1Max31,
|
|
2151
|
+
hour: exports.numberValidatorMin0Max23Optional,
|
|
2152
|
+
minute: exports.numberValidatorMin0Max59Optional,
|
|
2144
2153
|
}, { isOptional: true, emptyOk: true }), skipIfDelayPassed: exports.booleanValidatorOptional }), { emptyOk: false }),
|
|
2145
2154
|
}),
|
|
2146
2155
|
formUnsubmitted: (0, exports.objectValidator)({
|
|
@@ -2183,6 +2192,12 @@ exports.automationEventValidator = (0, exports.orValidator)({
|
|
|
2183
2192
|
outcomes: exports.listOfStringsValidator,
|
|
2184
2193
|
}, { emptyOk: false }),
|
|
2185
2194
|
}),
|
|
2195
|
+
onError: (0, exports.objectValidator)({
|
|
2196
|
+
type: (0, exports.exactMatchValidator)(['onError']),
|
|
2197
|
+
info: (0, exports.objectValidator)({
|
|
2198
|
+
automationStepId: exports.mongoIdStringRequired,
|
|
2199
|
+
}, { emptyOk: false }),
|
|
2200
|
+
}),
|
|
2186
2201
|
});
|
|
2187
2202
|
exports.automationEventsValidator = (0, exports.listValidatorEmptyOk)(exports.automationEventValidator);
|
|
2188
2203
|
exports.automationConditionValidator = (0, exports.orValidator)({
|
|
@@ -2541,6 +2556,7 @@ exports.automationActionValidator = (0, exports.orValidator)({
|
|
|
2541
2556
|
stripeChargeCardOnFile: (0, exports.objectValidator)(__assign(__assign({}, sharedAutomationActionValidators), { type: (0, exports.exactMatchValidator)(['stripeChargeCardOnFile']), info: (0, exports.objectValidator)({
|
|
2542
2557
|
stripeKey: exports.stringValidatorOptionalEmptyOkay,
|
|
2543
2558
|
priceIds: exports.listOfStringsValidatorEmptyOk,
|
|
2559
|
+
productIds: exports.listOfStringsValidatorOptionalOrEmptyOk,
|
|
2544
2560
|
subscriptionPriceId: exports.stringValidatorOptionalEmptyOkay,
|
|
2545
2561
|
}, { emptyOk: false }) // at least tags is required
|
|
2546
2562
|
})),
|
|
@@ -2576,6 +2592,8 @@ exports.journeyContextValidator = (0, exports.objectValidator)({
|
|
|
2576
2592
|
fileId: exports.mongoIdStringOptional,
|
|
2577
2593
|
chatRoomId: exports.mongoIdStringOptional,
|
|
2578
2594
|
twilioNumber: exports.stringValidatorOptionalEmptyOkay,
|
|
2595
|
+
ticketThreadId: exports.mongoIdStringOptional,
|
|
2596
|
+
ticketThreadCommentId: exports.mongoIdStringOptional,
|
|
2579
2597
|
});
|
|
2580
2598
|
exports.relatedRecordValidator = (0, exports.objectValidator)({
|
|
2581
2599
|
type: exports.stringValidator100,
|
|
@@ -2801,6 +2819,7 @@ exports.formFieldOptionsValidator = (0, exports.objectValidator)({
|
|
|
2801
2819
|
})),
|
|
2802
2820
|
validFileTypes: exports.listOfStringsValidatorOptionalOrEmptyOk,
|
|
2803
2821
|
maxFileSize: exports.numberValidatorOptional,
|
|
2822
|
+
hideFromPortal: exports.booleanValidatorOptional,
|
|
2804
2823
|
productIds: exports.listOfStringsValidatorOptionalOrEmptyOk,
|
|
2805
2824
|
chargeImmediately: exports.booleanValidatorOptional,
|
|
2806
2825
|
signatureUrl: exports.stringValidator5000Optional,
|
|
@@ -2873,74 +2892,94 @@ exports.formFieldOptionsValidator = (0, exports.objectValidator)({
|
|
|
2873
2892
|
elationAppendToNotePrefix: exports.stringValidatorOptionalEmptyOkay,
|
|
2874
2893
|
allowAddToDatabase: exports.booleanValidatorOptional,
|
|
2875
2894
|
});
|
|
2895
|
+
exports.blockStyleValidator = (0, exports.objectValidator)({
|
|
2896
|
+
width: exports.numberValidatorOptional,
|
|
2897
|
+
height: exports.numberValidatorOptional,
|
|
2898
|
+
backgroundColor: exports.stringValidatorOptional,
|
|
2899
|
+
borderColor: exports.stringValidatorOptional,
|
|
2900
|
+
borderWidth: exports.numberValidatorOptional,
|
|
2901
|
+
textColor: exports.stringValidatorOptional,
|
|
2902
|
+
}, { isOptional: true, emptyOk: true });
|
|
2876
2903
|
exports.blockValidator = (0, exports.orValidator)({
|
|
2877
2904
|
h1: (0, exports.objectValidator)({
|
|
2878
2905
|
type: (0, exports.exactMatchValidator)(['h1']),
|
|
2879
2906
|
info: (0, exports.objectValidator)({
|
|
2880
2907
|
text: exports.stringValidator5000EmptyOkay,
|
|
2881
2908
|
}),
|
|
2909
|
+
style: exports.blockStyleValidator,
|
|
2882
2910
|
}),
|
|
2883
2911
|
h2: (0, exports.objectValidator)({
|
|
2884
2912
|
type: (0, exports.exactMatchValidator)(['h2']),
|
|
2885
2913
|
info: (0, exports.objectValidator)({
|
|
2886
2914
|
text: exports.stringValidator5000EmptyOkay,
|
|
2887
2915
|
}),
|
|
2916
|
+
style: exports.blockStyleValidator,
|
|
2888
2917
|
}),
|
|
2889
2918
|
html: (0, exports.objectValidator)({
|
|
2890
2919
|
type: (0, exports.exactMatchValidator)(['html']),
|
|
2891
2920
|
info: (0, exports.objectValidator)({
|
|
2892
2921
|
html: exports.stringValidator25000EmptyOkay,
|
|
2893
2922
|
}),
|
|
2923
|
+
style: exports.blockStyleValidator,
|
|
2894
2924
|
}),
|
|
2895
2925
|
image: (0, exports.objectValidator)({
|
|
2896
2926
|
type: (0, exports.exactMatchValidator)(['image']),
|
|
2897
2927
|
info: (0, exports.objectValidator)({
|
|
2898
2928
|
link: exports.stringValidator5000EmptyOkay,
|
|
2899
2929
|
name: exports.stringValidatorOptional,
|
|
2930
|
+
alt: exports.stringValidatorOptional,
|
|
2900
2931
|
height: exports.numberValidatorOptional,
|
|
2901
2932
|
maxHeight: exports.numberValidatorOptional,
|
|
2902
2933
|
width: exports.numberValidatorOptional,
|
|
2903
2934
|
maxWidth: exports.numberValidatorOptional,
|
|
2904
2935
|
}),
|
|
2936
|
+
style: exports.blockStyleValidator,
|
|
2905
2937
|
}),
|
|
2906
2938
|
pdf: (0, exports.objectValidator)({
|
|
2907
2939
|
type: (0, exports.exactMatchValidator)(['pdf']),
|
|
2908
2940
|
info: (0, exports.objectValidator)({
|
|
2909
2941
|
link: exports.stringValidator5000EmptyOkay,
|
|
2910
2942
|
name: exports.stringValidatorOptional,
|
|
2943
|
+
alt: exports.stringValidatorOptional,
|
|
2911
2944
|
height: exports.numberValidatorOptional,
|
|
2912
2945
|
maxHeight: exports.numberValidatorOptional,
|
|
2913
2946
|
width: exports.numberValidatorOptional,
|
|
2914
2947
|
maxWidth: exports.numberValidatorOptional,
|
|
2915
2948
|
}),
|
|
2949
|
+
style: exports.blockStyleValidator,
|
|
2916
2950
|
}),
|
|
2917
2951
|
youtube: (0, exports.objectValidator)({
|
|
2918
2952
|
type: (0, exports.exactMatchValidator)(['youtube']),
|
|
2919
2953
|
info: (0, exports.objectValidator)({
|
|
2920
2954
|
link: exports.stringValidator5000EmptyOkay,
|
|
2921
2955
|
name: exports.stringValidatorOptional,
|
|
2956
|
+
alt: exports.stringValidatorOptional,
|
|
2922
2957
|
height: exports.numberValidatorOptional,
|
|
2923
2958
|
maxHeight: exports.numberValidatorOptional,
|
|
2924
2959
|
width: exports.numberValidatorOptional,
|
|
2925
2960
|
maxWidth: exports.numberValidatorOptional,
|
|
2926
2961
|
}),
|
|
2962
|
+
style: exports.blockStyleValidator,
|
|
2927
2963
|
}),
|
|
2928
2964
|
iframe: (0, exports.objectValidator)({
|
|
2929
2965
|
type: (0, exports.exactMatchValidator)(['iframe']),
|
|
2930
2966
|
info: (0, exports.objectValidator)({
|
|
2931
2967
|
link: exports.stringValidator5000EmptyOkay,
|
|
2932
2968
|
name: exports.stringValidatorOptional,
|
|
2969
|
+
alt: exports.stringValidatorOptional,
|
|
2933
2970
|
height: exports.numberValidatorOptional,
|
|
2934
2971
|
maxHeight: exports.numberValidatorOptional,
|
|
2935
2972
|
width: exports.numberValidatorOptional,
|
|
2936
2973
|
maxWidth: exports.numberValidatorOptional,
|
|
2937
2974
|
}),
|
|
2975
|
+
style: exports.blockStyleValidator,
|
|
2938
2976
|
}),
|
|
2939
2977
|
"content-link": (0, exports.objectValidator)({
|
|
2940
2978
|
type: (0, exports.exactMatchValidator)(["content-link"]),
|
|
2941
2979
|
info: (0, exports.objectValidator)({
|
|
2942
2980
|
recordId: exports.mongoIdStringRequired,
|
|
2943
2981
|
}),
|
|
2982
|
+
style: exports.blockStyleValidator,
|
|
2944
2983
|
}),
|
|
2945
2984
|
});
|
|
2946
2985
|
var _BLOCK_TYPES = {
|
|
@@ -3236,6 +3275,13 @@ exports.portalBlockValidator = (0, exports.orValidator)({
|
|
|
3236
3275
|
html: exports.stringValidator5000,
|
|
3237
3276
|
})
|
|
3238
3277
|
}),
|
|
3278
|
+
pinnedForms: (0, exports.objectValidator)({
|
|
3279
|
+
type: (0, exports.exactMatchValidator)(['pinnedForms']),
|
|
3280
|
+
info: (0, exports.objectValidator)({
|
|
3281
|
+
title: exports.stringValidatorOptional,
|
|
3282
|
+
formIds: exports.listOfMongoIdStringValidatorEmptyOk,
|
|
3283
|
+
})
|
|
3284
|
+
}),
|
|
3239
3285
|
});
|
|
3240
3286
|
exports.portalBlocksValidator = (0, exports.listValidatorEmptyOk)(exports.portalBlockValidator);
|
|
3241
3287
|
var _PORTAL_BLOCK_TYPES = {
|
|
@@ -3248,6 +3294,7 @@ var _PORTAL_BLOCK_TYPES = {
|
|
|
3248
3294
|
"Manage Subscription Button": '',
|
|
3249
3295
|
Orders: '',
|
|
3250
3296
|
HTML: '',
|
|
3297
|
+
pinnedForms: '',
|
|
3251
3298
|
};
|
|
3252
3299
|
exports.PORTAL_BLOCK_TYPES = Object.keys(_PORTAL_BLOCK_TYPES);
|
|
3253
3300
|
exports.portalTypeValidator = (0, exports.exactMatchValidator)(exports.PORTAL_BLOCK_TYPES);
|
|
@@ -3279,6 +3326,25 @@ exports.baseAvailabilityBlockValidator = (0, exports.objectValidator)({
|
|
|
3279
3326
|
externalId: exports.stringValidatorOptionalEmptyOkay,
|
|
3280
3327
|
});
|
|
3281
3328
|
exports.baseAvailabilityBlocksValidator = (0, exports.listValidatorEmptyOk)(exports.baseAvailabilityBlockValidator);
|
|
3329
|
+
var monthlyOccurrenceValidator = {
|
|
3330
|
+
validate: function (o) {
|
|
3331
|
+
if (o === void 0) { o = {}; }
|
|
3332
|
+
return (0, exports.build_validator)(function (value) {
|
|
3333
|
+
if (![1, 2, 3, 4, 5].includes(value)) {
|
|
3334
|
+
throw new Error("Value must be one of 1, 2, 3, 4, 5");
|
|
3335
|
+
}
|
|
3336
|
+
return value;
|
|
3337
|
+
}, __assign(__assign({}, o), { listOf: false }));
|
|
3338
|
+
},
|
|
3339
|
+
getExample: function () { return 1; },
|
|
3340
|
+
getType: getTypeString,
|
|
3341
|
+
};
|
|
3342
|
+
exports.monthlyRestrictionValidator = (0, exports.objectValidator)({
|
|
3343
|
+
occurrences: (0, exports.listValidator)(monthlyOccurrenceValidator),
|
|
3344
|
+
});
|
|
3345
|
+
exports.monthlyRestrictionOptionalValidator = (0, exports.objectValidator)({
|
|
3346
|
+
occurrences: (0, exports.listValidator)(monthlyOccurrenceValidator),
|
|
3347
|
+
}, { isOptional: true, emptyOk: true });
|
|
3282
3348
|
exports.weeklyAvailabilityValidator = (0, exports.objectValidator)({
|
|
3283
3349
|
dayOfWeekStartingSundayIndexedByZero: exports.nonNegNumberValidator,
|
|
3284
3350
|
endTimeInMinutes: exports.nonNegNumberValidator,
|
|
@@ -3290,6 +3356,7 @@ exports.weeklyAvailabilityValidator = (0, exports.objectValidator)({
|
|
|
3290
3356
|
intervalInMinutes: exports.numberValidatorOptional,
|
|
3291
3357
|
priority: exports.numberValidatorOptional,
|
|
3292
3358
|
bufferStartMinutes: exports.numberValidatorOptional,
|
|
3359
|
+
monthlyRestriction: exports.monthlyRestrictionOptionalValidator,
|
|
3293
3360
|
});
|
|
3294
3361
|
exports.weeklyAvailabilitiesValidator = (0, exports.listValidatorEmptyOk)(exports.weeklyAvailabilityValidator);
|
|
3295
3362
|
exports.timezoneValidator = (0, exports.exactMatchValidator)(Object.keys(types_models_1.TIMEZONE_MAP));
|
|
@@ -3334,6 +3401,7 @@ exports.customEnduserFieldValidator = (0, exports.orValidator)({
|
|
|
3334
3401
|
required: exports.booleanValidatorOptional,
|
|
3335
3402
|
hiddenFromProfile: exports.booleanValidatorOptional,
|
|
3336
3403
|
requireConfirmation: exports.booleanValidatorOptional,
|
|
3404
|
+
tags: exports.listOfStringsValidatorOptionalOrEmptyOk,
|
|
3337
3405
|
}),
|
|
3338
3406
|
"Multiple Select": (0, exports.objectValidator)({
|
|
3339
3407
|
type: (0, exports.exactMatchValidator)(['Multiple Select']),
|
|
@@ -3344,6 +3412,7 @@ exports.customEnduserFieldValidator = (0, exports.orValidator)({
|
|
|
3344
3412
|
required: exports.booleanValidatorOptional,
|
|
3345
3413
|
hiddenFromProfile: exports.booleanValidatorOptional,
|
|
3346
3414
|
requireConfirmation: exports.booleanValidatorOptional,
|
|
3415
|
+
tags: exports.listOfStringsValidatorOptionalOrEmptyOk,
|
|
3347
3416
|
}),
|
|
3348
3417
|
Text: (0, exports.objectValidator)({
|
|
3349
3418
|
type: (0, exports.exactMatchValidator)(['Text']),
|
|
@@ -3352,6 +3421,7 @@ exports.customEnduserFieldValidator = (0, exports.orValidator)({
|
|
|
3352
3421
|
required: exports.booleanValidatorOptional,
|
|
3353
3422
|
hiddenFromProfile: exports.booleanValidatorOptional,
|
|
3354
3423
|
requireConfirmation: exports.booleanValidatorOptional,
|
|
3424
|
+
tags: exports.listOfStringsValidatorOptionalOrEmptyOk,
|
|
3355
3425
|
}),
|
|
3356
3426
|
Number: (0, exports.objectValidator)({
|
|
3357
3427
|
type: (0, exports.exactMatchValidator)(['Number']),
|
|
@@ -3360,6 +3430,7 @@ exports.customEnduserFieldValidator = (0, exports.orValidator)({
|
|
|
3360
3430
|
required: exports.booleanValidatorOptional,
|
|
3361
3431
|
hiddenFromProfile: exports.booleanValidatorOptional,
|
|
3362
3432
|
requireConfirmation: exports.booleanValidatorOptional,
|
|
3433
|
+
tags: exports.listOfStringsValidatorOptionalOrEmptyOk,
|
|
3363
3434
|
}),
|
|
3364
3435
|
File: (0, exports.objectValidator)({
|
|
3365
3436
|
type: (0, exports.exactMatchValidator)(['File']),
|
|
@@ -3368,6 +3439,7 @@ exports.customEnduserFieldValidator = (0, exports.orValidator)({
|
|
|
3368
3439
|
required: exports.booleanValidatorOptional,
|
|
3369
3440
|
hiddenFromProfile: exports.booleanValidatorOptional,
|
|
3370
3441
|
requireConfirmation: exports.booleanValidatorOptional,
|
|
3442
|
+
tags: exports.listOfStringsValidatorOptionalOrEmptyOk,
|
|
3371
3443
|
}),
|
|
3372
3444
|
"Multiple Text": (0, exports.objectValidator)({
|
|
3373
3445
|
type: (0, exports.exactMatchValidator)(["Multiple Text"]),
|
|
@@ -3376,6 +3448,7 @@ exports.customEnduserFieldValidator = (0, exports.orValidator)({
|
|
|
3376
3448
|
required: exports.booleanValidatorOptional,
|
|
3377
3449
|
hiddenFromProfile: exports.booleanValidatorOptional,
|
|
3378
3450
|
requireConfirmation: exports.booleanValidatorOptional,
|
|
3451
|
+
tags: exports.listOfStringsValidatorOptionalOrEmptyOk,
|
|
3379
3452
|
}),
|
|
3380
3453
|
Date: (0, exports.objectValidator)({
|
|
3381
3454
|
type: (0, exports.exactMatchValidator)(['Date']),
|
|
@@ -3384,6 +3457,7 @@ exports.customEnduserFieldValidator = (0, exports.orValidator)({
|
|
|
3384
3457
|
required: exports.booleanValidatorOptional,
|
|
3385
3458
|
hiddenFromProfile: exports.booleanValidatorOptional,
|
|
3386
3459
|
requireConfirmation: exports.booleanValidatorOptional,
|
|
3460
|
+
tags: exports.listOfStringsValidatorOptionalOrEmptyOk,
|
|
3387
3461
|
}),
|
|
3388
3462
|
"Auto Detect": (0, exports.objectValidator)({
|
|
3389
3463
|
type: (0, exports.exactMatchValidator)(["Auto Detect"]),
|
|
@@ -3392,6 +3466,7 @@ exports.customEnduserFieldValidator = (0, exports.orValidator)({
|
|
|
3392
3466
|
required: exports.booleanValidatorOptional,
|
|
3393
3467
|
hiddenFromProfile: exports.booleanValidatorOptional,
|
|
3394
3468
|
requireConfirmation: exports.booleanValidatorOptional,
|
|
3469
|
+
tags: exports.listOfStringsValidatorOptionalOrEmptyOk,
|
|
3395
3470
|
}),
|
|
3396
3471
|
"Table": (0, exports.objectValidator)({
|
|
3397
3472
|
type: (0, exports.exactMatchValidator)(["Table"]),
|
|
@@ -3402,6 +3477,7 @@ exports.customEnduserFieldValidator = (0, exports.orValidator)({
|
|
|
3402
3477
|
required: exports.booleanValidatorOptional,
|
|
3403
3478
|
hiddenFromProfile: exports.booleanValidatorOptional,
|
|
3404
3479
|
requireConfirmation: exports.booleanValidatorOptional,
|
|
3480
|
+
tags: exports.listOfStringsValidatorOptionalOrEmptyOk,
|
|
3405
3481
|
}),
|
|
3406
3482
|
"Checkbox": (0, exports.objectValidator)({
|
|
3407
3483
|
type: (0, exports.exactMatchValidator)(["Checkbox"]),
|
|
@@ -3410,6 +3486,7 @@ exports.customEnduserFieldValidator = (0, exports.orValidator)({
|
|
|
3410
3486
|
required: exports.booleanValidatorOptional,
|
|
3411
3487
|
hiddenFromProfile: exports.booleanValidatorOptional,
|
|
3412
3488
|
requireConfirmation: exports.booleanValidatorOptional,
|
|
3489
|
+
tags: exports.listOfStringsValidatorOptionalOrEmptyOk,
|
|
3413
3490
|
}),
|
|
3414
3491
|
"Database Select": (0, exports.objectValidator)({
|
|
3415
3492
|
type: (0, exports.exactMatchValidator)(["Database Select"]),
|
|
@@ -3421,6 +3498,7 @@ exports.customEnduserFieldValidator = (0, exports.orValidator)({
|
|
|
3421
3498
|
required: exports.booleanValidatorOptional,
|
|
3422
3499
|
hiddenFromProfile: exports.booleanValidatorOptional,
|
|
3423
3500
|
requireConfirmation: exports.booleanValidatorOptional,
|
|
3501
|
+
tags: exports.listOfStringsValidatorOptionalOrEmptyOk,
|
|
3424
3502
|
}),
|
|
3425
3503
|
});
|
|
3426
3504
|
exports.customEnduserFieldsValidatorOptionalOrEmpty = (0, exports.listValidatorOptionalOrEmptyOk)(exports.customEnduserFieldValidator);
|
|
@@ -3754,6 +3832,7 @@ exports.automationTriggerEventValidator = (0, exports.orValidator)({
|
|
|
3754
3832
|
type: (0, exports.exactMatchValidator)(['Appointment Rescheduled']),
|
|
3755
3833
|
info: (0, exports.objectValidator)({
|
|
3756
3834
|
titles: exports.listOfStringsValidatorOptionalOrEmptyOk,
|
|
3835
|
+
detectManualReschedules: exports.booleanValidatorOptional,
|
|
3757
3836
|
}),
|
|
3758
3837
|
conditions: exports.optionalEmptyObjectValidator,
|
|
3759
3838
|
}),
|
|
@@ -3941,6 +4020,7 @@ var _AUTOMATION_TRIGGER_ACTION_TYPES = {
|
|
|
3941
4020
|
"Reply to Chat": true,
|
|
3942
4021
|
"Create User Notifications": true,
|
|
3943
4022
|
"Assign to Incoming Message": true,
|
|
4023
|
+
"Zendesk: Update Ticket Assignee": true,
|
|
3944
4024
|
};
|
|
3945
4025
|
exports.AUTOMATION_TRIGGER_ACTION_TYPES = Object.keys(_AUTOMATION_TRIGGER_ACTION_TYPES);
|
|
3946
4026
|
exports.automationTriggerActionValidator = (0, exports.orValidator)({
|
|
@@ -4062,6 +4142,10 @@ exports.automationTriggerActionValidator = (0, exports.orValidator)({
|
|
|
4062
4142
|
maxUsers: exports.numberValidatorOptional,
|
|
4063
4143
|
}),
|
|
4064
4144
|
}),
|
|
4145
|
+
"Zendesk: Update Ticket Assignee": (0, exports.objectValidator)({
|
|
4146
|
+
type: (0, exports.exactMatchValidator)(['Zendesk: Update Ticket Assignee']),
|
|
4147
|
+
info: (0, exports.objectValidator)({}),
|
|
4148
|
+
}),
|
|
4065
4149
|
});
|
|
4066
4150
|
var _AUTOMATION_TRIGGER_STATUSES = {
|
|
4067
4151
|
Active: true,
|
|
@@ -4499,6 +4583,7 @@ exports.analyticsQueryValidator = (0, exports.orValidator)({
|
|
|
4499
4583
|
State: exports.booleanValidatorOptional,
|
|
4500
4584
|
Phone: exports.booleanValidatorOptional,
|
|
4501
4585
|
"Scheduled By": exports.booleanValidatorOptional,
|
|
4586
|
+
"Completed By": exports.booleanValidatorOptional,
|
|
4502
4587
|
alsoGroupByHost: exports.booleanValidatorOptional,
|
|
4503
4588
|
"Cancel Reason": exports.booleanValidatorOptional,
|
|
4504
4589
|
}, { isOptional: true, emptyOk: true }),
|