@nanas-home/hub-common 0.43.982 → 0.45.1015

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.
@@ -125,6 +125,8 @@ var apiRoute = {
125
125
  admin: {
126
126
  activity: {
127
127
  prefix: "/admin/activity",
128
+ getAll: "",
129
+ byUserUuid: `/user/${apiRouteParam.userUuid}`,
128
130
  swagger: {
129
131
  name: "Activity",
130
132
  description: "Endpoints for retrieving and managing activities"
@@ -138,11 +140,14 @@ var apiRoute = {
138
140
  },
139
141
  answer: {
140
142
  prefix: "/admin/answer",
143
+ getForUser: `/user/${apiRouteParam.userUuid}`,
144
+ getForPet: `/pet/${apiRouteParam.petUuid}`,
141
145
  swagger: { name: "Answers", description: "Endpoints for managing answers to signup questions" }
142
146
  },
143
147
  booking: {
144
148
  prefix: "/admin/booking",
145
- byUser: "/user",
149
+ byUser: `/user/${apiRouteParam.userUuid}`,
150
+ byPet: `/pet/${apiRouteParam.petUuid}`,
146
151
  withRelationships: `/with-relationships/${apiRouteParam.bookingUuid}`,
147
152
  assignHost: `/assign-host/${apiRouteParam.bookingUuid}/${apiRouteParam.userUuid}`,
148
153
  removeHost: `/remove-host/${apiRouteParam.bookingUuid}`,
@@ -184,6 +189,7 @@ var apiRoute = {
184
189
  },
185
190
  user: {
186
191
  prefix: "/admin/user",
192
+ searchHosts: "search-hosts",
187
193
  swagger: { name: "Users", description: "Endpoints for Admins to manage Users" }
188
194
  },
189
195
  userMembership: {
@@ -281,6 +287,7 @@ var apiRoute = {
281
287
  prefix: "/user-membership",
282
288
  getForCurrentUser: "",
283
289
  signUpForSubscription: "/sign-up",
290
+ change: `/${apiRouteParam.userMembershipUuid}/change`,
284
291
  pause: `/${apiRouteParam.userMembershipUuid}/pause`,
285
292
  resume: `/${apiRouteParam.userMembershipUuid}/resume`,
286
293
  cancel: `/${apiRouteParam.userMembershipUuid}/cancel`,
@@ -374,6 +381,7 @@ var MembershipStatus = /* @__PURE__ */ ((MembershipStatus2) => {
374
381
  MembershipStatus2[MembershipStatus2["Paused"] = 10] = "Paused";
375
382
  MembershipStatus2[MembershipStatus2["Trialing"] = 11] = "Trialing";
376
383
  MembershipStatus2[MembershipStatus2["Unpaid"] = 12] = "Unpaid";
384
+ MembershipStatus2[MembershipStatus2["Expired"] = 19] = "Expired";
377
385
  MembershipStatus2[MembershipStatus2["Cancelled"] = 20] = "Cancelled";
378
386
  MembershipStatus2[MembershipStatus2["Incomplete"] = 21] = "Incomplete";
379
387
  MembershipStatus2[MembershipStatus2["IncompleteExpired"] = 22] = "IncompleteExpired";
@@ -545,6 +553,87 @@ var UserType = /* @__PURE__ */ ((UserType2) => {
545
553
  return UserType2;
546
554
  })(UserType || {});
547
555
 
556
+ // src/contracts/generated/hubspotQuestions.ts
557
+ var hubspotQuestionsExport = {
558
+ can_your_dog_walk_the_stairs_: {
559
+ can_your_dog_walk_the_stairs__option0: "Yes",
560
+ can_your_dog_walk_the_stairs__option1: "Yes, unless they are steep stairs (typical Dutch house)",
561
+ can_your_dog_walk_the_stairs__option2: "No, but can be carried easily",
562
+ can_your_dog_walk_the_stairs__option3: "No, needs an elevator"
563
+ },
564
+ does_your_dog_need_to_sleep_in_the_bedroom_: {
565
+ does_your_dog_need_to_sleep_in_the_bedroom__option0: "No",
566
+ does_your_dog_need_to_sleep_in_the_bedroom__option1: "Yes, otherwise cries/barks",
567
+ does_your_dog_need_to_sleep_in_the_bedroom__option2: "Preferably, but not required"
568
+ },
569
+ dog_size_: {
570
+ dog_size__option0: "Small",
571
+ dog_size__option1: "Medium",
572
+ dog_size__option2: "Large"
573
+ },
574
+ how_long_can_your_dog_be_home_alone_: {
575
+ how_long_can_your_dog_be_home_alone__option0: "My dog can't be alone",
576
+ how_long_can_your_dog_be_home_alone__option1: "1-3h",
577
+ how_long_can_your_dog_be_home_alone__option2: "During a normal work day (8h)"
578
+ },
579
+ is_your_dog_allowed_on_the_couch_: {
580
+ is_your_dog_allowed_on_the_couch__option0: "No",
581
+ is_your_dog_allowed_on_the_couch__option1: 'Yes, but listens to "No"',
582
+ is_your_dog_allowed_on_the_couch__option2: "Yes, and they will keep trying"
583
+ },
584
+ gets_along_with_cats_: {
585
+ gets_along_with_cats__option0: "Yes",
586
+ gets_along_with_cats__option1: "No",
587
+ gets_along_with_cats__option2: "Depends on the cat",
588
+ gets_along_with_cats__option3: "We don't know yet"
589
+ },
590
+ gets_along_with_dogs_: {
591
+ gets_along_with_dogs__option0: "Yes",
592
+ gets_along_with_dogs__option1: "No",
593
+ gets_along_with_dogs__option2: "Depends on the dog",
594
+ gets_along_with_dogs__option3: "We don't know yet"
595
+ },
596
+ gets_along_with_kids_: {
597
+ gets_along_with_kids__option0: "Yes",
598
+ gets_along_with_kids__option1: "No",
599
+ gets_along_with_kids__option2: "Depends on the kid",
600
+ gets_along_with_kids__option3: "We don't know yet"
601
+ },
602
+ type_of_home: {
603
+ type_of_home_option0: "Studio",
604
+ type_of_home_option1: "Apartment",
605
+ type_of_home_option2: "House"
606
+ },
607
+ house_access: {
608
+ house_access_option0: "Steep stairs (typical Dutch house)",
609
+ house_access_option1: "Normal stairs",
610
+ house_access_option2: "Elevator",
611
+ house_access_option3: "N/A (ground floor)"
612
+ },
613
+ living_situation: {
614
+ living_situation_option0: "alone",
615
+ living_situation_option1: "with housemate(s)",
616
+ living_situation_option2: "with partner",
617
+ living_situation_option3: "family with kids"
618
+ },
619
+ lives_with_a_pet_: {
620
+ lives_with_a_pet__option0: "No",
621
+ lives_with_a_pet__option1: "Yes, a cat ",
622
+ lives_with_a_pet__option2: "Yes, a dog",
623
+ lives_with_a_pet__option3: "Yes, other (rodent/fish/bird)"
624
+ },
625
+ pet_sitting_experience: {
626
+ pet_sitting_experience_option0: "Low - experience owning a pet",
627
+ pet_sitting_experience_option1: "Medium - experience with pet sitting for others",
628
+ pet_sitting_experience_option2: "High - experience with dog training, shelters, or medical care"
629
+ },
630
+ dog_preferences: {
631
+ dog_preferences_option0: "Small size only (<10kg)",
632
+ dog_preferences_option1: "Small to medium size (10-25kg)",
633
+ dog_preferences_option2: "All sizes"
634
+ }
635
+ };
636
+
548
637
  // src/contracts/generated/restrictions/activityRestriction.ts
549
638
  var ActivityRestriction = {
550
639
  details: { maxLength: 500 }
@@ -605,7 +694,7 @@ var MembershipRestriction = {
605
694
  bookingAdvanceDays: { minValue: 0, maxValue: 1e3 },
606
695
  bookingCalenderMonthsOpenInAdvance: { minValue: 0, maxValue: 1e3 },
607
696
  stripeMonthlyProductId: { minLength: 3, maxLength: 80 },
608
- stripeYearlyProductId: { minLength: 3, maxLength: 80 }
697
+ stripeYearlyProductId: { minLength: 0, maxLength: 80 }
609
698
  };
610
699
 
611
700
  // src/contracts/generated/restrictions/permissionRestriction.ts
@@ -632,7 +721,7 @@ var QuestionRestriction = {
632
721
  // src/contracts/generated/restrictions/stripeRestriction.ts
633
722
  var StripeRestriction = {
634
723
  common: {
635
- id: { minLength: 1, maxLength: 100 },
724
+ id: { minLength: 0, maxLength: 100 },
636
725
  type: { minLength: 1, maxLength: 100 },
637
726
  customerId: { minLength: 1, maxLength: 100 }
638
727
  },
@@ -651,7 +740,8 @@ var UnavailabilityRestriction = {
651
740
  // src/contracts/generated/restrictions/uploadRestriction.ts
652
741
  var UploadRestriction = {
653
742
  fileName: { minLength: 3, maxLength: 150 },
654
- blobType: { minLength: 1, maxLength: 50 }
743
+ blobType: { minLength: 1, maxLength: 50 },
744
+ size: { max: "20m" }
655
745
  };
656
746
 
657
747
  // src/contracts/generated/restrictions/userRestriction.ts
@@ -687,13 +777,16 @@ var onlyUnique = (value, index, array) => {
687
777
  return array.indexOf(value) === index;
688
778
  };
689
779
  var arrayOfNLength = (length) => Array.from(Array(length).keys());
690
- var arrayContains = (arr, items, method = "AND") => {
691
- for (const item of items) {
692
- const hasItem = arr.includes(item);
780
+ var arrayContains = (arr, requiredItems, method = "AND") => {
781
+ for (const requiredItem of requiredItems) {
782
+ const hasItem = arr.includes(requiredItem);
693
783
  if (method == "AND" && hasItem == false) return false;
694
784
  if (method == "OR" && hasItem == true) return true;
695
785
  }
696
- return true;
786
+ if (method == "AND") {
787
+ return true;
788
+ }
789
+ return false;
697
790
  };
698
791
 
699
792
  // src/services/internal/config/commonConfigService.ts
@@ -1408,24 +1501,6 @@ var defaultSiteColour = {
1408
1501
  primary: "#97A571",
1409
1502
  secondary: "#97A571"
1410
1503
  };
1411
-
1412
- // src/services/internal/debug/debugService.ts
1413
- var DebugService = class {
1414
- _setDebug(e) {
1415
- if (e.code == "ControlLeft") {
1416
- document.body.classList.add("debug");
1417
- }
1418
- }
1419
- _removeDebug(e) {
1420
- if (e.code == "ControlLeft") {
1421
- document.body.classList.remove("debug");
1422
- }
1423
- }
1424
- setupGlobalDebugKey = () => {
1425
- document.addEventListener("keydown", this._setDebug);
1426
- document.addEventListener("keyup", this._removeDebug);
1427
- };
1428
- };
1429
1504
  var TranslationService = class {
1430
1505
  constructor(log, _config) {
1431
1506
  this._config = _config;
@@ -1678,4 +1753,4 @@ var shouldBeYoutubeUrl = (value) => {
1678
1753
  };
1679
1754
  };
1680
1755
 
1681
- export { APP_TYPE_TOKEN, ActivityRestriction, ActivityType, AddressLinkType, AddressRestriction, AnswerLinkType, AnswerRestriction, AppType, BOT_PATH_TOKEN, BookingAddonRestriction, BookingAddonType, BookingRestriction, BookingStatusType, CommentLinkType, CommentRestriction, CommonConfigService, DebugService, DependencyInjectionContainer, DrivingRouteRestriction, InvoiceRestriction, InvoiceStatusType, LogService, MembershipBillingCycleType, MembershipRestriction, MembershipStatus, MembershipType, MouseButton, NetworkState, OrderDirectionType, PermissionRestriction, PermissionType, PetRestriction, PetSexType, PetStatusType, PetType, QuestionForType, QuestionRestriction, QuestionType, SITE_CONFIG_TOKEN, SearchableColumnType, StripeRestriction, 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, getActiveUserMembership, 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 };
1756
+ export { APP_TYPE_TOKEN, ActivityRestriction, ActivityType, AddressLinkType, AddressRestriction, AnswerLinkType, AnswerRestriction, AppType, BOT_PATH_TOKEN, BookingAddonRestriction, BookingAddonType, BookingRestriction, BookingStatusType, CommentLinkType, CommentRestriction, CommonConfigService, DependencyInjectionContainer, DrivingRouteRestriction, InvoiceRestriction, InvoiceStatusType, LogService, MembershipBillingCycleType, MembershipRestriction, MembershipStatus, MembershipType, MouseButton, NetworkState, OrderDirectionType, PermissionRestriction, PermissionType, PetRestriction, PetSexType, PetStatusType, PetType, QuestionForType, QuestionRestriction, QuestionType, SITE_CONFIG_TOKEN, SearchableColumnType, StripeRestriction, 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, getActiveUserMembership, getAgeInYears, getAllPetQuestionForType, getAppType, getArrFromEnum, getBotPath, getCalendarDropdownDisplayValue, getCalendarDropdownForDateOfBirthDisplayValue, getCommonConfig, getDayClassObject, getDayElements, getDayHeadingElements, getImageParams, getLog, getMimeTypeFromExtension, getPayloadFromJwt, getPerformanceTimer, getPetAvatarUrl, 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, 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 };