@nanas-home/hub-common 0.36.824 → 0.37.857
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/chunk/{P66PP6GS.js → 5SB4YHD5.js} +56 -10
- package/dist/index.css +1 -1
- package/dist/node-utils/index.d.ts +2 -2
- package/dist/node-utils/index.js +2 -2
- package/dist/{textValidation-CJbRmG7d.d.ts → textValidation-BXxld36z.d.ts} +187 -22
- package/dist/web/index.d.ts +32 -21
- package/dist/web/index.js +344 -174
- package/dist/web/index.jsx +70768 -716
- package/package.json +16 -16
|
@@ -98,6 +98,7 @@ var apiRouteParam = {
|
|
|
98
98
|
petUuid: ":petUuid",
|
|
99
99
|
addressUuid: ":addressUuid",
|
|
100
100
|
bookingUuid: ":bookingUuid",
|
|
101
|
+
bookingAddonUuid: ":bookingAddonUuid",
|
|
101
102
|
linkUuid: ":linkUuid",
|
|
102
103
|
linkType: ":linkType"
|
|
103
104
|
};
|
|
@@ -141,6 +142,13 @@ var apiRoute = {
|
|
|
141
142
|
byUser: "/user",
|
|
142
143
|
swagger: { name: "Bookings", description: "Endpoints for managing bookings" }
|
|
143
144
|
},
|
|
145
|
+
charge: {
|
|
146
|
+
prefix: "/charge",
|
|
147
|
+
getByUserId: `/user/${apiRouteParam.userUuid}`,
|
|
148
|
+
getByBookingId: `/booking/${apiRouteParam.bookingUuid}`,
|
|
149
|
+
getByBookingAddonId: `/booking-addon/${apiRouteParam.bookingAddonUuid}`,
|
|
150
|
+
swagger: { name: "Charges", description: "Endpoints for managing charges that have been issued" }
|
|
151
|
+
},
|
|
144
152
|
comment: {
|
|
145
153
|
prefix: "/admin/comment",
|
|
146
154
|
byLink: "/link",
|
|
@@ -204,17 +212,24 @@ var apiRoute = {
|
|
|
204
212
|
getAll: "",
|
|
205
213
|
getById: `/${apiRouteParam.bookingUuid}`,
|
|
206
214
|
create: "",
|
|
207
|
-
update:
|
|
215
|
+
update: "",
|
|
208
216
|
delete: `/${apiRouteParam.bookingUuid}`,
|
|
209
217
|
swagger: { name: "Bookings", description: "Endpoints for User to manage their Bookings" }
|
|
210
218
|
},
|
|
211
219
|
bookingAddon: {
|
|
212
220
|
prefix: "/booking-addon",
|
|
213
|
-
getByBookingId: `/${apiRouteParam.
|
|
214
|
-
addToBooking: `/${apiRouteParam.
|
|
215
|
-
removeToBooking: `/${apiRouteParam.
|
|
221
|
+
getByBookingId: `/${apiRouteParam.bookingAddonUuid}`,
|
|
222
|
+
addToBooking: `/${apiRouteParam.bookingAddonUuid}`,
|
|
223
|
+
removeToBooking: `/${apiRouteParam.bookingAddonUuid}`,
|
|
216
224
|
swagger: { name: "BookingAddons", description: "Endpoints for User to manage their Booking Addons" }
|
|
217
225
|
},
|
|
226
|
+
charge: {
|
|
227
|
+
prefix: "/charge",
|
|
228
|
+
getByForUser: `/user`,
|
|
229
|
+
getByBookingId: `/booking/${apiRouteParam.bookingUuid}`,
|
|
230
|
+
getByBookingAddonId: `/booking-addon/${apiRouteParam.bookingAddonUuid}`,
|
|
231
|
+
swagger: { name: "Charges", description: "Endpoints for User to view the Charges they have been issued" }
|
|
232
|
+
},
|
|
218
233
|
membership: {
|
|
219
234
|
prefix: "/membership",
|
|
220
235
|
getAll: "",
|
|
@@ -300,12 +315,22 @@ var BookingStatusType = /* @__PURE__ */ ((BookingStatusType2) => {
|
|
|
300
315
|
return BookingStatusType2;
|
|
301
316
|
})(BookingStatusType || {});
|
|
302
317
|
|
|
318
|
+
// src/contracts/generated/enum/chargeStatusType.ts
|
|
319
|
+
var ChargeStatusType = /* @__PURE__ */ ((ChargeStatusType2) => {
|
|
320
|
+
ChargeStatusType2[ChargeStatusType2["Pending"] = 0] = "Pending";
|
|
321
|
+
ChargeStatusType2[ChargeStatusType2["Cancelled"] = 1] = "Cancelled";
|
|
322
|
+
ChargeStatusType2[ChargeStatusType2["Paid"] = 2] = "Paid";
|
|
323
|
+
ChargeStatusType2[ChargeStatusType2["Refunded"] = 3] = "Refunded";
|
|
324
|
+
return ChargeStatusType2;
|
|
325
|
+
})(ChargeStatusType || {});
|
|
326
|
+
|
|
303
327
|
// src/contracts/generated/enum/commentLinkType.ts
|
|
304
328
|
var CommentLinkType = /* @__PURE__ */ ((CommentLinkType2) => {
|
|
305
329
|
CommentLinkType2[CommentLinkType2["Unknown"] = 0] = "Unknown";
|
|
306
330
|
CommentLinkType2[CommentLinkType2["User"] = 1] = "User";
|
|
307
331
|
CommentLinkType2[CommentLinkType2["Pet"] = 2] = "Pet";
|
|
308
332
|
CommentLinkType2[CommentLinkType2["Booking"] = 3] = "Booking";
|
|
333
|
+
CommentLinkType2[CommentLinkType2["Charge"] = 4] = "Charge";
|
|
309
334
|
return CommentLinkType2;
|
|
310
335
|
})(CommentLinkType || {});
|
|
311
336
|
|
|
@@ -383,6 +408,9 @@ var PermissionType = /* @__PURE__ */ ((PermissionType2) => {
|
|
|
383
408
|
PermissionType2[PermissionType2["UserMembershipView"] = 180] = "UserMembershipView";
|
|
384
409
|
PermissionType2[PermissionType2["UserMembershipManage"] = 181] = "UserMembershipManage";
|
|
385
410
|
PermissionType2[PermissionType2["UserMembershipDelete"] = 182] = "UserMembershipDelete";
|
|
411
|
+
PermissionType2[PermissionType2["ChargeView"] = 200] = "ChargeView";
|
|
412
|
+
PermissionType2[PermissionType2["ChargeManage"] = 201] = "ChargeManage";
|
|
413
|
+
PermissionType2[PermissionType2["ChargeDelete"] = 202] = "ChargeDelete";
|
|
386
414
|
return PermissionType2;
|
|
387
415
|
})(PermissionType || {});
|
|
388
416
|
|
|
@@ -508,6 +536,12 @@ var BookingAddonRestriction = {
|
|
|
508
536
|
quantity: { min: 0, max: 1e3 }
|
|
509
537
|
};
|
|
510
538
|
|
|
539
|
+
// src/contracts/generated/restrictions/chargeRestriction.ts
|
|
540
|
+
var ChargeRestriction = {
|
|
541
|
+
stripeChargeId: { maxLength: 100 },
|
|
542
|
+
notes: { maxLength: 250 }
|
|
543
|
+
};
|
|
544
|
+
|
|
511
545
|
// src/contracts/generated/restrictions/commentRestriction.ts
|
|
512
546
|
var CommentRestriction = {
|
|
513
547
|
name: { maxLength: 80 },
|
|
@@ -577,13 +611,14 @@ var UserRestriction = {
|
|
|
577
611
|
|
|
578
612
|
// src/contracts/generated/searchColumns.ts
|
|
579
613
|
var searchColumns = {
|
|
580
|
-
address: [{ "property": "name", "type": 2 }, { "property": "street", "type": 2 }, { "property": "city", "type": 2 }, { "property": "postalCode", "type": 2 }, { "property": "country", "type": 2 }],
|
|
581
|
-
booking: [{ "property": "startDate", "type": 5 }, { "property": "endDate", "type": 5 }, { "property": "status", "type": 2 }, { "property": "notes", "type": 2 }],
|
|
582
614
|
membership: [{ "property": "monthlyFee", "type": 2 }, { "property": "perNightStay", "type": 2 }, { "property": "additionalPetPerNightStay", "type": 2 }, { "property": "transportFee", "type": 2 }, { "property": "perKm", "type": 2 }, { "property": "matchFee", "type": 2 }, { "property": "freeCancellationWithinDays", "type": 2 }, { "property": "bookingAdvanceDays", "type": 2 }, { "property": "bookingCalenderMonthsOpenInAdvance", "type": 2 }, { "property": "seasonalDiscounts", "type": 2 }],
|
|
615
|
+
address: [{ "property": "name", "type": 2 }, { "property": "street", "type": 2 }, { "property": "city", "type": 2 }, { "property": "postalCode", "type": 2 }, { "property": "country", "type": 2 }],
|
|
583
616
|
pet: [{ "property": "type", "type": 1 }, { "property": "sex", "type": 2 }, { "property": "breed", "type": 2 }, { "property": "neutered", "type": 2 }, { "property": "name", "type": 2 }, { "property": "notes", "type": 2 }, { "property": "dateOfBirth", "type": 5 }],
|
|
584
|
-
|
|
617
|
+
charge: [{ "property": "userUuid", "type": 2 }, { "property": "bookingUuid", "type": 2 }, { "property": "bookingAddonUuid", "type": 2 }, { "property": "status", "type": 2 }, { "property": "stripeChargeId", "type": 2 }, { "property": "dueDate", "type": 5 }, { "property": "notes", "type": 2 }],
|
|
618
|
+
user: [{ "property": "types", "type": 1 }, { "property": "firstName", "type": 2 }, { "property": "lastName", "type": 2 }, { "property": "email", "type": 2 }, { "property": "hubspotId", "type": 2 }, { "property": "flags", "type": 1 }, { "property": "dateCreated", "type": 5 }],
|
|
585
619
|
upload: [{ "property": "linkUuid", "type": 2 }, { "property": "linkType", "type": 2 }, { "property": "type", "type": 2 }, { "property": "fileName", "type": 2 }, { "property": "blobType", "type": 2 }, { "property": "sizeInKb", "type": 2 }, { "property": "dateCreated", "type": 5 }],
|
|
586
|
-
|
|
620
|
+
booking: [{ "property": "startDate", "type": 5 }, { "property": "endDate", "type": 5 }, { "property": "status", "type": 2 }, { "property": "notes", "type": 2 }],
|
|
621
|
+
question: [{ "property": "forTypes", "type": 1 }, { "property": "transKey", "type": 2 }, { "property": "fallback", "type": 2 }, { "property": "category", "type": 2 }, { "property": "type", "type": 0 }, { "property": "sortOrder", "type": 3 }, { "property": "visible", "type": 4 }, { "property": "notes", "type": 2 }]
|
|
587
622
|
};
|
|
588
623
|
|
|
589
624
|
// src/helpers/arrayHelper.ts
|
|
@@ -715,6 +750,7 @@ var LogService = class {
|
|
|
715
750
|
console.info("Log Levels: ", this._logLevels.join());
|
|
716
751
|
}
|
|
717
752
|
logs = [];
|
|
753
|
+
_loggers = {};
|
|
718
754
|
_logLevels;
|
|
719
755
|
_latestLogDate;
|
|
720
756
|
_logMessageToConsole = (log) => {
|
|
@@ -762,7 +798,17 @@ ${(log.optionalParams ?? []).join("\n\r")}`;
|
|
|
762
798
|
clearLogs = () => {
|
|
763
799
|
this.logs = [];
|
|
764
800
|
};
|
|
765
|
-
getLogger = (...groups) =>
|
|
801
|
+
getLogger = (...groups) => {
|
|
802
|
+
const grpLength = groups?.length ?? 0;
|
|
803
|
+
if (grpLength < 0 || grpLength > 1 || groups[0] == null) return this._createNewLogger(groups);
|
|
804
|
+
const groupKey = groups[0];
|
|
805
|
+
const existingLogger = this._loggers[groupKey];
|
|
806
|
+
if (existingLogger != null) return existingLogger;
|
|
807
|
+
const newLogger = this._createNewLogger(groups);
|
|
808
|
+
this._loggers[groupKey] = newLogger;
|
|
809
|
+
return newLogger;
|
|
810
|
+
};
|
|
811
|
+
_createNewLogger = (groups) => ({
|
|
766
812
|
d: this._track("debug", groups),
|
|
767
813
|
i: this._track("info", groups),
|
|
768
814
|
w: this._track("warn", groups),
|
|
@@ -1534,4 +1580,4 @@ var shouldBeYoutubeUrl = (value) => {
|
|
|
1534
1580
|
};
|
|
1535
1581
|
};
|
|
1536
1582
|
|
|
1537
|
-
export { APP_TYPE_TOKEN, ActivityRestriction, ActivityType, AddressLinkType, AddressRestriction, AnswerLinkType, AnswerRestriction, AppType, BOT_PATH_TOKEN, BookingAddonRestriction, BookingAddonType, BookingRestriction, BookingStatusType, CommentLinkType, CommentRestriction, CommonConfigService, DependencyInjectionContainer, DrivingRouteRestriction, LogService, MembershipRestriction, MembershipStatus, MembershipType, MouseButton, NetworkState, OrderDirectionType, PermissionRestriction, PermissionType, PetRestriction, PetSexType, PetStatusType, PetType, QuestionForType, QuestionRestriction, QuestionType, SITE_CONFIG_TOKEN, SearchableColumnType, TranslationService, UnavailabilityRestriction, UploadLinkType, UploadRestriction, UploadType, UserAccountFlagType, UserRestriction, UserType, addDays, addMinutes, addMonths, addSeconds, addSpacesForEnum, addToParallelTasks, anyObject, apiRoute, apiRouteParam, arrayContains, arrayOfNLength, capitalizeFirstLetter, changeMonth, colourPalette, convertToDate, convertToFullDateSelection, createToken, cyrb53, dateDiffInDays, debounceLeading, defaultSiteColour, fakePromise, formatDate, formatFileSize, formatForBookingDate, formatForDateDropdown, formatForDateLocal, formatForDateLocalDetailed, formatForDateOfBirth, formatForDateWithTime, getAgeInYears, getAllPetQuestionForType, getAppType, getArrFromEnum, getBotPath, getCalendarDropdownDisplayValue, getCalendarDropdownForDateOfBirthDisplayValue, getCommonConfig, getDayClassObject, getDayElements, getDayHeadingElements, getImageParams, getLog, getMimeTypeFromExtension, getPayloadFromJwt, getPerformanceTimer, getPetAvatarUrl, getSiteColour, getSiteConfig, getUserAvatarUrl, getUsersName, getWeekNumber, hasRequiredPermissions, isBefore, isDateAfterStart, isDateBeforeEnd, isDateDisabledByDisabledDays, isDateEnabledByEnabledDays, isNumber, isSameDay, isWebApp, lowercaseFirstLetter, makeArrayOrDefault, maxDate, maxItems, maxLength, maxValue, mimeTypeLookup, minDate, minItems, minLength, minUrlLength, minValue, monthTranslationKeyOrder, multiValidation, nameof, nanasFonts, noValidation, notNull, onlyUnique, portalGlyphLength, promiseFromValue, randomIntFromRange, randomItemFromArray, rootContainer, rootDependencyInjectionSetup, searchColumns, selectedItemsExist, selectedOptionIsInEnum, separateValidation, setContainerToken, setContainerTokenLazy, setSiteConfig, shouldBeUrl, shouldBeYoutubeUrl, showSecondCalendar, socialLinks, timeout, tryParseNumber, uploadsThatNeedEncryption, urlRef, uuidv4, validUuidChars, validateForEach, webAppTypes, weekdayTranslationKeyOrder };
|
|
1583
|
+
export { APP_TYPE_TOKEN, ActivityRestriction, ActivityType, AddressLinkType, AddressRestriction, AnswerLinkType, AnswerRestriction, AppType, BOT_PATH_TOKEN, BookingAddonRestriction, BookingAddonType, BookingRestriction, BookingStatusType, ChargeRestriction, ChargeStatusType, CommentLinkType, CommentRestriction, CommonConfigService, DependencyInjectionContainer, DrivingRouteRestriction, LogService, MembershipRestriction, MembershipStatus, MembershipType, MouseButton, NetworkState, OrderDirectionType, PermissionRestriction, PermissionType, PetRestriction, PetSexType, PetStatusType, PetType, QuestionForType, QuestionRestriction, QuestionType, SITE_CONFIG_TOKEN, SearchableColumnType, TranslationService, UnavailabilityRestriction, UploadLinkType, UploadRestriction, UploadType, UserAccountFlagType, UserRestriction, UserType, addDays, addMinutes, addMonths, addSeconds, addSpacesForEnum, addToParallelTasks, anyObject, apiRoute, apiRouteParam, arrayContains, arrayOfNLength, capitalizeFirstLetter, changeMonth, colourPalette, convertToDate, convertToFullDateSelection, createToken, cyrb53, dateDiffInDays, debounceLeading, defaultSiteColour, fakePromise, formatDate, formatFileSize, formatForBookingDate, formatForDateDropdown, formatForDateLocal, formatForDateLocalDetailed, formatForDateOfBirth, formatForDateWithTime, getAgeInYears, getAllPetQuestionForType, getAppType, getArrFromEnum, getBotPath, getCalendarDropdownDisplayValue, getCalendarDropdownForDateOfBirthDisplayValue, getCommonConfig, getDayClassObject, getDayElements, getDayHeadingElements, getImageParams, getLog, getMimeTypeFromExtension, getPayloadFromJwt, getPerformanceTimer, getPetAvatarUrl, getSiteColour, getSiteConfig, getUserAvatarUrl, getUsersName, getWeekNumber, hasRequiredPermissions, isBefore, isDateAfterStart, isDateBeforeEnd, isDateDisabledByDisabledDays, isDateEnabledByEnabledDays, isNumber, isSameDay, isWebApp, lowercaseFirstLetter, makeArrayOrDefault, maxDate, maxItems, maxLength, maxValue, mimeTypeLookup, minDate, minItems, minLength, minUrlLength, minValue, monthTranslationKeyOrder, multiValidation, nameof, nanasFonts, noValidation, notNull, onlyUnique, portalGlyphLength, promiseFromValue, randomIntFromRange, randomItemFromArray, rootContainer, rootDependencyInjectionSetup, searchColumns, selectedItemsExist, selectedOptionIsInEnum, separateValidation, setContainerToken, setContainerTokenLazy, setSiteConfig, shouldBeUrl, shouldBeYoutubeUrl, showSecondCalendar, socialLinks, timeout, tryParseNumber, uploadsThatNeedEncryption, urlRef, uuidv4, validUuidChars, validateForEach, webAppTypes, weekdayTranslationKeyOrder };
|