@dotcms/client 0.0.1-alpha.16 → 0.0.1-alpha.18
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 +111 -0
- package/package.json +1 -1
- package/src/lib/client/content/content-api.d.ts +21 -0
- package/src/lib/client/content/content-api.js +24 -0
- package/src/lib/client/content/content-api.js.map +1 -0
- package/src/lib/client/content/methods/get-collection/get-collection.d.ts +119 -0
- package/src/lib/client/content/methods/get-collection/get-collection.js +229 -0
- package/src/lib/client/content/methods/get-collection/get-collection.js.map +1 -0
- package/src/lib/client/content/shared/const.d.ts +3 -0
- package/src/lib/client/content/shared/const.js +5 -0
- package/src/lib/client/content/shared/const.js.map +1 -0
- package/src/lib/client/content/shared/types.d.ts +47 -0
- package/src/lib/client/content/shared/types.js +2 -0
- package/src/lib/client/content/shared/types.js.map +1 -0
- package/src/lib/client/content/shared/utils.d.ts +12 -0
- package/src/lib/client/content/shared/utils.js +20 -0
- package/src/lib/client/content/shared/utils.js.map +1 -0
- package/src/lib/client/sdk-js-client.d.ts +5 -2
- package/src/lib/client/sdk-js-client.js +2 -0
- package/src/lib/client/sdk-js-client.js.map +1 -1
- package/src/lib/query-builder/{utils/lucene-syntax → lucene-syntax}/Equals.js +1 -1
- package/src/lib/query-builder/lucene-syntax/Equals.js.map +1 -0
- package/src/lib/query-builder/{utils/lucene-syntax → lucene-syntax}/Field.js +1 -1
- package/src/lib/query-builder/lucene-syntax/Field.js.map +1 -0
- package/src/lib/query-builder/{utils/lucene-syntax → lucene-syntax}/NotOperand.js +1 -1
- package/src/lib/query-builder/lucene-syntax/NotOperand.js.map +1 -0
- package/src/lib/query-builder/{utils/lucene-syntax → lucene-syntax}/Operand.js +1 -1
- package/src/lib/query-builder/lucene-syntax/Operand.js.map +1 -0
- package/src/lib/query-builder/lucene-syntax/index.d.ts +4 -0
- package/src/lib/query-builder/lucene-syntax/index.js +5 -0
- package/src/lib/query-builder/lucene-syntax/index.js.map +1 -0
- package/src/lib/query-builder/sdk-query-builder.d.ts +1 -2
- package/src/lib/query-builder/sdk-query-builder.js.map +1 -1
- package/src/lib/query-builder/utils/index.d.ts +4 -4
- package/src/lib/query-builder/utils/index.js +4 -4
- package/src/lib/query-builder/utils/index.js.map +1 -1
- package/src/lib/query-builder/utils/lucene-syntax/Equals.js.map +0 -1
- package/src/lib/query-builder/utils/lucene-syntax/Field.js.map +0 -1
- package/src/lib/query-builder/utils/lucene-syntax/NotOperand.js.map +0 -1
- package/src/lib/query-builder/utils/lucene-syntax/Operand.js.map +0 -1
- /package/src/lib/query-builder/{utils/lucene-syntax → lucene-syntax}/Equals.d.ts +0 -0
- /package/src/lib/query-builder/{utils/lucene-syntax → lucene-syntax}/Field.d.ts +0 -0
- /package/src/lib/query-builder/{utils/lucene-syntax → lucene-syntax}/NotOperand.d.ts +0 -0
- /package/src/lib/query-builder/{utils/lucene-syntax → lucene-syntax}/Operand.d.ts +0 -0
package/README.md
ADDED
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
# @dotcms/client
|
|
2
|
+
|
|
3
|
+
`@dotcms/client` is the official dotCMS JavaScript library designed to simplify interactions with the DotCMS REST APIs.
|
|
4
|
+
|
|
5
|
+
This client library provides a streamlined, promise-based interface to fetch pages and navigation API.
|
|
6
|
+
|
|
7
|
+
## Features
|
|
8
|
+
|
|
9
|
+
- Easy-to-use methods to interact with the [DotCMS Page](https://www.dotcms.com/docs/latest/page-rest-api-layout-as-a-service-laas) and [Navigation APIs](https://www.dotcms.com/docs/latest/navigation-rest-api).
|
|
10
|
+
- Support for custom actions to communicate with the DotCMS page editor.
|
|
11
|
+
- Comprehensive TypeScript typings for better development experience.
|
|
12
|
+
|
|
13
|
+
## Installation
|
|
14
|
+
|
|
15
|
+
Install the package via npm:
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
npm install @dotcms/client
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
Or using Yarn:
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
yarn add @dotcms/client
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
## Usage
|
|
28
|
+
|
|
29
|
+
First, initialize the client with your DotCMS instance details.
|
|
30
|
+
|
|
31
|
+
```javascript
|
|
32
|
+
import { dotcmsClient } from '@dotcms/client';
|
|
33
|
+
|
|
34
|
+
const client = dotcmsClient.init({
|
|
35
|
+
dotcmsUrl: 'https://your-dotcms-instance.com',
|
|
36
|
+
authToken: 'your-auth-token',
|
|
37
|
+
siteId: 'your-site-id'
|
|
38
|
+
});
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
### Fetching a Page
|
|
42
|
+
|
|
43
|
+
Retrieve the elements of any page in your DotCMS system in JSON format.
|
|
44
|
+
|
|
45
|
+
```javascript
|
|
46
|
+
const pageData = await client.page.get({
|
|
47
|
+
path: '/your-page-path',
|
|
48
|
+
language_id: 1,
|
|
49
|
+
personaId: 'optional-persona-id'
|
|
50
|
+
});
|
|
51
|
+
|
|
52
|
+
console.log(pageData);
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
### Fetching Navigation
|
|
56
|
+
|
|
57
|
+
Retrieve information about the DotCMS file and folder tree.
|
|
58
|
+
|
|
59
|
+
```javascript
|
|
60
|
+
const navData = await client.nav.get({
|
|
61
|
+
path: '/',
|
|
62
|
+
depth: 2,
|
|
63
|
+
languageId: 1
|
|
64
|
+
});
|
|
65
|
+
|
|
66
|
+
console.log(navData);
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
## API Reference
|
|
70
|
+
|
|
71
|
+
Detailed documentation of the `@dotcms/client` methods, parameters, and types can be found below:
|
|
72
|
+
|
|
73
|
+
### `dotcmsClient.init(config: ClientConfig): DotCmsClient`
|
|
74
|
+
|
|
75
|
+
Initializes the DotCMS client with the specified configuration.
|
|
76
|
+
|
|
77
|
+
### `DotCmsClient.page.get(options: PageApiOptions): Promise<unknown>`
|
|
78
|
+
|
|
79
|
+
Retrieves the specified page's elements from your DotCMS system in JSON format.
|
|
80
|
+
|
|
81
|
+
### `DotCmsClient.nav.get(options: NavApiOptions): Promise<unknown>`
|
|
82
|
+
|
|
83
|
+
Retrieves information about the DotCMS file and folder tree.
|
|
84
|
+
|
|
85
|
+
## Contributing
|
|
86
|
+
|
|
87
|
+
GitHub pull requests are the preferred method to contribute code to dotCMS. Before any pull requests can be accepted, an automated tool will ask you to agree to the [dotCMS Contributor's Agreement](https://gist.github.com/wezell/85ef45298c48494b90d92755b583acb3).
|
|
88
|
+
|
|
89
|
+
## Licensing
|
|
90
|
+
|
|
91
|
+
dotCMS comes in multiple editions and as such is dual licensed. The dotCMS Community Edition is licensed under the GPL 3.0 and is freely available for download, customization and deployment for use within organizations of all stripes. dotCMS Enterprise Editions (EE) adds a number of enterprise features and is available via a supported, indemnified commercial license from dotCMS. For the differences between the editions, see [the feature page](http://dotcms.com/cms-platform/features).
|
|
92
|
+
|
|
93
|
+
## Support
|
|
94
|
+
|
|
95
|
+
If you need help or have any questions, please [open an issue](https://github.com/dotCMS/core/issues/new/choose) in the GitHub repository.
|
|
96
|
+
|
|
97
|
+
## Documentation
|
|
98
|
+
|
|
99
|
+
Always refer to the official [DotCMS documentation](https://www.dotcms.com/docs/latest/) for comprehensive guides and API references.
|
|
100
|
+
|
|
101
|
+
## Getting Help
|
|
102
|
+
|
|
103
|
+
| Source | Location |
|
|
104
|
+
| --------------- | ------------------------------------------------------------------- |
|
|
105
|
+
| Installation | [Installation](https://dotcms.com/docs/latest/installation) |
|
|
106
|
+
| Documentation | [Documentation](https://dotcms.com/docs/latest/table-of-contents) |
|
|
107
|
+
| Videos | [Helpful Videos](http://dotcms.com/videos/) |
|
|
108
|
+
| Code Examples | [Codeshare](https://dotcms.com/codeshare/) |
|
|
109
|
+
| Forums/Listserv | [via Google Groups](https://groups.google.com/forum/#!forum/dotCMS) |
|
|
110
|
+
| Twitter | @dotCMS |
|
|
111
|
+
| Main Site | [dotCMS.com](https://dotcms.com/) |
|
package/package.json
CHANGED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { GetCollection } from './methods/get-collection/get-collection';
|
|
2
|
+
import { ClientOptions } from '../sdk-js-client';
|
|
3
|
+
/**
|
|
4
|
+
* Content classs exposes the content api methods
|
|
5
|
+
*
|
|
6
|
+
* @export
|
|
7
|
+
* @class Content
|
|
8
|
+
*/
|
|
9
|
+
export declare class Content {
|
|
10
|
+
private requestOptions;
|
|
11
|
+
private serverUrl;
|
|
12
|
+
constructor(requestOptions: ClientOptions, serverUrl: string);
|
|
13
|
+
/**
|
|
14
|
+
* Allows you to build a query to get a collection of an specified content type
|
|
15
|
+
*
|
|
16
|
+
* @param {string} contentType
|
|
17
|
+
* @return {*}
|
|
18
|
+
* @memberof Content
|
|
19
|
+
*/
|
|
20
|
+
getCollection(contentType: string): GetCollection;
|
|
21
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { GetCollection } from './methods/get-collection/get-collection';
|
|
2
|
+
/**
|
|
3
|
+
* Content classs exposes the content api methods
|
|
4
|
+
*
|
|
5
|
+
* @export
|
|
6
|
+
* @class Content
|
|
7
|
+
*/
|
|
8
|
+
export class Content {
|
|
9
|
+
constructor(requestOptions, serverUrl) {
|
|
10
|
+
this.requestOptions = requestOptions;
|
|
11
|
+
this.serverUrl = serverUrl;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Allows you to build a query to get a collection of an specified content type
|
|
15
|
+
*
|
|
16
|
+
* @param {string} contentType
|
|
17
|
+
* @return {*}
|
|
18
|
+
* @memberof Content
|
|
19
|
+
*/
|
|
20
|
+
getCollection(contentType) {
|
|
21
|
+
return new GetCollection(this.requestOptions, this.serverUrl, contentType);
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
//# sourceMappingURL=content-api.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"content-api.js","sourceRoot":"","sources":["../../../../../../../../libs/sdk/client/src/lib/client/content/content-api.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,yCAAyC,CAAC;AAIxE;;;;;GAKG;AACH,MAAM,OAAO,OAAO;IAIhB,YAAY,cAA6B,EAAE,SAAiB;QACxD,IAAI,CAAC,cAAc,GAAG,cAAc,CAAC;QACrC,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;IAC/B,CAAC;IAED;;;;;;OAMG;IACH,aAAa,CAAC,WAAmB;QAC7B,OAAO,IAAI,aAAa,CAAC,IAAI,CAAC,cAAc,EAAE,IAAI,CAAC,SAAS,EAAE,WAAW,CAAC,CAAC;IAC/E,CAAC;CACJ"}
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
import { ClientOptions } from '../../../sdk-js-client';
|
|
2
|
+
import { GetCollectionResponse, QueryBuilderCallback, SortBy } from '../../shared/types';
|
|
3
|
+
/**
|
|
4
|
+
* 'GetCollection' Is a Typescript class that provides the ability build a query to get a collection of content.
|
|
5
|
+
*
|
|
6
|
+
* @export
|
|
7
|
+
* @class GetCollection
|
|
8
|
+
*/
|
|
9
|
+
export declare class GetCollection {
|
|
10
|
+
#private;
|
|
11
|
+
constructor(requestOptions: ClientOptions, serverUrl: string, contentType: string);
|
|
12
|
+
/**
|
|
13
|
+
* This method returns the sort query in this format: field order, field order, ...
|
|
14
|
+
*
|
|
15
|
+
* @readonly
|
|
16
|
+
* @private
|
|
17
|
+
* @memberof GetCollection
|
|
18
|
+
*/
|
|
19
|
+
private get sort();
|
|
20
|
+
private get offset();
|
|
21
|
+
private get url();
|
|
22
|
+
/**
|
|
23
|
+
* This method returns the current query built
|
|
24
|
+
*
|
|
25
|
+
* @readonly
|
|
26
|
+
* @private
|
|
27
|
+
* @memberof GetCollection
|
|
28
|
+
*/
|
|
29
|
+
private get currentQuery();
|
|
30
|
+
/**
|
|
31
|
+
* This method allows to filter the content by language.
|
|
32
|
+
*
|
|
33
|
+
* @param {number} language
|
|
34
|
+
* @return {*} {this}
|
|
35
|
+
* @memberof GetCollection
|
|
36
|
+
*/
|
|
37
|
+
language(language: number): this;
|
|
38
|
+
/**
|
|
39
|
+
* This method allows you to fetch the render version of the content
|
|
40
|
+
*
|
|
41
|
+
* @param {boolean} render
|
|
42
|
+
* @return {*} {this}
|
|
43
|
+
* @memberof GetCollection
|
|
44
|
+
*/
|
|
45
|
+
render(render: boolean): this;
|
|
46
|
+
/**
|
|
47
|
+
* This method allows you to sort the content by field
|
|
48
|
+
*
|
|
49
|
+
* @param {SortBy[]} sortBy
|
|
50
|
+
* @return {*} {this}
|
|
51
|
+
* @memberof GetCollection
|
|
52
|
+
*/
|
|
53
|
+
sortBy(sortBy: SortBy[]): this;
|
|
54
|
+
/**
|
|
55
|
+
* This method allows you to limit the number of content to fetch
|
|
56
|
+
*
|
|
57
|
+
* @param {number} limit
|
|
58
|
+
* @return {*} {this}
|
|
59
|
+
* @memberof GetCollection
|
|
60
|
+
*/
|
|
61
|
+
limit(limit: number): this;
|
|
62
|
+
/**
|
|
63
|
+
* This method allows you to set the page of the content to fetch
|
|
64
|
+
*
|
|
65
|
+
* @param {number} page
|
|
66
|
+
* @return {*} {this}
|
|
67
|
+
* @memberof GetCollection
|
|
68
|
+
*/
|
|
69
|
+
page(page: number): this;
|
|
70
|
+
/**
|
|
71
|
+
* This method allows you to set a lucene query to filter the content using the Lucene Query Builder.
|
|
72
|
+
* All fields will be formatted to: +contentTypeVar.field: value
|
|
73
|
+
*
|
|
74
|
+
* @param {QueryBuilderCallback} queryBuilderCallback
|
|
75
|
+
* @return {*} {this}
|
|
76
|
+
* @memberof GetCollection
|
|
77
|
+
*/
|
|
78
|
+
query(queryBuilderCallback: QueryBuilderCallback): this;
|
|
79
|
+
/**
|
|
80
|
+
* This method allows you to set a raw lucene query to filter the content
|
|
81
|
+
*
|
|
82
|
+
* @param {string} query
|
|
83
|
+
* @return {*} {this}
|
|
84
|
+
* @memberof GetCollection
|
|
85
|
+
*/
|
|
86
|
+
rawQuery(query: string): this;
|
|
87
|
+
/**
|
|
88
|
+
* This method allows you to fetch draft content
|
|
89
|
+
*
|
|
90
|
+
* @param {boolean} draft
|
|
91
|
+
* @return {*} {this}
|
|
92
|
+
* @memberof GetCollection
|
|
93
|
+
*/
|
|
94
|
+
draft(draft: boolean): this;
|
|
95
|
+
/**
|
|
96
|
+
* This method allows you to filter content by experiment variant
|
|
97
|
+
*
|
|
98
|
+
* @param {string} variant
|
|
99
|
+
* @return {*} {this}
|
|
100
|
+
* @memberof GetCollection
|
|
101
|
+
*/
|
|
102
|
+
variant(variant: string): this;
|
|
103
|
+
/**
|
|
104
|
+
* This method allows you to set the depth of the relationships in the content
|
|
105
|
+
*
|
|
106
|
+
* @param {number} depth
|
|
107
|
+
* @return {*} {this}
|
|
108
|
+
* @memberof GetCollection
|
|
109
|
+
*/
|
|
110
|
+
depth(depth: number): this;
|
|
111
|
+
/**
|
|
112
|
+
* This method returns the result of the fetch using the query built.
|
|
113
|
+
*
|
|
114
|
+
* @template T
|
|
115
|
+
* @return {*} {Promise<GetCollectionResponse<T>>}
|
|
116
|
+
* @memberof GetCollection
|
|
117
|
+
*/
|
|
118
|
+
fetch<T>(): Promise<GetCollectionResponse<T>>;
|
|
119
|
+
}
|
|
@@ -0,0 +1,229 @@
|
|
|
1
|
+
var _GetCollection_page, _GetCollection_limit, _GetCollection_depth, _GetCollection_render, _GetCollection_sortBy, _GetCollection_contentType, _GetCollection_defaultQuery, _GetCollection_query, _GetCollection_rawQuery, _GetCollection_serverUrl, _GetCollection_requestOptions;
|
|
2
|
+
import { __classPrivateFieldGet, __classPrivateFieldSet } from "tslib";
|
|
3
|
+
import { Equals } from '../../../../query-builder/lucene-syntax';
|
|
4
|
+
import { QueryBuilder } from '../../../../query-builder/sdk-query-builder';
|
|
5
|
+
import { CONTENT_API_URL } from '../../shared/const';
|
|
6
|
+
import { sanitizeQueryForContentType } from '../../shared/utils';
|
|
7
|
+
/**
|
|
8
|
+
* 'GetCollection' Is a Typescript class that provides the ability build a query to get a collection of content.
|
|
9
|
+
*
|
|
10
|
+
* @export
|
|
11
|
+
* @class GetCollection
|
|
12
|
+
*/
|
|
13
|
+
export class GetCollection {
|
|
14
|
+
constructor(requestOptions, serverUrl, contentType) {
|
|
15
|
+
_GetCollection_page.set(this, 1);
|
|
16
|
+
_GetCollection_limit.set(this, 10);
|
|
17
|
+
_GetCollection_depth.set(this, 0);
|
|
18
|
+
_GetCollection_render.set(this, false);
|
|
19
|
+
_GetCollection_sortBy.set(this, void 0);
|
|
20
|
+
_GetCollection_contentType.set(this, void 0);
|
|
21
|
+
_GetCollection_defaultQuery.set(this, void 0);
|
|
22
|
+
_GetCollection_query.set(this, void 0);
|
|
23
|
+
_GetCollection_rawQuery.set(this, void 0);
|
|
24
|
+
_GetCollection_serverUrl.set(this, void 0);
|
|
25
|
+
_GetCollection_requestOptions.set(this, void 0);
|
|
26
|
+
__classPrivateFieldSet(this, _GetCollection_requestOptions, requestOptions, "f");
|
|
27
|
+
__classPrivateFieldSet(this, _GetCollection_serverUrl, serverUrl, "f");
|
|
28
|
+
__classPrivateFieldSet(this, _GetCollection_contentType, contentType, "f");
|
|
29
|
+
// We need to build the default query with the contentType field
|
|
30
|
+
__classPrivateFieldSet(this, _GetCollection_defaultQuery, new QueryBuilder().field('contentType').equals(__classPrivateFieldGet(this, _GetCollection_contentType, "f")), "f");
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* This method returns the sort query in this format: field order, field order, ...
|
|
34
|
+
*
|
|
35
|
+
* @readonly
|
|
36
|
+
* @private
|
|
37
|
+
* @memberof GetCollection
|
|
38
|
+
*/
|
|
39
|
+
get sort() {
|
|
40
|
+
return __classPrivateFieldGet(this, _GetCollection_sortBy, "f")?.map((sort) => `${sort.field} ${sort.order}`).join(',');
|
|
41
|
+
}
|
|
42
|
+
get offset() {
|
|
43
|
+
// This could end in an empty response
|
|
44
|
+
return __classPrivateFieldGet(this, _GetCollection_limit, "f") * (__classPrivateFieldGet(this, _GetCollection_page, "f") - 1);
|
|
45
|
+
}
|
|
46
|
+
get url() {
|
|
47
|
+
return `${__classPrivateFieldGet(this, _GetCollection_serverUrl, "f")}${CONTENT_API_URL}`;
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* This method returns the current query built
|
|
51
|
+
*
|
|
52
|
+
* @readonly
|
|
53
|
+
* @private
|
|
54
|
+
* @memberof GetCollection
|
|
55
|
+
*/
|
|
56
|
+
get currentQuery() {
|
|
57
|
+
return __classPrivateFieldGet(this, _GetCollection_query, "f") ?? __classPrivateFieldGet(this, _GetCollection_defaultQuery, "f");
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* This method allows to filter the content by language.
|
|
61
|
+
*
|
|
62
|
+
* @param {number} language
|
|
63
|
+
* @return {*} {this}
|
|
64
|
+
* @memberof GetCollection
|
|
65
|
+
*/
|
|
66
|
+
language(language) {
|
|
67
|
+
__classPrivateFieldSet(this, _GetCollection_query, this.currentQuery.field('languageId').equals(language.toString()), "f");
|
|
68
|
+
return this;
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* This method allows you to fetch the render version of the content
|
|
72
|
+
*
|
|
73
|
+
* @param {boolean} render
|
|
74
|
+
* @return {*} {this}
|
|
75
|
+
* @memberof GetCollection
|
|
76
|
+
*/
|
|
77
|
+
render(render) {
|
|
78
|
+
__classPrivateFieldSet(this, _GetCollection_render, render, "f");
|
|
79
|
+
return this;
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* This method allows you to sort the content by field
|
|
83
|
+
*
|
|
84
|
+
* @param {SortBy[]} sortBy
|
|
85
|
+
* @return {*} {this}
|
|
86
|
+
* @memberof GetCollection
|
|
87
|
+
*/
|
|
88
|
+
sortBy(sortBy) {
|
|
89
|
+
__classPrivateFieldSet(this, _GetCollection_sortBy, sortBy, "f");
|
|
90
|
+
return this;
|
|
91
|
+
}
|
|
92
|
+
/**
|
|
93
|
+
* This method allows you to limit the number of content to fetch
|
|
94
|
+
*
|
|
95
|
+
* @param {number} limit
|
|
96
|
+
* @return {*} {this}
|
|
97
|
+
* @memberof GetCollection
|
|
98
|
+
*/
|
|
99
|
+
limit(limit) {
|
|
100
|
+
__classPrivateFieldSet(this, _GetCollection_limit, limit, "f");
|
|
101
|
+
return this;
|
|
102
|
+
}
|
|
103
|
+
/**
|
|
104
|
+
* This method allows you to set the page of the content to fetch
|
|
105
|
+
*
|
|
106
|
+
* @param {number} page
|
|
107
|
+
* @return {*} {this}
|
|
108
|
+
* @memberof GetCollection
|
|
109
|
+
*/
|
|
110
|
+
page(page) {
|
|
111
|
+
__classPrivateFieldSet(this, _GetCollection_page, page, "f");
|
|
112
|
+
return this;
|
|
113
|
+
}
|
|
114
|
+
/**
|
|
115
|
+
* This method allows you to set a lucene query to filter the content using the Lucene Query Builder.
|
|
116
|
+
* All fields will be formatted to: +contentTypeVar.field: value
|
|
117
|
+
*
|
|
118
|
+
* @param {QueryBuilderCallback} queryBuilderCallback
|
|
119
|
+
* @return {*} {this}
|
|
120
|
+
* @memberof GetCollection
|
|
121
|
+
*/
|
|
122
|
+
query(queryBuilderCallback) {
|
|
123
|
+
const queryResult = queryBuilderCallback(this.currentQuery);
|
|
124
|
+
// This can be use in Javascript so we cannot rely on the type checking
|
|
125
|
+
if (queryResult instanceof Equals) {
|
|
126
|
+
__classPrivateFieldSet(this, _GetCollection_query, queryResult, "f");
|
|
127
|
+
}
|
|
128
|
+
else {
|
|
129
|
+
throw new Error('The query builder callback should return an Equals instance');
|
|
130
|
+
}
|
|
131
|
+
return this;
|
|
132
|
+
}
|
|
133
|
+
/**
|
|
134
|
+
* This method allows you to set a raw lucene query to filter the content
|
|
135
|
+
*
|
|
136
|
+
* @param {string} query
|
|
137
|
+
* @return {*} {this}
|
|
138
|
+
* @memberof GetCollection
|
|
139
|
+
*/
|
|
140
|
+
rawQuery(query) {
|
|
141
|
+
__classPrivateFieldSet(this, _GetCollection_rawQuery, query, "f");
|
|
142
|
+
return this;
|
|
143
|
+
}
|
|
144
|
+
/**
|
|
145
|
+
* This method allows you to fetch draft content
|
|
146
|
+
*
|
|
147
|
+
* @param {boolean} draft
|
|
148
|
+
* @return {*} {this}
|
|
149
|
+
* @memberof GetCollection
|
|
150
|
+
*/
|
|
151
|
+
draft(draft) {
|
|
152
|
+
__classPrivateFieldSet(this, _GetCollection_query, this.currentQuery.field('live').equals((!draft).toString()), "f");
|
|
153
|
+
return this;
|
|
154
|
+
}
|
|
155
|
+
/**
|
|
156
|
+
* This method allows you to filter content by experiment variant
|
|
157
|
+
*
|
|
158
|
+
* @param {string} variant
|
|
159
|
+
* @return {*} {this}
|
|
160
|
+
* @memberof GetCollection
|
|
161
|
+
*/
|
|
162
|
+
variant(variant) {
|
|
163
|
+
__classPrivateFieldSet(this, _GetCollection_query, this.currentQuery.field('variant').equals(variant), "f");
|
|
164
|
+
return this;
|
|
165
|
+
}
|
|
166
|
+
/**
|
|
167
|
+
* This method allows you to set the depth of the relationships in the content
|
|
168
|
+
*
|
|
169
|
+
* @param {number} depth
|
|
170
|
+
* @return {*} {this}
|
|
171
|
+
* @memberof GetCollection
|
|
172
|
+
*/
|
|
173
|
+
depth(depth) {
|
|
174
|
+
__classPrivateFieldSet(this, _GetCollection_depth, depth, "f");
|
|
175
|
+
return this;
|
|
176
|
+
}
|
|
177
|
+
/**
|
|
178
|
+
* This method returns the result of the fetch using the query built.
|
|
179
|
+
*
|
|
180
|
+
* @template T
|
|
181
|
+
* @return {*} {Promise<GetCollectionResponse<T>>}
|
|
182
|
+
* @memberof GetCollection
|
|
183
|
+
*/
|
|
184
|
+
async fetch() {
|
|
185
|
+
const sanitizedQuery = sanitizeQueryForContentType(this.currentQuery.build(), __classPrivateFieldGet(this, _GetCollection_contentType, "f"));
|
|
186
|
+
const query = __classPrivateFieldGet(this, _GetCollection_rawQuery, "f") ? `${sanitizedQuery} ${__classPrivateFieldGet(this, _GetCollection_rawQuery, "f")}` : sanitizedQuery;
|
|
187
|
+
return fetch(this.url, {
|
|
188
|
+
...__classPrivateFieldGet(this, _GetCollection_requestOptions, "f"),
|
|
189
|
+
method: 'POST',
|
|
190
|
+
headers: {
|
|
191
|
+
...__classPrivateFieldGet(this, _GetCollection_requestOptions, "f").headers,
|
|
192
|
+
'Content-Type': 'application/json'
|
|
193
|
+
},
|
|
194
|
+
body: JSON.stringify({
|
|
195
|
+
query,
|
|
196
|
+
render: __classPrivateFieldGet(this, _GetCollection_render, "f"),
|
|
197
|
+
sort: this.sort,
|
|
198
|
+
limit: __classPrivateFieldGet(this, _GetCollection_limit, "f"),
|
|
199
|
+
offset: this.offset,
|
|
200
|
+
depth: __classPrivateFieldGet(this, _GetCollection_depth, "f")
|
|
201
|
+
//userId: This exist but we currently don't use it
|
|
202
|
+
//allCategoriesInfo: This exist but we currently don't use it
|
|
203
|
+
})
|
|
204
|
+
}).then(async (response) => {
|
|
205
|
+
if (response.ok) {
|
|
206
|
+
const data = await response.json();
|
|
207
|
+
const contentlets = data.entity.jsonObjectView.contentlets;
|
|
208
|
+
const total = data.entity.resultsSize;
|
|
209
|
+
const mappedResponse = {
|
|
210
|
+
contentlets,
|
|
211
|
+
total,
|
|
212
|
+
page: __classPrivateFieldGet(this, _GetCollection_page, "f"),
|
|
213
|
+
size: contentlets.length
|
|
214
|
+
};
|
|
215
|
+
return __classPrivateFieldGet(this, _GetCollection_sortBy, "f")
|
|
216
|
+
? {
|
|
217
|
+
...mappedResponse,
|
|
218
|
+
sortedBy: __classPrivateFieldGet(this, _GetCollection_sortBy, "f")
|
|
219
|
+
}
|
|
220
|
+
: mappedResponse;
|
|
221
|
+
}
|
|
222
|
+
else {
|
|
223
|
+
return response.json();
|
|
224
|
+
}
|
|
225
|
+
}, (error) => error);
|
|
226
|
+
}
|
|
227
|
+
}
|
|
228
|
+
_GetCollection_page = new WeakMap(), _GetCollection_limit = new WeakMap(), _GetCollection_depth = new WeakMap(), _GetCollection_render = new WeakMap(), _GetCollection_sortBy = new WeakMap(), _GetCollection_contentType = new WeakMap(), _GetCollection_defaultQuery = new WeakMap(), _GetCollection_query = new WeakMap(), _GetCollection_rawQuery = new WeakMap(), _GetCollection_serverUrl = new WeakMap(), _GetCollection_requestOptions = new WeakMap();
|
|
229
|
+
//# sourceMappingURL=get-collection.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-collection.js","sourceRoot":"","sources":["../../../../../../../../../../libs/sdk/client/src/lib/client/content/methods/get-collection/get-collection.ts"],"names":[],"mappings":";;AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,yCAAyC,CAAC;AACjE,OAAO,EAAE,YAAY,EAAE,MAAM,6CAA6C,CAAC;AAE3E,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAErD,OAAO,EAAE,2BAA2B,EAAE,MAAM,oBAAoB,CAAC;AAEjE;;;;;GAKG;AACH,MAAM,OAAO,aAAa;IActB,YAAY,cAA6B,EAAE,SAAiB,EAAE,WAAmB;QAbjF,8BAAQ,CAAC,EAAC;QACV,+BAAS,EAAE,EAAC;QACZ,+BAAS,CAAC,EAAC;QACX,gCAAU,KAAK,EAAC;QAChB,wCAAmB;QACnB,6CAAqB;QACrB,8CAAsB;QACtB,uCAAgB;QAChB,0CAAmB;QAEnB,2CAAmB;QACnB,gDAA+B;QAG3B,uBAAA,IAAI,iCAAmB,cAAc,MAAA,CAAC;QACtC,uBAAA,IAAI,4BAAc,SAAS,MAAA,CAAC;QAE5B,uBAAA,IAAI,8BAAgB,WAAW,MAAA,CAAC;QAEhC,gEAAgE;QAChE,uBAAA,IAAI,+BAAiB,IAAI,YAAY,EAAE,CAAC,KAAK,CAAC,aAAa,CAAC,CAAC,MAAM,CAAC,uBAAA,IAAI,kCAAa,CAAC,MAAA,CAAC;IAC3F,CAAC;IAED;;;;;;OAMG;IACH,IAAY,IAAI;QACZ,OAAO,uBAAA,IAAI,6BAAQ,EAAE,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,GAAG,IAAI,CAAC,KAAK,IAAI,IAAI,CAAC,KAAK,EAAE,C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ID = 'DEFAULT';
|
|
2
|
+
// Fields that we don't want to format when sanitizing the query
|
|
3
|
+
export const CONTENT_TYPE_MAIN_FIELDS = ['live', 'variant', 'contentType', 'languageId'];
|
|
4
|
+
export const CONTENT_API_URL = '/api/content/_search';
|
|
5
|
+
//# sourceMappingURL=const.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"const.js","sourceRoot":"","sources":["../../../../../../../../../libs/sdk/client/src/lib/client/content/shared/const.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,kBAAkB,GAAG,SAAS,CAAC;AAE5C,gEAAgE;AAChE,MAAM,CAAC,MAAM,wBAAwB,GAAa,CAAC,MAAM,EAAE,SAAS,EAAE,aAAa,EAAE,YAAY,CAAC,CAAC;AAEnG,MAAM,CAAC,MAAM,eAAe,GAAG,sBAAsB,CAAC"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { Equals } from '../../../query-builder/lucene-syntax/Equals';
|
|
2
|
+
export type SortBy = {
|
|
3
|
+
field: string;
|
|
4
|
+
order: 'asc' | 'desc';
|
|
5
|
+
};
|
|
6
|
+
export type QueryBuilderCallback = (qb: Equals) => Equals;
|
|
7
|
+
export interface ContentTypeMainFields {
|
|
8
|
+
hostName: string;
|
|
9
|
+
modDate: string;
|
|
10
|
+
publishDate: string;
|
|
11
|
+
title: string;
|
|
12
|
+
baseType: string;
|
|
13
|
+
inode: string;
|
|
14
|
+
archived: boolean;
|
|
15
|
+
ownerName: string;
|
|
16
|
+
host: string;
|
|
17
|
+
working: boolean;
|
|
18
|
+
locked: boolean;
|
|
19
|
+
stInode: string;
|
|
20
|
+
contentType: string;
|
|
21
|
+
live: boolean;
|
|
22
|
+
owner: string;
|
|
23
|
+
identifier: string;
|
|
24
|
+
publishUserName: string;
|
|
25
|
+
publishUser: string;
|
|
26
|
+
languageId: number;
|
|
27
|
+
creationDate: string;
|
|
28
|
+
url: string;
|
|
29
|
+
titleImage: string;
|
|
30
|
+
modUserName: string;
|
|
31
|
+
hasLiveVersion: boolean;
|
|
32
|
+
folder: string;
|
|
33
|
+
hasTitleImage: boolean;
|
|
34
|
+
sortOrder: number;
|
|
35
|
+
modUser: string;
|
|
36
|
+
__icon__: string;
|
|
37
|
+
contentTypeIcon: string;
|
|
38
|
+
variant: string;
|
|
39
|
+
}
|
|
40
|
+
export type Contentlet<T> = T & ContentTypeMainFields;
|
|
41
|
+
export interface GetCollectionResponse<T> {
|
|
42
|
+
contentlets: Contentlet<T>[];
|
|
43
|
+
page: number;
|
|
44
|
+
size: number;
|
|
45
|
+
total: number;
|
|
46
|
+
sortedBy?: SortBy[];
|
|
47
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../../../../../../libs/sdk/client/src/lib/client/content/shared/types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Sanitizes the query for the given content type.
|
|
3
|
+
* It replaces the fields that are not contentType fields with the correct format.
|
|
4
|
+
* Example: +field: -> +contentTypeVar.field:
|
|
5
|
+
*
|
|
6
|
+
*
|
|
7
|
+
* @export
|
|
8
|
+
* @param {string} query
|
|
9
|
+
* @param {string} contentType
|
|
10
|
+
* @return {*} {string}
|
|
11
|
+
*/
|
|
12
|
+
export declare function sanitizeQueryForContentType(query: string, contentType: string): string;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { CONTENT_TYPE_MAIN_FIELDS } from './const';
|
|
2
|
+
/**
|
|
3
|
+
* Sanitizes the query for the given content type.
|
|
4
|
+
* It replaces the fields that are not contentType fields with the correct format.
|
|
5
|
+
* Example: +field: -> +contentTypeVar.field:
|
|
6
|
+
*
|
|
7
|
+
*
|
|
8
|
+
* @export
|
|
9
|
+
* @param {string} query
|
|
10
|
+
* @param {string} contentType
|
|
11
|
+
* @return {*} {string}
|
|
12
|
+
*/
|
|
13
|
+
export function sanitizeQueryForContentType(query, contentType) {
|
|
14
|
+
return query.replace(/\+([^+:]*?):/g, (original, field) => {
|
|
15
|
+
return !CONTENT_TYPE_MAIN_FIELDS.includes(field) // Fields that are not contentType fields
|
|
16
|
+
? `+${contentType}.${field}:` // Should have this format: +contentTypeVar.field:
|
|
17
|
+
: original; // Return the field if it is a contentType field
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
//# sourceMappingURL=utils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../../../../../../../libs/sdk/client/src/lib/client/content/shared/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,MAAM,SAAS,CAAC;AAEnD;;;;;;;;;;GAUG;AACH,MAAM,UAAU,2BAA2B,CAAC,KAAa,EAAE,WAAmB;IAC1E,OAAO,KAAK,CAAC,OAAO,CAAC,eAAe,EAAE,CAAC,QAAQ,EAAE,KAAK,EAAE,EAAE;QACtD,OAAO,CAAC,wBAAwB,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,yCAAyC;YACtF,CAAC,CAAC,IAAI,WAAW,IAAI,KAAK,GAAG,CAAC,kDAAkD;YAChF,CAAC,CAAC,QAAQ,CAAC,CAAC,gDAAgD;IACpE,CAAC,CAAC,CAAC;AACP,CAAC"}
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { Content } from './content/content-api';
|
|
2
|
+
export type ClientOptions = Omit<RequestInit, 'body' | 'method'>;
|
|
1
3
|
export interface ClientConfig {
|
|
2
4
|
/**
|
|
3
5
|
* The URL of the dotCMS instance.
|
|
@@ -31,10 +33,10 @@ export interface ClientConfig {
|
|
|
31
33
|
*
|
|
32
34
|
* @description These options will be used in the fetch request. Any option can be specified except for 'body' and 'method' which are omitted.
|
|
33
35
|
* @example `{ headers: { 'Content-Type': 'application/json' } }`
|
|
34
|
-
* @type {
|
|
36
|
+
* @type {ClientOptions}
|
|
35
37
|
* @optional
|
|
36
38
|
*/
|
|
37
|
-
requestOptions?:
|
|
39
|
+
requestOptions?: ClientOptions;
|
|
38
40
|
}
|
|
39
41
|
type PageApiOptions = {
|
|
40
42
|
/**
|
|
@@ -133,6 +135,7 @@ type NavApiOptions = {
|
|
|
133
135
|
export declare class DotCmsClient {
|
|
134
136
|
private config;
|
|
135
137
|
private requestOptions;
|
|
138
|
+
content: Content;
|
|
136
139
|
constructor(config?: ClientConfig);
|
|
137
140
|
page: {
|
|
138
141
|
/**
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { Content } from './content/content-api';
|
|
1
2
|
function isValidUrl(url) {
|
|
2
3
|
try {
|
|
3
4
|
new URL(url);
|
|
@@ -112,6 +113,7 @@ export class DotCmsClient {
|
|
|
112
113
|
...this.config.requestOptions?.headers
|
|
113
114
|
}
|
|
114
115
|
};
|
|
116
|
+
this.content = new Content(this.requestOptions, this.config.dotcmsUrl);
|
|
115
117
|
}
|
|
116
118
|
validatePageOptions(options) {
|
|
117
119
|
if (!options.path) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sdk-js-client.js","sourceRoot":"","sources":["../../../../../../../libs/sdk/client/src/lib/client/sdk-js-client.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"sdk-js-client.js","sourceRoot":"","sources":["../../../../../../../libs/sdk/client/src/lib/client/sdk-js-client.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AA4HhD,SAAS,UAAU,CAAC,GAAW;IAC3B,IAAI,CAAC;QACD,IAAI,GAAG,CAAC,GAAG,CAAC,CAAC;QAEb,OAAO,IAAI,CAAC;IAChB,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACb,OAAO,KAAK,CAAC;IACjB,CAAC;AACL,CAAC;AAED;;;;;;;;;;;;;;GAcG;AACH,MAAM,OAAO,YAAY;IAMrB,YACI,SAAuB,EAAE,SAAS,EAAE,EAAE,EAAE,SAAS,EAAE,EAAE,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AAC,CAAC;QACxE,CAAC;IACL,CAAC;CACJ;AAED;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG;IACxB;;;;;;;OAOG;IACH,IAAI,EAAE,CAAC,MAAoB,EAAgB,EAAE;QACzC,OAAO,IAAI,YAAY,CAAC,MAAM,CAAC,CAAC;IACpC,CAAC;CACJ,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
var _Equals_query;
|
|
2
2
|
import { __classPrivateFieldGet, __classPrivateFieldSet } from "tslib";
|
|
3
|
-
import { OPERAND, buildExcludeField, buildField, buildNotOperand, buildOperand, buildRawEquals, sanitizeQuery } from '
|
|
3
|
+
import { OPERAND, buildExcludeField, buildField, buildNotOperand, buildOperand, buildRawEquals, sanitizeQuery } from '../utils';
|
|
4
4
|
/**
|
|
5
5
|
* 'Equal' Is a Typescript class that provides the ability to use terms in the lucene query string.
|
|
6
6
|
* A term is a value used to search for a specific value in a document. It can be a word or a phrase.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Equals.js","sourceRoot":"","sources":["../../../../../../../../libs/sdk/client/src/lib/query-builder/lucene-syntax/Equals.ts"],"names":[],"mappings":";;AAIA,OAAO,EACH,OAAO,EACP,iBAAiB,EACjB,UAAU,EACV,eAAe,EACf,YAAY,EACZ,cAAc,EACd,aAAa,EAChB,MAAM,UAAU,CAAC;AAElB;;;;;;;;GAQG;AACH,MAAM,OAAO,MAAM;IAGf,YAAoB,KAAa;QAAb,UAAK,GAAL,KAAK,CAAQ;QAFjC,wBAAS,EAAE,EAAC;QAGR,uBAAA,IAAI,iBAAU,IAAI,CAAC,KAAK,MAAA,CAAC;IAC7B,CAAC;IAED;;;;;;;;OAQG;IACH,YAAY,CAAC,KAAa;QACtB,OAAO,iBAAiB,CAAC,uBAAA,IAAI,qBAAO,EAAE,KAAK,CAAC,CAAC;IACjD,CAAC;IAED;;;;;;;;OAQG;IACH,KAAK,CAAC,KAAa;QACf,OAAO,UAAU,CAAC,uBAAA,IAAI,qBAAO,EAAE,KAAK,CAAC,CAAC;IAC1C,CAAC;IAED;;;;;;;OAOG;IACH,EAAE;QACE,OAAO,YAAY,CAAC,uBAAA,IAAI,qBAAO,EAAE,OAAO,CAAC,EAAE,CAAC,CAAC;IACjD,CAAC;IAED;;;;;;;OAOG;IACH,GAAG;QACC,OAAO,YAAY,CAAC,uBAAA,IAAI,qBAAO,EAAE,OAAO,CAAC,GAAG,CAAC,CAAC;IAClD,CAAC;IAED;;;;;;;OAOG;IACH,GAAG;QACC,OAAO,eAAe,CAAC,uBAAA,IAAI,qBAAO,CAAC,CAAC;IACxC,CAAC;IAED;;;;;;;;;;OAUG;IACH,GAAG,CAAC,KAAa;QACb,OAAO,cAAc,CAAC,uBAAA,IAAI,qBAAO,EAAE,KAAK,CAAC,CAAC;IAC9C,CAAC;IAED;;;;;OAKG;IACH,KAAK;QACD,OAAO,aAAa,CAAC,uBAAA,IAAI,qBAAO,CAAC,CAAC;IACtC,CAAC;CACJ"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
var _Field_query;
|
|
2
2
|
import { __classPrivateFieldGet, __classPrivateFieldSet } from "tslib";
|
|
3
|
-
import { buildEquals } from '
|
|
3
|
+
import { buildEquals } from '../utils';
|
|
4
4
|
/**
|
|
5
5
|
* 'Field' class is used to build a query with a field.
|
|
6
6
|
* A Lucene Field is a key used to search for a specific value in a document.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Field.js","sourceRoot":"","sources":["../../../../../../../../libs/sdk/client/src/lib/query-builder/lucene-syntax/Field.ts"],"names":[],"mappings":";;AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAEvC;;;;;;GAMG;AACH,MAAM,OAAO,KAAK;IAEd,YAAoB,KAAa;QAAb,UAAK,GAAL,KAAK,CAAQ;QADjC,uBAAS,EAAE,EAAC;QAER,uBAAA,IAAI,gBAAU,IAAI,CAAC,KAAK,MAAA,CAAC;IAC7B,CAAC;IAED;;;;;;;;OAQG;IACH,MAAM,CAAC,IAAY;QACf,OAAO,WAAW,CAAC,uBAAA,IAAI,oBAAO,EAAE,IAAI,CAAC,CAAC;IAC1C,CAAC;CACJ"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
var _NotOperand_query;
|
|
2
2
|
import { __classPrivateFieldGet, __classPrivateFieldSet } from "tslib";
|
|
3
|
-
import { buildEquals } from '
|
|
3
|
+
import { buildEquals } from '../utils';
|
|
4
4
|
/**
|
|
5
5
|
* 'NotOperand' Is a Typescript class that provides the ability to use the NOT operand in the lucene query string.
|
|
6
6
|
*
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NotOperand.js","sourceRoot":"","sources":["../../../../../../../../libs/sdk/client/src/lib/query-builder/lucene-syntax/NotOperand.ts"],"names":[],"mappings":";;AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAEvC;;;;;GAKG;AACH,MAAM,OAAO,UAAU;IAGnB,YAAoB,KAAa;QAAb,UAAK,GAAL,KAAK,CAAQ;QAFjC,4BAAS,EAAE,EAAC;QAGR,uBAAA,IAAI,qBAAU,IAAI,CAAC,KAAK,MAAA,CAAC;IAC7B,CAAC;IAED;;;;;;;;OAQG;IACH,MAAM,CAAC,IAAY;QACf,OAAO,WAAW,CAAC,uBAAA,IAAI,yBAAO,EAAE,IAAI,CAAC,CAAC;IAC1C,CAAC;CACJ"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
var _Operand_query;
|
|
2
2
|
import { __classPrivateFieldGet, __classPrivateFieldSet } from "tslib";
|
|
3
|
-
import { buildExcludeField, buildField, buildEquals } from '
|
|
3
|
+
import { buildExcludeField, buildField, buildEquals } from '../utils';
|
|
4
4
|
/**
|
|
5
5
|
* 'Operand' Is a Typescript class that provides the ability to use operands in the lucene query string.}
|
|
6
6
|
* An operand is a logical operator used to join two or more conditions in a query.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Operand.js","sourceRoot":"","sources":["../../../../../../../../libs/sdk/client/src/lib/query-builder/lucene-syntax/Operand.ts"],"names":[],"mappings":";;AAGA,OAAO,EAAE,iBAAiB,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAEtE;;;;;;GAMG;AACH,MAAM,OAAO,OAAO;IAGhB,YAAoB,KAAa;QAAb,UAAK,GAAL,KAAK,CAAQ;QAFjC,yBAAS,EAAE,EAAC;QAGR,uBAAA,IAAI,kBAAU,IAAI,CAAC,KAAK,MAAA,CAAC;IAC7B,CAAC;IAED;;;;;;;;OAQG;IACH,YAAY,CAAC,KAAa;QACtB,OAAO,iBAAiB,CAAC,uBAAA,IAAI,sBAAO,EAAE,KAAK,CAAC,CAAC;IACjD,CAAC;IAED;;;;;;;;OAQG;IACH,KAAK,CAAC,KAAa;QACf,OAAO,UAAU,CAAC,uBAAA,IAAI,sBAAO,EAAE,KAAK,CAAC,CAAC;IAC1C,CAAC;IAED;;;;;;;;OAQG;IACH,MAAM,CAAC,IAAY;QACf,OAAO,WAAW,CAAC,uBAAA,IAAI,sBAAO,EAAE,IAAI,CAAC,CAAC;IAC1C,CAAC;CACJ"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../../libs/sdk/client/src/lib/query-builder/lucene-syntax/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,cAAc,CAAC;AAC7B,cAAc,WAAW,CAAC"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { Equals } from './
|
|
2
|
-
import { Field } from './utils/lucene-syntax/Field';
|
|
1
|
+
import { Equals, Field } from './lucene-syntax/index';
|
|
3
2
|
/**
|
|
4
3
|
* 'QueryBuilder' Is a Typescript class that provides the ability to build a query string using the Lucene syntax in a more readable way.
|
|
5
4
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sdk-query-builder.js","sourceRoot":"","sources":["../../../../../../../libs/sdk/client/src/lib/query-builder/sdk-query-builder.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"sdk-query-builder.js","sourceRoot":"","sources":["../../../../../../../libs/sdk/client/src/lib/query-builder/sdk-query-builder.ts"],"names":[],"mappings":";;AACA,OAAO,EAAE,iBAAiB,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAExE;;;;;GAKG;AACH,MAAM,OAAO,YAAY;IAAzB;QACI,8BAAS,EAAE,EAAC;IA0ChB,CAAC;IAxCG;;;;;;;;OAQG;IACH,KAAK,CAAC,KAAa;QACf,OAAO,UAAU,CAAC,uBAAA,IAAI,2BAAO,EAAE,KAAK,CAAC,CAAC;IAC1C,CAAC;IAED;;;;;;;;OAQG;IACH,YAAY,CAAC,KAAa;QACtB,OAAO,iBAAiB,CAAC,uBAAA,IAAI,2BAAO,EAAE,KAAK,CAAC,CAAC;IACjD,CAAC;IAED;;;;;;;;;;OAUG;IACH,GAAG,CAAC,KAAa;QACb,OAAO,cAAc,CAAC,uBAAA,IAAI,2BAAO,EAAE,KAAK,CAAC,CAAC;IAC9C,CAAC;CACJ"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { Equals } from '
|
|
2
|
-
import { Field } from '
|
|
3
|
-
import { NotOperand } from '
|
|
4
|
-
import { Operand } from '
|
|
1
|
+
import { Equals } from '../lucene-syntax/Equals';
|
|
2
|
+
import { Field } from '../lucene-syntax/Field';
|
|
3
|
+
import { NotOperand } from '../lucene-syntax/NotOperand';
|
|
4
|
+
import { Operand } from '../lucene-syntax/Operand';
|
|
5
5
|
/**
|
|
6
6
|
* Enum for common Operands
|
|
7
7
|
*
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { Equals } from '
|
|
2
|
-
import { Field } from '
|
|
3
|
-
import { NotOperand } from '
|
|
4
|
-
import { Operand } from '
|
|
1
|
+
import { Equals } from '../lucene-syntax/Equals';
|
|
2
|
+
import { Field } from '../lucene-syntax/Field';
|
|
3
|
+
import { NotOperand } from '../lucene-syntax/NotOperand';
|
|
4
|
+
import { Operand } from '../lucene-syntax/Operand';
|
|
5
5
|
/**
|
|
6
6
|
* Enum for common Operands
|
|
7
7
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../../libs/sdk/client/src/lib/query-builder/utils/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../../libs/sdk/client/src/lib/query-builder/utils/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAC;AACjD,OAAO,EAAE,KAAK,EAAE,MAAM,wBAAwB,CAAC;AAC/C,OAAO,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAC;AACzD,OAAO,EAAE,OAAO,EAAE,MAAM,0BAA0B,CAAC;AAEnD;;;;;GAKG;AACH,MAAM,CAAN,IAAY,OAIX;AAJD,WAAY,OAAO;IACf,oBAAS,CAAA;IACT,sBAAW,CAAA;IACX,sBAAW,CAAA;AACf,CAAC,EAJW,OAAO,KAAP,OAAO,QAIlB;AAED;;;;;;GAMG;AACH,MAAM,UAAU,aAAa,CAAC,GAAW;IACrC,OAAO,GAAG,CAAC,OAAO,CAAC,SAAS,EAAE,GAAG,CAAC,CAAC,IAAI,EAAE,CAAC;AAC9C,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,UAAU,eAAe,CAAC,IAAY;IACxC,OAAO,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,IAAI,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC;AACnD,CAAC;AAED;;;;;;;;GAQG;AACH,MAAM,UAAU,WAAW,CAAC,KAAa,EAAE,IAAY;IACnD,MAAM,QAAQ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AAIA,OAAO,EACH,OAAO,EACP,iBAAiB,EACjB,UAAU,EACV,eAAe,EACf,YAAY,EACZ,cAAc,EACd,aAAa,EAChB,MAAM,IAAI,CAAC;AAEZ;;;;;;;;GAQG;AACH,MAAM,OAAO,MAAM;IAGf,YAAoB,KAAa;QAAb,UAAK,GAAL,KAAK,CAAQ;QAFjC,wBAAS,EAAE,EAAC;QAGR,uBAAA,IAAI,iBAAU,IAAI,CAAC,KAAK,MAAA,CAAC;IAC7B,CAAC;IAED;;;;;;;;OAQG;IACH,YAAY,CAAC,KAAa;QACtB,OAAO,iBAAiB,CAAC,uBAAA,IAAI,qBAAO,EAAE,KAAK,CAAC,CAAC;IACjD,CAAC;IAED;;;;;;;;OAQG;IACH,KAAK,CAAC,KAAa;QACf,OAAO,UAAU,CAAC,uBAAA,IAAI,qBAAO,EAAE,KAAK,CAAC,CAAC;IAC1C,CAAC;IAED;;;;;;;OAOG;IACH,EAAE;QACE,OAAO,YAAY,CAAC,uBAAA,IAAI,qBAAO,EAAE,OAAO,CAAC,EAAE,CAAC,CAAC;IACjD,CAAC;IAED;;;;;;;OAOG;IACH,GAAG;QACC,OAAO,YAAY,CAAC,uBAAA,IAAI,qBAAO,EAAE,OAAO,CAAC,GAAG,CAAC,CAAC;IAClD,CAAC;IAED;;;;;;;OAOG;IACH,GAAG;QACC,OAAO,eAAe,CAAC,uBAAA,IAAI,qBAAO,CAAC,CAAC;IACxC,CAAC;IAED;;;;;;;;;;OAUG;IACH,GAAG,CAAC,KAAa;QACb,OAAO,cAAc,CAAC,uBAAA,IAAI,qBAAO,EAAE,KAAK,CAAC,CAAC;IAC9C,CAAC;IAED;;;;;OAKG;IACH,KAAK;QACD,OAAO,aAAa,CAAC,uBAAA,IAAI,qBAAO,CAAC,CAAC;IACtC,CAAC;CACJ"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Field.js","sourceRoot":"","sources":["../../../../../../../../../libs/sdk/client/src/lib/query-builder/utils/lucene-syntax/Field.ts"],"names":[],"mappings":";;AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,IAAI,CAAC;AAEjC;;;;;;GAMG;AACH,MAAM,OAAO,KAAK;IAEd,YAAoB,KAAa;QAAb,UAAK,GAAL,KAAK,CAAQ;QADjC,uBAAS,EAAE,EAAC;QAER,uBAAA,IAAI,gBAAU,IAAI,CAAC,KAAK,MAAA,CAAC;IAC7B,CAAC;IAED;;;;;;;;OAQG;IACH,MAAM,CAAC,IAAY;QACf,OAAO,WAAW,CAAC,uBAAA,IAAI,oBAAO,EAAE,IAAI,CAAC,CAAC;IAC1C,CAAC;CACJ"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"NotOperand.js","sourceRoot":"","sources":["../../../../../../../../../libs/sdk/client/src/lib/query-builder/utils/lucene-syntax/NotOperand.ts"],"names":[],"mappings":";;AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,IAAI,CAAC;AAEjC;;;;;GAKG;AACH,MAAM,OAAO,UAAU;IAGnB,YAAoB,KAAa;QAAb,UAAK,GAAL,KAAK,CAAQ;QAFjC,4BAAS,EAAE,EAAC;QAGR,uBAAA,IAAI,qBAAU,IAAI,CAAC,KAAK,MAAA,CAAC;IAC7B,CAAC;IAED;;;;;;;;OAQG;IACH,MAAM,CAAC,IAAY;QACf,OAAO,WAAW,CAAC,uBAAA,IAAI,yBAAO,EAAE,IAAI,CAAC,CAAC;IAC1C,CAAC;CACJ"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Operand.js","sourceRoot":"","sources":["../../../../../../../../../libs/sdk/client/src/lib/query-builder/utils/lucene-syntax/Operand.ts"],"names":[],"mappings":";;AAGA,OAAO,EAAE,iBAAiB,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,IAAI,CAAC;AAEhE;;;;;;GAMG;AACH,MAAM,OAAO,OAAO;IAGhB,YAAoB,KAAa;QAAb,UAAK,GAAL,KAAK,CAAQ;QAFjC,yBAAS,EAAE,EAAC;QAGR,uBAAA,IAAI,kBAAU,IAAI,CAAC,KAAK,MAAA,CAAC;IAC7B,CAAC;IAED;;;;;;;;OAQG;IACH,YAAY,CAAC,KAAa;QACtB,OAAO,iBAAiB,CAAC,uBAAA,IAAI,sBAAO,EAAE,KAAK,CAAC,CAAC;IACjD,CAAC;IAED;;;;;;;;OAQG;IACH,KAAK,CAAC,KAAa;QACf,OAAO,UAAU,CAAC,uBAAA,IAAI,sBAAO,EAAE,KAAK,CAAC,CAAC;IAC1C,CAAC;IAED;;;;;;;;OAQG;IACH,MAAM,CAAC,IAAY;QACf,OAAO,WAAW,CAAC,uBAAA,IAAI,sBAAO,EAAE,IAAI,CAAC,CAAC;IAC1C,CAAC;CACJ"}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|