@dremio/js-sdk 0.13.0 → 0.14.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/enterprise/catalog/EnterpriseCatalogResource.d.ts +446 -0
- package/dist/enterprise/catalog/EnterpriseCatalogResource.js +27 -0
- package/dist/enterprise/catalog/EnterpriseCatalogResource.js.map +1 -1
- package/dist/enterprise/catalog/catalogSearch/CatalogSearchParams.d.ts +20 -0
- package/dist/enterprise/catalog/catalogSearch/CatalogSearchParams.js +46 -0
- package/dist/enterprise/catalog/catalogSearch/CatalogSearchParams.js.map +1 -0
- package/dist/enterprise/catalog/catalogSearch/SearchApiResponse.d.ts +133 -0
- package/dist/enterprise/catalog/catalogSearch/SearchApiResponse.js +17 -0
- package/dist/enterprise/catalog/catalogSearch/SearchApiResponse.js.map +1 -0
- package/dist/enterprise/catalog/catalogSearch/SearchResult.d.ts +123 -0
- package/dist/enterprise/catalog/catalogSearch/SearchResult.js +27 -0
- package/dist/enterprise/catalog/catalogSearch/SearchResult.js.map +1 -0
- package/dist/enterprise/catalog/catalogSearch/catalogSearchParamsToObject.d.ts +5 -0
- package/dist/enterprise/catalog/catalogSearch/catalogSearchParamsToObject.js +52 -0
- package/dist/enterprise/catalog/catalogSearch/catalogSearchParamsToObject.js.map +1 -0
- package/dist/enterprise/catalog/catalogSearch/createCatalogSearch.d.ts +228 -0
- package/dist/enterprise/catalog/catalogSearch/createCatalogSearch.js +40 -0
- package/dist/enterprise/catalog/catalogSearch/createCatalogSearch.js.map +1 -0
- package/dist/enterprise/catalog/catalogSearch/mapSearchResult.d.ts +222 -0
- package/dist/enterprise/catalog/catalogSearch/mapSearchResult.js +162 -0
- package/dist/enterprise/catalog/catalogSearch/mapSearchResult.js.map +1 -0
- package/package.json +1 -1
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import type { SonarV3Config } from "../../common/Config.ts";
|
|
2
|
+
import type { SignalParam } from "../../common/Params.ts";
|
|
2
3
|
import type { EnterpriseFunctionCatalogReference, EnterpriseHomeCatalogReference, EnterpriseSourceCatalogReference, EnterpriseSpaceCatalogReference } from "./CatalogReferences/index.ts";
|
|
3
4
|
import { baseRetrieve, baseRetrieveByPath } from "./catalogRetrieve.ts";
|
|
5
|
+
import type { CatalogSearchParams } from "./catalogSearch/CatalogSearchParams.ts";
|
|
4
6
|
export declare class EnterpriseCatalogResource {
|
|
5
7
|
#private;
|
|
6
8
|
retrieve: ReturnType<typeof baseRetrieve>;
|
|
@@ -9,5 +11,449 @@ export declare class EnterpriseCatalogResource {
|
|
|
9
11
|
list(): {
|
|
10
12
|
data(): AsyncGenerator<EnterpriseFunctionCatalogReference | EnterpriseHomeCatalogReference | EnterpriseSourceCatalogReference | EnterpriseSpaceCatalogReference, void, unknown>;
|
|
11
13
|
};
|
|
14
|
+
search(params: CatalogSearchParams): {
|
|
15
|
+
data({ signal }?: SignalParam): AsyncGenerator<{
|
|
16
|
+
readonly catalogReference: import("./CatalogReferences/EnterpriseFolderCatalogReference.ts").EnterpriseFolderCatalogReference;
|
|
17
|
+
readonly category: "FOLDER";
|
|
18
|
+
readonly owner: {
|
|
19
|
+
id: string;
|
|
20
|
+
type: "USER" | "ROLE";
|
|
21
|
+
username: string;
|
|
22
|
+
} | undefined;
|
|
23
|
+
readonly wiki: string | null;
|
|
24
|
+
readonly content?: undefined;
|
|
25
|
+
readonly createdAt?: undefined;
|
|
26
|
+
readonly id?: undefined;
|
|
27
|
+
readonly lastModifiedAt?: undefined;
|
|
28
|
+
readonly name?: undefined;
|
|
29
|
+
readonly columns?: undefined;
|
|
30
|
+
readonly labels?: undefined;
|
|
31
|
+
readonly functionSql?: undefined;
|
|
32
|
+
readonly error?: undefined;
|
|
33
|
+
readonly finishTime?: undefined;
|
|
34
|
+
readonly queriedDatasets?: undefined;
|
|
35
|
+
readonly queryType?: undefined;
|
|
36
|
+
readonly sql?: undefined;
|
|
37
|
+
readonly startTime?: undefined;
|
|
38
|
+
readonly state?: undefined;
|
|
39
|
+
readonly user?: undefined;
|
|
40
|
+
} | {
|
|
41
|
+
readonly category: "SCRIPT";
|
|
42
|
+
readonly content: string;
|
|
43
|
+
readonly createdAt: Date;
|
|
44
|
+
readonly id: string;
|
|
45
|
+
readonly lastModifiedAt: Date;
|
|
46
|
+
readonly name: string;
|
|
47
|
+
readonly owner: {
|
|
48
|
+
id: string;
|
|
49
|
+
type: "USER" | "ROLE";
|
|
50
|
+
username: string;
|
|
51
|
+
};
|
|
52
|
+
readonly catalogReference?: undefined;
|
|
53
|
+
readonly wiki?: undefined;
|
|
54
|
+
readonly columns?: undefined;
|
|
55
|
+
readonly labels?: undefined;
|
|
56
|
+
readonly functionSql?: undefined;
|
|
57
|
+
readonly error?: undefined;
|
|
58
|
+
readonly finishTime?: undefined;
|
|
59
|
+
readonly queriedDatasets?: undefined;
|
|
60
|
+
readonly queryType?: undefined;
|
|
61
|
+
readonly sql?: undefined;
|
|
62
|
+
readonly startTime?: undefined;
|
|
63
|
+
readonly state?: undefined;
|
|
64
|
+
readonly user?: undefined;
|
|
65
|
+
} | {
|
|
66
|
+
readonly catalogReference: import("./CatalogReferences/EnterpriseDatasetCatalogReference.ts").EnterpriseDatasetCatalogReference;
|
|
67
|
+
readonly category: "REFLECTION";
|
|
68
|
+
readonly createdAt: Date;
|
|
69
|
+
readonly id: string;
|
|
70
|
+
readonly lastModifiedAt: Date;
|
|
71
|
+
readonly name: string;
|
|
72
|
+
readonly owner?: undefined;
|
|
73
|
+
readonly wiki?: undefined;
|
|
74
|
+
readonly content?: undefined;
|
|
75
|
+
readonly columns?: undefined;
|
|
76
|
+
readonly labels?: undefined;
|
|
77
|
+
readonly functionSql?: undefined;
|
|
78
|
+
readonly error?: undefined;
|
|
79
|
+
readonly finishTime?: undefined;
|
|
80
|
+
readonly queriedDatasets?: undefined;
|
|
81
|
+
readonly queryType?: undefined;
|
|
82
|
+
readonly sql?: undefined;
|
|
83
|
+
readonly startTime?: undefined;
|
|
84
|
+
readonly state?: undefined;
|
|
85
|
+
readonly user?: undefined;
|
|
86
|
+
} | {
|
|
87
|
+
readonly catalogReference: EnterpriseSourceCatalogReference;
|
|
88
|
+
readonly category: "SOURCE";
|
|
89
|
+
readonly createdAt: Date;
|
|
90
|
+
readonly owner: {
|
|
91
|
+
id: string;
|
|
92
|
+
type: "USER" | "ROLE";
|
|
93
|
+
username: string;
|
|
94
|
+
} | undefined;
|
|
95
|
+
readonly wiki?: undefined;
|
|
96
|
+
readonly content?: undefined;
|
|
97
|
+
readonly id?: undefined;
|
|
98
|
+
readonly lastModifiedAt?: undefined;
|
|
99
|
+
readonly name?: undefined;
|
|
100
|
+
readonly columns?: undefined;
|
|
101
|
+
readonly labels?: undefined;
|
|
102
|
+
readonly functionSql?: undefined;
|
|
103
|
+
readonly error?: undefined;
|
|
104
|
+
readonly finishTime?: undefined;
|
|
105
|
+
readonly queriedDatasets?: undefined;
|
|
106
|
+
readonly queryType?: undefined;
|
|
107
|
+
readonly sql?: undefined;
|
|
108
|
+
readonly startTime?: undefined;
|
|
109
|
+
readonly state?: undefined;
|
|
110
|
+
readonly user?: undefined;
|
|
111
|
+
} | {
|
|
112
|
+
readonly catalogReference: EnterpriseSpaceCatalogReference;
|
|
113
|
+
readonly category: "SPACE";
|
|
114
|
+
readonly createdAt: Date | null;
|
|
115
|
+
readonly lastModifiedAt: Date | null;
|
|
116
|
+
readonly owner: {
|
|
117
|
+
id: string;
|
|
118
|
+
type: "USER" | "ROLE";
|
|
119
|
+
username: string;
|
|
120
|
+
};
|
|
121
|
+
readonly wiki: string | null;
|
|
122
|
+
readonly content?: undefined;
|
|
123
|
+
readonly id?: undefined;
|
|
124
|
+
readonly name?: undefined;
|
|
125
|
+
readonly columns?: undefined;
|
|
126
|
+
readonly labels?: undefined;
|
|
127
|
+
readonly functionSql?: undefined;
|
|
128
|
+
readonly error?: undefined;
|
|
129
|
+
readonly finishTime?: undefined;
|
|
130
|
+
readonly queriedDatasets?: undefined;
|
|
131
|
+
readonly queryType?: undefined;
|
|
132
|
+
readonly sql?: undefined;
|
|
133
|
+
readonly startTime?: undefined;
|
|
134
|
+
readonly state?: undefined;
|
|
135
|
+
readonly user?: undefined;
|
|
136
|
+
} | {
|
|
137
|
+
readonly catalogReference: import("./CatalogReferences/EnterpriseDatasetCatalogReference.ts").EnterpriseDatasetCatalogReference;
|
|
138
|
+
readonly category: "TABLE";
|
|
139
|
+
readonly columns: string[];
|
|
140
|
+
readonly createdAt: Date | null;
|
|
141
|
+
readonly labels: string[];
|
|
142
|
+
readonly lastModifiedAt: Date | null;
|
|
143
|
+
readonly owner: {
|
|
144
|
+
id: string;
|
|
145
|
+
type: "USER" | "ROLE";
|
|
146
|
+
username: string;
|
|
147
|
+
};
|
|
148
|
+
readonly wiki: string | null;
|
|
149
|
+
readonly content?: undefined;
|
|
150
|
+
readonly id?: undefined;
|
|
151
|
+
readonly name?: undefined;
|
|
152
|
+
readonly functionSql?: undefined;
|
|
153
|
+
readonly error?: undefined;
|
|
154
|
+
readonly finishTime?: undefined;
|
|
155
|
+
readonly queriedDatasets?: undefined;
|
|
156
|
+
readonly queryType?: undefined;
|
|
157
|
+
readonly sql?: undefined;
|
|
158
|
+
readonly startTime?: undefined;
|
|
159
|
+
readonly state?: undefined;
|
|
160
|
+
readonly user?: undefined;
|
|
161
|
+
} | {
|
|
162
|
+
readonly catalogReference: EnterpriseFunctionCatalogReference;
|
|
163
|
+
readonly category: "FUNCTION";
|
|
164
|
+
readonly createdAt: Date;
|
|
165
|
+
readonly functionSql: string;
|
|
166
|
+
readonly lastModifiedAt: Date;
|
|
167
|
+
readonly owner: {
|
|
168
|
+
id: string;
|
|
169
|
+
type: "USER" | "ROLE";
|
|
170
|
+
username: string;
|
|
171
|
+
};
|
|
172
|
+
readonly wiki?: undefined;
|
|
173
|
+
readonly content?: undefined;
|
|
174
|
+
readonly id?: undefined;
|
|
175
|
+
readonly name?: undefined;
|
|
176
|
+
readonly columns?: undefined;
|
|
177
|
+
readonly labels?: undefined;
|
|
178
|
+
readonly error?: undefined;
|
|
179
|
+
readonly finishTime?: undefined;
|
|
180
|
+
readonly queriedDatasets?: undefined;
|
|
181
|
+
readonly queryType?: undefined;
|
|
182
|
+
readonly sql?: undefined;
|
|
183
|
+
readonly startTime?: undefined;
|
|
184
|
+
readonly state?: undefined;
|
|
185
|
+
readonly user?: undefined;
|
|
186
|
+
} | {
|
|
187
|
+
readonly catalogReference: import("./CatalogReferences/EnterpriseDatasetCatalogReference.ts").EnterpriseDatasetCatalogReference;
|
|
188
|
+
readonly category: "VIEW";
|
|
189
|
+
readonly columns: string[];
|
|
190
|
+
readonly createdAt: Date | null;
|
|
191
|
+
readonly labels: string[];
|
|
192
|
+
readonly lastModifiedAt: Date | null;
|
|
193
|
+
readonly owner: {
|
|
194
|
+
id: string;
|
|
195
|
+
type: "USER" | "ROLE";
|
|
196
|
+
username: string;
|
|
197
|
+
};
|
|
198
|
+
readonly wiki: string | null;
|
|
199
|
+
readonly content?: undefined;
|
|
200
|
+
readonly id?: undefined;
|
|
201
|
+
readonly name?: undefined;
|
|
202
|
+
readonly functionSql?: undefined;
|
|
203
|
+
readonly error?: undefined;
|
|
204
|
+
readonly finishTime?: undefined;
|
|
205
|
+
readonly queriedDatasets?: undefined;
|
|
206
|
+
readonly queryType?: undefined;
|
|
207
|
+
readonly sql?: undefined;
|
|
208
|
+
readonly startTime?: undefined;
|
|
209
|
+
readonly state?: undefined;
|
|
210
|
+
readonly user?: undefined;
|
|
211
|
+
} | {
|
|
212
|
+
readonly category: "JOB";
|
|
213
|
+
readonly error: string | undefined;
|
|
214
|
+
readonly finishTime: Date;
|
|
215
|
+
readonly id: string;
|
|
216
|
+
readonly queriedDatasets: import("./CatalogReferences/EnterpriseDatasetCatalogReference.ts").EnterpriseDatasetCatalogReference[];
|
|
217
|
+
readonly queryType: import("../interfaces.ts").Job["queryType"];
|
|
218
|
+
readonly sql: import("../index.ts").Query;
|
|
219
|
+
readonly startTime: Date;
|
|
220
|
+
readonly state: import("../interfaces.ts").Job["state"];
|
|
221
|
+
readonly user: any;
|
|
222
|
+
readonly catalogReference?: undefined;
|
|
223
|
+
readonly owner?: undefined;
|
|
224
|
+
readonly wiki?: undefined;
|
|
225
|
+
readonly content?: undefined;
|
|
226
|
+
readonly createdAt?: undefined;
|
|
227
|
+
readonly lastModifiedAt?: undefined;
|
|
228
|
+
readonly name?: undefined;
|
|
229
|
+
readonly columns?: undefined;
|
|
230
|
+
readonly labels?: undefined;
|
|
231
|
+
readonly functionSql?: undefined;
|
|
232
|
+
}, void, unknown>;
|
|
233
|
+
getPage: ({ pageParam, signal }?: {
|
|
234
|
+
pageParam?: string;
|
|
235
|
+
} & SignalParam) => import("ts-results-es").AsyncResult<{
|
|
236
|
+
data: ({
|
|
237
|
+
readonly catalogReference: import("./CatalogReferences/EnterpriseFolderCatalogReference.ts").EnterpriseFolderCatalogReference;
|
|
238
|
+
readonly category: "FOLDER";
|
|
239
|
+
readonly owner: {
|
|
240
|
+
id: string;
|
|
241
|
+
type: "USER" | "ROLE";
|
|
242
|
+
username: string;
|
|
243
|
+
} | undefined;
|
|
244
|
+
readonly wiki: string | null;
|
|
245
|
+
readonly content?: undefined;
|
|
246
|
+
readonly createdAt?: undefined;
|
|
247
|
+
readonly id?: undefined;
|
|
248
|
+
readonly lastModifiedAt?: undefined;
|
|
249
|
+
readonly name?: undefined;
|
|
250
|
+
readonly columns?: undefined;
|
|
251
|
+
readonly labels?: undefined;
|
|
252
|
+
readonly functionSql?: undefined;
|
|
253
|
+
readonly error?: undefined;
|
|
254
|
+
readonly finishTime?: undefined;
|
|
255
|
+
readonly queriedDatasets?: undefined;
|
|
256
|
+
readonly queryType?: undefined;
|
|
257
|
+
readonly sql?: undefined;
|
|
258
|
+
readonly startTime?: undefined;
|
|
259
|
+
readonly state?: undefined;
|
|
260
|
+
readonly user?: undefined;
|
|
261
|
+
} | {
|
|
262
|
+
readonly category: "SCRIPT";
|
|
263
|
+
readonly content: string;
|
|
264
|
+
readonly createdAt: Date;
|
|
265
|
+
readonly id: string;
|
|
266
|
+
readonly lastModifiedAt: Date;
|
|
267
|
+
readonly name: string;
|
|
268
|
+
readonly owner: {
|
|
269
|
+
id: string;
|
|
270
|
+
type: "USER" | "ROLE";
|
|
271
|
+
username: string;
|
|
272
|
+
};
|
|
273
|
+
readonly catalogReference?: undefined;
|
|
274
|
+
readonly wiki?: undefined;
|
|
275
|
+
readonly columns?: undefined;
|
|
276
|
+
readonly labels?: undefined;
|
|
277
|
+
readonly functionSql?: undefined;
|
|
278
|
+
readonly error?: undefined;
|
|
279
|
+
readonly finishTime?: undefined;
|
|
280
|
+
readonly queriedDatasets?: undefined;
|
|
281
|
+
readonly queryType?: undefined;
|
|
282
|
+
readonly sql?: undefined;
|
|
283
|
+
readonly startTime?: undefined;
|
|
284
|
+
readonly state?: undefined;
|
|
285
|
+
readonly user?: undefined;
|
|
286
|
+
} | {
|
|
287
|
+
readonly catalogReference: import("./CatalogReferences/EnterpriseDatasetCatalogReference.ts").EnterpriseDatasetCatalogReference;
|
|
288
|
+
readonly category: "REFLECTION";
|
|
289
|
+
readonly createdAt: Date;
|
|
290
|
+
readonly id: string;
|
|
291
|
+
readonly lastModifiedAt: Date;
|
|
292
|
+
readonly name: string;
|
|
293
|
+
readonly owner?: undefined;
|
|
294
|
+
readonly wiki?: undefined;
|
|
295
|
+
readonly content?: undefined;
|
|
296
|
+
readonly columns?: undefined;
|
|
297
|
+
readonly labels?: undefined;
|
|
298
|
+
readonly functionSql?: undefined;
|
|
299
|
+
readonly error?: undefined;
|
|
300
|
+
readonly finishTime?: undefined;
|
|
301
|
+
readonly queriedDatasets?: undefined;
|
|
302
|
+
readonly queryType?: undefined;
|
|
303
|
+
readonly sql?: undefined;
|
|
304
|
+
readonly startTime?: undefined;
|
|
305
|
+
readonly state?: undefined;
|
|
306
|
+
readonly user?: undefined;
|
|
307
|
+
} | {
|
|
308
|
+
readonly catalogReference: EnterpriseSourceCatalogReference;
|
|
309
|
+
readonly category: "SOURCE";
|
|
310
|
+
readonly createdAt: Date;
|
|
311
|
+
readonly owner: {
|
|
312
|
+
id: string;
|
|
313
|
+
type: "USER" | "ROLE";
|
|
314
|
+
username: string;
|
|
315
|
+
} | undefined;
|
|
316
|
+
readonly wiki?: undefined;
|
|
317
|
+
readonly content?: undefined;
|
|
318
|
+
readonly id?: undefined;
|
|
319
|
+
readonly lastModifiedAt?: undefined;
|
|
320
|
+
readonly name?: undefined;
|
|
321
|
+
readonly columns?: undefined;
|
|
322
|
+
readonly labels?: undefined;
|
|
323
|
+
readonly functionSql?: undefined;
|
|
324
|
+
readonly error?: undefined;
|
|
325
|
+
readonly finishTime?: undefined;
|
|
326
|
+
readonly queriedDatasets?: undefined;
|
|
327
|
+
readonly queryType?: undefined;
|
|
328
|
+
readonly sql?: undefined;
|
|
329
|
+
readonly startTime?: undefined;
|
|
330
|
+
readonly state?: undefined;
|
|
331
|
+
readonly user?: undefined;
|
|
332
|
+
} | {
|
|
333
|
+
readonly catalogReference: EnterpriseSpaceCatalogReference;
|
|
334
|
+
readonly category: "SPACE";
|
|
335
|
+
readonly createdAt: Date | null;
|
|
336
|
+
readonly lastModifiedAt: Date | null;
|
|
337
|
+
readonly owner: {
|
|
338
|
+
id: string;
|
|
339
|
+
type: "USER" | "ROLE";
|
|
340
|
+
username: string;
|
|
341
|
+
};
|
|
342
|
+
readonly wiki: string | null;
|
|
343
|
+
readonly content?: undefined;
|
|
344
|
+
readonly id?: undefined;
|
|
345
|
+
readonly name?: undefined;
|
|
346
|
+
readonly columns?: undefined;
|
|
347
|
+
readonly labels?: undefined;
|
|
348
|
+
readonly functionSql?: undefined;
|
|
349
|
+
readonly error?: undefined;
|
|
350
|
+
readonly finishTime?: undefined;
|
|
351
|
+
readonly queriedDatasets?: undefined;
|
|
352
|
+
readonly queryType?: undefined;
|
|
353
|
+
readonly sql?: undefined;
|
|
354
|
+
readonly startTime?: undefined;
|
|
355
|
+
readonly state?: undefined;
|
|
356
|
+
readonly user?: undefined;
|
|
357
|
+
} | {
|
|
358
|
+
readonly catalogReference: import("./CatalogReferences/EnterpriseDatasetCatalogReference.ts").EnterpriseDatasetCatalogReference;
|
|
359
|
+
readonly category: "TABLE";
|
|
360
|
+
readonly columns: string[];
|
|
361
|
+
readonly createdAt: Date | null;
|
|
362
|
+
readonly labels: string[];
|
|
363
|
+
readonly lastModifiedAt: Date | null;
|
|
364
|
+
readonly owner: {
|
|
365
|
+
id: string;
|
|
366
|
+
type: "USER" | "ROLE";
|
|
367
|
+
username: string;
|
|
368
|
+
};
|
|
369
|
+
readonly wiki: string | null;
|
|
370
|
+
readonly content?: undefined;
|
|
371
|
+
readonly id?: undefined;
|
|
372
|
+
readonly name?: undefined;
|
|
373
|
+
readonly functionSql?: undefined;
|
|
374
|
+
readonly error?: undefined;
|
|
375
|
+
readonly finishTime?: undefined;
|
|
376
|
+
readonly queriedDatasets?: undefined;
|
|
377
|
+
readonly queryType?: undefined;
|
|
378
|
+
readonly sql?: undefined;
|
|
379
|
+
readonly startTime?: undefined;
|
|
380
|
+
readonly state?: undefined;
|
|
381
|
+
readonly user?: undefined;
|
|
382
|
+
} | {
|
|
383
|
+
readonly catalogReference: EnterpriseFunctionCatalogReference;
|
|
384
|
+
readonly category: "FUNCTION";
|
|
385
|
+
readonly createdAt: Date;
|
|
386
|
+
readonly functionSql: string;
|
|
387
|
+
readonly lastModifiedAt: Date;
|
|
388
|
+
readonly owner: {
|
|
389
|
+
id: string;
|
|
390
|
+
type: "USER" | "ROLE";
|
|
391
|
+
username: string;
|
|
392
|
+
};
|
|
393
|
+
readonly wiki?: undefined;
|
|
394
|
+
readonly content?: undefined;
|
|
395
|
+
readonly id?: undefined;
|
|
396
|
+
readonly name?: undefined;
|
|
397
|
+
readonly columns?: undefined;
|
|
398
|
+
readonly labels?: undefined;
|
|
399
|
+
readonly error?: undefined;
|
|
400
|
+
readonly finishTime?: undefined;
|
|
401
|
+
readonly queriedDatasets?: undefined;
|
|
402
|
+
readonly queryType?: undefined;
|
|
403
|
+
readonly sql?: undefined;
|
|
404
|
+
readonly startTime?: undefined;
|
|
405
|
+
readonly state?: undefined;
|
|
406
|
+
readonly user?: undefined;
|
|
407
|
+
} | {
|
|
408
|
+
readonly catalogReference: import("./CatalogReferences/EnterpriseDatasetCatalogReference.ts").EnterpriseDatasetCatalogReference;
|
|
409
|
+
readonly category: "VIEW";
|
|
410
|
+
readonly columns: string[];
|
|
411
|
+
readonly createdAt: Date | null;
|
|
412
|
+
readonly labels: string[];
|
|
413
|
+
readonly lastModifiedAt: Date | null;
|
|
414
|
+
readonly owner: {
|
|
415
|
+
id: string;
|
|
416
|
+
type: "USER" | "ROLE";
|
|
417
|
+
username: string;
|
|
418
|
+
};
|
|
419
|
+
readonly wiki: string | null;
|
|
420
|
+
readonly content?: undefined;
|
|
421
|
+
readonly id?: undefined;
|
|
422
|
+
readonly name?: undefined;
|
|
423
|
+
readonly functionSql?: undefined;
|
|
424
|
+
readonly error?: undefined;
|
|
425
|
+
readonly finishTime?: undefined;
|
|
426
|
+
readonly queriedDatasets?: undefined;
|
|
427
|
+
readonly queryType?: undefined;
|
|
428
|
+
readonly sql?: undefined;
|
|
429
|
+
readonly startTime?: undefined;
|
|
430
|
+
readonly state?: undefined;
|
|
431
|
+
readonly user?: undefined;
|
|
432
|
+
} | {
|
|
433
|
+
readonly category: "JOB";
|
|
434
|
+
readonly error: string | undefined;
|
|
435
|
+
readonly finishTime: Date;
|
|
436
|
+
readonly id: string;
|
|
437
|
+
readonly queriedDatasets: import("./CatalogReferences/EnterpriseDatasetCatalogReference.ts").EnterpriseDatasetCatalogReference[];
|
|
438
|
+
readonly queryType: import("../interfaces.ts").Job["queryType"];
|
|
439
|
+
readonly sql: import("../index.ts").Query;
|
|
440
|
+
readonly startTime: Date;
|
|
441
|
+
readonly state: import("../interfaces.ts").Job["state"];
|
|
442
|
+
readonly user: any;
|
|
443
|
+
readonly catalogReference?: undefined;
|
|
444
|
+
readonly owner?: undefined;
|
|
445
|
+
readonly wiki?: undefined;
|
|
446
|
+
readonly content?: undefined;
|
|
447
|
+
readonly createdAt?: undefined;
|
|
448
|
+
readonly lastModifiedAt?: undefined;
|
|
449
|
+
readonly name?: undefined;
|
|
450
|
+
readonly columns?: undefined;
|
|
451
|
+
readonly labels?: undefined;
|
|
452
|
+
readonly functionSql?: undefined;
|
|
453
|
+
})[];
|
|
454
|
+
nextPageToken: string | undefined;
|
|
455
|
+
sessionId: string;
|
|
456
|
+
}, import("../index.ts").HttpError>;
|
|
457
|
+
};
|
|
12
458
|
_catalogReferenceFromEntity(entity: unknown): import("./CatalogReferences/index.ts").EnterpriseCatalogReference;
|
|
13
459
|
}
|
|
@@ -16,14 +16,17 @@
|
|
|
16
16
|
import { catalogReferenceEntityToProperties } from "../../oss/catalog/CatalogReferences/utils/catalogReferenceEntityToProperties.js";
|
|
17
17
|
import { catalogReferenceFromProperties } from "./catalogReferenceFromProperties.js";
|
|
18
18
|
import { baseRetrieve, baseRetrieveByPath } from "./catalogRetrieve.js";
|
|
19
|
+
import { createCatalogSearch } from "./catalogSearch/createCatalogSearch.js";
|
|
19
20
|
export class EnterpriseCatalogResource {
|
|
20
21
|
#config;
|
|
22
|
+
#catalogSearch;
|
|
21
23
|
retrieve;
|
|
22
24
|
retrieveByPath;
|
|
23
25
|
constructor(config) {
|
|
24
26
|
this.#config = config;
|
|
25
27
|
this.retrieve = baseRetrieve(config);
|
|
26
28
|
this.retrieveByPath = baseRetrieveByPath(config);
|
|
29
|
+
this.#catalogSearch = createCatalogSearch(this.#config, this._catalogReferenceFromEntity.bind(this));
|
|
27
30
|
}
|
|
28
31
|
list() {
|
|
29
32
|
const getRoot = () => this.#config
|
|
@@ -37,6 +40,30 @@ export class EnterpriseCatalogResource {
|
|
|
37
40
|
},
|
|
38
41
|
};
|
|
39
42
|
}
|
|
43
|
+
search(params) {
|
|
44
|
+
const getPage = ({ pageParam, signal } = {}) => this.#catalogSearch(params, { pageParam, signal });
|
|
45
|
+
return {
|
|
46
|
+
async *data({ signal } = {}) {
|
|
47
|
+
const firstPageResult = await getPage({ signal }).promise;
|
|
48
|
+
if (firstPageResult.isErr()) {
|
|
49
|
+
throw firstPageResult.error;
|
|
50
|
+
}
|
|
51
|
+
const firstPage = firstPageResult.value;
|
|
52
|
+
yield* firstPage.data;
|
|
53
|
+
let nextPageToken = firstPage.nextPageToken;
|
|
54
|
+
while (nextPageToken && !signal?.aborted) {
|
|
55
|
+
const nextPageResult = await getPage({ pageParam: nextPageToken, signal }).promise;
|
|
56
|
+
if (nextPageResult.isErr()) {
|
|
57
|
+
throw nextPageResult.error;
|
|
58
|
+
}
|
|
59
|
+
const nextPage = nextPageResult.value;
|
|
60
|
+
yield* nextPage.data;
|
|
61
|
+
nextPageToken = nextPage.nextPageToken;
|
|
62
|
+
}
|
|
63
|
+
},
|
|
64
|
+
getPage,
|
|
65
|
+
};
|
|
66
|
+
}
|
|
40
67
|
_catalogReferenceFromEntity(entity) {
|
|
41
68
|
return catalogReferenceFromProperties(catalogReferenceEntityToProperties(entity), this.#config, this.retrieveByPath);
|
|
42
69
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EnterpriseCatalogResource.js","sourceRoot":"","sources":["../../../src/enterprise/catalog/EnterpriseCatalogResource.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;
|
|
1
|
+
{"version":3,"file":"EnterpriseCatalogResource.js","sourceRoot":"","sources":["../../../src/enterprise/catalog/EnterpriseCatalogResource.ts"],"names":[],"mappings":"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","sourcesContent":["/*\n * Copyright (C) 2024-2025 Dremio Corporation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type { SonarV3Config } from \"../../common/Config.ts\";\nimport type { SignalParam } from \"../../common/Params.ts\";\nimport { catalogReferenceEntityToProperties } from \"../../oss/catalog/CatalogReferences/utils/catalogReferenceEntityToProperties.ts\";\nimport { catalogReferenceFromProperties } from \"./catalogReferenceFromProperties.ts\";\nimport type {\n EnterpriseFunctionCatalogReference,\n EnterpriseHomeCatalogReference,\n EnterpriseSourceCatalogReference,\n EnterpriseSpaceCatalogReference,\n} from \"./CatalogReferences/index.ts\";\nimport { baseRetrieve, baseRetrieveByPath } from \"./catalogRetrieve.ts\";\nimport type { CatalogSearchParams } from \"./catalogSearch/CatalogSearchParams.ts\";\nimport { createCatalogSearch } from \"./catalogSearch/createCatalogSearch.ts\";\n\nexport class EnterpriseCatalogResource {\n #config: SonarV3Config;\n #catalogSearch: ReturnType<typeof createCatalogSearch>;\n\n retrieve: ReturnType<typeof baseRetrieve>;\n retrieveByPath: ReturnType<typeof baseRetrieveByPath>;\n\n constructor(config: SonarV3Config) {\n this.#config = config;\n this.retrieve = baseRetrieve(config);\n this.retrieveByPath = baseRetrieveByPath(config);\n this.#catalogSearch = createCatalogSearch(\n this.#config,\n this._catalogReferenceFromEntity.bind(this),\n );\n }\n\n list() {\n const getRoot = () =>\n this.#config\n .sonarV3Request(\"catalog\")\n .map((res) => res.json() as Promise<{ data: unknown[] }>)\n .map((response) =>\n response.data.map(\n (entity: unknown) =>\n catalogReferenceFromProperties(\n catalogReferenceEntityToProperties(entity),\n this.#config,\n this.retrieveByPath,\n ) as\n | EnterpriseFunctionCatalogReference\n | EnterpriseHomeCatalogReference\n | EnterpriseSourceCatalogReference\n | EnterpriseSpaceCatalogReference,\n ),\n )\n .promise.then((result) => result.unwrap());\n return {\n async *data() {\n yield* await getRoot();\n },\n };\n }\n\n search(params: CatalogSearchParams) {\n const getPage = ({ pageParam, signal }: { pageParam?: string } & SignalParam = {}) =>\n this.#catalogSearch(params, { pageParam, signal });\n return {\n async *data({ signal }: SignalParam = {}) {\n const firstPageResult = await getPage({ signal }).promise;\n if (firstPageResult.isErr()) {\n throw firstPageResult.error;\n }\n const firstPage = firstPageResult.value;\n yield* firstPage.data;\n let nextPageToken = firstPage.nextPageToken;\n while (nextPageToken && !signal?.aborted) {\n const nextPageResult = await getPage({ pageParam: nextPageToken, signal }).promise;\n if (nextPageResult.isErr()) {\n throw nextPageResult.error;\n }\n const nextPage = nextPageResult.value;\n yield* nextPage.data;\n nextPageToken = nextPage.nextPageToken;\n }\n },\n getPage,\n };\n }\n\n _catalogReferenceFromEntity(entity: unknown) {\n return catalogReferenceFromProperties(\n catalogReferenceEntityToProperties(entity),\n this.#config,\n this.retrieveByPath,\n );\n }\n}\n"]}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { SearchCategoryType } from "./SearchResult.ts";
|
|
2
|
+
export type CatalogSearchParams = {
|
|
3
|
+
searchText: string;
|
|
4
|
+
in?: string;
|
|
5
|
+
owner?: string;
|
|
6
|
+
startTime?: DateRangeOption;
|
|
7
|
+
lastModified?: DateRangeOption;
|
|
8
|
+
type?: Set<SearchCategoryType>;
|
|
9
|
+
};
|
|
10
|
+
export declare const dateRangeOptions: {
|
|
11
|
+
readonly ALL: "ALL";
|
|
12
|
+
readonly LAST_3_DAYS: "Last3Days";
|
|
13
|
+
readonly LAST_6_HOURS: "Last6Hours";
|
|
14
|
+
readonly LAST_7_DAYS: "Last7Days";
|
|
15
|
+
readonly LAST_24_HOURS: "Last24Hours";
|
|
16
|
+
readonly LAST_30_DAYS: "Last30Days";
|
|
17
|
+
readonly LAST_HOUR: "LastHour";
|
|
18
|
+
};
|
|
19
|
+
export type DateRangeOption = (typeof dateRangeOptions)[keyof typeof dateRangeOptions];
|
|
20
|
+
export declare const getDateRangeTime: (value: DateRangeOption) => Date;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (C) 2024-2025 Dremio Corporation
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
export const dateRangeOptions = {
|
|
17
|
+
ALL: "ALL",
|
|
18
|
+
LAST_3_DAYS: "Last3Days",
|
|
19
|
+
LAST_6_HOURS: "Last6Hours",
|
|
20
|
+
LAST_7_DAYS: "Last7Days",
|
|
21
|
+
LAST_24_HOURS: "Last24Hours",
|
|
22
|
+
LAST_30_DAYS: "Last30Days",
|
|
23
|
+
LAST_HOUR: "LastHour",
|
|
24
|
+
};
|
|
25
|
+
const ONE_HOUR = 60 * 60 * 1000;
|
|
26
|
+
const ONE_DAY = ONE_HOUR * 24;
|
|
27
|
+
export const getDateRangeTime = (value) => {
|
|
28
|
+
const now = Date.now();
|
|
29
|
+
switch (value) {
|
|
30
|
+
case dateRangeOptions.LAST_HOUR:
|
|
31
|
+
return new Date(now - ONE_HOUR);
|
|
32
|
+
case dateRangeOptions.LAST_6_HOURS:
|
|
33
|
+
return new Date(now - ONE_HOUR * 6);
|
|
34
|
+
case dateRangeOptions.LAST_24_HOURS:
|
|
35
|
+
return new Date(now - ONE_DAY);
|
|
36
|
+
case dateRangeOptions.LAST_3_DAYS:
|
|
37
|
+
return new Date(now - ONE_DAY * 3);
|
|
38
|
+
case dateRangeOptions.LAST_7_DAYS:
|
|
39
|
+
return new Date(now - ONE_DAY * 7);
|
|
40
|
+
case dateRangeOptions.LAST_30_DAYS:
|
|
41
|
+
return new Date(now - ONE_DAY * 30);
|
|
42
|
+
default:
|
|
43
|
+
return new Date();
|
|
44
|
+
}
|
|
45
|
+
};
|
|
46
|
+
//# sourceMappingURL=CatalogSearchParams.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CatalogSearchParams.js","sourceRoot":"","sources":["../../../../src/enterprise/catalog/catalogSearch/CatalogSearchParams.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAaH,MAAM,CAAC,MAAM,gBAAgB,GAAG;IAC9B,GAAG,EAAE,KAAK;IACV,WAAW,EAAE,WAAW;IACxB,YAAY,EAAE,YAAY;IAC1B,WAAW,EAAE,WAAW;IACxB,aAAa,EAAE,aAAa;IAC5B,YAAY,EAAE,YAAY;IAC1B,SAAS,EAAE,UAAU;CACb,CAAC;AAIX,MAAM,QAAQ,GAAG,EAAE,GAAG,EAAE,GAAG,IAAI,CAAC;AAChC,MAAM,OAAO,GAAG,QAAQ,GAAG,EAAE,CAAC;AAE9B,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,KAAsB,EAAQ,EAAE;IAC/D,MAAM,GAAG,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC;IAEvB,QAAQ,KAAK,EAAE,CAAC;QACd,KAAK,gBAAgB,CAAC,SAAS;YAC7B,OAAO,IAAI,IAAI,CAAC,GAAG,GAAG,QAAQ,CAAC,CAAC;QAClC,KAAK,gBAAgB,CAAC,YAAY;YAChC,OAAO,IAAI,IAAI,CAAC,GAAG,GAAG,QAAQ,GAAG,CAAC,CAAC,CAAC;QACtC,KAAK,gBAAgB,CAAC,aAAa;YACjC,OAAO,IAAI,IAAI,CAAC,GAAG,GAAG,OAAO,CAAC,CAAC;QACjC,KAAK,gBAAgB,CAAC,WAAW;YAC/B,OAAO,IAAI,IAAI,CAAC,GAAG,GAAG,OAAO,GAAG,CAAC,CAAC,CAAC;QACrC,KAAK,gBAAgB,CAAC,WAAW;YAC/B,OAAO,IAAI,IAAI,CAAC,GAAG,GAAG,OAAO,GAAG,CAAC,CAAC,CAAC;QACrC,KAAK,gBAAgB,CAAC,YAAY;YAChC,OAAO,IAAI,IAAI,CAAC,GAAG,GAAG,OAAO,GAAG,EAAE,CAAC,CAAC;QACtC;YACE,OAAO,IAAI,IAAI,EAAE,CAAC;IACtB,CAAC;AACH,CAAC,CAAC","sourcesContent":["/*\n * Copyright (C) 2024-2025 Dremio Corporation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type { SearchCategoryType } from \"./SearchResult.ts\";\n\nexport type CatalogSearchParams = {\n searchText: string;\n in?: string;\n owner?: string;\n startTime?: DateRangeOption;\n lastModified?: DateRangeOption;\n type?: Set<SearchCategoryType>;\n};\n\nexport const dateRangeOptions = {\n ALL: \"ALL\",\n LAST_3_DAYS: \"Last3Days\",\n LAST_6_HOURS: \"Last6Hours\",\n LAST_7_DAYS: \"Last7Days\",\n LAST_24_HOURS: \"Last24Hours\",\n LAST_30_DAYS: \"Last30Days\",\n LAST_HOUR: \"LastHour\",\n} as const;\n\nexport type DateRangeOption = (typeof dateRangeOptions)[keyof typeof dateRangeOptions];\n\nconst ONE_HOUR = 60 * 60 * 1000;\nconst ONE_DAY = ONE_HOUR * 24;\n\nexport const getDateRangeTime = (value: DateRangeOption): Date => {\n const now = Date.now();\n\n switch (value) {\n case dateRangeOptions.LAST_HOUR:\n return new Date(now - ONE_HOUR);\n case dateRangeOptions.LAST_6_HOURS:\n return new Date(now - ONE_HOUR * 6);\n case dateRangeOptions.LAST_24_HOURS:\n return new Date(now - ONE_DAY);\n case dateRangeOptions.LAST_3_DAYS:\n return new Date(now - ONE_DAY * 3);\n case dateRangeOptions.LAST_7_DAYS:\n return new Date(now - ONE_DAY * 7);\n case dateRangeOptions.LAST_30_DAYS:\n return new Date(now - ONE_DAY * 30);\n default:\n return new Date();\n }\n};\n"]}
|