@malloydata/db-publisher 0.0.270-dev250429163414

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (40) hide show
  1. package/dist/client/api.d.ts +1537 -0
  2. package/dist/client/api.js +1572 -0
  3. package/dist/client/api.js.map +1 -0
  4. package/dist/client/base.d.ts +66 -0
  5. package/dist/client/base.js +69 -0
  6. package/dist/client/base.js.map +1 -0
  7. package/dist/client/common.d.ts +65 -0
  8. package/dist/client/common.js +147 -0
  9. package/dist/client/common.js.map +1 -0
  10. package/dist/client/configuration.d.ts +91 -0
  11. package/dist/client/configuration.js +50 -0
  12. package/dist/client/configuration.js.map +1 -0
  13. package/dist/client/index.d.ts +15 -0
  14. package/dist/client/index.js +32 -0
  15. package/dist/client/index.js.map +1 -0
  16. package/dist/index.d.ts +1 -0
  17. package/dist/index.js +12 -0
  18. package/dist/index.js.map +1 -0
  19. package/dist/publisher_connection.d.ts +29 -0
  20. package/dist/publisher_connection.js +119 -0
  21. package/dist/publisher_connection.js.map +1 -0
  22. package/dist/publisher_connection.spec.d.ts +1 -0
  23. package/dist/publisher_connection.spec.js +806 -0
  24. package/dist/publisher_connection.spec.js.map +1 -0
  25. package/openapitools.json +7 -0
  26. package/package.json +32 -0
  27. package/publisher-api-doc.yaml +1026 -0
  28. package/src/client/.openapi-generator/FILES +9 -0
  29. package/src/client/.openapi-generator/VERSION +1 -0
  30. package/src/client/.openapi-generator-ignore +23 -0
  31. package/src/client/api.ts +2342 -0
  32. package/src/client/base.ts +86 -0
  33. package/src/client/common.ts +150 -0
  34. package/src/client/configuration.ts +115 -0
  35. package/src/client/git_push.sh +57 -0
  36. package/src/client/index.ts +19 -0
  37. package/src/index.ts +8 -0
  38. package/src/publisher_connection.spec.ts +1118 -0
  39. package/src/publisher_connection.ts +223 -0
  40. package/tsconfig.json +13 -0
@@ -0,0 +1,2342 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Malloy Publisher - Semantic Model Serving API
5
+ * The Malloy Publisher - Semantic Model Serving API serves Malloy packages. A Malloy package is a directory of Malloy models (.malloy files), Malloy notebooks (.malloynb files), and embedded datbases (.parque files) with a malloy-publisher.json manifest at the package\'s root directory. For example, see the Malloy samples packages (https://github.com/malloydata/malloy-samples) repo.
6
+ *
7
+ * The version of the OpenAPI document: v0
8
+ *
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+
15
+
16
+ import type { Configuration } from './configuration';
17
+ import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios';
18
+ import globalAxios from 'axios';
19
+ // Some imports not used depending on template conditions
20
+ // @ts-ignore
21
+ import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from './common';
22
+ import type { RequestArgs } from './base';
23
+ // @ts-ignore
24
+ import { BASE_PATH, COLLECTION_FORMATS, BaseAPI, RequiredError, operationServerMap } from './base';
25
+
26
+ /**
27
+ *
28
+ * @export
29
+ * @interface About
30
+ */
31
+ export interface About {
32
+ /**
33
+ * Readme markdown.
34
+ * @type {string}
35
+ * @memberof About
36
+ */
37
+ 'readme'?: string;
38
+ }
39
+ /**
40
+ *
41
+ * @export
42
+ * @interface BigqueryConnection
43
+ */
44
+ export interface BigqueryConnection {
45
+ /**
46
+ *
47
+ * @type {string}
48
+ * @memberof BigqueryConnection
49
+ */
50
+ 'defaultProjectId'?: string;
51
+ /**
52
+ *
53
+ * @type {string}
54
+ * @memberof BigqueryConnection
55
+ */
56
+ 'billingProjectId'?: string;
57
+ /**
58
+ *
59
+ * @type {string}
60
+ * @memberof BigqueryConnection
61
+ */
62
+ 'location'?: string;
63
+ /**
64
+ *
65
+ * @type {string}
66
+ * @memberof BigqueryConnection
67
+ */
68
+ 'serviceAccountKeyJson'?: string;
69
+ /**
70
+ *
71
+ * @type {string}
72
+ * @memberof BigqueryConnection
73
+ */
74
+ 'maximumBytesBilled'?: string;
75
+ /**
76
+ *
77
+ * @type {string}
78
+ * @memberof BigqueryConnection
79
+ */
80
+ 'queryTimeoutMilliseconds'?: string;
81
+ }
82
+ /**
83
+ * Malloy model def and result data. Malloy model def and result data is Malloy version depdendent.
84
+ * @export
85
+ * @interface CompiledModel
86
+ */
87
+ export interface CompiledModel {
88
+ /**
89
+ * Model\'s package Name
90
+ * @type {string}
91
+ * @memberof CompiledModel
92
+ */
93
+ 'packageName'?: string;
94
+ /**
95
+ * Model\'s relative path in its package directory.
96
+ * @type {string}
97
+ * @memberof CompiledModel
98
+ */
99
+ 'path'?: string;
100
+ /**
101
+ * Type of malloy model file -- source file or notebook file.
102
+ * @type {string}
103
+ * @memberof CompiledModel
104
+ */
105
+ 'type'?: CompiledModelTypeEnum;
106
+ /**
107
+ * Version of the Malloy compiler that generated the model def and results fields.
108
+ * @type {string}
109
+ * @memberof CompiledModel
110
+ */
111
+ 'malloyVersion'?: string;
112
+ /**
113
+ * Data style for rendering query results.
114
+ * @type {string}
115
+ * @memberof CompiledModel
116
+ */
117
+ 'dataStyles'?: string;
118
+ /**
119
+ * Malloy model def.
120
+ * @type {string}
121
+ * @memberof CompiledModel
122
+ */
123
+ 'modelDef'?: string;
124
+ /**
125
+ * Array of model sources.
126
+ * @type {Array<Source>}
127
+ * @memberof CompiledModel
128
+ */
129
+ 'sources'?: Array<Source>;
130
+ /**
131
+ *
132
+ * @type {Array<Query>}
133
+ * @memberof CompiledModel
134
+ */
135
+ 'queries'?: Array<Query>;
136
+ /**
137
+ * Array of notebook cells.
138
+ * @type {Array<NotebookCell>}
139
+ * @memberof CompiledModel
140
+ */
141
+ 'notebookCells'?: Array<NotebookCell>;
142
+ }
143
+
144
+ export const CompiledModelTypeEnum = {
145
+ Source: 'source',
146
+ Notebook: 'notebook'
147
+ } as const;
148
+
149
+ export type CompiledModelTypeEnum = typeof CompiledModelTypeEnum[keyof typeof CompiledModelTypeEnum];
150
+
151
+ /**
152
+ *
153
+ * @export
154
+ * @interface Connection
155
+ */
156
+ export interface Connection {
157
+ /**
158
+ *
159
+ * @type {string}
160
+ * @memberof Connection
161
+ */
162
+ 'name'?: string;
163
+ /**
164
+ *
165
+ * @type {string}
166
+ * @memberof Connection
167
+ */
168
+ 'type'?: ConnectionTypeEnum;
169
+ /**
170
+ *
171
+ * @type {ConnectionAttributes}
172
+ * @memberof Connection
173
+ */
174
+ 'attributes'?: ConnectionAttributes;
175
+ /**
176
+ *
177
+ * @type {PostgresConnection}
178
+ * @memberof Connection
179
+ */
180
+ 'postgresConnection'?: PostgresConnection;
181
+ /**
182
+ *
183
+ * @type {BigqueryConnection}
184
+ * @memberof Connection
185
+ */
186
+ 'bigqueryConnection'?: BigqueryConnection;
187
+ /**
188
+ *
189
+ * @type {SnowflakeConnection}
190
+ * @memberof Connection
191
+ */
192
+ 'snowflakeConnection'?: SnowflakeConnection;
193
+ /**
194
+ *
195
+ * @type {TrinoConnection}
196
+ * @memberof Connection
197
+ */
198
+ 'trinoConnection'?: TrinoConnection;
199
+ }
200
+
201
+ export const ConnectionTypeEnum = {
202
+ Postgres: 'postgres',
203
+ Bigquery: 'bigquery',
204
+ Snowflake: 'snowflake',
205
+ Trino: 'trino'
206
+ } as const;
207
+
208
+ export type ConnectionTypeEnum = typeof ConnectionTypeEnum[keyof typeof ConnectionTypeEnum];
209
+
210
+ /**
211
+ *
212
+ * @export
213
+ * @interface ConnectionAttributes
214
+ */
215
+ export interface ConnectionAttributes {
216
+ /**
217
+ *
218
+ * @type {string}
219
+ * @memberof ConnectionAttributes
220
+ */
221
+ 'dialectName'?: string;
222
+ /**
223
+ *
224
+ * @type {boolean}
225
+ * @memberof ConnectionAttributes
226
+ */
227
+ 'isPool'?: boolean;
228
+ /**
229
+ *
230
+ * @type {boolean}
231
+ * @memberof ConnectionAttributes
232
+ */
233
+ 'canPersist'?: boolean;
234
+ /**
235
+ *
236
+ * @type {boolean}
237
+ * @memberof ConnectionAttributes
238
+ */
239
+ 'canStream'?: boolean;
240
+ }
241
+ /**
242
+ * An in-memory DuckDB database embedded in the package.
243
+ * @export
244
+ * @interface Database
245
+ */
246
+ export interface Database {
247
+ /**
248
+ * Database\'s relative path in its package directory.
249
+ * @type {string}
250
+ * @memberof Database
251
+ */
252
+ 'path'?: string;
253
+ /**
254
+ * Size of the embedded database in bytes.
255
+ * @type {number}
256
+ * @memberof Database
257
+ */
258
+ 'size'?: number;
259
+ /**
260
+ * Type of database.
261
+ * @type {string}
262
+ * @memberof Database
263
+ */
264
+ 'type'?: DatabaseTypeEnum;
265
+ }
266
+
267
+ export const DatabaseTypeEnum = {
268
+ Embedded: 'embedded',
269
+ Materialized: 'materialized'
270
+ } as const;
271
+
272
+ export type DatabaseTypeEnum = typeof DatabaseTypeEnum[keyof typeof DatabaseTypeEnum];
273
+
274
+ /**
275
+ * Malloy model def and result data. Malloy model def and result data is Malloy version depdendent.
276
+ * @export
277
+ * @interface Model
278
+ */
279
+ export interface Model {
280
+ /**
281
+ * Model\'s package Name
282
+ * @type {string}
283
+ * @memberof Model
284
+ */
285
+ 'packageName'?: string;
286
+ /**
287
+ * Model\'s relative path in its package directory.
288
+ * @type {string}
289
+ * @memberof Model
290
+ */
291
+ 'path'?: string;
292
+ /**
293
+ * Type of malloy model file -- source file or notebook file.
294
+ * @type {string}
295
+ * @memberof Model
296
+ */
297
+ 'type'?: ModelTypeEnum;
298
+ }
299
+
300
+ export const ModelTypeEnum = {
301
+ Source: 'source',
302
+ Notebook: 'notebook'
303
+ } as const;
304
+
305
+ export type ModelTypeEnum = typeof ModelTypeEnum[keyof typeof ModelTypeEnum];
306
+
307
+ /**
308
+ *
309
+ * @export
310
+ * @interface ModelError
311
+ */
312
+ export interface ModelError {
313
+ /**
314
+ *
315
+ * @type {string}
316
+ * @memberof ModelError
317
+ */
318
+ 'code'?: string;
319
+ /**
320
+ *
321
+ * @type {string}
322
+ * @memberof ModelError
323
+ */
324
+ 'message'?: string;
325
+ }
326
+ /**
327
+ * Notebook cell.
328
+ * @export
329
+ * @interface NotebookCell
330
+ */
331
+ export interface NotebookCell {
332
+ /**
333
+ * Type of notebook cell.
334
+ * @type {string}
335
+ * @memberof NotebookCell
336
+ */
337
+ 'type'?: NotebookCellTypeEnum;
338
+ /**
339
+ * Text contents of the notebook cell.
340
+ * @type {string}
341
+ * @memberof NotebookCell
342
+ */
343
+ 'text'?: string;
344
+ /**
345
+ * Name of query, if this is a named query. Otherwise, empty.
346
+ * @type {string}
347
+ * @memberof NotebookCell
348
+ */
349
+ 'queryName'?: string;
350
+ /**
351
+ * Malloy query results. Populated only if a code cell.
352
+ * @type {string}
353
+ * @memberof NotebookCell
354
+ */
355
+ 'queryResult'?: string;
356
+ }
357
+
358
+ export const NotebookCellTypeEnum = {
359
+ Markdown: 'markdown',
360
+ Code: 'code'
361
+ } as const;
362
+
363
+ export type NotebookCellTypeEnum = typeof NotebookCellTypeEnum[keyof typeof NotebookCellTypeEnum];
364
+
365
+ /**
366
+ *
367
+ * @export
368
+ * @interface Package
369
+ */
370
+ export interface Package {
371
+ /**
372
+ * Package name.
373
+ * @type {string}
374
+ * @memberof Package
375
+ */
376
+ 'name'?: string;
377
+ /**
378
+ * Package description.
379
+ * @type {string}
380
+ * @memberof Package
381
+ */
382
+ 'description'?: string;
383
+ }
384
+ /**
385
+ *
386
+ * @export
387
+ * @interface PostgresConnection
388
+ */
389
+ export interface PostgresConnection {
390
+ /**
391
+ *
392
+ * @type {string}
393
+ * @memberof PostgresConnection
394
+ */
395
+ 'host'?: string;
396
+ /**
397
+ *
398
+ * @type {number}
399
+ * @memberof PostgresConnection
400
+ */
401
+ 'port'?: number;
402
+ /**
403
+ *
404
+ * @type {string}
405
+ * @memberof PostgresConnection
406
+ */
407
+ 'databaseName'?: string;
408
+ /**
409
+ *
410
+ * @type {string}
411
+ * @memberof PostgresConnection
412
+ */
413
+ 'userName'?: string;
414
+ /**
415
+ *
416
+ * @type {string}
417
+ * @memberof PostgresConnection
418
+ */
419
+ 'password'?: string;
420
+ /**
421
+ *
422
+ * @type {string}
423
+ * @memberof PostgresConnection
424
+ */
425
+ 'connectionString'?: string;
426
+ }
427
+ /**
428
+ *
429
+ * @export
430
+ * @interface Project
431
+ */
432
+ export interface Project {
433
+ /**
434
+ * Project name.
435
+ * @type {string}
436
+ * @memberof Project
437
+ */
438
+ 'name'?: string;
439
+ }
440
+ /**
441
+ * Named model query.
442
+ * @export
443
+ * @interface Query
444
+ */
445
+ export interface Query {
446
+ /**
447
+ * Query\'s name.
448
+ * @type {string}
449
+ * @memberof Query
450
+ */
451
+ 'name'?: string;
452
+ /**
453
+ * Annotations attached to query.
454
+ * @type {Array<string>}
455
+ * @memberof Query
456
+ */
457
+ 'annotations'?: Array<string>;
458
+ }
459
+ /**
460
+ *
461
+ * @export
462
+ * @interface QueryData
463
+ */
464
+ export interface QueryData {
465
+ /**
466
+ *
467
+ * @type {string}
468
+ * @memberof QueryData
469
+ */
470
+ 'data'?: string;
471
+ }
472
+ /**
473
+ * A Malloy query\'s results, its model def, and its data styles.
474
+ * @export
475
+ * @interface QueryResult
476
+ */
477
+ export interface QueryResult {
478
+ /**
479
+ * Data style for rendering query results.
480
+ * @type {string}
481
+ * @memberof QueryResult
482
+ */
483
+ 'dataStyles'?: string;
484
+ /**
485
+ * Malloy model def.
486
+ * @type {string}
487
+ * @memberof QueryResult
488
+ */
489
+ 'modelDef'?: string;
490
+ /**
491
+ * Malloy query results. Populated only if a code cell.
492
+ * @type {string}
493
+ * @memberof QueryResult
494
+ */
495
+ 'queryResult'?: string;
496
+ }
497
+ /**
498
+ * A scheduled task.
499
+ * @export
500
+ * @interface Schedule
501
+ */
502
+ export interface Schedule {
503
+ /**
504
+ * Resource in the package that the schedule is attached to.
505
+ * @type {string}
506
+ * @memberof Schedule
507
+ */
508
+ 'resource'?: string;
509
+ /**
510
+ * Schedule (cron format) for executing task.
511
+ * @type {string}
512
+ * @memberof Schedule
513
+ */
514
+ 'schedule'?: string;
515
+ /**
516
+ * Action to execute.
517
+ * @type {string}
518
+ * @memberof Schedule
519
+ */
520
+ 'action'?: string;
521
+ /**
522
+ * Connection to perform action on.
523
+ * @type {string}
524
+ * @memberof Schedule
525
+ */
526
+ 'connection'?: string;
527
+ /**
528
+ * Timestamp in milliseconds of the last run.
529
+ * @type {number}
530
+ * @memberof Schedule
531
+ */
532
+ 'lastRunTime'?: number;
533
+ /**
534
+ * Status of the last run.
535
+ * @type {string}
536
+ * @memberof Schedule
537
+ */
538
+ 'lastRunStatus'?: string;
539
+ }
540
+ /**
541
+ *
542
+ * @export
543
+ * @interface SnowflakeConnection
544
+ */
545
+ export interface SnowflakeConnection {
546
+ /**
547
+ *
548
+ * @type {string}
549
+ * @memberof SnowflakeConnection
550
+ */
551
+ 'account'?: string;
552
+ /**
553
+ *
554
+ * @type {string}
555
+ * @memberof SnowflakeConnection
556
+ */
557
+ 'username'?: string;
558
+ /**
559
+ *
560
+ * @type {string}
561
+ * @memberof SnowflakeConnection
562
+ */
563
+ 'password'?: string;
564
+ /**
565
+ *
566
+ * @type {string}
567
+ * @memberof SnowflakeConnection
568
+ */
569
+ 'warehouse'?: string;
570
+ /**
571
+ *
572
+ * @type {string}
573
+ * @memberof SnowflakeConnection
574
+ */
575
+ 'database'?: string;
576
+ /**
577
+ *
578
+ * @type {string}
579
+ * @memberof SnowflakeConnection
580
+ */
581
+ 'schema'?: string;
582
+ /**
583
+ *
584
+ * @type {number}
585
+ * @memberof SnowflakeConnection
586
+ */
587
+ 'responseTimeoutMilliseconds'?: number;
588
+ }
589
+ /**
590
+ * Model source.
591
+ * @export
592
+ * @interface Source
593
+ */
594
+ export interface Source {
595
+ /**
596
+ * Source\'s name.
597
+ * @type {string}
598
+ * @memberof Source
599
+ */
600
+ 'name'?: string;
601
+ /**
602
+ * Annotations attached to source.
603
+ * @type {Array<string>}
604
+ * @memberof Source
605
+ */
606
+ 'annotations'?: Array<string>;
607
+ /**
608
+ * List of views in the source.\\
609
+ * @type {Array<View>}
610
+ * @memberof Source
611
+ */
612
+ 'views'?: Array<View>;
613
+ }
614
+ /**
615
+ *
616
+ * @export
617
+ * @interface SqlSource
618
+ */
619
+ export interface SqlSource {
620
+ /**
621
+ *
622
+ * @type {string}
623
+ * @memberof SqlSource
624
+ */
625
+ 'source'?: string;
626
+ }
627
+ /**
628
+ *
629
+ * @export
630
+ * @interface TableSource
631
+ */
632
+ export interface TableSource {
633
+ /**
634
+ *
635
+ * @type {string}
636
+ * @memberof TableSource
637
+ */
638
+ 'source'?: string;
639
+ }
640
+ /**
641
+ *
642
+ * @export
643
+ * @interface TemporaryTable
644
+ */
645
+ export interface TemporaryTable {
646
+ /**
647
+ *
648
+ * @type {string}
649
+ * @memberof TemporaryTable
650
+ */
651
+ 'table'?: string;
652
+ }
653
+ /**
654
+ *
655
+ * @export
656
+ * @interface TrinoConnection
657
+ */
658
+ export interface TrinoConnection {
659
+ /**
660
+ *
661
+ * @type {string}
662
+ * @memberof TrinoConnection
663
+ */
664
+ 'server'?: string;
665
+ /**
666
+ *
667
+ * @type {number}
668
+ * @memberof TrinoConnection
669
+ */
670
+ 'port'?: number;
671
+ /**
672
+ *
673
+ * @type {string}
674
+ * @memberof TrinoConnection
675
+ */
676
+ 'catalog'?: string;
677
+ /**
678
+ *
679
+ * @type {string}
680
+ * @memberof TrinoConnection
681
+ */
682
+ 'schema'?: string;
683
+ /**
684
+ *
685
+ * @type {string}
686
+ * @memberof TrinoConnection
687
+ */
688
+ 'user'?: string;
689
+ /**
690
+ *
691
+ * @type {string}
692
+ * @memberof TrinoConnection
693
+ */
694
+ 'password'?: string;
695
+ }
696
+ /**
697
+ * Named model view.
698
+ * @export
699
+ * @interface View
700
+ */
701
+ export interface View {
702
+ /**
703
+ * View\'s name.
704
+ * @type {string}
705
+ * @memberof View
706
+ */
707
+ 'name'?: string;
708
+ /**
709
+ * Annotations attached to view.
710
+ * @type {Array<string>}
711
+ * @memberof View
712
+ */
713
+ 'annotations'?: Array<string>;
714
+ }
715
+
716
+ /**
717
+ * ConnectionsApi - axios parameter creator
718
+ * @export
719
+ */
720
+ export const ConnectionsApiAxiosParamCreator = function (configuration?: Configuration) {
721
+ return {
722
+ /**
723
+ *
724
+ * @summary Returns a connection.
725
+ * @param {string} projectName Name of project
726
+ * @param {string} connectionName Name of connection
727
+ * @param {*} [options] Override http request option.
728
+ * @throws {RequiredError}
729
+ */
730
+ getConnection: async (projectName: string, connectionName: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
731
+ // verify required parameter 'projectName' is not null or undefined
732
+ assertParamExists('getConnection', 'projectName', projectName)
733
+ // verify required parameter 'connectionName' is not null or undefined
734
+ assertParamExists('getConnection', 'connectionName', connectionName)
735
+ const localVarPath = `/projects/{projectName}/connections/{connectionName}`
736
+ .replace(`{${"projectName"}}`, encodeURIComponent(String(projectName)))
737
+ .replace(`{${"connectionName"}}`, encodeURIComponent(String(connectionName)));
738
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
739
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
740
+ let baseOptions;
741
+ if (configuration) {
742
+ baseOptions = configuration.baseOptions;
743
+ }
744
+
745
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
746
+ const localVarHeaderParameter = {} as any;
747
+ const localVarQueryParameter = {} as any;
748
+
749
+
750
+
751
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
752
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
753
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
754
+
755
+ return {
756
+ url: toPathString(localVarUrlObj),
757
+ options: localVarRequestOptions,
758
+ };
759
+ },
760
+ /**
761
+ *
762
+ * @summary Returns a query and its results.
763
+ * @param {string} projectName Name of project
764
+ * @param {string} connectionName Name of connection
765
+ * @param {string} [sqlStatement] SQL statement
766
+ * @param {string} [_options] Options
767
+ * @param {*} [options] Override http request option.
768
+ * @throws {RequiredError}
769
+ */
770
+ getQuerydata: async (projectName: string, connectionName: string, sqlStatement?: string, _options?: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
771
+ // verify required parameter 'projectName' is not null or undefined
772
+ assertParamExists('getQuerydata', 'projectName', projectName)
773
+ // verify required parameter 'connectionName' is not null or undefined
774
+ assertParamExists('getQuerydata', 'connectionName', connectionName)
775
+ const localVarPath = `/projects/{projectName}/connections/{connectionName}/queryData`
776
+ .replace(`{${"projectName"}}`, encodeURIComponent(String(projectName)))
777
+ .replace(`{${"connectionName"}}`, encodeURIComponent(String(connectionName)));
778
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
779
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
780
+ let baseOptions;
781
+ if (configuration) {
782
+ baseOptions = configuration.baseOptions;
783
+ }
784
+
785
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
786
+ const localVarHeaderParameter = {} as any;
787
+ const localVarQueryParameter = {} as any;
788
+
789
+ if (sqlStatement !== undefined) {
790
+ localVarQueryParameter['sqlStatement'] = sqlStatement;
791
+ }
792
+
793
+ if (_options !== undefined) {
794
+ localVarQueryParameter['options'] = _options;
795
+ }
796
+
797
+
798
+
799
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
800
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
801
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
802
+
803
+ return {
804
+ url: toPathString(localVarUrlObj),
805
+ options: localVarRequestOptions,
806
+ };
807
+ },
808
+ /**
809
+ *
810
+ * @summary Returns a SQL source.
811
+ * @param {string} projectName Name of project
812
+ * @param {string} connectionName Name of connection
813
+ * @param {string} [sqlStatement] SQL statement
814
+ * @param {*} [options] Override http request option.
815
+ * @throws {RequiredError}
816
+ */
817
+ getSqlsource: async (projectName: string, connectionName: string, sqlStatement?: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
818
+ // verify required parameter 'projectName' is not null or undefined
819
+ assertParamExists('getSqlsource', 'projectName', projectName)
820
+ // verify required parameter 'connectionName' is not null or undefined
821
+ assertParamExists('getSqlsource', 'connectionName', connectionName)
822
+ const localVarPath = `/projects/{projectName}/connections/{connectionName}/sqlSource`
823
+ .replace(`{${"projectName"}}`, encodeURIComponent(String(projectName)))
824
+ .replace(`{${"connectionName"}}`, encodeURIComponent(String(connectionName)));
825
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
826
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
827
+ let baseOptions;
828
+ if (configuration) {
829
+ baseOptions = configuration.baseOptions;
830
+ }
831
+
832
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
833
+ const localVarHeaderParameter = {} as any;
834
+ const localVarQueryParameter = {} as any;
835
+
836
+ if (sqlStatement !== undefined) {
837
+ localVarQueryParameter['sqlStatement'] = sqlStatement;
838
+ }
839
+
840
+
841
+
842
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
843
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
844
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
845
+
846
+ return {
847
+ url: toPathString(localVarUrlObj),
848
+ options: localVarRequestOptions,
849
+ };
850
+ },
851
+ /**
852
+ *
853
+ * @summary Returns a table source.
854
+ * @param {string} projectName Name of project
855
+ * @param {string} connectionName Name of connection
856
+ * @param {string} [tableKey] Table key
857
+ * @param {string} [tablePath] Table path
858
+ * @param {*} [options] Override http request option.
859
+ * @throws {RequiredError}
860
+ */
861
+ getTablesource: async (projectName: string, connectionName: string, tableKey?: string, tablePath?: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
862
+ // verify required parameter 'projectName' is not null or undefined
863
+ assertParamExists('getTablesource', 'projectName', projectName)
864
+ // verify required parameter 'connectionName' is not null or undefined
865
+ assertParamExists('getTablesource', 'connectionName', connectionName)
866
+ const localVarPath = `/projects/{projectName}/connections/{connectionName}/tableSource`
867
+ .replace(`{${"projectName"}}`, encodeURIComponent(String(projectName)))
868
+ .replace(`{${"connectionName"}}`, encodeURIComponent(String(connectionName)));
869
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
870
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
871
+ let baseOptions;
872
+ if (configuration) {
873
+ baseOptions = configuration.baseOptions;
874
+ }
875
+
876
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
877
+ const localVarHeaderParameter = {} as any;
878
+ const localVarQueryParameter = {} as any;
879
+
880
+ if (tableKey !== undefined) {
881
+ localVarQueryParameter['tableKey'] = tableKey;
882
+ }
883
+
884
+ if (tablePath !== undefined) {
885
+ localVarQueryParameter['tablePath'] = tablePath;
886
+ }
887
+
888
+
889
+
890
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
891
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
892
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
893
+
894
+ return {
895
+ url: toPathString(localVarUrlObj),
896
+ options: localVarRequestOptions,
897
+ };
898
+ },
899
+ /**
900
+ *
901
+ * @summary Returns a temporary table.
902
+ * @param {string} projectName Name of project
903
+ * @param {string} connectionName Name of connection
904
+ * @param {string} [sqlStatement] SQL statement
905
+ * @param {*} [options] Override http request option.
906
+ * @throws {RequiredError}
907
+ */
908
+ getTemporarytable: async (projectName: string, connectionName: string, sqlStatement?: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
909
+ // verify required parameter 'projectName' is not null or undefined
910
+ assertParamExists('getTemporarytable', 'projectName', projectName)
911
+ // verify required parameter 'connectionName' is not null or undefined
912
+ assertParamExists('getTemporarytable', 'connectionName', connectionName)
913
+ const localVarPath = `/projects/{projectName}/connections/{connectionName}/temporaryTable`
914
+ .replace(`{${"projectName"}}`, encodeURIComponent(String(projectName)))
915
+ .replace(`{${"connectionName"}}`, encodeURIComponent(String(connectionName)));
916
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
917
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
918
+ let baseOptions;
919
+ if (configuration) {
920
+ baseOptions = configuration.baseOptions;
921
+ }
922
+
923
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
924
+ const localVarHeaderParameter = {} as any;
925
+ const localVarQueryParameter = {} as any;
926
+
927
+ if (sqlStatement !== undefined) {
928
+ localVarQueryParameter['sqlStatement'] = sqlStatement;
929
+ }
930
+
931
+
932
+
933
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
934
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
935
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
936
+
937
+ return {
938
+ url: toPathString(localVarUrlObj),
939
+ options: localVarRequestOptions,
940
+ };
941
+ },
942
+ /**
943
+ *
944
+ * @summary Returns a test.
945
+ * @param {string} projectName Name of project
946
+ * @param {string} connectionName Name of connection
947
+ * @param {*} [options] Override http request option.
948
+ * @throws {RequiredError}
949
+ */
950
+ getTest: async (projectName: string, connectionName: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
951
+ // verify required parameter 'projectName' is not null or undefined
952
+ assertParamExists('getTest', 'projectName', projectName)
953
+ // verify required parameter 'connectionName' is not null or undefined
954
+ assertParamExists('getTest', 'connectionName', connectionName)
955
+ const localVarPath = `/projects/{projectName}/connections/{connectionName}/test`
956
+ .replace(`{${"projectName"}}`, encodeURIComponent(String(projectName)))
957
+ .replace(`{${"connectionName"}}`, encodeURIComponent(String(connectionName)));
958
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
959
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
960
+ let baseOptions;
961
+ if (configuration) {
962
+ baseOptions = configuration.baseOptions;
963
+ }
964
+
965
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
966
+ const localVarHeaderParameter = {} as any;
967
+ const localVarQueryParameter = {} as any;
968
+
969
+
970
+
971
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
972
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
973
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
974
+
975
+ return {
976
+ url: toPathString(localVarUrlObj),
977
+ options: localVarRequestOptions,
978
+ };
979
+ },
980
+ /**
981
+ *
982
+ * @summary Returns a list of the connections in the project.
983
+ * @param {string} projectName Name of project
984
+ * @param {*} [options] Override http request option.
985
+ * @throws {RequiredError}
986
+ */
987
+ listConnections: async (projectName: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
988
+ // verify required parameter 'projectName' is not null or undefined
989
+ assertParamExists('listConnections', 'projectName', projectName)
990
+ const localVarPath = `/projects/{projectName}/connections`
991
+ .replace(`{${"projectName"}}`, encodeURIComponent(String(projectName)));
992
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
993
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
994
+ let baseOptions;
995
+ if (configuration) {
996
+ baseOptions = configuration.baseOptions;
997
+ }
998
+
999
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
1000
+ const localVarHeaderParameter = {} as any;
1001
+ const localVarQueryParameter = {} as any;
1002
+
1003
+
1004
+
1005
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
1006
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1007
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
1008
+
1009
+ return {
1010
+ url: toPathString(localVarUrlObj),
1011
+ options: localVarRequestOptions,
1012
+ };
1013
+ },
1014
+ }
1015
+ };
1016
+
1017
+ /**
1018
+ * ConnectionsApi - functional programming interface
1019
+ * @export
1020
+ */
1021
+ export const ConnectionsApiFp = function(configuration?: Configuration) {
1022
+ const localVarAxiosParamCreator = ConnectionsApiAxiosParamCreator(configuration)
1023
+ return {
1024
+ /**
1025
+ *
1026
+ * @summary Returns a connection.
1027
+ * @param {string} projectName Name of project
1028
+ * @param {string} connectionName Name of connection
1029
+ * @param {*} [options] Override http request option.
1030
+ * @throws {RequiredError}
1031
+ */
1032
+ async getConnection(projectName: string, connectionName: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Connection>> {
1033
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getConnection(projectName, connectionName, options);
1034
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
1035
+ const localVarOperationServerBasePath = operationServerMap['ConnectionsApi.getConnection']?.[localVarOperationServerIndex]?.url;
1036
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1037
+ },
1038
+ /**
1039
+ *
1040
+ * @summary Returns a query and its results.
1041
+ * @param {string} projectName Name of project
1042
+ * @param {string} connectionName Name of connection
1043
+ * @param {string} [sqlStatement] SQL statement
1044
+ * @param {string} [_options] Options
1045
+ * @param {*} [options] Override http request option.
1046
+ * @throws {RequiredError}
1047
+ */
1048
+ async getQuerydata(projectName: string, connectionName: string, sqlStatement?: string, _options?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<QueryData>> {
1049
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getQuerydata(projectName, connectionName, sqlStatement, _options, options);
1050
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
1051
+ const localVarOperationServerBasePath = operationServerMap['ConnectionsApi.getQuerydata']?.[localVarOperationServerIndex]?.url;
1052
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1053
+ },
1054
+ /**
1055
+ *
1056
+ * @summary Returns a SQL source.
1057
+ * @param {string} projectName Name of project
1058
+ * @param {string} connectionName Name of connection
1059
+ * @param {string} [sqlStatement] SQL statement
1060
+ * @param {*} [options] Override http request option.
1061
+ * @throws {RequiredError}
1062
+ */
1063
+ async getSqlsource(projectName: string, connectionName: string, sqlStatement?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<SqlSource>> {
1064
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getSqlsource(projectName, connectionName, sqlStatement, options);
1065
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
1066
+ const localVarOperationServerBasePath = operationServerMap['ConnectionsApi.getSqlsource']?.[localVarOperationServerIndex]?.url;
1067
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1068
+ },
1069
+ /**
1070
+ *
1071
+ * @summary Returns a table source.
1072
+ * @param {string} projectName Name of project
1073
+ * @param {string} connectionName Name of connection
1074
+ * @param {string} [tableKey] Table key
1075
+ * @param {string} [tablePath] Table path
1076
+ * @param {*} [options] Override http request option.
1077
+ * @throws {RequiredError}
1078
+ */
1079
+ async getTablesource(projectName: string, connectionName: string, tableKey?: string, tablePath?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<TableSource>> {
1080
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getTablesource(projectName, connectionName, tableKey, tablePath, options);
1081
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
1082
+ const localVarOperationServerBasePath = operationServerMap['ConnectionsApi.getTablesource']?.[localVarOperationServerIndex]?.url;
1083
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1084
+ },
1085
+ /**
1086
+ *
1087
+ * @summary Returns a temporary table.
1088
+ * @param {string} projectName Name of project
1089
+ * @param {string} connectionName Name of connection
1090
+ * @param {string} [sqlStatement] SQL statement
1091
+ * @param {*} [options] Override http request option.
1092
+ * @throws {RequiredError}
1093
+ */
1094
+ async getTemporarytable(projectName: string, connectionName: string, sqlStatement?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<TemporaryTable>> {
1095
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getTemporarytable(projectName, connectionName, sqlStatement, options);
1096
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
1097
+ const localVarOperationServerBasePath = operationServerMap['ConnectionsApi.getTemporarytable']?.[localVarOperationServerIndex]?.url;
1098
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1099
+ },
1100
+ /**
1101
+ *
1102
+ * @summary Returns a test.
1103
+ * @param {string} projectName Name of project
1104
+ * @param {string} connectionName Name of connection
1105
+ * @param {*} [options] Override http request option.
1106
+ * @throws {RequiredError}
1107
+ */
1108
+ async getTest(projectName: string, connectionName: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
1109
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getTest(projectName, connectionName, options);
1110
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
1111
+ const localVarOperationServerBasePath = operationServerMap['ConnectionsApi.getTest']?.[localVarOperationServerIndex]?.url;
1112
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1113
+ },
1114
+ /**
1115
+ *
1116
+ * @summary Returns a list of the connections in the project.
1117
+ * @param {string} projectName Name of project
1118
+ * @param {*} [options] Override http request option.
1119
+ * @throws {RequiredError}
1120
+ */
1121
+ async listConnections(projectName: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<Connection>>> {
1122
+ const localVarAxiosArgs = await localVarAxiosParamCreator.listConnections(projectName, options);
1123
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
1124
+ const localVarOperationServerBasePath = operationServerMap['ConnectionsApi.listConnections']?.[localVarOperationServerIndex]?.url;
1125
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1126
+ },
1127
+ }
1128
+ };
1129
+
1130
+ /**
1131
+ * ConnectionsApi - factory interface
1132
+ * @export
1133
+ */
1134
+ export const ConnectionsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
1135
+ const localVarFp = ConnectionsApiFp(configuration)
1136
+ return {
1137
+ /**
1138
+ *
1139
+ * @summary Returns a connection.
1140
+ * @param {string} projectName Name of project
1141
+ * @param {string} connectionName Name of connection
1142
+ * @param {*} [options] Override http request option.
1143
+ * @throws {RequiredError}
1144
+ */
1145
+ getConnection(projectName: string, connectionName: string, options?: RawAxiosRequestConfig): AxiosPromise<Connection> {
1146
+ return localVarFp.getConnection(projectName, connectionName, options).then((request) => request(axios, basePath));
1147
+ },
1148
+ /**
1149
+ *
1150
+ * @summary Returns a query and its results.
1151
+ * @param {string} projectName Name of project
1152
+ * @param {string} connectionName Name of connection
1153
+ * @param {string} [sqlStatement] SQL statement
1154
+ * @param {string} [_options] Options
1155
+ * @param {*} [options] Override http request option.
1156
+ * @throws {RequiredError}
1157
+ */
1158
+ getQuerydata(projectName: string, connectionName: string, sqlStatement?: string, _options?: string, options?: RawAxiosRequestConfig): AxiosPromise<QueryData> {
1159
+ return localVarFp.getQuerydata(projectName, connectionName, sqlStatement, _options, options).then((request) => request(axios, basePath));
1160
+ },
1161
+ /**
1162
+ *
1163
+ * @summary Returns a SQL source.
1164
+ * @param {string} projectName Name of project
1165
+ * @param {string} connectionName Name of connection
1166
+ * @param {string} [sqlStatement] SQL statement
1167
+ * @param {*} [options] Override http request option.
1168
+ * @throws {RequiredError}
1169
+ */
1170
+ getSqlsource(projectName: string, connectionName: string, sqlStatement?: string, options?: RawAxiosRequestConfig): AxiosPromise<SqlSource> {
1171
+ return localVarFp.getSqlsource(projectName, connectionName, sqlStatement, options).then((request) => request(axios, basePath));
1172
+ },
1173
+ /**
1174
+ *
1175
+ * @summary Returns a table source.
1176
+ * @param {string} projectName Name of project
1177
+ * @param {string} connectionName Name of connection
1178
+ * @param {string} [tableKey] Table key
1179
+ * @param {string} [tablePath] Table path
1180
+ * @param {*} [options] Override http request option.
1181
+ * @throws {RequiredError}
1182
+ */
1183
+ getTablesource(projectName: string, connectionName: string, tableKey?: string, tablePath?: string, options?: RawAxiosRequestConfig): AxiosPromise<TableSource> {
1184
+ return localVarFp.getTablesource(projectName, connectionName, tableKey, tablePath, options).then((request) => request(axios, basePath));
1185
+ },
1186
+ /**
1187
+ *
1188
+ * @summary Returns a temporary table.
1189
+ * @param {string} projectName Name of project
1190
+ * @param {string} connectionName Name of connection
1191
+ * @param {string} [sqlStatement] SQL statement
1192
+ * @param {*} [options] Override http request option.
1193
+ * @throws {RequiredError}
1194
+ */
1195
+ getTemporarytable(projectName: string, connectionName: string, sqlStatement?: string, options?: RawAxiosRequestConfig): AxiosPromise<TemporaryTable> {
1196
+ return localVarFp.getTemporarytable(projectName, connectionName, sqlStatement, options).then((request) => request(axios, basePath));
1197
+ },
1198
+ /**
1199
+ *
1200
+ * @summary Returns a test.
1201
+ * @param {string} projectName Name of project
1202
+ * @param {string} connectionName Name of connection
1203
+ * @param {*} [options] Override http request option.
1204
+ * @throws {RequiredError}
1205
+ */
1206
+ getTest(projectName: string, connectionName: string, options?: RawAxiosRequestConfig): AxiosPromise<void> {
1207
+ return localVarFp.getTest(projectName, connectionName, options).then((request) => request(axios, basePath));
1208
+ },
1209
+ /**
1210
+ *
1211
+ * @summary Returns a list of the connections in the project.
1212
+ * @param {string} projectName Name of project
1213
+ * @param {*} [options] Override http request option.
1214
+ * @throws {RequiredError}
1215
+ */
1216
+ listConnections(projectName: string, options?: RawAxiosRequestConfig): AxiosPromise<Array<Connection>> {
1217
+ return localVarFp.listConnections(projectName, options).then((request) => request(axios, basePath));
1218
+ },
1219
+ };
1220
+ };
1221
+
1222
+ /**
1223
+ * ConnectionsApi - object-oriented interface
1224
+ * @export
1225
+ * @class ConnectionsApi
1226
+ * @extends {BaseAPI}
1227
+ */
1228
+ export class ConnectionsApi extends BaseAPI {
1229
+ /**
1230
+ *
1231
+ * @summary Returns a connection.
1232
+ * @param {string} projectName Name of project
1233
+ * @param {string} connectionName Name of connection
1234
+ * @param {*} [options] Override http request option.
1235
+ * @throws {RequiredError}
1236
+ * @memberof ConnectionsApi
1237
+ */
1238
+ public getConnection(projectName: string, connectionName: string, options?: RawAxiosRequestConfig) {
1239
+ return ConnectionsApiFp(this.configuration).getConnection(projectName, connectionName, options).then((request) => request(this.axios, this.basePath));
1240
+ }
1241
+
1242
+ /**
1243
+ *
1244
+ * @summary Returns a query and its results.
1245
+ * @param {string} projectName Name of project
1246
+ * @param {string} connectionName Name of connection
1247
+ * @param {string} [sqlStatement] SQL statement
1248
+ * @param {string} [_options] Options
1249
+ * @param {*} [options] Override http request option.
1250
+ * @throws {RequiredError}
1251
+ * @memberof ConnectionsApi
1252
+ */
1253
+ public getQuerydata(projectName: string, connectionName: string, sqlStatement?: string, _options?: string, options?: RawAxiosRequestConfig) {
1254
+ return ConnectionsApiFp(this.configuration).getQuerydata(projectName, connectionName, sqlStatement, _options, options).then((request) => request(this.axios, this.basePath));
1255
+ }
1256
+
1257
+ /**
1258
+ *
1259
+ * @summary Returns a SQL source.
1260
+ * @param {string} projectName Name of project
1261
+ * @param {string} connectionName Name of connection
1262
+ * @param {string} [sqlStatement] SQL statement
1263
+ * @param {*} [options] Override http request option.
1264
+ * @throws {RequiredError}
1265
+ * @memberof ConnectionsApi
1266
+ */
1267
+ public getSqlsource(projectName: string, connectionName: string, sqlStatement?: string, options?: RawAxiosRequestConfig) {
1268
+ return ConnectionsApiFp(this.configuration).getSqlsource(projectName, connectionName, sqlStatement, options).then((request) => request(this.axios, this.basePath));
1269
+ }
1270
+
1271
+ /**
1272
+ *
1273
+ * @summary Returns a table source.
1274
+ * @param {string} projectName Name of project
1275
+ * @param {string} connectionName Name of connection
1276
+ * @param {string} [tableKey] Table key
1277
+ * @param {string} [tablePath] Table path
1278
+ * @param {*} [options] Override http request option.
1279
+ * @throws {RequiredError}
1280
+ * @memberof ConnectionsApi
1281
+ */
1282
+ public getTablesource(projectName: string, connectionName: string, tableKey?: string, tablePath?: string, options?: RawAxiosRequestConfig) {
1283
+ return ConnectionsApiFp(this.configuration).getTablesource(projectName, connectionName, tableKey, tablePath, options).then((request) => request(this.axios, this.basePath));
1284
+ }
1285
+
1286
+ /**
1287
+ *
1288
+ * @summary Returns a temporary table.
1289
+ * @param {string} projectName Name of project
1290
+ * @param {string} connectionName Name of connection
1291
+ * @param {string} [sqlStatement] SQL statement
1292
+ * @param {*} [options] Override http request option.
1293
+ * @throws {RequiredError}
1294
+ * @memberof ConnectionsApi
1295
+ */
1296
+ public getTemporarytable(projectName: string, connectionName: string, sqlStatement?: string, options?: RawAxiosRequestConfig) {
1297
+ return ConnectionsApiFp(this.configuration).getTemporarytable(projectName, connectionName, sqlStatement, options).then((request) => request(this.axios, this.basePath));
1298
+ }
1299
+
1300
+ /**
1301
+ *
1302
+ * @summary Returns a test.
1303
+ * @param {string} projectName Name of project
1304
+ * @param {string} connectionName Name of connection
1305
+ * @param {*} [options] Override http request option.
1306
+ * @throws {RequiredError}
1307
+ * @memberof ConnectionsApi
1308
+ */
1309
+ public getTest(projectName: string, connectionName: string, options?: RawAxiosRequestConfig) {
1310
+ return ConnectionsApiFp(this.configuration).getTest(projectName, connectionName, options).then((request) => request(this.axios, this.basePath));
1311
+ }
1312
+
1313
+ /**
1314
+ *
1315
+ * @summary Returns a list of the connections in the project.
1316
+ * @param {string} projectName Name of project
1317
+ * @param {*} [options] Override http request option.
1318
+ * @throws {RequiredError}
1319
+ * @memberof ConnectionsApi
1320
+ */
1321
+ public listConnections(projectName: string, options?: RawAxiosRequestConfig) {
1322
+ return ConnectionsApiFp(this.configuration).listConnections(projectName, options).then((request) => request(this.axios, this.basePath));
1323
+ }
1324
+ }
1325
+
1326
+
1327
+
1328
+ /**
1329
+ * DatabasesApi - axios parameter creator
1330
+ * @export
1331
+ */
1332
+ export const DatabasesApiAxiosParamCreator = function (configuration?: Configuration) {
1333
+ return {
1334
+ /**
1335
+ *
1336
+ * @summary Returns a list of relative paths to the databases embedded in the package.
1337
+ * @param {string} projectName Name of project
1338
+ * @param {string} packageName Name of package
1339
+ * @param {string} [versionId] Version ID
1340
+ * @param {*} [options] Override http request option.
1341
+ * @throws {RequiredError}
1342
+ */
1343
+ listDatabases: async (projectName: string, packageName: string, versionId?: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
1344
+ // verify required parameter 'projectName' is not null or undefined
1345
+ assertParamExists('listDatabases', 'projectName', projectName)
1346
+ // verify required parameter 'packageName' is not null or undefined
1347
+ assertParamExists('listDatabases', 'packageName', packageName)
1348
+ const localVarPath = `/projects/{projectName}/packages/{packageName}/databases`
1349
+ .replace(`{${"projectName"}}`, encodeURIComponent(String(projectName)))
1350
+ .replace(`{${"packageName"}}`, encodeURIComponent(String(packageName)));
1351
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
1352
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
1353
+ let baseOptions;
1354
+ if (configuration) {
1355
+ baseOptions = configuration.baseOptions;
1356
+ }
1357
+
1358
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
1359
+ const localVarHeaderParameter = {} as any;
1360
+ const localVarQueryParameter = {} as any;
1361
+
1362
+ if (versionId !== undefined) {
1363
+ localVarQueryParameter['versionId'] = versionId;
1364
+ }
1365
+
1366
+
1367
+
1368
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
1369
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1370
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
1371
+
1372
+ return {
1373
+ url: toPathString(localVarUrlObj),
1374
+ options: localVarRequestOptions,
1375
+ };
1376
+ },
1377
+ }
1378
+ };
1379
+
1380
+ /**
1381
+ * DatabasesApi - functional programming interface
1382
+ * @export
1383
+ */
1384
+ export const DatabasesApiFp = function(configuration?: Configuration) {
1385
+ const localVarAxiosParamCreator = DatabasesApiAxiosParamCreator(configuration)
1386
+ return {
1387
+ /**
1388
+ *
1389
+ * @summary Returns a list of relative paths to the databases embedded in the package.
1390
+ * @param {string} projectName Name of project
1391
+ * @param {string} packageName Name of package
1392
+ * @param {string} [versionId] Version ID
1393
+ * @param {*} [options] Override http request option.
1394
+ * @throws {RequiredError}
1395
+ */
1396
+ async listDatabases(projectName: string, packageName: string, versionId?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<Database>>> {
1397
+ const localVarAxiosArgs = await localVarAxiosParamCreator.listDatabases(projectName, packageName, versionId, options);
1398
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
1399
+ const localVarOperationServerBasePath = operationServerMap['DatabasesApi.listDatabases']?.[localVarOperationServerIndex]?.url;
1400
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1401
+ },
1402
+ }
1403
+ };
1404
+
1405
+ /**
1406
+ * DatabasesApi - factory interface
1407
+ * @export
1408
+ */
1409
+ export const DatabasesApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
1410
+ const localVarFp = DatabasesApiFp(configuration)
1411
+ return {
1412
+ /**
1413
+ *
1414
+ * @summary Returns a list of relative paths to the databases embedded in the package.
1415
+ * @param {string} projectName Name of project
1416
+ * @param {string} packageName Name of package
1417
+ * @param {string} [versionId] Version ID
1418
+ * @param {*} [options] Override http request option.
1419
+ * @throws {RequiredError}
1420
+ */
1421
+ listDatabases(projectName: string, packageName: string, versionId?: string, options?: RawAxiosRequestConfig): AxiosPromise<Array<Database>> {
1422
+ return localVarFp.listDatabases(projectName, packageName, versionId, options).then((request) => request(axios, basePath));
1423
+ },
1424
+ };
1425
+ };
1426
+
1427
+ /**
1428
+ * DatabasesApi - object-oriented interface
1429
+ * @export
1430
+ * @class DatabasesApi
1431
+ * @extends {BaseAPI}
1432
+ */
1433
+ export class DatabasesApi extends BaseAPI {
1434
+ /**
1435
+ *
1436
+ * @summary Returns a list of relative paths to the databases embedded in the package.
1437
+ * @param {string} projectName Name of project
1438
+ * @param {string} packageName Name of package
1439
+ * @param {string} [versionId] Version ID
1440
+ * @param {*} [options] Override http request option.
1441
+ * @throws {RequiredError}
1442
+ * @memberof DatabasesApi
1443
+ */
1444
+ public listDatabases(projectName: string, packageName: string, versionId?: string, options?: RawAxiosRequestConfig) {
1445
+ return DatabasesApiFp(this.configuration).listDatabases(projectName, packageName, versionId, options).then((request) => request(this.axios, this.basePath));
1446
+ }
1447
+ }
1448
+
1449
+
1450
+
1451
+ /**
1452
+ * DefaultApi - axios parameter creator
1453
+ * @export
1454
+ */
1455
+ export const DefaultApiAxiosParamCreator = function (configuration?: Configuration) {
1456
+ return {
1457
+ /**
1458
+ *
1459
+ * @summary Returns metadata about the publisher service.
1460
+ * @param {string} projectName Name of project
1461
+ * @param {*} [options] Override http request option.
1462
+ * @throws {RequiredError}
1463
+ */
1464
+ about: async (projectName: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
1465
+ // verify required parameter 'projectName' is not null or undefined
1466
+ assertParamExists('about', 'projectName', projectName)
1467
+ const localVarPath = `/projects/{projectName}/about`
1468
+ .replace(`{${"projectName"}}`, encodeURIComponent(String(projectName)));
1469
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
1470
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
1471
+ let baseOptions;
1472
+ if (configuration) {
1473
+ baseOptions = configuration.baseOptions;
1474
+ }
1475
+
1476
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
1477
+ const localVarHeaderParameter = {} as any;
1478
+ const localVarQueryParameter = {} as any;
1479
+
1480
+
1481
+
1482
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
1483
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1484
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
1485
+
1486
+ return {
1487
+ url: toPathString(localVarUrlObj),
1488
+ options: localVarRequestOptions,
1489
+ };
1490
+ },
1491
+ }
1492
+ };
1493
+
1494
+ /**
1495
+ * DefaultApi - functional programming interface
1496
+ * @export
1497
+ */
1498
+ export const DefaultApiFp = function(configuration?: Configuration) {
1499
+ const localVarAxiosParamCreator = DefaultApiAxiosParamCreator(configuration)
1500
+ return {
1501
+ /**
1502
+ *
1503
+ * @summary Returns metadata about the publisher service.
1504
+ * @param {string} projectName Name of project
1505
+ * @param {*} [options] Override http request option.
1506
+ * @throws {RequiredError}
1507
+ */
1508
+ async about(projectName: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<About>> {
1509
+ const localVarAxiosArgs = await localVarAxiosParamCreator.about(projectName, options);
1510
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
1511
+ const localVarOperationServerBasePath = operationServerMap['DefaultApi.about']?.[localVarOperationServerIndex]?.url;
1512
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1513
+ },
1514
+ }
1515
+ };
1516
+
1517
+ /**
1518
+ * DefaultApi - factory interface
1519
+ * @export
1520
+ */
1521
+ export const DefaultApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
1522
+ const localVarFp = DefaultApiFp(configuration)
1523
+ return {
1524
+ /**
1525
+ *
1526
+ * @summary Returns metadata about the publisher service.
1527
+ * @param {string} projectName Name of project
1528
+ * @param {*} [options] Override http request option.
1529
+ * @throws {RequiredError}
1530
+ */
1531
+ about(projectName: string, options?: RawAxiosRequestConfig): AxiosPromise<About> {
1532
+ return localVarFp.about(projectName, options).then((request) => request(axios, basePath));
1533
+ },
1534
+ };
1535
+ };
1536
+
1537
+ /**
1538
+ * DefaultApi - object-oriented interface
1539
+ * @export
1540
+ * @class DefaultApi
1541
+ * @extends {BaseAPI}
1542
+ */
1543
+ export class DefaultApi extends BaseAPI {
1544
+ /**
1545
+ *
1546
+ * @summary Returns metadata about the publisher service.
1547
+ * @param {string} projectName Name of project
1548
+ * @param {*} [options] Override http request option.
1549
+ * @throws {RequiredError}
1550
+ * @memberof DefaultApi
1551
+ */
1552
+ public about(projectName: string, options?: RawAxiosRequestConfig) {
1553
+ return DefaultApiFp(this.configuration).about(projectName, options).then((request) => request(this.axios, this.basePath));
1554
+ }
1555
+ }
1556
+
1557
+
1558
+
1559
+ /**
1560
+ * ModelsApi - axios parameter creator
1561
+ * @export
1562
+ */
1563
+ export const ModelsApiAxiosParamCreator = function (configuration?: Configuration) {
1564
+ return {
1565
+ /**
1566
+ *
1567
+ * @summary Returns a Malloy model.
1568
+ * @param {string} projectName Name of project
1569
+ * @param {string} packageName Name of package.
1570
+ * @param {string} path Path to model wihin the package.
1571
+ * @param {string} [versionId] Version ID
1572
+ * @param {*} [options] Override http request option.
1573
+ * @throws {RequiredError}
1574
+ */
1575
+ getModel: async (projectName: string, packageName: string, path: string, versionId?: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
1576
+ // verify required parameter 'projectName' is not null or undefined
1577
+ assertParamExists('getModel', 'projectName', projectName)
1578
+ // verify required parameter 'packageName' is not null or undefined
1579
+ assertParamExists('getModel', 'packageName', packageName)
1580
+ // verify required parameter 'path' is not null or undefined
1581
+ assertParamExists('getModel', 'path', path)
1582
+ const localVarPath = `/projects/{projectName}/packages/{packageName}/models/{path}`
1583
+ .replace(`{${"projectName"}}`, encodeURIComponent(String(projectName)))
1584
+ .replace(`{${"packageName"}}`, encodeURIComponent(String(packageName)))
1585
+ .replace(`{${"path"}}`, encodeURIComponent(String(path)));
1586
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
1587
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
1588
+ let baseOptions;
1589
+ if (configuration) {
1590
+ baseOptions = configuration.baseOptions;
1591
+ }
1592
+
1593
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
1594
+ const localVarHeaderParameter = {} as any;
1595
+ const localVarQueryParameter = {} as any;
1596
+
1597
+ if (versionId !== undefined) {
1598
+ localVarQueryParameter['versionId'] = versionId;
1599
+ }
1600
+
1601
+
1602
+
1603
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
1604
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1605
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
1606
+
1607
+ return {
1608
+ url: toPathString(localVarUrlObj),
1609
+ options: localVarRequestOptions,
1610
+ };
1611
+ },
1612
+ /**
1613
+ *
1614
+ * @summary Returns a list of relative paths to the models in the package.
1615
+ * @param {string} projectName Name of project
1616
+ * @param {string} packageName Name of package
1617
+ * @param {string} [versionId] Version ID
1618
+ * @param {*} [options] Override http request option.
1619
+ * @throws {RequiredError}
1620
+ */
1621
+ listModels: async (projectName: string, packageName: string, versionId?: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
1622
+ // verify required parameter 'projectName' is not null or undefined
1623
+ assertParamExists('listModels', 'projectName', projectName)
1624
+ // verify required parameter 'packageName' is not null or undefined
1625
+ assertParamExists('listModels', 'packageName', packageName)
1626
+ const localVarPath = `/projects/{projectName}/packages/{packageName}/models`
1627
+ .replace(`{${"projectName"}}`, encodeURIComponent(String(projectName)))
1628
+ .replace(`{${"packageName"}}`, encodeURIComponent(String(packageName)));
1629
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
1630
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
1631
+ let baseOptions;
1632
+ if (configuration) {
1633
+ baseOptions = configuration.baseOptions;
1634
+ }
1635
+
1636
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
1637
+ const localVarHeaderParameter = {} as any;
1638
+ const localVarQueryParameter = {} as any;
1639
+
1640
+ if (versionId !== undefined) {
1641
+ localVarQueryParameter['versionId'] = versionId;
1642
+ }
1643
+
1644
+
1645
+
1646
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
1647
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1648
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
1649
+
1650
+ return {
1651
+ url: toPathString(localVarUrlObj),
1652
+ options: localVarRequestOptions,
1653
+ };
1654
+ },
1655
+ }
1656
+ };
1657
+
1658
+ /**
1659
+ * ModelsApi - functional programming interface
1660
+ * @export
1661
+ */
1662
+ export const ModelsApiFp = function(configuration?: Configuration) {
1663
+ const localVarAxiosParamCreator = ModelsApiAxiosParamCreator(configuration)
1664
+ return {
1665
+ /**
1666
+ *
1667
+ * @summary Returns a Malloy model.
1668
+ * @param {string} projectName Name of project
1669
+ * @param {string} packageName Name of package.
1670
+ * @param {string} path Path to model wihin the package.
1671
+ * @param {string} [versionId] Version ID
1672
+ * @param {*} [options] Override http request option.
1673
+ * @throws {RequiredError}
1674
+ */
1675
+ async getModel(projectName: string, packageName: string, path: string, versionId?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CompiledModel>> {
1676
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getModel(projectName, packageName, path, versionId, options);
1677
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
1678
+ const localVarOperationServerBasePath = operationServerMap['ModelsApi.getModel']?.[localVarOperationServerIndex]?.url;
1679
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1680
+ },
1681
+ /**
1682
+ *
1683
+ * @summary Returns a list of relative paths to the models in the package.
1684
+ * @param {string} projectName Name of project
1685
+ * @param {string} packageName Name of package
1686
+ * @param {string} [versionId] Version ID
1687
+ * @param {*} [options] Override http request option.
1688
+ * @throws {RequiredError}
1689
+ */
1690
+ async listModels(projectName: string, packageName: string, versionId?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<Model>>> {
1691
+ const localVarAxiosArgs = await localVarAxiosParamCreator.listModels(projectName, packageName, versionId, options);
1692
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
1693
+ const localVarOperationServerBasePath = operationServerMap['ModelsApi.listModels']?.[localVarOperationServerIndex]?.url;
1694
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1695
+ },
1696
+ }
1697
+ };
1698
+
1699
+ /**
1700
+ * ModelsApi - factory interface
1701
+ * @export
1702
+ */
1703
+ export const ModelsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
1704
+ const localVarFp = ModelsApiFp(configuration)
1705
+ return {
1706
+ /**
1707
+ *
1708
+ * @summary Returns a Malloy model.
1709
+ * @param {string} projectName Name of project
1710
+ * @param {string} packageName Name of package.
1711
+ * @param {string} path Path to model wihin the package.
1712
+ * @param {string} [versionId] Version ID
1713
+ * @param {*} [options] Override http request option.
1714
+ * @throws {RequiredError}
1715
+ */
1716
+ getModel(projectName: string, packageName: string, path: string, versionId?: string, options?: RawAxiosRequestConfig): AxiosPromise<CompiledModel> {
1717
+ return localVarFp.getModel(projectName, packageName, path, versionId, options).then((request) => request(axios, basePath));
1718
+ },
1719
+ /**
1720
+ *
1721
+ * @summary Returns a list of relative paths to the models in the package.
1722
+ * @param {string} projectName Name of project
1723
+ * @param {string} packageName Name of package
1724
+ * @param {string} [versionId] Version ID
1725
+ * @param {*} [options] Override http request option.
1726
+ * @throws {RequiredError}
1727
+ */
1728
+ listModels(projectName: string, packageName: string, versionId?: string, options?: RawAxiosRequestConfig): AxiosPromise<Array<Model>> {
1729
+ return localVarFp.listModels(projectName, packageName, versionId, options).then((request) => request(axios, basePath));
1730
+ },
1731
+ };
1732
+ };
1733
+
1734
+ /**
1735
+ * ModelsApi - object-oriented interface
1736
+ * @export
1737
+ * @class ModelsApi
1738
+ * @extends {BaseAPI}
1739
+ */
1740
+ export class ModelsApi extends BaseAPI {
1741
+ /**
1742
+ *
1743
+ * @summary Returns a Malloy model.
1744
+ * @param {string} projectName Name of project
1745
+ * @param {string} packageName Name of package.
1746
+ * @param {string} path Path to model wihin the package.
1747
+ * @param {string} [versionId] Version ID
1748
+ * @param {*} [options] Override http request option.
1749
+ * @throws {RequiredError}
1750
+ * @memberof ModelsApi
1751
+ */
1752
+ public getModel(projectName: string, packageName: string, path: string, versionId?: string, options?: RawAxiosRequestConfig) {
1753
+ return ModelsApiFp(this.configuration).getModel(projectName, packageName, path, versionId, options).then((request) => request(this.axios, this.basePath));
1754
+ }
1755
+
1756
+ /**
1757
+ *
1758
+ * @summary Returns a list of relative paths to the models in the package.
1759
+ * @param {string} projectName Name of project
1760
+ * @param {string} packageName Name of package
1761
+ * @param {string} [versionId] Version ID
1762
+ * @param {*} [options] Override http request option.
1763
+ * @throws {RequiredError}
1764
+ * @memberof ModelsApi
1765
+ */
1766
+ public listModels(projectName: string, packageName: string, versionId?: string, options?: RawAxiosRequestConfig) {
1767
+ return ModelsApiFp(this.configuration).listModels(projectName, packageName, versionId, options).then((request) => request(this.axios, this.basePath));
1768
+ }
1769
+ }
1770
+
1771
+
1772
+
1773
+ /**
1774
+ * PackagesApi - axios parameter creator
1775
+ * @export
1776
+ */
1777
+ export const PackagesApiAxiosParamCreator = function (configuration?: Configuration) {
1778
+ return {
1779
+ /**
1780
+ *
1781
+ * @summary Returns the package metadata.
1782
+ * @param {string} projectName Name of project
1783
+ * @param {string} packageName Package name
1784
+ * @param {string} [versionId] Version ID
1785
+ * @param {*} [options] Override http request option.
1786
+ * @throws {RequiredError}
1787
+ */
1788
+ getPackage: async (projectName: string, packageName: string, versionId?: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
1789
+ // verify required parameter 'projectName' is not null or undefined
1790
+ assertParamExists('getPackage', 'projectName', projectName)
1791
+ // verify required parameter 'packageName' is not null or undefined
1792
+ assertParamExists('getPackage', 'packageName', packageName)
1793
+ const localVarPath = `/projects/{projectName}/packages/{packageName}`
1794
+ .replace(`{${"projectName"}}`, encodeURIComponent(String(projectName)))
1795
+ .replace(`{${"packageName"}}`, encodeURIComponent(String(packageName)));
1796
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
1797
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
1798
+ let baseOptions;
1799
+ if (configuration) {
1800
+ baseOptions = configuration.baseOptions;
1801
+ }
1802
+
1803
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
1804
+ const localVarHeaderParameter = {} as any;
1805
+ const localVarQueryParameter = {} as any;
1806
+
1807
+ if (versionId !== undefined) {
1808
+ localVarQueryParameter['versionId'] = versionId;
1809
+ }
1810
+
1811
+
1812
+
1813
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
1814
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1815
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
1816
+
1817
+ return {
1818
+ url: toPathString(localVarUrlObj),
1819
+ options: localVarRequestOptions,
1820
+ };
1821
+ },
1822
+ /**
1823
+ *
1824
+ * @summary Returns a list of the Packages hosted on this server.
1825
+ * @param {string} projectName Name of project
1826
+ * @param {*} [options] Override http request option.
1827
+ * @throws {RequiredError}
1828
+ */
1829
+ listPackages: async (projectName: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
1830
+ // verify required parameter 'projectName' is not null or undefined
1831
+ assertParamExists('listPackages', 'projectName', projectName)
1832
+ const localVarPath = `/projects/{projectName}/packages`
1833
+ .replace(`{${"projectName"}}`, encodeURIComponent(String(projectName)));
1834
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
1835
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
1836
+ let baseOptions;
1837
+ if (configuration) {
1838
+ baseOptions = configuration.baseOptions;
1839
+ }
1840
+
1841
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
1842
+ const localVarHeaderParameter = {} as any;
1843
+ const localVarQueryParameter = {} as any;
1844
+
1845
+
1846
+
1847
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
1848
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1849
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
1850
+
1851
+ return {
1852
+ url: toPathString(localVarUrlObj),
1853
+ options: localVarRequestOptions,
1854
+ };
1855
+ },
1856
+ }
1857
+ };
1858
+
1859
+ /**
1860
+ * PackagesApi - functional programming interface
1861
+ * @export
1862
+ */
1863
+ export const PackagesApiFp = function(configuration?: Configuration) {
1864
+ const localVarAxiosParamCreator = PackagesApiAxiosParamCreator(configuration)
1865
+ return {
1866
+ /**
1867
+ *
1868
+ * @summary Returns the package metadata.
1869
+ * @param {string} projectName Name of project
1870
+ * @param {string} packageName Package name
1871
+ * @param {string} [versionId] Version ID
1872
+ * @param {*} [options] Override http request option.
1873
+ * @throws {RequiredError}
1874
+ */
1875
+ async getPackage(projectName: string, packageName: string, versionId?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Package>> {
1876
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getPackage(projectName, packageName, versionId, options);
1877
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
1878
+ const localVarOperationServerBasePath = operationServerMap['PackagesApi.getPackage']?.[localVarOperationServerIndex]?.url;
1879
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1880
+ },
1881
+ /**
1882
+ *
1883
+ * @summary Returns a list of the Packages hosted on this server.
1884
+ * @param {string} projectName Name of project
1885
+ * @param {*} [options] Override http request option.
1886
+ * @throws {RequiredError}
1887
+ */
1888
+ async listPackages(projectName: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<Package>>> {
1889
+ const localVarAxiosArgs = await localVarAxiosParamCreator.listPackages(projectName, options);
1890
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
1891
+ const localVarOperationServerBasePath = operationServerMap['PackagesApi.listPackages']?.[localVarOperationServerIndex]?.url;
1892
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1893
+ },
1894
+ }
1895
+ };
1896
+
1897
+ /**
1898
+ * PackagesApi - factory interface
1899
+ * @export
1900
+ */
1901
+ export const PackagesApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
1902
+ const localVarFp = PackagesApiFp(configuration)
1903
+ return {
1904
+ /**
1905
+ *
1906
+ * @summary Returns the package metadata.
1907
+ * @param {string} projectName Name of project
1908
+ * @param {string} packageName Package name
1909
+ * @param {string} [versionId] Version ID
1910
+ * @param {*} [options] Override http request option.
1911
+ * @throws {RequiredError}
1912
+ */
1913
+ getPackage(projectName: string, packageName: string, versionId?: string, options?: RawAxiosRequestConfig): AxiosPromise<Package> {
1914
+ return localVarFp.getPackage(projectName, packageName, versionId, options).then((request) => request(axios, basePath));
1915
+ },
1916
+ /**
1917
+ *
1918
+ * @summary Returns a list of the Packages hosted on this server.
1919
+ * @param {string} projectName Name of project
1920
+ * @param {*} [options] Override http request option.
1921
+ * @throws {RequiredError}
1922
+ */
1923
+ listPackages(projectName: string, options?: RawAxiosRequestConfig): AxiosPromise<Array<Package>> {
1924
+ return localVarFp.listPackages(projectName, options).then((request) => request(axios, basePath));
1925
+ },
1926
+ };
1927
+ };
1928
+
1929
+ /**
1930
+ * PackagesApi - object-oriented interface
1931
+ * @export
1932
+ * @class PackagesApi
1933
+ * @extends {BaseAPI}
1934
+ */
1935
+ export class PackagesApi extends BaseAPI {
1936
+ /**
1937
+ *
1938
+ * @summary Returns the package metadata.
1939
+ * @param {string} projectName Name of project
1940
+ * @param {string} packageName Package name
1941
+ * @param {string} [versionId] Version ID
1942
+ * @param {*} [options] Override http request option.
1943
+ * @throws {RequiredError}
1944
+ * @memberof PackagesApi
1945
+ */
1946
+ public getPackage(projectName: string, packageName: string, versionId?: string, options?: RawAxiosRequestConfig) {
1947
+ return PackagesApiFp(this.configuration).getPackage(projectName, packageName, versionId, options).then((request) => request(this.axios, this.basePath));
1948
+ }
1949
+
1950
+ /**
1951
+ *
1952
+ * @summary Returns a list of the Packages hosted on this server.
1953
+ * @param {string} projectName Name of project
1954
+ * @param {*} [options] Override http request option.
1955
+ * @throws {RequiredError}
1956
+ * @memberof PackagesApi
1957
+ */
1958
+ public listPackages(projectName: string, options?: RawAxiosRequestConfig) {
1959
+ return PackagesApiFp(this.configuration).listPackages(projectName, options).then((request) => request(this.axios, this.basePath));
1960
+ }
1961
+ }
1962
+
1963
+
1964
+
1965
+ /**
1966
+ * ProjectsApi - axios parameter creator
1967
+ * @export
1968
+ */
1969
+ export const ProjectsApiAxiosParamCreator = function (configuration?: Configuration) {
1970
+ return {
1971
+ /**
1972
+ *
1973
+ * @summary Returns a list of the Projects hosted on this server.
1974
+ * @param {*} [options] Override http request option.
1975
+ * @throws {RequiredError}
1976
+ */
1977
+ listProjects: async (options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
1978
+ const localVarPath = `/projects`;
1979
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
1980
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
1981
+ let baseOptions;
1982
+ if (configuration) {
1983
+ baseOptions = configuration.baseOptions;
1984
+ }
1985
+
1986
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
1987
+ const localVarHeaderParameter = {} as any;
1988
+ const localVarQueryParameter = {} as any;
1989
+
1990
+
1991
+
1992
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
1993
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1994
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
1995
+
1996
+ return {
1997
+ url: toPathString(localVarUrlObj),
1998
+ options: localVarRequestOptions,
1999
+ };
2000
+ },
2001
+ }
2002
+ };
2003
+
2004
+ /**
2005
+ * ProjectsApi - functional programming interface
2006
+ * @export
2007
+ */
2008
+ export const ProjectsApiFp = function(configuration?: Configuration) {
2009
+ const localVarAxiosParamCreator = ProjectsApiAxiosParamCreator(configuration)
2010
+ return {
2011
+ /**
2012
+ *
2013
+ * @summary Returns a list of the Projects hosted on this server.
2014
+ * @param {*} [options] Override http request option.
2015
+ * @throws {RequiredError}
2016
+ */
2017
+ async listProjects(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<Project>>> {
2018
+ const localVarAxiosArgs = await localVarAxiosParamCreator.listProjects(options);
2019
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
2020
+ const localVarOperationServerBasePath = operationServerMap['ProjectsApi.listProjects']?.[localVarOperationServerIndex]?.url;
2021
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
2022
+ },
2023
+ }
2024
+ };
2025
+
2026
+ /**
2027
+ * ProjectsApi - factory interface
2028
+ * @export
2029
+ */
2030
+ export const ProjectsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
2031
+ const localVarFp = ProjectsApiFp(configuration)
2032
+ return {
2033
+ /**
2034
+ *
2035
+ * @summary Returns a list of the Projects hosted on this server.
2036
+ * @param {*} [options] Override http request option.
2037
+ * @throws {RequiredError}
2038
+ */
2039
+ listProjects(options?: RawAxiosRequestConfig): AxiosPromise<Array<Project>> {
2040
+ return localVarFp.listProjects(options).then((request) => request(axios, basePath));
2041
+ },
2042
+ };
2043
+ };
2044
+
2045
+ /**
2046
+ * ProjectsApi - object-oriented interface
2047
+ * @export
2048
+ * @class ProjectsApi
2049
+ * @extends {BaseAPI}
2050
+ */
2051
+ export class ProjectsApi extends BaseAPI {
2052
+ /**
2053
+ *
2054
+ * @summary Returns a list of the Projects hosted on this server.
2055
+ * @param {*} [options] Override http request option.
2056
+ * @throws {RequiredError}
2057
+ * @memberof ProjectsApi
2058
+ */
2059
+ public listProjects(options?: RawAxiosRequestConfig) {
2060
+ return ProjectsApiFp(this.configuration).listProjects(options).then((request) => request(this.axios, this.basePath));
2061
+ }
2062
+ }
2063
+
2064
+
2065
+
2066
+ /**
2067
+ * QueryresultsApi - axios parameter creator
2068
+ * @export
2069
+ */
2070
+ export const QueryresultsApiAxiosParamCreator = function (configuration?: Configuration) {
2071
+ return {
2072
+ /**
2073
+ *
2074
+ * @summary Returns a query and its results.
2075
+ * @param {string} projectName Name of project
2076
+ * @param {string} packageName Name of package
2077
+ * @param {string} path Path to model within the package.
2078
+ * @param {string} [query] Query string to execute on the model. If the query is paramter is set, the queryName parameter must be empty.
2079
+ * @param {string} [sourceName] Name of the source in the model to use for queryName, search, and topValue requests.
2080
+ * @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.
2081
+ * @param {string} [versionId] Version ID
2082
+ * @param {*} [options] Override http request option.
2083
+ * @throws {RequiredError}
2084
+ */
2085
+ executeQuery: async (projectName: string, packageName: string, path: string, query?: string, sourceName?: string, queryName?: string, versionId?: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
2086
+ // verify required parameter 'projectName' is not null or undefined
2087
+ assertParamExists('executeQuery', 'projectName', projectName)
2088
+ // verify required parameter 'packageName' is not null or undefined
2089
+ assertParamExists('executeQuery', 'packageName', packageName)
2090
+ // verify required parameter 'path' is not null or undefined
2091
+ assertParamExists('executeQuery', 'path', path)
2092
+ const localVarPath = `/projects/{projectName}/packages/{packageName}/queryResults/{path}`
2093
+ .replace(`{${"projectName"}}`, encodeURIComponent(String(projectName)))
2094
+ .replace(`{${"packageName"}}`, encodeURIComponent(String(packageName)))
2095
+ .replace(`{${"path"}}`, encodeURIComponent(String(path)));
2096
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
2097
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
2098
+ let baseOptions;
2099
+ if (configuration) {
2100
+ baseOptions = configuration.baseOptions;
2101
+ }
2102
+
2103
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
2104
+ const localVarHeaderParameter = {} as any;
2105
+ const localVarQueryParameter = {} as any;
2106
+
2107
+ if (query !== undefined) {
2108
+ localVarQueryParameter['query'] = query;
2109
+ }
2110
+
2111
+ if (sourceName !== undefined) {
2112
+ localVarQueryParameter['sourceName'] = sourceName;
2113
+ }
2114
+
2115
+ if (queryName !== undefined) {
2116
+ localVarQueryParameter['queryName'] = queryName;
2117
+ }
2118
+
2119
+ if (versionId !== undefined) {
2120
+ localVarQueryParameter['versionId'] = versionId;
2121
+ }
2122
+
2123
+
2124
+
2125
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
2126
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
2127
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
2128
+
2129
+ return {
2130
+ url: toPathString(localVarUrlObj),
2131
+ options: localVarRequestOptions,
2132
+ };
2133
+ },
2134
+ }
2135
+ };
2136
+
2137
+ /**
2138
+ * QueryresultsApi - functional programming interface
2139
+ * @export
2140
+ */
2141
+ export const QueryresultsApiFp = function(configuration?: Configuration) {
2142
+ const localVarAxiosParamCreator = QueryresultsApiAxiosParamCreator(configuration)
2143
+ return {
2144
+ /**
2145
+ *
2146
+ * @summary Returns a query and its results.
2147
+ * @param {string} projectName Name of project
2148
+ * @param {string} packageName Name of package
2149
+ * @param {string} path Path to model within the package.
2150
+ * @param {string} [query] Query string to execute on the model. If the query is paramter is set, the queryName parameter must be empty.
2151
+ * @param {string} [sourceName] Name of the source in the model to use for queryName, search, and topValue requests.
2152
+ * @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.
2153
+ * @param {string} [versionId] Version ID
2154
+ * @param {*} [options] Override http request option.
2155
+ * @throws {RequiredError}
2156
+ */
2157
+ async executeQuery(projectName: string, packageName: string, path: string, query?: string, sourceName?: string, queryName?: string, versionId?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<QueryResult>> {
2158
+ const localVarAxiosArgs = await localVarAxiosParamCreator.executeQuery(projectName, packageName, path, query, sourceName, queryName, versionId, options);
2159
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
2160
+ const localVarOperationServerBasePath = operationServerMap['QueryresultsApi.executeQuery']?.[localVarOperationServerIndex]?.url;
2161
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
2162
+ },
2163
+ }
2164
+ };
2165
+
2166
+ /**
2167
+ * QueryresultsApi - factory interface
2168
+ * @export
2169
+ */
2170
+ export const QueryresultsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
2171
+ const localVarFp = QueryresultsApiFp(configuration)
2172
+ return {
2173
+ /**
2174
+ *
2175
+ * @summary Returns a query and its results.
2176
+ * @param {string} projectName Name of project
2177
+ * @param {string} packageName Name of package
2178
+ * @param {string} path Path to model within the package.
2179
+ * @param {string} [query] Query string to execute on the model. If the query is paramter is set, the queryName parameter must be empty.
2180
+ * @param {string} [sourceName] Name of the source in the model to use for queryName, search, and topValue requests.
2181
+ * @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.
2182
+ * @param {string} [versionId] Version ID
2183
+ * @param {*} [options] Override http request option.
2184
+ * @throws {RequiredError}
2185
+ */
2186
+ executeQuery(projectName: string, packageName: string, path: string, query?: string, sourceName?: string, queryName?: string, versionId?: string, options?: RawAxiosRequestConfig): AxiosPromise<QueryResult> {
2187
+ return localVarFp.executeQuery(projectName, packageName, path, query, sourceName, queryName, versionId, options).then((request) => request(axios, basePath));
2188
+ },
2189
+ };
2190
+ };
2191
+
2192
+ /**
2193
+ * QueryresultsApi - object-oriented interface
2194
+ * @export
2195
+ * @class QueryresultsApi
2196
+ * @extends {BaseAPI}
2197
+ */
2198
+ export class QueryresultsApi extends BaseAPI {
2199
+ /**
2200
+ *
2201
+ * @summary Returns a query and its results.
2202
+ * @param {string} projectName Name of project
2203
+ * @param {string} packageName Name of package
2204
+ * @param {string} path Path to model within the package.
2205
+ * @param {string} [query] Query string to execute on the model. If the query is paramter is set, the queryName parameter must be empty.
2206
+ * @param {string} [sourceName] Name of the source in the model to use for queryName, search, and topValue requests.
2207
+ * @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.
2208
+ * @param {string} [versionId] Version ID
2209
+ * @param {*} [options] Override http request option.
2210
+ * @throws {RequiredError}
2211
+ * @memberof QueryresultsApi
2212
+ */
2213
+ public executeQuery(projectName: string, packageName: string, path: string, query?: string, sourceName?: string, queryName?: string, versionId?: string, options?: RawAxiosRequestConfig) {
2214
+ return QueryresultsApiFp(this.configuration).executeQuery(projectName, packageName, path, query, sourceName, queryName, versionId, options).then((request) => request(this.axios, this.basePath));
2215
+ }
2216
+ }
2217
+
2218
+
2219
+
2220
+ /**
2221
+ * SchedulesApi - axios parameter creator
2222
+ * @export
2223
+ */
2224
+ export const SchedulesApiAxiosParamCreator = function (configuration?: Configuration) {
2225
+ return {
2226
+ /**
2227
+ *
2228
+ * @summary Returns a list of running schedules.
2229
+ * @param {string} projectName Name of project
2230
+ * @param {string} packageName Name of package
2231
+ * @param {string} [versionId] Version ID
2232
+ * @param {*} [options] Override http request option.
2233
+ * @throws {RequiredError}
2234
+ */
2235
+ listSchedules: async (projectName: string, packageName: string, versionId?: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
2236
+ // verify required parameter 'projectName' is not null or undefined
2237
+ assertParamExists('listSchedules', 'projectName', projectName)
2238
+ // verify required parameter 'packageName' is not null or undefined
2239
+ assertParamExists('listSchedules', 'packageName', packageName)
2240
+ const localVarPath = `/projects/{projectName}/packages/{packageName}/schedules`
2241
+ .replace(`{${"projectName"}}`, encodeURIComponent(String(projectName)))
2242
+ .replace(`{${"packageName"}}`, encodeURIComponent(String(packageName)));
2243
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
2244
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
2245
+ let baseOptions;
2246
+ if (configuration) {
2247
+ baseOptions = configuration.baseOptions;
2248
+ }
2249
+
2250
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
2251
+ const localVarHeaderParameter = {} as any;
2252
+ const localVarQueryParameter = {} as any;
2253
+
2254
+ if (versionId !== undefined) {
2255
+ localVarQueryParameter['versionId'] = versionId;
2256
+ }
2257
+
2258
+
2259
+
2260
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
2261
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
2262
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
2263
+
2264
+ return {
2265
+ url: toPathString(localVarUrlObj),
2266
+ options: localVarRequestOptions,
2267
+ };
2268
+ },
2269
+ }
2270
+ };
2271
+
2272
+ /**
2273
+ * SchedulesApi - functional programming interface
2274
+ * @export
2275
+ */
2276
+ export const SchedulesApiFp = function(configuration?: Configuration) {
2277
+ const localVarAxiosParamCreator = SchedulesApiAxiosParamCreator(configuration)
2278
+ return {
2279
+ /**
2280
+ *
2281
+ * @summary Returns a list of running schedules.
2282
+ * @param {string} projectName Name of project
2283
+ * @param {string} packageName Name of package
2284
+ * @param {string} [versionId] Version ID
2285
+ * @param {*} [options] Override http request option.
2286
+ * @throws {RequiredError}
2287
+ */
2288
+ async listSchedules(projectName: string, packageName: string, versionId?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<Schedule>>> {
2289
+ const localVarAxiosArgs = await localVarAxiosParamCreator.listSchedules(projectName, packageName, versionId, options);
2290
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
2291
+ const localVarOperationServerBasePath = operationServerMap['SchedulesApi.listSchedules']?.[localVarOperationServerIndex]?.url;
2292
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
2293
+ },
2294
+ }
2295
+ };
2296
+
2297
+ /**
2298
+ * SchedulesApi - factory interface
2299
+ * @export
2300
+ */
2301
+ export const SchedulesApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
2302
+ const localVarFp = SchedulesApiFp(configuration)
2303
+ return {
2304
+ /**
2305
+ *
2306
+ * @summary Returns a list of running schedules.
2307
+ * @param {string} projectName Name of project
2308
+ * @param {string} packageName Name of package
2309
+ * @param {string} [versionId] Version ID
2310
+ * @param {*} [options] Override http request option.
2311
+ * @throws {RequiredError}
2312
+ */
2313
+ listSchedules(projectName: string, packageName: string, versionId?: string, options?: RawAxiosRequestConfig): AxiosPromise<Array<Schedule>> {
2314
+ return localVarFp.listSchedules(projectName, packageName, versionId, options).then((request) => request(axios, basePath));
2315
+ },
2316
+ };
2317
+ };
2318
+
2319
+ /**
2320
+ * SchedulesApi - object-oriented interface
2321
+ * @export
2322
+ * @class SchedulesApi
2323
+ * @extends {BaseAPI}
2324
+ */
2325
+ export class SchedulesApi extends BaseAPI {
2326
+ /**
2327
+ *
2328
+ * @summary Returns a list of running schedules.
2329
+ * @param {string} projectName Name of project
2330
+ * @param {string} packageName Name of package
2331
+ * @param {string} [versionId] Version ID
2332
+ * @param {*} [options] Override http request option.
2333
+ * @throws {RequiredError}
2334
+ * @memberof SchedulesApi
2335
+ */
2336
+ public listSchedules(projectName: string, packageName: string, versionId?: string, options?: RawAxiosRequestConfig) {
2337
+ return SchedulesApiFp(this.configuration).listSchedules(projectName, packageName, versionId, options).then((request) => request(this.axios, this.basePath));
2338
+ }
2339
+ }
2340
+
2341
+
2342
+