@malloy-publisher/sdk 0.0.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/.eslintrc +36 -0
- package/.prettierrc +4 -0
- package/README.md +1 -0
- package/openapitools.json +7 -0
- package/package.json +63 -0
- package/src/assets/img/spinner.svg +43 -0
- package/src/client/.openapi-generator/FILES +9 -0
- package/src/client/.openapi-generator/VERSION +1 -0
- package/src/client/.openapi-generator-ignore +23 -0
- package/src/client/api.ts +1170 -0
- package/src/client/base.ts +86 -0
- package/src/client/common.ts +150 -0
- package/src/client/configuration.ts +110 -0
- package/src/client/git_push.sh +57 -0
- package/src/client/index.ts +18 -0
- package/src/components/DOMElement/DOMElement.tsx +19 -0
- package/src/components/DOMElement/index.ts +1 -0
- package/src/components/Model/Model.tsx +110 -0
- package/src/components/Model/ModelCell.tsx +175 -0
- package/src/components/Model/index.ts +1 -0
- package/src/components/Notebook/Notebook.tsx +82 -0
- package/src/components/Notebook/NotebookCell.tsx +194 -0
- package/src/components/Notebook/index.ts +1 -0
- package/src/components/Package/Config.tsx +99 -0
- package/src/components/Package/Databases.tsx +75 -0
- package/src/components/Package/FileTreeView.tsx +224 -0
- package/src/components/Package/Models.tsx +77 -0
- package/src/components/Package/Package.tsx +78 -0
- package/src/components/Package/index.ts +1 -0
- package/src/components/Project/About.tsx +56 -0
- package/src/components/Project/Packages.tsx +105 -0
- package/src/components/Project/Project.tsx +26 -0
- package/src/components/Project/index.ts +1 -0
- package/src/components/QueryResult/QueryResult.tsx +84 -0
- package/src/components/QueryResult/index.ts +1 -0
- package/src/components/RenderedResult/RenderedResult.tsx +38 -0
- package/src/components/highlighter.ts +649 -0
- package/src/components/index.ts +5 -0
- package/src/components/styles.ts +21 -0
- package/src/index.ts +1 -0
- package/src/react-app-env.d.ts +73 -0
- package/tsconfig.json +34 -0
- package/vite.config.ts +31 -0
|
@@ -0,0 +1,1170 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* Malloy Publisher - Semantic Model Serving API
|
|
5
|
+
* The Malloy Publisher - Semantic Model Serving API serves Malloy packages. A Malloy package is a directory of Malloy models (.malloy files), Malloy notebooks (.malloynb files), and embedded datbases (.parque files) with a malloy-publisher.json manifest at the package\'s root directory. For example, see the Malloy samples packages (https://github.com/malloydata/malloy-samples) repo.
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: v0
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
import type { Configuration } from './configuration';
|
|
17
|
+
import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios';
|
|
18
|
+
import globalAxios from 'axios';
|
|
19
|
+
// Some imports not used depending on template conditions
|
|
20
|
+
// @ts-ignore
|
|
21
|
+
import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from './common';
|
|
22
|
+
import type { RequestArgs } from './base';
|
|
23
|
+
// @ts-ignore
|
|
24
|
+
import { BASE_PATH, COLLECTION_FORMATS, BaseAPI, RequiredError, operationServerMap } from './base';
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
*
|
|
28
|
+
* @export
|
|
29
|
+
* @interface About
|
|
30
|
+
*/
|
|
31
|
+
export interface About {
|
|
32
|
+
/**
|
|
33
|
+
* Readme markdown.
|
|
34
|
+
* @type {string}
|
|
35
|
+
* @memberof About
|
|
36
|
+
*/
|
|
37
|
+
'readme'?: string;
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Malloy model def and result data. Malloy model def and result data is Malloy version depdendent.
|
|
41
|
+
* @export
|
|
42
|
+
* @interface CompiledModel
|
|
43
|
+
*/
|
|
44
|
+
export interface CompiledModel {
|
|
45
|
+
/**
|
|
46
|
+
* Model\'s package Name
|
|
47
|
+
* @type {string}
|
|
48
|
+
* @memberof CompiledModel
|
|
49
|
+
*/
|
|
50
|
+
'packageName'?: string;
|
|
51
|
+
/**
|
|
52
|
+
* Model\'s relative path in its package directory.
|
|
53
|
+
* @type {string}
|
|
54
|
+
* @memberof CompiledModel
|
|
55
|
+
*/
|
|
56
|
+
'path'?: string;
|
|
57
|
+
/**
|
|
58
|
+
* Type of malloy model file -- source file or notebook file.
|
|
59
|
+
* @type {string}
|
|
60
|
+
* @memberof CompiledModel
|
|
61
|
+
*/
|
|
62
|
+
'type'?: CompiledModelTypeEnum;
|
|
63
|
+
/**
|
|
64
|
+
* Version of the Malloy compiler that generated the model def and results fields.
|
|
65
|
+
* @type {string}
|
|
66
|
+
* @memberof CompiledModel
|
|
67
|
+
*/
|
|
68
|
+
'malloyVersion'?: string;
|
|
69
|
+
/**
|
|
70
|
+
* Data style for rendering query results.
|
|
71
|
+
* @type {string}
|
|
72
|
+
* @memberof CompiledModel
|
|
73
|
+
*/
|
|
74
|
+
'dataStyles'?: string;
|
|
75
|
+
/**
|
|
76
|
+
* Malloy model def.
|
|
77
|
+
* @type {string}
|
|
78
|
+
* @memberof CompiledModel
|
|
79
|
+
*/
|
|
80
|
+
'modelDef'?: string;
|
|
81
|
+
/**
|
|
82
|
+
* Array of model sources.
|
|
83
|
+
* @type {Array<Source>}
|
|
84
|
+
* @memberof CompiledModel
|
|
85
|
+
*/
|
|
86
|
+
'sources'?: Array<Source>;
|
|
87
|
+
/**
|
|
88
|
+
*
|
|
89
|
+
* @type {Array<Query>}
|
|
90
|
+
* @memberof CompiledModel
|
|
91
|
+
*/
|
|
92
|
+
'queries'?: Array<Query>;
|
|
93
|
+
/**
|
|
94
|
+
* Array of notebook cells.
|
|
95
|
+
* @type {Array<NotebookCell>}
|
|
96
|
+
* @memberof CompiledModel
|
|
97
|
+
*/
|
|
98
|
+
'notebookCells'?: Array<NotebookCell>;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
export const CompiledModelTypeEnum = {
|
|
102
|
+
Source: 'source',
|
|
103
|
+
Notebook: 'notebook'
|
|
104
|
+
} as const;
|
|
105
|
+
|
|
106
|
+
export type CompiledModelTypeEnum = typeof CompiledModelTypeEnum[keyof typeof CompiledModelTypeEnum];
|
|
107
|
+
|
|
108
|
+
/**
|
|
109
|
+
*
|
|
110
|
+
* @export
|
|
111
|
+
* @interface Connection
|
|
112
|
+
*/
|
|
113
|
+
export interface Connection {
|
|
114
|
+
/**
|
|
115
|
+
*
|
|
116
|
+
* @type {string}
|
|
117
|
+
* @memberof Connection
|
|
118
|
+
*/
|
|
119
|
+
'name'?: string;
|
|
120
|
+
/**
|
|
121
|
+
*
|
|
122
|
+
* @type {string}
|
|
123
|
+
* @memberof Connection
|
|
124
|
+
*/
|
|
125
|
+
'type'?: ConnectionTypeEnum;
|
|
126
|
+
/**
|
|
127
|
+
*
|
|
128
|
+
* @type {PostgresConnection}
|
|
129
|
+
* @memberof Connection
|
|
130
|
+
*/
|
|
131
|
+
'postgresConnection'?: PostgresConnection;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
export const ConnectionTypeEnum = {
|
|
135
|
+
Postgres: 'postgres',
|
|
136
|
+
Bigquery: 'bigquery',
|
|
137
|
+
Snowflake: 'snowflake'
|
|
138
|
+
} as const;
|
|
139
|
+
|
|
140
|
+
export type ConnectionTypeEnum = typeof ConnectionTypeEnum[keyof typeof ConnectionTypeEnum];
|
|
141
|
+
|
|
142
|
+
/**
|
|
143
|
+
* An in-memory DuckDB database embedded in the package.
|
|
144
|
+
* @export
|
|
145
|
+
* @interface Database
|
|
146
|
+
*/
|
|
147
|
+
export interface Database {
|
|
148
|
+
/**
|
|
149
|
+
* Database\'s relative path in its package directory.
|
|
150
|
+
* @type {string}
|
|
151
|
+
* @memberof Database
|
|
152
|
+
*/
|
|
153
|
+
'path'?: string;
|
|
154
|
+
/**
|
|
155
|
+
* Size of the embedded database in bytes.
|
|
156
|
+
* @type {number}
|
|
157
|
+
* @memberof Database
|
|
158
|
+
*/
|
|
159
|
+
'size'?: number;
|
|
160
|
+
/**
|
|
161
|
+
* Type of database -- i.e., embedded in the package or materialized afte the package was created.
|
|
162
|
+
* @type {string}
|
|
163
|
+
* @memberof Database
|
|
164
|
+
*/
|
|
165
|
+
'type'?: DatabaseTypeEnum;
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
export const DatabaseTypeEnum = {
|
|
169
|
+
Embedded: 'embedded',
|
|
170
|
+
Materialized: 'materialized'
|
|
171
|
+
} as const;
|
|
172
|
+
|
|
173
|
+
export type DatabaseTypeEnum = typeof DatabaseTypeEnum[keyof typeof DatabaseTypeEnum];
|
|
174
|
+
|
|
175
|
+
/**
|
|
176
|
+
* Malloy model def and result data. Malloy model def and result data is Malloy version depdendent.
|
|
177
|
+
* @export
|
|
178
|
+
* @interface Model
|
|
179
|
+
*/
|
|
180
|
+
export interface Model {
|
|
181
|
+
/**
|
|
182
|
+
* Model\'s package Name
|
|
183
|
+
* @type {string}
|
|
184
|
+
* @memberof Model
|
|
185
|
+
*/
|
|
186
|
+
'packageName'?: string;
|
|
187
|
+
/**
|
|
188
|
+
* Model\'s relative path in its package directory.
|
|
189
|
+
* @type {string}
|
|
190
|
+
* @memberof Model
|
|
191
|
+
*/
|
|
192
|
+
'path'?: string;
|
|
193
|
+
/**
|
|
194
|
+
* Type of malloy model file -- source file or notebook file.
|
|
195
|
+
* @type {string}
|
|
196
|
+
* @memberof Model
|
|
197
|
+
*/
|
|
198
|
+
'type'?: ModelTypeEnum;
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
export const ModelTypeEnum = {
|
|
202
|
+
Source: 'source',
|
|
203
|
+
Notebook: 'notebook'
|
|
204
|
+
} as const;
|
|
205
|
+
|
|
206
|
+
export type ModelTypeEnum = typeof ModelTypeEnum[keyof typeof ModelTypeEnum];
|
|
207
|
+
|
|
208
|
+
/**
|
|
209
|
+
*
|
|
210
|
+
* @export
|
|
211
|
+
* @interface ModelError
|
|
212
|
+
*/
|
|
213
|
+
export interface ModelError {
|
|
214
|
+
/**
|
|
215
|
+
*
|
|
216
|
+
* @type {string}
|
|
217
|
+
* @memberof ModelError
|
|
218
|
+
*/
|
|
219
|
+
'code'?: string;
|
|
220
|
+
/**
|
|
221
|
+
*
|
|
222
|
+
* @type {string}
|
|
223
|
+
* @memberof ModelError
|
|
224
|
+
*/
|
|
225
|
+
'message'?: string;
|
|
226
|
+
}
|
|
227
|
+
/**
|
|
228
|
+
* Notebook cell.
|
|
229
|
+
* @export
|
|
230
|
+
* @interface NotebookCell
|
|
231
|
+
*/
|
|
232
|
+
export interface NotebookCell {
|
|
233
|
+
/**
|
|
234
|
+
* Type of notebook cell.
|
|
235
|
+
* @type {string}
|
|
236
|
+
* @memberof NotebookCell
|
|
237
|
+
*/
|
|
238
|
+
'type'?: NotebookCellTypeEnum;
|
|
239
|
+
/**
|
|
240
|
+
* Text contents of the notebook cell.
|
|
241
|
+
* @type {string}
|
|
242
|
+
* @memberof NotebookCell
|
|
243
|
+
*/
|
|
244
|
+
'text'?: string;
|
|
245
|
+
/**
|
|
246
|
+
* Name of query, if this is a named query. Otherwise, empty.
|
|
247
|
+
* @type {string}
|
|
248
|
+
* @memberof NotebookCell
|
|
249
|
+
*/
|
|
250
|
+
'queryName'?: string;
|
|
251
|
+
/**
|
|
252
|
+
* Malloy query results. Populated only if a code cell.
|
|
253
|
+
* @type {string}
|
|
254
|
+
* @memberof NotebookCell
|
|
255
|
+
*/
|
|
256
|
+
'queryResult'?: string;
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
export const NotebookCellTypeEnum = {
|
|
260
|
+
Markdown: 'markdown',
|
|
261
|
+
Code: 'code'
|
|
262
|
+
} as const;
|
|
263
|
+
|
|
264
|
+
export type NotebookCellTypeEnum = typeof NotebookCellTypeEnum[keyof typeof NotebookCellTypeEnum];
|
|
265
|
+
|
|
266
|
+
/**
|
|
267
|
+
*
|
|
268
|
+
* @export
|
|
269
|
+
* @interface Package
|
|
270
|
+
*/
|
|
271
|
+
export interface Package {
|
|
272
|
+
/**
|
|
273
|
+
* Package name.
|
|
274
|
+
* @type {string}
|
|
275
|
+
* @memberof Package
|
|
276
|
+
*/
|
|
277
|
+
'name'?: string;
|
|
278
|
+
/**
|
|
279
|
+
* Package description.
|
|
280
|
+
* @type {string}
|
|
281
|
+
* @memberof Package
|
|
282
|
+
*/
|
|
283
|
+
'description'?: string;
|
|
284
|
+
}
|
|
285
|
+
/**
|
|
286
|
+
*
|
|
287
|
+
* @export
|
|
288
|
+
* @interface PostgresConnection
|
|
289
|
+
*/
|
|
290
|
+
export interface PostgresConnection {
|
|
291
|
+
/**
|
|
292
|
+
*
|
|
293
|
+
* @type {string}
|
|
294
|
+
* @memberof PostgresConnection
|
|
295
|
+
*/
|
|
296
|
+
'host'?: string;
|
|
297
|
+
/**
|
|
298
|
+
*
|
|
299
|
+
* @type {number}
|
|
300
|
+
* @memberof PostgresConnection
|
|
301
|
+
*/
|
|
302
|
+
'port'?: number;
|
|
303
|
+
/**
|
|
304
|
+
*
|
|
305
|
+
* @type {string}
|
|
306
|
+
* @memberof PostgresConnection
|
|
307
|
+
*/
|
|
308
|
+
'databaseName'?: string;
|
|
309
|
+
/**
|
|
310
|
+
*
|
|
311
|
+
* @type {string}
|
|
312
|
+
* @memberof PostgresConnection
|
|
313
|
+
*/
|
|
314
|
+
'userName'?: string;
|
|
315
|
+
/**
|
|
316
|
+
*
|
|
317
|
+
* @type {string}
|
|
318
|
+
* @memberof PostgresConnection
|
|
319
|
+
*/
|
|
320
|
+
'password'?: string;
|
|
321
|
+
/**
|
|
322
|
+
*
|
|
323
|
+
* @type {string}
|
|
324
|
+
* @memberof PostgresConnection
|
|
325
|
+
*/
|
|
326
|
+
'url'?: string;
|
|
327
|
+
}
|
|
328
|
+
/**
|
|
329
|
+
* Named model query.
|
|
330
|
+
* @export
|
|
331
|
+
* @interface Query
|
|
332
|
+
*/
|
|
333
|
+
export interface Query {
|
|
334
|
+
/**
|
|
335
|
+
* Query\'s name.
|
|
336
|
+
* @type {string}
|
|
337
|
+
* @memberof Query
|
|
338
|
+
*/
|
|
339
|
+
'name'?: string;
|
|
340
|
+
/**
|
|
341
|
+
* Description of the query.
|
|
342
|
+
* @type {string}
|
|
343
|
+
* @memberof Query
|
|
344
|
+
*/
|
|
345
|
+
'description'?: string;
|
|
346
|
+
/**
|
|
347
|
+
* Query\'s code.
|
|
348
|
+
* @type {string}
|
|
349
|
+
* @memberof Query
|
|
350
|
+
*/
|
|
351
|
+
'code'?: string;
|
|
352
|
+
}
|
|
353
|
+
/**
|
|
354
|
+
* A Malloy query\'s results, its model def, and its data styles.
|
|
355
|
+
* @export
|
|
356
|
+
* @interface QueryResult
|
|
357
|
+
*/
|
|
358
|
+
export interface QueryResult {
|
|
359
|
+
/**
|
|
360
|
+
* Data style for rendering query results.
|
|
361
|
+
* @type {string}
|
|
362
|
+
* @memberof QueryResult
|
|
363
|
+
*/
|
|
364
|
+
'dataStyles'?: string;
|
|
365
|
+
/**
|
|
366
|
+
* Malloy model def.
|
|
367
|
+
* @type {string}
|
|
368
|
+
* @memberof QueryResult
|
|
369
|
+
*/
|
|
370
|
+
'modelDef'?: string;
|
|
371
|
+
/**
|
|
372
|
+
* Malloy query results. Populated only if a code cell.
|
|
373
|
+
* @type {string}
|
|
374
|
+
* @memberof QueryResult
|
|
375
|
+
*/
|
|
376
|
+
'queryResult'?: string;
|
|
377
|
+
}
|
|
378
|
+
/**
|
|
379
|
+
* Model source.
|
|
380
|
+
* @export
|
|
381
|
+
* @interface Source
|
|
382
|
+
*/
|
|
383
|
+
export interface Source {
|
|
384
|
+
/**
|
|
385
|
+
* Source\'s name.
|
|
386
|
+
* @type {string}
|
|
387
|
+
* @memberof Source
|
|
388
|
+
*/
|
|
389
|
+
'name'?: string;
|
|
390
|
+
/**
|
|
391
|
+
* Description of the source.
|
|
392
|
+
* @type {string}
|
|
393
|
+
* @memberof Source
|
|
394
|
+
*/
|
|
395
|
+
'description'?: string;
|
|
396
|
+
/**
|
|
397
|
+
* List of views in the source.\\
|
|
398
|
+
* @type {Array<View>}
|
|
399
|
+
* @memberof Source
|
|
400
|
+
*/
|
|
401
|
+
'views'?: Array<View>;
|
|
402
|
+
}
|
|
403
|
+
/**
|
|
404
|
+
* Named model view.
|
|
405
|
+
* @export
|
|
406
|
+
* @interface View
|
|
407
|
+
*/
|
|
408
|
+
export interface View {
|
|
409
|
+
/**
|
|
410
|
+
* View\'s name.
|
|
411
|
+
* @type {string}
|
|
412
|
+
* @memberof View
|
|
413
|
+
*/
|
|
414
|
+
'name'?: string;
|
|
415
|
+
/**
|
|
416
|
+
* Description of the view.
|
|
417
|
+
* @type {string}
|
|
418
|
+
* @memberof View
|
|
419
|
+
*/
|
|
420
|
+
'description'?: string;
|
|
421
|
+
/**
|
|
422
|
+
* View\'s code.
|
|
423
|
+
* @type {string}
|
|
424
|
+
* @memberof View
|
|
425
|
+
*/
|
|
426
|
+
'view'?: string;
|
|
427
|
+
}
|
|
428
|
+
|
|
429
|
+
/**
|
|
430
|
+
* DatabasesApi - axios parameter creator
|
|
431
|
+
* @export
|
|
432
|
+
*/
|
|
433
|
+
export const DatabasesApiAxiosParamCreator = function (configuration?: Configuration) {
|
|
434
|
+
return {
|
|
435
|
+
/**
|
|
436
|
+
*
|
|
437
|
+
* @summary Returns a list of relative paths to the databases embedded in the package.
|
|
438
|
+
* @param {string} name Name of package
|
|
439
|
+
* @param {string} [xVersionId]
|
|
440
|
+
* @param {*} [options] Override http request option.
|
|
441
|
+
* @throws {RequiredError}
|
|
442
|
+
*/
|
|
443
|
+
listDatabases: async (name: string, xVersionId?: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
444
|
+
// verify required parameter 'name' is not null or undefined
|
|
445
|
+
assertParamExists('listDatabases', 'name', name)
|
|
446
|
+
const localVarPath = `/packages/{name}/databases`
|
|
447
|
+
.replace(`{${"name"}}`, encodeURIComponent(String(name)));
|
|
448
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
449
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
450
|
+
let baseOptions;
|
|
451
|
+
if (configuration) {
|
|
452
|
+
baseOptions = configuration.baseOptions;
|
|
453
|
+
}
|
|
454
|
+
|
|
455
|
+
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
|
|
456
|
+
const localVarHeaderParameter = {} as any;
|
|
457
|
+
const localVarQueryParameter = {} as any;
|
|
458
|
+
|
|
459
|
+
if (xVersionId != null) {
|
|
460
|
+
localVarHeaderParameter['X-Version-Id'] = String(xVersionId);
|
|
461
|
+
}
|
|
462
|
+
|
|
463
|
+
|
|
464
|
+
|
|
465
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
466
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
467
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
468
|
+
|
|
469
|
+
return {
|
|
470
|
+
url: toPathString(localVarUrlObj),
|
|
471
|
+
options: localVarRequestOptions,
|
|
472
|
+
};
|
|
473
|
+
},
|
|
474
|
+
}
|
|
475
|
+
};
|
|
476
|
+
|
|
477
|
+
/**
|
|
478
|
+
* DatabasesApi - functional programming interface
|
|
479
|
+
* @export
|
|
480
|
+
*/
|
|
481
|
+
export const DatabasesApiFp = function(configuration?: Configuration) {
|
|
482
|
+
const localVarAxiosParamCreator = DatabasesApiAxiosParamCreator(configuration)
|
|
483
|
+
return {
|
|
484
|
+
/**
|
|
485
|
+
*
|
|
486
|
+
* @summary Returns a list of relative paths to the databases embedded in the package.
|
|
487
|
+
* @param {string} name Name of package
|
|
488
|
+
* @param {string} [xVersionId]
|
|
489
|
+
* @param {*} [options] Override http request option.
|
|
490
|
+
* @throws {RequiredError}
|
|
491
|
+
*/
|
|
492
|
+
async listDatabases(name: string, xVersionId?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<Database>>> {
|
|
493
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.listDatabases(name, xVersionId, options);
|
|
494
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
495
|
+
const localVarOperationServerBasePath = operationServerMap['DatabasesApi.listDatabases']?.[localVarOperationServerIndex]?.url;
|
|
496
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
497
|
+
},
|
|
498
|
+
}
|
|
499
|
+
};
|
|
500
|
+
|
|
501
|
+
/**
|
|
502
|
+
* DatabasesApi - factory interface
|
|
503
|
+
* @export
|
|
504
|
+
*/
|
|
505
|
+
export const DatabasesApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
|
|
506
|
+
const localVarFp = DatabasesApiFp(configuration)
|
|
507
|
+
return {
|
|
508
|
+
/**
|
|
509
|
+
*
|
|
510
|
+
* @summary Returns a list of relative paths to the databases embedded in the package.
|
|
511
|
+
* @param {string} name Name of package
|
|
512
|
+
* @param {string} [xVersionId]
|
|
513
|
+
* @param {*} [options] Override http request option.
|
|
514
|
+
* @throws {RequiredError}
|
|
515
|
+
*/
|
|
516
|
+
listDatabases(name: string, xVersionId?: string, options?: RawAxiosRequestConfig): AxiosPromise<Array<Database>> {
|
|
517
|
+
return localVarFp.listDatabases(name, xVersionId, options).then((request) => request(axios, basePath));
|
|
518
|
+
},
|
|
519
|
+
};
|
|
520
|
+
};
|
|
521
|
+
|
|
522
|
+
/**
|
|
523
|
+
* DatabasesApi - object-oriented interface
|
|
524
|
+
* @export
|
|
525
|
+
* @class DatabasesApi
|
|
526
|
+
* @extends {BaseAPI}
|
|
527
|
+
*/
|
|
528
|
+
export class DatabasesApi extends BaseAPI {
|
|
529
|
+
/**
|
|
530
|
+
*
|
|
531
|
+
* @summary Returns a list of relative paths to the databases embedded in the package.
|
|
532
|
+
* @param {string} name Name of package
|
|
533
|
+
* @param {string} [xVersionId]
|
|
534
|
+
* @param {*} [options] Override http request option.
|
|
535
|
+
* @throws {RequiredError}
|
|
536
|
+
* @memberof DatabasesApi
|
|
537
|
+
*/
|
|
538
|
+
public listDatabases(name: string, xVersionId?: string, options?: RawAxiosRequestConfig) {
|
|
539
|
+
return DatabasesApiFp(this.configuration).listDatabases(name, xVersionId, options).then((request) => request(this.axios, this.basePath));
|
|
540
|
+
}
|
|
541
|
+
}
|
|
542
|
+
|
|
543
|
+
|
|
544
|
+
|
|
545
|
+
/**
|
|
546
|
+
* DefaultApi - axios parameter creator
|
|
547
|
+
* @export
|
|
548
|
+
*/
|
|
549
|
+
export const DefaultApiAxiosParamCreator = function (configuration?: Configuration) {
|
|
550
|
+
return {
|
|
551
|
+
/**
|
|
552
|
+
*
|
|
553
|
+
* @summary Returns metadata about the publisher service.
|
|
554
|
+
* @param {*} [options] Override http request option.
|
|
555
|
+
* @throws {RequiredError}
|
|
556
|
+
*/
|
|
557
|
+
about: async (options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
558
|
+
const localVarPath = `/about`;
|
|
559
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
560
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
561
|
+
let baseOptions;
|
|
562
|
+
if (configuration) {
|
|
563
|
+
baseOptions = configuration.baseOptions;
|
|
564
|
+
}
|
|
565
|
+
|
|
566
|
+
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
|
|
567
|
+
const localVarHeaderParameter = {} as any;
|
|
568
|
+
const localVarQueryParameter = {} as any;
|
|
569
|
+
|
|
570
|
+
|
|
571
|
+
|
|
572
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
573
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
574
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
575
|
+
|
|
576
|
+
return {
|
|
577
|
+
url: toPathString(localVarUrlObj),
|
|
578
|
+
options: localVarRequestOptions,
|
|
579
|
+
};
|
|
580
|
+
},
|
|
581
|
+
}
|
|
582
|
+
};
|
|
583
|
+
|
|
584
|
+
/**
|
|
585
|
+
* DefaultApi - functional programming interface
|
|
586
|
+
* @export
|
|
587
|
+
*/
|
|
588
|
+
export const DefaultApiFp = function(configuration?: Configuration) {
|
|
589
|
+
const localVarAxiosParamCreator = DefaultApiAxiosParamCreator(configuration)
|
|
590
|
+
return {
|
|
591
|
+
/**
|
|
592
|
+
*
|
|
593
|
+
* @summary Returns metadata about the publisher service.
|
|
594
|
+
* @param {*} [options] Override http request option.
|
|
595
|
+
* @throws {RequiredError}
|
|
596
|
+
*/
|
|
597
|
+
async about(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<About>> {
|
|
598
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.about(options);
|
|
599
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
600
|
+
const localVarOperationServerBasePath = operationServerMap['DefaultApi.about']?.[localVarOperationServerIndex]?.url;
|
|
601
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
602
|
+
},
|
|
603
|
+
}
|
|
604
|
+
};
|
|
605
|
+
|
|
606
|
+
/**
|
|
607
|
+
* DefaultApi - factory interface
|
|
608
|
+
* @export
|
|
609
|
+
*/
|
|
610
|
+
export const DefaultApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
|
|
611
|
+
const localVarFp = DefaultApiFp(configuration)
|
|
612
|
+
return {
|
|
613
|
+
/**
|
|
614
|
+
*
|
|
615
|
+
* @summary Returns metadata about the publisher service.
|
|
616
|
+
* @param {*} [options] Override http request option.
|
|
617
|
+
* @throws {RequiredError}
|
|
618
|
+
*/
|
|
619
|
+
about(options?: RawAxiosRequestConfig): AxiosPromise<About> {
|
|
620
|
+
return localVarFp.about(options).then((request) => request(axios, basePath));
|
|
621
|
+
},
|
|
622
|
+
};
|
|
623
|
+
};
|
|
624
|
+
|
|
625
|
+
/**
|
|
626
|
+
* DefaultApi - object-oriented interface
|
|
627
|
+
* @export
|
|
628
|
+
* @class DefaultApi
|
|
629
|
+
* @extends {BaseAPI}
|
|
630
|
+
*/
|
|
631
|
+
export class DefaultApi extends BaseAPI {
|
|
632
|
+
/**
|
|
633
|
+
*
|
|
634
|
+
* @summary Returns metadata about the publisher service.
|
|
635
|
+
* @param {*} [options] Override http request option.
|
|
636
|
+
* @throws {RequiredError}
|
|
637
|
+
* @memberof DefaultApi
|
|
638
|
+
*/
|
|
639
|
+
public about(options?: RawAxiosRequestConfig) {
|
|
640
|
+
return DefaultApiFp(this.configuration).about(options).then((request) => request(this.axios, this.basePath));
|
|
641
|
+
}
|
|
642
|
+
}
|
|
643
|
+
|
|
644
|
+
|
|
645
|
+
|
|
646
|
+
/**
|
|
647
|
+
* ModelsApi - axios parameter creator
|
|
648
|
+
* @export
|
|
649
|
+
*/
|
|
650
|
+
export const ModelsApiAxiosParamCreator = function (configuration?: Configuration) {
|
|
651
|
+
return {
|
|
652
|
+
/**
|
|
653
|
+
*
|
|
654
|
+
* @summary Returns a Malloy model.
|
|
655
|
+
* @param {string} name Name of package.
|
|
656
|
+
* @param {string} path Path to model wihin the package.
|
|
657
|
+
* @param {string} [xVersionId]
|
|
658
|
+
* @param {*} [options] Override http request option.
|
|
659
|
+
* @throws {RequiredError}
|
|
660
|
+
*/
|
|
661
|
+
getModel: async (name: string, path: string, xVersionId?: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
662
|
+
// verify required parameter 'name' is not null or undefined
|
|
663
|
+
assertParamExists('getModel', 'name', name)
|
|
664
|
+
// verify required parameter 'path' is not null or undefined
|
|
665
|
+
assertParamExists('getModel', 'path', path)
|
|
666
|
+
const localVarPath = `/packages/{name}/models/{path}`
|
|
667
|
+
.replace(`{${"name"}}`, encodeURIComponent(String(name)))
|
|
668
|
+
.replace(`{${"path"}}`, encodeURIComponent(String(path)));
|
|
669
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
670
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
671
|
+
let baseOptions;
|
|
672
|
+
if (configuration) {
|
|
673
|
+
baseOptions = configuration.baseOptions;
|
|
674
|
+
}
|
|
675
|
+
|
|
676
|
+
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
|
|
677
|
+
const localVarHeaderParameter = {} as any;
|
|
678
|
+
const localVarQueryParameter = {} as any;
|
|
679
|
+
|
|
680
|
+
if (xVersionId != null) {
|
|
681
|
+
localVarHeaderParameter['X-Version-Id'] = String(xVersionId);
|
|
682
|
+
}
|
|
683
|
+
|
|
684
|
+
|
|
685
|
+
|
|
686
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
687
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
688
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
689
|
+
|
|
690
|
+
return {
|
|
691
|
+
url: toPathString(localVarUrlObj),
|
|
692
|
+
options: localVarRequestOptions,
|
|
693
|
+
};
|
|
694
|
+
},
|
|
695
|
+
/**
|
|
696
|
+
*
|
|
697
|
+
* @summary Returns a list of relative paths to the models in the package.
|
|
698
|
+
* @param {string} name Name of package
|
|
699
|
+
* @param {string} [xVersionId]
|
|
700
|
+
* @param {*} [options] Override http request option.
|
|
701
|
+
* @throws {RequiredError}
|
|
702
|
+
*/
|
|
703
|
+
listModels: async (name: string, xVersionId?: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
704
|
+
// verify required parameter 'name' is not null or undefined
|
|
705
|
+
assertParamExists('listModels', 'name', name)
|
|
706
|
+
const localVarPath = `/packages/{name}/models`
|
|
707
|
+
.replace(`{${"name"}}`, encodeURIComponent(String(name)));
|
|
708
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
709
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
710
|
+
let baseOptions;
|
|
711
|
+
if (configuration) {
|
|
712
|
+
baseOptions = configuration.baseOptions;
|
|
713
|
+
}
|
|
714
|
+
|
|
715
|
+
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
|
|
716
|
+
const localVarHeaderParameter = {} as any;
|
|
717
|
+
const localVarQueryParameter = {} as any;
|
|
718
|
+
|
|
719
|
+
if (xVersionId != null) {
|
|
720
|
+
localVarHeaderParameter['X-Version-Id'] = String(xVersionId);
|
|
721
|
+
}
|
|
722
|
+
|
|
723
|
+
|
|
724
|
+
|
|
725
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
726
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
727
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
728
|
+
|
|
729
|
+
return {
|
|
730
|
+
url: toPathString(localVarUrlObj),
|
|
731
|
+
options: localVarRequestOptions,
|
|
732
|
+
};
|
|
733
|
+
},
|
|
734
|
+
}
|
|
735
|
+
};
|
|
736
|
+
|
|
737
|
+
/**
|
|
738
|
+
* ModelsApi - functional programming interface
|
|
739
|
+
* @export
|
|
740
|
+
*/
|
|
741
|
+
export const ModelsApiFp = function(configuration?: Configuration) {
|
|
742
|
+
const localVarAxiosParamCreator = ModelsApiAxiosParamCreator(configuration)
|
|
743
|
+
return {
|
|
744
|
+
/**
|
|
745
|
+
*
|
|
746
|
+
* @summary Returns a Malloy model.
|
|
747
|
+
* @param {string} name Name of package.
|
|
748
|
+
* @param {string} path Path to model wihin the package.
|
|
749
|
+
* @param {string} [xVersionId]
|
|
750
|
+
* @param {*} [options] Override http request option.
|
|
751
|
+
* @throws {RequiredError}
|
|
752
|
+
*/
|
|
753
|
+
async getModel(name: string, path: string, xVersionId?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CompiledModel>> {
|
|
754
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.getModel(name, path, xVersionId, options);
|
|
755
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
756
|
+
const localVarOperationServerBasePath = operationServerMap['ModelsApi.getModel']?.[localVarOperationServerIndex]?.url;
|
|
757
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
758
|
+
},
|
|
759
|
+
/**
|
|
760
|
+
*
|
|
761
|
+
* @summary Returns a list of relative paths to the models in the package.
|
|
762
|
+
* @param {string} name Name of package
|
|
763
|
+
* @param {string} [xVersionId]
|
|
764
|
+
* @param {*} [options] Override http request option.
|
|
765
|
+
* @throws {RequiredError}
|
|
766
|
+
*/
|
|
767
|
+
async listModels(name: string, xVersionId?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<Model>>> {
|
|
768
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.listModels(name, xVersionId, options);
|
|
769
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
770
|
+
const localVarOperationServerBasePath = operationServerMap['ModelsApi.listModels']?.[localVarOperationServerIndex]?.url;
|
|
771
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
772
|
+
},
|
|
773
|
+
}
|
|
774
|
+
};
|
|
775
|
+
|
|
776
|
+
/**
|
|
777
|
+
* ModelsApi - factory interface
|
|
778
|
+
* @export
|
|
779
|
+
*/
|
|
780
|
+
export const ModelsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
|
|
781
|
+
const localVarFp = ModelsApiFp(configuration)
|
|
782
|
+
return {
|
|
783
|
+
/**
|
|
784
|
+
*
|
|
785
|
+
* @summary Returns a Malloy model.
|
|
786
|
+
* @param {string} name Name of package.
|
|
787
|
+
* @param {string} path Path to model wihin the package.
|
|
788
|
+
* @param {string} [xVersionId]
|
|
789
|
+
* @param {*} [options] Override http request option.
|
|
790
|
+
* @throws {RequiredError}
|
|
791
|
+
*/
|
|
792
|
+
getModel(name: string, path: string, xVersionId?: string, options?: RawAxiosRequestConfig): AxiosPromise<CompiledModel> {
|
|
793
|
+
return localVarFp.getModel(name, path, xVersionId, options).then((request) => request(axios, basePath));
|
|
794
|
+
},
|
|
795
|
+
/**
|
|
796
|
+
*
|
|
797
|
+
* @summary Returns a list of relative paths to the models in the package.
|
|
798
|
+
* @param {string} name Name of package
|
|
799
|
+
* @param {string} [xVersionId]
|
|
800
|
+
* @param {*} [options] Override http request option.
|
|
801
|
+
* @throws {RequiredError}
|
|
802
|
+
*/
|
|
803
|
+
listModels(name: string, xVersionId?: string, options?: RawAxiosRequestConfig): AxiosPromise<Array<Model>> {
|
|
804
|
+
return localVarFp.listModels(name, xVersionId, options).then((request) => request(axios, basePath));
|
|
805
|
+
},
|
|
806
|
+
};
|
|
807
|
+
};
|
|
808
|
+
|
|
809
|
+
/**
|
|
810
|
+
* ModelsApi - object-oriented interface
|
|
811
|
+
* @export
|
|
812
|
+
* @class ModelsApi
|
|
813
|
+
* @extends {BaseAPI}
|
|
814
|
+
*/
|
|
815
|
+
export class ModelsApi extends BaseAPI {
|
|
816
|
+
/**
|
|
817
|
+
*
|
|
818
|
+
* @summary Returns a Malloy model.
|
|
819
|
+
* @param {string} name Name of package.
|
|
820
|
+
* @param {string} path Path to model wihin the package.
|
|
821
|
+
* @param {string} [xVersionId]
|
|
822
|
+
* @param {*} [options] Override http request option.
|
|
823
|
+
* @throws {RequiredError}
|
|
824
|
+
* @memberof ModelsApi
|
|
825
|
+
*/
|
|
826
|
+
public getModel(name: string, path: string, xVersionId?: string, options?: RawAxiosRequestConfig) {
|
|
827
|
+
return ModelsApiFp(this.configuration).getModel(name, path, xVersionId, options).then((request) => request(this.axios, this.basePath));
|
|
828
|
+
}
|
|
829
|
+
|
|
830
|
+
/**
|
|
831
|
+
*
|
|
832
|
+
* @summary Returns a list of relative paths to the models in the package.
|
|
833
|
+
* @param {string} name Name of package
|
|
834
|
+
* @param {string} [xVersionId]
|
|
835
|
+
* @param {*} [options] Override http request option.
|
|
836
|
+
* @throws {RequiredError}
|
|
837
|
+
* @memberof ModelsApi
|
|
838
|
+
*/
|
|
839
|
+
public listModels(name: string, xVersionId?: string, options?: RawAxiosRequestConfig) {
|
|
840
|
+
return ModelsApiFp(this.configuration).listModels(name, xVersionId, options).then((request) => request(this.axios, this.basePath));
|
|
841
|
+
}
|
|
842
|
+
}
|
|
843
|
+
|
|
844
|
+
|
|
845
|
+
|
|
846
|
+
/**
|
|
847
|
+
* PackagesApi - axios parameter creator
|
|
848
|
+
* @export
|
|
849
|
+
*/
|
|
850
|
+
export const PackagesApiAxiosParamCreator = function (configuration?: Configuration) {
|
|
851
|
+
return {
|
|
852
|
+
/**
|
|
853
|
+
*
|
|
854
|
+
* @summary Returns the package metadata.
|
|
855
|
+
* @param {string} name Package name
|
|
856
|
+
* @param {string} [xVersionId]
|
|
857
|
+
* @param {*} [options] Override http request option.
|
|
858
|
+
* @throws {RequiredError}
|
|
859
|
+
*/
|
|
860
|
+
getPackage: async (name: string, xVersionId?: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
861
|
+
// verify required parameter 'name' is not null or undefined
|
|
862
|
+
assertParamExists('getPackage', 'name', name)
|
|
863
|
+
const localVarPath = `/packages/{name}`
|
|
864
|
+
.replace(`{${"name"}}`, encodeURIComponent(String(name)));
|
|
865
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
866
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
867
|
+
let baseOptions;
|
|
868
|
+
if (configuration) {
|
|
869
|
+
baseOptions = configuration.baseOptions;
|
|
870
|
+
}
|
|
871
|
+
|
|
872
|
+
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
|
|
873
|
+
const localVarHeaderParameter = {} as any;
|
|
874
|
+
const localVarQueryParameter = {} as any;
|
|
875
|
+
|
|
876
|
+
if (xVersionId != null) {
|
|
877
|
+
localVarHeaderParameter['X-Version-Id'] = String(xVersionId);
|
|
878
|
+
}
|
|
879
|
+
|
|
880
|
+
|
|
881
|
+
|
|
882
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
883
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
884
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
885
|
+
|
|
886
|
+
return {
|
|
887
|
+
url: toPathString(localVarUrlObj),
|
|
888
|
+
options: localVarRequestOptions,
|
|
889
|
+
};
|
|
890
|
+
},
|
|
891
|
+
/**
|
|
892
|
+
*
|
|
893
|
+
* @summary Returns a list of the Packages hosted on this server.
|
|
894
|
+
* @param {*} [options] Override http request option.
|
|
895
|
+
* @throws {RequiredError}
|
|
896
|
+
*/
|
|
897
|
+
listPackages: async (options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
898
|
+
const localVarPath = `/packages`;
|
|
899
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
900
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
901
|
+
let baseOptions;
|
|
902
|
+
if (configuration) {
|
|
903
|
+
baseOptions = configuration.baseOptions;
|
|
904
|
+
}
|
|
905
|
+
|
|
906
|
+
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
|
|
907
|
+
const localVarHeaderParameter = {} as any;
|
|
908
|
+
const localVarQueryParameter = {} as any;
|
|
909
|
+
|
|
910
|
+
|
|
911
|
+
|
|
912
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
913
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
914
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
915
|
+
|
|
916
|
+
return {
|
|
917
|
+
url: toPathString(localVarUrlObj),
|
|
918
|
+
options: localVarRequestOptions,
|
|
919
|
+
};
|
|
920
|
+
},
|
|
921
|
+
}
|
|
922
|
+
};
|
|
923
|
+
|
|
924
|
+
/**
|
|
925
|
+
* PackagesApi - functional programming interface
|
|
926
|
+
* @export
|
|
927
|
+
*/
|
|
928
|
+
export const PackagesApiFp = function(configuration?: Configuration) {
|
|
929
|
+
const localVarAxiosParamCreator = PackagesApiAxiosParamCreator(configuration)
|
|
930
|
+
return {
|
|
931
|
+
/**
|
|
932
|
+
*
|
|
933
|
+
* @summary Returns the package metadata.
|
|
934
|
+
* @param {string} name Package name
|
|
935
|
+
* @param {string} [xVersionId]
|
|
936
|
+
* @param {*} [options] Override http request option.
|
|
937
|
+
* @throws {RequiredError}
|
|
938
|
+
*/
|
|
939
|
+
async getPackage(name: string, xVersionId?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Package>> {
|
|
940
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.getPackage(name, xVersionId, options);
|
|
941
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
942
|
+
const localVarOperationServerBasePath = operationServerMap['PackagesApi.getPackage']?.[localVarOperationServerIndex]?.url;
|
|
943
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
944
|
+
},
|
|
945
|
+
/**
|
|
946
|
+
*
|
|
947
|
+
* @summary Returns a list of the Packages hosted on this server.
|
|
948
|
+
* @param {*} [options] Override http request option.
|
|
949
|
+
* @throws {RequiredError}
|
|
950
|
+
*/
|
|
951
|
+
async listPackages(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<Package>>> {
|
|
952
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.listPackages(options);
|
|
953
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
954
|
+
const localVarOperationServerBasePath = operationServerMap['PackagesApi.listPackages']?.[localVarOperationServerIndex]?.url;
|
|
955
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
956
|
+
},
|
|
957
|
+
}
|
|
958
|
+
};
|
|
959
|
+
|
|
960
|
+
/**
|
|
961
|
+
* PackagesApi - factory interface
|
|
962
|
+
* @export
|
|
963
|
+
*/
|
|
964
|
+
export const PackagesApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
|
|
965
|
+
const localVarFp = PackagesApiFp(configuration)
|
|
966
|
+
return {
|
|
967
|
+
/**
|
|
968
|
+
*
|
|
969
|
+
* @summary Returns the package metadata.
|
|
970
|
+
* @param {string} name Package name
|
|
971
|
+
* @param {string} [xVersionId]
|
|
972
|
+
* @param {*} [options] Override http request option.
|
|
973
|
+
* @throws {RequiredError}
|
|
974
|
+
*/
|
|
975
|
+
getPackage(name: string, xVersionId?: string, options?: RawAxiosRequestConfig): AxiosPromise<Package> {
|
|
976
|
+
return localVarFp.getPackage(name, xVersionId, options).then((request) => request(axios, basePath));
|
|
977
|
+
},
|
|
978
|
+
/**
|
|
979
|
+
*
|
|
980
|
+
* @summary Returns a list of the Packages hosted on this server.
|
|
981
|
+
* @param {*} [options] Override http request option.
|
|
982
|
+
* @throws {RequiredError}
|
|
983
|
+
*/
|
|
984
|
+
listPackages(options?: RawAxiosRequestConfig): AxiosPromise<Array<Package>> {
|
|
985
|
+
return localVarFp.listPackages(options).then((request) => request(axios, basePath));
|
|
986
|
+
},
|
|
987
|
+
};
|
|
988
|
+
};
|
|
989
|
+
|
|
990
|
+
/**
|
|
991
|
+
* PackagesApi - object-oriented interface
|
|
992
|
+
* @export
|
|
993
|
+
* @class PackagesApi
|
|
994
|
+
* @extends {BaseAPI}
|
|
995
|
+
*/
|
|
996
|
+
export class PackagesApi extends BaseAPI {
|
|
997
|
+
/**
|
|
998
|
+
*
|
|
999
|
+
* @summary Returns the package metadata.
|
|
1000
|
+
* @param {string} name Package name
|
|
1001
|
+
* @param {string} [xVersionId]
|
|
1002
|
+
* @param {*} [options] Override http request option.
|
|
1003
|
+
* @throws {RequiredError}
|
|
1004
|
+
* @memberof PackagesApi
|
|
1005
|
+
*/
|
|
1006
|
+
public getPackage(name: string, xVersionId?: string, options?: RawAxiosRequestConfig) {
|
|
1007
|
+
return PackagesApiFp(this.configuration).getPackage(name, xVersionId, options).then((request) => request(this.axios, this.basePath));
|
|
1008
|
+
}
|
|
1009
|
+
|
|
1010
|
+
/**
|
|
1011
|
+
*
|
|
1012
|
+
* @summary Returns a list of the Packages hosted on this server.
|
|
1013
|
+
* @param {*} [options] Override http request option.
|
|
1014
|
+
* @throws {RequiredError}
|
|
1015
|
+
* @memberof PackagesApi
|
|
1016
|
+
*/
|
|
1017
|
+
public listPackages(options?: RawAxiosRequestConfig) {
|
|
1018
|
+
return PackagesApiFp(this.configuration).listPackages(options).then((request) => request(this.axios, this.basePath));
|
|
1019
|
+
}
|
|
1020
|
+
}
|
|
1021
|
+
|
|
1022
|
+
|
|
1023
|
+
|
|
1024
|
+
/**
|
|
1025
|
+
* QueryresultsApi - axios parameter creator
|
|
1026
|
+
* @export
|
|
1027
|
+
*/
|
|
1028
|
+
export const QueryresultsApiAxiosParamCreator = function (configuration?: Configuration) {
|
|
1029
|
+
return {
|
|
1030
|
+
/**
|
|
1031
|
+
*
|
|
1032
|
+
* @summary Returns a query and its results.
|
|
1033
|
+
* @param {string} name Name of package
|
|
1034
|
+
* @param {string} path Path to model within the package.
|
|
1035
|
+
* @param {string} [xVersionId]
|
|
1036
|
+
* @param {string} [query] Query string to execute on the model. If the query is paramter is set, the queryName parameter must be empty.
|
|
1037
|
+
* @param {string} [sourceName] Name of the source in the model to use for queryName, search, and topValue requests.
|
|
1038
|
+
* @param {string} [queryName] Name of a query to execute on a source in the model. Requires the sourceName parameter is set. If the queryName is paramter is set, the query parameter must be empty.
|
|
1039
|
+
* @param {*} [options] Override http request option.
|
|
1040
|
+
* @throws {RequiredError}
|
|
1041
|
+
*/
|
|
1042
|
+
executeQuery: async (name: string, path: string, xVersionId?: string, query?: string, sourceName?: string, queryName?: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
1043
|
+
// verify required parameter 'name' is not null or undefined
|
|
1044
|
+
assertParamExists('executeQuery', 'name', name)
|
|
1045
|
+
// verify required parameter 'path' is not null or undefined
|
|
1046
|
+
assertParamExists('executeQuery', 'path', path)
|
|
1047
|
+
const localVarPath = `/packages/{name}/queryResults/{path}`
|
|
1048
|
+
.replace(`{${"name"}}`, encodeURIComponent(String(name)))
|
|
1049
|
+
.replace(`{${"path"}}`, encodeURIComponent(String(path)));
|
|
1050
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
1051
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
1052
|
+
let baseOptions;
|
|
1053
|
+
if (configuration) {
|
|
1054
|
+
baseOptions = configuration.baseOptions;
|
|
1055
|
+
}
|
|
1056
|
+
|
|
1057
|
+
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
|
|
1058
|
+
const localVarHeaderParameter = {} as any;
|
|
1059
|
+
const localVarQueryParameter = {} as any;
|
|
1060
|
+
|
|
1061
|
+
if (query !== undefined) {
|
|
1062
|
+
localVarQueryParameter['query'] = query;
|
|
1063
|
+
}
|
|
1064
|
+
|
|
1065
|
+
if (sourceName !== undefined) {
|
|
1066
|
+
localVarQueryParameter['sourceName'] = sourceName;
|
|
1067
|
+
}
|
|
1068
|
+
|
|
1069
|
+
if (queryName !== undefined) {
|
|
1070
|
+
localVarQueryParameter['queryName'] = queryName;
|
|
1071
|
+
}
|
|
1072
|
+
|
|
1073
|
+
if (xVersionId != null) {
|
|
1074
|
+
localVarHeaderParameter['X-Version-Id'] = String(xVersionId);
|
|
1075
|
+
}
|
|
1076
|
+
|
|
1077
|
+
|
|
1078
|
+
|
|
1079
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
1080
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
1081
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
1082
|
+
|
|
1083
|
+
return {
|
|
1084
|
+
url: toPathString(localVarUrlObj),
|
|
1085
|
+
options: localVarRequestOptions,
|
|
1086
|
+
};
|
|
1087
|
+
},
|
|
1088
|
+
}
|
|
1089
|
+
};
|
|
1090
|
+
|
|
1091
|
+
/**
|
|
1092
|
+
* QueryresultsApi - functional programming interface
|
|
1093
|
+
* @export
|
|
1094
|
+
*/
|
|
1095
|
+
export const QueryresultsApiFp = function(configuration?: Configuration) {
|
|
1096
|
+
const localVarAxiosParamCreator = QueryresultsApiAxiosParamCreator(configuration)
|
|
1097
|
+
return {
|
|
1098
|
+
/**
|
|
1099
|
+
*
|
|
1100
|
+
* @summary Returns a query and its results.
|
|
1101
|
+
* @param {string} name Name of package
|
|
1102
|
+
* @param {string} path Path to model within the package.
|
|
1103
|
+
* @param {string} [xVersionId]
|
|
1104
|
+
* @param {string} [query] Query string to execute on the model. If the query is paramter is set, the queryName parameter must be empty.
|
|
1105
|
+
* @param {string} [sourceName] Name of the source in the model to use for queryName, search, and topValue requests.
|
|
1106
|
+
* @param {string} [queryName] Name of a query to execute on a source in the model. Requires the sourceName parameter is set. If the queryName is paramter is set, the query parameter must be empty.
|
|
1107
|
+
* @param {*} [options] Override http request option.
|
|
1108
|
+
* @throws {RequiredError}
|
|
1109
|
+
*/
|
|
1110
|
+
async executeQuery(name: string, path: string, xVersionId?: string, query?: string, sourceName?: string, queryName?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<QueryResult>> {
|
|
1111
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.executeQuery(name, path, xVersionId, query, sourceName, queryName, options);
|
|
1112
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
1113
|
+
const localVarOperationServerBasePath = operationServerMap['QueryresultsApi.executeQuery']?.[localVarOperationServerIndex]?.url;
|
|
1114
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
1115
|
+
},
|
|
1116
|
+
}
|
|
1117
|
+
};
|
|
1118
|
+
|
|
1119
|
+
/**
|
|
1120
|
+
* QueryresultsApi - factory interface
|
|
1121
|
+
* @export
|
|
1122
|
+
*/
|
|
1123
|
+
export const QueryresultsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
|
|
1124
|
+
const localVarFp = QueryresultsApiFp(configuration)
|
|
1125
|
+
return {
|
|
1126
|
+
/**
|
|
1127
|
+
*
|
|
1128
|
+
* @summary Returns a query and its results.
|
|
1129
|
+
* @param {string} name Name of package
|
|
1130
|
+
* @param {string} path Path to model within the package.
|
|
1131
|
+
* @param {string} [xVersionId]
|
|
1132
|
+
* @param {string} [query] Query string to execute on the model. If the query is paramter is set, the queryName parameter must be empty.
|
|
1133
|
+
* @param {string} [sourceName] Name of the source in the model to use for queryName, search, and topValue requests.
|
|
1134
|
+
* @param {string} [queryName] Name of a query to execute on a source in the model. Requires the sourceName parameter is set. If the queryName is paramter is set, the query parameter must be empty.
|
|
1135
|
+
* @param {*} [options] Override http request option.
|
|
1136
|
+
* @throws {RequiredError}
|
|
1137
|
+
*/
|
|
1138
|
+
executeQuery(name: string, path: string, xVersionId?: string, query?: string, sourceName?: string, queryName?: string, options?: RawAxiosRequestConfig): AxiosPromise<QueryResult> {
|
|
1139
|
+
return localVarFp.executeQuery(name, path, xVersionId, query, sourceName, queryName, options).then((request) => request(axios, basePath));
|
|
1140
|
+
},
|
|
1141
|
+
};
|
|
1142
|
+
};
|
|
1143
|
+
|
|
1144
|
+
/**
|
|
1145
|
+
* QueryresultsApi - object-oriented interface
|
|
1146
|
+
* @export
|
|
1147
|
+
* @class QueryresultsApi
|
|
1148
|
+
* @extends {BaseAPI}
|
|
1149
|
+
*/
|
|
1150
|
+
export class QueryresultsApi extends BaseAPI {
|
|
1151
|
+
/**
|
|
1152
|
+
*
|
|
1153
|
+
* @summary Returns a query and its results.
|
|
1154
|
+
* @param {string} name Name of package
|
|
1155
|
+
* @param {string} path Path to model within the package.
|
|
1156
|
+
* @param {string} [xVersionId]
|
|
1157
|
+
* @param {string} [query] Query string to execute on the model. If the query is paramter is set, the queryName parameter must be empty.
|
|
1158
|
+
* @param {string} [sourceName] Name of the source in the model to use for queryName, search, and topValue requests.
|
|
1159
|
+
* @param {string} [queryName] Name of a query to execute on a source in the model. Requires the sourceName parameter is set. If the queryName is paramter is set, the query parameter must be empty.
|
|
1160
|
+
* @param {*} [options] Override http request option.
|
|
1161
|
+
* @throws {RequiredError}
|
|
1162
|
+
* @memberof QueryresultsApi
|
|
1163
|
+
*/
|
|
1164
|
+
public executeQuery(name: string, path: string, xVersionId?: string, query?: string, sourceName?: string, queryName?: string, options?: RawAxiosRequestConfig) {
|
|
1165
|
+
return QueryresultsApiFp(this.configuration).executeQuery(name, path, xVersionId, query, sourceName, queryName, options).then((request) => request(this.axios, this.basePath));
|
|
1166
|
+
}
|
|
1167
|
+
}
|
|
1168
|
+
|
|
1169
|
+
|
|
1170
|
+
|