@dotcms/client 0.0.1-alpha.17 → 0.0.1-alpha.19
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/package.json +1 -1
- package/src/index.d.ts +1 -0
- package/src/index.js +1 -0
- package/src/index.js.map +1 -1
- package/src/lib/client/content/builders/collection/collection.d.ts +146 -0
- package/src/lib/client/content/builders/collection/collection.js +254 -0
- package/src/lib/client/content/builders/collection/collection.js.map +1 -0
- package/src/lib/client/content/content-api.d.ts +78 -0
- package/src/lib/client/content/content-api.js +87 -0
- package/src/lib/client/content/content-api.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 +62 -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/utils/graphql-parser.d.ts +12 -0
- package/src/lib/utils/graphql-parser.js +43 -0
- package/src/lib/utils/graphql-parser.js.map +1 -0
- package/src/lib/utils/index.d.ts +1 -0
- package/src/lib/utils/index.js +2 -0
- package/src/lib/utils/index.js.map +1 -0
- 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/package.json
CHANGED
package/src/index.d.ts
CHANGED
package/src/index.js
CHANGED
package/src/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../libs/sdk/client/src/index.ts"],"names":[],"mappings":"AAAA,cAAc,4BAA4B,CAAC;AAC3C,cAAc,yBAAyB,CAAC;AACxC,cAAc,kCAAkC,CAAC;AACjD,cAAc,kCAAkC,CAAC;AACjD,cAAc,uCAAuC,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../libs/sdk/client/src/index.ts"],"names":[],"mappings":"AAAA,cAAc,4BAA4B,CAAC;AAC3C,cAAc,yBAAyB,CAAC;AACxC,cAAc,kCAAkC,CAAC;AACjD,cAAc,kCAAkC,CAAC;AACjD,cAAc,uCAAuC,CAAC;AACtD,cAAc,aAAa,CAAC"}
|
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
import { ClientOptions } from '../../../sdk-js-client';
|
|
2
|
+
import { GetCollectionResponse, BuildQuery, SortBy, GetCollectionError, OnFullfilled, OnRejected } from '../../shared/types';
|
|
3
|
+
/**
|
|
4
|
+
* Creates a Builder to filter and fetch content from the content API for an specific content type
|
|
5
|
+
*
|
|
6
|
+
* @export
|
|
7
|
+
* @class CollectionBuilder
|
|
8
|
+
* @template T Represents the type of the content type to fetch. Defaults to unknown
|
|
9
|
+
*/
|
|
10
|
+
export declare class CollectionBuilder<T = unknown> {
|
|
11
|
+
#private;
|
|
12
|
+
constructor(requestOptions: ClientOptions, serverUrl: string, contentType: string);
|
|
13
|
+
/**
|
|
14
|
+
* This method returns the sort query in this format: field order, field order, ...
|
|
15
|
+
*
|
|
16
|
+
* @readonly
|
|
17
|
+
* @private
|
|
18
|
+
* @memberof CollectionBuilder
|
|
19
|
+
*/
|
|
20
|
+
private get sort();
|
|
21
|
+
private get offset();
|
|
22
|
+
private get url();
|
|
23
|
+
/**
|
|
24
|
+
* This method returns the current query built
|
|
25
|
+
*
|
|
26
|
+
* @readonly
|
|
27
|
+
* @private
|
|
28
|
+
* @memberof CollectionBuilder
|
|
29
|
+
*/
|
|
30
|
+
private get currentQuery();
|
|
31
|
+
/**
|
|
32
|
+
* Takes a language id and filters the content by that language
|
|
33
|
+
*
|
|
34
|
+
*
|
|
35
|
+
* @param {number | string} languageId The language id to filter the content by
|
|
36
|
+
* @return {CollectionBuilder} CollectionBuilder - A CollectionBuilder instance
|
|
37
|
+
* @memberof CollectionBuilder
|
|
38
|
+
*/
|
|
39
|
+
language(languageId: number | string): this;
|
|
40
|
+
/**
|
|
41
|
+
* The retrieved content will have the rendered HTML
|
|
42
|
+
*
|
|
43
|
+
* @return {CollectionBuilder} CollectionBuilder - A CollectionBuilder instance
|
|
44
|
+
* @memberof CollectionBuilder
|
|
45
|
+
*/
|
|
46
|
+
render(): this;
|
|
47
|
+
/**
|
|
48
|
+
* Takes an array of constrains to sort the content by field an specific order
|
|
49
|
+
*
|
|
50
|
+
* @example
|
|
51
|
+
* ```javascript
|
|
52
|
+
* // This will sort the content by title in ascending order
|
|
53
|
+
* // and by modDate in descending order
|
|
54
|
+
* const sortBy = [{ field: 'title', order: 'asc' }, { field: 'modDate', order: 'desc' }]
|
|
55
|
+
*
|
|
56
|
+
* client.content.getCollection("Blog").sortBy(sortBy)
|
|
57
|
+
*```
|
|
58
|
+
*
|
|
59
|
+
* @param {SortBy[]} sortBy Array of constrains to sort the content by
|
|
60
|
+
* @return {CollectionBuilder} CollectionBuilder - A CollectionBuilder instance
|
|
61
|
+
* @memberof CollectionBuilder
|
|
62
|
+
*/
|
|
63
|
+
sortBy(sortBy: SortBy[]): this;
|
|
64
|
+
/**
|
|
65
|
+
* Takes a number that represents the max amount of content to fetch
|
|
66
|
+
*
|
|
67
|
+
* `limit` is set to 10 by default
|
|
68
|
+
*
|
|
69
|
+
* @param {number} limit The max amount of content to fetch
|
|
70
|
+
* @return {CollectionBuilder} CollectionBuilder - A CollectionBuilder instance
|
|
71
|
+
* @memberof CollectionBuilder
|
|
72
|
+
*/
|
|
73
|
+
limit(limit: number): this;
|
|
74
|
+
/**
|
|
75
|
+
* Takes a number that represents the page to fetch
|
|
76
|
+
*
|
|
77
|
+
* @param {number} page The page to fetch
|
|
78
|
+
* @return {CollectionBuilder} CollectionBuilder - A CollectionBuilder instance
|
|
79
|
+
* @memberof CollectionBuilder
|
|
80
|
+
*/
|
|
81
|
+
page(page: number): this;
|
|
82
|
+
/**
|
|
83
|
+
* Takes a string that represents a {@link https://www.dotcms.com/docs/latest/content-search-syntax#Lucene Lucene Query} that is used to filter the content to fetch.
|
|
84
|
+
*
|
|
85
|
+
* The string is not validated, so be cautious when using it.
|
|
86
|
+
*
|
|
87
|
+
* @param {string} query A {@link https://www.dotcms.com/docs/latest/content-search-syntax#Lucene Lucene Query} String
|
|
88
|
+
* @return {CollectionBuilder} CollectionBuilder - A CollectionBuilder instance
|
|
89
|
+
* @memberof CollectionBuilder
|
|
90
|
+
*/
|
|
91
|
+
query(query: string): this;
|
|
92
|
+
/**
|
|
93
|
+
* Takes a function that recieves a QueryBuilder to buid a query for content filtering.
|
|
94
|
+
* @example
|
|
95
|
+
*```javascript
|
|
96
|
+
* // This will filter the content by title equals 'Hello World' or 'Hello World 2'
|
|
97
|
+
* client.content.getCollection("Activity").query((queryBuilder) =>
|
|
98
|
+
* queryBuilder.field('title').equals('Hello World').or().equals('Hello World 2')
|
|
99
|
+
* );
|
|
100
|
+
*```
|
|
101
|
+
* @param {BuildQuery} buildQuery A function that receives a QueryBuilder instance and returns a valid query
|
|
102
|
+
* @return {CollectionBuilder} CollectionBuilder - A CollectionBuilder instance
|
|
103
|
+
* @memberof CollectionBuilder
|
|
104
|
+
*/
|
|
105
|
+
query(buildQuery: BuildQuery): this;
|
|
106
|
+
/**
|
|
107
|
+
* The retrieved content will be draft content
|
|
108
|
+
*
|
|
109
|
+
* The default value is false to fetch content that is not on draft
|
|
110
|
+
*
|
|
111
|
+
* @return {CollectionBuilder} CollectionBuilder - A CollectionBuilder instance
|
|
112
|
+
* @memberof CollectionBuilder
|
|
113
|
+
*/
|
|
114
|
+
draft(): this;
|
|
115
|
+
/**
|
|
116
|
+
* Takes a string that represents a variant ID of content created with the {@link https://www.dotcms.com/docs/latest/experiments-and-a-b-testing A/B Testing} feature
|
|
117
|
+
*
|
|
118
|
+
* `variantId` defaults to "DEFAULT" to fetch content that is not part of an A/B test
|
|
119
|
+
*
|
|
120
|
+
* @param {string} variantId A string that represents a variant ID
|
|
121
|
+
* @return {CollectionBuilder} CollectionBuilder - A CollectionBuilder instance
|
|
122
|
+
* @memberof CollectionBuilder
|
|
123
|
+
*/
|
|
124
|
+
variant(variantId: string): this;
|
|
125
|
+
/**
|
|
126
|
+
* Takes a number that represents the depth of the relationships of a content
|
|
127
|
+
*
|
|
128
|
+
* The `depth` is set to 0 by default and the max supported value is 3.
|
|
129
|
+
*
|
|
130
|
+
* @param {number} depth The depth of the relationships of a content
|
|
131
|
+
* @return {CollectionBuilder} CollectionBuilder - A CollectionBuilder instance
|
|
132
|
+
* @memberof CollectionBuilder
|
|
133
|
+
*/
|
|
134
|
+
depth(depth: number): this;
|
|
135
|
+
/**
|
|
136
|
+
* Executes the fetch and returns a promise that resolves to the content or rejects to an error
|
|
137
|
+
*
|
|
138
|
+
* @param {OnFullfilled} [onfulfilled] A callback that is called when the fetch is successful
|
|
139
|
+
* @param {OnRejected} [onrejected] A callback that is called when the fetch fails
|
|
140
|
+
* @return {Promise<GetCollectionResponse<T> | GetCollectionError>} A promise that resolves to the content or rejects to an error
|
|
141
|
+
* @memberof CollectionBuilder
|
|
142
|
+
*/
|
|
143
|
+
then(onfulfilled?: OnFullfilled<T>, onrejected?: OnRejected): Promise<GetCollectionResponse<T> | GetCollectionError>;
|
|
144
|
+
private formatResponse;
|
|
145
|
+
private fetch;
|
|
146
|
+
}
|
|
@@ -0,0 +1,254 @@
|
|
|
1
|
+
var _CollectionBuilder_page, _CollectionBuilder_limit, _CollectionBuilder_depth, _CollectionBuilder_render, _CollectionBuilder_sortBy, _CollectionBuilder_contentType, _CollectionBuilder_defaultQuery, _CollectionBuilder_query, _CollectionBuilder_rawQuery, _CollectionBuilder_serverUrl, _CollectionBuilder_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
|
+
* Creates a Builder to filter and fetch content from the content API for an specific content type
|
|
9
|
+
*
|
|
10
|
+
* @export
|
|
11
|
+
* @class CollectionBuilder
|
|
12
|
+
* @template T Represents the type of the content type to fetch. Defaults to unknown
|
|
13
|
+
*/
|
|
14
|
+
export class CollectionBuilder {
|
|
15
|
+
constructor(requestOptions, serverUrl, contentType) {
|
|
16
|
+
_CollectionBuilder_page.set(this, 1);
|
|
17
|
+
_CollectionBuilder_limit.set(this, 10);
|
|
18
|
+
_CollectionBuilder_depth.set(this, 0);
|
|
19
|
+
_CollectionBuilder_render.set(this, false);
|
|
20
|
+
_CollectionBuilder_sortBy.set(this, void 0);
|
|
21
|
+
_CollectionBuilder_contentType.set(this, void 0);
|
|
22
|
+
_CollectionBuilder_defaultQuery.set(this, void 0);
|
|
23
|
+
_CollectionBuilder_query.set(this, void 0);
|
|
24
|
+
_CollectionBuilder_rawQuery.set(this, void 0);
|
|
25
|
+
_CollectionBuilder_serverUrl.set(this, void 0);
|
|
26
|
+
_CollectionBuilder_requestOptions.set(this, void 0);
|
|
27
|
+
__classPrivateFieldSet(this, _CollectionBuilder_requestOptions, requestOptions, "f");
|
|
28
|
+
__classPrivateFieldSet(this, _CollectionBuilder_serverUrl, serverUrl, "f");
|
|
29
|
+
__classPrivateFieldSet(this, _CollectionBuilder_contentType, contentType, "f");
|
|
30
|
+
// We need to build the default query with the contentType field
|
|
31
|
+
__classPrivateFieldSet(this, _CollectionBuilder_defaultQuery, new QueryBuilder().field('contentType').equals(__classPrivateFieldGet(this, _CollectionBuilder_contentType, "f")), "f");
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* This method returns the sort query in this format: field order, field order, ...
|
|
35
|
+
*
|
|
36
|
+
* @readonly
|
|
37
|
+
* @private
|
|
38
|
+
* @memberof CollectionBuilder
|
|
39
|
+
*/
|
|
40
|
+
get sort() {
|
|
41
|
+
return __classPrivateFieldGet(this, _CollectionBuilder_sortBy, "f")?.map((sort) => `${sort.field} ${sort.order}`).join(',');
|
|
42
|
+
}
|
|
43
|
+
get offset() {
|
|
44
|
+
// This could end in an empty response
|
|
45
|
+
return __classPrivateFieldGet(this, _CollectionBuilder_limit, "f") * (__classPrivateFieldGet(this, _CollectionBuilder_page, "f") - 1);
|
|
46
|
+
}
|
|
47
|
+
get url() {
|
|
48
|
+
return `${__classPrivateFieldGet(this, _CollectionBuilder_serverUrl, "f")}${CONTENT_API_URL}`;
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* This method returns the current query built
|
|
52
|
+
*
|
|
53
|
+
* @readonly
|
|
54
|
+
* @private
|
|
55
|
+
* @memberof CollectionBuilder
|
|
56
|
+
*/
|
|
57
|
+
get currentQuery() {
|
|
58
|
+
return __classPrivateFieldGet(this, _CollectionBuilder_query, "f") ?? __classPrivateFieldGet(this, _CollectionBuilder_defaultQuery, "f");
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* Takes a language id and filters the content by that language
|
|
62
|
+
*
|
|
63
|
+
*
|
|
64
|
+
* @param {number | string} languageId The language id to filter the content by
|
|
65
|
+
* @return {CollectionBuilder} CollectionBuilder - A CollectionBuilder instance
|
|
66
|
+
* @memberof CollectionBuilder
|
|
67
|
+
*/
|
|
68
|
+
language(languageId) {
|
|
69
|
+
__classPrivateFieldSet(this, _CollectionBuilder_query, this.currentQuery.field('languageId').equals(languageId.toString()), "f");
|
|
70
|
+
return this;
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* The retrieved content will have the rendered HTML
|
|
74
|
+
*
|
|
75
|
+
* @return {CollectionBuilder} CollectionBuilder - A CollectionBuilder instance
|
|
76
|
+
* @memberof CollectionBuilder
|
|
77
|
+
*/
|
|
78
|
+
render() {
|
|
79
|
+
__classPrivateFieldSet(this, _CollectionBuilder_render, true, "f");
|
|
80
|
+
return this;
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
* Takes an array of constrains to sort the content by field an specific order
|
|
84
|
+
*
|
|
85
|
+
* @example
|
|
86
|
+
* ```javascript
|
|
87
|
+
* // This will sort the content by title in ascending order
|
|
88
|
+
* // and by modDate in descending order
|
|
89
|
+
* const sortBy = [{ field: 'title', order: 'asc' }, { field: 'modDate', order: 'desc' }]
|
|
90
|
+
*
|
|
91
|
+
* client.content.getCollection("Blog").sortBy(sortBy)
|
|
92
|
+
*```
|
|
93
|
+
*
|
|
94
|
+
* @param {SortBy[]} sortBy Array of constrains to sort the content by
|
|
95
|
+
* @return {CollectionBuilder} CollectionBuilder - A CollectionBuilder instance
|
|
96
|
+
* @memberof CollectionBuilder
|
|
97
|
+
*/
|
|
98
|
+
sortBy(sortBy) {
|
|
99
|
+
__classPrivateFieldSet(this, _CollectionBuilder_sortBy, sortBy, "f");
|
|
100
|
+
return this;
|
|
101
|
+
}
|
|
102
|
+
/**
|
|
103
|
+
* Takes a number that represents the max amount of content to fetch
|
|
104
|
+
*
|
|
105
|
+
* `limit` is set to 10 by default
|
|
106
|
+
*
|
|
107
|
+
* @param {number} limit The max amount of content to fetch
|
|
108
|
+
* @return {CollectionBuilder} CollectionBuilder - A CollectionBuilder instance
|
|
109
|
+
* @memberof CollectionBuilder
|
|
110
|
+
*/
|
|
111
|
+
limit(limit) {
|
|
112
|
+
__classPrivateFieldSet(this, _CollectionBuilder_limit, limit, "f");
|
|
113
|
+
return this;
|
|
114
|
+
}
|
|
115
|
+
/**
|
|
116
|
+
* Takes a number that represents the page to fetch
|
|
117
|
+
*
|
|
118
|
+
* @param {number} page The page to fetch
|
|
119
|
+
* @return {CollectionBuilder} CollectionBuilder - A CollectionBuilder instance
|
|
120
|
+
* @memberof CollectionBuilder
|
|
121
|
+
*/
|
|
122
|
+
page(page) {
|
|
123
|
+
__classPrivateFieldSet(this, _CollectionBuilder_page, page, "f");
|
|
124
|
+
return this;
|
|
125
|
+
}
|
|
126
|
+
query(arg) {
|
|
127
|
+
if (typeof arg === 'string') {
|
|
128
|
+
__classPrivateFieldSet(this, _CollectionBuilder_rawQuery, arg, "f");
|
|
129
|
+
return this;
|
|
130
|
+
}
|
|
131
|
+
if (typeof arg !== 'function') {
|
|
132
|
+
throw new Error(`Parameter for query method should be a buildQuery function or a string.\nExample:\nclient.content.getCollection('Activity').query((queryBuilder) => queryBuilder.field('title').equals('Hello World'))\nor\nclient.content.getCollection('Activity').query('+Activity.title:"Hello World"') \nSee documentation for more information.`);
|
|
133
|
+
}
|
|
134
|
+
const builtQuery = arg(new QueryBuilder());
|
|
135
|
+
// This can be use in Javascript so we cannot rely on the type checking
|
|
136
|
+
if (builtQuery instanceof Equals) {
|
|
137
|
+
__classPrivateFieldSet(this, _CollectionBuilder_query, builtQuery.raw(this.currentQuery.build()), "f");
|
|
138
|
+
}
|
|
139
|
+
else {
|
|
140
|
+
throw new Error('Provided query is not valid. A query should end in an equals method call.\nExample:\n(queryBuilder) => queryBuilder.field("title").equals("Hello World")\nSee documentation for more information.');
|
|
141
|
+
}
|
|
142
|
+
return this;
|
|
143
|
+
}
|
|
144
|
+
/**
|
|
145
|
+
* The retrieved content will be draft content
|
|
146
|
+
*
|
|
147
|
+
* The default value is false to fetch content that is not on draft
|
|
148
|
+
*
|
|
149
|
+
* @return {CollectionBuilder} CollectionBuilder - A CollectionBuilder instance
|
|
150
|
+
* @memberof CollectionBuilder
|
|
151
|
+
*/
|
|
152
|
+
draft() {
|
|
153
|
+
__classPrivateFieldSet(this, _CollectionBuilder_query, this.currentQuery.field('live').equals(false.toString()), "f");
|
|
154
|
+
return this;
|
|
155
|
+
}
|
|
156
|
+
/**
|
|
157
|
+
* Takes a string that represents a variant ID of content created with the {@link https://www.dotcms.com/docs/latest/experiments-and-a-b-testing A/B Testing} feature
|
|
158
|
+
*
|
|
159
|
+
* `variantId` defaults to "DEFAULT" to fetch content that is not part of an A/B test
|
|
160
|
+
*
|
|
161
|
+
* @param {string} variantId A string that represents a variant ID
|
|
162
|
+
* @return {CollectionBuilder} CollectionBuilder - A CollectionBuilder instance
|
|
163
|
+
* @memberof CollectionBuilder
|
|
164
|
+
*/
|
|
165
|
+
variant(variantId) {
|
|
166
|
+
__classPrivateFieldSet(this, _CollectionBuilder_query, this.currentQuery.field('variant').equals(variantId), "f");
|
|
167
|
+
return this;
|
|
168
|
+
}
|
|
169
|
+
/**
|
|
170
|
+
* Takes a number that represents the depth of the relationships of a content
|
|
171
|
+
*
|
|
172
|
+
* The `depth` is set to 0 by default and the max supported value is 3.
|
|
173
|
+
*
|
|
174
|
+
* @param {number} depth The depth of the relationships of a content
|
|
175
|
+
* @return {CollectionBuilder} CollectionBuilder - A CollectionBuilder instance
|
|
176
|
+
* @memberof CollectionBuilder
|
|
177
|
+
*/
|
|
178
|
+
depth(depth) {
|
|
179
|
+
if (depth < 0 || depth > 3) {
|
|
180
|
+
throw new Error('Depth value must be between 0 and 3');
|
|
181
|
+
}
|
|
182
|
+
__classPrivateFieldSet(this, _CollectionBuilder_depth, depth, "f");
|
|
183
|
+
return this;
|
|
184
|
+
}
|
|
185
|
+
/**
|
|
186
|
+
* Executes the fetch and returns a promise that resolves to the content or rejects to an error
|
|
187
|
+
*
|
|
188
|
+
* @param {OnFullfilled} [onfulfilled] A callback that is called when the fetch is successful
|
|
189
|
+
* @param {OnRejected} [onrejected] A callback that is called when the fetch fails
|
|
190
|
+
* @return {Promise<GetCollectionResponse<T> | GetCollectionError>} A promise that resolves to the content or rejects to an error
|
|
191
|
+
* @memberof CollectionBuilder
|
|
192
|
+
*/
|
|
193
|
+
then(onfulfilled, onrejected) {
|
|
194
|
+
return this.fetch().then(async (response) => {
|
|
195
|
+
const data = await response.json();
|
|
196
|
+
if (response.ok) {
|
|
197
|
+
const formattedResponse = this.formatResponse(data);
|
|
198
|
+
const finalResponse = typeof onfulfilled === 'function'
|
|
199
|
+
? onfulfilled(formattedResponse)
|
|
200
|
+
: formattedResponse;
|
|
201
|
+
return finalResponse;
|
|
202
|
+
}
|
|
203
|
+
else {
|
|
204
|
+
// Fetch does not reject on server errors, so we only have to bubble up the error as a normal fetch
|
|
205
|
+
return {
|
|
206
|
+
status: response.status,
|
|
207
|
+
...data
|
|
208
|
+
};
|
|
209
|
+
}
|
|
210
|
+
}, onrejected);
|
|
211
|
+
}
|
|
212
|
+
// Formats the response to the desired format
|
|
213
|
+
formatResponse(data) {
|
|
214
|
+
const contentlets = data.entity.jsonObjectView.contentlets;
|
|
215
|
+
const total = data.entity.resultsSize;
|
|
216
|
+
const mappedResponse = {
|
|
217
|
+
contentlets,
|
|
218
|
+
total,
|
|
219
|
+
page: __classPrivateFieldGet(this, _CollectionBuilder_page, "f"),
|
|
220
|
+
size: contentlets.length
|
|
221
|
+
};
|
|
222
|
+
return __classPrivateFieldGet(this, _CollectionBuilder_sortBy, "f")
|
|
223
|
+
? {
|
|
224
|
+
...mappedResponse,
|
|
225
|
+
sortedBy: __classPrivateFieldGet(this, _CollectionBuilder_sortBy, "f")
|
|
226
|
+
}
|
|
227
|
+
: mappedResponse;
|
|
228
|
+
}
|
|
229
|
+
// Calls the content API to fetch the content
|
|
230
|
+
fetch() {
|
|
231
|
+
const sanitizedQuery = sanitizeQueryForContentType(this.currentQuery.build(), __classPrivateFieldGet(this, _CollectionBuilder_contentType, "f"));
|
|
232
|
+
const query = __classPrivateFieldGet(this, _CollectionBuilder_rawQuery, "f") ? `${sanitizedQuery} ${__classPrivateFieldGet(this, _CollectionBuilder_rawQuery, "f")}` : sanitizedQuery;
|
|
233
|
+
return fetch(this.url, {
|
|
234
|
+
...__classPrivateFieldGet(this, _CollectionBuilder_requestOptions, "f"),
|
|
235
|
+
method: 'POST',
|
|
236
|
+
headers: {
|
|
237
|
+
...__classPrivateFieldGet(this, _CollectionBuilder_requestOptions, "f").headers,
|
|
238
|
+
'Content-Type': 'application/json'
|
|
239
|
+
},
|
|
240
|
+
body: JSON.stringify({
|
|
241
|
+
query,
|
|
242
|
+
render: __classPrivateFieldGet(this, _CollectionBuilder_render, "f"),
|
|
243
|
+
sort: this.sort,
|
|
244
|
+
limit: __classPrivateFieldGet(this, _CollectionBuilder_limit, "f"),
|
|
245
|
+
offset: this.offset,
|
|
246
|
+
depth: __classPrivateFieldGet(this, _CollectionBuilder_depth, "f")
|
|
247
|
+
//userId: This exist but we currently don't use it
|
|
248
|
+
//allCategoriesInfo: This exist but we currently don't use it
|
|
249
|
+
})
|
|
250
|
+
});
|
|
251
|
+
}
|
|
252
|
+
}
|
|
253
|
+
_CollectionBuilder_page = new WeakMap(), _CollectionBuilder_limit = new WeakMap(), _CollectionBuilder_depth = new WeakMap(), _CollectionBuilder_render = new WeakMap(), _CollectionBuilder_sortBy = new WeakMap(), _CollectionBuilder_contentType = new WeakMap(), _CollectionBuilder_defaultQuery = new WeakMap(), _CollectionBuilder_query = new WeakMap(), _CollectionBuilder_rawQuery = new WeakMap(), _CollectionBuilder_serverUrl = new WeakMap(), _CollectionBuilder_requestOptions = new WeakMap();
|
|
254
|
+
//# sourceMappingURL=collection.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"collection.js","sourceRoot":"","sources":["../../../../../../../../../../libs/sdk/client/src/lib/client/content/builders/collection/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;AAUrD,OAAO,EAAE,2BAA2B,EAAE,MAAM,oBAAoB,CAAC;AAEjE;;;;;;GAMG;AACH,MAAM,OAAO,iBAAiB;IAc1B,YAAY,cAA6B,EAAE,SAAiB,EAAE,WAAmB;QAbjF,kCAAQ,CAAC,EAAC;QACV,mCAAS,EAAE,EAAC;QACZ,mCAAS,CAAC,EAAC;QACX,oCAAU,KAAK,EAAC;QAChB,4CAAmB;QACnB,iDAAqB;QACrB,kDAAsB;QACtB,2CAAgB;QAChB,8CAAmB;QAEnB,+CAAmB;QACnB,oDAA+B;QAG3B,uBAAA,IAAI,qCAAmB,cAAc,MAAA,CAAC;QACtC,uBAAA,IAAI,gCAAc,SAAS,MAAA,CAAC;QAE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,uBAAA,IAAI,iCAAQ;YACf,CAAC,CAAC;gBACI,GAAG,cAAc;gBACjB,QAAQ,EAAE,uBAAA,IAAI,iCAAQ;aACzB;YACH,CAAC,CAAC,cAAc,CAAC;IACzB,CAAC;IAED,6CAA6C;IACrC,KAAK;QACT,MAAM,cAAc,GAAG,2BAA2B,CAC9C,IAAI,CAAC,YAAY,CAAC,KAAK,EAAE,EACzB,uBAAA,IAAI,sCAAa,CACpB,CAAC;QAEF,MAAM,KAAK,GAAG,uBAAA,IAAI,mCAAU,CAAC,CAAC,CAAC,GAAG,cAAc,IAAI,uBAAA,IAAI,mCAAU,EAAE,CAAC,CAAC,CAAC,cAAc,CAAC;QAEtF,OAAO,KAAK,CAAC,IAAI,CAAC,GAAG,EAAE;YACnB,GAAG,uBAAA,IAAI,yCAAgB;YACvB,MAAM,EAAE,MAAM;YACd,OAAO,EAAE;gBACL,GAAG,uBAAA,IAAI,yCAAgB,CAAC,OAAO;gBAC/B,cAAc,EAAE,kBAAkB;aACrC;YACD,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC;gBACjB,KAAK;gBACL,MAAM,EAAE,uBAAA,IAAI,iCAAQ;gBACpB,IAAI,EAAE,IAAI,CAAC,IAAI;gBACf,KAAK,EAAE,uBAAA,IAAI,gCAAO;gBAClB,MAAM,EAAE,IAAI,CAAC,MAAM;gBACnB,KAAK,EAAE,uBAAA,IAAI,gCAAO;gBAClB,kDAAkD;gBAClD,6DAA6D;aAChE,CAAC;SACL,CAAC,CAAC;IACP,CAAC;CACJ"}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { CollectionBuilder } from './builders/collection/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;
|
|
11
|
+
constructor(requestOptions: ClientOptions, serverUrl: string);
|
|
12
|
+
/**
|
|
13
|
+
* Takes a content type and returns a builder to filter and fetch the collection
|
|
14
|
+
*
|
|
15
|
+
* @example
|
|
16
|
+
* ```javascript
|
|
17
|
+
* // Using await and async
|
|
18
|
+
* const collectionResponse = await client.content
|
|
19
|
+
* .getCollection('Blog')
|
|
20
|
+
* .limit(10)
|
|
21
|
+
* .page(2)
|
|
22
|
+
* .sortBy([{ field: 'title', order: 'asc' }])
|
|
23
|
+
* .query((queryBuilder) => queryBuilder.field('author').equals('John Doe'))
|
|
24
|
+
* .depth(1);
|
|
25
|
+
* ```
|
|
26
|
+
* @example
|
|
27
|
+
* ```javascript
|
|
28
|
+
* // Using then and catch
|
|
29
|
+
* client.content
|
|
30
|
+
* .getCollection('Blog')
|
|
31
|
+
* .limit(10)
|
|
32
|
+
* .page(2)
|
|
33
|
+
* .sortBy([{ field: 'title', order: 'asc' }])
|
|
34
|
+
* .query((queryBuilder) => queryBuilder.field('author').equals('John Doe'))
|
|
35
|
+
* .depth(1)
|
|
36
|
+
* .then((response) => {
|
|
37
|
+
* console.log(response.contentlets);
|
|
38
|
+
* })
|
|
39
|
+
* .catch((error) => {
|
|
40
|
+
* console.error(error);
|
|
41
|
+
* });
|
|
42
|
+
* ```
|
|
43
|
+
* @example
|
|
44
|
+
* ```typescript
|
|
45
|
+
* // Using an specific type for your content
|
|
46
|
+
*
|
|
47
|
+
* type Blog = {
|
|
48
|
+
* summary: string;
|
|
49
|
+
* author: string;
|
|
50
|
+
* title: string;
|
|
51
|
+
* };
|
|
52
|
+
*
|
|
53
|
+
* client.content
|
|
54
|
+
* .getCollection<Blog>('Blog')
|
|
55
|
+
* .limit(10)
|
|
56
|
+
* .page(2)
|
|
57
|
+
* .sortBy([{ field: 'title', order: 'asc' }])
|
|
58
|
+
* .query((queryBuilder) => queryBuilder.field('author').equals('John Doe'))
|
|
59
|
+
* .depth(1)
|
|
60
|
+
* .then((response) => {
|
|
61
|
+
* response.contentlets.forEach((blog) => {
|
|
62
|
+
* console.log(blog.title);
|
|
63
|
+
* console.log(blog.author);
|
|
64
|
+
* console.log(blog.summary);
|
|
65
|
+
* });
|
|
66
|
+
* })
|
|
67
|
+
* .catch((error) => {
|
|
68
|
+
* console.error(error);
|
|
69
|
+
* });
|
|
70
|
+
* ```
|
|
71
|
+
*
|
|
72
|
+
* @param {string} contentType The content type to get the collection
|
|
73
|
+
* @return {CollectionBuilder} CollectionBuilder to filter and fetch the collection
|
|
74
|
+
* @template T Represents the type of the content type to fetch. Defaults to unknown
|
|
75
|
+
* @memberof Content
|
|
76
|
+
*/
|
|
77
|
+
getCollection<T = unknown>(contentType: string): CollectionBuilder<T>;
|
|
78
|
+
}
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
var _Content_requestOptions, _Content_serverUrl;
|
|
2
|
+
import { __classPrivateFieldGet, __classPrivateFieldSet } from "tslib";
|
|
3
|
+
import { CollectionBuilder } from './builders/collection/collection';
|
|
4
|
+
/**
|
|
5
|
+
* Content classs exposes the content api methods
|
|
6
|
+
*
|
|
7
|
+
* @export
|
|
8
|
+
* @class Content
|
|
9
|
+
*/
|
|
10
|
+
export class Content {
|
|
11
|
+
constructor(requestOptions, serverUrl) {
|
|
12
|
+
_Content_requestOptions.set(this, void 0);
|
|
13
|
+
_Content_serverUrl.set(this, void 0);
|
|
14
|
+
__classPrivateFieldSet(this, _Content_requestOptions, requestOptions, "f");
|
|
15
|
+
__classPrivateFieldSet(this, _Content_serverUrl, serverUrl, "f");
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Takes a content type and returns a builder to filter and fetch the collection
|
|
19
|
+
*
|
|
20
|
+
* @example
|
|
21
|
+
* ```javascript
|
|
22
|
+
* // Using await and async
|
|
23
|
+
* const collectionResponse = await client.content
|
|
24
|
+
* .getCollection('Blog')
|
|
25
|
+
* .limit(10)
|
|
26
|
+
* .page(2)
|
|
27
|
+
* .sortBy([{ field: 'title', order: 'asc' }])
|
|
28
|
+
* .query((queryBuilder) => queryBuilder.field('author').equals('John Doe'))
|
|
29
|
+
* .depth(1);
|
|
30
|
+
* ```
|
|
31
|
+
* @example
|
|
32
|
+
* ```javascript
|
|
33
|
+
* // Using then and catch
|
|
34
|
+
* client.content
|
|
35
|
+
* .getCollection('Blog')
|
|
36
|
+
* .limit(10)
|
|
37
|
+
* .page(2)
|
|
38
|
+
* .sortBy([{ field: 'title', order: 'asc' }])
|
|
39
|
+
* .query((queryBuilder) => queryBuilder.field('author').equals('John Doe'))
|
|
40
|
+
* .depth(1)
|
|
41
|
+
* .then((response) => {
|
|
42
|
+
* console.log(response.contentlets);
|
|
43
|
+
* })
|
|
44
|
+
* .catch((error) => {
|
|
45
|
+
* console.error(error);
|
|
46
|
+
* });
|
|
47
|
+
* ```
|
|
48
|
+
* @example
|
|
49
|
+
* ```typescript
|
|
50
|
+
* // Using an specific type for your content
|
|
51
|
+
*
|
|
52
|
+
* type Blog = {
|
|
53
|
+
* summary: string;
|
|
54
|
+
* author: string;
|
|
55
|
+
* title: string;
|
|
56
|
+
* };
|
|
57
|
+
*
|
|
58
|
+
* client.content
|
|
59
|
+
* .getCollection<Blog>('Blog')
|
|
60
|
+
* .limit(10)
|
|
61
|
+
* .page(2)
|
|
62
|
+
* .sortBy([{ field: 'title', order: 'asc' }])
|
|
63
|
+
* .query((queryBuilder) => queryBuilder.field('author').equals('John Doe'))
|
|
64
|
+
* .depth(1)
|
|
65
|
+
* .then((response) => {
|
|
66
|
+
* response.contentlets.forEach((blog) => {
|
|
67
|
+
* console.log(blog.title);
|
|
68
|
+
* console.log(blog.author);
|
|
69
|
+
* console.log(blog.summary);
|
|
70
|
+
* });
|
|
71
|
+
* })
|
|
72
|
+
* .catch((error) => {
|
|
73
|
+
* console.error(error);
|
|
74
|
+
* });
|
|
75
|
+
* ```
|
|
76
|
+
*
|
|
77
|
+
* @param {string} contentType The content type to get the collection
|
|
78
|
+
* @return {CollectionBuilder} CollectionBuilder to filter and fetch the collection
|
|
79
|
+
* @template T Represents the type of the content type to fetch. Defaults to unknown
|
|
80
|
+
* @memberof Content
|
|
81
|
+
*/
|
|
82
|
+
getCollection(contentType) {
|
|
83
|
+
return new CollectionBuilder(__classPrivateFieldGet(this, _Content_requestOptions, "f"), __classPrivateFieldGet(this, _Content_serverUrl, "f"), contentType);
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
_Content_requestOptions = new WeakMap(), _Content_serverUrl = new WeakMap();
|
|
87
|
+
//# 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,iBAAiB,EAAE,MAAM,kCAAkC,CAAC;AAIrE;;;;;GAKG;AACH,MAAM,OAAO,OAAO;IAIhB,YAAY,cAA6B,EAAE,SAAiB;QAH5D,0CAA+B;QAC/B,qCAAmB;QAGf,uBAAA,IAAI,2BAAmB,cAAc,MAAA,CAAC;QACtC,uBAAA,IAAI,sBAAc,SAAS,MAAA,CAAC;IAChC,CAAC;IAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAgEG;IACH,aAAa,CAAc,WAAmB;QAC1C,OAAO,IAAI,iBAAiB,CAAI,uBAAA,IAAI,+BAAgB,EAAE,uBAAA,IAAI,0BAAW,EAAE,WAAW,CAAC,CAAC;IACxF,CAAC;CACJ"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export const DEFAULT_VARIANT_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,62 @@
|
|
|
1
|
+
import { Equals } from '../../../query-builder/lucene-syntax';
|
|
2
|
+
import { QueryBuilder } from '../../../query-builder/sdk-query-builder';
|
|
3
|
+
export type SortBy = {
|
|
4
|
+
field: string;
|
|
5
|
+
order: 'asc' | 'desc';
|
|
6
|
+
};
|
|
7
|
+
export type BuildQuery = (qb: QueryBuilder) => Equals;
|
|
8
|
+
export interface ContentTypeMainFields {
|
|
9
|
+
hostName: string;
|
|
10
|
+
modDate: string;
|
|
11
|
+
publishDate: string;
|
|
12
|
+
title: string;
|
|
13
|
+
baseType: string;
|
|
14
|
+
inode: string;
|
|
15
|
+
archived: boolean;
|
|
16
|
+
ownerName: string;
|
|
17
|
+
host: string;
|
|
18
|
+
working: boolean;
|
|
19
|
+
locked: boolean;
|
|
20
|
+
stInode: string;
|
|
21
|
+
contentType: string;
|
|
22
|
+
live: boolean;
|
|
23
|
+
owner: string;
|
|
24
|
+
identifier: string;
|
|
25
|
+
publishUserName: string;
|
|
26
|
+
publishUser: string;
|
|
27
|
+
languageId: number;
|
|
28
|
+
creationDate: string;
|
|
29
|
+
url: string;
|
|
30
|
+
titleImage: string;
|
|
31
|
+
modUserName: string;
|
|
32
|
+
hasLiveVersion: boolean;
|
|
33
|
+
folder: string;
|
|
34
|
+
hasTitleImage: boolean;
|
|
35
|
+
sortOrder: number;
|
|
36
|
+
modUser: string;
|
|
37
|
+
__icon__: string;
|
|
38
|
+
contentTypeIcon: string;
|
|
39
|
+
variant: string;
|
|
40
|
+
}
|
|
41
|
+
export type Contentlet<T> = T & ContentTypeMainFields;
|
|
42
|
+
export type OnFullfilled<T> = ((value: GetCollectionResponse<T>) => GetCollectionResponse<T> | PromiseLike<GetCollectionResponse<T>> | void) | undefined | null;
|
|
43
|
+
export type OnRejected = ((error: GetCollectionError) => GetCollectionError | PromiseLike<GetCollectionError> | void) | undefined | null;
|
|
44
|
+
export interface GetCollectionResponse<T> {
|
|
45
|
+
contentlets: Contentlet<T>[];
|
|
46
|
+
page: number;
|
|
47
|
+
size: number;
|
|
48
|
+
total: number;
|
|
49
|
+
sortedBy?: SortBy[];
|
|
50
|
+
}
|
|
51
|
+
export interface GetCollectionRawResponse<T> {
|
|
52
|
+
entity: {
|
|
53
|
+
jsonObjectView: {
|
|
54
|
+
contentlets: Contentlet<T>[];
|
|
55
|
+
};
|
|
56
|
+
resultsSize: number;
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
export interface GetCollectionError {
|
|
60
|
+
status: number;
|
|
61
|
+
[key: string]: unknown;
|
|
62
|
+
}
|
|
@@ -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,G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AAuB;QAC/C,IAAI,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC;YAChB,MAAM,IAAI,KAAK,CAAC,mDAAmD,CAAC,CAAC;QACzE,CAAC;IACL,CAAC;IAEO,kBAAkB,CAAC,OAAsB;QAC7C,IAAI,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC;YAChB,MAAM,IAAI,KAAK,CAAC,kDAAkD,CAAC,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;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G,IAAI,OAAO,CAAC,GAAG,GAAG,CAAC;IAE5C,OAAO,IAAI,UAAU,CAAC,QAAQ,CAAC,CAAC;AACpC,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export declare const graphqlToPageEntity: ({ page }: {
|
|
2
|
+
page: Record<string, unknown>;
|
|
3
|
+
}) => {
|
|
4
|
+
layout: unknown;
|
|
5
|
+
template: unknown;
|
|
6
|
+
viewAs: unknown;
|
|
7
|
+
urlContentMap: unknown;
|
|
8
|
+
page: {
|
|
9
|
+
[x: string]: unknown;
|
|
10
|
+
};
|
|
11
|
+
containers: Record<string, unknown>;
|
|
12
|
+
};
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
// For now, we are not typing the functions in this file
|
|
2
|
+
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
3
|
+
export const graphqlToPageEntity = ({ page }) => {
|
|
4
|
+
const { layout, template, containers, urlContentMap, viewAs, ...pageAsset } = page;
|
|
5
|
+
return {
|
|
6
|
+
layout,
|
|
7
|
+
template,
|
|
8
|
+
viewAs,
|
|
9
|
+
urlContentMap,
|
|
10
|
+
page: pageAsset,
|
|
11
|
+
containers: parseContainers(containers)
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
const parseContainers = (containers = []) => {
|
|
15
|
+
return containers.reduce((acc, container) => {
|
|
16
|
+
const { path, identifier, containerStructures, containerContentlets, ...rest } = container;
|
|
17
|
+
const key = (path || identifier);
|
|
18
|
+
acc[key] = {
|
|
19
|
+
containerStructures,
|
|
20
|
+
container: {
|
|
21
|
+
path,
|
|
22
|
+
identifier,
|
|
23
|
+
...rest
|
|
24
|
+
},
|
|
25
|
+
contentlets: parseContentletsToUuidMap(containerContentlets)
|
|
26
|
+
};
|
|
27
|
+
return acc;
|
|
28
|
+
}, {});
|
|
29
|
+
};
|
|
30
|
+
const parseContentletsToUuidMap = (containerContentlets) => {
|
|
31
|
+
return containerContentlets.reduce((acc, containerContentlet) => {
|
|
32
|
+
const { uuid, contentlets } = containerContentlet;
|
|
33
|
+
// TODO: This is a temporary solution, we need to find a better way to handle this.
|
|
34
|
+
acc[uuid] = contentlets.map(({ _map = {}, ...rest }) => {
|
|
35
|
+
return {
|
|
36
|
+
..._map,
|
|
37
|
+
...rest
|
|
38
|
+
};
|
|
39
|
+
});
|
|
40
|
+
return acc;
|
|
41
|
+
}, {});
|
|
42
|
+
};
|
|
43
|
+
//# sourceMappingURL=graphql-parser.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"graphql-parser.js","sourceRoot":"","sources":["../../../../../../../libs/sdk/client/src/lib/utils/graphql-parser.ts"],"names":[],"mappings":"AAAA,wDAAwD;AACxD,uDAAuD;AACvD,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,EAAE,IAAI,EAAqC,EAAE,EAAE;IAC/E,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,EAAE,GAAG,SAAS,EAAE,GAAG,IAAI,CAAC;IAEnF,OAAO;QACH,MAAM;QACN,QAAQ;QACR,MAAM;QACN,aAAa;QACb,IAAI,EAAE,SAAS;QACf,UAAU,EAAE,eAAe,CAAC,UAAgB,CAAC;KAChD,CAAC;AACN,CAAC,CAAC;AAEF,MAAM,eAAe,GAAG,CAAC,UAAU,GAAG,EAAE,EAAE,EAAE;IACxC,OAAO,UAAU,CAAC,MAAM,CAAC,CAAC,GAA4B,EAAE,SAAkC,EAAE,EAAE;QAC1F,MAAM,EAAE,IAAI,EAAE,UAAU,EAAE,mBAAmB,EAAE,oBAAoB,EAAE,GAAG,IAAI,EAAE,GAAG,SAAS,CAAC;QAE3F,MAAM,GAAG,GAAG,CAAC,IAAI,IAAI,UAAU,CAAW,CAAC;QAE3C,GAAG,CAAC,GAAG,CAAC,GAAG;YACP,mBAAmB;YACnB,SAAS,EAAE;gBACP,IAAI;gBACJ,UAAU;gBACV,GAAG,IAAI;aACV;YACD,WAAW,EAAE,yBAAyB,CAAC,oBAA0B,CAAC;SACrE,CAAC;QAEF,OAAO,GAAG,CAAC;IACf,CAAC,EAAE,EAAE,CAAC,CAAC;AACX,CAAC,CAAC;AAEF,MAAM,yBAAyB,GAAG,CAAC,oBAA2B,EAAE,EAAE;IAC9D,OAAO,oBAAoB,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,mBAAmB,EAAE,EAAE;QAC5D,MAAM,EAAE,IAAI,EAAE,WAAW,EAAE,GAAG,mBAAmB,CAAC;QAElD,mFAAmF;QACnF,GAAG,CAAC,IAAI,CAAC,GAAG,WAAW,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,GAAG,EAAE,EAAE,GAAG,IAAI,EAAE,EAAE,EAAE;YACnD,OAAO;gBACH,GAAG,IAAI;gBACP,GAAG,IAAI;aACV,CAAC;QACN,CAAC,CAAC,CAAC;QAEH,OAAO,GAAG,CAAC;IACf,CAAC,EAAE,EAAS,CAAC,CAAC;AAClB,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './graphql-parser';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../libs/sdk/client/src/lib/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Equals.js","sourceRoot":"","sources":["../../../../../../../../../libs/sdk/client/src/lib/query-builder/utils/lucene-syntax/Equals.ts"],"names":[],"mappings":";;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
|