@sisense/sdk-query-client 1.21.0 → 1.23.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.
Files changed (58) hide show
  1. package/dist/cjs/helpers/utility-types.d.ts +2 -0
  2. package/dist/cjs/helpers/utility-types.js +2 -0
  3. package/dist/cjs/index.d.ts +6 -0
  4. package/dist/cjs/index.js +26 -0
  5. package/dist/cjs/interfaces.d.ts +10 -0
  6. package/dist/cjs/interfaces.js +2 -0
  7. package/dist/cjs/jaql/get-jaql-query-payload.d.ts +15 -0
  8. package/dist/cjs/jaql/get-jaql-query-payload.js +133 -0
  9. package/dist/cjs/jaql/metadata/highlights.d.ts +4 -0
  10. package/dist/cjs/jaql/metadata/highlights.js +43 -0
  11. package/dist/cjs/jaql/metadata/index.d.ts +1 -0
  12. package/dist/cjs/jaql/metadata/index.js +17 -0
  13. package/dist/cjs/jaql/pivot/pivot-query-utils.d.ts +37 -0
  14. package/dist/cjs/jaql/pivot/pivot-query-utils.js +83 -0
  15. package/dist/cjs/package.json +12 -0
  16. package/dist/cjs/query-api-dispatcher/query-api-dispatcher.d.ts +39 -0
  17. package/dist/cjs/query-api-dispatcher/query-api-dispatcher.js +148 -0
  18. package/dist/cjs/query-client.d.ts +56 -0
  19. package/dist/cjs/query-client.js +203 -0
  20. package/dist/cjs/query-result/get-data-from-query-result.d.ts +12 -0
  21. package/dist/cjs/query-result/get-data-from-query-result.js +77 -0
  22. package/dist/cjs/query-result/index.d.ts +1 -0
  23. package/dist/cjs/query-result/index.js +17 -0
  24. package/dist/cjs/query-task-manager/query-task-manager.d.ts +40 -0
  25. package/dist/cjs/query-task-manager/query-task-manager.js +133 -0
  26. package/dist/cjs/query-task-manager/query-task-passport.d.ts +16 -0
  27. package/dist/cjs/query-task-manager/query-task-passport.js +22 -0
  28. package/dist/cjs/translation/initialize-i18n.d.ts +2 -0
  29. package/dist/cjs/translation/initialize-i18n.js +14 -0
  30. package/dist/cjs/translation/resources/en.d.ts +30 -0
  31. package/dist/cjs/translation/resources/en.js +18 -0
  32. package/dist/cjs/translation/resources/index.d.ts +41 -0
  33. package/dist/cjs/translation/resources/index.js +16 -0
  34. package/dist/cjs/translation/resources/uk.d.ts +2 -0
  35. package/dist/cjs/translation/resources/uk.js +18 -0
  36. package/dist/cjs/translation/translatable-error.d.ts +6 -0
  37. package/dist/cjs/translation/translatable-error.js +18 -0
  38. package/dist/cjs/types.d.ts +88 -0
  39. package/dist/cjs/types.js +2 -0
  40. package/dist/index.d.ts +1 -0
  41. package/dist/index.js +1 -0
  42. package/dist/interfaces.d.ts +2 -2
  43. package/dist/jaql/metadata/highlights.d.ts +1 -2
  44. package/dist/jaql/pivot/pivot-query-utils.d.ts +1 -2
  45. package/dist/query-api-dispatcher/query-api-dispatcher.d.ts +2 -2
  46. package/dist/query-api-dispatcher/query-api-dispatcher.js +5 -2
  47. package/dist/query-client.d.ts +3 -3
  48. package/dist/query-client.js +1 -1
  49. package/dist/query-task-manager/query-task-manager.js +2 -1
  50. package/dist/translation/resources/en.d.ts +16 -0
  51. package/dist/translation/resources/en.js +2 -0
  52. package/dist/translation/resources/index.d.ts +10 -0
  53. package/dist/translation/resources/index.js +6 -0
  54. package/dist/translation/resources/uk.js +11 -9
  55. package/dist/tsconfig.prod.cjs.tsbuildinfo +1 -0
  56. package/dist/types.d.ts +1 -122
  57. package/dist/types.js +1 -5
  58. package/package.json +6 -6
package/dist/types.d.ts CHANGED
@@ -1,5 +1,4 @@
1
- import { Filter, Measure, Attribute, Cell, QueryResultData, DataSource, PivotAttribute, PivotMeasure, PivotQueryResultData, PivotGrandTotals, FilterRelationsJaql, JaqlDataSource } from '@sisense/sdk-data';
2
- import { AnyObject } from './helpers/utility-types.js';
1
+ import { Filter, Measure, Attribute, Cell, QueryResultData, DataSource, PivotAttribute, PivotMeasure, PivotQueryResultData, PivotGrandTotals, FilterRelationsJaql, JaqlDataSource, MetadataItem } from '@sisense/sdk-data';
3
2
  /**
4
3
  * All the properties that fully describe a query you want to send.
5
4
  */
@@ -69,120 +68,10 @@ export type ExecutingPivotQueryResult = {
69
68
  resultPromise: Promise<PivotQueryResultData>;
70
69
  cancel: (reason?: string) => Promise<void>;
71
70
  };
72
- interface DecimalAbbreviations {
73
- k: boolean;
74
- m: boolean;
75
- b: boolean;
76
- t: boolean;
77
- }
78
- export declare enum CurrencyPosition {
79
- PRE = "pre",
80
- POST = "post"
81
- }
82
- export type NumericMask = {
83
- isdefault?: boolean;
84
- abbreviations?: DecimalAbbreviations;
85
- decimals?: 'auto' | number | string;
86
- currency?: {
87
- symbol: string;
88
- position: CurrencyPosition;
89
- };
90
- percent?: boolean;
91
- number?: {
92
- separated: boolean;
93
- };
94
- separated?: boolean;
95
- type?: string;
96
- };
97
- export type DatetimeMask = {
98
- isdefault?: boolean;
99
- years: string;
100
- quarters: string;
101
- months: string;
102
- weeks: string;
103
- minutes: string;
104
- days: string;
105
- type: string;
106
- dateAndTime?: string;
107
- };
108
- export type MetadataItem = {
109
- instanceid?: string;
110
- measure?: MetadataItemJaql;
111
- jaql: MetadataItemJaql;
112
- panel?: string;
113
- isScope?: boolean;
114
- format?: {
115
- mask?: Partial<DatetimeMask> | Partial<NumericMask>;
116
- number?: string;
117
- subtotal?: boolean;
118
- width?: number;
119
- databars?: boolean;
120
- color?: {
121
- type: string;
122
- color?: string;
123
- conditions?: Array<{
124
- color: string;
125
- operator: string;
126
- expression: string | Record<string, any>;
127
- }>;
128
- };
129
- };
130
- field?: {
131
- id?: string;
132
- index?: number;
133
- };
134
- filter?: MetadataItem;
135
- exclude?: MetadataItem;
136
- by?: MetadataItemJaql;
137
- level?: string;
138
- anchor?: string;
139
- from?: string;
140
- to?: string;
141
- };
142
- export type MetadataItemJaql = {
143
- dim?: string;
144
- agg?: string;
145
- datatype?: string;
146
- table?: string;
147
- column?: string;
148
- level?: string;
149
- dateTimeLevel?: string;
150
- bucket?: string;
151
- sort?: string;
152
- in?: {
153
- selected: {
154
- jaql: MetadataItemJaql;
155
- };
156
- };
157
- title?: string;
158
- type?: string;
159
- formula?: string;
160
- context?: {
161
- [itemId: string]: MetadataItemJaql;
162
- };
163
- filter?: MetadataItem;
164
- sortDetails?: {
165
- dir: string;
166
- field?: number;
167
- measurePath?: Record<number, string | number>;
168
- sortingLastDimension?: boolean;
169
- initialized?: boolean;
170
- };
171
- };
172
71
  export type JaqlQueryPayload = QueryOptions & {
173
72
  filterRelations?: FilterRelationsJaql;
174
73
  metadata: MetadataItem[];
175
74
  };
176
- export type DataSourceField = {
177
- column: string;
178
- dimtype: string;
179
- id: string;
180
- indexed: boolean;
181
- merged: boolean;
182
- table: string;
183
- title: string;
184
- type: string;
185
- };
186
75
  export type JaqlResponse = {
187
76
  metadata?: MetadataItem[];
188
77
  headers?: string[];
@@ -195,15 +84,5 @@ export type JaqlResponse = {
195
84
  httpStatusCode?: number;
196
85
  database?: string;
197
86
  };
198
- export type DataSourceSchema = {
199
- title: string;
200
- type: 'extract' | 'live';
201
- } & AnyObject;
202
- export type DataSourceMetadata = {
203
- title: string;
204
- fullname: string;
205
- live: boolean;
206
- };
207
87
  export type AbortRequestFunction = (reason?: string) => void;
208
88
  export type QueryGuid = string;
209
- export {};
package/dist/types.js CHANGED
@@ -1,5 +1 @@
1
- export var CurrencyPosition;
2
- (function (CurrencyPosition) {
3
- CurrencyPosition["PRE"] = "pre";
4
- CurrencyPosition["POST"] = "post";
5
- })(CurrencyPosition = CurrencyPosition || (CurrencyPosition = {}));
1
+ export {};
package/package.json CHANGED
@@ -11,7 +11,7 @@
11
11
  "Sisense",
12
12
  "Compose SDK"
13
13
  ],
14
- "version": "1.21.0",
14
+ "version": "1.23.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.21.0",
24
- "@sisense/sdk-data": "^1.21.0",
25
- "@sisense/sdk-pivot-client": "^1.21.0",
26
- "@sisense/sdk-rest-client": "^1.21.0",
23
+ "@sisense/sdk-common": "^1.23.0",
24
+ "@sisense/sdk-data": "^1.23.0",
25
+ "@sisense/sdk-pivot-client": "^1.23.0",
26
+ "@sisense/sdk-rest-client": "^1.23.0",
27
27
  "@sisense/task-manager": "^0.1.0",
28
28
  "numeral": "^2.0.6",
29
29
  "ts-deepmerge": "6.0.2",
@@ -33,7 +33,7 @@
33
33
  "type-check": "tsc --noEmit",
34
34
  "build": "tsc --build tsconfig.build.json",
35
35
  "build:watch": "tsc --build tsconfig.build.json --watch",
36
- "build:prod": "tsc --project tsconfig.prod.json",
36
+ "build:prod": "tsc --project tsconfig.prod.json && tsc --project tsconfig.prod.cjs.json && cp package.cjs.json ./dist/cjs/package.json",
37
37
  "clean": "rm -rf dist coverage tsconfig.build.tsbuildinfo tsconfig.prod.tsbuildinfo",
38
38
  "lint": "eslint . --fix",
39
39
  "format": "prettier --write .",