@sisense/sdk-query-client 1.6.0 → 1.7.0

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.
@@ -42,9 +42,7 @@ export declare class DimensionalQueryClient implements QueryClient {
42
42
  * @param config - query execution configuration
43
43
  * @throws Error if query description is invalid
44
44
  */
45
- export declare function validateQueryDescription(queryDescription: QueryDescription, config?: {
46
- ignoreQueryLimit?: boolean;
47
- }): void;
45
+ export declare function validateQueryDescription(queryDescription: QueryDescription): void;
48
46
  /**
49
47
  * Validates pivot query description
50
48
  *
@@ -50,7 +50,7 @@ export class DimensionalQueryClient {
50
50
  };
51
51
  }
52
52
  executeCsvQuery(queryDescription, config) {
53
- validateQueryDescription(queryDescription, { ignoreQueryLimit: true });
53
+ validateQueryDescription(queryDescription);
54
54
  const taskPassport = new QueryTaskPassport('SEND_DOWNLOAD_CSV_QUERY', queryDescription, Object.assign(Object.assign({}, (config ? config : {})), { shouldSkipHighlightsWithoutAttributes: this.shouldSkipHighlightsWithoutAttributes || false }));
55
55
  return {
56
56
  resultPromise: new Promise((resolve, reject) => {
@@ -116,17 +116,11 @@ export class DimensionalQueryClient {
116
116
  * @param config - query execution configuration
117
117
  * @throws Error if query description is invalid
118
118
  */
119
- export function validateQueryDescription(queryDescription, config) {
119
+ export function validateQueryDescription(queryDescription) {
120
120
  const { attributes, measures, filters, highlights, count, offset } = queryDescription;
121
121
  if (count && count < 0) {
122
122
  throw new TranslatableError('errors.invalidCountNegative', { count: count.toString() });
123
123
  }
124
- if (!(config === null || config === void 0 ? void 0 : config.ignoreQueryLimit) && count && count > QUERY_DEFAULT_LIMIT) {
125
- throw new TranslatableError('errors.invalidCountLimit', {
126
- count: count.toString(),
127
- limit: QUERY_DEFAULT_LIMIT.toString(),
128
- });
129
- }
130
124
  if (offset && offset < 0) {
131
125
  throw new TranslatableError('errors.invalidOffset', { offset: offset.toString() });
132
126
  }
@@ -165,12 +159,6 @@ export function validatePivotQueryDescription(queryDescription) {
165
159
  if (count && count < 0) {
166
160
  throw new TranslatableError('errors.invalidCountNegative', { count: count.toString() });
167
161
  }
168
- if (count && count > QUERY_DEFAULT_LIMIT) {
169
- throw new TranslatableError('errors.invalidCountLimit', {
170
- count: count.toString(),
171
- limit: QUERY_DEFAULT_LIMIT.toString(),
172
- });
173
- }
174
162
  if (offset && offset < 0) {
175
163
  throw new TranslatableError('errors.invalidOffset', { offset: offset.toString() });
176
164
  }
@@ -6,7 +6,6 @@ export declare const translation: {
6
6
  invalidFilter: string;
7
7
  invalidHighlight: string;
8
8
  invalidCountNegative: string;
9
- invalidCountLimit: string;
10
9
  invalidOffset: string;
11
10
  missingHttpClient: string;
12
11
  missingPostMethod: string;
@@ -6,7 +6,6 @@ export const translation = {
6
6
  invalidFilter: 'Invalid filter "{{filterName}}". Hint: filters for the query can be constructed using the "filterFactory" functions.',
7
7
  invalidHighlight: 'Invalid highlight "{{highlightName}}". Hint: highlights for the query can be constructed using the "filterFactory" functions.',
8
8
  invalidCountNegative: 'Invalid count "{{count}}". Count should be non-negative.',
9
- invalidCountLimit: 'Invalid count "{{count}}". Count should not exceed {{limit}}.',
10
9
  invalidOffset: 'Invalid offset "{{offset}}". Offset should be non-negative.',
11
10
  missingHttpClient: 'Query requires httpClient to work properly.',
12
11
  missingPostMethod: 'httpClient must provide "post" method.',
@@ -10,7 +10,6 @@ export declare const resources: {
10
10
  invalidFilter: string;
11
11
  invalidHighlight: string;
12
12
  invalidCountNegative: string;
13
- invalidCountLimit: string;
14
13
  invalidOffset: string;
15
14
  missingHttpClient: string;
16
15
  missingPostMethod: string;
@@ -24,7 +23,6 @@ export declare const resources: {
24
23
  invalidFilter: string;
25
24
  invalidHighlight: string;
26
25
  invalidCountNegative: string;
27
- invalidCountLimit: string;
28
26
  invalidOffset: string;
29
27
  missingHttpClient: string;
30
28
  missingPostMethod: string;
@@ -6,7 +6,6 @@ export const translation = {
6
6
  invalidFilter: `Недійсний фільтр "{{filterName}}". Підказка: фільтри для запиту можна створити за допомогою функцій "filterFactory".`,
7
7
  invalidHighlight: `Недійсне виділення "{{highlightName}}". Підказка: виділення для запиту можна створити за допомогою функцій "filterFactory".`,
8
8
  invalidCountNegative: `Недійсний count "{{count}}". Count повинен бути не від'ємним.`,
9
- invalidCountLimit: `Недійсний count "{{count}}". Count не повинен перевищувати {{limit}}.`,
10
9
  invalidOffset: `Недійсний offset "{{offset}}". Offset повинен бути не від'ємним.`,
11
10
  missingHttpClient: `Для запиту потрібен httpClient, щоб працювати належним чином.`,
12
11
  missingPostMethod: `httpClient повинен мати метод "post".`,
package/package.json CHANGED
@@ -11,7 +11,7 @@
11
11
  "Sisense",
12
12
  "Compose SDK"
13
13
  ],
14
- "version": "1.6.0",
14
+ "version": "1.7.0",
15
15
  "type": "module",
16
16
  "exports": "./dist/index.js",
17
17
  "main": "./dist/index.js",
@@ -20,10 +20,10 @@
20
20
  "author": "Sisense",
21
21
  "license": "SEE LICENSE IN LICENSE.md",
22
22
  "dependencies": {
23
- "@sisense/sdk-common": "^1.6.0",
24
- "@sisense/sdk-data": "^1.6.0",
25
- "@sisense/sdk-pivot-client": "^1.6.0",
26
- "@sisense/sdk-rest-client": "^1.6.0",
23
+ "@sisense/sdk-common": "^1.7.0",
24
+ "@sisense/sdk-data": "^1.7.0",
25
+ "@sisense/sdk-pivot-client": "^1.7.0",
26
+ "@sisense/sdk-rest-client": "^1.7.0",
27
27
  "@sisense/task-manager": "^0.1.0",
28
28
  "numeral": "^2.0.6",
29
29
  "ts-deepmerge": "6.0.2",