@deepdesk/deepdesk-sdk 19.3.1 → 19.3.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.cjs.js +9 -9
- package/dist/index.d.mts +21 -0
- package/dist/index.d.ts +21 -0
- package/dist/index.esm.js +9 -9
- package/dist/index.iife.js +27 -27
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -798,6 +798,13 @@ declare namespace Server {
|
|
|
798
798
|
default_locale?: string;
|
|
799
799
|
identities: Identity[];
|
|
800
800
|
};
|
|
801
|
+
/**
|
|
802
|
+
* Response from username/password session login.
|
|
803
|
+
* Includes a short-lived exchange `jwt` for SDK / cross-origin handoff.
|
|
804
|
+
*/
|
|
805
|
+
type SessionLoginResponse = Me & {
|
|
806
|
+
jwt: string;
|
|
807
|
+
};
|
|
801
808
|
/**
|
|
802
809
|
* A Deepdesk user
|
|
803
810
|
*/
|
|
@@ -1160,6 +1167,20 @@ declare class DeepdeskAPI {
|
|
|
1160
1167
|
* Search
|
|
1161
1168
|
*/
|
|
1162
1169
|
search(params: SearchOptions): Promise<CamelCaseKeys<Server.SearchResultsData>>;
|
|
1170
|
+
/**
|
|
1171
|
+
* Log in with Django username + password.
|
|
1172
|
+
* Sets session / JWT cookies (`credentials: "include"`) and returns the session
|
|
1173
|
+
* user plus a short-lived exchange `jwt` for cross-origin / SDK bootstrap.
|
|
1174
|
+
*
|
|
1175
|
+
* Field name is `username` (often an email address), not `email`.
|
|
1176
|
+
* A 400 response (e.g. "No active user found") means invalid credentials —
|
|
1177
|
+
* show a generic auth-failure message to the user.
|
|
1178
|
+
*/
|
|
1179
|
+
loginWithPassword(username: string, password: string): Promise<CamelCaseKeys<Server.SessionLoginResponse>>;
|
|
1180
|
+
/**
|
|
1181
|
+
* Clear the Django session and JWT cookies.
|
|
1182
|
+
*/
|
|
1183
|
+
logout(): Promise<void>;
|
|
1163
1184
|
requestLoginByEmail(email: string): Promise<{
|
|
1164
1185
|
code: string;
|
|
1165
1186
|
message: string;
|
package/dist/index.d.ts
CHANGED
|
@@ -798,6 +798,13 @@ declare namespace Server {
|
|
|
798
798
|
default_locale?: string;
|
|
799
799
|
identities: Identity[];
|
|
800
800
|
};
|
|
801
|
+
/**
|
|
802
|
+
* Response from username/password session login.
|
|
803
|
+
* Includes a short-lived exchange `jwt` for SDK / cross-origin handoff.
|
|
804
|
+
*/
|
|
805
|
+
type SessionLoginResponse = Me & {
|
|
806
|
+
jwt: string;
|
|
807
|
+
};
|
|
801
808
|
/**
|
|
802
809
|
* A Deepdesk user
|
|
803
810
|
*/
|
|
@@ -1160,6 +1167,20 @@ declare class DeepdeskAPI {
|
|
|
1160
1167
|
* Search
|
|
1161
1168
|
*/
|
|
1162
1169
|
search(params: SearchOptions): Promise<CamelCaseKeys<Server.SearchResultsData>>;
|
|
1170
|
+
/**
|
|
1171
|
+
* Log in with Django username + password.
|
|
1172
|
+
* Sets session / JWT cookies (`credentials: "include"`) and returns the session
|
|
1173
|
+
* user plus a short-lived exchange `jwt` for cross-origin / SDK bootstrap.
|
|
1174
|
+
*
|
|
1175
|
+
* Field name is `username` (often an email address), not `email`.
|
|
1176
|
+
* A 400 response (e.g. "No active user found") means invalid credentials —
|
|
1177
|
+
* show a generic auth-failure message to the user.
|
|
1178
|
+
*/
|
|
1179
|
+
loginWithPassword(username: string, password: string): Promise<CamelCaseKeys<Server.SessionLoginResponse>>;
|
|
1180
|
+
/**
|
|
1181
|
+
* Clear the Django session and JWT cookies.
|
|
1182
|
+
*/
|
|
1183
|
+
logout(): Promise<void>;
|
|
1163
1184
|
requestLoginByEmail(email: string): Promise<{
|
|
1164
1185
|
code: string;
|
|
1165
1186
|
message: string;
|