@malloydata/db-publisher 0.0.270-dev250429163414

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 (40) hide show
  1. package/dist/client/api.d.ts +1537 -0
  2. package/dist/client/api.js +1572 -0
  3. package/dist/client/api.js.map +1 -0
  4. package/dist/client/base.d.ts +66 -0
  5. package/dist/client/base.js +69 -0
  6. package/dist/client/base.js.map +1 -0
  7. package/dist/client/common.d.ts +65 -0
  8. package/dist/client/common.js +147 -0
  9. package/dist/client/common.js.map +1 -0
  10. package/dist/client/configuration.d.ts +91 -0
  11. package/dist/client/configuration.js +50 -0
  12. package/dist/client/configuration.js.map +1 -0
  13. package/dist/client/index.d.ts +15 -0
  14. package/dist/client/index.js +32 -0
  15. package/dist/client/index.js.map +1 -0
  16. package/dist/index.d.ts +1 -0
  17. package/dist/index.js +12 -0
  18. package/dist/index.js.map +1 -0
  19. package/dist/publisher_connection.d.ts +29 -0
  20. package/dist/publisher_connection.js +119 -0
  21. package/dist/publisher_connection.js.map +1 -0
  22. package/dist/publisher_connection.spec.d.ts +1 -0
  23. package/dist/publisher_connection.spec.js +806 -0
  24. package/dist/publisher_connection.spec.js.map +1 -0
  25. package/openapitools.json +7 -0
  26. package/package.json +32 -0
  27. package/publisher-api-doc.yaml +1026 -0
  28. package/src/client/.openapi-generator/FILES +9 -0
  29. package/src/client/.openapi-generator/VERSION +1 -0
  30. package/src/client/.openapi-generator-ignore +23 -0
  31. package/src/client/api.ts +2342 -0
  32. package/src/client/base.ts +86 -0
  33. package/src/client/common.ts +150 -0
  34. package/src/client/configuration.ts +115 -0
  35. package/src/client/git_push.sh +57 -0
  36. package/src/client/index.ts +19 -0
  37. package/src/index.ts +8 -0
  38. package/src/publisher_connection.spec.ts +1118 -0
  39. package/src/publisher_connection.ts +223 -0
  40. package/tsconfig.json +13 -0
@@ -0,0 +1,1572 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * Malloy Publisher - Semantic Model Serving API
6
+ * 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.
7
+ *
8
+ * The version of the OpenAPI document: v0
9
+ *
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+ var __importDefault = (this && this.__importDefault) || function (mod) {
16
+ return (mod && mod.__esModule) ? mod : { "default": mod };
17
+ };
18
+ Object.defineProperty(exports, "__esModule", { value: true });
19
+ exports.SchedulesApi = exports.SchedulesApiFactory = exports.SchedulesApiFp = exports.SchedulesApiAxiosParamCreator = exports.QueryresultsApi = exports.QueryresultsApiFactory = exports.QueryresultsApiFp = exports.QueryresultsApiAxiosParamCreator = exports.ProjectsApi = exports.ProjectsApiFactory = exports.ProjectsApiFp = exports.ProjectsApiAxiosParamCreator = exports.PackagesApi = exports.PackagesApiFactory = exports.PackagesApiFp = exports.PackagesApiAxiosParamCreator = exports.ModelsApi = exports.ModelsApiFactory = exports.ModelsApiFp = exports.ModelsApiAxiosParamCreator = exports.DefaultApi = exports.DefaultApiFactory = exports.DefaultApiFp = exports.DefaultApiAxiosParamCreator = exports.DatabasesApi = exports.DatabasesApiFactory = exports.DatabasesApiFp = exports.DatabasesApiAxiosParamCreator = exports.ConnectionsApi = exports.ConnectionsApiFactory = exports.ConnectionsApiFp = exports.ConnectionsApiAxiosParamCreator = exports.NotebookCellTypeEnum = exports.ModelTypeEnum = exports.DatabaseTypeEnum = exports.ConnectionTypeEnum = exports.CompiledModelTypeEnum = void 0;
20
+ const axios_1 = __importDefault(require("axios"));
21
+ // Some imports not used depending on template conditions
22
+ // @ts-ignore
23
+ const common_1 = require("./common");
24
+ // @ts-ignore
25
+ const base_1 = require("./base");
26
+ exports.CompiledModelTypeEnum = {
27
+ Source: 'source',
28
+ Notebook: 'notebook'
29
+ };
30
+ exports.ConnectionTypeEnum = {
31
+ Postgres: 'postgres',
32
+ Bigquery: 'bigquery',
33
+ Snowflake: 'snowflake',
34
+ Trino: 'trino'
35
+ };
36
+ exports.DatabaseTypeEnum = {
37
+ Embedded: 'embedded',
38
+ Materialized: 'materialized'
39
+ };
40
+ exports.ModelTypeEnum = {
41
+ Source: 'source',
42
+ Notebook: 'notebook'
43
+ };
44
+ exports.NotebookCellTypeEnum = {
45
+ Markdown: 'markdown',
46
+ Code: 'code'
47
+ };
48
+ /**
49
+ * ConnectionsApi - axios parameter creator
50
+ * @export
51
+ */
52
+ const ConnectionsApiAxiosParamCreator = function (configuration) {
53
+ return {
54
+ /**
55
+ *
56
+ * @summary Returns a connection.
57
+ * @param {string} projectName Name of project
58
+ * @param {string} connectionName Name of connection
59
+ * @param {*} [options] Override http request option.
60
+ * @throws {RequiredError}
61
+ */
62
+ getConnection: async (projectName, connectionName, options = {}) => {
63
+ // verify required parameter 'projectName' is not null or undefined
64
+ (0, common_1.assertParamExists)('getConnection', 'projectName', projectName);
65
+ // verify required parameter 'connectionName' is not null or undefined
66
+ (0, common_1.assertParamExists)('getConnection', 'connectionName', connectionName);
67
+ const localVarPath = `/projects/{projectName}/connections/{connectionName}`
68
+ .replace(`{${"projectName"}}`, encodeURIComponent(String(projectName)))
69
+ .replace(`{${"connectionName"}}`, encodeURIComponent(String(connectionName)));
70
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
71
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
72
+ let baseOptions;
73
+ if (configuration) {
74
+ baseOptions = configuration.baseOptions;
75
+ }
76
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options };
77
+ const localVarHeaderParameter = {};
78
+ const localVarQueryParameter = {};
79
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
80
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
81
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
82
+ return {
83
+ url: (0, common_1.toPathString)(localVarUrlObj),
84
+ options: localVarRequestOptions,
85
+ };
86
+ },
87
+ /**
88
+ *
89
+ * @summary Returns a query and its results.
90
+ * @param {string} projectName Name of project
91
+ * @param {string} connectionName Name of connection
92
+ * @param {string} [sqlStatement] SQL statement
93
+ * @param {string} [_options] Options
94
+ * @param {*} [options] Override http request option.
95
+ * @throws {RequiredError}
96
+ */
97
+ getQuerydata: async (projectName, connectionName, sqlStatement, _options, options = {}) => {
98
+ // verify required parameter 'projectName' is not null or undefined
99
+ (0, common_1.assertParamExists)('getQuerydata', 'projectName', projectName);
100
+ // verify required parameter 'connectionName' is not null or undefined
101
+ (0, common_1.assertParamExists)('getQuerydata', 'connectionName', connectionName);
102
+ const localVarPath = `/projects/{projectName}/connections/{connectionName}/queryData`
103
+ .replace(`{${"projectName"}}`, encodeURIComponent(String(projectName)))
104
+ .replace(`{${"connectionName"}}`, encodeURIComponent(String(connectionName)));
105
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
106
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
107
+ let baseOptions;
108
+ if (configuration) {
109
+ baseOptions = configuration.baseOptions;
110
+ }
111
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options };
112
+ const localVarHeaderParameter = {};
113
+ const localVarQueryParameter = {};
114
+ if (sqlStatement !== undefined) {
115
+ localVarQueryParameter['sqlStatement'] = sqlStatement;
116
+ }
117
+ if (_options !== undefined) {
118
+ localVarQueryParameter['options'] = _options;
119
+ }
120
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
121
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
122
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
123
+ return {
124
+ url: (0, common_1.toPathString)(localVarUrlObj),
125
+ options: localVarRequestOptions,
126
+ };
127
+ },
128
+ /**
129
+ *
130
+ * @summary Returns a SQL source.
131
+ * @param {string} projectName Name of project
132
+ * @param {string} connectionName Name of connection
133
+ * @param {string} [sqlStatement] SQL statement
134
+ * @param {*} [options] Override http request option.
135
+ * @throws {RequiredError}
136
+ */
137
+ getSqlsource: async (projectName, connectionName, sqlStatement, options = {}) => {
138
+ // verify required parameter 'projectName' is not null or undefined
139
+ (0, common_1.assertParamExists)('getSqlsource', 'projectName', projectName);
140
+ // verify required parameter 'connectionName' is not null or undefined
141
+ (0, common_1.assertParamExists)('getSqlsource', 'connectionName', connectionName);
142
+ const localVarPath = `/projects/{projectName}/connections/{connectionName}/sqlSource`
143
+ .replace(`{${"projectName"}}`, encodeURIComponent(String(projectName)))
144
+ .replace(`{${"connectionName"}}`, encodeURIComponent(String(connectionName)));
145
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
146
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
147
+ let baseOptions;
148
+ if (configuration) {
149
+ baseOptions = configuration.baseOptions;
150
+ }
151
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options };
152
+ const localVarHeaderParameter = {};
153
+ const localVarQueryParameter = {};
154
+ if (sqlStatement !== undefined) {
155
+ localVarQueryParameter['sqlStatement'] = sqlStatement;
156
+ }
157
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
158
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
159
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
160
+ return {
161
+ url: (0, common_1.toPathString)(localVarUrlObj),
162
+ options: localVarRequestOptions,
163
+ };
164
+ },
165
+ /**
166
+ *
167
+ * @summary Returns a table source.
168
+ * @param {string} projectName Name of project
169
+ * @param {string} connectionName Name of connection
170
+ * @param {string} [tableKey] Table key
171
+ * @param {string} [tablePath] Table path
172
+ * @param {*} [options] Override http request option.
173
+ * @throws {RequiredError}
174
+ */
175
+ getTablesource: async (projectName, connectionName, tableKey, tablePath, options = {}) => {
176
+ // verify required parameter 'projectName' is not null or undefined
177
+ (0, common_1.assertParamExists)('getTablesource', 'projectName', projectName);
178
+ // verify required parameter 'connectionName' is not null or undefined
179
+ (0, common_1.assertParamExists)('getTablesource', 'connectionName', connectionName);
180
+ const localVarPath = `/projects/{projectName}/connections/{connectionName}/tableSource`
181
+ .replace(`{${"projectName"}}`, encodeURIComponent(String(projectName)))
182
+ .replace(`{${"connectionName"}}`, encodeURIComponent(String(connectionName)));
183
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
184
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
185
+ let baseOptions;
186
+ if (configuration) {
187
+ baseOptions = configuration.baseOptions;
188
+ }
189
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options };
190
+ const localVarHeaderParameter = {};
191
+ const localVarQueryParameter = {};
192
+ if (tableKey !== undefined) {
193
+ localVarQueryParameter['tableKey'] = tableKey;
194
+ }
195
+ if (tablePath !== undefined) {
196
+ localVarQueryParameter['tablePath'] = tablePath;
197
+ }
198
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
199
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
200
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
201
+ return {
202
+ url: (0, common_1.toPathString)(localVarUrlObj),
203
+ options: localVarRequestOptions,
204
+ };
205
+ },
206
+ /**
207
+ *
208
+ * @summary Returns a temporary table.
209
+ * @param {string} projectName Name of project
210
+ * @param {string} connectionName Name of connection
211
+ * @param {string} [sqlStatement] SQL statement
212
+ * @param {*} [options] Override http request option.
213
+ * @throws {RequiredError}
214
+ */
215
+ getTemporarytable: async (projectName, connectionName, sqlStatement, options = {}) => {
216
+ // verify required parameter 'projectName' is not null or undefined
217
+ (0, common_1.assertParamExists)('getTemporarytable', 'projectName', projectName);
218
+ // verify required parameter 'connectionName' is not null or undefined
219
+ (0, common_1.assertParamExists)('getTemporarytable', 'connectionName', connectionName);
220
+ const localVarPath = `/projects/{projectName}/connections/{connectionName}/temporaryTable`
221
+ .replace(`{${"projectName"}}`, encodeURIComponent(String(projectName)))
222
+ .replace(`{${"connectionName"}}`, encodeURIComponent(String(connectionName)));
223
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
224
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
225
+ let baseOptions;
226
+ if (configuration) {
227
+ baseOptions = configuration.baseOptions;
228
+ }
229
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options };
230
+ const localVarHeaderParameter = {};
231
+ const localVarQueryParameter = {};
232
+ if (sqlStatement !== undefined) {
233
+ localVarQueryParameter['sqlStatement'] = sqlStatement;
234
+ }
235
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
236
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
237
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
238
+ return {
239
+ url: (0, common_1.toPathString)(localVarUrlObj),
240
+ options: localVarRequestOptions,
241
+ };
242
+ },
243
+ /**
244
+ *
245
+ * @summary Returns a test.
246
+ * @param {string} projectName Name of project
247
+ * @param {string} connectionName Name of connection
248
+ * @param {*} [options] Override http request option.
249
+ * @throws {RequiredError}
250
+ */
251
+ getTest: async (projectName, connectionName, options = {}) => {
252
+ // verify required parameter 'projectName' is not null or undefined
253
+ (0, common_1.assertParamExists)('getTest', 'projectName', projectName);
254
+ // verify required parameter 'connectionName' is not null or undefined
255
+ (0, common_1.assertParamExists)('getTest', 'connectionName', connectionName);
256
+ const localVarPath = `/projects/{projectName}/connections/{connectionName}/test`
257
+ .replace(`{${"projectName"}}`, encodeURIComponent(String(projectName)))
258
+ .replace(`{${"connectionName"}}`, encodeURIComponent(String(connectionName)));
259
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
260
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
261
+ let baseOptions;
262
+ if (configuration) {
263
+ baseOptions = configuration.baseOptions;
264
+ }
265
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options };
266
+ const localVarHeaderParameter = {};
267
+ const localVarQueryParameter = {};
268
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
269
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
270
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
271
+ return {
272
+ url: (0, common_1.toPathString)(localVarUrlObj),
273
+ options: localVarRequestOptions,
274
+ };
275
+ },
276
+ /**
277
+ *
278
+ * @summary Returns a list of the connections in the project.
279
+ * @param {string} projectName Name of project
280
+ * @param {*} [options] Override http request option.
281
+ * @throws {RequiredError}
282
+ */
283
+ listConnections: async (projectName, options = {}) => {
284
+ // verify required parameter 'projectName' is not null or undefined
285
+ (0, common_1.assertParamExists)('listConnections', 'projectName', projectName);
286
+ const localVarPath = `/projects/{projectName}/connections`
287
+ .replace(`{${"projectName"}}`, encodeURIComponent(String(projectName)));
288
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
289
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
290
+ let baseOptions;
291
+ if (configuration) {
292
+ baseOptions = configuration.baseOptions;
293
+ }
294
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options };
295
+ const localVarHeaderParameter = {};
296
+ const localVarQueryParameter = {};
297
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
298
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
299
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
300
+ return {
301
+ url: (0, common_1.toPathString)(localVarUrlObj),
302
+ options: localVarRequestOptions,
303
+ };
304
+ },
305
+ };
306
+ };
307
+ exports.ConnectionsApiAxiosParamCreator = ConnectionsApiAxiosParamCreator;
308
+ /**
309
+ * ConnectionsApi - functional programming interface
310
+ * @export
311
+ */
312
+ const ConnectionsApiFp = function (configuration) {
313
+ const localVarAxiosParamCreator = (0, exports.ConnectionsApiAxiosParamCreator)(configuration);
314
+ return {
315
+ /**
316
+ *
317
+ * @summary Returns a connection.
318
+ * @param {string} projectName Name of project
319
+ * @param {string} connectionName Name of connection
320
+ * @param {*} [options] Override http request option.
321
+ * @throws {RequiredError}
322
+ */
323
+ async getConnection(projectName, connectionName, options) {
324
+ var _a, _b, _c;
325
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getConnection(projectName, connectionName, options);
326
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
327
+ const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['ConnectionsApi.getConnection']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
328
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
329
+ },
330
+ /**
331
+ *
332
+ * @summary Returns a query and its results.
333
+ * @param {string} projectName Name of project
334
+ * @param {string} connectionName Name of connection
335
+ * @param {string} [sqlStatement] SQL statement
336
+ * @param {string} [_options] Options
337
+ * @param {*} [options] Override http request option.
338
+ * @throws {RequiredError}
339
+ */
340
+ async getQuerydata(projectName, connectionName, sqlStatement, _options, options) {
341
+ var _a, _b, _c;
342
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getQuerydata(projectName, connectionName, sqlStatement, _options, options);
343
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
344
+ const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['ConnectionsApi.getQuerydata']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
345
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
346
+ },
347
+ /**
348
+ *
349
+ * @summary Returns a SQL source.
350
+ * @param {string} projectName Name of project
351
+ * @param {string} connectionName Name of connection
352
+ * @param {string} [sqlStatement] SQL statement
353
+ * @param {*} [options] Override http request option.
354
+ * @throws {RequiredError}
355
+ */
356
+ async getSqlsource(projectName, connectionName, sqlStatement, options) {
357
+ var _a, _b, _c;
358
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getSqlsource(projectName, connectionName, sqlStatement, options);
359
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
360
+ const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['ConnectionsApi.getSqlsource']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
361
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
362
+ },
363
+ /**
364
+ *
365
+ * @summary Returns a table source.
366
+ * @param {string} projectName Name of project
367
+ * @param {string} connectionName Name of connection
368
+ * @param {string} [tableKey] Table key
369
+ * @param {string} [tablePath] Table path
370
+ * @param {*} [options] Override http request option.
371
+ * @throws {RequiredError}
372
+ */
373
+ async getTablesource(projectName, connectionName, tableKey, tablePath, options) {
374
+ var _a, _b, _c;
375
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getTablesource(projectName, connectionName, tableKey, tablePath, options);
376
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
377
+ const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['ConnectionsApi.getTablesource']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
378
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
379
+ },
380
+ /**
381
+ *
382
+ * @summary Returns a temporary table.
383
+ * @param {string} projectName Name of project
384
+ * @param {string} connectionName Name of connection
385
+ * @param {string} [sqlStatement] SQL statement
386
+ * @param {*} [options] Override http request option.
387
+ * @throws {RequiredError}
388
+ */
389
+ async getTemporarytable(projectName, connectionName, sqlStatement, options) {
390
+ var _a, _b, _c;
391
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getTemporarytable(projectName, connectionName, sqlStatement, options);
392
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
393
+ const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['ConnectionsApi.getTemporarytable']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
394
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
395
+ },
396
+ /**
397
+ *
398
+ * @summary Returns a test.
399
+ * @param {string} projectName Name of project
400
+ * @param {string} connectionName Name of connection
401
+ * @param {*} [options] Override http request option.
402
+ * @throws {RequiredError}
403
+ */
404
+ async getTest(projectName, connectionName, options) {
405
+ var _a, _b, _c;
406
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getTest(projectName, connectionName, options);
407
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
408
+ const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['ConnectionsApi.getTest']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
409
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
410
+ },
411
+ /**
412
+ *
413
+ * @summary Returns a list of the connections in the project.
414
+ * @param {string} projectName Name of project
415
+ * @param {*} [options] Override http request option.
416
+ * @throws {RequiredError}
417
+ */
418
+ async listConnections(projectName, options) {
419
+ var _a, _b, _c;
420
+ const localVarAxiosArgs = await localVarAxiosParamCreator.listConnections(projectName, options);
421
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
422
+ const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['ConnectionsApi.listConnections']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
423
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
424
+ },
425
+ };
426
+ };
427
+ exports.ConnectionsApiFp = ConnectionsApiFp;
428
+ /**
429
+ * ConnectionsApi - factory interface
430
+ * @export
431
+ */
432
+ const ConnectionsApiFactory = function (configuration, basePath, axios) {
433
+ const localVarFp = (0, exports.ConnectionsApiFp)(configuration);
434
+ return {
435
+ /**
436
+ *
437
+ * @summary Returns a connection.
438
+ * @param {string} projectName Name of project
439
+ * @param {string} connectionName Name of connection
440
+ * @param {*} [options] Override http request option.
441
+ * @throws {RequiredError}
442
+ */
443
+ getConnection(projectName, connectionName, options) {
444
+ return localVarFp.getConnection(projectName, connectionName, options).then((request) => request(axios, basePath));
445
+ },
446
+ /**
447
+ *
448
+ * @summary Returns a query and its results.
449
+ * @param {string} projectName Name of project
450
+ * @param {string} connectionName Name of connection
451
+ * @param {string} [sqlStatement] SQL statement
452
+ * @param {string} [_options] Options
453
+ * @param {*} [options] Override http request option.
454
+ * @throws {RequiredError}
455
+ */
456
+ getQuerydata(projectName, connectionName, sqlStatement, _options, options) {
457
+ return localVarFp.getQuerydata(projectName, connectionName, sqlStatement, _options, options).then((request) => request(axios, basePath));
458
+ },
459
+ /**
460
+ *
461
+ * @summary Returns a SQL source.
462
+ * @param {string} projectName Name of project
463
+ * @param {string} connectionName Name of connection
464
+ * @param {string} [sqlStatement] SQL statement
465
+ * @param {*} [options] Override http request option.
466
+ * @throws {RequiredError}
467
+ */
468
+ getSqlsource(projectName, connectionName, sqlStatement, options) {
469
+ return localVarFp.getSqlsource(projectName, connectionName, sqlStatement, options).then((request) => request(axios, basePath));
470
+ },
471
+ /**
472
+ *
473
+ * @summary Returns a table source.
474
+ * @param {string} projectName Name of project
475
+ * @param {string} connectionName Name of connection
476
+ * @param {string} [tableKey] Table key
477
+ * @param {string} [tablePath] Table path
478
+ * @param {*} [options] Override http request option.
479
+ * @throws {RequiredError}
480
+ */
481
+ getTablesource(projectName, connectionName, tableKey, tablePath, options) {
482
+ return localVarFp.getTablesource(projectName, connectionName, tableKey, tablePath, options).then((request) => request(axios, basePath));
483
+ },
484
+ /**
485
+ *
486
+ * @summary Returns a temporary table.
487
+ * @param {string} projectName Name of project
488
+ * @param {string} connectionName Name of connection
489
+ * @param {string} [sqlStatement] SQL statement
490
+ * @param {*} [options] Override http request option.
491
+ * @throws {RequiredError}
492
+ */
493
+ getTemporarytable(projectName, connectionName, sqlStatement, options) {
494
+ return localVarFp.getTemporarytable(projectName, connectionName, sqlStatement, options).then((request) => request(axios, basePath));
495
+ },
496
+ /**
497
+ *
498
+ * @summary Returns a test.
499
+ * @param {string} projectName Name of project
500
+ * @param {string} connectionName Name of connection
501
+ * @param {*} [options] Override http request option.
502
+ * @throws {RequiredError}
503
+ */
504
+ getTest(projectName, connectionName, options) {
505
+ return localVarFp.getTest(projectName, connectionName, options).then((request) => request(axios, basePath));
506
+ },
507
+ /**
508
+ *
509
+ * @summary Returns a list of the connections in the project.
510
+ * @param {string} projectName Name of project
511
+ * @param {*} [options] Override http request option.
512
+ * @throws {RequiredError}
513
+ */
514
+ listConnections(projectName, options) {
515
+ return localVarFp.listConnections(projectName, options).then((request) => request(axios, basePath));
516
+ },
517
+ };
518
+ };
519
+ exports.ConnectionsApiFactory = ConnectionsApiFactory;
520
+ /**
521
+ * ConnectionsApi - object-oriented interface
522
+ * @export
523
+ * @class ConnectionsApi
524
+ * @extends {BaseAPI}
525
+ */
526
+ class ConnectionsApi extends base_1.BaseAPI {
527
+ /**
528
+ *
529
+ * @summary Returns a connection.
530
+ * @param {string} projectName Name of project
531
+ * @param {string} connectionName Name of connection
532
+ * @param {*} [options] Override http request option.
533
+ * @throws {RequiredError}
534
+ * @memberof ConnectionsApi
535
+ */
536
+ getConnection(projectName, connectionName, options) {
537
+ return (0, exports.ConnectionsApiFp)(this.configuration).getConnection(projectName, connectionName, options).then((request) => request(this.axios, this.basePath));
538
+ }
539
+ /**
540
+ *
541
+ * @summary Returns a query and its results.
542
+ * @param {string} projectName Name of project
543
+ * @param {string} connectionName Name of connection
544
+ * @param {string} [sqlStatement] SQL statement
545
+ * @param {string} [_options] Options
546
+ * @param {*} [options] Override http request option.
547
+ * @throws {RequiredError}
548
+ * @memberof ConnectionsApi
549
+ */
550
+ getQuerydata(projectName, connectionName, sqlStatement, _options, options) {
551
+ return (0, exports.ConnectionsApiFp)(this.configuration).getQuerydata(projectName, connectionName, sqlStatement, _options, options).then((request) => request(this.axios, this.basePath));
552
+ }
553
+ /**
554
+ *
555
+ * @summary Returns a SQL source.
556
+ * @param {string} projectName Name of project
557
+ * @param {string} connectionName Name of connection
558
+ * @param {string} [sqlStatement] SQL statement
559
+ * @param {*} [options] Override http request option.
560
+ * @throws {RequiredError}
561
+ * @memberof ConnectionsApi
562
+ */
563
+ getSqlsource(projectName, connectionName, sqlStatement, options) {
564
+ return (0, exports.ConnectionsApiFp)(this.configuration).getSqlsource(projectName, connectionName, sqlStatement, options).then((request) => request(this.axios, this.basePath));
565
+ }
566
+ /**
567
+ *
568
+ * @summary Returns a table source.
569
+ * @param {string} projectName Name of project
570
+ * @param {string} connectionName Name of connection
571
+ * @param {string} [tableKey] Table key
572
+ * @param {string} [tablePath] Table path
573
+ * @param {*} [options] Override http request option.
574
+ * @throws {RequiredError}
575
+ * @memberof ConnectionsApi
576
+ */
577
+ getTablesource(projectName, connectionName, tableKey, tablePath, options) {
578
+ return (0, exports.ConnectionsApiFp)(this.configuration).getTablesource(projectName, connectionName, tableKey, tablePath, options).then((request) => request(this.axios, this.basePath));
579
+ }
580
+ /**
581
+ *
582
+ * @summary Returns a temporary table.
583
+ * @param {string} projectName Name of project
584
+ * @param {string} connectionName Name of connection
585
+ * @param {string} [sqlStatement] SQL statement
586
+ * @param {*} [options] Override http request option.
587
+ * @throws {RequiredError}
588
+ * @memberof ConnectionsApi
589
+ */
590
+ getTemporarytable(projectName, connectionName, sqlStatement, options) {
591
+ return (0, exports.ConnectionsApiFp)(this.configuration).getTemporarytable(projectName, connectionName, sqlStatement, options).then((request) => request(this.axios, this.basePath));
592
+ }
593
+ /**
594
+ *
595
+ * @summary Returns a test.
596
+ * @param {string} projectName Name of project
597
+ * @param {string} connectionName Name of connection
598
+ * @param {*} [options] Override http request option.
599
+ * @throws {RequiredError}
600
+ * @memberof ConnectionsApi
601
+ */
602
+ getTest(projectName, connectionName, options) {
603
+ return (0, exports.ConnectionsApiFp)(this.configuration).getTest(projectName, connectionName, options).then((request) => request(this.axios, this.basePath));
604
+ }
605
+ /**
606
+ *
607
+ * @summary Returns a list of the connections in the project.
608
+ * @param {string} projectName Name of project
609
+ * @param {*} [options] Override http request option.
610
+ * @throws {RequiredError}
611
+ * @memberof ConnectionsApi
612
+ */
613
+ listConnections(projectName, options) {
614
+ return (0, exports.ConnectionsApiFp)(this.configuration).listConnections(projectName, options).then((request) => request(this.axios, this.basePath));
615
+ }
616
+ }
617
+ exports.ConnectionsApi = ConnectionsApi;
618
+ /**
619
+ * DatabasesApi - axios parameter creator
620
+ * @export
621
+ */
622
+ const DatabasesApiAxiosParamCreator = function (configuration) {
623
+ return {
624
+ /**
625
+ *
626
+ * @summary Returns a list of relative paths to the databases embedded in the package.
627
+ * @param {string} projectName Name of project
628
+ * @param {string} packageName Name of package
629
+ * @param {string} [versionId] Version ID
630
+ * @param {*} [options] Override http request option.
631
+ * @throws {RequiredError}
632
+ */
633
+ listDatabases: async (projectName, packageName, versionId, options = {}) => {
634
+ // verify required parameter 'projectName' is not null or undefined
635
+ (0, common_1.assertParamExists)('listDatabases', 'projectName', projectName);
636
+ // verify required parameter 'packageName' is not null or undefined
637
+ (0, common_1.assertParamExists)('listDatabases', 'packageName', packageName);
638
+ const localVarPath = `/projects/{projectName}/packages/{packageName}/databases`
639
+ .replace(`{${"projectName"}}`, encodeURIComponent(String(projectName)))
640
+ .replace(`{${"packageName"}}`, encodeURIComponent(String(packageName)));
641
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
642
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
643
+ let baseOptions;
644
+ if (configuration) {
645
+ baseOptions = configuration.baseOptions;
646
+ }
647
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options };
648
+ const localVarHeaderParameter = {};
649
+ const localVarQueryParameter = {};
650
+ if (versionId !== undefined) {
651
+ localVarQueryParameter['versionId'] = versionId;
652
+ }
653
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
654
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
655
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
656
+ return {
657
+ url: (0, common_1.toPathString)(localVarUrlObj),
658
+ options: localVarRequestOptions,
659
+ };
660
+ },
661
+ };
662
+ };
663
+ exports.DatabasesApiAxiosParamCreator = DatabasesApiAxiosParamCreator;
664
+ /**
665
+ * DatabasesApi - functional programming interface
666
+ * @export
667
+ */
668
+ const DatabasesApiFp = function (configuration) {
669
+ const localVarAxiosParamCreator = (0, exports.DatabasesApiAxiosParamCreator)(configuration);
670
+ return {
671
+ /**
672
+ *
673
+ * @summary Returns a list of relative paths to the databases embedded in the package.
674
+ * @param {string} projectName Name of project
675
+ * @param {string} packageName Name of package
676
+ * @param {string} [versionId] Version ID
677
+ * @param {*} [options] Override http request option.
678
+ * @throws {RequiredError}
679
+ */
680
+ async listDatabases(projectName, packageName, versionId, options) {
681
+ var _a, _b, _c;
682
+ const localVarAxiosArgs = await localVarAxiosParamCreator.listDatabases(projectName, packageName, versionId, options);
683
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
684
+ const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['DatabasesApi.listDatabases']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
685
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
686
+ },
687
+ };
688
+ };
689
+ exports.DatabasesApiFp = DatabasesApiFp;
690
+ /**
691
+ * DatabasesApi - factory interface
692
+ * @export
693
+ */
694
+ const DatabasesApiFactory = function (configuration, basePath, axios) {
695
+ const localVarFp = (0, exports.DatabasesApiFp)(configuration);
696
+ return {
697
+ /**
698
+ *
699
+ * @summary Returns a list of relative paths to the databases embedded in the package.
700
+ * @param {string} projectName Name of project
701
+ * @param {string} packageName Name of package
702
+ * @param {string} [versionId] Version ID
703
+ * @param {*} [options] Override http request option.
704
+ * @throws {RequiredError}
705
+ */
706
+ listDatabases(projectName, packageName, versionId, options) {
707
+ return localVarFp.listDatabases(projectName, packageName, versionId, options).then((request) => request(axios, basePath));
708
+ },
709
+ };
710
+ };
711
+ exports.DatabasesApiFactory = DatabasesApiFactory;
712
+ /**
713
+ * DatabasesApi - object-oriented interface
714
+ * @export
715
+ * @class DatabasesApi
716
+ * @extends {BaseAPI}
717
+ */
718
+ class DatabasesApi extends base_1.BaseAPI {
719
+ /**
720
+ *
721
+ * @summary Returns a list of relative paths to the databases embedded in the package.
722
+ * @param {string} projectName Name of project
723
+ * @param {string} packageName Name of package
724
+ * @param {string} [versionId] Version ID
725
+ * @param {*} [options] Override http request option.
726
+ * @throws {RequiredError}
727
+ * @memberof DatabasesApi
728
+ */
729
+ listDatabases(projectName, packageName, versionId, options) {
730
+ return (0, exports.DatabasesApiFp)(this.configuration).listDatabases(projectName, packageName, versionId, options).then((request) => request(this.axios, this.basePath));
731
+ }
732
+ }
733
+ exports.DatabasesApi = DatabasesApi;
734
+ /**
735
+ * DefaultApi - axios parameter creator
736
+ * @export
737
+ */
738
+ const DefaultApiAxiosParamCreator = function (configuration) {
739
+ return {
740
+ /**
741
+ *
742
+ * @summary Returns metadata about the publisher service.
743
+ * @param {string} projectName Name of project
744
+ * @param {*} [options] Override http request option.
745
+ * @throws {RequiredError}
746
+ */
747
+ about: async (projectName, options = {}) => {
748
+ // verify required parameter 'projectName' is not null or undefined
749
+ (0, common_1.assertParamExists)('about', 'projectName', projectName);
750
+ const localVarPath = `/projects/{projectName}/about`
751
+ .replace(`{${"projectName"}}`, encodeURIComponent(String(projectName)));
752
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
753
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
754
+ let baseOptions;
755
+ if (configuration) {
756
+ baseOptions = configuration.baseOptions;
757
+ }
758
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options };
759
+ const localVarHeaderParameter = {};
760
+ const localVarQueryParameter = {};
761
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
762
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
763
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
764
+ return {
765
+ url: (0, common_1.toPathString)(localVarUrlObj),
766
+ options: localVarRequestOptions,
767
+ };
768
+ },
769
+ };
770
+ };
771
+ exports.DefaultApiAxiosParamCreator = DefaultApiAxiosParamCreator;
772
+ /**
773
+ * DefaultApi - functional programming interface
774
+ * @export
775
+ */
776
+ const DefaultApiFp = function (configuration) {
777
+ const localVarAxiosParamCreator = (0, exports.DefaultApiAxiosParamCreator)(configuration);
778
+ return {
779
+ /**
780
+ *
781
+ * @summary Returns metadata about the publisher service.
782
+ * @param {string} projectName Name of project
783
+ * @param {*} [options] Override http request option.
784
+ * @throws {RequiredError}
785
+ */
786
+ async about(projectName, options) {
787
+ var _a, _b, _c;
788
+ const localVarAxiosArgs = await localVarAxiosParamCreator.about(projectName, options);
789
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
790
+ const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['DefaultApi.about']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
791
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
792
+ },
793
+ };
794
+ };
795
+ exports.DefaultApiFp = DefaultApiFp;
796
+ /**
797
+ * DefaultApi - factory interface
798
+ * @export
799
+ */
800
+ const DefaultApiFactory = function (configuration, basePath, axios) {
801
+ const localVarFp = (0, exports.DefaultApiFp)(configuration);
802
+ return {
803
+ /**
804
+ *
805
+ * @summary Returns metadata about the publisher service.
806
+ * @param {string} projectName Name of project
807
+ * @param {*} [options] Override http request option.
808
+ * @throws {RequiredError}
809
+ */
810
+ about(projectName, options) {
811
+ return localVarFp.about(projectName, options).then((request) => request(axios, basePath));
812
+ },
813
+ };
814
+ };
815
+ exports.DefaultApiFactory = DefaultApiFactory;
816
+ /**
817
+ * DefaultApi - object-oriented interface
818
+ * @export
819
+ * @class DefaultApi
820
+ * @extends {BaseAPI}
821
+ */
822
+ class DefaultApi extends base_1.BaseAPI {
823
+ /**
824
+ *
825
+ * @summary Returns metadata about the publisher service.
826
+ * @param {string} projectName Name of project
827
+ * @param {*} [options] Override http request option.
828
+ * @throws {RequiredError}
829
+ * @memberof DefaultApi
830
+ */
831
+ about(projectName, options) {
832
+ return (0, exports.DefaultApiFp)(this.configuration).about(projectName, options).then((request) => request(this.axios, this.basePath));
833
+ }
834
+ }
835
+ exports.DefaultApi = DefaultApi;
836
+ /**
837
+ * ModelsApi - axios parameter creator
838
+ * @export
839
+ */
840
+ const ModelsApiAxiosParamCreator = function (configuration) {
841
+ return {
842
+ /**
843
+ *
844
+ * @summary Returns a Malloy model.
845
+ * @param {string} projectName Name of project
846
+ * @param {string} packageName Name of package.
847
+ * @param {string} path Path to model wihin the package.
848
+ * @param {string} [versionId] Version ID
849
+ * @param {*} [options] Override http request option.
850
+ * @throws {RequiredError}
851
+ */
852
+ getModel: async (projectName, packageName, path, versionId, options = {}) => {
853
+ // verify required parameter 'projectName' is not null or undefined
854
+ (0, common_1.assertParamExists)('getModel', 'projectName', projectName);
855
+ // verify required parameter 'packageName' is not null or undefined
856
+ (0, common_1.assertParamExists)('getModel', 'packageName', packageName);
857
+ // verify required parameter 'path' is not null or undefined
858
+ (0, common_1.assertParamExists)('getModel', 'path', path);
859
+ const localVarPath = `/projects/{projectName}/packages/{packageName}/models/{path}`
860
+ .replace(`{${"projectName"}}`, encodeURIComponent(String(projectName)))
861
+ .replace(`{${"packageName"}}`, encodeURIComponent(String(packageName)))
862
+ .replace(`{${"path"}}`, encodeURIComponent(String(path)));
863
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
864
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
865
+ let baseOptions;
866
+ if (configuration) {
867
+ baseOptions = configuration.baseOptions;
868
+ }
869
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options };
870
+ const localVarHeaderParameter = {};
871
+ const localVarQueryParameter = {};
872
+ if (versionId !== undefined) {
873
+ localVarQueryParameter['versionId'] = versionId;
874
+ }
875
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
876
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
877
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
878
+ return {
879
+ url: (0, common_1.toPathString)(localVarUrlObj),
880
+ options: localVarRequestOptions,
881
+ };
882
+ },
883
+ /**
884
+ *
885
+ * @summary Returns a list of relative paths to the models in the package.
886
+ * @param {string} projectName Name of project
887
+ * @param {string} packageName Name of package
888
+ * @param {string} [versionId] Version ID
889
+ * @param {*} [options] Override http request option.
890
+ * @throws {RequiredError}
891
+ */
892
+ listModels: async (projectName, packageName, versionId, options = {}) => {
893
+ // verify required parameter 'projectName' is not null or undefined
894
+ (0, common_1.assertParamExists)('listModels', 'projectName', projectName);
895
+ // verify required parameter 'packageName' is not null or undefined
896
+ (0, common_1.assertParamExists)('listModels', 'packageName', packageName);
897
+ const localVarPath = `/projects/{projectName}/packages/{packageName}/models`
898
+ .replace(`{${"projectName"}}`, encodeURIComponent(String(projectName)))
899
+ .replace(`{${"packageName"}}`, encodeURIComponent(String(packageName)));
900
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
901
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
902
+ let baseOptions;
903
+ if (configuration) {
904
+ baseOptions = configuration.baseOptions;
905
+ }
906
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options };
907
+ const localVarHeaderParameter = {};
908
+ const localVarQueryParameter = {};
909
+ if (versionId !== undefined) {
910
+ localVarQueryParameter['versionId'] = versionId;
911
+ }
912
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
913
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
914
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
915
+ return {
916
+ url: (0, common_1.toPathString)(localVarUrlObj),
917
+ options: localVarRequestOptions,
918
+ };
919
+ },
920
+ };
921
+ };
922
+ exports.ModelsApiAxiosParamCreator = ModelsApiAxiosParamCreator;
923
+ /**
924
+ * ModelsApi - functional programming interface
925
+ * @export
926
+ */
927
+ const ModelsApiFp = function (configuration) {
928
+ const localVarAxiosParamCreator = (0, exports.ModelsApiAxiosParamCreator)(configuration);
929
+ return {
930
+ /**
931
+ *
932
+ * @summary Returns a Malloy model.
933
+ * @param {string} projectName Name of project
934
+ * @param {string} packageName Name of package.
935
+ * @param {string} path Path to model wihin the package.
936
+ * @param {string} [versionId] Version ID
937
+ * @param {*} [options] Override http request option.
938
+ * @throws {RequiredError}
939
+ */
940
+ async getModel(projectName, packageName, path, versionId, options) {
941
+ var _a, _b, _c;
942
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getModel(projectName, packageName, path, versionId, options);
943
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
944
+ const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['ModelsApi.getModel']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
945
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
946
+ },
947
+ /**
948
+ *
949
+ * @summary Returns a list of relative paths to the models in the package.
950
+ * @param {string} projectName Name of project
951
+ * @param {string} packageName Name of package
952
+ * @param {string} [versionId] Version ID
953
+ * @param {*} [options] Override http request option.
954
+ * @throws {RequiredError}
955
+ */
956
+ async listModels(projectName, packageName, versionId, options) {
957
+ var _a, _b, _c;
958
+ const localVarAxiosArgs = await localVarAxiosParamCreator.listModels(projectName, packageName, versionId, options);
959
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
960
+ const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['ModelsApi.listModels']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
961
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
962
+ },
963
+ };
964
+ };
965
+ exports.ModelsApiFp = ModelsApiFp;
966
+ /**
967
+ * ModelsApi - factory interface
968
+ * @export
969
+ */
970
+ const ModelsApiFactory = function (configuration, basePath, axios) {
971
+ const localVarFp = (0, exports.ModelsApiFp)(configuration);
972
+ return {
973
+ /**
974
+ *
975
+ * @summary Returns a Malloy model.
976
+ * @param {string} projectName Name of project
977
+ * @param {string} packageName Name of package.
978
+ * @param {string} path Path to model wihin the package.
979
+ * @param {string} [versionId] Version ID
980
+ * @param {*} [options] Override http request option.
981
+ * @throws {RequiredError}
982
+ */
983
+ getModel(projectName, packageName, path, versionId, options) {
984
+ return localVarFp.getModel(projectName, packageName, path, versionId, options).then((request) => request(axios, basePath));
985
+ },
986
+ /**
987
+ *
988
+ * @summary Returns a list of relative paths to the models in the package.
989
+ * @param {string} projectName Name of project
990
+ * @param {string} packageName Name of package
991
+ * @param {string} [versionId] Version ID
992
+ * @param {*} [options] Override http request option.
993
+ * @throws {RequiredError}
994
+ */
995
+ listModels(projectName, packageName, versionId, options) {
996
+ return localVarFp.listModels(projectName, packageName, versionId, options).then((request) => request(axios, basePath));
997
+ },
998
+ };
999
+ };
1000
+ exports.ModelsApiFactory = ModelsApiFactory;
1001
+ /**
1002
+ * ModelsApi - object-oriented interface
1003
+ * @export
1004
+ * @class ModelsApi
1005
+ * @extends {BaseAPI}
1006
+ */
1007
+ class ModelsApi extends base_1.BaseAPI {
1008
+ /**
1009
+ *
1010
+ * @summary Returns a Malloy model.
1011
+ * @param {string} projectName Name of project
1012
+ * @param {string} packageName Name of package.
1013
+ * @param {string} path Path to model wihin the package.
1014
+ * @param {string} [versionId] Version ID
1015
+ * @param {*} [options] Override http request option.
1016
+ * @throws {RequiredError}
1017
+ * @memberof ModelsApi
1018
+ */
1019
+ getModel(projectName, packageName, path, versionId, options) {
1020
+ return (0, exports.ModelsApiFp)(this.configuration).getModel(projectName, packageName, path, versionId, options).then((request) => request(this.axios, this.basePath));
1021
+ }
1022
+ /**
1023
+ *
1024
+ * @summary Returns a list of relative paths to the models in the package.
1025
+ * @param {string} projectName Name of project
1026
+ * @param {string} packageName Name of package
1027
+ * @param {string} [versionId] Version ID
1028
+ * @param {*} [options] Override http request option.
1029
+ * @throws {RequiredError}
1030
+ * @memberof ModelsApi
1031
+ */
1032
+ listModels(projectName, packageName, versionId, options) {
1033
+ return (0, exports.ModelsApiFp)(this.configuration).listModels(projectName, packageName, versionId, options).then((request) => request(this.axios, this.basePath));
1034
+ }
1035
+ }
1036
+ exports.ModelsApi = ModelsApi;
1037
+ /**
1038
+ * PackagesApi - axios parameter creator
1039
+ * @export
1040
+ */
1041
+ const PackagesApiAxiosParamCreator = function (configuration) {
1042
+ return {
1043
+ /**
1044
+ *
1045
+ * @summary Returns the package metadata.
1046
+ * @param {string} projectName Name of project
1047
+ * @param {string} packageName Package name
1048
+ * @param {string} [versionId] Version ID
1049
+ * @param {*} [options] Override http request option.
1050
+ * @throws {RequiredError}
1051
+ */
1052
+ getPackage: async (projectName, packageName, versionId, options = {}) => {
1053
+ // verify required parameter 'projectName' is not null or undefined
1054
+ (0, common_1.assertParamExists)('getPackage', 'projectName', projectName);
1055
+ // verify required parameter 'packageName' is not null or undefined
1056
+ (0, common_1.assertParamExists)('getPackage', 'packageName', packageName);
1057
+ const localVarPath = `/projects/{projectName}/packages/{packageName}`
1058
+ .replace(`{${"projectName"}}`, encodeURIComponent(String(projectName)))
1059
+ .replace(`{${"packageName"}}`, encodeURIComponent(String(packageName)));
1060
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
1061
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
1062
+ let baseOptions;
1063
+ if (configuration) {
1064
+ baseOptions = configuration.baseOptions;
1065
+ }
1066
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options };
1067
+ const localVarHeaderParameter = {};
1068
+ const localVarQueryParameter = {};
1069
+ if (versionId !== undefined) {
1070
+ localVarQueryParameter['versionId'] = versionId;
1071
+ }
1072
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
1073
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1074
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
1075
+ return {
1076
+ url: (0, common_1.toPathString)(localVarUrlObj),
1077
+ options: localVarRequestOptions,
1078
+ };
1079
+ },
1080
+ /**
1081
+ *
1082
+ * @summary Returns a list of the Packages hosted on this server.
1083
+ * @param {string} projectName Name of project
1084
+ * @param {*} [options] Override http request option.
1085
+ * @throws {RequiredError}
1086
+ */
1087
+ listPackages: async (projectName, options = {}) => {
1088
+ // verify required parameter 'projectName' is not null or undefined
1089
+ (0, common_1.assertParamExists)('listPackages', 'projectName', projectName);
1090
+ const localVarPath = `/projects/{projectName}/packages`
1091
+ .replace(`{${"projectName"}}`, encodeURIComponent(String(projectName)));
1092
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
1093
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
1094
+ let baseOptions;
1095
+ if (configuration) {
1096
+ baseOptions = configuration.baseOptions;
1097
+ }
1098
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options };
1099
+ const localVarHeaderParameter = {};
1100
+ const localVarQueryParameter = {};
1101
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
1102
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1103
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
1104
+ return {
1105
+ url: (0, common_1.toPathString)(localVarUrlObj),
1106
+ options: localVarRequestOptions,
1107
+ };
1108
+ },
1109
+ };
1110
+ };
1111
+ exports.PackagesApiAxiosParamCreator = PackagesApiAxiosParamCreator;
1112
+ /**
1113
+ * PackagesApi - functional programming interface
1114
+ * @export
1115
+ */
1116
+ const PackagesApiFp = function (configuration) {
1117
+ const localVarAxiosParamCreator = (0, exports.PackagesApiAxiosParamCreator)(configuration);
1118
+ return {
1119
+ /**
1120
+ *
1121
+ * @summary Returns the package metadata.
1122
+ * @param {string} projectName Name of project
1123
+ * @param {string} packageName Package name
1124
+ * @param {string} [versionId] Version ID
1125
+ * @param {*} [options] Override http request option.
1126
+ * @throws {RequiredError}
1127
+ */
1128
+ async getPackage(projectName, packageName, versionId, options) {
1129
+ var _a, _b, _c;
1130
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getPackage(projectName, packageName, versionId, options);
1131
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
1132
+ const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['PackagesApi.getPackage']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
1133
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1134
+ },
1135
+ /**
1136
+ *
1137
+ * @summary Returns a list of the Packages hosted on this server.
1138
+ * @param {string} projectName Name of project
1139
+ * @param {*} [options] Override http request option.
1140
+ * @throws {RequiredError}
1141
+ */
1142
+ async listPackages(projectName, options) {
1143
+ var _a, _b, _c;
1144
+ const localVarAxiosArgs = await localVarAxiosParamCreator.listPackages(projectName, options);
1145
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
1146
+ const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['PackagesApi.listPackages']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
1147
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1148
+ },
1149
+ };
1150
+ };
1151
+ exports.PackagesApiFp = PackagesApiFp;
1152
+ /**
1153
+ * PackagesApi - factory interface
1154
+ * @export
1155
+ */
1156
+ const PackagesApiFactory = function (configuration, basePath, axios) {
1157
+ const localVarFp = (0, exports.PackagesApiFp)(configuration);
1158
+ return {
1159
+ /**
1160
+ *
1161
+ * @summary Returns the package metadata.
1162
+ * @param {string} projectName Name of project
1163
+ * @param {string} packageName Package name
1164
+ * @param {string} [versionId] Version ID
1165
+ * @param {*} [options] Override http request option.
1166
+ * @throws {RequiredError}
1167
+ */
1168
+ getPackage(projectName, packageName, versionId, options) {
1169
+ return localVarFp.getPackage(projectName, packageName, versionId, options).then((request) => request(axios, basePath));
1170
+ },
1171
+ /**
1172
+ *
1173
+ * @summary Returns a list of the Packages hosted on this server.
1174
+ * @param {string} projectName Name of project
1175
+ * @param {*} [options] Override http request option.
1176
+ * @throws {RequiredError}
1177
+ */
1178
+ listPackages(projectName, options) {
1179
+ return localVarFp.listPackages(projectName, options).then((request) => request(axios, basePath));
1180
+ },
1181
+ };
1182
+ };
1183
+ exports.PackagesApiFactory = PackagesApiFactory;
1184
+ /**
1185
+ * PackagesApi - object-oriented interface
1186
+ * @export
1187
+ * @class PackagesApi
1188
+ * @extends {BaseAPI}
1189
+ */
1190
+ class PackagesApi extends base_1.BaseAPI {
1191
+ /**
1192
+ *
1193
+ * @summary Returns the package metadata.
1194
+ * @param {string} projectName Name of project
1195
+ * @param {string} packageName Package name
1196
+ * @param {string} [versionId] Version ID
1197
+ * @param {*} [options] Override http request option.
1198
+ * @throws {RequiredError}
1199
+ * @memberof PackagesApi
1200
+ */
1201
+ getPackage(projectName, packageName, versionId, options) {
1202
+ return (0, exports.PackagesApiFp)(this.configuration).getPackage(projectName, packageName, versionId, options).then((request) => request(this.axios, this.basePath));
1203
+ }
1204
+ /**
1205
+ *
1206
+ * @summary Returns a list of the Packages hosted on this server.
1207
+ * @param {string} projectName Name of project
1208
+ * @param {*} [options] Override http request option.
1209
+ * @throws {RequiredError}
1210
+ * @memberof PackagesApi
1211
+ */
1212
+ listPackages(projectName, options) {
1213
+ return (0, exports.PackagesApiFp)(this.configuration).listPackages(projectName, options).then((request) => request(this.axios, this.basePath));
1214
+ }
1215
+ }
1216
+ exports.PackagesApi = PackagesApi;
1217
+ /**
1218
+ * ProjectsApi - axios parameter creator
1219
+ * @export
1220
+ */
1221
+ const ProjectsApiAxiosParamCreator = function (configuration) {
1222
+ return {
1223
+ /**
1224
+ *
1225
+ * @summary Returns a list of the Projects hosted on this server.
1226
+ * @param {*} [options] Override http request option.
1227
+ * @throws {RequiredError}
1228
+ */
1229
+ listProjects: async (options = {}) => {
1230
+ const localVarPath = `/projects`;
1231
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
1232
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
1233
+ let baseOptions;
1234
+ if (configuration) {
1235
+ baseOptions = configuration.baseOptions;
1236
+ }
1237
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options };
1238
+ const localVarHeaderParameter = {};
1239
+ const localVarQueryParameter = {};
1240
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
1241
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1242
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
1243
+ return {
1244
+ url: (0, common_1.toPathString)(localVarUrlObj),
1245
+ options: localVarRequestOptions,
1246
+ };
1247
+ },
1248
+ };
1249
+ };
1250
+ exports.ProjectsApiAxiosParamCreator = ProjectsApiAxiosParamCreator;
1251
+ /**
1252
+ * ProjectsApi - functional programming interface
1253
+ * @export
1254
+ */
1255
+ const ProjectsApiFp = function (configuration) {
1256
+ const localVarAxiosParamCreator = (0, exports.ProjectsApiAxiosParamCreator)(configuration);
1257
+ return {
1258
+ /**
1259
+ *
1260
+ * @summary Returns a list of the Projects hosted on this server.
1261
+ * @param {*} [options] Override http request option.
1262
+ * @throws {RequiredError}
1263
+ */
1264
+ async listProjects(options) {
1265
+ var _a, _b, _c;
1266
+ const localVarAxiosArgs = await localVarAxiosParamCreator.listProjects(options);
1267
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
1268
+ const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['ProjectsApi.listProjects']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
1269
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1270
+ },
1271
+ };
1272
+ };
1273
+ exports.ProjectsApiFp = ProjectsApiFp;
1274
+ /**
1275
+ * ProjectsApi - factory interface
1276
+ * @export
1277
+ */
1278
+ const ProjectsApiFactory = function (configuration, basePath, axios) {
1279
+ const localVarFp = (0, exports.ProjectsApiFp)(configuration);
1280
+ return {
1281
+ /**
1282
+ *
1283
+ * @summary Returns a list of the Projects hosted on this server.
1284
+ * @param {*} [options] Override http request option.
1285
+ * @throws {RequiredError}
1286
+ */
1287
+ listProjects(options) {
1288
+ return localVarFp.listProjects(options).then((request) => request(axios, basePath));
1289
+ },
1290
+ };
1291
+ };
1292
+ exports.ProjectsApiFactory = ProjectsApiFactory;
1293
+ /**
1294
+ * ProjectsApi - object-oriented interface
1295
+ * @export
1296
+ * @class ProjectsApi
1297
+ * @extends {BaseAPI}
1298
+ */
1299
+ class ProjectsApi extends base_1.BaseAPI {
1300
+ /**
1301
+ *
1302
+ * @summary Returns a list of the Projects hosted on this server.
1303
+ * @param {*} [options] Override http request option.
1304
+ * @throws {RequiredError}
1305
+ * @memberof ProjectsApi
1306
+ */
1307
+ listProjects(options) {
1308
+ return (0, exports.ProjectsApiFp)(this.configuration).listProjects(options).then((request) => request(this.axios, this.basePath));
1309
+ }
1310
+ }
1311
+ exports.ProjectsApi = ProjectsApi;
1312
+ /**
1313
+ * QueryresultsApi - axios parameter creator
1314
+ * @export
1315
+ */
1316
+ const QueryresultsApiAxiosParamCreator = function (configuration) {
1317
+ return {
1318
+ /**
1319
+ *
1320
+ * @summary Returns a query and its results.
1321
+ * @param {string} projectName Name of project
1322
+ * @param {string} packageName Name of package
1323
+ * @param {string} path Path to model within the package.
1324
+ * @param {string} [query] Query string to execute on the model. If the query is paramter is set, the queryName parameter must be empty.
1325
+ * @param {string} [sourceName] Name of the source in the model to use for queryName, search, and topValue requests.
1326
+ * @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.
1327
+ * @param {string} [versionId] Version ID
1328
+ * @param {*} [options] Override http request option.
1329
+ * @throws {RequiredError}
1330
+ */
1331
+ executeQuery: async (projectName, packageName, path, query, sourceName, queryName, versionId, options = {}) => {
1332
+ // verify required parameter 'projectName' is not null or undefined
1333
+ (0, common_1.assertParamExists)('executeQuery', 'projectName', projectName);
1334
+ // verify required parameter 'packageName' is not null or undefined
1335
+ (0, common_1.assertParamExists)('executeQuery', 'packageName', packageName);
1336
+ // verify required parameter 'path' is not null or undefined
1337
+ (0, common_1.assertParamExists)('executeQuery', 'path', path);
1338
+ const localVarPath = `/projects/{projectName}/packages/{packageName}/queryResults/{path}`
1339
+ .replace(`{${"projectName"}}`, encodeURIComponent(String(projectName)))
1340
+ .replace(`{${"packageName"}}`, encodeURIComponent(String(packageName)))
1341
+ .replace(`{${"path"}}`, encodeURIComponent(String(path)));
1342
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
1343
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
1344
+ let baseOptions;
1345
+ if (configuration) {
1346
+ baseOptions = configuration.baseOptions;
1347
+ }
1348
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options };
1349
+ const localVarHeaderParameter = {};
1350
+ const localVarQueryParameter = {};
1351
+ if (query !== undefined) {
1352
+ localVarQueryParameter['query'] = query;
1353
+ }
1354
+ if (sourceName !== undefined) {
1355
+ localVarQueryParameter['sourceName'] = sourceName;
1356
+ }
1357
+ if (queryName !== undefined) {
1358
+ localVarQueryParameter['queryName'] = queryName;
1359
+ }
1360
+ if (versionId !== undefined) {
1361
+ localVarQueryParameter['versionId'] = versionId;
1362
+ }
1363
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
1364
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1365
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
1366
+ return {
1367
+ url: (0, common_1.toPathString)(localVarUrlObj),
1368
+ options: localVarRequestOptions,
1369
+ };
1370
+ },
1371
+ };
1372
+ };
1373
+ exports.QueryresultsApiAxiosParamCreator = QueryresultsApiAxiosParamCreator;
1374
+ /**
1375
+ * QueryresultsApi - functional programming interface
1376
+ * @export
1377
+ */
1378
+ const QueryresultsApiFp = function (configuration) {
1379
+ const localVarAxiosParamCreator = (0, exports.QueryresultsApiAxiosParamCreator)(configuration);
1380
+ return {
1381
+ /**
1382
+ *
1383
+ * @summary Returns a query and its results.
1384
+ * @param {string} projectName Name of project
1385
+ * @param {string} packageName Name of package
1386
+ * @param {string} path Path to model within the package.
1387
+ * @param {string} [query] Query string to execute on the model. If the query is paramter is set, the queryName parameter must be empty.
1388
+ * @param {string} [sourceName] Name of the source in the model to use for queryName, search, and topValue requests.
1389
+ * @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.
1390
+ * @param {string} [versionId] Version ID
1391
+ * @param {*} [options] Override http request option.
1392
+ * @throws {RequiredError}
1393
+ */
1394
+ async executeQuery(projectName, packageName, path, query, sourceName, queryName, versionId, options) {
1395
+ var _a, _b, _c;
1396
+ const localVarAxiosArgs = await localVarAxiosParamCreator.executeQuery(projectName, packageName, path, query, sourceName, queryName, versionId, options);
1397
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
1398
+ const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['QueryresultsApi.executeQuery']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
1399
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1400
+ },
1401
+ };
1402
+ };
1403
+ exports.QueryresultsApiFp = QueryresultsApiFp;
1404
+ /**
1405
+ * QueryresultsApi - factory interface
1406
+ * @export
1407
+ */
1408
+ const QueryresultsApiFactory = function (configuration, basePath, axios) {
1409
+ const localVarFp = (0, exports.QueryresultsApiFp)(configuration);
1410
+ return {
1411
+ /**
1412
+ *
1413
+ * @summary Returns a query and its results.
1414
+ * @param {string} projectName Name of project
1415
+ * @param {string} packageName Name of package
1416
+ * @param {string} path Path to model within the package.
1417
+ * @param {string} [query] Query string to execute on the model. If the query is paramter is set, the queryName parameter must be empty.
1418
+ * @param {string} [sourceName] Name of the source in the model to use for queryName, search, and topValue requests.
1419
+ * @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.
1420
+ * @param {string} [versionId] Version ID
1421
+ * @param {*} [options] Override http request option.
1422
+ * @throws {RequiredError}
1423
+ */
1424
+ executeQuery(projectName, packageName, path, query, sourceName, queryName, versionId, options) {
1425
+ return localVarFp.executeQuery(projectName, packageName, path, query, sourceName, queryName, versionId, options).then((request) => request(axios, basePath));
1426
+ },
1427
+ };
1428
+ };
1429
+ exports.QueryresultsApiFactory = QueryresultsApiFactory;
1430
+ /**
1431
+ * QueryresultsApi - object-oriented interface
1432
+ * @export
1433
+ * @class QueryresultsApi
1434
+ * @extends {BaseAPI}
1435
+ */
1436
+ class QueryresultsApi extends base_1.BaseAPI {
1437
+ /**
1438
+ *
1439
+ * @summary Returns a query and its results.
1440
+ * @param {string} projectName Name of project
1441
+ * @param {string} packageName Name of package
1442
+ * @param {string} path Path to model within the package.
1443
+ * @param {string} [query] Query string to execute on the model. If the query is paramter is set, the queryName parameter must be empty.
1444
+ * @param {string} [sourceName] Name of the source in the model to use for queryName, search, and topValue requests.
1445
+ * @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.
1446
+ * @param {string} [versionId] Version ID
1447
+ * @param {*} [options] Override http request option.
1448
+ * @throws {RequiredError}
1449
+ * @memberof QueryresultsApi
1450
+ */
1451
+ executeQuery(projectName, packageName, path, query, sourceName, queryName, versionId, options) {
1452
+ return (0, exports.QueryresultsApiFp)(this.configuration).executeQuery(projectName, packageName, path, query, sourceName, queryName, versionId, options).then((request) => request(this.axios, this.basePath));
1453
+ }
1454
+ }
1455
+ exports.QueryresultsApi = QueryresultsApi;
1456
+ /**
1457
+ * SchedulesApi - axios parameter creator
1458
+ * @export
1459
+ */
1460
+ const SchedulesApiAxiosParamCreator = function (configuration) {
1461
+ return {
1462
+ /**
1463
+ *
1464
+ * @summary Returns a list of running schedules.
1465
+ * @param {string} projectName Name of project
1466
+ * @param {string} packageName Name of package
1467
+ * @param {string} [versionId] Version ID
1468
+ * @param {*} [options] Override http request option.
1469
+ * @throws {RequiredError}
1470
+ */
1471
+ listSchedules: async (projectName, packageName, versionId, options = {}) => {
1472
+ // verify required parameter 'projectName' is not null or undefined
1473
+ (0, common_1.assertParamExists)('listSchedules', 'projectName', projectName);
1474
+ // verify required parameter 'packageName' is not null or undefined
1475
+ (0, common_1.assertParamExists)('listSchedules', 'packageName', packageName);
1476
+ const localVarPath = `/projects/{projectName}/packages/{packageName}/schedules`
1477
+ .replace(`{${"projectName"}}`, encodeURIComponent(String(projectName)))
1478
+ .replace(`{${"packageName"}}`, encodeURIComponent(String(packageName)));
1479
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
1480
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
1481
+ let baseOptions;
1482
+ if (configuration) {
1483
+ baseOptions = configuration.baseOptions;
1484
+ }
1485
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options };
1486
+ const localVarHeaderParameter = {};
1487
+ const localVarQueryParameter = {};
1488
+ if (versionId !== undefined) {
1489
+ localVarQueryParameter['versionId'] = versionId;
1490
+ }
1491
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
1492
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1493
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
1494
+ return {
1495
+ url: (0, common_1.toPathString)(localVarUrlObj),
1496
+ options: localVarRequestOptions,
1497
+ };
1498
+ },
1499
+ };
1500
+ };
1501
+ exports.SchedulesApiAxiosParamCreator = SchedulesApiAxiosParamCreator;
1502
+ /**
1503
+ * SchedulesApi - functional programming interface
1504
+ * @export
1505
+ */
1506
+ const SchedulesApiFp = function (configuration) {
1507
+ const localVarAxiosParamCreator = (0, exports.SchedulesApiAxiosParamCreator)(configuration);
1508
+ return {
1509
+ /**
1510
+ *
1511
+ * @summary Returns a list of running schedules.
1512
+ * @param {string} projectName Name of project
1513
+ * @param {string} packageName Name of package
1514
+ * @param {string} [versionId] Version ID
1515
+ * @param {*} [options] Override http request option.
1516
+ * @throws {RequiredError}
1517
+ */
1518
+ async listSchedules(projectName, packageName, versionId, options) {
1519
+ var _a, _b, _c;
1520
+ const localVarAxiosArgs = await localVarAxiosParamCreator.listSchedules(projectName, packageName, versionId, options);
1521
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
1522
+ const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['SchedulesApi.listSchedules']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
1523
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1524
+ },
1525
+ };
1526
+ };
1527
+ exports.SchedulesApiFp = SchedulesApiFp;
1528
+ /**
1529
+ * SchedulesApi - factory interface
1530
+ * @export
1531
+ */
1532
+ const SchedulesApiFactory = function (configuration, basePath, axios) {
1533
+ const localVarFp = (0, exports.SchedulesApiFp)(configuration);
1534
+ return {
1535
+ /**
1536
+ *
1537
+ * @summary Returns a list of running schedules.
1538
+ * @param {string} projectName Name of project
1539
+ * @param {string} packageName Name of package
1540
+ * @param {string} [versionId] Version ID
1541
+ * @param {*} [options] Override http request option.
1542
+ * @throws {RequiredError}
1543
+ */
1544
+ listSchedules(projectName, packageName, versionId, options) {
1545
+ return localVarFp.listSchedules(projectName, packageName, versionId, options).then((request) => request(axios, basePath));
1546
+ },
1547
+ };
1548
+ };
1549
+ exports.SchedulesApiFactory = SchedulesApiFactory;
1550
+ /**
1551
+ * SchedulesApi - object-oriented interface
1552
+ * @export
1553
+ * @class SchedulesApi
1554
+ * @extends {BaseAPI}
1555
+ */
1556
+ class SchedulesApi extends base_1.BaseAPI {
1557
+ /**
1558
+ *
1559
+ * @summary Returns a list of running schedules.
1560
+ * @param {string} projectName Name of project
1561
+ * @param {string} packageName Name of package
1562
+ * @param {string} [versionId] Version ID
1563
+ * @param {*} [options] Override http request option.
1564
+ * @throws {RequiredError}
1565
+ * @memberof SchedulesApi
1566
+ */
1567
+ listSchedules(projectName, packageName, versionId, options) {
1568
+ return (0, exports.SchedulesApiFp)(this.configuration).listSchedules(projectName, packageName, versionId, options).then((request) => request(this.axios, this.basePath));
1569
+ }
1570
+ }
1571
+ exports.SchedulesApi = SchedulesApi;
1572
+ //# sourceMappingURL=api.js.map