kuzzle-sdk
Advanced tools
Comparing version 7.13.0 to 7.14.0-beta.1
@@ -1,1 +0,1 @@ | ||
/*! Kuzzle Javascript SDK version 7.13.0 */ | ||
/*! Kuzzle Javascript SDK version 7.14.0-beta.1 */ |
{ | ||
"name": "kuzzle-sdk", | ||
"version": "7.13.0", | ||
"version": "7.14.0-beta.1", | ||
"description": "Official Javascript SDK for Kuzzle", | ||
@@ -41,3 +41,3 @@ "author": "The Kuzzle Team <support@kuzzle.io>", | ||
"min-req-promise": "^1.0.1", | ||
"ws": "^8.13.0" | ||
"ws": "^8.17.1" | ||
}, | ||
@@ -58,3 +58,8 @@ "devDependencies": { | ||
"cz-conventional-changelog": "^3.3.0", | ||
"eslint-plugin-html": "^8.1.2", | ||
"eslint-plugin-import": "^2.31.0", | ||
"eslint-plugin-kuzzle": "^0.0.6", | ||
"eslint-plugin-node": "^11.1.0", | ||
"eslint-plugin-promise": "^7.1.0", | ||
"eslint-plugin-standard": "^5.0.0", | ||
"https-browserify": "^1.0.0", | ||
@@ -61,0 +66,0 @@ "lodash": "^4.17.21", |
@@ -239,3 +239,3 @@ import { BaseController } from "./Base"; | ||
*/ | ||
login(strategy: string, credentials: JSONObject, expiresIn?: string | number): Promise<string>; | ||
login(strategy: string, credentials: JSONObject, expiresIn?: string | number, options?: ArgsAuthControllerLogin): Promise<string>; | ||
/** | ||
@@ -246,3 +246,3 @@ * Send logout request to kuzzle with jwt. | ||
*/ | ||
logout(): Promise<void>; | ||
logout(options?: ArgsAuthControllerLogin): Promise<void>; | ||
/** | ||
@@ -345,4 +345,6 @@ * Update credentials of the specified strategy for the current user. | ||
export type ArgsAuthControllerValidateMyCredentials = ArgsDefault; | ||
export type ArgsAuthControllerLogin = ArgsDefault; | ||
export type ArgsAuthControllerLogout = ArgsDefault; | ||
export interface ArgsAuthControllerRefreshToken extends ArgsDefault { | ||
expiresIn?: number | string; | ||
} |
@@ -300,3 +300,3 @@ "use strict"; | ||
*/ | ||
login(strategy, credentials, expiresIn) { | ||
login(strategy, credentials, expiresIn, options = {}) { | ||
const request = { | ||
@@ -310,3 +310,8 @@ action: "login", | ||
this.kuzzle.emit("beforeLogin"); | ||
return this.query(request, { queuable: false, timeout: -1, verb: "POST" }) | ||
return this.query(request, { | ||
queuable: false, | ||
timeout: -1, | ||
verb: "POST", | ||
...options, | ||
}) | ||
.then((response) => { | ||
@@ -352,3 +357,3 @@ if (this.kuzzle.cookieAuthentication) { | ||
*/ | ||
async logout() { | ||
async logout(options = {}) { | ||
this.kuzzle.emit("beforeLogout"); | ||
@@ -359,3 +364,3 @@ try { | ||
cookieAuth: this.kuzzle.cookieAuthentication, | ||
}, { queuable: false, timeout: -1 }); | ||
}, { queuable: false, timeout: -1, ...options }); | ||
this._authenticationToken = null; | ||
@@ -362,0 +367,0 @@ /** |
@@ -83,3 +83,3 @@ import { BaseController } from "./Base"; | ||
mGetRoles(ids: any, options?: ArgsSecurityControllerMGetRoles): Promise<any>; | ||
refresh(collection: any): Promise<import("../types").JSONObject>; | ||
refresh(collection: any, options?: ArgsSecurityControllerRefresh): Promise<import("../types").JSONObject>; | ||
replaceUser(_id: any, body: any, options?: ArgsSecurityControllerReplaceUser): Promise<User>; | ||
@@ -164,1 +164,2 @@ searchProfiles(body: any, options?: ArgsSecurityControllerSearchProfiles): Promise<ProfileSearchResult>; | ||
export type ArgsSecurityControllerValidateCredentials = ArgsDefault; | ||
export type ArgsSecurityControllerRefresh = ArgsDefault; |
@@ -308,7 +308,7 @@ "use strict"; | ||
} | ||
refresh(collection) { | ||
refresh(collection, options = {}) { | ||
return this.query({ | ||
action: "refresh", | ||
collection, | ||
}); | ||
}, options); | ||
} | ||
@@ -315,0 +315,0 @@ replaceUser(_id, body, options = {}) { |
import { JSONObject } from "./JSONObject"; | ||
import { KDocument, KDocumentContentGeneric } from "."; | ||
import { KDocumentContentGeneric } from "."; | ||
/** | ||
@@ -59,3 +59,17 @@ * Enum for notification types | ||
*/ | ||
result: KDocument<TDocContent>; | ||
result: { | ||
/** | ||
* The message or full document content. | ||
*/ | ||
_source: TDocContent; | ||
/** | ||
* Document unique ID. | ||
* `null` if the notification is from a real-time message. | ||
*/ | ||
_id: string | null; | ||
/** | ||
* List of fields that have been updated (only available on document partial updates). | ||
*/ | ||
_updatedFields?: string[]; | ||
}; | ||
/** | ||
@@ -88,3 +102,3 @@ * State of the document regarding the scope (`in` or `out`) | ||
/** | ||
* Server message explaining why this notifications has been triggered | ||
* Server message explaining why this notifications has been triggered. | ||
*/ | ||
@@ -91,0 +105,0 @@ message: string; |
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
560308
12527
40
2
Updatedws@^8.17.1