kuzzle 2.16.0 → 2.16.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/lib/api/httpRoutes.js +1 -1
- package/lib/api/openApiGenerator.js +1 -1
- package/lib/api/openapi/document/count.yaml +47 -0
- package/lib/api/openapi/document/create.yaml +46 -0
- package/lib/api/openapi/document/createOrReplace.yaml +61 -0
- package/lib/api/openapi/document/delete.yaml +67 -0
- package/lib/api/openapi/document/deleteByQuery.yaml +90 -0
- package/lib/api/openapi/document/exists.yaml +35 -0
- package/lib/api/openapi/document/get.yaml +68 -0
- package/lib/api/openapi/{documents/document.d.ts → document/index.d.ts} +0 -0
- package/lib/api/openapi/{documents/document.js → document/index.js} +13 -13
- package/lib/api/openapi/document/replace.yaml +66 -0
- package/lib/api/openapi/document/scroll.yaml +49 -0
- package/lib/api/openapi/document/update.yaml +78 -0
- package/lib/api/openapi/payloads.yaml +32 -0
- package/lib/{api/openapi/tools.d.ts → util/readYamlFile.d.ts} +1 -1
- package/lib/{api/openapi/tools.js → util/readYamlFile.js} +1 -1
- package/package-lock.json +1 -1
- package/package.json +2 -17
- package/.kuzzlerc.sample +0 -988
- package/CONTRIBUTING.md +0 -116
- package/bin/.lib/colorOutput.js +0 -71
- package/bin/.upgrades/connectors/es.js +0 -90
- package/bin/.upgrades/connectors/redis.js +0 -112
- package/bin/.upgrades/lib/connectorContext.js +0 -38
- package/bin/.upgrades/lib/context.js +0 -142
- package/bin/.upgrades/lib/formatters.js +0 -103
- package/bin/.upgrades/lib/inquirerExtended.js +0 -46
- package/bin/.upgrades/lib/logger.js +0 -99
- package/bin/.upgrades/lib/progressBar.js +0 -70
- package/bin/.upgrades/versions/v1/checkConfiguration.js +0 -85
- package/bin/.upgrades/versions/v1/index.js +0 -35
- package/bin/.upgrades/versions/v1/upgradeCache.js +0 -149
- package/bin/.upgrades/versions/v1/upgradeStorage.js +0 -450
- package/protocols/available/.gitignore +0 -4
- package/protocols/enabled/.gitignore +0 -4
package/lib/api/httpRoutes.js
CHANGED
|
@@ -26,7 +26,7 @@ exports.generateOpenApi = void 0;
|
|
|
26
26
|
*/
|
|
27
27
|
const lodash_1 = __importDefault(require("lodash"));
|
|
28
28
|
const package_json_1 = require("./../../package.json");
|
|
29
|
-
const document_1 = require("./openapi/
|
|
29
|
+
const document_1 = require("./openapi/document");
|
|
30
30
|
const inflector_1 = require("./../util/inflector");
|
|
31
31
|
const routeUrlMatch = /:([^/]*)/g;
|
|
32
32
|
/**
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
DocumentCount:
|
|
2
|
+
summary: "Counts documents in a collection."
|
|
3
|
+
tags:
|
|
4
|
+
- document
|
|
5
|
+
parameters:
|
|
6
|
+
- in: path
|
|
7
|
+
name: index
|
|
8
|
+
schema:
|
|
9
|
+
type: string
|
|
10
|
+
- in: path
|
|
11
|
+
name: collection
|
|
12
|
+
schema:
|
|
13
|
+
type: string
|
|
14
|
+
- in: body
|
|
15
|
+
name: "body"
|
|
16
|
+
description: "Counts documents in a collection."
|
|
17
|
+
required: true
|
|
18
|
+
schema:
|
|
19
|
+
$ref: "#/components/schemas/DocumentCountRequest"
|
|
20
|
+
responses:
|
|
21
|
+
200:
|
|
22
|
+
description: "Counts documents in a collection."
|
|
23
|
+
schema:
|
|
24
|
+
$ref: "#/components/schemas/DocumentCountResponse"
|
|
25
|
+
|
|
26
|
+
components:
|
|
27
|
+
schemas:
|
|
28
|
+
DocumentCountRequest:
|
|
29
|
+
allOf:
|
|
30
|
+
- type: "object"
|
|
31
|
+
properties:
|
|
32
|
+
query:
|
|
33
|
+
type: "object"
|
|
34
|
+
properties:
|
|
35
|
+
match_all:
|
|
36
|
+
type: "object"
|
|
37
|
+
|
|
38
|
+
DocumentCountResponse:
|
|
39
|
+
allOf:
|
|
40
|
+
- $ref: "#/components/ResponsePayload"
|
|
41
|
+
- type: "object"
|
|
42
|
+
properties:
|
|
43
|
+
result:
|
|
44
|
+
type: "object"
|
|
45
|
+
properties:
|
|
46
|
+
count:
|
|
47
|
+
type: "integer"
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
DocumentCreate:
|
|
2
|
+
summary: "Creates a new document in the persistent data storage."
|
|
3
|
+
tags:
|
|
4
|
+
- document
|
|
5
|
+
parameters:
|
|
6
|
+
- in: path
|
|
7
|
+
name: index
|
|
8
|
+
schema:
|
|
9
|
+
type: string
|
|
10
|
+
- in: path
|
|
11
|
+
name: collection
|
|
12
|
+
schema:
|
|
13
|
+
type: string
|
|
14
|
+
- name: body
|
|
15
|
+
in: "body"
|
|
16
|
+
description: "Creates a new document in the persistent data storage."
|
|
17
|
+
required: true
|
|
18
|
+
schema:
|
|
19
|
+
$ref: "#/components/schemas/DocumentCreateRequest"
|
|
20
|
+
responses:
|
|
21
|
+
200:
|
|
22
|
+
description: "Creates a new document in the persistent data storage."
|
|
23
|
+
schema:
|
|
24
|
+
$ref: "#/components/schemas/DocumentCreateResponse"
|
|
25
|
+
|
|
26
|
+
components:
|
|
27
|
+
schemas:
|
|
28
|
+
DocumentCreateRequest:
|
|
29
|
+
allOf:
|
|
30
|
+
- type: "object"
|
|
31
|
+
description: "document content"
|
|
32
|
+
DocumentCreateResponse:
|
|
33
|
+
allOf:
|
|
34
|
+
- $ref: "#/components/ResponsePayload"
|
|
35
|
+
- type: "object"
|
|
36
|
+
properties:
|
|
37
|
+
result:
|
|
38
|
+
type: "object"
|
|
39
|
+
properties:
|
|
40
|
+
_id:
|
|
41
|
+
type: "string"
|
|
42
|
+
description: "documentId"
|
|
43
|
+
_version:
|
|
44
|
+
type: "integer"
|
|
45
|
+
_sources:
|
|
46
|
+
type: "object"
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
DocumentCreateOrReplace:
|
|
2
|
+
summary: "Creates a new document in the persistent data storage, or replaces its content if it already exists."
|
|
3
|
+
tags:
|
|
4
|
+
- document
|
|
5
|
+
parameters:
|
|
6
|
+
- in: path
|
|
7
|
+
name: index
|
|
8
|
+
schema:
|
|
9
|
+
type: string
|
|
10
|
+
required: true
|
|
11
|
+
- in: path
|
|
12
|
+
name: collection
|
|
13
|
+
schema:
|
|
14
|
+
type: string
|
|
15
|
+
required: true
|
|
16
|
+
- in: path
|
|
17
|
+
name: _id
|
|
18
|
+
schema:
|
|
19
|
+
type: integer
|
|
20
|
+
required: true
|
|
21
|
+
- in: path
|
|
22
|
+
name: refresh
|
|
23
|
+
schema:
|
|
24
|
+
type: string
|
|
25
|
+
required: false
|
|
26
|
+
- name: body
|
|
27
|
+
in: "body"
|
|
28
|
+
description: "Creates a new document in the persistent data storage, or replaces its content if it already exists."
|
|
29
|
+
required: true
|
|
30
|
+
schema:
|
|
31
|
+
$ref: "#/components/schemas/DocumentCreateOrReplaceRequest"
|
|
32
|
+
responses:
|
|
33
|
+
200:
|
|
34
|
+
description: "Creates a new document in the persistent data storage, or replaces its content if it already exists."
|
|
35
|
+
schema:
|
|
36
|
+
$ref: "#/components/schemas/DocumentCreateOrReplaceResponse"
|
|
37
|
+
|
|
38
|
+
components:
|
|
39
|
+
schemas:
|
|
40
|
+
DocumentCreateOrReplaceRequest:
|
|
41
|
+
allOf:
|
|
42
|
+
- type: "object"
|
|
43
|
+
description: "document content"
|
|
44
|
+
DocumentCreateOrReplaceResponse:
|
|
45
|
+
allOf:
|
|
46
|
+
- $ref: "#/components/ResponsePayload"
|
|
47
|
+
- type: "object"
|
|
48
|
+
properties:
|
|
49
|
+
result:
|
|
50
|
+
type: "object"
|
|
51
|
+
properties:
|
|
52
|
+
_id:
|
|
53
|
+
type: "string"
|
|
54
|
+
description: "documentId"
|
|
55
|
+
_version:
|
|
56
|
+
type: "integer"
|
|
57
|
+
_sources:
|
|
58
|
+
type: "object"
|
|
59
|
+
description: "document content"
|
|
60
|
+
created:
|
|
61
|
+
type: "boolean"
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
DocumentDelete:
|
|
2
|
+
summary: "Deletes a document."
|
|
3
|
+
tags:
|
|
4
|
+
- document
|
|
5
|
+
parameters:
|
|
6
|
+
- in: path
|
|
7
|
+
name: index
|
|
8
|
+
schema:
|
|
9
|
+
type: string
|
|
10
|
+
required: true
|
|
11
|
+
- in: path
|
|
12
|
+
name: collection
|
|
13
|
+
schema:
|
|
14
|
+
type: string
|
|
15
|
+
required: true
|
|
16
|
+
- in: path
|
|
17
|
+
name: documentId
|
|
18
|
+
schema:
|
|
19
|
+
type: string
|
|
20
|
+
required: true
|
|
21
|
+
- in: path
|
|
22
|
+
name: refresh
|
|
23
|
+
schema:
|
|
24
|
+
type: string
|
|
25
|
+
description: " if set to wait_for, Kuzzle will not respond until the deletion has been indexed"
|
|
26
|
+
required: false
|
|
27
|
+
- in: path
|
|
28
|
+
name: source
|
|
29
|
+
schema:
|
|
30
|
+
type: boolean
|
|
31
|
+
description: "if set to true Kuzzle will return the deleted document body in the response."
|
|
32
|
+
required: false
|
|
33
|
+
- in: path
|
|
34
|
+
name: silent
|
|
35
|
+
schema:
|
|
36
|
+
type: boolean
|
|
37
|
+
description: "if set, then Kuzzle will not generate notifications. Available since 2.9.2"
|
|
38
|
+
required: false
|
|
39
|
+
responses:
|
|
40
|
+
200:
|
|
41
|
+
description: "Deletes a document."
|
|
42
|
+
schema:
|
|
43
|
+
$ref: "#/components/schemas/DocumentDeleteResponse"
|
|
44
|
+
|
|
45
|
+
components:
|
|
46
|
+
schemas:
|
|
47
|
+
DocumentDeleteRequest:
|
|
48
|
+
allOf:
|
|
49
|
+
- type: "object"
|
|
50
|
+
properties:
|
|
51
|
+
_id:
|
|
52
|
+
type: "string"
|
|
53
|
+
description: "documentId"
|
|
54
|
+
refresh:
|
|
55
|
+
type: "string"
|
|
56
|
+
description: " if set to wait_for, Kuzzle will not respond until the created/replaced document is indexed"
|
|
57
|
+
DocumentDeleteResponse:
|
|
58
|
+
allOf:
|
|
59
|
+
- $ref: "#/components/ResponsePayload"
|
|
60
|
+
- type: "object"
|
|
61
|
+
properties:
|
|
62
|
+
result:
|
|
63
|
+
type: "object"
|
|
64
|
+
properties:
|
|
65
|
+
_id:
|
|
66
|
+
type: "string"
|
|
67
|
+
description: "documentId"
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
DocumentDeleteByQuery:
|
|
2
|
+
summary: "Deletes documents matching the provided search query."
|
|
3
|
+
tags:
|
|
4
|
+
- document
|
|
5
|
+
parameters:
|
|
6
|
+
- in: path
|
|
7
|
+
name: index
|
|
8
|
+
schema:
|
|
9
|
+
type: string
|
|
10
|
+
required: true
|
|
11
|
+
- in: path
|
|
12
|
+
name: collection
|
|
13
|
+
schema:
|
|
14
|
+
type: string
|
|
15
|
+
required: true
|
|
16
|
+
- in: path
|
|
17
|
+
name: documentId
|
|
18
|
+
schema:
|
|
19
|
+
type: string
|
|
20
|
+
required: true
|
|
21
|
+
- in: path
|
|
22
|
+
name: refresh
|
|
23
|
+
schema:
|
|
24
|
+
type: string
|
|
25
|
+
description: " if set to wait_for, Kuzzle will not respond until the deletion has been indexed"
|
|
26
|
+
required: false
|
|
27
|
+
- in: path
|
|
28
|
+
name: source
|
|
29
|
+
schema:
|
|
30
|
+
type: boolean
|
|
31
|
+
description: "if set to true Kuzzle will return the deleted document body in the response."
|
|
32
|
+
required: false
|
|
33
|
+
- in: path
|
|
34
|
+
name: silent
|
|
35
|
+
schema:
|
|
36
|
+
type: boolean
|
|
37
|
+
description: "if set, then Kuzzle will not generate notifications. Available since 2.9.2"
|
|
38
|
+
required: false
|
|
39
|
+
- in: path
|
|
40
|
+
name: lang
|
|
41
|
+
schema:
|
|
42
|
+
type: string
|
|
43
|
+
description: "specify the query language to use. By default, it's elasticsearch but koncorde can also be used."
|
|
44
|
+
required: false
|
|
45
|
+
- name: body
|
|
46
|
+
in: "body"
|
|
47
|
+
description: "Deletes documents matching the provided search query."
|
|
48
|
+
required: true
|
|
49
|
+
schema:
|
|
50
|
+
$ref: "#/components/schemas/DocumentDeleteByQueryRequest"
|
|
51
|
+
responses:
|
|
52
|
+
200:
|
|
53
|
+
description: "Deletes documents matching the provided search query."
|
|
54
|
+
schema:
|
|
55
|
+
$ref: "#/components/schemas/DocumentDeleteByQueryResponse"
|
|
56
|
+
|
|
57
|
+
components:
|
|
58
|
+
schemas:
|
|
59
|
+
DocumentDeleteByQueryRequest:
|
|
60
|
+
allOf:
|
|
61
|
+
- type: "object"
|
|
62
|
+
properties:
|
|
63
|
+
body:
|
|
64
|
+
type: "object"
|
|
65
|
+
properties:
|
|
66
|
+
query:
|
|
67
|
+
type: "object"
|
|
68
|
+
description: "documents matching this search query will be deleted. Uses the ElasticSearch Query DSL syntax."
|
|
69
|
+
DocumentDeleteByQueryResponse:
|
|
70
|
+
allOf:
|
|
71
|
+
- $ref: "#/components/ResponsePayload"
|
|
72
|
+
- type: "object"
|
|
73
|
+
properties:
|
|
74
|
+
result:
|
|
75
|
+
type: "object"
|
|
76
|
+
properties:
|
|
77
|
+
documents:
|
|
78
|
+
type: array
|
|
79
|
+
items:
|
|
80
|
+
type: object
|
|
81
|
+
properties:
|
|
82
|
+
_id:
|
|
83
|
+
type: string
|
|
84
|
+
_source:
|
|
85
|
+
type: object
|
|
86
|
+
description: Document content, Present only if 'source' parameter is set to true.
|
|
87
|
+
ids:
|
|
88
|
+
type: "array"
|
|
89
|
+
items:
|
|
90
|
+
type: "string"
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
DocumentExists:
|
|
2
|
+
summary: "Checks if a document exists."
|
|
3
|
+
tags:
|
|
4
|
+
- document
|
|
5
|
+
parameters:
|
|
6
|
+
- in: path
|
|
7
|
+
name: index
|
|
8
|
+
schema:
|
|
9
|
+
type: string
|
|
10
|
+
required: true
|
|
11
|
+
- in: path
|
|
12
|
+
name: collection
|
|
13
|
+
schema:
|
|
14
|
+
type: string
|
|
15
|
+
required: true
|
|
16
|
+
- in: path
|
|
17
|
+
name: _id
|
|
18
|
+
schema:
|
|
19
|
+
type: integer
|
|
20
|
+
required: true
|
|
21
|
+
responses:
|
|
22
|
+
200:
|
|
23
|
+
description: "Checks if a document exists."
|
|
24
|
+
schema:
|
|
25
|
+
$ref: "#/components/schemas/DocumentExistsResponse"
|
|
26
|
+
|
|
27
|
+
components:
|
|
28
|
+
schemas:
|
|
29
|
+
DocumentExistsResponse:
|
|
30
|
+
allOf:
|
|
31
|
+
- $ref: "#/components/ResponsePayload"
|
|
32
|
+
- type: "object"
|
|
33
|
+
properties:
|
|
34
|
+
result:
|
|
35
|
+
type: "boolean"
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
DocumentGet:
|
|
2
|
+
summary: "Gets a document."
|
|
3
|
+
tags:
|
|
4
|
+
- document
|
|
5
|
+
parameters:
|
|
6
|
+
- in: path
|
|
7
|
+
name: index
|
|
8
|
+
schema:
|
|
9
|
+
type: string
|
|
10
|
+
required: true
|
|
11
|
+
- in: path
|
|
12
|
+
name: collection
|
|
13
|
+
schema:
|
|
14
|
+
type: string
|
|
15
|
+
required: true
|
|
16
|
+
- in: path
|
|
17
|
+
name: documentId
|
|
18
|
+
schema:
|
|
19
|
+
type: string
|
|
20
|
+
required: true
|
|
21
|
+
responses:
|
|
22
|
+
200:
|
|
23
|
+
description: "Gets a document."
|
|
24
|
+
schema:
|
|
25
|
+
$ref: "#/components/schemas/DocumentGetResponse"
|
|
26
|
+
|
|
27
|
+
components:
|
|
28
|
+
schemas:
|
|
29
|
+
DocumentGetResponse:
|
|
30
|
+
allOf:
|
|
31
|
+
- $ref: "#/components/ResponsePayload"
|
|
32
|
+
- type: "object"
|
|
33
|
+
properties:
|
|
34
|
+
result:
|
|
35
|
+
type: "object"
|
|
36
|
+
properties:
|
|
37
|
+
_id:
|
|
38
|
+
type: "string"
|
|
39
|
+
description: "documentId"
|
|
40
|
+
_version:
|
|
41
|
+
type: "integer"
|
|
42
|
+
_sources:
|
|
43
|
+
type: "object"
|
|
44
|
+
description: "document content"
|
|
45
|
+
properties:
|
|
46
|
+
name:
|
|
47
|
+
type: "object"
|
|
48
|
+
properties:
|
|
49
|
+
first:
|
|
50
|
+
type: "string"
|
|
51
|
+
last:
|
|
52
|
+
type: "string"
|
|
53
|
+
_kuzzle_info:
|
|
54
|
+
type: "object"
|
|
55
|
+
description: "Information about the Kuzzle documents"
|
|
56
|
+
properties:
|
|
57
|
+
author:
|
|
58
|
+
type: string
|
|
59
|
+
createdAt:
|
|
60
|
+
type: integer
|
|
61
|
+
updatedAt:
|
|
62
|
+
type:
|
|
63
|
+
- integer
|
|
64
|
+
- null
|
|
65
|
+
updater:
|
|
66
|
+
type:
|
|
67
|
+
- integer
|
|
68
|
+
- null
|
|
File without changes
|
|
@@ -1,57 +1,57 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.DefinitionsDocument = exports.OpenApiDocumentDeleteByQueryComponent = exports.OpenApiDocumentDeleteByQuery = exports.OpenApiDocumentDeleteComponent = exports.OpenApiDocumentDelete = exports.OpenApiDocumentScrollComponent = exports.OpenApiDocumentScroll = exports.OpenApiDocumentUpdateComponent = exports.OpenApiDocumentUpdate = exports.OpenApiDocumentExistsComponent = exports.OpenApiDocumentExists = exports.OpenApiDocumentReplaceComponent = exports.OpenApiDocumentReplace = exports.OpenApiDocumentGetComponent = exports.OpenApiDocumentGet = exports.OpenApiDocumentCreateOrReplaceComponent = exports.OpenApiDocumentCreateOrReplace = exports.OpenApiDocumentCreateComponent = exports.OpenApiDocumentCreate = exports.OpenApiDocumentCountComponent = exports.OpenApiDocumentCount = void 0;
|
|
4
|
-
const
|
|
4
|
+
const readYamlFile_1 = require("../../../util/readYamlFile");
|
|
5
5
|
// reading the description of the Count action in the controller document.
|
|
6
6
|
// The yaml objects are then stored in the variables below
|
|
7
|
-
const countObject = (0,
|
|
7
|
+
const countObject = (0, readYamlFile_1.readYamlFile)('./lib/api/openapi/document/count.yaml');
|
|
8
8
|
exports.OpenApiDocumentCount = countObject.DocumentCount;
|
|
9
9
|
exports.OpenApiDocumentCountComponent = countObject.components.schemas;
|
|
10
10
|
// reading the description of the Create action in the controller document.
|
|
11
11
|
// The yaml objects are then stored in the variables below
|
|
12
|
-
const createObject = (0,
|
|
12
|
+
const createObject = (0, readYamlFile_1.readYamlFile)('./lib/api/openapi/document/create.yaml');
|
|
13
13
|
exports.OpenApiDocumentCreate = createObject.DocumentCreate;
|
|
14
14
|
exports.OpenApiDocumentCreateComponent = createObject.components.schemas;
|
|
15
15
|
// reading the description of the CreateOrReplace action in the controller document.
|
|
16
16
|
// The yaml objects are then stored in the variables below
|
|
17
|
-
const createOrReplaceObject = (0,
|
|
17
|
+
const createOrReplaceObject = (0, readYamlFile_1.readYamlFile)('./lib/api/openapi/document/createOrReplace.yaml');
|
|
18
18
|
exports.OpenApiDocumentCreateOrReplace = createOrReplaceObject.DocumentCreateOrReplace;
|
|
19
19
|
exports.OpenApiDocumentCreateOrReplaceComponent = createOrReplaceObject.components.schemas;
|
|
20
20
|
// reading the description of the Get action in the controller document.
|
|
21
21
|
// The yaml objects are then stored in the variables below
|
|
22
|
-
const getObject = (0,
|
|
22
|
+
const getObject = (0, readYamlFile_1.readYamlFile)('./lib/api/openapi/document/get.yaml');
|
|
23
23
|
exports.OpenApiDocumentGet = getObject.DocumentGet;
|
|
24
24
|
exports.OpenApiDocumentGetComponent = getObject.components.schemas;
|
|
25
25
|
// reading the description of the Replace action in the controller document.
|
|
26
26
|
// The yaml objects are then stored in the variables below
|
|
27
|
-
const replaceObject = (0,
|
|
27
|
+
const replaceObject = (0, readYamlFile_1.readYamlFile)('./lib/api/openapi/document/replace.yaml');
|
|
28
28
|
exports.OpenApiDocumentReplace = replaceObject.DocumentReplace;
|
|
29
29
|
exports.OpenApiDocumentReplaceComponent = replaceObject.components.schemas;
|
|
30
30
|
// reading the description of the Exists action in the controller document.
|
|
31
31
|
// The yaml objects are then stored in the variables below
|
|
32
|
-
const existsObject = (0,
|
|
32
|
+
const existsObject = (0, readYamlFile_1.readYamlFile)('./lib/api/openapi/document/exists.yaml');
|
|
33
33
|
exports.OpenApiDocumentExists = existsObject.DocumentExists;
|
|
34
34
|
exports.OpenApiDocumentExistsComponent = existsObject.components.schemas;
|
|
35
35
|
// reading the description of the Update action in the controller document.
|
|
36
36
|
// The yaml objects are then stored in the variables below
|
|
37
|
-
const updateObject = (0,
|
|
37
|
+
const updateObject = (0, readYamlFile_1.readYamlFile)('./lib/api/openapi/document/update.yaml');
|
|
38
38
|
exports.OpenApiDocumentUpdate = updateObject.DocumentUpdate;
|
|
39
39
|
exports.OpenApiDocumentUpdateComponent = updateObject.components.schemas;
|
|
40
40
|
// reading the description of the Scroll action in the controller document.
|
|
41
41
|
// The yaml objects are then stored in the variables below
|
|
42
|
-
const scrollObject = (0,
|
|
42
|
+
const scrollObject = (0, readYamlFile_1.readYamlFile)('./lib/api/openapi/document/scroll.yaml');
|
|
43
43
|
exports.OpenApiDocumentScroll = scrollObject.DocumentScroll;
|
|
44
44
|
exports.OpenApiDocumentScrollComponent = scrollObject.components.schemas;
|
|
45
45
|
// reading the description of the Delete action in the controller document.
|
|
46
46
|
// The yaml objects are then stored in the variables below
|
|
47
|
-
const deleteObject = (0,
|
|
47
|
+
const deleteObject = (0, readYamlFile_1.readYamlFile)('./lib/api/openapi/document/delete.yaml');
|
|
48
48
|
exports.OpenApiDocumentDelete = deleteObject.DocumentDelete;
|
|
49
49
|
exports.OpenApiDocumentDeleteComponent = deleteObject.components.schemas;
|
|
50
50
|
// reading the description of the DeleteByQuery action in the controller document.
|
|
51
51
|
// The yaml objects are then stored in the variables below
|
|
52
|
-
const deleteByQueryObject = (0,
|
|
52
|
+
const deleteByQueryObject = (0, readYamlFile_1.readYamlFile)('./lib/api/openapi/document/deleteByQuery.yaml');
|
|
53
53
|
exports.OpenApiDocumentDeleteByQuery = deleteByQueryObject.DocumentDeleteByQuery;
|
|
54
54
|
exports.OpenApiDocumentDeleteByQueryComponent = deleteByQueryObject.components.schemas;
|
|
55
55
|
// Document definitions (reusable object for KuzzleRequest and KuzzleResponse)
|
|
56
|
-
exports.DefinitionsDocument = (0,
|
|
57
|
-
//# sourceMappingURL=
|
|
56
|
+
exports.DefinitionsDocument = (0, readYamlFile_1.readYamlFile)('./lib/api/openapi/payloads.yaml').definitions;
|
|
57
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
DocumentReplace:
|
|
2
|
+
summary: "Replaces the content of an existing document."
|
|
3
|
+
tags:
|
|
4
|
+
- document
|
|
5
|
+
parameters:
|
|
6
|
+
- in: path
|
|
7
|
+
name: index
|
|
8
|
+
schema:
|
|
9
|
+
type: string
|
|
10
|
+
required: true
|
|
11
|
+
- in: path
|
|
12
|
+
name: collection
|
|
13
|
+
schema:
|
|
14
|
+
type: string
|
|
15
|
+
required: true
|
|
16
|
+
- in: path
|
|
17
|
+
name: documentId
|
|
18
|
+
schema:
|
|
19
|
+
type: string
|
|
20
|
+
required: true
|
|
21
|
+
- in: path
|
|
22
|
+
name: refresh
|
|
23
|
+
schema:
|
|
24
|
+
type: string
|
|
25
|
+
description: " if set to wait_for, Kuzzle will not respond until the deletion has been indexed"
|
|
26
|
+
required: false
|
|
27
|
+
- in: path
|
|
28
|
+
name: silent
|
|
29
|
+
schema:
|
|
30
|
+
type: boolean
|
|
31
|
+
description: "if set, then Kuzzle will not generate notifications. Available since 2.9.2"
|
|
32
|
+
required: false
|
|
33
|
+
- name: body
|
|
34
|
+
in: "body"
|
|
35
|
+
description: "Replaces the content of an existing document."
|
|
36
|
+
required: true
|
|
37
|
+
schema:
|
|
38
|
+
$ref: "#/components/schemas/DocumentReplaceRequest"
|
|
39
|
+
responses:
|
|
40
|
+
200:
|
|
41
|
+
description: "Replaces the content of an existing document."
|
|
42
|
+
schema:
|
|
43
|
+
$ref: "#/components/schemas/DocumentReplaceResponse"
|
|
44
|
+
|
|
45
|
+
components:
|
|
46
|
+
schemas:
|
|
47
|
+
DocumentReplaceRequest:
|
|
48
|
+
allOf:
|
|
49
|
+
- type: "object"
|
|
50
|
+
description: "new document content"
|
|
51
|
+
DocumentReplaceResponse:
|
|
52
|
+
allOf:
|
|
53
|
+
- $ref: "#/components/ResponsePayload"
|
|
54
|
+
- type: "object"
|
|
55
|
+
properties:
|
|
56
|
+
result:
|
|
57
|
+
type: "object"
|
|
58
|
+
properties:
|
|
59
|
+
_id:
|
|
60
|
+
type: "string"
|
|
61
|
+
description: "documentId"
|
|
62
|
+
_version:
|
|
63
|
+
type: "integer"
|
|
64
|
+
_sources:
|
|
65
|
+
type: "object"
|
|
66
|
+
description: "new document content"
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
DocumentScroll:
|
|
2
|
+
summary: "Moves a search cursor forward."
|
|
3
|
+
tags:
|
|
4
|
+
- document
|
|
5
|
+
parameters:
|
|
6
|
+
- in: path
|
|
7
|
+
name: "scrollId"
|
|
8
|
+
schema:
|
|
9
|
+
type: integer
|
|
10
|
+
description: "cursor unique identifier, obtained by either a search or a scroll query"
|
|
11
|
+
required: true
|
|
12
|
+
- in: path
|
|
13
|
+
name: "scroll"
|
|
14
|
+
schema:
|
|
15
|
+
type: integer
|
|
16
|
+
description: "refresh the cursor duration, using the time to live syntax."
|
|
17
|
+
required: false
|
|
18
|
+
responses:
|
|
19
|
+
200:
|
|
20
|
+
description: "Moves a search cursor forward."
|
|
21
|
+
schema:
|
|
22
|
+
$ref: "#/components/schemas/DocumentScrollResponse"
|
|
23
|
+
|
|
24
|
+
components:
|
|
25
|
+
schemas:
|
|
26
|
+
DocumentScrollResponse:
|
|
27
|
+
allOf:
|
|
28
|
+
- $ref: "#/components/ResponsePayload"
|
|
29
|
+
- type: "object"
|
|
30
|
+
properties:
|
|
31
|
+
result:
|
|
32
|
+
type: "object"
|
|
33
|
+
properties:
|
|
34
|
+
scrollId:
|
|
35
|
+
type: "string"
|
|
36
|
+
total:
|
|
37
|
+
type: "integer"
|
|
38
|
+
hits:
|
|
39
|
+
type: "array"
|
|
40
|
+
items:
|
|
41
|
+
type: "object"
|
|
42
|
+
properties:
|
|
43
|
+
_id:
|
|
44
|
+
type: "string"
|
|
45
|
+
_score:
|
|
46
|
+
type: "integer"
|
|
47
|
+
_source:
|
|
48
|
+
type: "object"
|
|
49
|
+
description: "document content"
|