@xpert-ai/chatkit-types 0.0.15 → 0.0.16

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 +10 -1
  2. package/package.json +1 -1
package/dist/index.d.ts CHANGED
@@ -179,6 +179,13 @@ export declare interface ChatEventEnvelope<T = unknown> {
179
179
  data: T;
180
180
  }
181
181
 
182
+ export declare type ChatKitClientSecretObject = {
183
+ secret: string;
184
+ organizationId?: string;
185
+ };
186
+
187
+ export declare type ChatKitClientSecretResult = string | ChatKitClientSecretObject;
188
+
182
189
  export declare interface ChatKitElementEventMap {
183
190
  'chatkit.error': CustomEvent<{
184
191
  error: Error;
@@ -742,8 +749,10 @@ export declare type HeaderIcon = 'sidebar-left' | 'sidebar-right' | 'sidebar-ope
742
749
  declare type HostedApiConfig = {
743
750
  /**
744
751
  * Function to get a client token or refresh if the current token is expired.
752
+ * Returning an object also allows ChatKit to send the active organization id
753
+ * as the `organization-id` header on hosted API requests.
745
754
  */
746
- getClientSecret: (currentClientSecret: string | null) => Promise<string>;
755
+ getClientSecret: (currentClientSecret: string | null) => Promise<ChatKitClientSecretResult>;
747
756
  /**
748
757
  * The base URL for the XpertAI platform hosted API. Used for accessing xpert agents
749
758
  * and other platform features.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xpert-ai/chatkit-types",
3
- "version": "0.0.15",
3
+ "version": "0.0.16",
4
4
  "description": "Type definitions for the ChatKit.",
5
5
  "sideEffects": false,
6
6
  "type": "module",