@stackable-labs/sdk-extension-contracts 1.65.0 → 1.67.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 -1
  2. package/package.json +1 -1
package/dist/index.d.ts CHANGED
@@ -339,6 +339,8 @@ interface MessagingPostbackEvent {
339
339
  }
340
340
  /** Union of all messaging events (extensible for future event types) */
341
341
  type MessagingEvent = MessagingPostbackEvent;
342
+ /** Handler type for useMessagingEvent — use with useCallback for memoized handlers */
343
+ type MessagingEventHandler = (event: MessagingEvent) => void;
342
344
 
343
345
  /**
344
346
  * Identity & Event Contract
@@ -377,6 +379,8 @@ interface IdentityBaseClaims {
377
379
  name?: string;
378
380
  [key: string]: unknown;
379
381
  }
382
+ /** Handler type for useExtendIdentity — use with useCallback for memoized handlers */
383
+ type ExtendIdentityHandler = (claims: IdentityBaseClaims) => Record<string, unknown> | Promise<Record<string, unknown>>;
380
384
 
381
385
  /**
382
386
  * Capabilities Contract
@@ -437,10 +441,18 @@ interface ActionInvokePayload {
437
441
  action: InvokeAction;
438
442
  payload?: Record<string, unknown>;
439
443
  }
444
+ /** Messaging context — conversation and app identifiers */
445
+ interface MessagingContext {
446
+ conversationId?: string | null;
447
+ appId?: string | null;
448
+ }
440
449
  /** Context returned by context.read capability */
441
450
  interface ContextData {
442
451
  customerId?: string;
443
452
  customerEmail?: string;
453
+ customerName?: string;
454
+ identity?: IdentityState;
455
+ messaging?: MessagingContext;
444
456
  [key: string]: unknown;
445
457
  }
446
458
  /** Union of all capability call types */
@@ -861,4 +873,4 @@ interface Order {
861
873
  display_status?: OrderStatus;
862
874
  }
863
875
 
864
- 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 EventType, 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 MessagingEvent, type MessagingEventType, type MessagingPostbackEvent, 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, type UITagCategory, UI_TAGS, UI_TAG_ATTRIBUTES, UI_TAG_ATTRIBUTE_VALUES, UI_TAG_CATEGORIES, UI_TAG_CHILDREN, UI_TAG_DEFINITIONS, type UserIdentity, type WidgetAction, tagToComponentName };
876
+ 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 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, 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 WidgetAction, tagToComponentName };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stackable-labs/sdk-extension-contracts",
3
- "version": "1.65.0",
3
+ "version": "1.67.0",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",