@stackable-labs/sdk-extension-contracts 1.72.0 → 1.73.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.ts +22 -2
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -414,8 +414,28 @@ interface ToastPayload {
|
|
|
414
414
|
type MessengerCommand = 'open' | 'close' | 'show' | 'hide';
|
|
415
415
|
/** Widget-only actions handled by WidgetComponent (not forwarded to Zendesk) */
|
|
416
416
|
type WidgetAction = 'toggle';
|
|
417
|
+
/** Conversation tags — array of string labels */
|
|
418
|
+
type ConversationTags = string[];
|
|
419
|
+
/** Conversation field — Zendesk custom field ID + value */
|
|
420
|
+
interface ConversationField {
|
|
421
|
+
id: string;
|
|
422
|
+
value: string | number | boolean;
|
|
423
|
+
}
|
|
417
424
|
/** Known actions for actions.invoke capability */
|
|
418
|
-
type InvokeAction = 'newConversation' | MessengerCommand | WidgetAction;
|
|
425
|
+
type InvokeAction = 'newConversation' | 'setConversationTags' | 'setConversationFields' | MessengerCommand | WidgetAction;
|
|
426
|
+
/** Typed payload for newConversation action */
|
|
427
|
+
interface NewConversationPayload {
|
|
428
|
+
metadata?: Record<string, unknown>;
|
|
429
|
+
tags?: ConversationTags;
|
|
430
|
+
fields?: ConversationField[];
|
|
431
|
+
[key: string]: unknown;
|
|
432
|
+
}
|
|
433
|
+
/** Maps known action names to their typed payloads */
|
|
434
|
+
interface ActionPayloadMap {
|
|
435
|
+
newConversation: NewConversationPayload;
|
|
436
|
+
setConversationTags: ConversationTags;
|
|
437
|
+
setConversationFields: ConversationField[];
|
|
438
|
+
}
|
|
419
439
|
/** Payload for actions.invoke capability */
|
|
420
440
|
interface ActionInvokePayload {
|
|
421
441
|
action: InvokeAction;
|
|
@@ -927,4 +947,4 @@ interface Order {
|
|
|
927
947
|
display_status?: OrderStatus;
|
|
928
948
|
}
|
|
929
949
|
|
|
930
|
-
export { ALLOWED_ICONS, type ActionInvokePayload, type ActivityEvent, type ActivityEventHandler, type ActivityEventType, type Address, type AllowedIconName, type ApiError, type ApiRequest, type ApiResponse, CAPABILITY_PERMISSION_MAP, type CapabilityCall, type CapabilityRequest, type CapabilityResponse, type CapabilityType, type ContextData, type Customer, type DataField, type DataFieldType, type EncryptedPayload, type EventDomain, type EventType, type ExtendIdentityHandler, type ExtendIdentityRequest, type ExtendIdentityResponse, type ExtensionManifest, type ExtensionRegistryEntry, type FetchRequest, type FetchRequestInit, type FetchResponse, type HostToSandboxMessage, type IdentityBaseClaims, type IdentityEvent, type IdentityEventType, type IdentityState, type InstanceConfig, type InstanceOption, type InvokeAction, type MarketplaceExtension, type MessagingContext, type MessagingEvent, type MessagingEventHandler, type MessagingEventType, type MessagingPostbackEvent, type MessengerCommand, type NamedEntity, type Order, type OrderAction, type OrderItem, type OrderStatus, type OrderStatuses, PERMISSIONS, type Permission, type Price, RESERVED_CONTEXT_KEYS, type ReservedContextKey, type SandboxToHostMessage, type Shipment, type SurfaceContext, type SurfaceLifecycleMessage, type Target, type Theme, type ToastPayload, type UITag, type UITagCategory, UI_TAGS, UI_TAG_ATTRIBUTES, UI_TAG_ATTRIBUTE_VALUES, UI_TAG_CATEGORIES, UI_TAG_CHILDREN, UI_TAG_DEFINITIONS, type UserIdentity, type WellKnownActivityEvent, type WidgetAction, tagToComponentName };
|
|
950
|
+
export { ALLOWED_ICONS, type ActionInvokePayload, type ActionPayloadMap, type ActivityEvent, type ActivityEventHandler, type ActivityEventType, type Address, type AllowedIconName, type ApiError, type ApiRequest, type ApiResponse, CAPABILITY_PERMISSION_MAP, type CapabilityCall, type CapabilityRequest, type CapabilityResponse, type CapabilityType, type ContextData, type ConversationField, type ConversationTags, type Customer, type DataField, type DataFieldType, type EncryptedPayload, type EventDomain, type EventType, type ExtendIdentityHandler, type ExtendIdentityRequest, type ExtendIdentityResponse, type ExtensionManifest, type ExtensionRegistryEntry, type FetchRequest, type FetchRequestInit, type FetchResponse, type HostToSandboxMessage, type IdentityBaseClaims, type IdentityEvent, type IdentityEventType, type IdentityState, type InstanceConfig, type InstanceOption, type InvokeAction, type MarketplaceExtension, type MessagingContext, type MessagingEvent, type MessagingEventHandler, type MessagingEventType, type MessagingPostbackEvent, type MessengerCommand, type NamedEntity, type NewConversationPayload, type Order, type OrderAction, type OrderItem, type OrderStatus, type OrderStatuses, PERMISSIONS, type Permission, type Price, RESERVED_CONTEXT_KEYS, type ReservedContextKey, type SandboxToHostMessage, type Shipment, type SurfaceContext, type SurfaceLifecycleMessage, type Target, type Theme, type ToastPayload, type UITag, type UITagCategory, UI_TAGS, UI_TAG_ATTRIBUTES, UI_TAG_ATTRIBUTE_VALUES, UI_TAG_CATEGORIES, UI_TAG_CHILDREN, UI_TAG_DEFINITIONS, type UserIdentity, type WellKnownActivityEvent, type WidgetAction, tagToComponentName };
|