@deepdesk/deepdesk-sdk 18.1.0 → 18.1.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.cjs.js +7 -7
- package/dist/index.d.mts +15 -7
- package/dist/index.d.ts +15 -7
- package/dist/index.esm.js +7 -7
- package/dist/index.iife.js +18 -18
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -435,9 +435,8 @@ declare class HTTPClient {
|
|
|
435
435
|
setCsrfToken(token: string): void;
|
|
436
436
|
request<TResponse>(path: string, init?: ExtendedRequestInit): Promise<TResponse>;
|
|
437
437
|
/**
|
|
438
|
-
*
|
|
439
|
-
*
|
|
440
|
-
* Therefore, both admin and backend authentication is checked
|
|
438
|
+
* Validates both admin session and backend token authentication using the /apis/admin/session/validate/ endpoint.
|
|
439
|
+
* The endpoint returns authentication status for both admin session and access token.
|
|
441
440
|
*/
|
|
442
441
|
validateToken(): Promise<boolean>;
|
|
443
442
|
refreshToken(): Promise<void>;
|
|
@@ -634,6 +633,18 @@ declare namespace Server {
|
|
|
634
633
|
rule: Pick<Rule, 'id' | 'name' | 'label' | 'description'>;
|
|
635
634
|
call_to_action?: CallToAction;
|
|
636
635
|
}
|
|
636
|
+
enum EvaluationStatus {
|
|
637
|
+
SUCCESS = "success",
|
|
638
|
+
FAILURE = "failure",
|
|
639
|
+
CONDITIONS_NOT_MET = "conditions_not_met",
|
|
640
|
+
MAX_RECURSION_LEVEL = "max_recursion_level",
|
|
641
|
+
NO_ACCESS_TO_ASSISTANT = "no_access_to_assistant"
|
|
642
|
+
}
|
|
643
|
+
type EvaluationResponse<Output extends ResponseFormat> = {
|
|
644
|
+
evaluation_id: string;
|
|
645
|
+
evaluation_status: EvaluationStatus;
|
|
646
|
+
output: EvaluationOutput<Output>;
|
|
647
|
+
};
|
|
637
648
|
type EvaluationOutput<T extends ResponseFormat> = T extends 'text' ? string : T extends 'json-object' ? unknown : T extends 'json-schema:cues' ? Array<{
|
|
638
649
|
code: string;
|
|
639
650
|
name: string;
|
|
@@ -1128,10 +1139,7 @@ declare class DeepdeskAPI {
|
|
|
1128
1139
|
text: string;
|
|
1129
1140
|
}>;
|
|
1130
1141
|
externalConversationId?: string;
|
|
1131
|
-
}): Promise<CamelCaseKeys<
|
|
1132
|
-
evaluation_id: string;
|
|
1133
|
-
output: Server.EvaluationOutput<TOutput>;
|
|
1134
|
-
}>>;
|
|
1142
|
+
}): Promise<CamelCaseKeys<Server.EvaluationResponse<TOutput>>>;
|
|
1135
1143
|
createAssistantThread(init: {
|
|
1136
1144
|
assistantCode: string;
|
|
1137
1145
|
}): Promise<{
|
package/dist/index.d.ts
CHANGED
|
@@ -435,9 +435,8 @@ declare class HTTPClient {
|
|
|
435
435
|
setCsrfToken(token: string): void;
|
|
436
436
|
request<TResponse>(path: string, init?: ExtendedRequestInit): Promise<TResponse>;
|
|
437
437
|
/**
|
|
438
|
-
*
|
|
439
|
-
*
|
|
440
|
-
* Therefore, both admin and backend authentication is checked
|
|
438
|
+
* Validates both admin session and backend token authentication using the /apis/admin/session/validate/ endpoint.
|
|
439
|
+
* The endpoint returns authentication status for both admin session and access token.
|
|
441
440
|
*/
|
|
442
441
|
validateToken(): Promise<boolean>;
|
|
443
442
|
refreshToken(): Promise<void>;
|
|
@@ -634,6 +633,18 @@ declare namespace Server {
|
|
|
634
633
|
rule: Pick<Rule, 'id' | 'name' | 'label' | 'description'>;
|
|
635
634
|
call_to_action?: CallToAction;
|
|
636
635
|
}
|
|
636
|
+
enum EvaluationStatus {
|
|
637
|
+
SUCCESS = "success",
|
|
638
|
+
FAILURE = "failure",
|
|
639
|
+
CONDITIONS_NOT_MET = "conditions_not_met",
|
|
640
|
+
MAX_RECURSION_LEVEL = "max_recursion_level",
|
|
641
|
+
NO_ACCESS_TO_ASSISTANT = "no_access_to_assistant"
|
|
642
|
+
}
|
|
643
|
+
type EvaluationResponse<Output extends ResponseFormat> = {
|
|
644
|
+
evaluation_id: string;
|
|
645
|
+
evaluation_status: EvaluationStatus;
|
|
646
|
+
output: EvaluationOutput<Output>;
|
|
647
|
+
};
|
|
637
648
|
type EvaluationOutput<T extends ResponseFormat> = T extends 'text' ? string : T extends 'json-object' ? unknown : T extends 'json-schema:cues' ? Array<{
|
|
638
649
|
code: string;
|
|
639
650
|
name: string;
|
|
@@ -1128,10 +1139,7 @@ declare class DeepdeskAPI {
|
|
|
1128
1139
|
text: string;
|
|
1129
1140
|
}>;
|
|
1130
1141
|
externalConversationId?: string;
|
|
1131
|
-
}): Promise<CamelCaseKeys<
|
|
1132
|
-
evaluation_id: string;
|
|
1133
|
-
output: Server.EvaluationOutput<TOutput>;
|
|
1134
|
-
}>>;
|
|
1142
|
+
}): Promise<CamelCaseKeys<Server.EvaluationResponse<TOutput>>>;
|
|
1135
1143
|
createAssistantThread(init: {
|
|
1136
1144
|
assistantCode: string;
|
|
1137
1145
|
}): Promise<{
|