@nanas-home/hub-common 0.57.1293 → 0.59.1309

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.
@@ -46,6 +46,82 @@ var monthTranslationKeyOrder = [
46
46
  "dec"
47
47
  ];
48
48
 
49
+ // src/constants/cdnAppImage.ts
50
+ var cdnUrl = (path) => `https://cdn.nanashome.club/${path}`;
51
+ var cdnWebUrl = (path) => cdnUrl(`web-app/${path}`);
52
+ var CdnAppImage = {
53
+ nav: {
54
+ logo: {
55
+ dark: cdnWebUrl("nav-dark.png"),
56
+ light: cdnWebUrl("nav-light.png")
57
+ },
58
+ logo96: {
59
+ dark: cdnUrl("favicon/favicon-96x96.png"),
60
+ light: cdnUrl("favicon/favicon-96x96.png")
61
+ }
62
+ },
63
+ membership: {
64
+ Club: cdnWebUrl("Club.svg"),
65
+ ClubPlus: cdnWebUrl("ClubPlus.svg")
66
+ },
67
+ illustration: {
68
+ catInPark: cdnWebUrl("illustration/cat_in_park.svg"),
69
+ emptyBed: cdnWebUrl("illustration/empty_bed.png")
70
+ },
71
+ thirdParty: {
72
+ hubspot: cdnWebUrl("third-party/hubspot.svg"),
73
+ stripe: cdnWebUrl("third-party/stripe.svg")
74
+ },
75
+ email: {
76
+ defaultLayout: {
77
+ logo: cdnUrl("email/defaultLayoutLogo.png"),
78
+ banner: cdnUrl("email/defaultLayoutBanner.jpg")
79
+ },
80
+ icons: {
81
+ facebookIcon: cdnUrl("email/icon/facebookIcon.png"),
82
+ instagramIcon: cdnUrl("email/icon/instagramIcon.png"),
83
+ linkedInIcon: cdnUrl("email/icon/linkedInIcon.png")
84
+ },
85
+ sentSuccessfully: cdnWebUrl("mail-sent.svg")
86
+ },
87
+ map: {
88
+ pin: cdnWebUrl("map-pin.svg")
89
+ },
90
+ profile: {
91
+ pet: {
92
+ cat: cdnWebUrl("profile/unknownPetCat.png"),
93
+ dog: cdnWebUrl("profile/unknownPetDog.png"),
94
+ unknown: cdnWebUrl("profile/unknownPetDog.png")
95
+ },
96
+ user: {
97
+ house: cdnWebUrl("profile/fallbackProfile1.png"),
98
+ silhouette: cdnWebUrl("profile/fallbackProfile2.png")
99
+ }
100
+ },
101
+ portal: {
102
+ admin: cdnWebUrl("portal/admin.png"),
103
+ cdn: cdnWebUrl("portal/cdn.png"),
104
+ client: cdnWebUrl("portal/client.png"),
105
+ coverage: cdnWebUrl("portal/coverage.png"),
106
+ databasus: cdnWebUrl("portal/databasus.svg"),
107
+ docs: cdnWebUrl("portal/docs.png"),
108
+ fileBrowser: cdnWebUrl("portal/file-browser.svg"),
109
+ healthchecks: cdnWebUrl("portal/healthchecks.png"),
110
+ hostCal: cdnWebUrl("portal/hostCal.png"),
111
+ landing: cdnWebUrl("portal/landing.png"),
112
+ newTab: cdnWebUrl("portal/new-tab.svg"),
113
+ passbolt: cdnWebUrl("portal/passbolt.svg"),
114
+ portal: cdnWebUrl("portal/portal.png"),
115
+ registry: cdnWebUrl("portal/registry.png"),
116
+ tolgee: cdnWebUrl("portal/tolgee.svg"),
117
+ traefik: cdnWebUrl("portal/traefik.png")
118
+ },
119
+ error: {
120
+ cat: cdnWebUrl("error_cat.svg"),
121
+ dog: cdnWebUrl("error_dog.svg")
122
+ }
123
+ };
124
+
49
125
  // src/constants/font.ts
50
126
  var nanasFonts = {
51
127
  default: "https://fonts.googleapis.com/css2?family=Hanken+Grotesk:ital,wght@0,100..900;1,100..900&display=swap"
@@ -227,6 +303,18 @@ var apiRoute = {
227
303
  description: "Endpoints for managing questions that users need to answer in order to complete their profiles"
228
304
  }
229
305
  },
306
+ sentEmail: {
307
+ prefix: "/admin/sent-email",
308
+ swagger: { name: "SentEmail", description: "Endpoints for managing SentEmails" }
309
+ },
310
+ tempLink: {
311
+ prefix: "/admin/temp-link",
312
+ swagger: { name: "TempLink", description: "Endpoints for managing TempLinks" }
313
+ },
314
+ tempRegistration: {
315
+ prefix: "/admin/temp-registration",
316
+ swagger: { name: "TempRegistration", description: "Endpoints for managing TempRegistrations" }
317
+ },
230
318
  upload: {
231
319
  prefix: "/admin/upload",
232
320
  viewRaw: `/view-raw/${apiRouteParam.uploadUuid}`,
@@ -526,6 +614,15 @@ var PermissionType = /* @__PURE__ */ ((PermissionType2) => {
526
614
  PermissionType2[PermissionType2["BugReportView"] = 210] = "BugReportView";
527
615
  PermissionType2[PermissionType2["BugReportManage"] = 211] = "BugReportManage";
528
616
  PermissionType2[PermissionType2["BugReportDelete"] = 212] = "BugReportDelete";
617
+ PermissionType2[PermissionType2["TempLinkView"] = 220] = "TempLinkView";
618
+ PermissionType2[PermissionType2["TempLinkManage"] = 221] = "TempLinkManage";
619
+ PermissionType2[PermissionType2["TempLinkDelete"] = 222] = "TempLinkDelete";
620
+ PermissionType2[PermissionType2["TempRegistrationView"] = 230] = "TempRegistrationView";
621
+ PermissionType2[PermissionType2["TempRegistrationManage"] = 231] = "TempRegistrationManage";
622
+ PermissionType2[PermissionType2["TempRegistrationDelete"] = 232] = "TempRegistrationDelete";
623
+ PermissionType2[PermissionType2["SentEmailView"] = 240] = "SentEmailView";
624
+ PermissionType2[PermissionType2["SentEmailManage"] = 241] = "SentEmailManage";
625
+ PermissionType2[PermissionType2["SentEmailDelete"] = 242] = "SentEmailDelete";
529
626
  return PermissionType2;
530
627
  })(PermissionType || {});
531
628
 
@@ -593,6 +690,20 @@ var SearchableColumnType = /* @__PURE__ */ ((SearchableColumnType2) => {
593
690
  return SearchableColumnType2;
594
691
  })(SearchableColumnType || {});
595
692
 
693
+ // src/contracts/generated/enum/sentEmailTypes.ts
694
+ var SentEmailLinkType = /* @__PURE__ */ ((SentEmailLinkType2) => {
695
+ SentEmailLinkType2[SentEmailLinkType2["Unknown"] = 0] = "Unknown";
696
+ SentEmailLinkType2[SentEmailLinkType2["User"] = 1] = "User";
697
+ SentEmailLinkType2[SentEmailLinkType2["Booking"] = 2] = "Booking";
698
+ return SentEmailLinkType2;
699
+ })(SentEmailLinkType || {});
700
+ var SentEmailSentStatus = /* @__PURE__ */ ((SentEmailSentStatus2) => {
701
+ SentEmailSentStatus2[SentEmailSentStatus2["Unknown"] = 0] = "Unknown";
702
+ SentEmailSentStatus2[SentEmailSentStatus2["Success"] = 1] = "Success";
703
+ SentEmailSentStatus2[SentEmailSentStatus2["Failed"] = 2] = "Failed";
704
+ return SentEmailSentStatus2;
705
+ })(SentEmailSentStatus || {});
706
+
596
707
  // src/contracts/generated/enum/tempLinkType.ts
597
708
  var TempLinkType = /* @__PURE__ */ ((TempLinkType2) => {
598
709
  TempLinkType2[TempLinkType2["Unknown"] = 0] = "Unknown";
@@ -841,6 +952,13 @@ var QuestionRestriction = {
841
952
  notes: { minLength: 0, maxLength: 1e3 }
842
953
  };
843
954
 
955
+ // src/contracts/generated/restrictions/sentEmailRestriction.ts
956
+ var SentEmailRestriction = {
957
+ templateUsed: { minLength: 3, maxLength: 80 },
958
+ variables: { minLength: 3, maxLength: 2e3 },
959
+ statusMeta: { minLength: 3, maxLength: 1e3 }
960
+ };
961
+
844
962
  // src/contracts/generated/restrictions/stripeRestriction.ts
845
963
  var StripeRestriction = {
846
964
  common: {
@@ -881,14 +999,14 @@ var UserRestriction = {
881
999
  // src/contracts/generated/searchColumns.ts
882
1000
  var searchColumns = {
883
1001
  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 }],
884
- address: [{ "property": "name", "type": 2 }, { "property": "street", "type": 2 }, { "property": "city", "type": 2 }, { "property": "postalCode", "type": 2 }],
885
- pet: [{ "property": "type", "type": 0 }, { "property": "sex", "type": 2 }, { "property": "name", "type": 2 }, { "property": "breed", "type": 2 }, { "property": "status", "type": 0 }, { "property": "neutered", "type": 4 }, { "property": "notes", "type": 2 }],
1002
+ address: [{ "property": "name", "type": 2 }, { "property": "street", "type": 2 }, { "property": "city", "type": 2 }, { "property": "postalCode", "type": 2 }, { "property": "dateCreated", "type": 5 }],
1003
+ pet: [{ "property": "type", "type": 0 }, { "property": "sex", "type": 2 }, { "property": "name", "type": 2 }, { "property": "breed", "type": 2 }, { "property": "status", "type": 0 }, { "property": "neutered", "type": 4 }, { "property": "dateOfBirth", "type": 5 }, { "property": "notes", "type": 2 }],
886
1004
  invoice: [{ "property": "userUuid", "type": 2 }, { "property": "bookingUuid", "type": 2 }, { "property": "bookingAddonUuid", "type": 2 }, { "property": "status", "type": 2 }, { "property": "stripeInvoiceId", "type": 2 }, { "property": "dueDate", "type": 5 }, { "property": "notes", "type": 2 }],
887
1005
  userMembership: [{ "property": "status", "type": 1 }, { "property": "billingCycle", "type": 0 }, { "property": "stripeSubscriptionId", "type": 2 }, { "property": "membershipUuid", "type": 1 }],
888
1006
  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 }],
889
1007
  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 }],
890
1008
  booking: [{ "property": "code", "type": 3 }, { "property": "startDate", "type": 5 }, { "property": "endDate", "type": 5 }, { "property": "status", "type": 1 }, { "property": "dateCreated", "type": 5 }, { "property": "notes", "type": 2 }],
891
- bugReport: [{ "property": "status", "type": 0 }, { "property": "comment", "type": 2 }, { "property": "metadata", "type": 2 }, { "property": "logs", "type": 2 }],
1009
+ bugReport: [{ "property": "status", "type": 0 }, { "property": "comment", "type": 2 }, { "property": "metadata", "type": 2 }, { "property": "logs", "type": 2 }, { "property": "dateCreated", "type": 5 }],
892
1010
  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 }]
893
1011
  };
894
1012
 
@@ -2087,4 +2205,4 @@ var shouldBeYoutubeUrl = (value) => {
2087
2205
  };
2088
2206
  };
2089
2207
 
2090
- export { APP_TYPE_TOKEN, ActivityRestriction, ActivityType, AddressLinkType, AddressRestriction, AnswerLinkType, AnswerRestriction, AppType, AuthRegisterRestriction, BOOKING_OVERVIEW_STATUSES, BOT_PATH_TOKEN, BookingAddonRestriction, BookingAddonType, BookingRestriction, BookingStatusType, BugReportRestriction, BugReportStatusType, CommentLinkType, CommentRestriction, CommonConfigService, DependencyInjectionContainer, DrivingRouteRestriction, InvoiceRestriction, InvoiceStatusType, LogService, MembershipBillingCycleType, MembershipRestriction, MembershipStatus, MembershipType, MouseButton, NANAS_PALLETTE, NetworkState, OrderDirectionType, PermissionRestriction, PermissionType, PetRestriction, PetSexType, PetStatusType, PetType, QuestionForType, QuestionRestriction, QuestionType, SITE_CONFIG_TOKEN, SearchableColumnType, StripeRestriction, SupportedLanguageArray, TempLinkType, TempRegistrationStatus, UnavailabilityRestriction, UploadLinkType, UploadRestriction, UploadType, UserAccountFlagType, UserRestriction, UserType, UuidRestriction, activityShortCode, addDays, addMinutes, addMonths, addSeconds, addSpacesForEnum, addToParallelTasks, allowedNonNumericalValuesInContactNumber, anyObject, apiRoute, apiRouteParam, arrayContains, arrayOfNLength, capitalizeFirstLetter, changeMonth, colourPalette, commonEmailLinks, computeBookingNightCount, computeBookingStatusCounts, contactNumberCharValid, contactNumberValid, convertToDate, convertToFullDateSelection, createToken, cyrb53, dateDiffInDays, debounceLeading, defaultSiteColour, emailValid, fakePromise, filterBookingsByOverviewStatus, formatBookingCalendarLabel, formatBookingNightsTooltip, formatDate, formatFileSize, formatForBookingDate, formatForDateDropdown, formatForDateLocal, formatForDateLocalDetailed, formatForDateOfBirth, formatForDateWithTime, formatPetTypesLabel, getActiveUserMembership, getAgeInYears, getAllPetQuestionForType, getAppType, getArrFromEnum, getBookingStatusLabelForAdmin, getBotPath, getCalendarDropdownDisplayValue, getCalendarDropdownForDateOfBirthDisplayValue, getCommonConfig, getDayClassObject, getDayElements, getDayHeadingElements, getImageParams, getLog, getMembershipTypeLabel, getMimeTypeFromExtension, getPayloadFromJwt, getPerformanceTimer, getPetAvatarUrl, getPetTypeLabel, getQuestionGroups, getSiteColour, getSiteConfig, getUserAvatarUrl, getUsersName, getWeekNumber, hasRequiredPermissions, hubspotQuestionsExport, 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, parseBookingOverviewStatuses, passwordValid, portalGlyphLength, postCodeValid, promiseFromValue, randomIntFromRange, randomItemFromArray, rootContainer, rootDependencyInjectionSetup, searchColumns, selectedItemsExist, selectedOptionIsInEnum, separateValidation, serializeBookingOverviewStatuses, setContainerToken, setContainerTokenLazy, setSiteConfig, shouldBeUrl, shouldBeYoutubeUrl, showSecondCalendar, socialLinks, timeout, tryParseNumber, uploadsThatNeedEncryption, urlAddQueryParam, urlRef, userMustChangePassword, uuidv4, validUuidChars, validateForEach, webAppTypes, weekdayTranslationKeyOrder };
2208
+ export { APP_TYPE_TOKEN, ActivityRestriction, ActivityType, AddressLinkType, AddressRestriction, AnswerLinkType, AnswerRestriction, AppType, AuthRegisterRestriction, BOOKING_OVERVIEW_STATUSES, BOT_PATH_TOKEN, BookingAddonRestriction, BookingAddonType, BookingRestriction, BookingStatusType, BugReportRestriction, BugReportStatusType, CdnAppImage, CommentLinkType, CommentRestriction, CommonConfigService, DependencyInjectionContainer, DrivingRouteRestriction, InvoiceRestriction, InvoiceStatusType, LogService, MembershipBillingCycleType, MembershipRestriction, MembershipStatus, MembershipType, MouseButton, NANAS_PALLETTE, NetworkState, OrderDirectionType, PermissionRestriction, PermissionType, PetRestriction, PetSexType, PetStatusType, PetType, QuestionForType, QuestionRestriction, QuestionType, SITE_CONFIG_TOKEN, SearchableColumnType, SentEmailLinkType, SentEmailRestriction, SentEmailSentStatus, StripeRestriction, SupportedLanguageArray, TempLinkType, TempRegistrationStatus, UnavailabilityRestriction, UploadLinkType, UploadRestriction, UploadType, UserAccountFlagType, UserRestriction, UserType, UuidRestriction, activityShortCode, addDays, addMinutes, addMonths, addSeconds, addSpacesForEnum, addToParallelTasks, allowedNonNumericalValuesInContactNumber, anyObject, apiRoute, apiRouteParam, arrayContains, arrayOfNLength, capitalizeFirstLetter, changeMonth, colourPalette, commonEmailLinks, computeBookingNightCount, computeBookingStatusCounts, contactNumberCharValid, contactNumberValid, convertToDate, convertToFullDateSelection, createToken, cyrb53, dateDiffInDays, debounceLeading, defaultSiteColour, emailValid, fakePromise, filterBookingsByOverviewStatus, formatBookingCalendarLabel, formatBookingNightsTooltip, formatDate, formatFileSize, formatForBookingDate, formatForDateDropdown, formatForDateLocal, formatForDateLocalDetailed, formatForDateOfBirth, formatForDateWithTime, formatPetTypesLabel, getActiveUserMembership, getAgeInYears, getAllPetQuestionForType, getAppType, getArrFromEnum, getBookingStatusLabelForAdmin, getBotPath, getCalendarDropdownDisplayValue, getCalendarDropdownForDateOfBirthDisplayValue, getCommonConfig, getDayClassObject, getDayElements, getDayHeadingElements, getImageParams, getLog, getMembershipTypeLabel, getMimeTypeFromExtension, getPayloadFromJwt, getPerformanceTimer, getPetAvatarUrl, getPetTypeLabel, getQuestionGroups, getSiteColour, getSiteConfig, getUserAvatarUrl, getUsersName, getWeekNumber, hasRequiredPermissions, hubspotQuestionsExport, 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, parseBookingOverviewStatuses, passwordValid, portalGlyphLength, postCodeValid, promiseFromValue, randomIntFromRange, randomItemFromArray, rootContainer, rootDependencyInjectionSetup, searchColumns, selectedItemsExist, selectedOptionIsInEnum, separateValidation, serializeBookingOverviewStatuses, setContainerToken, setContainerTokenLazy, setSiteConfig, shouldBeUrl, shouldBeYoutubeUrl, showSecondCalendar, socialLinks, timeout, tryParseNumber, uploadsThatNeedEncryption, urlAddQueryParam, urlRef, userMustChangePassword, uuidv4, validUuidChars, validateForEach, webAppTypes, weekdayTranslationKeyOrder };