@ziggy-ai/client-sdk 1.3.0 → 1.5.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/app.d.ts CHANGED
@@ -5,7 +5,7 @@
5
5
  * (resolved server-side by auth middleware), so no appId is needed here.
6
6
  */
7
7
  import type { Connection } from './connection.js';
8
- import type { RegisterTriggersRequest, RegisterTriggersResponse, ListTriggersResponse, DeleteResponse, RegisterQuickActionsRequest, RegisterQuickActionsResponse, ListQuickActionsResponse, RegisterHostActionsRequest, RegisterHostActionsResponse, ListHostActionsResponse, RegisterBrandRequest, OwnerProfileFields, SetProfileResponse, AddDomainConceptRequest, AddDomainConceptResponse, GetBrandResponse, SpokenVoiceRecommendationsResponse, SpokenVoiceConfig, SetCredentialsRequest, SetCredentialsResponse, GetCredentialsResponse, AppCallbackResponse, AppStatus, VerifyResponse, YoloConfig, SetYoloConfigRequest, DeploymentSettings, UpdateDeploymentSettingsRequest, TriageConfig, SetTriageConfigRequest, ToolConfig, SetToolConfigRequest, AuditTriggerResponse, ObserverConfigResponse, DesignSystemResponse, DesignTokensResponse, ComponentSpecResponse } from './types.js';
8
+ import type { RegisterTriggersRequest, RegisterTriggersResponse, ListTriggersResponse, DeleteResponse, RegisterQuickActionsRequest, RegisterQuickActionsResponse, ListQuickActionsResponse, RegisterHostActionsRequest, RegisterHostActionsResponse, ListHostActionsResponse, RegisterBrandRequest, OwnerProfileFields, SetProfileResponse, AddDomainConceptRequest, AddDomainConceptResponse, GetBrandResponse, PublicBrandResponse, SpokenVoiceRecommendationsResponse, SpokenVoiceConfig, SetCredentialsRequest, SetCredentialsResponse, GetCredentialsResponse, AppCallbackResponse, AppStatus, VerifyResponse, AppAvailabilityResponse, YoloConfig, SetYoloConfigRequest, DeploymentSettings, UpdateDeploymentSettingsRequest, TriageConfig, SetTriageConfigRequest, ToolConfig, SetToolConfigRequest, AuditTriggerResponse, ObserverConfigResponse, DesignSystemResponse, DesignTokensResponse, ComponentSpecResponse } from './types.js';
9
9
  export declare class AppClient {
10
10
  getConversationPolicy(): Promise<{
11
11
  mode: 'support_led' | 'visible_team';
@@ -61,9 +61,17 @@ export declare class AppClient {
61
61
  updated: boolean;
62
62
  }>;
63
63
  /**
64
- * Get brand configuration.
64
+ * The public part of the brand profile: the name, the avatar and the main colour. It is what a chat panel
65
+ * draws and all this read answers, for every caller. Safe to call from a browser.
65
66
  */
66
- getBrand(): Promise<GetBrandResponse>;
67
+ getBrand(): Promise<PublicBrandResponse>;
68
+ /**
69
+ * The whole brand profile, as `setBrand` wrote it and the Brand Designer filled it in. For your server only:
70
+ * a request that comes through a browser proxy is refused. Read this one before you change the profile and
71
+ * write it back: `setBrand` replaces the profile with what it is given, and refuses the short answer of
72
+ * `getBrand` (409 `brand_partial_write`) because saving it would remove the rest.
73
+ */
74
+ getFullBrand(): Promise<GetBrandResponse>;
67
75
  /**
68
76
  * Brand-informed top spoken-voice recommendations for chat TTS.
69
77
  */
@@ -88,6 +96,8 @@ export declare class AppClient {
88
96
  /**
89
97
  * Get the full design system (tokens + component specs).
90
98
  * Requires brand extraction to have completed first.
99
+ * Through the managed browser proxy the answer is the tokens only: `components` is empty and the record's
100
+ * ids are left out.
91
101
  */
92
102
  getDesignSystem(): Promise<DesignSystemResponse>;
93
103
  /**
@@ -155,6 +165,12 @@ export declare class AppClient {
155
165
  * Use this as a pre-flight check to confirm the SDK is configured correctly.
156
166
  */
157
167
  verify(): Promise<VerifyResponse>;
168
+ /**
169
+ * Whether this app's chat answers. When it does not (the app's account has no
170
+ * active plan), `chat.fallback` holds what to show visitors instead. Safe to
171
+ * call from a browser through the managed proxy before any user is known.
172
+ */
173
+ getAvailability(): Promise<AppAvailabilityResponse>;
158
174
  /**
159
175
  * Get YOLO mode configuration.
160
176
  */
package/dist/index.d.ts CHANGED
@@ -134,7 +134,7 @@ export declare class ZiggyClient {
134
134
  */
135
135
  disconnect(): Promise<void>;
136
136
  }
137
- export type { RecommendationDiscussionReference, BrowserReviewDiscussionReference, ZiggyClientConfig, CreateSessionRequest, SessionResponse, SessionExperiences, ExperienceKey, ExperienceWalkthroughStep, SessionConfig, AgentSummary, CatalogAgent, AgentListResponse, CatalogTool, AgentDetailResponse, PageContext, ProcessContext, ContentContext, UserContext, ErrorEntry, SupportContext, ContextPushRequest, ContextPushResponse, ContextEvent, ChatRequest, ChatResponse, ChatAttachment, ActionRequest, ActionResponse, Confidence, Source, ToolUsage, StreamEvent, StreamStartEvent, AgentStartEvent, AgentSwitchEvent, ToolStartEvent, ToolProgressEvent, ToolResultEvent, ContentDeltaEvent, ContentDoneEvent, MetadataEvent, StreamEndEvent, StreamErrorEvent, ToolErrorEvent, ReturnHandoffEvent, ActivityEvent, QuestStatusEvent, QuestStepUpdateEvent, QuestCompleteEvent, WalkthroughStep, UIHighlightEvent, UIScrollEvent, UIClickEvent, UITypeEvent, UIWalkthroughEvent, UINavigateEvent, UIScreenshotAnalysisEvent, UISurfaceEvent, HostActionEvent, ChatSurfaceMode, HostActionDefinition, RegisterHostActionsRequest, RegisterHostActionsResponse, ListHostActionsResponse, ScreenshotAnnotation, WalkthroughResult, BrandConfig, SpokenVoiceConfig, SpokenVoiceRecommendation, SpokenVoiceRecommendationsResponse, ProactiveTrigger, QuickAction, ToolInvokeRequest, ToolInvokeResponse, ReactionRequest, FeedbackRequest, Quest, QuestStep, TriggerCondition, TriggerRegistration, RegisterTriggersRequest, RegisterTriggersResponse, ListTriggersResponse, DeleteResponse, QuickActionSetConditions, QuickActionSet, RegisterQuickActionsRequest, RegisterQuickActionsResponse, ListQuickActionsResponse, RegisterBrandRequest, OwnerProfileFields, SetProfileResponse, AddDomainConceptRequest, AddDomainConceptResponse, GetBrandResponse, SetCredentialsRequest, SetCredentialsResponse, GetCredentialsResponse, AppCallbackResponse, Ticket, CreateTicketRequest, CreateTicketResponse, UpdateTicketRequest, TicketFilters, TicketResponse, CreateTicketResponseRequest, TicketAnalysis, TimelineEvent, TicketTimeline, TicketConversation, TriageTicket, TicketPattern, MediaAttachment, RequestUploadRequest, RequestUploadResponse, ConfirmUploadResponse, UploadMediaRequest, UploadMediaResponse, VoiceTokenResponse, VoiceTtsResult, VoiceTtsAudio, VoiceTtsFallback, LiveConversationState, LiveSessionCreateRequest, LiveSessionCreateResponse, LiveSessionCloseResponse, LiveInterruptResponse, LiveSessionStatus, LiveStateEvent, LiveTranscriptEvent, LiveTurnEvent, LiveCommentaryEvent, LiveUsageEvent, LiveClosedEvent, DiscoveryJobStatus, PageType, DiscoveryJob, DiscoveredPage, AnalysisType, AnalysisIssue, AnalysisResult, SpecialistAnalysis, AppPersona, TestScenario, TestStrategy, ChangeEvent, ScreenshotConfig, ScreencastConfig, ScreencastFrame, TestRunStatus, TestResultStatus, TestRun, TestResult, StepResult, TestInsight, TriggerDiscoveryRequest, TriggerAnalysisRequest, GeneratePersonasRequest, GenerateTestScenariosRequest, GenerateTestStrategyRequest, DetectChangesRequest, CaptureScreenshotsRequest, StartTestRunRequest, AnalyzeTestRunRequest, ConversationPartnerState, ConversationPartnerCommand, ConversationMessage, ConversationSummary, ConversationDetail, ConversationMessagesPage, AppStatus, VerifyResponse, YoloConfig, SetYoloConfigRequest, DeploymentSettings, UpdateDeploymentSettingsRequest, TriageConfig, SetTriageConfigRequest, ToolConfig, SetToolConfigRequest, ObservationCycle, ObservationCycleDetail, Observation, HealthScore, HealthScoreResponse, SignalsResponse, SelfTestCycle, SelfTestCycleDetail, SuiteResult, SelfTestResult, TestingBrainReport, SelfTestTrend, TriggerResponse, EngineeringJob, EngineeringProposal, ProposalDeployment, TriggerEngineeringRequest, UpdateProposalRequest, TriggerDeploymentRequest, UpdateDeploymentRequest, AuditTriggerResponse, ObserverConfigResponse, DesignTokens, ComponentSpec, DesignSystemResponse, DesignTokensResponse, ComponentSpecResponse, Notification, NotificationType, NotificationSeverity, NotificationStatus, NotificationsResponse, NotificationCountResponse, CodeChangeEvent, SignificanceLevel, StreamCollectingEvent, StreamQueuedEvent, StreamSteeringEvent, StreamInterruptedEvent, CoalesceResponse, TurnMetrics, TurnStartedEvent, TurnMetricsEvent, TurnCompletedEvent, SpanStartedEvent, SpanCompletedEvent, SpanErrorEvent, UICaptureScreenshotEvent, CrewPlanEvent, AgentDispatchedEvent, AgentProgressEvent, AgentFindingEvent, AgentCompleteEvent, CrewSynthesisEvent, CrewCompleteEvent, CrewAwaitingApprovalEvent, CrewApprovedEvent, CrewCancelledEvent, CrewStoppedEvent, AgentHandoffEvent, HookName, HookStyle, WebhookHook, CreateHookRequest, UpdateHookRequest, ListHooksResponse, InboundSignalStatus, InboundSignalOutcome, InboundSignalEnvironment, InboundSignalPriority, InboundSignalRelease, InboundSignal, CreateInboundSignalRequest, CreateInboundSignalResponse, InboundSignalFilters, InboundSignalDetailResponse, SignalAutomationMode, AutomationPolicy, SetAutomationPolicyRequest, SignalWebhookEventType, SignalWebhookSubscription, CreateSignalWebhookSubscriptionRequest, UpdateSignalWebhookSubscriptionRequest, CreateSignalWebhookSubscriptionResponse, SignalWebhookDeliveryStatus, SignalWebhookDelivery, RoomParticipantKind, RoomParticipantRole, RoomParticipantMode, RoomPresenceState, Participant, RoomEventType, RoomEvent, RoutingSignal, ReclaimSignal, RoutingEvent, RoomParticipantsResponse, InviteHumanRequest, InviteHumanResponse, } from './types.js';
137
+ export type { RecommendationDiscussionReference, BrowserReviewDiscussionReference, ZiggyClientConfig, CreateSessionRequest, SessionResponse, SessionExperiences, ExperienceKey, ExperienceWalkthroughStep, SessionConfig, AgentSummary, CatalogAgent, AgentListResponse, CatalogTool, AgentDetailResponse, PageContext, ProcessContext, ContentContext, UserContext, ErrorEntry, SupportContext, ContextPushRequest, ContextPushResponse, ContextEvent, ChatRequest, ChatResponse, ChatAttachment, ActionRequest, ActionResponse, Confidence, Source, ToolUsage, StreamEvent, StreamStartEvent, AgentStartEvent, AgentSwitchEvent, ToolStartEvent, ToolProgressEvent, ToolResultEvent, ContentDeltaEvent, ContentDoneEvent, MetadataEvent, StreamEndEvent, StreamErrorEvent, ToolErrorEvent, ReturnHandoffEvent, ActivityEvent, QuestStatusEvent, QuestStepUpdateEvent, QuestCompleteEvent, WalkthroughStep, UIHighlightEvent, UIScrollEvent, UIClickEvent, UITypeEvent, UIWalkthroughEvent, UINavigateEvent, UIScreenshotAnalysisEvent, UISurfaceEvent, HostActionEvent, ChatSurfaceMode, HostActionDefinition, RegisterHostActionsRequest, RegisterHostActionsResponse, ListHostActionsResponse, ScreenshotAnnotation, WalkthroughResult, BrandConfig, SpokenVoiceConfig, SpokenVoiceRecommendation, SpokenVoiceRecommendationsResponse, ProactiveTrigger, QuickAction, ToolInvokeRequest, ToolInvokeResponse, ReactionRequest, FeedbackRequest, Quest, QuestStep, TriggerCondition, TriggerRegistration, RegisterTriggersRequest, RegisterTriggersResponse, ListTriggersResponse, DeleteResponse, QuickActionSetConditions, QuickActionSet, RegisterQuickActionsRequest, RegisterQuickActionsResponse, ListQuickActionsResponse, RegisterBrandRequest, OwnerProfileFields, SetProfileResponse, AddDomainConceptRequest, AddDomainConceptResponse, GetBrandResponse, PublicBrandResponse, SetCredentialsRequest, SetCredentialsResponse, GetCredentialsResponse, AppCallbackResponse, Ticket, CreateTicketRequest, CreateTicketResponse, UpdateTicketRequest, TicketFilters, TicketResponse, CreateTicketResponseRequest, TicketAnalysis, TimelineEvent, TicketTimeline, TicketConversation, TriageTicket, TicketPattern, MediaAttachment, RequestUploadRequest, RequestUploadResponse, ConfirmUploadResponse, UploadMediaRequest, UploadMediaResponse, VoiceTokenResponse, VoiceTtsResult, VoiceTtsAudio, VoiceTtsFallback, LiveConversationState, LiveSessionCreateRequest, LiveSessionCreateResponse, LiveSessionCloseResponse, LiveInterruptResponse, LiveSessionStatus, LiveStateEvent, LiveTranscriptEvent, LiveTurnEvent, LiveCommentaryEvent, LiveUsageEvent, LiveClosedEvent, DiscoveryJobStatus, PageType, DiscoveryJob, DiscoveredPage, AnalysisType, AnalysisIssue, AnalysisResult, SpecialistAnalysis, AppPersona, TestScenario, TestStrategy, ChangeEvent, ScreenshotConfig, ScreencastConfig, ScreencastFrame, TestRunStatus, TestResultStatus, TestRun, TestResult, StepResult, TestInsight, TriggerDiscoveryRequest, TriggerAnalysisRequest, GeneratePersonasRequest, GenerateTestScenariosRequest, GenerateTestStrategyRequest, DetectChangesRequest, CaptureScreenshotsRequest, StartTestRunRequest, AnalyzeTestRunRequest, ConversationPartnerState, ConversationPartnerCommand, ConversationMessage, ConversationSummary, ConversationDetail, ConversationMessagesPage, AppStatus, VerifyResponse, AppAvailabilityResponse, AppPlanState, ChatAvailability, ChatFallback, YoloConfig, SetYoloConfigRequest, DeploymentSettings, UpdateDeploymentSettingsRequest, TriageConfig, SetTriageConfigRequest, ToolConfig, SetToolConfigRequest, ObservationCycle, ObservationCycleDetail, Observation, HealthScore, HealthScoreResponse, SignalsResponse, SelfTestCycle, SelfTestCycleDetail, SuiteResult, SelfTestResult, TestingBrainReport, SelfTestTrend, TriggerResponse, EngineeringJob, EngineeringProposal, ProposalDeployment, TriggerEngineeringRequest, UpdateProposalRequest, TriggerDeploymentRequest, UpdateDeploymentRequest, AuditTriggerResponse, ObserverConfigResponse, DesignTokens, ComponentSpec, DesignSystemResponse, DesignTokensResponse, ComponentSpecResponse, Notification, NotificationType, NotificationSeverity, NotificationStatus, NotificationsResponse, NotificationCountResponse, CodeChangeEvent, SignificanceLevel, StreamCollectingEvent, StreamQueuedEvent, StreamSteeringEvent, StreamInterruptedEvent, CoalesceResponse, TurnMetrics, TurnStartedEvent, TurnMetricsEvent, TurnCompletedEvent, SpanStartedEvent, SpanCompletedEvent, SpanErrorEvent, UICaptureScreenshotEvent, CrewPlanEvent, AgentDispatchedEvent, AgentProgressEvent, AgentFindingEvent, AgentCompleteEvent, CrewSynthesisEvent, CrewCompleteEvent, CrewAwaitingApprovalEvent, CrewApprovedEvent, CrewCancelledEvent, CrewStoppedEvent, AgentHandoffEvent, HookName, HookStyle, WebhookHook, CreateHookRequest, UpdateHookRequest, ListHooksResponse, InboundSignalStatus, InboundSignalOutcome, InboundSignalEnvironment, InboundSignalPriority, InboundSignalRelease, InboundSignal, CreateInboundSignalRequest, CreateInboundSignalResponse, InboundSignalFilters, InboundSignalDetailResponse, SignalAutomationMode, AutomationPolicy, SetAutomationPolicyRequest, SignalWebhookEventType, SignalWebhookSubscription, CreateSignalWebhookSubscriptionRequest, UpdateSignalWebhookSubscriptionRequest, CreateSignalWebhookSubscriptionResponse, SignalWebhookDeliveryStatus, SignalWebhookDelivery, RoomParticipantKind, RoomParticipantRole, RoomParticipantMode, RoomPresenceState, Participant, RoomEventType, RoomEvent, RoutingSignal, ReclaimSignal, RoutingEvent, RoomParticipantsResponse, InviteHumanRequest, InviteHumanResponse, } from './types.js';
138
138
  export { ZiggyError, ZiggyConnectionError } from './errors.js';
139
139
  export { LocalStoragePersistence } from './persistence.js';
140
140
  export type { PersistenceAdapter } from './persistence.js';
package/dist/index.js CHANGED
@@ -1067,11 +1067,21 @@ var AppClient = class {
1067
1067
  return this.connection.request("PUT", "/apps/brand", brand);
1068
1068
  }
1069
1069
  /**
1070
- * Get brand configuration.
1070
+ * The public part of the brand profile: the name, the avatar and the main colour. It is what a chat panel
1071
+ * draws and all this read answers, for every caller. Safe to call from a browser.
1071
1072
  */
1072
1073
  async getBrand() {
1073
1074
  return this.connection.request("GET", "/apps/brand");
1074
1075
  }
1076
+ /**
1077
+ * The whole brand profile, as `setBrand` wrote it and the Brand Designer filled it in. For your server only:
1078
+ * a request that comes through a browser proxy is refused. Read this one before you change the profile and
1079
+ * write it back: `setBrand` replaces the profile with what it is given, and refuses the short answer of
1080
+ * `getBrand` (409 `brand_partial_write`) because saving it would remove the rest.
1081
+ */
1082
+ async getFullBrand() {
1083
+ return this.connection.request("GET", "/apps/brand/full");
1084
+ }
1075
1085
  /**
1076
1086
  * Brand-informed top spoken-voice recommendations for chat TTS.
1077
1087
  */
@@ -1105,6 +1115,8 @@ var AppClient = class {
1105
1115
  /**
1106
1116
  * Get the full design system (tokens + component specs).
1107
1117
  * Requires brand extraction to have completed first.
1118
+ * Through the managed browser proxy the answer is the tokens only: `components` is empty and the record's
1119
+ * ids are left out.
1108
1120
  */
1109
1121
  async getDesignSystem() {
1110
1122
  return this.connection.request("GET", "/branding/design-system");
@@ -1196,6 +1208,14 @@ var AppClient = class {
1196
1208
  async verify() {
1197
1209
  return this.connection.request("GET", "/apps/verify");
1198
1210
  }
1211
+ /**
1212
+ * Whether this app's chat answers. When it does not (the app's account has no
1213
+ * active plan), `chat.fallback` holds what to show visitors instead. Safe to
1214
+ * call from a browser through the managed proxy before any user is known.
1215
+ */
1216
+ async getAvailability() {
1217
+ return this.connection.request("GET", "/apps/availability");
1218
+ }
1199
1219
  // ─── YOLO Mode ──────────────────────────────────────────────────────────────
1200
1220
  /**
1201
1221
  * Get YOLO mode configuration.
@@ -1,37 +1,37 @@
1
- /**
2
- * Ziggy Agent UI Highlights
3
- *
4
- * CSS classes applied by the agent's UI interaction tools
5
- * (highlight_element, click_element, type_into, etc.)
6
- * to visually indicate elements the agent is interacting with.
7
- *
8
- * Import via: import '@ziggy-ai/client-sdk/styles';
9
- */
10
-
11
- @keyframes ziggy-pulse {
12
- 0%, 100% { box-shadow: 0 0 0 0 rgba(99, 102, 241, 0.5); }
13
- 50% { box-shadow: 0 0 0 8px rgba(99, 102, 241, 0); }
14
- }
15
-
16
- .ziggy-highlight-pulse {
17
- animation: ziggy-pulse 1.5s ease-in-out infinite;
18
- outline: 2px solid rgb(99, 102, 241);
19
- outline-offset: 2px;
20
- border-radius: 4px;
21
- z-index: 10;
22
- position: relative;
23
- }
24
-
25
- .ziggy-highlight-outline {
26
- outline: 3px solid rgb(99, 102, 241);
27
- outline-offset: 2px;
28
- border-radius: 4px;
29
- transition: outline 0.2s ease;
30
- }
31
-
32
- .ziggy-highlight-overlay {
33
- background-color: rgba(99, 102, 241, 0.1) !important;
34
- outline: 2px solid rgb(99, 102, 241);
35
- outline-offset: 2px;
36
- border-radius: 4px;
37
- }
1
+ /**
2
+ * Ziggy Agent UI Highlights
3
+ *
4
+ * CSS classes applied by the agent's UI interaction tools
5
+ * (highlight_element, click_element, type_into, etc.)
6
+ * to visually indicate elements the agent is interacting with.
7
+ *
8
+ * Import via: import '@ziggy-ai/client-sdk/styles';
9
+ */
10
+
11
+ @keyframes ziggy-pulse {
12
+ 0%, 100% { box-shadow: 0 0 0 0 rgba(99, 102, 241, 0.5); }
13
+ 50% { box-shadow: 0 0 0 8px rgba(99, 102, 241, 0); }
14
+ }
15
+
16
+ .ziggy-highlight-pulse {
17
+ animation: ziggy-pulse 1.5s ease-in-out infinite;
18
+ outline: 2px solid rgb(99, 102, 241);
19
+ outline-offset: 2px;
20
+ border-radius: 4px;
21
+ z-index: 10;
22
+ position: relative;
23
+ }
24
+
25
+ .ziggy-highlight-outline {
26
+ outline: 3px solid rgb(99, 102, 241);
27
+ outline-offset: 2px;
28
+ border-radius: 4px;
29
+ transition: outline 0.2s ease;
30
+ }
31
+
32
+ .ziggy-highlight-overlay {
33
+ background-color: rgba(99, 102, 241, 0.1) !important;
34
+ outline: 2px solid rgb(99, 102, 241);
35
+ outline-offset: 2px;
36
+ border-radius: 4px;
37
+ }
package/dist/types.d.ts CHANGED
@@ -738,6 +738,8 @@ export interface HostActionDefinition {
738
738
  sideEffects: 'read' | 'write' | 'destructive';
739
739
  preferredSurface?: ChatSurfaceMode;
740
740
  executor: 'browser' | 'http';
741
+ /** Who is told of the action and may run it: your team; also your signed-in users; or everyone, visitors to your site included. */
742
+ audience?: 'everyone' | 'users' | 'team';
741
743
  uiHints?: Record<string, unknown>;
742
744
  }
743
745
  export interface RegisterHostActionsRequest {
@@ -750,11 +752,20 @@ export interface RegisterHostActionsRequest {
750
752
  sideEffects?: 'read' | 'write' | 'destructive';
751
753
  preferredSurface?: ChatSurfaceMode;
752
754
  executor?: 'browser' | 'http';
755
+ /** Defaults to `team`. `users`: also the signed-in users your app vouches for. `everyone`: also an anonymous visitor on
756
+ * your site. A destructive action with executor `http` must be `team`. An action for everyone must never return the
757
+ * caller's own text as its answer. */
758
+ audience?: 'everyone' | 'users' | 'team';
753
759
  uiHints?: Record<string, unknown>;
754
760
  }>;
755
761
  }
756
762
  export interface RegisterHostActionsResponse {
757
763
  registered: number;
764
+ /** Actions that were stored but will not be offered in chat, and why (for example, too long to describe in full). */
765
+ warnings?: Array<{
766
+ actionId: string;
767
+ problem: string;
768
+ }>;
758
769
  }
759
770
  export interface ListHostActionsResponse {
760
771
  actions: HostActionDefinition[];
@@ -1360,6 +1371,19 @@ export interface RegisterBrandRequest {
1360
1371
  chatPosition?: 'bottom-right' | 'bottom-left' | 'side-panel';
1361
1372
  };
1362
1373
  }
1374
+ /** GET /v1/apps/brand: the part of the brand profile anyone may see. A missing field was never set. */
1375
+ export interface PublicBrandResponse {
1376
+ /** Always true: this is not the whole profile. `setBrand` refuses an object that carries it (409). */
1377
+ partial: true;
1378
+ identity: {
1379
+ name?: string;
1380
+ avatar?: string;
1381
+ };
1382
+ theme: {
1383
+ primaryColor?: string;
1384
+ };
1385
+ }
1386
+ /** GET /v1/apps/brand/full: the whole brand profile, for the app's own server. */
1363
1387
  export interface GetBrandResponse extends RegisterBrandRequest {
1364
1388
  updatedAt: string;
1365
1389
  spokenVoice?: SpokenVoiceConfig | null;
@@ -1741,7 +1765,7 @@ export interface LiveSessionCreateResponse {
1741
1765
  /** Response from GET /v1/voice/live/status */
1742
1766
  export interface LiveSessionStatus {
1743
1767
  available: boolean;
1744
- /** disabled | missing_api_key | app_disabled | config_unavailable | usage_unavailable | capacity | app_capacity | daily_minutes, or null when available */
1768
+ /** disabled | missing_api_key | app_disabled | config_unavailable | usage_unavailable | capacity | app_capacity | daily_minutes | chat_unavailable, or null when available */
1745
1769
  reason: string | null;
1746
1770
  voice: string;
1747
1771
  activeSessions: number;
@@ -2459,6 +2483,25 @@ export interface AppStatus {
2459
2483
  /** @deprecated Use setup.agents.linked */
2460
2484
  agentCount?: number;
2461
2485
  }
2486
+ /** What visitors see in place of the conversation when an app's chat does not answer. */
2487
+ export interface ChatFallback {
2488
+ /** The owner's own message, or Ziggy's default when they set none. */
2489
+ message: string;
2490
+ /** Another way to reach the owner: an `https:` page or a `mailto:` address. Null when they set none. */
2491
+ contactUrl: string | null;
2492
+ }
2493
+ /** Whether an app's chat answers. It does not while the app's account has no active plan. */
2494
+ export interface ChatAvailability {
2495
+ available: boolean;
2496
+ /** Present only when `available` is false. */
2497
+ fallback: ChatFallback | null;
2498
+ }
2499
+ /** Response from GET /v1/apps/availability. */
2500
+ export interface AppAvailabilityResponse {
2501
+ chat: ChatAvailability;
2502
+ }
2503
+ /** The plan state of the account that owns an app. */
2504
+ export type AppPlanState = 'trialing' | 'active' | 'past_due' | 'locked';
2462
2505
  /** Response from GET /v1/apps/verify — lightweight SDK connection check. */
2463
2506
  export interface VerifyResponse {
2464
2507
  valid: true;
@@ -2471,6 +2514,14 @@ export interface VerifyResponse {
2471
2514
  agents: number;
2472
2515
  integrations: number;
2473
2516
  };
2517
+ /**
2518
+ * The owning account's plan state, and whether chat answers. `state` is null
2519
+ * for an app no account owns. Absent from servers older than this field.
2520
+ */
2521
+ plan?: {
2522
+ state: AppPlanState | null;
2523
+ chatAvailable: boolean;
2524
+ };
2474
2525
  }
2475
2526
  export interface DeploymentSettings {
2476
2527
  deploymentPolicy: string;
package/package.json CHANGED
@@ -1,49 +1,49 @@
1
- {
2
- "name": "@ziggy-ai/client-sdk",
3
- "version": "1.3.0",
4
- "description": "Client SDK for integrating with Ziggy's v1 API",
5
- "type": "module",
6
- "main": "dist/index.js",
7
- "types": "dist/index.d.ts",
8
- "exports": {
9
- ".": {
10
- "types": "./dist/index.d.ts",
11
- "import": "./dist/index.js"
12
- },
13
- "./styles": "./dist/styles/ziggy-highlights.css"
14
- },
15
- "files": [
16
- "dist",
17
- "README.md",
18
- "LICENSE",
19
- "CHANGELOG.md"
20
- ],
21
- "scripts": {
22
- "build": "tsup src/index.ts --format esm --clean --external driver.js --external html2canvas && tsc --emitDeclarationOnly && node -e \"const fs=require('fs');fs.mkdirSync('dist/styles',{recursive:true});fs.copyFileSync('src/styles/ziggy-highlights.css','dist/styles/ziggy-highlights.css')\"",
23
- "dev": "tsup src/index.ts --format esm --watch",
24
- "typecheck": "tsc --noEmit",
25
- "test": "vitest",
26
- "prepublishOnly": "npm run build"
27
- },
28
- "devDependencies": {
29
- "@types/node": "^20.11.0",
30
- "tsup": "^8.0.0",
31
- "typescript": "^5.3.3",
32
- "vitest": "^1.2.2"
33
- },
34
- "keywords": [
35
- "ziggy",
36
- "client",
37
- "sdk",
38
- "chat",
39
- "streaming",
40
- "ndjson"
41
- ],
42
- "license": "MIT",
43
- "repository": {
44
- "type": "git",
45
- "url": "https://github.com/alchemyagentic/Ziggy.git",
46
- "directory": "packages/client-sdk"
47
- },
48
- "dependencies": {}
49
- }
1
+ {
2
+ "name": "@ziggy-ai/client-sdk",
3
+ "version": "1.5.0",
4
+ "description": "Client SDK for integrating with Ziggy's v1 API",
5
+ "type": "module",
6
+ "main": "dist/index.js",
7
+ "types": "dist/index.d.ts",
8
+ "exports": {
9
+ ".": {
10
+ "types": "./dist/index.d.ts",
11
+ "import": "./dist/index.js"
12
+ },
13
+ "./styles": "./dist/styles/ziggy-highlights.css"
14
+ },
15
+ "files": [
16
+ "dist",
17
+ "README.md",
18
+ "LICENSE",
19
+ "CHANGELOG.md"
20
+ ],
21
+ "scripts": {
22
+ "build": "tsup src/index.ts --format esm --clean --external driver.js --external html2canvas && tsc --emitDeclarationOnly && node -e \"const fs=require('fs');fs.mkdirSync('dist/styles',{recursive:true});fs.copyFileSync('src/styles/ziggy-highlights.css','dist/styles/ziggy-highlights.css')\"",
23
+ "dev": "tsup src/index.ts --format esm --watch",
24
+ "typecheck": "tsc --noEmit",
25
+ "test": "vitest",
26
+ "prepublishOnly": "npm run build"
27
+ },
28
+ "devDependencies": {
29
+ "@types/node": "^20.11.0",
30
+ "tsup": "^8.0.0",
31
+ "typescript": "^5.3.3",
32
+ "vitest": "^1.2.2"
33
+ },
34
+ "keywords": [
35
+ "ziggy",
36
+ "client",
37
+ "sdk",
38
+ "chat",
39
+ "streaming",
40
+ "ndjson"
41
+ ],
42
+ "license": "MIT",
43
+ "repository": {
44
+ "type": "git",
45
+ "url": "https://github.com/alchemyagentic/Ziggy.git",
46
+ "directory": "packages/client-sdk"
47
+ },
48
+ "dependencies": {}
49
+ }