@peektravel/app-utilities 0.5.3 → 0.6.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/README.md +4 -0
- package/dist/index.cjs +18 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +26 -1
- package/dist/index.d.ts +26 -1
- package/dist/index.js +18 -0
- package/dist/index.js.map +1 -1
- package/dist/ui/index.cjs +366 -30
- package/dist/ui/index.cjs.map +1 -1
- package/dist/ui/index.d.cts +97 -9
- package/dist/ui/index.d.ts +97 -9
- package/dist/ui/index.js +366 -30
- package/dist/ui/index.js.map +1 -1
- package/docs/ui.md +30 -7
- package/llms.txt +5 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -345,6 +345,22 @@ interface Product {
|
|
|
345
345
|
* pricing overrides use this to set the currency on fixed-price adjustments.
|
|
346
346
|
*/
|
|
347
347
|
currency: string;
|
|
348
|
+
/**
|
|
349
|
+
* URL of the product's primary display image, or `null` when Peek reports
|
|
350
|
+
* none. Populated for activities/rentals; always `null` for add-ons.
|
|
351
|
+
*/
|
|
352
|
+
imageUrl: string | null;
|
|
353
|
+
/**
|
|
354
|
+
* Long-form product description (may contain HTML), or `null` when Peek
|
|
355
|
+
* reports none. Populated for activities/rentals; always `null` for add-ons.
|
|
356
|
+
*/
|
|
357
|
+
description: string | null;
|
|
358
|
+
/**
|
|
359
|
+
* Where the experience meets, or `null` when Peek reports no location detail.
|
|
360
|
+
* Populated for activities/rentals; always `null` for add-ons. Each field
|
|
361
|
+
* inside is independently nullable.
|
|
362
|
+
*/
|
|
363
|
+
meetingLocation: ProductMeetingLocation | null;
|
|
348
364
|
/**
|
|
349
365
|
* The bookable sub-options of this product.
|
|
350
366
|
*
|
|
@@ -353,6 +369,15 @@ interface Product {
|
|
|
353
369
|
*/
|
|
354
370
|
tickets: ProductTicket[];
|
|
355
371
|
}
|
|
372
|
+
/** The meeting point for a bookable experience. Every field is nullable. */
|
|
373
|
+
interface ProductMeetingLocation {
|
|
374
|
+
/** Free-text summary / instructions for the meeting point. */
|
|
375
|
+
summary: string | null;
|
|
376
|
+
/** Formatted postal address of the meeting point. */
|
|
377
|
+
address: string | null;
|
|
378
|
+
/** Map/link URL for the meeting point. */
|
|
379
|
+
url: string | null;
|
|
380
|
+
}
|
|
356
381
|
/** A single bookable sub-option (resource option or add-on item option). */
|
|
357
382
|
interface ProductTicket {
|
|
358
383
|
/** Unique identifier of the ticket / option. */
|
|
@@ -2513,4 +2538,4 @@ declare class AcmeApiError extends Error {
|
|
|
2513
2538
|
constructor(statusCode: number, body: unknown, message?: string);
|
|
2514
2539
|
}
|
|
2515
2540
|
|
|
2516
|
-
export { ACTIVITY_PRODUCT_TYPE, ADD_ON_PRODUCT_TYPE, type AccessOptions, type AccountUser, AccountUserService, type AccountUserServiceOptions, AcmeAccessService, type AcmeAccessServiceConfig, type AcmeActivity, type AcmeActivityTicket, AcmeApiError, AcmeProductService, type Activity, type ActivityOverrides, type ActivityTicket, type AddAddonInput, AdminAccountRequiredError, type Agent, type AssignGuideResult, type AssignedActivity, type AssignedResource, type Availability, AvailabilityService, type AvailabilityTime, type AvailabilityTimesQuery, type Booking, type BookingAddon, type BookingAddonMoney, type BookingAddonOption, type BookingAddons, type BookingAddonsMutationResult, type BookingPaymentsOnFile, type BookingReadOptions, type BookingSearchBy, BookingService, type BookingServiceOptions, type BookingTimeRangeSearch, type CancelBookingResult, type Channel, type ClearOverridesInput, CngAccessService, type CngAccessServiceConfig, CngApiError, CngProductService, type CreateBookingGuest, type CreateBookingInput, type CreateBookingTicket, type CreateEngineInput, type CreatePromoCodeInput, type CreatedBooking, type CreatedPricingEngine, type CreatedPromoCode, type CustomQuestionAnswer, type DailyNote, DailyNoteService, type Duration, type Guest, type GuestMetadata, type Guide, type GuideAssignment, type InstallWebhookAccount, type InstallWebhookClaims, type InvoiceLinkResult, type Logger, type MakePaymentInput, type MakePaymentResult, type Membership, type MembershipPurchaseInput, MembershipService, type NoteMode, type Payment, type PaymentSource, PeekAccessService, type PeekAccessServiceConfig, type PeekAuthTokenClaims, type PeekAuthTokenUser, PeekGraphQLError, PeekHttpError, type PeekPlatform, PiiAccessDisabledError, type Price, type PricingActivityContext, type PricingEngine, type PricingMoney, type PricingNamedRef, type PricingOverride, type PricingOverrideFilter, PricingService, type Product, ProductService, type ProductServiceOptions, type ProductTicket, type PromoCode, type PromoCodeFixedAmount, PromoCodeService, type PromoCodeServiceOptions, type PurchasedMembership, RENTAL_PRODUCT_TYPE, RateLimitError, type RefundInput, type RefundResult, ResellerService, type ResolvedOverride, type ResolvedPricingOverride, type ResolvedResourceOption, type Resource, type ResourceOptionOverride, type ResourceOptionQuantity, type ResourcePool, type ResourcePoolAccountUser, type ResourcePoolAssignment, type ResourcePoolMode, ResourcePoolService, type Review, ReviewService, type Ticket, type Timeslot, type TimeslotFilter, TimeslotService, type UpdateEngineInput, type UpdateTimeslotResult, type UpsertOverridesInput, type UpsertOverridesResult, type Waiver, noopLogger, parseBookingWebhook, parseWaiverWebhook, verifyInstallWebhook };
|
|
2541
|
+
export { ACTIVITY_PRODUCT_TYPE, ADD_ON_PRODUCT_TYPE, type AccessOptions, type AccountUser, AccountUserService, type AccountUserServiceOptions, AcmeAccessService, type AcmeAccessServiceConfig, type AcmeActivity, type AcmeActivityTicket, AcmeApiError, AcmeProductService, type Activity, type ActivityOverrides, type ActivityTicket, type AddAddonInput, AdminAccountRequiredError, type Agent, type AssignGuideResult, type AssignedActivity, type AssignedResource, type Availability, AvailabilityService, type AvailabilityTime, type AvailabilityTimesQuery, type Booking, type BookingAddon, type BookingAddonMoney, type BookingAddonOption, type BookingAddons, type BookingAddonsMutationResult, type BookingPaymentsOnFile, type BookingReadOptions, type BookingSearchBy, BookingService, type BookingServiceOptions, type BookingTimeRangeSearch, type CancelBookingResult, type Channel, type ClearOverridesInput, CngAccessService, type CngAccessServiceConfig, CngApiError, CngProductService, type CreateBookingGuest, type CreateBookingInput, type CreateBookingTicket, type CreateEngineInput, type CreatePromoCodeInput, type CreatedBooking, type CreatedPricingEngine, type CreatedPromoCode, type CustomQuestionAnswer, type DailyNote, DailyNoteService, type Duration, type Guest, type GuestMetadata, type Guide, type GuideAssignment, type InstallWebhookAccount, type InstallWebhookClaims, type InvoiceLinkResult, type Logger, type MakePaymentInput, type MakePaymentResult, type Membership, type MembershipPurchaseInput, MembershipService, type NoteMode, type Payment, type PaymentSource, PeekAccessService, type PeekAccessServiceConfig, type PeekAuthTokenClaims, type PeekAuthTokenUser, PeekGraphQLError, PeekHttpError, type PeekPlatform, PiiAccessDisabledError, type Price, type PricingActivityContext, type PricingEngine, type PricingMoney, type PricingNamedRef, type PricingOverride, type PricingOverrideFilter, PricingService, type Product, type ProductMeetingLocation, ProductService, type ProductServiceOptions, type ProductTicket, type PromoCode, type PromoCodeFixedAmount, PromoCodeService, type PromoCodeServiceOptions, type PurchasedMembership, RENTAL_PRODUCT_TYPE, RateLimitError, type RefundInput, type RefundResult, ResellerService, type ResolvedOverride, type ResolvedPricingOverride, type ResolvedResourceOption, type Resource, type ResourceOptionOverride, type ResourceOptionQuantity, type ResourcePool, type ResourcePoolAccountUser, type ResourcePoolAssignment, type ResourcePoolMode, ResourcePoolService, type Review, ReviewService, type Ticket, type Timeslot, type TimeslotFilter, TimeslotService, type UpdateEngineInput, type UpdateTimeslotResult, type UpsertOverridesInput, type UpsertOverridesResult, type Waiver, noopLogger, parseBookingWebhook, parseWaiverWebhook, verifyInstallWebhook };
|
package/dist/index.d.ts
CHANGED
|
@@ -345,6 +345,22 @@ interface Product {
|
|
|
345
345
|
* pricing overrides use this to set the currency on fixed-price adjustments.
|
|
346
346
|
*/
|
|
347
347
|
currency: string;
|
|
348
|
+
/**
|
|
349
|
+
* URL of the product's primary display image, or `null` when Peek reports
|
|
350
|
+
* none. Populated for activities/rentals; always `null` for add-ons.
|
|
351
|
+
*/
|
|
352
|
+
imageUrl: string | null;
|
|
353
|
+
/**
|
|
354
|
+
* Long-form product description (may contain HTML), or `null` when Peek
|
|
355
|
+
* reports none. Populated for activities/rentals; always `null` for add-ons.
|
|
356
|
+
*/
|
|
357
|
+
description: string | null;
|
|
358
|
+
/**
|
|
359
|
+
* Where the experience meets, or `null` when Peek reports no location detail.
|
|
360
|
+
* Populated for activities/rentals; always `null` for add-ons. Each field
|
|
361
|
+
* inside is independently nullable.
|
|
362
|
+
*/
|
|
363
|
+
meetingLocation: ProductMeetingLocation | null;
|
|
348
364
|
/**
|
|
349
365
|
* The bookable sub-options of this product.
|
|
350
366
|
*
|
|
@@ -353,6 +369,15 @@ interface Product {
|
|
|
353
369
|
*/
|
|
354
370
|
tickets: ProductTicket[];
|
|
355
371
|
}
|
|
372
|
+
/** The meeting point for a bookable experience. Every field is nullable. */
|
|
373
|
+
interface ProductMeetingLocation {
|
|
374
|
+
/** Free-text summary / instructions for the meeting point. */
|
|
375
|
+
summary: string | null;
|
|
376
|
+
/** Formatted postal address of the meeting point. */
|
|
377
|
+
address: string | null;
|
|
378
|
+
/** Map/link URL for the meeting point. */
|
|
379
|
+
url: string | null;
|
|
380
|
+
}
|
|
356
381
|
/** A single bookable sub-option (resource option or add-on item option). */
|
|
357
382
|
interface ProductTicket {
|
|
358
383
|
/** Unique identifier of the ticket / option. */
|
|
@@ -2513,4 +2538,4 @@ declare class AcmeApiError extends Error {
|
|
|
2513
2538
|
constructor(statusCode: number, body: unknown, message?: string);
|
|
2514
2539
|
}
|
|
2515
2540
|
|
|
2516
|
-
export { ACTIVITY_PRODUCT_TYPE, ADD_ON_PRODUCT_TYPE, type AccessOptions, type AccountUser, AccountUserService, type AccountUserServiceOptions, AcmeAccessService, type AcmeAccessServiceConfig, type AcmeActivity, type AcmeActivityTicket, AcmeApiError, AcmeProductService, type Activity, type ActivityOverrides, type ActivityTicket, type AddAddonInput, AdminAccountRequiredError, type Agent, type AssignGuideResult, type AssignedActivity, type AssignedResource, type Availability, AvailabilityService, type AvailabilityTime, type AvailabilityTimesQuery, type Booking, type BookingAddon, type BookingAddonMoney, type BookingAddonOption, type BookingAddons, type BookingAddonsMutationResult, type BookingPaymentsOnFile, type BookingReadOptions, type BookingSearchBy, BookingService, type BookingServiceOptions, type BookingTimeRangeSearch, type CancelBookingResult, type Channel, type ClearOverridesInput, CngAccessService, type CngAccessServiceConfig, CngApiError, CngProductService, type CreateBookingGuest, type CreateBookingInput, type CreateBookingTicket, type CreateEngineInput, type CreatePromoCodeInput, type CreatedBooking, type CreatedPricingEngine, type CreatedPromoCode, type CustomQuestionAnswer, type DailyNote, DailyNoteService, type Duration, type Guest, type GuestMetadata, type Guide, type GuideAssignment, type InstallWebhookAccount, type InstallWebhookClaims, type InvoiceLinkResult, type Logger, type MakePaymentInput, type MakePaymentResult, type Membership, type MembershipPurchaseInput, MembershipService, type NoteMode, type Payment, type PaymentSource, PeekAccessService, type PeekAccessServiceConfig, type PeekAuthTokenClaims, type PeekAuthTokenUser, PeekGraphQLError, PeekHttpError, type PeekPlatform, PiiAccessDisabledError, type Price, type PricingActivityContext, type PricingEngine, type PricingMoney, type PricingNamedRef, type PricingOverride, type PricingOverrideFilter, PricingService, type Product, ProductService, type ProductServiceOptions, type ProductTicket, type PromoCode, type PromoCodeFixedAmount, PromoCodeService, type PromoCodeServiceOptions, type PurchasedMembership, RENTAL_PRODUCT_TYPE, RateLimitError, type RefundInput, type RefundResult, ResellerService, type ResolvedOverride, type ResolvedPricingOverride, type ResolvedResourceOption, type Resource, type ResourceOptionOverride, type ResourceOptionQuantity, type ResourcePool, type ResourcePoolAccountUser, type ResourcePoolAssignment, type ResourcePoolMode, ResourcePoolService, type Review, ReviewService, type Ticket, type Timeslot, type TimeslotFilter, TimeslotService, type UpdateEngineInput, type UpdateTimeslotResult, type UpsertOverridesInput, type UpsertOverridesResult, type Waiver, noopLogger, parseBookingWebhook, parseWaiverWebhook, verifyInstallWebhook };
|
|
2541
|
+
export { ACTIVITY_PRODUCT_TYPE, ADD_ON_PRODUCT_TYPE, type AccessOptions, type AccountUser, AccountUserService, type AccountUserServiceOptions, AcmeAccessService, type AcmeAccessServiceConfig, type AcmeActivity, type AcmeActivityTicket, AcmeApiError, AcmeProductService, type Activity, type ActivityOverrides, type ActivityTicket, type AddAddonInput, AdminAccountRequiredError, type Agent, type AssignGuideResult, type AssignedActivity, type AssignedResource, type Availability, AvailabilityService, type AvailabilityTime, type AvailabilityTimesQuery, type Booking, type BookingAddon, type BookingAddonMoney, type BookingAddonOption, type BookingAddons, type BookingAddonsMutationResult, type BookingPaymentsOnFile, type BookingReadOptions, type BookingSearchBy, BookingService, type BookingServiceOptions, type BookingTimeRangeSearch, type CancelBookingResult, type Channel, type ClearOverridesInput, CngAccessService, type CngAccessServiceConfig, CngApiError, CngProductService, type CreateBookingGuest, type CreateBookingInput, type CreateBookingTicket, type CreateEngineInput, type CreatePromoCodeInput, type CreatedBooking, type CreatedPricingEngine, type CreatedPromoCode, type CustomQuestionAnswer, type DailyNote, DailyNoteService, type Duration, type Guest, type GuestMetadata, type Guide, type GuideAssignment, type InstallWebhookAccount, type InstallWebhookClaims, type InvoiceLinkResult, type Logger, type MakePaymentInput, type MakePaymentResult, type Membership, type MembershipPurchaseInput, MembershipService, type NoteMode, type Payment, type PaymentSource, PeekAccessService, type PeekAccessServiceConfig, type PeekAuthTokenClaims, type PeekAuthTokenUser, PeekGraphQLError, PeekHttpError, type PeekPlatform, PiiAccessDisabledError, type Price, type PricingActivityContext, type PricingEngine, type PricingMoney, type PricingNamedRef, type PricingOverride, type PricingOverrideFilter, PricingService, type Product, type ProductMeetingLocation, ProductService, type ProductServiceOptions, type ProductTicket, type PromoCode, type PromoCodeFixedAmount, PromoCodeService, type PromoCodeServiceOptions, type PurchasedMembership, RENTAL_PRODUCT_TYPE, RateLimitError, type RefundInput, type RefundResult, ResellerService, type ResolvedOverride, type ResolvedPricingOverride, type ResolvedResourceOption, type Resource, type ResourceOptionOverride, type ResourceOptionQuantity, type ResourcePool, type ResourcePoolAccountUser, type ResourcePoolAssignment, type ResourcePoolMode, ResourcePoolService, type Review, ReviewService, type Ticket, type Timeslot, type TimeslotFilter, TimeslotService, type UpdateEngineInput, type UpdateTimeslotResult, type UpsertOverridesInput, type UpsertOverridesResult, type Waiver, noopLogger, parseBookingWebhook, parseWaiverWebhook, verifyInstallWebhook };
|
package/dist/index.js
CHANGED
|
@@ -2854,6 +2854,13 @@ function toPricingMoney(raw) {
|
|
|
2854
2854
|
|
|
2855
2855
|
// src/internal/peek/products/product-converter.ts
|
|
2856
2856
|
var ADD_ON_COLOR = "#FFFFFF";
|
|
2857
|
+
function toMeetingLocation(activity) {
|
|
2858
|
+
const summary = activity.infoMeetingLocation ?? null;
|
|
2859
|
+
const address = activity.meetingLocationFormattedAddress ?? null;
|
|
2860
|
+
const url = activity.meetingLocationUrl ?? null;
|
|
2861
|
+
if (summary === null && address === null && url === null) return null;
|
|
2862
|
+
return { summary, address, url };
|
|
2863
|
+
}
|
|
2857
2864
|
function fromActivities(activities) {
|
|
2858
2865
|
return activities.map(fromActivity);
|
|
2859
2866
|
}
|
|
@@ -2865,6 +2872,9 @@ function fromActivity(activity) {
|
|
|
2865
2872
|
type: activity.type,
|
|
2866
2873
|
color: activity.colorHex || "",
|
|
2867
2874
|
currency: activity.currency || "",
|
|
2875
|
+
imageUrl: activity.imageUrl ?? null,
|
|
2876
|
+
description: activity.description ?? null,
|
|
2877
|
+
meetingLocation: toMeetingLocation(activity),
|
|
2868
2878
|
tickets: (activity.resourceOptions ?? []).map((option) => ({
|
|
2869
2879
|
id: option.id,
|
|
2870
2880
|
name: option.name,
|
|
@@ -2886,6 +2896,9 @@ function fromItemOptionNodes(nodes) {
|
|
|
2886
2896
|
type: ADD_ON_PRODUCT_TYPE,
|
|
2887
2897
|
color: ADD_ON_COLOR,
|
|
2888
2898
|
currency: "",
|
|
2899
|
+
imageUrl: null,
|
|
2900
|
+
description: null,
|
|
2901
|
+
meetingLocation: null,
|
|
2889
2902
|
tickets: []
|
|
2890
2903
|
};
|
|
2891
2904
|
grouped.set(itemId, product);
|
|
@@ -2911,6 +2924,11 @@ var PRODUCTS_QUERY = `
|
|
|
2911
2924
|
type
|
|
2912
2925
|
colorHex
|
|
2913
2926
|
currency
|
|
2927
|
+
imageUrl
|
|
2928
|
+
description
|
|
2929
|
+
meetingLocationFormattedAddress
|
|
2930
|
+
meetingLocationUrl
|
|
2931
|
+
infoMeetingLocation
|
|
2914
2932
|
resourceOptions {
|
|
2915
2933
|
id
|
|
2916
2934
|
name
|