@resira/sdk 0.2.6 → 0.2.7

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 CHANGED
@@ -27,12 +27,6 @@ const resira = new Resira({
27
27
  apiKey: "resira_live_your_api_key_here",
28
28
  maxRetries: 3,
29
29
  retryBaseDelay: 500,
30
- // Optional explicit overrides:
31
- // baseUrl: "https://your-api.example.com",
32
- // baseUrls: [
33
- // { url: "https://origin-a.example.com", weight: 1 },
34
- // { url: "https://origin-b.example.com", weight: 1 },
35
- // ],
36
30
  });
37
31
  ```
38
32
 
@@ -49,7 +43,7 @@ const resira = new Resira({
49
43
 
50
44
  - The SDK keeps a browser session sticky to the selected origin.
51
45
  - Ambient host-app env vars such as `NEXT_PUBLIC_API_URL` are ignored.
52
- - Only explicit SDK config via `baseUrl` or `baseUrls` overrides the built-in production defaults.
46
+ - Only explicit SDK config via `baseUrl` or `baseUrls` overrides the default routing behavior.
53
47
  - In development, the SDK defaults to `http://localhost:3001`.
54
48
 
55
49
  ## Core methods
package/dist/index.d.cts CHANGED
@@ -222,7 +222,7 @@ interface ApiErrorBody {
222
222
  retryAfter?: number;
223
223
  }
224
224
  /** Pricing model for a product/service. */
225
- type PricingModel = "per_session" | "per_person";
225
+ type PricingModel = "per_session" | "per_person" | "per_rider";
226
226
  /** A duration-price pair for multi-duration services. */
227
227
  interface DurationPrice {
228
228
  /** Duration in minutes. */
@@ -230,6 +230,13 @@ interface DurationPrice {
230
230
  /** Price in the smallest currency unit (cents). */
231
231
  priceCents: number;
232
232
  }
233
+ /** A rider-tier with its own set of duration-price pairs. */
234
+ interface RiderTierPrice {
235
+ /** Number of riders this tier applies to. */
236
+ riders: number;
237
+ /** Duration-price options for this rider count. */
238
+ durationPricing: DurationPrice[];
239
+ }
233
240
  /** A bookable product/service as returned by the public API. */
234
241
  interface Product {
235
242
  /** Unique product identifier. */
@@ -246,6 +253,8 @@ interface Product {
246
253
  currency: string;
247
254
  /** Optional image URL. */
248
255
  imageUrl?: string;
256
+ /** Optional calendar/display color for this service, usually configured in admin settings. */
257
+ serviceColor?: string;
249
258
  /** Whether the product is active. */
250
259
  active: boolean;
251
260
  /** Sort order. */
@@ -260,6 +269,8 @@ interface Product {
260
269
  maxPartySize?: number;
261
270
  /** Available duration options with per-duration pricing. If absent, single duration. */
262
271
  durationPricing?: DurationPrice[];
272
+ /** Rider-tier pricing (per_rider model). Each tier has a rider count and its own duration-price set. */
273
+ riderTierPricing?: RiderTierPrice[];
263
274
  }
264
275
  /** Response wrapper for product listing. */
265
276
  interface ProductListResponse {
@@ -671,4 +682,4 @@ declare class ResiraNetworkError extends ResiraError {
671
682
  constructor(message: string, cause: unknown);
672
683
  }
673
684
 
674
- export { type ApiErrorBody, type Availability, type AvailabilityParams, type ConfirmPaymentRequest, type ConfirmPaymentResponse, type CreatePaymentIntentRequest, type CreateReservationRequest, type DateAvailability, type DurationPrice, type ListReservationsParams, type PaginatedReservations, type PaymentIntentResponse, type PricingModel, type Product, type ProductListResponse, type PromoCode, type PropertyConfig, type PublicResource, type RefundRule, type Reservation, type ReservationResponse, Resira, ResiraApiError, type ResiraConfig, ResiraError, ResiraNetworkError, ResiraRateLimitError, type ResourceListResponse, type TimeSlotAvailability, type ValidatePromoCodeResponse, type WeightedBaseUrl };
685
+ export { type ApiErrorBody, type Availability, type AvailabilityParams, type ConfirmPaymentRequest, type ConfirmPaymentResponse, type CreatePaymentIntentRequest, type CreateReservationRequest, type DateAvailability, type DurationPrice, type ListReservationsParams, type PaginatedReservations, type PaymentIntentResponse, type PricingModel, type Product, type ProductListResponse, type PromoCode, type PropertyConfig, type PublicResource, type RefundRule, type Reservation, type ReservationResponse, Resira, ResiraApiError, type ResiraConfig, ResiraError, ResiraNetworkError, ResiraRateLimitError, type ResourceListResponse, type RiderTierPrice, type TimeSlotAvailability, type ValidatePromoCodeResponse, type WeightedBaseUrl };
package/dist/index.d.ts CHANGED
@@ -222,7 +222,7 @@ interface ApiErrorBody {
222
222
  retryAfter?: number;
223
223
  }
224
224
  /** Pricing model for a product/service. */
225
- type PricingModel = "per_session" | "per_person";
225
+ type PricingModel = "per_session" | "per_person" | "per_rider";
226
226
  /** A duration-price pair for multi-duration services. */
227
227
  interface DurationPrice {
228
228
  /** Duration in minutes. */
@@ -230,6 +230,13 @@ interface DurationPrice {
230
230
  /** Price in the smallest currency unit (cents). */
231
231
  priceCents: number;
232
232
  }
233
+ /** A rider-tier with its own set of duration-price pairs. */
234
+ interface RiderTierPrice {
235
+ /** Number of riders this tier applies to. */
236
+ riders: number;
237
+ /** Duration-price options for this rider count. */
238
+ durationPricing: DurationPrice[];
239
+ }
233
240
  /** A bookable product/service as returned by the public API. */
234
241
  interface Product {
235
242
  /** Unique product identifier. */
@@ -246,6 +253,8 @@ interface Product {
246
253
  currency: string;
247
254
  /** Optional image URL. */
248
255
  imageUrl?: string;
256
+ /** Optional calendar/display color for this service, usually configured in admin settings. */
257
+ serviceColor?: string;
249
258
  /** Whether the product is active. */
250
259
  active: boolean;
251
260
  /** Sort order. */
@@ -260,6 +269,8 @@ interface Product {
260
269
  maxPartySize?: number;
261
270
  /** Available duration options with per-duration pricing. If absent, single duration. */
262
271
  durationPricing?: DurationPrice[];
272
+ /** Rider-tier pricing (per_rider model). Each tier has a rider count and its own duration-price set. */
273
+ riderTierPricing?: RiderTierPrice[];
263
274
  }
264
275
  /** Response wrapper for product listing. */
265
276
  interface ProductListResponse {
@@ -671,4 +682,4 @@ declare class ResiraNetworkError extends ResiraError {
671
682
  constructor(message: string, cause: unknown);
672
683
  }
673
684
 
674
- export { type ApiErrorBody, type Availability, type AvailabilityParams, type ConfirmPaymentRequest, type ConfirmPaymentResponse, type CreatePaymentIntentRequest, type CreateReservationRequest, type DateAvailability, type DurationPrice, type ListReservationsParams, type PaginatedReservations, type PaymentIntentResponse, type PricingModel, type Product, type ProductListResponse, type PromoCode, type PropertyConfig, type PublicResource, type RefundRule, type Reservation, type ReservationResponse, Resira, ResiraApiError, type ResiraConfig, ResiraError, ResiraNetworkError, ResiraRateLimitError, type ResourceListResponse, type TimeSlotAvailability, type ValidatePromoCodeResponse, type WeightedBaseUrl };
685
+ export { type ApiErrorBody, type Availability, type AvailabilityParams, type ConfirmPaymentRequest, type ConfirmPaymentResponse, type CreatePaymentIntentRequest, type CreateReservationRequest, type DateAvailability, type DurationPrice, type ListReservationsParams, type PaginatedReservations, type PaymentIntentResponse, type PricingModel, type Product, type ProductListResponse, type PromoCode, type PropertyConfig, type PublicResource, type RefundRule, type Reservation, type ReservationResponse, Resira, ResiraApiError, type ResiraConfig, ResiraError, ResiraNetworkError, ResiraRateLimitError, type ResourceListResponse, type RiderTierPrice, type TimeSlotAvailability, type ValidatePromoCodeResponse, type WeightedBaseUrl };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@resira/sdk",
3
- "version": "0.2.6",
3
+ "version": "0.2.7",
4
4
  "description": "TypeScript SDK for the Resira public reservation API",
5
5
  "license": "MIT",
6
6
  "type": "module",