@deepdesk/deepdesk-sdk 19.4.1 → 19.4.2-beta.1

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
@@ -421,6 +421,7 @@ type LegacyCue = CamelCaseKeys<Server.LegacyCue> & {
421
421
  };
422
422
 
423
423
  type EvaluationOutput = CamelCaseKeys<Server.EvaluationOutput>;
424
+ type Attachment = EvaluationAttachment;
424
425
  type ArrayItemType<T> = T extends Array<infer I> ? I : never;
425
426
  type Cue = ArrayItemType<EvaluationOutput> & {
426
427
  isLoading?: boolean;
@@ -453,10 +454,12 @@ type State$9 = {
453
454
  type Transcript = Array<{
454
455
  source: string;
455
456
  text: string;
457
+ attachments?: Attachment[];
456
458
  }>;
457
459
  type TranscriptOption = 'in-memory-transcript' | Transcript;
458
460
  interface EvaluateInput {
459
461
  assistantCode: string;
462
+ attachments?: Attachment[];
460
463
  threadId?: number;
461
464
  input?: any;
462
465
  transcript?: TranscriptOption;
@@ -733,6 +736,11 @@ declare namespace Server {
733
736
  url: string;
734
737
  }[];
735
738
  };
739
+ type EvaluationAttachment = {
740
+ filename: string;
741
+ content_type: string;
742
+ content_base64: string;
743
+ };
736
744
  /**
737
745
  * Handling time event data
738
746
  */
@@ -972,6 +980,10 @@ type CreateConversationOptions = {
972
980
  * Send message event data
973
981
  */
974
982
  type SendMessageEventData = CamelCaseKeys<Server.SendMessageEventData>;
983
+ /**
984
+ * CamelCase attachment shape used by the SDK (wire format is Server.EvaluationAttachment).
985
+ */
986
+ type EvaluationAttachment = CamelCaseKeys<Server.EvaluationAttachment>;
975
987
  /**
976
988
  * Event payload
977
989
  */
@@ -1195,8 +1207,10 @@ declare class DeepdeskAPI {
1195
1207
  transcript?: Array<{
1196
1208
  source: string;
1197
1209
  text: string;
1210
+ attachments?: EvaluationAttachment[];
1198
1211
  }>;
1199
1212
  externalConversationId?: string;
1213
+ attachments?: EvaluationAttachment[];
1200
1214
  }): Promise<CamelCaseKeys<Server.EvaluationResponse>>;
1201
1215
  createAssistantThread(init: {
1202
1216
  assistantCode: string;
@@ -1416,6 +1430,7 @@ declare const reducers: redux.Reducer<{
1416
1430
  deanonymize: boolean;
1417
1431
  fallbackImage: string | false;
1418
1432
  isEmbedded: boolean;
1433
+ signInViaPopup: boolean;
1419
1434
  showImages: boolean;
1420
1435
  showSearch: boolean;
1421
1436
  showImageSearch: boolean;
@@ -1481,6 +1496,7 @@ declare const reducers: redux.Reducer<{
1481
1496
  deanonymize: boolean;
1482
1497
  fallbackImage: string | false;
1483
1498
  isEmbedded: boolean;
1499
+ signInViaPopup: boolean;
1484
1500
  showImages: boolean;
1485
1501
  showSearch: boolean;
1486
1502
  showImageSearch: boolean;
@@ -1547,6 +1563,7 @@ declare function createStore(config: StoreConfig): _reduxjs_toolkit.EnhancedStor
1547
1563
  deanonymize: boolean;
1548
1564
  fallbackImage: string | false;
1549
1565
  isEmbedded: boolean;
1566
+ signInViaPopup: boolean;
1550
1567
  showImages: boolean;
1551
1568
  showSearch: boolean;
1552
1569
  showImageSearch: boolean;
@@ -1966,6 +1983,7 @@ type State = {
1966
1983
  deanonymize: boolean;
1967
1984
  fallbackImage: string | false;
1968
1985
  isEmbedded: boolean;
1986
+ signInViaPopup: boolean;
1969
1987
  showImages: boolean;
1970
1988
  showSearch: boolean;
1971
1989
  showImageSearch: boolean;
@@ -2080,6 +2098,10 @@ interface WidgetOptions {
2080
2098
  customStyles?: WidgetCustomStyles;
2081
2099
  showImages?: boolean;
2082
2100
  isEmbedded?: boolean;
2101
+ /** Use SSO popup for Sign in instead of the passwordless overlay (embedded widgets only). */
2102
+ signInViaPopup?: boolean;
2103
+ /** Custom SSO start URL passed to loginViaPopup when the user clicks Sign in. */
2104
+ ssoUrl?: string;
2083
2105
  knowledgeAssist?: KnowledgeAssistOptions;
2084
2106
  assistantOptions?: Omit<EvaluateInput, 'assistantCode'>;
2085
2107
  }
@@ -2167,6 +2189,7 @@ declare class DeepdeskSDK {
2167
2189
  deanonymize: boolean;
2168
2190
  fallbackImage: string | false;
2169
2191
  isEmbedded: boolean;
2192
+ signInViaPopup: boolean;
2170
2193
  showImages: boolean;
2171
2194
  showSearch: boolean;
2172
2195
  showImageSearch: boolean;
@@ -2215,6 +2238,7 @@ declare class DeepdeskSDK {
2215
2238
  deanonymize: boolean;
2216
2239
  fallbackImage: string | false;
2217
2240
  isEmbedded: boolean;
2241
+ signInViaPopup: boolean;
2218
2242
  showImages: boolean;
2219
2243
  showSearch: boolean;
2220
2244
  showImageSearch: boolean;
@@ -2861,6 +2885,7 @@ declare class DeepdeskSDK {
2861
2885
  */
2862
2886
  evaluateAssistant(assistantCode: string, options?: {
2863
2887
  input?: Record<string, any>;
2888
+ attachments?: Attachment[];
2864
2889
  transcript?: TranscriptOption;
2865
2890
  includeMetadata?: boolean;
2866
2891
  showCuesInWidget?: boolean;
@@ -2909,6 +2934,7 @@ declare class DeepdeskSDK {
2909
2934
  */
2910
2935
  evaluateConversationAssistant(event: 'accepted' | 'new-message' | 'ended', options?: {
2911
2936
  input?: Record<string, any>;
2937
+ attachments?: Attachment[];
2912
2938
  transcript?: TranscriptOption;
2913
2939
  includeMetadata?: boolean;
2914
2940
  showCuesInWidget?: boolean;
@@ -3093,6 +3119,7 @@ declare class DeepdeskSDK {
3093
3119
  setConversationQuery(fetchFn: () => Promise<Array<{
3094
3120
  source: string;
3095
3121
  text: string;
3122
+ attachments?: Attachment[];
3096
3123
  }>>): void;
3097
3124
  /**
3098
3125
  * Sets platform-specific variables for placeholder interpolation.
package/dist/index.d.ts CHANGED
@@ -421,6 +421,7 @@ type LegacyCue = CamelCaseKeys<Server.LegacyCue> & {
421
421
  };
422
422
 
423
423
  type EvaluationOutput = CamelCaseKeys<Server.EvaluationOutput>;
424
+ type Attachment = EvaluationAttachment;
424
425
  type ArrayItemType<T> = T extends Array<infer I> ? I : never;
425
426
  type Cue = ArrayItemType<EvaluationOutput> & {
426
427
  isLoading?: boolean;
@@ -453,10 +454,12 @@ type State$9 = {
453
454
  type Transcript = Array<{
454
455
  source: string;
455
456
  text: string;
457
+ attachments?: Attachment[];
456
458
  }>;
457
459
  type TranscriptOption = 'in-memory-transcript' | Transcript;
458
460
  interface EvaluateInput {
459
461
  assistantCode: string;
462
+ attachments?: Attachment[];
460
463
  threadId?: number;
461
464
  input?: any;
462
465
  transcript?: TranscriptOption;
@@ -733,6 +736,11 @@ declare namespace Server {
733
736
  url: string;
734
737
  }[];
735
738
  };
739
+ type EvaluationAttachment = {
740
+ filename: string;
741
+ content_type: string;
742
+ content_base64: string;
743
+ };
736
744
  /**
737
745
  * Handling time event data
738
746
  */
@@ -972,6 +980,10 @@ type CreateConversationOptions = {
972
980
  * Send message event data
973
981
  */
974
982
  type SendMessageEventData = CamelCaseKeys<Server.SendMessageEventData>;
983
+ /**
984
+ * CamelCase attachment shape used by the SDK (wire format is Server.EvaluationAttachment).
985
+ */
986
+ type EvaluationAttachment = CamelCaseKeys<Server.EvaluationAttachment>;
975
987
  /**
976
988
  * Event payload
977
989
  */
@@ -1195,8 +1207,10 @@ declare class DeepdeskAPI {
1195
1207
  transcript?: Array<{
1196
1208
  source: string;
1197
1209
  text: string;
1210
+ attachments?: EvaluationAttachment[];
1198
1211
  }>;
1199
1212
  externalConversationId?: string;
1213
+ attachments?: EvaluationAttachment[];
1200
1214
  }): Promise<CamelCaseKeys<Server.EvaluationResponse>>;
1201
1215
  createAssistantThread(init: {
1202
1216
  assistantCode: string;
@@ -1416,6 +1430,7 @@ declare const reducers: redux.Reducer<{
1416
1430
  deanonymize: boolean;
1417
1431
  fallbackImage: string | false;
1418
1432
  isEmbedded: boolean;
1433
+ signInViaPopup: boolean;
1419
1434
  showImages: boolean;
1420
1435
  showSearch: boolean;
1421
1436
  showImageSearch: boolean;
@@ -1481,6 +1496,7 @@ declare const reducers: redux.Reducer<{
1481
1496
  deanonymize: boolean;
1482
1497
  fallbackImage: string | false;
1483
1498
  isEmbedded: boolean;
1499
+ signInViaPopup: boolean;
1484
1500
  showImages: boolean;
1485
1501
  showSearch: boolean;
1486
1502
  showImageSearch: boolean;
@@ -1547,6 +1563,7 @@ declare function createStore(config: StoreConfig): _reduxjs_toolkit.EnhancedStor
1547
1563
  deanonymize: boolean;
1548
1564
  fallbackImage: string | false;
1549
1565
  isEmbedded: boolean;
1566
+ signInViaPopup: boolean;
1550
1567
  showImages: boolean;
1551
1568
  showSearch: boolean;
1552
1569
  showImageSearch: boolean;
@@ -1966,6 +1983,7 @@ type State = {
1966
1983
  deanonymize: boolean;
1967
1984
  fallbackImage: string | false;
1968
1985
  isEmbedded: boolean;
1986
+ signInViaPopup: boolean;
1969
1987
  showImages: boolean;
1970
1988
  showSearch: boolean;
1971
1989
  showImageSearch: boolean;
@@ -2080,6 +2098,10 @@ interface WidgetOptions {
2080
2098
  customStyles?: WidgetCustomStyles;
2081
2099
  showImages?: boolean;
2082
2100
  isEmbedded?: boolean;
2101
+ /** Use SSO popup for Sign in instead of the passwordless overlay (embedded widgets only). */
2102
+ signInViaPopup?: boolean;
2103
+ /** Custom SSO start URL passed to loginViaPopup when the user clicks Sign in. */
2104
+ ssoUrl?: string;
2083
2105
  knowledgeAssist?: KnowledgeAssistOptions;
2084
2106
  assistantOptions?: Omit<EvaluateInput, 'assistantCode'>;
2085
2107
  }
@@ -2167,6 +2189,7 @@ declare class DeepdeskSDK {
2167
2189
  deanonymize: boolean;
2168
2190
  fallbackImage: string | false;
2169
2191
  isEmbedded: boolean;
2192
+ signInViaPopup: boolean;
2170
2193
  showImages: boolean;
2171
2194
  showSearch: boolean;
2172
2195
  showImageSearch: boolean;
@@ -2215,6 +2238,7 @@ declare class DeepdeskSDK {
2215
2238
  deanonymize: boolean;
2216
2239
  fallbackImage: string | false;
2217
2240
  isEmbedded: boolean;
2241
+ signInViaPopup: boolean;
2218
2242
  showImages: boolean;
2219
2243
  showSearch: boolean;
2220
2244
  showImageSearch: boolean;
@@ -2861,6 +2885,7 @@ declare class DeepdeskSDK {
2861
2885
  */
2862
2886
  evaluateAssistant(assistantCode: string, options?: {
2863
2887
  input?: Record<string, any>;
2888
+ attachments?: Attachment[];
2864
2889
  transcript?: TranscriptOption;
2865
2890
  includeMetadata?: boolean;
2866
2891
  showCuesInWidget?: boolean;
@@ -2909,6 +2934,7 @@ declare class DeepdeskSDK {
2909
2934
  */
2910
2935
  evaluateConversationAssistant(event: 'accepted' | 'new-message' | 'ended', options?: {
2911
2936
  input?: Record<string, any>;
2937
+ attachments?: Attachment[];
2912
2938
  transcript?: TranscriptOption;
2913
2939
  includeMetadata?: boolean;
2914
2940
  showCuesInWidget?: boolean;
@@ -3093,6 +3119,7 @@ declare class DeepdeskSDK {
3093
3119
  setConversationQuery(fetchFn: () => Promise<Array<{
3094
3120
  source: string;
3095
3121
  text: string;
3122
+ attachments?: Attachment[];
3096
3123
  }>>): void;
3097
3124
  /**
3098
3125
  * Sets platform-specific variables for placeholder interpolation.