kuzzle 2.19.4 → 2.19.6

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/README.md CHANGED
@@ -37,9 +37,9 @@ Learn how Kuzzle will accelerate your developments :point_right: https://docs.ku
37
37
 
38
38
  ## Kuzzle in production
39
39
 
40
- Kuzzle is production-proof, and can be [deployed anywhere](https://kuzzle.io/products/by-features/on-premises/).
40
+ Kuzzle is production-proof, and can be [deployed anywhere](https://kuzzle.io/products/by-features/on-premises/).
41
41
 
42
- With Kuzzle, it is possible to deploy applications that can serve tens of thousands of users with very good performances.
42
+ With Kuzzle, it is possible to deploy applications that can serve tens of thousands of users with very good performances.
43
43
 
44
44
  Check out our [support plans](https://kuzzle.io/pricing/).
45
45
 
@@ -51,7 +51,7 @@ The easiest way to start a Kuzzle application is to use [Kourou](https://github.
51
51
  npx kourou app:scaffold playground
52
52
 
53
53
  🚀 Kourou - Scaffolds a new Kuzzle application
54
-
54
+
55
55
  ✔ Creating playground/ directory
56
56
  ✔ Creating and rendering application files
57
57
  ✔ Installing latest Kuzzle version via NPM and Docker (this can take some time)
@@ -78,7 +78,7 @@ const app = new Backend('playground');
78
78
  app.controller.register('greeting', {
79
79
  actions: {
80
80
  sayHello: {
81
- handler: async request => `Hello, ${request.input.args.name}`
81
+ handler: async request => `Hello, ${request.input.args.name}`
82
82
  }
83
83
  }
84
84
  });
@@ -110,13 +110,13 @@ Learn how to [Write an Application](https://docs.kuzzle.io/core/2/guides/getting
110
110
 
111
111
  ## Get trained by the creators of Kuzzle :zap:
112
112
 
113
- Train yourself and your teams to use Kuzzle to maximize its potential and accelerate the development of your projects.
114
- Our teams will be able to meet your needs in terms of expertise and multi-technology support for IoT, mobile/web, backend/frontend, devops.
113
+ Train yourself and your teams to use Kuzzle to maximize its potential and accelerate the development of your projects.
114
+ Our teams will be able to meet your needs in terms of expertise and multi-technology support for IoT, mobile/web, backend/frontend, devops.
115
115
  :point_right: [Get a quote](https://hubs.ly/H0jkfJ_0)
116
116
 
117
117
  ## Public Roadmap
118
118
 
119
- You can consult the public roadmap on Trello. Come and vote for the features you need!
119
+ You can consult the public roadmap on Trello. Come and vote for the features you need!
120
120
  :point_right: [Kuzzle Public Roadmap](https://trello.com/b/za9vOgRh/kuzzle-public-roadmap)
121
121
 
122
122
  ## Contributing to Kuzzle
@@ -149,3 +149,4 @@ npm run docker:install
149
149
  ```
150
150
 
151
151
  finally run the command `docker-compose up` to launch your kuzzle stack.
152
+
@@ -1,5 +1,4 @@
1
- import { RealtimeController, Notification, JSONObject, ScopeOption, UserOption, Kuzzle, RequestPayload } from "kuzzle-sdk";
2
- import { ResponsePayload } from "../../../types";
1
+ import { RealtimeController, Notification, JSONObject, ScopeOption, UserOption, Kuzzle, ResponsePayload, BaseRequest } from "kuzzle-sdk";
3
2
  interface EmbeddedRealtime extends RealtimeController {
4
3
  /**
5
4
  * Subscribes by providing a set of filters: messages, document changes
@@ -70,8 +69,8 @@ export declare class EmbeddedSDK extends Kuzzle {
70
69
  * @param request - API request (https://docs.kuzzle.io/core/2/guides/main-concepts/1-api#other-protocols)
71
70
  * @param options - Optional arguments
72
71
  */
73
- query(request: RequestPayload, options?: {
72
+ query<TRequest extends BaseRequest, TResult>(request: TRequest, options?: {
74
73
  propagate?: boolean;
75
- }): Promise<ResponsePayload>;
74
+ }): Promise<ResponsePayload<TResult>>;
76
75
  }
77
76
  export {};
@@ -112,6 +112,7 @@ class EmbeddedSDK extends kuzzle_sdk_1.Kuzzle {
112
112
  if ((0, safeObject_1.isPlainObject)(request) &&
113
113
  request.controller === "realtime" &&
114
114
  request.action === "subscribe") {
115
+ // @ts-expect-error
115
116
  request.propagate =
116
117
  options.propagate === undefined || options.propagate === null
117
118
  ? false
@@ -28,3 +28,7 @@ export declare type PipeEventHandler<TEventDefinition extends EventDefinition =
28
28
  * Handler for cluster event.
29
29
  */
30
30
  export declare type ClusterEventHandler<TEventDefinition extends EventDefinition = EventDefinition> = (...args: TEventDefinition["args"]) => any;
31
+ /**
32
+ * @deprecated Use HookEventHandler, PipeEventHandler or ClusterEventHandler
33
+ */
34
+ export declare type EventHandler = (...payload: any) => any;
@@ -2,7 +2,6 @@ export * from "./Plugin";
2
2
  export * from "./Controller";
3
3
  export * from "./ControllerDefinition";
4
4
  export * from "./ControllerRights";
5
- export * from "./ResponsePayload";
6
5
  export * from "./Deprecation";
7
6
  export * from "./EventHandler";
8
7
  export * from "./Policy";
@@ -38,7 +38,6 @@ __exportStar(require("./Plugin"), exports);
38
38
  __exportStar(require("./Controller"), exports);
39
39
  __exportStar(require("./ControllerDefinition"), exports);
40
40
  __exportStar(require("./ControllerRights"), exports);
41
- __exportStar(require("./ResponsePayload"), exports);
42
41
  __exportStar(require("./Deprecation"), exports);
43
42
  __exportStar(require("./EventHandler"), exports);
44
43
  __exportStar(require("./Policy"), exports);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "kuzzle",
3
3
  "author": "The Kuzzle Team <support@kuzzle.io>",
4
- "version": "2.19.4",
4
+ "version": "2.19.6",
5
5
  "description": "Kuzzle is an open-source solution that handles all the data management through a secured API, with a large choice of protocols.",
6
6
  "bin": "bin/start-kuzzle-server",
7
7
  "scripts": {
@@ -41,7 +41,6 @@
41
41
  },
42
42
  "dependencies": {
43
43
  "@elastic/elasticsearch": "https://github.com/elastic/elasticsearch-js/archive/refs/tags/v7.13.0.tar.gz",
44
- "@types/js-yaml": "^4.0.5",
45
44
  "aedes": "^0.46.3",
46
45
  "bluebird": "^3.7.2",
47
46
  "cli-color": "^2.0.3",
@@ -50,6 +49,7 @@
50
49
  "denque": "^2.1.0",
51
50
  "didyoumean": "^1.2.2",
52
51
  "dumpme": "^1.0.3",
52
+ "eslint-plugin-kuzzle": "^0.0.6",
53
53
  "eventemitter3": "^4.0.7",
54
54
  "inquirer": "^9.1.1",
55
55
  "ioredis": "^5.2.3",
@@ -60,7 +60,7 @@
60
60
  "koncorde": "^4.0.3",
61
61
  "kuzzle-plugin-auth-passport-local": "^6.3.6",
62
62
  "kuzzle-plugin-logger": "^3.0.3",
63
- "kuzzle-sdk": "^7.10.1",
63
+ "kuzzle-sdk": "^7.10.3",
64
64
  "kuzzle-vault": "^2.0.4",
65
65
  "lodash": "4.17.21",
66
66
  "long": "^5.2.0",
@@ -70,13 +70,12 @@
70
70
  "ndjson": "^2.0.0",
71
71
  "node-segfault-handler": "^1.1.0",
72
72
  "passport": "^0.6.0",
73
- "prettier": "^2.7.1",
74
73
  "protobufjs": "~7.1.0",
75
74
  "rc": "1.2.8",
76
75
  "semver": "^7.3.7",
77
76
  "sorted-array": "^2.0.4",
78
- "uWebSockets.js": "https://github.com/uNetworking/uWebSockets.js/archive/refs/tags/v20.0.0.tar.gz",
79
77
  "uuid": "^9.0.0",
78
+ "uWebSockets.js": "https://github.com/uNetworking/uWebSockets.js/archive/refs/tags/v20.0.0.tar.gz",
80
79
  "validator": "^13.7.0",
81
80
  "winston": "^3.8.1",
82
81
  "winston-elasticsearch": "0.17.1",
@@ -90,16 +89,13 @@
90
89
  "url": "git://github.com/kuzzleio/kuzzle.git"
91
90
  },
92
91
  "devDependencies": {
92
+ "@types/js-yaml": "^4.0.5",
93
93
  "@types/lodash": "^4.14.184",
94
- "@typescript-eslint/eslint-plugin": "^5.36.2",
95
- "@typescript-eslint/parser": "^5.36.2",
96
94
  "async": "^3.2.4",
97
95
  "chokidar": "^3.5.3",
98
96
  "codecov": "^3.8.3",
99
97
  "cucumber": "^6.0.5",
100
98
  "ergol": "^1.0.2",
101
- "eslint": "^8.23.0",
102
- "eslint-plugin-kuzzle": "0.0.5",
103
99
  "mocha": "^9.2.2",
104
100
  "mock-require": "^3.0.3",
105
101
  "mqtt": "^4.3.7",
@@ -1,45 +0,0 @@
1
- import { JSONObject } from "../../index";
2
- /**
3
- * Kuzzle API request payload
4
- *
5
- * @see https://docs.kuzzle.io/core/2/api/payloads/request
6
- */
7
- export declare type RequestPayload = {
8
- /**
9
- * API controller name
10
- */
11
- controller: string;
12
- /**
13
- * API action name
14
- */
15
- action: string;
16
- /**
17
- * Index name
18
- */
19
- index?: string;
20
- /**
21
- * Collection name
22
- */
23
- collection?: string;
24
- /**
25
- * Document unique identifier
26
- */
27
- _id?: string;
28
- /**
29
- * Authentication token
30
- */
31
- jwt?: string;
32
- /**
33
- * Volatile data
34
- */
35
- volatile?: JSONObject;
36
- /**
37
- * Request body
38
- */
39
- body?: JSONObject;
40
- /**
41
- * Request unique identifier
42
- */
43
- requestId?: string;
44
- [key: string]: any;
45
- };
@@ -1,23 +0,0 @@
1
- "use strict";
2
- /*
3
- * Kuzzle, a backend software, self-hostable and ready to use
4
- * to power modern apps
5
- *
6
- * Copyright 2015-2022 Kuzzle
7
- * mailto: support AT kuzzle.io
8
- * website: http://kuzzle.io
9
- *
10
- * Licensed under the Apache License, Version 2.0 (the "License");
11
- * you may not use this file except in compliance with the License.
12
- * You may obtain a copy of the License at
13
- *
14
- * https://www.apache.org/licenses/LICENSE-2.0
15
- *
16
- * Unless required by applicable law or agreed to in writing, software
17
- * distributed under the License is distributed on an "AS IS" BASIS,
18
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
19
- * See the License for the specific language governing permissions and
20
- * limitations under the License.
21
- */
22
- Object.defineProperty(exports, "__esModule", { value: true });
23
- //# sourceMappingURL=RequestPayload.js.map
@@ -1,74 +0,0 @@
1
- import { JSONObject } from "../../index";
2
- export declare type ResponseErrorPayload = {
3
- /**
4
- * Error human readable identifier
5
- */
6
- id: string;
7
- /**
8
- * Error identifier
9
- */
10
- code: number;
11
- /**
12
- * Error message
13
- */
14
- message: string;
15
- /**
16
- * HTTP status error code
17
- */
18
- status: number;
19
- /**
20
- * Error stacktrace (only if global.NODE_ENV=development)
21
- */
22
- stack?: string;
23
- };
24
- /**
25
- * Kuzzle API response payload
26
- *
27
- * @see https://docs.kuzzle.io/core/2/api/payloads/response
28
- */
29
- export declare type ResponsePayload = {
30
- /**
31
- * API controller name
32
- */
33
- controller: string;
34
- /**
35
- * API action name
36
- */
37
- action: string;
38
- /**
39
- * Index name
40
- */
41
- index?: string;
42
- /**
43
- * Collection name
44
- */
45
- collection?: string;
46
- /**
47
- * Document unique identifier
48
- */
49
- _id?: string;
50
- /**
51
- * API error
52
- */
53
- error?: ResponseErrorPayload;
54
- /**
55
- * Request unique identifier
56
- */
57
- requestId: string;
58
- /**
59
- * API action result
60
- */
61
- result: any;
62
- /**
63
- * HTTP status code
64
- */
65
- status: number;
66
- /**
67
- * Volatile data
68
- */
69
- volatile?: JSONObject;
70
- /**
71
- * Room unique identifier
72
- */
73
- room?: string;
74
- };
@@ -1,23 +0,0 @@
1
- "use strict";
2
- /*
3
- * Kuzzle, a backend software, self-hostable and ready to use
4
- * to power modern apps
5
- *
6
- * Copyright 2015-2022 Kuzzle
7
- * mailto: support AT kuzzle.io
8
- * website: http://kuzzle.io
9
- *
10
- * Licensed under the Apache License, Version 2.0 (the "License");
11
- * you may not use this file except in compliance with the License.
12
- * You may obtain a copy of the License at
13
- *
14
- * https://www.apache.org/licenses/LICENSE-2.0
15
- *
16
- * Unless required by applicable law or agreed to in writing, software
17
- * distributed under the License is distributed on an "AS IS" BASIS,
18
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
19
- * See the License for the specific language governing permissions and
20
- * limitations under the License.
21
- */
22
- Object.defineProperty(exports, "__esModule", { value: true });
23
- //# sourceMappingURL=ResponsePayload.js.map