@stackable-labs/sdk-extension-contracts 1.29.0 → 1.30.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.
Files changed (2) hide show
  1. package/dist/index.d.ts +13 -2
  2. package/package.json +1 -1
package/dist/index.d.ts CHANGED
@@ -93,9 +93,20 @@ interface ToastPayload {
93
93
  /** Error message shown when fetch rejects (requires fetch) */
94
94
  error?: string;
95
95
  }
96
+ /**
97
+ * Messenger commands supported by the Zendesk Web Widget (zE('messenger', command)).
98
+ * NOTE: These only apply in floating mode. In embedded mode (mode: 'embedded'),
99
+ * these are no-ops — the widget renders into target DOM elements and has no
100
+ * launcher button or floating panel to show/hide.
101
+ */
102
+ type MessengerCommand = 'open' | 'close' | 'show' | 'hide';
103
+ /** Widget-only actions handled by WidgetComponent (not forwarded to Zendesk) */
104
+ type WidgetAction = 'toggle';
105
+ /** Known actions for actions.invoke capability */
106
+ type InvokeAction = 'newConversation' | MessengerCommand | WidgetAction;
96
107
  /** Payload for actions.invoke capability */
97
108
  interface ActionInvokePayload {
98
- action: string;
109
+ action: InvokeAction;
99
110
  payload?: Record<string, unknown>;
100
111
  }
101
112
  /** Context returned by context.read capability */
@@ -494,4 +505,4 @@ interface Order {
494
505
  display_status?: OrderStatus;
495
506
  }
496
507
 
497
- export { ALLOWED_ICONS, type ActionInvokePayload, 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 ExtensionManifest, type ExtensionRegistryEntry, type FetchRequest, type FetchRequestInit, type FetchResponse, type HostToSandboxMessage, type InstanceOption, type InstanceSettings, type MarketplaceExtension, type NamedEntity, type Order, type OrderAction, type OrderItem, type OrderStatus, type OrderStatuses, PERMISSIONS, type Permission, type Price, type SandboxToHostMessage, type Shipment, type SurfaceContext, type SurfaceLifecycleMessage, type Target, type Theme, type ToastPayload, type UITag, UI_TAGS, UI_TAG_ATTRIBUTES, UI_TAG_CHILDREN };
508
+ export { ALLOWED_ICONS, type ActionInvokePayload, 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 ExtensionManifest, type ExtensionRegistryEntry, type FetchRequest, type FetchRequestInit, type FetchResponse, type HostToSandboxMessage, type InstanceOption, type InstanceSettings, type InvokeAction, type MarketplaceExtension, type MessengerCommand, type NamedEntity, type Order, type OrderAction, type OrderItem, type OrderStatus, type OrderStatuses, PERMISSIONS, type Permission, type Price, type SandboxToHostMessage, type Shipment, type SurfaceContext, type SurfaceLifecycleMessage, type Target, type Theme, type ToastPayload, type UITag, UI_TAGS, UI_TAG_ATTRIBUTES, UI_TAG_CHILDREN, type WidgetAction };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stackable-labs/sdk-extension-contracts",
3
- "version": "1.29.0",
3
+ "version": "1.30.0",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",