kuzzle-sdk
Advanced tools
Comparing version 7.9.1 to 7.10.0
@@ -1,1 +0,1 @@ | ||
/*! Kuzzle Javascript SDK version 7.9.1 */ | ||
/*! Kuzzle Javascript SDK version 7.10.0 */ |
@@ -21,1 +21,2 @@ export * from './src/Kuzzle'; | ||
export * from './src/controllers/Realtime'; | ||
export * from './src/controllers/Server'; |
@@ -39,2 +39,3 @@ "use strict"; | ||
__exportStar(require("./src/controllers/Realtime"), exports); | ||
__exportStar(require("./src/controllers/Server"), exports); | ||
//# sourceMappingURL=index.js.map |
{ | ||
"name": "kuzzle-sdk", | ||
"version": "7.9.1", | ||
"version": "7.10.0", | ||
"description": "Official Javascript SDK for Kuzzle", | ||
@@ -5,0 +5,0 @@ "author": "The Kuzzle Team <support@kuzzle.io>", |
@@ -321,3 +321,3 @@ import { BaseController } from './Base'; | ||
expiresIn?: number; | ||
refresh?: 'wait_for'; | ||
refresh?: 'wait_for' | 'false'; | ||
} | ||
@@ -327,3 +327,3 @@ export interface ArgsAuthControllerCheckRights extends ArgsDefault { | ||
export interface ArgsAuthControllerDeleteApiKey extends ArgsDefault { | ||
refresh?: 'wait_for'; | ||
refresh?: 'wait_for' | 'false'; | ||
} | ||
@@ -330,0 +330,0 @@ export interface ArgsAuthControllerSearchApiKeys extends ArgsDefault { |
@@ -168,3 +168,3 @@ import { BaseController } from './Base'; | ||
export interface ArgsBulkControllerDeleteByQuery extends ArgsDefault { | ||
refresh?: 'wait_for'; | ||
refresh?: 'wait_for' | 'false'; | ||
} | ||
@@ -174,11 +174,11 @@ export interface ArgsBulkControllerImport extends ArgsDefault { | ||
export interface ArgsBulkControllerUpdateByQuery extends ArgsDefault { | ||
refresh?: 'wait_for'; | ||
refresh?: 'wait_for' | 'false'; | ||
} | ||
export interface ArgsBulkControllerWrite extends ArgsDefault { | ||
notify?: boolean; | ||
refresh?: 'wait_for'; | ||
refresh?: 'wait_for' | 'false'; | ||
} | ||
export interface ArgsBulkControllerMWrite extends ArgsDefault { | ||
notify?: boolean; | ||
refresh?: 'wait_for'; | ||
refresh?: 'wait_for' | 'false'; | ||
} |
import { BaseController } from './Base'; | ||
import { JSONObject, mCreateResponse, ArgsDefault, mCreateRequest, mCreateOrReplaceRequest, mCreateOrReplaceResponse, mDeleteRequest, mDeleteResponse, mReplaceRequest, mReplaceResponse, mUpdateRequest, mUpdateResponse, KDocumentContentGeneric, KDocument, KHit } from '../types'; | ||
import { JSONObject, mCreateResponse, ArgsDefault, mCreateRequest, mCreateOrReplaceRequest, mCreateOrReplaceResponse, mDeleteRequest, mDeleteResponse, mReplaceRequest, mReplaceResponse, mUpdateRequest, mUpdateResponse, KDocumentContentGeneric, KDocument, KHit, mUpsertRequest } from '../types'; | ||
import { SearchResult } from '../core/searchResult/SearchResultBase'; | ||
@@ -283,3 +283,3 @@ export declare class DocumentController extends BaseController { | ||
*/ | ||
mUpsert<TKDocumentContent extends KDocumentContentGeneric>(index: string, collection: string, documents: mUpdateRequest<TKDocumentContent>, options?: ArgsDocumentControllerMUpsert): Promise<mUpdateResponse>; | ||
mUpsert<TKDocumentContent extends KDocumentContentGeneric>(index: string, collection: string, documents: mUpsertRequest<TKDocumentContent>, options?: ArgsDocumentControllerMUpsert): Promise<mUpdateResponse>; | ||
/** | ||
@@ -359,3 +359,3 @@ * Replaces the content of an existing document. | ||
*/ | ||
updateByQuery<TKDocumentContent extends KDocumentContentGeneric>(index: string, collection: string, query: JSONObject, changes: JSONObject, options?: ArgsDocumentControllerUpdateByQuery): Promise<{ | ||
updateByQuery<TKDocumentContent extends KDocumentContentGeneric>(index: string, collection: string, query: JSONObject, changes: Partial<TKDocumentContent>, options?: ArgsDocumentControllerUpdateByQuery): Promise<{ | ||
/** | ||
@@ -401,3 +401,3 @@ * Array of successfully updated documents | ||
*/ | ||
upsert<TKDocumentContent extends KDocumentContentGeneric>(index: string, collection: string, _id: string, changes: Partial<TKDocumentContent>, options?: ArgsDocumentControllerUpsert): Promise<KDocument<TKDocumentContent>>; | ||
upsert<TKDocumentContent extends KDocumentContentGeneric>(index: string, collection: string, _id: string, changes: Partial<TKDocumentContent>, options?: ArgsDocumentControllerUpsert<TKDocumentContent>): Promise<KDocument<TKDocumentContent>>; | ||
/** | ||
@@ -422,11 +422,11 @@ * Validates a document against existing validation rules. | ||
export interface ArgsDocumentControllerCreate extends ArgsDefault { | ||
refresh?: 'wait_for'; | ||
refresh?: 'wait_for' | 'false'; | ||
silent?: boolean; | ||
} | ||
export interface ArgsDocumentControllerCreateOrReplace extends ArgsDefault { | ||
refresh?: 'wait_for'; | ||
refresh?: 'wait_for' | 'false'; | ||
silent?: boolean; | ||
} | ||
export interface ArgsDocumentControllerDelete extends ArgsDefault { | ||
refresh?: 'wait_for'; | ||
refresh?: 'wait_for' | 'false'; | ||
silent?: boolean; | ||
@@ -440,3 +440,3 @@ } | ||
export interface ArgsDocumentControllerDeleteFields extends ArgsDefault { | ||
refresh?: 'wait_for'; | ||
refresh?: 'wait_for' | 'false'; | ||
silent?: boolean; | ||
@@ -446,11 +446,11 @@ source?: boolean; | ||
export interface ArgsDocumentControllerExists extends ArgsDefault { | ||
refresh?: 'wait_for'; | ||
refresh?: 'wait_for' | 'false'; | ||
silent?: boolean; | ||
} | ||
export interface ArgsDocumentControllerGet extends ArgsDefault { | ||
refresh?: 'wait_for'; | ||
refresh?: 'wait_for' | 'false'; | ||
silent?: boolean; | ||
} | ||
export interface ArgsDocumentControllerMCreate extends ArgsDefault { | ||
refresh?: 'wait_for'; | ||
refresh?: 'wait_for' | 'false'; | ||
silent?: boolean; | ||
@@ -460,3 +460,3 @@ strict?: boolean; | ||
export interface ArgsDocumentControllerMCreateOrReplace extends ArgsDefault { | ||
refresh?: 'wait_for'; | ||
refresh?: 'wait_for' | 'false'; | ||
silent?: boolean; | ||
@@ -466,3 +466,3 @@ strict?: boolean; | ||
export interface ArgsDocumentControllerMDelete extends ArgsDefault { | ||
refresh?: 'wait_for'; | ||
refresh?: 'wait_for' | 'false'; | ||
silent?: boolean; | ||
@@ -475,3 +475,3 @@ strict?: boolean; | ||
export interface ArgsDocumentControllerMReplace extends ArgsDefault { | ||
refresh?: 'wait_for'; | ||
refresh?: 'wait_for' | 'false'; | ||
silent?: boolean; | ||
@@ -481,3 +481,3 @@ strict?: boolean; | ||
export interface ArgsDocumentControllerMUpdate extends ArgsDefault { | ||
refresh?: 'wait_for'; | ||
refresh?: 'wait_for' | 'false'; | ||
silent?: boolean; | ||
@@ -488,3 +488,3 @@ retryOnConflict?: number; | ||
export interface ArgsDocumentControllerMUpsert extends ArgsDefault { | ||
refresh?: 'wait_for'; | ||
refresh?: 'wait_for' | 'false'; | ||
silent?: boolean; | ||
@@ -495,3 +495,3 @@ retryOnConflict?: number; | ||
export interface ArgsDocumentControllerReplace extends ArgsDefault { | ||
refresh?: 'wait_for'; | ||
refresh?: 'wait_for' | 'false'; | ||
silent?: boolean; | ||
@@ -507,3 +507,3 @@ } | ||
export interface ArgsDocumentControllerUpdate extends ArgsDefault { | ||
refresh?: 'wait_for'; | ||
refresh?: 'wait_for' | 'false'; | ||
silent?: boolean; | ||
@@ -514,3 +514,3 @@ retryOnConflict?: number; | ||
export interface ArgsDocumentControllerUpdateByQuery extends ArgsDefault { | ||
refresh?: 'wait_for'; | ||
refresh?: 'wait_for' | 'false'; | ||
silent?: boolean; | ||
@@ -520,4 +520,4 @@ source?: boolean; | ||
} | ||
export interface ArgsDocumentControllerUpsert extends ArgsDefault { | ||
default?: JSONObject; | ||
export interface ArgsDocumentControllerUpsert<TKDocumentContent> extends ArgsDefault { | ||
default?: Partial<TKDocumentContent>; | ||
refresh?: string; | ||
@@ -524,0 +524,0 @@ silent?: boolean; |
@@ -100,3 +100,3 @@ import { BaseController } from './Base'; | ||
_id?: string; | ||
refresh?: 'wait_for'; | ||
refresh?: 'wait_for' | 'false'; | ||
} | ||
@@ -106,3 +106,3 @@ export interface ArgsSecurityControllerCheckRights extends ArgsDefault { | ||
export interface ArgsSecurityControllerDeleteApiKey extends ArgsDefault { | ||
refresh?: 'wait_for'; | ||
refresh?: 'wait_for' | 'false'; | ||
} | ||
@@ -109,0 +109,0 @@ export interface ArgsSecurityControllerSearchApiKeys extends ArgsDefault { |
@@ -20,2 +20,9 @@ import { BaseController } from './Base'; | ||
/** | ||
* Returns the Kuzzle capabilities | ||
* @param {Object} options - {queuable: Boolean(true)} | ||
* @example https://docs.kuzzle.io/core/2/api/controllers/server/capabilities/#response | ||
* @returns {Promise<Object>} | ||
*/ | ||
capabilities(options: ArgsServerControllerGetAllStats): Promise<any>; | ||
/** | ||
* Returns all stored statistics frames | ||
@@ -22,0 +29,0 @@ * |
@@ -29,2 +29,14 @@ "use strict"; | ||
/** | ||
* Returns the Kuzzle capabilities | ||
* @param {Object} options - {queuable: Boolean(true)} | ||
* @example https://docs.kuzzle.io/core/2/api/controllers/server/capabilities/#response | ||
* @returns {Promise<Object>} | ||
*/ | ||
capabilities(options) { | ||
return this.query({ | ||
action: 'capabilities' | ||
}, options) | ||
.then(response => response.result); | ||
} | ||
/** | ||
* Returns all stored statistics frames | ||
@@ -31,0 +43,0 @@ * |
@@ -8,2 +8,3 @@ import { KuzzleEventEmitter } from './core/KuzzleEventEmitter'; | ||
import { RealtimeController } from './controllers/Realtime'; | ||
import { ServerController } from './controllers/Server'; | ||
import { SecurityController } from './controllers/Security'; | ||
@@ -61,3 +62,3 @@ import { Deprecation } from './utils/Deprecation'; | ||
security: SecurityController; | ||
server: any; | ||
server: ServerController; | ||
private _protectedEvents; | ||
@@ -64,0 +65,0 @@ private _offlineQueue; |
@@ -68,2 +68,6 @@ import { RequestPayload } from './types/RequestPayload'; | ||
/** | ||
* Placeholders used to construct the error message | ||
*/ | ||
props?: string[]; | ||
/** | ||
* This class represents a Kuzzle API error. | ||
@@ -96,3 +100,4 @@ * The SDK stack is needed alongside the protocol used. | ||
stack?: string; | ||
props?: string[]; | ||
}, sdkStack?: string, protocol?: string, request?: RequestPayload); | ||
} |
@@ -36,2 +36,3 @@ 'use strict'; | ||
this.code = apiError.code; | ||
this.props = apiError.props; | ||
if (request) { | ||
@@ -38,0 +39,0 @@ this.controller = request.controller; |
@@ -13,1 +13,2 @@ export * from './ApiKey'; | ||
export * from './KDocument'; | ||
export * from './RequestPayload'; |
@@ -25,2 +25,3 @@ "use strict"; | ||
__exportStar(require("./KDocument"), exports); | ||
__exportStar(require("./RequestPayload"), exports); | ||
//# sourceMappingURL=index.js.map |
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
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
551295
12429