@deepdesk/deepdesk-sdk 14.1.1-beta.2 → 14.1.1-beta.4

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.mts CHANGED
@@ -462,6 +462,11 @@ type State$f = {
462
462
  outputs: EvaluationOutput[];
463
463
  fetchState: FetchState;
464
464
  };
465
+ type Transcript = Array<{
466
+ source: string;
467
+ text: string;
468
+ }>;
469
+ type TranscriptOption = 'in-memory-transcript' | 'stored-transcript' | Transcript;
465
470
 
466
471
  interface StoreConfig {
467
472
  deepdeskAPI: DeepdeskAPI;
@@ -1412,7 +1417,12 @@ declare class DeepdeskAPI {
1412
1417
  evaluateRule<Payload = unknown>(label: string, conversationId: string, payload: Payload, opts?: {
1413
1418
  raiseForFailingConditions?: boolean;
1414
1419
  }): Promise<CamelCaseKeys<Server.Cue[]>>;
1415
- evaluateAssistant<TPayload = unknown>(assistantCode: string, payload: TPayload, options?: {
1420
+ evaluateAssistant<TInput = Record<string, unknown>>(assistantCode: string, options: {
1421
+ input: TInput;
1422
+ transcript?: Array<{
1423
+ source: string;
1424
+ text: string;
1425
+ }>;
1416
1426
  conversationId?: string;
1417
1427
  }): Promise<CamelCaseKeys<Server.EvaluationOutput[]> | string>;
1418
1428
  getRules(): Promise<CamelCaseKeys<Server.Rule[]>>;
@@ -2269,8 +2279,9 @@ declare class DeepdeskSDK {
2269
2279
  * By default will show cues in widget
2270
2280
  */
2271
2281
  evaluateAssistant(assistantCode: string, options?: {
2272
- payload?: Record<string, any>;
2273
- include?: Array<'in-memory-transcript' | 'stored-transcript' | 'tags'>;
2282
+ input?: Record<string, any>;
2283
+ transcript?: TranscriptOption;
2284
+ includeTags?: boolean;
2274
2285
  showCuesInWidget?: boolean;
2275
2286
  }): Promise<EvaluationOutput[] | string>;
2276
2287
  /**
@@ -2284,8 +2295,9 @@ declare class DeepdeskSDK {
2284
2295
  * By default includes 'stored-transcript' and 'tags'.
2285
2296
  */
2286
2297
  evaluateConversationAssistant(event: 'accepted' | 'new-message' | 'ended', options?: {
2287
- payload?: Record<string, any>;
2288
- include?: Array<'in-memory-transcript' | 'stored-transcript' | 'tags'>;
2298
+ input?: Record<string, any>;
2299
+ transcript?: TranscriptOption;
2300
+ includeTags?: boolean;
2289
2301
  showCuesInWidget?: boolean;
2290
2302
  }): Promise<void>;
2291
2303
  /**
package/dist/index.d.ts CHANGED
@@ -462,6 +462,11 @@ type State$f = {
462
462
  outputs: EvaluationOutput[];
463
463
  fetchState: FetchState;
464
464
  };
465
+ type Transcript = Array<{
466
+ source: string;
467
+ text: string;
468
+ }>;
469
+ type TranscriptOption = 'in-memory-transcript' | 'stored-transcript' | Transcript;
465
470
 
466
471
  interface StoreConfig {
467
472
  deepdeskAPI: DeepdeskAPI;
@@ -1412,7 +1417,12 @@ declare class DeepdeskAPI {
1412
1417
  evaluateRule<Payload = unknown>(label: string, conversationId: string, payload: Payload, opts?: {
1413
1418
  raiseForFailingConditions?: boolean;
1414
1419
  }): Promise<CamelCaseKeys<Server.Cue[]>>;
1415
- evaluateAssistant<TPayload = unknown>(assistantCode: string, payload: TPayload, options?: {
1420
+ evaluateAssistant<TInput = Record<string, unknown>>(assistantCode: string, options: {
1421
+ input: TInput;
1422
+ transcript?: Array<{
1423
+ source: string;
1424
+ text: string;
1425
+ }>;
1416
1426
  conversationId?: string;
1417
1427
  }): Promise<CamelCaseKeys<Server.EvaluationOutput[]> | string>;
1418
1428
  getRules(): Promise<CamelCaseKeys<Server.Rule[]>>;
@@ -2269,8 +2279,9 @@ declare class DeepdeskSDK {
2269
2279
  * By default will show cues in widget
2270
2280
  */
2271
2281
  evaluateAssistant(assistantCode: string, options?: {
2272
- payload?: Record<string, any>;
2273
- include?: Array<'in-memory-transcript' | 'stored-transcript' | 'tags'>;
2282
+ input?: Record<string, any>;
2283
+ transcript?: TranscriptOption;
2284
+ includeTags?: boolean;
2274
2285
  showCuesInWidget?: boolean;
2275
2286
  }): Promise<EvaluationOutput[] | string>;
2276
2287
  /**
@@ -2284,8 +2295,9 @@ declare class DeepdeskSDK {
2284
2295
  * By default includes 'stored-transcript' and 'tags'.
2285
2296
  */
2286
2297
  evaluateConversationAssistant(event: 'accepted' | 'new-message' | 'ended', options?: {
2287
- payload?: Record<string, any>;
2288
- include?: Array<'in-memory-transcript' | 'stored-transcript' | 'tags'>;
2298
+ input?: Record<string, any>;
2299
+ transcript?: TranscriptOption;
2300
+ includeTags?: boolean;
2289
2301
  showCuesInWidget?: boolean;
2290
2302
  }): Promise<void>;
2291
2303
  /**