@deepdesk/deepdesk-sdk 19.4.2-beta.2 → 19.4.2-beta.3
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 +9 -9
- package/dist/index.d.mts +10 -0
- package/dist/index.d.ts +10 -0
- package/dist/index.esm.js +9 -9
- package/dist/index.iife.js +46 -46
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -509,6 +509,11 @@ declare class HTTPClient {
|
|
|
509
509
|
refreshToken(): Promise<void>;
|
|
510
510
|
get<TResponse>(path: string, init?: ExtendedRequestInit): Promise<TResponse>;
|
|
511
511
|
post<TPayload, TResponse>(path: string, body: TPayload, init?: ExtendedRequestInit): Promise<TResponse>;
|
|
512
|
+
postWithStatus<TPayload, TResponse>(path: string, body: TPayload, init?: ExtendedRequestInit): Promise<{
|
|
513
|
+
status: number;
|
|
514
|
+
data: TResponse;
|
|
515
|
+
}>;
|
|
516
|
+
private requestWithStatus;
|
|
512
517
|
patch<TPayload, TResponse>(path: string, body: TPayload, init?: ExtendedRequestInit): Promise<TResponse>;
|
|
513
518
|
put<TPayload, TResponse>(path: string, body: TPayload, init?: ExtendedRequestInit): Promise<TResponse>;
|
|
514
519
|
delete<TResponse>(path: string, init?: ExtendedRequestInit): Promise<TResponse>;
|
|
@@ -1114,6 +1119,11 @@ declare class DeepdeskAPI {
|
|
|
1114
1119
|
private preflight;
|
|
1115
1120
|
constructor(apiUrl: string, options?: DeepdeskAPIOptions);
|
|
1116
1121
|
createConversation(options: CreateConversationOptions): Promise<CamelCaseKeys<Server.Conversation>>;
|
|
1122
|
+
/**
|
|
1123
|
+
* Get or create a conversation in one round trip, then update agent fields when it already existed.
|
|
1124
|
+
* Uses POST /api/v2/conversations (server-side get-or-create) instead of GET-by-external-id then POST.
|
|
1125
|
+
*/
|
|
1126
|
+
upsertConversation(options: CreateConversationOptions): Promise<CamelCaseKeys<Server.Conversation>>;
|
|
1117
1127
|
getMe(): Promise<CamelCaseKeys<Server.Me>>;
|
|
1118
1128
|
postIdentity(identity: CamelCaseKeys<Omit<Server.Identity, 'id'>>): Promise<void>;
|
|
1119
1129
|
patchMe(data: Partial<CamelCaseKeys<Omit<Server.Me, 'permissions'>>>): Promise<CamelCaseKeys<Server.Me>>;
|
package/dist/index.d.ts
CHANGED
|
@@ -509,6 +509,11 @@ declare class HTTPClient {
|
|
|
509
509
|
refreshToken(): Promise<void>;
|
|
510
510
|
get<TResponse>(path: string, init?: ExtendedRequestInit): Promise<TResponse>;
|
|
511
511
|
post<TPayload, TResponse>(path: string, body: TPayload, init?: ExtendedRequestInit): Promise<TResponse>;
|
|
512
|
+
postWithStatus<TPayload, TResponse>(path: string, body: TPayload, init?: ExtendedRequestInit): Promise<{
|
|
513
|
+
status: number;
|
|
514
|
+
data: TResponse;
|
|
515
|
+
}>;
|
|
516
|
+
private requestWithStatus;
|
|
512
517
|
patch<TPayload, TResponse>(path: string, body: TPayload, init?: ExtendedRequestInit): Promise<TResponse>;
|
|
513
518
|
put<TPayload, TResponse>(path: string, body: TPayload, init?: ExtendedRequestInit): Promise<TResponse>;
|
|
514
519
|
delete<TResponse>(path: string, init?: ExtendedRequestInit): Promise<TResponse>;
|
|
@@ -1114,6 +1119,11 @@ declare class DeepdeskAPI {
|
|
|
1114
1119
|
private preflight;
|
|
1115
1120
|
constructor(apiUrl: string, options?: DeepdeskAPIOptions);
|
|
1116
1121
|
createConversation(options: CreateConversationOptions): Promise<CamelCaseKeys<Server.Conversation>>;
|
|
1122
|
+
/**
|
|
1123
|
+
* Get or create a conversation in one round trip, then update agent fields when it already existed.
|
|
1124
|
+
* Uses POST /api/v2/conversations (server-side get-or-create) instead of GET-by-external-id then POST.
|
|
1125
|
+
*/
|
|
1126
|
+
upsertConversation(options: CreateConversationOptions): Promise<CamelCaseKeys<Server.Conversation>>;
|
|
1117
1127
|
getMe(): Promise<CamelCaseKeys<Server.Me>>;
|
|
1118
1128
|
postIdentity(identity: CamelCaseKeys<Omit<Server.Identity, 'id'>>): Promise<void>;
|
|
1119
1129
|
patchMe(data: Partial<CamelCaseKeys<Omit<Server.Me, 'permissions'>>>): Promise<CamelCaseKeys<Server.Me>>;
|