@slotchain/sdk 1.5.0 → 1.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/dist/index.d.mts CHANGED
@@ -66,6 +66,10 @@ interface ServiceItem {
66
66
  sort_order?: number;
67
67
  created_at: string;
68
68
  updated_at: string;
69
+ /** Set when the item has been soft-deleted. Filtered out by the SDK. */
70
+ deleted_at?: string | null;
71
+ /** Set when the item was withdrawn by the publisher (syndication). Filtered out by the SDK. */
72
+ withdrawn_at?: string | null;
69
73
  }
70
74
  /**
71
75
  * Enhanced Service type with nested service items (for tenant endpoint)
@@ -159,6 +163,8 @@ interface Service {
159
163
  price?: number;
160
164
  created_at: string;
161
165
  updated_at: string;
166
+ /** Set when the service has been soft-deleted. Filtered out by the SDK. */
167
+ deleted_at?: string | null;
162
168
  }
163
169
  /**
164
170
  * Metadata bag for a slot — open-ended key/value store, with well-known
@@ -451,6 +457,17 @@ interface UploadArtifactOptions {
451
457
  * Backed by a `slot_moment` — see NOTICES_PLAN.md in slotly-admin.
452
458
  */
453
459
  type NoticeMomentType = 'general_notice' | 'early_closure' | 'closure_notice' | 'venue_change';
460
+ /**
461
+ * Optional call-to-action button attached to a notice.
462
+ * `url` is either an absolute http(s) URL or a site-relative path ('/contact-us').
463
+ * Only returned when both halves are present — a partial CTA is dropped server-side.
464
+ */
465
+ interface NoticeCta {
466
+ label: string;
467
+ url: string;
468
+ /** Open the link in a new tab. Defaults to true for notices created without the flag. */
469
+ newTab: boolean;
470
+ }
454
471
  interface SlotNotice {
455
472
  id: string;
456
473
  slotId: string;
@@ -474,6 +491,8 @@ interface SlotNotice {
474
491
  imageUrl?: string | null;
475
492
  /** Staff-picked display treatment — 'banner' (compact, stacks) or 'modal' (full-screen, one at a time) */
476
493
  presentation: 'banner' | 'modal';
494
+ /** Call-to-action button, or null when the notice has none */
495
+ cta?: NoticeCta | null;
477
496
  };
478
497
  affectedBookingIds: string[];
479
498
  }
@@ -1863,4 +1882,4 @@ interface SlotlyApi {
1863
1882
  */
1864
1883
  declare const useSlotly: (options: SlotlyClientOptions) => SlotlyApi;
1865
1884
 
1866
- export { type ApiResponse, type Artifact, type ArtifactEntityType, type ArtifactMimeCategory, type ArtifactWithUrl, type Booking, type BookingWithSlot, type Category, type CreateSlotInput, type Customer, type CustomerIdentity, type CustomerWithBookings, type CustomerWithIdentities, type DataQualityIssue, type FindOrCreateCustomerOptions, type Flow, type FlowStep, type GetOrganizationOptions, type ListArtifactsOptions, type ListBookingsOptions, type ListNoticesOptions, type NoticeMomentType, type Notification, type NotificationPreferences, type Organization, type OrganizationFullConfig, type ResolveCustomerOptions, type Service, type ServiceItem, type ServiceItemWithService, type ServiceWithItems, type Slot, type SlotMetadata, type SlotNotice, type SlotServiceWithItems, type SlotlyApi, SlotlyApiError, type SlotlyAuthContext, SlotlyAuthError, type SlotlyClientOptions, SlotlyConfigurationError, SlotlyNetworkError, type SlotlyRequest, type Studio, type Tenant, type TenantBranding, type TenantFullConfig, type UpdateSlotInput, type UploadArtifactOptions, useSlotly as default, getSlotlyContext, useSlotly, validateSlotlyRequest };
1885
+ export { type ApiResponse, type Artifact, type ArtifactEntityType, type ArtifactMimeCategory, type ArtifactWithUrl, type Booking, type BookingWithSlot, type Category, type CreateSlotInput, type Customer, type CustomerIdentity, type CustomerWithBookings, type CustomerWithIdentities, type DataQualityIssue, type FindOrCreateCustomerOptions, type Flow, type FlowStep, type GetOrganizationOptions, type ListArtifactsOptions, type ListBookingsOptions, type ListNoticesOptions, type NoticeCta, type NoticeMomentType, type Notification, type NotificationPreferences, type Organization, type OrganizationFullConfig, type ResolveCustomerOptions, type Service, type ServiceItem, type ServiceItemWithService, type ServiceWithItems, type Slot, type SlotMetadata, type SlotNotice, type SlotServiceWithItems, type SlotlyApi, SlotlyApiError, type SlotlyAuthContext, SlotlyAuthError, type SlotlyClientOptions, SlotlyConfigurationError, SlotlyNetworkError, type SlotlyRequest, type Studio, type Tenant, type TenantBranding, type TenantFullConfig, type UpdateSlotInput, type UploadArtifactOptions, useSlotly as default, getSlotlyContext, useSlotly, validateSlotlyRequest };
package/dist/index.d.ts CHANGED
@@ -66,6 +66,10 @@ interface ServiceItem {
66
66
  sort_order?: number;
67
67
  created_at: string;
68
68
  updated_at: string;
69
+ /** Set when the item has been soft-deleted. Filtered out by the SDK. */
70
+ deleted_at?: string | null;
71
+ /** Set when the item was withdrawn by the publisher (syndication). Filtered out by the SDK. */
72
+ withdrawn_at?: string | null;
69
73
  }
70
74
  /**
71
75
  * Enhanced Service type with nested service items (for tenant endpoint)
@@ -159,6 +163,8 @@ interface Service {
159
163
  price?: number;
160
164
  created_at: string;
161
165
  updated_at: string;
166
+ /** Set when the service has been soft-deleted. Filtered out by the SDK. */
167
+ deleted_at?: string | null;
162
168
  }
163
169
  /**
164
170
  * Metadata bag for a slot — open-ended key/value store, with well-known
@@ -451,6 +457,17 @@ interface UploadArtifactOptions {
451
457
  * Backed by a `slot_moment` — see NOTICES_PLAN.md in slotly-admin.
452
458
  */
453
459
  type NoticeMomentType = 'general_notice' | 'early_closure' | 'closure_notice' | 'venue_change';
460
+ /**
461
+ * Optional call-to-action button attached to a notice.
462
+ * `url` is either an absolute http(s) URL or a site-relative path ('/contact-us').
463
+ * Only returned when both halves are present — a partial CTA is dropped server-side.
464
+ */
465
+ interface NoticeCta {
466
+ label: string;
467
+ url: string;
468
+ /** Open the link in a new tab. Defaults to true for notices created without the flag. */
469
+ newTab: boolean;
470
+ }
454
471
  interface SlotNotice {
455
472
  id: string;
456
473
  slotId: string;
@@ -474,6 +491,8 @@ interface SlotNotice {
474
491
  imageUrl?: string | null;
475
492
  /** Staff-picked display treatment — 'banner' (compact, stacks) or 'modal' (full-screen, one at a time) */
476
493
  presentation: 'banner' | 'modal';
494
+ /** Call-to-action button, or null when the notice has none */
495
+ cta?: NoticeCta | null;
477
496
  };
478
497
  affectedBookingIds: string[];
479
498
  }
@@ -1863,4 +1882,4 @@ interface SlotlyApi {
1863
1882
  */
1864
1883
  declare const useSlotly: (options: SlotlyClientOptions) => SlotlyApi;
1865
1884
 
1866
- export { type ApiResponse, type Artifact, type ArtifactEntityType, type ArtifactMimeCategory, type ArtifactWithUrl, type Booking, type BookingWithSlot, type Category, type CreateSlotInput, type Customer, type CustomerIdentity, type CustomerWithBookings, type CustomerWithIdentities, type DataQualityIssue, type FindOrCreateCustomerOptions, type Flow, type FlowStep, type GetOrganizationOptions, type ListArtifactsOptions, type ListBookingsOptions, type ListNoticesOptions, type NoticeMomentType, type Notification, type NotificationPreferences, type Organization, type OrganizationFullConfig, type ResolveCustomerOptions, type Service, type ServiceItem, type ServiceItemWithService, type ServiceWithItems, type Slot, type SlotMetadata, type SlotNotice, type SlotServiceWithItems, type SlotlyApi, SlotlyApiError, type SlotlyAuthContext, SlotlyAuthError, type SlotlyClientOptions, SlotlyConfigurationError, SlotlyNetworkError, type SlotlyRequest, type Studio, type Tenant, type TenantBranding, type TenantFullConfig, type UpdateSlotInput, type UploadArtifactOptions, useSlotly as default, getSlotlyContext, useSlotly, validateSlotlyRequest };
1885
+ export { type ApiResponse, type Artifact, type ArtifactEntityType, type ArtifactMimeCategory, type ArtifactWithUrl, type Booking, type BookingWithSlot, type Category, type CreateSlotInput, type Customer, type CustomerIdentity, type CustomerWithBookings, type CustomerWithIdentities, type DataQualityIssue, type FindOrCreateCustomerOptions, type Flow, type FlowStep, type GetOrganizationOptions, type ListArtifactsOptions, type ListBookingsOptions, type ListNoticesOptions, type NoticeCta, type NoticeMomentType, type Notification, type NotificationPreferences, type Organization, type OrganizationFullConfig, type ResolveCustomerOptions, type Service, type ServiceItem, type ServiceItemWithService, type ServiceWithItems, type Slot, type SlotMetadata, type SlotNotice, type SlotServiceWithItems, type SlotlyApi, SlotlyApiError, type SlotlyAuthContext, SlotlyAuthError, type SlotlyClientOptions, SlotlyConfigurationError, SlotlyNetworkError, type SlotlyRequest, type Studio, type Tenant, type TenantBranding, type TenantFullConfig, type UpdateSlotInput, type UploadArtifactOptions, useSlotly as default, getSlotlyContext, useSlotly, validateSlotlyRequest };
package/dist/index.esm.js CHANGED
@@ -157,7 +157,16 @@ var TenantClient = class {
157
157
  `/api/v1/tenants/${slug}`,
158
158
  { params: { includeServices } }
159
159
  );
160
- return response.data;
160
+ const data = response.data;
161
+ if (data?.data?.services) {
162
+ data.data.services = data.data.services.filter((s) => !s.deleted_at).map((s) => ({
163
+ ...s,
164
+ serviceItems: (s.serviceItems ?? []).filter(
165
+ (item) => !item.deleted_at && !item.withdrawn_at
166
+ )
167
+ }));
168
+ }
169
+ return data;
161
170
  }
162
171
  };
163
172