@malloydata/db-publisher 0.0.314 → 0.0.316

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 (32) hide show
  1. package/dist/client/api.d.ts +1594 -528
  2. package/dist/client/api.js +1820 -553
  3. package/dist/client/api.js.map +1 -1
  4. package/dist/client/base.d.ts +1 -1
  5. package/dist/client/base.js +1 -1
  6. package/dist/client/common.d.ts +1 -1
  7. package/dist/client/common.js +1 -1
  8. package/dist/client/configuration.d.ts +1 -1
  9. package/dist/client/configuration.js +1 -1
  10. package/dist/client/index.d.ts +1 -1
  11. package/dist/client/index.js +1 -1
  12. package/dist/publisher_connection.d.ts +4 -1
  13. package/dist/publisher_connection.integration.spec.js +208 -0
  14. package/dist/publisher_connection.integration.spec.js.map +1 -0
  15. package/dist/publisher_connection.js +42 -11
  16. package/dist/publisher_connection.js.map +1 -1
  17. package/dist/publisher_connection.unit.spec.d.ts +1 -0
  18. package/dist/{publisher_connection.spec.js → publisher_connection.unit.spec.js} +214 -175
  19. package/dist/publisher_connection.unit.spec.js.map +1 -0
  20. package/package.json +2 -2
  21. package/publisher-api-doc.yaml +1434 -449
  22. package/src/client/.openapi-generator/FILES +0 -1
  23. package/src/client/api.ts +2513 -754
  24. package/src/client/base.ts +1 -1
  25. package/src/client/common.ts +1 -1
  26. package/src/client/configuration.ts +1 -1
  27. package/src/client/index.ts +1 -1
  28. package/src/publisher_connection.integration.spec.ts +200 -0
  29. package/src/publisher_connection.ts +67 -19
  30. package/src/{publisher_connection.spec.ts → publisher_connection.unit.spec.ts} +260 -175
  31. package/dist/publisher_connection.spec.js.map +0 -1
  32. /package/dist/{publisher_connection.spec.d.ts → publisher_connection.integration.spec.d.ts} +0 -0
@@ -3,7 +3,7 @@
3
3
  /* eslint-disable */
4
4
  /**
5
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.
6
+ * The Malloy Publisher - Semantic Model Serving API provides comprehensive access to Malloy packages and their associated resources. A Malloy package is a directory containing Malloy models (.malloy files), Malloy notebooks (.malloynb files), and embedded databases (.parquet files) with a malloy-publisher.json manifest at the package\'s root directory. ## Key Features - **Project Management**: Create and manage projects with their associated packages and connections - **Package Lifecycle**: Full CRUD operations for Malloy packages and their versions - **Model & Notebook Access**: Retrieve and execute Malloy models and notebooks - **Connection Management**: Secure database connection configuration and testing - **Query Execution**: Execute queries against models and retrieve results - **Watch Mode**: Real-time file watching for development workflows ## Resource Hierarchy The API follows a hierarchical resource structure: ``` Projects ├── Connections └── Packages ├── Models ├── Notebooks └── Databases ``` For examples, see the Malloy samples packages (https://github.com/malloydata/malloy-samples) repository.
7
7
  *
8
8
  * The version of the OpenAPI document: v0
9
9
  *
@@ -16,31 +16,34 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
16
16
  return (mod && mod.__esModule) ? mod : { "default": mod };
17
17
  };
18
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;
19
+ exports.WatchModeApi = exports.WatchModeApiFactory = exports.WatchModeApiFp = exports.WatchModeApiAxiosParamCreator = exports.PublisherApi = exports.PublisherApiFactory = exports.PublisherApiFp = exports.PublisherApiAxiosParamCreator = exports.ProjectsApi = exports.ProjectsApiFactory = exports.ProjectsApiFp = exports.ProjectsApiAxiosParamCreator = exports.PackagesApi = exports.PackagesApiFactory = exports.PackagesApiFp = exports.PackagesApiAxiosParamCreator = exports.NotebooksApi = exports.NotebooksApiFactory = exports.NotebooksApiFp = exports.NotebooksApiAxiosParamCreator = exports.ModelsApi = exports.ModelsApiFactory = exports.ModelsApiFp = exports.ModelsApiAxiosParamCreator = exports.DatabasesApi = exports.DatabasesApiFactory = exports.DatabasesApiFp = exports.DatabasesApiAxiosParamCreator = exports.ConnectionsTestApi = exports.ConnectionsTestApiFactory = exports.ConnectionsTestApiFp = exports.ConnectionsTestApiAxiosParamCreator = exports.ConnectionsApi = exports.ConnectionsApiFactory = exports.ConnectionsApiFp = exports.ConnectionsApiAxiosParamCreator = exports.NotebookCellTypeEnum = exports.DatabaseTypeEnum = exports.ConnectionStatusStatusEnum = exports.ConnectionTypeEnum = exports.AttachedDatabaseTypeEnum = void 0;
20
20
  const axios_1 = __importDefault(require("axios"));
21
21
  // Some imports not used depending on template conditions
22
22
  // @ts-ignore
23
23
  const common_1 = require("./common");
24
24
  // @ts-ignore
25
25
  const base_1 = require("./base");
26
- exports.CompiledModelTypeEnum = {
27
- Source: 'source',
28
- Notebook: 'notebook'
26
+ exports.AttachedDatabaseTypeEnum = {
27
+ Bigquery: 'bigquery',
28
+ Snowflake: 'snowflake',
29
+ Postgres: 'postgres'
29
30
  };
30
31
  exports.ConnectionTypeEnum = {
31
32
  Postgres: 'postgres',
32
33
  Bigquery: 'bigquery',
33
34
  Snowflake: 'snowflake',
34
- Trino: 'trino'
35
+ Trino: 'trino',
36
+ Mysql: 'mysql',
37
+ Duckdb: 'duckdb'
38
+ };
39
+ exports.ConnectionStatusStatusEnum = {
40
+ Ok: 'ok',
41
+ Failed: 'failed'
35
42
  };
36
43
  exports.DatabaseTypeEnum = {
37
44
  Embedded: 'embedded',
38
45
  Materialized: 'materialized'
39
46
  };
40
- exports.ModelTypeEnum = {
41
- Source: 'source',
42
- Notebook: 'notebook'
43
- };
44
47
  exports.NotebookCellTypeEnum = {
45
48
  Markdown: 'markdown',
46
49
  Code: 'code'
@@ -52,10 +55,10 @@ exports.NotebookCellTypeEnum = {
52
55
  const ConnectionsApiAxiosParamCreator = function (configuration) {
53
56
  return {
54
57
  /**
55
- *
56
- * @summary Returns a connection.
57
- * @param {string} projectName Name of project
58
- * @param {string} connectionName Name of connection
58
+ * Retrieves detailed information about a specific database connection within a project. This includes connection configuration, credentials (if accessible), and metadata. Useful for inspecting connection settings and troubleshooting connectivity issues.
59
+ * @summary Get connection details
60
+ * @param {string} projectName Name of the project
61
+ * @param {string} connectionName Name of the connection
59
62
  * @param {*} [options] Override http request option.
60
63
  * @throws {RequiredError}
61
64
  */
@@ -85,13 +88,14 @@ const ConnectionsApiAxiosParamCreator = function (configuration) {
85
88
  };
86
89
  },
87
90
  /**
88
- *
89
- * @summary Returns a query and its results.
90
- * @param {string} projectName Name of project
91
- * @param {string} connectionName Name of connection
91
+ * **DEPRECATED**: This endpoint is deprecated and may be removed in future versions. Use the POST version instead for better security and functionality. Executes a SQL statement against the specified database connection and returns the results. The query results include data, metadata, and execution information.
92
+ * @summary Execute SQL query (deprecated)
93
+ * @param {string} projectName Name of the project
94
+ * @param {string} connectionName Name of the connection
92
95
  * @param {string} [sqlStatement] SQL statement
93
96
  * @param {string} [_options] Options
94
97
  * @param {*} [options] Override http request option.
98
+ * @deprecated
95
99
  * @throws {RequiredError}
96
100
  */
97
101
  getQuerydata: async (projectName, connectionName, sqlStatement, _options, options = {}) => {
@@ -126,12 +130,13 @@ const ConnectionsApiAxiosParamCreator = function (configuration) {
126
130
  };
127
131
  },
128
132
  /**
129
- *
130
- * @summary Returns a SQL source.
131
- * @param {string} projectName Name of project
132
- * @param {string} connectionName Name of connection
133
+ * **DEPRECATED**: This endpoint is deprecated and may be removed in future versions. Use the POST version instead for better security and functionality. Creates a Malloy source from a SQL statement using the specified connection. The SQL statement is executed to generate a source definition that can be used in Malloy models.
134
+ * @summary Get SQL source (deprecated)
135
+ * @param {string} projectName Name of the project
136
+ * @param {string} connectionName Name of the connection
133
137
  * @param {string} [sqlStatement] SQL statement
134
138
  * @param {*} [options] Override http request option.
139
+ * @deprecated
135
140
  * @throws {RequiredError}
136
141
  */
137
142
  getSqlsource: async (projectName, connectionName, sqlStatement, options = {}) => {
@@ -163,13 +168,55 @@ const ConnectionsApiAxiosParamCreator = function (configuration) {
163
168
  };
164
169
  },
165
170
  /**
166
- *
167
- * @summary Returns a table source.
168
- * @param {string} projectName Name of project
169
- * @param {string} connectionName Name of connection
171
+ * Retrieves a table from the specified database schema. This endpoint is useful for discovering available data sources and exploring the database structure. The schema must exist in the connection for this operation to succeed. The tablePath is the full path to the table, including the schema name.
172
+ * @summary Get table details from database
173
+ * @param {string} projectName Name of the project
174
+ * @param {string} connectionName Name of the connection
175
+ * @param {string} schemaName Name of the schema
176
+ * @param {string} tablePath Full path to the table
177
+ * @param {*} [options] Override http request option.
178
+ * @throws {RequiredError}
179
+ */
180
+ getTable: async (projectName, connectionName, schemaName, tablePath, options = {}) => {
181
+ // verify required parameter 'projectName' is not null or undefined
182
+ (0, common_1.assertParamExists)('getTable', 'projectName', projectName);
183
+ // verify required parameter 'connectionName' is not null or undefined
184
+ (0, common_1.assertParamExists)('getTable', 'connectionName', connectionName);
185
+ // verify required parameter 'schemaName' is not null or undefined
186
+ (0, common_1.assertParamExists)('getTable', 'schemaName', schemaName);
187
+ // verify required parameter 'tablePath' is not null or undefined
188
+ (0, common_1.assertParamExists)('getTable', 'tablePath', tablePath);
189
+ const localVarPath = `/projects/{projectName}/connections/{connectionName}/schemas/{schemaName}/tables/{tablePath}`
190
+ .replace(`{${"projectName"}}`, encodeURIComponent(String(projectName)))
191
+ .replace(`{${"connectionName"}}`, encodeURIComponent(String(connectionName)))
192
+ .replace(`{${"schemaName"}}`, encodeURIComponent(String(schemaName)))
193
+ .replace(`{${"tablePath"}}`, encodeURIComponent(String(tablePath)));
194
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
195
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
196
+ let baseOptions;
197
+ if (configuration) {
198
+ baseOptions = configuration.baseOptions;
199
+ }
200
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options };
201
+ const localVarHeaderParameter = {};
202
+ const localVarQueryParameter = {};
203
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
204
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
205
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
206
+ return {
207
+ url: (0, common_1.toPathString)(localVarUrlObj),
208
+ options: localVarRequestOptions,
209
+ };
210
+ },
211
+ /**
212
+ * Retrieves information about a specific table or view from the database connection. This includes table schema, column definitions, and metadata. The table can be specified by either tableKey or tablePath parameters, depending on the database type.
213
+ * @summary Get table source information
214
+ * @param {string} projectName Name of the project
215
+ * @param {string} connectionName Name of the connection
170
216
  * @param {string} [tableKey] Table key
171
217
  * @param {string} [tablePath] Table path
172
218
  * @param {*} [options] Override http request option.
219
+ * @deprecated
173
220
  * @throws {RequiredError}
174
221
  */
175
222
  getTablesource: async (projectName, connectionName, tableKey, tablePath, options = {}) => {
@@ -204,12 +251,13 @@ const ConnectionsApiAxiosParamCreator = function (configuration) {
204
251
  };
205
252
  },
206
253
  /**
207
- *
208
- * @summary Returns a temporary table.
209
- * @param {string} projectName Name of project
210
- * @param {string} connectionName Name of connection
254
+ * **DEPRECATED**: This endpoint is deprecated and may be removed in future versions. Use the POST version instead for better security and functionality. Creates a temporary table from a SQL statement using the specified connection. Temporary tables are useful for storing intermediate results during complex queries.
255
+ * @summary Create temporary table (deprecated)
256
+ * @param {string} projectName Name of the project
257
+ * @param {string} connectionName Name of the connection
211
258
  * @param {string} [sqlStatement] SQL statement
212
259
  * @param {*} [options] Override http request option.
260
+ * @deprecated
213
261
  * @throws {RequiredError}
214
262
  */
215
263
  getTemporarytable: async (projectName, connectionName, sqlStatement, options = {}) => {
@@ -241,19 +289,48 @@ const ConnectionsApiAxiosParamCreator = function (configuration) {
241
289
  };
242
290
  },
243
291
  /**
244
- *
245
- * @summary Returns a test.
246
- * @param {string} projectName Name of project
247
- * @param {string} connectionName Name of connection
292
+ * Retrieves a list of all database connections configured for the specified project. Each connection includes its configuration, type, and status information. This endpoint is useful for discovering available data sources within a project.
293
+ * @summary List project database connections
294
+ * @param {string} projectName Name of the project
295
+ * @param {*} [options] Override http request option.
296
+ * @throws {RequiredError}
297
+ */
298
+ listConnections: async (projectName, options = {}) => {
299
+ // verify required parameter 'projectName' is not null or undefined
300
+ (0, common_1.assertParamExists)('listConnections', 'projectName', projectName);
301
+ const localVarPath = `/projects/{projectName}/connections`
302
+ .replace(`{${"projectName"}}`, encodeURIComponent(String(projectName)));
303
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
304
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
305
+ let baseOptions;
306
+ if (configuration) {
307
+ baseOptions = configuration.baseOptions;
308
+ }
309
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options };
310
+ const localVarHeaderParameter = {};
311
+ const localVarQueryParameter = {};
312
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
313
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
314
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
315
+ return {
316
+ url: (0, common_1.toPathString)(localVarUrlObj),
317
+ options: localVarRequestOptions,
318
+ };
319
+ },
320
+ /**
321
+ * Retrieves a list of all schemas (databases) available in the specified connection. Each schema includes metadata such as name, description, and whether it\'s the default schema. This endpoint is useful for exploring the database structure and discovering available data sources.
322
+ * @summary List database schemas
323
+ * @param {string} projectName Name of the project
324
+ * @param {string} connectionName Name of the connection
248
325
  * @param {*} [options] Override http request option.
249
326
  * @throws {RequiredError}
250
327
  */
251
- getTest: async (projectName, connectionName, options = {}) => {
328
+ listSchemas: async (projectName, connectionName, options = {}) => {
252
329
  // verify required parameter 'projectName' is not null or undefined
253
- (0, common_1.assertParamExists)('getTest', 'projectName', projectName);
330
+ (0, common_1.assertParamExists)('listSchemas', 'projectName', projectName);
254
331
  // 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`
332
+ (0, common_1.assertParamExists)('listSchemas', 'connectionName', connectionName);
333
+ const localVarPath = `/projects/{projectName}/connections/{connectionName}/schemas`
257
334
  .replace(`{${"projectName"}}`, encodeURIComponent(String(projectName)))
258
335
  .replace(`{${"connectionName"}}`, encodeURIComponent(String(connectionName)));
259
336
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
@@ -274,17 +351,25 @@ const ConnectionsApiAxiosParamCreator = function (configuration) {
274
351
  };
275
352
  },
276
353
  /**
277
- *
278
- * @summary Returns a list of the connections in the project.
279
- * @param {string} projectName Name of project
354
+ * Retrieves a list of all tables and views available in the specified database schema. This endpoint is useful for discovering available data sources and exploring the database structure. The schema must exist in the connection for this operation to succeed.
355
+ * @summary List tables in database
356
+ * @param {string} projectName Name of the project
357
+ * @param {string} connectionName Name of the connection
358
+ * @param {string} schemaName Name of the schema
280
359
  * @param {*} [options] Override http request option.
281
360
  * @throws {RequiredError}
282
361
  */
283
- listConnections: async (projectName, options = {}) => {
362
+ listTables: async (projectName, connectionName, schemaName, options = {}) => {
284
363
  // 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)));
364
+ (0, common_1.assertParamExists)('listTables', 'projectName', projectName);
365
+ // verify required parameter 'connectionName' is not null or undefined
366
+ (0, common_1.assertParamExists)('listTables', 'connectionName', connectionName);
367
+ // verify required parameter 'schemaName' is not null or undefined
368
+ (0, common_1.assertParamExists)('listTables', 'schemaName', schemaName);
369
+ const localVarPath = `/projects/{projectName}/connections/{connectionName}/schemas/{schemaName}/tables`
370
+ .replace(`{${"projectName"}}`, encodeURIComponent(String(projectName)))
371
+ .replace(`{${"connectionName"}}`, encodeURIComponent(String(connectionName)))
372
+ .replace(`{${"schemaName"}}`, encodeURIComponent(String(schemaName)));
288
373
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
289
374
  const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
290
375
  let baseOptions;
@@ -302,6 +387,124 @@ const ConnectionsApiAxiosParamCreator = function (configuration) {
302
387
  options: localVarRequestOptions,
303
388
  };
304
389
  },
390
+ /**
391
+ * Executes a SQL statement against the specified database connection and returns the results. The results include data, metadata, and execution information.
392
+ * @summary Execute SQL query
393
+ * @param {string} projectName Name of the project
394
+ * @param {string} connectionName Name of the connection
395
+ * @param {PostSqlsourceRequest} postSqlsourceRequest SQL statement to execute
396
+ * @param {string} [_options] Options
397
+ * @param {*} [options] Override http request option.
398
+ * @throws {RequiredError}
399
+ */
400
+ postQuerydata: async (projectName, connectionName, postSqlsourceRequest, _options, options = {}) => {
401
+ // verify required parameter 'projectName' is not null or undefined
402
+ (0, common_1.assertParamExists)('postQuerydata', 'projectName', projectName);
403
+ // verify required parameter 'connectionName' is not null or undefined
404
+ (0, common_1.assertParamExists)('postQuerydata', 'connectionName', connectionName);
405
+ // verify required parameter 'postSqlsourceRequest' is not null or undefined
406
+ (0, common_1.assertParamExists)('postQuerydata', 'postSqlsourceRequest', postSqlsourceRequest);
407
+ const localVarPath = `/projects/{projectName}/connections/{connectionName}/sqlQuery`
408
+ .replace(`{${"projectName"}}`, encodeURIComponent(String(projectName)))
409
+ .replace(`{${"connectionName"}}`, encodeURIComponent(String(connectionName)));
410
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
411
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
412
+ let baseOptions;
413
+ if (configuration) {
414
+ baseOptions = configuration.baseOptions;
415
+ }
416
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options };
417
+ const localVarHeaderParameter = {};
418
+ const localVarQueryParameter = {};
419
+ if (_options !== undefined) {
420
+ localVarQueryParameter['options'] = _options;
421
+ }
422
+ localVarHeaderParameter['Content-Type'] = 'application/json';
423
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
424
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
425
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
426
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(postSqlsourceRequest, localVarRequestOptions, configuration);
427
+ return {
428
+ url: (0, common_1.toPathString)(localVarUrlObj),
429
+ options: localVarRequestOptions,
430
+ };
431
+ },
432
+ /**
433
+ * Creates a Malloy source from a SQL statement using the specified database connection. The SQL statement is executed to generate a source definition that can be used in Malloy models.
434
+ * @summary Create SQL source from statement
435
+ * @param {string} projectName Name of the project
436
+ * @param {string} connectionName Name of the connection
437
+ * @param {PostSqlsourceRequest} postSqlsourceRequest SQL statement to fetch the SQL source
438
+ * @param {*} [options] Override http request option.
439
+ * @throws {RequiredError}
440
+ */
441
+ postSqlsource: async (projectName, connectionName, postSqlsourceRequest, options = {}) => {
442
+ // verify required parameter 'projectName' is not null or undefined
443
+ (0, common_1.assertParamExists)('postSqlsource', 'projectName', projectName);
444
+ // verify required parameter 'connectionName' is not null or undefined
445
+ (0, common_1.assertParamExists)('postSqlsource', 'connectionName', connectionName);
446
+ // verify required parameter 'postSqlsourceRequest' is not null or undefined
447
+ (0, common_1.assertParamExists)('postSqlsource', 'postSqlsourceRequest', postSqlsourceRequest);
448
+ const localVarPath = `/projects/{projectName}/connections/{connectionName}/sqlSource`
449
+ .replace(`{${"projectName"}}`, encodeURIComponent(String(projectName)))
450
+ .replace(`{${"connectionName"}}`, encodeURIComponent(String(connectionName)));
451
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
452
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
453
+ let baseOptions;
454
+ if (configuration) {
455
+ baseOptions = configuration.baseOptions;
456
+ }
457
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options };
458
+ const localVarHeaderParameter = {};
459
+ const localVarQueryParameter = {};
460
+ localVarHeaderParameter['Content-Type'] = 'application/json';
461
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
462
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
463
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
464
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(postSqlsourceRequest, localVarRequestOptions, configuration);
465
+ return {
466
+ url: (0, common_1.toPathString)(localVarUrlObj),
467
+ options: localVarRequestOptions,
468
+ };
469
+ },
470
+ /**
471
+ * Creates a temporary table from a SQL statement using the specified database connection. Temporary tables are useful for storing intermediate results during complex queries and data processing workflows.
472
+ * @summary Create temporary table
473
+ * @param {string} projectName Name of the project
474
+ * @param {string} connectionName Name of the connection
475
+ * @param {PostSqlsourceRequest} postSqlsourceRequest SQL statement to create the temporary table
476
+ * @param {*} [options] Override http request option.
477
+ * @throws {RequiredError}
478
+ */
479
+ postTemporarytable: async (projectName, connectionName, postSqlsourceRequest, options = {}) => {
480
+ // verify required parameter 'projectName' is not null or undefined
481
+ (0, common_1.assertParamExists)('postTemporarytable', 'projectName', projectName);
482
+ // verify required parameter 'connectionName' is not null or undefined
483
+ (0, common_1.assertParamExists)('postTemporarytable', 'connectionName', connectionName);
484
+ // verify required parameter 'postSqlsourceRequest' is not null or undefined
485
+ (0, common_1.assertParamExists)('postTemporarytable', 'postSqlsourceRequest', postSqlsourceRequest);
486
+ const localVarPath = `/projects/{projectName}/connections/{connectionName}/sqlTemporaryTable`
487
+ .replace(`{${"projectName"}}`, encodeURIComponent(String(projectName)))
488
+ .replace(`{${"connectionName"}}`, encodeURIComponent(String(connectionName)));
489
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
490
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
491
+ let baseOptions;
492
+ if (configuration) {
493
+ baseOptions = configuration.baseOptions;
494
+ }
495
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options };
496
+ const localVarHeaderParameter = {};
497
+ const localVarQueryParameter = {};
498
+ localVarHeaderParameter['Content-Type'] = 'application/json';
499
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
500
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
501
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
502
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(postSqlsourceRequest, localVarRequestOptions, configuration);
503
+ return {
504
+ url: (0, common_1.toPathString)(localVarUrlObj),
505
+ options: localVarRequestOptions,
506
+ };
507
+ },
305
508
  };
306
509
  };
307
510
  exports.ConnectionsApiAxiosParamCreator = ConnectionsApiAxiosParamCreator;
@@ -313,10 +516,10 @@ const ConnectionsApiFp = function (configuration) {
313
516
  const localVarAxiosParamCreator = (0, exports.ConnectionsApiAxiosParamCreator)(configuration);
314
517
  return {
315
518
  /**
316
- *
317
- * @summary Returns a connection.
318
- * @param {string} projectName Name of project
319
- * @param {string} connectionName Name of connection
519
+ * Retrieves detailed information about a specific database connection within a project. This includes connection configuration, credentials (if accessible), and metadata. Useful for inspecting connection settings and troubleshooting connectivity issues.
520
+ * @summary Get connection details
521
+ * @param {string} projectName Name of the project
522
+ * @param {string} connectionName Name of the connection
320
523
  * @param {*} [options] Override http request option.
321
524
  * @throws {RequiredError}
322
525
  */
@@ -328,13 +531,14 @@ const ConnectionsApiFp = function (configuration) {
328
531
  return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
329
532
  },
330
533
  /**
331
- *
332
- * @summary Returns a query and its results.
333
- * @param {string} projectName Name of project
334
- * @param {string} connectionName Name of connection
534
+ * **DEPRECATED**: This endpoint is deprecated and may be removed in future versions. Use the POST version instead for better security and functionality. Executes a SQL statement against the specified database connection and returns the results. The query results include data, metadata, and execution information.
535
+ * @summary Execute SQL query (deprecated)
536
+ * @param {string} projectName Name of the project
537
+ * @param {string} connectionName Name of the connection
335
538
  * @param {string} [sqlStatement] SQL statement
336
539
  * @param {string} [_options] Options
337
540
  * @param {*} [options] Override http request option.
541
+ * @deprecated
338
542
  * @throws {RequiredError}
339
543
  */
340
544
  async getQuerydata(projectName, connectionName, sqlStatement, _options, options) {
@@ -345,12 +549,13 @@ const ConnectionsApiFp = function (configuration) {
345
549
  return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
346
550
  },
347
551
  /**
348
- *
349
- * @summary Returns a SQL source.
350
- * @param {string} projectName Name of project
351
- * @param {string} connectionName Name of connection
552
+ * **DEPRECATED**: This endpoint is deprecated and may be removed in future versions. Use the POST version instead for better security and functionality. Creates a Malloy source from a SQL statement using the specified connection. The SQL statement is executed to generate a source definition that can be used in Malloy models.
553
+ * @summary Get SQL source (deprecated)
554
+ * @param {string} projectName Name of the project
555
+ * @param {string} connectionName Name of the connection
352
556
  * @param {string} [sqlStatement] SQL statement
353
557
  * @param {*} [options] Override http request option.
558
+ * @deprecated
354
559
  * @throws {RequiredError}
355
560
  */
356
561
  async getSqlsource(projectName, connectionName, sqlStatement, options) {
@@ -361,13 +566,31 @@ const ConnectionsApiFp = function (configuration) {
361
566
  return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
362
567
  },
363
568
  /**
364
- *
365
- * @summary Returns a table source.
366
- * @param {string} projectName Name of project
367
- * @param {string} connectionName Name of connection
569
+ * Retrieves a table from the specified database schema. This endpoint is useful for discovering available data sources and exploring the database structure. The schema must exist in the connection for this operation to succeed. The tablePath is the full path to the table, including the schema name.
570
+ * @summary Get table details from database
571
+ * @param {string} projectName Name of the project
572
+ * @param {string} connectionName Name of the connection
573
+ * @param {string} schemaName Name of the schema
574
+ * @param {string} tablePath Full path to the table
575
+ * @param {*} [options] Override http request option.
576
+ * @throws {RequiredError}
577
+ */
578
+ async getTable(projectName, connectionName, schemaName, tablePath, options) {
579
+ var _a, _b, _c;
580
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getTable(projectName, connectionName, schemaName, tablePath, options);
581
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
582
+ const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['ConnectionsApi.getTable']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
583
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
584
+ },
585
+ /**
586
+ * Retrieves information about a specific table or view from the database connection. This includes table schema, column definitions, and metadata. The table can be specified by either tableKey or tablePath parameters, depending on the database type.
587
+ * @summary Get table source information
588
+ * @param {string} projectName Name of the project
589
+ * @param {string} connectionName Name of the connection
368
590
  * @param {string} [tableKey] Table key
369
591
  * @param {string} [tablePath] Table path
370
592
  * @param {*} [options] Override http request option.
593
+ * @deprecated
371
594
  * @throws {RequiredError}
372
595
  */
373
596
  async getTablesource(projectName, connectionName, tableKey, tablePath, options) {
@@ -378,12 +601,13 @@ const ConnectionsApiFp = function (configuration) {
378
601
  return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
379
602
  },
380
603
  /**
381
- *
382
- * @summary Returns a temporary table.
383
- * @param {string} projectName Name of project
384
- * @param {string} connectionName Name of connection
604
+ * **DEPRECATED**: This endpoint is deprecated and may be removed in future versions. Use the POST version instead for better security and functionality. Creates a temporary table from a SQL statement using the specified connection. Temporary tables are useful for storing intermediate results during complex queries.
605
+ * @summary Create temporary table (deprecated)
606
+ * @param {string} projectName Name of the project
607
+ * @param {string} connectionName Name of the connection
385
608
  * @param {string} [sqlStatement] SQL statement
386
609
  * @param {*} [options] Override http request option.
610
+ * @deprecated
387
611
  * @throws {RequiredError}
388
612
  */
389
613
  async getTemporarytable(projectName, connectionName, sqlStatement, options) {
@@ -394,32 +618,97 @@ const ConnectionsApiFp = function (configuration) {
394
618
  return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
395
619
  },
396
620
  /**
397
- *
398
- * @summary Returns a test.
399
- * @param {string} projectName Name of project
400
- * @param {string} connectionName Name of connection
621
+ * Retrieves a list of all database connections configured for the specified project. Each connection includes its configuration, type, and status information. This endpoint is useful for discovering available data sources within a project.
622
+ * @summary List project database connections
623
+ * @param {string} projectName Name of the project
401
624
  * @param {*} [options] Override http request option.
402
625
  * @throws {RequiredError}
403
626
  */
404
- async getTest(projectName, connectionName, options) {
627
+ async listConnections(projectName, options) {
405
628
  var _a, _b, _c;
406
- const localVarAxiosArgs = await localVarAxiosParamCreator.getTest(projectName, connectionName, options);
629
+ const localVarAxiosArgs = await localVarAxiosParamCreator.listConnections(projectName, options);
407
630
  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;
631
+ 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;
409
632
  return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
410
633
  },
411
634
  /**
412
- *
413
- * @summary Returns a list of the connections in the project.
414
- * @param {string} projectName Name of project
635
+ * Retrieves a list of all schemas (databases) available in the specified connection. Each schema includes metadata such as name, description, and whether it\'s the default schema. This endpoint is useful for exploring the database structure and discovering available data sources.
636
+ * @summary List database schemas
637
+ * @param {string} projectName Name of the project
638
+ * @param {string} connectionName Name of the connection
415
639
  * @param {*} [options] Override http request option.
416
640
  * @throws {RequiredError}
417
641
  */
418
- async listConnections(projectName, options) {
642
+ async listSchemas(projectName, connectionName, options) {
419
643
  var _a, _b, _c;
420
- const localVarAxiosArgs = await localVarAxiosParamCreator.listConnections(projectName, options);
644
+ const localVarAxiosArgs = await localVarAxiosParamCreator.listSchemas(projectName, connectionName, options);
421
645
  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;
646
+ const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['ConnectionsApi.listSchemas']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
647
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
648
+ },
649
+ /**
650
+ * Retrieves a list of all tables and views available in the specified database schema. This endpoint is useful for discovering available data sources and exploring the database structure. The schema must exist in the connection for this operation to succeed.
651
+ * @summary List tables in database
652
+ * @param {string} projectName Name of the project
653
+ * @param {string} connectionName Name of the connection
654
+ * @param {string} schemaName Name of the schema
655
+ * @param {*} [options] Override http request option.
656
+ * @throws {RequiredError}
657
+ */
658
+ async listTables(projectName, connectionName, schemaName, options) {
659
+ var _a, _b, _c;
660
+ const localVarAxiosArgs = await localVarAxiosParamCreator.listTables(projectName, connectionName, schemaName, options);
661
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
662
+ const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['ConnectionsApi.listTables']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
663
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
664
+ },
665
+ /**
666
+ * Executes a SQL statement against the specified database connection and returns the results. The results include data, metadata, and execution information.
667
+ * @summary Execute SQL query
668
+ * @param {string} projectName Name of the project
669
+ * @param {string} connectionName Name of the connection
670
+ * @param {PostSqlsourceRequest} postSqlsourceRequest SQL statement to execute
671
+ * @param {string} [_options] Options
672
+ * @param {*} [options] Override http request option.
673
+ * @throws {RequiredError}
674
+ */
675
+ async postQuerydata(projectName, connectionName, postSqlsourceRequest, _options, options) {
676
+ var _a, _b, _c;
677
+ const localVarAxiosArgs = await localVarAxiosParamCreator.postQuerydata(projectName, connectionName, postSqlsourceRequest, _options, options);
678
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
679
+ const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['ConnectionsApi.postQuerydata']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
680
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
681
+ },
682
+ /**
683
+ * Creates a Malloy source from a SQL statement using the specified database connection. The SQL statement is executed to generate a source definition that can be used in Malloy models.
684
+ * @summary Create SQL source from statement
685
+ * @param {string} projectName Name of the project
686
+ * @param {string} connectionName Name of the connection
687
+ * @param {PostSqlsourceRequest} postSqlsourceRequest SQL statement to fetch the SQL source
688
+ * @param {*} [options] Override http request option.
689
+ * @throws {RequiredError}
690
+ */
691
+ async postSqlsource(projectName, connectionName, postSqlsourceRequest, options) {
692
+ var _a, _b, _c;
693
+ const localVarAxiosArgs = await localVarAxiosParamCreator.postSqlsource(projectName, connectionName, postSqlsourceRequest, options);
694
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
695
+ const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['ConnectionsApi.postSqlsource']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
696
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
697
+ },
698
+ /**
699
+ * Creates a temporary table from a SQL statement using the specified database connection. Temporary tables are useful for storing intermediate results during complex queries and data processing workflows.
700
+ * @summary Create temporary table
701
+ * @param {string} projectName Name of the project
702
+ * @param {string} connectionName Name of the connection
703
+ * @param {PostSqlsourceRequest} postSqlsourceRequest SQL statement to create the temporary table
704
+ * @param {*} [options] Override http request option.
705
+ * @throws {RequiredError}
706
+ */
707
+ async postTemporarytable(projectName, connectionName, postSqlsourceRequest, options) {
708
+ var _a, _b, _c;
709
+ const localVarAxiosArgs = await localVarAxiosParamCreator.postTemporarytable(projectName, connectionName, postSqlsourceRequest, options);
710
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
711
+ const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['ConnectionsApi.postTemporarytable']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
423
712
  return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
424
713
  },
425
714
  };
@@ -433,10 +722,10 @@ const ConnectionsApiFactory = function (configuration, basePath, axios) {
433
722
  const localVarFp = (0, exports.ConnectionsApiFp)(configuration);
434
723
  return {
435
724
  /**
436
- *
437
- * @summary Returns a connection.
438
- * @param {string} projectName Name of project
439
- * @param {string} connectionName Name of connection
725
+ * Retrieves detailed information about a specific database connection within a project. This includes connection configuration, credentials (if accessible), and metadata. Useful for inspecting connection settings and troubleshooting connectivity issues.
726
+ * @summary Get connection details
727
+ * @param {string} projectName Name of the project
728
+ * @param {string} connectionName Name of the connection
440
729
  * @param {*} [options] Override http request option.
441
730
  * @throws {RequiredError}
442
731
  */
@@ -444,75 +733,141 @@ const ConnectionsApiFactory = function (configuration, basePath, axios) {
444
733
  return localVarFp.getConnection(projectName, connectionName, options).then((request) => request(axios, basePath));
445
734
  },
446
735
  /**
447
- *
448
- * @summary Returns a query and its results.
449
- * @param {string} projectName Name of project
450
- * @param {string} connectionName Name of connection
736
+ * **DEPRECATED**: This endpoint is deprecated and may be removed in future versions. Use the POST version instead for better security and functionality. Executes a SQL statement against the specified database connection and returns the results. The query results include data, metadata, and execution information.
737
+ * @summary Execute SQL query (deprecated)
738
+ * @param {string} projectName Name of the project
739
+ * @param {string} connectionName Name of the connection
451
740
  * @param {string} [sqlStatement] SQL statement
452
741
  * @param {string} [_options] Options
453
742
  * @param {*} [options] Override http request option.
743
+ * @deprecated
454
744
  * @throws {RequiredError}
455
745
  */
456
746
  getQuerydata(projectName, connectionName, sqlStatement, _options, options) {
457
747
  return localVarFp.getQuerydata(projectName, connectionName, sqlStatement, _options, options).then((request) => request(axios, basePath));
458
748
  },
459
749
  /**
460
- *
461
- * @summary Returns a SQL source.
462
- * @param {string} projectName Name of project
463
- * @param {string} connectionName Name of connection
750
+ * **DEPRECATED**: This endpoint is deprecated and may be removed in future versions. Use the POST version instead for better security and functionality. Creates a Malloy source from a SQL statement using the specified connection. The SQL statement is executed to generate a source definition that can be used in Malloy models.
751
+ * @summary Get SQL source (deprecated)
752
+ * @param {string} projectName Name of the project
753
+ * @param {string} connectionName Name of the connection
464
754
  * @param {string} [sqlStatement] SQL statement
465
755
  * @param {*} [options] Override http request option.
756
+ * @deprecated
466
757
  * @throws {RequiredError}
467
758
  */
468
759
  getSqlsource(projectName, connectionName, sqlStatement, options) {
469
760
  return localVarFp.getSqlsource(projectName, connectionName, sqlStatement, options).then((request) => request(axios, basePath));
470
761
  },
471
762
  /**
472
- *
473
- * @summary Returns a table source.
474
- * @param {string} projectName Name of project
475
- * @param {string} connectionName Name of connection
763
+ * Retrieves a table from the specified database schema. This endpoint is useful for discovering available data sources and exploring the database structure. The schema must exist in the connection for this operation to succeed. The tablePath is the full path to the table, including the schema name.
764
+ * @summary Get table details from database
765
+ * @param {string} projectName Name of the project
766
+ * @param {string} connectionName Name of the connection
767
+ * @param {string} schemaName Name of the schema
768
+ * @param {string} tablePath Full path to the table
769
+ * @param {*} [options] Override http request option.
770
+ * @throws {RequiredError}
771
+ */
772
+ getTable(projectName, connectionName, schemaName, tablePath, options) {
773
+ return localVarFp.getTable(projectName, connectionName, schemaName, tablePath, options).then((request) => request(axios, basePath));
774
+ },
775
+ /**
776
+ * Retrieves information about a specific table or view from the database connection. This includes table schema, column definitions, and metadata. The table can be specified by either tableKey or tablePath parameters, depending on the database type.
777
+ * @summary Get table source information
778
+ * @param {string} projectName Name of the project
779
+ * @param {string} connectionName Name of the connection
476
780
  * @param {string} [tableKey] Table key
477
781
  * @param {string} [tablePath] Table path
478
782
  * @param {*} [options] Override http request option.
783
+ * @deprecated
479
784
  * @throws {RequiredError}
480
785
  */
481
786
  getTablesource(projectName, connectionName, tableKey, tablePath, options) {
482
787
  return localVarFp.getTablesource(projectName, connectionName, tableKey, tablePath, options).then((request) => request(axios, basePath));
483
788
  },
484
789
  /**
485
- *
486
- * @summary Returns a temporary table.
487
- * @param {string} projectName Name of project
488
- * @param {string} connectionName Name of connection
790
+ * **DEPRECATED**: This endpoint is deprecated and may be removed in future versions. Use the POST version instead for better security and functionality. Creates a temporary table from a SQL statement using the specified connection. Temporary tables are useful for storing intermediate results during complex queries.
791
+ * @summary Create temporary table (deprecated)
792
+ * @param {string} projectName Name of the project
793
+ * @param {string} connectionName Name of the connection
489
794
  * @param {string} [sqlStatement] SQL statement
490
795
  * @param {*} [options] Override http request option.
796
+ * @deprecated
491
797
  * @throws {RequiredError}
492
798
  */
493
799
  getTemporarytable(projectName, connectionName, sqlStatement, options) {
494
800
  return localVarFp.getTemporarytable(projectName, connectionName, sqlStatement, options).then((request) => request(axios, basePath));
495
801
  },
496
802
  /**
497
- *
498
- * @summary Returns a test.
499
- * @param {string} projectName Name of project
500
- * @param {string} connectionName Name of connection
803
+ * Retrieves a list of all database connections configured for the specified project. Each connection includes its configuration, type, and status information. This endpoint is useful for discovering available data sources within a project.
804
+ * @summary List project database connections
805
+ * @param {string} projectName Name of the project
501
806
  * @param {*} [options] Override http request option.
502
807
  * @throws {RequiredError}
503
808
  */
504
- getTest(projectName, connectionName, options) {
505
- return localVarFp.getTest(projectName, connectionName, options).then((request) => request(axios, basePath));
809
+ listConnections(projectName, options) {
810
+ return localVarFp.listConnections(projectName, options).then((request) => request(axios, basePath));
506
811
  },
507
812
  /**
508
- *
509
- * @summary Returns a list of the connections in the project.
510
- * @param {string} projectName Name of project
813
+ * Retrieves a list of all schemas (databases) available in the specified connection. Each schema includes metadata such as name, description, and whether it\'s the default schema. This endpoint is useful for exploring the database structure and discovering available data sources.
814
+ * @summary List database schemas
815
+ * @param {string} projectName Name of the project
816
+ * @param {string} connectionName Name of the connection
511
817
  * @param {*} [options] Override http request option.
512
818
  * @throws {RequiredError}
513
819
  */
514
- listConnections(projectName, options) {
515
- return localVarFp.listConnections(projectName, options).then((request) => request(axios, basePath));
820
+ listSchemas(projectName, connectionName, options) {
821
+ return localVarFp.listSchemas(projectName, connectionName, options).then((request) => request(axios, basePath));
822
+ },
823
+ /**
824
+ * Retrieves a list of all tables and views available in the specified database schema. This endpoint is useful for discovering available data sources and exploring the database structure. The schema must exist in the connection for this operation to succeed.
825
+ * @summary List tables in database
826
+ * @param {string} projectName Name of the project
827
+ * @param {string} connectionName Name of the connection
828
+ * @param {string} schemaName Name of the schema
829
+ * @param {*} [options] Override http request option.
830
+ * @throws {RequiredError}
831
+ */
832
+ listTables(projectName, connectionName, schemaName, options) {
833
+ return localVarFp.listTables(projectName, connectionName, schemaName, options).then((request) => request(axios, basePath));
834
+ },
835
+ /**
836
+ * Executes a SQL statement against the specified database connection and returns the results. The results include data, metadata, and execution information.
837
+ * @summary Execute SQL query
838
+ * @param {string} projectName Name of the project
839
+ * @param {string} connectionName Name of the connection
840
+ * @param {PostSqlsourceRequest} postSqlsourceRequest SQL statement to execute
841
+ * @param {string} [_options] Options
842
+ * @param {*} [options] Override http request option.
843
+ * @throws {RequiredError}
844
+ */
845
+ postQuerydata(projectName, connectionName, postSqlsourceRequest, _options, options) {
846
+ return localVarFp.postQuerydata(projectName, connectionName, postSqlsourceRequest, _options, options).then((request) => request(axios, basePath));
847
+ },
848
+ /**
849
+ * Creates a Malloy source from a SQL statement using the specified database connection. The SQL statement is executed to generate a source definition that can be used in Malloy models.
850
+ * @summary Create SQL source from statement
851
+ * @param {string} projectName Name of the project
852
+ * @param {string} connectionName Name of the connection
853
+ * @param {PostSqlsourceRequest} postSqlsourceRequest SQL statement to fetch the SQL source
854
+ * @param {*} [options] Override http request option.
855
+ * @throws {RequiredError}
856
+ */
857
+ postSqlsource(projectName, connectionName, postSqlsourceRequest, options) {
858
+ return localVarFp.postSqlsource(projectName, connectionName, postSqlsourceRequest, options).then((request) => request(axios, basePath));
859
+ },
860
+ /**
861
+ * Creates a temporary table from a SQL statement using the specified database connection. Temporary tables are useful for storing intermediate results during complex queries and data processing workflows.
862
+ * @summary Create temporary table
863
+ * @param {string} projectName Name of the project
864
+ * @param {string} connectionName Name of the connection
865
+ * @param {PostSqlsourceRequest} postSqlsourceRequest SQL statement to create the temporary table
866
+ * @param {*} [options] Override http request option.
867
+ * @throws {RequiredError}
868
+ */
869
+ postTemporarytable(projectName, connectionName, postSqlsourceRequest, options) {
870
+ return localVarFp.postTemporarytable(projectName, connectionName, postSqlsourceRequest, options).then((request) => request(axios, basePath));
516
871
  },
517
872
  };
518
873
  };
@@ -525,10 +880,10 @@ exports.ConnectionsApiFactory = ConnectionsApiFactory;
525
880
  */
526
881
  class ConnectionsApi extends base_1.BaseAPI {
527
882
  /**
528
- *
529
- * @summary Returns a connection.
530
- * @param {string} projectName Name of project
531
- * @param {string} connectionName Name of connection
883
+ * Retrieves detailed information about a specific database connection within a project. This includes connection configuration, credentials (if accessible), and metadata. Useful for inspecting connection settings and troubleshooting connectivity issues.
884
+ * @summary Get connection details
885
+ * @param {string} projectName Name of the project
886
+ * @param {string} connectionName Name of the connection
532
887
  * @param {*} [options] Override http request option.
533
888
  * @throws {RequiredError}
534
889
  * @memberof ConnectionsApi
@@ -537,13 +892,14 @@ class ConnectionsApi extends base_1.BaseAPI {
537
892
  return (0, exports.ConnectionsApiFp)(this.configuration).getConnection(projectName, connectionName, options).then((request) => request(this.axios, this.basePath));
538
893
  }
539
894
  /**
540
- *
541
- * @summary Returns a query and its results.
542
- * @param {string} projectName Name of project
543
- * @param {string} connectionName Name of connection
895
+ * **DEPRECATED**: This endpoint is deprecated and may be removed in future versions. Use the POST version instead for better security and functionality. Executes a SQL statement against the specified database connection and returns the results. The query results include data, metadata, and execution information.
896
+ * @summary Execute SQL query (deprecated)
897
+ * @param {string} projectName Name of the project
898
+ * @param {string} connectionName Name of the connection
544
899
  * @param {string} [sqlStatement] SQL statement
545
900
  * @param {string} [_options] Options
546
901
  * @param {*} [options] Override http request option.
902
+ * @deprecated
547
903
  * @throws {RequiredError}
548
904
  * @memberof ConnectionsApi
549
905
  */
@@ -551,12 +907,13 @@ class ConnectionsApi extends base_1.BaseAPI {
551
907
  return (0, exports.ConnectionsApiFp)(this.configuration).getQuerydata(projectName, connectionName, sqlStatement, _options, options).then((request) => request(this.axios, this.basePath));
552
908
  }
553
909
  /**
554
- *
555
- * @summary Returns a SQL source.
556
- * @param {string} projectName Name of project
557
- * @param {string} connectionName Name of connection
910
+ * **DEPRECATED**: This endpoint is deprecated and may be removed in future versions. Use the POST version instead for better security and functionality. Creates a Malloy source from a SQL statement using the specified connection. The SQL statement is executed to generate a source definition that can be used in Malloy models.
911
+ * @summary Get SQL source (deprecated)
912
+ * @param {string} projectName Name of the project
913
+ * @param {string} connectionName Name of the connection
558
914
  * @param {string} [sqlStatement] SQL statement
559
915
  * @param {*} [options] Override http request option.
916
+ * @deprecated
560
917
  * @throws {RequiredError}
561
918
  * @memberof ConnectionsApi
562
919
  */
@@ -564,13 +921,28 @@ class ConnectionsApi extends base_1.BaseAPI {
564
921
  return (0, exports.ConnectionsApiFp)(this.configuration).getSqlsource(projectName, connectionName, sqlStatement, options).then((request) => request(this.axios, this.basePath));
565
922
  }
566
923
  /**
567
- *
568
- * @summary Returns a table source.
569
- * @param {string} projectName Name of project
570
- * @param {string} connectionName Name of connection
924
+ * Retrieves a table from the specified database schema. This endpoint is useful for discovering available data sources and exploring the database structure. The schema must exist in the connection for this operation to succeed. The tablePath is the full path to the table, including the schema name.
925
+ * @summary Get table details from database
926
+ * @param {string} projectName Name of the project
927
+ * @param {string} connectionName Name of the connection
928
+ * @param {string} schemaName Name of the schema
929
+ * @param {string} tablePath Full path to the table
930
+ * @param {*} [options] Override http request option.
931
+ * @throws {RequiredError}
932
+ * @memberof ConnectionsApi
933
+ */
934
+ getTable(projectName, connectionName, schemaName, tablePath, options) {
935
+ return (0, exports.ConnectionsApiFp)(this.configuration).getTable(projectName, connectionName, schemaName, tablePath, options).then((request) => request(this.axios, this.basePath));
936
+ }
937
+ /**
938
+ * Retrieves information about a specific table or view from the database connection. This includes table schema, column definitions, and metadata. The table can be specified by either tableKey or tablePath parameters, depending on the database type.
939
+ * @summary Get table source information
940
+ * @param {string} projectName Name of the project
941
+ * @param {string} connectionName Name of the connection
571
942
  * @param {string} [tableKey] Table key
572
943
  * @param {string} [tablePath] Table path
573
944
  * @param {*} [options] Override http request option.
945
+ * @deprecated
574
946
  * @throws {RequiredError}
575
947
  * @memberof ConnectionsApi
576
948
  */
@@ -578,12 +950,13 @@ class ConnectionsApi extends base_1.BaseAPI {
578
950
  return (0, exports.ConnectionsApiFp)(this.configuration).getTablesource(projectName, connectionName, tableKey, tablePath, options).then((request) => request(this.axios, this.basePath));
579
951
  }
580
952
  /**
581
- *
582
- * @summary Returns a temporary table.
583
- * @param {string} projectName Name of project
584
- * @param {string} connectionName Name of connection
953
+ * **DEPRECATED**: This endpoint is deprecated and may be removed in future versions. Use the POST version instead for better security and functionality. Creates a temporary table from a SQL statement using the specified connection. Temporary tables are useful for storing intermediate results during complex queries.
954
+ * @summary Create temporary table (deprecated)
955
+ * @param {string} projectName Name of the project
956
+ * @param {string} connectionName Name of the connection
585
957
  * @param {string} [sqlStatement] SQL statement
586
958
  * @param {*} [options] Override http request option.
959
+ * @deprecated
587
960
  * @throws {RequiredError}
588
961
  * @memberof ConnectionsApi
589
962
  */
@@ -591,68 +964,114 @@ class ConnectionsApi extends base_1.BaseAPI {
591
964
  return (0, exports.ConnectionsApiFp)(this.configuration).getTemporarytable(projectName, connectionName, sqlStatement, options).then((request) => request(this.axios, this.basePath));
592
965
  }
593
966
  /**
594
- *
595
- * @summary Returns a test.
596
- * @param {string} projectName Name of project
597
- * @param {string} connectionName Name of connection
967
+ * Retrieves a list of all database connections configured for the specified project. Each connection includes its configuration, type, and status information. This endpoint is useful for discovering available data sources within a project.
968
+ * @summary List project database connections
969
+ * @param {string} projectName Name of the project
598
970
  * @param {*} [options] Override http request option.
599
971
  * @throws {RequiredError}
600
972
  * @memberof ConnectionsApi
601
973
  */
602
- getTest(projectName, connectionName, options) {
603
- return (0, exports.ConnectionsApiFp)(this.configuration).getTest(projectName, connectionName, options).then((request) => request(this.axios, this.basePath));
974
+ listConnections(projectName, options) {
975
+ return (0, exports.ConnectionsApiFp)(this.configuration).listConnections(projectName, options).then((request) => request(this.axios, this.basePath));
604
976
  }
605
977
  /**
606
- *
607
- * @summary Returns a list of the connections in the project.
608
- * @param {string} projectName Name of project
978
+ * Retrieves a list of all schemas (databases) available in the specified connection. Each schema includes metadata such as name, description, and whether it\'s the default schema. This endpoint is useful for exploring the database structure and discovering available data sources.
979
+ * @summary List database schemas
980
+ * @param {string} projectName Name of the project
981
+ * @param {string} connectionName Name of the connection
609
982
  * @param {*} [options] Override http request option.
610
983
  * @throws {RequiredError}
611
984
  * @memberof ConnectionsApi
612
985
  */
613
- listConnections(projectName, options) {
614
- return (0, exports.ConnectionsApiFp)(this.configuration).listConnections(projectName, options).then((request) => request(this.axios, this.basePath));
986
+ listSchemas(projectName, connectionName, options) {
987
+ return (0, exports.ConnectionsApiFp)(this.configuration).listSchemas(projectName, connectionName, options).then((request) => request(this.axios, this.basePath));
988
+ }
989
+ /**
990
+ * Retrieves a list of all tables and views available in the specified database schema. This endpoint is useful for discovering available data sources and exploring the database structure. The schema must exist in the connection for this operation to succeed.
991
+ * @summary List tables in database
992
+ * @param {string} projectName Name of the project
993
+ * @param {string} connectionName Name of the connection
994
+ * @param {string} schemaName Name of the schema
995
+ * @param {*} [options] Override http request option.
996
+ * @throws {RequiredError}
997
+ * @memberof ConnectionsApi
998
+ */
999
+ listTables(projectName, connectionName, schemaName, options) {
1000
+ return (0, exports.ConnectionsApiFp)(this.configuration).listTables(projectName, connectionName, schemaName, options).then((request) => request(this.axios, this.basePath));
1001
+ }
1002
+ /**
1003
+ * Executes a SQL statement against the specified database connection and returns the results. The results include data, metadata, and execution information.
1004
+ * @summary Execute SQL query
1005
+ * @param {string} projectName Name of the project
1006
+ * @param {string} connectionName Name of the connection
1007
+ * @param {PostSqlsourceRequest} postSqlsourceRequest SQL statement to execute
1008
+ * @param {string} [_options] Options
1009
+ * @param {*} [options] Override http request option.
1010
+ * @throws {RequiredError}
1011
+ * @memberof ConnectionsApi
1012
+ */
1013
+ postQuerydata(projectName, connectionName, postSqlsourceRequest, _options, options) {
1014
+ return (0, exports.ConnectionsApiFp)(this.configuration).postQuerydata(projectName, connectionName, postSqlsourceRequest, _options, options).then((request) => request(this.axios, this.basePath));
1015
+ }
1016
+ /**
1017
+ * Creates a Malloy source from a SQL statement using the specified database connection. The SQL statement is executed to generate a source definition that can be used in Malloy models.
1018
+ * @summary Create SQL source from statement
1019
+ * @param {string} projectName Name of the project
1020
+ * @param {string} connectionName Name of the connection
1021
+ * @param {PostSqlsourceRequest} postSqlsourceRequest SQL statement to fetch the SQL source
1022
+ * @param {*} [options] Override http request option.
1023
+ * @throws {RequiredError}
1024
+ * @memberof ConnectionsApi
1025
+ */
1026
+ postSqlsource(projectName, connectionName, postSqlsourceRequest, options) {
1027
+ return (0, exports.ConnectionsApiFp)(this.configuration).postSqlsource(projectName, connectionName, postSqlsourceRequest, options).then((request) => request(this.axios, this.basePath));
1028
+ }
1029
+ /**
1030
+ * Creates a temporary table from a SQL statement using the specified database connection. Temporary tables are useful for storing intermediate results during complex queries and data processing workflows.
1031
+ * @summary Create temporary table
1032
+ * @param {string} projectName Name of the project
1033
+ * @param {string} connectionName Name of the connection
1034
+ * @param {PostSqlsourceRequest} postSqlsourceRequest SQL statement to create the temporary table
1035
+ * @param {*} [options] Override http request option.
1036
+ * @throws {RequiredError}
1037
+ * @memberof ConnectionsApi
1038
+ */
1039
+ postTemporarytable(projectName, connectionName, postSqlsourceRequest, options) {
1040
+ return (0, exports.ConnectionsApiFp)(this.configuration).postTemporarytable(projectName, connectionName, postSqlsourceRequest, options).then((request) => request(this.axios, this.basePath));
615
1041
  }
616
1042
  }
617
1043
  exports.ConnectionsApi = ConnectionsApi;
618
1044
  /**
619
- * DatabasesApi - axios parameter creator
1045
+ * ConnectionsTestApi - axios parameter creator
620
1046
  * @export
621
1047
  */
622
- const DatabasesApiAxiosParamCreator = function (configuration) {
1048
+ const ConnectionsTestApiAxiosParamCreator = function (configuration) {
623
1049
  return {
624
1050
  /**
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
1051
+ * Validates a database connection configuration without adding it to any project. This endpoint allows you to test connection parameters, credentials, and network connectivity before committing the connection to a project. Useful for troubleshooting connection issues and validating configurations during setup.
1052
+ * @summary Test database connection configuration
1053
+ * @param {Connection} connection
630
1054
  * @param {*} [options] Override http request option.
631
1055
  * @throws {RequiredError}
632
1056
  */
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)));
1057
+ testConnectionConfiguration: async (connection, options = {}) => {
1058
+ // verify required parameter 'connection' is not null or undefined
1059
+ (0, common_1.assertParamExists)('testConnectionConfiguration', 'connection', connection);
1060
+ const localVarPath = `/connections/test`;
641
1061
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
642
1062
  const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
643
1063
  let baseOptions;
644
1064
  if (configuration) {
645
1065
  baseOptions = configuration.baseOptions;
646
1066
  }
647
- const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options };
1067
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options };
648
1068
  const localVarHeaderParameter = {};
649
1069
  const localVarQueryParameter = {};
650
- if (versionId !== undefined) {
651
- localVarQueryParameter['versionId'] = versionId;
652
- }
1070
+ localVarHeaderParameter['Content-Type'] = 'application/json';
653
1071
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
654
1072
  let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
655
1073
  localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
1074
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(connection, localVarRequestOptions, configuration);
656
1075
  return {
657
1076
  url: (0, common_1.toPathString)(localVarUrlObj),
658
1077
  options: localVarRequestOptions,
@@ -660,95 +1079,94 @@ const DatabasesApiAxiosParamCreator = function (configuration) {
660
1079
  },
661
1080
  };
662
1081
  };
663
- exports.DatabasesApiAxiosParamCreator = DatabasesApiAxiosParamCreator;
1082
+ exports.ConnectionsTestApiAxiosParamCreator = ConnectionsTestApiAxiosParamCreator;
664
1083
  /**
665
- * DatabasesApi - functional programming interface
1084
+ * ConnectionsTestApi - functional programming interface
666
1085
  * @export
667
1086
  */
668
- const DatabasesApiFp = function (configuration) {
669
- const localVarAxiosParamCreator = (0, exports.DatabasesApiAxiosParamCreator)(configuration);
1087
+ const ConnectionsTestApiFp = function (configuration) {
1088
+ const localVarAxiosParamCreator = (0, exports.ConnectionsTestApiAxiosParamCreator)(configuration);
670
1089
  return {
671
1090
  /**
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
1091
+ * Validates a database connection configuration without adding it to any project. This endpoint allows you to test connection parameters, credentials, and network connectivity before committing the connection to a project. Useful for troubleshooting connection issues and validating configurations during setup.
1092
+ * @summary Test database connection configuration
1093
+ * @param {Connection} connection
677
1094
  * @param {*} [options] Override http request option.
678
1095
  * @throws {RequiredError}
679
1096
  */
680
- async listDatabases(projectName, packageName, versionId, options) {
1097
+ async testConnectionConfiguration(connection, options) {
681
1098
  var _a, _b, _c;
682
- const localVarAxiosArgs = await localVarAxiosParamCreator.listDatabases(projectName, packageName, versionId, options);
1099
+ const localVarAxiosArgs = await localVarAxiosParamCreator.testConnectionConfiguration(connection, options);
683
1100
  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;
1101
+ const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['ConnectionsTestApi.testConnectionConfiguration']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
685
1102
  return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
686
1103
  },
687
1104
  };
688
1105
  };
689
- exports.DatabasesApiFp = DatabasesApiFp;
1106
+ exports.ConnectionsTestApiFp = ConnectionsTestApiFp;
690
1107
  /**
691
- * DatabasesApi - factory interface
1108
+ * ConnectionsTestApi - factory interface
692
1109
  * @export
693
1110
  */
694
- const DatabasesApiFactory = function (configuration, basePath, axios) {
695
- const localVarFp = (0, exports.DatabasesApiFp)(configuration);
1111
+ const ConnectionsTestApiFactory = function (configuration, basePath, axios) {
1112
+ const localVarFp = (0, exports.ConnectionsTestApiFp)(configuration);
696
1113
  return {
697
1114
  /**
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
1115
+ * Validates a database connection configuration without adding it to any project. This endpoint allows you to test connection parameters, credentials, and network connectivity before committing the connection to a project. Useful for troubleshooting connection issues and validating configurations during setup.
1116
+ * @summary Test database connection configuration
1117
+ * @param {Connection} connection
703
1118
  * @param {*} [options] Override http request option.
704
1119
  * @throws {RequiredError}
705
1120
  */
706
- listDatabases(projectName, packageName, versionId, options) {
707
- return localVarFp.listDatabases(projectName, packageName, versionId, options).then((request) => request(axios, basePath));
1121
+ testConnectionConfiguration(connection, options) {
1122
+ return localVarFp.testConnectionConfiguration(connection, options).then((request) => request(axios, basePath));
708
1123
  },
709
1124
  };
710
1125
  };
711
- exports.DatabasesApiFactory = DatabasesApiFactory;
1126
+ exports.ConnectionsTestApiFactory = ConnectionsTestApiFactory;
712
1127
  /**
713
- * DatabasesApi - object-oriented interface
1128
+ * ConnectionsTestApi - object-oriented interface
714
1129
  * @export
715
- * @class DatabasesApi
1130
+ * @class ConnectionsTestApi
716
1131
  * @extends {BaseAPI}
717
1132
  */
718
- class DatabasesApi extends base_1.BaseAPI {
1133
+ class ConnectionsTestApi extends base_1.BaseAPI {
719
1134
  /**
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
1135
+ * Validates a database connection configuration without adding it to any project. This endpoint allows you to test connection parameters, credentials, and network connectivity before committing the connection to a project. Useful for troubleshooting connection issues and validating configurations during setup.
1136
+ * @summary Test database connection configuration
1137
+ * @param {Connection} connection
725
1138
  * @param {*} [options] Override http request option.
726
1139
  * @throws {RequiredError}
727
- * @memberof DatabasesApi
1140
+ * @memberof ConnectionsTestApi
728
1141
  */
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));
1142
+ testConnectionConfiguration(connection, options) {
1143
+ return (0, exports.ConnectionsTestApiFp)(this.configuration).testConnectionConfiguration(connection, options).then((request) => request(this.axios, this.basePath));
731
1144
  }
732
1145
  }
733
- exports.DatabasesApi = DatabasesApi;
1146
+ exports.ConnectionsTestApi = ConnectionsTestApi;
734
1147
  /**
735
- * DefaultApi - axios parameter creator
1148
+ * DatabasesApi - axios parameter creator
736
1149
  * @export
737
1150
  */
738
- const DefaultApiAxiosParamCreator = function (configuration) {
1151
+ const DatabasesApiAxiosParamCreator = function (configuration) {
739
1152
  return {
740
1153
  /**
741
- *
742
- * @summary Returns metadata about the publisher service.
743
- * @param {string} projectName Name of project
1154
+ * Retrieves a list of all embedded databases within the specified package. These are typically DuckDB databases stored as .parquet files that provide local data storage for the package. Each database entry includes metadata about the database structure and content.
1155
+ * @summary List embedded databases
1156
+ * @param {string} projectName Name of the project
1157
+ * @param {string} packageName Name of the package
1158
+ * @param {string} [versionId] Version identifier for the package
744
1159
  * @param {*} [options] Override http request option.
745
1160
  * @throws {RequiredError}
746
1161
  */
747
- about: async (projectName, options = {}) => {
1162
+ listDatabases: async (projectName, packageName, versionId, options = {}) => {
748
1163
  // 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)));
1164
+ (0, common_1.assertParamExists)('listDatabases', 'projectName', projectName);
1165
+ // verify required parameter 'packageName' is not null or undefined
1166
+ (0, common_1.assertParamExists)('listDatabases', 'packageName', packageName);
1167
+ const localVarPath = `/projects/{projectName}/packages/{packageName}/databases`
1168
+ .replace(`{${"projectName"}}`, encodeURIComponent(String(projectName)))
1169
+ .replace(`{${"packageName"}}`, encodeURIComponent(String(packageName)));
752
1170
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
753
1171
  const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
754
1172
  let baseOptions;
@@ -758,6 +1176,9 @@ const DefaultApiAxiosParamCreator = function (configuration) {
758
1176
  const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options };
759
1177
  const localVarHeaderParameter = {};
760
1178
  const localVarQueryParameter = {};
1179
+ if (versionId !== undefined) {
1180
+ localVarQueryParameter['versionId'] = versionId;
1181
+ }
761
1182
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
762
1183
  let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
763
1184
  localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
@@ -768,71 +1189,77 @@ const DefaultApiAxiosParamCreator = function (configuration) {
768
1189
  },
769
1190
  };
770
1191
  };
771
- exports.DefaultApiAxiosParamCreator = DefaultApiAxiosParamCreator;
1192
+ exports.DatabasesApiAxiosParamCreator = DatabasesApiAxiosParamCreator;
772
1193
  /**
773
- * DefaultApi - functional programming interface
1194
+ * DatabasesApi - functional programming interface
774
1195
  * @export
775
1196
  */
776
- const DefaultApiFp = function (configuration) {
777
- const localVarAxiosParamCreator = (0, exports.DefaultApiAxiosParamCreator)(configuration);
1197
+ const DatabasesApiFp = function (configuration) {
1198
+ const localVarAxiosParamCreator = (0, exports.DatabasesApiAxiosParamCreator)(configuration);
778
1199
  return {
779
1200
  /**
780
- *
781
- * @summary Returns metadata about the publisher service.
782
- * @param {string} projectName Name of project
1201
+ * Retrieves a list of all embedded databases within the specified package. These are typically DuckDB databases stored as .parquet files that provide local data storage for the package. Each database entry includes metadata about the database structure and content.
1202
+ * @summary List embedded databases
1203
+ * @param {string} projectName Name of the project
1204
+ * @param {string} packageName Name of the package
1205
+ * @param {string} [versionId] Version identifier for the package
783
1206
  * @param {*} [options] Override http request option.
784
1207
  * @throws {RequiredError}
785
1208
  */
786
- async about(projectName, options) {
1209
+ async listDatabases(projectName, packageName, versionId, options) {
787
1210
  var _a, _b, _c;
788
- const localVarAxiosArgs = await localVarAxiosParamCreator.about(projectName, options);
1211
+ const localVarAxiosArgs = await localVarAxiosParamCreator.listDatabases(projectName, packageName, versionId, options);
789
1212
  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;
1213
+ 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;
791
1214
  return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
792
1215
  },
793
1216
  };
794
1217
  };
795
- exports.DefaultApiFp = DefaultApiFp;
1218
+ exports.DatabasesApiFp = DatabasesApiFp;
796
1219
  /**
797
- * DefaultApi - factory interface
1220
+ * DatabasesApi - factory interface
798
1221
  * @export
799
1222
  */
800
- const DefaultApiFactory = function (configuration, basePath, axios) {
801
- const localVarFp = (0, exports.DefaultApiFp)(configuration);
1223
+ const DatabasesApiFactory = function (configuration, basePath, axios) {
1224
+ const localVarFp = (0, exports.DatabasesApiFp)(configuration);
802
1225
  return {
803
1226
  /**
804
- *
805
- * @summary Returns metadata about the publisher service.
806
- * @param {string} projectName Name of project
1227
+ * Retrieves a list of all embedded databases within the specified package. These are typically DuckDB databases stored as .parquet files that provide local data storage for the package. Each database entry includes metadata about the database structure and content.
1228
+ * @summary List embedded databases
1229
+ * @param {string} projectName Name of the project
1230
+ * @param {string} packageName Name of the package
1231
+ * @param {string} [versionId] Version identifier for the package
807
1232
  * @param {*} [options] Override http request option.
808
1233
  * @throws {RequiredError}
809
1234
  */
810
- about(projectName, options) {
811
- return localVarFp.about(projectName, options).then((request) => request(axios, basePath));
1235
+ listDatabases(projectName, packageName, versionId, options) {
1236
+ return localVarFp.listDatabases(projectName, packageName, versionId, options).then((request) => request(axios, basePath));
812
1237
  },
813
1238
  };
814
1239
  };
815
- exports.DefaultApiFactory = DefaultApiFactory;
1240
+ exports.DatabasesApiFactory = DatabasesApiFactory;
816
1241
  /**
817
- * DefaultApi - object-oriented interface
1242
+ * DatabasesApi - object-oriented interface
818
1243
  * @export
819
- * @class DefaultApi
1244
+ * @class DatabasesApi
820
1245
  * @extends {BaseAPI}
821
1246
  */
822
- class DefaultApi extends base_1.BaseAPI {
1247
+ class DatabasesApi extends base_1.BaseAPI {
823
1248
  /**
824
- *
825
- * @summary Returns metadata about the publisher service.
826
- * @param {string} projectName Name of project
1249
+ * Retrieves a list of all embedded databases within the specified package. These are typically DuckDB databases stored as .parquet files that provide local data storage for the package. Each database entry includes metadata about the database structure and content.
1250
+ * @summary List embedded databases
1251
+ * @param {string} projectName Name of the project
1252
+ * @param {string} packageName Name of the package
1253
+ * @param {string} [versionId] Version identifier for the package
827
1254
  * @param {*} [options] Override http request option.
828
1255
  * @throws {RequiredError}
829
- * @memberof DefaultApi
1256
+ * @memberof DatabasesApi
830
1257
  */
831
- about(projectName, options) {
832
- return (0, exports.DefaultApiFp)(this.configuration).about(projectName, options).then((request) => request(this.axios, this.basePath));
1258
+ listDatabases(projectName, packageName, versionId, options) {
1259
+ return (0, exports.DatabasesApiFp)(this.configuration).listDatabases(projectName, packageName, versionId, options).then((request) => request(this.axios, this.basePath));
833
1260
  }
834
1261
  }
835
- exports.DefaultApi = DefaultApi;
1262
+ exports.DatabasesApi = DatabasesApi;
836
1263
  /**
837
1264
  * ModelsApi - axios parameter creator
838
1265
  * @export
@@ -840,12 +1267,54 @@ exports.DefaultApi = DefaultApi;
840
1267
  const ModelsApiAxiosParamCreator = function (configuration) {
841
1268
  return {
842
1269
  /**
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
1270
+ * Executes a Malloy query against a model and returns the results. The query can be specified as a raw Malloy query string or by referencing a named query within the model. This endpoint supports both ad-hoc queries and predefined model queries, making it flexible for various use cases including data exploration, reporting, and application integration.
1271
+ * @summary Execute Malloy query
1272
+ * @param {string} projectName Name of the project
1273
+ * @param {string} packageName Name of the package
1274
+ * @param {string} path Path to the model within the package
1275
+ * @param {QueryRequest} queryRequest
1276
+ * @param {*} [options] Override http request option.
1277
+ * @throws {RequiredError}
1278
+ */
1279
+ executeQueryModel: async (projectName, packageName, path, queryRequest, options = {}) => {
1280
+ // verify required parameter 'projectName' is not null or undefined
1281
+ (0, common_1.assertParamExists)('executeQueryModel', 'projectName', projectName);
1282
+ // verify required parameter 'packageName' is not null or undefined
1283
+ (0, common_1.assertParamExists)('executeQueryModel', 'packageName', packageName);
1284
+ // verify required parameter 'path' is not null or undefined
1285
+ (0, common_1.assertParamExists)('executeQueryModel', 'path', path);
1286
+ // verify required parameter 'queryRequest' is not null or undefined
1287
+ (0, common_1.assertParamExists)('executeQueryModel', 'queryRequest', queryRequest);
1288
+ const localVarPath = `/projects/{projectName}/packages/{packageName}/models/{path}/query`
1289
+ .replace(`{${"projectName"}}`, encodeURIComponent(String(projectName)))
1290
+ .replace(`{${"packageName"}}`, encodeURIComponent(String(packageName)))
1291
+ .replace(`{${"path"}}`, encodeURIComponent(String(path)));
1292
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
1293
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
1294
+ let baseOptions;
1295
+ if (configuration) {
1296
+ baseOptions = configuration.baseOptions;
1297
+ }
1298
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options };
1299
+ const localVarHeaderParameter = {};
1300
+ const localVarQueryParameter = {};
1301
+ localVarHeaderParameter['Content-Type'] = 'application/json';
1302
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
1303
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1304
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
1305
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(queryRequest, localVarRequestOptions, configuration);
1306
+ return {
1307
+ url: (0, common_1.toPathString)(localVarUrlObj),
1308
+ options: localVarRequestOptions,
1309
+ };
1310
+ },
1311
+ /**
1312
+ * Retrieves a compiled Malloy model with its source information, queries, and metadata. The model is compiled using the specified version of the Malloy compiler. This endpoint provides access to the model\'s structure, sources, and named queries for use in applications.
1313
+ * @summary Get compiled Malloy model
1314
+ * @param {string} projectName Name of the project
1315
+ * @param {string} packageName Name of the package
1316
+ * @param {string} path Path to the model within the package
1317
+ * @param {string} [versionId] Version identifier for the package
849
1318
  * @param {*} [options] Override http request option.
850
1319
  * @throws {RequiredError}
851
1320
  */
@@ -881,11 +1350,11 @@ const ModelsApiAxiosParamCreator = function (configuration) {
881
1350
  };
882
1351
  },
883
1352
  /**
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
1353
+ * Retrieves a list of all Malloy models within the specified package. Each model entry includes the relative path, package name, and any compilation errors. This endpoint is useful for discovering available models and checking their status.
1354
+ * @summary List package models
1355
+ * @param {string} projectName Name of the project
1356
+ * @param {string} packageName Name of the package
1357
+ * @param {string} [versionId] Version identifier for the package
889
1358
  * @param {*} [options] Override http request option.
890
1359
  * @throws {RequiredError}
891
1360
  */
@@ -928,12 +1397,29 @@ const ModelsApiFp = function (configuration) {
928
1397
  const localVarAxiosParamCreator = (0, exports.ModelsApiAxiosParamCreator)(configuration);
929
1398
  return {
930
1399
  /**
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
1400
+ * Executes a Malloy query against a model and returns the results. The query can be specified as a raw Malloy query string or by referencing a named query within the model. This endpoint supports both ad-hoc queries and predefined model queries, making it flexible for various use cases including data exploration, reporting, and application integration.
1401
+ * @summary Execute Malloy query
1402
+ * @param {string} projectName Name of the project
1403
+ * @param {string} packageName Name of the package
1404
+ * @param {string} path Path to the model within the package
1405
+ * @param {QueryRequest} queryRequest
1406
+ * @param {*} [options] Override http request option.
1407
+ * @throws {RequiredError}
1408
+ */
1409
+ async executeQueryModel(projectName, packageName, path, queryRequest, options) {
1410
+ var _a, _b, _c;
1411
+ const localVarAxiosArgs = await localVarAxiosParamCreator.executeQueryModel(projectName, packageName, path, queryRequest, options);
1412
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
1413
+ const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['ModelsApi.executeQueryModel']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
1414
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1415
+ },
1416
+ /**
1417
+ * Retrieves a compiled Malloy model with its source information, queries, and metadata. The model is compiled using the specified version of the Malloy compiler. This endpoint provides access to the model\'s structure, sources, and named queries for use in applications.
1418
+ * @summary Get compiled Malloy model
1419
+ * @param {string} projectName Name of the project
1420
+ * @param {string} packageName Name of the package
1421
+ * @param {string} path Path to the model within the package
1422
+ * @param {string} [versionId] Version identifier for the package
937
1423
  * @param {*} [options] Override http request option.
938
1424
  * @throws {RequiredError}
939
1425
  */
@@ -945,11 +1431,11 @@ const ModelsApiFp = function (configuration) {
945
1431
  return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
946
1432
  },
947
1433
  /**
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
1434
+ * Retrieves a list of all Malloy models within the specified package. Each model entry includes the relative path, package name, and any compilation errors. This endpoint is useful for discovering available models and checking their status.
1435
+ * @summary List package models
1436
+ * @param {string} projectName Name of the project
1437
+ * @param {string} packageName Name of the package
1438
+ * @param {string} [versionId] Version identifier for the package
953
1439
  * @param {*} [options] Override http request option.
954
1440
  * @throws {RequiredError}
955
1441
  */
@@ -971,12 +1457,25 @@ const ModelsApiFactory = function (configuration, basePath, axios) {
971
1457
  const localVarFp = (0, exports.ModelsApiFp)(configuration);
972
1458
  return {
973
1459
  /**
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
1460
+ * Executes a Malloy query against a model and returns the results. The query can be specified as a raw Malloy query string or by referencing a named query within the model. This endpoint supports both ad-hoc queries and predefined model queries, making it flexible for various use cases including data exploration, reporting, and application integration.
1461
+ * @summary Execute Malloy query
1462
+ * @param {string} projectName Name of the project
1463
+ * @param {string} packageName Name of the package
1464
+ * @param {string} path Path to the model within the package
1465
+ * @param {QueryRequest} queryRequest
1466
+ * @param {*} [options] Override http request option.
1467
+ * @throws {RequiredError}
1468
+ */
1469
+ executeQueryModel(projectName, packageName, path, queryRequest, options) {
1470
+ return localVarFp.executeQueryModel(projectName, packageName, path, queryRequest, options).then((request) => request(axios, basePath));
1471
+ },
1472
+ /**
1473
+ * Retrieves a compiled Malloy model with its source information, queries, and metadata. The model is compiled using the specified version of the Malloy compiler. This endpoint provides access to the model\'s structure, sources, and named queries for use in applications.
1474
+ * @summary Get compiled Malloy model
1475
+ * @param {string} projectName Name of the project
1476
+ * @param {string} packageName Name of the package
1477
+ * @param {string} path Path to the model within the package
1478
+ * @param {string} [versionId] Version identifier for the package
980
1479
  * @param {*} [options] Override http request option.
981
1480
  * @throws {RequiredError}
982
1481
  */
@@ -984,11 +1483,11 @@ const ModelsApiFactory = function (configuration, basePath, axios) {
984
1483
  return localVarFp.getModel(projectName, packageName, path, versionId, options).then((request) => request(axios, basePath));
985
1484
  },
986
1485
  /**
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
1486
+ * Retrieves a list of all Malloy models within the specified package. Each model entry includes the relative path, package name, and any compilation errors. This endpoint is useful for discovering available models and checking their status.
1487
+ * @summary List package models
1488
+ * @param {string} projectName Name of the project
1489
+ * @param {string} packageName Name of the package
1490
+ * @param {string} [versionId] Version identifier for the package
992
1491
  * @param {*} [options] Override http request option.
993
1492
  * @throws {RequiredError}
994
1493
  */
@@ -1006,12 +1505,26 @@ exports.ModelsApiFactory = ModelsApiFactory;
1006
1505
  */
1007
1506
  class ModelsApi extends base_1.BaseAPI {
1008
1507
  /**
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
1508
+ * Executes a Malloy query against a model and returns the results. The query can be specified as a raw Malloy query string or by referencing a named query within the model. This endpoint supports both ad-hoc queries and predefined model queries, making it flexible for various use cases including data exploration, reporting, and application integration.
1509
+ * @summary Execute Malloy query
1510
+ * @param {string} projectName Name of the project
1511
+ * @param {string} packageName Name of the package
1512
+ * @param {string} path Path to the model within the package
1513
+ * @param {QueryRequest} queryRequest
1514
+ * @param {*} [options] Override http request option.
1515
+ * @throws {RequiredError}
1516
+ * @memberof ModelsApi
1517
+ */
1518
+ executeQueryModel(projectName, packageName, path, queryRequest, options) {
1519
+ return (0, exports.ModelsApiFp)(this.configuration).executeQueryModel(projectName, packageName, path, queryRequest, options).then((request) => request(this.axios, this.basePath));
1520
+ }
1521
+ /**
1522
+ * Retrieves a compiled Malloy model with its source information, queries, and metadata. The model is compiled using the specified version of the Malloy compiler. This endpoint provides access to the model\'s structure, sources, and named queries for use in applications.
1523
+ * @summary Get compiled Malloy model
1524
+ * @param {string} projectName Name of the project
1525
+ * @param {string} packageName Name of the package
1526
+ * @param {string} path Path to the model within the package
1527
+ * @param {string} [versionId] Version identifier for the package
1015
1528
  * @param {*} [options] Override http request option.
1016
1529
  * @throws {RequiredError}
1017
1530
  * @memberof ModelsApi
@@ -1020,11 +1533,11 @@ class ModelsApi extends base_1.BaseAPI {
1020
1533
  return (0, exports.ModelsApiFp)(this.configuration).getModel(projectName, packageName, path, versionId, options).then((request) => request(this.axios, this.basePath));
1021
1534
  }
1022
1535
  /**
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
1536
+ * Retrieves a list of all Malloy models within the specified package. Each model entry includes the relative path, package name, and any compilation errors. This endpoint is useful for discovering available models and checking their status.
1537
+ * @summary List package models
1538
+ * @param {string} projectName Name of the project
1539
+ * @param {string} packageName Name of the package
1540
+ * @param {string} [versionId] Version identifier for the package
1028
1541
  * @param {*} [options] Override http request option.
1029
1542
  * @throws {RequiredError}
1030
1543
  * @memberof ModelsApi
@@ -1035,28 +1548,32 @@ class ModelsApi extends base_1.BaseAPI {
1035
1548
  }
1036
1549
  exports.ModelsApi = ModelsApi;
1037
1550
  /**
1038
- * PackagesApi - axios parameter creator
1551
+ * NotebooksApi - axios parameter creator
1039
1552
  * @export
1040
1553
  */
1041
- const PackagesApiAxiosParamCreator = function (configuration) {
1554
+ const NotebooksApiAxiosParamCreator = function (configuration) {
1042
1555
  return {
1043
1556
  /**
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
1557
+ * Retrieves a compiled Malloy notebook with its cells, results, and metadata. The notebook is compiled using the specified version of the Malloy compiler. This endpoint provides access to the notebook\'s structure, cells, and execution results for use in applications.
1558
+ * @summary Get compiled Malloy notebook
1559
+ * @param {string} projectName Name of the project
1560
+ * @param {string} packageName Name of the package
1561
+ * @param {string} path Path to notebook within the package.
1562
+ * @param {string} [versionId] Version identifier for the package
1049
1563
  * @param {*} [options] Override http request option.
1050
1564
  * @throws {RequiredError}
1051
1565
  */
1052
- getPackage: async (projectName, packageName, versionId, options = {}) => {
1566
+ getNotebook: async (projectName, packageName, path, versionId, options = {}) => {
1053
1567
  // verify required parameter 'projectName' is not null or undefined
1054
- (0, common_1.assertParamExists)('getPackage', 'projectName', projectName);
1568
+ (0, common_1.assertParamExists)('getNotebook', 'projectName', projectName);
1055
1569
  // verify required parameter 'packageName' is not null or undefined
1056
- (0, common_1.assertParamExists)('getPackage', 'packageName', packageName);
1057
- const localVarPath = `/projects/{projectName}/packages/{packageName}`
1570
+ (0, common_1.assertParamExists)('getNotebook', 'packageName', packageName);
1571
+ // verify required parameter 'path' is not null or undefined
1572
+ (0, common_1.assertParamExists)('getNotebook', 'path', path);
1573
+ const localVarPath = `/projects/{projectName}/packages/{packageName}/notebooks/{path}`
1058
1574
  .replace(`{${"projectName"}}`, encodeURIComponent(String(projectName)))
1059
- .replace(`{${"packageName"}}`, encodeURIComponent(String(packageName)));
1575
+ .replace(`{${"packageName"}}`, encodeURIComponent(String(packageName)))
1576
+ .replace(`{${"path"}}`, encodeURIComponent(String(path)));
1060
1577
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
1061
1578
  const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
1062
1579
  let baseOptions;
@@ -1078,17 +1595,22 @@ const PackagesApiAxiosParamCreator = function (configuration) {
1078
1595
  };
1079
1596
  },
1080
1597
  /**
1081
- *
1082
- * @summary Returns a list of the Packages hosted on this server.
1083
- * @param {string} projectName Name of project
1598
+ * Retrieves a list of all Malloy notebooks within the specified package. Each notebook entry includes the relative path, package name, and any compilation errors. This endpoint is useful for discovering available notebooks and checking their status.
1599
+ * @summary List package notebooks
1600
+ * @param {string} projectName Name of the project
1601
+ * @param {string} packageName Name of the package
1602
+ * @param {string} [versionId] Version identifier for the package
1084
1603
  * @param {*} [options] Override http request option.
1085
1604
  * @throws {RequiredError}
1086
1605
  */
1087
- listPackages: async (projectName, options = {}) => {
1606
+ listNotebooks: async (projectName, packageName, versionId, options = {}) => {
1088
1607
  // 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)));
1608
+ (0, common_1.assertParamExists)('listNotebooks', 'projectName', projectName);
1609
+ // verify required parameter 'packageName' is not null or undefined
1610
+ (0, common_1.assertParamExists)('listNotebooks', 'packageName', packageName);
1611
+ const localVarPath = `/projects/{projectName}/packages/{packageName}/notebooks`
1612
+ .replace(`{${"projectName"}}`, encodeURIComponent(String(projectName)))
1613
+ .replace(`{${"packageName"}}`, encodeURIComponent(String(packageName)));
1092
1614
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
1093
1615
  const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
1094
1616
  let baseOptions;
@@ -1098,6 +1620,9 @@ const PackagesApiAxiosParamCreator = function (configuration) {
1098
1620
  const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options };
1099
1621
  const localVarHeaderParameter = {};
1100
1622
  const localVarQueryParameter = {};
1623
+ if (versionId !== undefined) {
1624
+ localVarQueryParameter['versionId'] = versionId;
1625
+ }
1101
1626
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
1102
1627
  let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1103
1628
  localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
@@ -1108,237 +1633,212 @@ const PackagesApiAxiosParamCreator = function (configuration) {
1108
1633
  },
1109
1634
  };
1110
1635
  };
1111
- exports.PackagesApiAxiosParamCreator = PackagesApiAxiosParamCreator;
1636
+ exports.NotebooksApiAxiosParamCreator = NotebooksApiAxiosParamCreator;
1112
1637
  /**
1113
- * PackagesApi - functional programming interface
1638
+ * NotebooksApi - functional programming interface
1114
1639
  * @export
1115
1640
  */
1116
- const PackagesApiFp = function (configuration) {
1117
- const localVarAxiosParamCreator = (0, exports.PackagesApiAxiosParamCreator)(configuration);
1641
+ const NotebooksApiFp = function (configuration) {
1642
+ const localVarAxiosParamCreator = (0, exports.NotebooksApiAxiosParamCreator)(configuration);
1118
1643
  return {
1119
1644
  /**
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
1645
+ * Retrieves a compiled Malloy notebook with its cells, results, and metadata. The notebook is compiled using the specified version of the Malloy compiler. This endpoint provides access to the notebook\'s structure, cells, and execution results for use in applications.
1646
+ * @summary Get compiled Malloy notebook
1647
+ * @param {string} projectName Name of the project
1648
+ * @param {string} packageName Name of the package
1649
+ * @param {string} path Path to notebook within the package.
1650
+ * @param {string} [versionId] Version identifier for the package
1125
1651
  * @param {*} [options] Override http request option.
1126
1652
  * @throws {RequiredError}
1127
1653
  */
1128
- async getPackage(projectName, packageName, versionId, options) {
1654
+ async getNotebook(projectName, packageName, path, versionId, options) {
1129
1655
  var _a, _b, _c;
1130
- const localVarAxiosArgs = await localVarAxiosParamCreator.getPackage(projectName, packageName, versionId, options);
1656
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getNotebook(projectName, packageName, path, versionId, options);
1131
1657
  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;
1658
+ const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['NotebooksApi.getNotebook']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
1133
1659
  return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1134
1660
  },
1135
1661
  /**
1136
- *
1137
- * @summary Returns a list of the Packages hosted on this server.
1138
- * @param {string} projectName Name of project
1662
+ * Retrieves a list of all Malloy notebooks within the specified package. Each notebook entry includes the relative path, package name, and any compilation errors. This endpoint is useful for discovering available notebooks and checking their status.
1663
+ * @summary List package notebooks
1664
+ * @param {string} projectName Name of the project
1665
+ * @param {string} packageName Name of the package
1666
+ * @param {string} [versionId] Version identifier for the package
1139
1667
  * @param {*} [options] Override http request option.
1140
1668
  * @throws {RequiredError}
1141
1669
  */
1142
- async listPackages(projectName, options) {
1670
+ async listNotebooks(projectName, packageName, versionId, options) {
1143
1671
  var _a, _b, _c;
1144
- const localVarAxiosArgs = await localVarAxiosParamCreator.listPackages(projectName, options);
1672
+ const localVarAxiosArgs = await localVarAxiosParamCreator.listNotebooks(projectName, packageName, versionId, options);
1145
1673
  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;
1674
+ const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['NotebooksApi.listNotebooks']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
1147
1675
  return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1148
1676
  },
1149
1677
  };
1150
1678
  };
1151
- exports.PackagesApiFp = PackagesApiFp;
1679
+ exports.NotebooksApiFp = NotebooksApiFp;
1152
1680
  /**
1153
- * PackagesApi - factory interface
1681
+ * NotebooksApi - factory interface
1154
1682
  * @export
1155
1683
  */
1156
- const PackagesApiFactory = function (configuration, basePath, axios) {
1157
- const localVarFp = (0, exports.PackagesApiFp)(configuration);
1684
+ const NotebooksApiFactory = function (configuration, basePath, axios) {
1685
+ const localVarFp = (0, exports.NotebooksApiFp)(configuration);
1158
1686
  return {
1159
1687
  /**
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
1688
+ * Retrieves a compiled Malloy notebook with its cells, results, and metadata. The notebook is compiled using the specified version of the Malloy compiler. This endpoint provides access to the notebook\'s structure, cells, and execution results for use in applications.
1689
+ * @summary Get compiled Malloy notebook
1690
+ * @param {string} projectName Name of the project
1691
+ * @param {string} packageName Name of the package
1692
+ * @param {string} path Path to notebook within the package.
1693
+ * @param {string} [versionId] Version identifier for the package
1165
1694
  * @param {*} [options] Override http request option.
1166
1695
  * @throws {RequiredError}
1167
1696
  */
1168
- getPackage(projectName, packageName, versionId, options) {
1169
- return localVarFp.getPackage(projectName, packageName, versionId, options).then((request) => request(axios, basePath));
1697
+ getNotebook(projectName, packageName, path, versionId, options) {
1698
+ return localVarFp.getNotebook(projectName, packageName, path, versionId, options).then((request) => request(axios, basePath));
1170
1699
  },
1171
1700
  /**
1172
- *
1173
- * @summary Returns a list of the Packages hosted on this server.
1174
- * @param {string} projectName Name of project
1701
+ * Retrieves a list of all Malloy notebooks within the specified package. Each notebook entry includes the relative path, package name, and any compilation errors. This endpoint is useful for discovering available notebooks and checking their status.
1702
+ * @summary List package notebooks
1703
+ * @param {string} projectName Name of the project
1704
+ * @param {string} packageName Name of the package
1705
+ * @param {string} [versionId] Version identifier for the package
1175
1706
  * @param {*} [options] Override http request option.
1176
1707
  * @throws {RequiredError}
1177
1708
  */
1178
- listPackages(projectName, options) {
1179
- return localVarFp.listPackages(projectName, options).then((request) => request(axios, basePath));
1709
+ listNotebooks(projectName, packageName, versionId, options) {
1710
+ return localVarFp.listNotebooks(projectName, packageName, versionId, options).then((request) => request(axios, basePath));
1180
1711
  },
1181
1712
  };
1182
1713
  };
1183
- exports.PackagesApiFactory = PackagesApiFactory;
1714
+ exports.NotebooksApiFactory = NotebooksApiFactory;
1184
1715
  /**
1185
- * PackagesApi - object-oriented interface
1716
+ * NotebooksApi - object-oriented interface
1186
1717
  * @export
1187
- * @class PackagesApi
1718
+ * @class NotebooksApi
1188
1719
  * @extends {BaseAPI}
1189
1720
  */
1190
- class PackagesApi extends base_1.BaseAPI {
1721
+ class NotebooksApi extends base_1.BaseAPI {
1191
1722
  /**
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
1723
+ * Retrieves a compiled Malloy notebook with its cells, results, and metadata. The notebook is compiled using the specified version of the Malloy compiler. This endpoint provides access to the notebook\'s structure, cells, and execution results for use in applications.
1724
+ * @summary Get compiled Malloy notebook
1725
+ * @param {string} projectName Name of the project
1726
+ * @param {string} packageName Name of the package
1727
+ * @param {string} path Path to notebook within the package.
1728
+ * @param {string} [versionId] Version identifier for the package
1197
1729
  * @param {*} [options] Override http request option.
1198
1730
  * @throws {RequiredError}
1199
- * @memberof PackagesApi
1731
+ * @memberof NotebooksApi
1200
1732
  */
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));
1733
+ getNotebook(projectName, packageName, path, versionId, options) {
1734
+ return (0, exports.NotebooksApiFp)(this.configuration).getNotebook(projectName, packageName, path, versionId, options).then((request) => request(this.axios, this.basePath));
1203
1735
  }
1204
1736
  /**
1205
- *
1206
- * @summary Returns a list of the Packages hosted on this server.
1207
- * @param {string} projectName Name of project
1737
+ * Retrieves a list of all Malloy notebooks within the specified package. Each notebook entry includes the relative path, package name, and any compilation errors. This endpoint is useful for discovering available notebooks and checking their status.
1738
+ * @summary List package notebooks
1739
+ * @param {string} projectName Name of the project
1740
+ * @param {string} packageName Name of the package
1741
+ * @param {string} [versionId] Version identifier for the package
1208
1742
  * @param {*} [options] Override http request option.
1209
1743
  * @throws {RequiredError}
1210
- * @memberof PackagesApi
1744
+ * @memberof NotebooksApi
1211
1745
  */
1212
- listPackages(projectName, options) {
1213
- return (0, exports.PackagesApiFp)(this.configuration).listPackages(projectName, options).then((request) => request(this.axios, this.basePath));
1746
+ listNotebooks(projectName, packageName, versionId, options) {
1747
+ return (0, exports.NotebooksApiFp)(this.configuration).listNotebooks(projectName, packageName, versionId, options).then((request) => request(this.axios, this.basePath));
1214
1748
  }
1215
1749
  }
1216
- exports.PackagesApi = PackagesApi;
1750
+ exports.NotebooksApi = NotebooksApi;
1217
1751
  /**
1218
- * ProjectsApi - axios parameter creator
1752
+ * PackagesApi - axios parameter creator
1219
1753
  * @export
1220
1754
  */
1221
- const ProjectsApiAxiosParamCreator = function (configuration) {
1755
+ const PackagesApiAxiosParamCreator = function (configuration) {
1222
1756
  return {
1223
1757
  /**
1224
- *
1225
- * @summary Returns a list of the Projects hosted on this server.
1758
+ * Creates a new Malloy package within the specified project. A package serves as a container for models, notebooks, embedded databases, and other resources. The package will be initialized with the provided metadata and can immediately accept content.
1759
+ * @summary Create a new package
1760
+ * @param {string} projectName Name of the project
1761
+ * @param {Package} _package
1226
1762
  * @param {*} [options] Override http request option.
1227
1763
  * @throws {RequiredError}
1228
1764
  */
1229
- listProjects: async (options = {}) => {
1230
- const localVarPath = `/projects`;
1765
+ createPackage: async (projectName, _package, options = {}) => {
1766
+ // verify required parameter 'projectName' is not null or undefined
1767
+ (0, common_1.assertParamExists)('createPackage', 'projectName', projectName);
1768
+ // verify required parameter '_package' is not null or undefined
1769
+ (0, common_1.assertParamExists)('createPackage', '_package', _package);
1770
+ const localVarPath = `/projects/{projectName}/packages`
1771
+ .replace(`{${"projectName"}}`, encodeURIComponent(String(projectName)));
1231
1772
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
1232
1773
  const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
1233
1774
  let baseOptions;
1234
1775
  if (configuration) {
1235
1776
  baseOptions = configuration.baseOptions;
1236
1777
  }
1237
- const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options };
1778
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options };
1238
1779
  const localVarHeaderParameter = {};
1239
1780
  const localVarQueryParameter = {};
1781
+ localVarHeaderParameter['Content-Type'] = 'application/json';
1240
1782
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
1241
1783
  let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1242
1784
  localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
1785
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(_package, localVarRequestOptions, configuration);
1243
1786
  return {
1244
1787
  url: (0, common_1.toPathString)(localVarUrlObj),
1245
1788
  options: localVarRequestOptions,
1246
1789
  };
1247
1790
  },
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
1791
  /**
1282
- *
1283
- * @summary Returns a list of the Projects hosted on this server.
1792
+ * Permanently deletes a package and all its associated resources including models, notebooks, databases, and metadata. This operation cannot be undone, so use with caution. The package must exist and be accessible for deletion.
1793
+ * @summary Delete a package
1794
+ * @param {string} projectName Name of the project
1795
+ * @param {string} packageName Name of the package
1284
1796
  * @param {*} [options] Override http request option.
1285
1797
  * @throws {RequiredError}
1286
1798
  */
1287
- listProjects(options) {
1288
- return localVarFp.listProjects(options).then((request) => request(axios, basePath));
1799
+ deletePackage: async (projectName, packageName, options = {}) => {
1800
+ // verify required parameter 'projectName' is not null or undefined
1801
+ (0, common_1.assertParamExists)('deletePackage', 'projectName', projectName);
1802
+ // verify required parameter 'packageName' is not null or undefined
1803
+ (0, common_1.assertParamExists)('deletePackage', 'packageName', packageName);
1804
+ const localVarPath = `/projects/{projectName}/packages/{packageName}`
1805
+ .replace(`{${"projectName"}}`, encodeURIComponent(String(projectName)))
1806
+ .replace(`{${"packageName"}}`, encodeURIComponent(String(packageName)));
1807
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
1808
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
1809
+ let baseOptions;
1810
+ if (configuration) {
1811
+ baseOptions = configuration.baseOptions;
1812
+ }
1813
+ const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options };
1814
+ const localVarHeaderParameter = {};
1815
+ const localVarQueryParameter = {};
1816
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
1817
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1818
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
1819
+ return {
1820
+ url: (0, common_1.toPathString)(localVarUrlObj),
1821
+ options: localVarRequestOptions,
1822
+ };
1289
1823
  },
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
1824
  /**
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
1825
+ * Retrieves detailed information about a specific package, including its models, notebooks, databases, and metadata. The reload parameter can be used to refresh the package state from disk before returning the information. The versionId parameter allows access to specific package versions.
1826
+ * @summary Get package details and metadata
1827
+ * @param {string} projectName Name of the project
1828
+ * @param {string} packageName Package name
1829
+ * @param {string} [versionId] Version identifier for the package
1830
+ * @param {boolean} [reload] Load / reload the package before returning result
1328
1831
  * @param {*} [options] Override http request option.
1329
1832
  * @throws {RequiredError}
1330
1833
  */
1331
- executeQuery: async (projectName, packageName, path, query, sourceName, queryName, versionId, options = {}) => {
1834
+ getPackage: async (projectName, packageName, versionId, reload, options = {}) => {
1332
1835
  // verify required parameter 'projectName' is not null or undefined
1333
- (0, common_1.assertParamExists)('executeQuery', 'projectName', projectName);
1836
+ (0, common_1.assertParamExists)('getPackage', 'projectName', projectName);
1334
1837
  // 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}`
1838
+ (0, common_1.assertParamExists)('getPackage', 'packageName', packageName);
1839
+ const localVarPath = `/projects/{projectName}/packages/{packageName}`
1339
1840
  .replace(`{${"projectName"}}`, encodeURIComponent(String(projectName)))
1340
- .replace(`{${"packageName"}}`, encodeURIComponent(String(packageName)))
1341
- .replace(`{${"path"}}`, encodeURIComponent(String(path)));
1841
+ .replace(`{${"packageName"}}`, encodeURIComponent(String(packageName)));
1342
1842
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
1343
1843
  const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
1344
1844
  let baseOptions;
@@ -1348,18 +1848,12 @@ const QueryresultsApiAxiosParamCreator = function (configuration) {
1348
1848
  const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options };
1349
1849
  const localVarHeaderParameter = {};
1350
1850
  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
1851
  if (versionId !== undefined) {
1361
1852
  localVarQueryParameter['versionId'] = versionId;
1362
1853
  }
1854
+ if (reload !== undefined) {
1855
+ localVarQueryParameter['reload'] = reload;
1856
+ }
1363
1857
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
1364
1858
  let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1365
1859
  localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
@@ -1368,114 +1862,682 @@ const QueryresultsApiAxiosParamCreator = function (configuration) {
1368
1862
  options: localVarRequestOptions,
1369
1863
  };
1370
1864
  },
1371
- };
1372
- };
1373
- exports.QueryresultsApiAxiosParamCreator = QueryresultsApiAxiosParamCreator;
1374
- /**
1375
- * QueryresultsApi - functional programming interface
1376
- * @export
1865
+ /**
1866
+ * Retrieves a list of all Malloy packages within the specified project. Each package contains models, notebooks, databases, and other resources. This endpoint is useful for discovering available packages and their basic metadata.
1867
+ * @summary List project packages
1868
+ * @param {string} projectName Name of the project
1869
+ * @param {*} [options] Override http request option.
1870
+ * @throws {RequiredError}
1871
+ */
1872
+ listPackages: async (projectName, options = {}) => {
1873
+ // verify required parameter 'projectName' is not null or undefined
1874
+ (0, common_1.assertParamExists)('listPackages', 'projectName', projectName);
1875
+ const localVarPath = `/projects/{projectName}/packages`
1876
+ .replace(`{${"projectName"}}`, encodeURIComponent(String(projectName)));
1877
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
1878
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
1879
+ let baseOptions;
1880
+ if (configuration) {
1881
+ baseOptions = configuration.baseOptions;
1882
+ }
1883
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options };
1884
+ const localVarHeaderParameter = {};
1885
+ const localVarQueryParameter = {};
1886
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
1887
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1888
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
1889
+ return {
1890
+ url: (0, common_1.toPathString)(localVarUrlObj),
1891
+ options: localVarRequestOptions,
1892
+ };
1893
+ },
1894
+ /**
1895
+ * Updates the configuration and metadata of an existing package. This allows you to modify package settings, update the description, change the location, or update other package-level properties. The package must exist and be accessible.
1896
+ * @summary Update package configuration
1897
+ * @param {string} projectName Name of the project
1898
+ * @param {string} packageName Name of the package
1899
+ * @param {Package} _package
1900
+ * @param {*} [options] Override http request option.
1901
+ * @throws {RequiredError}
1902
+ */
1903
+ updatePackage: async (projectName, packageName, _package, options = {}) => {
1904
+ // verify required parameter 'projectName' is not null or undefined
1905
+ (0, common_1.assertParamExists)('updatePackage', 'projectName', projectName);
1906
+ // verify required parameter 'packageName' is not null or undefined
1907
+ (0, common_1.assertParamExists)('updatePackage', 'packageName', packageName);
1908
+ // verify required parameter '_package' is not null or undefined
1909
+ (0, common_1.assertParamExists)('updatePackage', '_package', _package);
1910
+ const localVarPath = `/projects/{projectName}/packages/{packageName}`
1911
+ .replace(`{${"projectName"}}`, encodeURIComponent(String(projectName)))
1912
+ .replace(`{${"packageName"}}`, encodeURIComponent(String(packageName)));
1913
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
1914
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
1915
+ let baseOptions;
1916
+ if (configuration) {
1917
+ baseOptions = configuration.baseOptions;
1918
+ }
1919
+ const localVarRequestOptions = { method: 'PATCH', ...baseOptions, ...options };
1920
+ const localVarHeaderParameter = {};
1921
+ const localVarQueryParameter = {};
1922
+ localVarHeaderParameter['Content-Type'] = 'application/json';
1923
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
1924
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1925
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
1926
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(_package, localVarRequestOptions, configuration);
1927
+ return {
1928
+ url: (0, common_1.toPathString)(localVarUrlObj),
1929
+ options: localVarRequestOptions,
1930
+ };
1931
+ },
1932
+ };
1933
+ };
1934
+ exports.PackagesApiAxiosParamCreator = PackagesApiAxiosParamCreator;
1935
+ /**
1936
+ * PackagesApi - functional programming interface
1937
+ * @export
1938
+ */
1939
+ const PackagesApiFp = function (configuration) {
1940
+ const localVarAxiosParamCreator = (0, exports.PackagesApiAxiosParamCreator)(configuration);
1941
+ return {
1942
+ /**
1943
+ * Creates a new Malloy package within the specified project. A package serves as a container for models, notebooks, embedded databases, and other resources. The package will be initialized with the provided metadata and can immediately accept content.
1944
+ * @summary Create a new package
1945
+ * @param {string} projectName Name of the project
1946
+ * @param {Package} _package
1947
+ * @param {*} [options] Override http request option.
1948
+ * @throws {RequiredError}
1949
+ */
1950
+ async createPackage(projectName, _package, options) {
1951
+ var _a, _b, _c;
1952
+ const localVarAxiosArgs = await localVarAxiosParamCreator.createPackage(projectName, _package, options);
1953
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
1954
+ const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['PackagesApi.createPackage']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
1955
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1956
+ },
1957
+ /**
1958
+ * Permanently deletes a package and all its associated resources including models, notebooks, databases, and metadata. This operation cannot be undone, so use with caution. The package must exist and be accessible for deletion.
1959
+ * @summary Delete a package
1960
+ * @param {string} projectName Name of the project
1961
+ * @param {string} packageName Name of the package
1962
+ * @param {*} [options] Override http request option.
1963
+ * @throws {RequiredError}
1964
+ */
1965
+ async deletePackage(projectName, packageName, options) {
1966
+ var _a, _b, _c;
1967
+ const localVarAxiosArgs = await localVarAxiosParamCreator.deletePackage(projectName, packageName, options);
1968
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
1969
+ const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['PackagesApi.deletePackage']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
1970
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1971
+ },
1972
+ /**
1973
+ * Retrieves detailed information about a specific package, including its models, notebooks, databases, and metadata. The reload parameter can be used to refresh the package state from disk before returning the information. The versionId parameter allows access to specific package versions.
1974
+ * @summary Get package details and metadata
1975
+ * @param {string} projectName Name of the project
1976
+ * @param {string} packageName Package name
1977
+ * @param {string} [versionId] Version identifier for the package
1978
+ * @param {boolean} [reload] Load / reload the package before returning result
1979
+ * @param {*} [options] Override http request option.
1980
+ * @throws {RequiredError}
1981
+ */
1982
+ async getPackage(projectName, packageName, versionId, reload, options) {
1983
+ var _a, _b, _c;
1984
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getPackage(projectName, packageName, versionId, reload, options);
1985
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
1986
+ 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;
1987
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1988
+ },
1989
+ /**
1990
+ * Retrieves a list of all Malloy packages within the specified project. Each package contains models, notebooks, databases, and other resources. This endpoint is useful for discovering available packages and their basic metadata.
1991
+ * @summary List project packages
1992
+ * @param {string} projectName Name of the project
1993
+ * @param {*} [options] Override http request option.
1994
+ * @throws {RequiredError}
1995
+ */
1996
+ async listPackages(projectName, options) {
1997
+ var _a, _b, _c;
1998
+ const localVarAxiosArgs = await localVarAxiosParamCreator.listPackages(projectName, options);
1999
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
2000
+ 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;
2001
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
2002
+ },
2003
+ /**
2004
+ * Updates the configuration and metadata of an existing package. This allows you to modify package settings, update the description, change the location, or update other package-level properties. The package must exist and be accessible.
2005
+ * @summary Update package configuration
2006
+ * @param {string} projectName Name of the project
2007
+ * @param {string} packageName Name of the package
2008
+ * @param {Package} _package
2009
+ * @param {*} [options] Override http request option.
2010
+ * @throws {RequiredError}
2011
+ */
2012
+ async updatePackage(projectName, packageName, _package, options) {
2013
+ var _a, _b, _c;
2014
+ const localVarAxiosArgs = await localVarAxiosParamCreator.updatePackage(projectName, packageName, _package, options);
2015
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
2016
+ const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['PackagesApi.updatePackage']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
2017
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
2018
+ },
2019
+ };
2020
+ };
2021
+ exports.PackagesApiFp = PackagesApiFp;
2022
+ /**
2023
+ * PackagesApi - factory interface
2024
+ * @export
2025
+ */
2026
+ const PackagesApiFactory = function (configuration, basePath, axios) {
2027
+ const localVarFp = (0, exports.PackagesApiFp)(configuration);
2028
+ return {
2029
+ /**
2030
+ * Creates a new Malloy package within the specified project. A package serves as a container for models, notebooks, embedded databases, and other resources. The package will be initialized with the provided metadata and can immediately accept content.
2031
+ * @summary Create a new package
2032
+ * @param {string} projectName Name of the project
2033
+ * @param {Package} _package
2034
+ * @param {*} [options] Override http request option.
2035
+ * @throws {RequiredError}
2036
+ */
2037
+ createPackage(projectName, _package, options) {
2038
+ return localVarFp.createPackage(projectName, _package, options).then((request) => request(axios, basePath));
2039
+ },
2040
+ /**
2041
+ * Permanently deletes a package and all its associated resources including models, notebooks, databases, and metadata. This operation cannot be undone, so use with caution. The package must exist and be accessible for deletion.
2042
+ * @summary Delete a package
2043
+ * @param {string} projectName Name of the project
2044
+ * @param {string} packageName Name of the package
2045
+ * @param {*} [options] Override http request option.
2046
+ * @throws {RequiredError}
2047
+ */
2048
+ deletePackage(projectName, packageName, options) {
2049
+ return localVarFp.deletePackage(projectName, packageName, options).then((request) => request(axios, basePath));
2050
+ },
2051
+ /**
2052
+ * Retrieves detailed information about a specific package, including its models, notebooks, databases, and metadata. The reload parameter can be used to refresh the package state from disk before returning the information. The versionId parameter allows access to specific package versions.
2053
+ * @summary Get package details and metadata
2054
+ * @param {string} projectName Name of the project
2055
+ * @param {string} packageName Package name
2056
+ * @param {string} [versionId] Version identifier for the package
2057
+ * @param {boolean} [reload] Load / reload the package before returning result
2058
+ * @param {*} [options] Override http request option.
2059
+ * @throws {RequiredError}
2060
+ */
2061
+ getPackage(projectName, packageName, versionId, reload, options) {
2062
+ return localVarFp.getPackage(projectName, packageName, versionId, reload, options).then((request) => request(axios, basePath));
2063
+ },
2064
+ /**
2065
+ * Retrieves a list of all Malloy packages within the specified project. Each package contains models, notebooks, databases, and other resources. This endpoint is useful for discovering available packages and their basic metadata.
2066
+ * @summary List project packages
2067
+ * @param {string} projectName Name of the project
2068
+ * @param {*} [options] Override http request option.
2069
+ * @throws {RequiredError}
2070
+ */
2071
+ listPackages(projectName, options) {
2072
+ return localVarFp.listPackages(projectName, options).then((request) => request(axios, basePath));
2073
+ },
2074
+ /**
2075
+ * Updates the configuration and metadata of an existing package. This allows you to modify package settings, update the description, change the location, or update other package-level properties. The package must exist and be accessible.
2076
+ * @summary Update package configuration
2077
+ * @param {string} projectName Name of the project
2078
+ * @param {string} packageName Name of the package
2079
+ * @param {Package} _package
2080
+ * @param {*} [options] Override http request option.
2081
+ * @throws {RequiredError}
2082
+ */
2083
+ updatePackage(projectName, packageName, _package, options) {
2084
+ return localVarFp.updatePackage(projectName, packageName, _package, options).then((request) => request(axios, basePath));
2085
+ },
2086
+ };
2087
+ };
2088
+ exports.PackagesApiFactory = PackagesApiFactory;
2089
+ /**
2090
+ * PackagesApi - object-oriented interface
2091
+ * @export
2092
+ * @class PackagesApi
2093
+ * @extends {BaseAPI}
2094
+ */
2095
+ class PackagesApi extends base_1.BaseAPI {
2096
+ /**
2097
+ * Creates a new Malloy package within the specified project. A package serves as a container for models, notebooks, embedded databases, and other resources. The package will be initialized with the provided metadata and can immediately accept content.
2098
+ * @summary Create a new package
2099
+ * @param {string} projectName Name of the project
2100
+ * @param {Package} _package
2101
+ * @param {*} [options] Override http request option.
2102
+ * @throws {RequiredError}
2103
+ * @memberof PackagesApi
2104
+ */
2105
+ createPackage(projectName, _package, options) {
2106
+ return (0, exports.PackagesApiFp)(this.configuration).createPackage(projectName, _package, options).then((request) => request(this.axios, this.basePath));
2107
+ }
2108
+ /**
2109
+ * Permanently deletes a package and all its associated resources including models, notebooks, databases, and metadata. This operation cannot be undone, so use with caution. The package must exist and be accessible for deletion.
2110
+ * @summary Delete a package
2111
+ * @param {string} projectName Name of the project
2112
+ * @param {string} packageName Name of the package
2113
+ * @param {*} [options] Override http request option.
2114
+ * @throws {RequiredError}
2115
+ * @memberof PackagesApi
2116
+ */
2117
+ deletePackage(projectName, packageName, options) {
2118
+ return (0, exports.PackagesApiFp)(this.configuration).deletePackage(projectName, packageName, options).then((request) => request(this.axios, this.basePath));
2119
+ }
2120
+ /**
2121
+ * Retrieves detailed information about a specific package, including its models, notebooks, databases, and metadata. The reload parameter can be used to refresh the package state from disk before returning the information. The versionId parameter allows access to specific package versions.
2122
+ * @summary Get package details and metadata
2123
+ * @param {string} projectName Name of the project
2124
+ * @param {string} packageName Package name
2125
+ * @param {string} [versionId] Version identifier for the package
2126
+ * @param {boolean} [reload] Load / reload the package before returning result
2127
+ * @param {*} [options] Override http request option.
2128
+ * @throws {RequiredError}
2129
+ * @memberof PackagesApi
2130
+ */
2131
+ getPackage(projectName, packageName, versionId, reload, options) {
2132
+ return (0, exports.PackagesApiFp)(this.configuration).getPackage(projectName, packageName, versionId, reload, options).then((request) => request(this.axios, this.basePath));
2133
+ }
2134
+ /**
2135
+ * Retrieves a list of all Malloy packages within the specified project. Each package contains models, notebooks, databases, and other resources. This endpoint is useful for discovering available packages and their basic metadata.
2136
+ * @summary List project packages
2137
+ * @param {string} projectName Name of the project
2138
+ * @param {*} [options] Override http request option.
2139
+ * @throws {RequiredError}
2140
+ * @memberof PackagesApi
2141
+ */
2142
+ listPackages(projectName, options) {
2143
+ return (0, exports.PackagesApiFp)(this.configuration).listPackages(projectName, options).then((request) => request(this.axios, this.basePath));
2144
+ }
2145
+ /**
2146
+ * Updates the configuration and metadata of an existing package. This allows you to modify package settings, update the description, change the location, or update other package-level properties. The package must exist and be accessible.
2147
+ * @summary Update package configuration
2148
+ * @param {string} projectName Name of the project
2149
+ * @param {string} packageName Name of the package
2150
+ * @param {Package} _package
2151
+ * @param {*} [options] Override http request option.
2152
+ * @throws {RequiredError}
2153
+ * @memberof PackagesApi
2154
+ */
2155
+ updatePackage(projectName, packageName, _package, options) {
2156
+ return (0, exports.PackagesApiFp)(this.configuration).updatePackage(projectName, packageName, _package, options).then((request) => request(this.axios, this.basePath));
2157
+ }
2158
+ }
2159
+ exports.PackagesApi = PackagesApi;
2160
+ /**
2161
+ * ProjectsApi - axios parameter creator
2162
+ * @export
2163
+ */
2164
+ const ProjectsApiAxiosParamCreator = function (configuration) {
2165
+ return {
2166
+ /**
2167
+ * Creates a new Malloy project with the specified configuration. A project serves as a container for packages, connections, and other resources. The project will be initialized with the provided metadata and can immediately accept packages and connections.
2168
+ * @summary Create a new project
2169
+ * @param {Project} project
2170
+ * @param {*} [options] Override http request option.
2171
+ * @throws {RequiredError}
2172
+ */
2173
+ createProject: async (project, options = {}) => {
2174
+ // verify required parameter 'project' is not null or undefined
2175
+ (0, common_1.assertParamExists)('createProject', 'project', project);
2176
+ const localVarPath = `/projects`;
2177
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
2178
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
2179
+ let baseOptions;
2180
+ if (configuration) {
2181
+ baseOptions = configuration.baseOptions;
2182
+ }
2183
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options };
2184
+ const localVarHeaderParameter = {};
2185
+ const localVarQueryParameter = {};
2186
+ localVarHeaderParameter['Content-Type'] = 'application/json';
2187
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
2188
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
2189
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
2190
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(project, localVarRequestOptions, configuration);
2191
+ return {
2192
+ url: (0, common_1.toPathString)(localVarUrlObj),
2193
+ options: localVarRequestOptions,
2194
+ };
2195
+ },
2196
+ /**
2197
+ * Permanently deletes a project and all its associated resources including packages, connections, and metadata. This operation cannot be undone, so use with caution. The project must exist and be accessible for deletion.
2198
+ * @summary Delete a project
2199
+ * @param {string} projectName Name of the project
2200
+ * @param {*} [options] Override http request option.
2201
+ * @throws {RequiredError}
2202
+ */
2203
+ deleteProject: async (projectName, options = {}) => {
2204
+ // verify required parameter 'projectName' is not null or undefined
2205
+ (0, common_1.assertParamExists)('deleteProject', 'projectName', projectName);
2206
+ const localVarPath = `/projects/{projectName}`
2207
+ .replace(`{${"projectName"}}`, encodeURIComponent(String(projectName)));
2208
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
2209
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
2210
+ let baseOptions;
2211
+ if (configuration) {
2212
+ baseOptions = configuration.baseOptions;
2213
+ }
2214
+ const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options };
2215
+ const localVarHeaderParameter = {};
2216
+ const localVarQueryParameter = {};
2217
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
2218
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
2219
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
2220
+ return {
2221
+ url: (0, common_1.toPathString)(localVarUrlObj),
2222
+ options: localVarRequestOptions,
2223
+ };
2224
+ },
2225
+ /**
2226
+ * Retrieves detailed information about a specific project, including its packages, connections, configuration, and metadata. The reload parameter can be used to refresh the project state from disk before returning the information.
2227
+ * @summary Get project details and metadata
2228
+ * @param {string} projectName Name of the project
2229
+ * @param {boolean} [reload] Load / reload the project before returning result
2230
+ * @param {*} [options] Override http request option.
2231
+ * @throws {RequiredError}
2232
+ */
2233
+ getProject: async (projectName, reload, options = {}) => {
2234
+ // verify required parameter 'projectName' is not null or undefined
2235
+ (0, common_1.assertParamExists)('getProject', 'projectName', projectName);
2236
+ const localVarPath = `/projects/{projectName}`
2237
+ .replace(`{${"projectName"}}`, encodeURIComponent(String(projectName)));
2238
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
2239
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
2240
+ let baseOptions;
2241
+ if (configuration) {
2242
+ baseOptions = configuration.baseOptions;
2243
+ }
2244
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options };
2245
+ const localVarHeaderParameter = {};
2246
+ const localVarQueryParameter = {};
2247
+ if (reload !== undefined) {
2248
+ localVarQueryParameter['reload'] = reload;
2249
+ }
2250
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
2251
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
2252
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
2253
+ return {
2254
+ url: (0, common_1.toPathString)(localVarUrlObj),
2255
+ options: localVarRequestOptions,
2256
+ };
2257
+ },
2258
+ /**
2259
+ * Retrieves a list of all projects currently hosted on this Malloy Publisher server. Each project contains metadata about its packages, connections, and configuration. This endpoint is typically used to discover available projects and their basic information.
2260
+ * @summary List all available projects
2261
+ * @param {*} [options] Override http request option.
2262
+ * @throws {RequiredError}
2263
+ */
2264
+ listProjects: async (options = {}) => {
2265
+ const localVarPath = `/projects`;
2266
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
2267
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
2268
+ let baseOptions;
2269
+ if (configuration) {
2270
+ baseOptions = configuration.baseOptions;
2271
+ }
2272
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options };
2273
+ const localVarHeaderParameter = {};
2274
+ const localVarQueryParameter = {};
2275
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
2276
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
2277
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
2278
+ return {
2279
+ url: (0, common_1.toPathString)(localVarUrlObj),
2280
+ options: localVarRequestOptions,
2281
+ };
2282
+ },
2283
+ /**
2284
+ * Updates the configuration and metadata of an existing project. This allows you to modify project settings, update the README, change the location, or update other project-level properties. The project must exist and be accessible.
2285
+ * @summary Update project configuration
2286
+ * @param {string} projectName Name of the project
2287
+ * @param {Project} project
2288
+ * @param {*} [options] Override http request option.
2289
+ * @throws {RequiredError}
2290
+ */
2291
+ updateProject: async (projectName, project, options = {}) => {
2292
+ // verify required parameter 'projectName' is not null or undefined
2293
+ (0, common_1.assertParamExists)('updateProject', 'projectName', projectName);
2294
+ // verify required parameter 'project' is not null or undefined
2295
+ (0, common_1.assertParamExists)('updateProject', 'project', project);
2296
+ const localVarPath = `/projects/{projectName}`
2297
+ .replace(`{${"projectName"}}`, encodeURIComponent(String(projectName)));
2298
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
2299
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
2300
+ let baseOptions;
2301
+ if (configuration) {
2302
+ baseOptions = configuration.baseOptions;
2303
+ }
2304
+ const localVarRequestOptions = { method: 'PATCH', ...baseOptions, ...options };
2305
+ const localVarHeaderParameter = {};
2306
+ const localVarQueryParameter = {};
2307
+ localVarHeaderParameter['Content-Type'] = 'application/json';
2308
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
2309
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
2310
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
2311
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(project, localVarRequestOptions, configuration);
2312
+ return {
2313
+ url: (0, common_1.toPathString)(localVarUrlObj),
2314
+ options: localVarRequestOptions,
2315
+ };
2316
+ },
2317
+ };
2318
+ };
2319
+ exports.ProjectsApiAxiosParamCreator = ProjectsApiAxiosParamCreator;
2320
+ /**
2321
+ * ProjectsApi - functional programming interface
2322
+ * @export
1377
2323
  */
1378
- const QueryresultsApiFp = function (configuration) {
1379
- const localVarAxiosParamCreator = (0, exports.QueryresultsApiAxiosParamCreator)(configuration);
2324
+ const ProjectsApiFp = function (configuration) {
2325
+ const localVarAxiosParamCreator = (0, exports.ProjectsApiAxiosParamCreator)(configuration);
1380
2326
  return {
1381
2327
  /**
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
2328
+ * Creates a new Malloy project with the specified configuration. A project serves as a container for packages, connections, and other resources. The project will be initialized with the provided metadata and can immediately accept packages and connections.
2329
+ * @summary Create a new project
2330
+ * @param {Project} project
2331
+ * @param {*} [options] Override http request option.
2332
+ * @throws {RequiredError}
2333
+ */
2334
+ async createProject(project, options) {
2335
+ var _a, _b, _c;
2336
+ const localVarAxiosArgs = await localVarAxiosParamCreator.createProject(project, options);
2337
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
2338
+ const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['ProjectsApi.createProject']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
2339
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
2340
+ },
2341
+ /**
2342
+ * Permanently deletes a project and all its associated resources including packages, connections, and metadata. This operation cannot be undone, so use with caution. The project must exist and be accessible for deletion.
2343
+ * @summary Delete a project
2344
+ * @param {string} projectName Name of the project
2345
+ * @param {*} [options] Override http request option.
2346
+ * @throws {RequiredError}
2347
+ */
2348
+ async deleteProject(projectName, options) {
2349
+ var _a, _b, _c;
2350
+ const localVarAxiosArgs = await localVarAxiosParamCreator.deleteProject(projectName, options);
2351
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
2352
+ const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['ProjectsApi.deleteProject']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
2353
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
2354
+ },
2355
+ /**
2356
+ * Retrieves detailed information about a specific project, including its packages, connections, configuration, and metadata. The reload parameter can be used to refresh the project state from disk before returning the information.
2357
+ * @summary Get project details and metadata
2358
+ * @param {string} projectName Name of the project
2359
+ * @param {boolean} [reload] Load / reload the project before returning result
2360
+ * @param {*} [options] Override http request option.
2361
+ * @throws {RequiredError}
2362
+ */
2363
+ async getProject(projectName, reload, options) {
2364
+ var _a, _b, _c;
2365
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getProject(projectName, reload, options);
2366
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
2367
+ const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['ProjectsApi.getProject']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
2368
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
2369
+ },
2370
+ /**
2371
+ * Retrieves a list of all projects currently hosted on this Malloy Publisher server. Each project contains metadata about its packages, connections, and configuration. This endpoint is typically used to discover available projects and their basic information.
2372
+ * @summary List all available projects
2373
+ * @param {*} [options] Override http request option.
2374
+ * @throws {RequiredError}
2375
+ */
2376
+ async listProjects(options) {
2377
+ var _a, _b, _c;
2378
+ const localVarAxiosArgs = await localVarAxiosParamCreator.listProjects(options);
2379
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
2380
+ 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;
2381
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
2382
+ },
2383
+ /**
2384
+ * Updates the configuration and metadata of an existing project. This allows you to modify project settings, update the README, change the location, or update other project-level properties. The project must exist and be accessible.
2385
+ * @summary Update project configuration
2386
+ * @param {string} projectName Name of the project
2387
+ * @param {Project} project
1391
2388
  * @param {*} [options] Override http request option.
1392
2389
  * @throws {RequiredError}
1393
2390
  */
1394
- async executeQuery(projectName, packageName, path, query, sourceName, queryName, versionId, options) {
2391
+ async updateProject(projectName, project, options) {
1395
2392
  var _a, _b, _c;
1396
- const localVarAxiosArgs = await localVarAxiosParamCreator.executeQuery(projectName, packageName, path, query, sourceName, queryName, versionId, options);
2393
+ const localVarAxiosArgs = await localVarAxiosParamCreator.updateProject(projectName, project, options);
1397
2394
  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;
2395
+ const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['ProjectsApi.updateProject']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
1399
2396
  return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1400
2397
  },
1401
2398
  };
1402
2399
  };
1403
- exports.QueryresultsApiFp = QueryresultsApiFp;
2400
+ exports.ProjectsApiFp = ProjectsApiFp;
1404
2401
  /**
1405
- * QueryresultsApi - factory interface
2402
+ * ProjectsApi - factory interface
1406
2403
  * @export
1407
2404
  */
1408
- const QueryresultsApiFactory = function (configuration, basePath, axios) {
1409
- const localVarFp = (0, exports.QueryresultsApiFp)(configuration);
2405
+ const ProjectsApiFactory = function (configuration, basePath, axios) {
2406
+ const localVarFp = (0, exports.ProjectsApiFp)(configuration);
1410
2407
  return {
1411
2408
  /**
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
2409
+ * Creates a new Malloy project with the specified configuration. A project serves as a container for packages, connections, and other resources. The project will be initialized with the provided metadata and can immediately accept packages and connections.
2410
+ * @summary Create a new project
2411
+ * @param {Project} project
2412
+ * @param {*} [options] Override http request option.
2413
+ * @throws {RequiredError}
2414
+ */
2415
+ createProject(project, options) {
2416
+ return localVarFp.createProject(project, options).then((request) => request(axios, basePath));
2417
+ },
2418
+ /**
2419
+ * Permanently deletes a project and all its associated resources including packages, connections, and metadata. This operation cannot be undone, so use with caution. The project must exist and be accessible for deletion.
2420
+ * @summary Delete a project
2421
+ * @param {string} projectName Name of the project
1421
2422
  * @param {*} [options] Override http request option.
1422
2423
  * @throws {RequiredError}
1423
2424
  */
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));
2425
+ deleteProject(projectName, options) {
2426
+ return localVarFp.deleteProject(projectName, options).then((request) => request(axios, basePath));
2427
+ },
2428
+ /**
2429
+ * Retrieves detailed information about a specific project, including its packages, connections, configuration, and metadata. The reload parameter can be used to refresh the project state from disk before returning the information.
2430
+ * @summary Get project details and metadata
2431
+ * @param {string} projectName Name of the project
2432
+ * @param {boolean} [reload] Load / reload the project before returning result
2433
+ * @param {*} [options] Override http request option.
2434
+ * @throws {RequiredError}
2435
+ */
2436
+ getProject(projectName, reload, options) {
2437
+ return localVarFp.getProject(projectName, reload, options).then((request) => request(axios, basePath));
2438
+ },
2439
+ /**
2440
+ * Retrieves a list of all projects currently hosted on this Malloy Publisher server. Each project contains metadata about its packages, connections, and configuration. This endpoint is typically used to discover available projects and their basic information.
2441
+ * @summary List all available projects
2442
+ * @param {*} [options] Override http request option.
2443
+ * @throws {RequiredError}
2444
+ */
2445
+ listProjects(options) {
2446
+ return localVarFp.listProjects(options).then((request) => request(axios, basePath));
2447
+ },
2448
+ /**
2449
+ * Updates the configuration and metadata of an existing project. This allows you to modify project settings, update the README, change the location, or update other project-level properties. The project must exist and be accessible.
2450
+ * @summary Update project configuration
2451
+ * @param {string} projectName Name of the project
2452
+ * @param {Project} project
2453
+ * @param {*} [options] Override http request option.
2454
+ * @throws {RequiredError}
2455
+ */
2456
+ updateProject(projectName, project, options) {
2457
+ return localVarFp.updateProject(projectName, project, options).then((request) => request(axios, basePath));
1426
2458
  },
1427
2459
  };
1428
2460
  };
1429
- exports.QueryresultsApiFactory = QueryresultsApiFactory;
2461
+ exports.ProjectsApiFactory = ProjectsApiFactory;
1430
2462
  /**
1431
- * QueryresultsApi - object-oriented interface
2463
+ * ProjectsApi - object-oriented interface
1432
2464
  * @export
1433
- * @class QueryresultsApi
2465
+ * @class ProjectsApi
1434
2466
  * @extends {BaseAPI}
1435
2467
  */
1436
- class QueryresultsApi extends base_1.BaseAPI {
2468
+ class ProjectsApi extends base_1.BaseAPI {
2469
+ /**
2470
+ * Creates a new Malloy project with the specified configuration. A project serves as a container for packages, connections, and other resources. The project will be initialized with the provided metadata and can immediately accept packages and connections.
2471
+ * @summary Create a new project
2472
+ * @param {Project} project
2473
+ * @param {*} [options] Override http request option.
2474
+ * @throws {RequiredError}
2475
+ * @memberof ProjectsApi
2476
+ */
2477
+ createProject(project, options) {
2478
+ return (0, exports.ProjectsApiFp)(this.configuration).createProject(project, options).then((request) => request(this.axios, this.basePath));
2479
+ }
2480
+ /**
2481
+ * Permanently deletes a project and all its associated resources including packages, connections, and metadata. This operation cannot be undone, so use with caution. The project must exist and be accessible for deletion.
2482
+ * @summary Delete a project
2483
+ * @param {string} projectName Name of the project
2484
+ * @param {*} [options] Override http request option.
2485
+ * @throws {RequiredError}
2486
+ * @memberof ProjectsApi
2487
+ */
2488
+ deleteProject(projectName, options) {
2489
+ return (0, exports.ProjectsApiFp)(this.configuration).deleteProject(projectName, options).then((request) => request(this.axios, this.basePath));
2490
+ }
2491
+ /**
2492
+ * Retrieves detailed information about a specific project, including its packages, connections, configuration, and metadata. The reload parameter can be used to refresh the project state from disk before returning the information.
2493
+ * @summary Get project details and metadata
2494
+ * @param {string} projectName Name of the project
2495
+ * @param {boolean} [reload] Load / reload the project before returning result
2496
+ * @param {*} [options] Override http request option.
2497
+ * @throws {RequiredError}
2498
+ * @memberof ProjectsApi
2499
+ */
2500
+ getProject(projectName, reload, options) {
2501
+ return (0, exports.ProjectsApiFp)(this.configuration).getProject(projectName, reload, options).then((request) => request(this.axios, this.basePath));
2502
+ }
2503
+ /**
2504
+ * Retrieves a list of all projects currently hosted on this Malloy Publisher server. Each project contains metadata about its packages, connections, and configuration. This endpoint is typically used to discover available projects and their basic information.
2505
+ * @summary List all available projects
2506
+ * @param {*} [options] Override http request option.
2507
+ * @throws {RequiredError}
2508
+ * @memberof ProjectsApi
2509
+ */
2510
+ listProjects(options) {
2511
+ return (0, exports.ProjectsApiFp)(this.configuration).listProjects(options).then((request) => request(this.axios, this.basePath));
2512
+ }
1437
2513
  /**
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
2514
+ * Updates the configuration and metadata of an existing project. This allows you to modify project settings, update the README, change the location, or update other project-level properties. The project must exist and be accessible.
2515
+ * @summary Update project configuration
2516
+ * @param {string} projectName Name of the project
2517
+ * @param {Project} project
1447
2518
  * @param {*} [options] Override http request option.
1448
2519
  * @throws {RequiredError}
1449
- * @memberof QueryresultsApi
2520
+ * @memberof ProjectsApi
1450
2521
  */
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));
2522
+ updateProject(projectName, project, options) {
2523
+ return (0, exports.ProjectsApiFp)(this.configuration).updateProject(projectName, project, options).then((request) => request(this.axios, this.basePath));
1453
2524
  }
1454
2525
  }
1455
- exports.QueryresultsApi = QueryresultsApi;
2526
+ exports.ProjectsApi = ProjectsApi;
1456
2527
  /**
1457
- * SchedulesApi - axios parameter creator
2528
+ * PublisherApi - axios parameter creator
1458
2529
  * @export
1459
2530
  */
1460
- const SchedulesApiAxiosParamCreator = function (configuration) {
2531
+ const PublisherApiAxiosParamCreator = function (configuration) {
1461
2532
  return {
1462
2533
  /**
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
2534
+ * Returns the current status of the Malloy Publisher server, including initialization state, available projects, and server timestamp. This endpoint is useful for health checks and monitoring server availability.
2535
+ * @summary Get server status and health information
1468
2536
  * @param {*} [options] Override http request option.
1469
2537
  * @throws {RequiredError}
1470
2538
  */
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)));
2539
+ getStatus: async (options = {}) => {
2540
+ const localVarPath = `/status`;
1479
2541
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
1480
2542
  const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
1481
2543
  let baseOptions;
@@ -1485,9 +2547,156 @@ const SchedulesApiAxiosParamCreator = function (configuration) {
1485
2547
  const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options };
1486
2548
  const localVarHeaderParameter = {};
1487
2549
  const localVarQueryParameter = {};
1488
- if (versionId !== undefined) {
1489
- localVarQueryParameter['versionId'] = versionId;
2550
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
2551
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
2552
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
2553
+ return {
2554
+ url: (0, common_1.toPathString)(localVarUrlObj),
2555
+ options: localVarRequestOptions,
2556
+ };
2557
+ },
2558
+ };
2559
+ };
2560
+ exports.PublisherApiAxiosParamCreator = PublisherApiAxiosParamCreator;
2561
+ /**
2562
+ * PublisherApi - functional programming interface
2563
+ * @export
2564
+ */
2565
+ const PublisherApiFp = function (configuration) {
2566
+ const localVarAxiosParamCreator = (0, exports.PublisherApiAxiosParamCreator)(configuration);
2567
+ return {
2568
+ /**
2569
+ * Returns the current status of the Malloy Publisher server, including initialization state, available projects, and server timestamp. This endpoint is useful for health checks and monitoring server availability.
2570
+ * @summary Get server status and health information
2571
+ * @param {*} [options] Override http request option.
2572
+ * @throws {RequiredError}
2573
+ */
2574
+ async getStatus(options) {
2575
+ var _a, _b, _c;
2576
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getStatus(options);
2577
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
2578
+ const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['PublisherApi.getStatus']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
2579
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
2580
+ },
2581
+ };
2582
+ };
2583
+ exports.PublisherApiFp = PublisherApiFp;
2584
+ /**
2585
+ * PublisherApi - factory interface
2586
+ * @export
2587
+ */
2588
+ const PublisherApiFactory = function (configuration, basePath, axios) {
2589
+ const localVarFp = (0, exports.PublisherApiFp)(configuration);
2590
+ return {
2591
+ /**
2592
+ * Returns the current status of the Malloy Publisher server, including initialization state, available projects, and server timestamp. This endpoint is useful for health checks and monitoring server availability.
2593
+ * @summary Get server status and health information
2594
+ * @param {*} [options] Override http request option.
2595
+ * @throws {RequiredError}
2596
+ */
2597
+ getStatus(options) {
2598
+ return localVarFp.getStatus(options).then((request) => request(axios, basePath));
2599
+ },
2600
+ };
2601
+ };
2602
+ exports.PublisherApiFactory = PublisherApiFactory;
2603
+ /**
2604
+ * PublisherApi - object-oriented interface
2605
+ * @export
2606
+ * @class PublisherApi
2607
+ * @extends {BaseAPI}
2608
+ */
2609
+ class PublisherApi extends base_1.BaseAPI {
2610
+ /**
2611
+ * Returns the current status of the Malloy Publisher server, including initialization state, available projects, and server timestamp. This endpoint is useful for health checks and monitoring server availability.
2612
+ * @summary Get server status and health information
2613
+ * @param {*} [options] Override http request option.
2614
+ * @throws {RequiredError}
2615
+ * @memberof PublisherApi
2616
+ */
2617
+ getStatus(options) {
2618
+ return (0, exports.PublisherApiFp)(this.configuration).getStatus(options).then((request) => request(this.axios, this.basePath));
2619
+ }
2620
+ }
2621
+ exports.PublisherApi = PublisherApi;
2622
+ /**
2623
+ * WatchModeApi - axios parameter creator
2624
+ * @export
2625
+ */
2626
+ const WatchModeApiAxiosParamCreator = function (configuration) {
2627
+ return {
2628
+ /**
2629
+ * Retrieves the current status of the file watching system. This includes whether watch mode is enabled, which project is being watched, and the path being monitored. Useful for monitoring the development workflow and ensuring file changes are being detected.
2630
+ * @summary Get watch mode status
2631
+ * @param {*} [options] Override http request option.
2632
+ * @throws {RequiredError}
2633
+ */
2634
+ getWatchStatus: async (options = {}) => {
2635
+ const localVarPath = `/watch-mode/status`;
2636
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
2637
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
2638
+ let baseOptions;
2639
+ if (configuration) {
2640
+ baseOptions = configuration.baseOptions;
2641
+ }
2642
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options };
2643
+ const localVarHeaderParameter = {};
2644
+ const localVarQueryParameter = {};
2645
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
2646
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
2647
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
2648
+ return {
2649
+ url: (0, common_1.toPathString)(localVarUrlObj),
2650
+ options: localVarRequestOptions,
2651
+ };
2652
+ },
2653
+ /**
2654
+ * Initiates file watching for the specified project. This enables real-time monitoring of file changes within the project directory, allowing for automatic reloading and updates during development. Only one project can be watched at a time.
2655
+ * @summary Start file watching
2656
+ * @param {StartWatchRequest} startWatchRequest
2657
+ * @param {*} [options] Override http request option.
2658
+ * @throws {RequiredError}
2659
+ */
2660
+ startWatching: async (startWatchRequest, options = {}) => {
2661
+ // verify required parameter 'startWatchRequest' is not null or undefined
2662
+ (0, common_1.assertParamExists)('startWatching', 'startWatchRequest', startWatchRequest);
2663
+ const localVarPath = `/watch-mode/start`;
2664
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
2665
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
2666
+ let baseOptions;
2667
+ if (configuration) {
2668
+ baseOptions = configuration.baseOptions;
2669
+ }
2670
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options };
2671
+ const localVarHeaderParameter = {};
2672
+ const localVarQueryParameter = {};
2673
+ localVarHeaderParameter['Content-Type'] = 'application/json';
2674
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
2675
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
2676
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
2677
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(startWatchRequest, localVarRequestOptions, configuration);
2678
+ return {
2679
+ url: (0, common_1.toPathString)(localVarUrlObj),
2680
+ options: localVarRequestOptions,
2681
+ };
2682
+ },
2683
+ /**
2684
+ * Stops the current file watching session. This disables real-time monitoring of file changes and releases system resources. Use this when development is complete or when switching to a different project.
2685
+ * @summary Stop file watching
2686
+ * @param {*} [options] Override http request option.
2687
+ * @throws {RequiredError}
2688
+ */
2689
+ stopWatching: async (options = {}) => {
2690
+ const localVarPath = `/watch-mode/stop`;
2691
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
2692
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
2693
+ let baseOptions;
2694
+ if (configuration) {
2695
+ baseOptions = configuration.baseOptions;
1490
2696
  }
2697
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options };
2698
+ const localVarHeaderParameter = {};
2699
+ const localVarQueryParameter = {};
1491
2700
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
1492
2701
  let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1493
2702
  localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
@@ -1498,75 +2707,133 @@ const SchedulesApiAxiosParamCreator = function (configuration) {
1498
2707
  },
1499
2708
  };
1500
2709
  };
1501
- exports.SchedulesApiAxiosParamCreator = SchedulesApiAxiosParamCreator;
2710
+ exports.WatchModeApiAxiosParamCreator = WatchModeApiAxiosParamCreator;
1502
2711
  /**
1503
- * SchedulesApi - functional programming interface
2712
+ * WatchModeApi - functional programming interface
1504
2713
  * @export
1505
2714
  */
1506
- const SchedulesApiFp = function (configuration) {
1507
- const localVarAxiosParamCreator = (0, exports.SchedulesApiAxiosParamCreator)(configuration);
2715
+ const WatchModeApiFp = function (configuration) {
2716
+ const localVarAxiosParamCreator = (0, exports.WatchModeApiAxiosParamCreator)(configuration);
1508
2717
  return {
1509
2718
  /**
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
2719
+ * Retrieves the current status of the file watching system. This includes whether watch mode is enabled, which project is being watched, and the path being monitored. Useful for monitoring the development workflow and ensuring file changes are being detected.
2720
+ * @summary Get watch mode status
2721
+ * @param {*} [options] Override http request option.
2722
+ * @throws {RequiredError}
2723
+ */
2724
+ async getWatchStatus(options) {
2725
+ var _a, _b, _c;
2726
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getWatchStatus(options);
2727
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
2728
+ const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['WatchModeApi.getWatchStatus']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
2729
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
2730
+ },
2731
+ /**
2732
+ * Initiates file watching for the specified project. This enables real-time monitoring of file changes within the project directory, allowing for automatic reloading and updates during development. Only one project can be watched at a time.
2733
+ * @summary Start file watching
2734
+ * @param {StartWatchRequest} startWatchRequest
2735
+ * @param {*} [options] Override http request option.
2736
+ * @throws {RequiredError}
2737
+ */
2738
+ async startWatching(startWatchRequest, options) {
2739
+ var _a, _b, _c;
2740
+ const localVarAxiosArgs = await localVarAxiosParamCreator.startWatching(startWatchRequest, options);
2741
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
2742
+ const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['WatchModeApi.startWatching']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
2743
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
2744
+ },
2745
+ /**
2746
+ * Stops the current file watching session. This disables real-time monitoring of file changes and releases system resources. Use this when development is complete or when switching to a different project.
2747
+ * @summary Stop file watching
1515
2748
  * @param {*} [options] Override http request option.
1516
2749
  * @throws {RequiredError}
1517
2750
  */
1518
- async listSchedules(projectName, packageName, versionId, options) {
2751
+ async stopWatching(options) {
1519
2752
  var _a, _b, _c;
1520
- const localVarAxiosArgs = await localVarAxiosParamCreator.listSchedules(projectName, packageName, versionId, options);
2753
+ const localVarAxiosArgs = await localVarAxiosParamCreator.stopWatching(options);
1521
2754
  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;
2755
+ const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['WatchModeApi.stopWatching']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
1523
2756
  return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1524
2757
  },
1525
2758
  };
1526
2759
  };
1527
- exports.SchedulesApiFp = SchedulesApiFp;
2760
+ exports.WatchModeApiFp = WatchModeApiFp;
1528
2761
  /**
1529
- * SchedulesApi - factory interface
2762
+ * WatchModeApi - factory interface
1530
2763
  * @export
1531
2764
  */
1532
- const SchedulesApiFactory = function (configuration, basePath, axios) {
1533
- const localVarFp = (0, exports.SchedulesApiFp)(configuration);
2765
+ const WatchModeApiFactory = function (configuration, basePath, axios) {
2766
+ const localVarFp = (0, exports.WatchModeApiFp)(configuration);
1534
2767
  return {
1535
2768
  /**
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
2769
+ * Retrieves the current status of the file watching system. This includes whether watch mode is enabled, which project is being watched, and the path being monitored. Useful for monitoring the development workflow and ensuring file changes are being detected.
2770
+ * @summary Get watch mode status
2771
+ * @param {*} [options] Override http request option.
2772
+ * @throws {RequiredError}
2773
+ */
2774
+ getWatchStatus(options) {
2775
+ return localVarFp.getWatchStatus(options).then((request) => request(axios, basePath));
2776
+ },
2777
+ /**
2778
+ * Initiates file watching for the specified project. This enables real-time monitoring of file changes within the project directory, allowing for automatic reloading and updates during development. Only one project can be watched at a time.
2779
+ * @summary Start file watching
2780
+ * @param {StartWatchRequest} startWatchRequest
2781
+ * @param {*} [options] Override http request option.
2782
+ * @throws {RequiredError}
2783
+ */
2784
+ startWatching(startWatchRequest, options) {
2785
+ return localVarFp.startWatching(startWatchRequest, options).then((request) => request(axios, basePath));
2786
+ },
2787
+ /**
2788
+ * Stops the current file watching session. This disables real-time monitoring of file changes and releases system resources. Use this when development is complete or when switching to a different project.
2789
+ * @summary Stop file watching
1541
2790
  * @param {*} [options] Override http request option.
1542
2791
  * @throws {RequiredError}
1543
2792
  */
1544
- listSchedules(projectName, packageName, versionId, options) {
1545
- return localVarFp.listSchedules(projectName, packageName, versionId, options).then((request) => request(axios, basePath));
2793
+ stopWatching(options) {
2794
+ return localVarFp.stopWatching(options).then((request) => request(axios, basePath));
1546
2795
  },
1547
2796
  };
1548
2797
  };
1549
- exports.SchedulesApiFactory = SchedulesApiFactory;
2798
+ exports.WatchModeApiFactory = WatchModeApiFactory;
1550
2799
  /**
1551
- * SchedulesApi - object-oriented interface
2800
+ * WatchModeApi - object-oriented interface
1552
2801
  * @export
1553
- * @class SchedulesApi
2802
+ * @class WatchModeApi
1554
2803
  * @extends {BaseAPI}
1555
2804
  */
1556
- class SchedulesApi extends base_1.BaseAPI {
2805
+ class WatchModeApi extends base_1.BaseAPI {
2806
+ /**
2807
+ * Retrieves the current status of the file watching system. This includes whether watch mode is enabled, which project is being watched, and the path being monitored. Useful for monitoring the development workflow and ensuring file changes are being detected.
2808
+ * @summary Get watch mode status
2809
+ * @param {*} [options] Override http request option.
2810
+ * @throws {RequiredError}
2811
+ * @memberof WatchModeApi
2812
+ */
2813
+ getWatchStatus(options) {
2814
+ return (0, exports.WatchModeApiFp)(this.configuration).getWatchStatus(options).then((request) => request(this.axios, this.basePath));
2815
+ }
2816
+ /**
2817
+ * Initiates file watching for the specified project. This enables real-time monitoring of file changes within the project directory, allowing for automatic reloading and updates during development. Only one project can be watched at a time.
2818
+ * @summary Start file watching
2819
+ * @param {StartWatchRequest} startWatchRequest
2820
+ * @param {*} [options] Override http request option.
2821
+ * @throws {RequiredError}
2822
+ * @memberof WatchModeApi
2823
+ */
2824
+ startWatching(startWatchRequest, options) {
2825
+ return (0, exports.WatchModeApiFp)(this.configuration).startWatching(startWatchRequest, options).then((request) => request(this.axios, this.basePath));
2826
+ }
1557
2827
  /**
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
2828
+ * Stops the current file watching session. This disables real-time monitoring of file changes and releases system resources. Use this when development is complete or when switching to a different project.
2829
+ * @summary Stop file watching
1563
2830
  * @param {*} [options] Override http request option.
1564
2831
  * @throws {RequiredError}
1565
- * @memberof SchedulesApi
2832
+ * @memberof WatchModeApi
1566
2833
  */
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));
2834
+ stopWatching(options) {
2835
+ return (0, exports.WatchModeApiFp)(this.configuration).stopWatching(options).then((request) => request(this.axios, this.basePath));
1569
2836
  }
1570
2837
  }
1571
- exports.SchedulesApi = SchedulesApi;
2838
+ exports.WatchModeApi = WatchModeApi;
1572
2839
  //# sourceMappingURL=api.js.map