From 50f1afcaf680515337d00735ff5fe44fd80f19ec Mon Sep 17 00:00:00 2001 From: Sentio Bot Date: Tue, 12 Nov 2024 19:01:18 +0000 Subject: [PATCH] chore: update --- src/.gitattributes | 8 + src/.gitignore | 1 + src/DataApi.md | 1395 +++++++++ src/DebugAndSimulationApi.md | 824 ++++++ src/ForksApi.md | 950 +++++++ src/PriceApi.md | 249 ++ src/README.md | 80 + src/WebApi.md | 541 ++++ src/apis/DataApi.ts | 1491 ++++++---- src/apis/DebugAndSimulationApi.ts | 1315 +++++---- src/apis/ForksApi.ts | 1423 ++++++---- src/apis/PriceApi.ts | 425 +-- src/apis/WebApi.ts | 962 ++++--- src/apis/baseapi.ts | 37 + src/apis/exception.ts | 15 + src/apis/index.ts | 7 - src/auth/auth.ts | 79 + src/configuration.ts | 82 + src/git_push.sh | 51 + src/http/http.ts | 256 ++ src/http/isomorphic-fetch.ts | 32 + src/index.ts | 17 +- src/middleware.ts | 66 + ...ticServiceAnalyticServiceExecuteSQLBody.ts | 155 +- .../AnalyticServiceLogQueryRequestFilter.ts | 101 +- .../AnalyticServiceLogQueryRequestSort.ts | 78 +- src/models/AnalyticServiceLogQueryResponse.ts | 118 +- src/models/AnalyticServiceSQLQuery.ts | 125 +- ...nalyticServiceSearchServiceQueryLogBody.ts | 216 +- .../AnalyticServiceSyncExecuteSQLResponse.ts | 133 +- src/models/CommonAggregate.ts | 97 +- src/models/CommonAggregateAggregateOps.ts | 51 +- src/models/CommonAny.ts | 162 +- src/models/CommonArgument.ts | 132 +- src/models/CommonBigDecimal.ts | 95 +- src/models/CommonBigInteger.ts | 78 +- src/models/CommonCachePolicy.ts | 116 +- src/models/CommonChannel.ts | 252 +- src/models/CommonChannelType.ts | 55 +- src/models/CommonCohortsFilter.ts | 148 +- src/models/CommonCohortsFilterAggregation.ts | 143 +- ...rtsFilterAggregationAggregateProperties.ts | 97 +- ...ationAggregatePropertiesAggregationType.ts | 59 +- ...monCohortsFilterAggregationOperatorType.ts | 59 +- src/models/CommonCohortsGroup.ts | 105 +- src/models/CommonCohortsQuery.ts | 135 +- src/models/CommonCoinID.ts | 95 +- src/models/CommonCoinIDAddressIdentifier.ts | 78 +- src/models/CommonColumnState.ts | 125 +- src/models/CommonColumnStateSort.ts | 78 +- src/models/CommonComputeStats.ts | 138 +- src/models/CommonDuration.ts | 78 +- src/models/CommonEventLogColumn.ts | 153 +- src/models/CommonEventLogConfig.ts | 103 +- src/models/CommonEventLogEntry.ts | 288 +- src/models/CommonFormula.ts | 133 +- src/models/CommonFunction.ts | 95 +- src/models/CommonJoinOperator.ts | 47 +- src/models/CommonMatrix.ts | 95 +- src/models/CommonMatrixMetric.ts | 101 +- src/models/CommonMatrixSample.ts | 103 +- src/models/CommonMatrixValue.ts | 78 +- src/models/CommonOrganization.ts | 223 +- src/models/CommonOrganizationMember.ts | 105 +- src/models/CommonOrganizationRole.ts | 45 +- src/models/CommonOwner.ts | 128 +- src/models/CommonPermission.ts | 47 +- src/models/CommonPriceSegmentationQuery.ts | 125 +- src/models/CommonProject.ts | 390 +-- src/models/CommonProjectInfo.ts | 283 +- src/models/CommonProjectProjectMember.ts | 95 +- src/models/CommonProjectSuperset.ts | 101 +- src/models/CommonProjectType.ts | 47 +- src/models/CommonProjectView.ts | 125 +- .../CommonProjectViewProjectViewConfig.ts | 72 +- src/models/CommonProjectVisibility.ts | 45 +- src/models/CommonQuery.ts | 171 +- src/models/CommonRetentionMatrix.ts | 72 +- src/models/CommonRetentionMatrixSample.ts | 147 +- src/models/CommonRetentionQuery.ts | 194 +- src/models/CommonRetentionQueryCriteria.ts | 45 +- src/models/CommonRetentionQueryFilter.ts | 103 +- .../CommonRetentionQueryFilterTimeFilter.ts | 72 +- ...ommonRetentionQueryFilterTimeFilterType.ts | 47 +- src/models/CommonRetentionQueryInterval.ts | 97 +- .../CommonRetentionQueryIntervalUnit.ts | 47 +- src/models/CommonRetentionQueryResource.ts | 95 +- src/models/CommonRichStruct.ts | 72 +- src/models/CommonRichValue.ts | 254 +- src/models/CommonRichValueList.ts | 72 +- src/models/CommonRichValueNullValue.ts | 43 +- src/models/CommonSegmentParameter.ts | 78 +- src/models/CommonSegmentationQuery.ts | 216 +- .../CommonSegmentationQueryAggregation.ts | 133 +- ...tionQueryAggregationAggregateProperties.ts | 97 +- ...ationAggregatePropertiesAggregationType.ts | 79 +- ...SegmentationQueryAggregationCountUnique.ts | 72 +- src/models/CommonSegmentationQueryResource.ts | 135 +- .../CommonSegmentationQueryResourceType.ts | 45 +- .../CommonSegmentationQuerySelectorExpr.ts | 103 +- ...nSegmentationQuerySelectorExprLogicExpr.ts | 105 +- src/models/CommonSelector.ts | 120 +- src/models/CommonSelectorExpr.ts | 103 +- src/models/CommonSelectorExprLogicExpr.ts | 105 +- src/models/CommonSelectorOperatorType.ts | 71 +- src/models/CommonStringList.ts | 63 +- src/models/CommonTabularData.ts | 132 +- src/models/CommonTabularDataColumnType.ts | 51 +- src/models/CommonTier.ts | 51 +- src/models/CommonTimeRange.ts | 140 +- src/models/CommonTimeRangeLite.ts | 118 +- src/models/CommonTimeRangeRelativeTime.ts | 101 +- src/models/CommonTimeRangeTimeLike.ts | 95 +- src/models/CommonUser.ts | 275 +- src/models/CommonUserAccountStatus.ts | 49 +- src/models/CommonUserInfo.ts | 139 +- src/models/EvmAccessListItem.ts | 78 +- src/models/EvmTransaction.ts | 297 +- src/models/EvmTransactionReceipt.ts | 153 +- src/models/GoogleApiHttpBody.ts | 110 +- src/models/GoogleProtobufAny.ts | 181 +- src/models/GoogleProtobufNullValue.ts | 49 +- src/models/InsightsServiceDataSource.ts | 53 +- ...InsightsServiceInsightsServiceQueryBody.ts | 216 +- ...ghtsServiceInsightsServiceRetentionBody.ts | 133 +- .../InsightsServiceListCoinsResponse.ts | 103 +- .../InsightsServiceQueryRequestQuery.ts | 156 +- src/models/InsightsServiceQueryResponse.ts | 72 +- .../InsightsServiceQueryResponseResult.ts | 163 +- src/models/InsightsServiceRetentionRequest.ts | 155 +- .../InsightsServiceRetentionResponse.ts | 118 +- .../MetricsServiceGetMetricsResponse.ts | 72 +- src/models/MetricsServiceMetricInfo.ts | 185 +- .../MetricsServiceMetricInfoLabelValues.ts | 63 +- src/models/MetricsServiceMetricMetadata.ts | 116 +- .../MetricsServiceMetricsQueryResponse.ts | 72 +- ...etricsServiceMetricsQueryResponseMatrix.ts | 95 +- ...etricsServiceMetricsQueryResponseMetric.ts | 101 +- ...etricsServiceMetricsQueryResponseResult.ts | 140 +- ...etricsServiceMetricsQueryResponseSample.ts | 103 +- ...MetricsServiceMetricsQueryResponseValue.ts | 78 +- ...icsServiceObservabilityServiceQueryBody.ts | 170 +- ...rviceObservabilityServiceQueryRangeBody.ts | 179 +- .../MetricsServiceQueryValueResponse.ts | 72 +- .../MetricsServiceQueryValueResponseResult.ts | 125 +- src/models/ObjectSerializer.ts | 1004 +++++++ .../PriceServiceBatchGetPricesRequest.ts | 95 +- .../PriceServiceBatchGetPricesResponse.ts | 72 +- ...eServiceBatchGetPricesResponseCoinPrice.ts | 118 +- ...iceBatchGetPricesResponseCoinPricePrice.ts | 72 +- .../PriceServiceCheckLatestPriceResponse.ts | 95 +- ...erviceCheckLatestPriceResponseCoinPrice.ts | 110 +- src/models/PriceServiceCoinID.ts | 94 +- .../PriceServiceCoinIDAddressIdentifier.ts | 86 +- src/models/PriceServiceGetPriceResponse.ts | 89 +- src/models/PriceServiceListCoinsResponse.ts | 95 +- src/models/SolidityServiceBaseChainConfig.ts | 162 +- src/models/SolidityServiceBlockOverrides.ts | 138 +- src/models/SolidityServiceChainIdentifier.ts | 78 +- ...ityServiceCompileSourceInternalResponse.ts | 72 +- src/models/SolidityServiceCompilerOptions.ts | 133 +- src/models/SolidityServiceContractKeyInfo.ts | 78 +- .../SolidityServiceCreateForkResponse.ts | 72 +- .../SolidityServiceDecodeStateDiffResponse.ts | 63 +- src/models/SolidityServiceExternalFork.ts | 95 +- src/models/SolidityServiceFailure.ts | 78 +- ...yServiceFetchAndCompileInternalResponse.ts | 95 +- src/models/SolidityServiceFork.ts | 193 +- ...olidityServiceForkServiceCreateForkBody.ts | 73 +- ...olidityServiceForkServiceUpdateForkBody.ts | 73 +- src/models/SolidityServiceForkType.ts | 45 +- .../SolidityServiceGetForkInfoResponse.ts | 170 +- src/models/SolidityServiceGetForkResponse.ts | 72 +- ...idityServiceGetSimulationBundleResponse.ts | 95 +- .../SolidityServiceGetSimulationResponse.ts | 72 +- .../SolidityServiceGetSimulationsResponse.ts | 125 +- ...erviceGetStorageSummaryInternalResponse.ts | 72 +- ...erviceGetTraceCallInternalRequestBundle.ts | 95 +- ...GetTraceCallInternalRequestStateContext.ts | 78 +- ...dityServiceGetTraceCallInternalResponse.ts | 101 +- ...viceGetTraceTransactionInternalResponse.ts | 63 +- .../SolidityServiceListForksResponse.ts | 72 +- src/models/SolidityServiceManagedFork.ts | 110 +- src/models/SolidityServiceMetadata.ts | 101 +- src/models/SolidityServiceNodeEnvironment.ts | 116 +- src/models/SolidityServiceNodeForkConfig.ts | 101 +- src/models/SolidityServiceOptimizer.ts | 110 +- src/models/SolidityServiceOptimizerDetails.ts | 125 +- ...lidityServiceOptimizerDetailsYulDetails.ts | 78 +- ...cePreProcessCompilationInternalResponse.ts | 63 +- src/models/SolidityServiceSettings.ts | 155 +- ...erviceSimulateTransactionBundleResponse.ts | 110 +- ...idityServiceSimulateTransactionResponse.ts | 72 +- src/models/SolidityServiceSimulation.ts | 462 ++- src/models/SolidityServiceSimulationResult.ts | 103 +- ...lidityAPIServiceSimulateTransactionBody.ts | 73 +- ...APIServiceSimulateTransactionBundleBody.ts | 74 +- ...viceSimulateTransactionBundleOnForkBody.ts | 74 +- ...APIServiceSimulateTransactionOnForkBody.ts | 73 +- .../SolidityServiceSourceFetcherType.ts | 47 +- src/models/SolidityServiceSourceInfo.ts | 95 +- src/models/SolidityServiceSourceMultiFile.ts | 78 +- src/models/SolidityServiceSourceSpec.ts | 162 +- src/models/SolidityServiceSpecializations.ts | 63 +- src/models/SolidityServiceStateOverride.ts | 102 +- .../SolidityServiceStorageSummaryResult.ts | 101 +- .../SolidityServiceUpdateForkResponse.ts | 72 +- src/models/TxindexEvmRawTransaction.ts | 222 +- .../TxindexEvmSearchTransactionsResponse.ts | 95 +- src/models/WebServiceChart.ts | 294 +- src/models/WebServiceChartChartType.ts | 59 +- src/models/WebServiceChartConfig.ts | 256 +- .../WebServiceChartConfigBarGaugeConfig.ts | 128 +- .../WebServiceChartConfigCalculation.ts | 55 +- src/models/WebServiceChartConfigColorTheme.ts | 101 +- src/models/WebServiceChartConfigColumnSort.ts | 78 +- .../WebServiceChartConfigCompareTime.ts | 72 +- src/models/WebServiceChartConfigDirection.ts | 45 +- src/models/WebServiceChartConfigLineConfig.ts | 72 +- .../WebServiceChartConfigLineConfigStyle.ts | 45 +- .../WebServiceChartConfigMappingRule.ts | 125 +- src/models/WebServiceChartConfigMarker.ts | 132 +- src/models/WebServiceChartConfigMarkerType.ts | 47 +- src/models/WebServiceChartConfigPieConfig.ts | 135 +- .../WebServiceChartConfigPieConfigPieType.ts | 45 +- .../WebServiceChartConfigQueryValueConfig.ts | 135 +- src/models/WebServiceChartConfigSort.ts | 97 +- src/models/WebServiceChartConfigSortBy.ts | 45 +- .../WebServiceChartConfigTableConfig.ts | 208 +- .../WebServiceChartConfigTimeRangeOverride.ts | 118 +- .../WebServiceChartConfigValueConfig.ts | 208 +- .../WebServiceChartConfigValueConfigStyle.ts | 53 +- .../WebServiceChartConfigValueFormatter.ts | 47 +- .../WebServiceChartConfigYAxisConfig.ts | 116 +- src/models/WebServiceChartDataSourceType.ts | 55 +- src/models/WebServiceDashboard.ts | 314 +-- .../WebServiceDashboardDashboardVisibility.ts | 47 +- src/models/WebServiceDashboardExtra.ts | 103 +- ...ebServiceDashboardExtraTemplateVariable.ts | 116 +- .../WebServiceDashboardExtraTemplateView.ts | 63 +- src/models/WebServiceDashboardLayouts.ts | 72 +- .../WebServiceDashboardLayoutsLayout.ts | 123 +- .../WebServiceDashboardResponsiveLayouts.ts | 72 +- src/models/WebServiceDashboardSharing.ts | 116 +- src/models/WebServiceEventLogsConfig.ts | 133 +- ...ServiceEventLogsConfigTimeRangeOverride.ts | 95 +- .../WebServiceExportDashboardResponse.ts | 63 +- src/models/WebServiceGetDashboardResponse.ts | 103 +- .../WebServiceGetProjectListResponse.ts | 110 +- src/models/WebServiceGetProjectResponse.ts | 103 +- .../WebServiceImportDashboardRequest.ts | 106 +- .../WebServiceImportDashboardResponse.ts | 72 +- src/models/WebServiceNote.ts | 163 +- src/models/WebServiceNoteAlignment.ts | 47 +- src/models/WebServiceNoteFontSize.ts | 51 +- src/models/WebServiceNoteVerticalAlignment.ts | 47 +- src/models/WebServicePanel.ts | 125 +- src/models/all.ts | 233 ++ src/models/index.ts | 235 -- src/package.json | 43 + src/runtime.ts | 426 --- src/rxjsStub.ts | 27 + src/servers.ts | 55 + src/tsconfig.json | 29 + src/types/ObjectParamAPI.ts | 2497 +++++++++++++++++ src/types/ObservableAPI.ts | 2013 +++++++++++++ src/types/PromiseAPI.ts | 1445 ++++++++++ src/util.ts | 37 + 268 files changed, 23644 insertions(+), 20291 deletions(-) create mode 100755 src/.gitattributes create mode 100755 src/.gitignore create mode 100755 src/DataApi.md create mode 100755 src/DebugAndSimulationApi.md create mode 100755 src/ForksApi.md create mode 100755 src/PriceApi.md create mode 100755 src/README.md create mode 100755 src/WebApi.md create mode 100755 src/apis/baseapi.ts create mode 100755 src/apis/exception.ts delete mode 100755 src/apis/index.ts create mode 100755 src/auth/auth.ts create mode 100755 src/configuration.ts create mode 100755 src/git_push.sh create mode 100755 src/http/http.ts create mode 100755 src/http/isomorphic-fetch.ts create mode 100755 src/middleware.ts create mode 100755 src/models/ObjectSerializer.ts create mode 100755 src/models/all.ts delete mode 100755 src/models/index.ts create mode 100755 src/package.json delete mode 100755 src/runtime.ts create mode 100755 src/rxjsStub.ts create mode 100755 src/servers.ts create mode 100755 src/tsconfig.json create mode 100755 src/types/ObjectParamAPI.ts create mode 100755 src/types/ObservableAPI.ts create mode 100755 src/types/PromiseAPI.ts create mode 100755 src/util.ts diff --git a/src/.gitattributes b/src/.gitattributes new file mode 100755 index 0000000..7bf5a17 --- /dev/null +++ b/src/.gitattributes @@ -0,0 +1,8 @@ +**/* linguist-generated +*.md linguist-documentation + +.gitattributes text +.gitattributes export-ignore + +.gitignore text +.gitignore export-ignore diff --git a/src/.gitignore b/src/.gitignore new file mode 100755 index 0000000..1521c8b --- /dev/null +++ b/src/.gitignore @@ -0,0 +1 @@ +dist diff --git a/src/DataApi.md b/src/DataApi.md new file mode 100755 index 0000000..1baa460 --- /dev/null +++ b/src/DataApi.md @@ -0,0 +1,1395 @@ +# .DataApi + +All URIs are relative to *https://app.sentio.xyz* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**executeSQL**](DataApi.md#executeSQL) | **POST** /api/v1/analytics/{owner}/{slug}/sql/execute | Execute SQL +[**getMetrics**](DataApi.md#getMetrics) | **GET** /api/v1/metrics | Get a list of metrics in a project +[**listCoins**](DataApi.md#listCoins) | **GET** /api/v1/insights/{owner}/{slug}/coins | List coins +[**listCoins2**](DataApi.md#listCoins2) | **GET** /api/v1/insights/coins | List coins +[**query**](DataApi.md#query) | **POST** /api/v1/insights/{owner}/{slug}/query | Insight Query +[**queryInstant**](DataApi.md#queryInstant) | **POST** /api/v1/metrics/{owner}/{slug}/query | Metric instant queries +[**queryLog**](DataApi.md#queryLog) | **POST** /api/v1/eventlogs/{owner}/{slug} | Query event logs +[**queryLog2**](DataApi.md#queryLog2) | **GET** /api/v1/eventlogs/{owner}/{slug}/query | Query event logs +[**queryRange**](DataApi.md#queryRange) | **POST** /api/v1/metrics/{owner}/{slug}/query_range | Metric range queries +[**retention**](DataApi.md#retention) | **POST** /api/v1/insights/{owner}/{slug}/retention | Retention query +[**retention2**](DataApi.md#retention2) | **POST** /api/v1/insights/retention | Retention query + + +# **executeSQL** +> AnalyticServiceSyncExecuteSQLResponse executeSQL(body) + +Execute SQL in a project. Go to \"Data Studio\" -> \"SQL Editor\", write your query and then click \"Export as cURL\" ![screenshot](https://raw.githubusercontent.com/sentioxyz/docs/main/.gitbook/assets/image%20(102).png) Find more: https://docs.sentio.xyz/reference/data#sql-api + +### Example + + +```typescript +import { createConfiguration, DataApi } from ''; +import type { DataApiExecuteSQLRequest } from ''; + +const configuration = createConfiguration(); +const apiInstance = new DataApi(configuration); + +const request: DataApiExecuteSQLRequest = { + // username or organization name + owner: "owner_example", + // project slug + slug: "slug_example", + + body: { + projectId: "projectId_example", + version: 1, + sqlQuery: { + sql: "sql_example", + size: 1, + parameters: { + fields: { + "key": { + nullValue: "NULL_VALUE", + intValue: 1, + floatValue: 3.14, + bytesValue: 'YQ==', + boolValue: true, + stringValue: "stringValue_example", + timestampValue: new Date('1970-01-01T00:00:00.00Z'), + bigintValue: { + negative: true, + data: 'YQ==', + }, + bigdecimalValue: { + value: { + negative: true, + data: 'YQ==', + }, + exp: 1, + }, + listValue: { + values: [ + , + ], + }, + structValue: , + }, + }, + }, + name: "name_example", + }, + cursor: "cursor_example", + bypassCache: true, + cachePolicy: { + cacheTtlSecs: 1, + cacheRefreshTtlSecs: 1, + forceRefresh: true, + noCache: true, + }, + }, +}; + +const data = await apiInstance.executeSQL(request); +console.log('API called successfully. Returned data:', data); +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | **AnalyticServiceAnalyticServiceExecuteSQLBody**| | + **owner** | [**string**] | username or organization name | defaults to undefined + **slug** | [**string**] | project slug | defaults to undefined + + +### Return type + +**AnalyticServiceSyncExecuteSQLResponse** + +### Authorization + +[ApiKeyAuth](README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | A successful response. | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **getMetrics** +> MetricsServiceGetMetricsResponse getMetrics() + + +### Example + + +```typescript +import { createConfiguration, DataApi } from ''; +import type { DataApiGetMetricsRequest } from ''; + +const configuration = createConfiguration(); +const apiInstance = new DataApi(configuration); + +const request: DataApiGetMetricsRequest = { + + projectId: "projectId_example", + + name: "name_example", + + version: 1, +}; + +const data = await apiInstance.getMetrics(request); +console.log('API called successfully. Returned data:', data); +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **projectId** | [**string**] | | (optional) defaults to undefined + **name** | [**string**] | | (optional) defaults to undefined + **version** | [**number**] | | (optional) defaults to undefined + + +### Return type + +**MetricsServiceGetMetricsResponse** + +### Authorization + +[ApiKeyAuth](README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | A successful response. | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **listCoins** +> InsightsServiceListCoinsResponse listCoins() + +Get a list of coins in a project. + +### Example + + +```typescript +import { createConfiguration, DataApi } from ''; +import type { DataApiListCoinsRequest } from ''; + +const configuration = createConfiguration(); +const apiInstance = new DataApi(configuration); + +const request: DataApiListCoinsRequest = { + + owner: "owner_example", + + slug: "slug_example", + + projectId: "projectId_example", + + version: 1, + + limit: 1, + + offset: 1, + + searchQuery: "searchQuery_example", +}; + +const data = await apiInstance.listCoins(request); +console.log('API called successfully. Returned data:', data); +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | [**string**] | | defaults to undefined + **slug** | [**string**] | | defaults to undefined + **projectId** | [**string**] | | (optional) defaults to undefined + **version** | [**number**] | | (optional) defaults to undefined + **limit** | [**number**] | | (optional) defaults to undefined + **offset** | [**number**] | | (optional) defaults to undefined + **searchQuery** | [**string**] | | (optional) defaults to undefined + + +### Return type + +**InsightsServiceListCoinsResponse** + +### Authorization + +[ApiKeyAuth](README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | A successful response. | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **listCoins2** +> InsightsServiceListCoinsResponse listCoins2() + +Get a list of coins in a project. + +### Example + + +```typescript +import { createConfiguration, DataApi } from ''; +import type { DataApiListCoins2Request } from ''; + +const configuration = createConfiguration(); +const apiInstance = new DataApi(configuration); + +const request: DataApiListCoins2Request = { + + projectOwner: "projectOwner_example", + + projectSlug: "projectSlug_example", + + projectId: "projectId_example", + + version: 1, + + limit: 1, + + offset: 1, + + searchQuery: "searchQuery_example", +}; + +const data = await apiInstance.listCoins2(request); +console.log('API called successfully. Returned data:', data); +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **projectOwner** | [**string**] | | (optional) defaults to undefined + **projectSlug** | [**string**] | | (optional) defaults to undefined + **projectId** | [**string**] | | (optional) defaults to undefined + **version** | [**number**] | | (optional) defaults to undefined + **limit** | [**number**] | | (optional) defaults to undefined + **offset** | [**number**] | | (optional) defaults to undefined + **searchQuery** | [**string**] | | (optional) defaults to undefined + + +### Return type + +**InsightsServiceListCoinsResponse** + +### Authorization + +[ApiKeyAuth](README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | A successful response. | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **query** +> InsightsServiceQueryResponse query(body) + +Query for metrics,event logs and coin prices in a project. + +### Example + + +```typescript +import { createConfiguration, DataApi } from ''; +import type { DataApiQueryRequest } from ''; + +const configuration = createConfiguration(); +const apiInstance = new DataApi(configuration); + +const request: DataApiQueryRequest = { + // username or organization name + owner: "owner_example", + // project slug + slug: "slug_example", + + body: { + projectId: "projectId_example", + version: 1, + timeRange: { + start: "start_example", + end: "end_example", + step: 1, + timezone: "timezone_example", + }, + queries: [ + { + metricsQuery: { + query: "query_example", + alias: "alias_example", + id: "id_example", + labelSelector: { + "key": "key_example", + }, + aggregate: { + op: "AVG", + grouping: [ + "grouping_example", + ], + }, + functions: [ + { + name: "name_example", + arguments: [ + { + stringValue: "stringValue_example", + intValue: 1, + doubleValue: 3.14, + boolValue: true, + durationValue: { + value: 3.14, + unit: "unit_example", + }, + }, + ], + }, + ], + disabled: true, + }, + eventsQuery: { + resource: { + name: "name_example", + type: "EVENTS", + cohortsId: "cohortsId_example", + cohortsQuery: { + joinOperator: "AND", + groups: [ + { + joinOperator: "AND", + filters: [ + { + symbol: true, + name: "name_example", + aggregation: { + total: {}, + aggregateProperties: { + type: "SUM", + propertyName: "propertyName_example", + }, + operator: "EQ", + value: [ + { + intValue: 1, + longValue: "longValue_example", + doubleValue: 3.14, + stringValue: "stringValue_example", + boolValue: true, + dateValue: new Date('1970-01-01T00:00:00.00Z'), + listValue: { + values: [ + "values_example", + ], + }, + }, + ], + }, + selectorExpr: { + selector: { + key: "key_example", + operator: "EQ", + value: [ + { + intValue: 1, + longValue: "longValue_example", + doubleValue: 3.14, + stringValue: "stringValue_example", + boolValue: true, + dateValue: new Date('1970-01-01T00:00:00.00Z'), + listValue: { + values: [ + "values_example", + ], + }, + }, + ], + }, + logicExpr: { + expressions: [ + , + ], + operator: "AND", + }, + }, + timeRange: { + start: "start_example", + end: "end_example", + step: 1, + timezone: "timezone_example", + }, + }, + ], + }, + ], + name: "name_example", + id: "id_example", + }, + }, + alias: "alias_example", + id: "id_example", + aggregation: { + total: {}, + unique: {}, + countUnique: { + duration: { + value: 3.14, + unit: "unit_example", + }, + }, + aggregateProperties: { + type: "SUM", + propertyName: "propertyName_example", + }, + }, + selectorExpr: { + selector: { + key: "key_example", + operator: "EQ", + value: [ + { + intValue: 1, + longValue: "longValue_example", + doubleValue: 3.14, + stringValue: "stringValue_example", + boolValue: true, + dateValue: new Date('1970-01-01T00:00:00.00Z'), + listValue: { + values: [ + "values_example", + ], + }, + }, + ], + }, + logicExpr: { + expressions: [ + , + ], + operator: "AND", + }, + }, + groupBy: [ + "groupBy_example", + ], + limit: 1, + functions: [ + { + name: "name_example", + arguments: [ + { + stringValue: "stringValue_example", + intValue: 1, + doubleValue: 3.14, + boolValue: true, + durationValue: { + value: 3.14, + unit: "unit_example", + }, + }, + ], + }, + ], + disabled: true, + }, + priceQuery: { + id: "id_example", + alias: "alias_example", + coinId: [ + { + symbol: "symbol_example", + address: { + address: "address_example", + chain: "chain_example", + }, + }, + ], + disabled: true, + }, + dataSource: "METRICS", + sourceName: "sourceName_example", + }, + ], + formulas: [ + { + expression: "expression_example", + alias: "alias_example", + id: "id_example", + disabled: true, + functions: [ + { + name: "name_example", + arguments: [ + { + stringValue: "stringValue_example", + intValue: 1, + doubleValue: 3.14, + boolValue: true, + durationValue: { + value: 3.14, + unit: "unit_example", + }, + }, + ], + }, + ], + }, + ], + limit: 1, + offset: 1, + bypassCache: true, + cachePolicy: { + cacheTtlSecs: 1, + cacheRefreshTtlSecs: 1, + forceRefresh: true, + noCache: true, + }, + }, +}; + +const data = await apiInstance.query(request); +console.log('API called successfully. Returned data:', data); +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | **InsightsServiceInsightsServiceQueryBody**| | + **owner** | [**string**] | username or organization name | defaults to undefined + **slug** | [**string**] | project slug | defaults to undefined + + +### Return type + +**InsightsServiceQueryResponse** + +### Authorization + +[ApiKeyAuth](README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | A successful response. | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **queryInstant** +> MetricsServiceQueryValueResponse queryInstant(body) + + +### Example + + +```typescript +import { createConfiguration, DataApi } from ''; +import type { DataApiQueryInstantRequest } from ''; + +const configuration = createConfiguration(); +const apiInstance = new DataApi(configuration); + +const request: DataApiQueryInstantRequest = { + // username or organization name + owner: "owner_example", + // project slug + slug: "slug_example", + + body: { + queries: [ + { + query: "query_example", + alias: "alias_example", + id: "id_example", + labelSelector: { + "key": "key_example", + }, + aggregate: { + op: "AVG", + grouping: [ + "grouping_example", + ], + }, + functions: [ + { + name: "name_example", + arguments: [ + { + stringValue: "stringValue_example", + intValue: 1, + doubleValue: 3.14, + boolValue: true, + durationValue: { + value: 3.14, + unit: "unit_example", + }, + }, + ], + }, + ], + disabled: true, + }, + ], + formulas: [ + { + expression: "expression_example", + alias: "alias_example", + id: "id_example", + disabled: true, + functions: [ + { + name: "name_example", + arguments: [ + { + stringValue: "stringValue_example", + intValue: 1, + doubleValue: 3.14, + boolValue: true, + durationValue: { + value: 3.14, + unit: "unit_example", + }, + }, + ], + }, + ], + }, + ], + time: "time_example", + samplesLimit: 1, + version: 1, + timezone: "timezone_example", + samplesOffset: 1, + }, +}; + +const data = await apiInstance.queryInstant(request); +console.log('API called successfully. Returned data:', data); +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | **MetricsServiceObservabilityServiceQueryBody**| | + **owner** | [**string**] | username or organization name | defaults to undefined + **slug** | [**string**] | project slug | defaults to undefined + + +### Return type + +**MetricsServiceQueryValueResponse** + +### Authorization + +[ApiKeyAuth](README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | A successful response. | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **queryLog** +> AnalyticServiceLogQueryResponse queryLog(body) + + +### Example + + +```typescript +import { createConfiguration, DataApi } from ''; +import type { DataApiQueryLogRequest } from ''; + +const configuration = createConfiguration(); +const apiInstance = new DataApi(configuration); + +const request: DataApiQueryLogRequest = { + + owner: "owner_example", + + slug: "slug_example", + + body: { + projectId: "projectId_example", + query: "query_example", + timeRange: { + start: { + relativeTime: { + unit: "unit_example", + value: 1, + align: "align_example", + }, + absoluteTime: "absoluteTime_example", + }, + end: { + relativeTime: { + unit: "unit_example", + value: 1, + align: "align_example", + }, + absoluteTime: "absoluteTime_example", + }, + step: "step_example", + interval: { + value: 3.14, + unit: "unit_example", + }, + timezone: "timezone_example", + }, + sorts: [ + { + field: "field_example", + desc: true, + }, + ], + after: [ + { + intValue: 1, + longValue: "longValue_example", + doubleValue: 3.14, + stringValue: "stringValue_example", + boolValue: true, + dateValue: new Date('1970-01-01T00:00:00.00Z'), + listValue: { + values: [ + "values_example", + ], + }, + }, + ], + limit: 1, + offset: 1, + filters: [ + { + field: "field_example", + value: "value_example", + not: true, + }, + ], + version: 1, + }, +}; + +const data = await apiInstance.queryLog(request); +console.log('API called successfully. Returned data:', data); +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | **AnalyticServiceSearchServiceQueryLogBody**| | + **owner** | [**string**] | | defaults to undefined + **slug** | [**string**] | | defaults to undefined + + +### Return type + +**AnalyticServiceLogQueryResponse** + +### Authorization + +[ApiKeyAuth](README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | A successful response. | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **queryLog2** +> AnalyticServiceLogQueryResponse queryLog2() + + +### Example + + +```typescript +import { createConfiguration, DataApi } from ''; +import type { DataApiQueryLog2Request } from ''; + +const configuration = createConfiguration(); +const apiInstance = new DataApi(configuration); + +const request: DataApiQueryLog2Request = { + + owner: "owner_example", + + slug: "slug_example", + + projectId: "projectId_example", + + query: "query_example", + + timeRangeStartRelativeTimeUnit: "timeRange.start.relativeTime.unit_example", + + timeRangeStartRelativeTimeValue: 1, + + timeRangeStartRelativeTimeAlign: "timeRange.start.relativeTime.align_example", + + timeRangeStartAbsoluteTime: "timeRange.start.absoluteTime_example", + + timeRangeEndRelativeTimeUnit: "timeRange.end.relativeTime.unit_example", + + timeRangeEndRelativeTimeValue: 1, + + timeRangeEndRelativeTimeAlign: "timeRange.end.relativeTime.align_example", + + timeRangeEndAbsoluteTime: "timeRange.end.absoluteTime_example", + + timeRangeStep: "timeRange.step_example", + + timeRangeIntervalValue: 3.14, + + timeRangeIntervalUnit: "timeRange.interval.unit_example", + + timeRangeTimezone: "timeRange.timezone_example", + + limit: 1, + + offset: 1, + + version: 1, +}; + +const data = await apiInstance.queryLog2(request); +console.log('API called successfully. Returned data:', data); +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | [**string**] | | defaults to undefined + **slug** | [**string**] | | defaults to undefined + **projectId** | [**string**] | | (optional) defaults to undefined + **query** | [**string**] | | (optional) defaults to undefined + **timeRangeStartRelativeTimeUnit** | [**string**] | | (optional) defaults to undefined + **timeRangeStartRelativeTimeValue** | [**number**] | | (optional) defaults to undefined + **timeRangeStartRelativeTimeAlign** | [**string**] | | (optional) defaults to undefined + **timeRangeStartAbsoluteTime** | [**string**] | | (optional) defaults to undefined + **timeRangeEndRelativeTimeUnit** | [**string**] | | (optional) defaults to undefined + **timeRangeEndRelativeTimeValue** | [**number**] | | (optional) defaults to undefined + **timeRangeEndRelativeTimeAlign** | [**string**] | | (optional) defaults to undefined + **timeRangeEndAbsoluteTime** | [**string**] | | (optional) defaults to undefined + **timeRangeStep** | [**string**] | | (optional) defaults to undefined + **timeRangeIntervalValue** | [**number**] | | (optional) defaults to undefined + **timeRangeIntervalUnit** | [**string**] | | (optional) defaults to undefined + **timeRangeTimezone** | [**string**] | | (optional) defaults to undefined + **limit** | [**number**] | | (optional) defaults to undefined + **offset** | [**number**] | | (optional) defaults to undefined + **version** | [**number**] | | (optional) defaults to undefined + + +### Return type + +**AnalyticServiceLogQueryResponse** + +### Authorization + +[ApiKeyAuth](README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | A successful response. | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **queryRange** +> MetricsServiceMetricsQueryResponse queryRange(body) + +The easiest way to build query is through UI, you could first create an insight chart, and then **Export as cURL**. ![screenshot](https://raw.githubusercontent.com/sentioxyz/docs/main/.gitbook/assets/image%20(101).png) + +### Example + + +```typescript +import { createConfiguration, DataApi } from ''; +import type { DataApiQueryRangeRequest } from ''; + +const configuration = createConfiguration(); +const apiInstance = new DataApi(configuration); + +const request: DataApiQueryRangeRequest = { + // username or organization name + owner: "owner_example", + // project slug + slug: "slug_example", + + body: { + queries: [ + { + query: "query_example", + alias: "alias_example", + id: "id_example", + labelSelector: { + "key": "key_example", + }, + aggregate: { + op: "AVG", + grouping: [ + "grouping_example", + ], + }, + functions: [ + { + name: "name_example", + arguments: [ + { + stringValue: "stringValue_example", + intValue: 1, + doubleValue: 3.14, + boolValue: true, + durationValue: { + value: 3.14, + unit: "unit_example", + }, + }, + ], + }, + ], + disabled: true, + }, + ], + formulas: [ + { + expression: "expression_example", + alias: "alias_example", + id: "id_example", + disabled: true, + functions: [ + { + name: "name_example", + arguments: [ + { + stringValue: "stringValue_example", + intValue: 1, + doubleValue: 3.14, + boolValue: true, + durationValue: { + value: 3.14, + unit: "unit_example", + }, + }, + ], + }, + ], + }, + ], + samplesLimit: 1, + timeRange: { + start: "start_example", + end: "end_example", + step: 1, + timezone: "timezone_example", + }, + projectId: "projectId_example", + version: 1, + samplesOffset: 1, + }, +}; + +const data = await apiInstance.queryRange(request); +console.log('API called successfully. Returned data:', data); +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | **MetricsServiceObservabilityServiceQueryRangeBody**| | + **owner** | [**string**] | username or organization name | defaults to undefined + **slug** | [**string**] | project slug | defaults to undefined + + +### Return type + +**MetricsServiceMetricsQueryResponse** + +### Authorization + +[ApiKeyAuth](README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | A successful response. | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **retention** +> InsightsServiceRetentionResponse retention(body) + +Query for retention. + +### Example + + +```typescript +import { createConfiguration, DataApi } from ''; +import type { DataApiRetentionRequest } from ''; + +const configuration = createConfiguration(); +const apiInstance = new DataApi(configuration); + +const request: DataApiRetentionRequest = { + + owner: "owner_example", + + slug: "slug_example", + + body: { + projectId: "projectId_example", + version: 1, + timeRange: { + start: "start_example", + end: "end_example", + step: 1, + timezone: "timezone_example", + }, + query: { + resources: [ + { + eventNames: [ + "eventNames_example", + ], + filter: { + propertyFilter: { + selector: { + key: "key_example", + operator: "EQ", + value: [ + { + intValue: 1, + longValue: "longValue_example", + doubleValue: 3.14, + stringValue: "stringValue_example", + boolValue: true, + dateValue: new Date('1970-01-01T00:00:00.00Z'), + listValue: { + values: [ + "values_example", + ], + }, + }, + ], + }, + logicExpr: { + expressions: [ + , + ], + operator: "AND", + }, + }, + timeFilter: { + type: "Disable", + }, + }, + }, + ], + criteria: "OnOrAfter", + interval: { + value: 1, + unit: "Day", + }, + selectorExpr: { + selector: { + key: "key_example", + operator: "EQ", + value: [ + { + intValue: 1, + longValue: "longValue_example", + doubleValue: 3.14, + stringValue: "stringValue_example", + boolValue: true, + dateValue: new Date('1970-01-01T00:00:00.00Z'), + listValue: { + values: [ + "values_example", + ], + }, + }, + ], + }, + logicExpr: { + expressions: [ + , + ], + operator: "AND", + }, + }, + groupBy: [ + "groupBy_example", + ], + segmentBy: [ + { + cohortId: "cohortId_example", + allUsers: true, + }, + ], + windowSize: 1, + }, + }, +}; + +const data = await apiInstance.retention(request); +console.log('API called successfully. Returned data:', data); +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | **InsightsServiceInsightsServiceRetentionBody**| | + **owner** | [**string**] | | defaults to undefined + **slug** | [**string**] | | defaults to undefined + + +### Return type + +**InsightsServiceRetentionResponse** + +### Authorization + +[ApiKeyAuth](README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | A successful response. | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **retention2** +> InsightsServiceRetentionResponse retention2(body) + +Query for retention. + +### Example + + +```typescript +import { createConfiguration, DataApi } from ''; +import type { DataApiRetention2Request } from ''; + +const configuration = createConfiguration(); +const apiInstance = new DataApi(configuration); + +const request: DataApiRetention2Request = { + + body: { + projectOwner: "projectOwner_example", + projectSlug: "projectSlug_example", + projectId: "projectId_example", + version: 1, + timeRange: { + start: "start_example", + end: "end_example", + step: 1, + timezone: "timezone_example", + }, + query: { + resources: [ + { + eventNames: [ + "eventNames_example", + ], + filter: { + propertyFilter: { + selector: { + key: "key_example", + operator: "EQ", + value: [ + { + intValue: 1, + longValue: "longValue_example", + doubleValue: 3.14, + stringValue: "stringValue_example", + boolValue: true, + dateValue: new Date('1970-01-01T00:00:00.00Z'), + listValue: { + values: [ + "values_example", + ], + }, + }, + ], + }, + logicExpr: { + expressions: [ + , + ], + operator: "AND", + }, + }, + timeFilter: { + type: "Disable", + }, + }, + }, + ], + criteria: "OnOrAfter", + interval: { + value: 1, + unit: "Day", + }, + selectorExpr: { + selector: { + key: "key_example", + operator: "EQ", + value: [ + { + intValue: 1, + longValue: "longValue_example", + doubleValue: 3.14, + stringValue: "stringValue_example", + boolValue: true, + dateValue: new Date('1970-01-01T00:00:00.00Z'), + listValue: { + values: [ + "values_example", + ], + }, + }, + ], + }, + logicExpr: { + expressions: [ + , + ], + operator: "AND", + }, + }, + groupBy: [ + "groupBy_example", + ], + segmentBy: [ + { + cohortId: "cohortId_example", + allUsers: true, + }, + ], + windowSize: 1, + }, + }, +}; + +const data = await apiInstance.retention2(request); +console.log('API called successfully. Returned data:', data); +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | **InsightsServiceRetentionRequest**| | + + +### Return type + +**InsightsServiceRetentionResponse** + +### Authorization + +[ApiKeyAuth](README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | A successful response. | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + + diff --git a/src/DebugAndSimulationApi.md b/src/DebugAndSimulationApi.md new file mode 100755 index 0000000..d3e255d --- /dev/null +++ b/src/DebugAndSimulationApi.md @@ -0,0 +1,824 @@ +# .DebugAndSimulationApi + +All URIs are relative to *https://app.sentio.xyz* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**getCallTraceByBundle**](DebugAndSimulationApi.md#getCallTraceByBundle) | **GET** /api/v1/solidity/{owner}/{slug}/{chainId}/bundle/{bundleId}/call_trace | Get trace by bundle simulation +[**getCallTraceBySimulation**](DebugAndSimulationApi.md#getCallTraceBySimulation) | **GET** /api/v1/solidity/{owner}/{slug}/{chainId}/simulation/{simulationId}/call_trace | Get trace by simulation +[**getCallTraceByTransaction**](DebugAndSimulationApi.md#getCallTraceByTransaction) | **GET** /api/v1/solidity/{owner}/{slug}/{chainId}/transaction/{txHash}/call_trace | Get trace by transaction +[**getSimulation**](DebugAndSimulationApi.md#getSimulation) | **GET** /api/v1/solidity/{owner}/{slug}/simulation/{simulationId} | Get simulation by ID +[**getSimulationBundleInProject**](DebugAndSimulationApi.md#getSimulationBundleInProject) | **GET** /api/v1/solidity/{owner}/{slug}/simulation_bundle/{bundleId} | Get bundle simulation by ID +[**getSimulations**](DebugAndSimulationApi.md#getSimulations) | **GET** /api/v1/solidity/{owner}/{slug}/simulation | Get list of simulations +[**searchTransactions**](DebugAndSimulationApi.md#searchTransactions) | **GET** /api/v1/solidity/{owner}/{slug}/search_transactions | Search transactions +[**simulateTransaction**](DebugAndSimulationApi.md#simulateTransaction) | **POST** /api/v1/solidity/{owner}/{slug}/{chainId}/simulation | Run simulation +[**simulateTransactionBundle**](DebugAndSimulationApi.md#simulateTransactionBundle) | **POST** /api/v1/solidity/{owner}/{slug}/{chainId}/simulation_bundle | Run bundle simulation + + +# **getCallTraceByBundle** +> GoogleApiHttpBody getCallTraceByBundle() + + +### Example + + +```typescript +import { createConfiguration, DebugAndSimulationApi } from ''; +import type { DebugAndSimulationApiGetCallTraceByBundleRequest } from ''; + +const configuration = createConfiguration(); +const apiInstance = new DebugAndSimulationApi(configuration); + +const request: DebugAndSimulationApiGetCallTraceByBundleRequest = { + + owner: "owner_example", + + slug: "slug_example", + + chainId: "chainId_example", + + bundleId: "bundleId_example", + // Fetch the decoded trace, which will give you the function info, decoded parameters of both external and internal call trace. (optional) + withInternalCalls: true, + // Disable optimizations to make internal calls more accurate, but gas costs will differ from the actual execution. (optional) + disableOptimizer: true, + // Only effective when disableOptimizer=true. (optional) + ignoreGasCost: true, +}; + +const data = await apiInstance.getCallTraceByBundle(request); +console.log('API called successfully. Returned data:', data); +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | [**string**] | | defaults to undefined + **slug** | [**string**] | | defaults to undefined + **chainId** | [**string**] | | defaults to undefined + **bundleId** | [**string**] | | defaults to undefined + **withInternalCalls** | [**boolean**] | Fetch the decoded trace, which will give you the function info, decoded parameters of both external and internal call trace. | (optional) defaults to undefined + **disableOptimizer** | [**boolean**] | Disable optimizations to make internal calls more accurate, but gas costs will differ from the actual execution. | (optional) defaults to undefined + **ignoreGasCost** | [**boolean**] | Only effective when disableOptimizer=true. | (optional) defaults to undefined + + +### Return type + +**GoogleApiHttpBody** + +### Authorization + +[ApiKeyAuth](README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | A successful response. | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **getCallTraceBySimulation** +> GoogleApiHttpBody getCallTraceBySimulation() + + +### Example + + +```typescript +import { createConfiguration, DebugAndSimulationApi } from ''; +import type { DebugAndSimulationApiGetCallTraceBySimulationRequest } from ''; + +const configuration = createConfiguration(); +const apiInstance = new DebugAndSimulationApi(configuration); + +const request: DebugAndSimulationApiGetCallTraceBySimulationRequest = { + + owner: "owner_example", + + slug: "slug_example", + + chainId: "chainId_example", + + simulationId: "simulationId_example", + // Fetch the decoded trace, which will give you the function info, decoded parameters of both external and internal call trace. (optional) + withInternalCalls: true, + // Disable optimizations to make internal calls more accurate, but gas costs will differ from the actual execution. (optional) + disableOptimizer: true, + // Only effective when disableOptimizer=true. (optional) + ignoreGasCost: true, +}; + +const data = await apiInstance.getCallTraceBySimulation(request); +console.log('API called successfully. Returned data:', data); +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | [**string**] | | defaults to undefined + **slug** | [**string**] | | defaults to undefined + **chainId** | [**string**] | | defaults to undefined + **simulationId** | [**string**] | | defaults to undefined + **withInternalCalls** | [**boolean**] | Fetch the decoded trace, which will give you the function info, decoded parameters of both external and internal call trace. | (optional) defaults to undefined + **disableOptimizer** | [**boolean**] | Disable optimizations to make internal calls more accurate, but gas costs will differ from the actual execution. | (optional) defaults to undefined + **ignoreGasCost** | [**boolean**] | Only effective when disableOptimizer=true. | (optional) defaults to undefined + + +### Return type + +**GoogleApiHttpBody** + +### Authorization + +[ApiKeyAuth](README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | A successful response. | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **getCallTraceByTransaction** +> GoogleApiHttpBody getCallTraceByTransaction() + +API to get Sentio call trace. It takes `txId.txHash` and `chainSpec.chainId` arguments, where the first is transaction hash, and the second is the numeric ethereum chain ID. The results looks very similar to the normal [Ethereum call trace](https://raw.githubusercontent.com/sentioxyz/docs/main/.gitbook/assets/image%20(2)%20(1)%20(1)%20(1).png). But we have an additional `startIndex` and `startIndex` on each trace entry even for the LOG, representing the execution order in the trace. This allows you to build chart that marks the order of fund flow. ![screenshot](https://raw.githubusercontent.com/sentioxyz/docs/main/.gitbook/assets/image%20(2)%20(1)%20(1)%20(1).png) + +### Example + + +```typescript +import { createConfiguration, DebugAndSimulationApi } from ''; +import type { DebugAndSimulationApiGetCallTraceByTransactionRequest } from ''; + +const configuration = createConfiguration(); +const apiInstance = new DebugAndSimulationApi(configuration); + +const request: DebugAndSimulationApiGetCallTraceByTransactionRequest = { + + owner: "owner_example", + + slug: "slug_example", + + chainId: "chainId_example", + + txHash: "txHash_example", + // Fetch the decoded trace, which will give you the function info, decoded parameters of both external and internal call trace. (optional) + withInternalCalls: true, + // Disable optimizations to make internal calls more accurate, but gas costs will differ from the actual execution. (optional) + disableOptimizer: true, + // Only effective when disableOptimizer=true. (optional) + ignoreGasCost: true, +}; + +const data = await apiInstance.getCallTraceByTransaction(request); +console.log('API called successfully. Returned data:', data); +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | [**string**] | | defaults to undefined + **slug** | [**string**] | | defaults to undefined + **chainId** | [**string**] | | defaults to undefined + **txHash** | [**string**] | | defaults to undefined + **withInternalCalls** | [**boolean**] | Fetch the decoded trace, which will give you the function info, decoded parameters of both external and internal call trace. | (optional) defaults to undefined + **disableOptimizer** | [**boolean**] | Disable optimizations to make internal calls more accurate, but gas costs will differ from the actual execution. | (optional) defaults to undefined + **ignoreGasCost** | [**boolean**] | Only effective when disableOptimizer=true. | (optional) defaults to undefined + + +### Return type + +**GoogleApiHttpBody** + +### Authorization + +[ApiKeyAuth](README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | A successful response. | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **getSimulation** +> SolidityServiceGetSimulationResponse getSimulation() + + +### Example + + +```typescript +import { createConfiguration, DebugAndSimulationApi } from ''; +import type { DebugAndSimulationApiGetSimulationRequest } from ''; + +const configuration = createConfiguration(); +const apiInstance = new DebugAndSimulationApi(configuration); + +const request: DebugAndSimulationApiGetSimulationRequest = { + + owner: "owner_example", + + slug: "slug_example", + + simulationId: "simulationId_example", +}; + +const data = await apiInstance.getSimulation(request); +console.log('API called successfully. Returned data:', data); +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | [**string**] | | defaults to undefined + **slug** | [**string**] | | defaults to undefined + **simulationId** | [**string**] | | defaults to undefined + + +### Return type + +**SolidityServiceGetSimulationResponse** + +### Authorization + +[ApiKeyAuth](README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | A successful response. | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **getSimulationBundleInProject** +> SolidityServiceGetSimulationBundleResponse getSimulationBundleInProject() + + +### Example + + +```typescript +import { createConfiguration, DebugAndSimulationApi } from ''; +import type { DebugAndSimulationApiGetSimulationBundleInProjectRequest } from ''; + +const configuration = createConfiguration(); +const apiInstance = new DebugAndSimulationApi(configuration); + +const request: DebugAndSimulationApiGetSimulationBundleInProjectRequest = { + + owner: "owner_example", + + slug: "slug_example", + + bundleId: "bundleId_example", +}; + +const data = await apiInstance.getSimulationBundleInProject(request); +console.log('API called successfully. Returned data:', data); +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | [**string**] | | defaults to undefined + **slug** | [**string**] | | defaults to undefined + **bundleId** | [**string**] | | defaults to undefined + + +### Return type + +**SolidityServiceGetSimulationBundleResponse** + +### Authorization + +[ApiKeyAuth](README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | A successful response. | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **getSimulations** +> SolidityServiceGetSimulationsResponse getSimulations() + + +### Example + + +```typescript +import { createConfiguration, DebugAndSimulationApi } from ''; +import type { DebugAndSimulationApiGetSimulationsRequest } from ''; + +const configuration = createConfiguration(); +const apiInstance = new DebugAndSimulationApi(configuration); + +const request: DebugAndSimulationApiGetSimulationsRequest = { + + owner: "owner_example", + + slug: "slug_example", + + labelContains: "labelContains_example", + + page: 1, + + pageSize: 1, +}; + +const data = await apiInstance.getSimulations(request); +console.log('API called successfully. Returned data:', data); +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | [**string**] | | defaults to undefined + **slug** | [**string**] | | defaults to undefined + **labelContains** | [**string**] | | (optional) defaults to undefined + **page** | [**number**] | | (optional) defaults to undefined + **pageSize** | [**number**] | | (optional) defaults to undefined + + +### Return type + +**SolidityServiceGetSimulationsResponse** + +### Authorization + +[ApiKeyAuth](README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | A successful response. | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **searchTransactions** +> TxindexEvmSearchTransactionsResponse searchTransactions() + + +### Example + + +```typescript +import { createConfiguration, DebugAndSimulationApi } from ''; +import type { DebugAndSimulationApiSearchTransactionsRequest } from ''; + +const configuration = createConfiguration(); +const apiInstance = new DebugAndSimulationApi(configuration); + +const request: DebugAndSimulationApiSearchTransactionsRequest = { + + owner: "owner_example", + + slug: "slug_example", + + chainId: [ + "chainId_example", + ], + + address: [ + "address_example", + ], + + includeDirect: true, + + includeTrace: true, + + includeIn: true, + + includeOut: true, + + startBlock: "startBlock_example", + + endBlock: "endBlock_example", + + startTimestamp: "startTimestamp_example", + + endTimestamp: "endTimestamp_example", + + transactionStatus: [ + 1, + ], + + methodSignature: "methodSignature_example", + + limit: 1, + + pageToken: 'YQ==', +}; + +const data = await apiInstance.searchTransactions(request); +console.log('API called successfully. Returned data:', data); +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | [**string**] | | defaults to undefined + **slug** | [**string**] | | defaults to undefined + **chainId** | **Array<string>** | | (optional) defaults to undefined + **address** | **Array<string>** | | (optional) defaults to undefined + **includeDirect** | [**boolean**] | | (optional) defaults to undefined + **includeTrace** | [**boolean**] | | (optional) defaults to undefined + **includeIn** | [**boolean**] | | (optional) defaults to undefined + **includeOut** | [**boolean**] | | (optional) defaults to undefined + **startBlock** | [**string**] | | (optional) defaults to undefined + **endBlock** | [**string**] | | (optional) defaults to undefined + **startTimestamp** | [**string**] | | (optional) defaults to undefined + **endTimestamp** | [**string**] | | (optional) defaults to undefined + **transactionStatus** | **Array<number>** | | (optional) defaults to undefined + **methodSignature** | [**string**] | | (optional) defaults to undefined + **limit** | [**number**] | | (optional) defaults to undefined + **pageToken** | [**string**] | | (optional) defaults to undefined + + +### Return type + +**TxindexEvmSearchTransactionsResponse** + +### Authorization + +[ApiKeyAuth](README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | A successful response. | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **simulateTransaction** +> SolidityServiceSimulateTransactionResponse simulateTransaction(body) + +Create a new transaction simulation. The simulation body should be included in the request body. Your simulations will be saved, and a unique ID for each simulation is included in the response. It will be useful for fetching simulation details. + +### Example + + +```typescript +import { createConfiguration, DebugAndSimulationApi } from ''; +import type { DebugAndSimulationApiSimulateTransactionRequest } from ''; + +const configuration = createConfiguration(); +const apiInstance = new DebugAndSimulationApi(configuration); + +const request: DebugAndSimulationApiSimulateTransactionRequest = { + + owner: "owner_example", + + slug: "slug_example", + + chainId: "chainId_example", + + body: { + simulation: { + id: "id_example", + createAt: "createAt_example", + bundleId: "bundleId_example", + networkId: "networkId_example", + chainId: "chainId_example", + chainSpec: { + chainId: "chainId_example", + forkId: "forkId_example", + }, + to: "to_example", + input: "input_example", + blockNumber: "blockNumber_example", + transactionIndex: "transactionIndex_example", + _from: "_from_example", + gas: "gas_example", + gasPrice: "gasPrice_example", + maxFeePerGas: "maxFeePerGas_example", + maxPriorityFeePerGas: "maxPriorityFeePerGas_example", + value: "value_example", + accessList: [ + { + address: "address_example", + storageKeys: [ + "storageKeys_example", + ], + }, + ], + originTxHash: "originTxHash_example", + label: "label_example", + stateOverrides: { + "key": { + state: { + "key": "key_example", + }, + balance: "balance_example", + code: "code_example", + }, + }, + sourceOverrides: { + "key": "key_example", + }, + blockOverride: { + blockNumber: "blockNumber_example", + timestamp: "timestamp_example", + gasLimit: "gasLimit_example", + difficulty: "difficulty_example", + baseFee: "baseFee_example", + blockHash: { + "key": "key_example", + }, + }, + debugDeployment: true, + result: { + transaction: { + blockNumber: "blockNumber_example", + blockHash: "blockHash_example", + transactionIndex: "transactionIndex_example", + hash: "hash_example", + chainId: "chainId_example", + type: "type_example", + _from: "_from_example", + to: "to_example", + input: "input_example", + value: "value_example", + nonce: "nonce_example", + gas: "gas_example", + gasPrice: "gasPrice_example", + maxFeePerGas: "maxFeePerGas_example", + maxPriorityFeePerGas: "maxPriorityFeePerGas_example", + accessList: [ + { + address: "address_example", + storageKeys: [ + "storageKeys_example", + ], + }, + ], + }, + transactionReceipt: { + gasUsed: "gasUsed_example", + cumulativeGasUsed: "cumulativeGasUsed_example", + effectiveGasPrice: "effectiveGasPrice_example", + status: "status_example", + error: "error_example", + revertReason: "revertReason_example", + logs: [ + {}, + ], + }, + }, + }, + }, +}; + +const data = await apiInstance.simulateTransaction(request); +console.log('API called successfully. Returned data:', data); +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | **SolidityServiceSolidityAPIServiceSimulateTransactionBody**| | + **owner** | [**string**] | | defaults to undefined + **slug** | [**string**] | | defaults to undefined + **chainId** | [**string**] | | defaults to undefined + + +### Return type + +**SolidityServiceSimulateTransactionResponse** + +### Authorization + +[ApiKeyAuth](README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | A successful response. | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **simulateTransactionBundle** +> SolidityServiceSimulateTransactionBundleResponse simulateTransactionBundle(body) + +You could also create bundle simulations so that one transaction could be executed one after another. For `blockNumber` `transactionIndex` `networkId` `stateOverrides` and `blockOverrides` fields, only the first simulation takes effect. + +### Example + + +```typescript +import { createConfiguration, DebugAndSimulationApi } from ''; +import type { DebugAndSimulationApiSimulateTransactionBundleRequest } from ''; + +const configuration = createConfiguration(); +const apiInstance = new DebugAndSimulationApi(configuration); + +const request: DebugAndSimulationApiSimulateTransactionBundleRequest = { + + owner: "owner_example", + + slug: "slug_example", + + chainId: "chainId_example", + + body: { + simulations: [ + { + id: "id_example", + createAt: "createAt_example", + bundleId: "bundleId_example", + networkId: "networkId_example", + chainId: "chainId_example", + chainSpec: { + chainId: "chainId_example", + forkId: "forkId_example", + }, + to: "to_example", + input: "input_example", + blockNumber: "blockNumber_example", + transactionIndex: "transactionIndex_example", + _from: "_from_example", + gas: "gas_example", + gasPrice: "gasPrice_example", + maxFeePerGas: "maxFeePerGas_example", + maxPriorityFeePerGas: "maxPriorityFeePerGas_example", + value: "value_example", + accessList: [ + { + address: "address_example", + storageKeys: [ + "storageKeys_example", + ], + }, + ], + originTxHash: "originTxHash_example", + label: "label_example", + stateOverrides: { + "key": { + state: { + "key": "key_example", + }, + balance: "balance_example", + code: "code_example", + }, + }, + sourceOverrides: { + "key": "key_example", + }, + blockOverride: { + blockNumber: "blockNumber_example", + timestamp: "timestamp_example", + gasLimit: "gasLimit_example", + difficulty: "difficulty_example", + baseFee: "baseFee_example", + blockHash: { + "key": "key_example", + }, + }, + debugDeployment: true, + result: { + transaction: { + blockNumber: "blockNumber_example", + blockHash: "blockHash_example", + transactionIndex: "transactionIndex_example", + hash: "hash_example", + chainId: "chainId_example", + type: "type_example", + _from: "_from_example", + to: "to_example", + input: "input_example", + value: "value_example", + nonce: "nonce_example", + gas: "gas_example", + gasPrice: "gasPrice_example", + maxFeePerGas: "maxFeePerGas_example", + maxPriorityFeePerGas: "maxPriorityFeePerGas_example", + accessList: [ + { + address: "address_example", + storageKeys: [ + "storageKeys_example", + ], + }, + ], + }, + transactionReceipt: { + gasUsed: "gasUsed_example", + cumulativeGasUsed: "cumulativeGasUsed_example", + effectiveGasPrice: "effectiveGasPrice_example", + status: "status_example", + error: "error_example", + revertReason: "revertReason_example", + logs: [ + {}, + ], + }, + }, + }, + ], + }, +}; + +const data = await apiInstance.simulateTransactionBundle(request); +console.log('API called successfully. Returned data:', data); +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | **SolidityServiceSolidityAPIServiceSimulateTransactionBundleBody**| | + **owner** | [**string**] | | defaults to undefined + **slug** | [**string**] | | defaults to undefined + **chainId** | [**string**] | | defaults to undefined + + +### Return type + +**SolidityServiceSimulateTransactionBundleResponse** + +### Authorization + +[ApiKeyAuth](README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | A successful response. | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + + diff --git a/src/ForksApi.md b/src/ForksApi.md new file mode 100755 index 0000000..45b6796 --- /dev/null +++ b/src/ForksApi.md @@ -0,0 +1,950 @@ +# .ForksApi + +All URIs are relative to *https://app.sentio.xyz* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**createFork**](ForksApi.md#createFork) | **POST** /api/v1/solidity/{owner}/{slug}/fork | Create a fork +[**deleteFork**](ForksApi.md#deleteFork) | **DELETE** /api/v1/solidity/{owner}/{slug}/fork/{id} | Delete fork by id +[**getCallTraceOnForkBundle**](ForksApi.md#getCallTraceOnForkBundle) | **GET** /api/v1/solidity/{owner}/{slug}/fork/{forkId}/bundle/{bundleId}/call_trace | Get trace by bundle simulation +[**getCallTraceOnForkSimulation**](ForksApi.md#getCallTraceOnForkSimulation) | **GET** /api/v1/solidity/{owner}/{slug}/fork/{forkId}/simulation/{simulationId}/call_trace | Get trace by simulation +[**getCallTraceOnForkTransaction**](ForksApi.md#getCallTraceOnForkTransaction) | **GET** /api/v1/solidity/{owner}/{slug}/fork/{forkId}/transaction/{txHash}/call_trace | Get trace by transaction +[**getFork**](ForksApi.md#getFork) | **GET** /api/v1/solidity/{owner}/{slug}/fork/{id} | Get fork by id +[**getForkInfo**](ForksApi.md#getForkInfo) | **GET** /api/v1/solidity/{owner}/{slug}/fork/{id}/info | Get fork info by id +[**listForks**](ForksApi.md#listForks) | **GET** /api/v1/solidity/{owner}/{slug}/fork | List all forks +[**simulateTransactionBundleOnFork**](ForksApi.md#simulateTransactionBundleOnFork) | **POST** /api/v1/solidity/{owner}/{slug}/fork/{forkId}/simulation_bundle | Run bundle simulation +[**simulateTransactionOnFork**](ForksApi.md#simulateTransactionOnFork) | **POST** /api/v1/solidity/{owner}/{slug}/fork/{forkId}/simulation | Run Simulation +[**updateFork**](ForksApi.md#updateFork) | **PUT** /api/v1/solidity/{owner}/{slug}/fork/{id} | Update fork by id + + +# **createFork** +> SolidityServiceCreateForkResponse createFork(body) + + +### Example + + +```typescript +import { createConfiguration, ForksApi } from ''; +import type { ForksApiCreateForkRequest } from ''; + +const configuration = createConfiguration(); +const apiInstance = new ForksApi(configuration); + +const request: ForksApiCreateForkRequest = { + + owner: "owner_example", + + slug: "slug_example", + + body: { + fork: { + id: "id_example", + type: "MANAGED", + name: "name_example", + extra: "extra_example", + managedFork: { + chainSpec: { + chainId: "chainId_example", + forkId: "forkId_example", + }, + rpcEndpoint: "rpcEndpoint_example", + parentBlockNumber: 1, + }, + externalFork: { + chainConfig: { + endpoint: "endpoint_example", + debugEndpoint: "debugEndpoint_example", + sourceFetcherType: "ETHERSCAN", + sourceFetcherEndpoint: "sourceFetcherEndpoint_example", + sourceFetcherTimeout: "sourceFetcherTimeout_example", + sourceFetcherApiKeys: [ + "sourceFetcherApiKeys_example", + ], + oklinkChainShortName: "oklinkChainShortName_example", + }, + nodeAdditionalHeaders: "nodeAdditionalHeaders_example", + }, + createTime: new Date('1970-01-01T00:00:00.00Z'), + updateTime: new Date('1970-01-01T00:00:00.00Z'), + }, + }, +}; + +const data = await apiInstance.createFork(request); +console.log('API called successfully. Returned data:', data); +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | **SolidityServiceForkServiceCreateForkBody**| | + **owner** | [**string**] | | defaults to undefined + **slug** | [**string**] | | defaults to undefined + + +### Return type + +**SolidityServiceCreateForkResponse** + +### Authorization + +[ApiKeyAuth](README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | A successful response. | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **deleteFork** +> any deleteFork() + + +### Example + + +```typescript +import { createConfiguration, ForksApi } from ''; +import type { ForksApiDeleteForkRequest } from ''; + +const configuration = createConfiguration(); +const apiInstance = new ForksApi(configuration); + +const request: ForksApiDeleteForkRequest = { + + owner: "owner_example", + + slug: "slug_example", + + id: "id_example", +}; + +const data = await apiInstance.deleteFork(request); +console.log('API called successfully. Returned data:', data); +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | [**string**] | | defaults to undefined + **slug** | [**string**] | | defaults to undefined + **id** | [**string**] | | defaults to undefined + + +### Return type + +**any** + +### Authorization + +[ApiKeyAuth](README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | A successful response. | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **getCallTraceOnForkBundle** +> GoogleApiHttpBody getCallTraceOnForkBundle() + + +### Example + + +```typescript +import { createConfiguration, ForksApi } from ''; +import type { ForksApiGetCallTraceOnForkBundleRequest } from ''; + +const configuration = createConfiguration(); +const apiInstance = new ForksApi(configuration); + +const request: ForksApiGetCallTraceOnForkBundleRequest = { + + owner: "owner_example", + + slug: "slug_example", + + forkId: "forkId_example", + + bundleId: "bundleId_example", + // Fetch the decoded trace, which will give you the function info, decoded parameters of both external and internal call trace. (optional) + withInternalCalls: true, + // Disable optimizations to make internal calls more accurate, but gas costs will differ from the actual execution. (optional) + disableOptimizer: true, + // Only effective when disableOptimizer=true. (optional) + ignoreGasCost: true, +}; + +const data = await apiInstance.getCallTraceOnForkBundle(request); +console.log('API called successfully. Returned data:', data); +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | [**string**] | | defaults to undefined + **slug** | [**string**] | | defaults to undefined + **forkId** | [**string**] | | defaults to undefined + **bundleId** | [**string**] | | defaults to undefined + **withInternalCalls** | [**boolean**] | Fetch the decoded trace, which will give you the function info, decoded parameters of both external and internal call trace. | (optional) defaults to undefined + **disableOptimizer** | [**boolean**] | Disable optimizations to make internal calls more accurate, but gas costs will differ from the actual execution. | (optional) defaults to undefined + **ignoreGasCost** | [**boolean**] | Only effective when disableOptimizer=true. | (optional) defaults to undefined + + +### Return type + +**GoogleApiHttpBody** + +### Authorization + +[ApiKeyAuth](README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | A successful response. | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **getCallTraceOnForkSimulation** +> GoogleApiHttpBody getCallTraceOnForkSimulation() + + +### Example + + +```typescript +import { createConfiguration, ForksApi } from ''; +import type { ForksApiGetCallTraceOnForkSimulationRequest } from ''; + +const configuration = createConfiguration(); +const apiInstance = new ForksApi(configuration); + +const request: ForksApiGetCallTraceOnForkSimulationRequest = { + + owner: "owner_example", + + slug: "slug_example", + + forkId: "forkId_example", + + simulationId: "simulationId_example", + // Fetch the decoded trace, which will give you the function info, decoded parameters of both external and internal call trace. (optional) + withInternalCalls: true, + // Disable optimizations to make internal calls more accurate, but gas costs will differ from the actual execution. (optional) + disableOptimizer: true, + // Only effective when disableOptimizer=true. (optional) + ignoreGasCost: true, +}; + +const data = await apiInstance.getCallTraceOnForkSimulation(request); +console.log('API called successfully. Returned data:', data); +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | [**string**] | | defaults to undefined + **slug** | [**string**] | | defaults to undefined + **forkId** | [**string**] | | defaults to undefined + **simulationId** | [**string**] | | defaults to undefined + **withInternalCalls** | [**boolean**] | Fetch the decoded trace, which will give you the function info, decoded parameters of both external and internal call trace. | (optional) defaults to undefined + **disableOptimizer** | [**boolean**] | Disable optimizations to make internal calls more accurate, but gas costs will differ from the actual execution. | (optional) defaults to undefined + **ignoreGasCost** | [**boolean**] | Only effective when disableOptimizer=true. | (optional) defaults to undefined + + +### Return type + +**GoogleApiHttpBody** + +### Authorization + +[ApiKeyAuth](README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | A successful response. | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **getCallTraceOnForkTransaction** +> GoogleApiHttpBody getCallTraceOnForkTransaction() + + +### Example + + +```typescript +import { createConfiguration, ForksApi } from ''; +import type { ForksApiGetCallTraceOnForkTransactionRequest } from ''; + +const configuration = createConfiguration(); +const apiInstance = new ForksApi(configuration); + +const request: ForksApiGetCallTraceOnForkTransactionRequest = { + + owner: "owner_example", + + slug: "slug_example", + + forkId: "forkId_example", + + txHash: "txHash_example", + // Fetch the decoded trace, which will give you the function info, decoded parameters of both external and internal call trace. (optional) + withInternalCalls: true, + // Disable optimizations to make internal calls more accurate, but gas costs will differ from the actual execution. (optional) + disableOptimizer: true, + // Only effective when disableOptimizer=true. (optional) + ignoreGasCost: true, +}; + +const data = await apiInstance.getCallTraceOnForkTransaction(request); +console.log('API called successfully. Returned data:', data); +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | [**string**] | | defaults to undefined + **slug** | [**string**] | | defaults to undefined + **forkId** | [**string**] | | defaults to undefined + **txHash** | [**string**] | | defaults to undefined + **withInternalCalls** | [**boolean**] | Fetch the decoded trace, which will give you the function info, decoded parameters of both external and internal call trace. | (optional) defaults to undefined + **disableOptimizer** | [**boolean**] | Disable optimizations to make internal calls more accurate, but gas costs will differ from the actual execution. | (optional) defaults to undefined + **ignoreGasCost** | [**boolean**] | Only effective when disableOptimizer=true. | (optional) defaults to undefined + + +### Return type + +**GoogleApiHttpBody** + +### Authorization + +[ApiKeyAuth](README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | A successful response. | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **getFork** +> SolidityServiceGetForkResponse getFork() + + +### Example + + +```typescript +import { createConfiguration, ForksApi } from ''; +import type { ForksApiGetForkRequest } from ''; + +const configuration = createConfiguration(); +const apiInstance = new ForksApi(configuration); + +const request: ForksApiGetForkRequest = { + + owner: "owner_example", + + slug: "slug_example", + + id: "id_example", +}; + +const data = await apiInstance.getFork(request); +console.log('API called successfully. Returned data:', data); +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | [**string**] | | defaults to undefined + **slug** | [**string**] | | defaults to undefined + **id** | [**string**] | | defaults to undefined + + +### Return type + +**SolidityServiceGetForkResponse** + +### Authorization + +[ApiKeyAuth](README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | A successful response. | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **getForkInfo** +> SolidityServiceGetForkInfoResponse getForkInfo() + + +### Example + + +```typescript +import { createConfiguration, ForksApi } from ''; +import type { ForksApiGetForkInfoRequest } from ''; + +const configuration = createConfiguration(); +const apiInstance = new ForksApi(configuration); + +const request: ForksApiGetForkInfoRequest = { + + owner: "owner_example", + + slug: "slug_example", + + id: "id_example", +}; + +const data = await apiInstance.getForkInfo(request); +console.log('API called successfully. Returned data:', data); +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | [**string**] | | defaults to undefined + **slug** | [**string**] | | defaults to undefined + **id** | [**string**] | | defaults to undefined + + +### Return type + +**SolidityServiceGetForkInfoResponse** + +### Authorization + +[ApiKeyAuth](README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | A successful response. | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **listForks** +> SolidityServiceListForksResponse listForks() + + +### Example + + +```typescript +import { createConfiguration, ForksApi } from ''; +import type { ForksApiListForksRequest } from ''; + +const configuration = createConfiguration(); +const apiInstance = new ForksApi(configuration); + +const request: ForksApiListForksRequest = { + + owner: "owner_example", + + slug: "slug_example", +}; + +const data = await apiInstance.listForks(request); +console.log('API called successfully. Returned data:', data); +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | [**string**] | | defaults to undefined + **slug** | [**string**] | | defaults to undefined + + +### Return type + +**SolidityServiceListForksResponse** + +### Authorization + +[ApiKeyAuth](README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | A successful response. | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **simulateTransactionBundleOnFork** +> SolidityServiceSimulateTransactionBundleResponse simulateTransactionBundleOnFork(body) + + +### Example + + +```typescript +import { createConfiguration, ForksApi } from ''; +import type { ForksApiSimulateTransactionBundleOnForkRequest } from ''; + +const configuration = createConfiguration(); +const apiInstance = new ForksApi(configuration); + +const request: ForksApiSimulateTransactionBundleOnForkRequest = { + + owner: "owner_example", + + slug: "slug_example", + + forkId: "forkId_example", + + body: { + simulations: [ + { + id: "id_example", + createAt: "createAt_example", + bundleId: "bundleId_example", + networkId: "networkId_example", + chainId: "chainId_example", + chainSpec: { + chainId: "chainId_example", + forkId: "forkId_example", + }, + to: "to_example", + input: "input_example", + blockNumber: "blockNumber_example", + transactionIndex: "transactionIndex_example", + _from: "_from_example", + gas: "gas_example", + gasPrice: "gasPrice_example", + maxFeePerGas: "maxFeePerGas_example", + maxPriorityFeePerGas: "maxPriorityFeePerGas_example", + value: "value_example", + accessList: [ + { + address: "address_example", + storageKeys: [ + "storageKeys_example", + ], + }, + ], + originTxHash: "originTxHash_example", + label: "label_example", + stateOverrides: { + "key": { + state: { + "key": "key_example", + }, + balance: "balance_example", + code: "code_example", + }, + }, + sourceOverrides: { + "key": "key_example", + }, + blockOverride: { + blockNumber: "blockNumber_example", + timestamp: "timestamp_example", + gasLimit: "gasLimit_example", + difficulty: "difficulty_example", + baseFee: "baseFee_example", + blockHash: { + "key": "key_example", + }, + }, + debugDeployment: true, + result: { + transaction: { + blockNumber: "blockNumber_example", + blockHash: "blockHash_example", + transactionIndex: "transactionIndex_example", + hash: "hash_example", + chainId: "chainId_example", + type: "type_example", + _from: "_from_example", + to: "to_example", + input: "input_example", + value: "value_example", + nonce: "nonce_example", + gas: "gas_example", + gasPrice: "gasPrice_example", + maxFeePerGas: "maxFeePerGas_example", + maxPriorityFeePerGas: "maxPriorityFeePerGas_example", + accessList: [ + { + address: "address_example", + storageKeys: [ + "storageKeys_example", + ], + }, + ], + }, + transactionReceipt: { + gasUsed: "gasUsed_example", + cumulativeGasUsed: "cumulativeGasUsed_example", + effectiveGasPrice: "effectiveGasPrice_example", + status: "status_example", + error: "error_example", + revertReason: "revertReason_example", + logs: [ + {}, + ], + }, + }, + }, + ], + }, +}; + +const data = await apiInstance.simulateTransactionBundleOnFork(request); +console.log('API called successfully. Returned data:', data); +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | **SolidityServiceSolidityAPIServiceSimulateTransactionBundleOnForkBody**| | + **owner** | [**string**] | | defaults to undefined + **slug** | [**string**] | | defaults to undefined + **forkId** | [**string**] | | defaults to undefined + + +### Return type + +**SolidityServiceSimulateTransactionBundleResponse** + +### Authorization + +[ApiKeyAuth](README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | A successful response. | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **simulateTransactionOnFork** +> SolidityServiceSimulateTransactionResponse simulateTransactionOnFork(body) + + +### Example + + +```typescript +import { createConfiguration, ForksApi } from ''; +import type { ForksApiSimulateTransactionOnForkRequest } from ''; + +const configuration = createConfiguration(); +const apiInstance = new ForksApi(configuration); + +const request: ForksApiSimulateTransactionOnForkRequest = { + + owner: "owner_example", + + slug: "slug_example", + + forkId: "forkId_example", + + body: { + simulation: { + id: "id_example", + createAt: "createAt_example", + bundleId: "bundleId_example", + networkId: "networkId_example", + chainId: "chainId_example", + chainSpec: { + chainId: "chainId_example", + forkId: "forkId_example", + }, + to: "to_example", + input: "input_example", + blockNumber: "blockNumber_example", + transactionIndex: "transactionIndex_example", + _from: "_from_example", + gas: "gas_example", + gasPrice: "gasPrice_example", + maxFeePerGas: "maxFeePerGas_example", + maxPriorityFeePerGas: "maxPriorityFeePerGas_example", + value: "value_example", + accessList: [ + { + address: "address_example", + storageKeys: [ + "storageKeys_example", + ], + }, + ], + originTxHash: "originTxHash_example", + label: "label_example", + stateOverrides: { + "key": { + state: { + "key": "key_example", + }, + balance: "balance_example", + code: "code_example", + }, + }, + sourceOverrides: { + "key": "key_example", + }, + blockOverride: { + blockNumber: "blockNumber_example", + timestamp: "timestamp_example", + gasLimit: "gasLimit_example", + difficulty: "difficulty_example", + baseFee: "baseFee_example", + blockHash: { + "key": "key_example", + }, + }, + debugDeployment: true, + result: { + transaction: { + blockNumber: "blockNumber_example", + blockHash: "blockHash_example", + transactionIndex: "transactionIndex_example", + hash: "hash_example", + chainId: "chainId_example", + type: "type_example", + _from: "_from_example", + to: "to_example", + input: "input_example", + value: "value_example", + nonce: "nonce_example", + gas: "gas_example", + gasPrice: "gasPrice_example", + maxFeePerGas: "maxFeePerGas_example", + maxPriorityFeePerGas: "maxPriorityFeePerGas_example", + accessList: [ + { + address: "address_example", + storageKeys: [ + "storageKeys_example", + ], + }, + ], + }, + transactionReceipt: { + gasUsed: "gasUsed_example", + cumulativeGasUsed: "cumulativeGasUsed_example", + effectiveGasPrice: "effectiveGasPrice_example", + status: "status_example", + error: "error_example", + revertReason: "revertReason_example", + logs: [ + {}, + ], + }, + }, + }, + }, +}; + +const data = await apiInstance.simulateTransactionOnFork(request); +console.log('API called successfully. Returned data:', data); +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | **SolidityServiceSolidityAPIServiceSimulateTransactionOnForkBody**| | + **owner** | [**string**] | | defaults to undefined + **slug** | [**string**] | | defaults to undefined + **forkId** | [**string**] | | defaults to undefined + + +### Return type + +**SolidityServiceSimulateTransactionResponse** + +### Authorization + +[ApiKeyAuth](README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | A successful response. | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **updateFork** +> SolidityServiceUpdateForkResponse updateFork(body) + + +### Example + + +```typescript +import { createConfiguration, ForksApi } from ''; +import type { ForksApiUpdateForkRequest } from ''; + +const configuration = createConfiguration(); +const apiInstance = new ForksApi(configuration); + +const request: ForksApiUpdateForkRequest = { + + owner: "owner_example", + + slug: "slug_example", + + id: "id_example", + + body: { + fork: { + id: "id_example", + type: "MANAGED", + name: "name_example", + extra: "extra_example", + managedFork: { + chainSpec: { + chainId: "chainId_example", + forkId: "forkId_example", + }, + rpcEndpoint: "rpcEndpoint_example", + parentBlockNumber: 1, + }, + externalFork: { + chainConfig: { + endpoint: "endpoint_example", + debugEndpoint: "debugEndpoint_example", + sourceFetcherType: "ETHERSCAN", + sourceFetcherEndpoint: "sourceFetcherEndpoint_example", + sourceFetcherTimeout: "sourceFetcherTimeout_example", + sourceFetcherApiKeys: [ + "sourceFetcherApiKeys_example", + ], + oklinkChainShortName: "oklinkChainShortName_example", + }, + nodeAdditionalHeaders: "nodeAdditionalHeaders_example", + }, + createTime: new Date('1970-01-01T00:00:00.00Z'), + updateTime: new Date('1970-01-01T00:00:00.00Z'), + }, + }, +}; + +const data = await apiInstance.updateFork(request); +console.log('API called successfully. Returned data:', data); +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | **SolidityServiceForkServiceUpdateForkBody**| | + **owner** | [**string**] | | defaults to undefined + **slug** | [**string**] | | defaults to undefined + **id** | [**string**] | | defaults to undefined + + +### Return type + +**SolidityServiceUpdateForkResponse** + +### Authorization + +[ApiKeyAuth](README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | A successful response. | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + + diff --git a/src/PriceApi.md b/src/PriceApi.md new file mode 100755 index 0000000..eb87553 --- /dev/null +++ b/src/PriceApi.md @@ -0,0 +1,249 @@ +# .PriceApi + +All URIs are relative to *https://app.sentio.xyz* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**batchGetPrices**](PriceApi.md#batchGetPrices) | **POST** /api/v1/prices/batch | Batch get prices +[**checkLatestPrice**](PriceApi.md#checkLatestPrice) | **GET** /api/v1/prices/check_latest | Check latest price +[**getPrice**](PriceApi.md#getPrice) | **GET** /api/v1/prices | Get price +[**priceListCoins**](PriceApi.md#priceListCoins) | **GET** /api/v1/prices/coins | List coins + + +# **batchGetPrices** +> PriceServiceBatchGetPricesResponse batchGetPrices(body) + + +### Example + + +```typescript +import { createConfiguration, PriceApi } from ''; +import type { PriceApiBatchGetPricesRequest } from ''; + +const configuration = createConfiguration(); +const apiInstance = new PriceApi(configuration); + +const request: PriceApiBatchGetPricesRequest = { + + body: { + timestamps: [ + new Date('1970-01-01T00:00:00.00Z'), + ], + coinIds: [ + { + symbol: "symbol_example", + address: { + address: "address_example", + chain: "chain_example", + }, + }, + ], + }, +}; + +const data = await apiInstance.batchGetPrices(request); +console.log('API called successfully. Returned data:', data); +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | **PriceServiceBatchGetPricesRequest**| | + + +### Return type + +**PriceServiceBatchGetPricesResponse** + +### Authorization + +[ApiKeyAuth](README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | A successful response. | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **checkLatestPrice** +> PriceServiceCheckLatestPriceResponse checkLatestPrice() + + +### Example + + +```typescript +import { createConfiguration, PriceApi } from ''; + +const configuration = createConfiguration(); +const apiInstance = new PriceApi(configuration); + +const request = {}; + +const data = await apiInstance.checkLatestPrice(request); +console.log('API called successfully. Returned data:', data); +``` + + +### Parameters +This endpoint does not need any parameter. + + +### Return type + +**PriceServiceCheckLatestPriceResponse** + +### Authorization + +[ApiKeyAuth](README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | A successful response. | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **getPrice** +> PriceServiceGetPriceResponse getPrice() + +GetPrice returns the price of a given coin identifier, in a best effort way. If we do not have any price data for the given coin, we will return NOT_FOUND error. If we have at least one price data for the given coin, we will return it with the actual timestamp. Client is responsible for checking the timestamp and decide whether to use the price or not. + +### Example + + +```typescript +import { createConfiguration, PriceApi } from ''; +import type { PriceApiGetPriceRequest } from ''; + +const configuration = createConfiguration(); +const apiInstance = new PriceApi(configuration); + +const request: PriceApiGetPriceRequest = { + // The timestamp we request the price at. Note, the price service may not have the price at the exact timestamp, in which case it will return the price at the closest timestamp. (optional) + timestamp: new Date('1970-01-01T00:00:00.00Z'), + + coinIdSymbol: "coinId.symbol_example", + + coinIdAddressAddress: "coinId.address.address_example", + + coinIdAddressChain: "coinId.address.chain_example", + + source: "source_example", +}; + +const data = await apiInstance.getPrice(request); +console.log('API called successfully. Returned data:', data); +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **timestamp** | [**Date**] | The timestamp we request the price at. Note, the price service may not have the price at the exact timestamp, in which case it will return the price at the closest timestamp. | (optional) defaults to undefined + **coinIdSymbol** | [**string**] | | (optional) defaults to undefined + **coinIdAddressAddress** | [**string**] | | (optional) defaults to undefined + **coinIdAddressChain** | [**string**] | | (optional) defaults to undefined + **source** | [**string**] | | (optional) defaults to undefined + + +### Return type + +**PriceServiceGetPriceResponse** + +### Authorization + +[ApiKeyAuth](README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | A successful response. | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **priceListCoins** +> PriceServiceListCoinsResponse priceListCoins() + + +### Example + + +```typescript +import { createConfiguration, PriceApi } from ''; +import type { PriceApiPriceListCoinsRequest } from ''; + +const configuration = createConfiguration(); +const apiInstance = new PriceApi(configuration); + +const request: PriceApiPriceListCoinsRequest = { + + limit: 1, + + offset: 1, + + searchQuery: "searchQuery_example", + + chain: "chain_example", +}; + +const data = await apiInstance.priceListCoins(request); +console.log('API called successfully. Returned data:', data); +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **limit** | [**number**] | | (optional) defaults to undefined + **offset** | [**number**] | | (optional) defaults to undefined + **searchQuery** | [**string**] | | (optional) defaults to undefined + **chain** | [**string**] | | (optional) defaults to undefined + + +### Return type + +**PriceServiceListCoinsResponse** + +### Authorization + +[ApiKeyAuth](README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | A successful response. | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + + diff --git a/src/README.md b/src/README.md new file mode 100755 index 0000000..f1f2196 --- /dev/null +++ b/src/README.md @@ -0,0 +1,80 @@ +## @ + +This generator creates TypeScript/JavaScript client that utilizes fetch-api. + +### Building + +To build and compile the typescript sources to javascript use: +``` +npm install +npm run build +``` + +### Publishing + +First build the package then run ```npm publish``` + +### Consuming + +Navigate to the folder of your consuming project and run one of the following commands. + +_published:_ + +``` +npm install @ --save +``` + +_unPublished (not recommended):_ + +``` +npm install PATH_TO_GENERATED_PACKAGE --save +``` + +### Usage + +Below code snippet shows exemplary usage of the configuration and the API based +on the typical `PetStore` example used for OpenAPI. + +``` +import * as your_api from 'your_api_package' + +// Covers all auth methods included in your OpenAPI yaml definition +const authConfig: your_api.AuthMethodsConfiguration = { + "api_key": "YOUR_API_KEY" +} + +// Implements a simple middleware to modify requests before (`pre`) they are sent +// and after (`post`) they have been received +class Test implements your_api.Middleware { + pre(context: your_api.RequestContext): Promise { + // Modify context here and return + return Promise.resolve(context); + } + + post(context: your_api.ResponseContext): Promise { + return Promise.resolve(context); + } + +} + +// Create configuration parameter object +const configurationParameters = { + httpApi: new your_api.JQueryHttpLibrary(), // Can also be ignored - default is usually fine + baseServer: your_api.servers[0], // First server is default + authMethods: authConfig, // No auth is default + promiseMiddleware: [new Test()], +} + +// Convert to actual configuration +const config = your_api.createConfiguration(configurationParameters); + +// Use configuration with your_api +const api = new your_api.PetApi(config); +your_api.Pet p = new your_api.Pet(); +p.name = "My new pet"; +p.photoUrls = []; +p.tags = []; +p.status = "available"; +Promise createdPet = api.addPet(p); + +``` diff --git a/src/WebApi.md b/src/WebApi.md new file mode 100755 index 0000000..e86edac --- /dev/null +++ b/src/WebApi.md @@ -0,0 +1,541 @@ +# .WebApi + +All URIs are relative to *https://app.sentio.xyz* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**deleteDashboard**](WebApi.md#deleteDashboard) | **DELETE** /api/v1/dashboards/{dashboardId} | Delete a dashboard by id +[**exportDashboard**](WebApi.md#exportDashboard) | **GET** /api/v1/dashboards/{dashboardId}/json | Export a dashboard to json +[**getDashboard**](WebApi.md#getDashboard) | **GET** /api/v1/dashboards/{dashboardId} | Get a dashboard by id +[**getDashboard2**](WebApi.md#getDashboard2) | **GET** /api/v1/projects/{owner}/{slug}/dashboards/{dashboardId} | Get a dashboard by id +[**getProject**](WebApi.md#getProject) | **GET** /api/v1/project/{owner}/{slug} | Get project details +[**getProjectList**](WebApi.md#getProjectList) | **GET** /api/v1/projects | Get project list +[**importDashboard**](WebApi.md#importDashboard) | **POST** /api/v1/dashboards/json | Import a dashboard to another dashboard +[**listDashboards**](WebApi.md#listDashboards) | **GET** /api/v1/dashboards | List all dashboards in a project +[**listDashboards2**](WebApi.md#listDashboards2) | **GET** /api/v1/projects/{owner}/{slug}/dashboards | List all dashboards in a project + + +# **deleteDashboard** +> WebServiceDashboard deleteDashboard() + + +### Example + + +```typescript +import { createConfiguration, WebApi } from ''; +import type { WebApiDeleteDashboardRequest } from ''; + +const configuration = createConfiguration(); +const apiInstance = new WebApi(configuration); + +const request: WebApiDeleteDashboardRequest = { + // filter the dashboard by id + dashboardId: "dashboardId_example", + // filter the dashboard by project id (optional) + projectId: "projectId_example", + // username or organization name (optional) + ownerName: "ownerName_example", + // project slug (optional) + slug: "slug_example", +}; + +const data = await apiInstance.deleteDashboard(request); +console.log('API called successfully. Returned data:', data); +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **dashboardId** | [**string**] | filter the dashboard by id | defaults to undefined + **projectId** | [**string**] | filter the dashboard by project id | (optional) defaults to undefined + **ownerName** | [**string**] | username or organization name | (optional) defaults to undefined + **slug** | [**string**] | project slug | (optional) defaults to undefined + + +### Return type + +**WebServiceDashboard** + +### Authorization + +[ApiKeyAuth](README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | A successful response. | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **exportDashboard** +> WebServiceExportDashboardResponse exportDashboard() + + +### Example + + +```typescript +import { createConfiguration, WebApi } from ''; +import type { WebApiExportDashboardRequest } from ''; + +const configuration = createConfiguration(); +const apiInstance = new WebApi(configuration); + +const request: WebApiExportDashboardRequest = { + + dashboardId: "dashboardId_example", +}; + +const data = await apiInstance.exportDashboard(request); +console.log('API called successfully. Returned data:', data); +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **dashboardId** | [**string**] | | defaults to undefined + + +### Return type + +**WebServiceExportDashboardResponse** + +### Authorization + +[ApiKeyAuth](README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | A successful response. | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **getDashboard** +> WebServiceGetDashboardResponse getDashboard() + + +### Example + + +```typescript +import { createConfiguration, WebApi } from ''; +import type { WebApiGetDashboardRequest } from ''; + +const configuration = createConfiguration(); +const apiInstance = new WebApi(configuration); + +const request: WebApiGetDashboardRequest = { + // filter the dashboard by id + dashboardId: "dashboardId_example", + // filter the dashboard by project id (optional) + projectId: "projectId_example", + // username or organization name (optional) + ownerName: "ownerName_example", + // project slug (optional) + slug: "slug_example", +}; + +const data = await apiInstance.getDashboard(request); +console.log('API called successfully. Returned data:', data); +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **dashboardId** | [**string**] | filter the dashboard by id | defaults to undefined + **projectId** | [**string**] | filter the dashboard by project id | (optional) defaults to undefined + **ownerName** | [**string**] | username or organization name | (optional) defaults to undefined + **slug** | [**string**] | project slug | (optional) defaults to undefined + + +### Return type + +**WebServiceGetDashboardResponse** + +### Authorization + +[ApiKeyAuth](README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | A successful response. | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **getDashboard2** +> WebServiceGetDashboardResponse getDashboard2() + + +### Example + + +```typescript +import { createConfiguration, WebApi } from ''; +import type { WebApiGetDashboard2Request } from ''; + +const configuration = createConfiguration(); +const apiInstance = new WebApi(configuration); + +const request: WebApiGetDashboard2Request = { + // username or organization name + owner: "owner_example", + // project slug + slug: "slug_example", + // filter the dashboard by id + dashboardId: "dashboardId_example", + // filter the dashboard by project id (optional) + projectId: "projectId_example", +}; + +const data = await apiInstance.getDashboard2(request); +console.log('API called successfully. Returned data:', data); +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | [**string**] | username or organization name | defaults to undefined + **slug** | [**string**] | project slug | defaults to undefined + **dashboardId** | [**string**] | filter the dashboard by id | defaults to undefined + **projectId** | [**string**] | filter the dashboard by project id | (optional) defaults to undefined + + +### Return type + +**WebServiceGetDashboardResponse** + +### Authorization + +[ApiKeyAuth](README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | A successful response. | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **getProject** +> WebServiceGetProjectResponse getProject() + + +### Example + + +```typescript +import { createConfiguration, WebApi } from ''; +import type { WebApiGetProjectRequest } from ''; + +const configuration = createConfiguration(); +const apiInstance = new WebApi(configuration); + +const request: WebApiGetProjectRequest = { + // username or organization name + owner: "owner_example", + // project slug + slug: "slug_example", +}; + +const data = await apiInstance.getProject(request); +console.log('API called successfully. Returned data:', data); +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | [**string**] | username or organization name | defaults to undefined + **slug** | [**string**] | project slug | defaults to undefined + + +### Return type + +**WebServiceGetProjectResponse** + +### Authorization + +[ApiKeyAuth](README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | A successful response. | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **getProjectList** +> WebServiceGetProjectListResponse getProjectList() + + +### Example + + +```typescript +import { createConfiguration, WebApi } from ''; +import type { WebApiGetProjectListRequest } from ''; + +const configuration = createConfiguration(); +const apiInstance = new WebApi(configuration); + +const request: WebApiGetProjectListRequest = { + + userId: "userId_example", + + organizationId: "organizationId_example", +}; + +const data = await apiInstance.getProjectList(request); +console.log('API called successfully. Returned data:', data); +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **userId** | [**string**] | | (optional) defaults to undefined + **organizationId** | [**string**] | | (optional) defaults to undefined + + +### Return type + +**WebServiceGetProjectListResponse** + +### Authorization + +[ApiKeyAuth](README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | A successful response. | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **importDashboard** +> WebServiceImportDashboardResponse importDashboard(body) + + +### Example + + +```typescript +import { createConfiguration, WebApi } from ''; +import type { WebApiImportDashboardRequest } from ''; + +const configuration = createConfiguration(); +const apiInstance = new WebApi(configuration); + +const request: WebApiImportDashboardRequest = { + + body: { + dashboardId: "dashboardId_example", + dashboardJson: {}, + overrideLayouts: true, + }, +}; + +const data = await apiInstance.importDashboard(request); +console.log('API called successfully. Returned data:', data); +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | **WebServiceImportDashboardRequest**| | + + +### Return type + +**WebServiceImportDashboardResponse** + +### Authorization + +[ApiKeyAuth](README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | A successful response. | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **listDashboards** +> WebServiceGetDashboardResponse listDashboards() + + +### Example + + +```typescript +import { createConfiguration, WebApi } from ''; +import type { WebApiListDashboardsRequest } from ''; + +const configuration = createConfiguration(); +const apiInstance = new WebApi(configuration); + +const request: WebApiListDashboardsRequest = { + // filter the dashboard by id (optional) + dashboardId: "dashboardId_example", + // filter the dashboard by project id (optional) + projectId: "projectId_example", + // username or organization name (optional) + ownerName: "ownerName_example", + // project slug (optional) + slug: "slug_example", +}; + +const data = await apiInstance.listDashboards(request); +console.log('API called successfully. Returned data:', data); +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **dashboardId** | [**string**] | filter the dashboard by id | (optional) defaults to undefined + **projectId** | [**string**] | filter the dashboard by project id | (optional) defaults to undefined + **ownerName** | [**string**] | username or organization name | (optional) defaults to undefined + **slug** | [**string**] | project slug | (optional) defaults to undefined + + +### Return type + +**WebServiceGetDashboardResponse** + +### Authorization + +[ApiKeyAuth](README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | A successful response. | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **listDashboards2** +> WebServiceGetDashboardResponse listDashboards2() + + +### Example + + +```typescript +import { createConfiguration, WebApi } from ''; +import type { WebApiListDashboards2Request } from ''; + +const configuration = createConfiguration(); +const apiInstance = new WebApi(configuration); + +const request: WebApiListDashboards2Request = { + // username or organization name + owner: "owner_example", + // project slug + slug: "slug_example", + // filter the dashboard by id (optional) + dashboardId: "dashboardId_example", + // filter the dashboard by project id (optional) + projectId: "projectId_example", +}; + +const data = await apiInstance.listDashboards2(request); +console.log('API called successfully. Returned data:', data); +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | [**string**] | username or organization name | defaults to undefined + **slug** | [**string**] | project slug | defaults to undefined + **dashboardId** | [**string**] | filter the dashboard by id | (optional) defaults to undefined + **projectId** | [**string**] | filter the dashboard by project id | (optional) defaults to undefined + + +### Return type + +**WebServiceGetDashboardResponse** + +### Authorization + +[ApiKeyAuth](README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | A successful response. | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + + diff --git a/src/apis/DataApi.ts b/src/apis/DataApi.ts index 597da65..9d4391f 100755 --- a/src/apis/DataApi.ts +++ b/src/apis/DataApi.ts @@ -1,814 +1,1159 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Sentio API - * Sentio Open API for query data - * - * The version of the OpenAPI document: version not set - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -import * as runtime from '../runtime.js'; -import type { - AnalyticServiceAnalyticServiceExecuteSQLBody, - AnalyticServiceLogQueryResponse, - AnalyticServiceSearchServiceQueryLogBody, - AnalyticServiceSyncExecuteSQLResponse, - InsightsServiceInsightsServiceQueryBody, - InsightsServiceInsightsServiceRetentionBody, - InsightsServiceListCoinsResponse, - InsightsServiceQueryResponse, - InsightsServiceRetentionRequest, - InsightsServiceRetentionResponse, - MetricsServiceGetMetricsResponse, - MetricsServiceMetricsQueryResponse, - MetricsServiceObservabilityServiceQueryBody, - MetricsServiceObservabilityServiceQueryRangeBody, - MetricsServiceQueryValueResponse, -} from '../models/index.js'; -import { - AnalyticServiceAnalyticServiceExecuteSQLBodyFromJSON, - AnalyticServiceAnalyticServiceExecuteSQLBodyToJSON, - AnalyticServiceLogQueryResponseFromJSON, - AnalyticServiceLogQueryResponseToJSON, - AnalyticServiceSearchServiceQueryLogBodyFromJSON, - AnalyticServiceSearchServiceQueryLogBodyToJSON, - AnalyticServiceSyncExecuteSQLResponseFromJSON, - AnalyticServiceSyncExecuteSQLResponseToJSON, - InsightsServiceInsightsServiceQueryBodyFromJSON, - InsightsServiceInsightsServiceQueryBodyToJSON, - InsightsServiceInsightsServiceRetentionBodyFromJSON, - InsightsServiceInsightsServiceRetentionBodyToJSON, - InsightsServiceListCoinsResponseFromJSON, - InsightsServiceListCoinsResponseToJSON, - InsightsServiceQueryResponseFromJSON, - InsightsServiceQueryResponseToJSON, - InsightsServiceRetentionRequestFromJSON, - InsightsServiceRetentionRequestToJSON, - InsightsServiceRetentionResponseFromJSON, - InsightsServiceRetentionResponseToJSON, - MetricsServiceGetMetricsResponseFromJSON, - MetricsServiceGetMetricsResponseToJSON, - MetricsServiceMetricsQueryResponseFromJSON, - MetricsServiceMetricsQueryResponseToJSON, - MetricsServiceObservabilityServiceQueryBodyFromJSON, - MetricsServiceObservabilityServiceQueryBodyToJSON, - MetricsServiceObservabilityServiceQueryRangeBodyFromJSON, - MetricsServiceObservabilityServiceQueryRangeBodyToJSON, - MetricsServiceQueryValueResponseFromJSON, - MetricsServiceQueryValueResponseToJSON, -} from '../models/index.js'; - -export interface ExecuteSQLRequest { - owner: string; - slug: string; - body: AnalyticServiceAnalyticServiceExecuteSQLBody; -} - -export interface GetMetricsRequest { - projectId?: string; - name?: string; - version?: number; -} - -export interface ListCoinsRequest { - owner: string; - slug: string; - projectId?: string; - version?: number; - limit?: number; - offset?: number; - searchQuery?: string; -} - -export interface ListCoins2Request { - projectOwner?: string; - projectSlug?: string; - projectId?: string; - version?: number; - limit?: number; - offset?: number; - searchQuery?: string; -} - -export interface QueryRequest { - owner: string; - slug: string; - body: InsightsServiceInsightsServiceQueryBody; -} - -export interface QueryInstantRequest { - owner: string; - slug: string; - body: MetricsServiceObservabilityServiceQueryBody; -} - -export interface QueryLogRequest { - owner: string; - slug: string; - body: AnalyticServiceSearchServiceQueryLogBody; -} - -export interface QueryLog2Request { - owner: string; - slug: string; - projectId?: string; - query?: string; - timeRangeStartRelativeTimeUnit?: string; - timeRangeStartRelativeTimeValue?: number; - timeRangeStartRelativeTimeAlign?: string; - timeRangeStartAbsoluteTime?: string; - timeRangeEndRelativeTimeUnit?: string; - timeRangeEndRelativeTimeValue?: number; - timeRangeEndRelativeTimeAlign?: string; - timeRangeEndAbsoluteTime?: string; - timeRangeStep?: string; - timeRangeIntervalValue?: number; - timeRangeIntervalUnit?: string; - timeRangeTimezone?: string; - limit?: number; - offset?: number; - version?: number; -} - -export interface QueryRangeRequest { - owner: string; - slug: string; - body: MetricsServiceObservabilityServiceQueryRangeBody; -} - -export interface RetentionRequest { - owner: string; - slug: string; - body: InsightsServiceInsightsServiceRetentionBody; -} - -export interface Retention2Request { - body: InsightsServiceRetentionRequest; -} +// TODO: better import syntax? +import {BaseAPIRequestFactory, RequiredError, COLLECTION_FORMATS} from './baseapi.js'; +import {Configuration} from '../configuration.js'; +import {RequestContext, HttpMethod, ResponseContext, HttpFile, HttpInfo} from '../http/http.js'; +import {ObjectSerializer} from '../models/ObjectSerializer.js'; +import {ApiException} from './exception.js'; +import {canConsumeForm, isCodeInRange} from '../util.js'; +import {SecurityAuthentication} from '../auth/auth.js'; + + +import { AnalyticServiceAnalyticServiceExecuteSQLBody } from '../models/AnalyticServiceAnalyticServiceExecuteSQLBody.js'; +import { AnalyticServiceLogQueryResponse } from '../models/AnalyticServiceLogQueryResponse.js'; +import { AnalyticServiceSearchServiceQueryLogBody } from '../models/AnalyticServiceSearchServiceQueryLogBody.js'; +import { AnalyticServiceSyncExecuteSQLResponse } from '../models/AnalyticServiceSyncExecuteSQLResponse.js'; +import { InsightsServiceInsightsServiceQueryBody } from '../models/InsightsServiceInsightsServiceQueryBody.js'; +import { InsightsServiceInsightsServiceRetentionBody } from '../models/InsightsServiceInsightsServiceRetentionBody.js'; +import { InsightsServiceListCoinsResponse } from '../models/InsightsServiceListCoinsResponse.js'; +import { InsightsServiceQueryResponse } from '../models/InsightsServiceQueryResponse.js'; +import { InsightsServiceRetentionRequest } from '../models/InsightsServiceRetentionRequest.js'; +import { InsightsServiceRetentionResponse } from '../models/InsightsServiceRetentionResponse.js'; +import { MetricsServiceGetMetricsResponse } from '../models/MetricsServiceGetMetricsResponse.js'; +import { MetricsServiceMetricsQueryResponse } from '../models/MetricsServiceMetricsQueryResponse.js'; +import { MetricsServiceObservabilityServiceQueryBody } from '../models/MetricsServiceObservabilityServiceQueryBody.js'; +import { MetricsServiceObservabilityServiceQueryRangeBody } from '../models/MetricsServiceObservabilityServiceQueryRangeBody.js'; +import { MetricsServiceQueryValueResponse } from '../models/MetricsServiceQueryValueResponse.js'; /** - * + * no description */ -export class DataApi extends runtime.BaseAPI { +export class DataApiRequestFactory extends BaseAPIRequestFactory { /** * Execute SQL in a project. Go to \"Data Studio\" -> \"SQL Editor\", write your query and then click \"Export as cURL\" ![screenshot](https://raw.githubusercontent.com/sentioxyz/docs/main/.gitbook/assets/image%20(102).png) Find more: https://docs.sentio.xyz/reference/data#sql-api * Execute SQL + * @param owner username or organization name + * @param slug project slug + * @param body */ - async executeSQLRaw(requestParameters: ExecuteSQLRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['owner'] == null) { - throw new runtime.RequiredError( - 'owner', - 'Required parameter "owner" was null or undefined when calling executeSQL().' - ); + public async executeSQL(owner: string, slug: string, body: AnalyticServiceAnalyticServiceExecuteSQLBody, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'owner' is not null or undefined + if (owner === null || owner === undefined) { + throw new RequiredError("DataApi", "executeSQL", "owner"); } - if (requestParameters['slug'] == null) { - throw new runtime.RequiredError( - 'slug', - 'Required parameter "slug" was null or undefined when calling executeSQL().' - ); + + // verify required parameter 'slug' is not null or undefined + if (slug === null || slug === undefined) { + throw new RequiredError("DataApi", "executeSQL", "slug"); } - if (requestParameters['body'] == null) { - throw new runtime.RequiredError( - 'body', - 'Required parameter "body" was null or undefined when calling executeSQL().' - ); + + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new RequiredError("DataApi", "executeSQL", "body"); } - const queryParameters: any = {}; - const headerParameters: runtime.HTTPHeaders = {}; + // Path Params + const localVarPath = '/api/v1/analytics/{owner}/{slug}/sql/execute' + .replace('{' + 'owner' + '}', encodeURIComponent(String(owner))) + .replace('{' + 'slug' + '}', encodeURIComponent(String(slug))); - headerParameters['Content-Type'] = 'application/json'; + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - if (this.configuration && this.configuration.apiKey) { - headerParameters["api-key"] = await this.configuration.apiKey("api-key"); // ApiKeyAuth authentication - } - const response = await this.request({ - path: `/api/v1/analytics/{owner}/{slug}/sql/execute`.replace(`{${"owner"}}`, encodeURIComponent(String(requestParameters['owner']))).replace(`{${"slug"}}`, encodeURIComponent(String(requestParameters['slug']))), - method: 'POST', - headers: headerParameters, - query: queryParameters, - body: AnalyticServiceAnalyticServiceExecuteSQLBodyToJSON(requestParameters['body']), - }, initOverrides); + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(body, "AnalyticServiceAnalyticServiceExecuteSQLBody", ""), + contentType + ); + requestContext.setBody(serializedBody); - return new runtime.JSONApiResponse(response, (jsonValue) => AnalyticServiceSyncExecuteSQLResponseFromJSON(jsonValue)); - } + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["ApiKeyAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } - /** - * Execute SQL in a project. Go to \"Data Studio\" -> \"SQL Editor\", write your query and then click \"Export as cURL\" ![screenshot](https://raw.githubusercontent.com/sentioxyz/docs/main/.gitbook/assets/image%20(102).png) Find more: https://docs.sentio.xyz/reference/data#sql-api - * Execute SQL - */ - async executeSQL(requestParameters: ExecuteSQLRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.executeSQLRaw(requestParameters, initOverrides); - return await response.value(); + return requestContext; } /** * Get a list of metrics in a project + * @param projectId + * @param name + * @param version */ - async getMetricsRaw(requestParameters: GetMetricsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; + public async getMetrics(projectId?: string, name?: string, version?: number, _options?: Configuration): Promise { + let _config = _options || this.configuration; + - if (requestParameters['projectId'] != null) { - queryParameters['projectId'] = requestParameters['projectId']; - } - if (requestParameters['name'] != null) { - queryParameters['name'] = requestParameters['name']; - } - if (requestParameters['version'] != null) { - queryParameters['version'] = requestParameters['version']; + // Path Params + const localVarPath = '/api/v1/metrics'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.GET); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + + // Query Params + if (projectId !== undefined) { + requestContext.setQueryParam("projectId", ObjectSerializer.serialize(projectId, "string", "")); } - const headerParameters: runtime.HTTPHeaders = {}; + // Query Params + if (name !== undefined) { + requestContext.setQueryParam("name", ObjectSerializer.serialize(name, "string", "")); + } - if (this.configuration && this.configuration.apiKey) { - headerParameters["api-key"] = await this.configuration.apiKey("api-key"); // ApiKeyAuth authentication + // Query Params + if (version !== undefined) { + requestContext.setQueryParam("version", ObjectSerializer.serialize(version, "number", "int32")); } - const response = await this.request({ - path: `/api/v1/metrics`, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - return new runtime.JSONApiResponse(response, (jsonValue) => MetricsServiceGetMetricsResponseFromJSON(jsonValue)); - } + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["ApiKeyAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } - /** - * Get a list of metrics in a project - */ - async getMetrics(requestParameters: GetMetricsRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getMetricsRaw(requestParameters, initOverrides); - return await response.value(); + return requestContext; } /** * Get a list of coins in a project. * List coins + * @param owner + * @param slug + * @param projectId + * @param version + * @param limit + * @param offset + * @param searchQuery */ - async listCoinsRaw(requestParameters: ListCoinsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['owner'] == null) { - throw new runtime.RequiredError( - 'owner', - 'Required parameter "owner" was null or undefined when calling listCoins().' - ); + public async listCoins(owner: string, slug: string, projectId?: string, version?: number, limit?: number, offset?: number, searchQuery?: string, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'owner' is not null or undefined + if (owner === null || owner === undefined) { + throw new RequiredError("DataApi", "listCoins", "owner"); } - if (requestParameters['slug'] == null) { - throw new runtime.RequiredError( - 'slug', - 'Required parameter "slug" was null or undefined when calling listCoins().' - ); + + // verify required parameter 'slug' is not null or undefined + if (slug === null || slug === undefined) { + throw new RequiredError("DataApi", "listCoins", "slug"); } - const queryParameters: any = {}; - if (requestParameters['projectId'] != null) { - queryParameters['projectId'] = requestParameters['projectId']; + + + + + + // Path Params + const localVarPath = '/api/v1/insights/{owner}/{slug}/coins' + .replace('{' + 'owner' + '}', encodeURIComponent(String(owner))) + .replace('{' + 'slug' + '}', encodeURIComponent(String(slug))); + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.GET); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + + // Query Params + if (projectId !== undefined) { + requestContext.setQueryParam("projectId", ObjectSerializer.serialize(projectId, "string", "")); } - if (requestParameters['version'] != null) { - queryParameters['version'] = requestParameters['version']; + // Query Params + if (version !== undefined) { + requestContext.setQueryParam("version", ObjectSerializer.serialize(version, "number", "int32")); } - if (requestParameters['limit'] != null) { - queryParameters['limit'] = requestParameters['limit']; + // Query Params + if (limit !== undefined) { + requestContext.setQueryParam("limit", ObjectSerializer.serialize(limit, "number", "int32")); } - if (requestParameters['offset'] != null) { - queryParameters['offset'] = requestParameters['offset']; + // Query Params + if (offset !== undefined) { + requestContext.setQueryParam("offset", ObjectSerializer.serialize(offset, "number", "int32")); } - if (requestParameters['searchQuery'] != null) { - queryParameters['searchQuery'] = requestParameters['searchQuery']; + // Query Params + if (searchQuery !== undefined) { + requestContext.setQueryParam("searchQuery", ObjectSerializer.serialize(searchQuery, "string", "")); } - const headerParameters: runtime.HTTPHeaders = {}; - if (this.configuration && this.configuration.apiKey) { - headerParameters["api-key"] = await this.configuration.apiKey("api-key"); // ApiKeyAuth authentication + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["ApiKeyAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); } - const response = await this.request({ - path: `/api/v1/insights/{owner}/{slug}/coins`.replace(`{${"owner"}}`, encodeURIComponent(String(requestParameters['owner']))).replace(`{${"slug"}}`, encodeURIComponent(String(requestParameters['slug']))), - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => InsightsServiceListCoinsResponseFromJSON(jsonValue)); + return requestContext; } /** * Get a list of coins in a project. * List coins + * @param projectOwner + * @param projectSlug + * @param projectId + * @param version + * @param limit + * @param offset + * @param searchQuery */ - async listCoins(requestParameters: ListCoinsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.listCoinsRaw(requestParameters, initOverrides); - return await response.value(); - } + public async listCoins2(projectOwner?: string, projectSlug?: string, projectId?: string, version?: number, limit?: number, offset?: number, searchQuery?: string, _options?: Configuration): Promise { + let _config = _options || this.configuration; - /** - * Get a list of coins in a project. - * List coins - */ - async listCoins2Raw(requestParameters: ListCoins2Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - if (requestParameters['projectOwner'] != null) { - queryParameters['projectOwner'] = requestParameters['projectOwner']; - } - if (requestParameters['projectSlug'] != null) { - queryParameters['projectSlug'] = requestParameters['projectSlug']; - } - if (requestParameters['projectId'] != null) { - queryParameters['projectId'] = requestParameters['projectId']; + + + + + // Path Params + const localVarPath = '/api/v1/insights/coins'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.GET); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + + // Query Params + if (projectOwner !== undefined) { + requestContext.setQueryParam("projectOwner", ObjectSerializer.serialize(projectOwner, "string", "")); } - if (requestParameters['version'] != null) { - queryParameters['version'] = requestParameters['version']; + // Query Params + if (projectSlug !== undefined) { + requestContext.setQueryParam("projectSlug", ObjectSerializer.serialize(projectSlug, "string", "")); } - if (requestParameters['limit'] != null) { - queryParameters['limit'] = requestParameters['limit']; + // Query Params + if (projectId !== undefined) { + requestContext.setQueryParam("projectId", ObjectSerializer.serialize(projectId, "string", "")); } - if (requestParameters['offset'] != null) { - queryParameters['offset'] = requestParameters['offset']; + // Query Params + if (version !== undefined) { + requestContext.setQueryParam("version", ObjectSerializer.serialize(version, "number", "int32")); } - if (requestParameters['searchQuery'] != null) { - queryParameters['searchQuery'] = requestParameters['searchQuery']; + // Query Params + if (limit !== undefined) { + requestContext.setQueryParam("limit", ObjectSerializer.serialize(limit, "number", "int32")); } - const headerParameters: runtime.HTTPHeaders = {}; + // Query Params + if (offset !== undefined) { + requestContext.setQueryParam("offset", ObjectSerializer.serialize(offset, "number", "int32")); + } - if (this.configuration && this.configuration.apiKey) { - headerParameters["api-key"] = await this.configuration.apiKey("api-key"); // ApiKeyAuth authentication + // Query Params + if (searchQuery !== undefined) { + requestContext.setQueryParam("searchQuery", ObjectSerializer.serialize(searchQuery, "string", "")); } - const response = await this.request({ - path: `/api/v1/insights/coins`, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - return new runtime.JSONApiResponse(response, (jsonValue) => InsightsServiceListCoinsResponseFromJSON(jsonValue)); - } + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["ApiKeyAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } - /** - * Get a list of coins in a project. - * List coins - */ - async listCoins2(requestParameters: ListCoins2Request = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.listCoins2Raw(requestParameters, initOverrides); - return await response.value(); + return requestContext; } /** * Query for metrics,event logs and coin prices in a project. * Insight Query + * @param owner username or organization name + * @param slug project slug + * @param body */ - async queryRaw(requestParameters: QueryRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['owner'] == null) { - throw new runtime.RequiredError( - 'owner', - 'Required parameter "owner" was null or undefined when calling query().' - ); + public async query(owner: string, slug: string, body: InsightsServiceInsightsServiceQueryBody, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'owner' is not null or undefined + if (owner === null || owner === undefined) { + throw new RequiredError("DataApi", "query", "owner"); } - if (requestParameters['slug'] == null) { - throw new runtime.RequiredError( - 'slug', - 'Required parameter "slug" was null or undefined when calling query().' - ); + + // verify required parameter 'slug' is not null or undefined + if (slug === null || slug === undefined) { + throw new RequiredError("DataApi", "query", "slug"); } - if (requestParameters['body'] == null) { - throw new runtime.RequiredError( - 'body', - 'Required parameter "body" was null or undefined when calling query().' - ); + + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new RequiredError("DataApi", "query", "body"); } - const queryParameters: any = {}; - const headerParameters: runtime.HTTPHeaders = {}; + // Path Params + const localVarPath = '/api/v1/insights/{owner}/{slug}/query' + .replace('{' + 'owner' + '}', encodeURIComponent(String(owner))) + .replace('{' + 'slug' + '}', encodeURIComponent(String(slug))); - headerParameters['Content-Type'] = 'application/json'; + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - if (this.configuration && this.configuration.apiKey) { - headerParameters["api-key"] = await this.configuration.apiKey("api-key"); // ApiKeyAuth authentication - } - const response = await this.request({ - path: `/api/v1/insights/{owner}/{slug}/query`.replace(`{${"owner"}}`, encodeURIComponent(String(requestParameters['owner']))).replace(`{${"slug"}}`, encodeURIComponent(String(requestParameters['slug']))), - method: 'POST', - headers: headerParameters, - query: queryParameters, - body: InsightsServiceInsightsServiceQueryBodyToJSON(requestParameters['body']), - }, initOverrides); + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(body, "InsightsServiceInsightsServiceQueryBody", ""), + contentType + ); + requestContext.setBody(serializedBody); - return new runtime.JSONApiResponse(response, (jsonValue) => InsightsServiceQueryResponseFromJSON(jsonValue)); - } + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["ApiKeyAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } - /** - * Query for metrics,event logs and coin prices in a project. - * Insight Query - */ - async query(requestParameters: QueryRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.queryRaw(requestParameters, initOverrides); - return await response.value(); + return requestContext; } /** * Metric instant queries + * @param owner username or organization name + * @param slug project slug + * @param body */ - async queryInstantRaw(requestParameters: QueryInstantRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['owner'] == null) { - throw new runtime.RequiredError( - 'owner', - 'Required parameter "owner" was null or undefined when calling queryInstant().' - ); + public async queryInstant(owner: string, slug: string, body: MetricsServiceObservabilityServiceQueryBody, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'owner' is not null or undefined + if (owner === null || owner === undefined) { + throw new RequiredError("DataApi", "queryInstant", "owner"); } - if (requestParameters['slug'] == null) { - throw new runtime.RequiredError( - 'slug', - 'Required parameter "slug" was null or undefined when calling queryInstant().' - ); + + // verify required parameter 'slug' is not null or undefined + if (slug === null || slug === undefined) { + throw new RequiredError("DataApi", "queryInstant", "slug"); } - if (requestParameters['body'] == null) { - throw new runtime.RequiredError( - 'body', - 'Required parameter "body" was null or undefined when calling queryInstant().' - ); + + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new RequiredError("DataApi", "queryInstant", "body"); } - const queryParameters: any = {}; - const headerParameters: runtime.HTTPHeaders = {}; + // Path Params + const localVarPath = '/api/v1/metrics/{owner}/{slug}/query' + .replace('{' + 'owner' + '}', encodeURIComponent(String(owner))) + .replace('{' + 'slug' + '}', encodeURIComponent(String(slug))); - headerParameters['Content-Type'] = 'application/json'; + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - if (this.configuration && this.configuration.apiKey) { - headerParameters["api-key"] = await this.configuration.apiKey("api-key"); // ApiKeyAuth authentication - } - const response = await this.request({ - path: `/api/v1/metrics/{owner}/{slug}/query`.replace(`{${"owner"}}`, encodeURIComponent(String(requestParameters['owner']))).replace(`{${"slug"}}`, encodeURIComponent(String(requestParameters['slug']))), - method: 'POST', - headers: headerParameters, - query: queryParameters, - body: MetricsServiceObservabilityServiceQueryBodyToJSON(requestParameters['body']), - }, initOverrides); + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(body, "MetricsServiceObservabilityServiceQueryBody", ""), + contentType + ); + requestContext.setBody(serializedBody); - return new runtime.JSONApiResponse(response, (jsonValue) => MetricsServiceQueryValueResponseFromJSON(jsonValue)); - } + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["ApiKeyAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } - /** - * Metric instant queries - */ - async queryInstant(requestParameters: QueryInstantRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.queryInstantRaw(requestParameters, initOverrides); - return await response.value(); + return requestContext; } /** * Query event logs + * @param owner + * @param slug + * @param body */ - async queryLogRaw(requestParameters: QueryLogRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['owner'] == null) { - throw new runtime.RequiredError( - 'owner', - 'Required parameter "owner" was null or undefined when calling queryLog().' - ); + public async queryLog(owner: string, slug: string, body: AnalyticServiceSearchServiceQueryLogBody, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'owner' is not null or undefined + if (owner === null || owner === undefined) { + throw new RequiredError("DataApi", "queryLog", "owner"); } - if (requestParameters['slug'] == null) { - throw new runtime.RequiredError( - 'slug', - 'Required parameter "slug" was null or undefined when calling queryLog().' - ); + + // verify required parameter 'slug' is not null or undefined + if (slug === null || slug === undefined) { + throw new RequiredError("DataApi", "queryLog", "slug"); } - if (requestParameters['body'] == null) { - throw new runtime.RequiredError( - 'body', - 'Required parameter "body" was null or undefined when calling queryLog().' - ); + + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new RequiredError("DataApi", "queryLog", "body"); } - const queryParameters: any = {}; - const headerParameters: runtime.HTTPHeaders = {}; + // Path Params + const localVarPath = '/api/v1/eventlogs/{owner}/{slug}' + .replace('{' + 'owner' + '}', encodeURIComponent(String(owner))) + .replace('{' + 'slug' + '}', encodeURIComponent(String(slug))); - headerParameters['Content-Type'] = 'application/json'; + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - if (this.configuration && this.configuration.apiKey) { - headerParameters["api-key"] = await this.configuration.apiKey("api-key"); // ApiKeyAuth authentication - } - const response = await this.request({ - path: `/api/v1/eventlogs/{owner}/{slug}`.replace(`{${"owner"}}`, encodeURIComponent(String(requestParameters['owner']))).replace(`{${"slug"}}`, encodeURIComponent(String(requestParameters['slug']))), - method: 'POST', - headers: headerParameters, - query: queryParameters, - body: AnalyticServiceSearchServiceQueryLogBodyToJSON(requestParameters['body']), - }, initOverrides); + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(body, "AnalyticServiceSearchServiceQueryLogBody", ""), + contentType + ); + requestContext.setBody(serializedBody); - return new runtime.JSONApiResponse(response, (jsonValue) => AnalyticServiceLogQueryResponseFromJSON(jsonValue)); - } + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["ApiKeyAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } - /** - * Query event logs - */ - async queryLog(requestParameters: QueryLogRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.queryLogRaw(requestParameters, initOverrides); - return await response.value(); + return requestContext; } /** * Query event logs + * @param owner + * @param slug + * @param projectId + * @param query + * @param timeRangeStartRelativeTimeUnit + * @param timeRangeStartRelativeTimeValue + * @param timeRangeStartRelativeTimeAlign + * @param timeRangeStartAbsoluteTime + * @param timeRangeEndRelativeTimeUnit + * @param timeRangeEndRelativeTimeValue + * @param timeRangeEndRelativeTimeAlign + * @param timeRangeEndAbsoluteTime + * @param timeRangeStep + * @param timeRangeIntervalValue + * @param timeRangeIntervalUnit + * @param timeRangeTimezone + * @param limit + * @param offset + * @param version */ - async queryLog2Raw(requestParameters: QueryLog2Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['owner'] == null) { - throw new runtime.RequiredError( - 'owner', - 'Required parameter "owner" was null or undefined when calling queryLog2().' - ); - } + public async queryLog2(owner: string, slug: string, projectId?: string, query?: string, timeRangeStartRelativeTimeUnit?: string, timeRangeStartRelativeTimeValue?: number, timeRangeStartRelativeTimeAlign?: string, timeRangeStartAbsoluteTime?: string, timeRangeEndRelativeTimeUnit?: string, timeRangeEndRelativeTimeValue?: number, timeRangeEndRelativeTimeAlign?: string, timeRangeEndAbsoluteTime?: string, timeRangeStep?: string, timeRangeIntervalValue?: number, timeRangeIntervalUnit?: string, timeRangeTimezone?: string, limit?: number, offset?: number, version?: number, _options?: Configuration): Promise { + let _config = _options || this.configuration; - if (requestParameters['slug'] == null) { - throw new runtime.RequiredError( - 'slug', - 'Required parameter "slug" was null or undefined when calling queryLog2().' - ); + // verify required parameter 'owner' is not null or undefined + if (owner === null || owner === undefined) { + throw new RequiredError("DataApi", "queryLog2", "owner"); } - const queryParameters: any = {}; - if (requestParameters['projectId'] != null) { - queryParameters['projectId'] = requestParameters['projectId']; + // verify required parameter 'slug' is not null or undefined + if (slug === null || slug === undefined) { + throw new RequiredError("DataApi", "queryLog2", "slug"); } - if (requestParameters['query'] != null) { - queryParameters['query'] = requestParameters['query']; - } - if (requestParameters['timeRangeStartRelativeTimeUnit'] != null) { - queryParameters['timeRange.start.relativeTime.unit'] = requestParameters['timeRangeStartRelativeTimeUnit']; + + + + + + + + + + + + + + + + + + // Path Params + const localVarPath = '/api/v1/eventlogs/{owner}/{slug}/query' + .replace('{' + 'owner' + '}', encodeURIComponent(String(owner))) + .replace('{' + 'slug' + '}', encodeURIComponent(String(slug))); + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.GET); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + + // Query Params + if (projectId !== undefined) { + requestContext.setQueryParam("projectId", ObjectSerializer.serialize(projectId, "string", "")); } - if (requestParameters['timeRangeStartRelativeTimeValue'] != null) { - queryParameters['timeRange.start.relativeTime.value'] = requestParameters['timeRangeStartRelativeTimeValue']; + // Query Params + if (query !== undefined) { + requestContext.setQueryParam("query", ObjectSerializer.serialize(query, "string", "")); } - if (requestParameters['timeRangeStartRelativeTimeAlign'] != null) { - queryParameters['timeRange.start.relativeTime.align'] = requestParameters['timeRangeStartRelativeTimeAlign']; + // Query Params + if (timeRangeStartRelativeTimeUnit !== undefined) { + requestContext.setQueryParam("timeRange.start.relativeTime.unit", ObjectSerializer.serialize(timeRangeStartRelativeTimeUnit, "string", "")); } - if (requestParameters['timeRangeStartAbsoluteTime'] != null) { - queryParameters['timeRange.start.absoluteTime'] = requestParameters['timeRangeStartAbsoluteTime']; + // Query Params + if (timeRangeStartRelativeTimeValue !== undefined) { + requestContext.setQueryParam("timeRange.start.relativeTime.value", ObjectSerializer.serialize(timeRangeStartRelativeTimeValue, "number", "int32")); } - if (requestParameters['timeRangeEndRelativeTimeUnit'] != null) { - queryParameters['timeRange.end.relativeTime.unit'] = requestParameters['timeRangeEndRelativeTimeUnit']; + // Query Params + if (timeRangeStartRelativeTimeAlign !== undefined) { + requestContext.setQueryParam("timeRange.start.relativeTime.align", ObjectSerializer.serialize(timeRangeStartRelativeTimeAlign, "string", "")); } - if (requestParameters['timeRangeEndRelativeTimeValue'] != null) { - queryParameters['timeRange.end.relativeTime.value'] = requestParameters['timeRangeEndRelativeTimeValue']; + // Query Params + if (timeRangeStartAbsoluteTime !== undefined) { + requestContext.setQueryParam("timeRange.start.absoluteTime", ObjectSerializer.serialize(timeRangeStartAbsoluteTime, "string", "int64")); } - if (requestParameters['timeRangeEndRelativeTimeAlign'] != null) { - queryParameters['timeRange.end.relativeTime.align'] = requestParameters['timeRangeEndRelativeTimeAlign']; + // Query Params + if (timeRangeEndRelativeTimeUnit !== undefined) { + requestContext.setQueryParam("timeRange.end.relativeTime.unit", ObjectSerializer.serialize(timeRangeEndRelativeTimeUnit, "string", "")); } - if (requestParameters['timeRangeEndAbsoluteTime'] != null) { - queryParameters['timeRange.end.absoluteTime'] = requestParameters['timeRangeEndAbsoluteTime']; + // Query Params + if (timeRangeEndRelativeTimeValue !== undefined) { + requestContext.setQueryParam("timeRange.end.relativeTime.value", ObjectSerializer.serialize(timeRangeEndRelativeTimeValue, "number", "int32")); } - if (requestParameters['timeRangeStep'] != null) { - queryParameters['timeRange.step'] = requestParameters['timeRangeStep']; + // Query Params + if (timeRangeEndRelativeTimeAlign !== undefined) { + requestContext.setQueryParam("timeRange.end.relativeTime.align", ObjectSerializer.serialize(timeRangeEndRelativeTimeAlign, "string", "")); } - if (requestParameters['timeRangeIntervalValue'] != null) { - queryParameters['timeRange.interval.value'] = requestParameters['timeRangeIntervalValue']; + // Query Params + if (timeRangeEndAbsoluteTime !== undefined) { + requestContext.setQueryParam("timeRange.end.absoluteTime", ObjectSerializer.serialize(timeRangeEndAbsoluteTime, "string", "int64")); } - if (requestParameters['timeRangeIntervalUnit'] != null) { - queryParameters['timeRange.interval.unit'] = requestParameters['timeRangeIntervalUnit']; + // Query Params + if (timeRangeStep !== undefined) { + requestContext.setQueryParam("timeRange.step", ObjectSerializer.serialize(timeRangeStep, "string", "int64")); } - if (requestParameters['timeRangeTimezone'] != null) { - queryParameters['timeRange.timezone'] = requestParameters['timeRangeTimezone']; + // Query Params + if (timeRangeIntervalValue !== undefined) { + requestContext.setQueryParam("timeRange.interval.value", ObjectSerializer.serialize(timeRangeIntervalValue, "number", "double")); } - if (requestParameters['limit'] != null) { - queryParameters['limit'] = requestParameters['limit']; + // Query Params + if (timeRangeIntervalUnit !== undefined) { + requestContext.setQueryParam("timeRange.interval.unit", ObjectSerializer.serialize(timeRangeIntervalUnit, "string", "")); } - if (requestParameters['offset'] != null) { - queryParameters['offset'] = requestParameters['offset']; + // Query Params + if (timeRangeTimezone !== undefined) { + requestContext.setQueryParam("timeRange.timezone", ObjectSerializer.serialize(timeRangeTimezone, "string", "")); } - if (requestParameters['version'] != null) { - queryParameters['version'] = requestParameters['version']; + // Query Params + if (limit !== undefined) { + requestContext.setQueryParam("limit", ObjectSerializer.serialize(limit, "number", "int32")); } - const headerParameters: runtime.HTTPHeaders = {}; + // Query Params + if (offset !== undefined) { + requestContext.setQueryParam("offset", ObjectSerializer.serialize(offset, "number", "int32")); + } - if (this.configuration && this.configuration.apiKey) { - headerParameters["api-key"] = await this.configuration.apiKey("api-key"); // ApiKeyAuth authentication + // Query Params + if (version !== undefined) { + requestContext.setQueryParam("version", ObjectSerializer.serialize(version, "number", "int32")); } - const response = await this.request({ - path: `/api/v1/eventlogs/{owner}/{slug}/query`.replace(`{${"owner"}}`, encodeURIComponent(String(requestParameters['owner']))).replace(`{${"slug"}}`, encodeURIComponent(String(requestParameters['slug']))), - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - return new runtime.JSONApiResponse(response, (jsonValue) => AnalyticServiceLogQueryResponseFromJSON(jsonValue)); - } + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["ApiKeyAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } - /** - * Query event logs - */ - async queryLog2(requestParameters: QueryLog2Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.queryLog2Raw(requestParameters, initOverrides); - return await response.value(); + return requestContext; } /** * The easiest way to build query is through UI, you could first create an insight chart, and then **Export as cURL**. ![screenshot](https://raw.githubusercontent.com/sentioxyz/docs/main/.gitbook/assets/image%20(101).png) * Metric range queries + * @param owner username or organization name + * @param slug project slug + * @param body */ - async queryRangeRaw(requestParameters: QueryRangeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['owner'] == null) { - throw new runtime.RequiredError( - 'owner', - 'Required parameter "owner" was null or undefined when calling queryRange().' - ); + public async queryRange(owner: string, slug: string, body: MetricsServiceObservabilityServiceQueryRangeBody, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'owner' is not null or undefined + if (owner === null || owner === undefined) { + throw new RequiredError("DataApi", "queryRange", "owner"); } - if (requestParameters['slug'] == null) { - throw new runtime.RequiredError( - 'slug', - 'Required parameter "slug" was null or undefined when calling queryRange().' - ); + + // verify required parameter 'slug' is not null or undefined + if (slug === null || slug === undefined) { + throw new RequiredError("DataApi", "queryRange", "slug"); } - if (requestParameters['body'] == null) { - throw new runtime.RequiredError( - 'body', - 'Required parameter "body" was null or undefined when calling queryRange().' - ); + + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new RequiredError("DataApi", "queryRange", "body"); } - const queryParameters: any = {}; - const headerParameters: runtime.HTTPHeaders = {}; + // Path Params + const localVarPath = '/api/v1/metrics/{owner}/{slug}/query_range' + .replace('{' + 'owner' + '}', encodeURIComponent(String(owner))) + .replace('{' + 'slug' + '}', encodeURIComponent(String(slug))); - headerParameters['Content-Type'] = 'application/json'; + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - if (this.configuration && this.configuration.apiKey) { - headerParameters["api-key"] = await this.configuration.apiKey("api-key"); // ApiKeyAuth authentication - } - const response = await this.request({ - path: `/api/v1/metrics/{owner}/{slug}/query_range`.replace(`{${"owner"}}`, encodeURIComponent(String(requestParameters['owner']))).replace(`{${"slug"}}`, encodeURIComponent(String(requestParameters['slug']))), - method: 'POST', - headers: headerParameters, - query: queryParameters, - body: MetricsServiceObservabilityServiceQueryRangeBodyToJSON(requestParameters['body']), - }, initOverrides); + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(body, "MetricsServiceObservabilityServiceQueryRangeBody", ""), + contentType + ); + requestContext.setBody(serializedBody); - return new runtime.JSONApiResponse(response, (jsonValue) => MetricsServiceMetricsQueryResponseFromJSON(jsonValue)); - } + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["ApiKeyAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } - /** - * The easiest way to build query is through UI, you could first create an insight chart, and then **Export as cURL**. ![screenshot](https://raw.githubusercontent.com/sentioxyz/docs/main/.gitbook/assets/image%20(101).png) - * Metric range queries - */ - async queryRange(requestParameters: QueryRangeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.queryRangeRaw(requestParameters, initOverrides); - return await response.value(); + return requestContext; } /** * Query for retention. * Retention query + * @param owner + * @param slug + * @param body */ - async retentionRaw(requestParameters: RetentionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['owner'] == null) { - throw new runtime.RequiredError( - 'owner', - 'Required parameter "owner" was null or undefined when calling retention().' - ); + public async retention(owner: string, slug: string, body: InsightsServiceInsightsServiceRetentionBody, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'owner' is not null or undefined + if (owner === null || owner === undefined) { + throw new RequiredError("DataApi", "retention", "owner"); } - if (requestParameters['slug'] == null) { - throw new runtime.RequiredError( - 'slug', - 'Required parameter "slug" was null or undefined when calling retention().' - ); + + // verify required parameter 'slug' is not null or undefined + if (slug === null || slug === undefined) { + throw new RequiredError("DataApi", "retention", "slug"); } - if (requestParameters['body'] == null) { - throw new runtime.RequiredError( - 'body', - 'Required parameter "body" was null or undefined when calling retention().' - ); + + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new RequiredError("DataApi", "retention", "body"); } - const queryParameters: any = {}; - const headerParameters: runtime.HTTPHeaders = {}; + // Path Params + const localVarPath = '/api/v1/insights/{owner}/{slug}/retention' + .replace('{' + 'owner' + '}', encodeURIComponent(String(owner))) + .replace('{' + 'slug' + '}', encodeURIComponent(String(slug))); - headerParameters['Content-Type'] = 'application/json'; + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - if (this.configuration && this.configuration.apiKey) { - headerParameters["api-key"] = await this.configuration.apiKey("api-key"); // ApiKeyAuth authentication - } - const response = await this.request({ - path: `/api/v1/insights/{owner}/{slug}/retention`.replace(`{${"owner"}}`, encodeURIComponent(String(requestParameters['owner']))).replace(`{${"slug"}}`, encodeURIComponent(String(requestParameters['slug']))), - method: 'POST', - headers: headerParameters, - query: queryParameters, - body: InsightsServiceInsightsServiceRetentionBodyToJSON(requestParameters['body']), - }, initOverrides); + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(body, "InsightsServiceInsightsServiceRetentionBody", ""), + contentType + ); + requestContext.setBody(serializedBody); - return new runtime.JSONApiResponse(response, (jsonValue) => InsightsServiceRetentionResponseFromJSON(jsonValue)); + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["ApiKeyAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; } /** * Query for retention. * Retention query + * @param body */ - async retention(requestParameters: RetentionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.retentionRaw(requestParameters, initOverrides); - return await response.value(); + public async retention2(body: InsightsServiceRetentionRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new RequiredError("DataApi", "retention2", "body"); + } + + + // Path Params + const localVarPath = '/api/v1/insights/retention'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(body, "InsightsServiceRetentionRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["ApiKeyAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; } +} + +export class DataApiResponseProcessor { + /** - * Query for retention. - * Retention query + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to executeSQL + * @throws ApiException if the response code was not in [200, 299] */ - async retention2Raw(requestParameters: Retention2Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['body'] == null) { - throw new runtime.RequiredError( - 'body', - 'Required parameter "body" was null or undefined when calling retention2().' - ); - } + public async executeSQLWithHttpInfo(response: ResponseContext): Promise> { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: AnalyticServiceSyncExecuteSQLResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "AnalyticServiceSyncExecuteSQLResponse", "" + ) as AnalyticServiceSyncExecuteSQLResponse; + return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: AnalyticServiceSyncExecuteSQLResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "AnalyticServiceSyncExecuteSQLResponse", "" + ) as AnalyticServiceSyncExecuteSQLResponse; + return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } - const queryParameters: any = {}; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to getMetrics + * @throws ApiException if the response code was not in [200, 299] + */ + public async getMetricsWithHttpInfo(response: ResponseContext): Promise> { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: MetricsServiceGetMetricsResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "MetricsServiceGetMetricsResponse", "" + ) as MetricsServiceGetMetricsResponse; + return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: MetricsServiceGetMetricsResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "MetricsServiceGetMetricsResponse", "" + ) as MetricsServiceGetMetricsResponse; + return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } - const headerParameters: runtime.HTTPHeaders = {}; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to listCoins + * @throws ApiException if the response code was not in [200, 299] + */ + public async listCoinsWithHttpInfo(response: ResponseContext): Promise> { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: InsightsServiceListCoinsResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "InsightsServiceListCoinsResponse", "" + ) as InsightsServiceListCoinsResponse; + return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: InsightsServiceListCoinsResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "InsightsServiceListCoinsResponse", "" + ) as InsightsServiceListCoinsResponse; + return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } - headerParameters['Content-Type'] = 'application/json'; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to listCoins2 + * @throws ApiException if the response code was not in [200, 299] + */ + public async listCoins2WithHttpInfo(response: ResponseContext): Promise> { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: InsightsServiceListCoinsResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "InsightsServiceListCoinsResponse", "" + ) as InsightsServiceListCoinsResponse; + return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: InsightsServiceListCoinsResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "InsightsServiceListCoinsResponse", "" + ) as InsightsServiceListCoinsResponse; + return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } - if (this.configuration && this.configuration.apiKey) { - headerParameters["api-key"] = await this.configuration.apiKey("api-key"); // ApiKeyAuth authentication - } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to query + * @throws ApiException if the response code was not in [200, 299] + */ + public async queryWithHttpInfo(response: ResponseContext): Promise> { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: InsightsServiceQueryResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "InsightsServiceQueryResponse", "" + ) as InsightsServiceQueryResponse; + return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: InsightsServiceQueryResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "InsightsServiceQueryResponse", "" + ) as InsightsServiceQueryResponse; + return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } - const response = await this.request({ - path: `/api/v1/insights/retention`, - method: 'POST', - headers: headerParameters, - query: queryParameters, - body: InsightsServiceRetentionRequestToJSON(requestParameters['body']), - }, initOverrides); + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to queryInstant + * @throws ApiException if the response code was not in [200, 299] + */ + public async queryInstantWithHttpInfo(response: ResponseContext): Promise> { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: MetricsServiceQueryValueResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "MetricsServiceQueryValueResponse", "" + ) as MetricsServiceQueryValueResponse; + return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: MetricsServiceQueryValueResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "MetricsServiceQueryValueResponse", "" + ) as MetricsServiceQueryValueResponse; + return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } - return new runtime.JSONApiResponse(response, (jsonValue) => InsightsServiceRetentionResponseFromJSON(jsonValue)); + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to queryLog + * @throws ApiException if the response code was not in [200, 299] + */ + public async queryLogWithHttpInfo(response: ResponseContext): Promise> { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: AnalyticServiceLogQueryResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "AnalyticServiceLogQueryResponse", "" + ) as AnalyticServiceLogQueryResponse; + return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: AnalyticServiceLogQueryResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "AnalyticServiceLogQueryResponse", "" + ) as AnalyticServiceLogQueryResponse; + return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); } /** - * Query for retention. - * Retention query + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to queryLog2 + * @throws ApiException if the response code was not in [200, 299] + */ + public async queryLog2WithHttpInfo(response: ResponseContext): Promise> { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: AnalyticServiceLogQueryResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "AnalyticServiceLogQueryResponse", "" + ) as AnalyticServiceLogQueryResponse; + return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: AnalyticServiceLogQueryResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "AnalyticServiceLogQueryResponse", "" + ) as AnalyticServiceLogQueryResponse; + return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to queryRange + * @throws ApiException if the response code was not in [200, 299] + */ + public async queryRangeWithHttpInfo(response: ResponseContext): Promise> { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: MetricsServiceMetricsQueryResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "MetricsServiceMetricsQueryResponse", "" + ) as MetricsServiceMetricsQueryResponse; + return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: MetricsServiceMetricsQueryResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "MetricsServiceMetricsQueryResponse", "" + ) as MetricsServiceMetricsQueryResponse; + return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to retention + * @throws ApiException if the response code was not in [200, 299] + */ + public async retentionWithHttpInfo(response: ResponseContext): Promise> { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: InsightsServiceRetentionResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "InsightsServiceRetentionResponse", "" + ) as InsightsServiceRetentionResponse; + return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: InsightsServiceRetentionResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "InsightsServiceRetentionResponse", "" + ) as InsightsServiceRetentionResponse; + return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to retention2 + * @throws ApiException if the response code was not in [200, 299] */ - async retention2(requestParameters: Retention2Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.retention2Raw(requestParameters, initOverrides); - return await response.value(); + public async retention2WithHttpInfo(response: ResponseContext): Promise> { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: InsightsServiceRetentionResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "InsightsServiceRetentionResponse", "" + ) as InsightsServiceRetentionResponse; + return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: InsightsServiceRetentionResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "InsightsServiceRetentionResponse", "" + ) as InsightsServiceRetentionResponse; + return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); } } diff --git a/src/apis/DebugAndSimulationApi.ts b/src/apis/DebugAndSimulationApi.ts index 4c886cc..79904b2 100755 --- a/src/apis/DebugAndSimulationApi.ts +++ b/src/apis/DebugAndSimulationApi.ts @@ -1,733 +1,1006 @@ -/* tslint:disable */ -/* eslint-disable */ +// TODO: better import syntax? +import {BaseAPIRequestFactory, RequiredError, COLLECTION_FORMATS} from './baseapi.js'; +import {Configuration} from '../configuration.js'; +import {RequestContext, HttpMethod, ResponseContext, HttpFile, HttpInfo} from '../http/http.js'; +import {ObjectSerializer} from '../models/ObjectSerializer.js'; +import {ApiException} from './exception.js'; +import {canConsumeForm, isCodeInRange} from '../util.js'; +import {SecurityAuthentication} from '../auth/auth.js'; + + +import { GoogleApiHttpBody } from '../models/GoogleApiHttpBody.js'; +import { SolidityServiceGetSimulationBundleResponse } from '../models/SolidityServiceGetSimulationBundleResponse.js'; +import { SolidityServiceGetSimulationResponse } from '../models/SolidityServiceGetSimulationResponse.js'; +import { SolidityServiceGetSimulationsResponse } from '../models/SolidityServiceGetSimulationsResponse.js'; +import { SolidityServiceSimulateTransactionBundleResponse } from '../models/SolidityServiceSimulateTransactionBundleResponse.js'; +import { SolidityServiceSimulateTransactionResponse } from '../models/SolidityServiceSimulateTransactionResponse.js'; +import { SolidityServiceSolidityAPIServiceSimulateTransactionBody } from '../models/SolidityServiceSolidityAPIServiceSimulateTransactionBody.js'; +import { SolidityServiceSolidityAPIServiceSimulateTransactionBundleBody } from '../models/SolidityServiceSolidityAPIServiceSimulateTransactionBundleBody.js'; +import { TxindexEvmSearchTransactionsResponse } from '../models/TxindexEvmSearchTransactionsResponse.js'; + /** - * Sentio API - * Sentio Open API for query data - * - * The version of the OpenAPI document: version not set - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. + * no description */ +export class DebugAndSimulationApiRequestFactory extends BaseAPIRequestFactory { + /** + * Get trace by bundle simulation + * @param owner + * @param slug + * @param chainId + * @param bundleId + * @param withInternalCalls Fetch the decoded trace, which will give you the function info, decoded parameters of both external and internal call trace. + * @param disableOptimizer Disable optimizations to make internal calls more accurate, but gas costs will differ from the actual execution. + * @param ignoreGasCost Only effective when disableOptimizer=true. + */ + public async getCallTraceByBundle(owner: string, slug: string, chainId: string, bundleId: string, withInternalCalls?: boolean, disableOptimizer?: boolean, ignoreGasCost?: boolean, _options?: Configuration): Promise { + let _config = _options || this.configuration; -import * as runtime from '../runtime.js'; -import type { - GoogleApiHttpBody, - SolidityServiceGetSimulationBundleResponse, - SolidityServiceGetSimulationResponse, - SolidityServiceGetSimulationsResponse, - SolidityServiceSimulateTransactionBundleResponse, - SolidityServiceSimulateTransactionResponse, - SolidityServiceSolidityAPIServiceSimulateTransactionBody, - SolidityServiceSolidityAPIServiceSimulateTransactionBundleBody, - TxindexEvmSearchTransactionsResponse, -} from '../models/index.js'; -import { - GoogleApiHttpBodyFromJSON, - GoogleApiHttpBodyToJSON, - SolidityServiceGetSimulationBundleResponseFromJSON, - SolidityServiceGetSimulationBundleResponseToJSON, - SolidityServiceGetSimulationResponseFromJSON, - SolidityServiceGetSimulationResponseToJSON, - SolidityServiceGetSimulationsResponseFromJSON, - SolidityServiceGetSimulationsResponseToJSON, - SolidityServiceSimulateTransactionBundleResponseFromJSON, - SolidityServiceSimulateTransactionBundleResponseToJSON, - SolidityServiceSimulateTransactionResponseFromJSON, - SolidityServiceSimulateTransactionResponseToJSON, - SolidityServiceSolidityAPIServiceSimulateTransactionBodyFromJSON, - SolidityServiceSolidityAPIServiceSimulateTransactionBodyToJSON, - SolidityServiceSolidityAPIServiceSimulateTransactionBundleBodyFromJSON, - SolidityServiceSolidityAPIServiceSimulateTransactionBundleBodyToJSON, - TxindexEvmSearchTransactionsResponseFromJSON, - TxindexEvmSearchTransactionsResponseToJSON, -} from '../models/index.js'; - -export interface GetCallTraceByBundleRequest { - owner: string; - slug: string; - chainId: string; - bundleId: string; - withInternalCalls?: boolean; - disableOptimizer?: boolean; - ignoreGasCost?: boolean; -} - -export interface GetCallTraceBySimulationRequest { - owner: string; - slug: string; - chainId: string; - simulationId: string; - withInternalCalls?: boolean; - disableOptimizer?: boolean; - ignoreGasCost?: boolean; -} - -export interface GetCallTraceByTransactionRequest { - owner: string; - slug: string; - chainId: string; - txHash: string; - withInternalCalls?: boolean; - disableOptimizer?: boolean; - ignoreGasCost?: boolean; -} + // verify required parameter 'owner' is not null or undefined + if (owner === null || owner === undefined) { + throw new RequiredError("DebugAndSimulationApi", "getCallTraceByBundle", "owner"); + } -export interface GetSimulationRequest { - owner: string; - slug: string; - simulationId: string; -} -export interface GetSimulationBundleInProjectRequest { - owner: string; - slug: string; - bundleId: string; -} + // verify required parameter 'slug' is not null or undefined + if (slug === null || slug === undefined) { + throw new RequiredError("DebugAndSimulationApi", "getCallTraceByBundle", "slug"); + } -export interface GetSimulationsRequest { - owner: string; - slug: string; - labelContains?: string; - page?: number; - pageSize?: number; -} -export interface SearchTransactionsRequest { - owner: string; - slug: string; - chainId?: Array; - address?: Array; - includeDirect?: boolean; - includeTrace?: boolean; - includeIn?: boolean; - includeOut?: boolean; - startBlock?: string; - endBlock?: string; - startTimestamp?: string; - endTimestamp?: string; - transactionStatus?: Array; - methodSignature?: string; - limit?: number; - pageToken?: string; -} + // verify required parameter 'chainId' is not null or undefined + if (chainId === null || chainId === undefined) { + throw new RequiredError("DebugAndSimulationApi", "getCallTraceByBundle", "chainId"); + } -export interface SimulateTransactionRequest { - owner: string; - slug: string; - chainId: string; - body: SolidityServiceSolidityAPIServiceSimulateTransactionBody; -} -export interface SimulateTransactionBundleRequest { - owner: string; - slug: string; - chainId: string; - body: SolidityServiceSolidityAPIServiceSimulateTransactionBundleBody; -} + // verify required parameter 'bundleId' is not null or undefined + if (bundleId === null || bundleId === undefined) { + throw new RequiredError("DebugAndSimulationApi", "getCallTraceByBundle", "bundleId"); + } -/** - * - */ -export class DebugAndSimulationApi extends runtime.BaseAPI { - /** - * Get trace by bundle simulation - */ - async getCallTraceByBundleRaw(requestParameters: GetCallTraceByBundleRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['owner'] == null) { - throw new runtime.RequiredError( - 'owner', - 'Required parameter "owner" was null or undefined when calling getCallTraceByBundle().' - ); - } - if (requestParameters['slug'] == null) { - throw new runtime.RequiredError( - 'slug', - 'Required parameter "slug" was null or undefined when calling getCallTraceByBundle().' - ); - } - if (requestParameters['chainId'] == null) { - throw new runtime.RequiredError( - 'chainId', - 'Required parameter "chainId" was null or undefined when calling getCallTraceByBundle().' - ); - } - if (requestParameters['bundleId'] == null) { - throw new runtime.RequiredError( - 'bundleId', - 'Required parameter "bundleId" was null or undefined when calling getCallTraceByBundle().' - ); - } + // Path Params + const localVarPath = '/api/v1/solidity/{owner}/{slug}/{chainId}/bundle/{bundleId}/call_trace' + .replace('{' + 'owner' + '}', encodeURIComponent(String(owner))) + .replace('{' + 'slug' + '}', encodeURIComponent(String(slug))) + .replace('{' + 'chainId' + '}', encodeURIComponent(String(chainId))) + .replace('{' + 'bundleId' + '}', encodeURIComponent(String(bundleId))); - const queryParameters: any = {}; + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.GET); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - if (requestParameters['withInternalCalls'] != null) { - queryParameters['withInternalCalls'] = requestParameters['withInternalCalls']; + // Query Params + if (withInternalCalls !== undefined) { + requestContext.setQueryParam("withInternalCalls", ObjectSerializer.serialize(withInternalCalls, "boolean", "")); } - if (requestParameters['disableOptimizer'] != null) { - queryParameters['disableOptimizer'] = requestParameters['disableOptimizer']; + // Query Params + if (disableOptimizer !== undefined) { + requestContext.setQueryParam("disableOptimizer", ObjectSerializer.serialize(disableOptimizer, "boolean", "")); } - if (requestParameters['ignoreGasCost'] != null) { - queryParameters['ignoreGasCost'] = requestParameters['ignoreGasCost']; + // Query Params + if (ignoreGasCost !== undefined) { + requestContext.setQueryParam("ignoreGasCost", ObjectSerializer.serialize(ignoreGasCost, "boolean", "")); } - const headerParameters: runtime.HTTPHeaders = {}; - if (this.configuration && this.configuration.apiKey) { - headerParameters["api-key"] = await this.configuration.apiKey("api-key"); // ApiKeyAuth authentication + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["ApiKeyAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); } - const response = await this.request({ - path: `/api/v1/solidity/{owner}/{slug}/{chainId}/bundle/{bundleId}/call_trace`.replace(`{${"owner"}}`, encodeURIComponent(String(requestParameters['owner']))).replace(`{${"slug"}}`, encodeURIComponent(String(requestParameters['slug']))).replace(`{${"chainId"}}`, encodeURIComponent(String(requestParameters['chainId']))).replace(`{${"bundleId"}}`, encodeURIComponent(String(requestParameters['bundleId']))), - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => GoogleApiHttpBodyFromJSON(jsonValue)); - } - - /** - * Get trace by bundle simulation - */ - async getCallTraceByBundle(requestParameters: GetCallTraceByBundleRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getCallTraceByBundleRaw(requestParameters, initOverrides); - return await response.value(); + return requestContext; } /** * Get trace by simulation + * @param owner + * @param slug + * @param chainId + * @param simulationId + * @param withInternalCalls Fetch the decoded trace, which will give you the function info, decoded parameters of both external and internal call trace. + * @param disableOptimizer Disable optimizations to make internal calls more accurate, but gas costs will differ from the actual execution. + * @param ignoreGasCost Only effective when disableOptimizer=true. */ - async getCallTraceBySimulationRaw(requestParameters: GetCallTraceBySimulationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['owner'] == null) { - throw new runtime.RequiredError( - 'owner', - 'Required parameter "owner" was null or undefined when calling getCallTraceBySimulation().' - ); - } + public async getCallTraceBySimulation(owner: string, slug: string, chainId: string, simulationId: string, withInternalCalls?: boolean, disableOptimizer?: boolean, ignoreGasCost?: boolean, _options?: Configuration): Promise { + let _config = _options || this.configuration; - if (requestParameters['slug'] == null) { - throw new runtime.RequiredError( - 'slug', - 'Required parameter "slug" was null or undefined when calling getCallTraceBySimulation().' - ); + // verify required parameter 'owner' is not null or undefined + if (owner === null || owner === undefined) { + throw new RequiredError("DebugAndSimulationApi", "getCallTraceBySimulation", "owner"); } - if (requestParameters['chainId'] == null) { - throw new runtime.RequiredError( - 'chainId', - 'Required parameter "chainId" was null or undefined when calling getCallTraceBySimulation().' - ); - } - if (requestParameters['simulationId'] == null) { - throw new runtime.RequiredError( - 'simulationId', - 'Required parameter "simulationId" was null or undefined when calling getCallTraceBySimulation().' - ); + // verify required parameter 'slug' is not null or undefined + if (slug === null || slug === undefined) { + throw new RequiredError("DebugAndSimulationApi", "getCallTraceBySimulation", "slug"); } - const queryParameters: any = {}; - if (requestParameters['withInternalCalls'] != null) { - queryParameters['withInternalCalls'] = requestParameters['withInternalCalls']; + // verify required parameter 'chainId' is not null or undefined + if (chainId === null || chainId === undefined) { + throw new RequiredError("DebugAndSimulationApi", "getCallTraceBySimulation", "chainId"); } - if (requestParameters['disableOptimizer'] != null) { - queryParameters['disableOptimizer'] = requestParameters['disableOptimizer']; + + // verify required parameter 'simulationId' is not null or undefined + if (simulationId === null || simulationId === undefined) { + throw new RequiredError("DebugAndSimulationApi", "getCallTraceBySimulation", "simulationId"); } - if (requestParameters['ignoreGasCost'] != null) { - queryParameters['ignoreGasCost'] = requestParameters['ignoreGasCost']; + + + + + // Path Params + const localVarPath = '/api/v1/solidity/{owner}/{slug}/{chainId}/simulation/{simulationId}/call_trace' + .replace('{' + 'owner' + '}', encodeURIComponent(String(owner))) + .replace('{' + 'slug' + '}', encodeURIComponent(String(slug))) + .replace('{' + 'chainId' + '}', encodeURIComponent(String(chainId))) + .replace('{' + 'simulationId' + '}', encodeURIComponent(String(simulationId))); + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.GET); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + + // Query Params + if (withInternalCalls !== undefined) { + requestContext.setQueryParam("withInternalCalls", ObjectSerializer.serialize(withInternalCalls, "boolean", "")); } - const headerParameters: runtime.HTTPHeaders = {}; + // Query Params + if (disableOptimizer !== undefined) { + requestContext.setQueryParam("disableOptimizer", ObjectSerializer.serialize(disableOptimizer, "boolean", "")); + } - if (this.configuration && this.configuration.apiKey) { - headerParameters["api-key"] = await this.configuration.apiKey("api-key"); // ApiKeyAuth authentication + // Query Params + if (ignoreGasCost !== undefined) { + requestContext.setQueryParam("ignoreGasCost", ObjectSerializer.serialize(ignoreGasCost, "boolean", "")); } - const response = await this.request({ - path: `/api/v1/solidity/{owner}/{slug}/{chainId}/simulation/{simulationId}/call_trace`.replace(`{${"owner"}}`, encodeURIComponent(String(requestParameters['owner']))).replace(`{${"slug"}}`, encodeURIComponent(String(requestParameters['slug']))).replace(`{${"chainId"}}`, encodeURIComponent(String(requestParameters['chainId']))).replace(`{${"simulationId"}}`, encodeURIComponent(String(requestParameters['simulationId']))), - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - return new runtime.JSONApiResponse(response, (jsonValue) => GoogleApiHttpBodyFromJSON(jsonValue)); - } + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["ApiKeyAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } - /** - * Get trace by simulation - */ - async getCallTraceBySimulation(requestParameters: GetCallTraceBySimulationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getCallTraceBySimulationRaw(requestParameters, initOverrides); - return await response.value(); + return requestContext; } /** * API to get Sentio call trace. It takes `txId.txHash` and `chainSpec.chainId` arguments, where the first is transaction hash, and the second is the numeric ethereum chain ID. The results looks very similar to the normal [Ethereum call trace](https://raw.githubusercontent.com/sentioxyz/docs/main/.gitbook/assets/image%20(2)%20(1)%20(1)%20(1).png). But we have an additional `startIndex` and `startIndex` on each trace entry even for the LOG, representing the execution order in the trace. This allows you to build chart that marks the order of fund flow. ![screenshot](https://raw.githubusercontent.com/sentioxyz/docs/main/.gitbook/assets/image%20(2)%20(1)%20(1)%20(1).png) * Get trace by transaction + * @param owner + * @param slug + * @param chainId + * @param txHash + * @param withInternalCalls Fetch the decoded trace, which will give you the function info, decoded parameters of both external and internal call trace. + * @param disableOptimizer Disable optimizations to make internal calls more accurate, but gas costs will differ from the actual execution. + * @param ignoreGasCost Only effective when disableOptimizer=true. */ - async getCallTraceByTransactionRaw(requestParameters: GetCallTraceByTransactionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['owner'] == null) { - throw new runtime.RequiredError( - 'owner', - 'Required parameter "owner" was null or undefined when calling getCallTraceByTransaction().' - ); - } + public async getCallTraceByTransaction(owner: string, slug: string, chainId: string, txHash: string, withInternalCalls?: boolean, disableOptimizer?: boolean, ignoreGasCost?: boolean, _options?: Configuration): Promise { + let _config = _options || this.configuration; - if (requestParameters['slug'] == null) { - throw new runtime.RequiredError( - 'slug', - 'Required parameter "slug" was null or undefined when calling getCallTraceByTransaction().' - ); + // verify required parameter 'owner' is not null or undefined + if (owner === null || owner === undefined) { + throw new RequiredError("DebugAndSimulationApi", "getCallTraceByTransaction", "owner"); } - if (requestParameters['chainId'] == null) { - throw new runtime.RequiredError( - 'chainId', - 'Required parameter "chainId" was null or undefined when calling getCallTraceByTransaction().' - ); - } - if (requestParameters['txHash'] == null) { - throw new runtime.RequiredError( - 'txHash', - 'Required parameter "txHash" was null or undefined when calling getCallTraceByTransaction().' - ); + // verify required parameter 'slug' is not null or undefined + if (slug === null || slug === undefined) { + throw new RequiredError("DebugAndSimulationApi", "getCallTraceByTransaction", "slug"); } - const queryParameters: any = {}; - if (requestParameters['withInternalCalls'] != null) { - queryParameters['withInternalCalls'] = requestParameters['withInternalCalls']; + // verify required parameter 'chainId' is not null or undefined + if (chainId === null || chainId === undefined) { + throw new RequiredError("DebugAndSimulationApi", "getCallTraceByTransaction", "chainId"); } - if (requestParameters['disableOptimizer'] != null) { - queryParameters['disableOptimizer'] = requestParameters['disableOptimizer']; + + // verify required parameter 'txHash' is not null or undefined + if (txHash === null || txHash === undefined) { + throw new RequiredError("DebugAndSimulationApi", "getCallTraceByTransaction", "txHash"); } - if (requestParameters['ignoreGasCost'] != null) { - queryParameters['ignoreGasCost'] = requestParameters['ignoreGasCost']; + + + + + // Path Params + const localVarPath = '/api/v1/solidity/{owner}/{slug}/{chainId}/transaction/{txHash}/call_trace' + .replace('{' + 'owner' + '}', encodeURIComponent(String(owner))) + .replace('{' + 'slug' + '}', encodeURIComponent(String(slug))) + .replace('{' + 'chainId' + '}', encodeURIComponent(String(chainId))) + .replace('{' + 'txHash' + '}', encodeURIComponent(String(txHash))); + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.GET); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + + // Query Params + if (withInternalCalls !== undefined) { + requestContext.setQueryParam("withInternalCalls", ObjectSerializer.serialize(withInternalCalls, "boolean", "")); } - const headerParameters: runtime.HTTPHeaders = {}; + // Query Params + if (disableOptimizer !== undefined) { + requestContext.setQueryParam("disableOptimizer", ObjectSerializer.serialize(disableOptimizer, "boolean", "")); + } - if (this.configuration && this.configuration.apiKey) { - headerParameters["api-key"] = await this.configuration.apiKey("api-key"); // ApiKeyAuth authentication + // Query Params + if (ignoreGasCost !== undefined) { + requestContext.setQueryParam("ignoreGasCost", ObjectSerializer.serialize(ignoreGasCost, "boolean", "")); } - const response = await this.request({ - path: `/api/v1/solidity/{owner}/{slug}/{chainId}/transaction/{txHash}/call_trace`.replace(`{${"owner"}}`, encodeURIComponent(String(requestParameters['owner']))).replace(`{${"slug"}}`, encodeURIComponent(String(requestParameters['slug']))).replace(`{${"chainId"}}`, encodeURIComponent(String(requestParameters['chainId']))).replace(`{${"txHash"}}`, encodeURIComponent(String(requestParameters['txHash']))), - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - return new runtime.JSONApiResponse(response, (jsonValue) => GoogleApiHttpBodyFromJSON(jsonValue)); - } + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["ApiKeyAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } - /** - * API to get Sentio call trace. It takes `txId.txHash` and `chainSpec.chainId` arguments, where the first is transaction hash, and the second is the numeric ethereum chain ID. The results looks very similar to the normal [Ethereum call trace](https://raw.githubusercontent.com/sentioxyz/docs/main/.gitbook/assets/image%20(2)%20(1)%20(1)%20(1).png). But we have an additional `startIndex` and `startIndex` on each trace entry even for the LOG, representing the execution order in the trace. This allows you to build chart that marks the order of fund flow. ![screenshot](https://raw.githubusercontent.com/sentioxyz/docs/main/.gitbook/assets/image%20(2)%20(1)%20(1)%20(1).png) - * Get trace by transaction - */ - async getCallTraceByTransaction(requestParameters: GetCallTraceByTransactionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getCallTraceByTransactionRaw(requestParameters, initOverrides); - return await response.value(); + return requestContext; } /** * Get simulation by ID + * @param owner + * @param slug + * @param simulationId */ - async getSimulationRaw(requestParameters: GetSimulationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['owner'] == null) { - throw new runtime.RequiredError( - 'owner', - 'Required parameter "owner" was null or undefined when calling getSimulation().' - ); + public async getSimulation(owner: string, slug: string, simulationId: string, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'owner' is not null or undefined + if (owner === null || owner === undefined) { + throw new RequiredError("DebugAndSimulationApi", "getSimulation", "owner"); } - if (requestParameters['slug'] == null) { - throw new runtime.RequiredError( - 'slug', - 'Required parameter "slug" was null or undefined when calling getSimulation().' - ); + + // verify required parameter 'slug' is not null or undefined + if (slug === null || slug === undefined) { + throw new RequiredError("DebugAndSimulationApi", "getSimulation", "slug"); } - if (requestParameters['simulationId'] == null) { - throw new runtime.RequiredError( - 'simulationId', - 'Required parameter "simulationId" was null or undefined when calling getSimulation().' - ); + + // verify required parameter 'simulationId' is not null or undefined + if (simulationId === null || simulationId === undefined) { + throw new RequiredError("DebugAndSimulationApi", "getSimulation", "simulationId"); } - const queryParameters: any = {}; - const headerParameters: runtime.HTTPHeaders = {}; + // Path Params + const localVarPath = '/api/v1/solidity/{owner}/{slug}/simulation/{simulationId}' + .replace('{' + 'owner' + '}', encodeURIComponent(String(owner))) + .replace('{' + 'slug' + '}', encodeURIComponent(String(slug))) + .replace('{' + 'simulationId' + '}', encodeURIComponent(String(simulationId))); - if (this.configuration && this.configuration.apiKey) { - headerParameters["api-key"] = await this.configuration.apiKey("api-key"); // ApiKeyAuth authentication - } + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.GET); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - const response = await this.request({ - path: `/api/v1/solidity/{owner}/{slug}/simulation/{simulationId}`.replace(`{${"owner"}}`, encodeURIComponent(String(requestParameters['owner']))).replace(`{${"slug"}}`, encodeURIComponent(String(requestParameters['slug']))).replace(`{${"simulationId"}}`, encodeURIComponent(String(requestParameters['simulationId']))), - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - return new runtime.JSONApiResponse(response, (jsonValue) => SolidityServiceGetSimulationResponseFromJSON(jsonValue)); - } + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["ApiKeyAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } - /** - * Get simulation by ID - */ - async getSimulation(requestParameters: GetSimulationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getSimulationRaw(requestParameters, initOverrides); - return await response.value(); + return requestContext; } /** * Get bundle simulation by ID + * @param owner + * @param slug + * @param bundleId */ - async getSimulationBundleInProjectRaw(requestParameters: GetSimulationBundleInProjectRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['owner'] == null) { - throw new runtime.RequiredError( - 'owner', - 'Required parameter "owner" was null or undefined when calling getSimulationBundleInProject().' - ); + public async getSimulationBundleInProject(owner: string, slug: string, bundleId: string, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'owner' is not null or undefined + if (owner === null || owner === undefined) { + throw new RequiredError("DebugAndSimulationApi", "getSimulationBundleInProject", "owner"); } - if (requestParameters['slug'] == null) { - throw new runtime.RequiredError( - 'slug', - 'Required parameter "slug" was null or undefined when calling getSimulationBundleInProject().' - ); + + // verify required parameter 'slug' is not null or undefined + if (slug === null || slug === undefined) { + throw new RequiredError("DebugAndSimulationApi", "getSimulationBundleInProject", "slug"); } - if (requestParameters['bundleId'] == null) { - throw new runtime.RequiredError( - 'bundleId', - 'Required parameter "bundleId" was null or undefined when calling getSimulationBundleInProject().' - ); + + // verify required parameter 'bundleId' is not null or undefined + if (bundleId === null || bundleId === undefined) { + throw new RequiredError("DebugAndSimulationApi", "getSimulationBundleInProject", "bundleId"); } - const queryParameters: any = {}; - const headerParameters: runtime.HTTPHeaders = {}; + // Path Params + const localVarPath = '/api/v1/solidity/{owner}/{slug}/simulation_bundle/{bundleId}' + .replace('{' + 'owner' + '}', encodeURIComponent(String(owner))) + .replace('{' + 'slug' + '}', encodeURIComponent(String(slug))) + .replace('{' + 'bundleId' + '}', encodeURIComponent(String(bundleId))); - if (this.configuration && this.configuration.apiKey) { - headerParameters["api-key"] = await this.configuration.apiKey("api-key"); // ApiKeyAuth authentication - } + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.GET); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - const response = await this.request({ - path: `/api/v1/solidity/{owner}/{slug}/simulation_bundle/{bundleId}`.replace(`{${"owner"}}`, encodeURIComponent(String(requestParameters['owner']))).replace(`{${"slug"}}`, encodeURIComponent(String(requestParameters['slug']))).replace(`{${"bundleId"}}`, encodeURIComponent(String(requestParameters['bundleId']))), - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - return new runtime.JSONApiResponse(response, (jsonValue) => SolidityServiceGetSimulationBundleResponseFromJSON(jsonValue)); - } + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["ApiKeyAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } - /** - * Get bundle simulation by ID - */ - async getSimulationBundleInProject(requestParameters: GetSimulationBundleInProjectRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getSimulationBundleInProjectRaw(requestParameters, initOverrides); - return await response.value(); + return requestContext; } /** * Get list of simulations + * @param owner + * @param slug + * @param labelContains + * @param page + * @param pageSize */ - async getSimulationsRaw(requestParameters: GetSimulationsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['owner'] == null) { - throw new runtime.RequiredError( - 'owner', - 'Required parameter "owner" was null or undefined when calling getSimulations().' - ); - } + public async getSimulations(owner: string, slug: string, labelContains?: string, page?: number, pageSize?: number, _options?: Configuration): Promise { + let _config = _options || this.configuration; - if (requestParameters['slug'] == null) { - throw new runtime.RequiredError( - 'slug', - 'Required parameter "slug" was null or undefined when calling getSimulations().' - ); + // verify required parameter 'owner' is not null or undefined + if (owner === null || owner === undefined) { + throw new RequiredError("DebugAndSimulationApi", "getSimulations", "owner"); } - const queryParameters: any = {}; - if (requestParameters['labelContains'] != null) { - queryParameters['labelContains'] = requestParameters['labelContains']; + // verify required parameter 'slug' is not null or undefined + if (slug === null || slug === undefined) { + throw new RequiredError("DebugAndSimulationApi", "getSimulations", "slug"); } - if (requestParameters['page'] != null) { - queryParameters['page'] = requestParameters['page']; - } - if (requestParameters['pageSize'] != null) { - queryParameters['pageSize'] = requestParameters['pageSize']; + + + + // Path Params + const localVarPath = '/api/v1/solidity/{owner}/{slug}/simulation' + .replace('{' + 'owner' + '}', encodeURIComponent(String(owner))) + .replace('{' + 'slug' + '}', encodeURIComponent(String(slug))); + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.GET); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + + // Query Params + if (labelContains !== undefined) { + requestContext.setQueryParam("labelContains", ObjectSerializer.serialize(labelContains, "string", "")); } - const headerParameters: runtime.HTTPHeaders = {}; + // Query Params + if (page !== undefined) { + requestContext.setQueryParam("page", ObjectSerializer.serialize(page, "number", "int32")); + } - if (this.configuration && this.configuration.apiKey) { - headerParameters["api-key"] = await this.configuration.apiKey("api-key"); // ApiKeyAuth authentication + // Query Params + if (pageSize !== undefined) { + requestContext.setQueryParam("pageSize", ObjectSerializer.serialize(pageSize, "number", "int32")); } - const response = await this.request({ - path: `/api/v1/solidity/{owner}/{slug}/simulation`.replace(`{${"owner"}}`, encodeURIComponent(String(requestParameters['owner']))).replace(`{${"slug"}}`, encodeURIComponent(String(requestParameters['slug']))), - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - return new runtime.JSONApiResponse(response, (jsonValue) => SolidityServiceGetSimulationsResponseFromJSON(jsonValue)); - } + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["ApiKeyAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } - /** - * Get list of simulations - */ - async getSimulations(requestParameters: GetSimulationsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getSimulationsRaw(requestParameters, initOverrides); - return await response.value(); + return requestContext; } /** * Search transactions + * @param owner + * @param slug + * @param chainId + * @param address + * @param includeDirect + * @param includeTrace + * @param includeIn + * @param includeOut + * @param startBlock + * @param endBlock + * @param startTimestamp + * @param endTimestamp + * @param transactionStatus + * @param methodSignature + * @param limit + * @param pageToken */ - async searchTransactionsRaw(requestParameters: SearchTransactionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['owner'] == null) { - throw new runtime.RequiredError( - 'owner', - 'Required parameter "owner" was null or undefined when calling searchTransactions().' - ); - } + public async searchTransactions(owner: string, slug: string, chainId?: Array, address?: Array, includeDirect?: boolean, includeTrace?: boolean, includeIn?: boolean, includeOut?: boolean, startBlock?: string, endBlock?: string, startTimestamp?: string, endTimestamp?: string, transactionStatus?: Array, methodSignature?: string, limit?: number, pageToken?: string, _options?: Configuration): Promise { + let _config = _options || this.configuration; - if (requestParameters['slug'] == null) { - throw new runtime.RequiredError( - 'slug', - 'Required parameter "slug" was null or undefined when calling searchTransactions().' - ); + // verify required parameter 'owner' is not null or undefined + if (owner === null || owner === undefined) { + throw new RequiredError("DebugAndSimulationApi", "searchTransactions", "owner"); } - const queryParameters: any = {}; - if (requestParameters['chainId'] != null) { - queryParameters['chainId'] = requestParameters['chainId']; + // verify required parameter 'slug' is not null or undefined + if (slug === null || slug === undefined) { + throw new RequiredError("DebugAndSimulationApi", "searchTransactions", "slug"); } - if (requestParameters['address'] != null) { - queryParameters['address'] = requestParameters['address']; - } - if (requestParameters['includeDirect'] != null) { - queryParameters['includeDirect'] = requestParameters['includeDirect']; + + + + + + + + + + + + + + + // Path Params + const localVarPath = '/api/v1/solidity/{owner}/{slug}/search_transactions' + .replace('{' + 'owner' + '}', encodeURIComponent(String(owner))) + .replace('{' + 'slug' + '}', encodeURIComponent(String(slug))); + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.GET); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + + // Query Params + if (chainId !== undefined) { + const serializedParams = ObjectSerializer.serialize(chainId, "Array", ""); + for (const serializedParam of serializedParams) { + requestContext.appendQueryParam("chainId", serializedParam); + } } - if (requestParameters['includeTrace'] != null) { - queryParameters['includeTrace'] = requestParameters['includeTrace']; + // Query Params + if (address !== undefined) { + const serializedParams = ObjectSerializer.serialize(address, "Array", ""); + for (const serializedParam of serializedParams) { + requestContext.appendQueryParam("address", serializedParam); + } } - if (requestParameters['includeIn'] != null) { - queryParameters['includeIn'] = requestParameters['includeIn']; + // Query Params + if (includeDirect !== undefined) { + requestContext.setQueryParam("includeDirect", ObjectSerializer.serialize(includeDirect, "boolean", "")); } - if (requestParameters['includeOut'] != null) { - queryParameters['includeOut'] = requestParameters['includeOut']; + // Query Params + if (includeTrace !== undefined) { + requestContext.setQueryParam("includeTrace", ObjectSerializer.serialize(includeTrace, "boolean", "")); } - if (requestParameters['startBlock'] != null) { - queryParameters['startBlock'] = requestParameters['startBlock']; + // Query Params + if (includeIn !== undefined) { + requestContext.setQueryParam("includeIn", ObjectSerializer.serialize(includeIn, "boolean", "")); } - if (requestParameters['endBlock'] != null) { - queryParameters['endBlock'] = requestParameters['endBlock']; + // Query Params + if (includeOut !== undefined) { + requestContext.setQueryParam("includeOut", ObjectSerializer.serialize(includeOut, "boolean", "")); } - if (requestParameters['startTimestamp'] != null) { - queryParameters['startTimestamp'] = requestParameters['startTimestamp']; + // Query Params + if (startBlock !== undefined) { + requestContext.setQueryParam("startBlock", ObjectSerializer.serialize(startBlock, "string", "int64")); } - if (requestParameters['endTimestamp'] != null) { - queryParameters['endTimestamp'] = requestParameters['endTimestamp']; + // Query Params + if (endBlock !== undefined) { + requestContext.setQueryParam("endBlock", ObjectSerializer.serialize(endBlock, "string", "int64")); } - if (requestParameters['transactionStatus'] != null) { - queryParameters['transactionStatus'] = requestParameters['transactionStatus']; + // Query Params + if (startTimestamp !== undefined) { + requestContext.setQueryParam("startTimestamp", ObjectSerializer.serialize(startTimestamp, "string", "int64")); } - if (requestParameters['methodSignature'] != null) { - queryParameters['methodSignature'] = requestParameters['methodSignature']; + // Query Params + if (endTimestamp !== undefined) { + requestContext.setQueryParam("endTimestamp", ObjectSerializer.serialize(endTimestamp, "string", "int64")); } - if (requestParameters['limit'] != null) { - queryParameters['limit'] = requestParameters['limit']; + // Query Params + if (transactionStatus !== undefined) { + const serializedParams = ObjectSerializer.serialize(transactionStatus, "Array", "int32"); + for (const serializedParam of serializedParams) { + requestContext.appendQueryParam("transactionStatus", serializedParam); + } } - if (requestParameters['pageToken'] != null) { - queryParameters['pageToken'] = requestParameters['pageToken']; + // Query Params + if (methodSignature !== undefined) { + requestContext.setQueryParam("methodSignature", ObjectSerializer.serialize(methodSignature, "string", "")); } - const headerParameters: runtime.HTTPHeaders = {}; + // Query Params + if (limit !== undefined) { + requestContext.setQueryParam("limit", ObjectSerializer.serialize(limit, "number", "int32")); + } - if (this.configuration && this.configuration.apiKey) { - headerParameters["api-key"] = await this.configuration.apiKey("api-key"); // ApiKeyAuth authentication + // Query Params + if (pageToken !== undefined) { + requestContext.setQueryParam("pageToken", ObjectSerializer.serialize(pageToken, "string", "byte")); } - const response = await this.request({ - path: `/api/v1/solidity/{owner}/{slug}/search_transactions`.replace(`{${"owner"}}`, encodeURIComponent(String(requestParameters['owner']))).replace(`{${"slug"}}`, encodeURIComponent(String(requestParameters['slug']))), - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - return new runtime.JSONApiResponse(response, (jsonValue) => TxindexEvmSearchTransactionsResponseFromJSON(jsonValue)); - } + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["ApiKeyAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } - /** - * Search transactions - */ - async searchTransactions(requestParameters: SearchTransactionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.searchTransactionsRaw(requestParameters, initOverrides); - return await response.value(); + return requestContext; } /** * Create a new transaction simulation. The simulation body should be included in the request body. Your simulations will be saved, and a unique ID for each simulation is included in the response. It will be useful for fetching simulation details. * Run simulation + * @param owner + * @param slug + * @param chainId + * @param body */ - async simulateTransactionRaw(requestParameters: SimulateTransactionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['owner'] == null) { - throw new runtime.RequiredError( - 'owner', - 'Required parameter "owner" was null or undefined when calling simulateTransaction().' - ); + public async simulateTransaction(owner: string, slug: string, chainId: string, body: SolidityServiceSolidityAPIServiceSimulateTransactionBody, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'owner' is not null or undefined + if (owner === null || owner === undefined) { + throw new RequiredError("DebugAndSimulationApi", "simulateTransaction", "owner"); } - if (requestParameters['slug'] == null) { - throw new runtime.RequiredError( - 'slug', - 'Required parameter "slug" was null or undefined when calling simulateTransaction().' - ); + + // verify required parameter 'slug' is not null or undefined + if (slug === null || slug === undefined) { + throw new RequiredError("DebugAndSimulationApi", "simulateTransaction", "slug"); } - if (requestParameters['chainId'] == null) { - throw new runtime.RequiredError( - 'chainId', - 'Required parameter "chainId" was null or undefined when calling simulateTransaction().' - ); + + // verify required parameter 'chainId' is not null or undefined + if (chainId === null || chainId === undefined) { + throw new RequiredError("DebugAndSimulationApi", "simulateTransaction", "chainId"); } - if (requestParameters['body'] == null) { - throw new runtime.RequiredError( - 'body', - 'Required parameter "body" was null or undefined when calling simulateTransaction().' - ); + + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new RequiredError("DebugAndSimulationApi", "simulateTransaction", "body"); } - const queryParameters: any = {}; - const headerParameters: runtime.HTTPHeaders = {}; + // Path Params + const localVarPath = '/api/v1/solidity/{owner}/{slug}/{chainId}/simulation' + .replace('{' + 'owner' + '}', encodeURIComponent(String(owner))) + .replace('{' + 'slug' + '}', encodeURIComponent(String(slug))) + .replace('{' + 'chainId' + '}', encodeURIComponent(String(chainId))); - headerParameters['Content-Type'] = 'application/json'; + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - if (this.configuration && this.configuration.apiKey) { - headerParameters["api-key"] = await this.configuration.apiKey("api-key"); // ApiKeyAuth authentication - } - const response = await this.request({ - path: `/api/v1/solidity/{owner}/{slug}/{chainId}/simulation`.replace(`{${"owner"}}`, encodeURIComponent(String(requestParameters['owner']))).replace(`{${"slug"}}`, encodeURIComponent(String(requestParameters['slug']))).replace(`{${"chainId"}}`, encodeURIComponent(String(requestParameters['chainId']))), - method: 'POST', - headers: headerParameters, - query: queryParameters, - body: SolidityServiceSolidityAPIServiceSimulateTransactionBodyToJSON(requestParameters['body']), - }, initOverrides); + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(body, "SolidityServiceSolidityAPIServiceSimulateTransactionBody", ""), + contentType + ); + requestContext.setBody(serializedBody); - return new runtime.JSONApiResponse(response, (jsonValue) => SolidityServiceSimulateTransactionResponseFromJSON(jsonValue)); - } + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["ApiKeyAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } - /** - * Create a new transaction simulation. The simulation body should be included in the request body. Your simulations will be saved, and a unique ID for each simulation is included in the response. It will be useful for fetching simulation details. - * Run simulation - */ - async simulateTransaction(requestParameters: SimulateTransactionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.simulateTransactionRaw(requestParameters, initOverrides); - return await response.value(); + return requestContext; } /** * You could also create bundle simulations so that one transaction could be executed one after another. For `blockNumber` `transactionIndex` `networkId` `stateOverrides` and `blockOverrides` fields, only the first simulation takes effect. * Run bundle simulation + * @param owner + * @param slug + * @param chainId + * @param body */ - async simulateTransactionBundleRaw(requestParameters: SimulateTransactionBundleRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['owner'] == null) { - throw new runtime.RequiredError( - 'owner', - 'Required parameter "owner" was null or undefined when calling simulateTransactionBundle().' - ); + public async simulateTransactionBundle(owner: string, slug: string, chainId: string, body: SolidityServiceSolidityAPIServiceSimulateTransactionBundleBody, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'owner' is not null or undefined + if (owner === null || owner === undefined) { + throw new RequiredError("DebugAndSimulationApi", "simulateTransactionBundle", "owner"); } - if (requestParameters['slug'] == null) { - throw new runtime.RequiredError( - 'slug', - 'Required parameter "slug" was null or undefined when calling simulateTransactionBundle().' - ); + + // verify required parameter 'slug' is not null or undefined + if (slug === null || slug === undefined) { + throw new RequiredError("DebugAndSimulationApi", "simulateTransactionBundle", "slug"); } - if (requestParameters['chainId'] == null) { - throw new runtime.RequiredError( - 'chainId', - 'Required parameter "chainId" was null or undefined when calling simulateTransactionBundle().' - ); + + // verify required parameter 'chainId' is not null or undefined + if (chainId === null || chainId === undefined) { + throw new RequiredError("DebugAndSimulationApi", "simulateTransactionBundle", "chainId"); } - if (requestParameters['body'] == null) { - throw new runtime.RequiredError( - 'body', - 'Required parameter "body" was null or undefined when calling simulateTransactionBundle().' - ); + + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new RequiredError("DebugAndSimulationApi", "simulateTransactionBundle", "body"); } - const queryParameters: any = {}; - const headerParameters: runtime.HTTPHeaders = {}; + // Path Params + const localVarPath = '/api/v1/solidity/{owner}/{slug}/{chainId}/simulation_bundle' + .replace('{' + 'owner' + '}', encodeURIComponent(String(owner))) + .replace('{' + 'slug' + '}', encodeURIComponent(String(slug))) + .replace('{' + 'chainId' + '}', encodeURIComponent(String(chainId))); - headerParameters['Content-Type'] = 'application/json'; + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - if (this.configuration && this.configuration.apiKey) { - headerParameters["api-key"] = await this.configuration.apiKey("api-key"); // ApiKeyAuth authentication + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(body, "SolidityServiceSolidityAPIServiceSimulateTransactionBundleBody", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["ApiKeyAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); } - const response = await this.request({ - path: `/api/v1/solidity/{owner}/{slug}/{chainId}/simulation_bundle`.replace(`{${"owner"}}`, encodeURIComponent(String(requestParameters['owner']))).replace(`{${"slug"}}`, encodeURIComponent(String(requestParameters['slug']))).replace(`{${"chainId"}}`, encodeURIComponent(String(requestParameters['chainId']))), - method: 'POST', - headers: headerParameters, - query: queryParameters, - body: SolidityServiceSolidityAPIServiceSimulateTransactionBundleBodyToJSON(requestParameters['body']), - }, initOverrides); + return requestContext; + } + +} - return new runtime.JSONApiResponse(response, (jsonValue) => SolidityServiceSimulateTransactionBundleResponseFromJSON(jsonValue)); +export class DebugAndSimulationApiResponseProcessor { + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to getCallTraceByBundle + * @throws ApiException if the response code was not in [200, 299] + */ + public async getCallTraceByBundleWithHttpInfo(response: ResponseContext): Promise> { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: GoogleApiHttpBody = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "GoogleApiHttpBody", "" + ) as GoogleApiHttpBody; + return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: GoogleApiHttpBody = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "GoogleApiHttpBody", "" + ) as GoogleApiHttpBody; + return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); } /** - * You could also create bundle simulations so that one transaction could be executed one after another. For `blockNumber` `transactionIndex` `networkId` `stateOverrides` and `blockOverrides` fields, only the first simulation takes effect. - * Run bundle simulation + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to getCallTraceBySimulation + * @throws ApiException if the response code was not in [200, 299] + */ + public async getCallTraceBySimulationWithHttpInfo(response: ResponseContext): Promise> { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: GoogleApiHttpBody = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "GoogleApiHttpBody", "" + ) as GoogleApiHttpBody; + return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: GoogleApiHttpBody = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "GoogleApiHttpBody", "" + ) as GoogleApiHttpBody; + return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to getCallTraceByTransaction + * @throws ApiException if the response code was not in [200, 299] + */ + public async getCallTraceByTransactionWithHttpInfo(response: ResponseContext): Promise> { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: GoogleApiHttpBody = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "GoogleApiHttpBody", "" + ) as GoogleApiHttpBody; + return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: GoogleApiHttpBody = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "GoogleApiHttpBody", "" + ) as GoogleApiHttpBody; + return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to getSimulation + * @throws ApiException if the response code was not in [200, 299] + */ + public async getSimulationWithHttpInfo(response: ResponseContext): Promise> { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: SolidityServiceGetSimulationResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "SolidityServiceGetSimulationResponse", "" + ) as SolidityServiceGetSimulationResponse; + return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: SolidityServiceGetSimulationResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "SolidityServiceGetSimulationResponse", "" + ) as SolidityServiceGetSimulationResponse; + return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to getSimulationBundleInProject + * @throws ApiException if the response code was not in [200, 299] + */ + public async getSimulationBundleInProjectWithHttpInfo(response: ResponseContext): Promise> { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: SolidityServiceGetSimulationBundleResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "SolidityServiceGetSimulationBundleResponse", "" + ) as SolidityServiceGetSimulationBundleResponse; + return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: SolidityServiceGetSimulationBundleResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "SolidityServiceGetSimulationBundleResponse", "" + ) as SolidityServiceGetSimulationBundleResponse; + return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to getSimulations + * @throws ApiException if the response code was not in [200, 299] + */ + public async getSimulationsWithHttpInfo(response: ResponseContext): Promise> { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: SolidityServiceGetSimulationsResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "SolidityServiceGetSimulationsResponse", "" + ) as SolidityServiceGetSimulationsResponse; + return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: SolidityServiceGetSimulationsResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "SolidityServiceGetSimulationsResponse", "" + ) as SolidityServiceGetSimulationsResponse; + return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to searchTransactions + * @throws ApiException if the response code was not in [200, 299] + */ + public async searchTransactionsWithHttpInfo(response: ResponseContext): Promise> { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: TxindexEvmSearchTransactionsResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "TxindexEvmSearchTransactionsResponse", "" + ) as TxindexEvmSearchTransactionsResponse; + return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: TxindexEvmSearchTransactionsResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "TxindexEvmSearchTransactionsResponse", "" + ) as TxindexEvmSearchTransactionsResponse; + return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to simulateTransaction + * @throws ApiException if the response code was not in [200, 299] + */ + public async simulateTransactionWithHttpInfo(response: ResponseContext): Promise> { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: SolidityServiceSimulateTransactionResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "SolidityServiceSimulateTransactionResponse", "" + ) as SolidityServiceSimulateTransactionResponse; + return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: SolidityServiceSimulateTransactionResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "SolidityServiceSimulateTransactionResponse", "" + ) as SolidityServiceSimulateTransactionResponse; + return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to simulateTransactionBundle + * @throws ApiException if the response code was not in [200, 299] */ - async simulateTransactionBundle(requestParameters: SimulateTransactionBundleRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.simulateTransactionBundleRaw(requestParameters, initOverrides); - return await response.value(); + public async simulateTransactionBundleWithHttpInfo(response: ResponseContext): Promise> { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: SolidityServiceSimulateTransactionBundleResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "SolidityServiceSimulateTransactionBundleResponse", "" + ) as SolidityServiceSimulateTransactionBundleResponse; + return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: SolidityServiceSimulateTransactionBundleResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "SolidityServiceSimulateTransactionBundleResponse", "" + ) as SolidityServiceSimulateTransactionBundleResponse; + return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); } } diff --git a/src/apis/ForksApi.ts b/src/apis/ForksApi.ts index 4c02069..a155147 100755 --- a/src/apis/ForksApi.ts +++ b/src/apis/ForksApi.ts @@ -1,787 +1,1078 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Sentio API - * Sentio Open API for query data - * - * The version of the OpenAPI document: version not set - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -import * as runtime from '../runtime.js'; -import type { - GoogleApiHttpBody, - SolidityServiceCreateForkResponse, - SolidityServiceForkServiceCreateForkBody, - SolidityServiceForkServiceUpdateForkBody, - SolidityServiceGetForkInfoResponse, - SolidityServiceGetForkResponse, - SolidityServiceListForksResponse, - SolidityServiceSimulateTransactionBundleResponse, - SolidityServiceSimulateTransactionResponse, - SolidityServiceSolidityAPIServiceSimulateTransactionBundleOnForkBody, - SolidityServiceSolidityAPIServiceSimulateTransactionOnForkBody, - SolidityServiceUpdateForkResponse, -} from '../models/index.js'; -import { - GoogleApiHttpBodyFromJSON, - GoogleApiHttpBodyToJSON, - SolidityServiceCreateForkResponseFromJSON, - SolidityServiceCreateForkResponseToJSON, - SolidityServiceForkServiceCreateForkBodyFromJSON, - SolidityServiceForkServiceCreateForkBodyToJSON, - SolidityServiceForkServiceUpdateForkBodyFromJSON, - SolidityServiceForkServiceUpdateForkBodyToJSON, - SolidityServiceGetForkInfoResponseFromJSON, - SolidityServiceGetForkInfoResponseToJSON, - SolidityServiceGetForkResponseFromJSON, - SolidityServiceGetForkResponseToJSON, - SolidityServiceListForksResponseFromJSON, - SolidityServiceListForksResponseToJSON, - SolidityServiceSimulateTransactionBundleResponseFromJSON, - SolidityServiceSimulateTransactionBundleResponseToJSON, - SolidityServiceSimulateTransactionResponseFromJSON, - SolidityServiceSimulateTransactionResponseToJSON, - SolidityServiceSolidityAPIServiceSimulateTransactionBundleOnForkBodyFromJSON, - SolidityServiceSolidityAPIServiceSimulateTransactionBundleOnForkBodyToJSON, - SolidityServiceSolidityAPIServiceSimulateTransactionOnForkBodyFromJSON, - SolidityServiceSolidityAPIServiceSimulateTransactionOnForkBodyToJSON, - SolidityServiceUpdateForkResponseFromJSON, - SolidityServiceUpdateForkResponseToJSON, -} from '../models/index.js'; - -export interface CreateForkRequest { - owner: string; - slug: string; - body: SolidityServiceForkServiceCreateForkBody; -} - -export interface DeleteForkRequest { - owner: string; - slug: string; - id: string; -} - -export interface GetCallTraceOnForkBundleRequest { - owner: string; - slug: string; - forkId: string; - bundleId: string; - withInternalCalls?: boolean; - disableOptimizer?: boolean; - ignoreGasCost?: boolean; -} - -export interface GetCallTraceOnForkSimulationRequest { - owner: string; - slug: string; - forkId: string; - simulationId: string; - withInternalCalls?: boolean; - disableOptimizer?: boolean; - ignoreGasCost?: boolean; -} - -export interface GetCallTraceOnForkTransactionRequest { - owner: string; - slug: string; - forkId: string; - txHash: string; - withInternalCalls?: boolean; - disableOptimizer?: boolean; - ignoreGasCost?: boolean; -} - -export interface GetForkRequest { - owner: string; - slug: string; - id: string; -} - -export interface GetForkInfoRequest { - owner: string; - slug: string; - id: string; -} - -export interface ListForksRequest { - owner: string; - slug: string; -} - -export interface SimulateTransactionBundleOnForkRequest { - owner: string; - slug: string; - forkId: string; - body: SolidityServiceSolidityAPIServiceSimulateTransactionBundleOnForkBody; -} - -export interface SimulateTransactionOnForkRequest { - owner: string; - slug: string; - forkId: string; - body: SolidityServiceSolidityAPIServiceSimulateTransactionOnForkBody; -} - -export interface UpdateForkRequest { - owner: string; - slug: string; - id: string; - body: SolidityServiceForkServiceUpdateForkBody; -} +// TODO: better import syntax? +import {BaseAPIRequestFactory, RequiredError, COLLECTION_FORMATS} from './baseapi.js'; +import {Configuration} from '../configuration.js'; +import {RequestContext, HttpMethod, ResponseContext, HttpFile, HttpInfo} from '../http/http.js'; +import {ObjectSerializer} from '../models/ObjectSerializer.js'; +import {ApiException} from './exception.js'; +import {canConsumeForm, isCodeInRange} from '../util.js'; +import {SecurityAuthentication} from '../auth/auth.js'; + + +import { GoogleApiHttpBody } from '../models/GoogleApiHttpBody.js'; +import { SolidityServiceCreateForkResponse } from '../models/SolidityServiceCreateForkResponse.js'; +import { SolidityServiceForkServiceCreateForkBody } from '../models/SolidityServiceForkServiceCreateForkBody.js'; +import { SolidityServiceForkServiceUpdateForkBody } from '../models/SolidityServiceForkServiceUpdateForkBody.js'; +import { SolidityServiceGetForkInfoResponse } from '../models/SolidityServiceGetForkInfoResponse.js'; +import { SolidityServiceGetForkResponse } from '../models/SolidityServiceGetForkResponse.js'; +import { SolidityServiceListForksResponse } from '../models/SolidityServiceListForksResponse.js'; +import { SolidityServiceSimulateTransactionBundleResponse } from '../models/SolidityServiceSimulateTransactionBundleResponse.js'; +import { SolidityServiceSimulateTransactionResponse } from '../models/SolidityServiceSimulateTransactionResponse.js'; +import { SolidityServiceSolidityAPIServiceSimulateTransactionBundleOnForkBody } from '../models/SolidityServiceSolidityAPIServiceSimulateTransactionBundleOnForkBody.js'; +import { SolidityServiceSolidityAPIServiceSimulateTransactionOnForkBody } from '../models/SolidityServiceSolidityAPIServiceSimulateTransactionOnForkBody.js'; +import { SolidityServiceUpdateForkResponse } from '../models/SolidityServiceUpdateForkResponse.js'; /** - * + * no description */ -export class ForksApi extends runtime.BaseAPI { +export class ForksApiRequestFactory extends BaseAPIRequestFactory { /** * Create a fork + * @param owner + * @param slug + * @param body */ - async createForkRaw(requestParameters: CreateForkRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['owner'] == null) { - throw new runtime.RequiredError( - 'owner', - 'Required parameter "owner" was null or undefined when calling createFork().' - ); - } + public async createFork(owner: string, slug: string, body: SolidityServiceForkServiceCreateForkBody, _options?: Configuration): Promise { + let _config = _options || this.configuration; - if (requestParameters['slug'] == null) { - throw new runtime.RequiredError( - 'slug', - 'Required parameter "slug" was null or undefined when calling createFork().' - ); + // verify required parameter 'owner' is not null or undefined + if (owner === null || owner === undefined) { + throw new RequiredError("ForksApi", "createFork", "owner"); } - if (requestParameters['body'] == null) { - throw new runtime.RequiredError( - 'body', - 'Required parameter "body" was null or undefined when calling createFork().' - ); + + // verify required parameter 'slug' is not null or undefined + if (slug === null || slug === undefined) { + throw new RequiredError("ForksApi", "createFork", "slug"); } - const queryParameters: any = {}; - const headerParameters: runtime.HTTPHeaders = {}; + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new RequiredError("ForksApi", "createFork", "body"); + } - headerParameters['Content-Type'] = 'application/json'; - if (this.configuration && this.configuration.apiKey) { - headerParameters["api-key"] = await this.configuration.apiKey("api-key"); // ApiKeyAuth authentication + // Path Params + const localVarPath = '/api/v1/solidity/{owner}/{slug}/fork' + .replace('{' + 'owner' + '}', encodeURIComponent(String(owner))) + .replace('{' + 'slug' + '}', encodeURIComponent(String(slug))); + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(body, "SolidityServiceForkServiceCreateForkBody", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["ApiKeyAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); } - const response = await this.request({ - path: `/api/v1/solidity/{owner}/{slug}/fork`.replace(`{${"owner"}}`, encodeURIComponent(String(requestParameters['owner']))).replace(`{${"slug"}}`, encodeURIComponent(String(requestParameters['slug']))), - method: 'POST', - headers: headerParameters, - query: queryParameters, - body: SolidityServiceForkServiceCreateForkBodyToJSON(requestParameters['body']), - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => SolidityServiceCreateForkResponseFromJSON(jsonValue)); - } - - /** - * Create a fork - */ - async createFork(requestParameters: CreateForkRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.createForkRaw(requestParameters, initOverrides); - return await response.value(); + return requestContext; } /** * Delete fork by id + * @param owner + * @param slug + * @param id */ - async deleteForkRaw(requestParameters: DeleteForkRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['owner'] == null) { - throw new runtime.RequiredError( - 'owner', - 'Required parameter "owner" was null or undefined when calling deleteFork().' - ); + public async deleteFork(owner: string, slug: string, id: string, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'owner' is not null or undefined + if (owner === null || owner === undefined) { + throw new RequiredError("ForksApi", "deleteFork", "owner"); } - if (requestParameters['slug'] == null) { - throw new runtime.RequiredError( - 'slug', - 'Required parameter "slug" was null or undefined when calling deleteFork().' - ); + + // verify required parameter 'slug' is not null or undefined + if (slug === null || slug === undefined) { + throw new RequiredError("ForksApi", "deleteFork", "slug"); } - if (requestParameters['id'] == null) { - throw new runtime.RequiredError( - 'id', - 'Required parameter "id" was null or undefined when calling deleteFork().' - ); + + // verify required parameter 'id' is not null or undefined + if (id === null || id === undefined) { + throw new RequiredError("ForksApi", "deleteFork", "id"); } - const queryParameters: any = {}; - const headerParameters: runtime.HTTPHeaders = {}; + // Path Params + const localVarPath = '/api/v1/solidity/{owner}/{slug}/fork/{id}' + .replace('{' + 'owner' + '}', encodeURIComponent(String(owner))) + .replace('{' + 'slug' + '}', encodeURIComponent(String(slug))) + .replace('{' + 'id' + '}', encodeURIComponent(String(id))); - if (this.configuration && this.configuration.apiKey) { - headerParameters["api-key"] = await this.configuration.apiKey("api-key"); // ApiKeyAuth authentication - } + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.DELETE); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - const response = await this.request({ - path: `/api/v1/solidity/{owner}/{slug}/fork/{id}`.replace(`{${"owner"}}`, encodeURIComponent(String(requestParameters['owner']))).replace(`{${"slug"}}`, encodeURIComponent(String(requestParameters['slug']))).replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), - method: 'DELETE', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - return new runtime.JSONApiResponse(response); - } + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["ApiKeyAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } - /** - * Delete fork by id - */ - async deleteFork(requestParameters: DeleteForkRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.deleteForkRaw(requestParameters, initOverrides); - return await response.value(); + return requestContext; } /** * Get trace by bundle simulation + * @param owner + * @param slug + * @param forkId + * @param bundleId + * @param withInternalCalls Fetch the decoded trace, which will give you the function info, decoded parameters of both external and internal call trace. + * @param disableOptimizer Disable optimizations to make internal calls more accurate, but gas costs will differ from the actual execution. + * @param ignoreGasCost Only effective when disableOptimizer=true. */ - async getCallTraceOnForkBundleRaw(requestParameters: GetCallTraceOnForkBundleRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['owner'] == null) { - throw new runtime.RequiredError( - 'owner', - 'Required parameter "owner" was null or undefined when calling getCallTraceOnForkBundle().' - ); - } + public async getCallTraceOnForkBundle(owner: string, slug: string, forkId: string, bundleId: string, withInternalCalls?: boolean, disableOptimizer?: boolean, ignoreGasCost?: boolean, _options?: Configuration): Promise { + let _config = _options || this.configuration; - if (requestParameters['slug'] == null) { - throw new runtime.RequiredError( - 'slug', - 'Required parameter "slug" was null or undefined when calling getCallTraceOnForkBundle().' - ); + // verify required parameter 'owner' is not null or undefined + if (owner === null || owner === undefined) { + throw new RequiredError("ForksApi", "getCallTraceOnForkBundle", "owner"); } - if (requestParameters['forkId'] == null) { - throw new runtime.RequiredError( - 'forkId', - 'Required parameter "forkId" was null or undefined when calling getCallTraceOnForkBundle().' - ); - } - if (requestParameters['bundleId'] == null) { - throw new runtime.RequiredError( - 'bundleId', - 'Required parameter "bundleId" was null or undefined when calling getCallTraceOnForkBundle().' - ); + // verify required parameter 'slug' is not null or undefined + if (slug === null || slug === undefined) { + throw new RequiredError("ForksApi", "getCallTraceOnForkBundle", "slug"); } - const queryParameters: any = {}; - if (requestParameters['withInternalCalls'] != null) { - queryParameters['withInternalCalls'] = requestParameters['withInternalCalls']; + // verify required parameter 'forkId' is not null or undefined + if (forkId === null || forkId === undefined) { + throw new RequiredError("ForksApi", "getCallTraceOnForkBundle", "forkId"); } - if (requestParameters['disableOptimizer'] != null) { - queryParameters['disableOptimizer'] = requestParameters['disableOptimizer']; + + // verify required parameter 'bundleId' is not null or undefined + if (bundleId === null || bundleId === undefined) { + throw new RequiredError("ForksApi", "getCallTraceOnForkBundle", "bundleId"); } - if (requestParameters['ignoreGasCost'] != null) { - queryParameters['ignoreGasCost'] = requestParameters['ignoreGasCost']; + + + + + // Path Params + const localVarPath = '/api/v1/solidity/{owner}/{slug}/fork/{forkId}/bundle/{bundleId}/call_trace' + .replace('{' + 'owner' + '}', encodeURIComponent(String(owner))) + .replace('{' + 'slug' + '}', encodeURIComponent(String(slug))) + .replace('{' + 'forkId' + '}', encodeURIComponent(String(forkId))) + .replace('{' + 'bundleId' + '}', encodeURIComponent(String(bundleId))); + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.GET); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + + // Query Params + if (withInternalCalls !== undefined) { + requestContext.setQueryParam("withInternalCalls", ObjectSerializer.serialize(withInternalCalls, "boolean", "")); } - const headerParameters: runtime.HTTPHeaders = {}; + // Query Params + if (disableOptimizer !== undefined) { + requestContext.setQueryParam("disableOptimizer", ObjectSerializer.serialize(disableOptimizer, "boolean", "")); + } - if (this.configuration && this.configuration.apiKey) { - headerParameters["api-key"] = await this.configuration.apiKey("api-key"); // ApiKeyAuth authentication + // Query Params + if (ignoreGasCost !== undefined) { + requestContext.setQueryParam("ignoreGasCost", ObjectSerializer.serialize(ignoreGasCost, "boolean", "")); } - const response = await this.request({ - path: `/api/v1/solidity/{owner}/{slug}/fork/{forkId}/bundle/{bundleId}/call_trace`.replace(`{${"owner"}}`, encodeURIComponent(String(requestParameters['owner']))).replace(`{${"slug"}}`, encodeURIComponent(String(requestParameters['slug']))).replace(`{${"forkId"}}`, encodeURIComponent(String(requestParameters['forkId']))).replace(`{${"bundleId"}}`, encodeURIComponent(String(requestParameters['bundleId']))), - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - return new runtime.JSONApiResponse(response, (jsonValue) => GoogleApiHttpBodyFromJSON(jsonValue)); - } + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["ApiKeyAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } - /** - * Get trace by bundle simulation - */ - async getCallTraceOnForkBundle(requestParameters: GetCallTraceOnForkBundleRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getCallTraceOnForkBundleRaw(requestParameters, initOverrides); - return await response.value(); + return requestContext; } /** * Get trace by simulation + * @param owner + * @param slug + * @param forkId + * @param simulationId + * @param withInternalCalls Fetch the decoded trace, which will give you the function info, decoded parameters of both external and internal call trace. + * @param disableOptimizer Disable optimizations to make internal calls more accurate, but gas costs will differ from the actual execution. + * @param ignoreGasCost Only effective when disableOptimizer=true. */ - async getCallTraceOnForkSimulationRaw(requestParameters: GetCallTraceOnForkSimulationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['owner'] == null) { - throw new runtime.RequiredError( - 'owner', - 'Required parameter "owner" was null or undefined when calling getCallTraceOnForkSimulation().' - ); - } + public async getCallTraceOnForkSimulation(owner: string, slug: string, forkId: string, simulationId: string, withInternalCalls?: boolean, disableOptimizer?: boolean, ignoreGasCost?: boolean, _options?: Configuration): Promise { + let _config = _options || this.configuration; - if (requestParameters['slug'] == null) { - throw new runtime.RequiredError( - 'slug', - 'Required parameter "slug" was null or undefined when calling getCallTraceOnForkSimulation().' - ); + // verify required parameter 'owner' is not null or undefined + if (owner === null || owner === undefined) { + throw new RequiredError("ForksApi", "getCallTraceOnForkSimulation", "owner"); } - if (requestParameters['forkId'] == null) { - throw new runtime.RequiredError( - 'forkId', - 'Required parameter "forkId" was null or undefined when calling getCallTraceOnForkSimulation().' - ); - } - if (requestParameters['simulationId'] == null) { - throw new runtime.RequiredError( - 'simulationId', - 'Required parameter "simulationId" was null or undefined when calling getCallTraceOnForkSimulation().' - ); + // verify required parameter 'slug' is not null or undefined + if (slug === null || slug === undefined) { + throw new RequiredError("ForksApi", "getCallTraceOnForkSimulation", "slug"); } - const queryParameters: any = {}; - if (requestParameters['withInternalCalls'] != null) { - queryParameters['withInternalCalls'] = requestParameters['withInternalCalls']; + // verify required parameter 'forkId' is not null or undefined + if (forkId === null || forkId === undefined) { + throw new RequiredError("ForksApi", "getCallTraceOnForkSimulation", "forkId"); } - if (requestParameters['disableOptimizer'] != null) { - queryParameters['disableOptimizer'] = requestParameters['disableOptimizer']; + + // verify required parameter 'simulationId' is not null or undefined + if (simulationId === null || simulationId === undefined) { + throw new RequiredError("ForksApi", "getCallTraceOnForkSimulation", "simulationId"); } - if (requestParameters['ignoreGasCost'] != null) { - queryParameters['ignoreGasCost'] = requestParameters['ignoreGasCost']; + + + + + // Path Params + const localVarPath = '/api/v1/solidity/{owner}/{slug}/fork/{forkId}/simulation/{simulationId}/call_trace' + .replace('{' + 'owner' + '}', encodeURIComponent(String(owner))) + .replace('{' + 'slug' + '}', encodeURIComponent(String(slug))) + .replace('{' + 'forkId' + '}', encodeURIComponent(String(forkId))) + .replace('{' + 'simulationId' + '}', encodeURIComponent(String(simulationId))); + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.GET); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + + // Query Params + if (withInternalCalls !== undefined) { + requestContext.setQueryParam("withInternalCalls", ObjectSerializer.serialize(withInternalCalls, "boolean", "")); } - const headerParameters: runtime.HTTPHeaders = {}; + // Query Params + if (disableOptimizer !== undefined) { + requestContext.setQueryParam("disableOptimizer", ObjectSerializer.serialize(disableOptimizer, "boolean", "")); + } - if (this.configuration && this.configuration.apiKey) { - headerParameters["api-key"] = await this.configuration.apiKey("api-key"); // ApiKeyAuth authentication + // Query Params + if (ignoreGasCost !== undefined) { + requestContext.setQueryParam("ignoreGasCost", ObjectSerializer.serialize(ignoreGasCost, "boolean", "")); } - const response = await this.request({ - path: `/api/v1/solidity/{owner}/{slug}/fork/{forkId}/simulation/{simulationId}/call_trace`.replace(`{${"owner"}}`, encodeURIComponent(String(requestParameters['owner']))).replace(`{${"slug"}}`, encodeURIComponent(String(requestParameters['slug']))).replace(`{${"forkId"}}`, encodeURIComponent(String(requestParameters['forkId']))).replace(`{${"simulationId"}}`, encodeURIComponent(String(requestParameters['simulationId']))), - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - return new runtime.JSONApiResponse(response, (jsonValue) => GoogleApiHttpBodyFromJSON(jsonValue)); - } + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["ApiKeyAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } - /** - * Get trace by simulation - */ - async getCallTraceOnForkSimulation(requestParameters: GetCallTraceOnForkSimulationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getCallTraceOnForkSimulationRaw(requestParameters, initOverrides); - return await response.value(); + return requestContext; } /** * Get trace by transaction + * @param owner + * @param slug + * @param forkId + * @param txHash + * @param withInternalCalls Fetch the decoded trace, which will give you the function info, decoded parameters of both external and internal call trace. + * @param disableOptimizer Disable optimizations to make internal calls more accurate, but gas costs will differ from the actual execution. + * @param ignoreGasCost Only effective when disableOptimizer=true. */ - async getCallTraceOnForkTransactionRaw(requestParameters: GetCallTraceOnForkTransactionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['owner'] == null) { - throw new runtime.RequiredError( - 'owner', - 'Required parameter "owner" was null or undefined when calling getCallTraceOnForkTransaction().' - ); - } + public async getCallTraceOnForkTransaction(owner: string, slug: string, forkId: string, txHash: string, withInternalCalls?: boolean, disableOptimizer?: boolean, ignoreGasCost?: boolean, _options?: Configuration): Promise { + let _config = _options || this.configuration; - if (requestParameters['slug'] == null) { - throw new runtime.RequiredError( - 'slug', - 'Required parameter "slug" was null or undefined when calling getCallTraceOnForkTransaction().' - ); + // verify required parameter 'owner' is not null or undefined + if (owner === null || owner === undefined) { + throw new RequiredError("ForksApi", "getCallTraceOnForkTransaction", "owner"); } - if (requestParameters['forkId'] == null) { - throw new runtime.RequiredError( - 'forkId', - 'Required parameter "forkId" was null or undefined when calling getCallTraceOnForkTransaction().' - ); - } - if (requestParameters['txHash'] == null) { - throw new runtime.RequiredError( - 'txHash', - 'Required parameter "txHash" was null or undefined when calling getCallTraceOnForkTransaction().' - ); + // verify required parameter 'slug' is not null or undefined + if (slug === null || slug === undefined) { + throw new RequiredError("ForksApi", "getCallTraceOnForkTransaction", "slug"); } - const queryParameters: any = {}; - if (requestParameters['withInternalCalls'] != null) { - queryParameters['withInternalCalls'] = requestParameters['withInternalCalls']; + // verify required parameter 'forkId' is not null or undefined + if (forkId === null || forkId === undefined) { + throw new RequiredError("ForksApi", "getCallTraceOnForkTransaction", "forkId"); } - if (requestParameters['disableOptimizer'] != null) { - queryParameters['disableOptimizer'] = requestParameters['disableOptimizer']; + + // verify required parameter 'txHash' is not null or undefined + if (txHash === null || txHash === undefined) { + throw new RequiredError("ForksApi", "getCallTraceOnForkTransaction", "txHash"); } - if (requestParameters['ignoreGasCost'] != null) { - queryParameters['ignoreGasCost'] = requestParameters['ignoreGasCost']; + + + + + // Path Params + const localVarPath = '/api/v1/solidity/{owner}/{slug}/fork/{forkId}/transaction/{txHash}/call_trace' + .replace('{' + 'owner' + '}', encodeURIComponent(String(owner))) + .replace('{' + 'slug' + '}', encodeURIComponent(String(slug))) + .replace('{' + 'forkId' + '}', encodeURIComponent(String(forkId))) + .replace('{' + 'txHash' + '}', encodeURIComponent(String(txHash))); + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.GET); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + + // Query Params + if (withInternalCalls !== undefined) { + requestContext.setQueryParam("withInternalCalls", ObjectSerializer.serialize(withInternalCalls, "boolean", "")); } - const headerParameters: runtime.HTTPHeaders = {}; + // Query Params + if (disableOptimizer !== undefined) { + requestContext.setQueryParam("disableOptimizer", ObjectSerializer.serialize(disableOptimizer, "boolean", "")); + } - if (this.configuration && this.configuration.apiKey) { - headerParameters["api-key"] = await this.configuration.apiKey("api-key"); // ApiKeyAuth authentication + // Query Params + if (ignoreGasCost !== undefined) { + requestContext.setQueryParam("ignoreGasCost", ObjectSerializer.serialize(ignoreGasCost, "boolean", "")); } - const response = await this.request({ - path: `/api/v1/solidity/{owner}/{slug}/fork/{forkId}/transaction/{txHash}/call_trace`.replace(`{${"owner"}}`, encodeURIComponent(String(requestParameters['owner']))).replace(`{${"slug"}}`, encodeURIComponent(String(requestParameters['slug']))).replace(`{${"forkId"}}`, encodeURIComponent(String(requestParameters['forkId']))).replace(`{${"txHash"}}`, encodeURIComponent(String(requestParameters['txHash']))), - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - return new runtime.JSONApiResponse(response, (jsonValue) => GoogleApiHttpBodyFromJSON(jsonValue)); - } + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["ApiKeyAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } - /** - * Get trace by transaction - */ - async getCallTraceOnForkTransaction(requestParameters: GetCallTraceOnForkTransactionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getCallTraceOnForkTransactionRaw(requestParameters, initOverrides); - return await response.value(); + return requestContext; } /** * Get fork by id + * @param owner + * @param slug + * @param id */ - async getForkRaw(requestParameters: GetForkRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['owner'] == null) { - throw new runtime.RequiredError( - 'owner', - 'Required parameter "owner" was null or undefined when calling getFork().' - ); + public async getFork(owner: string, slug: string, id: string, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'owner' is not null or undefined + if (owner === null || owner === undefined) { + throw new RequiredError("ForksApi", "getFork", "owner"); } - if (requestParameters['slug'] == null) { - throw new runtime.RequiredError( - 'slug', - 'Required parameter "slug" was null or undefined when calling getFork().' - ); + + // verify required parameter 'slug' is not null or undefined + if (slug === null || slug === undefined) { + throw new RequiredError("ForksApi", "getFork", "slug"); } - if (requestParameters['id'] == null) { - throw new runtime.RequiredError( - 'id', - 'Required parameter "id" was null or undefined when calling getFork().' - ); + + // verify required parameter 'id' is not null or undefined + if (id === null || id === undefined) { + throw new RequiredError("ForksApi", "getFork", "id"); } - const queryParameters: any = {}; - const headerParameters: runtime.HTTPHeaders = {}; + // Path Params + const localVarPath = '/api/v1/solidity/{owner}/{slug}/fork/{id}' + .replace('{' + 'owner' + '}', encodeURIComponent(String(owner))) + .replace('{' + 'slug' + '}', encodeURIComponent(String(slug))) + .replace('{' + 'id' + '}', encodeURIComponent(String(id))); - if (this.configuration && this.configuration.apiKey) { - headerParameters["api-key"] = await this.configuration.apiKey("api-key"); // ApiKeyAuth authentication - } + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.GET); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - const response = await this.request({ - path: `/api/v1/solidity/{owner}/{slug}/fork/{id}`.replace(`{${"owner"}}`, encodeURIComponent(String(requestParameters['owner']))).replace(`{${"slug"}}`, encodeURIComponent(String(requestParameters['slug']))).replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - return new runtime.JSONApiResponse(response, (jsonValue) => SolidityServiceGetForkResponseFromJSON(jsonValue)); - } + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["ApiKeyAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } - /** - * Get fork by id - */ - async getFork(requestParameters: GetForkRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getForkRaw(requestParameters, initOverrides); - return await response.value(); + return requestContext; } /** * Get fork info by id + * @param owner + * @param slug + * @param id */ - async getForkInfoRaw(requestParameters: GetForkInfoRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['owner'] == null) { - throw new runtime.RequiredError( - 'owner', - 'Required parameter "owner" was null or undefined when calling getForkInfo().' - ); + public async getForkInfo(owner: string, slug: string, id: string, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'owner' is not null or undefined + if (owner === null || owner === undefined) { + throw new RequiredError("ForksApi", "getForkInfo", "owner"); } - if (requestParameters['slug'] == null) { - throw new runtime.RequiredError( - 'slug', - 'Required parameter "slug" was null or undefined when calling getForkInfo().' - ); + + // verify required parameter 'slug' is not null or undefined + if (slug === null || slug === undefined) { + throw new RequiredError("ForksApi", "getForkInfo", "slug"); } - if (requestParameters['id'] == null) { - throw new runtime.RequiredError( - 'id', - 'Required parameter "id" was null or undefined when calling getForkInfo().' - ); + + // verify required parameter 'id' is not null or undefined + if (id === null || id === undefined) { + throw new RequiredError("ForksApi", "getForkInfo", "id"); } - const queryParameters: any = {}; - const headerParameters: runtime.HTTPHeaders = {}; + // Path Params + const localVarPath = '/api/v1/solidity/{owner}/{slug}/fork/{id}/info' + .replace('{' + 'owner' + '}', encodeURIComponent(String(owner))) + .replace('{' + 'slug' + '}', encodeURIComponent(String(slug))) + .replace('{' + 'id' + '}', encodeURIComponent(String(id))); - if (this.configuration && this.configuration.apiKey) { - headerParameters["api-key"] = await this.configuration.apiKey("api-key"); // ApiKeyAuth authentication - } + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.GET); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - const response = await this.request({ - path: `/api/v1/solidity/{owner}/{slug}/fork/{id}/info`.replace(`{${"owner"}}`, encodeURIComponent(String(requestParameters['owner']))).replace(`{${"slug"}}`, encodeURIComponent(String(requestParameters['slug']))).replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - return new runtime.JSONApiResponse(response, (jsonValue) => SolidityServiceGetForkInfoResponseFromJSON(jsonValue)); + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["ApiKeyAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; } /** - * Get fork info by id + * List all forks + * @param owner + * @param slug */ - async getForkInfo(requestParameters: GetForkInfoRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getForkInfoRaw(requestParameters, initOverrides); - return await response.value(); + public async listForks(owner: string, slug: string, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'owner' is not null or undefined + if (owner === null || owner === undefined) { + throw new RequiredError("ForksApi", "listForks", "owner"); + } + + + // verify required parameter 'slug' is not null or undefined + if (slug === null || slug === undefined) { + throw new RequiredError("ForksApi", "listForks", "slug"); + } + + + // Path Params + const localVarPath = '/api/v1/solidity/{owner}/{slug}/fork' + .replace('{' + 'owner' + '}', encodeURIComponent(String(owner))) + .replace('{' + 'slug' + '}', encodeURIComponent(String(slug))); + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.GET); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["ApiKeyAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; } /** - * List all forks + * Run bundle simulation + * @param owner + * @param slug + * @param forkId + * @param body */ - async listForksRaw(requestParameters: ListForksRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['owner'] == null) { - throw new runtime.RequiredError( - 'owner', - 'Required parameter "owner" was null or undefined when calling listForks().' - ); + public async simulateTransactionBundleOnFork(owner: string, slug: string, forkId: string, body: SolidityServiceSolidityAPIServiceSimulateTransactionBundleOnForkBody, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'owner' is not null or undefined + if (owner === null || owner === undefined) { + throw new RequiredError("ForksApi", "simulateTransactionBundleOnFork", "owner"); } - if (requestParameters['slug'] == null) { - throw new runtime.RequiredError( - 'slug', - 'Required parameter "slug" was null or undefined when calling listForks().' - ); + + // verify required parameter 'slug' is not null or undefined + if (slug === null || slug === undefined) { + throw new RequiredError("ForksApi", "simulateTransactionBundleOnFork", "slug"); } - const queryParameters: any = {}; - const headerParameters: runtime.HTTPHeaders = {}; + // verify required parameter 'forkId' is not null or undefined + if (forkId === null || forkId === undefined) { + throw new RequiredError("ForksApi", "simulateTransactionBundleOnFork", "forkId"); + } + - if (this.configuration && this.configuration.apiKey) { - headerParameters["api-key"] = await this.configuration.apiKey("api-key"); // ApiKeyAuth authentication + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new RequiredError("ForksApi", "simulateTransactionBundleOnFork", "body"); } - const response = await this.request({ - path: `/api/v1/solidity/{owner}/{slug}/fork`.replace(`{${"owner"}}`, encodeURIComponent(String(requestParameters['owner']))).replace(`{${"slug"}}`, encodeURIComponent(String(requestParameters['slug']))), - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - return new runtime.JSONApiResponse(response, (jsonValue) => SolidityServiceListForksResponseFromJSON(jsonValue)); + // Path Params + const localVarPath = '/api/v1/solidity/{owner}/{slug}/fork/{forkId}/simulation_bundle' + .replace('{' + 'owner' + '}', encodeURIComponent(String(owner))) + .replace('{' + 'slug' + '}', encodeURIComponent(String(slug))) + .replace('{' + 'forkId' + '}', encodeURIComponent(String(forkId))); + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(body, "SolidityServiceSolidityAPIServiceSimulateTransactionBundleOnForkBody", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["ApiKeyAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; } /** - * List all forks + * Run Simulation + * @param owner + * @param slug + * @param forkId + * @param body */ - async listForks(requestParameters: ListForksRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.listForksRaw(requestParameters, initOverrides); - return await response.value(); + public async simulateTransactionOnFork(owner: string, slug: string, forkId: string, body: SolidityServiceSolidityAPIServiceSimulateTransactionOnForkBody, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'owner' is not null or undefined + if (owner === null || owner === undefined) { + throw new RequiredError("ForksApi", "simulateTransactionOnFork", "owner"); + } + + + // verify required parameter 'slug' is not null or undefined + if (slug === null || slug === undefined) { + throw new RequiredError("ForksApi", "simulateTransactionOnFork", "slug"); + } + + + // verify required parameter 'forkId' is not null or undefined + if (forkId === null || forkId === undefined) { + throw new RequiredError("ForksApi", "simulateTransactionOnFork", "forkId"); + } + + + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new RequiredError("ForksApi", "simulateTransactionOnFork", "body"); + } + + + // Path Params + const localVarPath = '/api/v1/solidity/{owner}/{slug}/fork/{forkId}/simulation' + .replace('{' + 'owner' + '}', encodeURIComponent(String(owner))) + .replace('{' + 'slug' + '}', encodeURIComponent(String(slug))) + .replace('{' + 'forkId' + '}', encodeURIComponent(String(forkId))); + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(body, "SolidityServiceSolidityAPIServiceSimulateTransactionOnForkBody", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["ApiKeyAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; } /** - * Run bundle simulation + * Update fork by id + * @param owner + * @param slug + * @param id + * @param body */ - async simulateTransactionBundleOnForkRaw(requestParameters: SimulateTransactionBundleOnForkRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['owner'] == null) { - throw new runtime.RequiredError( - 'owner', - 'Required parameter "owner" was null or undefined when calling simulateTransactionBundleOnFork().' - ); - } + public async updateFork(owner: string, slug: string, id: string, body: SolidityServiceForkServiceUpdateForkBody, _options?: Configuration): Promise { + let _config = _options || this.configuration; - if (requestParameters['slug'] == null) { - throw new runtime.RequiredError( - 'slug', - 'Required parameter "slug" was null or undefined when calling simulateTransactionBundleOnFork().' - ); + // verify required parameter 'owner' is not null or undefined + if (owner === null || owner === undefined) { + throw new RequiredError("ForksApi", "updateFork", "owner"); } - if (requestParameters['forkId'] == null) { - throw new runtime.RequiredError( - 'forkId', - 'Required parameter "forkId" was null or undefined when calling simulateTransactionBundleOnFork().' - ); - } - if (requestParameters['body'] == null) { - throw new runtime.RequiredError( - 'body', - 'Required parameter "body" was null or undefined when calling simulateTransactionBundleOnFork().' - ); + // verify required parameter 'slug' is not null or undefined + if (slug === null || slug === undefined) { + throw new RequiredError("ForksApi", "updateFork", "slug"); } - const queryParameters: any = {}; - const headerParameters: runtime.HTTPHeaders = {}; + // verify required parameter 'id' is not null or undefined + if (id === null || id === undefined) { + throw new RequiredError("ForksApi", "updateFork", "id"); + } - headerParameters['Content-Type'] = 'application/json'; - if (this.configuration && this.configuration.apiKey) { - headerParameters["api-key"] = await this.configuration.apiKey("api-key"); // ApiKeyAuth authentication + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new RequiredError("ForksApi", "updateFork", "body"); } - const response = await this.request({ - path: `/api/v1/solidity/{owner}/{slug}/fork/{forkId}/simulation_bundle`.replace(`{${"owner"}}`, encodeURIComponent(String(requestParameters['owner']))).replace(`{${"slug"}}`, encodeURIComponent(String(requestParameters['slug']))).replace(`{${"forkId"}}`, encodeURIComponent(String(requestParameters['forkId']))), - method: 'POST', - headers: headerParameters, - query: queryParameters, - body: SolidityServiceSolidityAPIServiceSimulateTransactionBundleOnForkBodyToJSON(requestParameters['body']), - }, initOverrides); - return new runtime.JSONApiResponse(response, (jsonValue) => SolidityServiceSimulateTransactionBundleResponseFromJSON(jsonValue)); + // Path Params + const localVarPath = '/api/v1/solidity/{owner}/{slug}/fork/{id}' + .replace('{' + 'owner' + '}', encodeURIComponent(String(owner))) + .replace('{' + 'slug' + '}', encodeURIComponent(String(slug))) + .replace('{' + 'id' + '}', encodeURIComponent(String(id))); + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.PUT); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(body, "SolidityServiceForkServiceUpdateForkBody", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["ApiKeyAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; } +} + +export class ForksApiResponseProcessor { + /** - * Run bundle simulation + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to createFork + * @throws ApiException if the response code was not in [200, 299] */ - async simulateTransactionBundleOnFork(requestParameters: SimulateTransactionBundleOnForkRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.simulateTransactionBundleOnForkRaw(requestParameters, initOverrides); - return await response.value(); + public async createForkWithHttpInfo(response: ResponseContext): Promise> { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: SolidityServiceCreateForkResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "SolidityServiceCreateForkResponse", "" + ) as SolidityServiceCreateForkResponse; + return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: SolidityServiceCreateForkResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "SolidityServiceCreateForkResponse", "" + ) as SolidityServiceCreateForkResponse; + return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); } /** - * Run Simulation + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to deleteFork + * @throws ApiException if the response code was not in [200, 299] */ - async simulateTransactionOnForkRaw(requestParameters: SimulateTransactionOnForkRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['owner'] == null) { - throw new runtime.RequiredError( - 'owner', - 'Required parameter "owner" was null or undefined when calling simulateTransactionOnFork().' - ); + public async deleteForkWithHttpInfo(response: ResponseContext): Promise> { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: any = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "any", "" + ) as any; + return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); } - if (requestParameters['slug'] == null) { - throw new runtime.RequiredError( - 'slug', - 'Required parameter "slug" was null or undefined when calling simulateTransactionOnFork().' - ); + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: any = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "any", "" + ) as any; + return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); } - if (requestParameters['forkId'] == null) { - throw new runtime.RequiredError( - 'forkId', - 'Required parameter "forkId" was null or undefined when calling simulateTransactionOnFork().' - ); + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to getCallTraceOnForkBundle + * @throws ApiException if the response code was not in [200, 299] + */ + public async getCallTraceOnForkBundleWithHttpInfo(response: ResponseContext): Promise> { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: GoogleApiHttpBody = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "GoogleApiHttpBody", "" + ) as GoogleApiHttpBody; + return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); } - if (requestParameters['body'] == null) { - throw new runtime.RequiredError( - 'body', - 'Required parameter "body" was null or undefined when calling simulateTransactionOnFork().' - ); + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: GoogleApiHttpBody = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "GoogleApiHttpBody", "" + ) as GoogleApiHttpBody; + return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); } - const queryParameters: any = {}; + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } - const headerParameters: runtime.HTTPHeaders = {}; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to getCallTraceOnForkSimulation + * @throws ApiException if the response code was not in [200, 299] + */ + public async getCallTraceOnForkSimulationWithHttpInfo(response: ResponseContext): Promise> { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: GoogleApiHttpBody = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "GoogleApiHttpBody", "" + ) as GoogleApiHttpBody; + return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: GoogleApiHttpBody = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "GoogleApiHttpBody", "" + ) as GoogleApiHttpBody; + return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); + } - headerParameters['Content-Type'] = 'application/json'; + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } - if (this.configuration && this.configuration.apiKey) { - headerParameters["api-key"] = await this.configuration.apiKey("api-key"); // ApiKeyAuth authentication + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to getCallTraceOnForkTransaction + * @throws ApiException if the response code was not in [200, 299] + */ + public async getCallTraceOnForkTransactionWithHttpInfo(response: ResponseContext): Promise> { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: GoogleApiHttpBody = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "GoogleApiHttpBody", "" + ) as GoogleApiHttpBody; + return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); } - const response = await this.request({ - path: `/api/v1/solidity/{owner}/{slug}/fork/{forkId}/simulation`.replace(`{${"owner"}}`, encodeURIComponent(String(requestParameters['owner']))).replace(`{${"slug"}}`, encodeURIComponent(String(requestParameters['slug']))).replace(`{${"forkId"}}`, encodeURIComponent(String(requestParameters['forkId']))), - method: 'POST', - headers: headerParameters, - query: queryParameters, - body: SolidityServiceSolidityAPIServiceSimulateTransactionOnForkBodyToJSON(requestParameters['body']), - }, initOverrides); + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: GoogleApiHttpBody = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "GoogleApiHttpBody", "" + ) as GoogleApiHttpBody; + return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); + } - return new runtime.JSONApiResponse(response, (jsonValue) => SolidityServiceSimulateTransactionResponseFromJSON(jsonValue)); + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); } /** - * Run Simulation + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to getFork + * @throws ApiException if the response code was not in [200, 299] */ - async simulateTransactionOnFork(requestParameters: SimulateTransactionOnForkRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.simulateTransactionOnForkRaw(requestParameters, initOverrides); - return await response.value(); + public async getForkWithHttpInfo(response: ResponseContext): Promise> { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: SolidityServiceGetForkResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "SolidityServiceGetForkResponse", "" + ) as SolidityServiceGetForkResponse; + return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: SolidityServiceGetForkResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "SolidityServiceGetForkResponse", "" + ) as SolidityServiceGetForkResponse; + return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); } /** - * Update fork by id + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to getForkInfo + * @throws ApiException if the response code was not in [200, 299] */ - async updateForkRaw(requestParameters: UpdateForkRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['owner'] == null) { - throw new runtime.RequiredError( - 'owner', - 'Required parameter "owner" was null or undefined when calling updateFork().' - ); + public async getForkInfoWithHttpInfo(response: ResponseContext): Promise> { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: SolidityServiceGetForkInfoResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "SolidityServiceGetForkInfoResponse", "" + ) as SolidityServiceGetForkInfoResponse; + return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); } - if (requestParameters['slug'] == null) { - throw new runtime.RequiredError( - 'slug', - 'Required parameter "slug" was null or undefined when calling updateFork().' - ); + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: SolidityServiceGetForkInfoResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "SolidityServiceGetForkInfoResponse", "" + ) as SolidityServiceGetForkInfoResponse; + return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); } - if (requestParameters['id'] == null) { - throw new runtime.RequiredError( - 'id', - 'Required parameter "id" was null or undefined when calling updateFork().' - ); + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to listForks + * @throws ApiException if the response code was not in [200, 299] + */ + public async listForksWithHttpInfo(response: ResponseContext): Promise> { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: SolidityServiceListForksResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "SolidityServiceListForksResponse", "" + ) as SolidityServiceListForksResponse; + return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); } - if (requestParameters['body'] == null) { - throw new runtime.RequiredError( - 'body', - 'Required parameter "body" was null or undefined when calling updateFork().' - ); + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: SolidityServiceListForksResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "SolidityServiceListForksResponse", "" + ) as SolidityServiceListForksResponse; + return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); } - const queryParameters: any = {}; + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to simulateTransactionBundleOnFork + * @throws ApiException if the response code was not in [200, 299] + */ + public async simulateTransactionBundleOnForkWithHttpInfo(response: ResponseContext): Promise> { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: SolidityServiceSimulateTransactionBundleResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "SolidityServiceSimulateTransactionBundleResponse", "" + ) as SolidityServiceSimulateTransactionBundleResponse; + return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); + } - const headerParameters: runtime.HTTPHeaders = {}; + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: SolidityServiceSimulateTransactionBundleResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "SolidityServiceSimulateTransactionBundleResponse", "" + ) as SolidityServiceSimulateTransactionBundleResponse; + return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); + } - headerParameters['Content-Type'] = 'application/json'; + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } - if (this.configuration && this.configuration.apiKey) { - headerParameters["api-key"] = await this.configuration.apiKey("api-key"); // ApiKeyAuth authentication + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to simulateTransactionOnFork + * @throws ApiException if the response code was not in [200, 299] + */ + public async simulateTransactionOnForkWithHttpInfo(response: ResponseContext): Promise> { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: SolidityServiceSimulateTransactionResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "SolidityServiceSimulateTransactionResponse", "" + ) as SolidityServiceSimulateTransactionResponse; + return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); } - const response = await this.request({ - path: `/api/v1/solidity/{owner}/{slug}/fork/{id}`.replace(`{${"owner"}}`, encodeURIComponent(String(requestParameters['owner']))).replace(`{${"slug"}}`, encodeURIComponent(String(requestParameters['slug']))).replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), - method: 'PUT', - headers: headerParameters, - query: queryParameters, - body: SolidityServiceForkServiceUpdateForkBodyToJSON(requestParameters['body']), - }, initOverrides); + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: SolidityServiceSimulateTransactionResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "SolidityServiceSimulateTransactionResponse", "" + ) as SolidityServiceSimulateTransactionResponse; + return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); + } - return new runtime.JSONApiResponse(response, (jsonValue) => SolidityServiceUpdateForkResponseFromJSON(jsonValue)); + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); } /** - * Update fork by id + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to updateFork + * @throws ApiException if the response code was not in [200, 299] */ - async updateFork(requestParameters: UpdateForkRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.updateForkRaw(requestParameters, initOverrides); - return await response.value(); + public async updateForkWithHttpInfo(response: ResponseContext): Promise> { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: SolidityServiceUpdateForkResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "SolidityServiceUpdateForkResponse", "" + ) as SolidityServiceUpdateForkResponse; + return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: SolidityServiceUpdateForkResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "SolidityServiceUpdateForkResponse", "" + ) as SolidityServiceUpdateForkResponse; + return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); } } diff --git a/src/apis/PriceApi.ts b/src/apis/PriceApi.ts index a2fdf94..d59c5a5 100755 --- a/src/apis/PriceApi.ts +++ b/src/apis/PriceApi.ts @@ -1,229 +1,340 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Sentio API - * Sentio Open API for query data - * - * The version of the OpenAPI document: version not set - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -import * as runtime from '../runtime.js'; -import type { - PriceServiceBatchGetPricesRequest, - PriceServiceBatchGetPricesResponse, - PriceServiceCheckLatestPriceResponse, - PriceServiceGetPriceResponse, - PriceServiceListCoinsResponse, -} from '../models/index.js'; -import { - PriceServiceBatchGetPricesRequestFromJSON, - PriceServiceBatchGetPricesRequestToJSON, - PriceServiceBatchGetPricesResponseFromJSON, - PriceServiceBatchGetPricesResponseToJSON, - PriceServiceCheckLatestPriceResponseFromJSON, - PriceServiceCheckLatestPriceResponseToJSON, - PriceServiceGetPriceResponseFromJSON, - PriceServiceGetPriceResponseToJSON, - PriceServiceListCoinsResponseFromJSON, - PriceServiceListCoinsResponseToJSON, -} from '../models/index.js'; - -export interface BatchGetPricesRequest { - body: PriceServiceBatchGetPricesRequest; -} - -export interface GetPriceRequest { - timestamp?: Date; - coinIdSymbol?: string; - coinIdAddressAddress?: string; - coinIdAddressChain?: string; - source?: string; -} - -export interface PriceListCoinsRequest { - limit?: number; - offset?: number; - searchQuery?: string; - chain?: string; -} +// TODO: better import syntax? +import {BaseAPIRequestFactory, RequiredError, COLLECTION_FORMATS} from './baseapi.js'; +import {Configuration} from '../configuration.js'; +import {RequestContext, HttpMethod, ResponseContext, HttpFile, HttpInfo} from '../http/http.js'; +import {ObjectSerializer} from '../models/ObjectSerializer.js'; +import {ApiException} from './exception.js'; +import {canConsumeForm, isCodeInRange} from '../util.js'; +import {SecurityAuthentication} from '../auth/auth.js'; + + +import { PriceServiceBatchGetPricesRequest } from '../models/PriceServiceBatchGetPricesRequest.js'; +import { PriceServiceBatchGetPricesResponse } from '../models/PriceServiceBatchGetPricesResponse.js'; +import { PriceServiceCheckLatestPriceResponse } from '../models/PriceServiceCheckLatestPriceResponse.js'; +import { PriceServiceGetPriceResponse } from '../models/PriceServiceGetPriceResponse.js'; +import { PriceServiceListCoinsResponse } from '../models/PriceServiceListCoinsResponse.js'; /** - * + * no description */ -export class PriceApi extends runtime.BaseAPI { +export class PriceApiRequestFactory extends BaseAPIRequestFactory { /** * Batch get prices + * @param body */ - async batchGetPricesRaw(requestParameters: BatchGetPricesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['body'] == null) { - throw new runtime.RequiredError( - 'body', - 'Required parameter "body" was null or undefined when calling batchGetPrices().' - ); + public async batchGetPrices(body: PriceServiceBatchGetPricesRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new RequiredError("PriceApi", "batchGetPrices", "body"); } - const queryParameters: any = {}; - const headerParameters: runtime.HTTPHeaders = {}; + // Path Params + const localVarPath = '/api/v1/prices/batch'; - headerParameters['Content-Type'] = 'application/json'; + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - if (this.configuration && this.configuration.apiKey) { - headerParameters["api-key"] = await this.configuration.apiKey("api-key"); // ApiKeyAuth authentication - } - const response = await this.request({ - path: `/api/v1/prices/batch`, - method: 'POST', - headers: headerParameters, - query: queryParameters, - body: PriceServiceBatchGetPricesRequestToJSON(requestParameters['body']), - }, initOverrides); + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(body, "PriceServiceBatchGetPricesRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); - return new runtime.JSONApiResponse(response, (jsonValue) => PriceServiceBatchGetPricesResponseFromJSON(jsonValue)); - } + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["ApiKeyAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } - /** - * Batch get prices - */ - async batchGetPrices(requestParameters: BatchGetPricesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.batchGetPricesRaw(requestParameters, initOverrides); - return await response.value(); + return requestContext; } /** * Check latest price */ - async checkLatestPriceRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; + public async checkLatestPrice(_options?: Configuration): Promise { + let _config = _options || this.configuration; - const headerParameters: runtime.HTTPHeaders = {}; + // Path Params + const localVarPath = '/api/v1/prices/check_latest'; - if (this.configuration && this.configuration.apiKey) { - headerParameters["api-key"] = await this.configuration.apiKey("api-key"); // ApiKeyAuth authentication - } + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.GET); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - const response = await this.request({ - path: `/api/v1/prices/check_latest`, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - return new runtime.JSONApiResponse(response, (jsonValue) => PriceServiceCheckLatestPriceResponseFromJSON(jsonValue)); - } + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["ApiKeyAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } - /** - * Check latest price - */ - async checkLatestPrice(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.checkLatestPriceRaw(initOverrides); - return await response.value(); + return requestContext; } /** * GetPrice returns the price of a given coin identifier, in a best effort way. If we do not have any price data for the given coin, we will return NOT_FOUND error. If we have at least one price data for the given coin, we will return it with the actual timestamp. Client is responsible for checking the timestamp and decide whether to use the price or not. * Get price + * @param timestamp The timestamp we request the price at. Note, the price service may not have the price at the exact timestamp, in which case it will return the price at the closest timestamp. + * @param coinIdSymbol + * @param coinIdAddressAddress + * @param coinIdAddressChain + * @param source */ - async getPriceRaw(requestParameters: GetPriceRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; + public async getPrice(timestamp?: Date, coinIdSymbol?: string, coinIdAddressAddress?: string, coinIdAddressChain?: string, source?: string, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + + + - if (requestParameters['timestamp'] != null) { - queryParameters['timestamp'] = (requestParameters['timestamp'] as any).toISOString(); + + // Path Params + const localVarPath = '/api/v1/prices'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.GET); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + + // Query Params + if (timestamp !== undefined) { + requestContext.setQueryParam("timestamp", ObjectSerializer.serialize(timestamp, "Date", "date-time")); } - if (requestParameters['coinIdSymbol'] != null) { - queryParameters['coinId.symbol'] = requestParameters['coinIdSymbol']; + // Query Params + if (coinIdSymbol !== undefined) { + requestContext.setQueryParam("coinId.symbol", ObjectSerializer.serialize(coinIdSymbol, "string", "")); } - if (requestParameters['coinIdAddressAddress'] != null) { - queryParameters['coinId.address.address'] = requestParameters['coinIdAddressAddress']; + // Query Params + if (coinIdAddressAddress !== undefined) { + requestContext.setQueryParam("coinId.address.address", ObjectSerializer.serialize(coinIdAddressAddress, "string", "")); } - if (requestParameters['coinIdAddressChain'] != null) { - queryParameters['coinId.address.chain'] = requestParameters['coinIdAddressChain']; + // Query Params + if (coinIdAddressChain !== undefined) { + requestContext.setQueryParam("coinId.address.chain", ObjectSerializer.serialize(coinIdAddressChain, "string", "")); } - if (requestParameters['source'] != null) { - queryParameters['source'] = requestParameters['source']; + // Query Params + if (source !== undefined) { + requestContext.setQueryParam("source", ObjectSerializer.serialize(source, "string", "")); } - const headerParameters: runtime.HTTPHeaders = {}; - if (this.configuration && this.configuration.apiKey) { - headerParameters["api-key"] = await this.configuration.apiKey("api-key"); // ApiKeyAuth authentication + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["ApiKeyAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); } - const response = await this.request({ - path: `/api/v1/prices`, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => PriceServiceGetPriceResponseFromJSON(jsonValue)); + return requestContext; } /** - * GetPrice returns the price of a given coin identifier, in a best effort way. If we do not have any price data for the given coin, we will return NOT_FOUND error. If we have at least one price data for the given coin, we will return it with the actual timestamp. Client is responsible for checking the timestamp and decide whether to use the price or not. - * Get price + * List coins + * @param limit + * @param offset + * @param searchQuery + * @param chain */ - async getPrice(requestParameters: GetPriceRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getPriceRaw(requestParameters, initOverrides); - return await response.value(); + public async priceListCoins(limit?: number, offset?: number, searchQuery?: string, chain?: string, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + + + + + // Path Params + const localVarPath = '/api/v1/prices/coins'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.GET); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + + // Query Params + if (limit !== undefined) { + requestContext.setQueryParam("limit", ObjectSerializer.serialize(limit, "number", "int32")); + } + + // Query Params + if (offset !== undefined) { + requestContext.setQueryParam("offset", ObjectSerializer.serialize(offset, "number", "int32")); + } + + // Query Params + if (searchQuery !== undefined) { + requestContext.setQueryParam("searchQuery", ObjectSerializer.serialize(searchQuery, "string", "")); + } + + // Query Params + if (chain !== undefined) { + requestContext.setQueryParam("chain", ObjectSerializer.serialize(chain, "string", "")); + } + + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["ApiKeyAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; } +} + +export class PriceApiResponseProcessor { + /** - * List coins + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to batchGetPrices + * @throws ApiException if the response code was not in [200, 299] */ - async priceListCoinsRaw(requestParameters: PriceListCoinsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - if (requestParameters['limit'] != null) { - queryParameters['limit'] = requestParameters['limit']; + public async batchGetPricesWithHttpInfo(response: ResponseContext): Promise> { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: PriceServiceBatchGetPricesResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "PriceServiceBatchGetPricesResponse", "" + ) as PriceServiceBatchGetPricesResponse; + return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); } - if (requestParameters['offset'] != null) { - queryParameters['offset'] = requestParameters['offset']; + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: PriceServiceBatchGetPricesResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "PriceServiceBatchGetPricesResponse", "" + ) as PriceServiceBatchGetPricesResponse; + return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); } - if (requestParameters['searchQuery'] != null) { - queryParameters['searchQuery'] = requestParameters['searchQuery']; + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to checkLatestPrice + * @throws ApiException if the response code was not in [200, 299] + */ + public async checkLatestPriceWithHttpInfo(response: ResponseContext): Promise> { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: PriceServiceCheckLatestPriceResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "PriceServiceCheckLatestPriceResponse", "" + ) as PriceServiceCheckLatestPriceResponse; + return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); } - if (requestParameters['chain'] != null) { - queryParameters['chain'] = requestParameters['chain']; + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: PriceServiceCheckLatestPriceResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "PriceServiceCheckLatestPriceResponse", "" + ) as PriceServiceCheckLatestPriceResponse; + return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); } - const headerParameters: runtime.HTTPHeaders = {}; + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } - if (this.configuration && this.configuration.apiKey) { - headerParameters["api-key"] = await this.configuration.apiKey("api-key"); // ApiKeyAuth authentication + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to getPrice + * @throws ApiException if the response code was not in [200, 299] + */ + public async getPriceWithHttpInfo(response: ResponseContext): Promise> { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: PriceServiceGetPriceResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "PriceServiceGetPriceResponse", "" + ) as PriceServiceGetPriceResponse; + return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); } - const response = await this.request({ - path: `/api/v1/prices/coins`, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: PriceServiceGetPriceResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "PriceServiceGetPriceResponse", "" + ) as PriceServiceGetPriceResponse; + return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); + } - return new runtime.JSONApiResponse(response, (jsonValue) => PriceServiceListCoinsResponseFromJSON(jsonValue)); + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); } /** - * List coins + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to priceListCoins + * @throws ApiException if the response code was not in [200, 299] */ - async priceListCoins(requestParameters: PriceListCoinsRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.priceListCoinsRaw(requestParameters, initOverrides); - return await response.value(); + public async priceListCoinsWithHttpInfo(response: ResponseContext): Promise> { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: PriceServiceListCoinsResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "PriceServiceListCoinsResponse", "" + ) as PriceServiceListCoinsResponse; + return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: PriceServiceListCoinsResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "PriceServiceListCoinsResponse", "" + ) as PriceServiceListCoinsResponse; + return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); } } diff --git a/src/apis/WebApi.ts b/src/apis/WebApi.ts index 2e88715..67e8c87 100755 --- a/src/apis/WebApi.ts +++ b/src/apis/WebApi.ts @@ -1,511 +1,753 @@ -/* tslint:disable */ -/* eslint-disable */ +// TODO: better import syntax? +import {BaseAPIRequestFactory, RequiredError, COLLECTION_FORMATS} from './baseapi.js'; +import {Configuration} from '../configuration.js'; +import {RequestContext, HttpMethod, ResponseContext, HttpFile, HttpInfo} from '../http/http.js'; +import {ObjectSerializer} from '../models/ObjectSerializer.js'; +import {ApiException} from './exception.js'; +import {canConsumeForm, isCodeInRange} from '../util.js'; +import {SecurityAuthentication} from '../auth/auth.js'; + + +import { WebServiceDashboard } from '../models/WebServiceDashboard.js'; +import { WebServiceExportDashboardResponse } from '../models/WebServiceExportDashboardResponse.js'; +import { WebServiceGetDashboardResponse } from '../models/WebServiceGetDashboardResponse.js'; +import { WebServiceGetProjectListResponse } from '../models/WebServiceGetProjectListResponse.js'; +import { WebServiceGetProjectResponse } from '../models/WebServiceGetProjectResponse.js'; +import { WebServiceImportDashboardRequest } from '../models/WebServiceImportDashboardRequest.js'; +import { WebServiceImportDashboardResponse } from '../models/WebServiceImportDashboardResponse.js'; + /** - * Sentio API - * Sentio Open API for query data - * - * The version of the OpenAPI document: version not set - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. + * no description */ +export class WebApiRequestFactory extends BaseAPIRequestFactory { + /** + * Delete a dashboard by id + * @param dashboardId filter the dashboard by id + * @param projectId filter the dashboard by project id + * @param ownerName username or organization name + * @param slug project slug + */ + public async deleteDashboard(dashboardId: string, projectId?: string, ownerName?: string, slug?: string, _options?: Configuration): Promise { + let _config = _options || this.configuration; -import * as runtime from '../runtime.js'; -import type { - WebServiceDashboard, - WebServiceExportDashboardResponse, - WebServiceGetDashboardResponse, - WebServiceGetProjectListResponse, - WebServiceGetProjectResponse, - WebServiceImportDashboardRequest, - WebServiceImportDashboardResponse, -} from '../models/index.js'; -import { - WebServiceDashboardFromJSON, - WebServiceDashboardToJSON, - WebServiceExportDashboardResponseFromJSON, - WebServiceExportDashboardResponseToJSON, - WebServiceGetDashboardResponseFromJSON, - WebServiceGetDashboardResponseToJSON, - WebServiceGetProjectListResponseFromJSON, - WebServiceGetProjectListResponseToJSON, - WebServiceGetProjectResponseFromJSON, - WebServiceGetProjectResponseToJSON, - WebServiceImportDashboardRequestFromJSON, - WebServiceImportDashboardRequestToJSON, - WebServiceImportDashboardResponseFromJSON, - WebServiceImportDashboardResponseToJSON, -} from '../models/index.js'; - -export interface DeleteDashboardRequest { - dashboardId: string; - projectId?: string; - ownerName?: string; - slug?: string; -} - -export interface ExportDashboardRequest { - dashboardId: string; -} - -export interface GetDashboardRequest { - dashboardId: string; - projectId?: string; - ownerName?: string; - slug?: string; -} - -export interface GetDashboard2Request { - owner: string; - slug: string; - dashboardId: string; - projectId?: string; -} - -export interface GetProjectRequest { - owner: string; - slug: string; -} - -export interface GetProjectListRequest { - userId?: string; - organizationId?: string; -} + // verify required parameter 'dashboardId' is not null or undefined + if (dashboardId === null || dashboardId === undefined) { + throw new RequiredError("WebApi", "deleteDashboard", "dashboardId"); + } -export interface ImportDashboardRequest { - body: WebServiceImportDashboardRequest; -} -export interface ListDashboardsRequest { - dashboardId?: string; - projectId?: string; - ownerName?: string; - slug?: string; -} -export interface ListDashboards2Request { - owner: string; - slug: string; - dashboardId?: string; - projectId?: string; -} -/** - * - */ -export class WebApi extends runtime.BaseAPI { - /** - * Delete a dashboard by id - */ - async deleteDashboardRaw(requestParameters: DeleteDashboardRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['dashboardId'] == null) { - throw new runtime.RequiredError( - 'dashboardId', - 'Required parameter "dashboardId" was null or undefined when calling deleteDashboard().' - ); - } + // Path Params + const localVarPath = '/api/v1/dashboards/{dashboardId}' + .replace('{' + 'dashboardId' + '}', encodeURIComponent(String(dashboardId))); - const queryParameters: any = {}; + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.DELETE); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - if (requestParameters['projectId'] != null) { - queryParameters['projectId'] = requestParameters['projectId']; + // Query Params + if (projectId !== undefined) { + requestContext.setQueryParam("projectId", ObjectSerializer.serialize(projectId, "string", "")); } - if (requestParameters['ownerName'] != null) { - queryParameters['ownerName'] = requestParameters['ownerName']; + // Query Params + if (ownerName !== undefined) { + requestContext.setQueryParam("ownerName", ObjectSerializer.serialize(ownerName, "string", "")); } - if (requestParameters['slug'] != null) { - queryParameters['slug'] = requestParameters['slug']; + // Query Params + if (slug !== undefined) { + requestContext.setQueryParam("slug", ObjectSerializer.serialize(slug, "string", "")); } - const headerParameters: runtime.HTTPHeaders = {}; - if (this.configuration && this.configuration.apiKey) { - headerParameters["api-key"] = await this.configuration.apiKey("api-key"); // ApiKeyAuth authentication + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["ApiKeyAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); } - const response = await this.request({ - path: `/api/v1/dashboards/{dashboardId}`.replace(`{${"dashboardId"}}`, encodeURIComponent(String(requestParameters['dashboardId']))), - method: 'DELETE', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => WebServiceDashboardFromJSON(jsonValue)); - } - - /** - * Delete a dashboard by id - */ - async deleteDashboard(requestParameters: DeleteDashboardRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.deleteDashboardRaw(requestParameters, initOverrides); - return await response.value(); + return requestContext; } /** * Export a dashboard to json + * @param dashboardId */ - async exportDashboardRaw(requestParameters: ExportDashboardRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['dashboardId'] == null) { - throw new runtime.RequiredError( - 'dashboardId', - 'Required parameter "dashboardId" was null or undefined when calling exportDashboard().' - ); + public async exportDashboard(dashboardId: string, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'dashboardId' is not null or undefined + if (dashboardId === null || dashboardId === undefined) { + throw new RequiredError("WebApi", "exportDashboard", "dashboardId"); } - const queryParameters: any = {}; - const headerParameters: runtime.HTTPHeaders = {}; + // Path Params + const localVarPath = '/api/v1/dashboards/{dashboardId}/json' + .replace('{' + 'dashboardId' + '}', encodeURIComponent(String(dashboardId))); - if (this.configuration && this.configuration.apiKey) { - headerParameters["api-key"] = await this.configuration.apiKey("api-key"); // ApiKeyAuth authentication - } + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.GET); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - const response = await this.request({ - path: `/api/v1/dashboards/{dashboardId}/json`.replace(`{${"dashboardId"}}`, encodeURIComponent(String(requestParameters['dashboardId']))), - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - return new runtime.JSONApiResponse(response, (jsonValue) => WebServiceExportDashboardResponseFromJSON(jsonValue)); - } + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["ApiKeyAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } - /** - * Export a dashboard to json - */ - async exportDashboard(requestParameters: ExportDashboardRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.exportDashboardRaw(requestParameters, initOverrides); - return await response.value(); + return requestContext; } /** * Get a dashboard by id + * @param dashboardId filter the dashboard by id + * @param projectId filter the dashboard by project id + * @param ownerName username or organization name + * @param slug project slug */ - async getDashboardRaw(requestParameters: GetDashboardRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['dashboardId'] == null) { - throw new runtime.RequiredError( - 'dashboardId', - 'Required parameter "dashboardId" was null or undefined when calling getDashboard().' - ); + public async getDashboard(dashboardId: string, projectId?: string, ownerName?: string, slug?: string, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'dashboardId' is not null or undefined + if (dashboardId === null || dashboardId === undefined) { + throw new RequiredError("WebApi", "getDashboard", "dashboardId"); } - const queryParameters: any = {}; - if (requestParameters['projectId'] != null) { - queryParameters['projectId'] = requestParameters['projectId']; + + + + // Path Params + const localVarPath = '/api/v1/dashboards/{dashboardId}' + .replace('{' + 'dashboardId' + '}', encodeURIComponent(String(dashboardId))); + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.GET); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + + // Query Params + if (projectId !== undefined) { + requestContext.setQueryParam("projectId", ObjectSerializer.serialize(projectId, "string", "")); } - if (requestParameters['ownerName'] != null) { - queryParameters['ownerName'] = requestParameters['ownerName']; + // Query Params + if (ownerName !== undefined) { + requestContext.setQueryParam("ownerName", ObjectSerializer.serialize(ownerName, "string", "")); } - if (requestParameters['slug'] != null) { - queryParameters['slug'] = requestParameters['slug']; + // Query Params + if (slug !== undefined) { + requestContext.setQueryParam("slug", ObjectSerializer.serialize(slug, "string", "")); } - const headerParameters: runtime.HTTPHeaders = {}; - if (this.configuration && this.configuration.apiKey) { - headerParameters["api-key"] = await this.configuration.apiKey("api-key"); // ApiKeyAuth authentication + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["ApiKeyAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); } - const response = await this.request({ - path: `/api/v1/dashboards/{dashboardId}`.replace(`{${"dashboardId"}}`, encodeURIComponent(String(requestParameters['dashboardId']))), - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => WebServiceGetDashboardResponseFromJSON(jsonValue)); + return requestContext; } /** * Get a dashboard by id + * @param owner username or organization name + * @param slug project slug + * @param dashboardId filter the dashboard by id + * @param projectId filter the dashboard by project id */ - async getDashboard(requestParameters: GetDashboardRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getDashboardRaw(requestParameters, initOverrides); - return await response.value(); - } + public async getDashboard2(owner: string, slug: string, dashboardId: string, projectId?: string, _options?: Configuration): Promise { + let _config = _options || this.configuration; - /** - * Get a dashboard by id - */ - async getDashboard2Raw(requestParameters: GetDashboard2Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['owner'] == null) { - throw new runtime.RequiredError( - 'owner', - 'Required parameter "owner" was null or undefined when calling getDashboard2().' - ); + // verify required parameter 'owner' is not null or undefined + if (owner === null || owner === undefined) { + throw new RequiredError("WebApi", "getDashboard2", "owner"); } - if (requestParameters['slug'] == null) { - throw new runtime.RequiredError( - 'slug', - 'Required parameter "slug" was null or undefined when calling getDashboard2().' - ); - } - if (requestParameters['dashboardId'] == null) { - throw new runtime.RequiredError( - 'dashboardId', - 'Required parameter "dashboardId" was null or undefined when calling getDashboard2().' - ); + // verify required parameter 'slug' is not null or undefined + if (slug === null || slug === undefined) { + throw new RequiredError("WebApi", "getDashboard2", "slug"); } - const queryParameters: any = {}; - if (requestParameters['projectId'] != null) { - queryParameters['projectId'] = requestParameters['projectId']; + // verify required parameter 'dashboardId' is not null or undefined + if (dashboardId === null || dashboardId === undefined) { + throw new RequiredError("WebApi", "getDashboard2", "dashboardId"); } - const headerParameters: runtime.HTTPHeaders = {}; - if (this.configuration && this.configuration.apiKey) { - headerParameters["api-key"] = await this.configuration.apiKey("api-key"); // ApiKeyAuth authentication + + // Path Params + const localVarPath = '/api/v1/projects/{owner}/{slug}/dashboards/{dashboardId}' + .replace('{' + 'owner' + '}', encodeURIComponent(String(owner))) + .replace('{' + 'slug' + '}', encodeURIComponent(String(slug))) + .replace('{' + 'dashboardId' + '}', encodeURIComponent(String(dashboardId))); + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.GET); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + + // Query Params + if (projectId !== undefined) { + requestContext.setQueryParam("projectId", ObjectSerializer.serialize(projectId, "string", "")); } - const response = await this.request({ - path: `/api/v1/projects/{owner}/{slug}/dashboards/{dashboardId}`.replace(`{${"owner"}}`, encodeURIComponent(String(requestParameters['owner']))).replace(`{${"slug"}}`, encodeURIComponent(String(requestParameters['slug']))).replace(`{${"dashboardId"}}`, encodeURIComponent(String(requestParameters['dashboardId']))), - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - return new runtime.JSONApiResponse(response, (jsonValue) => WebServiceGetDashboardResponseFromJSON(jsonValue)); - } + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["ApiKeyAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } - /** - * Get a dashboard by id - */ - async getDashboard2(requestParameters: GetDashboard2Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getDashboard2Raw(requestParameters, initOverrides); - return await response.value(); + return requestContext; } /** * Get project details + * @param owner username or organization name + * @param slug project slug */ - async getProjectRaw(requestParameters: GetProjectRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['owner'] == null) { - throw new runtime.RequiredError( - 'owner', - 'Required parameter "owner" was null or undefined when calling getProject().' - ); + public async getProject(owner: string, slug: string, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'owner' is not null or undefined + if (owner === null || owner === undefined) { + throw new RequiredError("WebApi", "getProject", "owner"); } - if (requestParameters['slug'] == null) { - throw new runtime.RequiredError( - 'slug', - 'Required parameter "slug" was null or undefined when calling getProject().' - ); + + // verify required parameter 'slug' is not null or undefined + if (slug === null || slug === undefined) { + throw new RequiredError("WebApi", "getProject", "slug"); } - const queryParameters: any = {}; - const headerParameters: runtime.HTTPHeaders = {}; + // Path Params + const localVarPath = '/api/v1/project/{owner}/{slug}' + .replace('{' + 'owner' + '}', encodeURIComponent(String(owner))) + .replace('{' + 'slug' + '}', encodeURIComponent(String(slug))); - if (this.configuration && this.configuration.apiKey) { - headerParameters["api-key"] = await this.configuration.apiKey("api-key"); // ApiKeyAuth authentication - } + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.GET); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - const response = await this.request({ - path: `/api/v1/project/{owner}/{slug}`.replace(`{${"owner"}}`, encodeURIComponent(String(requestParameters['owner']))).replace(`{${"slug"}}`, encodeURIComponent(String(requestParameters['slug']))), - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - return new runtime.JSONApiResponse(response, (jsonValue) => WebServiceGetProjectResponseFromJSON(jsonValue)); - } + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["ApiKeyAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } - /** - * Get project details - */ - async getProject(requestParameters: GetProjectRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getProjectRaw(requestParameters, initOverrides); - return await response.value(); + return requestContext; } /** * Get project list + * @param userId + * @param organizationId */ - async getProjectListRaw(requestParameters: GetProjectListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; + public async getProjectList(userId?: string, organizationId?: string, _options?: Configuration): Promise { + let _config = _options || this.configuration; - if (requestParameters['userId'] != null) { - queryParameters['userId'] = requestParameters['userId']; - } - if (requestParameters['organizationId'] != null) { - queryParameters['organizationId'] = requestParameters['organizationId']; - } - const headerParameters: runtime.HTTPHeaders = {}; + // Path Params + const localVarPath = '/api/v1/projects'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.GET); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - if (this.configuration && this.configuration.apiKey) { - headerParameters["api-key"] = await this.configuration.apiKey("api-key"); // ApiKeyAuth authentication + // Query Params + if (userId !== undefined) { + requestContext.setQueryParam("userId", ObjectSerializer.serialize(userId, "string", "")); } - const response = await this.request({ - path: `/api/v1/projects`, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); + // Query Params + if (organizationId !== undefined) { + requestContext.setQueryParam("organizationId", ObjectSerializer.serialize(organizationId, "string", "")); + } - return new runtime.JSONApiResponse(response, (jsonValue) => WebServiceGetProjectListResponseFromJSON(jsonValue)); - } - /** - * Get project list - */ - async getProjectList(requestParameters: GetProjectListRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getProjectListRaw(requestParameters, initOverrides); - return await response.value(); + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["ApiKeyAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; } /** * Import a dashboard to another dashboard + * @param body */ - async importDashboardRaw(requestParameters: ImportDashboardRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['body'] == null) { - throw new runtime.RequiredError( - 'body', - 'Required parameter "body" was null or undefined when calling importDashboard().' - ); + public async importDashboard(body: WebServiceImportDashboardRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new RequiredError("WebApi", "importDashboard", "body"); } - const queryParameters: any = {}; - const headerParameters: runtime.HTTPHeaders = {}; + // Path Params + const localVarPath = '/api/v1/dashboards/json'; - headerParameters['Content-Type'] = 'application/json'; + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - if (this.configuration && this.configuration.apiKey) { - headerParameters["api-key"] = await this.configuration.apiKey("api-key"); // ApiKeyAuth authentication - } - const response = await this.request({ - path: `/api/v1/dashboards/json`, - method: 'POST', - headers: headerParameters, - query: queryParameters, - body: WebServiceImportDashboardRequestToJSON(requestParameters['body']), - }, initOverrides); + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(body, "WebServiceImportDashboardRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); - return new runtime.JSONApiResponse(response, (jsonValue) => WebServiceImportDashboardResponseFromJSON(jsonValue)); - } + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["ApiKeyAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } - /** - * Import a dashboard to another dashboard - */ - async importDashboard(requestParameters: ImportDashboardRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.importDashboardRaw(requestParameters, initOverrides); - return await response.value(); + return requestContext; } /** * List all dashboards in a project + * @param dashboardId filter the dashboard by id + * @param projectId filter the dashboard by project id + * @param ownerName username or organization name + * @param slug project slug */ - async listDashboardsRaw(requestParameters: ListDashboardsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; + public async listDashboards(dashboardId?: string, projectId?: string, ownerName?: string, slug?: string, _options?: Configuration): Promise { + let _config = _options || this.configuration; - if (requestParameters['dashboardId'] != null) { - queryParameters['dashboardId'] = requestParameters['dashboardId']; + + + + + // Path Params + const localVarPath = '/api/v1/dashboards'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.GET); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + + // Query Params + if (dashboardId !== undefined) { + requestContext.setQueryParam("dashboardId", ObjectSerializer.serialize(dashboardId, "string", "")); } - if (requestParameters['projectId'] != null) { - queryParameters['projectId'] = requestParameters['projectId']; + // Query Params + if (projectId !== undefined) { + requestContext.setQueryParam("projectId", ObjectSerializer.serialize(projectId, "string", "")); } - if (requestParameters['ownerName'] != null) { - queryParameters['ownerName'] = requestParameters['ownerName']; + // Query Params + if (ownerName !== undefined) { + requestContext.setQueryParam("ownerName", ObjectSerializer.serialize(ownerName, "string", "")); } - if (requestParameters['slug'] != null) { - queryParameters['slug'] = requestParameters['slug']; + // Query Params + if (slug !== undefined) { + requestContext.setQueryParam("slug", ObjectSerializer.serialize(slug, "string", "")); } - const headerParameters: runtime.HTTPHeaders = {}; - if (this.configuration && this.configuration.apiKey) { - headerParameters["api-key"] = await this.configuration.apiKey("api-key"); // ApiKeyAuth authentication + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["ApiKeyAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); } - const response = await this.request({ - path: `/api/v1/dashboards`, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => WebServiceGetDashboardResponseFromJSON(jsonValue)); + return requestContext; } /** * List all dashboards in a project + * @param owner username or organization name + * @param slug project slug + * @param dashboardId filter the dashboard by id + * @param projectId filter the dashboard by project id */ - async listDashboards(requestParameters: ListDashboardsRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.listDashboardsRaw(requestParameters, initOverrides); - return await response.value(); - } + public async listDashboards2(owner: string, slug: string, dashboardId?: string, projectId?: string, _options?: Configuration): Promise { + let _config = _options || this.configuration; - /** - * List all dashboards in a project - */ - async listDashboards2Raw(requestParameters: ListDashboards2Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['owner'] == null) { - throw new runtime.RequiredError( - 'owner', - 'Required parameter "owner" was null or undefined when calling listDashboards2().' - ); + // verify required parameter 'owner' is not null or undefined + if (owner === null || owner === undefined) { + throw new RequiredError("WebApi", "listDashboards2", "owner"); } - if (requestParameters['slug'] == null) { - throw new runtime.RequiredError( - 'slug', - 'Required parameter "slug" was null or undefined when calling listDashboards2().' - ); + + // verify required parameter 'slug' is not null or undefined + if (slug === null || slug === undefined) { + throw new RequiredError("WebApi", "listDashboards2", "slug"); } - const queryParameters: any = {}; - if (requestParameters['dashboardId'] != null) { - queryParameters['dashboardId'] = requestParameters['dashboardId']; + + + // Path Params + const localVarPath = '/api/v1/projects/{owner}/{slug}/dashboards' + .replace('{' + 'owner' + '}', encodeURIComponent(String(owner))) + .replace('{' + 'slug' + '}', encodeURIComponent(String(slug))); + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.GET); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + + // Query Params + if (dashboardId !== undefined) { + requestContext.setQueryParam("dashboardId", ObjectSerializer.serialize(dashboardId, "string", "")); } - if (requestParameters['projectId'] != null) { - queryParameters['projectId'] = requestParameters['projectId']; + // Query Params + if (projectId !== undefined) { + requestContext.setQueryParam("projectId", ObjectSerializer.serialize(projectId, "string", "")); } - const headerParameters: runtime.HTTPHeaders = {}; - if (this.configuration && this.configuration.apiKey) { - headerParameters["api-key"] = await this.configuration.apiKey("api-key"); // ApiKeyAuth authentication + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["ApiKeyAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); } - const response = await this.request({ - path: `/api/v1/projects/{owner}/{slug}/dashboards`.replace(`{${"owner"}}`, encodeURIComponent(String(requestParameters['owner']))).replace(`{${"slug"}}`, encodeURIComponent(String(requestParameters['slug']))), - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); + return requestContext; + } + +} - return new runtime.JSONApiResponse(response, (jsonValue) => WebServiceGetDashboardResponseFromJSON(jsonValue)); +export class WebApiResponseProcessor { + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to deleteDashboard + * @throws ApiException if the response code was not in [200, 299] + */ + public async deleteDashboardWithHttpInfo(response: ResponseContext): Promise> { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: WebServiceDashboard = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "WebServiceDashboard", "" + ) as WebServiceDashboard; + return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: WebServiceDashboard = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "WebServiceDashboard", "" + ) as WebServiceDashboard; + return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); } /** - * List all dashboards in a project + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to exportDashboard + * @throws ApiException if the response code was not in [200, 299] + */ + public async exportDashboardWithHttpInfo(response: ResponseContext): Promise> { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: WebServiceExportDashboardResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "WebServiceExportDashboardResponse", "" + ) as WebServiceExportDashboardResponse; + return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: WebServiceExportDashboardResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "WebServiceExportDashboardResponse", "" + ) as WebServiceExportDashboardResponse; + return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to getDashboard + * @throws ApiException if the response code was not in [200, 299] + */ + public async getDashboardWithHttpInfo(response: ResponseContext): Promise> { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: WebServiceGetDashboardResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "WebServiceGetDashboardResponse", "" + ) as WebServiceGetDashboardResponse; + return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: WebServiceGetDashboardResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "WebServiceGetDashboardResponse", "" + ) as WebServiceGetDashboardResponse; + return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to getDashboard2 + * @throws ApiException if the response code was not in [200, 299] + */ + public async getDashboard2WithHttpInfo(response: ResponseContext): Promise> { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: WebServiceGetDashboardResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "WebServiceGetDashboardResponse", "" + ) as WebServiceGetDashboardResponse; + return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: WebServiceGetDashboardResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "WebServiceGetDashboardResponse", "" + ) as WebServiceGetDashboardResponse; + return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to getProject + * @throws ApiException if the response code was not in [200, 299] + */ + public async getProjectWithHttpInfo(response: ResponseContext): Promise> { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: WebServiceGetProjectResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "WebServiceGetProjectResponse", "" + ) as WebServiceGetProjectResponse; + return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: WebServiceGetProjectResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "WebServiceGetProjectResponse", "" + ) as WebServiceGetProjectResponse; + return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to getProjectList + * @throws ApiException if the response code was not in [200, 299] + */ + public async getProjectListWithHttpInfo(response: ResponseContext): Promise> { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: WebServiceGetProjectListResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "WebServiceGetProjectListResponse", "" + ) as WebServiceGetProjectListResponse; + return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: WebServiceGetProjectListResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "WebServiceGetProjectListResponse", "" + ) as WebServiceGetProjectListResponse; + return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to importDashboard + * @throws ApiException if the response code was not in [200, 299] + */ + public async importDashboardWithHttpInfo(response: ResponseContext): Promise> { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: WebServiceImportDashboardResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "WebServiceImportDashboardResponse", "" + ) as WebServiceImportDashboardResponse; + return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: WebServiceImportDashboardResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "WebServiceImportDashboardResponse", "" + ) as WebServiceImportDashboardResponse; + return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to listDashboards + * @throws ApiException if the response code was not in [200, 299] + */ + public async listDashboardsWithHttpInfo(response: ResponseContext): Promise> { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: WebServiceGetDashboardResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "WebServiceGetDashboardResponse", "" + ) as WebServiceGetDashboardResponse; + return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: WebServiceGetDashboardResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "WebServiceGetDashboardResponse", "" + ) as WebServiceGetDashboardResponse; + return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to listDashboards2 + * @throws ApiException if the response code was not in [200, 299] */ - async listDashboards2(requestParameters: ListDashboards2Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.listDashboards2Raw(requestParameters, initOverrides); - return await response.value(); + public async listDashboards2WithHttpInfo(response: ResponseContext): Promise> { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: WebServiceGetDashboardResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "WebServiceGetDashboardResponse", "" + ) as WebServiceGetDashboardResponse; + return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: WebServiceGetDashboardResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "WebServiceGetDashboardResponse", "" + ) as WebServiceGetDashboardResponse; + return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); } } diff --git a/src/apis/baseapi.ts b/src/apis/baseapi.ts new file mode 100755 index 0000000..47cd2e6 --- /dev/null +++ b/src/apis/baseapi.ts @@ -0,0 +1,37 @@ +import { Configuration } from '../configuration.js' + +/** + * + * @export + */ +export const COLLECTION_FORMATS = { + csv: ",", + ssv: " ", + tsv: "\t", + pipes: "|", +}; + + +/** + * + * @export + * @class BaseAPI + */ +export class BaseAPIRequestFactory { + + constructor(protected configuration: Configuration) { + } +}; + +/** + * + * @export + * @class RequiredError + * @extends {Error} + */ +export class RequiredError extends Error { + name: "RequiredError" = "RequiredError"; + constructor(public api: string, public method: string, public field: string) { + super("Required parameter " + field + " was null or undefined when calling " + api + "." + method + "."); + } +} diff --git a/src/apis/exception.ts b/src/apis/exception.ts new file mode 100755 index 0000000..9365d33 --- /dev/null +++ b/src/apis/exception.ts @@ -0,0 +1,15 @@ +/** + * Represents an error caused by an api call i.e. it has attributes for a HTTP status code + * and the returned body object. + * + * Example + * API returns a ErrorMessageObject whenever HTTP status code is not in [200, 299] + * => ApiException(404, someErrorMessageObject) + * + */ +export class ApiException extends Error { + public constructor(public code: number, message: string, public body: T, public headers: { [key: string]: string; }) { + super("HTTP-Code: " + code + "\nMessage: " + message + "\nBody: " + JSON.stringify(body) + "\nHeaders: " + + JSON.stringify(headers)) + } +} diff --git a/src/apis/index.ts b/src/apis/index.ts deleted file mode 100755 index dcf5166..0000000 --- a/src/apis/index.ts +++ /dev/null @@ -1,7 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -export * from './DataApi.js'; -export * from './DebugAndSimulationApi.js'; -export * from './ForksApi.js'; -export * from './PriceApi.js'; -export * from './WebApi.js'; diff --git a/src/auth/auth.ts b/src/auth/auth.ts new file mode 100755 index 0000000..1e96956 --- /dev/null +++ b/src/auth/auth.ts @@ -0,0 +1,79 @@ +import { RequestContext } from "../http/http.js"; + +/** + * Interface authentication schemes. + */ +export interface SecurityAuthentication { + /* + * @return returns the name of the security authentication as specified in OAI + */ + getName(): string; + + /** + * Applies the authentication scheme to the request context + * + * @params context the request context which should use this authentication scheme + */ + applySecurityAuthentication(context: RequestContext): void | Promise; +} + +export interface TokenProvider { + getToken(): Promise | string; +} + +/** + * Applies apiKey authentication to the request context. + */ +export class ApiKeyAuthAuthentication implements SecurityAuthentication { + /** + * Configures this api key authentication with the necessary properties + * + * @param apiKey: The api key to be used for every request + */ + public constructor(private apiKey: string) {} + + public getName(): string { + return "ApiKeyAuth"; + } + + public applySecurityAuthentication(context: RequestContext) { + context.setHeaderParam("api-key", this.apiKey); + } +} + + +export type AuthMethods = { + "default"?: SecurityAuthentication, + "ApiKeyAuth"?: SecurityAuthentication +} + +export type ApiKeyConfiguration = string; +export type HttpBasicConfiguration = { "username": string, "password": string }; +export type HttpBearerConfiguration = { tokenProvider: TokenProvider }; +export type OAuth2Configuration = { accessToken: string }; + +export type AuthMethodsConfiguration = { + "default"?: SecurityAuthentication, + "ApiKeyAuth"?: ApiKeyConfiguration +} + +/** + * Creates the authentication methods from a swagger description. + * + */ +export function configureAuthMethods(config: AuthMethodsConfiguration | undefined): AuthMethods { + let authMethods: AuthMethods = {} + + if (!config) { + return authMethods; + } + authMethods["default"] = config["default"] + + if (config["ApiKeyAuth"]) { + authMethods["ApiKeyAuth"] = new ApiKeyAuthAuthentication( + config["ApiKeyAuth"] + ); + } + + return authMethods; +} \ No newline at end of file diff --git a/src/configuration.ts b/src/configuration.ts new file mode 100755 index 0000000..ad2436f --- /dev/null +++ b/src/configuration.ts @@ -0,0 +1,82 @@ +import { HttpLibrary } from "./http/http.js"; +import { Middleware, PromiseMiddleware, PromiseMiddlewareWrapper } from "./middleware.js"; +import { IsomorphicFetchHttpLibrary as DefaultHttpLibrary } from "./http/isomorphic-fetch.js"; +import { BaseServerConfiguration, server1 } from "./servers.js"; +import { configureAuthMethods, AuthMethods, AuthMethodsConfiguration } from "./auth/auth.js"; + +export interface Configuration { + readonly baseServer: BaseServerConfiguration; + readonly httpApi: HttpLibrary; + readonly middleware: Middleware[]; + readonly authMethods: AuthMethods; +} + + +/** + * Interface with which a configuration object can be configured. + */ +export interface ConfigurationParameters { + /** + * Default server to use - a list of available servers (according to the + * OpenAPI yaml definition) is included in the `servers` const in `./servers`. You can also + * create your own server with the `ServerConfiguration` class from the same + * file. + */ + baseServer?: BaseServerConfiguration; + /** + * HTTP library to use e.g. IsomorphicFetch. This can usually be skipped as + * all generators come with a default library. + * If available, additional libraries can be imported from `./http/*` + */ + httpApi?: HttpLibrary; + + /** + * The middlewares which will be applied to requests and responses. You can + * add any number of middleware components to modify requests before they + * are sent or before they are deserialized by implementing the `Middleware` + * interface defined in `./middleware` + */ + middleware?: Middleware[]; + /** + * Configures middleware functions that return promises instead of + * Observables (which are used by `middleware`). Otherwise allows for the + * same functionality as `middleware`, i.e., modifying requests before they + * are sent and before they are deserialized. + */ + promiseMiddleware?: PromiseMiddleware[]; + /** + * Configuration for the available authentication methods (e.g., api keys) + * according to the OpenAPI yaml definition. For the definition, please refer to + * `./auth/auth` + */ + authMethods?: AuthMethodsConfiguration +} + +/** + * Provide your `ConfigurationParameters` to this function to get a `Configuration` + * object that can be used to configure your APIs (in the constructor or + * for each request individually). + * + * If a property is not included in conf, a default is used: + * - baseServer: server1 + * - httpApi: IsomorphicFetchHttpLibrary + * - middleware: [] + * - promiseMiddleware: [] + * - authMethods: {} + * + * @param conf partial configuration + */ +export function createConfiguration(conf: ConfigurationParameters = {}): Configuration { + const configuration: Configuration = { + baseServer: conf.baseServer !== undefined ? conf.baseServer : server1, + httpApi: conf.httpApi || new DefaultHttpLibrary(), + middleware: conf.middleware || [], + authMethods: configureAuthMethods(conf.authMethods) + }; + if (conf.promiseMiddleware) { + conf.promiseMiddleware.forEach( + m => configuration.middleware.push(new PromiseMiddlewareWrapper(m)) + ); + } + return configuration; +} \ No newline at end of file diff --git a/src/git_push.sh b/src/git_push.sh new file mode 100755 index 0000000..b253029 --- /dev/null +++ b/src/git_push.sh @@ -0,0 +1,51 @@ +#!/bin/sh +# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/ +# +# Usage example: /bin/sh ./git_push.sh wing328 openapi-petstore-perl "minor update" + +git_user_id=$1 +git_repo_id=$2 +release_note=$3 + +if [ "$git_user_id" = "" ]; then + git_user_id="GIT_USER_ID" + echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" +fi + +if [ "$git_repo_id" = "" ]; then + git_repo_id="GIT_REPO_ID" + echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" +fi + +if [ "$release_note" = "" ]; then + release_note="Minor update" + echo "[INFO] No command line input provided. Set \$release_note to $release_note" +fi + +# Initialize the local directory as a Git repository +git init + +# Adds the files in the local repository and stages them for commit. +git add . + +# Commits the tracked changes and prepares them to be pushed to a remote repository. +git commit -m "$release_note" + +# Sets the new remote +git_remote=$(git remote) +if [ "$git_remote" = "" ]; then # git remote not defined + + if [ "$GIT_TOKEN" = "" ]; then + echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." + git remote add origin https://github.com/${git_user_id}/${git_repo_id}.git + else + git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@github.com/${git_user_id}/${git_repo_id}.git + fi + +fi + +git pull origin master + +# Pushes (Forces) the changes in the local repository up to the remote repository +echo "Git pushing to https://github.com/${git_user_id}/${git_repo_id}.git" +git push origin master 2>&1 | grep -v 'To https' diff --git a/src/http/http.ts b/src/http/http.ts new file mode 100755 index 0000000..f99bf8e --- /dev/null +++ b/src/http/http.ts @@ -0,0 +1,256 @@ +import { Observable, from } from '../rxjsStub.js'; + +export * from './isomorphic-fetch.js'; + +/** + * Represents an HTTP method. + */ +export enum HttpMethod { + GET = "GET", + HEAD = "HEAD", + POST = "POST", + PUT = "PUT", + DELETE = "DELETE", + CONNECT = "CONNECT", + OPTIONS = "OPTIONS", + TRACE = "TRACE", + PATCH = "PATCH" +} + +/** + * Represents an HTTP file which will be transferred from or to a server. + */ +export type HttpFile = Blob & { readonly name: string }; + +export class HttpException extends Error { + public constructor(msg: string) { + super(msg); + } +} + +/** + * Represents the body of an outgoing HTTP request. + */ +export type RequestBody = undefined | string | FormData | URLSearchParams; + +type Headers = Record; + +function ensureAbsoluteUrl(url: string) { + if (url.startsWith("http://") || url.startsWith("https://")) { + return url; + } + return window.location.origin + url; +} + +/** + * Represents an HTTP request context + */ +export class RequestContext { + private headers: Headers = {}; + private body: RequestBody = undefined; + private url: URL; + + /** + * Creates the request context using a http method and request resource url + * + * @param url url of the requested resource + * @param httpMethod http method + */ + public constructor(url: string, private httpMethod: HttpMethod) { + this.url = new URL(ensureAbsoluteUrl(url)); + } + + /* + * Returns the url set in the constructor including the query string + * + */ + public getUrl(): string { + return this.url.toString().endsWith("/") ? + this.url.toString().slice(0, -1) + : this.url.toString(); + } + + /** + * Replaces the url set in the constructor with this url. + * + */ + public setUrl(url: string) { + this.url = new URL(ensureAbsoluteUrl(url)); + } + + /** + * Sets the body of the http request either as a string or FormData + * + * Note that setting a body on a HTTP GET, HEAD, DELETE, CONNECT or TRACE + * request is discouraged. + * https://httpwg.org/http-core/draft-ietf-httpbis-semantics-latest.html#rfc.section.7.3.1 + * + * @param body the body of the request + */ + public setBody(body: RequestBody) { + this.body = body; + } + + public getHttpMethod(): HttpMethod { + return this.httpMethod; + } + + public getHeaders(): Headers { + return this.headers; + } + + public getBody(): RequestBody { + return this.body; + } + + public setQueryParam(name: string, value: string) { + this.url.searchParams.set(name, value); + } + + public appendQueryParam(name: string, value: string) { + this.url.searchParams.append(name, value); + } + + /** + * Sets a cookie with the name and value. NO check for duplicate cookies is performed + * + */ + public addCookie(name: string, value: string): void { + if (!this.headers["Cookie"]) { + this.headers["Cookie"] = ""; + } + this.headers["Cookie"] += name + "=" + value + "; "; + } + + public setHeaderParam(key: string, value: string): void { + this.headers[key] = value; + } +} + +export interface ResponseBody { + text(): Promise; + binary(): Promise; +} + +/** + * Helper class to generate a `ResponseBody` from binary data + */ +export class SelfDecodingBody implements ResponseBody { + constructor(private dataSource: Promise) {} + + binary(): Promise { + return this.dataSource; + } + + async text(): Promise { + const data: Blob = await this.dataSource; + // @ts-ignore + if (data.text) { + // @ts-ignore + return data.text(); + } + + return new Promise((resolve, reject) => { + const reader = new FileReader(); + reader.addEventListener("load", () => resolve(reader.result as string)); + reader.addEventListener("error", () => reject(reader.error)); + reader.readAsText(data); + }); + } +} + +export class ResponseContext { + public constructor( + public httpStatusCode: number, + public headers: Headers, + public body: ResponseBody + ) {} + + /** + * Parse header value in the form `value; param1="value1"` + * + * E.g. for Content-Type or Content-Disposition + * Parameter names are converted to lower case + * The first parameter is returned with the key `""` + */ + public getParsedHeader(headerName: string): Headers { + const result: Headers = {}; + if (!this.headers[headerName]) { + return result; + } + + const parameters = this.headers[headerName].split(";"); + for (const parameter of parameters) { + let [key, value] = parameter.split("=", 2); + key = key.toLowerCase().trim(); + if (value === undefined) { + result[""] = key; + } else { + value = value.trim(); + if (value.startsWith('"') && value.endsWith('"')) { + value = value.substring(1, value.length - 1); + } + result[key] = value; + } + } + return result; + } + + public async getBodyAsFile(): Promise { + const data = await this.body.binary(); + const fileName = this.getParsedHeader("content-disposition")["filename"] || ""; + const contentType = this.headers["content-type"] || ""; + try { + return new File([data], fileName, { type: contentType }); + } catch (error) { + /** Fallback for when the File constructor is not available */ + return Object.assign(data, { + name: fileName, + type: contentType + }); + } + } + + /** + * Use a heuristic to get a body of unknown data structure. + * Return as string if possible, otherwise as binary. + */ + public getBodyAsAny(): Promise { + try { + return this.body.text(); + } catch {} + + try { + return this.body.binary(); + } catch {} + + return Promise.resolve(undefined); + } +} + +export interface HttpLibrary { + send(request: RequestContext): Observable; +} + +export interface PromiseHttpLibrary { + send(request: RequestContext): Promise; +} + +export function wrapHttpLibrary(promiseHttpLibrary: PromiseHttpLibrary): HttpLibrary { + return { + send(request: RequestContext): Observable { + return from(promiseHttpLibrary.send(request)); + } + } +} + +export class HttpInfo extends ResponseContext { + public constructor( + public httpStatusCode: number, + public headers: Headers, + public body: ResponseBody, + public data: T, + ) { + super(httpStatusCode, headers, body); + } +} diff --git a/src/http/isomorphic-fetch.ts b/src/http/isomorphic-fetch.ts new file mode 100755 index 0000000..5717179 --- /dev/null +++ b/src/http/isomorphic-fetch.ts @@ -0,0 +1,32 @@ +import {HttpLibrary, RequestContext, ResponseContext} from './http.js'; +import { from, Observable } from '../rxjsStub.js'; +import "whatwg-fetch"; + +export class IsomorphicFetchHttpLibrary implements HttpLibrary { + + public send(request: RequestContext): Observable { + let method = request.getHttpMethod().toString(); + let body = request.getBody(); + + const resultPromise = fetch(request.getUrl(), { + method: method, + body: body as any, + headers: request.getHeaders(), + credentials: "same-origin" + }).then((resp: any) => { + const headers: { [name: string]: string } = {}; + resp.headers.forEach((value: string, name: string) => { + headers[name] = value; + }); + + const body = { + text: () => resp.text(), + binary: () => resp.blob() + }; + return new ResponseContext(resp.status, headers, body); + }); + + return from>(resultPromise); + + } +} diff --git a/src/index.ts b/src/index.ts index 89656b9..f767659 100755 --- a/src/index.ts +++ b/src/index.ts @@ -1,5 +1,12 @@ -/* tslint:disable */ -/* eslint-disable */ -export * from './runtime.js'; -export * from './apis/index.js'; -export * from './models/index.js'; +export * from "./http/http.js"; +export * from "./auth/auth.js"; +export * from "./models/all.js"; +export { createConfiguration } from "./configuration.js" +export type { Configuration } from "./configuration.js" +export * from "./apis/exception.js"; +export * from "./servers.js"; +export { RequiredError } from "./apis/baseapi.js"; + +export type { PromiseMiddleware as Middleware } from './middleware.js'; +export { PromiseDataApi as DataApi, PromiseDebugAndSimulationApi as DebugAndSimulationApi, PromiseForksApi as ForksApi, PromisePriceApi as PriceApi, PromiseWebApi as WebApi } from './types/PromiseAPI.js'; + diff --git a/src/middleware.ts b/src/middleware.ts new file mode 100755 index 0000000..7dcc60b --- /dev/null +++ b/src/middleware.ts @@ -0,0 +1,66 @@ +import {RequestContext, ResponseContext} from './http/http.js'; +import { Observable, from } from './rxjsStub.js'; + +/** + * Defines the contract for a middleware intercepting requests before + * they are sent (but after the RequestContext was created) + * and before the ResponseContext is unwrapped. + * + */ +export interface Middleware { + /** + * Modifies the request before the request is sent. + * + * @param context RequestContext of a request which is about to be sent to the server + * @returns an observable of the updated request context + * + */ + pre(context: RequestContext): Observable; + /** + * Modifies the returned response before it is deserialized. + * + * @param context ResponseContext of a sent request + * @returns an observable of the modified response context + */ + post(context: ResponseContext): Observable; +} + +export class PromiseMiddlewareWrapper implements Middleware { + + public constructor(private middleware: PromiseMiddleware) { + + } + + pre(context: RequestContext): Observable { + return from(this.middleware.pre(context)); + } + + post(context: ResponseContext): Observable { + return from(this.middleware.post(context)); + } + +} + +/** + * Defines the contract for a middleware intercepting requests before + * they are sent (but after the RequestContext was created) + * and before the ResponseContext is unwrapped. + * + */ +export interface PromiseMiddleware { + /** + * Modifies the request before the request is sent. + * + * @param context RequestContext of a request which is about to be sent to the server + * @returns an observable of the updated request context + * + */ + pre(context: RequestContext): Promise; + /** + * Modifies the returned response before it is deserialized. + * + * @param context ResponseContext of a sent request + * @returns an observable of the modified response context + */ + post(context: ResponseContext): Promise; +} diff --git a/src/models/AnalyticServiceAnalyticServiceExecuteSQLBody.ts b/src/models/AnalyticServiceAnalyticServiceExecuteSQLBody.ts index 6d1d6ea..95fef61 100755 --- a/src/models/AnalyticServiceAnalyticServiceExecuteSQLBody.ts +++ b/src/models/AnalyticServiceAnalyticServiceExecuteSQLBody.ts @@ -1,10 +1,8 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Sentio API * Sentio Open API for query data * - * The version of the OpenAPI document: version not set + * OpenAPI spec version: version not set * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -12,109 +10,64 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime.js'; -import type { CommonCachePolicy } from './CommonCachePolicy.js'; -import { - CommonCachePolicyFromJSON, - CommonCachePolicyFromJSONTyped, - CommonCachePolicyToJSON, - CommonCachePolicyToJSONTyped, -} from './CommonCachePolicy.js'; -import type { AnalyticServiceSQLQuery } from './AnalyticServiceSQLQuery.js'; -import { - AnalyticServiceSQLQueryFromJSON, - AnalyticServiceSQLQueryFromJSONTyped, - AnalyticServiceSQLQueryToJSON, - AnalyticServiceSQLQueryToJSONTyped, -} from './AnalyticServiceSQLQuery.js'; +import { AnalyticServiceSQLQuery } from '../models/AnalyticServiceSQLQuery.js'; +import { CommonCachePolicy } from '../models/CommonCachePolicy.js'; +import { HttpFile } from '../http/http.js'; -/** - * - * @export - * @interface AnalyticServiceAnalyticServiceExecuteSQLBody - */ -export interface AnalyticServiceAnalyticServiceExecuteSQLBody { - /** - * - * @type {string} - * @memberof AnalyticServiceAnalyticServiceExecuteSQLBody - */ - projectId?: string; - /** - * - * @type {number} - * @memberof AnalyticServiceAnalyticServiceExecuteSQLBody - */ - version?: number; - /** - * - * @type {AnalyticServiceSQLQuery} - * @memberof AnalyticServiceAnalyticServiceExecuteSQLBody - */ - sqlQuery?: AnalyticServiceSQLQuery; - /** - * - * @type {string} - * @memberof AnalyticServiceAnalyticServiceExecuteSQLBody - */ - cursor?: string; - /** - * - * @type {boolean} - * @memberof AnalyticServiceAnalyticServiceExecuteSQLBody - */ - bypassCache?: boolean; - /** - * - * @type {CommonCachePolicy} - * @memberof AnalyticServiceAnalyticServiceExecuteSQLBody - */ - cachePolicy?: CommonCachePolicy; -} +export class AnalyticServiceAnalyticServiceExecuteSQLBody { + 'projectId'?: string; + 'version'?: number; + 'sqlQuery'?: AnalyticServiceSQLQuery; + 'cursor'?: string; + 'bypassCache'?: boolean; + 'cachePolicy'?: CommonCachePolicy; -/** - * Check if a given object implements the AnalyticServiceAnalyticServiceExecuteSQLBody interface. - */ -export function instanceOfAnalyticServiceAnalyticServiceExecuteSQLBody(value: object): value is AnalyticServiceAnalyticServiceExecuteSQLBody { - return true; -} + static readonly discriminator: string | undefined = undefined; -export function AnalyticServiceAnalyticServiceExecuteSQLBodyFromJSON(json: any): AnalyticServiceAnalyticServiceExecuteSQLBody { - return AnalyticServiceAnalyticServiceExecuteSQLBodyFromJSONTyped(json, false); -} - -export function AnalyticServiceAnalyticServiceExecuteSQLBodyFromJSONTyped(json: any, ignoreDiscriminator: boolean): AnalyticServiceAnalyticServiceExecuteSQLBody { - if (json == null) { - return json; - } - return { - - 'projectId': json['projectId'] == null ? undefined : json['projectId'], - 'version': json['version'] == null ? undefined : json['version'], - 'sqlQuery': json['sqlQuery'] == null ? undefined : AnalyticServiceSQLQueryFromJSON(json['sqlQuery']), - 'cursor': json['cursor'] == null ? undefined : json['cursor'], - 'bypassCache': json['bypassCache'] == null ? undefined : json['bypassCache'], - 'cachePolicy': json['cachePolicy'] == null ? undefined : CommonCachePolicyFromJSON(json['cachePolicy']), - }; -} + static readonly mapping: {[index: string]: string} | undefined = undefined; - export function AnalyticServiceAnalyticServiceExecuteSQLBodyToJSON(json: any): AnalyticServiceAnalyticServiceExecuteSQLBody { - return AnalyticServiceAnalyticServiceExecuteSQLBodyToJSONTyped(json, false); - } + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "projectId", + "baseName": "projectId", + "type": "string", + "format": "" + }, + { + "name": "version", + "baseName": "version", + "type": "number", + "format": "int32" + }, + { + "name": "sqlQuery", + "baseName": "sqlQuery", + "type": "AnalyticServiceSQLQuery", + "format": "" + }, + { + "name": "cursor", + "baseName": "cursor", + "type": "string", + "format": "" + }, + { + "name": "bypassCache", + "baseName": "bypassCache", + "type": "boolean", + "format": "" + }, + { + "name": "cachePolicy", + "baseName": "cachePolicy", + "type": "CommonCachePolicy", + "format": "" + } ]; - export function AnalyticServiceAnalyticServiceExecuteSQLBodyToJSONTyped(value?: AnalyticServiceAnalyticServiceExecuteSQLBody | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; + static getAttributeTypeMap() { + return AnalyticServiceAnalyticServiceExecuteSQLBody.attributeTypeMap; } - return { - - 'projectId': value['projectId'], - 'version': value['version'], - 'sqlQuery': AnalyticServiceSQLQueryToJSON(value['sqlQuery']), - 'cursor': value['cursor'], - 'bypassCache': value['bypassCache'], - 'cachePolicy': CommonCachePolicyToJSON(value['cachePolicy']), - }; + public constructor() { + } } - diff --git a/src/models/AnalyticServiceLogQueryRequestFilter.ts b/src/models/AnalyticServiceLogQueryRequestFilter.ts index bdfcbf3..0919938 100755 --- a/src/models/AnalyticServiceLogQueryRequestFilter.ts +++ b/src/models/AnalyticServiceLogQueryRequestFilter.ts @@ -1,10 +1,8 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Sentio API * Sentio Open API for query data * - * The version of the OpenAPI document: version not set + * OpenAPI spec version: version not set * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -12,70 +10,41 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime.js'; -/** - * - * @export - * @interface AnalyticServiceLogQueryRequestFilter - */ -export interface AnalyticServiceLogQueryRequestFilter { - /** - * - * @type {string} - * @memberof AnalyticServiceLogQueryRequestFilter - */ - field?: string; - /** - * - * @type {string} - * @memberof AnalyticServiceLogQueryRequestFilter - */ - value?: string; - /** - * - * @type {boolean} - * @memberof AnalyticServiceLogQueryRequestFilter - */ - not?: boolean; -} - -/** - * Check if a given object implements the AnalyticServiceLogQueryRequestFilter interface. - */ -export function instanceOfAnalyticServiceLogQueryRequestFilter(value: object): value is AnalyticServiceLogQueryRequestFilter { - return true; -} - -export function AnalyticServiceLogQueryRequestFilterFromJSON(json: any): AnalyticServiceLogQueryRequestFilter { - return AnalyticServiceLogQueryRequestFilterFromJSONTyped(json, false); -} - -export function AnalyticServiceLogQueryRequestFilterFromJSONTyped(json: any, ignoreDiscriminator: boolean): AnalyticServiceLogQueryRequestFilter { - if (json == null) { - return json; +import { HttpFile } from '../http/http.js'; + +export class AnalyticServiceLogQueryRequestFilter { + 'field'?: string; + 'value'?: string; + 'not'?: boolean; + + static readonly discriminator: string | undefined = undefined; + + static readonly mapping: {[index: string]: string} | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "field", + "baseName": "field", + "type": "string", + "format": "" + }, + { + "name": "value", + "baseName": "value", + "type": "string", + "format": "" + }, + { + "name": "not", + "baseName": "not", + "type": "boolean", + "format": "" + } ]; + + static getAttributeTypeMap() { + return AnalyticServiceLogQueryRequestFilter.attributeTypeMap; } - return { - - 'field': json['field'] == null ? undefined : json['field'], - 'value': json['value'] == null ? undefined : json['value'], - 'not': json['not'] == null ? undefined : json['not'], - }; -} - export function AnalyticServiceLogQueryRequestFilterToJSON(json: any): AnalyticServiceLogQueryRequestFilter { - return AnalyticServiceLogQueryRequestFilterToJSONTyped(json, false); - } - - export function AnalyticServiceLogQueryRequestFilterToJSONTyped(value?: AnalyticServiceLogQueryRequestFilter | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; + public constructor() { } - - return { - - 'field': value['field'], - 'value': value['value'], - 'not': value['not'], - }; } - diff --git a/src/models/AnalyticServiceLogQueryRequestSort.ts b/src/models/AnalyticServiceLogQueryRequestSort.ts index 0890bca..4f414fa 100755 --- a/src/models/AnalyticServiceLogQueryRequestSort.ts +++ b/src/models/AnalyticServiceLogQueryRequestSort.ts @@ -1,10 +1,8 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Sentio API * Sentio Open API for query data * - * The version of the OpenAPI document: version not set + * OpenAPI spec version: version not set * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -12,62 +10,34 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime.js'; -/** - * - * @export - * @interface AnalyticServiceLogQueryRequestSort - */ -export interface AnalyticServiceLogQueryRequestSort { - /** - * - * @type {string} - * @memberof AnalyticServiceLogQueryRequestSort - */ - field?: string; - /** - * - * @type {boolean} - * @memberof AnalyticServiceLogQueryRequestSort - */ - desc?: boolean; -} +import { HttpFile } from '../http/http.js'; -/** - * Check if a given object implements the AnalyticServiceLogQueryRequestSort interface. - */ -export function instanceOfAnalyticServiceLogQueryRequestSort(value: object): value is AnalyticServiceLogQueryRequestSort { - return true; -} +export class AnalyticServiceLogQueryRequestSort { + 'field'?: string; + 'desc'?: boolean; -export function AnalyticServiceLogQueryRequestSortFromJSON(json: any): AnalyticServiceLogQueryRequestSort { - return AnalyticServiceLogQueryRequestSortFromJSONTyped(json, false); -} + static readonly discriminator: string | undefined = undefined; -export function AnalyticServiceLogQueryRequestSortFromJSONTyped(json: any, ignoreDiscriminator: boolean): AnalyticServiceLogQueryRequestSort { - if (json == null) { - return json; - } - return { - - 'field': json['field'] == null ? undefined : json['field'], - 'desc': json['desc'] == null ? undefined : json['desc'], - }; -} + static readonly mapping: {[index: string]: string} | undefined = undefined; - export function AnalyticServiceLogQueryRequestSortToJSON(json: any): AnalyticServiceLogQueryRequestSort { - return AnalyticServiceLogQueryRequestSortToJSONTyped(json, false); - } + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "field", + "baseName": "field", + "type": "string", + "format": "" + }, + { + "name": "desc", + "baseName": "desc", + "type": "boolean", + "format": "" + } ]; - export function AnalyticServiceLogQueryRequestSortToJSONTyped(value?: AnalyticServiceLogQueryRequestSort | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; + static getAttributeTypeMap() { + return AnalyticServiceLogQueryRequestSort.attributeTypeMap; } - return { - - 'field': value['field'], - 'desc': value['desc'], - }; + public constructor() { + } } - diff --git a/src/models/AnalyticServiceLogQueryResponse.ts b/src/models/AnalyticServiceLogQueryResponse.ts index 3ace901..0e63849 100755 --- a/src/models/AnalyticServiceLogQueryResponse.ts +++ b/src/models/AnalyticServiceLogQueryResponse.ts @@ -1,10 +1,8 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Sentio API * Sentio Open API for query data * - * The version of the OpenAPI document: version not set + * OpenAPI spec version: version not set * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -12,85 +10,43 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime.js'; -import type { CommonAny } from './CommonAny.js'; -import { - CommonAnyFromJSON, - CommonAnyFromJSONTyped, - CommonAnyToJSON, - CommonAnyToJSONTyped, -} from './CommonAny.js'; -import type { CommonEventLogEntry } from './CommonEventLogEntry.js'; -import { - CommonEventLogEntryFromJSON, - CommonEventLogEntryFromJSONTyped, - CommonEventLogEntryToJSON, - CommonEventLogEntryToJSONTyped, -} from './CommonEventLogEntry.js'; - -/** - * - * @export - * @interface AnalyticServiceLogQueryResponse - */ -export interface AnalyticServiceLogQueryResponse { - /** - * - * @type {Array} - * @memberof AnalyticServiceLogQueryResponse - */ - entries?: Array; - /** - * - * @type {Array} - * @memberof AnalyticServiceLogQueryResponse - */ - after?: Array; - /** - * - * @type {string} - * @memberof AnalyticServiceLogQueryResponse - */ - total?: string; -} - -/** - * Check if a given object implements the AnalyticServiceLogQueryResponse interface. - */ -export function instanceOfAnalyticServiceLogQueryResponse(value: object): value is AnalyticServiceLogQueryResponse { - return true; -} - -export function AnalyticServiceLogQueryResponseFromJSON(json: any): AnalyticServiceLogQueryResponse { - return AnalyticServiceLogQueryResponseFromJSONTyped(json, false); -} - -export function AnalyticServiceLogQueryResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): AnalyticServiceLogQueryResponse { - if (json == null) { - return json; +import { CommonAny } from '../models/CommonAny.js'; +import { CommonEventLogEntry } from '../models/CommonEventLogEntry.js'; +import { HttpFile } from '../http/http.js'; + +export class AnalyticServiceLogQueryResponse { + 'entries'?: Array; + 'after'?: Array; + 'total'?: string; + + static readonly discriminator: string | undefined = undefined; + + static readonly mapping: {[index: string]: string} | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "entries", + "baseName": "entries", + "type": "Array", + "format": "" + }, + { + "name": "after", + "baseName": "after", + "type": "Array", + "format": "" + }, + { + "name": "total", + "baseName": "total", + "type": "string", + "format": "int64" + } ]; + + static getAttributeTypeMap() { + return AnalyticServiceLogQueryResponse.attributeTypeMap; } - return { - - 'entries': json['entries'] == null ? undefined : ((json['entries'] as Array).map(CommonEventLogEntryFromJSON)), - 'after': json['after'] == null ? undefined : ((json['after'] as Array).map(CommonAnyFromJSON)), - 'total': json['total'] == null ? undefined : json['total'], - }; -} - - export function AnalyticServiceLogQueryResponseToJSON(json: any): AnalyticServiceLogQueryResponse { - return AnalyticServiceLogQueryResponseToJSONTyped(json, false); - } - export function AnalyticServiceLogQueryResponseToJSONTyped(value?: AnalyticServiceLogQueryResponse | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; + public constructor() { } - - return { - - 'entries': value['entries'] == null ? undefined : ((value['entries'] as Array).map(CommonEventLogEntryToJSON)), - 'after': value['after'] == null ? undefined : ((value['after'] as Array).map(CommonAnyToJSON)), - 'total': value['total'], - }; } - diff --git a/src/models/AnalyticServiceSQLQuery.ts b/src/models/AnalyticServiceSQLQuery.ts index 7b5e696..3230ee0 100755 --- a/src/models/AnalyticServiceSQLQuery.ts +++ b/src/models/AnalyticServiceSQLQuery.ts @@ -1,10 +1,8 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Sentio API * Sentio Open API for query data * - * The version of the OpenAPI document: version not set + * OpenAPI spec version: version not set * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -12,86 +10,49 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime.js'; -import type { CommonRichStruct } from './CommonRichStruct.js'; -import { - CommonRichStructFromJSON, - CommonRichStructFromJSONTyped, - CommonRichStructToJSON, - CommonRichStructToJSONTyped, -} from './CommonRichStruct.js'; - -/** - * - * @export - * @interface AnalyticServiceSQLQuery - */ -export interface AnalyticServiceSQLQuery { - /** - * - * @type {string} - * @memberof AnalyticServiceSQLQuery - */ - sql?: string; - /** - * - * @type {number} - * @memberof AnalyticServiceSQLQuery - */ - size?: number; - /** - * - * @type {CommonRichStruct} - * @memberof AnalyticServiceSQLQuery - */ - parameters?: CommonRichStruct; - /** - * - * @type {string} - * @memberof AnalyticServiceSQLQuery - */ - name?: string; -} - -/** - * Check if a given object implements the AnalyticServiceSQLQuery interface. - */ -export function instanceOfAnalyticServiceSQLQuery(value: object): value is AnalyticServiceSQLQuery { - return true; -} - -export function AnalyticServiceSQLQueryFromJSON(json: any): AnalyticServiceSQLQuery { - return AnalyticServiceSQLQueryFromJSONTyped(json, false); -} - -export function AnalyticServiceSQLQueryFromJSONTyped(json: any, ignoreDiscriminator: boolean): AnalyticServiceSQLQuery { - if (json == null) { - return json; +import { CommonRichStruct } from '../models/CommonRichStruct.js'; +import { HttpFile } from '../http/http.js'; + +export class AnalyticServiceSQLQuery { + 'sql'?: string; + 'size'?: number; + 'parameters'?: CommonRichStruct; + 'name'?: string; + + static readonly discriminator: string | undefined = undefined; + + static readonly mapping: {[index: string]: string} | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "sql", + "baseName": "sql", + "type": "string", + "format": "" + }, + { + "name": "size", + "baseName": "size", + "type": "number", + "format": "int32" + }, + { + "name": "parameters", + "baseName": "parameters", + "type": "CommonRichStruct", + "format": "" + }, + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + } ]; + + static getAttributeTypeMap() { + return AnalyticServiceSQLQuery.attributeTypeMap; } - return { - - 'sql': json['sql'] == null ? undefined : json['sql'], - 'size': json['size'] == null ? undefined : json['size'], - 'parameters': json['parameters'] == null ? undefined : CommonRichStructFromJSON(json['parameters']), - 'name': json['name'] == null ? undefined : json['name'], - }; -} - - export function AnalyticServiceSQLQueryToJSON(json: any): AnalyticServiceSQLQuery { - return AnalyticServiceSQLQueryToJSONTyped(json, false); - } - export function AnalyticServiceSQLQueryToJSONTyped(value?: AnalyticServiceSQLQuery | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; + public constructor() { } - - return { - - 'sql': value['sql'], - 'size': value['size'], - 'parameters': CommonRichStructToJSON(value['parameters']), - 'name': value['name'], - }; } - diff --git a/src/models/AnalyticServiceSearchServiceQueryLogBody.ts b/src/models/AnalyticServiceSearchServiceQueryLogBody.ts index d7c6356..ae3d263 100755 --- a/src/models/AnalyticServiceSearchServiceQueryLogBody.ts +++ b/src/models/AnalyticServiceSearchServiceQueryLogBody.ts @@ -1,10 +1,8 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Sentio API * Sentio Open API for query data * - * The version of the OpenAPI document: version not set + * OpenAPI spec version: version not set * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -12,147 +10,87 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime.js'; -import type { AnalyticServiceLogQueryRequestFilter } from './AnalyticServiceLogQueryRequestFilter.js'; -import { - AnalyticServiceLogQueryRequestFilterFromJSON, - AnalyticServiceLogQueryRequestFilterFromJSONTyped, - AnalyticServiceLogQueryRequestFilterToJSON, - AnalyticServiceLogQueryRequestFilterToJSONTyped, -} from './AnalyticServiceLogQueryRequestFilter.js'; -import type { CommonAny } from './CommonAny.js'; -import { - CommonAnyFromJSON, - CommonAnyFromJSONTyped, - CommonAnyToJSON, - CommonAnyToJSONTyped, -} from './CommonAny.js'; -import type { AnalyticServiceLogQueryRequestSort } from './AnalyticServiceLogQueryRequestSort.js'; -import { - AnalyticServiceLogQueryRequestSortFromJSON, - AnalyticServiceLogQueryRequestSortFromJSONTyped, - AnalyticServiceLogQueryRequestSortToJSON, - AnalyticServiceLogQueryRequestSortToJSONTyped, -} from './AnalyticServiceLogQueryRequestSort.js'; -import type { CommonTimeRange } from './CommonTimeRange.js'; -import { - CommonTimeRangeFromJSON, - CommonTimeRangeFromJSONTyped, - CommonTimeRangeToJSON, - CommonTimeRangeToJSONTyped, -} from './CommonTimeRange.js'; +import { AnalyticServiceLogQueryRequestFilter } from '../models/AnalyticServiceLogQueryRequestFilter.js'; +import { AnalyticServiceLogQueryRequestSort } from '../models/AnalyticServiceLogQueryRequestSort.js'; +import { CommonAny } from '../models/CommonAny.js'; +import { CommonTimeRange } from '../models/CommonTimeRange.js'; +import { HttpFile } from '../http/http.js'; -/** - * - * @export - * @interface AnalyticServiceSearchServiceQueryLogBody - */ -export interface AnalyticServiceSearchServiceQueryLogBody { - /** - * - * @type {string} - * @memberof AnalyticServiceSearchServiceQueryLogBody - */ - projectId?: string; - /** - * - * @type {string} - * @memberof AnalyticServiceSearchServiceQueryLogBody - */ - query?: string; - /** - * - * @type {CommonTimeRange} - * @memberof AnalyticServiceSearchServiceQueryLogBody - */ - timeRange?: CommonTimeRange; - /** - * - * @type {Array} - * @memberof AnalyticServiceSearchServiceQueryLogBody - */ - sorts?: Array; - /** - * - * @type {Array} - * @memberof AnalyticServiceSearchServiceQueryLogBody - */ - after?: Array; - /** - * - * @type {number} - * @memberof AnalyticServiceSearchServiceQueryLogBody - */ - limit?: number; - /** - * - * @type {number} - * @memberof AnalyticServiceSearchServiceQueryLogBody - */ - offset?: number; - /** - * - * @type {Array} - * @memberof AnalyticServiceSearchServiceQueryLogBody - */ - filters?: Array; - /** - * - * @type {number} - * @memberof AnalyticServiceSearchServiceQueryLogBody - */ - version?: number; -} +export class AnalyticServiceSearchServiceQueryLogBody { + 'projectId'?: string; + 'query'?: string; + 'timeRange'?: CommonTimeRange; + 'sorts'?: Array; + 'after'?: Array; + 'limit'?: number; + 'offset'?: number; + 'filters'?: Array; + 'version'?: number; -/** - * Check if a given object implements the AnalyticServiceSearchServiceQueryLogBody interface. - */ -export function instanceOfAnalyticServiceSearchServiceQueryLogBody(value: object): value is AnalyticServiceSearchServiceQueryLogBody { - return true; -} + static readonly discriminator: string | undefined = undefined; -export function AnalyticServiceSearchServiceQueryLogBodyFromJSON(json: any): AnalyticServiceSearchServiceQueryLogBody { - return AnalyticServiceSearchServiceQueryLogBodyFromJSONTyped(json, false); -} - -export function AnalyticServiceSearchServiceQueryLogBodyFromJSONTyped(json: any, ignoreDiscriminator: boolean): AnalyticServiceSearchServiceQueryLogBody { - if (json == null) { - return json; - } - return { - - 'projectId': json['projectId'] == null ? undefined : json['projectId'], - 'query': json['query'] == null ? undefined : json['query'], - 'timeRange': json['timeRange'] == null ? undefined : CommonTimeRangeFromJSON(json['timeRange']), - 'sorts': json['sorts'] == null ? undefined : ((json['sorts'] as Array).map(AnalyticServiceLogQueryRequestSortFromJSON)), - 'after': json['after'] == null ? undefined : ((json['after'] as Array).map(CommonAnyFromJSON)), - 'limit': json['limit'] == null ? undefined : json['limit'], - 'offset': json['offset'] == null ? undefined : json['offset'], - 'filters': json['filters'] == null ? undefined : ((json['filters'] as Array).map(AnalyticServiceLogQueryRequestFilterFromJSON)), - 'version': json['version'] == null ? undefined : json['version'], - }; -} + static readonly mapping: {[index: string]: string} | undefined = undefined; - export function AnalyticServiceSearchServiceQueryLogBodyToJSON(json: any): AnalyticServiceSearchServiceQueryLogBody { - return AnalyticServiceSearchServiceQueryLogBodyToJSONTyped(json, false); - } + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "projectId", + "baseName": "projectId", + "type": "string", + "format": "" + }, + { + "name": "query", + "baseName": "query", + "type": "string", + "format": "" + }, + { + "name": "timeRange", + "baseName": "timeRange", + "type": "CommonTimeRange", + "format": "" + }, + { + "name": "sorts", + "baseName": "sorts", + "type": "Array", + "format": "" + }, + { + "name": "after", + "baseName": "after", + "type": "Array", + "format": "" + }, + { + "name": "limit", + "baseName": "limit", + "type": "number", + "format": "int32" + }, + { + "name": "offset", + "baseName": "offset", + "type": "number", + "format": "int32" + }, + { + "name": "filters", + "baseName": "filters", + "type": "Array", + "format": "" + }, + { + "name": "version", + "baseName": "version", + "type": "number", + "format": "int32" + } ]; - export function AnalyticServiceSearchServiceQueryLogBodyToJSONTyped(value?: AnalyticServiceSearchServiceQueryLogBody | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; + static getAttributeTypeMap() { + return AnalyticServiceSearchServiceQueryLogBody.attributeTypeMap; } - return { - - 'projectId': value['projectId'], - 'query': value['query'], - 'timeRange': CommonTimeRangeToJSON(value['timeRange']), - 'sorts': value['sorts'] == null ? undefined : ((value['sorts'] as Array).map(AnalyticServiceLogQueryRequestSortToJSON)), - 'after': value['after'] == null ? undefined : ((value['after'] as Array).map(CommonAnyToJSON)), - 'limit': value['limit'], - 'offset': value['offset'], - 'filters': value['filters'] == null ? undefined : ((value['filters'] as Array).map(AnalyticServiceLogQueryRequestFilterToJSON)), - 'version': value['version'], - }; + public constructor() { + } } - diff --git a/src/models/AnalyticServiceSyncExecuteSQLResponse.ts b/src/models/AnalyticServiceSyncExecuteSQLResponse.ts index 89aac62..2501432 100755 --- a/src/models/AnalyticServiceSyncExecuteSQLResponse.ts +++ b/src/models/AnalyticServiceSyncExecuteSQLResponse.ts @@ -1,10 +1,8 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Sentio API * Sentio Open API for query data * - * The version of the OpenAPI document: version not set + * OpenAPI spec version: version not set * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -12,93 +10,50 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime.js'; -import type { CommonTabularData } from './CommonTabularData.js'; -import { - CommonTabularDataFromJSON, - CommonTabularDataFromJSONTyped, - CommonTabularDataToJSON, - CommonTabularDataToJSONTyped, -} from './CommonTabularData.js'; -import type { CommonComputeStats } from './CommonComputeStats.js'; -import { - CommonComputeStatsFromJSON, - CommonComputeStatsFromJSONTyped, - CommonComputeStatsToJSON, - CommonComputeStatsToJSONTyped, -} from './CommonComputeStats.js'; - -/** - * - * @export - * @interface AnalyticServiceSyncExecuteSQLResponse - */ -export interface AnalyticServiceSyncExecuteSQLResponse { - /** - * - * @type {string} - * @memberof AnalyticServiceSyncExecuteSQLResponse - */ - runtimeCost?: string; - /** - * - * @type {CommonTabularData} - * @memberof AnalyticServiceSyncExecuteSQLResponse - */ - result?: CommonTabularData; - /** - * - * @type {string} - * @memberof AnalyticServiceSyncExecuteSQLResponse - */ - error?: string; - /** - * - * @type {CommonComputeStats} - * @memberof AnalyticServiceSyncExecuteSQLResponse - */ - computeStats?: CommonComputeStats; -} - -/** - * Check if a given object implements the AnalyticServiceSyncExecuteSQLResponse interface. - */ -export function instanceOfAnalyticServiceSyncExecuteSQLResponse(value: object): value is AnalyticServiceSyncExecuteSQLResponse { - return true; -} - -export function AnalyticServiceSyncExecuteSQLResponseFromJSON(json: any): AnalyticServiceSyncExecuteSQLResponse { - return AnalyticServiceSyncExecuteSQLResponseFromJSONTyped(json, false); -} - -export function AnalyticServiceSyncExecuteSQLResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): AnalyticServiceSyncExecuteSQLResponse { - if (json == null) { - return json; +import { CommonComputeStats } from '../models/CommonComputeStats.js'; +import { CommonTabularData } from '../models/CommonTabularData.js'; +import { HttpFile } from '../http/http.js'; + +export class AnalyticServiceSyncExecuteSQLResponse { + 'runtimeCost'?: string; + 'result'?: CommonTabularData; + 'error'?: string; + 'computeStats'?: CommonComputeStats; + + static readonly discriminator: string | undefined = undefined; + + static readonly mapping: {[index: string]: string} | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "runtimeCost", + "baseName": "runtimeCost", + "type": "string", + "format": "int64" + }, + { + "name": "result", + "baseName": "result", + "type": "CommonTabularData", + "format": "" + }, + { + "name": "error", + "baseName": "error", + "type": "string", + "format": "" + }, + { + "name": "computeStats", + "baseName": "computeStats", + "type": "CommonComputeStats", + "format": "" + } ]; + + static getAttributeTypeMap() { + return AnalyticServiceSyncExecuteSQLResponse.attributeTypeMap; } - return { - - 'runtimeCost': json['runtimeCost'] == null ? undefined : json['runtimeCost'], - 'result': json['result'] == null ? undefined : CommonTabularDataFromJSON(json['result']), - 'error': json['error'] == null ? undefined : json['error'], - 'computeStats': json['computeStats'] == null ? undefined : CommonComputeStatsFromJSON(json['computeStats']), - }; -} - - export function AnalyticServiceSyncExecuteSQLResponseToJSON(json: any): AnalyticServiceSyncExecuteSQLResponse { - return AnalyticServiceSyncExecuteSQLResponseToJSONTyped(json, false); - } - export function AnalyticServiceSyncExecuteSQLResponseToJSONTyped(value?: AnalyticServiceSyncExecuteSQLResponse | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; + public constructor() { } - - return { - - 'runtimeCost': value['runtimeCost'], - 'result': CommonTabularDataToJSON(value['result']), - 'error': value['error'], - 'computeStats': CommonComputeStatsToJSON(value['computeStats']), - }; } - diff --git a/src/models/CommonAggregate.ts b/src/models/CommonAggregate.ts index 385ea4d..e4d8017 100755 --- a/src/models/CommonAggregate.ts +++ b/src/models/CommonAggregate.ts @@ -1,10 +1,8 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Sentio API * Sentio Open API for query data * - * The version of the OpenAPI document: version not set + * OpenAPI spec version: version not set * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -12,72 +10,37 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime.js'; -import type { CommonAggregateAggregateOps } from './CommonAggregateAggregateOps.js'; -import { - CommonAggregateAggregateOpsFromJSON, - CommonAggregateAggregateOpsFromJSONTyped, - CommonAggregateAggregateOpsToJSON, - CommonAggregateAggregateOpsToJSONTyped, -} from './CommonAggregateAggregateOps.js'; - -/** - * - * @export - * @interface CommonAggregate - */ -export interface CommonAggregate { - /** - * - * @type {CommonAggregateAggregateOps} - * @memberof CommonAggregate - */ - op?: CommonAggregateAggregateOps; - /** - * - * @type {Array} - * @memberof CommonAggregate - */ - grouping?: Array; -} - - - -/** - * Check if a given object implements the CommonAggregate interface. - */ -export function instanceOfCommonAggregate(value: object): value is CommonAggregate { - return true; -} - -export function CommonAggregateFromJSON(json: any): CommonAggregate { - return CommonAggregateFromJSONTyped(json, false); -} - -export function CommonAggregateFromJSONTyped(json: any, ignoreDiscriminator: boolean): CommonAggregate { - if (json == null) { - return json; +import { CommonAggregateAggregateOps } from '../models/CommonAggregateAggregateOps.js'; +import { HttpFile } from '../http/http.js'; + +export class CommonAggregate { + 'op'?: CommonAggregateAggregateOps; + 'grouping'?: Array; + + static readonly discriminator: string | undefined = undefined; + + static readonly mapping: {[index: string]: string} | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "op", + "baseName": "op", + "type": "CommonAggregateAggregateOps", + "format": "" + }, + { + "name": "grouping", + "baseName": "grouping", + "type": "Array", + "format": "" + } ]; + + static getAttributeTypeMap() { + return CommonAggregate.attributeTypeMap; } - return { - - 'op': json['op'] == null ? undefined : CommonAggregateAggregateOpsFromJSON(json['op']), - 'grouping': json['grouping'] == null ? undefined : json['grouping'], - }; -} - - export function CommonAggregateToJSON(json: any): CommonAggregate { - return CommonAggregateToJSONTyped(json, false); - } - export function CommonAggregateToJSONTyped(value?: CommonAggregate | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; + public constructor() { } - - return { - - 'op': CommonAggregateAggregateOpsToJSON(value['op']), - 'grouping': value['grouping'], - }; } + diff --git a/src/models/CommonAggregateAggregateOps.ts b/src/models/CommonAggregateAggregateOps.ts index 520b57c..64e5a86 100755 --- a/src/models/CommonAggregateAggregateOps.ts +++ b/src/models/CommonAggregateAggregateOps.ts @@ -1,10 +1,8 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Sentio API * Sentio Open API for query data * - * The version of the OpenAPI document: version not set + * OpenAPI spec version: version not set * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -12,45 +10,12 @@ * Do not edit the class manually. */ +import { HttpFile } from '../http/http.js'; -/** - * - * @export - */ -export const CommonAggregateAggregateOps = { - Avg: 'AVG', - Sum: 'SUM', - Min: 'MIN', - Max: 'MAX', - Count: 'COUNT' -} as const; -export type CommonAggregateAggregateOps = typeof CommonAggregateAggregateOps[keyof typeof CommonAggregateAggregateOps]; - - -export function instanceOfCommonAggregateAggregateOps(value: any): boolean { - for (const key in CommonAggregateAggregateOps) { - if (Object.prototype.hasOwnProperty.call(CommonAggregateAggregateOps, key)) { - if (CommonAggregateAggregateOps[key as keyof typeof CommonAggregateAggregateOps] === value) { - return true; - } - } - } - return false; -} - -export function CommonAggregateAggregateOpsFromJSON(json: any): CommonAggregateAggregateOps { - return CommonAggregateAggregateOpsFromJSONTyped(json, false); +export enum CommonAggregateAggregateOps { + Avg = 'AVG', + Sum = 'SUM', + Min = 'MIN', + Max = 'MAX', + Count = 'COUNT' } - -export function CommonAggregateAggregateOpsFromJSONTyped(json: any, ignoreDiscriminator: boolean): CommonAggregateAggregateOps { - return json as CommonAggregateAggregateOps; -} - -export function CommonAggregateAggregateOpsToJSON(value?: CommonAggregateAggregateOps | null): any { - return value as any; -} - -export function CommonAggregateAggregateOpsToJSONTyped(value: any, ignoreDiscriminator: boolean): CommonAggregateAggregateOps { - return value as CommonAggregateAggregateOps; -} - diff --git a/src/models/CommonAny.ts b/src/models/CommonAny.ts index 2c414aa..d7dd20f 100755 --- a/src/models/CommonAny.ts +++ b/src/models/CommonAny.ts @@ -1,10 +1,8 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Sentio API * Sentio Open API for query data * - * The version of the OpenAPI document: version not set + * OpenAPI spec version: version not set * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -12,110 +10,70 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime.js'; -import type { CommonStringList } from './CommonStringList.js'; -import { - CommonStringListFromJSON, - CommonStringListFromJSONTyped, - CommonStringListToJSON, - CommonStringListToJSONTyped, -} from './CommonStringList.js'; +import { CommonStringList } from '../models/CommonStringList.js'; +import { HttpFile } from '../http/http.js'; -/** - * - * @export - * @interface CommonAny - */ -export interface CommonAny { - /** - * - * @type {number} - * @memberof CommonAny - */ - intValue?: number; - /** - * - * @type {string} - * @memberof CommonAny - */ - longValue?: string; - /** - * - * @type {number} - * @memberof CommonAny - */ - doubleValue?: number; - /** - * - * @type {string} - * @memberof CommonAny - */ - stringValue?: string; - /** - * - * @type {boolean} - * @memberof CommonAny - */ - boolValue?: boolean; - /** - * - * @type {Date} - * @memberof CommonAny - */ - dateValue?: Date; - /** - * - * @type {CommonStringList} - * @memberof CommonAny - */ - listValue?: CommonStringList; -} +export class CommonAny { + 'intValue'?: number; + 'longValue'?: string; + 'doubleValue'?: number; + 'stringValue'?: string; + 'boolValue'?: boolean; + 'dateValue'?: Date; + 'listValue'?: CommonStringList; -/** - * Check if a given object implements the CommonAny interface. - */ -export function instanceOfCommonAny(value: object): value is CommonAny { - return true; -} + static readonly discriminator: string | undefined = undefined; -export function CommonAnyFromJSON(json: any): CommonAny { - return CommonAnyFromJSONTyped(json, false); -} - -export function CommonAnyFromJSONTyped(json: any, ignoreDiscriminator: boolean): CommonAny { - if (json == null) { - return json; - } - return { - - 'intValue': json['intValue'] == null ? undefined : json['intValue'], - 'longValue': json['longValue'] == null ? undefined : json['longValue'], - 'doubleValue': json['doubleValue'] == null ? undefined : json['doubleValue'], - 'stringValue': json['stringValue'] == null ? undefined : json['stringValue'], - 'boolValue': json['boolValue'] == null ? undefined : json['boolValue'], - 'dateValue': json['dateValue'] == null ? undefined : (new Date(json['dateValue'])), - 'listValue': json['listValue'] == null ? undefined : CommonStringListFromJSON(json['listValue']), - }; -} + static readonly mapping: {[index: string]: string} | undefined = undefined; - export function CommonAnyToJSON(json: any): CommonAny { - return CommonAnyToJSONTyped(json, false); - } + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "intValue", + "baseName": "intValue", + "type": "number", + "format": "int32" + }, + { + "name": "longValue", + "baseName": "longValue", + "type": "string", + "format": "int64" + }, + { + "name": "doubleValue", + "baseName": "doubleValue", + "type": "number", + "format": "double" + }, + { + "name": "stringValue", + "baseName": "stringValue", + "type": "string", + "format": "" + }, + { + "name": "boolValue", + "baseName": "boolValue", + "type": "boolean", + "format": "" + }, + { + "name": "dateValue", + "baseName": "dateValue", + "type": "Date", + "format": "date-time" + }, + { + "name": "listValue", + "baseName": "listValue", + "type": "CommonStringList", + "format": "" + } ]; - export function CommonAnyToJSONTyped(value?: CommonAny | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; + static getAttributeTypeMap() { + return CommonAny.attributeTypeMap; } - return { - - 'intValue': value['intValue'], - 'longValue': value['longValue'], - 'doubleValue': value['doubleValue'], - 'stringValue': value['stringValue'], - 'boolValue': value['boolValue'], - 'dateValue': value['dateValue'] == null ? undefined : ((value['dateValue']).toISOString()), - 'listValue': CommonStringListToJSON(value['listValue']), - }; + public constructor() { + } } - diff --git a/src/models/CommonArgument.ts b/src/models/CommonArgument.ts index 90cda78..cee61eb 100755 --- a/src/models/CommonArgument.ts +++ b/src/models/CommonArgument.ts @@ -1,10 +1,8 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Sentio API * Sentio Open API for query data * - * The version of the OpenAPI document: version not set + * OpenAPI spec version: version not set * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -12,94 +10,56 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime.js'; -import type { CommonDuration } from './CommonDuration.js'; -import { - CommonDurationFromJSON, - CommonDurationFromJSONTyped, - CommonDurationToJSON, - CommonDurationToJSONTyped, -} from './CommonDuration.js'; +import { CommonDuration } from '../models/CommonDuration.js'; +import { HttpFile } from '../http/http.js'; -/** - * - * @export - * @interface CommonArgument - */ -export interface CommonArgument { - /** - * - * @type {string} - * @memberof CommonArgument - */ - stringValue?: string; - /** - * - * @type {number} - * @memberof CommonArgument - */ - intValue?: number; - /** - * - * @type {number} - * @memberof CommonArgument - */ - doubleValue?: number; - /** - * - * @type {boolean} - * @memberof CommonArgument - */ - boolValue?: boolean; - /** - * - * @type {CommonDuration} - * @memberof CommonArgument - */ - durationValue?: CommonDuration; -} +export class CommonArgument { + 'stringValue'?: string; + 'intValue'?: number; + 'doubleValue'?: number; + 'boolValue'?: boolean; + 'durationValue'?: CommonDuration; -/** - * Check if a given object implements the CommonArgument interface. - */ -export function instanceOfCommonArgument(value: object): value is CommonArgument { - return true; -} + static readonly discriminator: string | undefined = undefined; -export function CommonArgumentFromJSON(json: any): CommonArgument { - return CommonArgumentFromJSONTyped(json, false); -} - -export function CommonArgumentFromJSONTyped(json: any, ignoreDiscriminator: boolean): CommonArgument { - if (json == null) { - return json; - } - return { - - 'stringValue': json['stringValue'] == null ? undefined : json['stringValue'], - 'intValue': json['intValue'] == null ? undefined : json['intValue'], - 'doubleValue': json['doubleValue'] == null ? undefined : json['doubleValue'], - 'boolValue': json['boolValue'] == null ? undefined : json['boolValue'], - 'durationValue': json['durationValue'] == null ? undefined : CommonDurationFromJSON(json['durationValue']), - }; -} + static readonly mapping: {[index: string]: string} | undefined = undefined; - export function CommonArgumentToJSON(json: any): CommonArgument { - return CommonArgumentToJSONTyped(json, false); - } + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "stringValue", + "baseName": "stringValue", + "type": "string", + "format": "" + }, + { + "name": "intValue", + "baseName": "intValue", + "type": "number", + "format": "int32" + }, + { + "name": "doubleValue", + "baseName": "doubleValue", + "type": "number", + "format": "double" + }, + { + "name": "boolValue", + "baseName": "boolValue", + "type": "boolean", + "format": "" + }, + { + "name": "durationValue", + "baseName": "durationValue", + "type": "CommonDuration", + "format": "" + } ]; - export function CommonArgumentToJSONTyped(value?: CommonArgument | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; + static getAttributeTypeMap() { + return CommonArgument.attributeTypeMap; } - return { - - 'stringValue': value['stringValue'], - 'intValue': value['intValue'], - 'doubleValue': value['doubleValue'], - 'boolValue': value['boolValue'], - 'durationValue': CommonDurationToJSON(value['durationValue']), - }; + public constructor() { + } } - diff --git a/src/models/CommonBigDecimal.ts b/src/models/CommonBigDecimal.ts index 734ea83..af4dcf6 100755 --- a/src/models/CommonBigDecimal.ts +++ b/src/models/CommonBigDecimal.ts @@ -1,10 +1,8 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Sentio API * Sentio Open API for query data * - * The version of the OpenAPI document: version not set + * OpenAPI spec version: version not set * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -12,70 +10,35 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime.js'; -import type { CommonBigInteger } from './CommonBigInteger.js'; -import { - CommonBigIntegerFromJSON, - CommonBigIntegerFromJSONTyped, - CommonBigIntegerToJSON, - CommonBigIntegerToJSONTyped, -} from './CommonBigInteger.js'; - -/** - * - * @export - * @interface CommonBigDecimal - */ -export interface CommonBigDecimal { - /** - * - * @type {CommonBigInteger} - * @memberof CommonBigDecimal - */ - value?: CommonBigInteger; - /** - * - * @type {number} - * @memberof CommonBigDecimal - */ - exp?: number; -} - -/** - * Check if a given object implements the CommonBigDecimal interface. - */ -export function instanceOfCommonBigDecimal(value: object): value is CommonBigDecimal { - return true; -} - -export function CommonBigDecimalFromJSON(json: any): CommonBigDecimal { - return CommonBigDecimalFromJSONTyped(json, false); -} - -export function CommonBigDecimalFromJSONTyped(json: any, ignoreDiscriminator: boolean): CommonBigDecimal { - if (json == null) { - return json; +import { CommonBigInteger } from '../models/CommonBigInteger.js'; +import { HttpFile } from '../http/http.js'; + +export class CommonBigDecimal { + 'value'?: CommonBigInteger; + 'exp'?: number; + + static readonly discriminator: string | undefined = undefined; + + static readonly mapping: {[index: string]: string} | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "value", + "baseName": "value", + "type": "CommonBigInteger", + "format": "" + }, + { + "name": "exp", + "baseName": "exp", + "type": "number", + "format": "int32" + } ]; + + static getAttributeTypeMap() { + return CommonBigDecimal.attributeTypeMap; } - return { - - 'value': json['value'] == null ? undefined : CommonBigIntegerFromJSON(json['value']), - 'exp': json['exp'] == null ? undefined : json['exp'], - }; -} - - export function CommonBigDecimalToJSON(json: any): CommonBigDecimal { - return CommonBigDecimalToJSONTyped(json, false); - } - export function CommonBigDecimalToJSONTyped(value?: CommonBigDecimal | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; + public constructor() { } - - return { - - 'value': CommonBigIntegerToJSON(value['value']), - 'exp': value['exp'], - }; } - diff --git a/src/models/CommonBigInteger.ts b/src/models/CommonBigInteger.ts index 7b5b49b..70fc276 100755 --- a/src/models/CommonBigInteger.ts +++ b/src/models/CommonBigInteger.ts @@ -1,10 +1,8 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Sentio API * Sentio Open API for query data * - * The version of the OpenAPI document: version not set + * OpenAPI spec version: version not set * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -12,62 +10,34 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime.js'; -/** - * - * @export - * @interface CommonBigInteger - */ -export interface CommonBigInteger { - /** - * - * @type {boolean} - * @memberof CommonBigInteger - */ - negative?: boolean; - /** - * - * @type {string} - * @memberof CommonBigInteger - */ - data?: string; -} +import { HttpFile } from '../http/http.js'; -/** - * Check if a given object implements the CommonBigInteger interface. - */ -export function instanceOfCommonBigInteger(value: object): value is CommonBigInteger { - return true; -} +export class CommonBigInteger { + 'negative'?: boolean; + 'data'?: string; -export function CommonBigIntegerFromJSON(json: any): CommonBigInteger { - return CommonBigIntegerFromJSONTyped(json, false); -} + static readonly discriminator: string | undefined = undefined; -export function CommonBigIntegerFromJSONTyped(json: any, ignoreDiscriminator: boolean): CommonBigInteger { - if (json == null) { - return json; - } - return { - - 'negative': json['negative'] == null ? undefined : json['negative'], - 'data': json['data'] == null ? undefined : json['data'], - }; -} + static readonly mapping: {[index: string]: string} | undefined = undefined; - export function CommonBigIntegerToJSON(json: any): CommonBigInteger { - return CommonBigIntegerToJSONTyped(json, false); - } + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "negative", + "baseName": "negative", + "type": "boolean", + "format": "" + }, + { + "name": "data", + "baseName": "data", + "type": "string", + "format": "byte" + } ]; - export function CommonBigIntegerToJSONTyped(value?: CommonBigInteger | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; + static getAttributeTypeMap() { + return CommonBigInteger.attributeTypeMap; } - return { - - 'negative': value['negative'], - 'data': value['data'], - }; + public constructor() { + } } - diff --git a/src/models/CommonCachePolicy.ts b/src/models/CommonCachePolicy.ts index 808f990..3251ff8 100755 --- a/src/models/CommonCachePolicy.ts +++ b/src/models/CommonCachePolicy.ts @@ -1,10 +1,8 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Sentio API * Sentio Open API for query data * - * The version of the OpenAPI document: version not set + * OpenAPI spec version: version not set * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -12,78 +10,48 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime.js'; -/** - * - * @export - * @interface CommonCachePolicy - */ -export interface CommonCachePolicy { - /** - * - * @type {number} - * @memberof CommonCachePolicy - */ - cacheTtlSecs?: number; - /** - * - * @type {number} - * @memberof CommonCachePolicy - */ - cacheRefreshTtlSecs?: number; - /** - * - * @type {boolean} - * @memberof CommonCachePolicy - */ - forceRefresh?: boolean; - /** - * - * @type {boolean} - * @memberof CommonCachePolicy - */ - noCache?: boolean; -} - -/** - * Check if a given object implements the CommonCachePolicy interface. - */ -export function instanceOfCommonCachePolicy(value: object): value is CommonCachePolicy { - return true; -} - -export function CommonCachePolicyFromJSON(json: any): CommonCachePolicy { - return CommonCachePolicyFromJSONTyped(json, false); -} - -export function CommonCachePolicyFromJSONTyped(json: any, ignoreDiscriminator: boolean): CommonCachePolicy { - if (json == null) { - return json; +import { HttpFile } from '../http/http.js'; + +export class CommonCachePolicy { + 'cacheTtlSecs'?: number; + 'cacheRefreshTtlSecs'?: number; + 'forceRefresh'?: boolean; + 'noCache'?: boolean; + + static readonly discriminator: string | undefined = undefined; + + static readonly mapping: {[index: string]: string} | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "cacheTtlSecs", + "baseName": "cacheTtlSecs", + "type": "number", + "format": "int32" + }, + { + "name": "cacheRefreshTtlSecs", + "baseName": "cacheRefreshTtlSecs", + "type": "number", + "format": "int32" + }, + { + "name": "forceRefresh", + "baseName": "forceRefresh", + "type": "boolean", + "format": "" + }, + { + "name": "noCache", + "baseName": "noCache", + "type": "boolean", + "format": "" + } ]; + + static getAttributeTypeMap() { + return CommonCachePolicy.attributeTypeMap; } - return { - - 'cacheTtlSecs': json['cacheTtlSecs'] == null ? undefined : json['cacheTtlSecs'], - 'cacheRefreshTtlSecs': json['cacheRefreshTtlSecs'] == null ? undefined : json['cacheRefreshTtlSecs'], - 'forceRefresh': json['forceRefresh'] == null ? undefined : json['forceRefresh'], - 'noCache': json['noCache'] == null ? undefined : json['noCache'], - }; -} - export function CommonCachePolicyToJSON(json: any): CommonCachePolicy { - return CommonCachePolicyToJSONTyped(json, false); - } - - export function CommonCachePolicyToJSONTyped(value?: CommonCachePolicy | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; + public constructor() { } - - return { - - 'cacheTtlSecs': value['cacheTtlSecs'], - 'cacheRefreshTtlSecs': value['cacheRefreshTtlSecs'], - 'forceRefresh': value['forceRefresh'], - 'noCache': value['noCache'], - }; } - diff --git a/src/models/CommonChannel.ts b/src/models/CommonChannel.ts index 96f529d..3b75d5c 100755 --- a/src/models/CommonChannel.ts +++ b/src/models/CommonChannel.ts @@ -1,10 +1,8 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Sentio API * Sentio Open API for query data * - * The version of the OpenAPI document: version not set + * OpenAPI spec version: version not set * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -12,160 +10,114 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime.js'; -import type { CommonChannelType } from './CommonChannelType.js'; -import { - CommonChannelTypeFromJSON, - CommonChannelTypeFromJSONTyped, - CommonChannelTypeToJSON, - CommonChannelTypeToJSONTyped, -} from './CommonChannelType.js'; +import { CommonChannelType } from '../models/CommonChannelType.js'; +import { HttpFile } from '../http/http.js'; -/** - * - * @export - * @interface CommonChannel - */ -export interface CommonChannel { - /** - * - * @type {string} - * @memberof CommonChannel - */ - id?: string; - /** - * - * @type {string} - * @memberof CommonChannel - */ - projectId?: string; - /** - * - * @type {CommonChannelType} - * @memberof CommonChannel - */ - type?: CommonChannelType; - /** - * - * @type {string} - * @memberof CommonChannel - */ - slackWebhookUrl?: string; - /** - * - * @type {string} - * @memberof CommonChannel - */ - emailAddress?: string; - /** - * - * @type {string} - * @memberof CommonChannel - */ - name?: string; - /** - * - * @type {string} - * @memberof CommonChannel - */ - customWebhookUrl?: string; - /** - * - * @type {{ [key: string]: string; }} - * @memberof CommonChannel - */ - customHeaders?: { [key: string]: string; }; - /** - * - * @type {string} - * @memberof CommonChannel - */ - telegramReference?: string; - /** - * - * @type {string} - * @memberof CommonChannel - */ - telegramChatId?: string; - /** - * - * @type {string} - * @memberof CommonChannel - */ - slackTeam?: string; - /** - * - * @type {string} - * @memberof CommonChannel - */ - slackChannel?: string; - /** - * - * @type {object} - * @memberof CommonChannel - */ - pagerdutyConfig?: object; -} +export class CommonChannel { + 'id'?: string; + 'projectId'?: string; + 'type'?: CommonChannelType; + 'slackWebhookUrl'?: string; + 'emailAddress'?: string; + 'name'?: string; + 'customWebhookUrl'?: string; + 'customHeaders'?: { [key: string]: string; }; + 'telegramReference'?: string; + 'telegramChatId'?: string; + 'slackTeam'?: string; + 'slackChannel'?: string; + 'pagerdutyConfig'?: any; + static readonly discriminator: string | undefined = undefined; + static readonly mapping: {[index: string]: string} | undefined = undefined; -/** - * Check if a given object implements the CommonChannel interface. - */ -export function instanceOfCommonChannel(value: object): value is CommonChannel { - return true; -} + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "id", + "baseName": "id", + "type": "string", + "format": "" + }, + { + "name": "projectId", + "baseName": "projectId", + "type": "string", + "format": "" + }, + { + "name": "type", + "baseName": "type", + "type": "CommonChannelType", + "format": "" + }, + { + "name": "slackWebhookUrl", + "baseName": "slackWebhookUrl", + "type": "string", + "format": "" + }, + { + "name": "emailAddress", + "baseName": "emailAddress", + "type": "string", + "format": "" + }, + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + }, + { + "name": "customWebhookUrl", + "baseName": "customWebhookUrl", + "type": "string", + "format": "" + }, + { + "name": "customHeaders", + "baseName": "customHeaders", + "type": "{ [key: string]: string; }", + "format": "" + }, + { + "name": "telegramReference", + "baseName": "telegramReference", + "type": "string", + "format": "" + }, + { + "name": "telegramChatId", + "baseName": "telegramChatId", + "type": "string", + "format": "" + }, + { + "name": "slackTeam", + "baseName": "slackTeam", + "type": "string", + "format": "" + }, + { + "name": "slackChannel", + "baseName": "slackChannel", + "type": "string", + "format": "" + }, + { + "name": "pagerdutyConfig", + "baseName": "pagerdutyConfig", + "type": "any", + "format": "" + } ]; -export function CommonChannelFromJSON(json: any): CommonChannel { - return CommonChannelFromJSONTyped(json, false); -} - -export function CommonChannelFromJSONTyped(json: any, ignoreDiscriminator: boolean): CommonChannel { - if (json == null) { - return json; + static getAttributeTypeMap() { + return CommonChannel.attributeTypeMap; } - return { - - 'id': json['id'] == null ? undefined : json['id'], - 'projectId': json['projectId'] == null ? undefined : json['projectId'], - 'type': json['type'] == null ? undefined : CommonChannelTypeFromJSON(json['type']), - 'slackWebhookUrl': json['slackWebhookUrl'] == null ? undefined : json['slackWebhookUrl'], - 'emailAddress': json['emailAddress'] == null ? undefined : json['emailAddress'], - 'name': json['name'] == null ? undefined : json['name'], - 'customWebhookUrl': json['customWebhookUrl'] == null ? undefined : json['customWebhookUrl'], - 'customHeaders': json['customHeaders'] == null ? undefined : json['customHeaders'], - 'telegramReference': json['telegramReference'] == null ? undefined : json['telegramReference'], - 'telegramChatId': json['telegramChatId'] == null ? undefined : json['telegramChatId'], - 'slackTeam': json['slackTeam'] == null ? undefined : json['slackTeam'], - 'slackChannel': json['slackChannel'] == null ? undefined : json['slackChannel'], - 'pagerdutyConfig': json['pagerdutyConfig'] == null ? undefined : json['pagerdutyConfig'], - }; -} - export function CommonChannelToJSON(json: any): CommonChannel { - return CommonChannelToJSONTyped(json, false); - } - - export function CommonChannelToJSONTyped(value?: CommonChannel | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; + public constructor() { } - - return { - - 'id': value['id'], - 'projectId': value['projectId'], - 'type': CommonChannelTypeToJSON(value['type']), - 'slackWebhookUrl': value['slackWebhookUrl'], - 'emailAddress': value['emailAddress'], - 'name': value['name'], - 'customWebhookUrl': value['customWebhookUrl'], - 'customHeaders': value['customHeaders'], - 'telegramReference': value['telegramReference'], - 'telegramChatId': value['telegramChatId'], - 'slackTeam': value['slackTeam'], - 'slackChannel': value['slackChannel'], - 'pagerdutyConfig': value['pagerdutyConfig'], - }; } + diff --git a/src/models/CommonChannelType.ts b/src/models/CommonChannelType.ts index 0dc345b..774df5c 100755 --- a/src/models/CommonChannelType.ts +++ b/src/models/CommonChannelType.ts @@ -1,10 +1,8 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Sentio API * Sentio Open API for query data * - * The version of the OpenAPI document: version not set + * OpenAPI spec version: version not set * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -12,47 +10,14 @@ * Do not edit the class manually. */ +import { HttpFile } from '../http/http.js'; -/** - * - * @export - */ -export const CommonChannelType = { - Unknown: 'UNKNOWN', - Email: 'EMAIL', - Slack: 'SLACK', - Telegram: 'TELEGRAM', - Webhook: 'WEBHOOK', - Discord: 'DISCORD', - Pagerduty: 'PAGERDUTY' -} as const; -export type CommonChannelType = typeof CommonChannelType[keyof typeof CommonChannelType]; - - -export function instanceOfCommonChannelType(value: any): boolean { - for (const key in CommonChannelType) { - if (Object.prototype.hasOwnProperty.call(CommonChannelType, key)) { - if (CommonChannelType[key as keyof typeof CommonChannelType] === value) { - return true; - } - } - } - return false; -} - -export function CommonChannelTypeFromJSON(json: any): CommonChannelType { - return CommonChannelTypeFromJSONTyped(json, false); +export enum CommonChannelType { + Unknown = 'UNKNOWN', + Email = 'EMAIL', + Slack = 'SLACK', + Telegram = 'TELEGRAM', + Webhook = 'WEBHOOK', + Discord = 'DISCORD', + Pagerduty = 'PAGERDUTY' } - -export function CommonChannelTypeFromJSONTyped(json: any, ignoreDiscriminator: boolean): CommonChannelType { - return json as CommonChannelType; -} - -export function CommonChannelTypeToJSON(value?: CommonChannelType | null): any { - return value as any; -} - -export function CommonChannelTypeToJSONTyped(value: any, ignoreDiscriminator: boolean): CommonChannelType { - return value as CommonChannelType; -} - diff --git a/src/models/CommonCohortsFilter.ts b/src/models/CommonCohortsFilter.ts index a3985fd..52ef5ab 100755 --- a/src/models/CommonCohortsFilter.ts +++ b/src/models/CommonCohortsFilter.ts @@ -1,10 +1,8 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Sentio API * Sentio Open API for query data * - * The version of the OpenAPI document: version not set + * OpenAPI spec version: version not set * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -12,108 +10,58 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime.js'; -import type { CommonSelectorExpr } from './CommonSelectorExpr.js'; -import { - CommonSelectorExprFromJSON, - CommonSelectorExprFromJSONTyped, - CommonSelectorExprToJSON, - CommonSelectorExprToJSONTyped, -} from './CommonSelectorExpr.js'; -import type { CommonCohortsFilterAggregation } from './CommonCohortsFilterAggregation.js'; -import { - CommonCohortsFilterAggregationFromJSON, - CommonCohortsFilterAggregationFromJSONTyped, - CommonCohortsFilterAggregationToJSON, - CommonCohortsFilterAggregationToJSONTyped, -} from './CommonCohortsFilterAggregation.js'; -import type { CommonTimeRangeLite } from './CommonTimeRangeLite.js'; -import { - CommonTimeRangeLiteFromJSON, - CommonTimeRangeLiteFromJSONTyped, - CommonTimeRangeLiteToJSON, - CommonTimeRangeLiteToJSONTyped, -} from './CommonTimeRangeLite.js'; +import { CommonCohortsFilterAggregation } from '../models/CommonCohortsFilterAggregation.js'; +import { CommonSelectorExpr } from '../models/CommonSelectorExpr.js'; +import { CommonTimeRangeLite } from '../models/CommonTimeRangeLite.js'; +import { HttpFile } from '../http/http.js'; -/** - * - * @export - * @interface CommonCohortsFilter - */ -export interface CommonCohortsFilter { - /** - * - * @type {boolean} - * @memberof CommonCohortsFilter - */ - symbol?: boolean; - /** - * - * @type {string} - * @memberof CommonCohortsFilter - */ - name?: string; - /** - * - * @type {CommonCohortsFilterAggregation} - * @memberof CommonCohortsFilter - */ - aggregation?: CommonCohortsFilterAggregation; - /** - * - * @type {CommonSelectorExpr} - * @memberof CommonCohortsFilter - */ - selectorExpr?: CommonSelectorExpr; - /** - * - * @type {CommonTimeRangeLite} - * @memberof CommonCohortsFilter - */ - timeRange?: CommonTimeRangeLite; -} +export class CommonCohortsFilter { + 'symbol'?: boolean; + 'name'?: string; + 'aggregation'?: CommonCohortsFilterAggregation; + 'selectorExpr'?: CommonSelectorExpr; + 'timeRange'?: CommonTimeRangeLite; -/** - * Check if a given object implements the CommonCohortsFilter interface. - */ -export function instanceOfCommonCohortsFilter(value: object): value is CommonCohortsFilter { - return true; -} + static readonly discriminator: string | undefined = undefined; -export function CommonCohortsFilterFromJSON(json: any): CommonCohortsFilter { - return CommonCohortsFilterFromJSONTyped(json, false); -} - -export function CommonCohortsFilterFromJSONTyped(json: any, ignoreDiscriminator: boolean): CommonCohortsFilter { - if (json == null) { - return json; - } - return { - - 'symbol': json['symbol'] == null ? undefined : json['symbol'], - 'name': json['name'] == null ? undefined : json['name'], - 'aggregation': json['aggregation'] == null ? undefined : CommonCohortsFilterAggregationFromJSON(json['aggregation']), - 'selectorExpr': json['selectorExpr'] == null ? undefined : CommonSelectorExprFromJSON(json['selectorExpr']), - 'timeRange': json['timeRange'] == null ? undefined : CommonTimeRangeLiteFromJSON(json['timeRange']), - }; -} + static readonly mapping: {[index: string]: string} | undefined = undefined; - export function CommonCohortsFilterToJSON(json: any): CommonCohortsFilter { - return CommonCohortsFilterToJSONTyped(json, false); - } + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "symbol", + "baseName": "symbol", + "type": "boolean", + "format": "" + }, + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + }, + { + "name": "aggregation", + "baseName": "aggregation", + "type": "CommonCohortsFilterAggregation", + "format": "" + }, + { + "name": "selectorExpr", + "baseName": "selectorExpr", + "type": "CommonSelectorExpr", + "format": "" + }, + { + "name": "timeRange", + "baseName": "timeRange", + "type": "CommonTimeRangeLite", + "format": "" + } ]; - export function CommonCohortsFilterToJSONTyped(value?: CommonCohortsFilter | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; + static getAttributeTypeMap() { + return CommonCohortsFilter.attributeTypeMap; } - return { - - 'symbol': value['symbol'], - 'name': value['name'], - 'aggregation': CommonCohortsFilterAggregationToJSON(value['aggregation']), - 'selectorExpr': CommonSelectorExprToJSON(value['selectorExpr']), - 'timeRange': CommonTimeRangeLiteToJSON(value['timeRange']), - }; + public constructor() { + } } - diff --git a/src/models/CommonCohortsFilterAggregation.ts b/src/models/CommonCohortsFilterAggregation.ts index 979b894..387e95e 100755 --- a/src/models/CommonCohortsFilterAggregation.ts +++ b/src/models/CommonCohortsFilterAggregation.ts @@ -1,10 +1,8 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Sentio API * Sentio Open API for query data * - * The version of the OpenAPI document: version not set + * OpenAPI spec version: version not set * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -12,102 +10,53 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime.js'; -import type { CommonAny } from './CommonAny.js'; -import { - CommonAnyFromJSON, - CommonAnyFromJSONTyped, - CommonAnyToJSON, - CommonAnyToJSONTyped, -} from './CommonAny.js'; -import type { CommonCohortsFilterAggregationAggregateProperties } from './CommonCohortsFilterAggregationAggregateProperties.js'; -import { - CommonCohortsFilterAggregationAggregatePropertiesFromJSON, - CommonCohortsFilterAggregationAggregatePropertiesFromJSONTyped, - CommonCohortsFilterAggregationAggregatePropertiesToJSON, - CommonCohortsFilterAggregationAggregatePropertiesToJSONTyped, -} from './CommonCohortsFilterAggregationAggregateProperties.js'; -import type { CommonCohortsFilterAggregationOperatorType } from './CommonCohortsFilterAggregationOperatorType.js'; -import { - CommonCohortsFilterAggregationOperatorTypeFromJSON, - CommonCohortsFilterAggregationOperatorTypeFromJSONTyped, - CommonCohortsFilterAggregationOperatorTypeToJSON, - CommonCohortsFilterAggregationOperatorTypeToJSONTyped, -} from './CommonCohortsFilterAggregationOperatorType.js'; - -/** - * - * @export - * @interface CommonCohortsFilterAggregation - */ -export interface CommonCohortsFilterAggregation { - /** - * - * @type {object} - * @memberof CommonCohortsFilterAggregation - */ - total?: object; - /** - * - * @type {CommonCohortsFilterAggregationAggregateProperties} - * @memberof CommonCohortsFilterAggregation - */ - aggregateProperties?: CommonCohortsFilterAggregationAggregateProperties; - /** - * - * @type {CommonCohortsFilterAggregationOperatorType} - * @memberof CommonCohortsFilterAggregation - */ - operator?: CommonCohortsFilterAggregationOperatorType; - /** - * - * @type {Array} - * @memberof CommonCohortsFilterAggregation - */ - value?: Array; -} - - - -/** - * Check if a given object implements the CommonCohortsFilterAggregation interface. - */ -export function instanceOfCommonCohortsFilterAggregation(value: object): value is CommonCohortsFilterAggregation { - return true; -} - -export function CommonCohortsFilterAggregationFromJSON(json: any): CommonCohortsFilterAggregation { - return CommonCohortsFilterAggregationFromJSONTyped(json, false); -} - -export function CommonCohortsFilterAggregationFromJSONTyped(json: any, ignoreDiscriminator: boolean): CommonCohortsFilterAggregation { - if (json == null) { - return json; +import { CommonAny } from '../models/CommonAny.js'; +import { CommonCohortsFilterAggregationAggregateProperties } from '../models/CommonCohortsFilterAggregationAggregateProperties.js'; +import { CommonCohortsFilterAggregationOperatorType } from '../models/CommonCohortsFilterAggregationOperatorType.js'; +import { HttpFile } from '../http/http.js'; + +export class CommonCohortsFilterAggregation { + 'total'?: any; + 'aggregateProperties'?: CommonCohortsFilterAggregationAggregateProperties; + 'operator'?: CommonCohortsFilterAggregationOperatorType; + 'value'?: Array; + + static readonly discriminator: string | undefined = undefined; + + static readonly mapping: {[index: string]: string} | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "total", + "baseName": "total", + "type": "any", + "format": "" + }, + { + "name": "aggregateProperties", + "baseName": "aggregateProperties", + "type": "CommonCohortsFilterAggregationAggregateProperties", + "format": "" + }, + { + "name": "operator", + "baseName": "operator", + "type": "CommonCohortsFilterAggregationOperatorType", + "format": "" + }, + { + "name": "value", + "baseName": "value", + "type": "Array", + "format": "" + } ]; + + static getAttributeTypeMap() { + return CommonCohortsFilterAggregation.attributeTypeMap; } - return { - - 'total': json['total'] == null ? undefined : json['total'], - 'aggregateProperties': json['aggregateProperties'] == null ? undefined : CommonCohortsFilterAggregationAggregatePropertiesFromJSON(json['aggregateProperties']), - 'operator': json['operator'] == null ? undefined : CommonCohortsFilterAggregationOperatorTypeFromJSON(json['operator']), - 'value': json['value'] == null ? undefined : ((json['value'] as Array).map(CommonAnyFromJSON)), - }; -} - - export function CommonCohortsFilterAggregationToJSON(json: any): CommonCohortsFilterAggregation { - return CommonCohortsFilterAggregationToJSONTyped(json, false); - } - export function CommonCohortsFilterAggregationToJSONTyped(value?: CommonCohortsFilterAggregation | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; + public constructor() { } - - return { - - 'total': value['total'], - 'aggregateProperties': CommonCohortsFilterAggregationAggregatePropertiesToJSON(value['aggregateProperties']), - 'operator': CommonCohortsFilterAggregationOperatorTypeToJSON(value['operator']), - 'value': value['value'] == null ? undefined : ((value['value'] as Array).map(CommonAnyToJSON)), - }; } + diff --git a/src/models/CommonCohortsFilterAggregationAggregateProperties.ts b/src/models/CommonCohortsFilterAggregationAggregateProperties.ts index fc91c4a..ee1de50 100755 --- a/src/models/CommonCohortsFilterAggregationAggregateProperties.ts +++ b/src/models/CommonCohortsFilterAggregationAggregateProperties.ts @@ -1,10 +1,8 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Sentio API * Sentio Open API for query data * - * The version of the OpenAPI document: version not set + * OpenAPI spec version: version not set * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -12,72 +10,37 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime.js'; -import type { CommonCohortsFilterAggregationAggregatePropertiesAggregationType } from './CommonCohortsFilterAggregationAggregatePropertiesAggregationType.js'; -import { - CommonCohortsFilterAggregationAggregatePropertiesAggregationTypeFromJSON, - CommonCohortsFilterAggregationAggregatePropertiesAggregationTypeFromJSONTyped, - CommonCohortsFilterAggregationAggregatePropertiesAggregationTypeToJSON, - CommonCohortsFilterAggregationAggregatePropertiesAggregationTypeToJSONTyped, -} from './CommonCohortsFilterAggregationAggregatePropertiesAggregationType.js'; - -/** - * - * @export - * @interface CommonCohortsFilterAggregationAggregateProperties - */ -export interface CommonCohortsFilterAggregationAggregateProperties { - /** - * - * @type {CommonCohortsFilterAggregationAggregatePropertiesAggregationType} - * @memberof CommonCohortsFilterAggregationAggregateProperties - */ - type?: CommonCohortsFilterAggregationAggregatePropertiesAggregationType; - /** - * - * @type {string} - * @memberof CommonCohortsFilterAggregationAggregateProperties - */ - propertyName?: string; -} - - - -/** - * Check if a given object implements the CommonCohortsFilterAggregationAggregateProperties interface. - */ -export function instanceOfCommonCohortsFilterAggregationAggregateProperties(value: object): value is CommonCohortsFilterAggregationAggregateProperties { - return true; -} - -export function CommonCohortsFilterAggregationAggregatePropertiesFromJSON(json: any): CommonCohortsFilterAggregationAggregateProperties { - return CommonCohortsFilterAggregationAggregatePropertiesFromJSONTyped(json, false); -} - -export function CommonCohortsFilterAggregationAggregatePropertiesFromJSONTyped(json: any, ignoreDiscriminator: boolean): CommonCohortsFilterAggregationAggregateProperties { - if (json == null) { - return json; +import { CommonCohortsFilterAggregationAggregatePropertiesAggregationType } from '../models/CommonCohortsFilterAggregationAggregatePropertiesAggregationType.js'; +import { HttpFile } from '../http/http.js'; + +export class CommonCohortsFilterAggregationAggregateProperties { + 'type'?: CommonCohortsFilterAggregationAggregatePropertiesAggregationType; + 'propertyName'?: string; + + static readonly discriminator: string | undefined = undefined; + + static readonly mapping: {[index: string]: string} | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "type", + "baseName": "type", + "type": "CommonCohortsFilterAggregationAggregatePropertiesAggregationType", + "format": "" + }, + { + "name": "propertyName", + "baseName": "propertyName", + "type": "string", + "format": "" + } ]; + + static getAttributeTypeMap() { + return CommonCohortsFilterAggregationAggregateProperties.attributeTypeMap; } - return { - - 'type': json['type'] == null ? undefined : CommonCohortsFilterAggregationAggregatePropertiesAggregationTypeFromJSON(json['type']), - 'propertyName': json['propertyName'] == null ? undefined : json['propertyName'], - }; -} - - export function CommonCohortsFilterAggregationAggregatePropertiesToJSON(json: any): CommonCohortsFilterAggregationAggregateProperties { - return CommonCohortsFilterAggregationAggregatePropertiesToJSONTyped(json, false); - } - export function CommonCohortsFilterAggregationAggregatePropertiesToJSONTyped(value?: CommonCohortsFilterAggregationAggregateProperties | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; + public constructor() { } - - return { - - 'type': CommonCohortsFilterAggregationAggregatePropertiesAggregationTypeToJSON(value['type']), - 'propertyName': value['propertyName'], - }; } + diff --git a/src/models/CommonCohortsFilterAggregationAggregatePropertiesAggregationType.ts b/src/models/CommonCohortsFilterAggregationAggregatePropertiesAggregationType.ts index 79d4616..63d91ac 100755 --- a/src/models/CommonCohortsFilterAggregationAggregatePropertiesAggregationType.ts +++ b/src/models/CommonCohortsFilterAggregationAggregatePropertiesAggregationType.ts @@ -1,10 +1,8 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Sentio API * Sentio Open API for query data * - * The version of the OpenAPI document: version not set + * OpenAPI spec version: version not set * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -12,48 +10,15 @@ * Do not edit the class manually. */ - -/** - * - * @export - */ -export const CommonCohortsFilterAggregationAggregatePropertiesAggregationType = { - Sum: 'SUM', - Avg: 'AVG', - Median: 'MEDIAN', - Min: 'MIN', - Max: 'MAX', - DistinctCount: 'DISTINCT_COUNT', - Last: 'LAST', - First: 'FIRST' -} as const; -export type CommonCohortsFilterAggregationAggregatePropertiesAggregationType = typeof CommonCohortsFilterAggregationAggregatePropertiesAggregationType[keyof typeof CommonCohortsFilterAggregationAggregatePropertiesAggregationType]; - - -export function instanceOfCommonCohortsFilterAggregationAggregatePropertiesAggregationType(value: any): boolean { - for (const key in CommonCohortsFilterAggregationAggregatePropertiesAggregationType) { - if (Object.prototype.hasOwnProperty.call(CommonCohortsFilterAggregationAggregatePropertiesAggregationType, key)) { - if (CommonCohortsFilterAggregationAggregatePropertiesAggregationType[key as keyof typeof CommonCohortsFilterAggregationAggregatePropertiesAggregationType] === value) { - return true; - } - } - } - return false; -} - -export function CommonCohortsFilterAggregationAggregatePropertiesAggregationTypeFromJSON(json: any): CommonCohortsFilterAggregationAggregatePropertiesAggregationType { - return CommonCohortsFilterAggregationAggregatePropertiesAggregationTypeFromJSONTyped(json, false); +import { HttpFile } from '../http/http.js'; + +export enum CommonCohortsFilterAggregationAggregatePropertiesAggregationType { + Sum = 'SUM', + Avg = 'AVG', + Median = 'MEDIAN', + Min = 'MIN', + Max = 'MAX', + DistinctCount = 'DISTINCT_COUNT', + Last = 'LAST', + First = 'FIRST' } - -export function CommonCohortsFilterAggregationAggregatePropertiesAggregationTypeFromJSONTyped(json: any, ignoreDiscriminator: boolean): CommonCohortsFilterAggregationAggregatePropertiesAggregationType { - return json as CommonCohortsFilterAggregationAggregatePropertiesAggregationType; -} - -export function CommonCohortsFilterAggregationAggregatePropertiesAggregationTypeToJSON(value?: CommonCohortsFilterAggregationAggregatePropertiesAggregationType | null): any { - return value as any; -} - -export function CommonCohortsFilterAggregationAggregatePropertiesAggregationTypeToJSONTyped(value: any, ignoreDiscriminator: boolean): CommonCohortsFilterAggregationAggregatePropertiesAggregationType { - return value as CommonCohortsFilterAggregationAggregatePropertiesAggregationType; -} - diff --git a/src/models/CommonCohortsFilterAggregationOperatorType.ts b/src/models/CommonCohortsFilterAggregationOperatorType.ts index 3e36781..66a3138 100755 --- a/src/models/CommonCohortsFilterAggregationOperatorType.ts +++ b/src/models/CommonCohortsFilterAggregationOperatorType.ts @@ -1,10 +1,8 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Sentio API * Sentio Open API for query data * - * The version of the OpenAPI document: version not set + * OpenAPI spec version: version not set * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -12,48 +10,15 @@ * Do not edit the class manually. */ - -/** - * - * @export - */ -export const CommonCohortsFilterAggregationOperatorType = { - Eq: 'EQ', - Neq: 'NEQ', - Gt: 'GT', - Gte: 'GTE', - Lt: 'LT', - Lte: 'LTE', - Between: 'BETWEEN', - NotBetween: 'NOT_BETWEEN' -} as const; -export type CommonCohortsFilterAggregationOperatorType = typeof CommonCohortsFilterAggregationOperatorType[keyof typeof CommonCohortsFilterAggregationOperatorType]; - - -export function instanceOfCommonCohortsFilterAggregationOperatorType(value: any): boolean { - for (const key in CommonCohortsFilterAggregationOperatorType) { - if (Object.prototype.hasOwnProperty.call(CommonCohortsFilterAggregationOperatorType, key)) { - if (CommonCohortsFilterAggregationOperatorType[key as keyof typeof CommonCohortsFilterAggregationOperatorType] === value) { - return true; - } - } - } - return false; -} - -export function CommonCohortsFilterAggregationOperatorTypeFromJSON(json: any): CommonCohortsFilterAggregationOperatorType { - return CommonCohortsFilterAggregationOperatorTypeFromJSONTyped(json, false); +import { HttpFile } from '../http/http.js'; + +export enum CommonCohortsFilterAggregationOperatorType { + Eq = 'EQ', + Neq = 'NEQ', + Gt = 'GT', + Gte = 'GTE', + Lt = 'LT', + Lte = 'LTE', + Between = 'BETWEEN', + NotBetween = 'NOT_BETWEEN' } - -export function CommonCohortsFilterAggregationOperatorTypeFromJSONTyped(json: any, ignoreDiscriminator: boolean): CommonCohortsFilterAggregationOperatorType { - return json as CommonCohortsFilterAggregationOperatorType; -} - -export function CommonCohortsFilterAggregationOperatorTypeToJSON(value?: CommonCohortsFilterAggregationOperatorType | null): any { - return value as any; -} - -export function CommonCohortsFilterAggregationOperatorTypeToJSONTyped(value: any, ignoreDiscriminator: boolean): CommonCohortsFilterAggregationOperatorType { - return value as CommonCohortsFilterAggregationOperatorType; -} - diff --git a/src/models/CommonCohortsGroup.ts b/src/models/CommonCohortsGroup.ts index fd6e130..63936e1 100755 --- a/src/models/CommonCohortsGroup.ts +++ b/src/models/CommonCohortsGroup.ts @@ -1,10 +1,8 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Sentio API * Sentio Open API for query data * - * The version of the OpenAPI document: version not set + * OpenAPI spec version: version not set * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -12,79 +10,38 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime.js'; -import type { CommonJoinOperator } from './CommonJoinOperator.js'; -import { - CommonJoinOperatorFromJSON, - CommonJoinOperatorFromJSONTyped, - CommonJoinOperatorToJSON, - CommonJoinOperatorToJSONTyped, -} from './CommonJoinOperator.js'; -import type { CommonCohortsFilter } from './CommonCohortsFilter.js'; -import { - CommonCohortsFilterFromJSON, - CommonCohortsFilterFromJSONTyped, - CommonCohortsFilterToJSON, - CommonCohortsFilterToJSONTyped, -} from './CommonCohortsFilter.js'; - -/** - * - * @export - * @interface CommonCohortsGroup - */ -export interface CommonCohortsGroup { - /** - * - * @type {CommonJoinOperator} - * @memberof CommonCohortsGroup - */ - joinOperator?: CommonJoinOperator; - /** - * - * @type {Array} - * @memberof CommonCohortsGroup - */ - filters?: Array; -} - - - -/** - * Check if a given object implements the CommonCohortsGroup interface. - */ -export function instanceOfCommonCohortsGroup(value: object): value is CommonCohortsGroup { - return true; -} - -export function CommonCohortsGroupFromJSON(json: any): CommonCohortsGroup { - return CommonCohortsGroupFromJSONTyped(json, false); -} - -export function CommonCohortsGroupFromJSONTyped(json: any, ignoreDiscriminator: boolean): CommonCohortsGroup { - if (json == null) { - return json; +import { CommonCohortsFilter } from '../models/CommonCohortsFilter.js'; +import { CommonJoinOperator } from '../models/CommonJoinOperator.js'; +import { HttpFile } from '../http/http.js'; + +export class CommonCohortsGroup { + 'joinOperator'?: CommonJoinOperator; + 'filters'?: Array; + + static readonly discriminator: string | undefined = undefined; + + static readonly mapping: {[index: string]: string} | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "joinOperator", + "baseName": "joinOperator", + "type": "CommonJoinOperator", + "format": "" + }, + { + "name": "filters", + "baseName": "filters", + "type": "Array", + "format": "" + } ]; + + static getAttributeTypeMap() { + return CommonCohortsGroup.attributeTypeMap; } - return { - - 'joinOperator': json['joinOperator'] == null ? undefined : CommonJoinOperatorFromJSON(json['joinOperator']), - 'filters': json['filters'] == null ? undefined : ((json['filters'] as Array).map(CommonCohortsFilterFromJSON)), - }; -} - - export function CommonCohortsGroupToJSON(json: any): CommonCohortsGroup { - return CommonCohortsGroupToJSONTyped(json, false); - } - export function CommonCohortsGroupToJSONTyped(value?: CommonCohortsGroup | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; + public constructor() { } - - return { - - 'joinOperator': CommonJoinOperatorToJSON(value['joinOperator']), - 'filters': value['filters'] == null ? undefined : ((value['filters'] as Array).map(CommonCohortsFilterToJSON)), - }; } + diff --git a/src/models/CommonCohortsQuery.ts b/src/models/CommonCohortsQuery.ts index 26d8646..037e28f 100755 --- a/src/models/CommonCohortsQuery.ts +++ b/src/models/CommonCohortsQuery.ts @@ -1,10 +1,8 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Sentio API * Sentio Open API for query data * - * The version of the OpenAPI document: version not set + * OpenAPI spec version: version not set * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -12,95 +10,52 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime.js'; -import type { CommonJoinOperator } from './CommonJoinOperator.js'; -import { - CommonJoinOperatorFromJSON, - CommonJoinOperatorFromJSONTyped, - CommonJoinOperatorToJSON, - CommonJoinOperatorToJSONTyped, -} from './CommonJoinOperator.js'; -import type { CommonCohortsGroup } from './CommonCohortsGroup.js'; -import { - CommonCohortsGroupFromJSON, - CommonCohortsGroupFromJSONTyped, - CommonCohortsGroupToJSON, - CommonCohortsGroupToJSONTyped, -} from './CommonCohortsGroup.js'; - -/** - * - * @export - * @interface CommonCohortsQuery - */ -export interface CommonCohortsQuery { - /** - * - * @type {CommonJoinOperator} - * @memberof CommonCohortsQuery - */ - joinOperator?: CommonJoinOperator; - /** - * - * @type {Array} - * @memberof CommonCohortsQuery - */ - groups?: Array; - /** - * - * @type {string} - * @memberof CommonCohortsQuery - */ - name?: string; - /** - * - * @type {string} - * @memberof CommonCohortsQuery - */ - id?: string; -} - - - -/** - * Check if a given object implements the CommonCohortsQuery interface. - */ -export function instanceOfCommonCohortsQuery(value: object): value is CommonCohortsQuery { - return true; -} - -export function CommonCohortsQueryFromJSON(json: any): CommonCohortsQuery { - return CommonCohortsQueryFromJSONTyped(json, false); -} - -export function CommonCohortsQueryFromJSONTyped(json: any, ignoreDiscriminator: boolean): CommonCohortsQuery { - if (json == null) { - return json; +import { CommonCohortsGroup } from '../models/CommonCohortsGroup.js'; +import { CommonJoinOperator } from '../models/CommonJoinOperator.js'; +import { HttpFile } from '../http/http.js'; + +export class CommonCohortsQuery { + 'joinOperator'?: CommonJoinOperator; + 'groups'?: Array; + 'name'?: string; + 'id'?: string; + + static readonly discriminator: string | undefined = undefined; + + static readonly mapping: {[index: string]: string} | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "joinOperator", + "baseName": "joinOperator", + "type": "CommonJoinOperator", + "format": "" + }, + { + "name": "groups", + "baseName": "groups", + "type": "Array", + "format": "" + }, + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + }, + { + "name": "id", + "baseName": "id", + "type": "string", + "format": "" + } ]; + + static getAttributeTypeMap() { + return CommonCohortsQuery.attributeTypeMap; } - return { - - 'joinOperator': json['joinOperator'] == null ? undefined : CommonJoinOperatorFromJSON(json['joinOperator']), - 'groups': json['groups'] == null ? undefined : ((json['groups'] as Array).map(CommonCohortsGroupFromJSON)), - 'name': json['name'] == null ? undefined : json['name'], - 'id': json['id'] == null ? undefined : json['id'], - }; -} - - export function CommonCohortsQueryToJSON(json: any): CommonCohortsQuery { - return CommonCohortsQueryToJSONTyped(json, false); - } - export function CommonCohortsQueryToJSONTyped(value?: CommonCohortsQuery | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; + public constructor() { } - - return { - - 'joinOperator': CommonJoinOperatorToJSON(value['joinOperator']), - 'groups': value['groups'] == null ? undefined : ((value['groups'] as Array).map(CommonCohortsGroupToJSON)), - 'name': value['name'], - 'id': value['id'], - }; } + diff --git a/src/models/CommonCoinID.ts b/src/models/CommonCoinID.ts index 4b05c00..0252245 100755 --- a/src/models/CommonCoinID.ts +++ b/src/models/CommonCoinID.ts @@ -1,10 +1,8 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Sentio API * Sentio Open API for query data * - * The version of the OpenAPI document: version not set + * OpenAPI spec version: version not set * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -12,70 +10,35 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime.js'; -import type { CommonCoinIDAddressIdentifier } from './CommonCoinIDAddressIdentifier.js'; -import { - CommonCoinIDAddressIdentifierFromJSON, - CommonCoinIDAddressIdentifierFromJSONTyped, - CommonCoinIDAddressIdentifierToJSON, - CommonCoinIDAddressIdentifierToJSONTyped, -} from './CommonCoinIDAddressIdentifier.js'; - -/** - * - * @export - * @interface CommonCoinID - */ -export interface CommonCoinID { - /** - * - * @type {string} - * @memberof CommonCoinID - */ - symbol?: string; - /** - * - * @type {CommonCoinIDAddressIdentifier} - * @memberof CommonCoinID - */ - address?: CommonCoinIDAddressIdentifier; -} - -/** - * Check if a given object implements the CommonCoinID interface. - */ -export function instanceOfCommonCoinID(value: object): value is CommonCoinID { - return true; -} - -export function CommonCoinIDFromJSON(json: any): CommonCoinID { - return CommonCoinIDFromJSONTyped(json, false); -} - -export function CommonCoinIDFromJSONTyped(json: any, ignoreDiscriminator: boolean): CommonCoinID { - if (json == null) { - return json; +import { CommonCoinIDAddressIdentifier } from '../models/CommonCoinIDAddressIdentifier.js'; +import { HttpFile } from '../http/http.js'; + +export class CommonCoinID { + 'symbol'?: string; + 'address'?: CommonCoinIDAddressIdentifier; + + static readonly discriminator: string | undefined = undefined; + + static readonly mapping: {[index: string]: string} | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "symbol", + "baseName": "symbol", + "type": "string", + "format": "" + }, + { + "name": "address", + "baseName": "address", + "type": "CommonCoinIDAddressIdentifier", + "format": "" + } ]; + + static getAttributeTypeMap() { + return CommonCoinID.attributeTypeMap; } - return { - - 'symbol': json['symbol'] == null ? undefined : json['symbol'], - 'address': json['address'] == null ? undefined : CommonCoinIDAddressIdentifierFromJSON(json['address']), - }; -} - - export function CommonCoinIDToJSON(json: any): CommonCoinID { - return CommonCoinIDToJSONTyped(json, false); - } - export function CommonCoinIDToJSONTyped(value?: CommonCoinID | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; + public constructor() { } - - return { - - 'symbol': value['symbol'], - 'address': CommonCoinIDAddressIdentifierToJSON(value['address']), - }; } - diff --git a/src/models/CommonCoinIDAddressIdentifier.ts b/src/models/CommonCoinIDAddressIdentifier.ts index 13d1649..0fa2709 100755 --- a/src/models/CommonCoinIDAddressIdentifier.ts +++ b/src/models/CommonCoinIDAddressIdentifier.ts @@ -1,10 +1,8 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Sentio API * Sentio Open API for query data * - * The version of the OpenAPI document: version not set + * OpenAPI spec version: version not set * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -12,62 +10,34 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime.js'; -/** - * - * @export - * @interface CommonCoinIDAddressIdentifier - */ -export interface CommonCoinIDAddressIdentifier { - /** - * - * @type {string} - * @memberof CommonCoinIDAddressIdentifier - */ - address?: string; - /** - * - * @type {string} - * @memberof CommonCoinIDAddressIdentifier - */ - chain?: string; -} +import { HttpFile } from '../http/http.js'; -/** - * Check if a given object implements the CommonCoinIDAddressIdentifier interface. - */ -export function instanceOfCommonCoinIDAddressIdentifier(value: object): value is CommonCoinIDAddressIdentifier { - return true; -} +export class CommonCoinIDAddressIdentifier { + 'address'?: string; + 'chain'?: string; -export function CommonCoinIDAddressIdentifierFromJSON(json: any): CommonCoinIDAddressIdentifier { - return CommonCoinIDAddressIdentifierFromJSONTyped(json, false); -} + static readonly discriminator: string | undefined = undefined; -export function CommonCoinIDAddressIdentifierFromJSONTyped(json: any, ignoreDiscriminator: boolean): CommonCoinIDAddressIdentifier { - if (json == null) { - return json; - } - return { - - 'address': json['address'] == null ? undefined : json['address'], - 'chain': json['chain'] == null ? undefined : json['chain'], - }; -} + static readonly mapping: {[index: string]: string} | undefined = undefined; - export function CommonCoinIDAddressIdentifierToJSON(json: any): CommonCoinIDAddressIdentifier { - return CommonCoinIDAddressIdentifierToJSONTyped(json, false); - } + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "address", + "baseName": "address", + "type": "string", + "format": "" + }, + { + "name": "chain", + "baseName": "chain", + "type": "string", + "format": "" + } ]; - export function CommonCoinIDAddressIdentifierToJSONTyped(value?: CommonCoinIDAddressIdentifier | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; + static getAttributeTypeMap() { + return CommonCoinIDAddressIdentifier.attributeTypeMap; } - return { - - 'address': value['address'], - 'chain': value['chain'], - }; + public constructor() { + } } - diff --git a/src/models/CommonColumnState.ts b/src/models/CommonColumnState.ts index 57c43ef..b77b723 100755 --- a/src/models/CommonColumnState.ts +++ b/src/models/CommonColumnState.ts @@ -1,10 +1,8 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Sentio API * Sentio Open API for query data * - * The version of the OpenAPI document: version not set + * OpenAPI spec version: version not set * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -12,86 +10,49 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime.js'; -import type { CommonColumnStateSort } from './CommonColumnStateSort.js'; -import { - CommonColumnStateSortFromJSON, - CommonColumnStateSortFromJSONTyped, - CommonColumnStateSortToJSON, - CommonColumnStateSortToJSONTyped, -} from './CommonColumnStateSort.js'; - -/** - * - * @export - * @interface CommonColumnState - */ -export interface CommonColumnState { - /** - * - * @type {{ [key: string]: number; }} - * @memberof CommonColumnState - */ - columnSizing?: { [key: string]: number; }; - /** - * - * @type {{ [key: string]: boolean; }} - * @memberof CommonColumnState - */ - columnVisibility?: { [key: string]: boolean; }; - /** - * - * @type {Array} - * @memberof CommonColumnState - */ - columnOrder?: Array; - /** - * - * @type {Array} - * @memberof CommonColumnState - */ - sorting?: Array; -} - -/** - * Check if a given object implements the CommonColumnState interface. - */ -export function instanceOfCommonColumnState(value: object): value is CommonColumnState { - return true; -} - -export function CommonColumnStateFromJSON(json: any): CommonColumnState { - return CommonColumnStateFromJSONTyped(json, false); -} - -export function CommonColumnStateFromJSONTyped(json: any, ignoreDiscriminator: boolean): CommonColumnState { - if (json == null) { - return json; +import { CommonColumnStateSort } from '../models/CommonColumnStateSort.js'; +import { HttpFile } from '../http/http.js'; + +export class CommonColumnState { + 'columnSizing'?: { [key: string]: number; }; + 'columnVisibility'?: { [key: string]: boolean; }; + 'columnOrder'?: Array; + 'sorting'?: Array; + + static readonly discriminator: string | undefined = undefined; + + static readonly mapping: {[index: string]: string} | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "columnSizing", + "baseName": "columnSizing", + "type": "{ [key: string]: number; }", + "format": "int32" + }, + { + "name": "columnVisibility", + "baseName": "columnVisibility", + "type": "{ [key: string]: boolean; }", + "format": "" + }, + { + "name": "columnOrder", + "baseName": "columnOrder", + "type": "Array", + "format": "" + }, + { + "name": "sorting", + "baseName": "sorting", + "type": "Array", + "format": "" + } ]; + + static getAttributeTypeMap() { + return CommonColumnState.attributeTypeMap; } - return { - - 'columnSizing': json['columnSizing'] == null ? undefined : json['columnSizing'], - 'columnVisibility': json['columnVisibility'] == null ? undefined : json['columnVisibility'], - 'columnOrder': json['columnOrder'] == null ? undefined : json['columnOrder'], - 'sorting': json['sorting'] == null ? undefined : ((json['sorting'] as Array).map(CommonColumnStateSortFromJSON)), - }; -} - - export function CommonColumnStateToJSON(json: any): CommonColumnState { - return CommonColumnStateToJSONTyped(json, false); - } - export function CommonColumnStateToJSONTyped(value?: CommonColumnState | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; + public constructor() { } - - return { - - 'columnSizing': value['columnSizing'], - 'columnVisibility': value['columnVisibility'], - 'columnOrder': value['columnOrder'], - 'sorting': value['sorting'] == null ? undefined : ((value['sorting'] as Array).map(CommonColumnStateSortToJSON)), - }; } - diff --git a/src/models/CommonColumnStateSort.ts b/src/models/CommonColumnStateSort.ts index f6d006c..3201436 100755 --- a/src/models/CommonColumnStateSort.ts +++ b/src/models/CommonColumnStateSort.ts @@ -1,10 +1,8 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Sentio API * Sentio Open API for query data * - * The version of the OpenAPI document: version not set + * OpenAPI spec version: version not set * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -12,62 +10,34 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime.js'; -/** - * - * @export - * @interface CommonColumnStateSort - */ -export interface CommonColumnStateSort { - /** - * - * @type {string} - * @memberof CommonColumnStateSort - */ - id?: string; - /** - * - * @type {boolean} - * @memberof CommonColumnStateSort - */ - desc?: boolean; -} +import { HttpFile } from '../http/http.js'; -/** - * Check if a given object implements the CommonColumnStateSort interface. - */ -export function instanceOfCommonColumnStateSort(value: object): value is CommonColumnStateSort { - return true; -} +export class CommonColumnStateSort { + 'id'?: string; + 'desc'?: boolean; -export function CommonColumnStateSortFromJSON(json: any): CommonColumnStateSort { - return CommonColumnStateSortFromJSONTyped(json, false); -} + static readonly discriminator: string | undefined = undefined; -export function CommonColumnStateSortFromJSONTyped(json: any, ignoreDiscriminator: boolean): CommonColumnStateSort { - if (json == null) { - return json; - } - return { - - 'id': json['id'] == null ? undefined : json['id'], - 'desc': json['desc'] == null ? undefined : json['desc'], - }; -} + static readonly mapping: {[index: string]: string} | undefined = undefined; - export function CommonColumnStateSortToJSON(json: any): CommonColumnStateSort { - return CommonColumnStateSortToJSONTyped(json, false); - } + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "id", + "baseName": "id", + "type": "string", + "format": "" + }, + { + "name": "desc", + "baseName": "desc", + "type": "boolean", + "format": "" + } ]; - export function CommonColumnStateSortToJSONTyped(value?: CommonColumnStateSort | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; + static getAttributeTypeMap() { + return CommonColumnStateSort.attributeTypeMap; } - return { - - 'id': value['id'], - 'desc': value['desc'], - }; + public constructor() { + } } - diff --git a/src/models/CommonComputeStats.ts b/src/models/CommonComputeStats.ts index b41e19f..f872b41 100755 --- a/src/models/CommonComputeStats.ts +++ b/src/models/CommonComputeStats.ts @@ -1,10 +1,8 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Sentio API * Sentio Open API for query data * - * The version of the OpenAPI document: version not set + * OpenAPI spec version: version not set * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -12,94 +10,62 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime.js'; -/** - * - * @export - * @interface CommonComputeStats - */ -export interface CommonComputeStats { - /** - * - * @type {Date} - * @memberof CommonComputeStats - */ - computedAt?: Date; - /** - * - * @type {string} - * @memberof CommonComputeStats - */ - computeCostMs?: string; - /** - * - * @type {string} - * @memberof CommonComputeStats - */ - binaryVersionHash?: string; - /** - * - * @type {string} - * @memberof CommonComputeStats - */ - computedBy?: string; - /** - * - * @type {boolean} - * @memberof CommonComputeStats - */ - isCached?: boolean; - /** - * - * @type {boolean} - * @memberof CommonComputeStats - */ - isRefreshing?: boolean; -} +import { HttpFile } from '../http/http.js'; -/** - * Check if a given object implements the CommonComputeStats interface. - */ -export function instanceOfCommonComputeStats(value: object): value is CommonComputeStats { - return true; -} +export class CommonComputeStats { + 'computedAt'?: Date; + 'computeCostMs'?: string; + 'binaryVersionHash'?: string; + 'computedBy'?: string; + 'isCached'?: boolean; + 'isRefreshing'?: boolean; -export function CommonComputeStatsFromJSON(json: any): CommonComputeStats { - return CommonComputeStatsFromJSONTyped(json, false); -} + static readonly discriminator: string | undefined = undefined; -export function CommonComputeStatsFromJSONTyped(json: any, ignoreDiscriminator: boolean): CommonComputeStats { - if (json == null) { - return json; - } - return { - - 'computedAt': json['computedAt'] == null ? undefined : (new Date(json['computedAt'])), - 'computeCostMs': json['computeCostMs'] == null ? undefined : json['computeCostMs'], - 'binaryVersionHash': json['binaryVersionHash'] == null ? undefined : json['binaryVersionHash'], - 'computedBy': json['computedBy'] == null ? undefined : json['computedBy'], - 'isCached': json['isCached'] == null ? undefined : json['isCached'], - 'isRefreshing': json['isRefreshing'] == null ? undefined : json['isRefreshing'], - }; -} + static readonly mapping: {[index: string]: string} | undefined = undefined; - export function CommonComputeStatsToJSON(json: any): CommonComputeStats { - return CommonComputeStatsToJSONTyped(json, false); - } + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "computedAt", + "baseName": "computedAt", + "type": "Date", + "format": "date-time" + }, + { + "name": "computeCostMs", + "baseName": "computeCostMs", + "type": "string", + "format": "int64" + }, + { + "name": "binaryVersionHash", + "baseName": "binaryVersionHash", + "type": "string", + "format": "uint64" + }, + { + "name": "computedBy", + "baseName": "computedBy", + "type": "string", + "format": "" + }, + { + "name": "isCached", + "baseName": "isCached", + "type": "boolean", + "format": "" + }, + { + "name": "isRefreshing", + "baseName": "isRefreshing", + "type": "boolean", + "format": "" + } ]; - export function CommonComputeStatsToJSONTyped(value?: CommonComputeStats | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; + static getAttributeTypeMap() { + return CommonComputeStats.attributeTypeMap; } - return { - - 'computedAt': value['computedAt'] == null ? undefined : ((value['computedAt']).toISOString()), - 'computeCostMs': value['computeCostMs'], - 'binaryVersionHash': value['binaryVersionHash'], - 'computedBy': value['computedBy'], - 'isCached': value['isCached'], - 'isRefreshing': value['isRefreshing'], - }; + public constructor() { + } } - diff --git a/src/models/CommonDuration.ts b/src/models/CommonDuration.ts index 396c52a..64a1000 100755 --- a/src/models/CommonDuration.ts +++ b/src/models/CommonDuration.ts @@ -1,10 +1,8 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Sentio API * Sentio Open API for query data * - * The version of the OpenAPI document: version not set + * OpenAPI spec version: version not set * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -12,62 +10,34 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime.js'; -/** - * - * @export - * @interface CommonDuration - */ -export interface CommonDuration { - /** - * - * @type {number} - * @memberof CommonDuration - */ - value?: number; - /** - * - * @type {string} - * @memberof CommonDuration - */ - unit?: string; -} +import { HttpFile } from '../http/http.js'; -/** - * Check if a given object implements the CommonDuration interface. - */ -export function instanceOfCommonDuration(value: object): value is CommonDuration { - return true; -} +export class CommonDuration { + 'value'?: number; + 'unit'?: string; -export function CommonDurationFromJSON(json: any): CommonDuration { - return CommonDurationFromJSONTyped(json, false); -} + static readonly discriminator: string | undefined = undefined; -export function CommonDurationFromJSONTyped(json: any, ignoreDiscriminator: boolean): CommonDuration { - if (json == null) { - return json; - } - return { - - 'value': json['value'] == null ? undefined : json['value'], - 'unit': json['unit'] == null ? undefined : json['unit'], - }; -} + static readonly mapping: {[index: string]: string} | undefined = undefined; - export function CommonDurationToJSON(json: any): CommonDuration { - return CommonDurationToJSONTyped(json, false); - } + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "value", + "baseName": "value", + "type": "number", + "format": "double" + }, + { + "name": "unit", + "baseName": "unit", + "type": "string", + "format": "" + } ]; - export function CommonDurationToJSONTyped(value?: CommonDuration | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; + static getAttributeTypeMap() { + return CommonDuration.attributeTypeMap; } - return { - - 'value': value['value'], - 'unit': value['unit'], - }; + public constructor() { + } } - diff --git a/src/models/CommonEventLogColumn.ts b/src/models/CommonEventLogColumn.ts index efa03ed..fb37652 100755 --- a/src/models/CommonEventLogColumn.ts +++ b/src/models/CommonEventLogColumn.ts @@ -1,10 +1,8 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Sentio API * Sentio Open API for query data * - * The version of the OpenAPI document: version not set + * OpenAPI spec version: version not set * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -12,102 +10,69 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime.js'; -/** - * - * @export - * @interface CommonEventLogColumn - */ -export interface CommonEventLogColumn { - /** - * - * @type {string} - * @memberof CommonEventLogColumn - */ - id?: string; - /** - * - * @type {number} - * @memberof CommonEventLogColumn - */ - size?: number; - /** - * - * @type {string} - * @memberof CommonEventLogColumn - */ - name?: string; - /** - * - * @type {string} - * @memberof CommonEventLogColumn - */ - accessorKey?: string; - /** - * - * @type {boolean} - * @memberof CommonEventLogColumn - */ - enableHiding?: boolean; - /** - * - * @type {boolean} - * @memberof CommonEventLogColumn - */ - enableSorting?: boolean; - /** - * - * @type {boolean} - * @memberof CommonEventLogColumn - */ - enableResizing?: boolean; -} +import { HttpFile } from '../http/http.js'; -/** - * Check if a given object implements the CommonEventLogColumn interface. - */ -export function instanceOfCommonEventLogColumn(value: object): value is CommonEventLogColumn { - return true; -} +export class CommonEventLogColumn { + 'id'?: string; + 'size'?: number; + 'name'?: string; + 'accessorKey'?: string; + 'enableHiding'?: boolean; + 'enableSorting'?: boolean; + 'enableResizing'?: boolean; -export function CommonEventLogColumnFromJSON(json: any): CommonEventLogColumn { - return CommonEventLogColumnFromJSONTyped(json, false); -} + static readonly discriminator: string | undefined = undefined; -export function CommonEventLogColumnFromJSONTyped(json: any, ignoreDiscriminator: boolean): CommonEventLogColumn { - if (json == null) { - return json; - } - return { - - 'id': json['id'] == null ? undefined : json['id'], - 'size': json['size'] == null ? undefined : json['size'], - 'name': json['name'] == null ? undefined : json['name'], - 'accessorKey': json['accessorKey'] == null ? undefined : json['accessorKey'], - 'enableHiding': json['enableHiding'] == null ? undefined : json['enableHiding'], - 'enableSorting': json['enableSorting'] == null ? undefined : json['enableSorting'], - 'enableResizing': json['enableResizing'] == null ? undefined : json['enableResizing'], - }; -} + static readonly mapping: {[index: string]: string} | undefined = undefined; - export function CommonEventLogColumnToJSON(json: any): CommonEventLogColumn { - return CommonEventLogColumnToJSONTyped(json, false); - } + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "id", + "baseName": "id", + "type": "string", + "format": "" + }, + { + "name": "size", + "baseName": "size", + "type": "number", + "format": "int32" + }, + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + }, + { + "name": "accessorKey", + "baseName": "accessorKey", + "type": "string", + "format": "" + }, + { + "name": "enableHiding", + "baseName": "enableHiding", + "type": "boolean", + "format": "" + }, + { + "name": "enableSorting", + "baseName": "enableSorting", + "type": "boolean", + "format": "" + }, + { + "name": "enableResizing", + "baseName": "enableResizing", + "type": "boolean", + "format": "" + } ]; - export function CommonEventLogColumnToJSONTyped(value?: CommonEventLogColumn | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; + static getAttributeTypeMap() { + return CommonEventLogColumn.attributeTypeMap; } - return { - - 'id': value['id'], - 'size': value['size'], - 'name': value['name'], - 'accessorKey': value['accessorKey'], - 'enableHiding': value['enableHiding'], - 'enableSorting': value['enableSorting'], - 'enableResizing': value['enableResizing'], - }; + public constructor() { + } } - diff --git a/src/models/CommonEventLogConfig.ts b/src/models/CommonEventLogConfig.ts index b7f7ed1..1dad114 100755 --- a/src/models/CommonEventLogConfig.ts +++ b/src/models/CommonEventLogConfig.ts @@ -1,10 +1,8 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Sentio API * Sentio Open API for query data * - * The version of the OpenAPI document: version not set + * OpenAPI spec version: version not set * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -12,77 +10,36 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime.js'; -import type { CommonEventLogColumn } from './CommonEventLogColumn.js'; -import { - CommonEventLogColumnFromJSON, - CommonEventLogColumnFromJSONTyped, - CommonEventLogColumnToJSON, - CommonEventLogColumnToJSONTyped, -} from './CommonEventLogColumn.js'; -import type { CommonColumnState } from './CommonColumnState.js'; -import { - CommonColumnStateFromJSON, - CommonColumnStateFromJSONTyped, - CommonColumnStateToJSON, - CommonColumnStateToJSONTyped, -} from './CommonColumnState.js'; - -/** - * - * @export - * @interface CommonEventLogConfig - */ -export interface CommonEventLogConfig { - /** - * - * @type {Array} - * @memberof CommonEventLogConfig - */ - columns?: Array; - /** - * - * @type {CommonColumnState} - * @memberof CommonEventLogConfig - */ - state?: CommonColumnState; -} - -/** - * Check if a given object implements the CommonEventLogConfig interface. - */ -export function instanceOfCommonEventLogConfig(value: object): value is CommonEventLogConfig { - return true; -} - -export function CommonEventLogConfigFromJSON(json: any): CommonEventLogConfig { - return CommonEventLogConfigFromJSONTyped(json, false); -} - -export function CommonEventLogConfigFromJSONTyped(json: any, ignoreDiscriminator: boolean): CommonEventLogConfig { - if (json == null) { - return json; +import { CommonColumnState } from '../models/CommonColumnState.js'; +import { CommonEventLogColumn } from '../models/CommonEventLogColumn.js'; +import { HttpFile } from '../http/http.js'; + +export class CommonEventLogConfig { + 'columns'?: Array; + 'state'?: CommonColumnState; + + static readonly discriminator: string | undefined = undefined; + + static readonly mapping: {[index: string]: string} | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "columns", + "baseName": "columns", + "type": "Array", + "format": "" + }, + { + "name": "state", + "baseName": "state", + "type": "CommonColumnState", + "format": "" + } ]; + + static getAttributeTypeMap() { + return CommonEventLogConfig.attributeTypeMap; } - return { - - 'columns': json['columns'] == null ? undefined : ((json['columns'] as Array).map(CommonEventLogColumnFromJSON)), - 'state': json['state'] == null ? undefined : CommonColumnStateFromJSON(json['state']), - }; -} - - export function CommonEventLogConfigToJSON(json: any): CommonEventLogConfig { - return CommonEventLogConfigToJSONTyped(json, false); - } - export function CommonEventLogConfigToJSONTyped(value?: CommonEventLogConfig | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; + public constructor() { } - - return { - - 'columns': value['columns'] == null ? undefined : ((value['columns'] as Array).map(CommonEventLogColumnToJSON)), - 'state': CommonColumnStateToJSON(value['state']), - }; } - diff --git a/src/models/CommonEventLogEntry.ts b/src/models/CommonEventLogEntry.ts index b3466d3..8cdd613 100755 --- a/src/models/CommonEventLogEntry.ts +++ b/src/models/CommonEventLogEntry.ts @@ -1,10 +1,8 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Sentio API * Sentio Open API for query data * - * The version of the OpenAPI document: version not set + * OpenAPI spec version: version not set * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -12,174 +10,132 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime.js'; -/** - * - * @export - * @interface CommonEventLogEntry - */ -export interface CommonEventLogEntry { - /** - * - * @type {string} - * @memberof CommonEventLogEntry - */ - message?: string; - /** - * - * @type {string} - * @memberof CommonEventLogEntry - */ - timestamp?: string; - /** - * - * @type {string} - * @memberof CommonEventLogEntry - */ - logLevel?: string; - /** - * - * @type {string} - * @memberof CommonEventLogEntry - */ - logType?: string; - /** - * - * @type {string} - * @memberof CommonEventLogEntry - */ - contractName?: string; - /** - * - * @type {string} - * @memberof CommonEventLogEntry - */ - contractAddress?: string; - /** - * - * @type {string} - * @memberof CommonEventLogEntry - */ - blockNumber?: string; - /** - * - * @type {string} - * @memberof CommonEventLogEntry - */ - chainId?: string; - /** - * - * @type {object} - * @memberof CommonEventLogEntry - */ - attributes?: object; - /** - * - * @type {string} - * @memberof CommonEventLogEntry - */ - id?: string; - /** - * - * @type {string} - * @memberof CommonEventLogEntry - */ - transactionHash?: string; - /** - * - * @type {string} - * @memberof CommonEventLogEntry - */ - highlightedMessage?: string; - /** - * - * @type {string} - * @memberof CommonEventLogEntry - */ - distinctId?: string; - /** - * - * @type {string} - * @memberof CommonEventLogEntry - */ - eventName?: string; - /** - * - * @type {number} - * @memberof CommonEventLogEntry - */ - logIndex?: number; - /** - * - * @type {number} - * @memberof CommonEventLogEntry - */ - transactionIndex?: number; -} +import { HttpFile } from '../http/http.js'; -/** - * Check if a given object implements the CommonEventLogEntry interface. - */ -export function instanceOfCommonEventLogEntry(value: object): value is CommonEventLogEntry { - return true; -} +export class CommonEventLogEntry { + 'message'?: string; + 'timestamp'?: string; + 'logLevel'?: string; + 'logType'?: string; + 'contractName'?: string; + 'contractAddress'?: string; + 'blockNumber'?: string; + 'chainId'?: string; + 'attributes'?: any; + 'id'?: string; + 'transactionHash'?: string; + 'highlightedMessage'?: string; + 'distinctId'?: string; + 'eventName'?: string; + 'logIndex'?: number; + 'transactionIndex'?: number; -export function CommonEventLogEntryFromJSON(json: any): CommonEventLogEntry { - return CommonEventLogEntryFromJSONTyped(json, false); -} + static readonly discriminator: string | undefined = undefined; -export function CommonEventLogEntryFromJSONTyped(json: any, ignoreDiscriminator: boolean): CommonEventLogEntry { - if (json == null) { - return json; - } - return { - - 'message': json['message'] == null ? undefined : json['message'], - 'timestamp': json['timestamp'] == null ? undefined : json['timestamp'], - 'logLevel': json['logLevel'] == null ? undefined : json['logLevel'], - 'logType': json['logType'] == null ? undefined : json['logType'], - 'contractName': json['contractName'] == null ? undefined : json['contractName'], - 'contractAddress': json['contractAddress'] == null ? undefined : json['contractAddress'], - 'blockNumber': json['blockNumber'] == null ? undefined : json['blockNumber'], - 'chainId': json['chainId'] == null ? undefined : json['chainId'], - 'attributes': json['attributes'] == null ? undefined : json['attributes'], - 'id': json['id'] == null ? undefined : json['id'], - 'transactionHash': json['transactionHash'] == null ? undefined : json['transactionHash'], - 'highlightedMessage': json['highlightedMessage'] == null ? undefined : json['highlightedMessage'], - 'distinctId': json['distinctId'] == null ? undefined : json['distinctId'], - 'eventName': json['eventName'] == null ? undefined : json['eventName'], - 'logIndex': json['logIndex'] == null ? undefined : json['logIndex'], - 'transactionIndex': json['transactionIndex'] == null ? undefined : json['transactionIndex'], - }; -} + static readonly mapping: {[index: string]: string} | undefined = undefined; - export function CommonEventLogEntryToJSON(json: any): CommonEventLogEntry { - return CommonEventLogEntryToJSONTyped(json, false); - } + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "message", + "baseName": "message", + "type": "string", + "format": "" + }, + { + "name": "timestamp", + "baseName": "timestamp", + "type": "string", + "format": "int64" + }, + { + "name": "logLevel", + "baseName": "logLevel", + "type": "string", + "format": "" + }, + { + "name": "logType", + "baseName": "logType", + "type": "string", + "format": "" + }, + { + "name": "contractName", + "baseName": "contractName", + "type": "string", + "format": "" + }, + { + "name": "contractAddress", + "baseName": "contractAddress", + "type": "string", + "format": "" + }, + { + "name": "blockNumber", + "baseName": "blockNumber", + "type": "string", + "format": "uint64" + }, + { + "name": "chainId", + "baseName": "chainId", + "type": "string", + "format": "" + }, + { + "name": "attributes", + "baseName": "attributes", + "type": "any", + "format": "" + }, + { + "name": "id", + "baseName": "id", + "type": "string", + "format": "" + }, + { + "name": "transactionHash", + "baseName": "transactionHash", + "type": "string", + "format": "" + }, + { + "name": "highlightedMessage", + "baseName": "highlightedMessage", + "type": "string", + "format": "" + }, + { + "name": "distinctId", + "baseName": "distinctId", + "type": "string", + "format": "" + }, + { + "name": "eventName", + "baseName": "eventName", + "type": "string", + "format": "" + }, + { + "name": "logIndex", + "baseName": "logIndex", + "type": "number", + "format": "int32" + }, + { + "name": "transactionIndex", + "baseName": "transactionIndex", + "type": "number", + "format": "int32" + } ]; - export function CommonEventLogEntryToJSONTyped(value?: CommonEventLogEntry | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; + static getAttributeTypeMap() { + return CommonEventLogEntry.attributeTypeMap; } - return { - - 'message': value['message'], - 'timestamp': value['timestamp'], - 'logLevel': value['logLevel'], - 'logType': value['logType'], - 'contractName': value['contractName'], - 'contractAddress': value['contractAddress'], - 'blockNumber': value['blockNumber'], - 'chainId': value['chainId'], - 'attributes': value['attributes'], - 'id': value['id'], - 'transactionHash': value['transactionHash'], - 'highlightedMessage': value['highlightedMessage'], - 'distinctId': value['distinctId'], - 'eventName': value['eventName'], - 'logIndex': value['logIndex'], - 'transactionIndex': value['transactionIndex'], - }; + public constructor() { + } } - diff --git a/src/models/CommonFormula.ts b/src/models/CommonFormula.ts index 74c04da..ba3034a 100755 --- a/src/models/CommonFormula.ts +++ b/src/models/CommonFormula.ts @@ -1,10 +1,8 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Sentio API * Sentio Open API for query data * - * The version of the OpenAPI document: version not set + * OpenAPI spec version: version not set * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -12,94 +10,59 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime.js'; -import type { CommonFunction } from './CommonFunction.js'; -import { - CommonFunctionFromJSON, - CommonFunctionFromJSONTyped, - CommonFunctionToJSON, - CommonFunctionToJSONTyped, -} from './CommonFunction.js'; +import { CommonFunction } from '../models/CommonFunction.js'; +import { HttpFile } from '../http/http.js'; /** - * the formula to combine multiple queries - * @export - * @interface CommonFormula - */ -export interface CommonFormula { - /** - * - * @type {string} - * @memberof CommonFormula - */ - expression?: string; - /** - * - * @type {string} - * @memberof CommonFormula - */ - alias?: string; - /** - * - * @type {string} - * @memberof CommonFormula - */ - id?: string; - /** - * - * @type {boolean} - * @memberof CommonFormula - */ - disabled?: boolean; - /** - * - * @type {Array} - * @memberof CommonFormula - */ - functions?: Array; -} +* the formula to combine multiple queries +*/ +export class CommonFormula { + 'expression'?: string; + 'alias'?: string; + 'id'?: string; + 'disabled'?: boolean; + 'functions'?: Array; -/** - * Check if a given object implements the CommonFormula interface. - */ -export function instanceOfCommonFormula(value: object): value is CommonFormula { - return true; -} + static readonly discriminator: string | undefined = undefined; -export function CommonFormulaFromJSON(json: any): CommonFormula { - return CommonFormulaFromJSONTyped(json, false); -} + static readonly mapping: {[index: string]: string} | undefined = undefined; -export function CommonFormulaFromJSONTyped(json: any, ignoreDiscriminator: boolean): CommonFormula { - if (json == null) { - return json; - } - return { - - 'expression': json['expression'] == null ? undefined : json['expression'], - 'alias': json['alias'] == null ? undefined : json['alias'], - 'id': json['id'] == null ? undefined : json['id'], - 'disabled': json['disabled'] == null ? undefined : json['disabled'], - 'functions': json['functions'] == null ? undefined : ((json['functions'] as Array).map(CommonFunctionFromJSON)), - }; -} - - export function CommonFormulaToJSON(json: any): CommonFormula { - return CommonFormulaToJSONTyped(json, false); - } + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "expression", + "baseName": "expression", + "type": "string", + "format": "" + }, + { + "name": "alias", + "baseName": "alias", + "type": "string", + "format": "" + }, + { + "name": "id", + "baseName": "id", + "type": "string", + "format": "" + }, + { + "name": "disabled", + "baseName": "disabled", + "type": "boolean", + "format": "" + }, + { + "name": "functions", + "baseName": "functions", + "type": "Array", + "format": "" + } ]; - export function CommonFormulaToJSONTyped(value?: CommonFormula | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; + static getAttributeTypeMap() { + return CommonFormula.attributeTypeMap; } - return { - - 'expression': value['expression'], - 'alias': value['alias'], - 'id': value['id'], - 'disabled': value['disabled'], - 'functions': value['functions'] == null ? undefined : ((value['functions'] as Array).map(CommonFunctionToJSON)), - }; + public constructor() { + } } - diff --git a/src/models/CommonFunction.ts b/src/models/CommonFunction.ts index cdbcfac..b24ba5a 100755 --- a/src/models/CommonFunction.ts +++ b/src/models/CommonFunction.ts @@ -1,10 +1,8 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Sentio API * Sentio Open API for query data * - * The version of the OpenAPI document: version not set + * OpenAPI spec version: version not set * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -12,70 +10,35 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime.js'; -import type { CommonArgument } from './CommonArgument.js'; -import { - CommonArgumentFromJSON, - CommonArgumentFromJSONTyped, - CommonArgumentToJSON, - CommonArgumentToJSONTyped, -} from './CommonArgument.js'; - -/** - * - * @export - * @interface CommonFunction - */ -export interface CommonFunction { - /** - * - * @type {string} - * @memberof CommonFunction - */ - name?: string; - /** - * - * @type {Array} - * @memberof CommonFunction - */ - arguments?: Array; -} - -/** - * Check if a given object implements the CommonFunction interface. - */ -export function instanceOfCommonFunction(value: object): value is CommonFunction { - return true; -} - -export function CommonFunctionFromJSON(json: any): CommonFunction { - return CommonFunctionFromJSONTyped(json, false); -} - -export function CommonFunctionFromJSONTyped(json: any, ignoreDiscriminator: boolean): CommonFunction { - if (json == null) { - return json; +import { CommonArgument } from '../models/CommonArgument.js'; +import { HttpFile } from '../http/http.js'; + +export class CommonFunction { + 'name'?: string; + 'arguments'?: Array; + + static readonly discriminator: string | undefined = undefined; + + static readonly mapping: {[index: string]: string} | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + }, + { + "name": "arguments", + "baseName": "arguments", + "type": "Array", + "format": "" + } ]; + + static getAttributeTypeMap() { + return CommonFunction.attributeTypeMap; } - return { - - 'name': json['name'] == null ? undefined : json['name'], - 'arguments': json['arguments'] == null ? undefined : ((json['arguments'] as Array).map(CommonArgumentFromJSON)), - }; -} - - export function CommonFunctionToJSON(json: any): CommonFunction { - return CommonFunctionToJSONTyped(json, false); - } - export function CommonFunctionToJSONTyped(value?: CommonFunction | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; + public constructor() { } - - return { - - 'name': value['name'], - 'arguments': value['arguments'] == null ? undefined : ((value['arguments'] as Array).map(CommonArgumentToJSON)), - }; } - diff --git a/src/models/CommonJoinOperator.ts b/src/models/CommonJoinOperator.ts index d6b612c..47a6319 100755 --- a/src/models/CommonJoinOperator.ts +++ b/src/models/CommonJoinOperator.ts @@ -1,10 +1,8 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Sentio API * Sentio Open API for query data * - * The version of the OpenAPI document: version not set + * OpenAPI spec version: version not set * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -12,43 +10,10 @@ * Do not edit the class manually. */ +import { HttpFile } from '../http/http.js'; -/** - * - * @export - */ -export const CommonJoinOperator = { - And: 'AND', - Or: 'OR', - Then: 'THEN' -} as const; -export type CommonJoinOperator = typeof CommonJoinOperator[keyof typeof CommonJoinOperator]; - - -export function instanceOfCommonJoinOperator(value: any): boolean { - for (const key in CommonJoinOperator) { - if (Object.prototype.hasOwnProperty.call(CommonJoinOperator, key)) { - if (CommonJoinOperator[key as keyof typeof CommonJoinOperator] === value) { - return true; - } - } - } - return false; -} - -export function CommonJoinOperatorFromJSON(json: any): CommonJoinOperator { - return CommonJoinOperatorFromJSONTyped(json, false); +export enum CommonJoinOperator { + And = 'AND', + Or = 'OR', + Then = 'THEN' } - -export function CommonJoinOperatorFromJSONTyped(json: any, ignoreDiscriminator: boolean): CommonJoinOperator { - return json as CommonJoinOperator; -} - -export function CommonJoinOperatorToJSON(value?: CommonJoinOperator | null): any { - return value as any; -} - -export function CommonJoinOperatorToJSONTyped(value: any, ignoreDiscriminator: boolean): CommonJoinOperator { - return value as CommonJoinOperator; -} - diff --git a/src/models/CommonMatrix.ts b/src/models/CommonMatrix.ts index 7fc6ec4..280962d 100755 --- a/src/models/CommonMatrix.ts +++ b/src/models/CommonMatrix.ts @@ -1,10 +1,8 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Sentio API * Sentio Open API for query data * - * The version of the OpenAPI document: version not set + * OpenAPI spec version: version not set * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -12,70 +10,35 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime.js'; -import type { CommonMatrixSample } from './CommonMatrixSample.js'; -import { - CommonMatrixSampleFromJSON, - CommonMatrixSampleFromJSONTyped, - CommonMatrixSampleToJSON, - CommonMatrixSampleToJSONTyped, -} from './CommonMatrixSample.js'; - -/** - * - * @export - * @interface CommonMatrix - */ -export interface CommonMatrix { - /** - * - * @type {Array} - * @memberof CommonMatrix - */ - samples?: Array; - /** - * - * @type {number} - * @memberof CommonMatrix - */ - totalSamples?: number; -} - -/** - * Check if a given object implements the CommonMatrix interface. - */ -export function instanceOfCommonMatrix(value: object): value is CommonMatrix { - return true; -} - -export function CommonMatrixFromJSON(json: any): CommonMatrix { - return CommonMatrixFromJSONTyped(json, false); -} - -export function CommonMatrixFromJSONTyped(json: any, ignoreDiscriminator: boolean): CommonMatrix { - if (json == null) { - return json; +import { CommonMatrixSample } from '../models/CommonMatrixSample.js'; +import { HttpFile } from '../http/http.js'; + +export class CommonMatrix { + 'samples'?: Array; + 'totalSamples'?: number; + + static readonly discriminator: string | undefined = undefined; + + static readonly mapping: {[index: string]: string} | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "samples", + "baseName": "samples", + "type": "Array", + "format": "" + }, + { + "name": "totalSamples", + "baseName": "totalSamples", + "type": "number", + "format": "int32" + } ]; + + static getAttributeTypeMap() { + return CommonMatrix.attributeTypeMap; } - return { - - 'samples': json['samples'] == null ? undefined : ((json['samples'] as Array).map(CommonMatrixSampleFromJSON)), - 'totalSamples': json['totalSamples'] == null ? undefined : json['totalSamples'], - }; -} - - export function CommonMatrixToJSON(json: any): CommonMatrix { - return CommonMatrixToJSONTyped(json, false); - } - export function CommonMatrixToJSONTyped(value?: CommonMatrix | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; + public constructor() { } - - return { - - 'samples': value['samples'] == null ? undefined : ((value['samples'] as Array).map(CommonMatrixSampleToJSON)), - 'totalSamples': value['totalSamples'], - }; } - diff --git a/src/models/CommonMatrixMetric.ts b/src/models/CommonMatrixMetric.ts index 46e61bf..1f1b9cb 100755 --- a/src/models/CommonMatrixMetric.ts +++ b/src/models/CommonMatrixMetric.ts @@ -1,10 +1,8 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Sentio API * Sentio Open API for query data * - * The version of the OpenAPI document: version not set + * OpenAPI spec version: version not set * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -12,70 +10,41 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime.js'; -/** - * - * @export - * @interface CommonMatrixMetric - */ -export interface CommonMatrixMetric { - /** - * - * @type {string} - * @memberof CommonMatrixMetric - */ - name?: string; - /** - * - * @type {{ [key: string]: string; }} - * @memberof CommonMatrixMetric - */ - labels?: { [key: string]: string; }; - /** - * - * @type {string} - * @memberof CommonMatrixMetric - */ - displayName?: string; -} - -/** - * Check if a given object implements the CommonMatrixMetric interface. - */ -export function instanceOfCommonMatrixMetric(value: object): value is CommonMatrixMetric { - return true; -} - -export function CommonMatrixMetricFromJSON(json: any): CommonMatrixMetric { - return CommonMatrixMetricFromJSONTyped(json, false); -} - -export function CommonMatrixMetricFromJSONTyped(json: any, ignoreDiscriminator: boolean): CommonMatrixMetric { - if (json == null) { - return json; +import { HttpFile } from '../http/http.js'; + +export class CommonMatrixMetric { + 'name'?: string; + 'labels'?: { [key: string]: string; }; + 'displayName'?: string; + + static readonly discriminator: string | undefined = undefined; + + static readonly mapping: {[index: string]: string} | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + }, + { + "name": "labels", + "baseName": "labels", + "type": "{ [key: string]: string; }", + "format": "" + }, + { + "name": "displayName", + "baseName": "displayName", + "type": "string", + "format": "" + } ]; + + static getAttributeTypeMap() { + return CommonMatrixMetric.attributeTypeMap; } - return { - - 'name': json['name'] == null ? undefined : json['name'], - 'labels': json['labels'] == null ? undefined : json['labels'], - 'displayName': json['displayName'] == null ? undefined : json['displayName'], - }; -} - export function CommonMatrixMetricToJSON(json: any): CommonMatrixMetric { - return CommonMatrixMetricToJSONTyped(json, false); - } - - export function CommonMatrixMetricToJSONTyped(value?: CommonMatrixMetric | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; + public constructor() { } - - return { - - 'name': value['name'], - 'labels': value['labels'], - 'displayName': value['displayName'], - }; } - diff --git a/src/models/CommonMatrixSample.ts b/src/models/CommonMatrixSample.ts index d4b9d7d..7fc9780 100755 --- a/src/models/CommonMatrixSample.ts +++ b/src/models/CommonMatrixSample.ts @@ -1,10 +1,8 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Sentio API * Sentio Open API for query data * - * The version of the OpenAPI document: version not set + * OpenAPI spec version: version not set * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -12,77 +10,36 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime.js'; -import type { CommonMatrixMetric } from './CommonMatrixMetric.js'; -import { - CommonMatrixMetricFromJSON, - CommonMatrixMetricFromJSONTyped, - CommonMatrixMetricToJSON, - CommonMatrixMetricToJSONTyped, -} from './CommonMatrixMetric.js'; -import type { CommonMatrixValue } from './CommonMatrixValue.js'; -import { - CommonMatrixValueFromJSON, - CommonMatrixValueFromJSONTyped, - CommonMatrixValueToJSON, - CommonMatrixValueToJSONTyped, -} from './CommonMatrixValue.js'; - -/** - * - * @export - * @interface CommonMatrixSample - */ -export interface CommonMatrixSample { - /** - * - * @type {CommonMatrixMetric} - * @memberof CommonMatrixSample - */ - metric?: CommonMatrixMetric; - /** - * - * @type {Array} - * @memberof CommonMatrixSample - */ - values?: Array; -} - -/** - * Check if a given object implements the CommonMatrixSample interface. - */ -export function instanceOfCommonMatrixSample(value: object): value is CommonMatrixSample { - return true; -} - -export function CommonMatrixSampleFromJSON(json: any): CommonMatrixSample { - return CommonMatrixSampleFromJSONTyped(json, false); -} - -export function CommonMatrixSampleFromJSONTyped(json: any, ignoreDiscriminator: boolean): CommonMatrixSample { - if (json == null) { - return json; +import { CommonMatrixMetric } from '../models/CommonMatrixMetric.js'; +import { CommonMatrixValue } from '../models/CommonMatrixValue.js'; +import { HttpFile } from '../http/http.js'; + +export class CommonMatrixSample { + 'metric'?: CommonMatrixMetric; + 'values'?: Array; + + static readonly discriminator: string | undefined = undefined; + + static readonly mapping: {[index: string]: string} | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "metric", + "baseName": "metric", + "type": "CommonMatrixMetric", + "format": "" + }, + { + "name": "values", + "baseName": "values", + "type": "Array", + "format": "" + } ]; + + static getAttributeTypeMap() { + return CommonMatrixSample.attributeTypeMap; } - return { - - 'metric': json['metric'] == null ? undefined : CommonMatrixMetricFromJSON(json['metric']), - 'values': json['values'] == null ? undefined : ((json['values'] as Array).map(CommonMatrixValueFromJSON)), - }; -} - - export function CommonMatrixSampleToJSON(json: any): CommonMatrixSample { - return CommonMatrixSampleToJSONTyped(json, false); - } - export function CommonMatrixSampleToJSONTyped(value?: CommonMatrixSample | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; + public constructor() { } - - return { - - 'metric': CommonMatrixMetricToJSON(value['metric']), - 'values': value['values'] == null ? undefined : ((value['values'] as Array).map(CommonMatrixValueToJSON)), - }; } - diff --git a/src/models/CommonMatrixValue.ts b/src/models/CommonMatrixValue.ts index 5b0c5b4..94c3dfe 100755 --- a/src/models/CommonMatrixValue.ts +++ b/src/models/CommonMatrixValue.ts @@ -1,10 +1,8 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Sentio API * Sentio Open API for query data * - * The version of the OpenAPI document: version not set + * OpenAPI spec version: version not set * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -12,62 +10,34 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime.js'; -/** - * - * @export - * @interface CommonMatrixValue - */ -export interface CommonMatrixValue { - /** - * - * @type {string} - * @memberof CommonMatrixValue - */ - timestamp?: string; - /** - * - * @type {number} - * @memberof CommonMatrixValue - */ - value?: number; -} +import { HttpFile } from '../http/http.js'; -/** - * Check if a given object implements the CommonMatrixValue interface. - */ -export function instanceOfCommonMatrixValue(value: object): value is CommonMatrixValue { - return true; -} +export class CommonMatrixValue { + 'timestamp'?: string; + 'value'?: number; -export function CommonMatrixValueFromJSON(json: any): CommonMatrixValue { - return CommonMatrixValueFromJSONTyped(json, false); -} + static readonly discriminator: string | undefined = undefined; -export function CommonMatrixValueFromJSONTyped(json: any, ignoreDiscriminator: boolean): CommonMatrixValue { - if (json == null) { - return json; - } - return { - - 'timestamp': json['timestamp'] == null ? undefined : json['timestamp'], - 'value': json['value'] == null ? undefined : json['value'], - }; -} + static readonly mapping: {[index: string]: string} | undefined = undefined; - export function CommonMatrixValueToJSON(json: any): CommonMatrixValue { - return CommonMatrixValueToJSONTyped(json, false); - } + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "timestamp", + "baseName": "timestamp", + "type": "string", + "format": "int64" + }, + { + "name": "value", + "baseName": "value", + "type": "number", + "format": "double" + } ]; - export function CommonMatrixValueToJSONTyped(value?: CommonMatrixValue | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; + static getAttributeTypeMap() { + return CommonMatrixValue.attributeTypeMap; } - return { - - 'timestamp': value['timestamp'], - 'value': value['value'], - }; + public constructor() { + } } - diff --git a/src/models/CommonOrganization.ts b/src/models/CommonOrganization.ts index 4732c29..328252c 100755 --- a/src/models/CommonOrganization.ts +++ b/src/models/CommonOrganization.ts @@ -1,10 +1,8 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Sentio API * Sentio Open API for query data * - * The version of the OpenAPI document: version not set + * OpenAPI spec version: version not set * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -12,150 +10,95 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime.js'; -import type { CommonTier } from './CommonTier.js'; -import { - CommonTierFromJSON, - CommonTierFromJSONTyped, - CommonTierToJSON, - CommonTierToJSONTyped, -} from './CommonTier.js'; -import type { CommonOrganizationMember } from './CommonOrganizationMember.js'; -import { - CommonOrganizationMemberFromJSON, - CommonOrganizationMemberFromJSONTyped, - CommonOrganizationMemberToJSON, - CommonOrganizationMemberToJSONTyped, -} from './CommonOrganizationMember.js'; -import type { CommonProjectInfo } from './CommonProjectInfo.js'; -import { - CommonProjectInfoFromJSON, - CommonProjectInfoFromJSONTyped, - CommonProjectInfoToJSON, - CommonProjectInfoToJSONTyped, -} from './CommonProjectInfo.js'; +import { CommonOrganizationMember } from '../models/CommonOrganizationMember.js'; +import { CommonProjectInfo } from '../models/CommonProjectInfo.js'; +import { CommonTier } from '../models/CommonTier.js'; +import { HttpFile } from '../http/http.js'; -/** - * - * @export - * @interface CommonOrganization - */ -export interface CommonOrganization { - /** - * - * @type {string} - * @memberof CommonOrganization - */ - id?: string; - /** - * - * @type {string} - * @memberof CommonOrganization - */ - oid?: string; - /** - * - * @type {string} - * @memberof CommonOrganization - */ - name?: string; - /** - * - * @type {string} - * @memberof CommonOrganization - */ - createdAt?: string; - /** - * - * @type {string} - * @memberof CommonOrganization - */ - updatedAt?: string; - /** - * - * @type {Array} - * @memberof CommonOrganization - */ - members?: Array; - /** - * - * @type {string} - * @memberof CommonOrganization - */ - displayName?: string; - /** - * - * @type {string} - * @memberof CommonOrganization - */ - logoUrl?: string; - /** - * - * @type {Array} - * @memberof CommonOrganization - */ - projects?: Array; - /** - * - * @type {CommonTier} - * @memberof CommonOrganization - */ - tier?: CommonTier; -} +export class CommonOrganization { + 'id'?: string; + 'oid'?: string; + 'name'?: string; + 'createdAt'?: string; + 'updatedAt'?: string; + 'members'?: Array; + 'displayName'?: string; + 'logoUrl'?: string; + 'projects'?: Array; + 'tier'?: CommonTier; + static readonly discriminator: string | undefined = undefined; + static readonly mapping: {[index: string]: string} | undefined = undefined; -/** - * Check if a given object implements the CommonOrganization interface. - */ -export function instanceOfCommonOrganization(value: object): value is CommonOrganization { - return true; -} + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "id", + "baseName": "id", + "type": "string", + "format": "" + }, + { + "name": "oid", + "baseName": "oid", + "type": "string", + "format": "" + }, + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + }, + { + "name": "createdAt", + "baseName": "createdAt", + "type": "string", + "format": "int64" + }, + { + "name": "updatedAt", + "baseName": "updatedAt", + "type": "string", + "format": "int64" + }, + { + "name": "members", + "baseName": "members", + "type": "Array", + "format": "" + }, + { + "name": "displayName", + "baseName": "displayName", + "type": "string", + "format": "" + }, + { + "name": "logoUrl", + "baseName": "logoUrl", + "type": "string", + "format": "" + }, + { + "name": "projects", + "baseName": "projects", + "type": "Array", + "format": "" + }, + { + "name": "tier", + "baseName": "tier", + "type": "CommonTier", + "format": "" + } ]; -export function CommonOrganizationFromJSON(json: any): CommonOrganization { - return CommonOrganizationFromJSONTyped(json, false); -} - -export function CommonOrganizationFromJSONTyped(json: any, ignoreDiscriminator: boolean): CommonOrganization { - if (json == null) { - return json; + static getAttributeTypeMap() { + return CommonOrganization.attributeTypeMap; } - return { - - 'id': json['id'] == null ? undefined : json['id'], - 'oid': json['oid'] == null ? undefined : json['oid'], - 'name': json['name'] == null ? undefined : json['name'], - 'createdAt': json['createdAt'] == null ? undefined : json['createdAt'], - 'updatedAt': json['updatedAt'] == null ? undefined : json['updatedAt'], - 'members': json['members'] == null ? undefined : ((json['members'] as Array).map(CommonOrganizationMemberFromJSON)), - 'displayName': json['displayName'] == null ? undefined : json['displayName'], - 'logoUrl': json['logoUrl'] == null ? undefined : json['logoUrl'], - 'projects': json['projects'] == null ? undefined : ((json['projects'] as Array).map(CommonProjectInfoFromJSON)), - 'tier': json['tier'] == null ? undefined : CommonTierFromJSON(json['tier']), - }; -} - export function CommonOrganizationToJSON(json: any): CommonOrganization { - return CommonOrganizationToJSONTyped(json, false); - } - - export function CommonOrganizationToJSONTyped(value?: CommonOrganization | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; + public constructor() { } - - return { - - 'id': value['id'], - 'oid': value['oid'], - 'name': value['name'], - 'createdAt': value['createdAt'], - 'updatedAt': value['updatedAt'], - 'members': value['members'] == null ? undefined : ((value['members'] as Array).map(CommonOrganizationMemberToJSON)), - 'displayName': value['displayName'], - 'logoUrl': value['logoUrl'], - 'projects': value['projects'] == null ? undefined : ((value['projects'] as Array).map(CommonProjectInfoToJSON)), - 'tier': CommonTierToJSON(value['tier']), - }; } + diff --git a/src/models/CommonOrganizationMember.ts b/src/models/CommonOrganizationMember.ts index 54ef0b6..7187488 100755 --- a/src/models/CommonOrganizationMember.ts +++ b/src/models/CommonOrganizationMember.ts @@ -1,10 +1,8 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Sentio API * Sentio Open API for query data * - * The version of the OpenAPI document: version not set + * OpenAPI spec version: version not set * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -12,79 +10,38 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime.js'; -import type { CommonOrganizationRole } from './CommonOrganizationRole.js'; -import { - CommonOrganizationRoleFromJSON, - CommonOrganizationRoleFromJSONTyped, - CommonOrganizationRoleToJSON, - CommonOrganizationRoleToJSONTyped, -} from './CommonOrganizationRole.js'; -import type { CommonUserInfo } from './CommonUserInfo.js'; -import { - CommonUserInfoFromJSON, - CommonUserInfoFromJSONTyped, - CommonUserInfoToJSON, - CommonUserInfoToJSONTyped, -} from './CommonUserInfo.js'; - -/** - * - * @export - * @interface CommonOrganizationMember - */ -export interface CommonOrganizationMember { - /** - * - * @type {CommonUserInfo} - * @memberof CommonOrganizationMember - */ - user?: CommonUserInfo; - /** - * - * @type {CommonOrganizationRole} - * @memberof CommonOrganizationMember - */ - role?: CommonOrganizationRole; -} - - - -/** - * Check if a given object implements the CommonOrganizationMember interface. - */ -export function instanceOfCommonOrganizationMember(value: object): value is CommonOrganizationMember { - return true; -} - -export function CommonOrganizationMemberFromJSON(json: any): CommonOrganizationMember { - return CommonOrganizationMemberFromJSONTyped(json, false); -} - -export function CommonOrganizationMemberFromJSONTyped(json: any, ignoreDiscriminator: boolean): CommonOrganizationMember { - if (json == null) { - return json; +import { CommonOrganizationRole } from '../models/CommonOrganizationRole.js'; +import { CommonUserInfo } from '../models/CommonUserInfo.js'; +import { HttpFile } from '../http/http.js'; + +export class CommonOrganizationMember { + 'user'?: CommonUserInfo; + 'role'?: CommonOrganizationRole; + + static readonly discriminator: string | undefined = undefined; + + static readonly mapping: {[index: string]: string} | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "user", + "baseName": "user", + "type": "CommonUserInfo", + "format": "" + }, + { + "name": "role", + "baseName": "role", + "type": "CommonOrganizationRole", + "format": "" + } ]; + + static getAttributeTypeMap() { + return CommonOrganizationMember.attributeTypeMap; } - return { - - 'user': json['user'] == null ? undefined : CommonUserInfoFromJSON(json['user']), - 'role': json['role'] == null ? undefined : CommonOrganizationRoleFromJSON(json['role']), - }; -} - - export function CommonOrganizationMemberToJSON(json: any): CommonOrganizationMember { - return CommonOrganizationMemberToJSONTyped(json, false); - } - export function CommonOrganizationMemberToJSONTyped(value?: CommonOrganizationMember | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; + public constructor() { } - - return { - - 'user': CommonUserInfoToJSON(value['user']), - 'role': CommonOrganizationRoleToJSON(value['role']), - }; } + diff --git a/src/models/CommonOrganizationRole.ts b/src/models/CommonOrganizationRole.ts index 8e5eeff..057332b 100755 --- a/src/models/CommonOrganizationRole.ts +++ b/src/models/CommonOrganizationRole.ts @@ -1,10 +1,8 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Sentio API * Sentio Open API for query data * - * The version of the OpenAPI document: version not set + * OpenAPI spec version: version not set * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -12,42 +10,9 @@ * Do not edit the class manually. */ +import { HttpFile } from '../http/http.js'; -/** - * - * @export - */ -export const CommonOrganizationRole = { - Member: 'ORG_MEMBER', - Admin: 'ORG_ADMIN' -} as const; -export type CommonOrganizationRole = typeof CommonOrganizationRole[keyof typeof CommonOrganizationRole]; - - -export function instanceOfCommonOrganizationRole(value: any): boolean { - for (const key in CommonOrganizationRole) { - if (Object.prototype.hasOwnProperty.call(CommonOrganizationRole, key)) { - if (CommonOrganizationRole[key as keyof typeof CommonOrganizationRole] === value) { - return true; - } - } - } - return false; -} - -export function CommonOrganizationRoleFromJSON(json: any): CommonOrganizationRole { - return CommonOrganizationRoleFromJSONTyped(json, false); +export enum CommonOrganizationRole { + Member = 'ORG_MEMBER', + Admin = 'ORG_ADMIN' } - -export function CommonOrganizationRoleFromJSONTyped(json: any, ignoreDiscriminator: boolean): CommonOrganizationRole { - return json as CommonOrganizationRole; -} - -export function CommonOrganizationRoleToJSON(value?: CommonOrganizationRole | null): any { - return value as any; -} - -export function CommonOrganizationRoleToJSONTyped(value: any, ignoreDiscriminator: boolean): CommonOrganizationRole { - return value as CommonOrganizationRole; -} - diff --git a/src/models/CommonOwner.ts b/src/models/CommonOwner.ts index f4fda80..6760990 100755 --- a/src/models/CommonOwner.ts +++ b/src/models/CommonOwner.ts @@ -1,10 +1,8 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Sentio API * Sentio Open API for query data * - * The version of the OpenAPI document: version not set + * OpenAPI spec version: version not set * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -12,94 +10,46 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime.js'; -import type { CommonTier } from './CommonTier.js'; -import { - CommonTierFromJSON, - CommonTierFromJSONTyped, - CommonTierToJSON, - CommonTierToJSONTyped, -} from './CommonTier.js'; -import type { CommonOrganization } from './CommonOrganization.js'; -import { - CommonOrganizationFromJSON, - CommonOrganizationFromJSONTyped, - CommonOrganizationToJSON, - CommonOrganizationToJSONTyped, -} from './CommonOrganization.js'; -import type { CommonUser } from './CommonUser.js'; -import { - CommonUserFromJSON, - CommonUserFromJSONTyped, - CommonUserToJSON, - CommonUserToJSONTyped, -} from './CommonUser.js'; - -/** - * - * @export - * @interface CommonOwner - */ -export interface CommonOwner { - /** - * - * @type {CommonUser} - * @memberof CommonOwner - */ - user?: CommonUser; - /** - * - * @type {CommonOrganization} - * @memberof CommonOwner - */ - organization?: CommonOrganization; - /** - * - * @type {CommonTier} - * @memberof CommonOwner - */ - tier?: CommonTier; -} - - - -/** - * Check if a given object implements the CommonOwner interface. - */ -export function instanceOfCommonOwner(value: object): value is CommonOwner { - return true; -} - -export function CommonOwnerFromJSON(json: any): CommonOwner { - return CommonOwnerFromJSONTyped(json, false); -} - -export function CommonOwnerFromJSONTyped(json: any, ignoreDiscriminator: boolean): CommonOwner { - if (json == null) { - return json; +import { CommonOrganization } from '../models/CommonOrganization.js'; +import { CommonTier } from '../models/CommonTier.js'; +import { CommonUser } from '../models/CommonUser.js'; +import { HttpFile } from '../http/http.js'; + +export class CommonOwner { + 'user'?: CommonUser; + 'organization'?: CommonOrganization; + 'tier'?: CommonTier; + + static readonly discriminator: string | undefined = undefined; + + static readonly mapping: {[index: string]: string} | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "user", + "baseName": "user", + "type": "CommonUser", + "format": "" + }, + { + "name": "organization", + "baseName": "organization", + "type": "CommonOrganization", + "format": "" + }, + { + "name": "tier", + "baseName": "tier", + "type": "CommonTier", + "format": "" + } ]; + + static getAttributeTypeMap() { + return CommonOwner.attributeTypeMap; } - return { - - 'user': json['user'] == null ? undefined : CommonUserFromJSON(json['user']), - 'organization': json['organization'] == null ? undefined : CommonOrganizationFromJSON(json['organization']), - 'tier': json['tier'] == null ? undefined : CommonTierFromJSON(json['tier']), - }; -} - - export function CommonOwnerToJSON(json: any): CommonOwner { - return CommonOwnerToJSONTyped(json, false); - } - export function CommonOwnerToJSONTyped(value?: CommonOwner | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; + public constructor() { } - - return { - - 'user': CommonUserToJSON(value['user']), - 'organization': CommonOrganizationToJSON(value['organization']), - 'tier': CommonTierToJSON(value['tier']), - }; } + diff --git a/src/models/CommonPermission.ts b/src/models/CommonPermission.ts index a003811..318c364 100755 --- a/src/models/CommonPermission.ts +++ b/src/models/CommonPermission.ts @@ -1,10 +1,8 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Sentio API * Sentio Open API for query data * - * The version of the OpenAPI document: version not set + * OpenAPI spec version: version not set * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -12,43 +10,10 @@ * Do not edit the class manually. */ +import { HttpFile } from '../http/http.js'; -/** - * - * @export - */ -export const CommonPermission = { - Read: 'READ', - Write: 'WRITE', - Admin: 'ADMIN' -} as const; -export type CommonPermission = typeof CommonPermission[keyof typeof CommonPermission]; - - -export function instanceOfCommonPermission(value: any): boolean { - for (const key in CommonPermission) { - if (Object.prototype.hasOwnProperty.call(CommonPermission, key)) { - if (CommonPermission[key as keyof typeof CommonPermission] === value) { - return true; - } - } - } - return false; -} - -export function CommonPermissionFromJSON(json: any): CommonPermission { - return CommonPermissionFromJSONTyped(json, false); +export enum CommonPermission { + Read = 'READ', + Write = 'WRITE', + Admin = 'ADMIN' } - -export function CommonPermissionFromJSONTyped(json: any, ignoreDiscriminator: boolean): CommonPermission { - return json as CommonPermission; -} - -export function CommonPermissionToJSON(value?: CommonPermission | null): any { - return value as any; -} - -export function CommonPermissionToJSONTyped(value: any, ignoreDiscriminator: boolean): CommonPermission { - return value as CommonPermission; -} - diff --git a/src/models/CommonPriceSegmentationQuery.ts b/src/models/CommonPriceSegmentationQuery.ts index 7ef9d58..3677494 100755 --- a/src/models/CommonPriceSegmentationQuery.ts +++ b/src/models/CommonPriceSegmentationQuery.ts @@ -1,10 +1,8 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Sentio API * Sentio Open API for query data * - * The version of the OpenAPI document: version not set + * OpenAPI spec version: version not set * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -12,86 +10,49 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime.js'; -import type { CommonCoinID } from './CommonCoinID.js'; -import { - CommonCoinIDFromJSON, - CommonCoinIDFromJSONTyped, - CommonCoinIDToJSON, - CommonCoinIDToJSONTyped, -} from './CommonCoinID.js'; - -/** - * - * @export - * @interface CommonPriceSegmentationQuery - */ -export interface CommonPriceSegmentationQuery { - /** - * - * @type {string} - * @memberof CommonPriceSegmentationQuery - */ - id?: string; - /** - * - * @type {string} - * @memberof CommonPriceSegmentationQuery - */ - alias?: string; - /** - * - * @type {Array} - * @memberof CommonPriceSegmentationQuery - */ - coinId?: Array; - /** - * - * @type {boolean} - * @memberof CommonPriceSegmentationQuery - */ - disabled?: boolean; -} - -/** - * Check if a given object implements the CommonPriceSegmentationQuery interface. - */ -export function instanceOfCommonPriceSegmentationQuery(value: object): value is CommonPriceSegmentationQuery { - return true; -} - -export function CommonPriceSegmentationQueryFromJSON(json: any): CommonPriceSegmentationQuery { - return CommonPriceSegmentationQueryFromJSONTyped(json, false); -} - -export function CommonPriceSegmentationQueryFromJSONTyped(json: any, ignoreDiscriminator: boolean): CommonPriceSegmentationQuery { - if (json == null) { - return json; +import { CommonCoinID } from '../models/CommonCoinID.js'; +import { HttpFile } from '../http/http.js'; + +export class CommonPriceSegmentationQuery { + 'id'?: string; + 'alias'?: string; + 'coinId'?: Array; + 'disabled'?: boolean; + + static readonly discriminator: string | undefined = undefined; + + static readonly mapping: {[index: string]: string} | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "id", + "baseName": "id", + "type": "string", + "format": "" + }, + { + "name": "alias", + "baseName": "alias", + "type": "string", + "format": "" + }, + { + "name": "coinId", + "baseName": "coinId", + "type": "Array", + "format": "" + }, + { + "name": "disabled", + "baseName": "disabled", + "type": "boolean", + "format": "" + } ]; + + static getAttributeTypeMap() { + return CommonPriceSegmentationQuery.attributeTypeMap; } - return { - - 'id': json['id'] == null ? undefined : json['id'], - 'alias': json['alias'] == null ? undefined : json['alias'], - 'coinId': json['coinId'] == null ? undefined : ((json['coinId'] as Array).map(CommonCoinIDFromJSON)), - 'disabled': json['disabled'] == null ? undefined : json['disabled'], - }; -} - - export function CommonPriceSegmentationQueryToJSON(json: any): CommonPriceSegmentationQuery { - return CommonPriceSegmentationQueryToJSONTyped(json, false); - } - export function CommonPriceSegmentationQueryToJSONTyped(value?: CommonPriceSegmentationQuery | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; + public constructor() { } - - return { - - 'id': value['id'], - 'alias': value['alias'], - 'coinId': value['coinId'] == null ? undefined : ((value['coinId'] as Array).map(CommonCoinIDToJSON)), - 'disabled': value['disabled'], - }; } - diff --git a/src/models/CommonProject.ts b/src/models/CommonProject.ts index 2f37e43..3f8e1de 100755 --- a/src/models/CommonProject.ts +++ b/src/models/CommonProject.ts @@ -1,10 +1,8 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Sentio API * Sentio Open API for query data * - * The version of the OpenAPI document: version not set + * OpenAPI spec version: version not set * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -12,250 +10,162 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime.js'; -import type { CommonChannel } from './CommonChannel.js'; -import { - CommonChannelFromJSON, - CommonChannelFromJSONTyped, - CommonChannelToJSON, - CommonChannelToJSONTyped, -} from './CommonChannel.js'; -import type { CommonProjectType } from './CommonProjectType.js'; -import { - CommonProjectTypeFromJSON, - CommonProjectTypeFromJSONTyped, - CommonProjectTypeToJSON, - CommonProjectTypeToJSONTyped, -} from './CommonProjectType.js'; -import type { CommonProjectSuperset } from './CommonProjectSuperset.js'; -import { - CommonProjectSupersetFromJSON, - CommonProjectSupersetFromJSONTyped, - CommonProjectSupersetToJSON, - CommonProjectSupersetToJSONTyped, -} from './CommonProjectSuperset.js'; -import type { CommonOwner } from './CommonOwner.js'; -import { - CommonOwnerFromJSON, - CommonOwnerFromJSONTyped, - CommonOwnerToJSON, - CommonOwnerToJSONTyped, -} from './CommonOwner.js'; -import type { CommonProjectProjectMember } from './CommonProjectProjectMember.js'; -import { - CommonProjectProjectMemberFromJSON, - CommonProjectProjectMemberFromJSONTyped, - CommonProjectProjectMemberToJSON, - CommonProjectProjectMemberToJSONTyped, -} from './CommonProjectProjectMember.js'; -import type { CommonProjectView } from './CommonProjectView.js'; -import { - CommonProjectViewFromJSON, - CommonProjectViewFromJSONTyped, - CommonProjectViewToJSON, - CommonProjectViewToJSONTyped, -} from './CommonProjectView.js'; -import type { CommonProjectVisibility } from './CommonProjectVisibility.js'; -import { - CommonProjectVisibilityFromJSON, - CommonProjectVisibilityFromJSONTyped, - CommonProjectVisibilityToJSON, - CommonProjectVisibilityToJSONTyped, -} from './CommonProjectVisibility.js'; +import { CommonChannel } from '../models/CommonChannel.js'; +import { CommonOwner } from '../models/CommonOwner.js'; +import { CommonProjectProjectMember } from '../models/CommonProjectProjectMember.js'; +import { CommonProjectSuperset } from '../models/CommonProjectSuperset.js'; +import { CommonProjectType } from '../models/CommonProjectType.js'; +import { CommonProjectView } from '../models/CommonProjectView.js'; +import { CommonProjectVisibility } from '../models/CommonProjectVisibility.js'; +import { HttpFile } from '../http/http.js'; -/** - * - * @export - * @interface CommonProject - */ -export interface CommonProject { - /** - * - * @type {string} - * @memberof CommonProject - */ - id?: string; - /** - * - * @type {string} - * @memberof CommonProject - */ - displayName?: string; - /** - * - * @type {string} - * @memberof CommonProject - */ - description?: string; - /** - * - * @type {string} - * @memberof CommonProject - */ - createdAt?: string; - /** - * - * @type {string} - * @memberof CommonProject - */ - updatedAt?: string; - /** - * - * @type {string} - * @memberof CommonProject - */ - slug?: string; - /** - * - * @type {string} - * @memberof CommonProject - */ - ownerId?: string; - /** - * - * @type {CommonOwner} - * @memberof CommonProject - */ - owner?: CommonOwner; - /** - * - * @type {CommonProjectVisibility} - * @memberof CommonProject - */ - visibility?: CommonProjectVisibility; - /** - * - * @type {CommonProjectType} - * @memberof CommonProject - */ - type?: CommonProjectType; - /** - * - * @type {Array} - * @memberof CommonProject - */ - members?: Array; - /** - * - * @type {boolean} - * @memberof CommonProject - */ - multiVersion?: boolean; - /** - * - * @type {string} - * @memberof CommonProject - */ - ownerName?: string; - /** - * - * @type {Array} - * @memberof CommonProject - */ - notificationChannels?: Array; - /** - * - * @type {Array} - * @memberof CommonProject - */ - views?: Array; - /** - * - * @type {boolean} - * @memberof CommonProject - */ - supersetEnable?: boolean; - /** - * - * @type {CommonProjectSuperset} - * @memberof CommonProject - */ - superset?: CommonProjectSuperset; - /** - * - * @type {boolean} - * @memberof CommonProject - */ - enableDisk?: boolean; - /** - * - * @type {boolean} - * @memberof CommonProject - */ - enableMaterializedView?: boolean; -} +export class CommonProject { + 'id'?: string; + 'displayName'?: string; + 'description'?: string; + 'createdAt'?: string; + 'updatedAt'?: string; + 'slug'?: string; + 'ownerId'?: string; + 'owner'?: CommonOwner; + 'visibility'?: CommonProjectVisibility; + 'type'?: CommonProjectType; + 'members'?: Array; + 'multiVersion'?: boolean; + 'ownerName'?: string; + 'notificationChannels'?: Array; + 'views'?: Array; + 'supersetEnable'?: boolean; + 'superset'?: CommonProjectSuperset; + 'enableDisk'?: boolean; + 'enableMaterializedView'?: boolean; + static readonly discriminator: string | undefined = undefined; + static readonly mapping: {[index: string]: string} | undefined = undefined; -/** - * Check if a given object implements the CommonProject interface. - */ -export function instanceOfCommonProject(value: object): value is CommonProject { - return true; -} + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "id", + "baseName": "id", + "type": "string", + "format": "" + }, + { + "name": "displayName", + "baseName": "displayName", + "type": "string", + "format": "" + }, + { + "name": "description", + "baseName": "description", + "type": "string", + "format": "" + }, + { + "name": "createdAt", + "baseName": "createdAt", + "type": "string", + "format": "int64" + }, + { + "name": "updatedAt", + "baseName": "updatedAt", + "type": "string", + "format": "int64" + }, + { + "name": "slug", + "baseName": "slug", + "type": "string", + "format": "" + }, + { + "name": "ownerId", + "baseName": "ownerId", + "type": "string", + "format": "" + }, + { + "name": "owner", + "baseName": "owner", + "type": "CommonOwner", + "format": "" + }, + { + "name": "visibility", + "baseName": "visibility", + "type": "CommonProjectVisibility", + "format": "" + }, + { + "name": "type", + "baseName": "type", + "type": "CommonProjectType", + "format": "" + }, + { + "name": "members", + "baseName": "members", + "type": "Array", + "format": "" + }, + { + "name": "multiVersion", + "baseName": "multiVersion", + "type": "boolean", + "format": "" + }, + { + "name": "ownerName", + "baseName": "ownerName", + "type": "string", + "format": "" + }, + { + "name": "notificationChannels", + "baseName": "notificationChannels", + "type": "Array", + "format": "" + }, + { + "name": "views", + "baseName": "views", + "type": "Array", + "format": "" + }, + { + "name": "supersetEnable", + "baseName": "supersetEnable", + "type": "boolean", + "format": "" + }, + { + "name": "superset", + "baseName": "superset", + "type": "CommonProjectSuperset", + "format": "" + }, + { + "name": "enableDisk", + "baseName": "enableDisk", + "type": "boolean", + "format": "" + }, + { + "name": "enableMaterializedView", + "baseName": "enableMaterializedView", + "type": "boolean", + "format": "" + } ]; -export function CommonProjectFromJSON(json: any): CommonProject { - return CommonProjectFromJSONTyped(json, false); -} - -export function CommonProjectFromJSONTyped(json: any, ignoreDiscriminator: boolean): CommonProject { - if (json == null) { - return json; + static getAttributeTypeMap() { + return CommonProject.attributeTypeMap; } - return { - - 'id': json['id'] == null ? undefined : json['id'], - 'displayName': json['displayName'] == null ? undefined : json['displayName'], - 'description': json['description'] == null ? undefined : json['description'], - 'createdAt': json['createdAt'] == null ? undefined : json['createdAt'], - 'updatedAt': json['updatedAt'] == null ? undefined : json['updatedAt'], - 'slug': json['slug'] == null ? undefined : json['slug'], - 'ownerId': json['ownerId'] == null ? undefined : json['ownerId'], - 'owner': json['owner'] == null ? undefined : CommonOwnerFromJSON(json['owner']), - 'visibility': json['visibility'] == null ? undefined : CommonProjectVisibilityFromJSON(json['visibility']), - 'type': json['type'] == null ? undefined : CommonProjectTypeFromJSON(json['type']), - 'members': json['members'] == null ? undefined : ((json['members'] as Array).map(CommonProjectProjectMemberFromJSON)), - 'multiVersion': json['multiVersion'] == null ? undefined : json['multiVersion'], - 'ownerName': json['ownerName'] == null ? undefined : json['ownerName'], - 'notificationChannels': json['notificationChannels'] == null ? undefined : ((json['notificationChannels'] as Array).map(CommonChannelFromJSON)), - 'views': json['views'] == null ? undefined : ((json['views'] as Array).map(CommonProjectViewFromJSON)), - 'supersetEnable': json['supersetEnable'] == null ? undefined : json['supersetEnable'], - 'superset': json['superset'] == null ? undefined : CommonProjectSupersetFromJSON(json['superset']), - 'enableDisk': json['enableDisk'] == null ? undefined : json['enableDisk'], - 'enableMaterializedView': json['enableMaterializedView'] == null ? undefined : json['enableMaterializedView'], - }; -} - export function CommonProjectToJSON(json: any): CommonProject { - return CommonProjectToJSONTyped(json, false); - } - - export function CommonProjectToJSONTyped(value?: CommonProject | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; + public constructor() { } - - return { - - 'id': value['id'], - 'displayName': value['displayName'], - 'description': value['description'], - 'createdAt': value['createdAt'], - 'updatedAt': value['updatedAt'], - 'slug': value['slug'], - 'ownerId': value['ownerId'], - 'owner': CommonOwnerToJSON(value['owner']), - 'visibility': CommonProjectVisibilityToJSON(value['visibility']), - 'type': CommonProjectTypeToJSON(value['type']), - 'members': value['members'] == null ? undefined : ((value['members'] as Array).map(CommonProjectProjectMemberToJSON)), - 'multiVersion': value['multiVersion'], - 'ownerName': value['ownerName'], - 'notificationChannels': value['notificationChannels'] == null ? undefined : ((value['notificationChannels'] as Array).map(CommonChannelToJSON)), - 'views': value['views'] == null ? undefined : ((value['views'] as Array).map(CommonProjectViewToJSON)), - 'supersetEnable': value['supersetEnable'], - 'superset': CommonProjectSupersetToJSON(value['superset']), - 'enableDisk': value['enableDisk'], - 'enableMaterializedView': value['enableMaterializedView'], - }; } + diff --git a/src/models/CommonProjectInfo.ts b/src/models/CommonProjectInfo.ts index b19e9f0..75ff3bb 100755 --- a/src/models/CommonProjectInfo.ts +++ b/src/models/CommonProjectInfo.ts @@ -1,10 +1,8 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Sentio API * Sentio Open API for query data * - * The version of the OpenAPI document: version not set + * OpenAPI spec version: version not set * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -12,182 +10,123 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime.js'; -import type { CommonProjectType } from './CommonProjectType.js'; -import { - CommonProjectTypeFromJSON, - CommonProjectTypeFromJSONTyped, - CommonProjectTypeToJSON, - CommonProjectTypeToJSONTyped, -} from './CommonProjectType.js'; -import type { CommonProjectSuperset } from './CommonProjectSuperset.js'; -import { - CommonProjectSupersetFromJSON, - CommonProjectSupersetFromJSONTyped, - CommonProjectSupersetToJSON, - CommonProjectSupersetToJSONTyped, -} from './CommonProjectSuperset.js'; -import type { CommonProjectVisibility } from './CommonProjectVisibility.js'; -import { - CommonProjectVisibilityFromJSON, - CommonProjectVisibilityFromJSONTyped, - CommonProjectVisibilityToJSON, - CommonProjectVisibilityToJSONTyped, -} from './CommonProjectVisibility.js'; +import { CommonProjectSuperset } from '../models/CommonProjectSuperset.js'; +import { CommonProjectType } from '../models/CommonProjectType.js'; +import { CommonProjectVisibility } from '../models/CommonProjectVisibility.js'; +import { HttpFile } from '../http/http.js'; -/** - * - * @export - * @interface CommonProjectInfo - */ -export interface CommonProjectInfo { - /** - * - * @type {string} - * @memberof CommonProjectInfo - */ - id?: string; - /** - * - * @type {string} - * @memberof CommonProjectInfo - */ - displayName?: string; - /** - * - * @type {string} - * @memberof CommonProjectInfo - */ - description?: string; - /** - * - * @type {string} - * @memberof CommonProjectInfo - */ - createdAt?: string; - /** - * - * @type {string} - * @memberof CommonProjectInfo - */ - updatedAt?: string; - /** - * - * @type {string} - * @memberof CommonProjectInfo - */ - slug?: string; - /** - * - * @type {string} - * @memberof CommonProjectInfo - */ - owner?: string; - /** - * - * @type {CommonProjectVisibility} - * @memberof CommonProjectInfo - */ - visibility?: CommonProjectVisibility; - /** - * - * @type {CommonProjectType} - * @memberof CommonProjectInfo - */ - type?: CommonProjectType; - /** - * - * @type {boolean} - * @memberof CommonProjectInfo - */ - multiVersion?: boolean; - /** - * - * @type {boolean} - * @memberof CommonProjectInfo - */ - supersetEnable?: boolean; - /** - * - * @type {CommonProjectSuperset} - * @memberof CommonProjectInfo - */ - superset?: CommonProjectSuperset; - /** - * - * @type {boolean} - * @memberof CommonProjectInfo - */ - enableDisk?: boolean; - /** - * - * @type {boolean} - * @memberof CommonProjectInfo - */ - enableMaterializedView?: boolean; -} +export class CommonProjectInfo { + 'id'?: string; + 'displayName'?: string; + 'description'?: string; + 'createdAt'?: string; + 'updatedAt'?: string; + 'slug'?: string; + 'owner'?: string; + 'visibility'?: CommonProjectVisibility; + 'type'?: CommonProjectType; + 'multiVersion'?: boolean; + 'supersetEnable'?: boolean; + 'superset'?: CommonProjectSuperset; + 'enableDisk'?: boolean; + 'enableMaterializedView'?: boolean; + static readonly discriminator: string | undefined = undefined; + static readonly mapping: {[index: string]: string} | undefined = undefined; -/** - * Check if a given object implements the CommonProjectInfo interface. - */ -export function instanceOfCommonProjectInfo(value: object): value is CommonProjectInfo { - return true; -} + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "id", + "baseName": "id", + "type": "string", + "format": "" + }, + { + "name": "displayName", + "baseName": "displayName", + "type": "string", + "format": "" + }, + { + "name": "description", + "baseName": "description", + "type": "string", + "format": "" + }, + { + "name": "createdAt", + "baseName": "createdAt", + "type": "string", + "format": "int64" + }, + { + "name": "updatedAt", + "baseName": "updatedAt", + "type": "string", + "format": "int64" + }, + { + "name": "slug", + "baseName": "slug", + "type": "string", + "format": "" + }, + { + "name": "owner", + "baseName": "owner", + "type": "string", + "format": "" + }, + { + "name": "visibility", + "baseName": "visibility", + "type": "CommonProjectVisibility", + "format": "" + }, + { + "name": "type", + "baseName": "type", + "type": "CommonProjectType", + "format": "" + }, + { + "name": "multiVersion", + "baseName": "multiVersion", + "type": "boolean", + "format": "" + }, + { + "name": "supersetEnable", + "baseName": "supersetEnable", + "type": "boolean", + "format": "" + }, + { + "name": "superset", + "baseName": "superset", + "type": "CommonProjectSuperset", + "format": "" + }, + { + "name": "enableDisk", + "baseName": "enableDisk", + "type": "boolean", + "format": "" + }, + { + "name": "enableMaterializedView", + "baseName": "enableMaterializedView", + "type": "boolean", + "format": "" + } ]; -export function CommonProjectInfoFromJSON(json: any): CommonProjectInfo { - return CommonProjectInfoFromJSONTyped(json, false); -} - -export function CommonProjectInfoFromJSONTyped(json: any, ignoreDiscriminator: boolean): CommonProjectInfo { - if (json == null) { - return json; + static getAttributeTypeMap() { + return CommonProjectInfo.attributeTypeMap; } - return { - - 'id': json['id'] == null ? undefined : json['id'], - 'displayName': json['displayName'] == null ? undefined : json['displayName'], - 'description': json['description'] == null ? undefined : json['description'], - 'createdAt': json['createdAt'] == null ? undefined : json['createdAt'], - 'updatedAt': json['updatedAt'] == null ? undefined : json['updatedAt'], - 'slug': json['slug'] == null ? undefined : json['slug'], - 'owner': json['owner'] == null ? undefined : json['owner'], - 'visibility': json['visibility'] == null ? undefined : CommonProjectVisibilityFromJSON(json['visibility']), - 'type': json['type'] == null ? undefined : CommonProjectTypeFromJSON(json['type']), - 'multiVersion': json['multiVersion'] == null ? undefined : json['multiVersion'], - 'supersetEnable': json['supersetEnable'] == null ? undefined : json['supersetEnable'], - 'superset': json['superset'] == null ? undefined : CommonProjectSupersetFromJSON(json['superset']), - 'enableDisk': json['enableDisk'] == null ? undefined : json['enableDisk'], - 'enableMaterializedView': json['enableMaterializedView'] == null ? undefined : json['enableMaterializedView'], - }; -} - export function CommonProjectInfoToJSON(json: any): CommonProjectInfo { - return CommonProjectInfoToJSONTyped(json, false); - } - - export function CommonProjectInfoToJSONTyped(value?: CommonProjectInfo | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; + public constructor() { } - - return { - - 'id': value['id'], - 'displayName': value['displayName'], - 'description': value['description'], - 'createdAt': value['createdAt'], - 'updatedAt': value['updatedAt'], - 'slug': value['slug'], - 'owner': value['owner'], - 'visibility': CommonProjectVisibilityToJSON(value['visibility']), - 'type': CommonProjectTypeToJSON(value['type']), - 'multiVersion': value['multiVersion'], - 'supersetEnable': value['supersetEnable'], - 'superset': CommonProjectSupersetToJSON(value['superset']), - 'enableDisk': value['enableDisk'], - 'enableMaterializedView': value['enableMaterializedView'], - }; } + diff --git a/src/models/CommonProjectProjectMember.ts b/src/models/CommonProjectProjectMember.ts index e2890a9..7b8cc9d 100755 --- a/src/models/CommonProjectProjectMember.ts +++ b/src/models/CommonProjectProjectMember.ts @@ -1,10 +1,8 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Sentio API * Sentio Open API for query data * - * The version of the OpenAPI document: version not set + * OpenAPI spec version: version not set * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -12,70 +10,35 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime.js'; -import type { CommonUserInfo } from './CommonUserInfo.js'; -import { - CommonUserInfoFromJSON, - CommonUserInfoFromJSONTyped, - CommonUserInfoToJSON, - CommonUserInfoToJSONTyped, -} from './CommonUserInfo.js'; - -/** - * - * @export - * @interface CommonProjectProjectMember - */ -export interface CommonProjectProjectMember { - /** - * - * @type {CommonUserInfo} - * @memberof CommonProjectProjectMember - */ - user?: CommonUserInfo; - /** - * - * @type {string} - * @memberof CommonProjectProjectMember - */ - role?: string; -} - -/** - * Check if a given object implements the CommonProjectProjectMember interface. - */ -export function instanceOfCommonProjectProjectMember(value: object): value is CommonProjectProjectMember { - return true; -} - -export function CommonProjectProjectMemberFromJSON(json: any): CommonProjectProjectMember { - return CommonProjectProjectMemberFromJSONTyped(json, false); -} - -export function CommonProjectProjectMemberFromJSONTyped(json: any, ignoreDiscriminator: boolean): CommonProjectProjectMember { - if (json == null) { - return json; +import { CommonUserInfo } from '../models/CommonUserInfo.js'; +import { HttpFile } from '../http/http.js'; + +export class CommonProjectProjectMember { + 'user'?: CommonUserInfo; + 'role'?: string; + + static readonly discriminator: string | undefined = undefined; + + static readonly mapping: {[index: string]: string} | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "user", + "baseName": "user", + "type": "CommonUserInfo", + "format": "" + }, + { + "name": "role", + "baseName": "role", + "type": "string", + "format": "" + } ]; + + static getAttributeTypeMap() { + return CommonProjectProjectMember.attributeTypeMap; } - return { - - 'user': json['user'] == null ? undefined : CommonUserInfoFromJSON(json['user']), - 'role': json['role'] == null ? undefined : json['role'], - }; -} - - export function CommonProjectProjectMemberToJSON(json: any): CommonProjectProjectMember { - return CommonProjectProjectMemberToJSONTyped(json, false); - } - export function CommonProjectProjectMemberToJSONTyped(value?: CommonProjectProjectMember | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; + public constructor() { } - - return { - - 'user': CommonUserInfoToJSON(value['user']), - 'role': value['role'], - }; } - diff --git a/src/models/CommonProjectSuperset.ts b/src/models/CommonProjectSuperset.ts index a023b20..4e27c22 100755 --- a/src/models/CommonProjectSuperset.ts +++ b/src/models/CommonProjectSuperset.ts @@ -1,10 +1,8 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Sentio API * Sentio Open API for query data * - * The version of the OpenAPI document: version not set + * OpenAPI spec version: version not set * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -12,70 +10,41 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime.js'; -/** - * - * @export - * @interface CommonProjectSuperset - */ -export interface CommonProjectSuperset { - /** - * - * @type {string} - * @memberof CommonProjectSuperset - */ - projectId?: string; - /** - * - * @type {Date} - * @memberof CommonProjectSuperset - */ - createdAt?: Date; - /** - * - * @type {Date} - * @memberof CommonProjectSuperset - */ - syncAt?: Date; -} - -/** - * Check if a given object implements the CommonProjectSuperset interface. - */ -export function instanceOfCommonProjectSuperset(value: object): value is CommonProjectSuperset { - return true; -} - -export function CommonProjectSupersetFromJSON(json: any): CommonProjectSuperset { - return CommonProjectSupersetFromJSONTyped(json, false); -} - -export function CommonProjectSupersetFromJSONTyped(json: any, ignoreDiscriminator: boolean): CommonProjectSuperset { - if (json == null) { - return json; +import { HttpFile } from '../http/http.js'; + +export class CommonProjectSuperset { + 'projectId'?: string; + 'createdAt'?: Date; + 'syncAt'?: Date; + + static readonly discriminator: string | undefined = undefined; + + static readonly mapping: {[index: string]: string} | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "projectId", + "baseName": "projectId", + "type": "string", + "format": "" + }, + { + "name": "createdAt", + "baseName": "createdAt", + "type": "Date", + "format": "date-time" + }, + { + "name": "syncAt", + "baseName": "syncAt", + "type": "Date", + "format": "date-time" + } ]; + + static getAttributeTypeMap() { + return CommonProjectSuperset.attributeTypeMap; } - return { - - 'projectId': json['projectId'] == null ? undefined : json['projectId'], - 'createdAt': json['createdAt'] == null ? undefined : (new Date(json['createdAt'])), - 'syncAt': json['syncAt'] == null ? undefined : (new Date(json['syncAt'])), - }; -} - export function CommonProjectSupersetToJSON(json: any): CommonProjectSuperset { - return CommonProjectSupersetToJSONTyped(json, false); - } - - export function CommonProjectSupersetToJSONTyped(value?: CommonProjectSuperset | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; + public constructor() { } - - return { - - 'projectId': value['projectId'], - 'createdAt': value['createdAt'] == null ? undefined : ((value['createdAt']).toISOString()), - 'syncAt': value['syncAt'] == null ? undefined : ((value['syncAt']).toISOString()), - }; } - diff --git a/src/models/CommonProjectType.ts b/src/models/CommonProjectType.ts index d643b97..0c09a7e 100755 --- a/src/models/CommonProjectType.ts +++ b/src/models/CommonProjectType.ts @@ -1,10 +1,8 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Sentio API * Sentio Open API for query data * - * The version of the OpenAPI document: version not set + * OpenAPI spec version: version not set * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -12,43 +10,10 @@ * Do not edit the class manually. */ +import { HttpFile } from '../http/http.js'; -/** - * - * @export - */ -export const CommonProjectType = { - Sentio: 'SENTIO', - Subgraph: 'SUBGRAPH', - Action: 'ACTION' -} as const; -export type CommonProjectType = typeof CommonProjectType[keyof typeof CommonProjectType]; - - -export function instanceOfCommonProjectType(value: any): boolean { - for (const key in CommonProjectType) { - if (Object.prototype.hasOwnProperty.call(CommonProjectType, key)) { - if (CommonProjectType[key as keyof typeof CommonProjectType] === value) { - return true; - } - } - } - return false; -} - -export function CommonProjectTypeFromJSON(json: any): CommonProjectType { - return CommonProjectTypeFromJSONTyped(json, false); +export enum CommonProjectType { + Sentio = 'SENTIO', + Subgraph = 'SUBGRAPH', + Action = 'ACTION' } - -export function CommonProjectTypeFromJSONTyped(json: any, ignoreDiscriminator: boolean): CommonProjectType { - return json as CommonProjectType; -} - -export function CommonProjectTypeToJSON(value?: CommonProjectType | null): any { - return value as any; -} - -export function CommonProjectTypeToJSONTyped(value: any, ignoreDiscriminator: boolean): CommonProjectType { - return value as CommonProjectType; -} - diff --git a/src/models/CommonProjectView.ts b/src/models/CommonProjectView.ts index 8b33b19..0746ad2 100755 --- a/src/models/CommonProjectView.ts +++ b/src/models/CommonProjectView.ts @@ -1,10 +1,8 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Sentio API * Sentio Open API for query data * - * The version of the OpenAPI document: version not set + * OpenAPI spec version: version not set * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -12,86 +10,49 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime.js'; -import type { CommonProjectViewProjectViewConfig } from './CommonProjectViewProjectViewConfig.js'; -import { - CommonProjectViewProjectViewConfigFromJSON, - CommonProjectViewProjectViewConfigFromJSONTyped, - CommonProjectViewProjectViewConfigToJSON, - CommonProjectViewProjectViewConfigToJSONTyped, -} from './CommonProjectViewProjectViewConfig.js'; - -/** - * - * @export - * @interface CommonProjectView - */ -export interface CommonProjectView { - /** - * - * @type {string} - * @memberof CommonProjectView - */ - id?: string; - /** - * - * @type {string} - * @memberof CommonProjectView - */ - projectId?: string; - /** - * - * @type {string} - * @memberof CommonProjectView - */ - name?: string; - /** - * - * @type {CommonProjectViewProjectViewConfig} - * @memberof CommonProjectView - */ - config?: CommonProjectViewProjectViewConfig; -} - -/** - * Check if a given object implements the CommonProjectView interface. - */ -export function instanceOfCommonProjectView(value: object): value is CommonProjectView { - return true; -} - -export function CommonProjectViewFromJSON(json: any): CommonProjectView { - return CommonProjectViewFromJSONTyped(json, false); -} - -export function CommonProjectViewFromJSONTyped(json: any, ignoreDiscriminator: boolean): CommonProjectView { - if (json == null) { - return json; +import { CommonProjectViewProjectViewConfig } from '../models/CommonProjectViewProjectViewConfig.js'; +import { HttpFile } from '../http/http.js'; + +export class CommonProjectView { + 'id'?: string; + 'projectId'?: string; + 'name'?: string; + 'config'?: CommonProjectViewProjectViewConfig; + + static readonly discriminator: string | undefined = undefined; + + static readonly mapping: {[index: string]: string} | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "id", + "baseName": "id", + "type": "string", + "format": "" + }, + { + "name": "projectId", + "baseName": "projectId", + "type": "string", + "format": "" + }, + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + }, + { + "name": "config", + "baseName": "config", + "type": "CommonProjectViewProjectViewConfig", + "format": "" + } ]; + + static getAttributeTypeMap() { + return CommonProjectView.attributeTypeMap; } - return { - - 'id': json['id'] == null ? undefined : json['id'], - 'projectId': json['projectId'] == null ? undefined : json['projectId'], - 'name': json['name'] == null ? undefined : json['name'], - 'config': json['config'] == null ? undefined : CommonProjectViewProjectViewConfigFromJSON(json['config']), - }; -} - - export function CommonProjectViewToJSON(json: any): CommonProjectView { - return CommonProjectViewToJSONTyped(json, false); - } - export function CommonProjectViewToJSONTyped(value?: CommonProjectView | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; + public constructor() { } - - return { - - 'id': value['id'], - 'projectId': value['projectId'], - 'name': value['name'], - 'config': CommonProjectViewProjectViewConfigToJSON(value['config']), - }; } - diff --git a/src/models/CommonProjectViewProjectViewConfig.ts b/src/models/CommonProjectViewProjectViewConfig.ts index c630999..a99cc72 100755 --- a/src/models/CommonProjectViewProjectViewConfig.ts +++ b/src/models/CommonProjectViewProjectViewConfig.ts @@ -1,10 +1,8 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Sentio API * Sentio Open API for query data * - * The version of the OpenAPI document: version not set + * OpenAPI spec version: version not set * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -12,62 +10,28 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime.js'; -import type { CommonEventLogConfig } from './CommonEventLogConfig.js'; -import { - CommonEventLogConfigFromJSON, - CommonEventLogConfigFromJSONTyped, - CommonEventLogConfigToJSON, - CommonEventLogConfigToJSONTyped, -} from './CommonEventLogConfig.js'; +import { CommonEventLogConfig } from '../models/CommonEventLogConfig.js'; +import { HttpFile } from '../http/http.js'; -/** - * - * @export - * @interface CommonProjectViewProjectViewConfig - */ -export interface CommonProjectViewProjectViewConfig { - /** - * - * @type {CommonEventLogConfig} - * @memberof CommonProjectViewProjectViewConfig - */ - eventLog?: CommonEventLogConfig; -} +export class CommonProjectViewProjectViewConfig { + 'eventLog'?: CommonEventLogConfig; -/** - * Check if a given object implements the CommonProjectViewProjectViewConfig interface. - */ -export function instanceOfCommonProjectViewProjectViewConfig(value: object): value is CommonProjectViewProjectViewConfig { - return true; -} + static readonly discriminator: string | undefined = undefined; -export function CommonProjectViewProjectViewConfigFromJSON(json: any): CommonProjectViewProjectViewConfig { - return CommonProjectViewProjectViewConfigFromJSONTyped(json, false); -} - -export function CommonProjectViewProjectViewConfigFromJSONTyped(json: any, ignoreDiscriminator: boolean): CommonProjectViewProjectViewConfig { - if (json == null) { - return json; - } - return { - - 'eventLog': json['eventLog'] == null ? undefined : CommonEventLogConfigFromJSON(json['eventLog']), - }; -} + static readonly mapping: {[index: string]: string} | undefined = undefined; - export function CommonProjectViewProjectViewConfigToJSON(json: any): CommonProjectViewProjectViewConfig { - return CommonProjectViewProjectViewConfigToJSONTyped(json, false); - } + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "eventLog", + "baseName": "eventLog", + "type": "CommonEventLogConfig", + "format": "" + } ]; - export function CommonProjectViewProjectViewConfigToJSONTyped(value?: CommonProjectViewProjectViewConfig | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; + static getAttributeTypeMap() { + return CommonProjectViewProjectViewConfig.attributeTypeMap; } - return { - - 'eventLog': CommonEventLogConfigToJSON(value['eventLog']), - }; + public constructor() { + } } - diff --git a/src/models/CommonProjectVisibility.ts b/src/models/CommonProjectVisibility.ts index ac2f961..f38c1a4 100755 --- a/src/models/CommonProjectVisibility.ts +++ b/src/models/CommonProjectVisibility.ts @@ -1,10 +1,8 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Sentio API * Sentio Open API for query data * - * The version of the OpenAPI document: version not set + * OpenAPI spec version: version not set * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -12,42 +10,9 @@ * Do not edit the class manually. */ +import { HttpFile } from '../http/http.js'; -/** - * - * @export - */ -export const CommonProjectVisibility = { - Public: 'PUBLIC', - Private: 'PRIVATE' -} as const; -export type CommonProjectVisibility = typeof CommonProjectVisibility[keyof typeof CommonProjectVisibility]; - - -export function instanceOfCommonProjectVisibility(value: any): boolean { - for (const key in CommonProjectVisibility) { - if (Object.prototype.hasOwnProperty.call(CommonProjectVisibility, key)) { - if (CommonProjectVisibility[key as keyof typeof CommonProjectVisibility] === value) { - return true; - } - } - } - return false; -} - -export function CommonProjectVisibilityFromJSON(json: any): CommonProjectVisibility { - return CommonProjectVisibilityFromJSONTyped(json, false); +export enum CommonProjectVisibility { + Public = 'PUBLIC', + Private = 'PRIVATE' } - -export function CommonProjectVisibilityFromJSONTyped(json: any, ignoreDiscriminator: boolean): CommonProjectVisibility { - return json as CommonProjectVisibility; -} - -export function CommonProjectVisibilityToJSON(value?: CommonProjectVisibility | null): any { - return value as any; -} - -export function CommonProjectVisibilityToJSONTyped(value: any, ignoreDiscriminator: boolean): CommonProjectVisibility { - return value as CommonProjectVisibility; -} - diff --git a/src/models/CommonQuery.ts b/src/models/CommonQuery.ts index 1d8d082..5f7a882 100755 --- a/src/models/CommonQuery.ts +++ b/src/models/CommonQuery.ts @@ -1,10 +1,8 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Sentio API * Sentio Open API for query data * - * The version of the OpenAPI document: version not set + * OpenAPI spec version: version not set * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -12,117 +10,74 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime.js'; -import type { CommonAggregate } from './CommonAggregate.js'; -import { - CommonAggregateFromJSON, - CommonAggregateFromJSONTyped, - CommonAggregateToJSON, - CommonAggregateToJSONTyped, -} from './CommonAggregate.js'; -import type { CommonFunction } from './CommonFunction.js'; -import { - CommonFunctionFromJSON, - CommonFunctionFromJSONTyped, - CommonFunctionToJSON, - CommonFunctionToJSONTyped, -} from './CommonFunction.js'; +import { CommonAggregate } from '../models/CommonAggregate.js'; +import { CommonFunction } from '../models/CommonFunction.js'; +import { HttpFile } from '../http/http.js'; /** - * the query to fetch metrics data, promql - * @export - * @interface CommonQuery - */ -export interface CommonQuery { - /** - * - * @type {string} - * @memberof CommonQuery - */ - query?: string; - /** - * - * @type {string} - * @memberof CommonQuery - */ - alias?: string; - /** - * - * @type {string} - * @memberof CommonQuery - */ - id?: string; - /** - * - * @type {{ [key: string]: string; }} - * @memberof CommonQuery - */ - labelSelector?: { [key: string]: string; }; - /** - * - * @type {CommonAggregate} - * @memberof CommonQuery - */ - aggregate?: CommonAggregate; - /** - * - * @type {Array} - * @memberof CommonQuery - */ - functions?: Array; - /** - * - * @type {boolean} - * @memberof CommonQuery - */ - disabled?: boolean; -} +* the query to fetch metrics data, promql +*/ +export class CommonQuery { + 'query'?: string; + 'alias'?: string; + 'id'?: string; + 'labelSelector'?: { [key: string]: string; }; + 'aggregate'?: CommonAggregate; + 'functions'?: Array; + 'disabled'?: boolean; -/** - * Check if a given object implements the CommonQuery interface. - */ -export function instanceOfCommonQuery(value: object): value is CommonQuery { - return true; -} + static readonly discriminator: string | undefined = undefined; -export function CommonQueryFromJSON(json: any): CommonQuery { - return CommonQueryFromJSONTyped(json, false); -} + static readonly mapping: {[index: string]: string} | undefined = undefined; -export function CommonQueryFromJSONTyped(json: any, ignoreDiscriminator: boolean): CommonQuery { - if (json == null) { - return json; - } - return { - - 'query': json['query'] == null ? undefined : json['query'], - 'alias': json['alias'] == null ? undefined : json['alias'], - 'id': json['id'] == null ? undefined : json['id'], - 'labelSelector': json['labelSelector'] == null ? undefined : json['labelSelector'], - 'aggregate': json['aggregate'] == null ? undefined : CommonAggregateFromJSON(json['aggregate']), - 'functions': json['functions'] == null ? undefined : ((json['functions'] as Array).map(CommonFunctionFromJSON)), - 'disabled': json['disabled'] == null ? undefined : json['disabled'], - }; -} - - export function CommonQueryToJSON(json: any): CommonQuery { - return CommonQueryToJSONTyped(json, false); - } + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "query", + "baseName": "query", + "type": "string", + "format": "" + }, + { + "name": "alias", + "baseName": "alias", + "type": "string", + "format": "" + }, + { + "name": "id", + "baseName": "id", + "type": "string", + "format": "" + }, + { + "name": "labelSelector", + "baseName": "labelSelector", + "type": "{ [key: string]: string; }", + "format": "" + }, + { + "name": "aggregate", + "baseName": "aggregate", + "type": "CommonAggregate", + "format": "" + }, + { + "name": "functions", + "baseName": "functions", + "type": "Array", + "format": "" + }, + { + "name": "disabled", + "baseName": "disabled", + "type": "boolean", + "format": "" + } ]; - export function CommonQueryToJSONTyped(value?: CommonQuery | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; + static getAttributeTypeMap() { + return CommonQuery.attributeTypeMap; } - return { - - 'query': value['query'], - 'alias': value['alias'], - 'id': value['id'], - 'labelSelector': value['labelSelector'], - 'aggregate': CommonAggregateToJSON(value['aggregate']), - 'functions': value['functions'] == null ? undefined : ((value['functions'] as Array).map(CommonFunctionToJSON)), - 'disabled': value['disabled'], - }; + public constructor() { + } } - diff --git a/src/models/CommonRetentionMatrix.ts b/src/models/CommonRetentionMatrix.ts index 2c9e8d6..7a447e2 100755 --- a/src/models/CommonRetentionMatrix.ts +++ b/src/models/CommonRetentionMatrix.ts @@ -1,10 +1,8 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Sentio API * Sentio Open API for query data * - * The version of the OpenAPI document: version not set + * OpenAPI spec version: version not set * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -12,62 +10,28 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime.js'; -import type { CommonRetentionMatrixSample } from './CommonRetentionMatrixSample.js'; -import { - CommonRetentionMatrixSampleFromJSON, - CommonRetentionMatrixSampleFromJSONTyped, - CommonRetentionMatrixSampleToJSON, - CommonRetentionMatrixSampleToJSONTyped, -} from './CommonRetentionMatrixSample.js'; +import { CommonRetentionMatrixSample } from '../models/CommonRetentionMatrixSample.js'; +import { HttpFile } from '../http/http.js'; -/** - * - * @export - * @interface CommonRetentionMatrix - */ -export interface CommonRetentionMatrix { - /** - * - * @type {Array} - * @memberof CommonRetentionMatrix - */ - samples?: Array; -} +export class CommonRetentionMatrix { + 'samples'?: Array; -/** - * Check if a given object implements the CommonRetentionMatrix interface. - */ -export function instanceOfCommonRetentionMatrix(value: object): value is CommonRetentionMatrix { - return true; -} + static readonly discriminator: string | undefined = undefined; -export function CommonRetentionMatrixFromJSON(json: any): CommonRetentionMatrix { - return CommonRetentionMatrixFromJSONTyped(json, false); -} - -export function CommonRetentionMatrixFromJSONTyped(json: any, ignoreDiscriminator: boolean): CommonRetentionMatrix { - if (json == null) { - return json; - } - return { - - 'samples': json['samples'] == null ? undefined : ((json['samples'] as Array).map(CommonRetentionMatrixSampleFromJSON)), - }; -} + static readonly mapping: {[index: string]: string} | undefined = undefined; - export function CommonRetentionMatrixToJSON(json: any): CommonRetentionMatrix { - return CommonRetentionMatrixToJSONTyped(json, false); - } + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "samples", + "baseName": "samples", + "type": "Array", + "format": "" + } ]; - export function CommonRetentionMatrixToJSONTyped(value?: CommonRetentionMatrix | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; + static getAttributeTypeMap() { + return CommonRetentionMatrix.attributeTypeMap; } - return { - - 'samples': value['samples'] == null ? undefined : ((value['samples'] as Array).map(CommonRetentionMatrixSampleToJSON)), - }; + public constructor() { + } } - diff --git a/src/models/CommonRetentionMatrixSample.ts b/src/models/CommonRetentionMatrixSample.ts index c04e596..1c9f92c 100755 --- a/src/models/CommonRetentionMatrixSample.ts +++ b/src/models/CommonRetentionMatrixSample.ts @@ -1,10 +1,8 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Sentio API * Sentio Open API for query data * - * The version of the OpenAPI document: version not set + * OpenAPI spec version: version not set * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -12,102 +10,63 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime.js'; -import type { CommonSegmentParameter } from './CommonSegmentParameter.js'; -import { - CommonSegmentParameterFromJSON, - CommonSegmentParameterFromJSONTyped, - CommonSegmentParameterToJSON, - CommonSegmentParameterToJSONTyped, -} from './CommonSegmentParameter.js'; +import { CommonSegmentParameter } from '../models/CommonSegmentParameter.js'; +import { HttpFile } from '../http/http.js'; -/** - * - * @export - * @interface CommonRetentionMatrixSample - */ -export interface CommonRetentionMatrixSample { - /** - * - * @type {Date} - * @memberof CommonRetentionMatrixSample - */ - time?: Date; - /** - * - * @type {CommonSegmentParameter} - * @memberof CommonRetentionMatrixSample - */ - segmentParameter?: CommonSegmentParameter; - /** - * - * @type {{ [key: string]: string; }} - * @memberof CommonRetentionMatrixSample - */ - labels?: { [key: string]: string; }; - /** - * - * @type {number} - * @memberof CommonRetentionMatrixSample - */ - totalCount?: number; - /** - * - * @type {Array} - * @memberof CommonRetentionMatrixSample - */ - counts?: Array; - /** - * - * @type {Array} - * @memberof CommonRetentionMatrixSample - */ - rates?: Array; -} +export class CommonRetentionMatrixSample { + 'time'?: Date; + 'segmentParameter'?: CommonSegmentParameter; + 'labels'?: { [key: string]: string; }; + 'totalCount'?: number; + 'counts'?: Array; + 'rates'?: Array; -/** - * Check if a given object implements the CommonRetentionMatrixSample interface. - */ -export function instanceOfCommonRetentionMatrixSample(value: object): value is CommonRetentionMatrixSample { - return true; -} + static readonly discriminator: string | undefined = undefined; -export function CommonRetentionMatrixSampleFromJSON(json: any): CommonRetentionMatrixSample { - return CommonRetentionMatrixSampleFromJSONTyped(json, false); -} - -export function CommonRetentionMatrixSampleFromJSONTyped(json: any, ignoreDiscriminator: boolean): CommonRetentionMatrixSample { - if (json == null) { - return json; - } - return { - - 'time': json['time'] == null ? undefined : (new Date(json['time'])), - 'segmentParameter': json['segmentParameter'] == null ? undefined : CommonSegmentParameterFromJSON(json['segmentParameter']), - 'labels': json['labels'] == null ? undefined : json['labels'], - 'totalCount': json['totalCount'] == null ? undefined : json['totalCount'], - 'counts': json['counts'] == null ? undefined : json['counts'], - 'rates': json['rates'] == null ? undefined : json['rates'], - }; -} + static readonly mapping: {[index: string]: string} | undefined = undefined; - export function CommonRetentionMatrixSampleToJSON(json: any): CommonRetentionMatrixSample { - return CommonRetentionMatrixSampleToJSONTyped(json, false); - } + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "time", + "baseName": "time", + "type": "Date", + "format": "date-time" + }, + { + "name": "segmentParameter", + "baseName": "segmentParameter", + "type": "CommonSegmentParameter", + "format": "" + }, + { + "name": "labels", + "baseName": "labels", + "type": "{ [key: string]: string; }", + "format": "" + }, + { + "name": "totalCount", + "baseName": "totalCount", + "type": "number", + "format": "int32" + }, + { + "name": "counts", + "baseName": "counts", + "type": "Array", + "format": "int32" + }, + { + "name": "rates", + "baseName": "rates", + "type": "Array", + "format": "double" + } ]; - export function CommonRetentionMatrixSampleToJSONTyped(value?: CommonRetentionMatrixSample | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; + static getAttributeTypeMap() { + return CommonRetentionMatrixSample.attributeTypeMap; } - return { - - 'time': value['time'] == null ? undefined : ((value['time']).toISOString()), - 'segmentParameter': CommonSegmentParameterToJSON(value['segmentParameter']), - 'labels': value['labels'], - 'totalCount': value['totalCount'], - 'counts': value['counts'], - 'rates': value['rates'], - }; + public constructor() { + } } - diff --git a/src/models/CommonRetentionQuery.ts b/src/models/CommonRetentionQuery.ts index cdfde9f..9a5456b 100755 --- a/src/models/CommonRetentionQuery.ts +++ b/src/models/CommonRetentionQuery.ts @@ -1,10 +1,8 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Sentio API * Sentio Open API for query data * - * The version of the OpenAPI document: version not set + * OpenAPI spec version: version not set * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -12,140 +10,76 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime.js'; -import type { CommonSelectorExpr } from './CommonSelectorExpr.js'; -import { - CommonSelectorExprFromJSON, - CommonSelectorExprFromJSONTyped, - CommonSelectorExprToJSON, - CommonSelectorExprToJSONTyped, -} from './CommonSelectorExpr.js'; -import type { CommonSegmentParameter } from './CommonSegmentParameter.js'; -import { - CommonSegmentParameterFromJSON, - CommonSegmentParameterFromJSONTyped, - CommonSegmentParameterToJSON, - CommonSegmentParameterToJSONTyped, -} from './CommonSegmentParameter.js'; -import type { CommonRetentionQueryInterval } from './CommonRetentionQueryInterval.js'; -import { - CommonRetentionQueryIntervalFromJSON, - CommonRetentionQueryIntervalFromJSONTyped, - CommonRetentionQueryIntervalToJSON, - CommonRetentionQueryIntervalToJSONTyped, -} from './CommonRetentionQueryInterval.js'; -import type { CommonRetentionQueryCriteria } from './CommonRetentionQueryCriteria.js'; -import { - CommonRetentionQueryCriteriaFromJSON, - CommonRetentionQueryCriteriaFromJSONTyped, - CommonRetentionQueryCriteriaToJSON, - CommonRetentionQueryCriteriaToJSONTyped, -} from './CommonRetentionQueryCriteria.js'; -import type { CommonRetentionQueryResource } from './CommonRetentionQueryResource.js'; -import { - CommonRetentionQueryResourceFromJSON, - CommonRetentionQueryResourceFromJSONTyped, - CommonRetentionQueryResourceToJSON, - CommonRetentionQueryResourceToJSONTyped, -} from './CommonRetentionQueryResource.js'; +import { CommonRetentionQueryCriteria } from '../models/CommonRetentionQueryCriteria.js'; +import { CommonRetentionQueryInterval } from '../models/CommonRetentionQueryInterval.js'; +import { CommonRetentionQueryResource } from '../models/CommonRetentionQueryResource.js'; +import { CommonSegmentParameter } from '../models/CommonSegmentParameter.js'; +import { CommonSelectorExpr } from '../models/CommonSelectorExpr.js'; +import { HttpFile } from '../http/http.js'; -/** - * - * @export - * @interface CommonRetentionQuery - */ -export interface CommonRetentionQuery { - /** - * - * @type {Array} - * @memberof CommonRetentionQuery - */ - resources?: Array; - /** - * - * @type {CommonRetentionQueryCriteria} - * @memberof CommonRetentionQuery - */ - criteria?: CommonRetentionQueryCriteria; - /** - * - * @type {CommonRetentionQueryInterval} - * @memberof CommonRetentionQuery - */ - interval?: CommonRetentionQueryInterval; - /** - * - * @type {CommonSelectorExpr} - * @memberof CommonRetentionQuery - */ - selectorExpr?: CommonSelectorExpr; - /** - * - * @type {Array} - * @memberof CommonRetentionQuery - */ - groupBy?: Array; - /** - * - * @type {Array} - * @memberof CommonRetentionQuery - */ - segmentBy?: Array; - /** - * - * @type {number} - * @memberof CommonRetentionQuery - */ - windowSize?: number; -} +export class CommonRetentionQuery { + 'resources'?: Array; + 'criteria'?: CommonRetentionQueryCriteria; + 'interval'?: CommonRetentionQueryInterval; + 'selectorExpr'?: CommonSelectorExpr; + 'groupBy'?: Array; + 'segmentBy'?: Array; + 'windowSize'?: number; + static readonly discriminator: string | undefined = undefined; + static readonly mapping: {[index: string]: string} | undefined = undefined; -/** - * Check if a given object implements the CommonRetentionQuery interface. - */ -export function instanceOfCommonRetentionQuery(value: object): value is CommonRetentionQuery { - return true; -} + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "resources", + "baseName": "resources", + "type": "Array", + "format": "" + }, + { + "name": "criteria", + "baseName": "criteria", + "type": "CommonRetentionQueryCriteria", + "format": "" + }, + { + "name": "interval", + "baseName": "interval", + "type": "CommonRetentionQueryInterval", + "format": "" + }, + { + "name": "selectorExpr", + "baseName": "selectorExpr", + "type": "CommonSelectorExpr", + "format": "" + }, + { + "name": "groupBy", + "baseName": "groupBy", + "type": "Array", + "format": "" + }, + { + "name": "segmentBy", + "baseName": "segmentBy", + "type": "Array", + "format": "" + }, + { + "name": "windowSize", + "baseName": "windowSize", + "type": "number", + "format": "int32" + } ]; -export function CommonRetentionQueryFromJSON(json: any): CommonRetentionQuery { - return CommonRetentionQueryFromJSONTyped(json, false); -} - -export function CommonRetentionQueryFromJSONTyped(json: any, ignoreDiscriminator: boolean): CommonRetentionQuery { - if (json == null) { - return json; + static getAttributeTypeMap() { + return CommonRetentionQuery.attributeTypeMap; } - return { - - 'resources': json['resources'] == null ? undefined : ((json['resources'] as Array).map(CommonRetentionQueryResourceFromJSON)), - 'criteria': json['criteria'] == null ? undefined : CommonRetentionQueryCriteriaFromJSON(json['criteria']), - 'interval': json['interval'] == null ? undefined : CommonRetentionQueryIntervalFromJSON(json['interval']), - 'selectorExpr': json['selectorExpr'] == null ? undefined : CommonSelectorExprFromJSON(json['selectorExpr']), - 'groupBy': json['groupBy'] == null ? undefined : json['groupBy'], - 'segmentBy': json['segmentBy'] == null ? undefined : ((json['segmentBy'] as Array).map(CommonSegmentParameterFromJSON)), - 'windowSize': json['windowSize'] == null ? undefined : json['windowSize'], - }; -} - export function CommonRetentionQueryToJSON(json: any): CommonRetentionQuery { - return CommonRetentionQueryToJSONTyped(json, false); - } - - export function CommonRetentionQueryToJSONTyped(value?: CommonRetentionQuery | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; + public constructor() { } - - return { - - 'resources': value['resources'] == null ? undefined : ((value['resources'] as Array).map(CommonRetentionQueryResourceToJSON)), - 'criteria': CommonRetentionQueryCriteriaToJSON(value['criteria']), - 'interval': CommonRetentionQueryIntervalToJSON(value['interval']), - 'selectorExpr': CommonSelectorExprToJSON(value['selectorExpr']), - 'groupBy': value['groupBy'], - 'segmentBy': value['segmentBy'] == null ? undefined : ((value['segmentBy'] as Array).map(CommonSegmentParameterToJSON)), - 'windowSize': value['windowSize'], - }; } + diff --git a/src/models/CommonRetentionQueryCriteria.ts b/src/models/CommonRetentionQueryCriteria.ts index a6c89b6..ec99044 100755 --- a/src/models/CommonRetentionQueryCriteria.ts +++ b/src/models/CommonRetentionQueryCriteria.ts @@ -1,10 +1,8 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Sentio API * Sentio Open API for query data * - * The version of the OpenAPI document: version not set + * OpenAPI spec version: version not set * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -12,42 +10,9 @@ * Do not edit the class manually. */ +import { HttpFile } from '../http/http.js'; -/** - * - * @export - */ -export const CommonRetentionQueryCriteria = { - OnOrAfter: 'OnOrAfter', - On: 'On' -} as const; -export type CommonRetentionQueryCriteria = typeof CommonRetentionQueryCriteria[keyof typeof CommonRetentionQueryCriteria]; - - -export function instanceOfCommonRetentionQueryCriteria(value: any): boolean { - for (const key in CommonRetentionQueryCriteria) { - if (Object.prototype.hasOwnProperty.call(CommonRetentionQueryCriteria, key)) { - if (CommonRetentionQueryCriteria[key as keyof typeof CommonRetentionQueryCriteria] === value) { - return true; - } - } - } - return false; -} - -export function CommonRetentionQueryCriteriaFromJSON(json: any): CommonRetentionQueryCriteria { - return CommonRetentionQueryCriteriaFromJSONTyped(json, false); +export enum CommonRetentionQueryCriteria { + OnOrAfter = 'OnOrAfter', + On = 'On' } - -export function CommonRetentionQueryCriteriaFromJSONTyped(json: any, ignoreDiscriminator: boolean): CommonRetentionQueryCriteria { - return json as CommonRetentionQueryCriteria; -} - -export function CommonRetentionQueryCriteriaToJSON(value?: CommonRetentionQueryCriteria | null): any { - return value as any; -} - -export function CommonRetentionQueryCriteriaToJSONTyped(value: any, ignoreDiscriminator: boolean): CommonRetentionQueryCriteria { - return value as CommonRetentionQueryCriteria; -} - diff --git a/src/models/CommonRetentionQueryFilter.ts b/src/models/CommonRetentionQueryFilter.ts index af11a80..011a177 100755 --- a/src/models/CommonRetentionQueryFilter.ts +++ b/src/models/CommonRetentionQueryFilter.ts @@ -1,10 +1,8 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Sentio API * Sentio Open API for query data * - * The version of the OpenAPI document: version not set + * OpenAPI spec version: version not set * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -12,77 +10,36 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime.js'; -import type { CommonRetentionQueryFilterTimeFilter } from './CommonRetentionQueryFilterTimeFilter.js'; -import { - CommonRetentionQueryFilterTimeFilterFromJSON, - CommonRetentionQueryFilterTimeFilterFromJSONTyped, - CommonRetentionQueryFilterTimeFilterToJSON, - CommonRetentionQueryFilterTimeFilterToJSONTyped, -} from './CommonRetentionQueryFilterTimeFilter.js'; -import type { CommonSelectorExpr } from './CommonSelectorExpr.js'; -import { - CommonSelectorExprFromJSON, - CommonSelectorExprFromJSONTyped, - CommonSelectorExprToJSON, - CommonSelectorExprToJSONTyped, -} from './CommonSelectorExpr.js'; - -/** - * - * @export - * @interface CommonRetentionQueryFilter - */ -export interface CommonRetentionQueryFilter { - /** - * - * @type {CommonSelectorExpr} - * @memberof CommonRetentionQueryFilter - */ - propertyFilter?: CommonSelectorExpr; - /** - * - * @type {CommonRetentionQueryFilterTimeFilter} - * @memberof CommonRetentionQueryFilter - */ - timeFilter?: CommonRetentionQueryFilterTimeFilter; -} - -/** - * Check if a given object implements the CommonRetentionQueryFilter interface. - */ -export function instanceOfCommonRetentionQueryFilter(value: object): value is CommonRetentionQueryFilter { - return true; -} - -export function CommonRetentionQueryFilterFromJSON(json: any): CommonRetentionQueryFilter { - return CommonRetentionQueryFilterFromJSONTyped(json, false); -} - -export function CommonRetentionQueryFilterFromJSONTyped(json: any, ignoreDiscriminator: boolean): CommonRetentionQueryFilter { - if (json == null) { - return json; +import { CommonRetentionQueryFilterTimeFilter } from '../models/CommonRetentionQueryFilterTimeFilter.js'; +import { CommonSelectorExpr } from '../models/CommonSelectorExpr.js'; +import { HttpFile } from '../http/http.js'; + +export class CommonRetentionQueryFilter { + 'propertyFilter'?: CommonSelectorExpr; + 'timeFilter'?: CommonRetentionQueryFilterTimeFilter; + + static readonly discriminator: string | undefined = undefined; + + static readonly mapping: {[index: string]: string} | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "propertyFilter", + "baseName": "propertyFilter", + "type": "CommonSelectorExpr", + "format": "" + }, + { + "name": "timeFilter", + "baseName": "timeFilter", + "type": "CommonRetentionQueryFilterTimeFilter", + "format": "" + } ]; + + static getAttributeTypeMap() { + return CommonRetentionQueryFilter.attributeTypeMap; } - return { - - 'propertyFilter': json['propertyFilter'] == null ? undefined : CommonSelectorExprFromJSON(json['propertyFilter']), - 'timeFilter': json['timeFilter'] == null ? undefined : CommonRetentionQueryFilterTimeFilterFromJSON(json['timeFilter']), - }; -} - - export function CommonRetentionQueryFilterToJSON(json: any): CommonRetentionQueryFilter { - return CommonRetentionQueryFilterToJSONTyped(json, false); - } - export function CommonRetentionQueryFilterToJSONTyped(value?: CommonRetentionQueryFilter | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; + public constructor() { } - - return { - - 'propertyFilter': CommonSelectorExprToJSON(value['propertyFilter']), - 'timeFilter': CommonRetentionQueryFilterTimeFilterToJSON(value['timeFilter']), - }; } - diff --git a/src/models/CommonRetentionQueryFilterTimeFilter.ts b/src/models/CommonRetentionQueryFilterTimeFilter.ts index daa234e..37fe307 100755 --- a/src/models/CommonRetentionQueryFilterTimeFilter.ts +++ b/src/models/CommonRetentionQueryFilterTimeFilter.ts @@ -1,10 +1,8 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Sentio API * Sentio Open API for query data * - * The version of the OpenAPI document: version not set + * OpenAPI spec version: version not set * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -12,64 +10,30 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime.js'; -import type { CommonRetentionQueryFilterTimeFilterType } from './CommonRetentionQueryFilterTimeFilterType.js'; -import { - CommonRetentionQueryFilterTimeFilterTypeFromJSON, - CommonRetentionQueryFilterTimeFilterTypeFromJSONTyped, - CommonRetentionQueryFilterTimeFilterTypeToJSON, - CommonRetentionQueryFilterTimeFilterTypeToJSONTyped, -} from './CommonRetentionQueryFilterTimeFilterType.js'; +import { CommonRetentionQueryFilterTimeFilterType } from '../models/CommonRetentionQueryFilterTimeFilterType.js'; +import { HttpFile } from '../http/http.js'; -/** - * - * @export - * @interface CommonRetentionQueryFilterTimeFilter - */ -export interface CommonRetentionQueryFilterTimeFilter { - /** - * - * @type {CommonRetentionQueryFilterTimeFilterType} - * @memberof CommonRetentionQueryFilterTimeFilter - */ - type?: CommonRetentionQueryFilterTimeFilterType; -} +export class CommonRetentionQueryFilterTimeFilter { + 'type'?: CommonRetentionQueryFilterTimeFilterType; + static readonly discriminator: string | undefined = undefined; + static readonly mapping: {[index: string]: string} | undefined = undefined; -/** - * Check if a given object implements the CommonRetentionQueryFilterTimeFilter interface. - */ -export function instanceOfCommonRetentionQueryFilterTimeFilter(value: object): value is CommonRetentionQueryFilterTimeFilter { - return true; -} + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "type", + "baseName": "type", + "type": "CommonRetentionQueryFilterTimeFilterType", + "format": "" + } ]; -export function CommonRetentionQueryFilterTimeFilterFromJSON(json: any): CommonRetentionQueryFilterTimeFilter { - return CommonRetentionQueryFilterTimeFilterFromJSONTyped(json, false); -} - -export function CommonRetentionQueryFilterTimeFilterFromJSONTyped(json: any, ignoreDiscriminator: boolean): CommonRetentionQueryFilterTimeFilter { - if (json == null) { - return json; + static getAttributeTypeMap() { + return CommonRetentionQueryFilterTimeFilter.attributeTypeMap; } - return { - - 'type': json['type'] == null ? undefined : CommonRetentionQueryFilterTimeFilterTypeFromJSON(json['type']), - }; -} - export function CommonRetentionQueryFilterTimeFilterToJSON(json: any): CommonRetentionQueryFilterTimeFilter { - return CommonRetentionQueryFilterTimeFilterToJSONTyped(json, false); - } - - export function CommonRetentionQueryFilterTimeFilterToJSONTyped(value?: CommonRetentionQueryFilterTimeFilter | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; + public constructor() { } - - return { - - 'type': CommonRetentionQueryFilterTimeFilterTypeToJSON(value['type']), - }; } + diff --git a/src/models/CommonRetentionQueryFilterTimeFilterType.ts b/src/models/CommonRetentionQueryFilterTimeFilterType.ts index d125aec..c8eda2b 100755 --- a/src/models/CommonRetentionQueryFilterTimeFilterType.ts +++ b/src/models/CommonRetentionQueryFilterTimeFilterType.ts @@ -1,10 +1,8 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Sentio API * Sentio Open API for query data * - * The version of the OpenAPI document: version not set + * OpenAPI spec version: version not set * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -12,43 +10,10 @@ * Do not edit the class manually. */ +import { HttpFile } from '../http/http.js'; -/** - * - * @export - */ -export const CommonRetentionQueryFilterTimeFilterType = { - Disable: 'Disable', - FirstInTimeRange: 'FirstInTimeRange', - FirstInGlobal: 'FirstInGlobal' -} as const; -export type CommonRetentionQueryFilterTimeFilterType = typeof CommonRetentionQueryFilterTimeFilterType[keyof typeof CommonRetentionQueryFilterTimeFilterType]; - - -export function instanceOfCommonRetentionQueryFilterTimeFilterType(value: any): boolean { - for (const key in CommonRetentionQueryFilterTimeFilterType) { - if (Object.prototype.hasOwnProperty.call(CommonRetentionQueryFilterTimeFilterType, key)) { - if (CommonRetentionQueryFilterTimeFilterType[key as keyof typeof CommonRetentionQueryFilterTimeFilterType] === value) { - return true; - } - } - } - return false; -} - -export function CommonRetentionQueryFilterTimeFilterTypeFromJSON(json: any): CommonRetentionQueryFilterTimeFilterType { - return CommonRetentionQueryFilterTimeFilterTypeFromJSONTyped(json, false); +export enum CommonRetentionQueryFilterTimeFilterType { + Disable = 'Disable', + FirstInTimeRange = 'FirstInTimeRange', + FirstInGlobal = 'FirstInGlobal' } - -export function CommonRetentionQueryFilterTimeFilterTypeFromJSONTyped(json: any, ignoreDiscriminator: boolean): CommonRetentionQueryFilterTimeFilterType { - return json as CommonRetentionQueryFilterTimeFilterType; -} - -export function CommonRetentionQueryFilterTimeFilterTypeToJSON(value?: CommonRetentionQueryFilterTimeFilterType | null): any { - return value as any; -} - -export function CommonRetentionQueryFilterTimeFilterTypeToJSONTyped(value: any, ignoreDiscriminator: boolean): CommonRetentionQueryFilterTimeFilterType { - return value as CommonRetentionQueryFilterTimeFilterType; -} - diff --git a/src/models/CommonRetentionQueryInterval.ts b/src/models/CommonRetentionQueryInterval.ts index 4ab0c66..f0380c5 100755 --- a/src/models/CommonRetentionQueryInterval.ts +++ b/src/models/CommonRetentionQueryInterval.ts @@ -1,10 +1,8 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Sentio API * Sentio Open API for query data * - * The version of the OpenAPI document: version not set + * OpenAPI spec version: version not set * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -12,72 +10,37 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime.js'; -import type { CommonRetentionQueryIntervalUnit } from './CommonRetentionQueryIntervalUnit.js'; -import { - CommonRetentionQueryIntervalUnitFromJSON, - CommonRetentionQueryIntervalUnitFromJSONTyped, - CommonRetentionQueryIntervalUnitToJSON, - CommonRetentionQueryIntervalUnitToJSONTyped, -} from './CommonRetentionQueryIntervalUnit.js'; - -/** - * - * @export - * @interface CommonRetentionQueryInterval - */ -export interface CommonRetentionQueryInterval { - /** - * - * @type {number} - * @memberof CommonRetentionQueryInterval - */ - value?: number; - /** - * - * @type {CommonRetentionQueryIntervalUnit} - * @memberof CommonRetentionQueryInterval - */ - unit?: CommonRetentionQueryIntervalUnit; -} - - - -/** - * Check if a given object implements the CommonRetentionQueryInterval interface. - */ -export function instanceOfCommonRetentionQueryInterval(value: object): value is CommonRetentionQueryInterval { - return true; -} - -export function CommonRetentionQueryIntervalFromJSON(json: any): CommonRetentionQueryInterval { - return CommonRetentionQueryIntervalFromJSONTyped(json, false); -} - -export function CommonRetentionQueryIntervalFromJSONTyped(json: any, ignoreDiscriminator: boolean): CommonRetentionQueryInterval { - if (json == null) { - return json; +import { CommonRetentionQueryIntervalUnit } from '../models/CommonRetentionQueryIntervalUnit.js'; +import { HttpFile } from '../http/http.js'; + +export class CommonRetentionQueryInterval { + 'value'?: number; + 'unit'?: CommonRetentionQueryIntervalUnit; + + static readonly discriminator: string | undefined = undefined; + + static readonly mapping: {[index: string]: string} | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "value", + "baseName": "value", + "type": "number", + "format": "int32" + }, + { + "name": "unit", + "baseName": "unit", + "type": "CommonRetentionQueryIntervalUnit", + "format": "" + } ]; + + static getAttributeTypeMap() { + return CommonRetentionQueryInterval.attributeTypeMap; } - return { - - 'value': json['value'] == null ? undefined : json['value'], - 'unit': json['unit'] == null ? undefined : CommonRetentionQueryIntervalUnitFromJSON(json['unit']), - }; -} - - export function CommonRetentionQueryIntervalToJSON(json: any): CommonRetentionQueryInterval { - return CommonRetentionQueryIntervalToJSONTyped(json, false); - } - export function CommonRetentionQueryIntervalToJSONTyped(value?: CommonRetentionQueryInterval | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; + public constructor() { } - - return { - - 'value': value['value'], - 'unit': CommonRetentionQueryIntervalUnitToJSON(value['unit']), - }; } + diff --git a/src/models/CommonRetentionQueryIntervalUnit.ts b/src/models/CommonRetentionQueryIntervalUnit.ts index d2bdee6..41f1b5b 100755 --- a/src/models/CommonRetentionQueryIntervalUnit.ts +++ b/src/models/CommonRetentionQueryIntervalUnit.ts @@ -1,10 +1,8 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Sentio API * Sentio Open API for query data * - * The version of the OpenAPI document: version not set + * OpenAPI spec version: version not set * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -12,43 +10,10 @@ * Do not edit the class manually. */ +import { HttpFile } from '../http/http.js'; -/** - * - * @export - */ -export const CommonRetentionQueryIntervalUnit = { - Day: 'Day', - Week: 'Week', - Month: 'Month' -} as const; -export type CommonRetentionQueryIntervalUnit = typeof CommonRetentionQueryIntervalUnit[keyof typeof CommonRetentionQueryIntervalUnit]; - - -export function instanceOfCommonRetentionQueryIntervalUnit(value: any): boolean { - for (const key in CommonRetentionQueryIntervalUnit) { - if (Object.prototype.hasOwnProperty.call(CommonRetentionQueryIntervalUnit, key)) { - if (CommonRetentionQueryIntervalUnit[key as keyof typeof CommonRetentionQueryIntervalUnit] === value) { - return true; - } - } - } - return false; -} - -export function CommonRetentionQueryIntervalUnitFromJSON(json: any): CommonRetentionQueryIntervalUnit { - return CommonRetentionQueryIntervalUnitFromJSONTyped(json, false); +export enum CommonRetentionQueryIntervalUnit { + Day = 'Day', + Week = 'Week', + Month = 'Month' } - -export function CommonRetentionQueryIntervalUnitFromJSONTyped(json: any, ignoreDiscriminator: boolean): CommonRetentionQueryIntervalUnit { - return json as CommonRetentionQueryIntervalUnit; -} - -export function CommonRetentionQueryIntervalUnitToJSON(value?: CommonRetentionQueryIntervalUnit | null): any { - return value as any; -} - -export function CommonRetentionQueryIntervalUnitToJSONTyped(value: any, ignoreDiscriminator: boolean): CommonRetentionQueryIntervalUnit { - return value as CommonRetentionQueryIntervalUnit; -} - diff --git a/src/models/CommonRetentionQueryResource.ts b/src/models/CommonRetentionQueryResource.ts index 5f00e40..9babb9f 100755 --- a/src/models/CommonRetentionQueryResource.ts +++ b/src/models/CommonRetentionQueryResource.ts @@ -1,10 +1,8 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Sentio API * Sentio Open API for query data * - * The version of the OpenAPI document: version not set + * OpenAPI spec version: version not set * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -12,70 +10,35 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime.js'; -import type { CommonRetentionQueryFilter } from './CommonRetentionQueryFilter.js'; -import { - CommonRetentionQueryFilterFromJSON, - CommonRetentionQueryFilterFromJSONTyped, - CommonRetentionQueryFilterToJSON, - CommonRetentionQueryFilterToJSONTyped, -} from './CommonRetentionQueryFilter.js'; - -/** - * - * @export - * @interface CommonRetentionQueryResource - */ -export interface CommonRetentionQueryResource { - /** - * - * @type {Array} - * @memberof CommonRetentionQueryResource - */ - eventNames?: Array; - /** - * - * @type {CommonRetentionQueryFilter} - * @memberof CommonRetentionQueryResource - */ - filter?: CommonRetentionQueryFilter; -} - -/** - * Check if a given object implements the CommonRetentionQueryResource interface. - */ -export function instanceOfCommonRetentionQueryResource(value: object): value is CommonRetentionQueryResource { - return true; -} - -export function CommonRetentionQueryResourceFromJSON(json: any): CommonRetentionQueryResource { - return CommonRetentionQueryResourceFromJSONTyped(json, false); -} - -export function CommonRetentionQueryResourceFromJSONTyped(json: any, ignoreDiscriminator: boolean): CommonRetentionQueryResource { - if (json == null) { - return json; +import { CommonRetentionQueryFilter } from '../models/CommonRetentionQueryFilter.js'; +import { HttpFile } from '../http/http.js'; + +export class CommonRetentionQueryResource { + 'eventNames'?: Array; + 'filter'?: CommonRetentionQueryFilter; + + static readonly discriminator: string | undefined = undefined; + + static readonly mapping: {[index: string]: string} | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "eventNames", + "baseName": "eventNames", + "type": "Array", + "format": "" + }, + { + "name": "filter", + "baseName": "filter", + "type": "CommonRetentionQueryFilter", + "format": "" + } ]; + + static getAttributeTypeMap() { + return CommonRetentionQueryResource.attributeTypeMap; } - return { - - 'eventNames': json['eventNames'] == null ? undefined : json['eventNames'], - 'filter': json['filter'] == null ? undefined : CommonRetentionQueryFilterFromJSON(json['filter']), - }; -} - - export function CommonRetentionQueryResourceToJSON(json: any): CommonRetentionQueryResource { - return CommonRetentionQueryResourceToJSONTyped(json, false); - } - export function CommonRetentionQueryResourceToJSONTyped(value?: CommonRetentionQueryResource | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; + public constructor() { } - - return { - - 'eventNames': value['eventNames'], - 'filter': CommonRetentionQueryFilterToJSON(value['filter']), - }; } - diff --git a/src/models/CommonRichStruct.ts b/src/models/CommonRichStruct.ts index 41381c7..077909d 100755 --- a/src/models/CommonRichStruct.ts +++ b/src/models/CommonRichStruct.ts @@ -1,10 +1,8 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Sentio API * Sentio Open API for query data * - * The version of the OpenAPI document: version not set + * OpenAPI spec version: version not set * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -12,62 +10,28 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime.js'; -import type { CommonRichValue } from './CommonRichValue.js'; -import { - CommonRichValueFromJSON, - CommonRichValueFromJSONTyped, - CommonRichValueToJSON, - CommonRichValueToJSONTyped, -} from './CommonRichValue.js'; +import { CommonRichValue } from '../models/CommonRichValue.js'; +import { HttpFile } from '../http/http.js'; -/** - * - * @export - * @interface CommonRichStruct - */ -export interface CommonRichStruct { - /** - * - * @type {{ [key: string]: CommonRichValue; }} - * @memberof CommonRichStruct - */ - fields?: { [key: string]: CommonRichValue; }; -} +export class CommonRichStruct { + 'fields'?: { [key: string]: CommonRichValue; }; -/** - * Check if a given object implements the CommonRichStruct interface. - */ -export function instanceOfCommonRichStruct(value: object): value is CommonRichStruct { - return true; -} + static readonly discriminator: string | undefined = undefined; -export function CommonRichStructFromJSON(json: any): CommonRichStruct { - return CommonRichStructFromJSONTyped(json, false); -} - -export function CommonRichStructFromJSONTyped(json: any, ignoreDiscriminator: boolean): CommonRichStruct { - if (json == null) { - return json; - } - return { - - 'fields': json['fields'] == null ? undefined : (mapValues(json['fields'], CommonRichValueFromJSON)), - }; -} + static readonly mapping: {[index: string]: string} | undefined = undefined; - export function CommonRichStructToJSON(json: any): CommonRichStruct { - return CommonRichStructToJSONTyped(json, false); - } + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "fields", + "baseName": "fields", + "type": "{ [key: string]: CommonRichValue; }", + "format": "" + } ]; - export function CommonRichStructToJSONTyped(value?: CommonRichStruct | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; + static getAttributeTypeMap() { + return CommonRichStruct.attributeTypeMap; } - return { - - 'fields': value['fields'] == null ? undefined : (mapValues(value['fields'], CommonRichValueToJSON)), - }; + public constructor() { + } } - diff --git a/src/models/CommonRichValue.ts b/src/models/CommonRichValue.ts index f639414..06445e5 100755 --- a/src/models/CommonRichValue.ts +++ b/src/models/CommonRichValue.ts @@ -1,10 +1,8 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Sentio API * Sentio Open API for query data * - * The version of the OpenAPI document: version not set + * OpenAPI spec version: version not set * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -12,172 +10,104 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime.js'; -import type { CommonRichValueNullValue } from './CommonRichValueNullValue.js'; -import { - CommonRichValueNullValueFromJSON, - CommonRichValueNullValueFromJSONTyped, - CommonRichValueNullValueToJSON, - CommonRichValueNullValueToJSONTyped, -} from './CommonRichValueNullValue.js'; -import type { CommonBigInteger } from './CommonBigInteger.js'; -import { - CommonBigIntegerFromJSON, - CommonBigIntegerFromJSONTyped, - CommonBigIntegerToJSON, - CommonBigIntegerToJSONTyped, -} from './CommonBigInteger.js'; -import type { CommonRichValueList } from './CommonRichValueList.js'; -import { - CommonRichValueListFromJSON, - CommonRichValueListFromJSONTyped, - CommonRichValueListToJSON, - CommonRichValueListToJSONTyped, -} from './CommonRichValueList.js'; -import type { CommonRichStruct } from './CommonRichStruct.js'; -import { - CommonRichStructFromJSON, - CommonRichStructFromJSONTyped, - CommonRichStructToJSON, - CommonRichStructToJSONTyped, -} from './CommonRichStruct.js'; -import type { CommonBigDecimal } from './CommonBigDecimal.js'; -import { - CommonBigDecimalFromJSON, - CommonBigDecimalFromJSONTyped, - CommonBigDecimalToJSON, - CommonBigDecimalToJSONTyped, -} from './CommonBigDecimal.js'; +import { CommonBigDecimal } from '../models/CommonBigDecimal.js'; +import { CommonBigInteger } from '../models/CommonBigInteger.js'; +import { CommonRichStruct } from '../models/CommonRichStruct.js'; +import { CommonRichValueList } from '../models/CommonRichValueList.js'; +import { CommonRichValueNullValue } from '../models/CommonRichValueNullValue.js'; +import { HttpFile } from '../http/http.js'; -/** - * - * @export - * @interface CommonRichValue - */ -export interface CommonRichValue { - /** - * - * @type {CommonRichValueNullValue} - * @memberof CommonRichValue - */ - nullValue?: CommonRichValueNullValue; - /** - * - * @type {number} - * @memberof CommonRichValue - */ - intValue?: number; - /** - * - * @type {number} - * @memberof CommonRichValue - */ - floatValue?: number; - /** - * - * @type {string} - * @memberof CommonRichValue - */ - bytesValue?: string; - /** - * - * @type {boolean} - * @memberof CommonRichValue - */ - boolValue?: boolean; - /** - * - * @type {string} - * @memberof CommonRichValue - */ - stringValue?: string; - /** - * - * @type {Date} - * @memberof CommonRichValue - */ - timestampValue?: Date; - /** - * - * @type {CommonBigInteger} - * @memberof CommonRichValue - */ - bigintValue?: CommonBigInteger; - /** - * - * @type {CommonBigDecimal} - * @memberof CommonRichValue - */ - bigdecimalValue?: CommonBigDecimal; - /** - * - * @type {CommonRichValueList} - * @memberof CommonRichValue - */ - listValue?: CommonRichValueList; - /** - * - * @type {CommonRichStruct} - * @memberof CommonRichValue - */ - structValue?: CommonRichStruct; -} +export class CommonRichValue { + 'nullValue'?: CommonRichValueNullValue; + 'intValue'?: number; + 'floatValue'?: number; + 'bytesValue'?: string; + 'boolValue'?: boolean; + 'stringValue'?: string; + 'timestampValue'?: Date; + 'bigintValue'?: CommonBigInteger; + 'bigdecimalValue'?: CommonBigDecimal; + 'listValue'?: CommonRichValueList; + 'structValue'?: CommonRichStruct; + static readonly discriminator: string | undefined = undefined; + static readonly mapping: {[index: string]: string} | undefined = undefined; -/** - * Check if a given object implements the CommonRichValue interface. - */ -export function instanceOfCommonRichValue(value: object): value is CommonRichValue { - return true; -} + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "nullValue", + "baseName": "nullValue", + "type": "CommonRichValueNullValue", + "format": "" + }, + { + "name": "intValue", + "baseName": "intValue", + "type": "number", + "format": "int32" + }, + { + "name": "floatValue", + "baseName": "floatValue", + "type": "number", + "format": "double" + }, + { + "name": "bytesValue", + "baseName": "bytesValue", + "type": "string", + "format": "byte" + }, + { + "name": "boolValue", + "baseName": "boolValue", + "type": "boolean", + "format": "" + }, + { + "name": "stringValue", + "baseName": "stringValue", + "type": "string", + "format": "" + }, + { + "name": "timestampValue", + "baseName": "timestampValue", + "type": "Date", + "format": "date-time" + }, + { + "name": "bigintValue", + "baseName": "bigintValue", + "type": "CommonBigInteger", + "format": "" + }, + { + "name": "bigdecimalValue", + "baseName": "bigdecimalValue", + "type": "CommonBigDecimal", + "format": "" + }, + { + "name": "listValue", + "baseName": "listValue", + "type": "CommonRichValueList", + "format": "" + }, + { + "name": "structValue", + "baseName": "structValue", + "type": "CommonRichStruct", + "format": "" + } ]; -export function CommonRichValueFromJSON(json: any): CommonRichValue { - return CommonRichValueFromJSONTyped(json, false); -} - -export function CommonRichValueFromJSONTyped(json: any, ignoreDiscriminator: boolean): CommonRichValue { - if (json == null) { - return json; + static getAttributeTypeMap() { + return CommonRichValue.attributeTypeMap; } - return { - - 'nullValue': json['nullValue'] == null ? undefined : CommonRichValueNullValueFromJSON(json['nullValue']), - 'intValue': json['intValue'] == null ? undefined : json['intValue'], - 'floatValue': json['floatValue'] == null ? undefined : json['floatValue'], - 'bytesValue': json['bytesValue'] == null ? undefined : json['bytesValue'], - 'boolValue': json['boolValue'] == null ? undefined : json['boolValue'], - 'stringValue': json['stringValue'] == null ? undefined : json['stringValue'], - 'timestampValue': json['timestampValue'] == null ? undefined : (new Date(json['timestampValue'])), - 'bigintValue': json['bigintValue'] == null ? undefined : CommonBigIntegerFromJSON(json['bigintValue']), - 'bigdecimalValue': json['bigdecimalValue'] == null ? undefined : CommonBigDecimalFromJSON(json['bigdecimalValue']), - 'listValue': json['listValue'] == null ? undefined : CommonRichValueListFromJSON(json['listValue']), - 'structValue': json['structValue'] == null ? undefined : CommonRichStructFromJSON(json['structValue']), - }; -} - export function CommonRichValueToJSON(json: any): CommonRichValue { - return CommonRichValueToJSONTyped(json, false); - } - - export function CommonRichValueToJSONTyped(value?: CommonRichValue | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; + public constructor() { } - - return { - - 'nullValue': CommonRichValueNullValueToJSON(value['nullValue']), - 'intValue': value['intValue'], - 'floatValue': value['floatValue'], - 'bytesValue': value['bytesValue'], - 'boolValue': value['boolValue'], - 'stringValue': value['stringValue'], - 'timestampValue': value['timestampValue'] == null ? undefined : ((value['timestampValue']).toISOString()), - 'bigintValue': CommonBigIntegerToJSON(value['bigintValue']), - 'bigdecimalValue': CommonBigDecimalToJSON(value['bigdecimalValue']), - 'listValue': CommonRichValueListToJSON(value['listValue']), - 'structValue': CommonRichStructToJSON(value['structValue']), - }; } + diff --git a/src/models/CommonRichValueList.ts b/src/models/CommonRichValueList.ts index 4d41777..a7cc265 100755 --- a/src/models/CommonRichValueList.ts +++ b/src/models/CommonRichValueList.ts @@ -1,10 +1,8 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Sentio API * Sentio Open API for query data * - * The version of the OpenAPI document: version not set + * OpenAPI spec version: version not set * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -12,62 +10,28 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime.js'; -import type { CommonRichValue } from './CommonRichValue.js'; -import { - CommonRichValueFromJSON, - CommonRichValueFromJSONTyped, - CommonRichValueToJSON, - CommonRichValueToJSONTyped, -} from './CommonRichValue.js'; +import { CommonRichValue } from '../models/CommonRichValue.js'; +import { HttpFile } from '../http/http.js'; -/** - * - * @export - * @interface CommonRichValueList - */ -export interface CommonRichValueList { - /** - * - * @type {Array} - * @memberof CommonRichValueList - */ - values?: Array; -} +export class CommonRichValueList { + 'values'?: Array; -/** - * Check if a given object implements the CommonRichValueList interface. - */ -export function instanceOfCommonRichValueList(value: object): value is CommonRichValueList { - return true; -} + static readonly discriminator: string | undefined = undefined; -export function CommonRichValueListFromJSON(json: any): CommonRichValueList { - return CommonRichValueListFromJSONTyped(json, false); -} - -export function CommonRichValueListFromJSONTyped(json: any, ignoreDiscriminator: boolean): CommonRichValueList { - if (json == null) { - return json; - } - return { - - 'values': json['values'] == null ? undefined : ((json['values'] as Array).map(CommonRichValueFromJSON)), - }; -} + static readonly mapping: {[index: string]: string} | undefined = undefined; - export function CommonRichValueListToJSON(json: any): CommonRichValueList { - return CommonRichValueListToJSONTyped(json, false); - } + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "values", + "baseName": "values", + "type": "Array", + "format": "" + } ]; - export function CommonRichValueListToJSONTyped(value?: CommonRichValueList | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; + static getAttributeTypeMap() { + return CommonRichValueList.attributeTypeMap; } - return { - - 'values': value['values'] == null ? undefined : ((value['values'] as Array).map(CommonRichValueToJSON)), - }; + public constructor() { + } } - diff --git a/src/models/CommonRichValueNullValue.ts b/src/models/CommonRichValueNullValue.ts index 11263cb..2b042ad 100755 --- a/src/models/CommonRichValueNullValue.ts +++ b/src/models/CommonRichValueNullValue.ts @@ -1,10 +1,8 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Sentio API * Sentio Open API for query data * - * The version of the OpenAPI document: version not set + * OpenAPI spec version: version not set * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -12,41 +10,8 @@ * Do not edit the class manually. */ +import { HttpFile } from '../http/http.js'; -/** - * - * @export - */ -export const CommonRichValueNullValue = { - NullValue: 'NULL_VALUE' -} as const; -export type CommonRichValueNullValue = typeof CommonRichValueNullValue[keyof typeof CommonRichValueNullValue]; - - -export function instanceOfCommonRichValueNullValue(value: any): boolean { - for (const key in CommonRichValueNullValue) { - if (Object.prototype.hasOwnProperty.call(CommonRichValueNullValue, key)) { - if (CommonRichValueNullValue[key as keyof typeof CommonRichValueNullValue] === value) { - return true; - } - } - } - return false; -} - -export function CommonRichValueNullValueFromJSON(json: any): CommonRichValueNullValue { - return CommonRichValueNullValueFromJSONTyped(json, false); +export enum CommonRichValueNullValue { + NullValue = 'NULL_VALUE' } - -export function CommonRichValueNullValueFromJSONTyped(json: any, ignoreDiscriminator: boolean): CommonRichValueNullValue { - return json as CommonRichValueNullValue; -} - -export function CommonRichValueNullValueToJSON(value?: CommonRichValueNullValue | null): any { - return value as any; -} - -export function CommonRichValueNullValueToJSONTyped(value: any, ignoreDiscriminator: boolean): CommonRichValueNullValue { - return value as CommonRichValueNullValue; -} - diff --git a/src/models/CommonSegmentParameter.ts b/src/models/CommonSegmentParameter.ts index 534c5f4..ded417d 100755 --- a/src/models/CommonSegmentParameter.ts +++ b/src/models/CommonSegmentParameter.ts @@ -1,10 +1,8 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Sentio API * Sentio Open API for query data * - * The version of the OpenAPI document: version not set + * OpenAPI spec version: version not set * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -12,62 +10,34 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime.js'; -/** - * - * @export - * @interface CommonSegmentParameter - */ -export interface CommonSegmentParameter { - /** - * - * @type {string} - * @memberof CommonSegmentParameter - */ - cohortId?: string; - /** - * - * @type {boolean} - * @memberof CommonSegmentParameter - */ - allUsers?: boolean; -} +import { HttpFile } from '../http/http.js'; -/** - * Check if a given object implements the CommonSegmentParameter interface. - */ -export function instanceOfCommonSegmentParameter(value: object): value is CommonSegmentParameter { - return true; -} +export class CommonSegmentParameter { + 'cohortId'?: string; + 'allUsers'?: boolean; -export function CommonSegmentParameterFromJSON(json: any): CommonSegmentParameter { - return CommonSegmentParameterFromJSONTyped(json, false); -} + static readonly discriminator: string | undefined = undefined; -export function CommonSegmentParameterFromJSONTyped(json: any, ignoreDiscriminator: boolean): CommonSegmentParameter { - if (json == null) { - return json; - } - return { - - 'cohortId': json['cohortId'] == null ? undefined : json['cohortId'], - 'allUsers': json['allUsers'] == null ? undefined : json['allUsers'], - }; -} + static readonly mapping: {[index: string]: string} | undefined = undefined; - export function CommonSegmentParameterToJSON(json: any): CommonSegmentParameter { - return CommonSegmentParameterToJSONTyped(json, false); - } + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "cohortId", + "baseName": "cohortId", + "type": "string", + "format": "" + }, + { + "name": "allUsers", + "baseName": "allUsers", + "type": "boolean", + "format": "" + } ]; - export function CommonSegmentParameterToJSONTyped(value?: CommonSegmentParameter | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; + static getAttributeTypeMap() { + return CommonSegmentParameter.attributeTypeMap; } - return { - - 'cohortId': value['cohortId'], - 'allUsers': value['allUsers'], - }; + public constructor() { + } } - diff --git a/src/models/CommonSegmentationQuery.ts b/src/models/CommonSegmentationQuery.ts index 171413f..9bc2237 100755 --- a/src/models/CommonSegmentationQuery.ts +++ b/src/models/CommonSegmentationQuery.ts @@ -1,10 +1,8 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Sentio API * Sentio Open API for query data * - * The version of the OpenAPI document: version not set + * OpenAPI spec version: version not set * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -12,147 +10,87 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime.js'; -import type { CommonSegmentationQuerySelectorExpr } from './CommonSegmentationQuerySelectorExpr.js'; -import { - CommonSegmentationQuerySelectorExprFromJSON, - CommonSegmentationQuerySelectorExprFromJSONTyped, - CommonSegmentationQuerySelectorExprToJSON, - CommonSegmentationQuerySelectorExprToJSONTyped, -} from './CommonSegmentationQuerySelectorExpr.js'; -import type { CommonSegmentationQueryResource } from './CommonSegmentationQueryResource.js'; -import { - CommonSegmentationQueryResourceFromJSON, - CommonSegmentationQueryResourceFromJSONTyped, - CommonSegmentationQueryResourceToJSON, - CommonSegmentationQueryResourceToJSONTyped, -} from './CommonSegmentationQueryResource.js'; -import type { CommonFunction } from './CommonFunction.js'; -import { - CommonFunctionFromJSON, - CommonFunctionFromJSONTyped, - CommonFunctionToJSON, - CommonFunctionToJSONTyped, -} from './CommonFunction.js'; -import type { CommonSegmentationQueryAggregation } from './CommonSegmentationQueryAggregation.js'; -import { - CommonSegmentationQueryAggregationFromJSON, - CommonSegmentationQueryAggregationFromJSONTyped, - CommonSegmentationQueryAggregationToJSON, - CommonSegmentationQueryAggregationToJSONTyped, -} from './CommonSegmentationQueryAggregation.js'; +import { CommonFunction } from '../models/CommonFunction.js'; +import { CommonSegmentationQueryAggregation } from '../models/CommonSegmentationQueryAggregation.js'; +import { CommonSegmentationQueryResource } from '../models/CommonSegmentationQueryResource.js'; +import { CommonSegmentationQuerySelectorExpr } from '../models/CommonSegmentationQuerySelectorExpr.js'; +import { HttpFile } from '../http/http.js'; -/** - * - * @export - * @interface CommonSegmentationQuery - */ -export interface CommonSegmentationQuery { - /** - * - * @type {CommonSegmentationQueryResource} - * @memberof CommonSegmentationQuery - */ - resource?: CommonSegmentationQueryResource; - /** - * - * @type {string} - * @memberof CommonSegmentationQuery - */ - alias?: string; - /** - * - * @type {string} - * @memberof CommonSegmentationQuery - */ - id?: string; - /** - * - * @type {CommonSegmentationQueryAggregation} - * @memberof CommonSegmentationQuery - */ - aggregation?: CommonSegmentationQueryAggregation; - /** - * - * @type {CommonSegmentationQuerySelectorExpr} - * @memberof CommonSegmentationQuery - */ - selectorExpr?: CommonSegmentationQuerySelectorExpr; - /** - * - * @type {Array} - * @memberof CommonSegmentationQuery - */ - groupBy?: Array; - /** - * - * @type {number} - * @memberof CommonSegmentationQuery - */ - limit?: number; - /** - * - * @type {Array} - * @memberof CommonSegmentationQuery - */ - functions?: Array; - /** - * - * @type {boolean} - * @memberof CommonSegmentationQuery - */ - disabled?: boolean; -} +export class CommonSegmentationQuery { + 'resource'?: CommonSegmentationQueryResource; + 'alias'?: string; + 'id'?: string; + 'aggregation'?: CommonSegmentationQueryAggregation; + 'selectorExpr'?: CommonSegmentationQuerySelectorExpr; + 'groupBy'?: Array; + 'limit'?: number; + 'functions'?: Array; + 'disabled'?: boolean; -/** - * Check if a given object implements the CommonSegmentationQuery interface. - */ -export function instanceOfCommonSegmentationQuery(value: object): value is CommonSegmentationQuery { - return true; -} + static readonly discriminator: string | undefined = undefined; -export function CommonSegmentationQueryFromJSON(json: any): CommonSegmentationQuery { - return CommonSegmentationQueryFromJSONTyped(json, false); -} - -export function CommonSegmentationQueryFromJSONTyped(json: any, ignoreDiscriminator: boolean): CommonSegmentationQuery { - if (json == null) { - return json; - } - return { - - 'resource': json['resource'] == null ? undefined : CommonSegmentationQueryResourceFromJSON(json['resource']), - 'alias': json['alias'] == null ? undefined : json['alias'], - 'id': json['id'] == null ? undefined : json['id'], - 'aggregation': json['aggregation'] == null ? undefined : CommonSegmentationQueryAggregationFromJSON(json['aggregation']), - 'selectorExpr': json['selectorExpr'] == null ? undefined : CommonSegmentationQuerySelectorExprFromJSON(json['selectorExpr']), - 'groupBy': json['groupBy'] == null ? undefined : json['groupBy'], - 'limit': json['limit'] == null ? undefined : json['limit'], - 'functions': json['functions'] == null ? undefined : ((json['functions'] as Array).map(CommonFunctionFromJSON)), - 'disabled': json['disabled'] == null ? undefined : json['disabled'], - }; -} + static readonly mapping: {[index: string]: string} | undefined = undefined; - export function CommonSegmentationQueryToJSON(json: any): CommonSegmentationQuery { - return CommonSegmentationQueryToJSONTyped(json, false); - } + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "resource", + "baseName": "resource", + "type": "CommonSegmentationQueryResource", + "format": "" + }, + { + "name": "alias", + "baseName": "alias", + "type": "string", + "format": "" + }, + { + "name": "id", + "baseName": "id", + "type": "string", + "format": "" + }, + { + "name": "aggregation", + "baseName": "aggregation", + "type": "CommonSegmentationQueryAggregation", + "format": "" + }, + { + "name": "selectorExpr", + "baseName": "selectorExpr", + "type": "CommonSegmentationQuerySelectorExpr", + "format": "" + }, + { + "name": "groupBy", + "baseName": "groupBy", + "type": "Array", + "format": "" + }, + { + "name": "limit", + "baseName": "limit", + "type": "number", + "format": "int32" + }, + { + "name": "functions", + "baseName": "functions", + "type": "Array", + "format": "" + }, + { + "name": "disabled", + "baseName": "disabled", + "type": "boolean", + "format": "" + } ]; - export function CommonSegmentationQueryToJSONTyped(value?: CommonSegmentationQuery | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; + static getAttributeTypeMap() { + return CommonSegmentationQuery.attributeTypeMap; } - return { - - 'resource': CommonSegmentationQueryResourceToJSON(value['resource']), - 'alias': value['alias'], - 'id': value['id'], - 'aggregation': CommonSegmentationQueryAggregationToJSON(value['aggregation']), - 'selectorExpr': CommonSegmentationQuerySelectorExprToJSON(value['selectorExpr']), - 'groupBy': value['groupBy'], - 'limit': value['limit'], - 'functions': value['functions'] == null ? undefined : ((value['functions'] as Array).map(CommonFunctionToJSON)), - 'disabled': value['disabled'], - }; + public constructor() { + } } - diff --git a/src/models/CommonSegmentationQueryAggregation.ts b/src/models/CommonSegmentationQueryAggregation.ts index 2d6d81e..7f34093 100755 --- a/src/models/CommonSegmentationQueryAggregation.ts +++ b/src/models/CommonSegmentationQueryAggregation.ts @@ -1,10 +1,8 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Sentio API * Sentio Open API for query data * - * The version of the OpenAPI document: version not set + * OpenAPI spec version: version not set * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -12,93 +10,50 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime.js'; -import type { CommonSegmentationQueryAggregationAggregateProperties } from './CommonSegmentationQueryAggregationAggregateProperties.js'; -import { - CommonSegmentationQueryAggregationAggregatePropertiesFromJSON, - CommonSegmentationQueryAggregationAggregatePropertiesFromJSONTyped, - CommonSegmentationQueryAggregationAggregatePropertiesToJSON, - CommonSegmentationQueryAggregationAggregatePropertiesToJSONTyped, -} from './CommonSegmentationQueryAggregationAggregateProperties.js'; -import type { CommonSegmentationQueryAggregationCountUnique } from './CommonSegmentationQueryAggregationCountUnique.js'; -import { - CommonSegmentationQueryAggregationCountUniqueFromJSON, - CommonSegmentationQueryAggregationCountUniqueFromJSONTyped, - CommonSegmentationQueryAggregationCountUniqueToJSON, - CommonSegmentationQueryAggregationCountUniqueToJSONTyped, -} from './CommonSegmentationQueryAggregationCountUnique.js'; - -/** - * - * @export - * @interface CommonSegmentationQueryAggregation - */ -export interface CommonSegmentationQueryAggregation { - /** - * - * @type {object} - * @memberof CommonSegmentationQueryAggregation - */ - total?: object; - /** - * - * @type {object} - * @memberof CommonSegmentationQueryAggregation - */ - unique?: object; - /** - * - * @type {CommonSegmentationQueryAggregationCountUnique} - * @memberof CommonSegmentationQueryAggregation - */ - countUnique?: CommonSegmentationQueryAggregationCountUnique; - /** - * - * @type {CommonSegmentationQueryAggregationAggregateProperties} - * @memberof CommonSegmentationQueryAggregation - */ - aggregateProperties?: CommonSegmentationQueryAggregationAggregateProperties; -} - -/** - * Check if a given object implements the CommonSegmentationQueryAggregation interface. - */ -export function instanceOfCommonSegmentationQueryAggregation(value: object): value is CommonSegmentationQueryAggregation { - return true; -} - -export function CommonSegmentationQueryAggregationFromJSON(json: any): CommonSegmentationQueryAggregation { - return CommonSegmentationQueryAggregationFromJSONTyped(json, false); -} - -export function CommonSegmentationQueryAggregationFromJSONTyped(json: any, ignoreDiscriminator: boolean): CommonSegmentationQueryAggregation { - if (json == null) { - return json; +import { CommonSegmentationQueryAggregationAggregateProperties } from '../models/CommonSegmentationQueryAggregationAggregateProperties.js'; +import { CommonSegmentationQueryAggregationCountUnique } from '../models/CommonSegmentationQueryAggregationCountUnique.js'; +import { HttpFile } from '../http/http.js'; + +export class CommonSegmentationQueryAggregation { + 'total'?: any; + 'unique'?: any; + 'countUnique'?: CommonSegmentationQueryAggregationCountUnique; + 'aggregateProperties'?: CommonSegmentationQueryAggregationAggregateProperties; + + static readonly discriminator: string | undefined = undefined; + + static readonly mapping: {[index: string]: string} | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "total", + "baseName": "total", + "type": "any", + "format": "" + }, + { + "name": "unique", + "baseName": "unique", + "type": "any", + "format": "" + }, + { + "name": "countUnique", + "baseName": "countUnique", + "type": "CommonSegmentationQueryAggregationCountUnique", + "format": "" + }, + { + "name": "aggregateProperties", + "baseName": "aggregateProperties", + "type": "CommonSegmentationQueryAggregationAggregateProperties", + "format": "" + } ]; + + static getAttributeTypeMap() { + return CommonSegmentationQueryAggregation.attributeTypeMap; } - return { - - 'total': json['total'] == null ? undefined : json['total'], - 'unique': json['unique'] == null ? undefined : json['unique'], - 'countUnique': json['countUnique'] == null ? undefined : CommonSegmentationQueryAggregationCountUniqueFromJSON(json['countUnique']), - 'aggregateProperties': json['aggregateProperties'] == null ? undefined : CommonSegmentationQueryAggregationAggregatePropertiesFromJSON(json['aggregateProperties']), - }; -} - - export function CommonSegmentationQueryAggregationToJSON(json: any): CommonSegmentationQueryAggregation { - return CommonSegmentationQueryAggregationToJSONTyped(json, false); - } - export function CommonSegmentationQueryAggregationToJSONTyped(value?: CommonSegmentationQueryAggregation | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; + public constructor() { } - - return { - - 'total': value['total'], - 'unique': value['unique'], - 'countUnique': CommonSegmentationQueryAggregationCountUniqueToJSON(value['countUnique']), - 'aggregateProperties': CommonSegmentationQueryAggregationAggregatePropertiesToJSON(value['aggregateProperties']), - }; } - diff --git a/src/models/CommonSegmentationQueryAggregationAggregateProperties.ts b/src/models/CommonSegmentationQueryAggregationAggregateProperties.ts index 44a9f85..a2c3824 100755 --- a/src/models/CommonSegmentationQueryAggregationAggregateProperties.ts +++ b/src/models/CommonSegmentationQueryAggregationAggregateProperties.ts @@ -1,10 +1,8 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Sentio API * Sentio Open API for query data * - * The version of the OpenAPI document: version not set + * OpenAPI spec version: version not set * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -12,72 +10,37 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime.js'; -import type { CommonSegmentationQueryAggregationAggregatePropertiesAggregationType } from './CommonSegmentationQueryAggregationAggregatePropertiesAggregationType.js'; -import { - CommonSegmentationQueryAggregationAggregatePropertiesAggregationTypeFromJSON, - CommonSegmentationQueryAggregationAggregatePropertiesAggregationTypeFromJSONTyped, - CommonSegmentationQueryAggregationAggregatePropertiesAggregationTypeToJSON, - CommonSegmentationQueryAggregationAggregatePropertiesAggregationTypeToJSONTyped, -} from './CommonSegmentationQueryAggregationAggregatePropertiesAggregationType.js'; - -/** - * - * @export - * @interface CommonSegmentationQueryAggregationAggregateProperties - */ -export interface CommonSegmentationQueryAggregationAggregateProperties { - /** - * - * @type {CommonSegmentationQueryAggregationAggregatePropertiesAggregationType} - * @memberof CommonSegmentationQueryAggregationAggregateProperties - */ - type?: CommonSegmentationQueryAggregationAggregatePropertiesAggregationType; - /** - * - * @type {string} - * @memberof CommonSegmentationQueryAggregationAggregateProperties - */ - propertyName?: string; -} - - - -/** - * Check if a given object implements the CommonSegmentationQueryAggregationAggregateProperties interface. - */ -export function instanceOfCommonSegmentationQueryAggregationAggregateProperties(value: object): value is CommonSegmentationQueryAggregationAggregateProperties { - return true; -} - -export function CommonSegmentationQueryAggregationAggregatePropertiesFromJSON(json: any): CommonSegmentationQueryAggregationAggregateProperties { - return CommonSegmentationQueryAggregationAggregatePropertiesFromJSONTyped(json, false); -} - -export function CommonSegmentationQueryAggregationAggregatePropertiesFromJSONTyped(json: any, ignoreDiscriminator: boolean): CommonSegmentationQueryAggregationAggregateProperties { - if (json == null) { - return json; +import { CommonSegmentationQueryAggregationAggregatePropertiesAggregationType } from '../models/CommonSegmentationQueryAggregationAggregatePropertiesAggregationType.js'; +import { HttpFile } from '../http/http.js'; + +export class CommonSegmentationQueryAggregationAggregateProperties { + 'type'?: CommonSegmentationQueryAggregationAggregatePropertiesAggregationType; + 'propertyName'?: string; + + static readonly discriminator: string | undefined = undefined; + + static readonly mapping: {[index: string]: string} | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "type", + "baseName": "type", + "type": "CommonSegmentationQueryAggregationAggregatePropertiesAggregationType", + "format": "" + }, + { + "name": "propertyName", + "baseName": "propertyName", + "type": "string", + "format": "" + } ]; + + static getAttributeTypeMap() { + return CommonSegmentationQueryAggregationAggregateProperties.attributeTypeMap; } - return { - - 'type': json['type'] == null ? undefined : CommonSegmentationQueryAggregationAggregatePropertiesAggregationTypeFromJSON(json['type']), - 'propertyName': json['propertyName'] == null ? undefined : json['propertyName'], - }; -} - - export function CommonSegmentationQueryAggregationAggregatePropertiesToJSON(json: any): CommonSegmentationQueryAggregationAggregateProperties { - return CommonSegmentationQueryAggregationAggregatePropertiesToJSONTyped(json, false); - } - export function CommonSegmentationQueryAggregationAggregatePropertiesToJSONTyped(value?: CommonSegmentationQueryAggregationAggregateProperties | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; + public constructor() { } - - return { - - 'type': CommonSegmentationQueryAggregationAggregatePropertiesAggregationTypeToJSON(value['type']), - 'propertyName': value['propertyName'], - }; } + diff --git a/src/models/CommonSegmentationQueryAggregationAggregatePropertiesAggregationType.ts b/src/models/CommonSegmentationQueryAggregationAggregatePropertiesAggregationType.ts index fc05447..d0bb864 100755 --- a/src/models/CommonSegmentationQueryAggregationAggregatePropertiesAggregationType.ts +++ b/src/models/CommonSegmentationQueryAggregationAggregatePropertiesAggregationType.ts @@ -1,10 +1,8 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Sentio API * Sentio Open API for query data * - * The version of the OpenAPI document: version not set + * OpenAPI spec version: version not set * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -12,58 +10,25 @@ * Do not edit the class manually. */ - -/** - * - * @export - */ -export const CommonSegmentationQueryAggregationAggregatePropertiesAggregationType = { - Sum: 'SUM', - CumulativeSum: 'CUMULATIVE_SUM', - Avg: 'AVG', - Median: 'MEDIAN', - Min: 'MIN', - Max: 'MAX', - DistinctCount: 'DISTINCT_COUNT', - CumulativeDistinctCount: 'CUMULATIVE_DISTINCT_COUNT', - CumulativeCount: 'CUMULATIVE_COUNT', - Last: 'LAST', - CumulativeLast: 'CUMULATIVE_LAST', - First: 'FIRST', - CumulativeFirst: 'CUMULATIVE_FIRST', - Percentile25Th: 'PERCENTILE_25TH', - Percentile75Th: 'PERCENTILE_75TH', - Percentile90Th: 'PERCENTILE_90TH', - Percentile95Th: 'PERCENTILE_95TH', - Percentile99Th: 'PERCENTILE_99TH' -} as const; -export type CommonSegmentationQueryAggregationAggregatePropertiesAggregationType = typeof CommonSegmentationQueryAggregationAggregatePropertiesAggregationType[keyof typeof CommonSegmentationQueryAggregationAggregatePropertiesAggregationType]; - - -export function instanceOfCommonSegmentationQueryAggregationAggregatePropertiesAggregationType(value: any): boolean { - for (const key in CommonSegmentationQueryAggregationAggregatePropertiesAggregationType) { - if (Object.prototype.hasOwnProperty.call(CommonSegmentationQueryAggregationAggregatePropertiesAggregationType, key)) { - if (CommonSegmentationQueryAggregationAggregatePropertiesAggregationType[key as keyof typeof CommonSegmentationQueryAggregationAggregatePropertiesAggregationType] === value) { - return true; - } - } - } - return false; -} - -export function CommonSegmentationQueryAggregationAggregatePropertiesAggregationTypeFromJSON(json: any): CommonSegmentationQueryAggregationAggregatePropertiesAggregationType { - return CommonSegmentationQueryAggregationAggregatePropertiesAggregationTypeFromJSONTyped(json, false); +import { HttpFile } from '../http/http.js'; + +export enum CommonSegmentationQueryAggregationAggregatePropertiesAggregationType { + Sum = 'SUM', + CumulativeSum = 'CUMULATIVE_SUM', + Avg = 'AVG', + Median = 'MEDIAN', + Min = 'MIN', + Max = 'MAX', + DistinctCount = 'DISTINCT_COUNT', + CumulativeDistinctCount = 'CUMULATIVE_DISTINCT_COUNT', + CumulativeCount = 'CUMULATIVE_COUNT', + Last = 'LAST', + CumulativeLast = 'CUMULATIVE_LAST', + First = 'FIRST', + CumulativeFirst = 'CUMULATIVE_FIRST', + Percentile25Th = 'PERCENTILE_25TH', + Percentile75Th = 'PERCENTILE_75TH', + Percentile90Th = 'PERCENTILE_90TH', + Percentile95Th = 'PERCENTILE_95TH', + Percentile99Th = 'PERCENTILE_99TH' } - -export function CommonSegmentationQueryAggregationAggregatePropertiesAggregationTypeFromJSONTyped(json: any, ignoreDiscriminator: boolean): CommonSegmentationQueryAggregationAggregatePropertiesAggregationType { - return json as CommonSegmentationQueryAggregationAggregatePropertiesAggregationType; -} - -export function CommonSegmentationQueryAggregationAggregatePropertiesAggregationTypeToJSON(value?: CommonSegmentationQueryAggregationAggregatePropertiesAggregationType | null): any { - return value as any; -} - -export function CommonSegmentationQueryAggregationAggregatePropertiesAggregationTypeToJSONTyped(value: any, ignoreDiscriminator: boolean): CommonSegmentationQueryAggregationAggregatePropertiesAggregationType { - return value as CommonSegmentationQueryAggregationAggregatePropertiesAggregationType; -} - diff --git a/src/models/CommonSegmentationQueryAggregationCountUnique.ts b/src/models/CommonSegmentationQueryAggregationCountUnique.ts index ae6715a..07b73b5 100755 --- a/src/models/CommonSegmentationQueryAggregationCountUnique.ts +++ b/src/models/CommonSegmentationQueryAggregationCountUnique.ts @@ -1,10 +1,8 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Sentio API * Sentio Open API for query data * - * The version of the OpenAPI document: version not set + * OpenAPI spec version: version not set * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -12,62 +10,28 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime.js'; -import type { CommonDuration } from './CommonDuration.js'; -import { - CommonDurationFromJSON, - CommonDurationFromJSONTyped, - CommonDurationToJSON, - CommonDurationToJSONTyped, -} from './CommonDuration.js'; +import { CommonDuration } from '../models/CommonDuration.js'; +import { HttpFile } from '../http/http.js'; -/** - * - * @export - * @interface CommonSegmentationQueryAggregationCountUnique - */ -export interface CommonSegmentationQueryAggregationCountUnique { - /** - * - * @type {CommonDuration} - * @memberof CommonSegmentationQueryAggregationCountUnique - */ - duration?: CommonDuration; -} +export class CommonSegmentationQueryAggregationCountUnique { + 'duration'?: CommonDuration; -/** - * Check if a given object implements the CommonSegmentationQueryAggregationCountUnique interface. - */ -export function instanceOfCommonSegmentationQueryAggregationCountUnique(value: object): value is CommonSegmentationQueryAggregationCountUnique { - return true; -} + static readonly discriminator: string | undefined = undefined; -export function CommonSegmentationQueryAggregationCountUniqueFromJSON(json: any): CommonSegmentationQueryAggregationCountUnique { - return CommonSegmentationQueryAggregationCountUniqueFromJSONTyped(json, false); -} - -export function CommonSegmentationQueryAggregationCountUniqueFromJSONTyped(json: any, ignoreDiscriminator: boolean): CommonSegmentationQueryAggregationCountUnique { - if (json == null) { - return json; - } - return { - - 'duration': json['duration'] == null ? undefined : CommonDurationFromJSON(json['duration']), - }; -} + static readonly mapping: {[index: string]: string} | undefined = undefined; - export function CommonSegmentationQueryAggregationCountUniqueToJSON(json: any): CommonSegmentationQueryAggregationCountUnique { - return CommonSegmentationQueryAggregationCountUniqueToJSONTyped(json, false); - } + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "duration", + "baseName": "duration", + "type": "CommonDuration", + "format": "" + } ]; - export function CommonSegmentationQueryAggregationCountUniqueToJSONTyped(value?: CommonSegmentationQueryAggregationCountUnique | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; + static getAttributeTypeMap() { + return CommonSegmentationQueryAggregationCountUnique.attributeTypeMap; } - return { - - 'duration': CommonDurationToJSON(value['duration']), - }; + public constructor() { + } } - diff --git a/src/models/CommonSegmentationQueryResource.ts b/src/models/CommonSegmentationQueryResource.ts index fa92040..a68a40b 100755 --- a/src/models/CommonSegmentationQueryResource.ts +++ b/src/models/CommonSegmentationQueryResource.ts @@ -1,10 +1,8 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Sentio API * Sentio Open API for query data * - * The version of the OpenAPI document: version not set + * OpenAPI spec version: version not set * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -12,95 +10,52 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime.js'; -import type { CommonCohortsQuery } from './CommonCohortsQuery.js'; -import { - CommonCohortsQueryFromJSON, - CommonCohortsQueryFromJSONTyped, - CommonCohortsQueryToJSON, - CommonCohortsQueryToJSONTyped, -} from './CommonCohortsQuery.js'; -import type { CommonSegmentationQueryResourceType } from './CommonSegmentationQueryResourceType.js'; -import { - CommonSegmentationQueryResourceTypeFromJSON, - CommonSegmentationQueryResourceTypeFromJSONTyped, - CommonSegmentationQueryResourceTypeToJSON, - CommonSegmentationQueryResourceTypeToJSONTyped, -} from './CommonSegmentationQueryResourceType.js'; - -/** - * - * @export - * @interface CommonSegmentationQueryResource - */ -export interface CommonSegmentationQueryResource { - /** - * - * @type {string} - * @memberof CommonSegmentationQueryResource - */ - name?: string; - /** - * - * @type {CommonSegmentationQueryResourceType} - * @memberof CommonSegmentationQueryResource - */ - type?: CommonSegmentationQueryResourceType; - /** - * - * @type {string} - * @memberof CommonSegmentationQueryResource - */ - cohortsId?: string; - /** - * - * @type {CommonCohortsQuery} - * @memberof CommonSegmentationQueryResource - */ - cohortsQuery?: CommonCohortsQuery; -} - - - -/** - * Check if a given object implements the CommonSegmentationQueryResource interface. - */ -export function instanceOfCommonSegmentationQueryResource(value: object): value is CommonSegmentationQueryResource { - return true; -} - -export function CommonSegmentationQueryResourceFromJSON(json: any): CommonSegmentationQueryResource { - return CommonSegmentationQueryResourceFromJSONTyped(json, false); -} - -export function CommonSegmentationQueryResourceFromJSONTyped(json: any, ignoreDiscriminator: boolean): CommonSegmentationQueryResource { - if (json == null) { - return json; +import { CommonCohortsQuery } from '../models/CommonCohortsQuery.js'; +import { CommonSegmentationQueryResourceType } from '../models/CommonSegmentationQueryResourceType.js'; +import { HttpFile } from '../http/http.js'; + +export class CommonSegmentationQueryResource { + 'name'?: string; + 'type'?: CommonSegmentationQueryResourceType; + 'cohortsId'?: string; + 'cohortsQuery'?: CommonCohortsQuery; + + static readonly discriminator: string | undefined = undefined; + + static readonly mapping: {[index: string]: string} | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + }, + { + "name": "type", + "baseName": "type", + "type": "CommonSegmentationQueryResourceType", + "format": "" + }, + { + "name": "cohortsId", + "baseName": "cohortsId", + "type": "string", + "format": "" + }, + { + "name": "cohortsQuery", + "baseName": "cohortsQuery", + "type": "CommonCohortsQuery", + "format": "" + } ]; + + static getAttributeTypeMap() { + return CommonSegmentationQueryResource.attributeTypeMap; } - return { - - 'name': json['name'] == null ? undefined : json['name'], - 'type': json['type'] == null ? undefined : CommonSegmentationQueryResourceTypeFromJSON(json['type']), - 'cohortsId': json['cohortsId'] == null ? undefined : json['cohortsId'], - 'cohortsQuery': json['cohortsQuery'] == null ? undefined : CommonCohortsQueryFromJSON(json['cohortsQuery']), - }; -} - - export function CommonSegmentationQueryResourceToJSON(json: any): CommonSegmentationQueryResource { - return CommonSegmentationQueryResourceToJSONTyped(json, false); - } - export function CommonSegmentationQueryResourceToJSONTyped(value?: CommonSegmentationQueryResource | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; + public constructor() { } - - return { - - 'name': value['name'], - 'type': CommonSegmentationQueryResourceTypeToJSON(value['type']), - 'cohortsId': value['cohortsId'], - 'cohortsQuery': CommonCohortsQueryToJSON(value['cohortsQuery']), - }; } + diff --git a/src/models/CommonSegmentationQueryResourceType.ts b/src/models/CommonSegmentationQueryResourceType.ts index 6adc08e..d9eba31 100755 --- a/src/models/CommonSegmentationQueryResourceType.ts +++ b/src/models/CommonSegmentationQueryResourceType.ts @@ -1,10 +1,8 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Sentio API * Sentio Open API for query data * - * The version of the OpenAPI document: version not set + * OpenAPI spec version: version not set * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -12,42 +10,9 @@ * Do not edit the class manually. */ +import { HttpFile } from '../http/http.js'; -/** - * - * @export - */ -export const CommonSegmentationQueryResourceType = { - Events: 'EVENTS', - Cohorts: 'COHORTS' -} as const; -export type CommonSegmentationQueryResourceType = typeof CommonSegmentationQueryResourceType[keyof typeof CommonSegmentationQueryResourceType]; - - -export function instanceOfCommonSegmentationQueryResourceType(value: any): boolean { - for (const key in CommonSegmentationQueryResourceType) { - if (Object.prototype.hasOwnProperty.call(CommonSegmentationQueryResourceType, key)) { - if (CommonSegmentationQueryResourceType[key as keyof typeof CommonSegmentationQueryResourceType] === value) { - return true; - } - } - } - return false; -} - -export function CommonSegmentationQueryResourceTypeFromJSON(json: any): CommonSegmentationQueryResourceType { - return CommonSegmentationQueryResourceTypeFromJSONTyped(json, false); +export enum CommonSegmentationQueryResourceType { + Events = 'EVENTS', + Cohorts = 'COHORTS' } - -export function CommonSegmentationQueryResourceTypeFromJSONTyped(json: any, ignoreDiscriminator: boolean): CommonSegmentationQueryResourceType { - return json as CommonSegmentationQueryResourceType; -} - -export function CommonSegmentationQueryResourceTypeToJSON(value?: CommonSegmentationQueryResourceType | null): any { - return value as any; -} - -export function CommonSegmentationQueryResourceTypeToJSONTyped(value: any, ignoreDiscriminator: boolean): CommonSegmentationQueryResourceType { - return value as CommonSegmentationQueryResourceType; -} - diff --git a/src/models/CommonSegmentationQuerySelectorExpr.ts b/src/models/CommonSegmentationQuerySelectorExpr.ts index 7e6ce7c..9e5241f 100755 --- a/src/models/CommonSegmentationQuerySelectorExpr.ts +++ b/src/models/CommonSegmentationQuerySelectorExpr.ts @@ -1,10 +1,8 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Sentio API * Sentio Open API for query data * - * The version of the OpenAPI document: version not set + * OpenAPI spec version: version not set * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -12,77 +10,36 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime.js'; -import type { CommonSelector } from './CommonSelector.js'; -import { - CommonSelectorFromJSON, - CommonSelectorFromJSONTyped, - CommonSelectorToJSON, - CommonSelectorToJSONTyped, -} from './CommonSelector.js'; -import type { CommonSegmentationQuerySelectorExprLogicExpr } from './CommonSegmentationQuerySelectorExprLogicExpr.js'; -import { - CommonSegmentationQuerySelectorExprLogicExprFromJSON, - CommonSegmentationQuerySelectorExprLogicExprFromJSONTyped, - CommonSegmentationQuerySelectorExprLogicExprToJSON, - CommonSegmentationQuerySelectorExprLogicExprToJSONTyped, -} from './CommonSegmentationQuerySelectorExprLogicExpr.js'; - -/** - * - * @export - * @interface CommonSegmentationQuerySelectorExpr - */ -export interface CommonSegmentationQuerySelectorExpr { - /** - * - * @type {CommonSelector} - * @memberof CommonSegmentationQuerySelectorExpr - */ - selector?: CommonSelector; - /** - * - * @type {CommonSegmentationQuerySelectorExprLogicExpr} - * @memberof CommonSegmentationQuerySelectorExpr - */ - logicExpr?: CommonSegmentationQuerySelectorExprLogicExpr; -} - -/** - * Check if a given object implements the CommonSegmentationQuerySelectorExpr interface. - */ -export function instanceOfCommonSegmentationQuerySelectorExpr(value: object): value is CommonSegmentationQuerySelectorExpr { - return true; -} - -export function CommonSegmentationQuerySelectorExprFromJSON(json: any): CommonSegmentationQuerySelectorExpr { - return CommonSegmentationQuerySelectorExprFromJSONTyped(json, false); -} - -export function CommonSegmentationQuerySelectorExprFromJSONTyped(json: any, ignoreDiscriminator: boolean): CommonSegmentationQuerySelectorExpr { - if (json == null) { - return json; +import { CommonSegmentationQuerySelectorExprLogicExpr } from '../models/CommonSegmentationQuerySelectorExprLogicExpr.js'; +import { CommonSelector } from '../models/CommonSelector.js'; +import { HttpFile } from '../http/http.js'; + +export class CommonSegmentationQuerySelectorExpr { + 'selector'?: CommonSelector; + 'logicExpr'?: CommonSegmentationQuerySelectorExprLogicExpr; + + static readonly discriminator: string | undefined = undefined; + + static readonly mapping: {[index: string]: string} | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "selector", + "baseName": "selector", + "type": "CommonSelector", + "format": "" + }, + { + "name": "logicExpr", + "baseName": "logicExpr", + "type": "CommonSegmentationQuerySelectorExprLogicExpr", + "format": "" + } ]; + + static getAttributeTypeMap() { + return CommonSegmentationQuerySelectorExpr.attributeTypeMap; } - return { - - 'selector': json['selector'] == null ? undefined : CommonSelectorFromJSON(json['selector']), - 'logicExpr': json['logicExpr'] == null ? undefined : CommonSegmentationQuerySelectorExprLogicExprFromJSON(json['logicExpr']), - }; -} - - export function CommonSegmentationQuerySelectorExprToJSON(json: any): CommonSegmentationQuerySelectorExpr { - return CommonSegmentationQuerySelectorExprToJSONTyped(json, false); - } - export function CommonSegmentationQuerySelectorExprToJSONTyped(value?: CommonSegmentationQuerySelectorExpr | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; + public constructor() { } - - return { - - 'selector': CommonSelectorToJSON(value['selector']), - 'logicExpr': CommonSegmentationQuerySelectorExprLogicExprToJSON(value['logicExpr']), - }; } - diff --git a/src/models/CommonSegmentationQuerySelectorExprLogicExpr.ts b/src/models/CommonSegmentationQuerySelectorExprLogicExpr.ts index ade647d..995bf88 100755 --- a/src/models/CommonSegmentationQuerySelectorExprLogicExpr.ts +++ b/src/models/CommonSegmentationQuerySelectorExprLogicExpr.ts @@ -1,10 +1,8 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Sentio API * Sentio Open API for query data * - * The version of the OpenAPI document: version not set + * OpenAPI spec version: version not set * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -12,79 +10,38 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime.js'; -import type { CommonSegmentationQuerySelectorExpr } from './CommonSegmentationQuerySelectorExpr.js'; -import { - CommonSegmentationQuerySelectorExprFromJSON, - CommonSegmentationQuerySelectorExprFromJSONTyped, - CommonSegmentationQuerySelectorExprToJSON, - CommonSegmentationQuerySelectorExprToJSONTyped, -} from './CommonSegmentationQuerySelectorExpr.js'; -import type { CommonJoinOperator } from './CommonJoinOperator.js'; -import { - CommonJoinOperatorFromJSON, - CommonJoinOperatorFromJSONTyped, - CommonJoinOperatorToJSON, - CommonJoinOperatorToJSONTyped, -} from './CommonJoinOperator.js'; - -/** - * - * @export - * @interface CommonSegmentationQuerySelectorExprLogicExpr - */ -export interface CommonSegmentationQuerySelectorExprLogicExpr { - /** - * - * @type {Array} - * @memberof CommonSegmentationQuerySelectorExprLogicExpr - */ - expressions?: Array; - /** - * - * @type {CommonJoinOperator} - * @memberof CommonSegmentationQuerySelectorExprLogicExpr - */ - operator?: CommonJoinOperator; -} - - - -/** - * Check if a given object implements the CommonSegmentationQuerySelectorExprLogicExpr interface. - */ -export function instanceOfCommonSegmentationQuerySelectorExprLogicExpr(value: object): value is CommonSegmentationQuerySelectorExprLogicExpr { - return true; -} - -export function CommonSegmentationQuerySelectorExprLogicExprFromJSON(json: any): CommonSegmentationQuerySelectorExprLogicExpr { - return CommonSegmentationQuerySelectorExprLogicExprFromJSONTyped(json, false); -} - -export function CommonSegmentationQuerySelectorExprLogicExprFromJSONTyped(json: any, ignoreDiscriminator: boolean): CommonSegmentationQuerySelectorExprLogicExpr { - if (json == null) { - return json; +import { CommonJoinOperator } from '../models/CommonJoinOperator.js'; +import { CommonSegmentationQuerySelectorExpr } from '../models/CommonSegmentationQuerySelectorExpr.js'; +import { HttpFile } from '../http/http.js'; + +export class CommonSegmentationQuerySelectorExprLogicExpr { + 'expressions'?: Array; + 'operator'?: CommonJoinOperator; + + static readonly discriminator: string | undefined = undefined; + + static readonly mapping: {[index: string]: string} | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "expressions", + "baseName": "expressions", + "type": "Array", + "format": "" + }, + { + "name": "operator", + "baseName": "operator", + "type": "CommonJoinOperator", + "format": "" + } ]; + + static getAttributeTypeMap() { + return CommonSegmentationQuerySelectorExprLogicExpr.attributeTypeMap; } - return { - - 'expressions': json['expressions'] == null ? undefined : ((json['expressions'] as Array).map(CommonSegmentationQuerySelectorExprFromJSON)), - 'operator': json['operator'] == null ? undefined : CommonJoinOperatorFromJSON(json['operator']), - }; -} - - export function CommonSegmentationQuerySelectorExprLogicExprToJSON(json: any): CommonSegmentationQuerySelectorExprLogicExpr { - return CommonSegmentationQuerySelectorExprLogicExprToJSONTyped(json, false); - } - export function CommonSegmentationQuerySelectorExprLogicExprToJSONTyped(value?: CommonSegmentationQuerySelectorExprLogicExpr | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; + public constructor() { } - - return { - - 'expressions': value['expressions'] == null ? undefined : ((value['expressions'] as Array).map(CommonSegmentationQuerySelectorExprToJSON)), - 'operator': CommonJoinOperatorToJSON(value['operator']), - }; } + diff --git a/src/models/CommonSelector.ts b/src/models/CommonSelector.ts index 82ab75b..60430d7 100755 --- a/src/models/CommonSelector.ts +++ b/src/models/CommonSelector.ts @@ -1,10 +1,8 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Sentio API * Sentio Open API for query data * - * The version of the OpenAPI document: version not set + * OpenAPI spec version: version not set * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -12,87 +10,45 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime.js'; -import type { CommonSelectorOperatorType } from './CommonSelectorOperatorType.js'; -import { - CommonSelectorOperatorTypeFromJSON, - CommonSelectorOperatorTypeFromJSONTyped, - CommonSelectorOperatorTypeToJSON, - CommonSelectorOperatorTypeToJSONTyped, -} from './CommonSelectorOperatorType.js'; -import type { CommonAny } from './CommonAny.js'; -import { - CommonAnyFromJSON, - CommonAnyFromJSONTyped, - CommonAnyToJSON, - CommonAnyToJSONTyped, -} from './CommonAny.js'; - -/** - * - * @export - * @interface CommonSelector - */ -export interface CommonSelector { - /** - * - * @type {string} - * @memberof CommonSelector - */ - key?: string; - /** - * - * @type {CommonSelectorOperatorType} - * @memberof CommonSelector - */ - operator?: CommonSelectorOperatorType; - /** - * - * @type {Array} - * @memberof CommonSelector - */ - value?: Array; -} - - - -/** - * Check if a given object implements the CommonSelector interface. - */ -export function instanceOfCommonSelector(value: object): value is CommonSelector { - return true; -} - -export function CommonSelectorFromJSON(json: any): CommonSelector { - return CommonSelectorFromJSONTyped(json, false); -} - -export function CommonSelectorFromJSONTyped(json: any, ignoreDiscriminator: boolean): CommonSelector { - if (json == null) { - return json; +import { CommonAny } from '../models/CommonAny.js'; +import { CommonSelectorOperatorType } from '../models/CommonSelectorOperatorType.js'; +import { HttpFile } from '../http/http.js'; + +export class CommonSelector { + 'key'?: string; + 'operator'?: CommonSelectorOperatorType; + 'value'?: Array; + + static readonly discriminator: string | undefined = undefined; + + static readonly mapping: {[index: string]: string} | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "key", + "baseName": "key", + "type": "string", + "format": "" + }, + { + "name": "operator", + "baseName": "operator", + "type": "CommonSelectorOperatorType", + "format": "" + }, + { + "name": "value", + "baseName": "value", + "type": "Array", + "format": "" + } ]; + + static getAttributeTypeMap() { + return CommonSelector.attributeTypeMap; } - return { - - 'key': json['key'] == null ? undefined : json['key'], - 'operator': json['operator'] == null ? undefined : CommonSelectorOperatorTypeFromJSON(json['operator']), - 'value': json['value'] == null ? undefined : ((json['value'] as Array).map(CommonAnyFromJSON)), - }; -} - - export function CommonSelectorToJSON(json: any): CommonSelector { - return CommonSelectorToJSONTyped(json, false); - } - export function CommonSelectorToJSONTyped(value?: CommonSelector | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; + public constructor() { } - - return { - - 'key': value['key'], - 'operator': CommonSelectorOperatorTypeToJSON(value['operator']), - 'value': value['value'] == null ? undefined : ((value['value'] as Array).map(CommonAnyToJSON)), - }; } + diff --git a/src/models/CommonSelectorExpr.ts b/src/models/CommonSelectorExpr.ts index 639e982..bffda76 100755 --- a/src/models/CommonSelectorExpr.ts +++ b/src/models/CommonSelectorExpr.ts @@ -1,10 +1,8 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Sentio API * Sentio Open API for query data * - * The version of the OpenAPI document: version not set + * OpenAPI spec version: version not set * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -12,77 +10,36 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime.js'; -import type { CommonSelectorExprLogicExpr } from './CommonSelectorExprLogicExpr.js'; -import { - CommonSelectorExprLogicExprFromJSON, - CommonSelectorExprLogicExprFromJSONTyped, - CommonSelectorExprLogicExprToJSON, - CommonSelectorExprLogicExprToJSONTyped, -} from './CommonSelectorExprLogicExpr.js'; -import type { CommonSelector } from './CommonSelector.js'; -import { - CommonSelectorFromJSON, - CommonSelectorFromJSONTyped, - CommonSelectorToJSON, - CommonSelectorToJSONTyped, -} from './CommonSelector.js'; - -/** - * - * @export - * @interface CommonSelectorExpr - */ -export interface CommonSelectorExpr { - /** - * - * @type {CommonSelector} - * @memberof CommonSelectorExpr - */ - selector?: CommonSelector; - /** - * - * @type {CommonSelectorExprLogicExpr} - * @memberof CommonSelectorExpr - */ - logicExpr?: CommonSelectorExprLogicExpr; -} - -/** - * Check if a given object implements the CommonSelectorExpr interface. - */ -export function instanceOfCommonSelectorExpr(value: object): value is CommonSelectorExpr { - return true; -} - -export function CommonSelectorExprFromJSON(json: any): CommonSelectorExpr { - return CommonSelectorExprFromJSONTyped(json, false); -} - -export function CommonSelectorExprFromJSONTyped(json: any, ignoreDiscriminator: boolean): CommonSelectorExpr { - if (json == null) { - return json; +import { CommonSelector } from '../models/CommonSelector.js'; +import { CommonSelectorExprLogicExpr } from '../models/CommonSelectorExprLogicExpr.js'; +import { HttpFile } from '../http/http.js'; + +export class CommonSelectorExpr { + 'selector'?: CommonSelector; + 'logicExpr'?: CommonSelectorExprLogicExpr; + + static readonly discriminator: string | undefined = undefined; + + static readonly mapping: {[index: string]: string} | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "selector", + "baseName": "selector", + "type": "CommonSelector", + "format": "" + }, + { + "name": "logicExpr", + "baseName": "logicExpr", + "type": "CommonSelectorExprLogicExpr", + "format": "" + } ]; + + static getAttributeTypeMap() { + return CommonSelectorExpr.attributeTypeMap; } - return { - - 'selector': json['selector'] == null ? undefined : CommonSelectorFromJSON(json['selector']), - 'logicExpr': json['logicExpr'] == null ? undefined : CommonSelectorExprLogicExprFromJSON(json['logicExpr']), - }; -} - - export function CommonSelectorExprToJSON(json: any): CommonSelectorExpr { - return CommonSelectorExprToJSONTyped(json, false); - } - export function CommonSelectorExprToJSONTyped(value?: CommonSelectorExpr | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; + public constructor() { } - - return { - - 'selector': CommonSelectorToJSON(value['selector']), - 'logicExpr': CommonSelectorExprLogicExprToJSON(value['logicExpr']), - }; } - diff --git a/src/models/CommonSelectorExprLogicExpr.ts b/src/models/CommonSelectorExprLogicExpr.ts index 4cc5b5b..6247a35 100755 --- a/src/models/CommonSelectorExprLogicExpr.ts +++ b/src/models/CommonSelectorExprLogicExpr.ts @@ -1,10 +1,8 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Sentio API * Sentio Open API for query data * - * The version of the OpenAPI document: version not set + * OpenAPI spec version: version not set * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -12,79 +10,38 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime.js'; -import type { CommonSelectorExpr } from './CommonSelectorExpr.js'; -import { - CommonSelectorExprFromJSON, - CommonSelectorExprFromJSONTyped, - CommonSelectorExprToJSON, - CommonSelectorExprToJSONTyped, -} from './CommonSelectorExpr.js'; -import type { CommonJoinOperator } from './CommonJoinOperator.js'; -import { - CommonJoinOperatorFromJSON, - CommonJoinOperatorFromJSONTyped, - CommonJoinOperatorToJSON, - CommonJoinOperatorToJSONTyped, -} from './CommonJoinOperator.js'; - -/** - * - * @export - * @interface CommonSelectorExprLogicExpr - */ -export interface CommonSelectorExprLogicExpr { - /** - * - * @type {Array} - * @memberof CommonSelectorExprLogicExpr - */ - expressions?: Array; - /** - * - * @type {CommonJoinOperator} - * @memberof CommonSelectorExprLogicExpr - */ - operator?: CommonJoinOperator; -} - - - -/** - * Check if a given object implements the CommonSelectorExprLogicExpr interface. - */ -export function instanceOfCommonSelectorExprLogicExpr(value: object): value is CommonSelectorExprLogicExpr { - return true; -} - -export function CommonSelectorExprLogicExprFromJSON(json: any): CommonSelectorExprLogicExpr { - return CommonSelectorExprLogicExprFromJSONTyped(json, false); -} - -export function CommonSelectorExprLogicExprFromJSONTyped(json: any, ignoreDiscriminator: boolean): CommonSelectorExprLogicExpr { - if (json == null) { - return json; +import { CommonJoinOperator } from '../models/CommonJoinOperator.js'; +import { CommonSelectorExpr } from '../models/CommonSelectorExpr.js'; +import { HttpFile } from '../http/http.js'; + +export class CommonSelectorExprLogicExpr { + 'expressions'?: Array; + 'operator'?: CommonJoinOperator; + + static readonly discriminator: string | undefined = undefined; + + static readonly mapping: {[index: string]: string} | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "expressions", + "baseName": "expressions", + "type": "Array", + "format": "" + }, + { + "name": "operator", + "baseName": "operator", + "type": "CommonJoinOperator", + "format": "" + } ]; + + static getAttributeTypeMap() { + return CommonSelectorExprLogicExpr.attributeTypeMap; } - return { - - 'expressions': json['expressions'] == null ? undefined : ((json['expressions'] as Array).map(CommonSelectorExprFromJSON)), - 'operator': json['operator'] == null ? undefined : CommonJoinOperatorFromJSON(json['operator']), - }; -} - - export function CommonSelectorExprLogicExprToJSON(json: any): CommonSelectorExprLogicExpr { - return CommonSelectorExprLogicExprToJSONTyped(json, false); - } - export function CommonSelectorExprLogicExprToJSONTyped(value?: CommonSelectorExprLogicExpr | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; + public constructor() { } - - return { - - 'expressions': value['expressions'] == null ? undefined : ((value['expressions'] as Array).map(CommonSelectorExprToJSON)), - 'operator': CommonJoinOperatorToJSON(value['operator']), - }; } + diff --git a/src/models/CommonSelectorOperatorType.ts b/src/models/CommonSelectorOperatorType.ts index 9a157a7..68ce4c9 100755 --- a/src/models/CommonSelectorOperatorType.ts +++ b/src/models/CommonSelectorOperatorType.ts @@ -1,10 +1,8 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Sentio API * Sentio Open API for query data * - * The version of the OpenAPI document: version not set + * OpenAPI spec version: version not set * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -12,55 +10,24 @@ * Do not edit the class manually. */ +import { HttpFile } from '../http/http.js'; /** - * - GT: Numeric operators - * - CONTAINS: String operators - * @export - */ -export const CommonSelectorOperatorType = { - Eq: 'EQ', - Neq: 'NEQ', - Exists: 'EXISTS', - NotExists: 'NOT_EXISTS', - Gt: 'GT', - Gte: 'GTE', - Lt: 'LT', - Lte: 'LTE', - Between: 'BETWEEN', - NotBetween: 'NOT_BETWEEN', - Contains: 'CONTAINS', - NotContains: 'NOT_CONTAINS', - InCohorts: 'IN_COHORTS', - NotInCohorts: 'NOT_IN_COHORTS' -} as const; -export type CommonSelectorOperatorType = typeof CommonSelectorOperatorType[keyof typeof CommonSelectorOperatorType]; - - -export function instanceOfCommonSelectorOperatorType(value: any): boolean { - for (const key in CommonSelectorOperatorType) { - if (Object.prototype.hasOwnProperty.call(CommonSelectorOperatorType, key)) { - if (CommonSelectorOperatorType[key as keyof typeof CommonSelectorOperatorType] === value) { - return true; - } - } - } - return false; -} - -export function CommonSelectorOperatorTypeFromJSON(json: any): CommonSelectorOperatorType { - return CommonSelectorOperatorTypeFromJSONTyped(json, false); -} - -export function CommonSelectorOperatorTypeFromJSONTyped(json: any, ignoreDiscriminator: boolean): CommonSelectorOperatorType { - return json as CommonSelectorOperatorType; -} - -export function CommonSelectorOperatorTypeToJSON(value?: CommonSelectorOperatorType | null): any { - return value as any; +* - GT: Numeric operators - CONTAINS: String operators +*/ +export enum CommonSelectorOperatorType { + Eq = 'EQ', + Neq = 'NEQ', + Exists = 'EXISTS', + NotExists = 'NOT_EXISTS', + Gt = 'GT', + Gte = 'GTE', + Lt = 'LT', + Lte = 'LTE', + Between = 'BETWEEN', + NotBetween = 'NOT_BETWEEN', + Contains = 'CONTAINS', + NotContains = 'NOT_CONTAINS', + InCohorts = 'IN_COHORTS', + NotInCohorts = 'NOT_IN_COHORTS' } - -export function CommonSelectorOperatorTypeToJSONTyped(value: any, ignoreDiscriminator: boolean): CommonSelectorOperatorType { - return value as CommonSelectorOperatorType; -} - diff --git a/src/models/CommonStringList.ts b/src/models/CommonStringList.ts index cbaeac6..ab5ebc5 100755 --- a/src/models/CommonStringList.ts +++ b/src/models/CommonStringList.ts @@ -1,10 +1,8 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Sentio API * Sentio Open API for query data * - * The version of the OpenAPI document: version not set + * OpenAPI spec version: version not set * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -12,54 +10,27 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime.js'; -/** - * - * @export - * @interface CommonStringList - */ -export interface CommonStringList { - /** - * - * @type {Array} - * @memberof CommonStringList - */ - values?: Array; -} +import { HttpFile } from '../http/http.js'; -/** - * Check if a given object implements the CommonStringList interface. - */ -export function instanceOfCommonStringList(value: object): value is CommonStringList { - return true; -} +export class CommonStringList { + 'values'?: Array; -export function CommonStringListFromJSON(json: any): CommonStringList { - return CommonStringListFromJSONTyped(json, false); -} + static readonly discriminator: string | undefined = undefined; -export function CommonStringListFromJSONTyped(json: any, ignoreDiscriminator: boolean): CommonStringList { - if (json == null) { - return json; - } - return { - - 'values': json['values'] == null ? undefined : json['values'], - }; -} + static readonly mapping: {[index: string]: string} | undefined = undefined; - export function CommonStringListToJSON(json: any): CommonStringList { - return CommonStringListToJSONTyped(json, false); - } + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "values", + "baseName": "values", + "type": "Array", + "format": "" + } ]; - export function CommonStringListToJSONTyped(value?: CommonStringList | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; + static getAttributeTypeMap() { + return CommonStringList.attributeTypeMap; } - return { - - 'values': value['values'], - }; + public constructor() { + } } - diff --git a/src/models/CommonTabularData.ts b/src/models/CommonTabularData.ts index e0d75eb..01b24b1 100755 --- a/src/models/CommonTabularData.ts +++ b/src/models/CommonTabularData.ts @@ -1,10 +1,8 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Sentio API * Sentio Open API for query data * - * The version of the OpenAPI document: version not set + * OpenAPI spec version: version not set * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -12,94 +10,56 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime.js'; -import type { CommonTabularDataColumnType } from './CommonTabularDataColumnType.js'; -import { - CommonTabularDataColumnTypeFromJSON, - CommonTabularDataColumnTypeFromJSONTyped, - CommonTabularDataColumnTypeToJSON, - CommonTabularDataColumnTypeToJSONTyped, -} from './CommonTabularDataColumnType.js'; +import { CommonTabularDataColumnType } from '../models/CommonTabularDataColumnType.js'; +import { HttpFile } from '../http/http.js'; -/** - * - * @export - * @interface CommonTabularData - */ -export interface CommonTabularData { - /** - * - * @type {Array} - * @memberof CommonTabularData - */ - columns?: Array; - /** - * - * @type {{ [key: string]: CommonTabularDataColumnType; }} - * @memberof CommonTabularData - */ - columnTypes?: { [key: string]: CommonTabularDataColumnType; }; - /** - * - * @type {Array} - * @memberof CommonTabularData - */ - rows?: Array; - /** - * - * @type {Date} - * @memberof CommonTabularData - */ - generatedAt?: Date; - /** - * - * @type {string} - * @memberof CommonTabularData - */ - cursor?: string; -} +export class CommonTabularData { + 'columns'?: Array; + 'columnTypes'?: { [key: string]: CommonTabularDataColumnType; }; + 'rows'?: Array; + 'generatedAt'?: Date; + 'cursor'?: string; -/** - * Check if a given object implements the CommonTabularData interface. - */ -export function instanceOfCommonTabularData(value: object): value is CommonTabularData { - return true; -} + static readonly discriminator: string | undefined = undefined; -export function CommonTabularDataFromJSON(json: any): CommonTabularData { - return CommonTabularDataFromJSONTyped(json, false); -} - -export function CommonTabularDataFromJSONTyped(json: any, ignoreDiscriminator: boolean): CommonTabularData { - if (json == null) { - return json; - } - return { - - 'columns': json['columns'] == null ? undefined : json['columns'], - 'columnTypes': json['columnTypes'] == null ? undefined : (mapValues(json['columnTypes'], CommonTabularDataColumnTypeFromJSON)), - 'rows': json['rows'] == null ? undefined : json['rows'], - 'generatedAt': json['generatedAt'] == null ? undefined : (new Date(json['generatedAt'])), - 'cursor': json['cursor'] == null ? undefined : json['cursor'], - }; -} + static readonly mapping: {[index: string]: string} | undefined = undefined; - export function CommonTabularDataToJSON(json: any): CommonTabularData { - return CommonTabularDataToJSONTyped(json, false); - } + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "columns", + "baseName": "columns", + "type": "Array", + "format": "" + }, + { + "name": "columnTypes", + "baseName": "columnTypes", + "type": "{ [key: string]: CommonTabularDataColumnType; }", + "format": "" + }, + { + "name": "rows", + "baseName": "rows", + "type": "Array", + "format": "" + }, + { + "name": "generatedAt", + "baseName": "generatedAt", + "type": "Date", + "format": "date-time" + }, + { + "name": "cursor", + "baseName": "cursor", + "type": "string", + "format": "" + } ]; - export function CommonTabularDataToJSONTyped(value?: CommonTabularData | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; + static getAttributeTypeMap() { + return CommonTabularData.attributeTypeMap; } - return { - - 'columns': value['columns'], - 'columnTypes': value['columnTypes'] == null ? undefined : (mapValues(value['columnTypes'], CommonTabularDataColumnTypeToJSON)), - 'rows': value['rows'], - 'generatedAt': value['generatedAt'] == null ? undefined : ((value['generatedAt']).toISOString()), - 'cursor': value['cursor'], - }; + public constructor() { + } } - diff --git a/src/models/CommonTabularDataColumnType.ts b/src/models/CommonTabularDataColumnType.ts index 99a7f95..ddd1b94 100755 --- a/src/models/CommonTabularDataColumnType.ts +++ b/src/models/CommonTabularDataColumnType.ts @@ -1,10 +1,8 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Sentio API * Sentio Open API for query data * - * The version of the OpenAPI document: version not set + * OpenAPI spec version: version not set * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -12,45 +10,12 @@ * Do not edit the class manually. */ +import { HttpFile } from '../http/http.js'; -/** - * - * @export - */ -export const CommonTabularDataColumnType = { - String: 'STRING', - Number: 'NUMBER', - Boolean: 'BOOLEAN', - List: 'LIST', - Time: 'TIME' -} as const; -export type CommonTabularDataColumnType = typeof CommonTabularDataColumnType[keyof typeof CommonTabularDataColumnType]; - - -export function instanceOfCommonTabularDataColumnType(value: any): boolean { - for (const key in CommonTabularDataColumnType) { - if (Object.prototype.hasOwnProperty.call(CommonTabularDataColumnType, key)) { - if (CommonTabularDataColumnType[key as keyof typeof CommonTabularDataColumnType] === value) { - return true; - } - } - } - return false; -} - -export function CommonTabularDataColumnTypeFromJSON(json: any): CommonTabularDataColumnType { - return CommonTabularDataColumnTypeFromJSONTyped(json, false); +export enum CommonTabularDataColumnType { + String = 'STRING', + Number = 'NUMBER', + Boolean = 'BOOLEAN', + List = 'LIST', + Time = 'TIME' } - -export function CommonTabularDataColumnTypeFromJSONTyped(json: any, ignoreDiscriminator: boolean): CommonTabularDataColumnType { - return json as CommonTabularDataColumnType; -} - -export function CommonTabularDataColumnTypeToJSON(value?: CommonTabularDataColumnType | null): any { - return value as any; -} - -export function CommonTabularDataColumnTypeToJSONTyped(value: any, ignoreDiscriminator: boolean): CommonTabularDataColumnType { - return value as CommonTabularDataColumnType; -} - diff --git a/src/models/CommonTier.ts b/src/models/CommonTier.ts index 731135f..b2887fd 100755 --- a/src/models/CommonTier.ts +++ b/src/models/CommonTier.ts @@ -1,10 +1,8 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Sentio API * Sentio Open API for query data * - * The version of the OpenAPI document: version not set + * OpenAPI spec version: version not set * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -12,45 +10,12 @@ * Do not edit the class manually. */ +import { HttpFile } from '../http/http.js'; -/** - * - * @export - */ -export const CommonTier = { - Free: 'FREE', - Dev: 'DEV', - Pro: 'PRO', - Enterprise: 'ENTERPRISE', - Anonymous: 'ANONYMOUS' -} as const; -export type CommonTier = typeof CommonTier[keyof typeof CommonTier]; - - -export function instanceOfCommonTier(value: any): boolean { - for (const key in CommonTier) { - if (Object.prototype.hasOwnProperty.call(CommonTier, key)) { - if (CommonTier[key as keyof typeof CommonTier] === value) { - return true; - } - } - } - return false; -} - -export function CommonTierFromJSON(json: any): CommonTier { - return CommonTierFromJSONTyped(json, false); +export enum CommonTier { + Free = 'FREE', + Dev = 'DEV', + Pro = 'PRO', + Enterprise = 'ENTERPRISE', + Anonymous = 'ANONYMOUS' } - -export function CommonTierFromJSONTyped(json: any, ignoreDiscriminator: boolean): CommonTier { - return json as CommonTier; -} - -export function CommonTierToJSON(value?: CommonTier | null): any { - return value as any; -} - -export function CommonTierToJSONTyped(value: any, ignoreDiscriminator: boolean): CommonTier { - return value as CommonTier; -} - diff --git a/src/models/CommonTimeRange.ts b/src/models/CommonTimeRange.ts index 38dfbcd..5e3d0c4 100755 --- a/src/models/CommonTimeRange.ts +++ b/src/models/CommonTimeRange.ts @@ -1,10 +1,8 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Sentio API * Sentio Open API for query data * - * The version of the OpenAPI document: version not set + * OpenAPI spec version: version not set * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -12,101 +10,57 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime.js'; -import type { CommonDuration } from './CommonDuration.js'; -import { - CommonDurationFromJSON, - CommonDurationFromJSONTyped, - CommonDurationToJSON, - CommonDurationToJSONTyped, -} from './CommonDuration.js'; -import type { CommonTimeRangeTimeLike } from './CommonTimeRangeTimeLike.js'; -import { - CommonTimeRangeTimeLikeFromJSON, - CommonTimeRangeTimeLikeFromJSONTyped, - CommonTimeRangeTimeLikeToJSON, - CommonTimeRangeTimeLikeToJSONTyped, -} from './CommonTimeRangeTimeLike.js'; +import { CommonDuration } from '../models/CommonDuration.js'; +import { CommonTimeRangeTimeLike } from '../models/CommonTimeRangeTimeLike.js'; +import { HttpFile } from '../http/http.js'; -/** - * - * @export - * @interface CommonTimeRange - */ -export interface CommonTimeRange { - /** - * - * @type {CommonTimeRangeTimeLike} - * @memberof CommonTimeRange - */ - start?: CommonTimeRangeTimeLike; - /** - * - * @type {CommonTimeRangeTimeLike} - * @memberof CommonTimeRange - */ - end?: CommonTimeRangeTimeLike; - /** - * - * @type {string} - * @memberof CommonTimeRange - */ - step?: string; - /** - * - * @type {CommonDuration} - * @memberof CommonTimeRange - */ - interval?: CommonDuration; - /** - * - * @type {string} - * @memberof CommonTimeRange - */ - timezone?: string; -} +export class CommonTimeRange { + 'start'?: CommonTimeRangeTimeLike; + 'end'?: CommonTimeRangeTimeLike; + 'step'?: string; + 'interval'?: CommonDuration; + 'timezone'?: string; -/** - * Check if a given object implements the CommonTimeRange interface. - */ -export function instanceOfCommonTimeRange(value: object): value is CommonTimeRange { - return true; -} + static readonly discriminator: string | undefined = undefined; -export function CommonTimeRangeFromJSON(json: any): CommonTimeRange { - return CommonTimeRangeFromJSONTyped(json, false); -} - -export function CommonTimeRangeFromJSONTyped(json: any, ignoreDiscriminator: boolean): CommonTimeRange { - if (json == null) { - return json; - } - return { - - 'start': json['start'] == null ? undefined : CommonTimeRangeTimeLikeFromJSON(json['start']), - 'end': json['end'] == null ? undefined : CommonTimeRangeTimeLikeFromJSON(json['end']), - 'step': json['step'] == null ? undefined : json['step'], - 'interval': json['interval'] == null ? undefined : CommonDurationFromJSON(json['interval']), - 'timezone': json['timezone'] == null ? undefined : json['timezone'], - }; -} + static readonly mapping: {[index: string]: string} | undefined = undefined; - export function CommonTimeRangeToJSON(json: any): CommonTimeRange { - return CommonTimeRangeToJSONTyped(json, false); - } + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "start", + "baseName": "start", + "type": "CommonTimeRangeTimeLike", + "format": "" + }, + { + "name": "end", + "baseName": "end", + "type": "CommonTimeRangeTimeLike", + "format": "" + }, + { + "name": "step", + "baseName": "step", + "type": "string", + "format": "int64" + }, + { + "name": "interval", + "baseName": "interval", + "type": "CommonDuration", + "format": "" + }, + { + "name": "timezone", + "baseName": "timezone", + "type": "string", + "format": "" + } ]; - export function CommonTimeRangeToJSONTyped(value?: CommonTimeRange | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; + static getAttributeTypeMap() { + return CommonTimeRange.attributeTypeMap; } - return { - - 'start': CommonTimeRangeTimeLikeToJSON(value['start']), - 'end': CommonTimeRangeTimeLikeToJSON(value['end']), - 'step': value['step'], - 'interval': CommonDurationToJSON(value['interval']), - 'timezone': value['timezone'], - }; + public constructor() { + } } - diff --git a/src/models/CommonTimeRangeLite.ts b/src/models/CommonTimeRangeLite.ts index f76b9f1..a78c58c 100755 --- a/src/models/CommonTimeRangeLite.ts +++ b/src/models/CommonTimeRangeLite.ts @@ -1,10 +1,8 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Sentio API * Sentio Open API for query data * - * The version of the OpenAPI document: version not set + * OpenAPI spec version: version not set * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -12,81 +10,51 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime.js'; -/** - * start and end time of the time range, Find more: https://docs.sentio.xyz/reference/data#time-range-configuration-guide - * @export - * @interface CommonTimeRangeLite - */ -export interface CommonTimeRangeLite { - /** - * - * @type {string} - * @memberof CommonTimeRangeLite - */ - start: string; - /** - * - * @type {string} - * @memberof CommonTimeRangeLite - */ - end: string; - /** - * - * @type {number} - * @memberof CommonTimeRangeLite - */ - step: number; - /** - * - * @type {string} - * @memberof CommonTimeRangeLite - */ - timezone?: string; -} +import { HttpFile } from '../http/http.js'; /** - * Check if a given object implements the CommonTimeRangeLite interface. - */ -export function instanceOfCommonTimeRangeLite(value: object): value is CommonTimeRangeLite { - if (!('start' in value) || value['start'] === undefined) return false; - if (!('end' in value) || value['end'] === undefined) return false; - if (!('step' in value) || value['step'] === undefined) return false; - return true; -} - -export function CommonTimeRangeLiteFromJSON(json: any): CommonTimeRangeLite { - return CommonTimeRangeLiteFromJSONTyped(json, false); -} - -export function CommonTimeRangeLiteFromJSONTyped(json: any, ignoreDiscriminator: boolean): CommonTimeRangeLite { - if (json == null) { - return json; +* start and end time of the time range, Find more: https://docs.sentio.xyz/reference/data#time-range-configuration-guide +*/ +export class CommonTimeRangeLite { + 'start': string; + 'end': string; + 'step': number; + 'timezone'?: string; + + static readonly discriminator: string | undefined = undefined; + + static readonly mapping: {[index: string]: string} | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "start", + "baseName": "start", + "type": "string", + "format": "" + }, + { + "name": "end", + "baseName": "end", + "type": "string", + "format": "" + }, + { + "name": "step", + "baseName": "step", + "type": "number", + "format": "int32" + }, + { + "name": "timezone", + "baseName": "timezone", + "type": "string", + "format": "" + } ]; + + static getAttributeTypeMap() { + return CommonTimeRangeLite.attributeTypeMap; } - return { - - 'start': json['start'], - 'end': json['end'], - 'step': json['step'], - 'timezone': json['timezone'] == null ? undefined : json['timezone'], - }; -} - export function CommonTimeRangeLiteToJSON(json: any): CommonTimeRangeLite { - return CommonTimeRangeLiteToJSONTyped(json, false); - } - - export function CommonTimeRangeLiteToJSONTyped(value?: CommonTimeRangeLite | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; + public constructor() { } - - return { - - 'start': value['start'], - 'end': value['end'], - 'step': value['step'], - 'timezone': value['timezone'], - }; } - diff --git a/src/models/CommonTimeRangeRelativeTime.ts b/src/models/CommonTimeRangeRelativeTime.ts index ff961b8..8fcf09b 100755 --- a/src/models/CommonTimeRangeRelativeTime.ts +++ b/src/models/CommonTimeRangeRelativeTime.ts @@ -1,10 +1,8 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Sentio API * Sentio Open API for query data * - * The version of the OpenAPI document: version not set + * OpenAPI spec version: version not set * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -12,70 +10,41 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime.js'; -/** - * - * @export - * @interface CommonTimeRangeRelativeTime - */ -export interface CommonTimeRangeRelativeTime { - /** - * - * @type {string} - * @memberof CommonTimeRangeRelativeTime - */ - unit?: string; - /** - * - * @type {number} - * @memberof CommonTimeRangeRelativeTime - */ - value?: number; - /** - * - * @type {string} - * @memberof CommonTimeRangeRelativeTime - */ - align?: string; -} - -/** - * Check if a given object implements the CommonTimeRangeRelativeTime interface. - */ -export function instanceOfCommonTimeRangeRelativeTime(value: object): value is CommonTimeRangeRelativeTime { - return true; -} - -export function CommonTimeRangeRelativeTimeFromJSON(json: any): CommonTimeRangeRelativeTime { - return CommonTimeRangeRelativeTimeFromJSONTyped(json, false); -} - -export function CommonTimeRangeRelativeTimeFromJSONTyped(json: any, ignoreDiscriminator: boolean): CommonTimeRangeRelativeTime { - if (json == null) { - return json; +import { HttpFile } from '../http/http.js'; + +export class CommonTimeRangeRelativeTime { + 'unit'?: string; + 'value'?: number; + 'align'?: string; + + static readonly discriminator: string | undefined = undefined; + + static readonly mapping: {[index: string]: string} | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "unit", + "baseName": "unit", + "type": "string", + "format": "" + }, + { + "name": "value", + "baseName": "value", + "type": "number", + "format": "int32" + }, + { + "name": "align", + "baseName": "align", + "type": "string", + "format": "" + } ]; + + static getAttributeTypeMap() { + return CommonTimeRangeRelativeTime.attributeTypeMap; } - return { - - 'unit': json['unit'] == null ? undefined : json['unit'], - 'value': json['value'] == null ? undefined : json['value'], - 'align': json['align'] == null ? undefined : json['align'], - }; -} - export function CommonTimeRangeRelativeTimeToJSON(json: any): CommonTimeRangeRelativeTime { - return CommonTimeRangeRelativeTimeToJSONTyped(json, false); - } - - export function CommonTimeRangeRelativeTimeToJSONTyped(value?: CommonTimeRangeRelativeTime | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; + public constructor() { } - - return { - - 'unit': value['unit'], - 'value': value['value'], - 'align': value['align'], - }; } - diff --git a/src/models/CommonTimeRangeTimeLike.ts b/src/models/CommonTimeRangeTimeLike.ts index 1588441..50d7d8f 100755 --- a/src/models/CommonTimeRangeTimeLike.ts +++ b/src/models/CommonTimeRangeTimeLike.ts @@ -1,10 +1,8 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Sentio API * Sentio Open API for query data * - * The version of the OpenAPI document: version not set + * OpenAPI spec version: version not set * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -12,70 +10,35 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime.js'; -import type { CommonTimeRangeRelativeTime } from './CommonTimeRangeRelativeTime.js'; -import { - CommonTimeRangeRelativeTimeFromJSON, - CommonTimeRangeRelativeTimeFromJSONTyped, - CommonTimeRangeRelativeTimeToJSON, - CommonTimeRangeRelativeTimeToJSONTyped, -} from './CommonTimeRangeRelativeTime.js'; - -/** - * - * @export - * @interface CommonTimeRangeTimeLike - */ -export interface CommonTimeRangeTimeLike { - /** - * - * @type {CommonTimeRangeRelativeTime} - * @memberof CommonTimeRangeTimeLike - */ - relativeTime?: CommonTimeRangeRelativeTime; - /** - * - * @type {string} - * @memberof CommonTimeRangeTimeLike - */ - absoluteTime?: string; -} - -/** - * Check if a given object implements the CommonTimeRangeTimeLike interface. - */ -export function instanceOfCommonTimeRangeTimeLike(value: object): value is CommonTimeRangeTimeLike { - return true; -} - -export function CommonTimeRangeTimeLikeFromJSON(json: any): CommonTimeRangeTimeLike { - return CommonTimeRangeTimeLikeFromJSONTyped(json, false); -} - -export function CommonTimeRangeTimeLikeFromJSONTyped(json: any, ignoreDiscriminator: boolean): CommonTimeRangeTimeLike { - if (json == null) { - return json; +import { CommonTimeRangeRelativeTime } from '../models/CommonTimeRangeRelativeTime.js'; +import { HttpFile } from '../http/http.js'; + +export class CommonTimeRangeTimeLike { + 'relativeTime'?: CommonTimeRangeRelativeTime; + 'absoluteTime'?: string; + + static readonly discriminator: string | undefined = undefined; + + static readonly mapping: {[index: string]: string} | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "relativeTime", + "baseName": "relativeTime", + "type": "CommonTimeRangeRelativeTime", + "format": "" + }, + { + "name": "absoluteTime", + "baseName": "absoluteTime", + "type": "string", + "format": "int64" + } ]; + + static getAttributeTypeMap() { + return CommonTimeRangeTimeLike.attributeTypeMap; } - return { - - 'relativeTime': json['relativeTime'] == null ? undefined : CommonTimeRangeRelativeTimeFromJSON(json['relativeTime']), - 'absoluteTime': json['absoluteTime'] == null ? undefined : json['absoluteTime'], - }; -} - - export function CommonTimeRangeTimeLikeToJSON(json: any): CommonTimeRangeTimeLike { - return CommonTimeRangeTimeLikeToJSONTyped(json, false); - } - export function CommonTimeRangeTimeLikeToJSONTyped(value?: CommonTimeRangeTimeLike | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; + public constructor() { } - - return { - - 'relativeTime': CommonTimeRangeRelativeTimeToJSON(value['relativeTime']), - 'absoluteTime': value['absoluteTime'], - }; } - diff --git a/src/models/CommonUser.ts b/src/models/CommonUser.ts index e86bdc2..7a49977 100755 --- a/src/models/CommonUser.ts +++ b/src/models/CommonUser.ts @@ -1,10 +1,8 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Sentio API * Sentio Open API for query data * - * The version of the OpenAPI document: version not set + * OpenAPI spec version: version not set * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -12,175 +10,122 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime.js'; -import type { CommonTier } from './CommonTier.js'; -import { - CommonTierFromJSON, - CommonTierFromJSONTyped, - CommonTierToJSON, - CommonTierToJSONTyped, -} from './CommonTier.js'; -import type { CommonUserAccountStatus } from './CommonUserAccountStatus.js'; -import { - CommonUserAccountStatusFromJSON, - CommonUserAccountStatusFromJSONTyped, - CommonUserAccountStatusToJSON, - CommonUserAccountStatusToJSONTyped, -} from './CommonUserAccountStatus.js'; +import { CommonTier } from '../models/CommonTier.js'; +import { CommonUserAccountStatus } from '../models/CommonUserAccountStatus.js'; +import { HttpFile } from '../http/http.js'; -/** - * - * @export - * @interface CommonUser - */ -export interface CommonUser { - /** - * - * @type {string} - * @memberof CommonUser - */ - id?: string; - /** - * - * @type {string} - * @memberof CommonUser - */ - email?: string; - /** - * - * @type {boolean} - * @memberof CommonUser - */ - emailVerified?: boolean; - /** - * - * @type {string} - * @memberof CommonUser - */ - lastName?: string; - /** - * - * @type {string} - * @memberof CommonUser - */ - firstName?: string; - /** - * - * @type {string} - * @memberof CommonUser - */ - locale?: string; - /** - * - * @type {string} - * @memberof CommonUser - */ - nickname?: string; - /** - * - * @type {string} - * @memberof CommonUser - */ - picture?: string; - /** - * - * @type {string} - * @memberof CommonUser - */ - sub?: string; - /** - * - * @type {string} - * @memberof CommonUser - */ - updatedAt?: string; - /** - * - * @type {string} - * @memberof CommonUser - */ - createdAt?: string; - /** - * - * @type {string} - * @memberof CommonUser - */ - username?: string; - /** - * - * @type {CommonUserAccountStatus} - * @memberof CommonUser - */ - accountStatus?: CommonUserAccountStatus; - /** - * - * @type {CommonTier} - * @memberof CommonUser - */ - tier?: CommonTier; -} +export class CommonUser { + 'id'?: string; + 'email'?: string; + 'emailVerified'?: boolean; + 'lastName'?: string; + 'firstName'?: string; + 'locale'?: string; + 'nickname'?: string; + 'picture'?: string; + 'sub'?: string; + 'updatedAt'?: string; + 'createdAt'?: string; + 'username'?: string; + 'accountStatus'?: CommonUserAccountStatus; + 'tier'?: CommonTier; + static readonly discriminator: string | undefined = undefined; + static readonly mapping: {[index: string]: string} | undefined = undefined; -/** - * Check if a given object implements the CommonUser interface. - */ -export function instanceOfCommonUser(value: object): value is CommonUser { - return true; -} + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "id", + "baseName": "id", + "type": "string", + "format": "" + }, + { + "name": "email", + "baseName": "email", + "type": "string", + "format": "" + }, + { + "name": "emailVerified", + "baseName": "emailVerified", + "type": "boolean", + "format": "" + }, + { + "name": "lastName", + "baseName": "lastName", + "type": "string", + "format": "" + }, + { + "name": "firstName", + "baseName": "firstName", + "type": "string", + "format": "" + }, + { + "name": "locale", + "baseName": "locale", + "type": "string", + "format": "" + }, + { + "name": "nickname", + "baseName": "nickname", + "type": "string", + "format": "" + }, + { + "name": "picture", + "baseName": "picture", + "type": "string", + "format": "" + }, + { + "name": "sub", + "baseName": "sub", + "type": "string", + "format": "" + }, + { + "name": "updatedAt", + "baseName": "updatedAt", + "type": "string", + "format": "int64" + }, + { + "name": "createdAt", + "baseName": "createdAt", + "type": "string", + "format": "int64" + }, + { + "name": "username", + "baseName": "username", + "type": "string", + "format": "" + }, + { + "name": "accountStatus", + "baseName": "accountStatus", + "type": "CommonUserAccountStatus", + "format": "" + }, + { + "name": "tier", + "baseName": "tier", + "type": "CommonTier", + "format": "" + } ]; -export function CommonUserFromJSON(json: any): CommonUser { - return CommonUserFromJSONTyped(json, false); -} - -export function CommonUserFromJSONTyped(json: any, ignoreDiscriminator: boolean): CommonUser { - if (json == null) { - return json; + static getAttributeTypeMap() { + return CommonUser.attributeTypeMap; } - return { - - 'id': json['id'] == null ? undefined : json['id'], - 'email': json['email'] == null ? undefined : json['email'], - 'emailVerified': json['emailVerified'] == null ? undefined : json['emailVerified'], - 'lastName': json['lastName'] == null ? undefined : json['lastName'], - 'firstName': json['firstName'] == null ? undefined : json['firstName'], - 'locale': json['locale'] == null ? undefined : json['locale'], - 'nickname': json['nickname'] == null ? undefined : json['nickname'], - 'picture': json['picture'] == null ? undefined : json['picture'], - 'sub': json['sub'] == null ? undefined : json['sub'], - 'updatedAt': json['updatedAt'] == null ? undefined : json['updatedAt'], - 'createdAt': json['createdAt'] == null ? undefined : json['createdAt'], - 'username': json['username'] == null ? undefined : json['username'], - 'accountStatus': json['accountStatus'] == null ? undefined : CommonUserAccountStatusFromJSON(json['accountStatus']), - 'tier': json['tier'] == null ? undefined : CommonTierFromJSON(json['tier']), - }; -} - export function CommonUserToJSON(json: any): CommonUser { - return CommonUserToJSONTyped(json, false); - } - - export function CommonUserToJSONTyped(value?: CommonUser | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; + public constructor() { } - - return { - - 'id': value['id'], - 'email': value['email'], - 'emailVerified': value['emailVerified'], - 'lastName': value['lastName'], - 'firstName': value['firstName'], - 'locale': value['locale'], - 'nickname': value['nickname'], - 'picture': value['picture'], - 'sub': value['sub'], - 'updatedAt': value['updatedAt'], - 'createdAt': value['createdAt'], - 'username': value['username'], - 'accountStatus': CommonUserAccountStatusToJSON(value['accountStatus']), - 'tier': CommonTierToJSON(value['tier']), - }; } + diff --git a/src/models/CommonUserAccountStatus.ts b/src/models/CommonUserAccountStatus.ts index 127c73d..cf514a7 100755 --- a/src/models/CommonUserAccountStatus.ts +++ b/src/models/CommonUserAccountStatus.ts @@ -1,10 +1,8 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Sentio API * Sentio Open API for query data * - * The version of the OpenAPI document: version not set + * OpenAPI spec version: version not set * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -12,44 +10,11 @@ * Do not edit the class manually. */ +import { HttpFile } from '../http/http.js'; -/** - * - * @export - */ -export const CommonUserAccountStatus = { - Pending: 'PENDING', - SetUsername: 'SET_USERNAME', - Banned: 'BANNED', - Active: 'ACTIVE' -} as const; -export type CommonUserAccountStatus = typeof CommonUserAccountStatus[keyof typeof CommonUserAccountStatus]; - - -export function instanceOfCommonUserAccountStatus(value: any): boolean { - for (const key in CommonUserAccountStatus) { - if (Object.prototype.hasOwnProperty.call(CommonUserAccountStatus, key)) { - if (CommonUserAccountStatus[key as keyof typeof CommonUserAccountStatus] === value) { - return true; - } - } - } - return false; -} - -export function CommonUserAccountStatusFromJSON(json: any): CommonUserAccountStatus { - return CommonUserAccountStatusFromJSONTyped(json, false); +export enum CommonUserAccountStatus { + Pending = 'PENDING', + SetUsername = 'SET_USERNAME', + Banned = 'BANNED', + Active = 'ACTIVE' } - -export function CommonUserAccountStatusFromJSONTyped(json: any, ignoreDiscriminator: boolean): CommonUserAccountStatus { - return json as CommonUserAccountStatus; -} - -export function CommonUserAccountStatusToJSON(value?: CommonUserAccountStatus | null): any { - return value as any; -} - -export function CommonUserAccountStatusToJSONTyped(value: any, ignoreDiscriminator: boolean): CommonUserAccountStatus { - return value as CommonUserAccountStatus; -} - diff --git a/src/models/CommonUserInfo.ts b/src/models/CommonUserInfo.ts index 3eebd71..987d0a2 100755 --- a/src/models/CommonUserInfo.ts +++ b/src/models/CommonUserInfo.ts @@ -1,10 +1,8 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Sentio API * Sentio Open API for query data * - * The version of the OpenAPI document: version not set + * OpenAPI spec version: version not set * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -12,94 +10,65 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime.js'; -/** - * The same to user but with sensitive data removed. - * @export - * @interface CommonUserInfo - */ -export interface CommonUserInfo { - /** - * - * @type {string} - * @memberof CommonUserInfo - */ - id?: string; - /** - * - * @type {string} - * @memberof CommonUserInfo - */ - lastName?: string; - /** - * - * @type {string} - * @memberof CommonUserInfo - */ - firstName?: string; - /** - * - * @type {string} - * @memberof CommonUserInfo - */ - nickname?: string; - /** - * - * @type {string} - * @memberof CommonUserInfo - */ - picture?: string; - /** - * - * @type {string} - * @memberof CommonUserInfo - */ - username?: string; -} +import { HttpFile } from '../http/http.js'; /** - * Check if a given object implements the CommonUserInfo interface. - */ -export function instanceOfCommonUserInfo(value: object): value is CommonUserInfo { - return true; -} +* The same to user but with sensitive data removed. +*/ +export class CommonUserInfo { + 'id'?: string; + 'lastName'?: string; + 'firstName'?: string; + 'nickname'?: string; + 'picture'?: string; + 'username'?: string; -export function CommonUserInfoFromJSON(json: any): CommonUserInfo { - return CommonUserInfoFromJSONTyped(json, false); -} + static readonly discriminator: string | undefined = undefined; -export function CommonUserInfoFromJSONTyped(json: any, ignoreDiscriminator: boolean): CommonUserInfo { - if (json == null) { - return json; - } - return { - - 'id': json['id'] == null ? undefined : json['id'], - 'lastName': json['lastName'] == null ? undefined : json['lastName'], - 'firstName': json['firstName'] == null ? undefined : json['firstName'], - 'nickname': json['nickname'] == null ? undefined : json['nickname'], - 'picture': json['picture'] == null ? undefined : json['picture'], - 'username': json['username'] == null ? undefined : json['username'], - }; -} + static readonly mapping: {[index: string]: string} | undefined = undefined; - export function CommonUserInfoToJSON(json: any): CommonUserInfo { - return CommonUserInfoToJSONTyped(json, false); - } + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "id", + "baseName": "id", + "type": "string", + "format": "" + }, + { + "name": "lastName", + "baseName": "lastName", + "type": "string", + "format": "" + }, + { + "name": "firstName", + "baseName": "firstName", + "type": "string", + "format": "" + }, + { + "name": "nickname", + "baseName": "nickname", + "type": "string", + "format": "" + }, + { + "name": "picture", + "baseName": "picture", + "type": "string", + "format": "" + }, + { + "name": "username", + "baseName": "username", + "type": "string", + "format": "" + } ]; - export function CommonUserInfoToJSONTyped(value?: CommonUserInfo | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; + static getAttributeTypeMap() { + return CommonUserInfo.attributeTypeMap; } - return { - - 'id': value['id'], - 'lastName': value['lastName'], - 'firstName': value['firstName'], - 'nickname': value['nickname'], - 'picture': value['picture'], - 'username': value['username'], - }; + public constructor() { + } } - diff --git a/src/models/EvmAccessListItem.ts b/src/models/EvmAccessListItem.ts index 2985568..c55c3ee 100755 --- a/src/models/EvmAccessListItem.ts +++ b/src/models/EvmAccessListItem.ts @@ -1,10 +1,8 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Sentio API * Sentio Open API for query data * - * The version of the OpenAPI document: version not set + * OpenAPI spec version: version not set * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -12,62 +10,34 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime.js'; -/** - * - * @export - * @interface EvmAccessListItem - */ -export interface EvmAccessListItem { - /** - * - * @type {string} - * @memberof EvmAccessListItem - */ - address?: string; - /** - * - * @type {Array} - * @memberof EvmAccessListItem - */ - storageKeys?: Array; -} +import { HttpFile } from '../http/http.js'; -/** - * Check if a given object implements the EvmAccessListItem interface. - */ -export function instanceOfEvmAccessListItem(value: object): value is EvmAccessListItem { - return true; -} +export class EvmAccessListItem { + 'address'?: string; + 'storageKeys'?: Array; -export function EvmAccessListItemFromJSON(json: any): EvmAccessListItem { - return EvmAccessListItemFromJSONTyped(json, false); -} + static readonly discriminator: string | undefined = undefined; -export function EvmAccessListItemFromJSONTyped(json: any, ignoreDiscriminator: boolean): EvmAccessListItem { - if (json == null) { - return json; - } - return { - - 'address': json['address'] == null ? undefined : json['address'], - 'storageKeys': json['storageKeys'] == null ? undefined : json['storageKeys'], - }; -} + static readonly mapping: {[index: string]: string} | undefined = undefined; - export function EvmAccessListItemToJSON(json: any): EvmAccessListItem { - return EvmAccessListItemToJSONTyped(json, false); - } + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "address", + "baseName": "address", + "type": "string", + "format": "" + }, + { + "name": "storageKeys", + "baseName": "storageKeys", + "type": "Array", + "format": "" + } ]; - export function EvmAccessListItemToJSONTyped(value?: EvmAccessListItem | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; + static getAttributeTypeMap() { + return EvmAccessListItem.attributeTypeMap; } - return { - - 'address': value['address'], - 'storageKeys': value['storageKeys'], - }; + public constructor() { + } } - diff --git a/src/models/EvmTransaction.ts b/src/models/EvmTransaction.ts index 8652977..affed60 100755 --- a/src/models/EvmTransaction.ts +++ b/src/models/EvmTransaction.ts @@ -1,10 +1,8 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Sentio API * Sentio Open API for query data * - * The version of the OpenAPI document: version not set + * OpenAPI spec version: version not set * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -12,182 +10,133 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime.js'; -import type { EvmAccessListItem } from './EvmAccessListItem.js'; -import { - EvmAccessListItemFromJSON, - EvmAccessListItemFromJSONTyped, - EvmAccessListItemToJSON, - EvmAccessListItemToJSONTyped, -} from './EvmAccessListItem.js'; +import { EvmAccessListItem } from '../models/EvmAccessListItem.js'; +import { HttpFile } from '../http/http.js'; -/** - * - * @export - * @interface EvmTransaction - */ -export interface EvmTransaction { - /** - * - * @type {string} - * @memberof EvmTransaction - */ - blockNumber?: string; - /** - * - * @type {string} - * @memberof EvmTransaction - */ - blockHash?: string; - /** - * - * @type {string} - * @memberof EvmTransaction - */ - transactionIndex?: string; - /** - * - * @type {string} - * @memberof EvmTransaction - */ - hash?: string; - /** - * - * @type {string} - * @memberof EvmTransaction - */ - chainId?: string; - /** - * - * @type {string} - * @memberof EvmTransaction - */ - type?: string; - /** - * - * @type {string} - * @memberof EvmTransaction - */ - from?: string; - /** - * - * @type {string} - * @memberof EvmTransaction - */ - to?: string; - /** - * - * @type {string} - * @memberof EvmTransaction - */ - input?: string; - /** - * - * @type {string} - * @memberof EvmTransaction - */ - value?: string; - /** - * - * @type {string} - * @memberof EvmTransaction - */ - nonce?: string; - /** - * - * @type {string} - * @memberof EvmTransaction - */ - gas?: string; - /** - * - * @type {string} - * @memberof EvmTransaction - */ - gasPrice?: string; - /** - * - * @type {string} - * @memberof EvmTransaction - */ - maxFeePerGas?: string; - /** - * - * @type {string} - * @memberof EvmTransaction - */ - maxPriorityFeePerGas?: string; - /** - * - * @type {Array} - * @memberof EvmTransaction - */ - accessList?: Array; -} +export class EvmTransaction { + 'blockNumber'?: string; + 'blockHash'?: string; + 'transactionIndex'?: string; + 'hash'?: string; + 'chainId'?: string; + 'type'?: string; + '_from'?: string; + 'to'?: string; + 'input'?: string; + 'value'?: string; + 'nonce'?: string; + 'gas'?: string; + 'gasPrice'?: string; + 'maxFeePerGas'?: string; + 'maxPriorityFeePerGas'?: string; + 'accessList'?: Array; -/** - * Check if a given object implements the EvmTransaction interface. - */ -export function instanceOfEvmTransaction(value: object): value is EvmTransaction { - return true; -} + static readonly discriminator: string | undefined = undefined; -export function EvmTransactionFromJSON(json: any): EvmTransaction { - return EvmTransactionFromJSONTyped(json, false); -} - -export function EvmTransactionFromJSONTyped(json: any, ignoreDiscriminator: boolean): EvmTransaction { - if (json == null) { - return json; - } - return { - - 'blockNumber': json['blockNumber'] == null ? undefined : json['blockNumber'], - 'blockHash': json['blockHash'] == null ? undefined : json['blockHash'], - 'transactionIndex': json['transactionIndex'] == null ? undefined : json['transactionIndex'], - 'hash': json['hash'] == null ? undefined : json['hash'], - 'chainId': json['chainId'] == null ? undefined : json['chainId'], - 'type': json['type'] == null ? undefined : json['type'], - 'from': json['from'] == null ? undefined : json['from'], - 'to': json['to'] == null ? undefined : json['to'], - 'input': json['input'] == null ? undefined : json['input'], - 'value': json['value'] == null ? undefined : json['value'], - 'nonce': json['nonce'] == null ? undefined : json['nonce'], - 'gas': json['gas'] == null ? undefined : json['gas'], - 'gasPrice': json['gasPrice'] == null ? undefined : json['gasPrice'], - 'maxFeePerGas': json['maxFeePerGas'] == null ? undefined : json['maxFeePerGas'], - 'maxPriorityFeePerGas': json['maxPriorityFeePerGas'] == null ? undefined : json['maxPriorityFeePerGas'], - 'accessList': json['accessList'] == null ? undefined : ((json['accessList'] as Array).map(EvmAccessListItemFromJSON)), - }; -} + static readonly mapping: {[index: string]: string} | undefined = undefined; - export function EvmTransactionToJSON(json: any): EvmTransaction { - return EvmTransactionToJSONTyped(json, false); - } + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "blockNumber", + "baseName": "blockNumber", + "type": "string", + "format": "" + }, + { + "name": "blockHash", + "baseName": "blockHash", + "type": "string", + "format": "" + }, + { + "name": "transactionIndex", + "baseName": "transactionIndex", + "type": "string", + "format": "" + }, + { + "name": "hash", + "baseName": "hash", + "type": "string", + "format": "" + }, + { + "name": "chainId", + "baseName": "chainId", + "type": "string", + "format": "" + }, + { + "name": "type", + "baseName": "type", + "type": "string", + "format": "" + }, + { + "name": "_from", + "baseName": "from", + "type": "string", + "format": "" + }, + { + "name": "to", + "baseName": "to", + "type": "string", + "format": "" + }, + { + "name": "input", + "baseName": "input", + "type": "string", + "format": "" + }, + { + "name": "value", + "baseName": "value", + "type": "string", + "format": "" + }, + { + "name": "nonce", + "baseName": "nonce", + "type": "string", + "format": "" + }, + { + "name": "gas", + "baseName": "gas", + "type": "string", + "format": "" + }, + { + "name": "gasPrice", + "baseName": "gasPrice", + "type": "string", + "format": "" + }, + { + "name": "maxFeePerGas", + "baseName": "maxFeePerGas", + "type": "string", + "format": "" + }, + { + "name": "maxPriorityFeePerGas", + "baseName": "maxPriorityFeePerGas", + "type": "string", + "format": "" + }, + { + "name": "accessList", + "baseName": "accessList", + "type": "Array", + "format": "" + } ]; - export function EvmTransactionToJSONTyped(value?: EvmTransaction | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; + static getAttributeTypeMap() { + return EvmTransaction.attributeTypeMap; } - return { - - 'blockNumber': value['blockNumber'], - 'blockHash': value['blockHash'], - 'transactionIndex': value['transactionIndex'], - 'hash': value['hash'], - 'chainId': value['chainId'], - 'type': value['type'], - 'from': value['from'], - 'to': value['to'], - 'input': value['input'], - 'value': value['value'], - 'nonce': value['nonce'], - 'gas': value['gas'], - 'gasPrice': value['gasPrice'], - 'maxFeePerGas': value['maxFeePerGas'], - 'maxPriorityFeePerGas': value['maxPriorityFeePerGas'], - 'accessList': value['accessList'] == null ? undefined : ((value['accessList'] as Array).map(EvmAccessListItemToJSON)), - }; + public constructor() { + } } - diff --git a/src/models/EvmTransactionReceipt.ts b/src/models/EvmTransactionReceipt.ts index edbc371..cf8dd5e 100755 --- a/src/models/EvmTransactionReceipt.ts +++ b/src/models/EvmTransactionReceipt.ts @@ -1,10 +1,8 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Sentio API * Sentio Open API for query data * - * The version of the OpenAPI document: version not set + * OpenAPI spec version: version not set * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -12,102 +10,69 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime.js'; -/** - * - * @export - * @interface EvmTransactionReceipt - */ -export interface EvmTransactionReceipt { - /** - * - * @type {string} - * @memberof EvmTransactionReceipt - */ - gasUsed?: string; - /** - * - * @type {string} - * @memberof EvmTransactionReceipt - */ - cumulativeGasUsed?: string; - /** - * - * @type {string} - * @memberof EvmTransactionReceipt - */ - effectiveGasPrice?: string; - /** - * - * @type {string} - * @memberof EvmTransactionReceipt - */ - status?: string; - /** - * - * @type {string} - * @memberof EvmTransactionReceipt - */ - error?: string; - /** - * - * @type {string} - * @memberof EvmTransactionReceipt - */ - revertReason?: string; - /** - * - * @type {Array} - * @memberof EvmTransactionReceipt - */ - logs?: Array; -} +import { HttpFile } from '../http/http.js'; -/** - * Check if a given object implements the EvmTransactionReceipt interface. - */ -export function instanceOfEvmTransactionReceipt(value: object): value is EvmTransactionReceipt { - return true; -} +export class EvmTransactionReceipt { + 'gasUsed'?: string; + 'cumulativeGasUsed'?: string; + 'effectiveGasPrice'?: string; + 'status'?: string; + 'error'?: string; + 'revertReason'?: string; + 'logs'?: Array; -export function EvmTransactionReceiptFromJSON(json: any): EvmTransactionReceipt { - return EvmTransactionReceiptFromJSONTyped(json, false); -} + static readonly discriminator: string | undefined = undefined; -export function EvmTransactionReceiptFromJSONTyped(json: any, ignoreDiscriminator: boolean): EvmTransactionReceipt { - if (json == null) { - return json; - } - return { - - 'gasUsed': json['gasUsed'] == null ? undefined : json['gasUsed'], - 'cumulativeGasUsed': json['cumulativeGasUsed'] == null ? undefined : json['cumulativeGasUsed'], - 'effectiveGasPrice': json['effectiveGasPrice'] == null ? undefined : json['effectiveGasPrice'], - 'status': json['status'] == null ? undefined : json['status'], - 'error': json['error'] == null ? undefined : json['error'], - 'revertReason': json['revertReason'] == null ? undefined : json['revertReason'], - 'logs': json['logs'] == null ? undefined : json['logs'], - }; -} + static readonly mapping: {[index: string]: string} | undefined = undefined; - export function EvmTransactionReceiptToJSON(json: any): EvmTransactionReceipt { - return EvmTransactionReceiptToJSONTyped(json, false); - } + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "gasUsed", + "baseName": "gasUsed", + "type": "string", + "format": "" + }, + { + "name": "cumulativeGasUsed", + "baseName": "cumulativeGasUsed", + "type": "string", + "format": "" + }, + { + "name": "effectiveGasPrice", + "baseName": "effectiveGasPrice", + "type": "string", + "format": "" + }, + { + "name": "status", + "baseName": "status", + "type": "string", + "format": "" + }, + { + "name": "error", + "baseName": "error", + "type": "string", + "format": "" + }, + { + "name": "revertReason", + "baseName": "revertReason", + "type": "string", + "format": "" + }, + { + "name": "logs", + "baseName": "logs", + "type": "Array", + "format": "" + } ]; - export function EvmTransactionReceiptToJSONTyped(value?: EvmTransactionReceipt | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; + static getAttributeTypeMap() { + return EvmTransactionReceipt.attributeTypeMap; } - return { - - 'gasUsed': value['gasUsed'], - 'cumulativeGasUsed': value['cumulativeGasUsed'], - 'effectiveGasPrice': value['effectiveGasPrice'], - 'status': value['status'], - 'error': value['error'], - 'revertReason': value['revertReason'], - 'logs': value['logs'], - }; + public constructor() { + } } - diff --git a/src/models/GoogleApiHttpBody.ts b/src/models/GoogleApiHttpBody.ts index bdef8e0..883b984 100755 --- a/src/models/GoogleApiHttpBody.ts +++ b/src/models/GoogleApiHttpBody.ts @@ -1,10 +1,8 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Sentio API * Sentio Open API for query data * - * The version of the OpenAPI document: version not set + * OpenAPI spec version: version not set * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -12,78 +10,42 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime.js'; -import type { GoogleProtobufAny } from './GoogleProtobufAny.js'; -import { - GoogleProtobufAnyFromJSON, - GoogleProtobufAnyFromJSONTyped, - GoogleProtobufAnyToJSON, - GoogleProtobufAnyToJSONTyped, -} from './GoogleProtobufAny.js'; - -/** - * - * @export - * @interface GoogleApiHttpBody - */ -export interface GoogleApiHttpBody { - /** - * - * @type {string} - * @memberof GoogleApiHttpBody - */ - contentType?: string; - /** - * - * @type {string} - * @memberof GoogleApiHttpBody - */ - data?: string; - /** - * - * @type {Array} - * @memberof GoogleApiHttpBody - */ - extensions?: Array; -} - -/** - * Check if a given object implements the GoogleApiHttpBody interface. - */ -export function instanceOfGoogleApiHttpBody(value: object): value is GoogleApiHttpBody { - return true; -} - -export function GoogleApiHttpBodyFromJSON(json: any): GoogleApiHttpBody { - return GoogleApiHttpBodyFromJSONTyped(json, false); -} - -export function GoogleApiHttpBodyFromJSONTyped(json: any, ignoreDiscriminator: boolean): GoogleApiHttpBody { - if (json == null) { - return json; +import { GoogleProtobufAny } from '../models/GoogleProtobufAny.js'; +import { HttpFile } from '../http/http.js'; + +export class GoogleApiHttpBody { + 'contentType'?: string; + 'data'?: string; + 'extensions'?: Array; + + static readonly discriminator: string | undefined = undefined; + + static readonly mapping: {[index: string]: string} | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "contentType", + "baseName": "contentType", + "type": "string", + "format": "" + }, + { + "name": "data", + "baseName": "data", + "type": "string", + "format": "byte" + }, + { + "name": "extensions", + "baseName": "extensions", + "type": "Array", + "format": "" + } ]; + + static getAttributeTypeMap() { + return GoogleApiHttpBody.attributeTypeMap; } - return { - - 'contentType': json['contentType'] == null ? undefined : json['contentType'], - 'data': json['data'] == null ? undefined : json['data'], - 'extensions': json['extensions'] == null ? undefined : ((json['extensions'] as Array).map(GoogleProtobufAnyFromJSON)), - }; -} - - export function GoogleApiHttpBodyToJSON(json: any): GoogleApiHttpBody { - return GoogleApiHttpBodyToJSONTyped(json, false); - } - export function GoogleApiHttpBodyToJSONTyped(value?: GoogleApiHttpBody | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; + public constructor() { } - - return { - - 'contentType': value['contentType'], - 'data': value['data'], - 'extensions': value['extensions'] == null ? undefined : ((value['extensions'] as Array).map(GoogleProtobufAnyToJSON)), - }; } - diff --git a/src/models/GoogleProtobufAny.ts b/src/models/GoogleProtobufAny.ts index 8729a4e..5fda13a 100755 --- a/src/models/GoogleProtobufAny.ts +++ b/src/models/GoogleProtobufAny.ts @@ -1,10 +1,8 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Sentio API * Sentio Open API for query data * - * The version of the OpenAPI document: version not set + * OpenAPI spec version: version not set * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -12,168 +10,33 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime.js'; -/** - * `Any` contains an arbitrary serialized protocol buffer message along with a - * URL that describes the type of the serialized message. - * - * Protobuf library provides support to pack/unpack Any values in the form - * of utility functions or additional generated methods of the Any type. - * - * Example 1: Pack and unpack a message in C++. - * - * Foo foo = ...; - * Any any; - * any.PackFrom(foo); - * ... - * if (any.UnpackTo(&foo)) { - * ... - * } - * - * Example 2: Pack and unpack a message in Java. - * - * Foo foo = ...; - * Any any = Any.pack(foo); - * ... - * if (any.is(Foo.class)) { - * foo = any.unpack(Foo.class); - * } - * // or ... - * if (any.isSameTypeAs(Foo.getDefaultInstance())) { - * foo = any.unpack(Foo.getDefaultInstance()); - * } - * - * Example 3: Pack and unpack a message in Python. - * - * foo = Foo(...) - * any = Any() - * any.Pack(foo) - * ... - * if any.Is(Foo.DESCRIPTOR): - * any.Unpack(foo) - * ... - * - * Example 4: Pack and unpack a message in Go - * - * foo := &pb.Foo{...} - * any, err := anypb.New(foo) - * if err != nil { - * ... - * } - * ... - * foo := &pb.Foo{} - * if err := any.UnmarshalTo(foo); err != nil { - * ... - * } - * - * The pack methods provided by protobuf library will by default use - * 'type.googleapis.com/full.type.name' as the type URL and the unpack - * methods only use the fully qualified type name after the last '/' - * in the type URL, for example "foo.bar.com/x/y.z" will yield type - * name "y.z". - * - * JSON - * ==== - * The JSON representation of an `Any` value uses the regular - * representation of the deserialized, embedded message, with an - * additional field `@type` which contains the type URL. Example: - * - * package google.profile; - * message Person { - * string first_name = 1; - * string last_name = 2; - * } - * - * { - * "@type": "type.googleapis.com/google.profile.Person", - * "firstName": , - * "lastName": - * } - * - * If the embedded message type is well-known and has a custom JSON - * representation, that representation will be embedded adding a field - * `value` which holds the custom JSON in addition to the `@type` - * field. Example (for message [google.protobuf.Duration][]): - * - * { - * "@type": "type.googleapis.com/google.protobuf.Duration", - * "value": "1.212s" - * } - * @export - * @interface GoogleProtobufAny - */ -export interface GoogleProtobufAny { - [key: string]: object | any; - /** - * A URL/resource name that uniquely identifies the type of the serialized - * protocol buffer message. This string must contain at least - * one "/" character. The last segment of the URL's path must represent - * the fully qualified name of the type (as in - * `path/google.protobuf.Duration`). The name should be in a canonical form - * (e.g., leading "." is not accepted). - * - * In practice, teams usually precompile into the binary all types that they - * expect it to use in the context of Any. However, for URLs which use the - * scheme `http`, `https`, or no scheme, one can optionally set up a type - * server that maps type URLs to message definitions as follows: - * - * * If no scheme is provided, `https` is assumed. - * * An HTTP GET on the URL must yield a [google.protobuf.Type][] - * value in binary format, or produce an error. - * * Applications are allowed to cache lookup results based on the - * URL, or have them precompiled into a binary to avoid any - * lookup. Therefore, binary compatibility needs to be preserved - * on changes to types. (Use versioned type names to manage - * breaking changes.) - * - * Note: this functionality is not currently available in the official - * protobuf release, and it is not used for type URLs beginning with - * type.googleapis.com. As of May 2023, there are no widely used type server - * implementations and no plans to implement one. - * - * Schemes other than `http`, `https` (or the empty scheme) might be - * used with implementation specific semantics. - * @type {string} - * @memberof GoogleProtobufAny - */ - type?: string; -} +import { HttpFile } from '../http/http.js'; /** - * Check if a given object implements the GoogleProtobufAny interface. - */ -export function instanceOfGoogleProtobufAny(value: object): value is GoogleProtobufAny { - return true; -} +* `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } // or ... if (any.isSameTypeAs(Foo.getDefaultInstance())) { foo = any.unpack(Foo.getDefaultInstance()); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use \'type.googleapis.com/full.type.name\' as the type URL and the unpack methods only use the fully qualified type name after the last \'/\' in the type URL, for example \"foo.bar.com/x/y.z\" will yield type name \"y.z\". JSON ==== The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { \"@type\": \"type.googleapis.com/google.profile.Person\", \"firstName\": , \"lastName\": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { \"@type\": \"type.googleapis.com/google.protobuf.Duration\", \"value\": \"1.212s\" } +*/ +export class GoogleProtobufAny { + /** + * A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one \"/\" character. The last segment of the URL\'s path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading \".\" is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. As of May 2023, there are no widely used type server implementations and no plans to implement one. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. + */ + 'type'?: string; -export function GoogleProtobufAnyFromJSON(json: any): GoogleProtobufAny { - return GoogleProtobufAnyFromJSONTyped(json, false); -} + static readonly discriminator: string | undefined = undefined; -export function GoogleProtobufAnyFromJSONTyped(json: any, ignoreDiscriminator: boolean): GoogleProtobufAny { - if (json == null) { - return json; - } - return { - - ...json, - 'type': json['@type'] == null ? undefined : json['@type'], - }; -} + static readonly mapping: {[index: string]: string} | undefined = undefined; - export function GoogleProtobufAnyToJSON(json: any): GoogleProtobufAny { - return GoogleProtobufAnyToJSONTyped(json, false); - } + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "type", + "baseName": "@type", + "type": "string", + "format": "" + } ]; - export function GoogleProtobufAnyToJSONTyped(value?: GoogleProtobufAny | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; + static getAttributeTypeMap() { + return GoogleProtobufAny.attributeTypeMap; } - return { - - ...value, - '@type': value['type'], - }; + public constructor() { + } } - diff --git a/src/models/GoogleProtobufNullValue.ts b/src/models/GoogleProtobufNullValue.ts index 71a5f6b..8b42752 100755 --- a/src/models/GoogleProtobufNullValue.ts +++ b/src/models/GoogleProtobufNullValue.ts @@ -1,10 +1,8 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Sentio API * Sentio Open API for query data * - * The version of the OpenAPI document: version not set + * OpenAPI spec version: version not set * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -12,46 +10,11 @@ * Do not edit the class manually. */ +import { HttpFile } from '../http/http.js'; /** - * `NullValue` is a singleton enumeration to represent the null value for the - * `Value` type union. - * - * The JSON representation for `NullValue` is JSON `null`. - * - * - NULL_VALUE: Null value. - * @export - */ -export const GoogleProtobufNullValue = { - NullValue: 'NULL_VALUE' -} as const; -export type GoogleProtobufNullValue = typeof GoogleProtobufNullValue[keyof typeof GoogleProtobufNullValue]; - - -export function instanceOfGoogleProtobufNullValue(value: any): boolean { - for (const key in GoogleProtobufNullValue) { - if (Object.prototype.hasOwnProperty.call(GoogleProtobufNullValue, key)) { - if (GoogleProtobufNullValue[key as keyof typeof GoogleProtobufNullValue] === value) { - return true; - } - } - } - return false; -} - -export function GoogleProtobufNullValueFromJSON(json: any): GoogleProtobufNullValue { - return GoogleProtobufNullValueFromJSONTyped(json, false); +* `NullValue` is a singleton enumeration to represent the null value for the `Value` type union. The JSON representation for `NullValue` is JSON `null`. - NULL_VALUE: Null value. +*/ +export enum GoogleProtobufNullValue { + NullValue = 'NULL_VALUE' } - -export function GoogleProtobufNullValueFromJSONTyped(json: any, ignoreDiscriminator: boolean): GoogleProtobufNullValue { - return json as GoogleProtobufNullValue; -} - -export function GoogleProtobufNullValueToJSON(value?: GoogleProtobufNullValue | null): any { - return value as any; -} - -export function GoogleProtobufNullValueToJSONTyped(value: any, ignoreDiscriminator: boolean): GoogleProtobufNullValue { - return value as GoogleProtobufNullValue; -} - diff --git a/src/models/InsightsServiceDataSource.ts b/src/models/InsightsServiceDataSource.ts index 274f73c..ef4a5d1 100755 --- a/src/models/InsightsServiceDataSource.ts +++ b/src/models/InsightsServiceDataSource.ts @@ -1,10 +1,8 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Sentio API * Sentio Open API for query data * - * The version of the OpenAPI document: version not set + * OpenAPI spec version: version not set * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -12,46 +10,13 @@ * Do not edit the class manually. */ +import { HttpFile } from '../http/http.js'; -/** - * - * @export - */ -export const InsightsServiceDataSource = { - Metrics: 'METRICS', - Events: 'EVENTS', - Price: 'PRICE', - Formula: 'FORMULA', - Cohorts: 'COHORTS', - SystemSql: 'SYSTEM_SQL' -} as const; -export type InsightsServiceDataSource = typeof InsightsServiceDataSource[keyof typeof InsightsServiceDataSource]; - - -export function instanceOfInsightsServiceDataSource(value: any): boolean { - for (const key in InsightsServiceDataSource) { - if (Object.prototype.hasOwnProperty.call(InsightsServiceDataSource, key)) { - if (InsightsServiceDataSource[key as keyof typeof InsightsServiceDataSource] === value) { - return true; - } - } - } - return false; -} - -export function InsightsServiceDataSourceFromJSON(json: any): InsightsServiceDataSource { - return InsightsServiceDataSourceFromJSONTyped(json, false); +export enum InsightsServiceDataSource { + Metrics = 'METRICS', + Events = 'EVENTS', + Price = 'PRICE', + Formula = 'FORMULA', + Cohorts = 'COHORTS', + SystemSql = 'SYSTEM_SQL' } - -export function InsightsServiceDataSourceFromJSONTyped(json: any, ignoreDiscriminator: boolean): InsightsServiceDataSource { - return json as InsightsServiceDataSource; -} - -export function InsightsServiceDataSourceToJSON(value?: InsightsServiceDataSource | null): any { - return value as any; -} - -export function InsightsServiceDataSourceToJSONTyped(value: any, ignoreDiscriminator: boolean): InsightsServiceDataSource { - return value as InsightsServiceDataSource; -} - diff --git a/src/models/InsightsServiceInsightsServiceQueryBody.ts b/src/models/InsightsServiceInsightsServiceQueryBody.ts index 735cc83..51efd08 100755 --- a/src/models/InsightsServiceInsightsServiceQueryBody.ts +++ b/src/models/InsightsServiceInsightsServiceQueryBody.ts @@ -1,10 +1,8 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Sentio API * Sentio Open API for query data * - * The version of the OpenAPI document: version not set + * OpenAPI spec version: version not set * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -12,147 +10,87 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime.js'; -import type { CommonCachePolicy } from './CommonCachePolicy.js'; -import { - CommonCachePolicyFromJSON, - CommonCachePolicyFromJSONTyped, - CommonCachePolicyToJSON, - CommonCachePolicyToJSONTyped, -} from './CommonCachePolicy.js'; -import type { CommonFormula } from './CommonFormula.js'; -import { - CommonFormulaFromJSON, - CommonFormulaFromJSONTyped, - CommonFormulaToJSON, - CommonFormulaToJSONTyped, -} from './CommonFormula.js'; -import type { CommonTimeRangeLite } from './CommonTimeRangeLite.js'; -import { - CommonTimeRangeLiteFromJSON, - CommonTimeRangeLiteFromJSONTyped, - CommonTimeRangeLiteToJSON, - CommonTimeRangeLiteToJSONTyped, -} from './CommonTimeRangeLite.js'; -import type { InsightsServiceQueryRequestQuery } from './InsightsServiceQueryRequestQuery.js'; -import { - InsightsServiceQueryRequestQueryFromJSON, - InsightsServiceQueryRequestQueryFromJSONTyped, - InsightsServiceQueryRequestQueryToJSON, - InsightsServiceQueryRequestQueryToJSONTyped, -} from './InsightsServiceQueryRequestQuery.js'; +import { CommonCachePolicy } from '../models/CommonCachePolicy.js'; +import { CommonFormula } from '../models/CommonFormula.js'; +import { CommonTimeRangeLite } from '../models/CommonTimeRangeLite.js'; +import { InsightsServiceQueryRequestQuery } from '../models/InsightsServiceQueryRequestQuery.js'; +import { HttpFile } from '../http/http.js'; -/** - * - * @export - * @interface InsightsServiceInsightsServiceQueryBody - */ -export interface InsightsServiceInsightsServiceQueryBody { - /** - * - * @type {string} - * @memberof InsightsServiceInsightsServiceQueryBody - */ - projectId?: string; - /** - * - * @type {number} - * @memberof InsightsServiceInsightsServiceQueryBody - */ - version?: number; - /** - * - * @type {CommonTimeRangeLite} - * @memberof InsightsServiceInsightsServiceQueryBody - */ - timeRange?: CommonTimeRangeLite; - /** - * - * @type {Array} - * @memberof InsightsServiceInsightsServiceQueryBody - */ - queries?: Array; - /** - * - * @type {Array} - * @memberof InsightsServiceInsightsServiceQueryBody - */ - formulas?: Array; - /** - * - * @type {number} - * @memberof InsightsServiceInsightsServiceQueryBody - */ - limit?: number; - /** - * - * @type {number} - * @memberof InsightsServiceInsightsServiceQueryBody - */ - offset?: number; - /** - * - * @type {boolean} - * @memberof InsightsServiceInsightsServiceQueryBody - */ - bypassCache?: boolean; - /** - * - * @type {CommonCachePolicy} - * @memberof InsightsServiceInsightsServiceQueryBody - */ - cachePolicy?: CommonCachePolicy; -} +export class InsightsServiceInsightsServiceQueryBody { + 'projectId'?: string; + 'version'?: number; + 'timeRange'?: CommonTimeRangeLite; + 'queries'?: Array; + 'formulas'?: Array; + 'limit'?: number; + 'offset'?: number; + 'bypassCache'?: boolean; + 'cachePolicy'?: CommonCachePolicy; -/** - * Check if a given object implements the InsightsServiceInsightsServiceQueryBody interface. - */ -export function instanceOfInsightsServiceInsightsServiceQueryBody(value: object): value is InsightsServiceInsightsServiceQueryBody { - return true; -} + static readonly discriminator: string | undefined = undefined; -export function InsightsServiceInsightsServiceQueryBodyFromJSON(json: any): InsightsServiceInsightsServiceQueryBody { - return InsightsServiceInsightsServiceQueryBodyFromJSONTyped(json, false); -} - -export function InsightsServiceInsightsServiceQueryBodyFromJSONTyped(json: any, ignoreDiscriminator: boolean): InsightsServiceInsightsServiceQueryBody { - if (json == null) { - return json; - } - return { - - 'projectId': json['projectId'] == null ? undefined : json['projectId'], - 'version': json['version'] == null ? undefined : json['version'], - 'timeRange': json['timeRange'] == null ? undefined : CommonTimeRangeLiteFromJSON(json['timeRange']), - 'queries': json['queries'] == null ? undefined : ((json['queries'] as Array).map(InsightsServiceQueryRequestQueryFromJSON)), - 'formulas': json['formulas'] == null ? undefined : ((json['formulas'] as Array).map(CommonFormulaFromJSON)), - 'limit': json['limit'] == null ? undefined : json['limit'], - 'offset': json['offset'] == null ? undefined : json['offset'], - 'bypassCache': json['bypassCache'] == null ? undefined : json['bypassCache'], - 'cachePolicy': json['cachePolicy'] == null ? undefined : CommonCachePolicyFromJSON(json['cachePolicy']), - }; -} + static readonly mapping: {[index: string]: string} | undefined = undefined; - export function InsightsServiceInsightsServiceQueryBodyToJSON(json: any): InsightsServiceInsightsServiceQueryBody { - return InsightsServiceInsightsServiceQueryBodyToJSONTyped(json, false); - } + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "projectId", + "baseName": "projectId", + "type": "string", + "format": "" + }, + { + "name": "version", + "baseName": "version", + "type": "number", + "format": "int32" + }, + { + "name": "timeRange", + "baseName": "timeRange", + "type": "CommonTimeRangeLite", + "format": "" + }, + { + "name": "queries", + "baseName": "queries", + "type": "Array", + "format": "" + }, + { + "name": "formulas", + "baseName": "formulas", + "type": "Array", + "format": "" + }, + { + "name": "limit", + "baseName": "limit", + "type": "number", + "format": "int32" + }, + { + "name": "offset", + "baseName": "offset", + "type": "number", + "format": "int32" + }, + { + "name": "bypassCache", + "baseName": "bypassCache", + "type": "boolean", + "format": "" + }, + { + "name": "cachePolicy", + "baseName": "cachePolicy", + "type": "CommonCachePolicy", + "format": "" + } ]; - export function InsightsServiceInsightsServiceQueryBodyToJSONTyped(value?: InsightsServiceInsightsServiceQueryBody | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; + static getAttributeTypeMap() { + return InsightsServiceInsightsServiceQueryBody.attributeTypeMap; } - return { - - 'projectId': value['projectId'], - 'version': value['version'], - 'timeRange': CommonTimeRangeLiteToJSON(value['timeRange']), - 'queries': value['queries'] == null ? undefined : ((value['queries'] as Array).map(InsightsServiceQueryRequestQueryToJSON)), - 'formulas': value['formulas'] == null ? undefined : ((value['formulas'] as Array).map(CommonFormulaToJSON)), - 'limit': value['limit'], - 'offset': value['offset'], - 'bypassCache': value['bypassCache'], - 'cachePolicy': CommonCachePolicyToJSON(value['cachePolicy']), - }; + public constructor() { + } } - diff --git a/src/models/InsightsServiceInsightsServiceRetentionBody.ts b/src/models/InsightsServiceInsightsServiceRetentionBody.ts index 982fe70..3fff4fc 100755 --- a/src/models/InsightsServiceInsightsServiceRetentionBody.ts +++ b/src/models/InsightsServiceInsightsServiceRetentionBody.ts @@ -1,10 +1,8 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Sentio API * Sentio Open API for query data * - * The version of the OpenAPI document: version not set + * OpenAPI spec version: version not set * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -12,93 +10,50 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime.js'; -import type { CommonRetentionQuery } from './CommonRetentionQuery.js'; -import { - CommonRetentionQueryFromJSON, - CommonRetentionQueryFromJSONTyped, - CommonRetentionQueryToJSON, - CommonRetentionQueryToJSONTyped, -} from './CommonRetentionQuery.js'; -import type { CommonTimeRangeLite } from './CommonTimeRangeLite.js'; -import { - CommonTimeRangeLiteFromJSON, - CommonTimeRangeLiteFromJSONTyped, - CommonTimeRangeLiteToJSON, - CommonTimeRangeLiteToJSONTyped, -} from './CommonTimeRangeLite.js'; - -/** - * - * @export - * @interface InsightsServiceInsightsServiceRetentionBody - */ -export interface InsightsServiceInsightsServiceRetentionBody { - /** - * - * @type {string} - * @memberof InsightsServiceInsightsServiceRetentionBody - */ - projectId?: string; - /** - * - * @type {number} - * @memberof InsightsServiceInsightsServiceRetentionBody - */ - version?: number; - /** - * - * @type {CommonTimeRangeLite} - * @memberof InsightsServiceInsightsServiceRetentionBody - */ - timeRange?: CommonTimeRangeLite; - /** - * - * @type {CommonRetentionQuery} - * @memberof InsightsServiceInsightsServiceRetentionBody - */ - query?: CommonRetentionQuery; -} - -/** - * Check if a given object implements the InsightsServiceInsightsServiceRetentionBody interface. - */ -export function instanceOfInsightsServiceInsightsServiceRetentionBody(value: object): value is InsightsServiceInsightsServiceRetentionBody { - return true; -} - -export function InsightsServiceInsightsServiceRetentionBodyFromJSON(json: any): InsightsServiceInsightsServiceRetentionBody { - return InsightsServiceInsightsServiceRetentionBodyFromJSONTyped(json, false); -} - -export function InsightsServiceInsightsServiceRetentionBodyFromJSONTyped(json: any, ignoreDiscriminator: boolean): InsightsServiceInsightsServiceRetentionBody { - if (json == null) { - return json; +import { CommonRetentionQuery } from '../models/CommonRetentionQuery.js'; +import { CommonTimeRangeLite } from '../models/CommonTimeRangeLite.js'; +import { HttpFile } from '../http/http.js'; + +export class InsightsServiceInsightsServiceRetentionBody { + 'projectId'?: string; + 'version'?: number; + 'timeRange'?: CommonTimeRangeLite; + 'query'?: CommonRetentionQuery; + + static readonly discriminator: string | undefined = undefined; + + static readonly mapping: {[index: string]: string} | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "projectId", + "baseName": "projectId", + "type": "string", + "format": "" + }, + { + "name": "version", + "baseName": "version", + "type": "number", + "format": "int32" + }, + { + "name": "timeRange", + "baseName": "timeRange", + "type": "CommonTimeRangeLite", + "format": "" + }, + { + "name": "query", + "baseName": "query", + "type": "CommonRetentionQuery", + "format": "" + } ]; + + static getAttributeTypeMap() { + return InsightsServiceInsightsServiceRetentionBody.attributeTypeMap; } - return { - - 'projectId': json['projectId'] == null ? undefined : json['projectId'], - 'version': json['version'] == null ? undefined : json['version'], - 'timeRange': json['timeRange'] == null ? undefined : CommonTimeRangeLiteFromJSON(json['timeRange']), - 'query': json['query'] == null ? undefined : CommonRetentionQueryFromJSON(json['query']), - }; -} - - export function InsightsServiceInsightsServiceRetentionBodyToJSON(json: any): InsightsServiceInsightsServiceRetentionBody { - return InsightsServiceInsightsServiceRetentionBodyToJSONTyped(json, false); - } - export function InsightsServiceInsightsServiceRetentionBodyToJSONTyped(value?: InsightsServiceInsightsServiceRetentionBody | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; + public constructor() { } - - return { - - 'projectId': value['projectId'], - 'version': value['version'], - 'timeRange': CommonTimeRangeLiteToJSON(value['timeRange']), - 'query': CommonRetentionQueryToJSON(value['query']), - }; } - diff --git a/src/models/InsightsServiceListCoinsResponse.ts b/src/models/InsightsServiceListCoinsResponse.ts index 1a2d007..3aa153d 100755 --- a/src/models/InsightsServiceListCoinsResponse.ts +++ b/src/models/InsightsServiceListCoinsResponse.ts @@ -1,10 +1,8 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Sentio API * Sentio Open API for query data * - * The version of the OpenAPI document: version not set + * OpenAPI spec version: version not set * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -12,77 +10,36 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime.js'; -import type { CommonCoinID } from './CommonCoinID.js'; -import { - CommonCoinIDFromJSON, - CommonCoinIDFromJSONTyped, - CommonCoinIDToJSON, - CommonCoinIDToJSONTyped, -} from './CommonCoinID.js'; -import type { CommonComputeStats } from './CommonComputeStats.js'; -import { - CommonComputeStatsFromJSON, - CommonComputeStatsFromJSONTyped, - CommonComputeStatsToJSON, - CommonComputeStatsToJSONTyped, -} from './CommonComputeStats.js'; - -/** - * - * @export - * @interface InsightsServiceListCoinsResponse - */ -export interface InsightsServiceListCoinsResponse { - /** - * - * @type {Array} - * @memberof InsightsServiceListCoinsResponse - */ - coins?: Array; - /** - * - * @type {CommonComputeStats} - * @memberof InsightsServiceListCoinsResponse - */ - computeStats?: CommonComputeStats; -} - -/** - * Check if a given object implements the InsightsServiceListCoinsResponse interface. - */ -export function instanceOfInsightsServiceListCoinsResponse(value: object): value is InsightsServiceListCoinsResponse { - return true; -} - -export function InsightsServiceListCoinsResponseFromJSON(json: any): InsightsServiceListCoinsResponse { - return InsightsServiceListCoinsResponseFromJSONTyped(json, false); -} - -export function InsightsServiceListCoinsResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): InsightsServiceListCoinsResponse { - if (json == null) { - return json; +import { CommonCoinID } from '../models/CommonCoinID.js'; +import { CommonComputeStats } from '../models/CommonComputeStats.js'; +import { HttpFile } from '../http/http.js'; + +export class InsightsServiceListCoinsResponse { + 'coins'?: Array; + 'computeStats'?: CommonComputeStats; + + static readonly discriminator: string | undefined = undefined; + + static readonly mapping: {[index: string]: string} | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "coins", + "baseName": "coins", + "type": "Array", + "format": "" + }, + { + "name": "computeStats", + "baseName": "computeStats", + "type": "CommonComputeStats", + "format": "" + } ]; + + static getAttributeTypeMap() { + return InsightsServiceListCoinsResponse.attributeTypeMap; } - return { - - 'coins': json['coins'] == null ? undefined : ((json['coins'] as Array).map(CommonCoinIDFromJSON)), - 'computeStats': json['computeStats'] == null ? undefined : CommonComputeStatsFromJSON(json['computeStats']), - }; -} - - export function InsightsServiceListCoinsResponseToJSON(json: any): InsightsServiceListCoinsResponse { - return InsightsServiceListCoinsResponseToJSONTyped(json, false); - } - export function InsightsServiceListCoinsResponseToJSONTyped(value?: InsightsServiceListCoinsResponse | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; + public constructor() { } - - return { - - 'coins': value['coins'] == null ? undefined : ((value['coins'] as Array).map(CommonCoinIDToJSON)), - 'computeStats': CommonComputeStatsToJSON(value['computeStats']), - }; } - diff --git a/src/models/InsightsServiceQueryRequestQuery.ts b/src/models/InsightsServiceQueryRequestQuery.ts index 1eb1200..22ee702 100755 --- a/src/models/InsightsServiceQueryRequestQuery.ts +++ b/src/models/InsightsServiceQueryRequestQuery.ts @@ -1,10 +1,8 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Sentio API * Sentio Open API for query data * - * The version of the OpenAPI document: version not set + * OpenAPI spec version: version not set * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -12,117 +10,61 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime.js'; -import type { InsightsServiceDataSource } from './InsightsServiceDataSource.js'; -import { - InsightsServiceDataSourceFromJSON, - InsightsServiceDataSourceFromJSONTyped, - InsightsServiceDataSourceToJSON, - InsightsServiceDataSourceToJSONTyped, -} from './InsightsServiceDataSource.js'; -import type { CommonQuery } from './CommonQuery.js'; -import { - CommonQueryFromJSON, - CommonQueryFromJSONTyped, - CommonQueryToJSON, - CommonQueryToJSONTyped, -} from './CommonQuery.js'; -import type { CommonPriceSegmentationQuery } from './CommonPriceSegmentationQuery.js'; -import { - CommonPriceSegmentationQueryFromJSON, - CommonPriceSegmentationQueryFromJSONTyped, - CommonPriceSegmentationQueryToJSON, - CommonPriceSegmentationQueryToJSONTyped, -} from './CommonPriceSegmentationQuery.js'; -import type { CommonSegmentationQuery } from './CommonSegmentationQuery.js'; -import { - CommonSegmentationQueryFromJSON, - CommonSegmentationQueryFromJSONTyped, - CommonSegmentationQueryToJSON, - CommonSegmentationQueryToJSONTyped, -} from './CommonSegmentationQuery.js'; +import { CommonPriceSegmentationQuery } from '../models/CommonPriceSegmentationQuery.js'; +import { CommonQuery } from '../models/CommonQuery.js'; +import { CommonSegmentationQuery } from '../models/CommonSegmentationQuery.js'; +import { InsightsServiceDataSource } from '../models/InsightsServiceDataSource.js'; +import { HttpFile } from '../http/http.js'; -/** - * - * @export - * @interface InsightsServiceQueryRequestQuery - */ -export interface InsightsServiceQueryRequestQuery { - /** - * - * @type {CommonQuery} - * @memberof InsightsServiceQueryRequestQuery - */ - metricsQuery?: CommonQuery; - /** - * - * @type {CommonSegmentationQuery} - * @memberof InsightsServiceQueryRequestQuery - */ - eventsQuery?: CommonSegmentationQuery; - /** - * - * @type {CommonPriceSegmentationQuery} - * @memberof InsightsServiceQueryRequestQuery - */ - priceQuery?: CommonPriceSegmentationQuery; - /** - * - * @type {InsightsServiceDataSource} - * @memberof InsightsServiceQueryRequestQuery - */ - dataSource?: InsightsServiceDataSource; - /** - * - * @type {string} - * @memberof InsightsServiceQueryRequestQuery - */ - sourceName?: string; -} +export class InsightsServiceQueryRequestQuery { + 'metricsQuery'?: CommonQuery; + 'eventsQuery'?: CommonSegmentationQuery; + 'priceQuery'?: CommonPriceSegmentationQuery; + 'dataSource'?: InsightsServiceDataSource; + 'sourceName'?: string; + static readonly discriminator: string | undefined = undefined; + static readonly mapping: {[index: string]: string} | undefined = undefined; -/** - * Check if a given object implements the InsightsServiceQueryRequestQuery interface. - */ -export function instanceOfInsightsServiceQueryRequestQuery(value: object): value is InsightsServiceQueryRequestQuery { - return true; -} + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "metricsQuery", + "baseName": "metricsQuery", + "type": "CommonQuery", + "format": "" + }, + { + "name": "eventsQuery", + "baseName": "eventsQuery", + "type": "CommonSegmentationQuery", + "format": "" + }, + { + "name": "priceQuery", + "baseName": "priceQuery", + "type": "CommonPriceSegmentationQuery", + "format": "" + }, + { + "name": "dataSource", + "baseName": "dataSource", + "type": "InsightsServiceDataSource", + "format": "" + }, + { + "name": "sourceName", + "baseName": "sourceName", + "type": "string", + "format": "" + } ]; -export function InsightsServiceQueryRequestQueryFromJSON(json: any): InsightsServiceQueryRequestQuery { - return InsightsServiceQueryRequestQueryFromJSONTyped(json, false); -} - -export function InsightsServiceQueryRequestQueryFromJSONTyped(json: any, ignoreDiscriminator: boolean): InsightsServiceQueryRequestQuery { - if (json == null) { - return json; + static getAttributeTypeMap() { + return InsightsServiceQueryRequestQuery.attributeTypeMap; } - return { - - 'metricsQuery': json['metricsQuery'] == null ? undefined : CommonQueryFromJSON(json['metricsQuery']), - 'eventsQuery': json['eventsQuery'] == null ? undefined : CommonSegmentationQueryFromJSON(json['eventsQuery']), - 'priceQuery': json['priceQuery'] == null ? undefined : CommonPriceSegmentationQueryFromJSON(json['priceQuery']), - 'dataSource': json['dataSource'] == null ? undefined : InsightsServiceDataSourceFromJSON(json['dataSource']), - 'sourceName': json['sourceName'] == null ? undefined : json['sourceName'], - }; -} - export function InsightsServiceQueryRequestQueryToJSON(json: any): InsightsServiceQueryRequestQuery { - return InsightsServiceQueryRequestQueryToJSONTyped(json, false); - } - - export function InsightsServiceQueryRequestQueryToJSONTyped(value?: InsightsServiceQueryRequestQuery | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; + public constructor() { } - - return { - - 'metricsQuery': CommonQueryToJSON(value['metricsQuery']), - 'eventsQuery': CommonSegmentationQueryToJSON(value['eventsQuery']), - 'priceQuery': CommonPriceSegmentationQueryToJSON(value['priceQuery']), - 'dataSource': InsightsServiceDataSourceToJSON(value['dataSource']), - 'sourceName': value['sourceName'], - }; } + diff --git a/src/models/InsightsServiceQueryResponse.ts b/src/models/InsightsServiceQueryResponse.ts index 9694a16..c5ddaa2 100755 --- a/src/models/InsightsServiceQueryResponse.ts +++ b/src/models/InsightsServiceQueryResponse.ts @@ -1,10 +1,8 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Sentio API * Sentio Open API for query data * - * The version of the OpenAPI document: version not set + * OpenAPI spec version: version not set * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -12,62 +10,28 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime.js'; -import type { InsightsServiceQueryResponseResult } from './InsightsServiceQueryResponseResult.js'; -import { - InsightsServiceQueryResponseResultFromJSON, - InsightsServiceQueryResponseResultFromJSONTyped, - InsightsServiceQueryResponseResultToJSON, - InsightsServiceQueryResponseResultToJSONTyped, -} from './InsightsServiceQueryResponseResult.js'; +import { InsightsServiceQueryResponseResult } from '../models/InsightsServiceQueryResponseResult.js'; +import { HttpFile } from '../http/http.js'; -/** - * - * @export - * @interface InsightsServiceQueryResponse - */ -export interface InsightsServiceQueryResponse { - /** - * - * @type {Array} - * @memberof InsightsServiceQueryResponse - */ - results?: Array; -} +export class InsightsServiceQueryResponse { + 'results'?: Array; -/** - * Check if a given object implements the InsightsServiceQueryResponse interface. - */ -export function instanceOfInsightsServiceQueryResponse(value: object): value is InsightsServiceQueryResponse { - return true; -} + static readonly discriminator: string | undefined = undefined; -export function InsightsServiceQueryResponseFromJSON(json: any): InsightsServiceQueryResponse { - return InsightsServiceQueryResponseFromJSONTyped(json, false); -} - -export function InsightsServiceQueryResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): InsightsServiceQueryResponse { - if (json == null) { - return json; - } - return { - - 'results': json['results'] == null ? undefined : ((json['results'] as Array).map(InsightsServiceQueryResponseResultFromJSON)), - }; -} + static readonly mapping: {[index: string]: string} | undefined = undefined; - export function InsightsServiceQueryResponseToJSON(json: any): InsightsServiceQueryResponse { - return InsightsServiceQueryResponseToJSONTyped(json, false); - } + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "results", + "baseName": "results", + "type": "Array", + "format": "" + } ]; - export function InsightsServiceQueryResponseToJSONTyped(value?: InsightsServiceQueryResponse | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; + static getAttributeTypeMap() { + return InsightsServiceQueryResponse.attributeTypeMap; } - return { - - 'results': value['results'] == null ? undefined : ((value['results'] as Array).map(InsightsServiceQueryResponseResultToJSON)), - }; + public constructor() { + } } - diff --git a/src/models/InsightsServiceQueryResponseResult.ts b/src/models/InsightsServiceQueryResponseResult.ts index 4eea5bb..9bb276f 100755 --- a/src/models/InsightsServiceQueryResponseResult.ts +++ b/src/models/InsightsServiceQueryResponseResult.ts @@ -1,10 +1,8 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Sentio API * Sentio Open API for query data * - * The version of the OpenAPI document: version not set + * OpenAPI spec version: version not set * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -12,118 +10,67 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime.js'; -import type { InsightsServiceDataSource } from './InsightsServiceDataSource.js'; -import { - InsightsServiceDataSourceFromJSON, - InsightsServiceDataSourceFromJSONTyped, - InsightsServiceDataSourceToJSON, - InsightsServiceDataSourceToJSONTyped, -} from './InsightsServiceDataSource.js'; -import type { CommonComputeStats } from './CommonComputeStats.js'; -import { - CommonComputeStatsFromJSON, - CommonComputeStatsFromJSONTyped, - CommonComputeStatsToJSON, - CommonComputeStatsToJSONTyped, -} from './CommonComputeStats.js'; -import type { CommonMatrix } from './CommonMatrix.js'; -import { - CommonMatrixFromJSON, - CommonMatrixFromJSONTyped, - CommonMatrixToJSON, - CommonMatrixToJSONTyped, -} from './CommonMatrix.js'; +import { CommonComputeStats } from '../models/CommonComputeStats.js'; +import { CommonMatrix } from '../models/CommonMatrix.js'; +import { InsightsServiceDataSource } from '../models/InsightsServiceDataSource.js'; +import { HttpFile } from '../http/http.js'; -/** - * - * @export - * @interface InsightsServiceQueryResponseResult - */ -export interface InsightsServiceQueryResponseResult { - /** - * - * @type {string} - * @memberof InsightsServiceQueryResponseResult - */ - id?: string; - /** - * - * @type {string} - * @memberof InsightsServiceQueryResponseResult - */ - alias?: string; - /** - * - * @type {InsightsServiceDataSource} - * @memberof InsightsServiceQueryResponseResult - */ - dataSource?: InsightsServiceDataSource; - /** - * - * @type {CommonMatrix} - * @memberof InsightsServiceQueryResponseResult - */ - matrix?: CommonMatrix; - /** - * - * @type {string} - * @memberof InsightsServiceQueryResponseResult - */ - error?: string; - /** - * - * @type {CommonComputeStats} - * @memberof InsightsServiceQueryResponseResult - */ - computeStats?: CommonComputeStats; -} +export class InsightsServiceQueryResponseResult { + 'id'?: string; + 'alias'?: string; + 'dataSource'?: InsightsServiceDataSource; + 'matrix'?: CommonMatrix; + 'error'?: string; + 'computeStats'?: CommonComputeStats; + static readonly discriminator: string | undefined = undefined; + static readonly mapping: {[index: string]: string} | undefined = undefined; -/** - * Check if a given object implements the InsightsServiceQueryResponseResult interface. - */ -export function instanceOfInsightsServiceQueryResponseResult(value: object): value is InsightsServiceQueryResponseResult { - return true; -} + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "id", + "baseName": "id", + "type": "string", + "format": "" + }, + { + "name": "alias", + "baseName": "alias", + "type": "string", + "format": "" + }, + { + "name": "dataSource", + "baseName": "dataSource", + "type": "InsightsServiceDataSource", + "format": "" + }, + { + "name": "matrix", + "baseName": "matrix", + "type": "CommonMatrix", + "format": "" + }, + { + "name": "error", + "baseName": "error", + "type": "string", + "format": "" + }, + { + "name": "computeStats", + "baseName": "computeStats", + "type": "CommonComputeStats", + "format": "" + } ]; -export function InsightsServiceQueryResponseResultFromJSON(json: any): InsightsServiceQueryResponseResult { - return InsightsServiceQueryResponseResultFromJSONTyped(json, false); -} - -export function InsightsServiceQueryResponseResultFromJSONTyped(json: any, ignoreDiscriminator: boolean): InsightsServiceQueryResponseResult { - if (json == null) { - return json; + static getAttributeTypeMap() { + return InsightsServiceQueryResponseResult.attributeTypeMap; } - return { - - 'id': json['id'] == null ? undefined : json['id'], - 'alias': json['alias'] == null ? undefined : json['alias'], - 'dataSource': json['dataSource'] == null ? undefined : InsightsServiceDataSourceFromJSON(json['dataSource']), - 'matrix': json['matrix'] == null ? undefined : CommonMatrixFromJSON(json['matrix']), - 'error': json['error'] == null ? undefined : json['error'], - 'computeStats': json['computeStats'] == null ? undefined : CommonComputeStatsFromJSON(json['computeStats']), - }; -} - export function InsightsServiceQueryResponseResultToJSON(json: any): InsightsServiceQueryResponseResult { - return InsightsServiceQueryResponseResultToJSONTyped(json, false); - } - - export function InsightsServiceQueryResponseResultToJSONTyped(value?: InsightsServiceQueryResponseResult | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; + public constructor() { } - - return { - - 'id': value['id'], - 'alias': value['alias'], - 'dataSource': InsightsServiceDataSourceToJSON(value['dataSource']), - 'matrix': CommonMatrixToJSON(value['matrix']), - 'error': value['error'], - 'computeStats': CommonComputeStatsToJSON(value['computeStats']), - }; } + diff --git a/src/models/InsightsServiceRetentionRequest.ts b/src/models/InsightsServiceRetentionRequest.ts index dbe3edd..bc3f7de 100755 --- a/src/models/InsightsServiceRetentionRequest.ts +++ b/src/models/InsightsServiceRetentionRequest.ts @@ -1,10 +1,8 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Sentio API * Sentio Open API for query data * - * The version of the OpenAPI document: version not set + * OpenAPI spec version: version not set * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -12,109 +10,64 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime.js'; -import type { CommonRetentionQuery } from './CommonRetentionQuery.js'; -import { - CommonRetentionQueryFromJSON, - CommonRetentionQueryFromJSONTyped, - CommonRetentionQueryToJSON, - CommonRetentionQueryToJSONTyped, -} from './CommonRetentionQuery.js'; -import type { CommonTimeRangeLite } from './CommonTimeRangeLite.js'; -import { - CommonTimeRangeLiteFromJSON, - CommonTimeRangeLiteFromJSONTyped, - CommonTimeRangeLiteToJSON, - CommonTimeRangeLiteToJSONTyped, -} from './CommonTimeRangeLite.js'; +import { CommonRetentionQuery } from '../models/CommonRetentionQuery.js'; +import { CommonTimeRangeLite } from '../models/CommonTimeRangeLite.js'; +import { HttpFile } from '../http/http.js'; -/** - * - * @export - * @interface InsightsServiceRetentionRequest - */ -export interface InsightsServiceRetentionRequest { - /** - * - * @type {string} - * @memberof InsightsServiceRetentionRequest - */ - projectOwner?: string; - /** - * - * @type {string} - * @memberof InsightsServiceRetentionRequest - */ - projectSlug?: string; - /** - * - * @type {string} - * @memberof InsightsServiceRetentionRequest - */ - projectId?: string; - /** - * - * @type {number} - * @memberof InsightsServiceRetentionRequest - */ - version?: number; - /** - * - * @type {CommonTimeRangeLite} - * @memberof InsightsServiceRetentionRequest - */ - timeRange?: CommonTimeRangeLite; - /** - * - * @type {CommonRetentionQuery} - * @memberof InsightsServiceRetentionRequest - */ - query?: CommonRetentionQuery; -} +export class InsightsServiceRetentionRequest { + 'projectOwner'?: string; + 'projectSlug'?: string; + 'projectId'?: string; + 'version'?: number; + 'timeRange'?: CommonTimeRangeLite; + 'query'?: CommonRetentionQuery; -/** - * Check if a given object implements the InsightsServiceRetentionRequest interface. - */ -export function instanceOfInsightsServiceRetentionRequest(value: object): value is InsightsServiceRetentionRequest { - return true; -} + static readonly discriminator: string | undefined = undefined; -export function InsightsServiceRetentionRequestFromJSON(json: any): InsightsServiceRetentionRequest { - return InsightsServiceRetentionRequestFromJSONTyped(json, false); -} - -export function InsightsServiceRetentionRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): InsightsServiceRetentionRequest { - if (json == null) { - return json; - } - return { - - 'projectOwner': json['projectOwner'] == null ? undefined : json['projectOwner'], - 'projectSlug': json['projectSlug'] == null ? undefined : json['projectSlug'], - 'projectId': json['projectId'] == null ? undefined : json['projectId'], - 'version': json['version'] == null ? undefined : json['version'], - 'timeRange': json['timeRange'] == null ? undefined : CommonTimeRangeLiteFromJSON(json['timeRange']), - 'query': json['query'] == null ? undefined : CommonRetentionQueryFromJSON(json['query']), - }; -} + static readonly mapping: {[index: string]: string} | undefined = undefined; - export function InsightsServiceRetentionRequestToJSON(json: any): InsightsServiceRetentionRequest { - return InsightsServiceRetentionRequestToJSONTyped(json, false); - } + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "projectOwner", + "baseName": "projectOwner", + "type": "string", + "format": "" + }, + { + "name": "projectSlug", + "baseName": "projectSlug", + "type": "string", + "format": "" + }, + { + "name": "projectId", + "baseName": "projectId", + "type": "string", + "format": "" + }, + { + "name": "version", + "baseName": "version", + "type": "number", + "format": "int32" + }, + { + "name": "timeRange", + "baseName": "timeRange", + "type": "CommonTimeRangeLite", + "format": "" + }, + { + "name": "query", + "baseName": "query", + "type": "CommonRetentionQuery", + "format": "" + } ]; - export function InsightsServiceRetentionRequestToJSONTyped(value?: InsightsServiceRetentionRequest | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; + static getAttributeTypeMap() { + return InsightsServiceRetentionRequest.attributeTypeMap; } - return { - - 'projectOwner': value['projectOwner'], - 'projectSlug': value['projectSlug'], - 'projectId': value['projectId'], - 'version': value['version'], - 'timeRange': CommonTimeRangeLiteToJSON(value['timeRange']), - 'query': CommonRetentionQueryToJSON(value['query']), - }; + public constructor() { + } } - diff --git a/src/models/InsightsServiceRetentionResponse.ts b/src/models/InsightsServiceRetentionResponse.ts index f47a6b5..31f039e 100755 --- a/src/models/InsightsServiceRetentionResponse.ts +++ b/src/models/InsightsServiceRetentionResponse.ts @@ -1,10 +1,8 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Sentio API * Sentio Open API for query data * - * The version of the OpenAPI document: version not set + * OpenAPI spec version: version not set * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -12,85 +10,43 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime.js'; -import type { CommonRetentionMatrix } from './CommonRetentionMatrix.js'; -import { - CommonRetentionMatrixFromJSON, - CommonRetentionMatrixFromJSONTyped, - CommonRetentionMatrixToJSON, - CommonRetentionMatrixToJSONTyped, -} from './CommonRetentionMatrix.js'; -import type { CommonComputeStats } from './CommonComputeStats.js'; -import { - CommonComputeStatsFromJSON, - CommonComputeStatsFromJSONTyped, - CommonComputeStatsToJSON, - CommonComputeStatsToJSONTyped, -} from './CommonComputeStats.js'; - -/** - * - * @export - * @interface InsightsServiceRetentionResponse - */ -export interface InsightsServiceRetentionResponse { - /** - * - * @type {CommonComputeStats} - * @memberof InsightsServiceRetentionResponse - */ - computeStats?: CommonComputeStats; - /** - * - * @type {CommonRetentionMatrix} - * @memberof InsightsServiceRetentionResponse - */ - results?: CommonRetentionMatrix; - /** - * - * @type {string} - * @memberof InsightsServiceRetentionResponse - */ - error?: string; -} - -/** - * Check if a given object implements the InsightsServiceRetentionResponse interface. - */ -export function instanceOfInsightsServiceRetentionResponse(value: object): value is InsightsServiceRetentionResponse { - return true; -} - -export function InsightsServiceRetentionResponseFromJSON(json: any): InsightsServiceRetentionResponse { - return InsightsServiceRetentionResponseFromJSONTyped(json, false); -} - -export function InsightsServiceRetentionResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): InsightsServiceRetentionResponse { - if (json == null) { - return json; +import { CommonComputeStats } from '../models/CommonComputeStats.js'; +import { CommonRetentionMatrix } from '../models/CommonRetentionMatrix.js'; +import { HttpFile } from '../http/http.js'; + +export class InsightsServiceRetentionResponse { + 'computeStats'?: CommonComputeStats; + 'results'?: CommonRetentionMatrix; + 'error'?: string; + + static readonly discriminator: string | undefined = undefined; + + static readonly mapping: {[index: string]: string} | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "computeStats", + "baseName": "computeStats", + "type": "CommonComputeStats", + "format": "" + }, + { + "name": "results", + "baseName": "results", + "type": "CommonRetentionMatrix", + "format": "" + }, + { + "name": "error", + "baseName": "error", + "type": "string", + "format": "" + } ]; + + static getAttributeTypeMap() { + return InsightsServiceRetentionResponse.attributeTypeMap; } - return { - - 'computeStats': json['computeStats'] == null ? undefined : CommonComputeStatsFromJSON(json['computeStats']), - 'results': json['results'] == null ? undefined : CommonRetentionMatrixFromJSON(json['results']), - 'error': json['error'] == null ? undefined : json['error'], - }; -} - - export function InsightsServiceRetentionResponseToJSON(json: any): InsightsServiceRetentionResponse { - return InsightsServiceRetentionResponseToJSONTyped(json, false); - } - export function InsightsServiceRetentionResponseToJSONTyped(value?: InsightsServiceRetentionResponse | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; + public constructor() { } - - return { - - 'computeStats': CommonComputeStatsToJSON(value['computeStats']), - 'results': CommonRetentionMatrixToJSON(value['results']), - 'error': value['error'], - }; } - diff --git a/src/models/MetricsServiceGetMetricsResponse.ts b/src/models/MetricsServiceGetMetricsResponse.ts index 7b079e0..cb44835 100755 --- a/src/models/MetricsServiceGetMetricsResponse.ts +++ b/src/models/MetricsServiceGetMetricsResponse.ts @@ -1,10 +1,8 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Sentio API * Sentio Open API for query data * - * The version of the OpenAPI document: version not set + * OpenAPI spec version: version not set * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -12,62 +10,28 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime.js'; -import type { MetricsServiceMetricInfo } from './MetricsServiceMetricInfo.js'; -import { - MetricsServiceMetricInfoFromJSON, - MetricsServiceMetricInfoFromJSONTyped, - MetricsServiceMetricInfoToJSON, - MetricsServiceMetricInfoToJSONTyped, -} from './MetricsServiceMetricInfo.js'; +import { MetricsServiceMetricInfo } from '../models/MetricsServiceMetricInfo.js'; +import { HttpFile } from '../http/http.js'; -/** - * - * @export - * @interface MetricsServiceGetMetricsResponse - */ -export interface MetricsServiceGetMetricsResponse { - /** - * - * @type {Array} - * @memberof MetricsServiceGetMetricsResponse - */ - metrics?: Array; -} +export class MetricsServiceGetMetricsResponse { + 'metrics'?: Array; -/** - * Check if a given object implements the MetricsServiceGetMetricsResponse interface. - */ -export function instanceOfMetricsServiceGetMetricsResponse(value: object): value is MetricsServiceGetMetricsResponse { - return true; -} + static readonly discriminator: string | undefined = undefined; -export function MetricsServiceGetMetricsResponseFromJSON(json: any): MetricsServiceGetMetricsResponse { - return MetricsServiceGetMetricsResponseFromJSONTyped(json, false); -} - -export function MetricsServiceGetMetricsResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): MetricsServiceGetMetricsResponse { - if (json == null) { - return json; - } - return { - - 'metrics': json['metrics'] == null ? undefined : ((json['metrics'] as Array).map(MetricsServiceMetricInfoFromJSON)), - }; -} + static readonly mapping: {[index: string]: string} | undefined = undefined; - export function MetricsServiceGetMetricsResponseToJSON(json: any): MetricsServiceGetMetricsResponse { - return MetricsServiceGetMetricsResponseToJSONTyped(json, false); - } + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "metrics", + "baseName": "metrics", + "type": "Array", + "format": "" + } ]; - export function MetricsServiceGetMetricsResponseToJSONTyped(value?: MetricsServiceGetMetricsResponse | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; + static getAttributeTypeMap() { + return MetricsServiceGetMetricsResponse.attributeTypeMap; } - return { - - 'metrics': value['metrics'] == null ? undefined : ((value['metrics'] as Array).map(MetricsServiceMetricInfoToJSON)), - }; + public constructor() { + } } - diff --git a/src/models/MetricsServiceMetricInfo.ts b/src/models/MetricsServiceMetricInfo.ts index 5050927..9861e44 100755 --- a/src/models/MetricsServiceMetricInfo.ts +++ b/src/models/MetricsServiceMetricInfo.ts @@ -1,10 +1,8 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Sentio API * Sentio Open API for query data * - * The version of the OpenAPI document: version not set + * OpenAPI spec version: version not set * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -12,125 +10,78 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime.js'; -import type { MetricsServiceMetricInfoLabelValues } from './MetricsServiceMetricInfoLabelValues.js'; -import { - MetricsServiceMetricInfoLabelValuesFromJSON, - MetricsServiceMetricInfoLabelValuesFromJSONTyped, - MetricsServiceMetricInfoLabelValuesToJSON, - MetricsServiceMetricInfoLabelValuesToJSONTyped, -} from './MetricsServiceMetricInfoLabelValues.js'; -import type { MetricsServiceMetricMetadata } from './MetricsServiceMetricMetadata.js'; -import { - MetricsServiceMetricMetadataFromJSON, - MetricsServiceMetricMetadataFromJSONTyped, - MetricsServiceMetricMetadataToJSON, - MetricsServiceMetricMetadataToJSONTyped, -} from './MetricsServiceMetricMetadata.js'; +import { MetricsServiceMetricInfoLabelValues } from '../models/MetricsServiceMetricInfoLabelValues.js'; +import { MetricsServiceMetricMetadata } from '../models/MetricsServiceMetricMetadata.js'; +import { HttpFile } from '../http/http.js'; -/** - * - * @export - * @interface MetricsServiceMetricInfo - */ -export interface MetricsServiceMetricInfo { - /** - * - * @type {string} - * @memberof MetricsServiceMetricInfo - */ - name?: string; - /** - * - * @type {string} - * @memberof MetricsServiceMetricInfo - */ - displayName?: string; - /** - * - * @type {string} - * @memberof MetricsServiceMetricInfo - */ - projectId?: string; - /** - * - * @type {Array} - * @memberof MetricsServiceMetricInfo - */ - contractName?: Array; - /** - * - * @type {Array} - * @memberof MetricsServiceMetricInfo - */ - contractAddress?: Array; - /** - * - * @type {Array} - * @memberof MetricsServiceMetricInfo - */ - chainId?: Array; - /** - * - * @type {{ [key: string]: MetricsServiceMetricInfoLabelValues; }} - * @memberof MetricsServiceMetricInfo - */ - labels?: { [key: string]: MetricsServiceMetricInfoLabelValues; }; - /** - * - * @type {MetricsServiceMetricMetadata} - * @memberof MetricsServiceMetricInfo - */ - metadata?: MetricsServiceMetricMetadata; -} +export class MetricsServiceMetricInfo { + 'name'?: string; + 'displayName'?: string; + 'projectId'?: string; + 'contractName'?: Array; + 'contractAddress'?: Array; + 'chainId'?: Array; + 'labels'?: { [key: string]: MetricsServiceMetricInfoLabelValues; }; + 'metadata'?: MetricsServiceMetricMetadata; -/** - * Check if a given object implements the MetricsServiceMetricInfo interface. - */ -export function instanceOfMetricsServiceMetricInfo(value: object): value is MetricsServiceMetricInfo { - return true; -} + static readonly discriminator: string | undefined = undefined; -export function MetricsServiceMetricInfoFromJSON(json: any): MetricsServiceMetricInfo { - return MetricsServiceMetricInfoFromJSONTyped(json, false); -} - -export function MetricsServiceMetricInfoFromJSONTyped(json: any, ignoreDiscriminator: boolean): MetricsServiceMetricInfo { - if (json == null) { - return json; - } - return { - - 'name': json['name'] == null ? undefined : json['name'], - 'displayName': json['displayName'] == null ? undefined : json['displayName'], - 'projectId': json['projectId'] == null ? undefined : json['projectId'], - 'contractName': json['contractName'] == null ? undefined : json['contractName'], - 'contractAddress': json['contractAddress'] == null ? undefined : json['contractAddress'], - 'chainId': json['chainId'] == null ? undefined : json['chainId'], - 'labels': json['labels'] == null ? undefined : (mapValues(json['labels'], MetricsServiceMetricInfoLabelValuesFromJSON)), - 'metadata': json['metadata'] == null ? undefined : MetricsServiceMetricMetadataFromJSON(json['metadata']), - }; -} + static readonly mapping: {[index: string]: string} | undefined = undefined; - export function MetricsServiceMetricInfoToJSON(json: any): MetricsServiceMetricInfo { - return MetricsServiceMetricInfoToJSONTyped(json, false); - } + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + }, + { + "name": "displayName", + "baseName": "displayName", + "type": "string", + "format": "" + }, + { + "name": "projectId", + "baseName": "projectId", + "type": "string", + "format": "" + }, + { + "name": "contractName", + "baseName": "contractName", + "type": "Array", + "format": "" + }, + { + "name": "contractAddress", + "baseName": "contractAddress", + "type": "Array", + "format": "" + }, + { + "name": "chainId", + "baseName": "chainId", + "type": "Array", + "format": "" + }, + { + "name": "labels", + "baseName": "labels", + "type": "{ [key: string]: MetricsServiceMetricInfoLabelValues; }", + "format": "" + }, + { + "name": "metadata", + "baseName": "metadata", + "type": "MetricsServiceMetricMetadata", + "format": "" + } ]; - export function MetricsServiceMetricInfoToJSONTyped(value?: MetricsServiceMetricInfo | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; + static getAttributeTypeMap() { + return MetricsServiceMetricInfo.attributeTypeMap; } - return { - - 'name': value['name'], - 'displayName': value['displayName'], - 'projectId': value['projectId'], - 'contractName': value['contractName'], - 'contractAddress': value['contractAddress'], - 'chainId': value['chainId'], - 'labels': value['labels'] == null ? undefined : (mapValues(value['labels'], MetricsServiceMetricInfoLabelValuesToJSON)), - 'metadata': MetricsServiceMetricMetadataToJSON(value['metadata']), - }; + public constructor() { + } } - diff --git a/src/models/MetricsServiceMetricInfoLabelValues.ts b/src/models/MetricsServiceMetricInfoLabelValues.ts index 8fe7ce0..10f5bb3 100755 --- a/src/models/MetricsServiceMetricInfoLabelValues.ts +++ b/src/models/MetricsServiceMetricInfoLabelValues.ts @@ -1,10 +1,8 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Sentio API * Sentio Open API for query data * - * The version of the OpenAPI document: version not set + * OpenAPI spec version: version not set * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -12,54 +10,27 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime.js'; -/** - * - * @export - * @interface MetricsServiceMetricInfoLabelValues - */ -export interface MetricsServiceMetricInfoLabelValues { - /** - * - * @type {Array} - * @memberof MetricsServiceMetricInfoLabelValues - */ - values?: Array; -} +import { HttpFile } from '../http/http.js'; -/** - * Check if a given object implements the MetricsServiceMetricInfoLabelValues interface. - */ -export function instanceOfMetricsServiceMetricInfoLabelValues(value: object): value is MetricsServiceMetricInfoLabelValues { - return true; -} +export class MetricsServiceMetricInfoLabelValues { + 'values'?: Array; -export function MetricsServiceMetricInfoLabelValuesFromJSON(json: any): MetricsServiceMetricInfoLabelValues { - return MetricsServiceMetricInfoLabelValuesFromJSONTyped(json, false); -} + static readonly discriminator: string | undefined = undefined; -export function MetricsServiceMetricInfoLabelValuesFromJSONTyped(json: any, ignoreDiscriminator: boolean): MetricsServiceMetricInfoLabelValues { - if (json == null) { - return json; - } - return { - - 'values': json['values'] == null ? undefined : json['values'], - }; -} + static readonly mapping: {[index: string]: string} | undefined = undefined; - export function MetricsServiceMetricInfoLabelValuesToJSON(json: any): MetricsServiceMetricInfoLabelValues { - return MetricsServiceMetricInfoLabelValuesToJSONTyped(json, false); - } + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "values", + "baseName": "values", + "type": "Array", + "format": "" + } ]; - export function MetricsServiceMetricInfoLabelValuesToJSONTyped(value?: MetricsServiceMetricInfoLabelValues | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; + static getAttributeTypeMap() { + return MetricsServiceMetricInfoLabelValues.attributeTypeMap; } - return { - - 'values': value['values'], - }; + public constructor() { + } } - diff --git a/src/models/MetricsServiceMetricMetadata.ts b/src/models/MetricsServiceMetricMetadata.ts index a648aaa..0cf543d 100755 --- a/src/models/MetricsServiceMetricMetadata.ts +++ b/src/models/MetricsServiceMetricMetadata.ts @@ -1,10 +1,8 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Sentio API * Sentio Open API for query data * - * The version of the OpenAPI document: version not set + * OpenAPI spec version: version not set * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -12,78 +10,48 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime.js'; -/** - * - * @export - * @interface MetricsServiceMetricMetadata - */ -export interface MetricsServiceMetricMetadata { - /** - * - * @type {string} - * @memberof MetricsServiceMetricMetadata - */ - type?: string; - /** - * - * @type {string} - * @memberof MetricsServiceMetricMetadata - */ - unit?: string; - /** - * - * @type {string} - * @memberof MetricsServiceMetricMetadata - */ - help?: string; - /** - * - * @type {string} - * @memberof MetricsServiceMetricMetadata - */ - lastSeen?: string; -} - -/** - * Check if a given object implements the MetricsServiceMetricMetadata interface. - */ -export function instanceOfMetricsServiceMetricMetadata(value: object): value is MetricsServiceMetricMetadata { - return true; -} - -export function MetricsServiceMetricMetadataFromJSON(json: any): MetricsServiceMetricMetadata { - return MetricsServiceMetricMetadataFromJSONTyped(json, false); -} - -export function MetricsServiceMetricMetadataFromJSONTyped(json: any, ignoreDiscriminator: boolean): MetricsServiceMetricMetadata { - if (json == null) { - return json; +import { HttpFile } from '../http/http.js'; + +export class MetricsServiceMetricMetadata { + 'type'?: string; + 'unit'?: string; + 'help'?: string; + 'lastSeen'?: string; + + static readonly discriminator: string | undefined = undefined; + + static readonly mapping: {[index: string]: string} | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "type", + "baseName": "type", + "type": "string", + "format": "" + }, + { + "name": "unit", + "baseName": "unit", + "type": "string", + "format": "" + }, + { + "name": "help", + "baseName": "help", + "type": "string", + "format": "" + }, + { + "name": "lastSeen", + "baseName": "lastSeen", + "type": "string", + "format": "int64" + } ]; + + static getAttributeTypeMap() { + return MetricsServiceMetricMetadata.attributeTypeMap; } - return { - - 'type': json['type'] == null ? undefined : json['type'], - 'unit': json['unit'] == null ? undefined : json['unit'], - 'help': json['help'] == null ? undefined : json['help'], - 'lastSeen': json['lastSeen'] == null ? undefined : json['lastSeen'], - }; -} - export function MetricsServiceMetricMetadataToJSON(json: any): MetricsServiceMetricMetadata { - return MetricsServiceMetricMetadataToJSONTyped(json, false); - } - - export function MetricsServiceMetricMetadataToJSONTyped(value?: MetricsServiceMetricMetadata | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; + public constructor() { } - - return { - - 'type': value['type'], - 'unit': value['unit'], - 'help': value['help'], - 'lastSeen': value['lastSeen'], - }; } - diff --git a/src/models/MetricsServiceMetricsQueryResponse.ts b/src/models/MetricsServiceMetricsQueryResponse.ts index 1a6fb20..0e3338f 100755 --- a/src/models/MetricsServiceMetricsQueryResponse.ts +++ b/src/models/MetricsServiceMetricsQueryResponse.ts @@ -1,10 +1,8 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Sentio API * Sentio Open API for query data * - * The version of the OpenAPI document: version not set + * OpenAPI spec version: version not set * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -12,62 +10,28 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime.js'; -import type { MetricsServiceMetricsQueryResponseResult } from './MetricsServiceMetricsQueryResponseResult.js'; -import { - MetricsServiceMetricsQueryResponseResultFromJSON, - MetricsServiceMetricsQueryResponseResultFromJSONTyped, - MetricsServiceMetricsQueryResponseResultToJSON, - MetricsServiceMetricsQueryResponseResultToJSONTyped, -} from './MetricsServiceMetricsQueryResponseResult.js'; +import { MetricsServiceMetricsQueryResponseResult } from '../models/MetricsServiceMetricsQueryResponseResult.js'; +import { HttpFile } from '../http/http.js'; -/** - * - * @export - * @interface MetricsServiceMetricsQueryResponse - */ -export interface MetricsServiceMetricsQueryResponse { - /** - * - * @type {Array} - * @memberof MetricsServiceMetricsQueryResponse - */ - results?: Array; -} +export class MetricsServiceMetricsQueryResponse { + 'results'?: Array; -/** - * Check if a given object implements the MetricsServiceMetricsQueryResponse interface. - */ -export function instanceOfMetricsServiceMetricsQueryResponse(value: object): value is MetricsServiceMetricsQueryResponse { - return true; -} + static readonly discriminator: string | undefined = undefined; -export function MetricsServiceMetricsQueryResponseFromJSON(json: any): MetricsServiceMetricsQueryResponse { - return MetricsServiceMetricsQueryResponseFromJSONTyped(json, false); -} - -export function MetricsServiceMetricsQueryResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): MetricsServiceMetricsQueryResponse { - if (json == null) { - return json; - } - return { - - 'results': json['results'] == null ? undefined : ((json['results'] as Array).map(MetricsServiceMetricsQueryResponseResultFromJSON)), - }; -} + static readonly mapping: {[index: string]: string} | undefined = undefined; - export function MetricsServiceMetricsQueryResponseToJSON(json: any): MetricsServiceMetricsQueryResponse { - return MetricsServiceMetricsQueryResponseToJSONTyped(json, false); - } + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "results", + "baseName": "results", + "type": "Array", + "format": "" + } ]; - export function MetricsServiceMetricsQueryResponseToJSONTyped(value?: MetricsServiceMetricsQueryResponse | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; + static getAttributeTypeMap() { + return MetricsServiceMetricsQueryResponse.attributeTypeMap; } - return { - - 'results': value['results'] == null ? undefined : ((value['results'] as Array).map(MetricsServiceMetricsQueryResponseResultToJSON)), - }; + public constructor() { + } } - diff --git a/src/models/MetricsServiceMetricsQueryResponseMatrix.ts b/src/models/MetricsServiceMetricsQueryResponseMatrix.ts index 847d635..43fda7f 100755 --- a/src/models/MetricsServiceMetricsQueryResponseMatrix.ts +++ b/src/models/MetricsServiceMetricsQueryResponseMatrix.ts @@ -1,10 +1,8 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Sentio API * Sentio Open API for query data * - * The version of the OpenAPI document: version not set + * OpenAPI spec version: version not set * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -12,70 +10,35 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime.js'; -import type { MetricsServiceMetricsQueryResponseSample } from './MetricsServiceMetricsQueryResponseSample.js'; -import { - MetricsServiceMetricsQueryResponseSampleFromJSON, - MetricsServiceMetricsQueryResponseSampleFromJSONTyped, - MetricsServiceMetricsQueryResponseSampleToJSON, - MetricsServiceMetricsQueryResponseSampleToJSONTyped, -} from './MetricsServiceMetricsQueryResponseSample.js'; - -/** - * - * @export - * @interface MetricsServiceMetricsQueryResponseMatrix - */ -export interface MetricsServiceMetricsQueryResponseMatrix { - /** - * - * @type {Array} - * @memberof MetricsServiceMetricsQueryResponseMatrix - */ - samples?: Array; - /** - * - * @type {number} - * @memberof MetricsServiceMetricsQueryResponseMatrix - */ - totalSamples?: number; -} - -/** - * Check if a given object implements the MetricsServiceMetricsQueryResponseMatrix interface. - */ -export function instanceOfMetricsServiceMetricsQueryResponseMatrix(value: object): value is MetricsServiceMetricsQueryResponseMatrix { - return true; -} - -export function MetricsServiceMetricsQueryResponseMatrixFromJSON(json: any): MetricsServiceMetricsQueryResponseMatrix { - return MetricsServiceMetricsQueryResponseMatrixFromJSONTyped(json, false); -} - -export function MetricsServiceMetricsQueryResponseMatrixFromJSONTyped(json: any, ignoreDiscriminator: boolean): MetricsServiceMetricsQueryResponseMatrix { - if (json == null) { - return json; +import { MetricsServiceMetricsQueryResponseSample } from '../models/MetricsServiceMetricsQueryResponseSample.js'; +import { HttpFile } from '../http/http.js'; + +export class MetricsServiceMetricsQueryResponseMatrix { + 'samples'?: Array; + 'totalSamples'?: number; + + static readonly discriminator: string | undefined = undefined; + + static readonly mapping: {[index: string]: string} | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "samples", + "baseName": "samples", + "type": "Array", + "format": "" + }, + { + "name": "totalSamples", + "baseName": "totalSamples", + "type": "number", + "format": "int32" + } ]; + + static getAttributeTypeMap() { + return MetricsServiceMetricsQueryResponseMatrix.attributeTypeMap; } - return { - - 'samples': json['samples'] == null ? undefined : ((json['samples'] as Array).map(MetricsServiceMetricsQueryResponseSampleFromJSON)), - 'totalSamples': json['totalSamples'] == null ? undefined : json['totalSamples'], - }; -} - - export function MetricsServiceMetricsQueryResponseMatrixToJSON(json: any): MetricsServiceMetricsQueryResponseMatrix { - return MetricsServiceMetricsQueryResponseMatrixToJSONTyped(json, false); - } - export function MetricsServiceMetricsQueryResponseMatrixToJSONTyped(value?: MetricsServiceMetricsQueryResponseMatrix | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; + public constructor() { } - - return { - - 'samples': value['samples'] == null ? undefined : ((value['samples'] as Array).map(MetricsServiceMetricsQueryResponseSampleToJSON)), - 'totalSamples': value['totalSamples'], - }; } - diff --git a/src/models/MetricsServiceMetricsQueryResponseMetric.ts b/src/models/MetricsServiceMetricsQueryResponseMetric.ts index 9b3e774..0936983 100755 --- a/src/models/MetricsServiceMetricsQueryResponseMetric.ts +++ b/src/models/MetricsServiceMetricsQueryResponseMetric.ts @@ -1,10 +1,8 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Sentio API * Sentio Open API for query data * - * The version of the OpenAPI document: version not set + * OpenAPI spec version: version not set * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -12,70 +10,41 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime.js'; -/** - * - * @export - * @interface MetricsServiceMetricsQueryResponseMetric - */ -export interface MetricsServiceMetricsQueryResponseMetric { - /** - * - * @type {string} - * @memberof MetricsServiceMetricsQueryResponseMetric - */ - name?: string; - /** - * - * @type {{ [key: string]: string; }} - * @memberof MetricsServiceMetricsQueryResponseMetric - */ - labels?: { [key: string]: string; }; - /** - * - * @type {string} - * @memberof MetricsServiceMetricsQueryResponseMetric - */ - displayName?: string; -} - -/** - * Check if a given object implements the MetricsServiceMetricsQueryResponseMetric interface. - */ -export function instanceOfMetricsServiceMetricsQueryResponseMetric(value: object): value is MetricsServiceMetricsQueryResponseMetric { - return true; -} - -export function MetricsServiceMetricsQueryResponseMetricFromJSON(json: any): MetricsServiceMetricsQueryResponseMetric { - return MetricsServiceMetricsQueryResponseMetricFromJSONTyped(json, false); -} - -export function MetricsServiceMetricsQueryResponseMetricFromJSONTyped(json: any, ignoreDiscriminator: boolean): MetricsServiceMetricsQueryResponseMetric { - if (json == null) { - return json; +import { HttpFile } from '../http/http.js'; + +export class MetricsServiceMetricsQueryResponseMetric { + 'name'?: string; + 'labels'?: { [key: string]: string; }; + 'displayName'?: string; + + static readonly discriminator: string | undefined = undefined; + + static readonly mapping: {[index: string]: string} | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + }, + { + "name": "labels", + "baseName": "labels", + "type": "{ [key: string]: string; }", + "format": "" + }, + { + "name": "displayName", + "baseName": "displayName", + "type": "string", + "format": "" + } ]; + + static getAttributeTypeMap() { + return MetricsServiceMetricsQueryResponseMetric.attributeTypeMap; } - return { - - 'name': json['name'] == null ? undefined : json['name'], - 'labels': json['labels'] == null ? undefined : json['labels'], - 'displayName': json['displayName'] == null ? undefined : json['displayName'], - }; -} - export function MetricsServiceMetricsQueryResponseMetricToJSON(json: any): MetricsServiceMetricsQueryResponseMetric { - return MetricsServiceMetricsQueryResponseMetricToJSONTyped(json, false); - } - - export function MetricsServiceMetricsQueryResponseMetricToJSONTyped(value?: MetricsServiceMetricsQueryResponseMetric | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; + public constructor() { } - - return { - - 'name': value['name'], - 'labels': value['labels'], - 'displayName': value['displayName'], - }; } - diff --git a/src/models/MetricsServiceMetricsQueryResponseResult.ts b/src/models/MetricsServiceMetricsQueryResponseResult.ts index 0c2ac99..ed99b9d 100755 --- a/src/models/MetricsServiceMetricsQueryResponseResult.ts +++ b/src/models/MetricsServiceMetricsQueryResponseResult.ts @@ -1,10 +1,8 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Sentio API * Sentio Open API for query data * - * The version of the OpenAPI document: version not set + * OpenAPI spec version: version not set * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -12,101 +10,57 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime.js'; -import type { MetricsServiceMetricsQueryResponseMatrix } from './MetricsServiceMetricsQueryResponseMatrix.js'; -import { - MetricsServiceMetricsQueryResponseMatrixFromJSON, - MetricsServiceMetricsQueryResponseMatrixFromJSONTyped, - MetricsServiceMetricsQueryResponseMatrixToJSON, - MetricsServiceMetricsQueryResponseMatrixToJSONTyped, -} from './MetricsServiceMetricsQueryResponseMatrix.js'; -import type { CommonComputeStats } from './CommonComputeStats.js'; -import { - CommonComputeStatsFromJSON, - CommonComputeStatsFromJSONTyped, - CommonComputeStatsToJSON, - CommonComputeStatsToJSONTyped, -} from './CommonComputeStats.js'; +import { CommonComputeStats } from '../models/CommonComputeStats.js'; +import { MetricsServiceMetricsQueryResponseMatrix } from '../models/MetricsServiceMetricsQueryResponseMatrix.js'; +import { HttpFile } from '../http/http.js'; -/** - * - * @export - * @interface MetricsServiceMetricsQueryResponseResult - */ -export interface MetricsServiceMetricsQueryResponseResult { - /** - * - * @type {MetricsServiceMetricsQueryResponseMatrix} - * @memberof MetricsServiceMetricsQueryResponseResult - */ - matrix?: MetricsServiceMetricsQueryResponseMatrix; - /** - * - * @type {string} - * @memberof MetricsServiceMetricsQueryResponseResult - */ - error?: string; - /** - * - * @type {string} - * @memberof MetricsServiceMetricsQueryResponseResult - */ - alias?: string; - /** - * - * @type {string} - * @memberof MetricsServiceMetricsQueryResponseResult - */ - id?: string; - /** - * - * @type {CommonComputeStats} - * @memberof MetricsServiceMetricsQueryResponseResult - */ - computeStats?: CommonComputeStats; -} +export class MetricsServiceMetricsQueryResponseResult { + 'matrix'?: MetricsServiceMetricsQueryResponseMatrix; + 'error'?: string; + 'alias'?: string; + 'id'?: string; + 'computeStats'?: CommonComputeStats; -/** - * Check if a given object implements the MetricsServiceMetricsQueryResponseResult interface. - */ -export function instanceOfMetricsServiceMetricsQueryResponseResult(value: object): value is MetricsServiceMetricsQueryResponseResult { - return true; -} + static readonly discriminator: string | undefined = undefined; -export function MetricsServiceMetricsQueryResponseResultFromJSON(json: any): MetricsServiceMetricsQueryResponseResult { - return MetricsServiceMetricsQueryResponseResultFromJSONTyped(json, false); -} - -export function MetricsServiceMetricsQueryResponseResultFromJSONTyped(json: any, ignoreDiscriminator: boolean): MetricsServiceMetricsQueryResponseResult { - if (json == null) { - return json; - } - return { - - 'matrix': json['matrix'] == null ? undefined : MetricsServiceMetricsQueryResponseMatrixFromJSON(json['matrix']), - 'error': json['error'] == null ? undefined : json['error'], - 'alias': json['alias'] == null ? undefined : json['alias'], - 'id': json['id'] == null ? undefined : json['id'], - 'computeStats': json['computeStats'] == null ? undefined : CommonComputeStatsFromJSON(json['computeStats']), - }; -} + static readonly mapping: {[index: string]: string} | undefined = undefined; - export function MetricsServiceMetricsQueryResponseResultToJSON(json: any): MetricsServiceMetricsQueryResponseResult { - return MetricsServiceMetricsQueryResponseResultToJSONTyped(json, false); - } + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "matrix", + "baseName": "matrix", + "type": "MetricsServiceMetricsQueryResponseMatrix", + "format": "" + }, + { + "name": "error", + "baseName": "error", + "type": "string", + "format": "" + }, + { + "name": "alias", + "baseName": "alias", + "type": "string", + "format": "" + }, + { + "name": "id", + "baseName": "id", + "type": "string", + "format": "" + }, + { + "name": "computeStats", + "baseName": "computeStats", + "type": "CommonComputeStats", + "format": "" + } ]; - export function MetricsServiceMetricsQueryResponseResultToJSONTyped(value?: MetricsServiceMetricsQueryResponseResult | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; + static getAttributeTypeMap() { + return MetricsServiceMetricsQueryResponseResult.attributeTypeMap; } - return { - - 'matrix': MetricsServiceMetricsQueryResponseMatrixToJSON(value['matrix']), - 'error': value['error'], - 'alias': value['alias'], - 'id': value['id'], - 'computeStats': CommonComputeStatsToJSON(value['computeStats']), - }; + public constructor() { + } } - diff --git a/src/models/MetricsServiceMetricsQueryResponseSample.ts b/src/models/MetricsServiceMetricsQueryResponseSample.ts index d566ec9..cf42b3b 100755 --- a/src/models/MetricsServiceMetricsQueryResponseSample.ts +++ b/src/models/MetricsServiceMetricsQueryResponseSample.ts @@ -1,10 +1,8 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Sentio API * Sentio Open API for query data * - * The version of the OpenAPI document: version not set + * OpenAPI spec version: version not set * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -12,77 +10,36 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime.js'; -import type { MetricsServiceMetricsQueryResponseMetric } from './MetricsServiceMetricsQueryResponseMetric.js'; -import { - MetricsServiceMetricsQueryResponseMetricFromJSON, - MetricsServiceMetricsQueryResponseMetricFromJSONTyped, - MetricsServiceMetricsQueryResponseMetricToJSON, - MetricsServiceMetricsQueryResponseMetricToJSONTyped, -} from './MetricsServiceMetricsQueryResponseMetric.js'; -import type { MetricsServiceMetricsQueryResponseValue } from './MetricsServiceMetricsQueryResponseValue.js'; -import { - MetricsServiceMetricsQueryResponseValueFromJSON, - MetricsServiceMetricsQueryResponseValueFromJSONTyped, - MetricsServiceMetricsQueryResponseValueToJSON, - MetricsServiceMetricsQueryResponseValueToJSONTyped, -} from './MetricsServiceMetricsQueryResponseValue.js'; - -/** - * - * @export - * @interface MetricsServiceMetricsQueryResponseSample - */ -export interface MetricsServiceMetricsQueryResponseSample { - /** - * - * @type {MetricsServiceMetricsQueryResponseMetric} - * @memberof MetricsServiceMetricsQueryResponseSample - */ - metric?: MetricsServiceMetricsQueryResponseMetric; - /** - * - * @type {Array} - * @memberof MetricsServiceMetricsQueryResponseSample - */ - values?: Array; -} - -/** - * Check if a given object implements the MetricsServiceMetricsQueryResponseSample interface. - */ -export function instanceOfMetricsServiceMetricsQueryResponseSample(value: object): value is MetricsServiceMetricsQueryResponseSample { - return true; -} - -export function MetricsServiceMetricsQueryResponseSampleFromJSON(json: any): MetricsServiceMetricsQueryResponseSample { - return MetricsServiceMetricsQueryResponseSampleFromJSONTyped(json, false); -} - -export function MetricsServiceMetricsQueryResponseSampleFromJSONTyped(json: any, ignoreDiscriminator: boolean): MetricsServiceMetricsQueryResponseSample { - if (json == null) { - return json; +import { MetricsServiceMetricsQueryResponseMetric } from '../models/MetricsServiceMetricsQueryResponseMetric.js'; +import { MetricsServiceMetricsQueryResponseValue } from '../models/MetricsServiceMetricsQueryResponseValue.js'; +import { HttpFile } from '../http/http.js'; + +export class MetricsServiceMetricsQueryResponseSample { + 'metric'?: MetricsServiceMetricsQueryResponseMetric; + 'values'?: Array; + + static readonly discriminator: string | undefined = undefined; + + static readonly mapping: {[index: string]: string} | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "metric", + "baseName": "metric", + "type": "MetricsServiceMetricsQueryResponseMetric", + "format": "" + }, + { + "name": "values", + "baseName": "values", + "type": "Array", + "format": "" + } ]; + + static getAttributeTypeMap() { + return MetricsServiceMetricsQueryResponseSample.attributeTypeMap; } - return { - - 'metric': json['metric'] == null ? undefined : MetricsServiceMetricsQueryResponseMetricFromJSON(json['metric']), - 'values': json['values'] == null ? undefined : ((json['values'] as Array).map(MetricsServiceMetricsQueryResponseValueFromJSON)), - }; -} - - export function MetricsServiceMetricsQueryResponseSampleToJSON(json: any): MetricsServiceMetricsQueryResponseSample { - return MetricsServiceMetricsQueryResponseSampleToJSONTyped(json, false); - } - export function MetricsServiceMetricsQueryResponseSampleToJSONTyped(value?: MetricsServiceMetricsQueryResponseSample | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; + public constructor() { } - - return { - - 'metric': MetricsServiceMetricsQueryResponseMetricToJSON(value['metric']), - 'values': value['values'] == null ? undefined : ((value['values'] as Array).map(MetricsServiceMetricsQueryResponseValueToJSON)), - }; } - diff --git a/src/models/MetricsServiceMetricsQueryResponseValue.ts b/src/models/MetricsServiceMetricsQueryResponseValue.ts index 790e2ca..25bfc7d 100755 --- a/src/models/MetricsServiceMetricsQueryResponseValue.ts +++ b/src/models/MetricsServiceMetricsQueryResponseValue.ts @@ -1,10 +1,8 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Sentio API * Sentio Open API for query data * - * The version of the OpenAPI document: version not set + * OpenAPI spec version: version not set * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -12,62 +10,34 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime.js'; -/** - * - * @export - * @interface MetricsServiceMetricsQueryResponseValue - */ -export interface MetricsServiceMetricsQueryResponseValue { - /** - * - * @type {string} - * @memberof MetricsServiceMetricsQueryResponseValue - */ - timestamp?: string; - /** - * - * @type {number} - * @memberof MetricsServiceMetricsQueryResponseValue - */ - value?: number; -} +import { HttpFile } from '../http/http.js'; -/** - * Check if a given object implements the MetricsServiceMetricsQueryResponseValue interface. - */ -export function instanceOfMetricsServiceMetricsQueryResponseValue(value: object): value is MetricsServiceMetricsQueryResponseValue { - return true; -} +export class MetricsServiceMetricsQueryResponseValue { + 'timestamp'?: string; + 'value'?: number; -export function MetricsServiceMetricsQueryResponseValueFromJSON(json: any): MetricsServiceMetricsQueryResponseValue { - return MetricsServiceMetricsQueryResponseValueFromJSONTyped(json, false); -} + static readonly discriminator: string | undefined = undefined; -export function MetricsServiceMetricsQueryResponseValueFromJSONTyped(json: any, ignoreDiscriminator: boolean): MetricsServiceMetricsQueryResponseValue { - if (json == null) { - return json; - } - return { - - 'timestamp': json['timestamp'] == null ? undefined : json['timestamp'], - 'value': json['value'] == null ? undefined : json['value'], - }; -} + static readonly mapping: {[index: string]: string} | undefined = undefined; - export function MetricsServiceMetricsQueryResponseValueToJSON(json: any): MetricsServiceMetricsQueryResponseValue { - return MetricsServiceMetricsQueryResponseValueToJSONTyped(json, false); - } + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "timestamp", + "baseName": "timestamp", + "type": "string", + "format": "int64" + }, + { + "name": "value", + "baseName": "value", + "type": "number", + "format": "double" + } ]; - export function MetricsServiceMetricsQueryResponseValueToJSONTyped(value?: MetricsServiceMetricsQueryResponseValue | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; + static getAttributeTypeMap() { + return MetricsServiceMetricsQueryResponseValue.attributeTypeMap; } - return { - - 'timestamp': value['timestamp'], - 'value': value['value'], - }; + public constructor() { + } } - diff --git a/src/models/MetricsServiceObservabilityServiceQueryBody.ts b/src/models/MetricsServiceObservabilityServiceQueryBody.ts index 1e4e08f..7136e30 100755 --- a/src/models/MetricsServiceObservabilityServiceQueryBody.ts +++ b/src/models/MetricsServiceObservabilityServiceQueryBody.ts @@ -1,10 +1,8 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Sentio API * Sentio Open API for query data * - * The version of the OpenAPI document: version not set + * OpenAPI spec version: version not set * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -12,117 +10,71 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime.js'; -import type { CommonQuery } from './CommonQuery.js'; -import { - CommonQueryFromJSON, - CommonQueryFromJSONTyped, - CommonQueryToJSON, - CommonQueryToJSONTyped, -} from './CommonQuery.js'; -import type { CommonFormula } from './CommonFormula.js'; -import { - CommonFormulaFromJSON, - CommonFormulaFromJSONTyped, - CommonFormulaToJSON, - CommonFormulaToJSONTyped, -} from './CommonFormula.js'; +import { CommonFormula } from '../models/CommonFormula.js'; +import { CommonQuery } from '../models/CommonQuery.js'; +import { HttpFile } from '../http/http.js'; -/** - * - * @export - * @interface MetricsServiceObservabilityServiceQueryBody - */ -export interface MetricsServiceObservabilityServiceQueryBody { - /** - * - * @type {Array} - * @memberof MetricsServiceObservabilityServiceQueryBody - */ - queries?: Array; - /** - * - * @type {Array} - * @memberof MetricsServiceObservabilityServiceQueryBody - */ - formulas?: Array; - /** - * - * @type {string} - * @memberof MetricsServiceObservabilityServiceQueryBody - */ - time?: string; - /** - * - * @type {number} - * @memberof MetricsServiceObservabilityServiceQueryBody - */ - samplesLimit?: number; - /** - * - * @type {number} - * @memberof MetricsServiceObservabilityServiceQueryBody - */ - version?: number; - /** - * - * @type {string} - * @memberof MetricsServiceObservabilityServiceQueryBody - */ - timezone?: string; - /** - * - * @type {number} - * @memberof MetricsServiceObservabilityServiceQueryBody - */ - samplesOffset?: number; -} +export class MetricsServiceObservabilityServiceQueryBody { + 'queries'?: Array; + 'formulas'?: Array; + 'time'?: string; + 'samplesLimit'?: number; + 'version'?: number; + 'timezone'?: string; + 'samplesOffset'?: number; -/** - * Check if a given object implements the MetricsServiceObservabilityServiceQueryBody interface. - */ -export function instanceOfMetricsServiceObservabilityServiceQueryBody(value: object): value is MetricsServiceObservabilityServiceQueryBody { - return true; -} + static readonly discriminator: string | undefined = undefined; -export function MetricsServiceObservabilityServiceQueryBodyFromJSON(json: any): MetricsServiceObservabilityServiceQueryBody { - return MetricsServiceObservabilityServiceQueryBodyFromJSONTyped(json, false); -} - -export function MetricsServiceObservabilityServiceQueryBodyFromJSONTyped(json: any, ignoreDiscriminator: boolean): MetricsServiceObservabilityServiceQueryBody { - if (json == null) { - return json; - } - return { - - 'queries': json['queries'] == null ? undefined : ((json['queries'] as Array).map(CommonQueryFromJSON)), - 'formulas': json['formulas'] == null ? undefined : ((json['formulas'] as Array).map(CommonFormulaFromJSON)), - 'time': json['time'] == null ? undefined : json['time'], - 'samplesLimit': json['samplesLimit'] == null ? undefined : json['samplesLimit'], - 'version': json['version'] == null ? undefined : json['version'], - 'timezone': json['timezone'] == null ? undefined : json['timezone'], - 'samplesOffset': json['samplesOffset'] == null ? undefined : json['samplesOffset'], - }; -} + static readonly mapping: {[index: string]: string} | undefined = undefined; - export function MetricsServiceObservabilityServiceQueryBodyToJSON(json: any): MetricsServiceObservabilityServiceQueryBody { - return MetricsServiceObservabilityServiceQueryBodyToJSONTyped(json, false); - } + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "queries", + "baseName": "queries", + "type": "Array", + "format": "" + }, + { + "name": "formulas", + "baseName": "formulas", + "type": "Array", + "format": "" + }, + { + "name": "time", + "baseName": "time", + "type": "string", + "format": "" + }, + { + "name": "samplesLimit", + "baseName": "samplesLimit", + "type": "number", + "format": "int32" + }, + { + "name": "version", + "baseName": "version", + "type": "number", + "format": "int32" + }, + { + "name": "timezone", + "baseName": "timezone", + "type": "string", + "format": "" + }, + { + "name": "samplesOffset", + "baseName": "samplesOffset", + "type": "number", + "format": "int32" + } ]; - export function MetricsServiceObservabilityServiceQueryBodyToJSONTyped(value?: MetricsServiceObservabilityServiceQueryBody | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; + static getAttributeTypeMap() { + return MetricsServiceObservabilityServiceQueryBody.attributeTypeMap; } - return { - - 'queries': value['queries'] == null ? undefined : ((value['queries'] as Array).map(CommonQueryToJSON)), - 'formulas': value['formulas'] == null ? undefined : ((value['formulas'] as Array).map(CommonFormulaToJSON)), - 'time': value['time'], - 'samplesLimit': value['samplesLimit'], - 'version': value['version'], - 'timezone': value['timezone'], - 'samplesOffset': value['samplesOffset'], - }; + public constructor() { + } } - diff --git a/src/models/MetricsServiceObservabilityServiceQueryRangeBody.ts b/src/models/MetricsServiceObservabilityServiceQueryRangeBody.ts index a21d80c..f693458 100755 --- a/src/models/MetricsServiceObservabilityServiceQueryRangeBody.ts +++ b/src/models/MetricsServiceObservabilityServiceQueryRangeBody.ts @@ -1,10 +1,8 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Sentio API * Sentio Open API for query data * - * The version of the OpenAPI document: version not set + * OpenAPI spec version: version not set * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -12,125 +10,72 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime.js'; -import type { CommonQuery } from './CommonQuery.js'; -import { - CommonQueryFromJSON, - CommonQueryFromJSONTyped, - CommonQueryToJSON, - CommonQueryToJSONTyped, -} from './CommonQuery.js'; -import type { CommonFormula } from './CommonFormula.js'; -import { - CommonFormulaFromJSON, - CommonFormulaFromJSONTyped, - CommonFormulaToJSON, - CommonFormulaToJSONTyped, -} from './CommonFormula.js'; -import type { CommonTimeRangeLite } from './CommonTimeRangeLite.js'; -import { - CommonTimeRangeLiteFromJSON, - CommonTimeRangeLiteFromJSONTyped, - CommonTimeRangeLiteToJSON, - CommonTimeRangeLiteToJSONTyped, -} from './CommonTimeRangeLite.js'; +import { CommonFormula } from '../models/CommonFormula.js'; +import { CommonQuery } from '../models/CommonQuery.js'; +import { CommonTimeRangeLite } from '../models/CommonTimeRangeLite.js'; +import { HttpFile } from '../http/http.js'; -/** - * - * @export - * @interface MetricsServiceObservabilityServiceQueryRangeBody - */ -export interface MetricsServiceObservabilityServiceQueryRangeBody { - /** - * - * @type {Array} - * @memberof MetricsServiceObservabilityServiceQueryRangeBody - */ - queries?: Array; - /** - * - * @type {Array} - * @memberof MetricsServiceObservabilityServiceQueryRangeBody - */ - formulas?: Array; - /** - * - * @type {number} - * @memberof MetricsServiceObservabilityServiceQueryRangeBody - */ - samplesLimit?: number; - /** - * - * @type {CommonTimeRangeLite} - * @memberof MetricsServiceObservabilityServiceQueryRangeBody - */ - timeRange: CommonTimeRangeLite; - /** - * - * @type {string} - * @memberof MetricsServiceObservabilityServiceQueryRangeBody - */ - projectId?: string; - /** - * - * @type {number} - * @memberof MetricsServiceObservabilityServiceQueryRangeBody - */ - version?: number; - /** - * - * @type {number} - * @memberof MetricsServiceObservabilityServiceQueryRangeBody - */ - samplesOffset?: number; -} +export class MetricsServiceObservabilityServiceQueryRangeBody { + 'queries'?: Array; + 'formulas'?: Array; + 'samplesLimit'?: number; + 'timeRange': CommonTimeRangeLite; + 'projectId'?: string; + 'version'?: number; + 'samplesOffset'?: number; -/** - * Check if a given object implements the MetricsServiceObservabilityServiceQueryRangeBody interface. - */ -export function instanceOfMetricsServiceObservabilityServiceQueryRangeBody(value: object): value is MetricsServiceObservabilityServiceQueryRangeBody { - if (!('timeRange' in value) || value['timeRange'] === undefined) return false; - return true; -} + static readonly discriminator: string | undefined = undefined; -export function MetricsServiceObservabilityServiceQueryRangeBodyFromJSON(json: any): MetricsServiceObservabilityServiceQueryRangeBody { - return MetricsServiceObservabilityServiceQueryRangeBodyFromJSONTyped(json, false); -} - -export function MetricsServiceObservabilityServiceQueryRangeBodyFromJSONTyped(json: any, ignoreDiscriminator: boolean): MetricsServiceObservabilityServiceQueryRangeBody { - if (json == null) { - return json; - } - return { - - 'queries': json['queries'] == null ? undefined : ((json['queries'] as Array).map(CommonQueryFromJSON)), - 'formulas': json['formulas'] == null ? undefined : ((json['formulas'] as Array).map(CommonFormulaFromJSON)), - 'samplesLimit': json['samplesLimit'] == null ? undefined : json['samplesLimit'], - 'timeRange': CommonTimeRangeLiteFromJSON(json['timeRange']), - 'projectId': json['projectId'] == null ? undefined : json['projectId'], - 'version': json['version'] == null ? undefined : json['version'], - 'samplesOffset': json['samplesOffset'] == null ? undefined : json['samplesOffset'], - }; -} + static readonly mapping: {[index: string]: string} | undefined = undefined; - export function MetricsServiceObservabilityServiceQueryRangeBodyToJSON(json: any): MetricsServiceObservabilityServiceQueryRangeBody { - return MetricsServiceObservabilityServiceQueryRangeBodyToJSONTyped(json, false); - } + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "queries", + "baseName": "queries", + "type": "Array", + "format": "" + }, + { + "name": "formulas", + "baseName": "formulas", + "type": "Array", + "format": "" + }, + { + "name": "samplesLimit", + "baseName": "samplesLimit", + "type": "number", + "format": "int32" + }, + { + "name": "timeRange", + "baseName": "timeRange", + "type": "CommonTimeRangeLite", + "format": "" + }, + { + "name": "projectId", + "baseName": "projectId", + "type": "string", + "format": "" + }, + { + "name": "version", + "baseName": "version", + "type": "number", + "format": "int32" + }, + { + "name": "samplesOffset", + "baseName": "samplesOffset", + "type": "number", + "format": "int32" + } ]; - export function MetricsServiceObservabilityServiceQueryRangeBodyToJSONTyped(value?: MetricsServiceObservabilityServiceQueryRangeBody | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; + static getAttributeTypeMap() { + return MetricsServiceObservabilityServiceQueryRangeBody.attributeTypeMap; } - return { - - 'queries': value['queries'] == null ? undefined : ((value['queries'] as Array).map(CommonQueryToJSON)), - 'formulas': value['formulas'] == null ? undefined : ((value['formulas'] as Array).map(CommonFormulaToJSON)), - 'samplesLimit': value['samplesLimit'], - 'timeRange': CommonTimeRangeLiteToJSON(value['timeRange']), - 'projectId': value['projectId'], - 'version': value['version'], - 'samplesOffset': value['samplesOffset'], - }; + public constructor() { + } } - diff --git a/src/models/MetricsServiceQueryValueResponse.ts b/src/models/MetricsServiceQueryValueResponse.ts index 3d33bf6..a96e402 100755 --- a/src/models/MetricsServiceQueryValueResponse.ts +++ b/src/models/MetricsServiceQueryValueResponse.ts @@ -1,10 +1,8 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Sentio API * Sentio Open API for query data * - * The version of the OpenAPI document: version not set + * OpenAPI spec version: version not set * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -12,62 +10,28 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime.js'; -import type { MetricsServiceQueryValueResponseResult } from './MetricsServiceQueryValueResponseResult.js'; -import { - MetricsServiceQueryValueResponseResultFromJSON, - MetricsServiceQueryValueResponseResultFromJSONTyped, - MetricsServiceQueryValueResponseResultToJSON, - MetricsServiceQueryValueResponseResultToJSONTyped, -} from './MetricsServiceQueryValueResponseResult.js'; +import { MetricsServiceQueryValueResponseResult } from '../models/MetricsServiceQueryValueResponseResult.js'; +import { HttpFile } from '../http/http.js'; -/** - * - * @export - * @interface MetricsServiceQueryValueResponse - */ -export interface MetricsServiceQueryValueResponse { - /** - * - * @type {Array} - * @memberof MetricsServiceQueryValueResponse - */ - results?: Array; -} +export class MetricsServiceQueryValueResponse { + 'results'?: Array; -/** - * Check if a given object implements the MetricsServiceQueryValueResponse interface. - */ -export function instanceOfMetricsServiceQueryValueResponse(value: object): value is MetricsServiceQueryValueResponse { - return true; -} + static readonly discriminator: string | undefined = undefined; -export function MetricsServiceQueryValueResponseFromJSON(json: any): MetricsServiceQueryValueResponse { - return MetricsServiceQueryValueResponseFromJSONTyped(json, false); -} - -export function MetricsServiceQueryValueResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): MetricsServiceQueryValueResponse { - if (json == null) { - return json; - } - return { - - 'results': json['results'] == null ? undefined : ((json['results'] as Array).map(MetricsServiceQueryValueResponseResultFromJSON)), - }; -} + static readonly mapping: {[index: string]: string} | undefined = undefined; - export function MetricsServiceQueryValueResponseToJSON(json: any): MetricsServiceQueryValueResponse { - return MetricsServiceQueryValueResponseToJSONTyped(json, false); - } + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "results", + "baseName": "results", + "type": "Array", + "format": "" + } ]; - export function MetricsServiceQueryValueResponseToJSONTyped(value?: MetricsServiceQueryValueResponse | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; + static getAttributeTypeMap() { + return MetricsServiceQueryValueResponse.attributeTypeMap; } - return { - - 'results': value['results'] == null ? undefined : ((value['results'] as Array).map(MetricsServiceQueryValueResponseResultToJSON)), - }; + public constructor() { + } } - diff --git a/src/models/MetricsServiceQueryValueResponseResult.ts b/src/models/MetricsServiceQueryValueResponseResult.ts index a0e6f26..cc82e78 100755 --- a/src/models/MetricsServiceQueryValueResponseResult.ts +++ b/src/models/MetricsServiceQueryValueResponseResult.ts @@ -1,10 +1,8 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Sentio API * Sentio Open API for query data * - * The version of the OpenAPI document: version not set + * OpenAPI spec version: version not set * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -12,86 +10,49 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime.js'; -import type { MetricsServiceMetricsQueryResponseSample } from './MetricsServiceMetricsQueryResponseSample.js'; -import { - MetricsServiceMetricsQueryResponseSampleFromJSON, - MetricsServiceMetricsQueryResponseSampleFromJSONTyped, - MetricsServiceMetricsQueryResponseSampleToJSON, - MetricsServiceMetricsQueryResponseSampleToJSONTyped, -} from './MetricsServiceMetricsQueryResponseSample.js'; - -/** - * - * @export - * @interface MetricsServiceQueryValueResponseResult - */ -export interface MetricsServiceQueryValueResponseResult { - /** - * - * @type {Array} - * @memberof MetricsServiceQueryValueResponseResult - */ - sample?: Array; - /** - * - * @type {string} - * @memberof MetricsServiceQueryValueResponseResult - */ - error?: string; - /** - * - * @type {string} - * @memberof MetricsServiceQueryValueResponseResult - */ - alias?: string; - /** - * - * @type {string} - * @memberof MetricsServiceQueryValueResponseResult - */ - id?: string; -} - -/** - * Check if a given object implements the MetricsServiceQueryValueResponseResult interface. - */ -export function instanceOfMetricsServiceQueryValueResponseResult(value: object): value is MetricsServiceQueryValueResponseResult { - return true; -} - -export function MetricsServiceQueryValueResponseResultFromJSON(json: any): MetricsServiceQueryValueResponseResult { - return MetricsServiceQueryValueResponseResultFromJSONTyped(json, false); -} - -export function MetricsServiceQueryValueResponseResultFromJSONTyped(json: any, ignoreDiscriminator: boolean): MetricsServiceQueryValueResponseResult { - if (json == null) { - return json; +import { MetricsServiceMetricsQueryResponseSample } from '../models/MetricsServiceMetricsQueryResponseSample.js'; +import { HttpFile } from '../http/http.js'; + +export class MetricsServiceQueryValueResponseResult { + 'sample'?: Array; + 'error'?: string; + 'alias'?: string; + 'id'?: string; + + static readonly discriminator: string | undefined = undefined; + + static readonly mapping: {[index: string]: string} | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "sample", + "baseName": "sample", + "type": "Array", + "format": "" + }, + { + "name": "error", + "baseName": "error", + "type": "string", + "format": "" + }, + { + "name": "alias", + "baseName": "alias", + "type": "string", + "format": "" + }, + { + "name": "id", + "baseName": "id", + "type": "string", + "format": "" + } ]; + + static getAttributeTypeMap() { + return MetricsServiceQueryValueResponseResult.attributeTypeMap; } - return { - - 'sample': json['sample'] == null ? undefined : ((json['sample'] as Array).map(MetricsServiceMetricsQueryResponseSampleFromJSON)), - 'error': json['error'] == null ? undefined : json['error'], - 'alias': json['alias'] == null ? undefined : json['alias'], - 'id': json['id'] == null ? undefined : json['id'], - }; -} - - export function MetricsServiceQueryValueResponseResultToJSON(json: any): MetricsServiceQueryValueResponseResult { - return MetricsServiceQueryValueResponseResultToJSONTyped(json, false); - } - export function MetricsServiceQueryValueResponseResultToJSONTyped(value?: MetricsServiceQueryValueResponseResult | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; + public constructor() { } - - return { - - 'sample': value['sample'] == null ? undefined : ((value['sample'] as Array).map(MetricsServiceMetricsQueryResponseSampleToJSON)), - 'error': value['error'], - 'alias': value['alias'], - 'id': value['id'], - }; } - diff --git a/src/models/ObjectSerializer.ts b/src/models/ObjectSerializer.ts new file mode 100755 index 0000000..f928656 --- /dev/null +++ b/src/models/ObjectSerializer.ts @@ -0,0 +1,1004 @@ +export * from '../models/AnalyticServiceAnalyticServiceExecuteSQLBody.js'; +export * from '../models/AnalyticServiceLogQueryRequestFilter.js'; +export * from '../models/AnalyticServiceLogQueryRequestSort.js'; +export * from '../models/AnalyticServiceLogQueryResponse.js'; +export * from '../models/AnalyticServiceSQLQuery.js'; +export * from '../models/AnalyticServiceSearchServiceQueryLogBody.js'; +export * from '../models/AnalyticServiceSyncExecuteSQLResponse.js'; +export * from '../models/CommonAggregate.js'; +export * from '../models/CommonAggregateAggregateOps.js'; +export * from '../models/CommonAny.js'; +export * from '../models/CommonArgument.js'; +export * from '../models/CommonBigDecimal.js'; +export * from '../models/CommonBigInteger.js'; +export * from '../models/CommonCachePolicy.js'; +export * from '../models/CommonChannel.js'; +export * from '../models/CommonChannelType.js'; +export * from '../models/CommonCohortsFilter.js'; +export * from '../models/CommonCohortsFilterAggregation.js'; +export * from '../models/CommonCohortsFilterAggregationAggregateProperties.js'; +export * from '../models/CommonCohortsFilterAggregationAggregatePropertiesAggregationType.js'; +export * from '../models/CommonCohortsFilterAggregationOperatorType.js'; +export * from '../models/CommonCohortsGroup.js'; +export * from '../models/CommonCohortsQuery.js'; +export * from '../models/CommonCoinID.js'; +export * from '../models/CommonCoinIDAddressIdentifier.js'; +export * from '../models/CommonColumnState.js'; +export * from '../models/CommonColumnStateSort.js'; +export * from '../models/CommonComputeStats.js'; +export * from '../models/CommonDuration.js'; +export * from '../models/CommonEventLogColumn.js'; +export * from '../models/CommonEventLogConfig.js'; +export * from '../models/CommonEventLogEntry.js'; +export * from '../models/CommonFormula.js'; +export * from '../models/CommonFunction.js'; +export * from '../models/CommonJoinOperator.js'; +export * from '../models/CommonMatrix.js'; +export * from '../models/CommonMatrixMetric.js'; +export * from '../models/CommonMatrixSample.js'; +export * from '../models/CommonMatrixValue.js'; +export * from '../models/CommonOrganization.js'; +export * from '../models/CommonOrganizationMember.js'; +export * from '../models/CommonOrganizationRole.js'; +export * from '../models/CommonOwner.js'; +export * from '../models/CommonPermission.js'; +export * from '../models/CommonPriceSegmentationQuery.js'; +export * from '../models/CommonProject.js'; +export * from '../models/CommonProjectInfo.js'; +export * from '../models/CommonProjectProjectMember.js'; +export * from '../models/CommonProjectSuperset.js'; +export * from '../models/CommonProjectType.js'; +export * from '../models/CommonProjectView.js'; +export * from '../models/CommonProjectViewProjectViewConfig.js'; +export * from '../models/CommonProjectVisibility.js'; +export * from '../models/CommonQuery.js'; +export * from '../models/CommonRetentionMatrix.js'; +export * from '../models/CommonRetentionMatrixSample.js'; +export * from '../models/CommonRetentionQuery.js'; +export * from '../models/CommonRetentionQueryCriteria.js'; +export * from '../models/CommonRetentionQueryFilter.js'; +export * from '../models/CommonRetentionQueryFilterTimeFilter.js'; +export * from '../models/CommonRetentionQueryFilterTimeFilterType.js'; +export * from '../models/CommonRetentionQueryInterval.js'; +export * from '../models/CommonRetentionQueryIntervalUnit.js'; +export * from '../models/CommonRetentionQueryResource.js'; +export * from '../models/CommonRichStruct.js'; +export * from '../models/CommonRichValue.js'; +export * from '../models/CommonRichValueList.js'; +export * from '../models/CommonRichValueNullValue.js'; +export * from '../models/CommonSegmentParameter.js'; +export * from '../models/CommonSegmentationQuery.js'; +export * from '../models/CommonSegmentationQueryAggregation.js'; +export * from '../models/CommonSegmentationQueryAggregationAggregateProperties.js'; +export * from '../models/CommonSegmentationQueryAggregationAggregatePropertiesAggregationType.js'; +export * from '../models/CommonSegmentationQueryAggregationCountUnique.js'; +export * from '../models/CommonSegmentationQueryResource.js'; +export * from '../models/CommonSegmentationQueryResourceType.js'; +export * from '../models/CommonSegmentationQuerySelectorExpr.js'; +export * from '../models/CommonSegmentationQuerySelectorExprLogicExpr.js'; +export * from '../models/CommonSelector.js'; +export * from '../models/CommonSelectorExpr.js'; +export * from '../models/CommonSelectorExprLogicExpr.js'; +export * from '../models/CommonSelectorOperatorType.js'; +export * from '../models/CommonStringList.js'; +export * from '../models/CommonTabularData.js'; +export * from '../models/CommonTabularDataColumnType.js'; +export * from '../models/CommonTier.js'; +export * from '../models/CommonTimeRange.js'; +export * from '../models/CommonTimeRangeLite.js'; +export * from '../models/CommonTimeRangeRelativeTime.js'; +export * from '../models/CommonTimeRangeTimeLike.js'; +export * from '../models/CommonUser.js'; +export * from '../models/CommonUserAccountStatus.js'; +export * from '../models/CommonUserInfo.js'; +export * from '../models/EvmAccessListItem.js'; +export * from '../models/EvmTransaction.js'; +export * from '../models/EvmTransactionReceipt.js'; +export * from '../models/GoogleApiHttpBody.js'; +export * from '../models/GoogleProtobufAny.js'; +export * from '../models/GoogleProtobufNullValue.js'; +export * from '../models/InsightsServiceDataSource.js'; +export * from '../models/InsightsServiceInsightsServiceQueryBody.js'; +export * from '../models/InsightsServiceInsightsServiceRetentionBody.js'; +export * from '../models/InsightsServiceListCoinsResponse.js'; +export * from '../models/InsightsServiceQueryRequestQuery.js'; +export * from '../models/InsightsServiceQueryResponse.js'; +export * from '../models/InsightsServiceQueryResponseResult.js'; +export * from '../models/InsightsServiceRetentionRequest.js'; +export * from '../models/InsightsServiceRetentionResponse.js'; +export * from '../models/MetricsServiceGetMetricsResponse.js'; +export * from '../models/MetricsServiceMetricInfo.js'; +export * from '../models/MetricsServiceMetricInfoLabelValues.js'; +export * from '../models/MetricsServiceMetricMetadata.js'; +export * from '../models/MetricsServiceMetricsQueryResponse.js'; +export * from '../models/MetricsServiceMetricsQueryResponseMatrix.js'; +export * from '../models/MetricsServiceMetricsQueryResponseMetric.js'; +export * from '../models/MetricsServiceMetricsQueryResponseResult.js'; +export * from '../models/MetricsServiceMetricsQueryResponseSample.js'; +export * from '../models/MetricsServiceMetricsQueryResponseValue.js'; +export * from '../models/MetricsServiceObservabilityServiceQueryBody.js'; +export * from '../models/MetricsServiceObservabilityServiceQueryRangeBody.js'; +export * from '../models/MetricsServiceQueryValueResponse.js'; +export * from '../models/MetricsServiceQueryValueResponseResult.js'; +export * from '../models/PriceServiceBatchGetPricesRequest.js'; +export * from '../models/PriceServiceBatchGetPricesResponse.js'; +export * from '../models/PriceServiceBatchGetPricesResponseCoinPrice.js'; +export * from '../models/PriceServiceBatchGetPricesResponseCoinPricePrice.js'; +export * from '../models/PriceServiceCheckLatestPriceResponse.js'; +export * from '../models/PriceServiceCheckLatestPriceResponseCoinPrice.js'; +export * from '../models/PriceServiceCoinID.js'; +export * from '../models/PriceServiceCoinIDAddressIdentifier.js'; +export * from '../models/PriceServiceGetPriceResponse.js'; +export * from '../models/PriceServiceListCoinsResponse.js'; +export * from '../models/SolidityServiceBaseChainConfig.js'; +export * from '../models/SolidityServiceBlockOverrides.js'; +export * from '../models/SolidityServiceChainIdentifier.js'; +export * from '../models/SolidityServiceCompileSourceInternalResponse.js'; +export * from '../models/SolidityServiceCompilerOptions.js'; +export * from '../models/SolidityServiceContractKeyInfo.js'; +export * from '../models/SolidityServiceCreateForkResponse.js'; +export * from '../models/SolidityServiceDecodeStateDiffResponse.js'; +export * from '../models/SolidityServiceExternalFork.js'; +export * from '../models/SolidityServiceFailure.js'; +export * from '../models/SolidityServiceFetchAndCompileInternalResponse.js'; +export * from '../models/SolidityServiceFork.js'; +export * from '../models/SolidityServiceForkServiceCreateForkBody.js'; +export * from '../models/SolidityServiceForkServiceUpdateForkBody.js'; +export * from '../models/SolidityServiceForkType.js'; +export * from '../models/SolidityServiceGetForkInfoResponse.js'; +export * from '../models/SolidityServiceGetForkResponse.js'; +export * from '../models/SolidityServiceGetSimulationBundleResponse.js'; +export * from '../models/SolidityServiceGetSimulationResponse.js'; +export * from '../models/SolidityServiceGetSimulationsResponse.js'; +export * from '../models/SolidityServiceGetStorageSummaryInternalResponse.js'; +export * from '../models/SolidityServiceGetTraceCallInternalRequestBundle.js'; +export * from '../models/SolidityServiceGetTraceCallInternalRequestStateContext.js'; +export * from '../models/SolidityServiceGetTraceCallInternalResponse.js'; +export * from '../models/SolidityServiceGetTraceTransactionInternalResponse.js'; +export * from '../models/SolidityServiceListForksResponse.js'; +export * from '../models/SolidityServiceManagedFork.js'; +export * from '../models/SolidityServiceMetadata.js'; +export * from '../models/SolidityServiceNodeEnvironment.js'; +export * from '../models/SolidityServiceNodeForkConfig.js'; +export * from '../models/SolidityServiceOptimizer.js'; +export * from '../models/SolidityServiceOptimizerDetails.js'; +export * from '../models/SolidityServiceOptimizerDetailsYulDetails.js'; +export * from '../models/SolidityServicePreProcessCompilationInternalResponse.js'; +export * from '../models/SolidityServiceSettings.js'; +export * from '../models/SolidityServiceSimulateTransactionBundleResponse.js'; +export * from '../models/SolidityServiceSimulateTransactionResponse.js'; +export * from '../models/SolidityServiceSimulation.js'; +export * from '../models/SolidityServiceSimulationResult.js'; +export * from '../models/SolidityServiceSolidityAPIServiceSimulateTransactionBody.js'; +export * from '../models/SolidityServiceSolidityAPIServiceSimulateTransactionBundleBody.js'; +export * from '../models/SolidityServiceSolidityAPIServiceSimulateTransactionBundleOnForkBody.js'; +export * from '../models/SolidityServiceSolidityAPIServiceSimulateTransactionOnForkBody.js'; +export * from '../models/SolidityServiceSourceFetcherType.js'; +export * from '../models/SolidityServiceSourceInfo.js'; +export * from '../models/SolidityServiceSourceMultiFile.js'; +export * from '../models/SolidityServiceSourceSpec.js'; +export * from '../models/SolidityServiceSpecializations.js'; +export * from '../models/SolidityServiceStateOverride.js'; +export * from '../models/SolidityServiceStorageSummaryResult.js'; +export * from '../models/SolidityServiceUpdateForkResponse.js'; +export * from '../models/TxindexEvmRawTransaction.js'; +export * from '../models/TxindexEvmSearchTransactionsResponse.js'; +export * from '../models/WebServiceChart.js'; +export * from '../models/WebServiceChartChartType.js'; +export * from '../models/WebServiceChartConfig.js'; +export * from '../models/WebServiceChartConfigBarGaugeConfig.js'; +export * from '../models/WebServiceChartConfigCalculation.js'; +export * from '../models/WebServiceChartConfigColorTheme.js'; +export * from '../models/WebServiceChartConfigColumnSort.js'; +export * from '../models/WebServiceChartConfigCompareTime.js'; +export * from '../models/WebServiceChartConfigDirection.js'; +export * from '../models/WebServiceChartConfigLineConfig.js'; +export * from '../models/WebServiceChartConfigLineConfigStyle.js'; +export * from '../models/WebServiceChartConfigMappingRule.js'; +export * from '../models/WebServiceChartConfigMarker.js'; +export * from '../models/WebServiceChartConfigMarkerType.js'; +export * from '../models/WebServiceChartConfigPieConfig.js'; +export * from '../models/WebServiceChartConfigPieConfigPieType.js'; +export * from '../models/WebServiceChartConfigQueryValueConfig.js'; +export * from '../models/WebServiceChartConfigSort.js'; +export * from '../models/WebServiceChartConfigSortBy.js'; +export * from '../models/WebServiceChartConfigTableConfig.js'; +export * from '../models/WebServiceChartConfigTimeRangeOverride.js'; +export * from '../models/WebServiceChartConfigValueConfig.js'; +export * from '../models/WebServiceChartConfigValueConfigStyle.js'; +export * from '../models/WebServiceChartConfigValueFormatter.js'; +export * from '../models/WebServiceChartConfigYAxisConfig.js'; +export * from '../models/WebServiceChartDataSourceType.js'; +export * from '../models/WebServiceDashboard.js'; +export * from '../models/WebServiceDashboardDashboardVisibility.js'; +export * from '../models/WebServiceDashboardExtra.js'; +export * from '../models/WebServiceDashboardExtraTemplateVariable.js'; +export * from '../models/WebServiceDashboardExtraTemplateView.js'; +export * from '../models/WebServiceDashboardLayouts.js'; +export * from '../models/WebServiceDashboardLayoutsLayout.js'; +export * from '../models/WebServiceDashboardResponsiveLayouts.js'; +export * from '../models/WebServiceDashboardSharing.js'; +export * from '../models/WebServiceEventLogsConfig.js'; +export * from '../models/WebServiceEventLogsConfigTimeRangeOverride.js'; +export * from '../models/WebServiceExportDashboardResponse.js'; +export * from '../models/WebServiceGetDashboardResponse.js'; +export * from '../models/WebServiceGetProjectListResponse.js'; +export * from '../models/WebServiceGetProjectResponse.js'; +export * from '../models/WebServiceImportDashboardRequest.js'; +export * from '../models/WebServiceImportDashboardResponse.js'; +export * from '../models/WebServiceNote.js'; +export * from '../models/WebServiceNoteAlignment.js'; +export * from '../models/WebServiceNoteFontSize.js'; +export * from '../models/WebServiceNoteVerticalAlignment.js'; +export * from '../models/WebServicePanel.js'; + +import { AnalyticServiceAnalyticServiceExecuteSQLBody } from '../models/AnalyticServiceAnalyticServiceExecuteSQLBody.js'; +import { AnalyticServiceLogQueryRequestFilter } from '../models/AnalyticServiceLogQueryRequestFilter.js'; +import { AnalyticServiceLogQueryRequestSort } from '../models/AnalyticServiceLogQueryRequestSort.js'; +import { AnalyticServiceLogQueryResponse } from '../models/AnalyticServiceLogQueryResponse.js'; +import { AnalyticServiceSQLQuery } from '../models/AnalyticServiceSQLQuery.js'; +import { AnalyticServiceSearchServiceQueryLogBody } from '../models/AnalyticServiceSearchServiceQueryLogBody.js'; +import { AnalyticServiceSyncExecuteSQLResponse } from '../models/AnalyticServiceSyncExecuteSQLResponse.js'; +import { CommonAggregate } from '../models/CommonAggregate.js'; +import { CommonAggregateAggregateOps } from '../models/CommonAggregateAggregateOps.js'; +import { CommonAny } from '../models/CommonAny.js'; +import { CommonArgument } from '../models/CommonArgument.js'; +import { CommonBigDecimal } from '../models/CommonBigDecimal.js'; +import { CommonBigInteger } from '../models/CommonBigInteger.js'; +import { CommonCachePolicy } from '../models/CommonCachePolicy.js'; +import { CommonChannel } from '../models/CommonChannel.js'; +import { CommonChannelType } from '../models/CommonChannelType.js'; +import { CommonCohortsFilter } from '../models/CommonCohortsFilter.js'; +import { CommonCohortsFilterAggregation } from '../models/CommonCohortsFilterAggregation.js'; +import { CommonCohortsFilterAggregationAggregateProperties } from '../models/CommonCohortsFilterAggregationAggregateProperties.js'; +import { CommonCohortsFilterAggregationAggregatePropertiesAggregationType } from '../models/CommonCohortsFilterAggregationAggregatePropertiesAggregationType.js'; +import { CommonCohortsFilterAggregationOperatorType } from '../models/CommonCohortsFilterAggregationOperatorType.js'; +import { CommonCohortsGroup } from '../models/CommonCohortsGroup.js'; +import { CommonCohortsQuery } from '../models/CommonCohortsQuery.js'; +import { CommonCoinID } from '../models/CommonCoinID.js'; +import { CommonCoinIDAddressIdentifier } from '../models/CommonCoinIDAddressIdentifier.js'; +import { CommonColumnState } from '../models/CommonColumnState.js'; +import { CommonColumnStateSort } from '../models/CommonColumnStateSort.js'; +import { CommonComputeStats } from '../models/CommonComputeStats.js'; +import { CommonDuration } from '../models/CommonDuration.js'; +import { CommonEventLogColumn } from '../models/CommonEventLogColumn.js'; +import { CommonEventLogConfig } from '../models/CommonEventLogConfig.js'; +import { CommonEventLogEntry } from '../models/CommonEventLogEntry.js'; +import { CommonFormula } from '../models/CommonFormula.js'; +import { CommonFunction } from '../models/CommonFunction.js'; +import { CommonJoinOperator } from '../models/CommonJoinOperator.js'; +import { CommonMatrix } from '../models/CommonMatrix.js'; +import { CommonMatrixMetric } from '../models/CommonMatrixMetric.js'; +import { CommonMatrixSample } from '../models/CommonMatrixSample.js'; +import { CommonMatrixValue } from '../models/CommonMatrixValue.js'; +import { CommonOrganization } from '../models/CommonOrganization.js'; +import { CommonOrganizationMember } from '../models/CommonOrganizationMember.js'; +import { CommonOrganizationRole } from '../models/CommonOrganizationRole.js'; +import { CommonOwner } from '../models/CommonOwner.js'; +import { CommonPermission } from '../models/CommonPermission.js'; +import { CommonPriceSegmentationQuery } from '../models/CommonPriceSegmentationQuery.js'; +import { CommonProject } from '../models/CommonProject.js'; +import { CommonProjectInfo } from '../models/CommonProjectInfo.js'; +import { CommonProjectProjectMember } from '../models/CommonProjectProjectMember.js'; +import { CommonProjectSuperset } from '../models/CommonProjectSuperset.js'; +import { CommonProjectType } from '../models/CommonProjectType.js'; +import { CommonProjectView } from '../models/CommonProjectView.js'; +import { CommonProjectViewProjectViewConfig } from '../models/CommonProjectViewProjectViewConfig.js'; +import { CommonProjectVisibility } from '../models/CommonProjectVisibility.js'; +import { CommonQuery } from '../models/CommonQuery.js'; +import { CommonRetentionMatrix } from '../models/CommonRetentionMatrix.js'; +import { CommonRetentionMatrixSample } from '../models/CommonRetentionMatrixSample.js'; +import { CommonRetentionQuery } from '../models/CommonRetentionQuery.js'; +import { CommonRetentionQueryCriteria } from '../models/CommonRetentionQueryCriteria.js'; +import { CommonRetentionQueryFilter } from '../models/CommonRetentionQueryFilter.js'; +import { CommonRetentionQueryFilterTimeFilter } from '../models/CommonRetentionQueryFilterTimeFilter.js'; +import { CommonRetentionQueryFilterTimeFilterType } from '../models/CommonRetentionQueryFilterTimeFilterType.js'; +import { CommonRetentionQueryInterval } from '../models/CommonRetentionQueryInterval.js'; +import { CommonRetentionQueryIntervalUnit } from '../models/CommonRetentionQueryIntervalUnit.js'; +import { CommonRetentionQueryResource } from '../models/CommonRetentionQueryResource.js'; +import { CommonRichStruct } from '../models/CommonRichStruct.js'; +import { CommonRichValue } from '../models/CommonRichValue.js'; +import { CommonRichValueList } from '../models/CommonRichValueList.js'; +import { CommonRichValueNullValue } from '../models/CommonRichValueNullValue.js'; +import { CommonSegmentParameter } from '../models/CommonSegmentParameter.js'; +import { CommonSegmentationQuery } from '../models/CommonSegmentationQuery.js'; +import { CommonSegmentationQueryAggregation } from '../models/CommonSegmentationQueryAggregation.js'; +import { CommonSegmentationQueryAggregationAggregateProperties } from '../models/CommonSegmentationQueryAggregationAggregateProperties.js'; +import { CommonSegmentationQueryAggregationAggregatePropertiesAggregationType } from '../models/CommonSegmentationQueryAggregationAggregatePropertiesAggregationType.js'; +import { CommonSegmentationQueryAggregationCountUnique } from '../models/CommonSegmentationQueryAggregationCountUnique.js'; +import { CommonSegmentationQueryResource } from '../models/CommonSegmentationQueryResource.js'; +import { CommonSegmentationQueryResourceType } from '../models/CommonSegmentationQueryResourceType.js'; +import { CommonSegmentationQuerySelectorExpr } from '../models/CommonSegmentationQuerySelectorExpr.js'; +import { CommonSegmentationQuerySelectorExprLogicExpr } from '../models/CommonSegmentationQuerySelectorExprLogicExpr.js'; +import { CommonSelector } from '../models/CommonSelector.js'; +import { CommonSelectorExpr } from '../models/CommonSelectorExpr.js'; +import { CommonSelectorExprLogicExpr } from '../models/CommonSelectorExprLogicExpr.js'; +import { CommonSelectorOperatorType } from '../models/CommonSelectorOperatorType.js'; +import { CommonStringList } from '../models/CommonStringList.js'; +import { CommonTabularData } from '../models/CommonTabularData.js'; +import { CommonTabularDataColumnType } from '../models/CommonTabularDataColumnType.js'; +import { CommonTier } from '../models/CommonTier.js'; +import { CommonTimeRange } from '../models/CommonTimeRange.js'; +import { CommonTimeRangeLite } from '../models/CommonTimeRangeLite.js'; +import { CommonTimeRangeRelativeTime } from '../models/CommonTimeRangeRelativeTime.js'; +import { CommonTimeRangeTimeLike } from '../models/CommonTimeRangeTimeLike.js'; +import { CommonUser } from '../models/CommonUser.js'; +import { CommonUserAccountStatus } from '../models/CommonUserAccountStatus.js'; +import { CommonUserInfo } from '../models/CommonUserInfo.js'; +import { EvmAccessListItem } from '../models/EvmAccessListItem.js'; +import { EvmTransaction } from '../models/EvmTransaction.js'; +import { EvmTransactionReceipt } from '../models/EvmTransactionReceipt.js'; +import { GoogleApiHttpBody } from '../models/GoogleApiHttpBody.js'; +import { GoogleProtobufAny } from '../models/GoogleProtobufAny.js'; +import { GoogleProtobufNullValue } from '../models/GoogleProtobufNullValue.js'; +import { InsightsServiceDataSource } from '../models/InsightsServiceDataSource.js'; +import { InsightsServiceInsightsServiceQueryBody } from '../models/InsightsServiceInsightsServiceQueryBody.js'; +import { InsightsServiceInsightsServiceRetentionBody } from '../models/InsightsServiceInsightsServiceRetentionBody.js'; +import { InsightsServiceListCoinsResponse } from '../models/InsightsServiceListCoinsResponse.js'; +import { InsightsServiceQueryRequestQuery } from '../models/InsightsServiceQueryRequestQuery.js'; +import { InsightsServiceQueryResponse } from '../models/InsightsServiceQueryResponse.js'; +import { InsightsServiceQueryResponseResult } from '../models/InsightsServiceQueryResponseResult.js'; +import { InsightsServiceRetentionRequest } from '../models/InsightsServiceRetentionRequest.js'; +import { InsightsServiceRetentionResponse } from '../models/InsightsServiceRetentionResponse.js'; +import { MetricsServiceGetMetricsResponse } from '../models/MetricsServiceGetMetricsResponse.js'; +import { MetricsServiceMetricInfo } from '../models/MetricsServiceMetricInfo.js'; +import { MetricsServiceMetricInfoLabelValues } from '../models/MetricsServiceMetricInfoLabelValues.js'; +import { MetricsServiceMetricMetadata } from '../models/MetricsServiceMetricMetadata.js'; +import { MetricsServiceMetricsQueryResponse } from '../models/MetricsServiceMetricsQueryResponse.js'; +import { MetricsServiceMetricsQueryResponseMatrix } from '../models/MetricsServiceMetricsQueryResponseMatrix.js'; +import { MetricsServiceMetricsQueryResponseMetric } from '../models/MetricsServiceMetricsQueryResponseMetric.js'; +import { MetricsServiceMetricsQueryResponseResult } from '../models/MetricsServiceMetricsQueryResponseResult.js'; +import { MetricsServiceMetricsQueryResponseSample } from '../models/MetricsServiceMetricsQueryResponseSample.js'; +import { MetricsServiceMetricsQueryResponseValue } from '../models/MetricsServiceMetricsQueryResponseValue.js'; +import { MetricsServiceObservabilityServiceQueryBody } from '../models/MetricsServiceObservabilityServiceQueryBody.js'; +import { MetricsServiceObservabilityServiceQueryRangeBody } from '../models/MetricsServiceObservabilityServiceQueryRangeBody.js'; +import { MetricsServiceQueryValueResponse } from '../models/MetricsServiceQueryValueResponse.js'; +import { MetricsServiceQueryValueResponseResult } from '../models/MetricsServiceQueryValueResponseResult.js'; +import { PriceServiceBatchGetPricesRequest } from '../models/PriceServiceBatchGetPricesRequest.js'; +import { PriceServiceBatchGetPricesResponse } from '../models/PriceServiceBatchGetPricesResponse.js'; +import { PriceServiceBatchGetPricesResponseCoinPrice } from '../models/PriceServiceBatchGetPricesResponseCoinPrice.js'; +import { PriceServiceBatchGetPricesResponseCoinPricePrice } from '../models/PriceServiceBatchGetPricesResponseCoinPricePrice.js'; +import { PriceServiceCheckLatestPriceResponse } from '../models/PriceServiceCheckLatestPriceResponse.js'; +import { PriceServiceCheckLatestPriceResponseCoinPrice } from '../models/PriceServiceCheckLatestPriceResponseCoinPrice.js'; +import { PriceServiceCoinID } from '../models/PriceServiceCoinID.js'; +import { PriceServiceCoinIDAddressIdentifier } from '../models/PriceServiceCoinIDAddressIdentifier.js'; +import { PriceServiceGetPriceResponse } from '../models/PriceServiceGetPriceResponse.js'; +import { PriceServiceListCoinsResponse } from '../models/PriceServiceListCoinsResponse.js'; +import { SolidityServiceBaseChainConfig } from '../models/SolidityServiceBaseChainConfig.js'; +import { SolidityServiceBlockOverrides } from '../models/SolidityServiceBlockOverrides.js'; +import { SolidityServiceChainIdentifier } from '../models/SolidityServiceChainIdentifier.js'; +import { SolidityServiceCompileSourceInternalResponse } from '../models/SolidityServiceCompileSourceInternalResponse.js'; +import { SolidityServiceCompilerOptions } from '../models/SolidityServiceCompilerOptions.js'; +import { SolidityServiceContractKeyInfo } from '../models/SolidityServiceContractKeyInfo.js'; +import { SolidityServiceCreateForkResponse } from '../models/SolidityServiceCreateForkResponse.js'; +import { SolidityServiceDecodeStateDiffResponse } from '../models/SolidityServiceDecodeStateDiffResponse.js'; +import { SolidityServiceExternalFork } from '../models/SolidityServiceExternalFork.js'; +import { SolidityServiceFailure } from '../models/SolidityServiceFailure.js'; +import { SolidityServiceFetchAndCompileInternalResponse } from '../models/SolidityServiceFetchAndCompileInternalResponse.js'; +import { SolidityServiceFork } from '../models/SolidityServiceFork.js'; +import { SolidityServiceForkServiceCreateForkBody } from '../models/SolidityServiceForkServiceCreateForkBody.js'; +import { SolidityServiceForkServiceUpdateForkBody } from '../models/SolidityServiceForkServiceUpdateForkBody.js'; +import { SolidityServiceForkType } from '../models/SolidityServiceForkType.js'; +import { SolidityServiceGetForkInfoResponse } from '../models/SolidityServiceGetForkInfoResponse.js'; +import { SolidityServiceGetForkResponse } from '../models/SolidityServiceGetForkResponse.js'; +import { SolidityServiceGetSimulationBundleResponse } from '../models/SolidityServiceGetSimulationBundleResponse.js'; +import { SolidityServiceGetSimulationResponse } from '../models/SolidityServiceGetSimulationResponse.js'; +import { SolidityServiceGetSimulationsResponse } from '../models/SolidityServiceGetSimulationsResponse.js'; +import { SolidityServiceGetStorageSummaryInternalResponse } from '../models/SolidityServiceGetStorageSummaryInternalResponse.js'; +import { SolidityServiceGetTraceCallInternalRequestBundle } from '../models/SolidityServiceGetTraceCallInternalRequestBundle.js'; +import { SolidityServiceGetTraceCallInternalRequestStateContext } from '../models/SolidityServiceGetTraceCallInternalRequestStateContext.js'; +import { SolidityServiceGetTraceCallInternalResponse } from '../models/SolidityServiceGetTraceCallInternalResponse.js'; +import { SolidityServiceGetTraceTransactionInternalResponse } from '../models/SolidityServiceGetTraceTransactionInternalResponse.js'; +import { SolidityServiceListForksResponse } from '../models/SolidityServiceListForksResponse.js'; +import { SolidityServiceManagedFork } from '../models/SolidityServiceManagedFork.js'; +import { SolidityServiceMetadata } from '../models/SolidityServiceMetadata.js'; +import { SolidityServiceNodeEnvironment } from '../models/SolidityServiceNodeEnvironment.js'; +import { SolidityServiceNodeForkConfig } from '../models/SolidityServiceNodeForkConfig.js'; +import { SolidityServiceOptimizer } from '../models/SolidityServiceOptimizer.js'; +import { SolidityServiceOptimizerDetails } from '../models/SolidityServiceOptimizerDetails.js'; +import { SolidityServiceOptimizerDetailsYulDetails } from '../models/SolidityServiceOptimizerDetailsYulDetails.js'; +import { SolidityServicePreProcessCompilationInternalResponse } from '../models/SolidityServicePreProcessCompilationInternalResponse.js'; +import { SolidityServiceSettings } from '../models/SolidityServiceSettings.js'; +import { SolidityServiceSimulateTransactionBundleResponse } from '../models/SolidityServiceSimulateTransactionBundleResponse.js'; +import { SolidityServiceSimulateTransactionResponse } from '../models/SolidityServiceSimulateTransactionResponse.js'; +import { SolidityServiceSimulation } from '../models/SolidityServiceSimulation.js'; +import { SolidityServiceSimulationResult } from '../models/SolidityServiceSimulationResult.js'; +import { SolidityServiceSolidityAPIServiceSimulateTransactionBody } from '../models/SolidityServiceSolidityAPIServiceSimulateTransactionBody.js'; +import { SolidityServiceSolidityAPIServiceSimulateTransactionBundleBody } from '../models/SolidityServiceSolidityAPIServiceSimulateTransactionBundleBody.js'; +import { SolidityServiceSolidityAPIServiceSimulateTransactionBundleOnForkBody } from '../models/SolidityServiceSolidityAPIServiceSimulateTransactionBundleOnForkBody.js'; +import { SolidityServiceSolidityAPIServiceSimulateTransactionOnForkBody } from '../models/SolidityServiceSolidityAPIServiceSimulateTransactionOnForkBody.js'; +import { SolidityServiceSourceFetcherType } from '../models/SolidityServiceSourceFetcherType.js'; +import { SolidityServiceSourceInfo } from '../models/SolidityServiceSourceInfo.js'; +import { SolidityServiceSourceMultiFile } from '../models/SolidityServiceSourceMultiFile.js'; +import { SolidityServiceSourceSpec } from '../models/SolidityServiceSourceSpec.js'; +import { SolidityServiceSpecializations } from '../models/SolidityServiceSpecializations.js'; +import { SolidityServiceStateOverride } from '../models/SolidityServiceStateOverride.js'; +import { SolidityServiceStorageSummaryResult } from '../models/SolidityServiceStorageSummaryResult.js'; +import { SolidityServiceUpdateForkResponse } from '../models/SolidityServiceUpdateForkResponse.js'; +import { TxindexEvmRawTransaction } from '../models/TxindexEvmRawTransaction.js'; +import { TxindexEvmSearchTransactionsResponse } from '../models/TxindexEvmSearchTransactionsResponse.js'; +import { WebServiceChart } from '../models/WebServiceChart.js'; +import { WebServiceChartChartType } from '../models/WebServiceChartChartType.js'; +import { WebServiceChartConfig } from '../models/WebServiceChartConfig.js'; +import { WebServiceChartConfigBarGaugeConfig } from '../models/WebServiceChartConfigBarGaugeConfig.js'; +import { WebServiceChartConfigCalculation } from '../models/WebServiceChartConfigCalculation.js'; +import { WebServiceChartConfigColorTheme } from '../models/WebServiceChartConfigColorTheme.js'; +import { WebServiceChartConfigColumnSort } from '../models/WebServiceChartConfigColumnSort.js'; +import { WebServiceChartConfigCompareTime } from '../models/WebServiceChartConfigCompareTime.js'; +import { WebServiceChartConfigDirection } from '../models/WebServiceChartConfigDirection.js'; +import { WebServiceChartConfigLineConfig } from '../models/WebServiceChartConfigLineConfig.js'; +import { WebServiceChartConfigLineConfigStyle } from '../models/WebServiceChartConfigLineConfigStyle.js'; +import { WebServiceChartConfigMappingRule } from '../models/WebServiceChartConfigMappingRule.js'; +import { WebServiceChartConfigMarker } from '../models/WebServiceChartConfigMarker.js'; +import { WebServiceChartConfigMarkerType } from '../models/WebServiceChartConfigMarkerType.js'; +import { WebServiceChartConfigPieConfig } from '../models/WebServiceChartConfigPieConfig.js'; +import { WebServiceChartConfigPieConfigPieType } from '../models/WebServiceChartConfigPieConfigPieType.js'; +import { WebServiceChartConfigQueryValueConfig } from '../models/WebServiceChartConfigQueryValueConfig.js'; +import { WebServiceChartConfigSort } from '../models/WebServiceChartConfigSort.js'; +import { WebServiceChartConfigSortBy } from '../models/WebServiceChartConfigSortBy.js'; +import { WebServiceChartConfigTableConfig } from '../models/WebServiceChartConfigTableConfig.js'; +import { WebServiceChartConfigTimeRangeOverride } from '../models/WebServiceChartConfigTimeRangeOverride.js'; +import { WebServiceChartConfigValueConfig } from '../models/WebServiceChartConfigValueConfig.js'; +import { WebServiceChartConfigValueConfigStyle } from '../models/WebServiceChartConfigValueConfigStyle.js'; +import { WebServiceChartConfigValueFormatter } from '../models/WebServiceChartConfigValueFormatter.js'; +import { WebServiceChartConfigYAxisConfig } from '../models/WebServiceChartConfigYAxisConfig.js'; +import { WebServiceChartDataSourceType } from '../models/WebServiceChartDataSourceType.js'; +import { WebServiceDashboard } from '../models/WebServiceDashboard.js'; +import { WebServiceDashboardDashboardVisibility } from '../models/WebServiceDashboardDashboardVisibility.js'; +import { WebServiceDashboardExtra } from '../models/WebServiceDashboardExtra.js'; +import { WebServiceDashboardExtraTemplateVariable } from '../models/WebServiceDashboardExtraTemplateVariable.js'; +import { WebServiceDashboardExtraTemplateView } from '../models/WebServiceDashboardExtraTemplateView.js'; +import { WebServiceDashboardLayouts } from '../models/WebServiceDashboardLayouts.js'; +import { WebServiceDashboardLayoutsLayout } from '../models/WebServiceDashboardLayoutsLayout.js'; +import { WebServiceDashboardResponsiveLayouts } from '../models/WebServiceDashboardResponsiveLayouts.js'; +import { WebServiceDashboardSharing } from '../models/WebServiceDashboardSharing.js'; +import { WebServiceEventLogsConfig } from '../models/WebServiceEventLogsConfig.js'; +import { WebServiceEventLogsConfigTimeRangeOverride } from '../models/WebServiceEventLogsConfigTimeRangeOverride.js'; +import { WebServiceExportDashboardResponse } from '../models/WebServiceExportDashboardResponse.js'; +import { WebServiceGetDashboardResponse } from '../models/WebServiceGetDashboardResponse.js'; +import { WebServiceGetProjectListResponse } from '../models/WebServiceGetProjectListResponse.js'; +import { WebServiceGetProjectResponse } from '../models/WebServiceGetProjectResponse.js'; +import { WebServiceImportDashboardRequest } from '../models/WebServiceImportDashboardRequest.js'; +import { WebServiceImportDashboardResponse } from '../models/WebServiceImportDashboardResponse.js'; +import { WebServiceNote } from '../models/WebServiceNote.js'; +import { WebServiceNoteAlignment } from '../models/WebServiceNoteAlignment.js'; +import { WebServiceNoteFontSize } from '../models/WebServiceNoteFontSize.js'; +import { WebServiceNoteVerticalAlignment } from '../models/WebServiceNoteVerticalAlignment.js'; +import { WebServicePanel } from '../models/WebServicePanel.js'; + +/* tslint:disable:no-unused-variable */ +let primitives = [ + "string", + "boolean", + "double", + "integer", + "long", + "float", + "number", + "any" + ]; + +let enumsMap: Set = new Set([ + "CommonAggregateAggregateOps", + "CommonChannelType", + "CommonCohortsFilterAggregationAggregatePropertiesAggregationType", + "CommonCohortsFilterAggregationOperatorType", + "CommonJoinOperator", + "CommonOrganizationRole", + "CommonPermission", + "CommonProjectType", + "CommonProjectVisibility", + "CommonRetentionQueryCriteria", + "CommonRetentionQueryFilterTimeFilterType", + "CommonRetentionQueryIntervalUnit", + "CommonRichValueNullValue", + "CommonSegmentationQueryAggregationAggregatePropertiesAggregationType", + "CommonSegmentationQueryResourceType", + "CommonSelectorOperatorType", + "CommonTabularDataColumnType", + "CommonTier", + "CommonUserAccountStatus", + "GoogleProtobufNullValue", + "InsightsServiceDataSource", + "SolidityServiceForkType", + "SolidityServiceSourceFetcherType", + "WebServiceChartChartType", + "WebServiceChartConfigCalculation", + "WebServiceChartConfigDirection", + "WebServiceChartConfigLineConfigStyle", + "WebServiceChartConfigMarkerType", + "WebServiceChartConfigPieConfigPieType", + "WebServiceChartConfigSortBy", + "WebServiceChartConfigValueConfigStyle", + "WebServiceChartConfigValueFormatter", + "WebServiceChartDataSourceType", + "WebServiceDashboardDashboardVisibility", + "WebServiceNoteAlignment", + "WebServiceNoteFontSize", + "WebServiceNoteVerticalAlignment", +]); + +let typeMap: {[index: string]: any} = { + "AnalyticServiceAnalyticServiceExecuteSQLBody": AnalyticServiceAnalyticServiceExecuteSQLBody, + "AnalyticServiceLogQueryRequestFilter": AnalyticServiceLogQueryRequestFilter, + "AnalyticServiceLogQueryRequestSort": AnalyticServiceLogQueryRequestSort, + "AnalyticServiceLogQueryResponse": AnalyticServiceLogQueryResponse, + "AnalyticServiceSQLQuery": AnalyticServiceSQLQuery, + "AnalyticServiceSearchServiceQueryLogBody": AnalyticServiceSearchServiceQueryLogBody, + "AnalyticServiceSyncExecuteSQLResponse": AnalyticServiceSyncExecuteSQLResponse, + "CommonAggregate": CommonAggregate, + "CommonAny": CommonAny, + "CommonArgument": CommonArgument, + "CommonBigDecimal": CommonBigDecimal, + "CommonBigInteger": CommonBigInteger, + "CommonCachePolicy": CommonCachePolicy, + "CommonChannel": CommonChannel, + "CommonCohortsFilter": CommonCohortsFilter, + "CommonCohortsFilterAggregation": CommonCohortsFilterAggregation, + "CommonCohortsFilterAggregationAggregateProperties": CommonCohortsFilterAggregationAggregateProperties, + "CommonCohortsGroup": CommonCohortsGroup, + "CommonCohortsQuery": CommonCohortsQuery, + "CommonCoinID": CommonCoinID, + "CommonCoinIDAddressIdentifier": CommonCoinIDAddressIdentifier, + "CommonColumnState": CommonColumnState, + "CommonColumnStateSort": CommonColumnStateSort, + "CommonComputeStats": CommonComputeStats, + "CommonDuration": CommonDuration, + "CommonEventLogColumn": CommonEventLogColumn, + "CommonEventLogConfig": CommonEventLogConfig, + "CommonEventLogEntry": CommonEventLogEntry, + "CommonFormula": CommonFormula, + "CommonFunction": CommonFunction, + "CommonMatrix": CommonMatrix, + "CommonMatrixMetric": CommonMatrixMetric, + "CommonMatrixSample": CommonMatrixSample, + "CommonMatrixValue": CommonMatrixValue, + "CommonOrganization": CommonOrganization, + "CommonOrganizationMember": CommonOrganizationMember, + "CommonOwner": CommonOwner, + "CommonPriceSegmentationQuery": CommonPriceSegmentationQuery, + "CommonProject": CommonProject, + "CommonProjectInfo": CommonProjectInfo, + "CommonProjectProjectMember": CommonProjectProjectMember, + "CommonProjectSuperset": CommonProjectSuperset, + "CommonProjectView": CommonProjectView, + "CommonProjectViewProjectViewConfig": CommonProjectViewProjectViewConfig, + "CommonQuery": CommonQuery, + "CommonRetentionMatrix": CommonRetentionMatrix, + "CommonRetentionMatrixSample": CommonRetentionMatrixSample, + "CommonRetentionQuery": CommonRetentionQuery, + "CommonRetentionQueryFilter": CommonRetentionQueryFilter, + "CommonRetentionQueryFilterTimeFilter": CommonRetentionQueryFilterTimeFilter, + "CommonRetentionQueryInterval": CommonRetentionQueryInterval, + "CommonRetentionQueryResource": CommonRetentionQueryResource, + "CommonRichStruct": CommonRichStruct, + "CommonRichValue": CommonRichValue, + "CommonRichValueList": CommonRichValueList, + "CommonSegmentParameter": CommonSegmentParameter, + "CommonSegmentationQuery": CommonSegmentationQuery, + "CommonSegmentationQueryAggregation": CommonSegmentationQueryAggregation, + "CommonSegmentationQueryAggregationAggregateProperties": CommonSegmentationQueryAggregationAggregateProperties, + "CommonSegmentationQueryAggregationCountUnique": CommonSegmentationQueryAggregationCountUnique, + "CommonSegmentationQueryResource": CommonSegmentationQueryResource, + "CommonSegmentationQuerySelectorExpr": CommonSegmentationQuerySelectorExpr, + "CommonSegmentationQuerySelectorExprLogicExpr": CommonSegmentationQuerySelectorExprLogicExpr, + "CommonSelector": CommonSelector, + "CommonSelectorExpr": CommonSelectorExpr, + "CommonSelectorExprLogicExpr": CommonSelectorExprLogicExpr, + "CommonStringList": CommonStringList, + "CommonTabularData": CommonTabularData, + "CommonTimeRange": CommonTimeRange, + "CommonTimeRangeLite": CommonTimeRangeLite, + "CommonTimeRangeRelativeTime": CommonTimeRangeRelativeTime, + "CommonTimeRangeTimeLike": CommonTimeRangeTimeLike, + "CommonUser": CommonUser, + "CommonUserInfo": CommonUserInfo, + "EvmAccessListItem": EvmAccessListItem, + "EvmTransaction": EvmTransaction, + "EvmTransactionReceipt": EvmTransactionReceipt, + "GoogleApiHttpBody": GoogleApiHttpBody, + "GoogleProtobufAny": GoogleProtobufAny, + "InsightsServiceInsightsServiceQueryBody": InsightsServiceInsightsServiceQueryBody, + "InsightsServiceInsightsServiceRetentionBody": InsightsServiceInsightsServiceRetentionBody, + "InsightsServiceListCoinsResponse": InsightsServiceListCoinsResponse, + "InsightsServiceQueryRequestQuery": InsightsServiceQueryRequestQuery, + "InsightsServiceQueryResponse": InsightsServiceQueryResponse, + "InsightsServiceQueryResponseResult": InsightsServiceQueryResponseResult, + "InsightsServiceRetentionRequest": InsightsServiceRetentionRequest, + "InsightsServiceRetentionResponse": InsightsServiceRetentionResponse, + "MetricsServiceGetMetricsResponse": MetricsServiceGetMetricsResponse, + "MetricsServiceMetricInfo": MetricsServiceMetricInfo, + "MetricsServiceMetricInfoLabelValues": MetricsServiceMetricInfoLabelValues, + "MetricsServiceMetricMetadata": MetricsServiceMetricMetadata, + "MetricsServiceMetricsQueryResponse": MetricsServiceMetricsQueryResponse, + "MetricsServiceMetricsQueryResponseMatrix": MetricsServiceMetricsQueryResponseMatrix, + "MetricsServiceMetricsQueryResponseMetric": MetricsServiceMetricsQueryResponseMetric, + "MetricsServiceMetricsQueryResponseResult": MetricsServiceMetricsQueryResponseResult, + "MetricsServiceMetricsQueryResponseSample": MetricsServiceMetricsQueryResponseSample, + "MetricsServiceMetricsQueryResponseValue": MetricsServiceMetricsQueryResponseValue, + "MetricsServiceObservabilityServiceQueryBody": MetricsServiceObservabilityServiceQueryBody, + "MetricsServiceObservabilityServiceQueryRangeBody": MetricsServiceObservabilityServiceQueryRangeBody, + "MetricsServiceQueryValueResponse": MetricsServiceQueryValueResponse, + "MetricsServiceQueryValueResponseResult": MetricsServiceQueryValueResponseResult, + "PriceServiceBatchGetPricesRequest": PriceServiceBatchGetPricesRequest, + "PriceServiceBatchGetPricesResponse": PriceServiceBatchGetPricesResponse, + "PriceServiceBatchGetPricesResponseCoinPrice": PriceServiceBatchGetPricesResponseCoinPrice, + "PriceServiceBatchGetPricesResponseCoinPricePrice": PriceServiceBatchGetPricesResponseCoinPricePrice, + "PriceServiceCheckLatestPriceResponse": PriceServiceCheckLatestPriceResponse, + "PriceServiceCheckLatestPriceResponseCoinPrice": PriceServiceCheckLatestPriceResponseCoinPrice, + "PriceServiceCoinID": PriceServiceCoinID, + "PriceServiceCoinIDAddressIdentifier": PriceServiceCoinIDAddressIdentifier, + "PriceServiceGetPriceResponse": PriceServiceGetPriceResponse, + "PriceServiceListCoinsResponse": PriceServiceListCoinsResponse, + "SolidityServiceBaseChainConfig": SolidityServiceBaseChainConfig, + "SolidityServiceBlockOverrides": SolidityServiceBlockOverrides, + "SolidityServiceChainIdentifier": SolidityServiceChainIdentifier, + "SolidityServiceCompileSourceInternalResponse": SolidityServiceCompileSourceInternalResponse, + "SolidityServiceCompilerOptions": SolidityServiceCompilerOptions, + "SolidityServiceContractKeyInfo": SolidityServiceContractKeyInfo, + "SolidityServiceCreateForkResponse": SolidityServiceCreateForkResponse, + "SolidityServiceDecodeStateDiffResponse": SolidityServiceDecodeStateDiffResponse, + "SolidityServiceExternalFork": SolidityServiceExternalFork, + "SolidityServiceFailure": SolidityServiceFailure, + "SolidityServiceFetchAndCompileInternalResponse": SolidityServiceFetchAndCompileInternalResponse, + "SolidityServiceFork": SolidityServiceFork, + "SolidityServiceForkServiceCreateForkBody": SolidityServiceForkServiceCreateForkBody, + "SolidityServiceForkServiceUpdateForkBody": SolidityServiceForkServiceUpdateForkBody, + "SolidityServiceGetForkInfoResponse": SolidityServiceGetForkInfoResponse, + "SolidityServiceGetForkResponse": SolidityServiceGetForkResponse, + "SolidityServiceGetSimulationBundleResponse": SolidityServiceGetSimulationBundleResponse, + "SolidityServiceGetSimulationResponse": SolidityServiceGetSimulationResponse, + "SolidityServiceGetSimulationsResponse": SolidityServiceGetSimulationsResponse, + "SolidityServiceGetStorageSummaryInternalResponse": SolidityServiceGetStorageSummaryInternalResponse, + "SolidityServiceGetTraceCallInternalRequestBundle": SolidityServiceGetTraceCallInternalRequestBundle, + "SolidityServiceGetTraceCallInternalRequestStateContext": SolidityServiceGetTraceCallInternalRequestStateContext, + "SolidityServiceGetTraceCallInternalResponse": SolidityServiceGetTraceCallInternalResponse, + "SolidityServiceGetTraceTransactionInternalResponse": SolidityServiceGetTraceTransactionInternalResponse, + "SolidityServiceListForksResponse": SolidityServiceListForksResponse, + "SolidityServiceManagedFork": SolidityServiceManagedFork, + "SolidityServiceMetadata": SolidityServiceMetadata, + "SolidityServiceNodeEnvironment": SolidityServiceNodeEnvironment, + "SolidityServiceNodeForkConfig": SolidityServiceNodeForkConfig, + "SolidityServiceOptimizer": SolidityServiceOptimizer, + "SolidityServiceOptimizerDetails": SolidityServiceOptimizerDetails, + "SolidityServiceOptimizerDetailsYulDetails": SolidityServiceOptimizerDetailsYulDetails, + "SolidityServicePreProcessCompilationInternalResponse": SolidityServicePreProcessCompilationInternalResponse, + "SolidityServiceSettings": SolidityServiceSettings, + "SolidityServiceSimulateTransactionBundleResponse": SolidityServiceSimulateTransactionBundleResponse, + "SolidityServiceSimulateTransactionResponse": SolidityServiceSimulateTransactionResponse, + "SolidityServiceSimulation": SolidityServiceSimulation, + "SolidityServiceSimulationResult": SolidityServiceSimulationResult, + "SolidityServiceSolidityAPIServiceSimulateTransactionBody": SolidityServiceSolidityAPIServiceSimulateTransactionBody, + "SolidityServiceSolidityAPIServiceSimulateTransactionBundleBody": SolidityServiceSolidityAPIServiceSimulateTransactionBundleBody, + "SolidityServiceSolidityAPIServiceSimulateTransactionBundleOnForkBody": SolidityServiceSolidityAPIServiceSimulateTransactionBundleOnForkBody, + "SolidityServiceSolidityAPIServiceSimulateTransactionOnForkBody": SolidityServiceSolidityAPIServiceSimulateTransactionOnForkBody, + "SolidityServiceSourceInfo": SolidityServiceSourceInfo, + "SolidityServiceSourceMultiFile": SolidityServiceSourceMultiFile, + "SolidityServiceSourceSpec": SolidityServiceSourceSpec, + "SolidityServiceSpecializations": SolidityServiceSpecializations, + "SolidityServiceStateOverride": SolidityServiceStateOverride, + "SolidityServiceStorageSummaryResult": SolidityServiceStorageSummaryResult, + "SolidityServiceUpdateForkResponse": SolidityServiceUpdateForkResponse, + "TxindexEvmRawTransaction": TxindexEvmRawTransaction, + "TxindexEvmSearchTransactionsResponse": TxindexEvmSearchTransactionsResponse, + "WebServiceChart": WebServiceChart, + "WebServiceChartConfig": WebServiceChartConfig, + "WebServiceChartConfigBarGaugeConfig": WebServiceChartConfigBarGaugeConfig, + "WebServiceChartConfigColorTheme": WebServiceChartConfigColorTheme, + "WebServiceChartConfigColumnSort": WebServiceChartConfigColumnSort, + "WebServiceChartConfigCompareTime": WebServiceChartConfigCompareTime, + "WebServiceChartConfigLineConfig": WebServiceChartConfigLineConfig, + "WebServiceChartConfigMappingRule": WebServiceChartConfigMappingRule, + "WebServiceChartConfigMarker": WebServiceChartConfigMarker, + "WebServiceChartConfigPieConfig": WebServiceChartConfigPieConfig, + "WebServiceChartConfigQueryValueConfig": WebServiceChartConfigQueryValueConfig, + "WebServiceChartConfigSort": WebServiceChartConfigSort, + "WebServiceChartConfigTableConfig": WebServiceChartConfigTableConfig, + "WebServiceChartConfigTimeRangeOverride": WebServiceChartConfigTimeRangeOverride, + "WebServiceChartConfigValueConfig": WebServiceChartConfigValueConfig, + "WebServiceChartConfigYAxisConfig": WebServiceChartConfigYAxisConfig, + "WebServiceDashboard": WebServiceDashboard, + "WebServiceDashboardExtra": WebServiceDashboardExtra, + "WebServiceDashboardExtraTemplateVariable": WebServiceDashboardExtraTemplateVariable, + "WebServiceDashboardExtraTemplateView": WebServiceDashboardExtraTemplateView, + "WebServiceDashboardLayouts": WebServiceDashboardLayouts, + "WebServiceDashboardLayoutsLayout": WebServiceDashboardLayoutsLayout, + "WebServiceDashboardResponsiveLayouts": WebServiceDashboardResponsiveLayouts, + "WebServiceDashboardSharing": WebServiceDashboardSharing, + "WebServiceEventLogsConfig": WebServiceEventLogsConfig, + "WebServiceEventLogsConfigTimeRangeOverride": WebServiceEventLogsConfigTimeRangeOverride, + "WebServiceExportDashboardResponse": WebServiceExportDashboardResponse, + "WebServiceGetDashboardResponse": WebServiceGetDashboardResponse, + "WebServiceGetProjectListResponse": WebServiceGetProjectListResponse, + "WebServiceGetProjectResponse": WebServiceGetProjectResponse, + "WebServiceImportDashboardRequest": WebServiceImportDashboardRequest, + "WebServiceImportDashboardResponse": WebServiceImportDashboardResponse, + "WebServiceNote": WebServiceNote, + "WebServicePanel": WebServicePanel, +} + +type MimeTypeDescriptor = { + type: string; + subtype: string; + subtypeTokens: string[]; +}; + +/** + * Every mime-type consists of a type, subtype, and optional parameters. + * The subtype can be composite, including information about the content format. + * For example: `application/json-patch+json`, `application/merge-patch+json`. + * + * This helper transforms a string mime-type into an internal representation. + * This simplifies the implementation of predicates that in turn define common rules for parsing or stringifying + * the payload. + */ +const parseMimeType = (mimeType: string): MimeTypeDescriptor => { + const [type, subtype] = mimeType.split('/'); + return { + type, + subtype, + subtypeTokens: subtype.split('+'), + }; +}; + +type MimeTypePredicate = (mimeType: string) => boolean; + +// This factory creates a predicate function that checks a string mime-type against defined rules. +const mimeTypePredicateFactory = (predicate: (descriptor: MimeTypeDescriptor) => boolean): MimeTypePredicate => (mimeType) => predicate(parseMimeType(mimeType)); + +// Use this factory when you need to define a simple predicate based only on type and, if applicable, subtype. +const mimeTypeSimplePredicateFactory = (type: string, subtype?: string): MimeTypePredicate => mimeTypePredicateFactory((descriptor) => { + if (descriptor.type !== type) return false; + if (subtype != null && descriptor.subtype !== subtype) return false; + return true; +}); + +// Creating a set of named predicates that will help us determine how to handle different mime-types +const isTextLikeMimeType = mimeTypeSimplePredicateFactory('text'); +const isJsonMimeType = mimeTypeSimplePredicateFactory('application', 'json'); +const isJsonLikeMimeType = mimeTypePredicateFactory((descriptor) => descriptor.type === 'application' && descriptor.subtypeTokens.some((item) => item === 'json')); +const isOctetStreamMimeType = mimeTypeSimplePredicateFactory('application', 'octet-stream'); +const isFormUrlencodedMimeType = mimeTypeSimplePredicateFactory('application', 'x-www-form-urlencoded'); + +// Defining a list of mime-types in the order of prioritization for handling. +const supportedMimeTypePredicatesWithPriority: MimeTypePredicate[] = [ + isJsonMimeType, + isJsonLikeMimeType, + isTextLikeMimeType, + isOctetStreamMimeType, + isFormUrlencodedMimeType, +]; + +const nullableSuffix = " | null"; +const optionalSuffix = " | undefined"; +const arrayPrefix = "Array<"; +const arraySuffix = ">"; +const mapPrefix = "{ [key: string]: "; +const mapSuffix = "; }"; + +export class ObjectSerializer { + public static findCorrectType(data: any, expectedType: string) { + if (data == undefined) { + return expectedType; + } else if (primitives.indexOf(expectedType.toLowerCase()) !== -1) { + return expectedType; + } else if (expectedType === "Date") { + return expectedType; + } else { + if (enumsMap.has(expectedType)) { + return expectedType; + } + + if (!typeMap[expectedType]) { + return expectedType; // w/e we don't know the type + } + + // Check the discriminator + let discriminatorProperty = typeMap[expectedType].discriminator; + if (discriminatorProperty == null) { + return expectedType; // the type does not have a discriminator. use it. + } else { + if (data[discriminatorProperty]) { + var discriminatorType = data[discriminatorProperty]; + let mapping = typeMap[expectedType].mapping; + if (mapping != undefined && mapping[discriminatorType]) { + return mapping[discriminatorType]; // use the type given in the discriminator + } else if(typeMap[discriminatorType]) { + return discriminatorType; + } else { + return expectedType; // discriminator did not map to a type + } + } else { + return expectedType; // discriminator was not present (or an empty string) + } + } + } + } + + public static serialize(data: any, type: string, format: string): any { + if (data == undefined) { + return data; + } else if (primitives.indexOf(type.toLowerCase()) !== -1) { + return data; + } else if (type.endsWith(nullableSuffix)) { + let subType: string = type.slice(0, -nullableSuffix.length); // Type | null => Type + return ObjectSerializer.serialize(data, subType, format); + } else if (type.endsWith(optionalSuffix)) { + let subType: string = type.slice(0, -optionalSuffix.length); // Type | undefined => Type + return ObjectSerializer.serialize(data, subType, format); + } else if (type.startsWith(arrayPrefix)) { + let subType: string = type.slice(arrayPrefix.length, -arraySuffix.length); // Array => Type + let transformedData: any[] = []; + for (let date of data) { + transformedData.push(ObjectSerializer.serialize(date, subType, format)); + } + return transformedData; + } else if (type.startsWith(mapPrefix)) { + let subType: string = type.slice(mapPrefix.length, -mapSuffix.length); // { [key: string]: Type; } => Type + let transformedData: { [key: string]: any } = {}; + for (let key in data) { + transformedData[key] = ObjectSerializer.serialize( + data[key], + subType, + format, + ); + } + return transformedData; + } else if (type === "Date") { + if (format == "date") { + let month = data.getMonth()+1 + month = month < 10 ? "0" + month.toString() : month.toString() + let day = data.getDate(); + day = day < 10 ? "0" + day.toString() : day.toString(); + + return data.getFullYear() + "-" + month + "-" + day; + } else { + return data.toISOString(); + } + } else { + if (enumsMap.has(type)) { + return data; + } + if (!typeMap[type]) { // in case we dont know the type + return data; + } + + // Get the actual type of this object + type = this.findCorrectType(data, type); + + // get the map for the correct type. + let attributeTypes = typeMap[type].getAttributeTypeMap(); + let instance: {[index: string]: any} = {}; + for (let attributeType of attributeTypes) { + instance[attributeType.baseName] = ObjectSerializer.serialize(data[attributeType.name], attributeType.type, attributeType.format); + } + return instance; + } + } + + public static deserialize(data: any, type: string, format: string): any { + // polymorphism may change the actual type. + type = ObjectSerializer.findCorrectType(data, type); + if (data == undefined) { + return data; + } else if (primitives.indexOf(type.toLowerCase()) !== -1) { + return data; + } else if (type.endsWith(nullableSuffix)) { + let subType: string = type.slice(0, -nullableSuffix.length); // Type | null => Type + return ObjectSerializer.deserialize(data, subType, format); + } else if (type.endsWith(optionalSuffix)) { + let subType: string = type.slice(0, -optionalSuffix.length); // Type | undefined => Type + return ObjectSerializer.deserialize(data, subType, format); + } else if (type.startsWith(arrayPrefix)) { + let subType: string = type.slice(arrayPrefix.length, -arraySuffix.length); // Array => Type + let transformedData: any[] = []; + for (let date of data) { + transformedData.push(ObjectSerializer.deserialize(date, subType, format)); + } + return transformedData; + } else if (type.startsWith(mapPrefix)) { + let subType: string = type.slice(mapPrefix.length, -mapSuffix.length); // { [key: string]: Type; } => Type + let transformedData: { [key: string]: any } = {}; + for (let key in data) { + transformedData[key] = ObjectSerializer.deserialize( + data[key], + subType, + format, + ); + } + return transformedData; + } else if (type === "Date") { + return new Date(data); + } else { + if (enumsMap.has(type)) {// is Enum + return data; + } + + if (!typeMap[type]) { // dont know the type + return data; + } + let instance = new typeMap[type](); + let attributeTypes = typeMap[type].getAttributeTypeMap(); + for (let attributeType of attributeTypes) { + let value = ObjectSerializer.deserialize(data[attributeType.baseName], attributeType.type, attributeType.format); + if (value !== undefined) { + instance[attributeType.name] = value; + } + } + return instance; + } + } + + + /** + * Normalize media type + * + * We currently do not handle any media types attributes, i.e. anything + * after a semicolon. All content is assumed to be UTF-8 compatible. + */ + public static normalizeMediaType(mediaType: string | undefined): string | undefined { + if (mediaType === undefined) { + return undefined; + } + return mediaType.split(";")[0].trim().toLowerCase(); + } + + /** + * From a list of possible media types, choose the one we can handle best. + * + * The order of the given media types does not have any impact on the choice + * made. + */ + public static getPreferredMediaType(mediaTypes: Array): string { + /** According to OAS 3 we should default to json */ + if (mediaTypes.length === 0) { + return "application/json"; + } + + const normalMediaTypes = mediaTypes.map(this.normalizeMediaType); + + for (const predicate of supportedMimeTypePredicatesWithPriority) { + for (const mediaType of normalMediaTypes) { + if (mediaType != null && predicate(mediaType)) { + return mediaType; + } + } + } + + throw new Error("None of the given media types are supported: " + mediaTypes.join(", ")); + } + + /** + * Convert data to a string according the given media type + */ + public static stringify(data: any, mediaType: string): string { + if (isTextLikeMimeType(mediaType)) { + return String(data); + } + + if (isJsonLikeMimeType(mediaType)) { + return JSON.stringify(data); + } + + throw new Error("The mediaType " + mediaType + " is not supported by ObjectSerializer.stringify."); + } + + /** + * Parse data from a string according to the given media type + */ + public static parse(rawData: string, mediaType: string | undefined) { + if (mediaType === undefined) { + throw new Error("Cannot parse content. No Content-Type defined."); + } + + if (isTextLikeMimeType(mediaType)) { + return rawData; + } + + if (isJsonLikeMimeType(mediaType)) { + return JSON.parse(rawData); + } + + throw new Error("The mediaType " + mediaType + " is not supported by ObjectSerializer.parse."); + } +} diff --git a/src/models/PriceServiceBatchGetPricesRequest.ts b/src/models/PriceServiceBatchGetPricesRequest.ts index 99b5819..10f7d18 100755 --- a/src/models/PriceServiceBatchGetPricesRequest.ts +++ b/src/models/PriceServiceBatchGetPricesRequest.ts @@ -1,10 +1,8 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Sentio API * Sentio Open API for query data * - * The version of the OpenAPI document: version not set + * OpenAPI spec version: version not set * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -12,70 +10,35 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime.js'; -import type { PriceServiceCoinID } from './PriceServiceCoinID.js'; -import { - PriceServiceCoinIDFromJSON, - PriceServiceCoinIDFromJSONTyped, - PriceServiceCoinIDToJSON, - PriceServiceCoinIDToJSONTyped, -} from './PriceServiceCoinID.js'; - -/** - * - * @export - * @interface PriceServiceBatchGetPricesRequest - */ -export interface PriceServiceBatchGetPricesRequest { - /** - * - * @type {Array} - * @memberof PriceServiceBatchGetPricesRequest - */ - timestamps?: Array; - /** - * - * @type {Array} - * @memberof PriceServiceBatchGetPricesRequest - */ - coinIds?: Array; -} - -/** - * Check if a given object implements the PriceServiceBatchGetPricesRequest interface. - */ -export function instanceOfPriceServiceBatchGetPricesRequest(value: object): value is PriceServiceBatchGetPricesRequest { - return true; -} - -export function PriceServiceBatchGetPricesRequestFromJSON(json: any): PriceServiceBatchGetPricesRequest { - return PriceServiceBatchGetPricesRequestFromJSONTyped(json, false); -} - -export function PriceServiceBatchGetPricesRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PriceServiceBatchGetPricesRequest { - if (json == null) { - return json; +import { PriceServiceCoinID } from '../models/PriceServiceCoinID.js'; +import { HttpFile } from '../http/http.js'; + +export class PriceServiceBatchGetPricesRequest { + 'timestamps'?: Array; + 'coinIds'?: Array; + + static readonly discriminator: string | undefined = undefined; + + static readonly mapping: {[index: string]: string} | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "timestamps", + "baseName": "timestamps", + "type": "Array", + "format": "date-time" + }, + { + "name": "coinIds", + "baseName": "coinIds", + "type": "Array", + "format": "" + } ]; + + static getAttributeTypeMap() { + return PriceServiceBatchGetPricesRequest.attributeTypeMap; } - return { - - 'timestamps': json['timestamps'] == null ? undefined : json['timestamps'], - 'coinIds': json['coinIds'] == null ? undefined : ((json['coinIds'] as Array).map(PriceServiceCoinIDFromJSON)), - }; -} - - export function PriceServiceBatchGetPricesRequestToJSON(json: any): PriceServiceBatchGetPricesRequest { - return PriceServiceBatchGetPricesRequestToJSONTyped(json, false); - } - export function PriceServiceBatchGetPricesRequestToJSONTyped(value?: PriceServiceBatchGetPricesRequest | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; + public constructor() { } - - return { - - 'timestamps': value['timestamps'], - 'coinIds': value['coinIds'] == null ? undefined : ((value['coinIds'] as Array).map(PriceServiceCoinIDToJSON)), - }; } - diff --git a/src/models/PriceServiceBatchGetPricesResponse.ts b/src/models/PriceServiceBatchGetPricesResponse.ts index 94f9804..bf897db 100755 --- a/src/models/PriceServiceBatchGetPricesResponse.ts +++ b/src/models/PriceServiceBatchGetPricesResponse.ts @@ -1,10 +1,8 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Sentio API * Sentio Open API for query data * - * The version of the OpenAPI document: version not set + * OpenAPI spec version: version not set * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -12,62 +10,28 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime.js'; -import type { PriceServiceBatchGetPricesResponseCoinPrice } from './PriceServiceBatchGetPricesResponseCoinPrice.js'; -import { - PriceServiceBatchGetPricesResponseCoinPriceFromJSON, - PriceServiceBatchGetPricesResponseCoinPriceFromJSONTyped, - PriceServiceBatchGetPricesResponseCoinPriceToJSON, - PriceServiceBatchGetPricesResponseCoinPriceToJSONTyped, -} from './PriceServiceBatchGetPricesResponseCoinPrice.js'; +import { PriceServiceBatchGetPricesResponseCoinPrice } from '../models/PriceServiceBatchGetPricesResponseCoinPrice.js'; +import { HttpFile } from '../http/http.js'; -/** - * - * @export - * @interface PriceServiceBatchGetPricesResponse - */ -export interface PriceServiceBatchGetPricesResponse { - /** - * - * @type {Array} - * @memberof PriceServiceBatchGetPricesResponse - */ - prices?: Array; -} +export class PriceServiceBatchGetPricesResponse { + 'prices'?: Array; -/** - * Check if a given object implements the PriceServiceBatchGetPricesResponse interface. - */ -export function instanceOfPriceServiceBatchGetPricesResponse(value: object): value is PriceServiceBatchGetPricesResponse { - return true; -} + static readonly discriminator: string | undefined = undefined; -export function PriceServiceBatchGetPricesResponseFromJSON(json: any): PriceServiceBatchGetPricesResponse { - return PriceServiceBatchGetPricesResponseFromJSONTyped(json, false); -} - -export function PriceServiceBatchGetPricesResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): PriceServiceBatchGetPricesResponse { - if (json == null) { - return json; - } - return { - - 'prices': json['prices'] == null ? undefined : ((json['prices'] as Array).map(PriceServiceBatchGetPricesResponseCoinPriceFromJSON)), - }; -} + static readonly mapping: {[index: string]: string} | undefined = undefined; - export function PriceServiceBatchGetPricesResponseToJSON(json: any): PriceServiceBatchGetPricesResponse { - return PriceServiceBatchGetPricesResponseToJSONTyped(json, false); - } + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "prices", + "baseName": "prices", + "type": "Array", + "format": "" + } ]; - export function PriceServiceBatchGetPricesResponseToJSONTyped(value?: PriceServiceBatchGetPricesResponse | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; + static getAttributeTypeMap() { + return PriceServiceBatchGetPricesResponse.attributeTypeMap; } - return { - - 'prices': value['prices'] == null ? undefined : ((value['prices'] as Array).map(PriceServiceBatchGetPricesResponseCoinPriceToJSON)), - }; + public constructor() { + } } - diff --git a/src/models/PriceServiceBatchGetPricesResponseCoinPrice.ts b/src/models/PriceServiceBatchGetPricesResponseCoinPrice.ts index 032c3ce..5bc5877 100755 --- a/src/models/PriceServiceBatchGetPricesResponseCoinPrice.ts +++ b/src/models/PriceServiceBatchGetPricesResponseCoinPrice.ts @@ -1,10 +1,8 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Sentio API * Sentio Open API for query data * - * The version of the OpenAPI document: version not set + * OpenAPI spec version: version not set * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -12,85 +10,43 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime.js'; -import type { PriceServiceCoinID } from './PriceServiceCoinID.js'; -import { - PriceServiceCoinIDFromJSON, - PriceServiceCoinIDFromJSONTyped, - PriceServiceCoinIDToJSON, - PriceServiceCoinIDToJSONTyped, -} from './PriceServiceCoinID.js'; -import type { PriceServiceBatchGetPricesResponseCoinPricePrice } from './PriceServiceBatchGetPricesResponseCoinPricePrice.js'; -import { - PriceServiceBatchGetPricesResponseCoinPricePriceFromJSON, - PriceServiceBatchGetPricesResponseCoinPricePriceFromJSONTyped, - PriceServiceBatchGetPricesResponseCoinPricePriceToJSON, - PriceServiceBatchGetPricesResponseCoinPricePriceToJSONTyped, -} from './PriceServiceBatchGetPricesResponseCoinPricePrice.js'; - -/** - * - * @export - * @interface PriceServiceBatchGetPricesResponseCoinPrice - */ -export interface PriceServiceBatchGetPricesResponseCoinPrice { - /** - * - * @type {PriceServiceCoinID} - * @memberof PriceServiceBatchGetPricesResponseCoinPrice - */ - coinId?: PriceServiceCoinID; - /** - * - * @type {PriceServiceBatchGetPricesResponseCoinPricePrice} - * @memberof PriceServiceBatchGetPricesResponseCoinPrice - */ - price?: PriceServiceBatchGetPricesResponseCoinPricePrice; - /** - * - * @type {string} - * @memberof PriceServiceBatchGetPricesResponseCoinPrice - */ - error?: string; -} - -/** - * Check if a given object implements the PriceServiceBatchGetPricesResponseCoinPrice interface. - */ -export function instanceOfPriceServiceBatchGetPricesResponseCoinPrice(value: object): value is PriceServiceBatchGetPricesResponseCoinPrice { - return true; -} - -export function PriceServiceBatchGetPricesResponseCoinPriceFromJSON(json: any): PriceServiceBatchGetPricesResponseCoinPrice { - return PriceServiceBatchGetPricesResponseCoinPriceFromJSONTyped(json, false); -} - -export function PriceServiceBatchGetPricesResponseCoinPriceFromJSONTyped(json: any, ignoreDiscriminator: boolean): PriceServiceBatchGetPricesResponseCoinPrice { - if (json == null) { - return json; +import { PriceServiceBatchGetPricesResponseCoinPricePrice } from '../models/PriceServiceBatchGetPricesResponseCoinPricePrice.js'; +import { PriceServiceCoinID } from '../models/PriceServiceCoinID.js'; +import { HttpFile } from '../http/http.js'; + +export class PriceServiceBatchGetPricesResponseCoinPrice { + 'coinId'?: PriceServiceCoinID; + 'price'?: PriceServiceBatchGetPricesResponseCoinPricePrice; + 'error'?: string; + + static readonly discriminator: string | undefined = undefined; + + static readonly mapping: {[index: string]: string} | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "coinId", + "baseName": "coinId", + "type": "PriceServiceCoinID", + "format": "" + }, + { + "name": "price", + "baseName": "price", + "type": "PriceServiceBatchGetPricesResponseCoinPricePrice", + "format": "" + }, + { + "name": "error", + "baseName": "error", + "type": "string", + "format": "" + } ]; + + static getAttributeTypeMap() { + return PriceServiceBatchGetPricesResponseCoinPrice.attributeTypeMap; } - return { - - 'coinId': json['coinId'] == null ? undefined : PriceServiceCoinIDFromJSON(json['coinId']), - 'price': json['price'] == null ? undefined : PriceServiceBatchGetPricesResponseCoinPricePriceFromJSON(json['price']), - 'error': json['error'] == null ? undefined : json['error'], - }; -} - - export function PriceServiceBatchGetPricesResponseCoinPriceToJSON(json: any): PriceServiceBatchGetPricesResponseCoinPrice { - return PriceServiceBatchGetPricesResponseCoinPriceToJSONTyped(json, false); - } - export function PriceServiceBatchGetPricesResponseCoinPriceToJSONTyped(value?: PriceServiceBatchGetPricesResponseCoinPrice | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; + public constructor() { } - - return { - - 'coinId': PriceServiceCoinIDToJSON(value['coinId']), - 'price': PriceServiceBatchGetPricesResponseCoinPricePriceToJSON(value['price']), - 'error': value['error'], - }; } - diff --git a/src/models/PriceServiceBatchGetPricesResponseCoinPricePrice.ts b/src/models/PriceServiceBatchGetPricesResponseCoinPricePrice.ts index 966d229..a5b06c6 100755 --- a/src/models/PriceServiceBatchGetPricesResponseCoinPricePrice.ts +++ b/src/models/PriceServiceBatchGetPricesResponseCoinPricePrice.ts @@ -1,10 +1,8 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Sentio API * Sentio Open API for query data * - * The version of the OpenAPI document: version not set + * OpenAPI spec version: version not set * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -12,62 +10,28 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime.js'; -import type { PriceServiceGetPriceResponse } from './PriceServiceGetPriceResponse.js'; -import { - PriceServiceGetPriceResponseFromJSON, - PriceServiceGetPriceResponseFromJSONTyped, - PriceServiceGetPriceResponseToJSON, - PriceServiceGetPriceResponseToJSONTyped, -} from './PriceServiceGetPriceResponse.js'; +import { PriceServiceGetPriceResponse } from '../models/PriceServiceGetPriceResponse.js'; +import { HttpFile } from '../http/http.js'; -/** - * - * @export - * @interface PriceServiceBatchGetPricesResponseCoinPricePrice - */ -export interface PriceServiceBatchGetPricesResponseCoinPricePrice { - /** - * - * @type {Array} - * @memberof PriceServiceBatchGetPricesResponseCoinPricePrice - */ - results?: Array; -} +export class PriceServiceBatchGetPricesResponseCoinPricePrice { + 'results'?: Array; -/** - * Check if a given object implements the PriceServiceBatchGetPricesResponseCoinPricePrice interface. - */ -export function instanceOfPriceServiceBatchGetPricesResponseCoinPricePrice(value: object): value is PriceServiceBatchGetPricesResponseCoinPricePrice { - return true; -} + static readonly discriminator: string | undefined = undefined; -export function PriceServiceBatchGetPricesResponseCoinPricePriceFromJSON(json: any): PriceServiceBatchGetPricesResponseCoinPricePrice { - return PriceServiceBatchGetPricesResponseCoinPricePriceFromJSONTyped(json, false); -} - -export function PriceServiceBatchGetPricesResponseCoinPricePriceFromJSONTyped(json: any, ignoreDiscriminator: boolean): PriceServiceBatchGetPricesResponseCoinPricePrice { - if (json == null) { - return json; - } - return { - - 'results': json['results'] == null ? undefined : ((json['results'] as Array).map(PriceServiceGetPriceResponseFromJSON)), - }; -} + static readonly mapping: {[index: string]: string} | undefined = undefined; - export function PriceServiceBatchGetPricesResponseCoinPricePriceToJSON(json: any): PriceServiceBatchGetPricesResponseCoinPricePrice { - return PriceServiceBatchGetPricesResponseCoinPricePriceToJSONTyped(json, false); - } + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "results", + "baseName": "results", + "type": "Array", + "format": "" + } ]; - export function PriceServiceBatchGetPricesResponseCoinPricePriceToJSONTyped(value?: PriceServiceBatchGetPricesResponseCoinPricePrice | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; + static getAttributeTypeMap() { + return PriceServiceBatchGetPricesResponseCoinPricePrice.attributeTypeMap; } - return { - - 'results': value['results'] == null ? undefined : ((value['results'] as Array).map(PriceServiceGetPriceResponseToJSON)), - }; + public constructor() { + } } - diff --git a/src/models/PriceServiceCheckLatestPriceResponse.ts b/src/models/PriceServiceCheckLatestPriceResponse.ts index 9856e90..a79f40b 100755 --- a/src/models/PriceServiceCheckLatestPriceResponse.ts +++ b/src/models/PriceServiceCheckLatestPriceResponse.ts @@ -1,10 +1,8 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Sentio API * Sentio Open API for query data * - * The version of the OpenAPI document: version not set + * OpenAPI spec version: version not set * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -12,70 +10,35 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime.js'; -import type { PriceServiceCheckLatestPriceResponseCoinPrice } from './PriceServiceCheckLatestPriceResponseCoinPrice.js'; -import { - PriceServiceCheckLatestPriceResponseCoinPriceFromJSON, - PriceServiceCheckLatestPriceResponseCoinPriceFromJSONTyped, - PriceServiceCheckLatestPriceResponseCoinPriceToJSON, - PriceServiceCheckLatestPriceResponseCoinPriceToJSONTyped, -} from './PriceServiceCheckLatestPriceResponseCoinPrice.js'; - -/** - * - * @export - * @interface PriceServiceCheckLatestPriceResponse - */ -export interface PriceServiceCheckLatestPriceResponse { - /** - * - * @type {Array} - * @memberof PriceServiceCheckLatestPriceResponse - */ - prices?: Array; - /** - * - * @type {PriceServiceCheckLatestPriceResponseCoinPrice} - * @memberof PriceServiceCheckLatestPriceResponse - */ - latestPrice?: PriceServiceCheckLatestPriceResponseCoinPrice; -} - -/** - * Check if a given object implements the PriceServiceCheckLatestPriceResponse interface. - */ -export function instanceOfPriceServiceCheckLatestPriceResponse(value: object): value is PriceServiceCheckLatestPriceResponse { - return true; -} - -export function PriceServiceCheckLatestPriceResponseFromJSON(json: any): PriceServiceCheckLatestPriceResponse { - return PriceServiceCheckLatestPriceResponseFromJSONTyped(json, false); -} - -export function PriceServiceCheckLatestPriceResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): PriceServiceCheckLatestPriceResponse { - if (json == null) { - return json; +import { PriceServiceCheckLatestPriceResponseCoinPrice } from '../models/PriceServiceCheckLatestPriceResponseCoinPrice.js'; +import { HttpFile } from '../http/http.js'; + +export class PriceServiceCheckLatestPriceResponse { + 'prices'?: Array; + 'latestPrice'?: PriceServiceCheckLatestPriceResponseCoinPrice; + + static readonly discriminator: string | undefined = undefined; + + static readonly mapping: {[index: string]: string} | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "prices", + "baseName": "prices", + "type": "Array", + "format": "" + }, + { + "name": "latestPrice", + "baseName": "latestPrice", + "type": "PriceServiceCheckLatestPriceResponseCoinPrice", + "format": "" + } ]; + + static getAttributeTypeMap() { + return PriceServiceCheckLatestPriceResponse.attributeTypeMap; } - return { - - 'prices': json['prices'] == null ? undefined : ((json['prices'] as Array).map(PriceServiceCheckLatestPriceResponseCoinPriceFromJSON)), - 'latestPrice': json['latestPrice'] == null ? undefined : PriceServiceCheckLatestPriceResponseCoinPriceFromJSON(json['latestPrice']), - }; -} - - export function PriceServiceCheckLatestPriceResponseToJSON(json: any): PriceServiceCheckLatestPriceResponse { - return PriceServiceCheckLatestPriceResponseToJSONTyped(json, false); - } - export function PriceServiceCheckLatestPriceResponseToJSONTyped(value?: PriceServiceCheckLatestPriceResponse | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; + public constructor() { } - - return { - - 'prices': value['prices'] == null ? undefined : ((value['prices'] as Array).map(PriceServiceCheckLatestPriceResponseCoinPriceToJSON)), - 'latestPrice': PriceServiceCheckLatestPriceResponseCoinPriceToJSON(value['latestPrice']), - }; } - diff --git a/src/models/PriceServiceCheckLatestPriceResponseCoinPrice.ts b/src/models/PriceServiceCheckLatestPriceResponseCoinPrice.ts index 3f0e408..20ee33b 100755 --- a/src/models/PriceServiceCheckLatestPriceResponseCoinPrice.ts +++ b/src/models/PriceServiceCheckLatestPriceResponseCoinPrice.ts @@ -1,10 +1,8 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Sentio API * Sentio Open API for query data * - * The version of the OpenAPI document: version not set + * OpenAPI spec version: version not set * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -12,78 +10,42 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime.js'; -import type { PriceServiceCoinID } from './PriceServiceCoinID.js'; -import { - PriceServiceCoinIDFromJSON, - PriceServiceCoinIDFromJSONTyped, - PriceServiceCoinIDToJSON, - PriceServiceCoinIDToJSONTyped, -} from './PriceServiceCoinID.js'; - -/** - * - * @export - * @interface PriceServiceCheckLatestPriceResponseCoinPrice - */ -export interface PriceServiceCheckLatestPriceResponseCoinPrice { - /** - * - * @type {PriceServiceCoinID} - * @memberof PriceServiceCheckLatestPriceResponseCoinPrice - */ - coinId?: PriceServiceCoinID; - /** - * - * @type {number} - * @memberof PriceServiceCheckLatestPriceResponseCoinPrice - */ - price?: number; - /** - * - * @type {Date} - * @memberof PriceServiceCheckLatestPriceResponseCoinPrice - */ - timestamp?: Date; -} - -/** - * Check if a given object implements the PriceServiceCheckLatestPriceResponseCoinPrice interface. - */ -export function instanceOfPriceServiceCheckLatestPriceResponseCoinPrice(value: object): value is PriceServiceCheckLatestPriceResponseCoinPrice { - return true; -} - -export function PriceServiceCheckLatestPriceResponseCoinPriceFromJSON(json: any): PriceServiceCheckLatestPriceResponseCoinPrice { - return PriceServiceCheckLatestPriceResponseCoinPriceFromJSONTyped(json, false); -} - -export function PriceServiceCheckLatestPriceResponseCoinPriceFromJSONTyped(json: any, ignoreDiscriminator: boolean): PriceServiceCheckLatestPriceResponseCoinPrice { - if (json == null) { - return json; +import { PriceServiceCoinID } from '../models/PriceServiceCoinID.js'; +import { HttpFile } from '../http/http.js'; + +export class PriceServiceCheckLatestPriceResponseCoinPrice { + 'coinId'?: PriceServiceCoinID; + 'price'?: number; + 'timestamp'?: Date; + + static readonly discriminator: string | undefined = undefined; + + static readonly mapping: {[index: string]: string} | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "coinId", + "baseName": "coinId", + "type": "PriceServiceCoinID", + "format": "" + }, + { + "name": "price", + "baseName": "price", + "type": "number", + "format": "double" + }, + { + "name": "timestamp", + "baseName": "timestamp", + "type": "Date", + "format": "date-time" + } ]; + + static getAttributeTypeMap() { + return PriceServiceCheckLatestPriceResponseCoinPrice.attributeTypeMap; } - return { - - 'coinId': json['coinId'] == null ? undefined : PriceServiceCoinIDFromJSON(json['coinId']), - 'price': json['price'] == null ? undefined : json['price'], - 'timestamp': json['timestamp'] == null ? undefined : (new Date(json['timestamp'])), - }; -} - - export function PriceServiceCheckLatestPriceResponseCoinPriceToJSON(json: any): PriceServiceCheckLatestPriceResponseCoinPrice { - return PriceServiceCheckLatestPriceResponseCoinPriceToJSONTyped(json, false); - } - export function PriceServiceCheckLatestPriceResponseCoinPriceToJSONTyped(value?: PriceServiceCheckLatestPriceResponseCoinPrice | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; + public constructor() { } - - return { - - 'coinId': PriceServiceCoinIDToJSON(value['coinId']), - 'price': value['price'], - 'timestamp': value['timestamp'] == null ? undefined : ((value['timestamp']).toISOString()), - }; } - diff --git a/src/models/PriceServiceCoinID.ts b/src/models/PriceServiceCoinID.ts index 1cdf2b6..8441ad8 100755 --- a/src/models/PriceServiceCoinID.ts +++ b/src/models/PriceServiceCoinID.ts @@ -1,10 +1,8 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Sentio API * Sentio Open API for query data * - * The version of the OpenAPI document: version not set + * OpenAPI spec version: version not set * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -12,70 +10,38 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime.js'; -import type { PriceServiceCoinIDAddressIdentifier } from './PriceServiceCoinIDAddressIdentifier.js'; -import { - PriceServiceCoinIDAddressIdentifierFromJSON, - PriceServiceCoinIDAddressIdentifierFromJSONTyped, - PriceServiceCoinIDAddressIdentifierToJSON, - PriceServiceCoinIDAddressIdentifierToJSONTyped, -} from './PriceServiceCoinIDAddressIdentifier.js'; +import { PriceServiceCoinIDAddressIdentifier } from '../models/PriceServiceCoinIDAddressIdentifier.js'; +import { HttpFile } from '../http/http.js'; /** - * The identifier of a coin. - * @export - * @interface PriceServiceCoinID - */ -export interface PriceServiceCoinID { - /** - * - * @type {string} - * @memberof PriceServiceCoinID - */ - symbol?: string; - /** - * - * @type {PriceServiceCoinIDAddressIdentifier} - * @memberof PriceServiceCoinID - */ - address?: PriceServiceCoinIDAddressIdentifier; -} - -/** - * Check if a given object implements the PriceServiceCoinID interface. - */ -export function instanceOfPriceServiceCoinID(value: object): value is PriceServiceCoinID { - return true; -} - -export function PriceServiceCoinIDFromJSON(json: any): PriceServiceCoinID { - return PriceServiceCoinIDFromJSONTyped(json, false); -} - -export function PriceServiceCoinIDFromJSONTyped(json: any, ignoreDiscriminator: boolean): PriceServiceCoinID { - if (json == null) { - return json; +* The identifier of a coin. +*/ +export class PriceServiceCoinID { + 'symbol'?: string; + 'address'?: PriceServiceCoinIDAddressIdentifier; + + static readonly discriminator: string | undefined = undefined; + + static readonly mapping: {[index: string]: string} | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "symbol", + "baseName": "symbol", + "type": "string", + "format": "" + }, + { + "name": "address", + "baseName": "address", + "type": "PriceServiceCoinIDAddressIdentifier", + "format": "" + } ]; + + static getAttributeTypeMap() { + return PriceServiceCoinID.attributeTypeMap; } - return { - - 'symbol': json['symbol'] == null ? undefined : json['symbol'], - 'address': json['address'] == null ? undefined : PriceServiceCoinIDAddressIdentifierFromJSON(json['address']), - }; -} - export function PriceServiceCoinIDToJSON(json: any): PriceServiceCoinID { - return PriceServiceCoinIDToJSONTyped(json, false); - } - - export function PriceServiceCoinIDToJSONTyped(value?: PriceServiceCoinID | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; + public constructor() { } - - return { - - 'symbol': value['symbol'], - 'address': PriceServiceCoinIDAddressIdentifierToJSON(value['address']), - }; } - diff --git a/src/models/PriceServiceCoinIDAddressIdentifier.ts b/src/models/PriceServiceCoinIDAddressIdentifier.ts index ce72d50..451cf2f 100755 --- a/src/models/PriceServiceCoinIDAddressIdentifier.ts +++ b/src/models/PriceServiceCoinIDAddressIdentifier.ts @@ -1,10 +1,8 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Sentio API * Sentio Open API for query data * - * The version of the OpenAPI document: version not set + * OpenAPI spec version: version not set * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -12,63 +10,37 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime.js'; -/** - * The coin can be defined as a symbol, e.g. BTC, ETH, etc, or an address + chain. - * The format of the chain is consistent with the Sentio internal representation. - * @export - * @interface PriceServiceCoinIDAddressIdentifier - */ -export interface PriceServiceCoinIDAddressIdentifier { - /** - * - * @type {string} - * @memberof PriceServiceCoinIDAddressIdentifier - */ - address?: string; - /** - * - * @type {string} - * @memberof PriceServiceCoinIDAddressIdentifier - */ - chain?: string; -} +import { HttpFile } from '../http/http.js'; /** - * Check if a given object implements the PriceServiceCoinIDAddressIdentifier interface. - */ -export function instanceOfPriceServiceCoinIDAddressIdentifier(value: object): value is PriceServiceCoinIDAddressIdentifier { - return true; -} - -export function PriceServiceCoinIDAddressIdentifierFromJSON(json: any): PriceServiceCoinIDAddressIdentifier { - return PriceServiceCoinIDAddressIdentifierFromJSONTyped(json, false); -} - -export function PriceServiceCoinIDAddressIdentifierFromJSONTyped(json: any, ignoreDiscriminator: boolean): PriceServiceCoinIDAddressIdentifier { - if (json == null) { - return json; +* The coin can be defined as a symbol, e.g. BTC, ETH, etc, or an address + chain. The format of the chain is consistent with the Sentio internal representation. +*/ +export class PriceServiceCoinIDAddressIdentifier { + 'address'?: string; + 'chain'?: string; + + static readonly discriminator: string | undefined = undefined; + + static readonly mapping: {[index: string]: string} | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "address", + "baseName": "address", + "type": "string", + "format": "" + }, + { + "name": "chain", + "baseName": "chain", + "type": "string", + "format": "" + } ]; + + static getAttributeTypeMap() { + return PriceServiceCoinIDAddressIdentifier.attributeTypeMap; } - return { - - 'address': json['address'] == null ? undefined : json['address'], - 'chain': json['chain'] == null ? undefined : json['chain'], - }; -} - export function PriceServiceCoinIDAddressIdentifierToJSON(json: any): PriceServiceCoinIDAddressIdentifier { - return PriceServiceCoinIDAddressIdentifierToJSONTyped(json, false); - } - - export function PriceServiceCoinIDAddressIdentifierToJSONTyped(value?: PriceServiceCoinIDAddressIdentifier | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; + public constructor() { } - - return { - - 'address': value['address'], - 'chain': value['chain'], - }; } - diff --git a/src/models/PriceServiceGetPriceResponse.ts b/src/models/PriceServiceGetPriceResponse.ts index d3a721c..bd72b67 100755 --- a/src/models/PriceServiceGetPriceResponse.ts +++ b/src/models/PriceServiceGetPriceResponse.ts @@ -1,10 +1,8 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Sentio API * Sentio Open API for query data * - * The version of the OpenAPI document: version not set + * OpenAPI spec version: version not set * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -12,62 +10,43 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime.js'; +import { HttpFile } from '../http/http.js'; + /** - * GetPriceResponse is the response for GetPrice. - * @export - * @interface PriceServiceGetPriceResponse - */ -export interface PriceServiceGetPriceResponse { +* GetPriceResponse is the response for GetPrice. +*/ +export class PriceServiceGetPriceResponse { /** - * Price in USD. - * @type {number} - * @memberof PriceServiceGetPriceResponse - */ - price?: number; + * Price in USD. + */ + 'price'?: number; /** - * The actual timestamp of the price returned. - * @type {Date} - * @memberof PriceServiceGetPriceResponse - */ - timestamp?: Date; -} - -/** - * Check if a given object implements the PriceServiceGetPriceResponse interface. - */ -export function instanceOfPriceServiceGetPriceResponse(value: object): value is PriceServiceGetPriceResponse { - return true; -} - -export function PriceServiceGetPriceResponseFromJSON(json: any): PriceServiceGetPriceResponse { - return PriceServiceGetPriceResponseFromJSONTyped(json, false); -} - -export function PriceServiceGetPriceResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): PriceServiceGetPriceResponse { - if (json == null) { - return json; + * The actual timestamp of the price returned. + */ + 'timestamp'?: Date; + + static readonly discriminator: string | undefined = undefined; + + static readonly mapping: {[index: string]: string} | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "price", + "baseName": "price", + "type": "number", + "format": "double" + }, + { + "name": "timestamp", + "baseName": "timestamp", + "type": "Date", + "format": "date-time" + } ]; + + static getAttributeTypeMap() { + return PriceServiceGetPriceResponse.attributeTypeMap; } - return { - - 'price': json['price'] == null ? undefined : json['price'], - 'timestamp': json['timestamp'] == null ? undefined : (new Date(json['timestamp'])), - }; -} - export function PriceServiceGetPriceResponseToJSON(json: any): PriceServiceGetPriceResponse { - return PriceServiceGetPriceResponseToJSONTyped(json, false); - } - - export function PriceServiceGetPriceResponseToJSONTyped(value?: PriceServiceGetPriceResponse | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; + public constructor() { } - - return { - - 'price': value['price'], - 'timestamp': value['timestamp'] == null ? undefined : ((value['timestamp']).toISOString()), - }; } - diff --git a/src/models/PriceServiceListCoinsResponse.ts b/src/models/PriceServiceListCoinsResponse.ts index ad5ab44..e7bb1b2 100755 --- a/src/models/PriceServiceListCoinsResponse.ts +++ b/src/models/PriceServiceListCoinsResponse.ts @@ -1,10 +1,8 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Sentio API * Sentio Open API for query data * - * The version of the OpenAPI document: version not set + * OpenAPI spec version: version not set * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -12,70 +10,35 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime.js'; -import type { PriceServiceCoinID } from './PriceServiceCoinID.js'; -import { - PriceServiceCoinIDFromJSON, - PriceServiceCoinIDFromJSONTyped, - PriceServiceCoinIDToJSON, - PriceServiceCoinIDToJSONTyped, -} from './PriceServiceCoinID.js'; - -/** - * - * @export - * @interface PriceServiceListCoinsResponse - */ -export interface PriceServiceListCoinsResponse { - /** - * - * @type {Array} - * @memberof PriceServiceListCoinsResponse - */ - coins?: Array; - /** - * - * @type {{ [key: string]: PriceServiceCoinID; }} - * @memberof PriceServiceListCoinsResponse - */ - coinAddressesInChain?: { [key: string]: PriceServiceCoinID; }; -} - -/** - * Check if a given object implements the PriceServiceListCoinsResponse interface. - */ -export function instanceOfPriceServiceListCoinsResponse(value: object): value is PriceServiceListCoinsResponse { - return true; -} - -export function PriceServiceListCoinsResponseFromJSON(json: any): PriceServiceListCoinsResponse { - return PriceServiceListCoinsResponseFromJSONTyped(json, false); -} - -export function PriceServiceListCoinsResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): PriceServiceListCoinsResponse { - if (json == null) { - return json; +import { PriceServiceCoinID } from '../models/PriceServiceCoinID.js'; +import { HttpFile } from '../http/http.js'; + +export class PriceServiceListCoinsResponse { + 'coins'?: Array; + 'coinAddressesInChain'?: { [key: string]: PriceServiceCoinID; }; + + static readonly discriminator: string | undefined = undefined; + + static readonly mapping: {[index: string]: string} | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "coins", + "baseName": "coins", + "type": "Array", + "format": "" + }, + { + "name": "coinAddressesInChain", + "baseName": "coinAddressesInChain", + "type": "{ [key: string]: PriceServiceCoinID; }", + "format": "" + } ]; + + static getAttributeTypeMap() { + return PriceServiceListCoinsResponse.attributeTypeMap; } - return { - - 'coins': json['coins'] == null ? undefined : ((json['coins'] as Array).map(PriceServiceCoinIDFromJSON)), - 'coinAddressesInChain': json['coinAddressesInChain'] == null ? undefined : (mapValues(json['coinAddressesInChain'], PriceServiceCoinIDFromJSON)), - }; -} - - export function PriceServiceListCoinsResponseToJSON(json: any): PriceServiceListCoinsResponse { - return PriceServiceListCoinsResponseToJSONTyped(json, false); - } - export function PriceServiceListCoinsResponseToJSONTyped(value?: PriceServiceListCoinsResponse | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; + public constructor() { } - - return { - - 'coins': value['coins'] == null ? undefined : ((value['coins'] as Array).map(PriceServiceCoinIDToJSON)), - 'coinAddressesInChain': value['coinAddressesInChain'] == null ? undefined : (mapValues(value['coinAddressesInChain'], PriceServiceCoinIDToJSON)), - }; } - diff --git a/src/models/SolidityServiceBaseChainConfig.ts b/src/models/SolidityServiceBaseChainConfig.ts index 980fbb2..90bb197 100755 --- a/src/models/SolidityServiceBaseChainConfig.ts +++ b/src/models/SolidityServiceBaseChainConfig.ts @@ -1,10 +1,8 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Sentio API * Sentio Open API for query data * - * The version of the OpenAPI document: version not set + * OpenAPI spec version: version not set * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -12,112 +10,72 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime.js'; -import type { SolidityServiceSourceFetcherType } from './SolidityServiceSourceFetcherType.js'; -import { - SolidityServiceSourceFetcherTypeFromJSON, - SolidityServiceSourceFetcherTypeFromJSONTyped, - SolidityServiceSourceFetcherTypeToJSON, - SolidityServiceSourceFetcherTypeToJSONTyped, -} from './SolidityServiceSourceFetcherType.js'; +import { SolidityServiceSourceFetcherType } from '../models/SolidityServiceSourceFetcherType.js'; +import { HttpFile } from '../http/http.js'; -/** - * - * @export - * @interface SolidityServiceBaseChainConfig - */ -export interface SolidityServiceBaseChainConfig { - /** - * - * @type {string} - * @memberof SolidityServiceBaseChainConfig - */ - endpoint?: string; - /** - * - * @type {string} - * @memberof SolidityServiceBaseChainConfig - */ - debugEndpoint?: string; - /** - * - * @type {SolidityServiceSourceFetcherType} - * @memberof SolidityServiceBaseChainConfig - */ - sourceFetcherType?: SolidityServiceSourceFetcherType; - /** - * - * @type {string} - * @memberof SolidityServiceBaseChainConfig - */ - sourceFetcherEndpoint?: string; - /** - * - * @type {string} - * @memberof SolidityServiceBaseChainConfig - */ - sourceFetcherTimeout?: string; - /** - * - * @type {Array} - * @memberof SolidityServiceBaseChainConfig - */ - sourceFetcherApiKeys?: Array; - /** - * - * @type {string} - * @memberof SolidityServiceBaseChainConfig - */ - oklinkChainShortName?: string; -} +export class SolidityServiceBaseChainConfig { + 'endpoint'?: string; + 'debugEndpoint'?: string; + 'sourceFetcherType'?: SolidityServiceSourceFetcherType; + 'sourceFetcherEndpoint'?: string; + 'sourceFetcherTimeout'?: string; + 'sourceFetcherApiKeys'?: Array; + 'oklinkChainShortName'?: string; + static readonly discriminator: string | undefined = undefined; + static readonly mapping: {[index: string]: string} | undefined = undefined; -/** - * Check if a given object implements the SolidityServiceBaseChainConfig interface. - */ -export function instanceOfSolidityServiceBaseChainConfig(value: object): value is SolidityServiceBaseChainConfig { - return true; -} + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "endpoint", + "baseName": "endpoint", + "type": "string", + "format": "" + }, + { + "name": "debugEndpoint", + "baseName": "debugEndpoint", + "type": "string", + "format": "" + }, + { + "name": "sourceFetcherType", + "baseName": "sourceFetcherType", + "type": "SolidityServiceSourceFetcherType", + "format": "" + }, + { + "name": "sourceFetcherEndpoint", + "baseName": "sourceFetcherEndpoint", + "type": "string", + "format": "" + }, + { + "name": "sourceFetcherTimeout", + "baseName": "sourceFetcherTimeout", + "type": "string", + "format": "int64" + }, + { + "name": "sourceFetcherApiKeys", + "baseName": "sourceFetcherApiKeys", + "type": "Array", + "format": "" + }, + { + "name": "oklinkChainShortName", + "baseName": "oklinkChainShortName", + "type": "string", + "format": "" + } ]; -export function SolidityServiceBaseChainConfigFromJSON(json: any): SolidityServiceBaseChainConfig { - return SolidityServiceBaseChainConfigFromJSONTyped(json, false); -} - -export function SolidityServiceBaseChainConfigFromJSONTyped(json: any, ignoreDiscriminator: boolean): SolidityServiceBaseChainConfig { - if (json == null) { - return json; + static getAttributeTypeMap() { + return SolidityServiceBaseChainConfig.attributeTypeMap; } - return { - - 'endpoint': json['endpoint'] == null ? undefined : json['endpoint'], - 'debugEndpoint': json['debugEndpoint'] == null ? undefined : json['debugEndpoint'], - 'sourceFetcherType': json['sourceFetcherType'] == null ? undefined : SolidityServiceSourceFetcherTypeFromJSON(json['sourceFetcherType']), - 'sourceFetcherEndpoint': json['sourceFetcherEndpoint'] == null ? undefined : json['sourceFetcherEndpoint'], - 'sourceFetcherTimeout': json['sourceFetcherTimeout'] == null ? undefined : json['sourceFetcherTimeout'], - 'sourceFetcherApiKeys': json['sourceFetcherApiKeys'] == null ? undefined : json['sourceFetcherApiKeys'], - 'oklinkChainShortName': json['oklinkChainShortName'] == null ? undefined : json['oklinkChainShortName'], - }; -} - export function SolidityServiceBaseChainConfigToJSON(json: any): SolidityServiceBaseChainConfig { - return SolidityServiceBaseChainConfigToJSONTyped(json, false); - } - - export function SolidityServiceBaseChainConfigToJSONTyped(value?: SolidityServiceBaseChainConfig | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; + public constructor() { } - - return { - - 'endpoint': value['endpoint'], - 'debugEndpoint': value['debugEndpoint'], - 'sourceFetcherType': SolidityServiceSourceFetcherTypeToJSON(value['sourceFetcherType']), - 'sourceFetcherEndpoint': value['sourceFetcherEndpoint'], - 'sourceFetcherTimeout': value['sourceFetcherTimeout'], - 'sourceFetcherApiKeys': value['sourceFetcherApiKeys'], - 'oklinkChainShortName': value['oklinkChainShortName'], - }; } + diff --git a/src/models/SolidityServiceBlockOverrides.ts b/src/models/SolidityServiceBlockOverrides.ts index 9fa1927..f1ccfa2 100755 --- a/src/models/SolidityServiceBlockOverrides.ts +++ b/src/models/SolidityServiceBlockOverrides.ts @@ -1,10 +1,8 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Sentio API * Sentio Open API for query data * - * The version of the OpenAPI document: version not set + * OpenAPI spec version: version not set * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -12,94 +10,62 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime.js'; -/** - * - * @export - * @interface SolidityServiceBlockOverrides - */ -export interface SolidityServiceBlockOverrides { - /** - * - * @type {string} - * @memberof SolidityServiceBlockOverrides - */ - blockNumber?: string; - /** - * - * @type {string} - * @memberof SolidityServiceBlockOverrides - */ - timestamp?: string; - /** - * - * @type {string} - * @memberof SolidityServiceBlockOverrides - */ - gasLimit?: string; - /** - * - * @type {string} - * @memberof SolidityServiceBlockOverrides - */ - difficulty?: string; - /** - * - * @type {string} - * @memberof SolidityServiceBlockOverrides - */ - baseFee?: string; - /** - * - * @type {{ [key: string]: string; }} - * @memberof SolidityServiceBlockOverrides - */ - blockHash?: { [key: string]: string; }; -} +import { HttpFile } from '../http/http.js'; -/** - * Check if a given object implements the SolidityServiceBlockOverrides interface. - */ -export function instanceOfSolidityServiceBlockOverrides(value: object): value is SolidityServiceBlockOverrides { - return true; -} +export class SolidityServiceBlockOverrides { + 'blockNumber'?: string; + 'timestamp'?: string; + 'gasLimit'?: string; + 'difficulty'?: string; + 'baseFee'?: string; + 'blockHash'?: { [key: string]: string; }; -export function SolidityServiceBlockOverridesFromJSON(json: any): SolidityServiceBlockOverrides { - return SolidityServiceBlockOverridesFromJSONTyped(json, false); -} + static readonly discriminator: string | undefined = undefined; -export function SolidityServiceBlockOverridesFromJSONTyped(json: any, ignoreDiscriminator: boolean): SolidityServiceBlockOverrides { - if (json == null) { - return json; - } - return { - - 'blockNumber': json['blockNumber'] == null ? undefined : json['blockNumber'], - 'timestamp': json['timestamp'] == null ? undefined : json['timestamp'], - 'gasLimit': json['gasLimit'] == null ? undefined : json['gasLimit'], - 'difficulty': json['difficulty'] == null ? undefined : json['difficulty'], - 'baseFee': json['baseFee'] == null ? undefined : json['baseFee'], - 'blockHash': json['blockHash'] == null ? undefined : json['blockHash'], - }; -} + static readonly mapping: {[index: string]: string} | undefined = undefined; - export function SolidityServiceBlockOverridesToJSON(json: any): SolidityServiceBlockOverrides { - return SolidityServiceBlockOverridesToJSONTyped(json, false); - } + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "blockNumber", + "baseName": "blockNumber", + "type": "string", + "format": "" + }, + { + "name": "timestamp", + "baseName": "timestamp", + "type": "string", + "format": "" + }, + { + "name": "gasLimit", + "baseName": "gasLimit", + "type": "string", + "format": "" + }, + { + "name": "difficulty", + "baseName": "difficulty", + "type": "string", + "format": "" + }, + { + "name": "baseFee", + "baseName": "baseFee", + "type": "string", + "format": "" + }, + { + "name": "blockHash", + "baseName": "blockHash", + "type": "{ [key: string]: string; }", + "format": "" + } ]; - export function SolidityServiceBlockOverridesToJSONTyped(value?: SolidityServiceBlockOverrides | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; + static getAttributeTypeMap() { + return SolidityServiceBlockOverrides.attributeTypeMap; } - return { - - 'blockNumber': value['blockNumber'], - 'timestamp': value['timestamp'], - 'gasLimit': value['gasLimit'], - 'difficulty': value['difficulty'], - 'baseFee': value['baseFee'], - 'blockHash': value['blockHash'], - }; + public constructor() { + } } - diff --git a/src/models/SolidityServiceChainIdentifier.ts b/src/models/SolidityServiceChainIdentifier.ts index 6c65952..07fcc38 100755 --- a/src/models/SolidityServiceChainIdentifier.ts +++ b/src/models/SolidityServiceChainIdentifier.ts @@ -1,10 +1,8 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Sentio API * Sentio Open API for query data * - * The version of the OpenAPI document: version not set + * OpenAPI spec version: version not set * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -12,62 +10,34 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime.js'; -/** - * - * @export - * @interface SolidityServiceChainIdentifier - */ -export interface SolidityServiceChainIdentifier { - /** - * - * @type {string} - * @memberof SolidityServiceChainIdentifier - */ - chainId?: string; - /** - * - * @type {string} - * @memberof SolidityServiceChainIdentifier - */ - forkId?: string; -} +import { HttpFile } from '../http/http.js'; -/** - * Check if a given object implements the SolidityServiceChainIdentifier interface. - */ -export function instanceOfSolidityServiceChainIdentifier(value: object): value is SolidityServiceChainIdentifier { - return true; -} +export class SolidityServiceChainIdentifier { + 'chainId'?: string; + 'forkId'?: string; -export function SolidityServiceChainIdentifierFromJSON(json: any): SolidityServiceChainIdentifier { - return SolidityServiceChainIdentifierFromJSONTyped(json, false); -} + static readonly discriminator: string | undefined = undefined; -export function SolidityServiceChainIdentifierFromJSONTyped(json: any, ignoreDiscriminator: boolean): SolidityServiceChainIdentifier { - if (json == null) { - return json; - } - return { - - 'chainId': json['chainId'] == null ? undefined : json['chainId'], - 'forkId': json['forkId'] == null ? undefined : json['forkId'], - }; -} + static readonly mapping: {[index: string]: string} | undefined = undefined; - export function SolidityServiceChainIdentifierToJSON(json: any): SolidityServiceChainIdentifier { - return SolidityServiceChainIdentifierToJSONTyped(json, false); - } + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "chainId", + "baseName": "chainId", + "type": "string", + "format": "" + }, + { + "name": "forkId", + "baseName": "forkId", + "type": "string", + "format": "" + } ]; - export function SolidityServiceChainIdentifierToJSONTyped(value?: SolidityServiceChainIdentifier | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; + static getAttributeTypeMap() { + return SolidityServiceChainIdentifier.attributeTypeMap; } - return { - - 'chainId': value['chainId'], - 'forkId': value['forkId'], - }; + public constructor() { + } } - diff --git a/src/models/SolidityServiceCompileSourceInternalResponse.ts b/src/models/SolidityServiceCompileSourceInternalResponse.ts index 48ed280..73059da 100755 --- a/src/models/SolidityServiceCompileSourceInternalResponse.ts +++ b/src/models/SolidityServiceCompileSourceInternalResponse.ts @@ -1,10 +1,8 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Sentio API * Sentio Open API for query data * - * The version of the OpenAPI document: version not set + * OpenAPI spec version: version not set * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -12,62 +10,28 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime.js'; -import type { SolidityServiceFailure } from './SolidityServiceFailure.js'; -import { - SolidityServiceFailureFromJSON, - SolidityServiceFailureFromJSONTyped, - SolidityServiceFailureToJSON, - SolidityServiceFailureToJSONTyped, -} from './SolidityServiceFailure.js'; +import { SolidityServiceFailure } from '../models/SolidityServiceFailure.js'; +import { HttpFile } from '../http/http.js'; -/** - * - * @export - * @interface SolidityServiceCompileSourceInternalResponse - */ -export interface SolidityServiceCompileSourceInternalResponse { - /** - * - * @type {SolidityServiceFailure} - * @memberof SolidityServiceCompileSourceInternalResponse - */ - failure?: SolidityServiceFailure; -} +export class SolidityServiceCompileSourceInternalResponse { + 'failure'?: SolidityServiceFailure; -/** - * Check if a given object implements the SolidityServiceCompileSourceInternalResponse interface. - */ -export function instanceOfSolidityServiceCompileSourceInternalResponse(value: object): value is SolidityServiceCompileSourceInternalResponse { - return true; -} + static readonly discriminator: string | undefined = undefined; -export function SolidityServiceCompileSourceInternalResponseFromJSON(json: any): SolidityServiceCompileSourceInternalResponse { - return SolidityServiceCompileSourceInternalResponseFromJSONTyped(json, false); -} - -export function SolidityServiceCompileSourceInternalResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): SolidityServiceCompileSourceInternalResponse { - if (json == null) { - return json; - } - return { - - 'failure': json['failure'] == null ? undefined : SolidityServiceFailureFromJSON(json['failure']), - }; -} + static readonly mapping: {[index: string]: string} | undefined = undefined; - export function SolidityServiceCompileSourceInternalResponseToJSON(json: any): SolidityServiceCompileSourceInternalResponse { - return SolidityServiceCompileSourceInternalResponseToJSONTyped(json, false); - } + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "failure", + "baseName": "failure", + "type": "SolidityServiceFailure", + "format": "" + } ]; - export function SolidityServiceCompileSourceInternalResponseToJSONTyped(value?: SolidityServiceCompileSourceInternalResponse | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; + static getAttributeTypeMap() { + return SolidityServiceCompileSourceInternalResponse.attributeTypeMap; } - return { - - 'failure': SolidityServiceFailureToJSON(value['failure']), - }; + public constructor() { + } } - diff --git a/src/models/SolidityServiceCompilerOptions.ts b/src/models/SolidityServiceCompilerOptions.ts index 936a427..0dea5ef 100755 --- a/src/models/SolidityServiceCompilerOptions.ts +++ b/src/models/SolidityServiceCompilerOptions.ts @@ -1,10 +1,8 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Sentio API * Sentio Open API for query data * - * The version of the OpenAPI document: version not set + * OpenAPI spec version: version not set * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -12,93 +10,50 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime.js'; -import type { SolidityServiceSettings } from './SolidityServiceSettings.js'; -import { - SolidityServiceSettingsFromJSON, - SolidityServiceSettingsFromJSONTyped, - SolidityServiceSettingsToJSON, - SolidityServiceSettingsToJSONTyped, -} from './SolidityServiceSettings.js'; -import type { SolidityServiceSpecializations } from './SolidityServiceSpecializations.js'; -import { - SolidityServiceSpecializationsFromJSON, - SolidityServiceSpecializationsFromJSONTyped, - SolidityServiceSpecializationsToJSON, - SolidityServiceSpecializationsToJSONTyped, -} from './SolidityServiceSpecializations.js'; - -/** - * - * @export - * @interface SolidityServiceCompilerOptions - */ -export interface SolidityServiceCompilerOptions { - /** - * - * @type {string} - * @memberof SolidityServiceCompilerOptions - */ - language?: string; - /** - * - * @type {string} - * @memberof SolidityServiceCompilerOptions - */ - version?: string; - /** - * - * @type {SolidityServiceSettings} - * @memberof SolidityServiceCompilerOptions - */ - settings?: SolidityServiceSettings; - /** - * - * @type {SolidityServiceSpecializations} - * @memberof SolidityServiceCompilerOptions - */ - specializations?: SolidityServiceSpecializations; -} - -/** - * Check if a given object implements the SolidityServiceCompilerOptions interface. - */ -export function instanceOfSolidityServiceCompilerOptions(value: object): value is SolidityServiceCompilerOptions { - return true; -} - -export function SolidityServiceCompilerOptionsFromJSON(json: any): SolidityServiceCompilerOptions { - return SolidityServiceCompilerOptionsFromJSONTyped(json, false); -} - -export function SolidityServiceCompilerOptionsFromJSONTyped(json: any, ignoreDiscriminator: boolean): SolidityServiceCompilerOptions { - if (json == null) { - return json; +import { SolidityServiceSettings } from '../models/SolidityServiceSettings.js'; +import { SolidityServiceSpecializations } from '../models/SolidityServiceSpecializations.js'; +import { HttpFile } from '../http/http.js'; + +export class SolidityServiceCompilerOptions { + 'language'?: string; + 'version'?: string; + 'settings'?: SolidityServiceSettings; + 'specializations'?: SolidityServiceSpecializations; + + static readonly discriminator: string | undefined = undefined; + + static readonly mapping: {[index: string]: string} | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "language", + "baseName": "language", + "type": "string", + "format": "" + }, + { + "name": "version", + "baseName": "version", + "type": "string", + "format": "" + }, + { + "name": "settings", + "baseName": "settings", + "type": "SolidityServiceSettings", + "format": "" + }, + { + "name": "specializations", + "baseName": "specializations", + "type": "SolidityServiceSpecializations", + "format": "" + } ]; + + static getAttributeTypeMap() { + return SolidityServiceCompilerOptions.attributeTypeMap; } - return { - - 'language': json['language'] == null ? undefined : json['language'], - 'version': json['version'] == null ? undefined : json['version'], - 'settings': json['settings'] == null ? undefined : SolidityServiceSettingsFromJSON(json['settings']), - 'specializations': json['specializations'] == null ? undefined : SolidityServiceSpecializationsFromJSON(json['specializations']), - }; -} - - export function SolidityServiceCompilerOptionsToJSON(json: any): SolidityServiceCompilerOptions { - return SolidityServiceCompilerOptionsToJSONTyped(json, false); - } - export function SolidityServiceCompilerOptionsToJSONTyped(value?: SolidityServiceCompilerOptions | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; + public constructor() { } - - return { - - 'language': value['language'], - 'version': value['version'], - 'settings': SolidityServiceSettingsToJSON(value['settings']), - 'specializations': SolidityServiceSpecializationsToJSON(value['specializations']), - }; } - diff --git a/src/models/SolidityServiceContractKeyInfo.ts b/src/models/SolidityServiceContractKeyInfo.ts index 8e4130e..19d9940 100755 --- a/src/models/SolidityServiceContractKeyInfo.ts +++ b/src/models/SolidityServiceContractKeyInfo.ts @@ -1,10 +1,8 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Sentio API * Sentio Open API for query data * - * The version of the OpenAPI document: version not set + * OpenAPI spec version: version not set * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -12,62 +10,34 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime.js'; -/** - * - * @export - * @interface SolidityServiceContractKeyInfo - */ -export interface SolidityServiceContractKeyInfo { - /** - * - * @type {string} - * @memberof SolidityServiceContractKeyInfo - */ - preprocessKey?: string; - /** - * - * @type {string} - * @memberof SolidityServiceContractKeyInfo - */ - compilationKey?: string; -} +import { HttpFile } from '../http/http.js'; -/** - * Check if a given object implements the SolidityServiceContractKeyInfo interface. - */ -export function instanceOfSolidityServiceContractKeyInfo(value: object): value is SolidityServiceContractKeyInfo { - return true; -} +export class SolidityServiceContractKeyInfo { + 'preprocessKey'?: string; + 'compilationKey'?: string; -export function SolidityServiceContractKeyInfoFromJSON(json: any): SolidityServiceContractKeyInfo { - return SolidityServiceContractKeyInfoFromJSONTyped(json, false); -} + static readonly discriminator: string | undefined = undefined; -export function SolidityServiceContractKeyInfoFromJSONTyped(json: any, ignoreDiscriminator: boolean): SolidityServiceContractKeyInfo { - if (json == null) { - return json; - } - return { - - 'preprocessKey': json['preprocessKey'] == null ? undefined : json['preprocessKey'], - 'compilationKey': json['compilationKey'] == null ? undefined : json['compilationKey'], - }; -} + static readonly mapping: {[index: string]: string} | undefined = undefined; - export function SolidityServiceContractKeyInfoToJSON(json: any): SolidityServiceContractKeyInfo { - return SolidityServiceContractKeyInfoToJSONTyped(json, false); - } + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "preprocessKey", + "baseName": "preprocessKey", + "type": "string", + "format": "" + }, + { + "name": "compilationKey", + "baseName": "compilationKey", + "type": "string", + "format": "" + } ]; - export function SolidityServiceContractKeyInfoToJSONTyped(value?: SolidityServiceContractKeyInfo | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; + static getAttributeTypeMap() { + return SolidityServiceContractKeyInfo.attributeTypeMap; } - return { - - 'preprocessKey': value['preprocessKey'], - 'compilationKey': value['compilationKey'], - }; + public constructor() { + } } - diff --git a/src/models/SolidityServiceCreateForkResponse.ts b/src/models/SolidityServiceCreateForkResponse.ts index f983b6f..c22330a 100755 --- a/src/models/SolidityServiceCreateForkResponse.ts +++ b/src/models/SolidityServiceCreateForkResponse.ts @@ -1,10 +1,8 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Sentio API * Sentio Open API for query data * - * The version of the OpenAPI document: version not set + * OpenAPI spec version: version not set * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -12,62 +10,28 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime.js'; -import type { SolidityServiceFork } from './SolidityServiceFork.js'; -import { - SolidityServiceForkFromJSON, - SolidityServiceForkFromJSONTyped, - SolidityServiceForkToJSON, - SolidityServiceForkToJSONTyped, -} from './SolidityServiceFork.js'; +import { SolidityServiceFork } from '../models/SolidityServiceFork.js'; +import { HttpFile } from '../http/http.js'; -/** - * - * @export - * @interface SolidityServiceCreateForkResponse - */ -export interface SolidityServiceCreateForkResponse { - /** - * - * @type {SolidityServiceFork} - * @memberof SolidityServiceCreateForkResponse - */ - fork?: SolidityServiceFork; -} +export class SolidityServiceCreateForkResponse { + 'fork'?: SolidityServiceFork; -/** - * Check if a given object implements the SolidityServiceCreateForkResponse interface. - */ -export function instanceOfSolidityServiceCreateForkResponse(value: object): value is SolidityServiceCreateForkResponse { - return true; -} + static readonly discriminator: string | undefined = undefined; -export function SolidityServiceCreateForkResponseFromJSON(json: any): SolidityServiceCreateForkResponse { - return SolidityServiceCreateForkResponseFromJSONTyped(json, false); -} - -export function SolidityServiceCreateForkResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): SolidityServiceCreateForkResponse { - if (json == null) { - return json; - } - return { - - 'fork': json['fork'] == null ? undefined : SolidityServiceForkFromJSON(json['fork']), - }; -} + static readonly mapping: {[index: string]: string} | undefined = undefined; - export function SolidityServiceCreateForkResponseToJSON(json: any): SolidityServiceCreateForkResponse { - return SolidityServiceCreateForkResponseToJSONTyped(json, false); - } + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "fork", + "baseName": "fork", + "type": "SolidityServiceFork", + "format": "" + } ]; - export function SolidityServiceCreateForkResponseToJSONTyped(value?: SolidityServiceCreateForkResponse | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; + static getAttributeTypeMap() { + return SolidityServiceCreateForkResponse.attributeTypeMap; } - return { - - 'fork': SolidityServiceForkToJSON(value['fork']), - }; + public constructor() { + } } - diff --git a/src/models/SolidityServiceDecodeStateDiffResponse.ts b/src/models/SolidityServiceDecodeStateDiffResponse.ts index 0568a28..4d10475 100755 --- a/src/models/SolidityServiceDecodeStateDiffResponse.ts +++ b/src/models/SolidityServiceDecodeStateDiffResponse.ts @@ -1,10 +1,8 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Sentio API * Sentio Open API for query data * - * The version of the OpenAPI document: version not set + * OpenAPI spec version: version not set * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -12,54 +10,27 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime.js'; -/** - * - * @export - * @interface SolidityServiceDecodeStateDiffResponse - */ -export interface SolidityServiceDecodeStateDiffResponse { - /** - * - * @type {string} - * @memberof SolidityServiceDecodeStateDiffResponse - */ - result?: string; -} +import { HttpFile } from '../http/http.js'; -/** - * Check if a given object implements the SolidityServiceDecodeStateDiffResponse interface. - */ -export function instanceOfSolidityServiceDecodeStateDiffResponse(value: object): value is SolidityServiceDecodeStateDiffResponse { - return true; -} +export class SolidityServiceDecodeStateDiffResponse { + 'result'?: string; -export function SolidityServiceDecodeStateDiffResponseFromJSON(json: any): SolidityServiceDecodeStateDiffResponse { - return SolidityServiceDecodeStateDiffResponseFromJSONTyped(json, false); -} + static readonly discriminator: string | undefined = undefined; -export function SolidityServiceDecodeStateDiffResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): SolidityServiceDecodeStateDiffResponse { - if (json == null) { - return json; - } - return { - - 'result': json['result'] == null ? undefined : json['result'], - }; -} + static readonly mapping: {[index: string]: string} | undefined = undefined; - export function SolidityServiceDecodeStateDiffResponseToJSON(json: any): SolidityServiceDecodeStateDiffResponse { - return SolidityServiceDecodeStateDiffResponseToJSONTyped(json, false); - } + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "result", + "baseName": "result", + "type": "string", + "format": "" + } ]; - export function SolidityServiceDecodeStateDiffResponseToJSONTyped(value?: SolidityServiceDecodeStateDiffResponse | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; + static getAttributeTypeMap() { + return SolidityServiceDecodeStateDiffResponse.attributeTypeMap; } - return { - - 'result': value['result'], - }; + public constructor() { + } } - diff --git a/src/models/SolidityServiceExternalFork.ts b/src/models/SolidityServiceExternalFork.ts index fe6a1c2..c9c28a4 100755 --- a/src/models/SolidityServiceExternalFork.ts +++ b/src/models/SolidityServiceExternalFork.ts @@ -1,10 +1,8 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Sentio API * Sentio Open API for query data * - * The version of the OpenAPI document: version not set + * OpenAPI spec version: version not set * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -12,70 +10,35 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime.js'; -import type { SolidityServiceBaseChainConfig } from './SolidityServiceBaseChainConfig.js'; -import { - SolidityServiceBaseChainConfigFromJSON, - SolidityServiceBaseChainConfigFromJSONTyped, - SolidityServiceBaseChainConfigToJSON, - SolidityServiceBaseChainConfigToJSONTyped, -} from './SolidityServiceBaseChainConfig.js'; - -/** - * - * @export - * @interface SolidityServiceExternalFork - */ -export interface SolidityServiceExternalFork { - /** - * - * @type {SolidityServiceBaseChainConfig} - * @memberof SolidityServiceExternalFork - */ - chainConfig?: SolidityServiceBaseChainConfig; - /** - * - * @type {string} - * @memberof SolidityServiceExternalFork - */ - nodeAdditionalHeaders?: string; -} - -/** - * Check if a given object implements the SolidityServiceExternalFork interface. - */ -export function instanceOfSolidityServiceExternalFork(value: object): value is SolidityServiceExternalFork { - return true; -} - -export function SolidityServiceExternalForkFromJSON(json: any): SolidityServiceExternalFork { - return SolidityServiceExternalForkFromJSONTyped(json, false); -} - -export function SolidityServiceExternalForkFromJSONTyped(json: any, ignoreDiscriminator: boolean): SolidityServiceExternalFork { - if (json == null) { - return json; +import { SolidityServiceBaseChainConfig } from '../models/SolidityServiceBaseChainConfig.js'; +import { HttpFile } from '../http/http.js'; + +export class SolidityServiceExternalFork { + 'chainConfig'?: SolidityServiceBaseChainConfig; + 'nodeAdditionalHeaders'?: string; + + static readonly discriminator: string | undefined = undefined; + + static readonly mapping: {[index: string]: string} | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "chainConfig", + "baseName": "chainConfig", + "type": "SolidityServiceBaseChainConfig", + "format": "" + }, + { + "name": "nodeAdditionalHeaders", + "baseName": "nodeAdditionalHeaders", + "type": "string", + "format": "" + } ]; + + static getAttributeTypeMap() { + return SolidityServiceExternalFork.attributeTypeMap; } - return { - - 'chainConfig': json['chainConfig'] == null ? undefined : SolidityServiceBaseChainConfigFromJSON(json['chainConfig']), - 'nodeAdditionalHeaders': json['nodeAdditionalHeaders'] == null ? undefined : json['nodeAdditionalHeaders'], - }; -} - - export function SolidityServiceExternalForkToJSON(json: any): SolidityServiceExternalFork { - return SolidityServiceExternalForkToJSONTyped(json, false); - } - export function SolidityServiceExternalForkToJSONTyped(value?: SolidityServiceExternalFork | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; + public constructor() { } - - return { - - 'chainConfig': SolidityServiceBaseChainConfigToJSON(value['chainConfig']), - 'nodeAdditionalHeaders': value['nodeAdditionalHeaders'], - }; } - diff --git a/src/models/SolidityServiceFailure.ts b/src/models/SolidityServiceFailure.ts index dc93050..e9f8b1f 100755 --- a/src/models/SolidityServiceFailure.ts +++ b/src/models/SolidityServiceFailure.ts @@ -1,10 +1,8 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Sentio API * Sentio Open API for query data * - * The version of the OpenAPI document: version not set + * OpenAPI spec version: version not set * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -12,62 +10,34 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime.js'; -/** - * - * @export - * @interface SolidityServiceFailure - */ -export interface SolidityServiceFailure { - /** - * - * @type {string} - * @memberof SolidityServiceFailure - */ - error?: string; - /** - * - * @type {string} - * @memberof SolidityServiceFailure - */ - reason?: string; -} +import { HttpFile } from '../http/http.js'; -/** - * Check if a given object implements the SolidityServiceFailure interface. - */ -export function instanceOfSolidityServiceFailure(value: object): value is SolidityServiceFailure { - return true; -} +export class SolidityServiceFailure { + 'error'?: string; + 'reason'?: string; -export function SolidityServiceFailureFromJSON(json: any): SolidityServiceFailure { - return SolidityServiceFailureFromJSONTyped(json, false); -} + static readonly discriminator: string | undefined = undefined; -export function SolidityServiceFailureFromJSONTyped(json: any, ignoreDiscriminator: boolean): SolidityServiceFailure { - if (json == null) { - return json; - } - return { - - 'error': json['error'] == null ? undefined : json['error'], - 'reason': json['reason'] == null ? undefined : json['reason'], - }; -} + static readonly mapping: {[index: string]: string} | undefined = undefined; - export function SolidityServiceFailureToJSON(json: any): SolidityServiceFailure { - return SolidityServiceFailureToJSONTyped(json, false); - } + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "error", + "baseName": "error", + "type": "string", + "format": "" + }, + { + "name": "reason", + "baseName": "reason", + "type": "string", + "format": "" + } ]; - export function SolidityServiceFailureToJSONTyped(value?: SolidityServiceFailure | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; + static getAttributeTypeMap() { + return SolidityServiceFailure.attributeTypeMap; } - return { - - 'error': value['error'], - 'reason': value['reason'], - }; + public constructor() { + } } - diff --git a/src/models/SolidityServiceFetchAndCompileInternalResponse.ts b/src/models/SolidityServiceFetchAndCompileInternalResponse.ts index b6ee078..36240cb 100755 --- a/src/models/SolidityServiceFetchAndCompileInternalResponse.ts +++ b/src/models/SolidityServiceFetchAndCompileInternalResponse.ts @@ -1,10 +1,8 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Sentio API * Sentio Open API for query data * - * The version of the OpenAPI document: version not set + * OpenAPI spec version: version not set * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -12,70 +10,35 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime.js'; -import type { SolidityServiceFailure } from './SolidityServiceFailure.js'; -import { - SolidityServiceFailureFromJSON, - SolidityServiceFailureFromJSONTyped, - SolidityServiceFailureToJSON, - SolidityServiceFailureToJSONTyped, -} from './SolidityServiceFailure.js'; - -/** - * - * @export - * @interface SolidityServiceFetchAndCompileInternalResponse - */ -export interface SolidityServiceFetchAndCompileInternalResponse { - /** - * - * @type {Array} - * @memberof SolidityServiceFetchAndCompileInternalResponse - */ - compiledAddresses?: Array; - /** - * - * @type {{ [key: string]: SolidityServiceFailure; }} - * @memberof SolidityServiceFetchAndCompileInternalResponse - */ - failures?: { [key: string]: SolidityServiceFailure; }; -} - -/** - * Check if a given object implements the SolidityServiceFetchAndCompileInternalResponse interface. - */ -export function instanceOfSolidityServiceFetchAndCompileInternalResponse(value: object): value is SolidityServiceFetchAndCompileInternalResponse { - return true; -} - -export function SolidityServiceFetchAndCompileInternalResponseFromJSON(json: any): SolidityServiceFetchAndCompileInternalResponse { - return SolidityServiceFetchAndCompileInternalResponseFromJSONTyped(json, false); -} - -export function SolidityServiceFetchAndCompileInternalResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): SolidityServiceFetchAndCompileInternalResponse { - if (json == null) { - return json; +import { SolidityServiceFailure } from '../models/SolidityServiceFailure.js'; +import { HttpFile } from '../http/http.js'; + +export class SolidityServiceFetchAndCompileInternalResponse { + 'compiledAddresses'?: Array; + 'failures'?: { [key: string]: SolidityServiceFailure; }; + + static readonly discriminator: string | undefined = undefined; + + static readonly mapping: {[index: string]: string} | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "compiledAddresses", + "baseName": "compiledAddresses", + "type": "Array", + "format": "" + }, + { + "name": "failures", + "baseName": "failures", + "type": "{ [key: string]: SolidityServiceFailure; }", + "format": "" + } ]; + + static getAttributeTypeMap() { + return SolidityServiceFetchAndCompileInternalResponse.attributeTypeMap; } - return { - - 'compiledAddresses': json['compiledAddresses'] == null ? undefined : json['compiledAddresses'], - 'failures': json['failures'] == null ? undefined : (mapValues(json['failures'], SolidityServiceFailureFromJSON)), - }; -} - - export function SolidityServiceFetchAndCompileInternalResponseToJSON(json: any): SolidityServiceFetchAndCompileInternalResponse { - return SolidityServiceFetchAndCompileInternalResponseToJSONTyped(json, false); - } - export function SolidityServiceFetchAndCompileInternalResponseToJSONTyped(value?: SolidityServiceFetchAndCompileInternalResponse | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; + public constructor() { } - - return { - - 'compiledAddresses': value['compiledAddresses'], - 'failures': value['failures'] == null ? undefined : (mapValues(value['failures'], SolidityServiceFailureToJSON)), - }; } - diff --git a/src/models/SolidityServiceFork.ts b/src/models/SolidityServiceFork.ts index aed1e29..afc443a 100755 --- a/src/models/SolidityServiceFork.ts +++ b/src/models/SolidityServiceFork.ts @@ -1,10 +1,8 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Sentio API * Sentio Open API for query data * - * The version of the OpenAPI document: version not set + * OpenAPI spec version: version not set * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -12,134 +10,81 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime.js'; -import type { SolidityServiceExternalFork } from './SolidityServiceExternalFork.js'; -import { - SolidityServiceExternalForkFromJSON, - SolidityServiceExternalForkFromJSONTyped, - SolidityServiceExternalForkToJSON, - SolidityServiceExternalForkToJSONTyped, -} from './SolidityServiceExternalFork.js'; -import type { SolidityServiceForkType } from './SolidityServiceForkType.js'; -import { - SolidityServiceForkTypeFromJSON, - SolidityServiceForkTypeFromJSONTyped, - SolidityServiceForkTypeToJSON, - SolidityServiceForkTypeToJSONTyped, -} from './SolidityServiceForkType.js'; -import type { SolidityServiceManagedFork } from './SolidityServiceManagedFork.js'; -import { - SolidityServiceManagedForkFromJSON, - SolidityServiceManagedForkFromJSONTyped, - SolidityServiceManagedForkToJSON, - SolidityServiceManagedForkToJSONTyped, -} from './SolidityServiceManagedFork.js'; +import { SolidityServiceExternalFork } from '../models/SolidityServiceExternalFork.js'; +import { SolidityServiceForkType } from '../models/SolidityServiceForkType.js'; +import { SolidityServiceManagedFork } from '../models/SolidityServiceManagedFork.js'; +import { HttpFile } from '../http/http.js'; -/** - * - * @export - * @interface SolidityServiceFork - */ -export interface SolidityServiceFork { - /** - * - * @type {string} - * @memberof SolidityServiceFork - */ - id?: string; - /** - * - * @type {SolidityServiceForkType} - * @memberof SolidityServiceFork - */ - type?: SolidityServiceForkType; - /** - * - * @type {string} - * @memberof SolidityServiceFork - */ - name?: string; - /** - * - * @type {string} - * @memberof SolidityServiceFork - */ - extra?: string; - /** - * - * @type {SolidityServiceManagedFork} - * @memberof SolidityServiceFork - */ - managedFork?: SolidityServiceManagedFork; - /** - * - * @type {SolidityServiceExternalFork} - * @memberof SolidityServiceFork - */ - externalFork?: SolidityServiceExternalFork; - /** - * - * @type {Date} - * @memberof SolidityServiceFork - */ - createTime?: Date; - /** - * - * @type {Date} - * @memberof SolidityServiceFork - */ - updateTime?: Date; -} +export class SolidityServiceFork { + 'id'?: string; + 'type'?: SolidityServiceForkType; + 'name'?: string; + 'extra'?: string; + 'managedFork'?: SolidityServiceManagedFork; + 'externalFork'?: SolidityServiceExternalFork; + 'createTime'?: Date; + 'updateTime'?: Date; + static readonly discriminator: string | undefined = undefined; + static readonly mapping: {[index: string]: string} | undefined = undefined; -/** - * Check if a given object implements the SolidityServiceFork interface. - */ -export function instanceOfSolidityServiceFork(value: object): value is SolidityServiceFork { - return true; -} + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "id", + "baseName": "id", + "type": "string", + "format": "" + }, + { + "name": "type", + "baseName": "type", + "type": "SolidityServiceForkType", + "format": "" + }, + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + }, + { + "name": "extra", + "baseName": "extra", + "type": "string", + "format": "" + }, + { + "name": "managedFork", + "baseName": "managedFork", + "type": "SolidityServiceManagedFork", + "format": "" + }, + { + "name": "externalFork", + "baseName": "externalFork", + "type": "SolidityServiceExternalFork", + "format": "" + }, + { + "name": "createTime", + "baseName": "createTime", + "type": "Date", + "format": "date-time" + }, + { + "name": "updateTime", + "baseName": "updateTime", + "type": "Date", + "format": "date-time" + } ]; -export function SolidityServiceForkFromJSON(json: any): SolidityServiceFork { - return SolidityServiceForkFromJSONTyped(json, false); -} - -export function SolidityServiceForkFromJSONTyped(json: any, ignoreDiscriminator: boolean): SolidityServiceFork { - if (json == null) { - return json; + static getAttributeTypeMap() { + return SolidityServiceFork.attributeTypeMap; } - return { - - 'id': json['id'] == null ? undefined : json['id'], - 'type': json['type'] == null ? undefined : SolidityServiceForkTypeFromJSON(json['type']), - 'name': json['name'] == null ? undefined : json['name'], - 'extra': json['extra'] == null ? undefined : json['extra'], - 'managedFork': json['managedFork'] == null ? undefined : SolidityServiceManagedForkFromJSON(json['managedFork']), - 'externalFork': json['externalFork'] == null ? undefined : SolidityServiceExternalForkFromJSON(json['externalFork']), - 'createTime': json['createTime'] == null ? undefined : (new Date(json['createTime'])), - 'updateTime': json['updateTime'] == null ? undefined : (new Date(json['updateTime'])), - }; -} - export function SolidityServiceForkToJSON(json: any): SolidityServiceFork { - return SolidityServiceForkToJSONTyped(json, false); - } - - export function SolidityServiceForkToJSONTyped(value?: SolidityServiceFork | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; + public constructor() { } - - return { - - 'id': value['id'], - 'type': SolidityServiceForkTypeToJSON(value['type']), - 'name': value['name'], - 'extra': value['extra'], - 'managedFork': SolidityServiceManagedForkToJSON(value['managedFork']), - 'externalFork': SolidityServiceExternalForkToJSON(value['externalFork']), - 'createTime': value['createTime'] == null ? undefined : ((value['createTime']).toISOString()), - 'updateTime': value['updateTime'] == null ? undefined : ((value['updateTime']).toISOString()), - }; } + diff --git a/src/models/SolidityServiceForkServiceCreateForkBody.ts b/src/models/SolidityServiceForkServiceCreateForkBody.ts index c228650..441ae95 100755 --- a/src/models/SolidityServiceForkServiceCreateForkBody.ts +++ b/src/models/SolidityServiceForkServiceCreateForkBody.ts @@ -1,10 +1,8 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Sentio API * Sentio Open API for query data * - * The version of the OpenAPI document: version not set + * OpenAPI spec version: version not set * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -12,63 +10,28 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime.js'; -import type { SolidityServiceFork } from './SolidityServiceFork.js'; -import { - SolidityServiceForkFromJSON, - SolidityServiceForkFromJSONTyped, - SolidityServiceForkToJSON, - SolidityServiceForkToJSONTyped, -} from './SolidityServiceFork.js'; +import { SolidityServiceFork } from '../models/SolidityServiceFork.js'; +import { HttpFile } from '../http/http.js'; -/** - * - * @export - * @interface SolidityServiceForkServiceCreateForkBody - */ -export interface SolidityServiceForkServiceCreateForkBody { - /** - * - * @type {SolidityServiceFork} - * @memberof SolidityServiceForkServiceCreateForkBody - */ - fork: SolidityServiceFork; -} +export class SolidityServiceForkServiceCreateForkBody { + 'fork': SolidityServiceFork; -/** - * Check if a given object implements the SolidityServiceForkServiceCreateForkBody interface. - */ -export function instanceOfSolidityServiceForkServiceCreateForkBody(value: object): value is SolidityServiceForkServiceCreateForkBody { - if (!('fork' in value) || value['fork'] === undefined) return false; - return true; -} + static readonly discriminator: string | undefined = undefined; -export function SolidityServiceForkServiceCreateForkBodyFromJSON(json: any): SolidityServiceForkServiceCreateForkBody { - return SolidityServiceForkServiceCreateForkBodyFromJSONTyped(json, false); -} - -export function SolidityServiceForkServiceCreateForkBodyFromJSONTyped(json: any, ignoreDiscriminator: boolean): SolidityServiceForkServiceCreateForkBody { - if (json == null) { - return json; - } - return { - - 'fork': SolidityServiceForkFromJSON(json['fork']), - }; -} + static readonly mapping: {[index: string]: string} | undefined = undefined; - export function SolidityServiceForkServiceCreateForkBodyToJSON(json: any): SolidityServiceForkServiceCreateForkBody { - return SolidityServiceForkServiceCreateForkBodyToJSONTyped(json, false); - } + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "fork", + "baseName": "fork", + "type": "SolidityServiceFork", + "format": "" + } ]; - export function SolidityServiceForkServiceCreateForkBodyToJSONTyped(value?: SolidityServiceForkServiceCreateForkBody | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; + static getAttributeTypeMap() { + return SolidityServiceForkServiceCreateForkBody.attributeTypeMap; } - return { - - 'fork': SolidityServiceForkToJSON(value['fork']), - }; + public constructor() { + } } - diff --git a/src/models/SolidityServiceForkServiceUpdateForkBody.ts b/src/models/SolidityServiceForkServiceUpdateForkBody.ts index 6bfa03e..0fc073e 100755 --- a/src/models/SolidityServiceForkServiceUpdateForkBody.ts +++ b/src/models/SolidityServiceForkServiceUpdateForkBody.ts @@ -1,10 +1,8 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Sentio API * Sentio Open API for query data * - * The version of the OpenAPI document: version not set + * OpenAPI spec version: version not set * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -12,63 +10,28 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime.js'; -import type { SolidityServiceFork } from './SolidityServiceFork.js'; -import { - SolidityServiceForkFromJSON, - SolidityServiceForkFromJSONTyped, - SolidityServiceForkToJSON, - SolidityServiceForkToJSONTyped, -} from './SolidityServiceFork.js'; +import { SolidityServiceFork } from '../models/SolidityServiceFork.js'; +import { HttpFile } from '../http/http.js'; -/** - * - * @export - * @interface SolidityServiceForkServiceUpdateForkBody - */ -export interface SolidityServiceForkServiceUpdateForkBody { - /** - * - * @type {SolidityServiceFork} - * @memberof SolidityServiceForkServiceUpdateForkBody - */ - fork: SolidityServiceFork; -} +export class SolidityServiceForkServiceUpdateForkBody { + 'fork': SolidityServiceFork; -/** - * Check if a given object implements the SolidityServiceForkServiceUpdateForkBody interface. - */ -export function instanceOfSolidityServiceForkServiceUpdateForkBody(value: object): value is SolidityServiceForkServiceUpdateForkBody { - if (!('fork' in value) || value['fork'] === undefined) return false; - return true; -} + static readonly discriminator: string | undefined = undefined; -export function SolidityServiceForkServiceUpdateForkBodyFromJSON(json: any): SolidityServiceForkServiceUpdateForkBody { - return SolidityServiceForkServiceUpdateForkBodyFromJSONTyped(json, false); -} - -export function SolidityServiceForkServiceUpdateForkBodyFromJSONTyped(json: any, ignoreDiscriminator: boolean): SolidityServiceForkServiceUpdateForkBody { - if (json == null) { - return json; - } - return { - - 'fork': SolidityServiceForkFromJSON(json['fork']), - }; -} + static readonly mapping: {[index: string]: string} | undefined = undefined; - export function SolidityServiceForkServiceUpdateForkBodyToJSON(json: any): SolidityServiceForkServiceUpdateForkBody { - return SolidityServiceForkServiceUpdateForkBodyToJSONTyped(json, false); - } + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "fork", + "baseName": "fork", + "type": "SolidityServiceFork", + "format": "" + } ]; - export function SolidityServiceForkServiceUpdateForkBodyToJSONTyped(value?: SolidityServiceForkServiceUpdateForkBody | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; + static getAttributeTypeMap() { + return SolidityServiceForkServiceUpdateForkBody.attributeTypeMap; } - return { - - 'fork': SolidityServiceForkToJSON(value['fork']), - }; + public constructor() { + } } - diff --git a/src/models/SolidityServiceForkType.ts b/src/models/SolidityServiceForkType.ts index 94ea798..bb8e2a7 100755 --- a/src/models/SolidityServiceForkType.ts +++ b/src/models/SolidityServiceForkType.ts @@ -1,10 +1,8 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Sentio API * Sentio Open API for query data * - * The version of the OpenAPI document: version not set + * OpenAPI spec version: version not set * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -12,42 +10,9 @@ * Do not edit the class manually. */ +import { HttpFile } from '../http/http.js'; -/** - * - * @export - */ -export const SolidityServiceForkType = { - Managed: 'MANAGED', - External: 'EXTERNAL' -} as const; -export type SolidityServiceForkType = typeof SolidityServiceForkType[keyof typeof SolidityServiceForkType]; - - -export function instanceOfSolidityServiceForkType(value: any): boolean { - for (const key in SolidityServiceForkType) { - if (Object.prototype.hasOwnProperty.call(SolidityServiceForkType, key)) { - if (SolidityServiceForkType[key as keyof typeof SolidityServiceForkType] === value) { - return true; - } - } - } - return false; -} - -export function SolidityServiceForkTypeFromJSON(json: any): SolidityServiceForkType { - return SolidityServiceForkTypeFromJSONTyped(json, false); +export enum SolidityServiceForkType { + Managed = 'MANAGED', + External = 'EXTERNAL' } - -export function SolidityServiceForkTypeFromJSONTyped(json: any, ignoreDiscriminator: boolean): SolidityServiceForkType { - return json as SolidityServiceForkType; -} - -export function SolidityServiceForkTypeToJSON(value?: SolidityServiceForkType | null): any { - return value as any; -} - -export function SolidityServiceForkTypeToJSONTyped(value: any, ignoreDiscriminator: boolean): SolidityServiceForkType { - return value as SolidityServiceForkType; -} - diff --git a/src/models/SolidityServiceGetForkInfoResponse.ts b/src/models/SolidityServiceGetForkInfoResponse.ts index 2ad7de0..991ee0e 100755 --- a/src/models/SolidityServiceGetForkInfoResponse.ts +++ b/src/models/SolidityServiceGetForkInfoResponse.ts @@ -1,10 +1,8 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Sentio API * Sentio Open API for query data * - * The version of the OpenAPI document: version not set + * OpenAPI spec version: version not set * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -12,117 +10,71 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime.js'; -import type { SolidityServiceNodeEnvironment } from './SolidityServiceNodeEnvironment.js'; -import { - SolidityServiceNodeEnvironmentFromJSON, - SolidityServiceNodeEnvironmentFromJSONTyped, - SolidityServiceNodeEnvironmentToJSON, - SolidityServiceNodeEnvironmentToJSONTyped, -} from './SolidityServiceNodeEnvironment.js'; -import type { SolidityServiceNodeForkConfig } from './SolidityServiceNodeForkConfig.js'; -import { - SolidityServiceNodeForkConfigFromJSON, - SolidityServiceNodeForkConfigFromJSONTyped, - SolidityServiceNodeForkConfigToJSON, - SolidityServiceNodeForkConfigToJSONTyped, -} from './SolidityServiceNodeForkConfig.js'; +import { SolidityServiceNodeEnvironment } from '../models/SolidityServiceNodeEnvironment.js'; +import { SolidityServiceNodeForkConfig } from '../models/SolidityServiceNodeForkConfig.js'; +import { HttpFile } from '../http/http.js'; -/** - * - * @export - * @interface SolidityServiceGetForkInfoResponse - */ -export interface SolidityServiceGetForkInfoResponse { - /** - * - * @type {string} - * @memberof SolidityServiceGetForkInfoResponse - */ - currentBlockNumber?: string; - /** - * - * @type {string} - * @memberof SolidityServiceGetForkInfoResponse - */ - currentBlockTimestamp?: string; - /** - * - * @type {string} - * @memberof SolidityServiceGetForkInfoResponse - */ - currentBlockHash?: string; - /** - * - * @type {string} - * @memberof SolidityServiceGetForkInfoResponse - */ - hardFork?: string; - /** - * - * @type {string} - * @memberof SolidityServiceGetForkInfoResponse - */ - transactionOrder?: string; - /** - * - * @type {SolidityServiceNodeEnvironment} - * @memberof SolidityServiceGetForkInfoResponse - */ - environment?: SolidityServiceNodeEnvironment; - /** - * - * @type {SolidityServiceNodeForkConfig} - * @memberof SolidityServiceGetForkInfoResponse - */ - forkConfig?: SolidityServiceNodeForkConfig; -} +export class SolidityServiceGetForkInfoResponse { + 'currentBlockNumber'?: string; + 'currentBlockTimestamp'?: string; + 'currentBlockHash'?: string; + 'hardFork'?: string; + 'transactionOrder'?: string; + 'environment'?: SolidityServiceNodeEnvironment; + 'forkConfig'?: SolidityServiceNodeForkConfig; -/** - * Check if a given object implements the SolidityServiceGetForkInfoResponse interface. - */ -export function instanceOfSolidityServiceGetForkInfoResponse(value: object): value is SolidityServiceGetForkInfoResponse { - return true; -} + static readonly discriminator: string | undefined = undefined; -export function SolidityServiceGetForkInfoResponseFromJSON(json: any): SolidityServiceGetForkInfoResponse { - return SolidityServiceGetForkInfoResponseFromJSONTyped(json, false); -} - -export function SolidityServiceGetForkInfoResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): SolidityServiceGetForkInfoResponse { - if (json == null) { - return json; - } - return { - - 'currentBlockNumber': json['currentBlockNumber'] == null ? undefined : json['currentBlockNumber'], - 'currentBlockTimestamp': json['currentBlockTimestamp'] == null ? undefined : json['currentBlockTimestamp'], - 'currentBlockHash': json['currentBlockHash'] == null ? undefined : json['currentBlockHash'], - 'hardFork': json['hardFork'] == null ? undefined : json['hardFork'], - 'transactionOrder': json['transactionOrder'] == null ? undefined : json['transactionOrder'], - 'environment': json['environment'] == null ? undefined : SolidityServiceNodeEnvironmentFromJSON(json['environment']), - 'forkConfig': json['forkConfig'] == null ? undefined : SolidityServiceNodeForkConfigFromJSON(json['forkConfig']), - }; -} + static readonly mapping: {[index: string]: string} | undefined = undefined; - export function SolidityServiceGetForkInfoResponseToJSON(json: any): SolidityServiceGetForkInfoResponse { - return SolidityServiceGetForkInfoResponseToJSONTyped(json, false); - } + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "currentBlockNumber", + "baseName": "currentBlockNumber", + "type": "string", + "format": "" + }, + { + "name": "currentBlockTimestamp", + "baseName": "currentBlockTimestamp", + "type": "string", + "format": "uint64" + }, + { + "name": "currentBlockHash", + "baseName": "currentBlockHash", + "type": "string", + "format": "" + }, + { + "name": "hardFork", + "baseName": "hardFork", + "type": "string", + "format": "" + }, + { + "name": "transactionOrder", + "baseName": "transactionOrder", + "type": "string", + "format": "" + }, + { + "name": "environment", + "baseName": "environment", + "type": "SolidityServiceNodeEnvironment", + "format": "" + }, + { + "name": "forkConfig", + "baseName": "forkConfig", + "type": "SolidityServiceNodeForkConfig", + "format": "" + } ]; - export function SolidityServiceGetForkInfoResponseToJSONTyped(value?: SolidityServiceGetForkInfoResponse | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; + static getAttributeTypeMap() { + return SolidityServiceGetForkInfoResponse.attributeTypeMap; } - return { - - 'currentBlockNumber': value['currentBlockNumber'], - 'currentBlockTimestamp': value['currentBlockTimestamp'], - 'currentBlockHash': value['currentBlockHash'], - 'hardFork': value['hardFork'], - 'transactionOrder': value['transactionOrder'], - 'environment': SolidityServiceNodeEnvironmentToJSON(value['environment']), - 'forkConfig': SolidityServiceNodeForkConfigToJSON(value['forkConfig']), - }; + public constructor() { + } } - diff --git a/src/models/SolidityServiceGetForkResponse.ts b/src/models/SolidityServiceGetForkResponse.ts index d8688fe..7ba0ead 100755 --- a/src/models/SolidityServiceGetForkResponse.ts +++ b/src/models/SolidityServiceGetForkResponse.ts @@ -1,10 +1,8 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Sentio API * Sentio Open API for query data * - * The version of the OpenAPI document: version not set + * OpenAPI spec version: version not set * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -12,62 +10,28 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime.js'; -import type { SolidityServiceFork } from './SolidityServiceFork.js'; -import { - SolidityServiceForkFromJSON, - SolidityServiceForkFromJSONTyped, - SolidityServiceForkToJSON, - SolidityServiceForkToJSONTyped, -} from './SolidityServiceFork.js'; +import { SolidityServiceFork } from '../models/SolidityServiceFork.js'; +import { HttpFile } from '../http/http.js'; -/** - * - * @export - * @interface SolidityServiceGetForkResponse - */ -export interface SolidityServiceGetForkResponse { - /** - * - * @type {SolidityServiceFork} - * @memberof SolidityServiceGetForkResponse - */ - fork?: SolidityServiceFork; -} +export class SolidityServiceGetForkResponse { + 'fork'?: SolidityServiceFork; -/** - * Check if a given object implements the SolidityServiceGetForkResponse interface. - */ -export function instanceOfSolidityServiceGetForkResponse(value: object): value is SolidityServiceGetForkResponse { - return true; -} + static readonly discriminator: string | undefined = undefined; -export function SolidityServiceGetForkResponseFromJSON(json: any): SolidityServiceGetForkResponse { - return SolidityServiceGetForkResponseFromJSONTyped(json, false); -} - -export function SolidityServiceGetForkResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): SolidityServiceGetForkResponse { - if (json == null) { - return json; - } - return { - - 'fork': json['fork'] == null ? undefined : SolidityServiceForkFromJSON(json['fork']), - }; -} + static readonly mapping: {[index: string]: string} | undefined = undefined; - export function SolidityServiceGetForkResponseToJSON(json: any): SolidityServiceGetForkResponse { - return SolidityServiceGetForkResponseToJSONTyped(json, false); - } + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "fork", + "baseName": "fork", + "type": "SolidityServiceFork", + "format": "" + } ]; - export function SolidityServiceGetForkResponseToJSONTyped(value?: SolidityServiceGetForkResponse | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; + static getAttributeTypeMap() { + return SolidityServiceGetForkResponse.attributeTypeMap; } - return { - - 'fork': SolidityServiceForkToJSON(value['fork']), - }; + public constructor() { + } } - diff --git a/src/models/SolidityServiceGetSimulationBundleResponse.ts b/src/models/SolidityServiceGetSimulationBundleResponse.ts index e02848f..347d8bc 100755 --- a/src/models/SolidityServiceGetSimulationBundleResponse.ts +++ b/src/models/SolidityServiceGetSimulationBundleResponse.ts @@ -1,10 +1,8 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Sentio API * Sentio Open API for query data * - * The version of the OpenAPI document: version not set + * OpenAPI spec version: version not set * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -12,70 +10,35 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime.js'; -import type { SolidityServiceSimulation } from './SolidityServiceSimulation.js'; -import { - SolidityServiceSimulationFromJSON, - SolidityServiceSimulationFromJSONTyped, - SolidityServiceSimulationToJSON, - SolidityServiceSimulationToJSONTyped, -} from './SolidityServiceSimulation.js'; - -/** - * - * @export - * @interface SolidityServiceGetSimulationBundleResponse - */ -export interface SolidityServiceGetSimulationBundleResponse { - /** - * - * @type {Array} - * @memberof SolidityServiceGetSimulationBundleResponse - */ - simulations?: Array; - /** - * - * @type {string} - * @memberof SolidityServiceGetSimulationBundleResponse - */ - error?: string; -} - -/** - * Check if a given object implements the SolidityServiceGetSimulationBundleResponse interface. - */ -export function instanceOfSolidityServiceGetSimulationBundleResponse(value: object): value is SolidityServiceGetSimulationBundleResponse { - return true; -} - -export function SolidityServiceGetSimulationBundleResponseFromJSON(json: any): SolidityServiceGetSimulationBundleResponse { - return SolidityServiceGetSimulationBundleResponseFromJSONTyped(json, false); -} - -export function SolidityServiceGetSimulationBundleResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): SolidityServiceGetSimulationBundleResponse { - if (json == null) { - return json; +import { SolidityServiceSimulation } from '../models/SolidityServiceSimulation.js'; +import { HttpFile } from '../http/http.js'; + +export class SolidityServiceGetSimulationBundleResponse { + 'simulations'?: Array; + 'error'?: string; + + static readonly discriminator: string | undefined = undefined; + + static readonly mapping: {[index: string]: string} | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "simulations", + "baseName": "simulations", + "type": "Array", + "format": "" + }, + { + "name": "error", + "baseName": "error", + "type": "string", + "format": "" + } ]; + + static getAttributeTypeMap() { + return SolidityServiceGetSimulationBundleResponse.attributeTypeMap; } - return { - - 'simulations': json['simulations'] == null ? undefined : ((json['simulations'] as Array).map(SolidityServiceSimulationFromJSON)), - 'error': json['error'] == null ? undefined : json['error'], - }; -} - - export function SolidityServiceGetSimulationBundleResponseToJSON(json: any): SolidityServiceGetSimulationBundleResponse { - return SolidityServiceGetSimulationBundleResponseToJSONTyped(json, false); - } - export function SolidityServiceGetSimulationBundleResponseToJSONTyped(value?: SolidityServiceGetSimulationBundleResponse | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; + public constructor() { } - - return { - - 'simulations': value['simulations'] == null ? undefined : ((value['simulations'] as Array).map(SolidityServiceSimulationToJSON)), - 'error': value['error'], - }; } - diff --git a/src/models/SolidityServiceGetSimulationResponse.ts b/src/models/SolidityServiceGetSimulationResponse.ts index 17af715..859c8a5 100755 --- a/src/models/SolidityServiceGetSimulationResponse.ts +++ b/src/models/SolidityServiceGetSimulationResponse.ts @@ -1,10 +1,8 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Sentio API * Sentio Open API for query data * - * The version of the OpenAPI document: version not set + * OpenAPI spec version: version not set * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -12,62 +10,28 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime.js'; -import type { SolidityServiceSimulation } from './SolidityServiceSimulation.js'; -import { - SolidityServiceSimulationFromJSON, - SolidityServiceSimulationFromJSONTyped, - SolidityServiceSimulationToJSON, - SolidityServiceSimulationToJSONTyped, -} from './SolidityServiceSimulation.js'; +import { SolidityServiceSimulation } from '../models/SolidityServiceSimulation.js'; +import { HttpFile } from '../http/http.js'; -/** - * - * @export - * @interface SolidityServiceGetSimulationResponse - */ -export interface SolidityServiceGetSimulationResponse { - /** - * - * @type {SolidityServiceSimulation} - * @memberof SolidityServiceGetSimulationResponse - */ - simulation?: SolidityServiceSimulation; -} +export class SolidityServiceGetSimulationResponse { + 'simulation'?: SolidityServiceSimulation; -/** - * Check if a given object implements the SolidityServiceGetSimulationResponse interface. - */ -export function instanceOfSolidityServiceGetSimulationResponse(value: object): value is SolidityServiceGetSimulationResponse { - return true; -} + static readonly discriminator: string | undefined = undefined; -export function SolidityServiceGetSimulationResponseFromJSON(json: any): SolidityServiceGetSimulationResponse { - return SolidityServiceGetSimulationResponseFromJSONTyped(json, false); -} - -export function SolidityServiceGetSimulationResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): SolidityServiceGetSimulationResponse { - if (json == null) { - return json; - } - return { - - 'simulation': json['simulation'] == null ? undefined : SolidityServiceSimulationFromJSON(json['simulation']), - }; -} + static readonly mapping: {[index: string]: string} | undefined = undefined; - export function SolidityServiceGetSimulationResponseToJSON(json: any): SolidityServiceGetSimulationResponse { - return SolidityServiceGetSimulationResponseToJSONTyped(json, false); - } + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "simulation", + "baseName": "simulation", + "type": "SolidityServiceSimulation", + "format": "" + } ]; - export function SolidityServiceGetSimulationResponseToJSONTyped(value?: SolidityServiceGetSimulationResponse | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; + static getAttributeTypeMap() { + return SolidityServiceGetSimulationResponse.attributeTypeMap; } - return { - - 'simulation': SolidityServiceSimulationToJSON(value['simulation']), - }; + public constructor() { + } } - diff --git a/src/models/SolidityServiceGetSimulationsResponse.ts b/src/models/SolidityServiceGetSimulationsResponse.ts index f65ff80..577235c 100755 --- a/src/models/SolidityServiceGetSimulationsResponse.ts +++ b/src/models/SolidityServiceGetSimulationsResponse.ts @@ -1,10 +1,8 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Sentio API * Sentio Open API for query data * - * The version of the OpenAPI document: version not set + * OpenAPI spec version: version not set * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -12,86 +10,49 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime.js'; -import type { SolidityServiceSimulation } from './SolidityServiceSimulation.js'; -import { - SolidityServiceSimulationFromJSON, - SolidityServiceSimulationFromJSONTyped, - SolidityServiceSimulationToJSON, - SolidityServiceSimulationToJSONTyped, -} from './SolidityServiceSimulation.js'; - -/** - * - * @export - * @interface SolidityServiceGetSimulationsResponse - */ -export interface SolidityServiceGetSimulationsResponse { - /** - * - * @type {Array} - * @memberof SolidityServiceGetSimulationsResponse - */ - simulations?: Array; - /** - * - * @type {string} - * @memberof SolidityServiceGetSimulationsResponse - */ - count?: string; - /** - * - * @type {number} - * @memberof SolidityServiceGetSimulationsResponse - */ - page?: number; - /** - * - * @type {number} - * @memberof SolidityServiceGetSimulationsResponse - */ - pageSize?: number; -} - -/** - * Check if a given object implements the SolidityServiceGetSimulationsResponse interface. - */ -export function instanceOfSolidityServiceGetSimulationsResponse(value: object): value is SolidityServiceGetSimulationsResponse { - return true; -} - -export function SolidityServiceGetSimulationsResponseFromJSON(json: any): SolidityServiceGetSimulationsResponse { - return SolidityServiceGetSimulationsResponseFromJSONTyped(json, false); -} - -export function SolidityServiceGetSimulationsResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): SolidityServiceGetSimulationsResponse { - if (json == null) { - return json; +import { SolidityServiceSimulation } from '../models/SolidityServiceSimulation.js'; +import { HttpFile } from '../http/http.js'; + +export class SolidityServiceGetSimulationsResponse { + 'simulations'?: Array; + 'count'?: string; + 'page'?: number; + 'pageSize'?: number; + + static readonly discriminator: string | undefined = undefined; + + static readonly mapping: {[index: string]: string} | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "simulations", + "baseName": "simulations", + "type": "Array", + "format": "" + }, + { + "name": "count", + "baseName": "count", + "type": "string", + "format": "int64" + }, + { + "name": "page", + "baseName": "page", + "type": "number", + "format": "int32" + }, + { + "name": "pageSize", + "baseName": "pageSize", + "type": "number", + "format": "int32" + } ]; + + static getAttributeTypeMap() { + return SolidityServiceGetSimulationsResponse.attributeTypeMap; } - return { - - 'simulations': json['simulations'] == null ? undefined : ((json['simulations'] as Array).map(SolidityServiceSimulationFromJSON)), - 'count': json['count'] == null ? undefined : json['count'], - 'page': json['page'] == null ? undefined : json['page'], - 'pageSize': json['pageSize'] == null ? undefined : json['pageSize'], - }; -} - - export function SolidityServiceGetSimulationsResponseToJSON(json: any): SolidityServiceGetSimulationsResponse { - return SolidityServiceGetSimulationsResponseToJSONTyped(json, false); - } - export function SolidityServiceGetSimulationsResponseToJSONTyped(value?: SolidityServiceGetSimulationsResponse | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; + public constructor() { } - - return { - - 'simulations': value['simulations'] == null ? undefined : ((value['simulations'] as Array).map(SolidityServiceSimulationToJSON)), - 'count': value['count'], - 'page': value['page'], - 'pageSize': value['pageSize'], - }; } - diff --git a/src/models/SolidityServiceGetStorageSummaryInternalResponse.ts b/src/models/SolidityServiceGetStorageSummaryInternalResponse.ts index d11fc10..195b1bc 100755 --- a/src/models/SolidityServiceGetStorageSummaryInternalResponse.ts +++ b/src/models/SolidityServiceGetStorageSummaryInternalResponse.ts @@ -1,10 +1,8 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Sentio API * Sentio Open API for query data * - * The version of the OpenAPI document: version not set + * OpenAPI spec version: version not set * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -12,62 +10,28 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime.js'; -import type { SolidityServiceStorageSummaryResult } from './SolidityServiceStorageSummaryResult.js'; -import { - SolidityServiceStorageSummaryResultFromJSON, - SolidityServiceStorageSummaryResultFromJSONTyped, - SolidityServiceStorageSummaryResultToJSON, - SolidityServiceStorageSummaryResultToJSONTyped, -} from './SolidityServiceStorageSummaryResult.js'; +import { SolidityServiceStorageSummaryResult } from '../models/SolidityServiceStorageSummaryResult.js'; +import { HttpFile } from '../http/http.js'; -/** - * - * @export - * @interface SolidityServiceGetStorageSummaryInternalResponse - */ -export interface SolidityServiceGetStorageSummaryInternalResponse { - /** - * - * @type {Array} - * @memberof SolidityServiceGetStorageSummaryInternalResponse - */ - results?: Array; -} +export class SolidityServiceGetStorageSummaryInternalResponse { + 'results'?: Array; -/** - * Check if a given object implements the SolidityServiceGetStorageSummaryInternalResponse interface. - */ -export function instanceOfSolidityServiceGetStorageSummaryInternalResponse(value: object): value is SolidityServiceGetStorageSummaryInternalResponse { - return true; -} + static readonly discriminator: string | undefined = undefined; -export function SolidityServiceGetStorageSummaryInternalResponseFromJSON(json: any): SolidityServiceGetStorageSummaryInternalResponse { - return SolidityServiceGetStorageSummaryInternalResponseFromJSONTyped(json, false); -} - -export function SolidityServiceGetStorageSummaryInternalResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): SolidityServiceGetStorageSummaryInternalResponse { - if (json == null) { - return json; - } - return { - - 'results': json['results'] == null ? undefined : ((json['results'] as Array).map(SolidityServiceStorageSummaryResultFromJSON)), - }; -} + static readonly mapping: {[index: string]: string} | undefined = undefined; - export function SolidityServiceGetStorageSummaryInternalResponseToJSON(json: any): SolidityServiceGetStorageSummaryInternalResponse { - return SolidityServiceGetStorageSummaryInternalResponseToJSONTyped(json, false); - } + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "results", + "baseName": "results", + "type": "Array", + "format": "" + } ]; - export function SolidityServiceGetStorageSummaryInternalResponseToJSONTyped(value?: SolidityServiceGetStorageSummaryInternalResponse | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; + static getAttributeTypeMap() { + return SolidityServiceGetStorageSummaryInternalResponse.attributeTypeMap; } - return { - - 'results': value['results'] == null ? undefined : ((value['results'] as Array).map(SolidityServiceStorageSummaryResultToJSON)), - }; + public constructor() { + } } - diff --git a/src/models/SolidityServiceGetTraceCallInternalRequestBundle.ts b/src/models/SolidityServiceGetTraceCallInternalRequestBundle.ts index 03ad71d..514f15c 100755 --- a/src/models/SolidityServiceGetTraceCallInternalRequestBundle.ts +++ b/src/models/SolidityServiceGetTraceCallInternalRequestBundle.ts @@ -1,10 +1,8 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Sentio API * Sentio Open API for query data * - * The version of the OpenAPI document: version not set + * OpenAPI spec version: version not set * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -12,70 +10,35 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime.js'; -import type { SolidityServiceBlockOverrides } from './SolidityServiceBlockOverrides.js'; -import { - SolidityServiceBlockOverridesFromJSON, - SolidityServiceBlockOverridesFromJSONTyped, - SolidityServiceBlockOverridesToJSON, - SolidityServiceBlockOverridesToJSONTyped, -} from './SolidityServiceBlockOverrides.js'; - -/** - * - * @export - * @interface SolidityServiceGetTraceCallInternalRequestBundle - */ -export interface SolidityServiceGetTraceCallInternalRequestBundle { - /** - * - * @type {Array} - * @memberof SolidityServiceGetTraceCallInternalRequestBundle - */ - transactions?: Array; - /** - * - * @type {SolidityServiceBlockOverrides} - * @memberof SolidityServiceGetTraceCallInternalRequestBundle - */ - blockOverride?: SolidityServiceBlockOverrides; -} - -/** - * Check if a given object implements the SolidityServiceGetTraceCallInternalRequestBundle interface. - */ -export function instanceOfSolidityServiceGetTraceCallInternalRequestBundle(value: object): value is SolidityServiceGetTraceCallInternalRequestBundle { - return true; -} - -export function SolidityServiceGetTraceCallInternalRequestBundleFromJSON(json: any): SolidityServiceGetTraceCallInternalRequestBundle { - return SolidityServiceGetTraceCallInternalRequestBundleFromJSONTyped(json, false); -} - -export function SolidityServiceGetTraceCallInternalRequestBundleFromJSONTyped(json: any, ignoreDiscriminator: boolean): SolidityServiceGetTraceCallInternalRequestBundle { - if (json == null) { - return json; +import { SolidityServiceBlockOverrides } from '../models/SolidityServiceBlockOverrides.js'; +import { HttpFile } from '../http/http.js'; + +export class SolidityServiceGetTraceCallInternalRequestBundle { + 'transactions'?: Array; + 'blockOverride'?: SolidityServiceBlockOverrides; + + static readonly discriminator: string | undefined = undefined; + + static readonly mapping: {[index: string]: string} | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "transactions", + "baseName": "transactions", + "type": "Array", + "format": "" + }, + { + "name": "blockOverride", + "baseName": "blockOverride", + "type": "SolidityServiceBlockOverrides", + "format": "" + } ]; + + static getAttributeTypeMap() { + return SolidityServiceGetTraceCallInternalRequestBundle.attributeTypeMap; } - return { - - 'transactions': json['transactions'] == null ? undefined : json['transactions'], - 'blockOverride': json['blockOverride'] == null ? undefined : SolidityServiceBlockOverridesFromJSON(json['blockOverride']), - }; -} - - export function SolidityServiceGetTraceCallInternalRequestBundleToJSON(json: any): SolidityServiceGetTraceCallInternalRequestBundle { - return SolidityServiceGetTraceCallInternalRequestBundleToJSONTyped(json, false); - } - export function SolidityServiceGetTraceCallInternalRequestBundleToJSONTyped(value?: SolidityServiceGetTraceCallInternalRequestBundle | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; + public constructor() { } - - return { - - 'transactions': value['transactions'], - 'blockOverride': SolidityServiceBlockOverridesToJSON(value['blockOverride']), - }; } - diff --git a/src/models/SolidityServiceGetTraceCallInternalRequestStateContext.ts b/src/models/SolidityServiceGetTraceCallInternalRequestStateContext.ts index bcd763b..01fa6fa 100755 --- a/src/models/SolidityServiceGetTraceCallInternalRequestStateContext.ts +++ b/src/models/SolidityServiceGetTraceCallInternalRequestStateContext.ts @@ -1,10 +1,8 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Sentio API * Sentio Open API for query data * - * The version of the OpenAPI document: version not set + * OpenAPI spec version: version not set * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -12,62 +10,34 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime.js'; -/** - * - * @export - * @interface SolidityServiceGetTraceCallInternalRequestStateContext - */ -export interface SolidityServiceGetTraceCallInternalRequestStateContext { - /** - * - * @type {string} - * @memberof SolidityServiceGetTraceCallInternalRequestStateContext - */ - blockNumber?: string; - /** - * - * @type {number} - * @memberof SolidityServiceGetTraceCallInternalRequestStateContext - */ - transactionIndex?: number; -} +import { HttpFile } from '../http/http.js'; -/** - * Check if a given object implements the SolidityServiceGetTraceCallInternalRequestStateContext interface. - */ -export function instanceOfSolidityServiceGetTraceCallInternalRequestStateContext(value: object): value is SolidityServiceGetTraceCallInternalRequestStateContext { - return true; -} +export class SolidityServiceGetTraceCallInternalRequestStateContext { + 'blockNumber'?: string; + 'transactionIndex'?: number; -export function SolidityServiceGetTraceCallInternalRequestStateContextFromJSON(json: any): SolidityServiceGetTraceCallInternalRequestStateContext { - return SolidityServiceGetTraceCallInternalRequestStateContextFromJSONTyped(json, false); -} + static readonly discriminator: string | undefined = undefined; -export function SolidityServiceGetTraceCallInternalRequestStateContextFromJSONTyped(json: any, ignoreDiscriminator: boolean): SolidityServiceGetTraceCallInternalRequestStateContext { - if (json == null) { - return json; - } - return { - - 'blockNumber': json['blockNumber'] == null ? undefined : json['blockNumber'], - 'transactionIndex': json['transactionIndex'] == null ? undefined : json['transactionIndex'], - }; -} + static readonly mapping: {[index: string]: string} | undefined = undefined; - export function SolidityServiceGetTraceCallInternalRequestStateContextToJSON(json: any): SolidityServiceGetTraceCallInternalRequestStateContext { - return SolidityServiceGetTraceCallInternalRequestStateContextToJSONTyped(json, false); - } + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "blockNumber", + "baseName": "blockNumber", + "type": "string", + "format": "" + }, + { + "name": "transactionIndex", + "baseName": "transactionIndex", + "type": "number", + "format": "int32" + } ]; - export function SolidityServiceGetTraceCallInternalRequestStateContextToJSONTyped(value?: SolidityServiceGetTraceCallInternalRequestStateContext | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; + static getAttributeTypeMap() { + return SolidityServiceGetTraceCallInternalRequestStateContext.attributeTypeMap; } - return { - - 'blockNumber': value['blockNumber'], - 'transactionIndex': value['transactionIndex'], - }; + public constructor() { + } } - diff --git a/src/models/SolidityServiceGetTraceCallInternalResponse.ts b/src/models/SolidityServiceGetTraceCallInternalResponse.ts index a6a0c5b..0b7ca89 100755 --- a/src/models/SolidityServiceGetTraceCallInternalResponse.ts +++ b/src/models/SolidityServiceGetTraceCallInternalResponse.ts @@ -1,10 +1,8 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Sentio API * Sentio Open API for query data * - * The version of the OpenAPI document: version not set + * OpenAPI spec version: version not set * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -12,70 +10,41 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime.js'; -/** - * - * @export - * @interface SolidityServiceGetTraceCallInternalResponse - */ -export interface SolidityServiceGetTraceCallInternalResponse { - /** - * - * @type {Array>} - * @memberof SolidityServiceGetTraceCallInternalResponse - */ - result?: Array>; - /** - * - * @type {Array>} - * @memberof SolidityServiceGetTraceCallInternalResponse - */ - outputs?: Array>; - /** - * - * @type {string} - * @memberof SolidityServiceGetTraceCallInternalResponse - */ - error?: string; -} - -/** - * Check if a given object implements the SolidityServiceGetTraceCallInternalResponse interface. - */ -export function instanceOfSolidityServiceGetTraceCallInternalResponse(value: object): value is SolidityServiceGetTraceCallInternalResponse { - return true; -} - -export function SolidityServiceGetTraceCallInternalResponseFromJSON(json: any): SolidityServiceGetTraceCallInternalResponse { - return SolidityServiceGetTraceCallInternalResponseFromJSONTyped(json, false); -} - -export function SolidityServiceGetTraceCallInternalResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): SolidityServiceGetTraceCallInternalResponse { - if (json == null) { - return json; +import { HttpFile } from '../http/http.js'; + +export class SolidityServiceGetTraceCallInternalResponse { + 'result'?: Array>; + 'outputs'?: Array>; + 'error'?: string; + + static readonly discriminator: string | undefined = undefined; + + static readonly mapping: {[index: string]: string} | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "result", + "baseName": "result", + "type": "Array>", + "format": "" + }, + { + "name": "outputs", + "baseName": "outputs", + "type": "Array>", + "format": "" + }, + { + "name": "error", + "baseName": "error", + "type": "string", + "format": "" + } ]; + + static getAttributeTypeMap() { + return SolidityServiceGetTraceCallInternalResponse.attributeTypeMap; } - return { - - 'result': json['result'] == null ? undefined : json['result'], - 'outputs': json['outputs'] == null ? undefined : json['outputs'], - 'error': json['error'] == null ? undefined : json['error'], - }; -} - export function SolidityServiceGetTraceCallInternalResponseToJSON(json: any): SolidityServiceGetTraceCallInternalResponse { - return SolidityServiceGetTraceCallInternalResponseToJSONTyped(json, false); - } - - export function SolidityServiceGetTraceCallInternalResponseToJSONTyped(value?: SolidityServiceGetTraceCallInternalResponse | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; + public constructor() { } - - return { - - 'result': value['result'], - 'outputs': value['outputs'], - 'error': value['error'], - }; } - diff --git a/src/models/SolidityServiceGetTraceTransactionInternalResponse.ts b/src/models/SolidityServiceGetTraceTransactionInternalResponse.ts index 199161d..f3d1ab7 100755 --- a/src/models/SolidityServiceGetTraceTransactionInternalResponse.ts +++ b/src/models/SolidityServiceGetTraceTransactionInternalResponse.ts @@ -1,10 +1,8 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Sentio API * Sentio Open API for query data * - * The version of the OpenAPI document: version not set + * OpenAPI spec version: version not set * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -12,54 +10,27 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime.js'; -/** - * - * @export - * @interface SolidityServiceGetTraceTransactionInternalResponse - */ -export interface SolidityServiceGetTraceTransactionInternalResponse { - /** - * - * @type {string} - * @memberof SolidityServiceGetTraceTransactionInternalResponse - */ - result?: string; -} +import { HttpFile } from '../http/http.js'; -/** - * Check if a given object implements the SolidityServiceGetTraceTransactionInternalResponse interface. - */ -export function instanceOfSolidityServiceGetTraceTransactionInternalResponse(value: object): value is SolidityServiceGetTraceTransactionInternalResponse { - return true; -} +export class SolidityServiceGetTraceTransactionInternalResponse { + 'result'?: string; -export function SolidityServiceGetTraceTransactionInternalResponseFromJSON(json: any): SolidityServiceGetTraceTransactionInternalResponse { - return SolidityServiceGetTraceTransactionInternalResponseFromJSONTyped(json, false); -} + static readonly discriminator: string | undefined = undefined; -export function SolidityServiceGetTraceTransactionInternalResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): SolidityServiceGetTraceTransactionInternalResponse { - if (json == null) { - return json; - } - return { - - 'result': json['result'] == null ? undefined : json['result'], - }; -} + static readonly mapping: {[index: string]: string} | undefined = undefined; - export function SolidityServiceGetTraceTransactionInternalResponseToJSON(json: any): SolidityServiceGetTraceTransactionInternalResponse { - return SolidityServiceGetTraceTransactionInternalResponseToJSONTyped(json, false); - } + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "result", + "baseName": "result", + "type": "string", + "format": "" + } ]; - export function SolidityServiceGetTraceTransactionInternalResponseToJSONTyped(value?: SolidityServiceGetTraceTransactionInternalResponse | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; + static getAttributeTypeMap() { + return SolidityServiceGetTraceTransactionInternalResponse.attributeTypeMap; } - return { - - 'result': value['result'], - }; + public constructor() { + } } - diff --git a/src/models/SolidityServiceListForksResponse.ts b/src/models/SolidityServiceListForksResponse.ts index 1d05490..9695294 100755 --- a/src/models/SolidityServiceListForksResponse.ts +++ b/src/models/SolidityServiceListForksResponse.ts @@ -1,10 +1,8 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Sentio API * Sentio Open API for query data * - * The version of the OpenAPI document: version not set + * OpenAPI spec version: version not set * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -12,62 +10,28 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime.js'; -import type { SolidityServiceFork } from './SolidityServiceFork.js'; -import { - SolidityServiceForkFromJSON, - SolidityServiceForkFromJSONTyped, - SolidityServiceForkToJSON, - SolidityServiceForkToJSONTyped, -} from './SolidityServiceFork.js'; +import { SolidityServiceFork } from '../models/SolidityServiceFork.js'; +import { HttpFile } from '../http/http.js'; -/** - * - * @export - * @interface SolidityServiceListForksResponse - */ -export interface SolidityServiceListForksResponse { - /** - * - * @type {Array} - * @memberof SolidityServiceListForksResponse - */ - forks?: Array; -} +export class SolidityServiceListForksResponse { + 'forks'?: Array; -/** - * Check if a given object implements the SolidityServiceListForksResponse interface. - */ -export function instanceOfSolidityServiceListForksResponse(value: object): value is SolidityServiceListForksResponse { - return true; -} + static readonly discriminator: string | undefined = undefined; -export function SolidityServiceListForksResponseFromJSON(json: any): SolidityServiceListForksResponse { - return SolidityServiceListForksResponseFromJSONTyped(json, false); -} - -export function SolidityServiceListForksResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): SolidityServiceListForksResponse { - if (json == null) { - return json; - } - return { - - 'forks': json['forks'] == null ? undefined : ((json['forks'] as Array).map(SolidityServiceForkFromJSON)), - }; -} + static readonly mapping: {[index: string]: string} | undefined = undefined; - export function SolidityServiceListForksResponseToJSON(json: any): SolidityServiceListForksResponse { - return SolidityServiceListForksResponseToJSONTyped(json, false); - } + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "forks", + "baseName": "forks", + "type": "Array", + "format": "" + } ]; - export function SolidityServiceListForksResponseToJSONTyped(value?: SolidityServiceListForksResponse | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; + static getAttributeTypeMap() { + return SolidityServiceListForksResponse.attributeTypeMap; } - return { - - 'forks': value['forks'] == null ? undefined : ((value['forks'] as Array).map(SolidityServiceForkToJSON)), - }; + public constructor() { + } } - diff --git a/src/models/SolidityServiceManagedFork.ts b/src/models/SolidityServiceManagedFork.ts index 2aae3ba..d7e46db 100755 --- a/src/models/SolidityServiceManagedFork.ts +++ b/src/models/SolidityServiceManagedFork.ts @@ -1,10 +1,8 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Sentio API * Sentio Open API for query data * - * The version of the OpenAPI document: version not set + * OpenAPI spec version: version not set * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -12,78 +10,42 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime.js'; -import type { SolidityServiceChainIdentifier } from './SolidityServiceChainIdentifier.js'; -import { - SolidityServiceChainIdentifierFromJSON, - SolidityServiceChainIdentifierFromJSONTyped, - SolidityServiceChainIdentifierToJSON, - SolidityServiceChainIdentifierToJSONTyped, -} from './SolidityServiceChainIdentifier.js'; - -/** - * - * @export - * @interface SolidityServiceManagedFork - */ -export interface SolidityServiceManagedFork { - /** - * - * @type {SolidityServiceChainIdentifier} - * @memberof SolidityServiceManagedFork - */ - chainSpec?: SolidityServiceChainIdentifier; - /** - * - * @type {string} - * @memberof SolidityServiceManagedFork - */ - rpcEndpoint?: string; - /** - * - * @type {number} - * @memberof SolidityServiceManagedFork - */ - parentBlockNumber?: number; -} - -/** - * Check if a given object implements the SolidityServiceManagedFork interface. - */ -export function instanceOfSolidityServiceManagedFork(value: object): value is SolidityServiceManagedFork { - return true; -} - -export function SolidityServiceManagedForkFromJSON(json: any): SolidityServiceManagedFork { - return SolidityServiceManagedForkFromJSONTyped(json, false); -} - -export function SolidityServiceManagedForkFromJSONTyped(json: any, ignoreDiscriminator: boolean): SolidityServiceManagedFork { - if (json == null) { - return json; +import { SolidityServiceChainIdentifier } from '../models/SolidityServiceChainIdentifier.js'; +import { HttpFile } from '../http/http.js'; + +export class SolidityServiceManagedFork { + 'chainSpec'?: SolidityServiceChainIdentifier; + 'rpcEndpoint'?: string; + 'parentBlockNumber'?: number; + + static readonly discriminator: string | undefined = undefined; + + static readonly mapping: {[index: string]: string} | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "chainSpec", + "baseName": "chainSpec", + "type": "SolidityServiceChainIdentifier", + "format": "" + }, + { + "name": "rpcEndpoint", + "baseName": "rpcEndpoint", + "type": "string", + "format": "" + }, + { + "name": "parentBlockNumber", + "baseName": "parentBlockNumber", + "type": "number", + "format": "int32" + } ]; + + static getAttributeTypeMap() { + return SolidityServiceManagedFork.attributeTypeMap; } - return { - - 'chainSpec': json['chainSpec'] == null ? undefined : SolidityServiceChainIdentifierFromJSON(json['chainSpec']), - 'rpcEndpoint': json['rpcEndpoint'] == null ? undefined : json['rpcEndpoint'], - 'parentBlockNumber': json['parentBlockNumber'] == null ? undefined : json['parentBlockNumber'], - }; -} - - export function SolidityServiceManagedForkToJSON(json: any): SolidityServiceManagedFork { - return SolidityServiceManagedForkToJSONTyped(json, false); - } - export function SolidityServiceManagedForkToJSONTyped(value?: SolidityServiceManagedFork | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; + public constructor() { } - - return { - - 'chainSpec': SolidityServiceChainIdentifierToJSON(value['chainSpec']), - 'rpcEndpoint': value['rpcEndpoint'], - 'parentBlockNumber': value['parentBlockNumber'], - }; } - diff --git a/src/models/SolidityServiceMetadata.ts b/src/models/SolidityServiceMetadata.ts index eda65bc..38b684a 100755 --- a/src/models/SolidityServiceMetadata.ts +++ b/src/models/SolidityServiceMetadata.ts @@ -1,10 +1,8 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Sentio API * Sentio Open API for query data * - * The version of the OpenAPI document: version not set + * OpenAPI spec version: version not set * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -12,70 +10,41 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime.js'; -/** - * - * @export - * @interface SolidityServiceMetadata - */ -export interface SolidityServiceMetadata { - /** - * - * @type {boolean} - * @memberof SolidityServiceMetadata - */ - useLiteralContent?: boolean; - /** - * - * @type {string} - * @memberof SolidityServiceMetadata - */ - bytecodeHash?: string; - /** - * - * @type {boolean} - * @memberof SolidityServiceMetadata - */ - appendCBOR?: boolean; -} - -/** - * Check if a given object implements the SolidityServiceMetadata interface. - */ -export function instanceOfSolidityServiceMetadata(value: object): value is SolidityServiceMetadata { - return true; -} - -export function SolidityServiceMetadataFromJSON(json: any): SolidityServiceMetadata { - return SolidityServiceMetadataFromJSONTyped(json, false); -} - -export function SolidityServiceMetadataFromJSONTyped(json: any, ignoreDiscriminator: boolean): SolidityServiceMetadata { - if (json == null) { - return json; +import { HttpFile } from '../http/http.js'; + +export class SolidityServiceMetadata { + 'useLiteralContent'?: boolean; + 'bytecodeHash'?: string; + 'appendCBOR'?: boolean; + + static readonly discriminator: string | undefined = undefined; + + static readonly mapping: {[index: string]: string} | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "useLiteralContent", + "baseName": "useLiteralContent", + "type": "boolean", + "format": "" + }, + { + "name": "bytecodeHash", + "baseName": "bytecodeHash", + "type": "string", + "format": "" + }, + { + "name": "appendCBOR", + "baseName": "appendCBOR", + "type": "boolean", + "format": "" + } ]; + + static getAttributeTypeMap() { + return SolidityServiceMetadata.attributeTypeMap; } - return { - - 'useLiteralContent': json['useLiteralContent'] == null ? undefined : json['useLiteralContent'], - 'bytecodeHash': json['bytecodeHash'] == null ? undefined : json['bytecodeHash'], - 'appendCBOR': json['appendCBOR'] == null ? undefined : json['appendCBOR'], - }; -} - export function SolidityServiceMetadataToJSON(json: any): SolidityServiceMetadata { - return SolidityServiceMetadataToJSONTyped(json, false); - } - - export function SolidityServiceMetadataToJSONTyped(value?: SolidityServiceMetadata | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; + public constructor() { } - - return { - - 'useLiteralContent': value['useLiteralContent'], - 'bytecodeHash': value['bytecodeHash'], - 'appendCBOR': value['appendCBOR'], - }; } - diff --git a/src/models/SolidityServiceNodeEnvironment.ts b/src/models/SolidityServiceNodeEnvironment.ts index 5f4670d..8c7af0e 100755 --- a/src/models/SolidityServiceNodeEnvironment.ts +++ b/src/models/SolidityServiceNodeEnvironment.ts @@ -1,10 +1,8 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Sentio API * Sentio Open API for query data * - * The version of the OpenAPI document: version not set + * OpenAPI spec version: version not set * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -12,78 +10,48 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime.js'; -/** - * - * @export - * @interface SolidityServiceNodeEnvironment - */ -export interface SolidityServiceNodeEnvironment { - /** - * - * @type {string} - * @memberof SolidityServiceNodeEnvironment - */ - chainId?: string; - /** - * - * @type {string} - * @memberof SolidityServiceNodeEnvironment - */ - baseFee?: string; - /** - * - * @type {string} - * @memberof SolidityServiceNodeEnvironment - */ - gasLimit?: string; - /** - * - * @type {string} - * @memberof SolidityServiceNodeEnvironment - */ - gasPrice?: string; -} - -/** - * Check if a given object implements the SolidityServiceNodeEnvironment interface. - */ -export function instanceOfSolidityServiceNodeEnvironment(value: object): value is SolidityServiceNodeEnvironment { - return true; -} - -export function SolidityServiceNodeEnvironmentFromJSON(json: any): SolidityServiceNodeEnvironment { - return SolidityServiceNodeEnvironmentFromJSONTyped(json, false); -} - -export function SolidityServiceNodeEnvironmentFromJSONTyped(json: any, ignoreDiscriminator: boolean): SolidityServiceNodeEnvironment { - if (json == null) { - return json; +import { HttpFile } from '../http/http.js'; + +export class SolidityServiceNodeEnvironment { + 'chainId'?: string; + 'baseFee'?: string; + 'gasLimit'?: string; + 'gasPrice'?: string; + + static readonly discriminator: string | undefined = undefined; + + static readonly mapping: {[index: string]: string} | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "chainId", + "baseName": "chainId", + "type": "string", + "format": "uint64" + }, + { + "name": "baseFee", + "baseName": "baseFee", + "type": "string", + "format": "" + }, + { + "name": "gasLimit", + "baseName": "gasLimit", + "type": "string", + "format": "" + }, + { + "name": "gasPrice", + "baseName": "gasPrice", + "type": "string", + "format": "" + } ]; + + static getAttributeTypeMap() { + return SolidityServiceNodeEnvironment.attributeTypeMap; } - return { - - 'chainId': json['chainId'] == null ? undefined : json['chainId'], - 'baseFee': json['baseFee'] == null ? undefined : json['baseFee'], - 'gasLimit': json['gasLimit'] == null ? undefined : json['gasLimit'], - 'gasPrice': json['gasPrice'] == null ? undefined : json['gasPrice'], - }; -} - export function SolidityServiceNodeEnvironmentToJSON(json: any): SolidityServiceNodeEnvironment { - return SolidityServiceNodeEnvironmentToJSONTyped(json, false); - } - - export function SolidityServiceNodeEnvironmentToJSONTyped(value?: SolidityServiceNodeEnvironment | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; + public constructor() { } - - return { - - 'chainId': value['chainId'], - 'baseFee': value['baseFee'], - 'gasLimit': value['gasLimit'], - 'gasPrice': value['gasPrice'], - }; } - diff --git a/src/models/SolidityServiceNodeForkConfig.ts b/src/models/SolidityServiceNodeForkConfig.ts index a81382b..ce88311 100755 --- a/src/models/SolidityServiceNodeForkConfig.ts +++ b/src/models/SolidityServiceNodeForkConfig.ts @@ -1,10 +1,8 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Sentio API * Sentio Open API for query data * - * The version of the OpenAPI document: version not set + * OpenAPI spec version: version not set * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -12,70 +10,41 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime.js'; -/** - * - * @export - * @interface SolidityServiceNodeForkConfig - */ -export interface SolidityServiceNodeForkConfig { - /** - * - * @type {string} - * @memberof SolidityServiceNodeForkConfig - */ - forkUrl?: string; - /** - * - * @type {string} - * @memberof SolidityServiceNodeForkConfig - */ - forkBlockNumber?: string; - /** - * - * @type {string} - * @memberof SolidityServiceNodeForkConfig - */ - forkRetryBackoff?: string; -} - -/** - * Check if a given object implements the SolidityServiceNodeForkConfig interface. - */ -export function instanceOfSolidityServiceNodeForkConfig(value: object): value is SolidityServiceNodeForkConfig { - return true; -} - -export function SolidityServiceNodeForkConfigFromJSON(json: any): SolidityServiceNodeForkConfig { - return SolidityServiceNodeForkConfigFromJSONTyped(json, false); -} - -export function SolidityServiceNodeForkConfigFromJSONTyped(json: any, ignoreDiscriminator: boolean): SolidityServiceNodeForkConfig { - if (json == null) { - return json; +import { HttpFile } from '../http/http.js'; + +export class SolidityServiceNodeForkConfig { + 'forkUrl'?: string; + 'forkBlockNumber'?: string; + 'forkRetryBackoff'?: string; + + static readonly discriminator: string | undefined = undefined; + + static readonly mapping: {[index: string]: string} | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "forkUrl", + "baseName": "forkUrl", + "type": "string", + "format": "" + }, + { + "name": "forkBlockNumber", + "baseName": "forkBlockNumber", + "type": "string", + "format": "uint64" + }, + { + "name": "forkRetryBackoff", + "baseName": "forkRetryBackoff", + "type": "string", + "format": "uint64" + } ]; + + static getAttributeTypeMap() { + return SolidityServiceNodeForkConfig.attributeTypeMap; } - return { - - 'forkUrl': json['forkUrl'] == null ? undefined : json['forkUrl'], - 'forkBlockNumber': json['forkBlockNumber'] == null ? undefined : json['forkBlockNumber'], - 'forkRetryBackoff': json['forkRetryBackoff'] == null ? undefined : json['forkRetryBackoff'], - }; -} - export function SolidityServiceNodeForkConfigToJSON(json: any): SolidityServiceNodeForkConfig { - return SolidityServiceNodeForkConfigToJSONTyped(json, false); - } - - export function SolidityServiceNodeForkConfigToJSONTyped(value?: SolidityServiceNodeForkConfig | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; + public constructor() { } - - return { - - 'forkUrl': value['forkUrl'], - 'forkBlockNumber': value['forkBlockNumber'], - 'forkRetryBackoff': value['forkRetryBackoff'], - }; } - diff --git a/src/models/SolidityServiceOptimizer.ts b/src/models/SolidityServiceOptimizer.ts index 6bc5ff7..116b0a6 100755 --- a/src/models/SolidityServiceOptimizer.ts +++ b/src/models/SolidityServiceOptimizer.ts @@ -1,10 +1,8 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Sentio API * Sentio Open API for query data * - * The version of the OpenAPI document: version not set + * OpenAPI spec version: version not set * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -12,78 +10,42 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime.js'; -import type { SolidityServiceOptimizerDetails } from './SolidityServiceOptimizerDetails.js'; -import { - SolidityServiceOptimizerDetailsFromJSON, - SolidityServiceOptimizerDetailsFromJSONTyped, - SolidityServiceOptimizerDetailsToJSON, - SolidityServiceOptimizerDetailsToJSONTyped, -} from './SolidityServiceOptimizerDetails.js'; - -/** - * - * @export - * @interface SolidityServiceOptimizer - */ -export interface SolidityServiceOptimizer { - /** - * - * @type {boolean} - * @memberof SolidityServiceOptimizer - */ - enabled?: boolean; - /** - * - * @type {number} - * @memberof SolidityServiceOptimizer - */ - runs?: number; - /** - * - * @type {SolidityServiceOptimizerDetails} - * @memberof SolidityServiceOptimizer - */ - details?: SolidityServiceOptimizerDetails; -} - -/** - * Check if a given object implements the SolidityServiceOptimizer interface. - */ -export function instanceOfSolidityServiceOptimizer(value: object): value is SolidityServiceOptimizer { - return true; -} - -export function SolidityServiceOptimizerFromJSON(json: any): SolidityServiceOptimizer { - return SolidityServiceOptimizerFromJSONTyped(json, false); -} - -export function SolidityServiceOptimizerFromJSONTyped(json: any, ignoreDiscriminator: boolean): SolidityServiceOptimizer { - if (json == null) { - return json; +import { SolidityServiceOptimizerDetails } from '../models/SolidityServiceOptimizerDetails.js'; +import { HttpFile } from '../http/http.js'; + +export class SolidityServiceOptimizer { + 'enabled'?: boolean; + 'runs'?: number; + 'details'?: SolidityServiceOptimizerDetails; + + static readonly discriminator: string | undefined = undefined; + + static readonly mapping: {[index: string]: string} | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "enabled", + "baseName": "enabled", + "type": "boolean", + "format": "" + }, + { + "name": "runs", + "baseName": "runs", + "type": "number", + "format": "int64" + }, + { + "name": "details", + "baseName": "details", + "type": "SolidityServiceOptimizerDetails", + "format": "" + } ]; + + static getAttributeTypeMap() { + return SolidityServiceOptimizer.attributeTypeMap; } - return { - - 'enabled': json['enabled'] == null ? undefined : json['enabled'], - 'runs': json['runs'] == null ? undefined : json['runs'], - 'details': json['details'] == null ? undefined : SolidityServiceOptimizerDetailsFromJSON(json['details']), - }; -} - - export function SolidityServiceOptimizerToJSON(json: any): SolidityServiceOptimizer { - return SolidityServiceOptimizerToJSONTyped(json, false); - } - export function SolidityServiceOptimizerToJSONTyped(value?: SolidityServiceOptimizer | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; + public constructor() { } - - return { - - 'enabled': value['enabled'], - 'runs': value['runs'], - 'details': SolidityServiceOptimizerDetailsToJSON(value['details']), - }; } - diff --git a/src/models/SolidityServiceOptimizerDetails.ts b/src/models/SolidityServiceOptimizerDetails.ts index e6f6ff6..4614217 100755 --- a/src/models/SolidityServiceOptimizerDetails.ts +++ b/src/models/SolidityServiceOptimizerDetails.ts @@ -1,10 +1,8 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Sentio API * Sentio Open API for query data * - * The version of the OpenAPI document: version not set + * OpenAPI spec version: version not set * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -12,86 +10,49 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime.js'; -import type { SolidityServiceOptimizerDetailsYulDetails } from './SolidityServiceOptimizerDetailsYulDetails.js'; -import { - SolidityServiceOptimizerDetailsYulDetailsFromJSON, - SolidityServiceOptimizerDetailsYulDetailsFromJSONTyped, - SolidityServiceOptimizerDetailsYulDetailsToJSON, - SolidityServiceOptimizerDetailsYulDetailsToJSONTyped, -} from './SolidityServiceOptimizerDetailsYulDetails.js'; - -/** - * - * @export - * @interface SolidityServiceOptimizerDetails - */ -export interface SolidityServiceOptimizerDetails { - /** - * - * @type {boolean} - * @memberof SolidityServiceOptimizerDetails - */ - peephole?: boolean; - /** - * - * @type {boolean} - * @memberof SolidityServiceOptimizerDetails - */ - jumpdestRemover?: boolean; - /** - * - * @type {boolean} - * @memberof SolidityServiceOptimizerDetails - */ - yul?: boolean; - /** - * - * @type {SolidityServiceOptimizerDetailsYulDetails} - * @memberof SolidityServiceOptimizerDetails - */ - yulDetails?: SolidityServiceOptimizerDetailsYulDetails; -} - -/** - * Check if a given object implements the SolidityServiceOptimizerDetails interface. - */ -export function instanceOfSolidityServiceOptimizerDetails(value: object): value is SolidityServiceOptimizerDetails { - return true; -} - -export function SolidityServiceOptimizerDetailsFromJSON(json: any): SolidityServiceOptimizerDetails { - return SolidityServiceOptimizerDetailsFromJSONTyped(json, false); -} - -export function SolidityServiceOptimizerDetailsFromJSONTyped(json: any, ignoreDiscriminator: boolean): SolidityServiceOptimizerDetails { - if (json == null) { - return json; +import { SolidityServiceOptimizerDetailsYulDetails } from '../models/SolidityServiceOptimizerDetailsYulDetails.js'; +import { HttpFile } from '../http/http.js'; + +export class SolidityServiceOptimizerDetails { + 'peephole'?: boolean; + 'jumpdestRemover'?: boolean; + 'yul'?: boolean; + 'yulDetails'?: SolidityServiceOptimizerDetailsYulDetails; + + static readonly discriminator: string | undefined = undefined; + + static readonly mapping: {[index: string]: string} | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "peephole", + "baseName": "peephole", + "type": "boolean", + "format": "" + }, + { + "name": "jumpdestRemover", + "baseName": "jumpdestRemover", + "type": "boolean", + "format": "" + }, + { + "name": "yul", + "baseName": "yul", + "type": "boolean", + "format": "" + }, + { + "name": "yulDetails", + "baseName": "yulDetails", + "type": "SolidityServiceOptimizerDetailsYulDetails", + "format": "" + } ]; + + static getAttributeTypeMap() { + return SolidityServiceOptimizerDetails.attributeTypeMap; } - return { - - 'peephole': json['peephole'] == null ? undefined : json['peephole'], - 'jumpdestRemover': json['jumpdestRemover'] == null ? undefined : json['jumpdestRemover'], - 'yul': json['yul'] == null ? undefined : json['yul'], - 'yulDetails': json['yulDetails'] == null ? undefined : SolidityServiceOptimizerDetailsYulDetailsFromJSON(json['yulDetails']), - }; -} - - export function SolidityServiceOptimizerDetailsToJSON(json: any): SolidityServiceOptimizerDetails { - return SolidityServiceOptimizerDetailsToJSONTyped(json, false); - } - export function SolidityServiceOptimizerDetailsToJSONTyped(value?: SolidityServiceOptimizerDetails | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; + public constructor() { } - - return { - - 'peephole': value['peephole'], - 'jumpdestRemover': value['jumpdestRemover'], - 'yul': value['yul'], - 'yulDetails': SolidityServiceOptimizerDetailsYulDetailsToJSON(value['yulDetails']), - }; } - diff --git a/src/models/SolidityServiceOptimizerDetailsYulDetails.ts b/src/models/SolidityServiceOptimizerDetailsYulDetails.ts index e6d81ee..577d874 100755 --- a/src/models/SolidityServiceOptimizerDetailsYulDetails.ts +++ b/src/models/SolidityServiceOptimizerDetailsYulDetails.ts @@ -1,10 +1,8 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Sentio API * Sentio Open API for query data * - * The version of the OpenAPI document: version not set + * OpenAPI spec version: version not set * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -12,62 +10,34 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime.js'; -/** - * - * @export - * @interface SolidityServiceOptimizerDetailsYulDetails - */ -export interface SolidityServiceOptimizerDetailsYulDetails { - /** - * - * @type {boolean} - * @memberof SolidityServiceOptimizerDetailsYulDetails - */ - stackAllocation?: boolean; - /** - * - * @type {string} - * @memberof SolidityServiceOptimizerDetailsYulDetails - */ - optimizerSteps?: string; -} +import { HttpFile } from '../http/http.js'; -/** - * Check if a given object implements the SolidityServiceOptimizerDetailsYulDetails interface. - */ -export function instanceOfSolidityServiceOptimizerDetailsYulDetails(value: object): value is SolidityServiceOptimizerDetailsYulDetails { - return true; -} +export class SolidityServiceOptimizerDetailsYulDetails { + 'stackAllocation'?: boolean; + 'optimizerSteps'?: string; -export function SolidityServiceOptimizerDetailsYulDetailsFromJSON(json: any): SolidityServiceOptimizerDetailsYulDetails { - return SolidityServiceOptimizerDetailsYulDetailsFromJSONTyped(json, false); -} + static readonly discriminator: string | undefined = undefined; -export function SolidityServiceOptimizerDetailsYulDetailsFromJSONTyped(json: any, ignoreDiscriminator: boolean): SolidityServiceOptimizerDetailsYulDetails { - if (json == null) { - return json; - } - return { - - 'stackAllocation': json['stackAllocation'] == null ? undefined : json['stackAllocation'], - 'optimizerSteps': json['optimizerSteps'] == null ? undefined : json['optimizerSteps'], - }; -} + static readonly mapping: {[index: string]: string} | undefined = undefined; - export function SolidityServiceOptimizerDetailsYulDetailsToJSON(json: any): SolidityServiceOptimizerDetailsYulDetails { - return SolidityServiceOptimizerDetailsYulDetailsToJSONTyped(json, false); - } + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "stackAllocation", + "baseName": "stackAllocation", + "type": "boolean", + "format": "" + }, + { + "name": "optimizerSteps", + "baseName": "optimizerSteps", + "type": "string", + "format": "" + } ]; - export function SolidityServiceOptimizerDetailsYulDetailsToJSONTyped(value?: SolidityServiceOptimizerDetailsYulDetails | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; + static getAttributeTypeMap() { + return SolidityServiceOptimizerDetailsYulDetails.attributeTypeMap; } - return { - - 'stackAllocation': value['stackAllocation'], - 'optimizerSteps': value['optimizerSteps'], - }; + public constructor() { + } } - diff --git a/src/models/SolidityServicePreProcessCompilationInternalResponse.ts b/src/models/SolidityServicePreProcessCompilationInternalResponse.ts index 507a41f..ccfb8f6 100755 --- a/src/models/SolidityServicePreProcessCompilationInternalResponse.ts +++ b/src/models/SolidityServicePreProcessCompilationInternalResponse.ts @@ -1,10 +1,8 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Sentio API * Sentio Open API for query data * - * The version of the OpenAPI document: version not set + * OpenAPI spec version: version not set * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -12,54 +10,27 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime.js'; -/** - * - * @export - * @interface SolidityServicePreProcessCompilationInternalResponse - */ -export interface SolidityServicePreProcessCompilationInternalResponse { - /** - * - * @type {Array} - * @memberof SolidityServicePreProcessCompilationInternalResponse - */ - preprocessedAddresses?: Array; -} +import { HttpFile } from '../http/http.js'; -/** - * Check if a given object implements the SolidityServicePreProcessCompilationInternalResponse interface. - */ -export function instanceOfSolidityServicePreProcessCompilationInternalResponse(value: object): value is SolidityServicePreProcessCompilationInternalResponse { - return true; -} +export class SolidityServicePreProcessCompilationInternalResponse { + 'preprocessedAddresses'?: Array; -export function SolidityServicePreProcessCompilationInternalResponseFromJSON(json: any): SolidityServicePreProcessCompilationInternalResponse { - return SolidityServicePreProcessCompilationInternalResponseFromJSONTyped(json, false); -} + static readonly discriminator: string | undefined = undefined; -export function SolidityServicePreProcessCompilationInternalResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): SolidityServicePreProcessCompilationInternalResponse { - if (json == null) { - return json; - } - return { - - 'preprocessedAddresses': json['preprocessedAddresses'] == null ? undefined : json['preprocessedAddresses'], - }; -} + static readonly mapping: {[index: string]: string} | undefined = undefined; - export function SolidityServicePreProcessCompilationInternalResponseToJSON(json: any): SolidityServicePreProcessCompilationInternalResponse { - return SolidityServicePreProcessCompilationInternalResponseToJSONTyped(json, false); - } + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "preprocessedAddresses", + "baseName": "preprocessedAddresses", + "type": "Array", + "format": "" + } ]; - export function SolidityServicePreProcessCompilationInternalResponseToJSONTyped(value?: SolidityServicePreProcessCompilationInternalResponse | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; + static getAttributeTypeMap() { + return SolidityServicePreProcessCompilationInternalResponse.attributeTypeMap; } - return { - - 'preprocessedAddresses': value['preprocessedAddresses'], - }; + public constructor() { + } } - diff --git a/src/models/SolidityServiceSettings.ts b/src/models/SolidityServiceSettings.ts index 29538ad..3e4c2f9 100755 --- a/src/models/SolidityServiceSettings.ts +++ b/src/models/SolidityServiceSettings.ts @@ -1,10 +1,8 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Sentio API * Sentio Open API for query data * - * The version of the OpenAPI document: version not set + * OpenAPI spec version: version not set * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -12,109 +10,64 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime.js'; -import type { SolidityServiceMetadata } from './SolidityServiceMetadata.js'; -import { - SolidityServiceMetadataFromJSON, - SolidityServiceMetadataFromJSONTyped, - SolidityServiceMetadataToJSON, - SolidityServiceMetadataToJSONTyped, -} from './SolidityServiceMetadata.js'; -import type { SolidityServiceOptimizer } from './SolidityServiceOptimizer.js'; -import { - SolidityServiceOptimizerFromJSON, - SolidityServiceOptimizerFromJSONTyped, - SolidityServiceOptimizerToJSON, - SolidityServiceOptimizerToJSONTyped, -} from './SolidityServiceOptimizer.js'; +import { SolidityServiceMetadata } from '../models/SolidityServiceMetadata.js'; +import { SolidityServiceOptimizer } from '../models/SolidityServiceOptimizer.js'; +import { HttpFile } from '../http/http.js'; -/** - * - * @export - * @interface SolidityServiceSettings - */ -export interface SolidityServiceSettings { - /** - * - * @type {Array} - * @memberof SolidityServiceSettings - */ - remappings?: Array; - /** - * - * @type {SolidityServiceOptimizer} - * @memberof SolidityServiceSettings - */ - optimizer?: SolidityServiceOptimizer; - /** - * - * @type {string} - * @memberof SolidityServiceSettings - */ - evmVersion?: string; - /** - * - * @type {SolidityServiceMetadata} - * @memberof SolidityServiceSettings - */ - metadata?: SolidityServiceMetadata; - /** - * - * @type {boolean} - * @memberof SolidityServiceSettings - */ - viaIR?: boolean; - /** - * - * @type {{ [key: string]: string; }} - * @memberof SolidityServiceSettings - */ - compilationTarget?: { [key: string]: string; }; -} +export class SolidityServiceSettings { + 'remappings'?: Array; + 'optimizer'?: SolidityServiceOptimizer; + 'evmVersion'?: string; + 'metadata'?: SolidityServiceMetadata; + 'viaIR'?: boolean; + 'compilationTarget'?: { [key: string]: string; }; -/** - * Check if a given object implements the SolidityServiceSettings interface. - */ -export function instanceOfSolidityServiceSettings(value: object): value is SolidityServiceSettings { - return true; -} + static readonly discriminator: string | undefined = undefined; -export function SolidityServiceSettingsFromJSON(json: any): SolidityServiceSettings { - return SolidityServiceSettingsFromJSONTyped(json, false); -} - -export function SolidityServiceSettingsFromJSONTyped(json: any, ignoreDiscriminator: boolean): SolidityServiceSettings { - if (json == null) { - return json; - } - return { - - 'remappings': json['remappings'] == null ? undefined : json['remappings'], - 'optimizer': json['optimizer'] == null ? undefined : SolidityServiceOptimizerFromJSON(json['optimizer']), - 'evmVersion': json['evmVersion'] == null ? undefined : json['evmVersion'], - 'metadata': json['metadata'] == null ? undefined : SolidityServiceMetadataFromJSON(json['metadata']), - 'viaIR': json['viaIR'] == null ? undefined : json['viaIR'], - 'compilationTarget': json['compilationTarget'] == null ? undefined : json['compilationTarget'], - }; -} + static readonly mapping: {[index: string]: string} | undefined = undefined; - export function SolidityServiceSettingsToJSON(json: any): SolidityServiceSettings { - return SolidityServiceSettingsToJSONTyped(json, false); - } + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "remappings", + "baseName": "remappings", + "type": "Array", + "format": "" + }, + { + "name": "optimizer", + "baseName": "optimizer", + "type": "SolidityServiceOptimizer", + "format": "" + }, + { + "name": "evmVersion", + "baseName": "evmVersion", + "type": "string", + "format": "" + }, + { + "name": "metadata", + "baseName": "metadata", + "type": "SolidityServiceMetadata", + "format": "" + }, + { + "name": "viaIR", + "baseName": "viaIR", + "type": "boolean", + "format": "" + }, + { + "name": "compilationTarget", + "baseName": "compilationTarget", + "type": "{ [key: string]: string; }", + "format": "" + } ]; - export function SolidityServiceSettingsToJSONTyped(value?: SolidityServiceSettings | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; + static getAttributeTypeMap() { + return SolidityServiceSettings.attributeTypeMap; } - return { - - 'remappings': value['remappings'], - 'optimizer': SolidityServiceOptimizerToJSON(value['optimizer']), - 'evmVersion': value['evmVersion'], - 'metadata': SolidityServiceMetadataToJSON(value['metadata']), - 'viaIR': value['viaIR'], - 'compilationTarget': value['compilationTarget'], - }; + public constructor() { + } } - diff --git a/src/models/SolidityServiceSimulateTransactionBundleResponse.ts b/src/models/SolidityServiceSimulateTransactionBundleResponse.ts index 43c6f53..1070020 100755 --- a/src/models/SolidityServiceSimulateTransactionBundleResponse.ts +++ b/src/models/SolidityServiceSimulateTransactionBundleResponse.ts @@ -1,10 +1,8 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Sentio API * Sentio Open API for query data * - * The version of the OpenAPI document: version not set + * OpenAPI spec version: version not set * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -12,78 +10,42 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime.js'; -import type { SolidityServiceSimulation } from './SolidityServiceSimulation.js'; -import { - SolidityServiceSimulationFromJSON, - SolidityServiceSimulationFromJSONTyped, - SolidityServiceSimulationToJSON, - SolidityServiceSimulationToJSONTyped, -} from './SolidityServiceSimulation.js'; - -/** - * - * @export - * @interface SolidityServiceSimulateTransactionBundleResponse - */ -export interface SolidityServiceSimulateTransactionBundleResponse { - /** - * - * @type {string} - * @memberof SolidityServiceSimulateTransactionBundleResponse - */ - bundleId?: string; - /** - * - * @type {Array} - * @memberof SolidityServiceSimulateTransactionBundleResponse - */ - simulations?: Array; - /** - * - * @type {string} - * @memberof SolidityServiceSimulateTransactionBundleResponse - */ - error?: string; -} - -/** - * Check if a given object implements the SolidityServiceSimulateTransactionBundleResponse interface. - */ -export function instanceOfSolidityServiceSimulateTransactionBundleResponse(value: object): value is SolidityServiceSimulateTransactionBundleResponse { - return true; -} - -export function SolidityServiceSimulateTransactionBundleResponseFromJSON(json: any): SolidityServiceSimulateTransactionBundleResponse { - return SolidityServiceSimulateTransactionBundleResponseFromJSONTyped(json, false); -} - -export function SolidityServiceSimulateTransactionBundleResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): SolidityServiceSimulateTransactionBundleResponse { - if (json == null) { - return json; +import { SolidityServiceSimulation } from '../models/SolidityServiceSimulation.js'; +import { HttpFile } from '../http/http.js'; + +export class SolidityServiceSimulateTransactionBundleResponse { + 'bundleId'?: string; + 'simulations'?: Array; + 'error'?: string; + + static readonly discriminator: string | undefined = undefined; + + static readonly mapping: {[index: string]: string} | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "bundleId", + "baseName": "bundleId", + "type": "string", + "format": "" + }, + { + "name": "simulations", + "baseName": "simulations", + "type": "Array", + "format": "" + }, + { + "name": "error", + "baseName": "error", + "type": "string", + "format": "" + } ]; + + static getAttributeTypeMap() { + return SolidityServiceSimulateTransactionBundleResponse.attributeTypeMap; } - return { - - 'bundleId': json['bundleId'] == null ? undefined : json['bundleId'], - 'simulations': json['simulations'] == null ? undefined : ((json['simulations'] as Array).map(SolidityServiceSimulationFromJSON)), - 'error': json['error'] == null ? undefined : json['error'], - }; -} - - export function SolidityServiceSimulateTransactionBundleResponseToJSON(json: any): SolidityServiceSimulateTransactionBundleResponse { - return SolidityServiceSimulateTransactionBundleResponseToJSONTyped(json, false); - } - export function SolidityServiceSimulateTransactionBundleResponseToJSONTyped(value?: SolidityServiceSimulateTransactionBundleResponse | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; + public constructor() { } - - return { - - 'bundleId': value['bundleId'], - 'simulations': value['simulations'] == null ? undefined : ((value['simulations'] as Array).map(SolidityServiceSimulationToJSON)), - 'error': value['error'], - }; } - diff --git a/src/models/SolidityServiceSimulateTransactionResponse.ts b/src/models/SolidityServiceSimulateTransactionResponse.ts index a5142b3..564ddec 100755 --- a/src/models/SolidityServiceSimulateTransactionResponse.ts +++ b/src/models/SolidityServiceSimulateTransactionResponse.ts @@ -1,10 +1,8 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Sentio API * Sentio Open API for query data * - * The version of the OpenAPI document: version not set + * OpenAPI spec version: version not set * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -12,62 +10,28 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime.js'; -import type { SolidityServiceSimulation } from './SolidityServiceSimulation.js'; -import { - SolidityServiceSimulationFromJSON, - SolidityServiceSimulationFromJSONTyped, - SolidityServiceSimulationToJSON, - SolidityServiceSimulationToJSONTyped, -} from './SolidityServiceSimulation.js'; +import { SolidityServiceSimulation } from '../models/SolidityServiceSimulation.js'; +import { HttpFile } from '../http/http.js'; -/** - * - * @export - * @interface SolidityServiceSimulateTransactionResponse - */ -export interface SolidityServiceSimulateTransactionResponse { - /** - * - * @type {SolidityServiceSimulation} - * @memberof SolidityServiceSimulateTransactionResponse - */ - simulation?: SolidityServiceSimulation; -} +export class SolidityServiceSimulateTransactionResponse { + 'simulation'?: SolidityServiceSimulation; -/** - * Check if a given object implements the SolidityServiceSimulateTransactionResponse interface. - */ -export function instanceOfSolidityServiceSimulateTransactionResponse(value: object): value is SolidityServiceSimulateTransactionResponse { - return true; -} + static readonly discriminator: string | undefined = undefined; -export function SolidityServiceSimulateTransactionResponseFromJSON(json: any): SolidityServiceSimulateTransactionResponse { - return SolidityServiceSimulateTransactionResponseFromJSONTyped(json, false); -} - -export function SolidityServiceSimulateTransactionResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): SolidityServiceSimulateTransactionResponse { - if (json == null) { - return json; - } - return { - - 'simulation': json['simulation'] == null ? undefined : SolidityServiceSimulationFromJSON(json['simulation']), - }; -} + static readonly mapping: {[index: string]: string} | undefined = undefined; - export function SolidityServiceSimulateTransactionResponseToJSON(json: any): SolidityServiceSimulateTransactionResponse { - return SolidityServiceSimulateTransactionResponseToJSONTyped(json, false); - } + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "simulation", + "baseName": "simulation", + "type": "SolidityServiceSimulation", + "format": "" + } ]; - export function SolidityServiceSimulateTransactionResponseToJSONTyped(value?: SolidityServiceSimulateTransactionResponse | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; + static getAttributeTypeMap() { + return SolidityServiceSimulateTransactionResponse.attributeTypeMap; } - return { - - 'simulation': SolidityServiceSimulationToJSON(value['simulation']), - }; + public constructor() { + } } - diff --git a/src/models/SolidityServiceSimulation.ts b/src/models/SolidityServiceSimulation.ts index 094ad46..b377700 100755 --- a/src/models/SolidityServiceSimulation.ts +++ b/src/models/SolidityServiceSimulation.ts @@ -1,10 +1,8 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Sentio API * Sentio Open API for query data * - * The version of the OpenAPI document: version not set + * OpenAPI spec version: version not set * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -12,284 +10,196 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime.js'; -import type { EvmAccessListItem } from './EvmAccessListItem.js'; -import { - EvmAccessListItemFromJSON, - EvmAccessListItemFromJSONTyped, - EvmAccessListItemToJSON, - EvmAccessListItemToJSONTyped, -} from './EvmAccessListItem.js'; -import type { SolidityServiceSimulationResult } from './SolidityServiceSimulationResult.js'; -import { - SolidityServiceSimulationResultFromJSON, - SolidityServiceSimulationResultFromJSONTyped, - SolidityServiceSimulationResultToJSON, - SolidityServiceSimulationResultToJSONTyped, -} from './SolidityServiceSimulationResult.js'; -import type { SolidityServiceStateOverride } from './SolidityServiceStateOverride.js'; -import { - SolidityServiceStateOverrideFromJSON, - SolidityServiceStateOverrideFromJSONTyped, - SolidityServiceStateOverrideToJSON, - SolidityServiceStateOverrideToJSONTyped, -} from './SolidityServiceStateOverride.js'; -import type { SolidityServiceChainIdentifier } from './SolidityServiceChainIdentifier.js'; -import { - SolidityServiceChainIdentifierFromJSON, - SolidityServiceChainIdentifierFromJSONTyped, - SolidityServiceChainIdentifierToJSON, - SolidityServiceChainIdentifierToJSONTyped, -} from './SolidityServiceChainIdentifier.js'; -import type { SolidityServiceBlockOverrides } from './SolidityServiceBlockOverrides.js'; -import { - SolidityServiceBlockOverridesFromJSON, - SolidityServiceBlockOverridesFromJSONTyped, - SolidityServiceBlockOverridesToJSON, - SolidityServiceBlockOverridesToJSONTyped, -} from './SolidityServiceBlockOverrides.js'; +import { EvmAccessListItem } from '../models/EvmAccessListItem.js'; +import { SolidityServiceBlockOverrides } from '../models/SolidityServiceBlockOverrides.js'; +import { SolidityServiceChainIdentifier } from '../models/SolidityServiceChainIdentifier.js'; +import { SolidityServiceSimulationResult } from '../models/SolidityServiceSimulationResult.js'; +import { SolidityServiceStateOverride } from '../models/SolidityServiceStateOverride.js'; +import { HttpFile } from '../http/http.js'; -/** - * - * @export - * @interface SolidityServiceSimulation - */ -export interface SolidityServiceSimulation { - /** - * - * @type {string} - * @memberof SolidityServiceSimulation - */ - id?: string; - /** - * - * @type {string} - * @memberof SolidityServiceSimulation - */ - createAt?: string; - /** - * - * @type {string} - * @memberof SolidityServiceSimulation - */ - bundleId?: string; - /** - * - * @type {string} - * @memberof SolidityServiceSimulation - */ - networkId: string; - /** - * - * @type {string} - * @memberof SolidityServiceSimulation - */ - chainId?: string; - /** - * - * @type {SolidityServiceChainIdentifier} - * @memberof SolidityServiceSimulation - */ - chainSpec: SolidityServiceChainIdentifier; - /** - * - * @type {string} - * @memberof SolidityServiceSimulation - */ - to: string; - /** - * - * @type {string} - * @memberof SolidityServiceSimulation - */ - input: string; - /** - * Can be "latest". - * @type {string} - * @memberof SolidityServiceSimulation - */ - blockNumber: string; - /** - * - * @type {string} - * @memberof SolidityServiceSimulation - */ - transactionIndex: string; - /** - * - * @type {string} - * @memberof SolidityServiceSimulation - */ - from: string; - /** - * - * @type {string} - * @memberof SolidityServiceSimulation - */ - gas: string; - /** - * - * @type {string} - * @memberof SolidityServiceSimulation - */ - gasPrice: string; - /** - * - * @type {string} - * @memberof SolidityServiceSimulation - */ - maxFeePerGas?: string; - /** - * - * @type {string} - * @memberof SolidityServiceSimulation - */ - maxPriorityFeePerGas?: string; - /** - * - * @type {string} - * @memberof SolidityServiceSimulation - */ - value: string; - /** - * - * @type {Array} - * @memberof SolidityServiceSimulation - */ - accessList?: Array; - /** - * - * @type {string} - * @memberof SolidityServiceSimulation - */ - originTxHash?: string; - /** - * - * @type {string} - * @memberof SolidityServiceSimulation - */ - label?: string; - /** - * - * @type {{ [key: string]: SolidityServiceStateOverride; }} - * @memberof SolidityServiceSimulation - */ - stateOverrides?: { [key: string]: SolidityServiceStateOverride; }; - /** - * - * @type {{ [key: string]: string; }} - * @memberof SolidityServiceSimulation - */ - sourceOverrides?: { [key: string]: string; }; - /** - * - * @type {SolidityServiceBlockOverrides} - * @memberof SolidityServiceSimulation - */ - blockOverride?: SolidityServiceBlockOverrides; - /** - * - * @type {boolean} - * @memberof SolidityServiceSimulation - */ - debugDeployment?: boolean; - /** - * - * @type {SolidityServiceSimulationResult} - * @memberof SolidityServiceSimulation - */ - result?: SolidityServiceSimulationResult; -} +export class SolidityServiceSimulation { + 'id'?: string; + 'createAt'?: string; + 'bundleId'?: string; + 'networkId': string; + 'chainId'?: string; + 'chainSpec': SolidityServiceChainIdentifier; + 'to': string; + 'input': string; + /** + * Can be \"latest\". + */ + 'blockNumber': string; + 'transactionIndex': string; + '_from': string; + 'gas': string; + 'gasPrice': string; + 'maxFeePerGas'?: string; + 'maxPriorityFeePerGas'?: string; + 'value': string; + 'accessList'?: Array; + 'originTxHash'?: string; + 'label'?: string; + 'stateOverrides'?: { [key: string]: SolidityServiceStateOverride; }; + 'sourceOverrides'?: { [key: string]: string; }; + 'blockOverride'?: SolidityServiceBlockOverrides; + 'debugDeployment'?: boolean; + 'result'?: SolidityServiceSimulationResult; -/** - * Check if a given object implements the SolidityServiceSimulation interface. - */ -export function instanceOfSolidityServiceSimulation(value: object): value is SolidityServiceSimulation { - if (!('networkId' in value) || value['networkId'] === undefined) return false; - if (!('chainSpec' in value) || value['chainSpec'] === undefined) return false; - if (!('to' in value) || value['to'] === undefined) return false; - if (!('input' in value) || value['input'] === undefined) return false; - if (!('blockNumber' in value) || value['blockNumber'] === undefined) return false; - if (!('transactionIndex' in value) || value['transactionIndex'] === undefined) return false; - if (!('from' in value) || value['from'] === undefined) return false; - if (!('gas' in value) || value['gas'] === undefined) return false; - if (!('gasPrice' in value) || value['gasPrice'] === undefined) return false; - if (!('value' in value) || value['value'] === undefined) return false; - return true; -} + static readonly discriminator: string | undefined = undefined; -export function SolidityServiceSimulationFromJSON(json: any): SolidityServiceSimulation { - return SolidityServiceSimulationFromJSONTyped(json, false); -} + static readonly mapping: {[index: string]: string} | undefined = undefined; -export function SolidityServiceSimulationFromJSONTyped(json: any, ignoreDiscriminator: boolean): SolidityServiceSimulation { - if (json == null) { - return json; - } - return { - - 'id': json['id'] == null ? undefined : json['id'], - 'createAt': json['createAt'] == null ? undefined : json['createAt'], - 'bundleId': json['bundleId'] == null ? undefined : json['bundleId'], - 'networkId': json['networkId'], - 'chainId': json['chainId'] == null ? undefined : json['chainId'], - 'chainSpec': SolidityServiceChainIdentifierFromJSON(json['chainSpec']), - 'to': json['to'], - 'input': json['input'], - 'blockNumber': json['blockNumber'], - 'transactionIndex': json['transactionIndex'], - 'from': json['from'], - 'gas': json['gas'], - 'gasPrice': json['gasPrice'], - 'maxFeePerGas': json['maxFeePerGas'] == null ? undefined : json['maxFeePerGas'], - 'maxPriorityFeePerGas': json['maxPriorityFeePerGas'] == null ? undefined : json['maxPriorityFeePerGas'], - 'value': json['value'], - 'accessList': json['accessList'] == null ? undefined : ((json['accessList'] as Array).map(EvmAccessListItemFromJSON)), - 'originTxHash': json['originTxHash'] == null ? undefined : json['originTxHash'], - 'label': json['label'] == null ? undefined : json['label'], - 'stateOverrides': json['stateOverrides'] == null ? undefined : (mapValues(json['stateOverrides'], SolidityServiceStateOverrideFromJSON)), - 'sourceOverrides': json['sourceOverrides'] == null ? undefined : json['sourceOverrides'], - 'blockOverride': json['blockOverride'] == null ? undefined : SolidityServiceBlockOverridesFromJSON(json['blockOverride']), - 'debugDeployment': json['debugDeployment'] == null ? undefined : json['debugDeployment'], - 'result': json['result'] == null ? undefined : SolidityServiceSimulationResultFromJSON(json['result']), - }; -} - - export function SolidityServiceSimulationToJSON(json: any): SolidityServiceSimulation { - return SolidityServiceSimulationToJSONTyped(json, false); - } + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "id", + "baseName": "id", + "type": "string", + "format": "" + }, + { + "name": "createAt", + "baseName": "createAt", + "type": "string", + "format": "" + }, + { + "name": "bundleId", + "baseName": "bundleId", + "type": "string", + "format": "" + }, + { + "name": "networkId", + "baseName": "networkId", + "type": "string", + "format": "" + }, + { + "name": "chainId", + "baseName": "chainId", + "type": "string", + "format": "" + }, + { + "name": "chainSpec", + "baseName": "chainSpec", + "type": "SolidityServiceChainIdentifier", + "format": "" + }, + { + "name": "to", + "baseName": "to", + "type": "string", + "format": "" + }, + { + "name": "input", + "baseName": "input", + "type": "string", + "format": "" + }, + { + "name": "blockNumber", + "baseName": "blockNumber", + "type": "string", + "format": "" + }, + { + "name": "transactionIndex", + "baseName": "transactionIndex", + "type": "string", + "format": "" + }, + { + "name": "_from", + "baseName": "from", + "type": "string", + "format": "" + }, + { + "name": "gas", + "baseName": "gas", + "type": "string", + "format": "" + }, + { + "name": "gasPrice", + "baseName": "gasPrice", + "type": "string", + "format": "" + }, + { + "name": "maxFeePerGas", + "baseName": "maxFeePerGas", + "type": "string", + "format": "" + }, + { + "name": "maxPriorityFeePerGas", + "baseName": "maxPriorityFeePerGas", + "type": "string", + "format": "" + }, + { + "name": "value", + "baseName": "value", + "type": "string", + "format": "" + }, + { + "name": "accessList", + "baseName": "accessList", + "type": "Array", + "format": "" + }, + { + "name": "originTxHash", + "baseName": "originTxHash", + "type": "string", + "format": "" + }, + { + "name": "label", + "baseName": "label", + "type": "string", + "format": "" + }, + { + "name": "stateOverrides", + "baseName": "stateOverrides", + "type": "{ [key: string]: SolidityServiceStateOverride; }", + "format": "" + }, + { + "name": "sourceOverrides", + "baseName": "sourceOverrides", + "type": "{ [key: string]: string; }", + "format": "" + }, + { + "name": "blockOverride", + "baseName": "blockOverride", + "type": "SolidityServiceBlockOverrides", + "format": "" + }, + { + "name": "debugDeployment", + "baseName": "debugDeployment", + "type": "boolean", + "format": "" + }, + { + "name": "result", + "baseName": "result", + "type": "SolidityServiceSimulationResult", + "format": "" + } ]; - export function SolidityServiceSimulationToJSONTyped(value?: SolidityServiceSimulation | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; + static getAttributeTypeMap() { + return SolidityServiceSimulation.attributeTypeMap; } - return { - - 'id': value['id'], - 'createAt': value['createAt'], - 'bundleId': value['bundleId'], - 'networkId': value['networkId'], - 'chainId': value['chainId'], - 'chainSpec': SolidityServiceChainIdentifierToJSON(value['chainSpec']), - 'to': value['to'], - 'input': value['input'], - 'blockNumber': value['blockNumber'], - 'transactionIndex': value['transactionIndex'], - 'from': value['from'], - 'gas': value['gas'], - 'gasPrice': value['gasPrice'], - 'maxFeePerGas': value['maxFeePerGas'], - 'maxPriorityFeePerGas': value['maxPriorityFeePerGas'], - 'value': value['value'], - 'accessList': value['accessList'] == null ? undefined : ((value['accessList'] as Array).map(EvmAccessListItemToJSON)), - 'originTxHash': value['originTxHash'], - 'label': value['label'], - 'stateOverrides': value['stateOverrides'] == null ? undefined : (mapValues(value['stateOverrides'], SolidityServiceStateOverrideToJSON)), - 'sourceOverrides': value['sourceOverrides'], - 'blockOverride': SolidityServiceBlockOverridesToJSON(value['blockOverride']), - 'debugDeployment': value['debugDeployment'], - 'result': SolidityServiceSimulationResultToJSON(value['result']), - }; + public constructor() { + } } - diff --git a/src/models/SolidityServiceSimulationResult.ts b/src/models/SolidityServiceSimulationResult.ts index 53047bc..96fd377 100755 --- a/src/models/SolidityServiceSimulationResult.ts +++ b/src/models/SolidityServiceSimulationResult.ts @@ -1,10 +1,8 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Sentio API * Sentio Open API for query data * - * The version of the OpenAPI document: version not set + * OpenAPI spec version: version not set * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -12,77 +10,36 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime.js'; -import type { EvmTransactionReceipt } from './EvmTransactionReceipt.js'; -import { - EvmTransactionReceiptFromJSON, - EvmTransactionReceiptFromJSONTyped, - EvmTransactionReceiptToJSON, - EvmTransactionReceiptToJSONTyped, -} from './EvmTransactionReceipt.js'; -import type { EvmTransaction } from './EvmTransaction.js'; -import { - EvmTransactionFromJSON, - EvmTransactionFromJSONTyped, - EvmTransactionToJSON, - EvmTransactionToJSONTyped, -} from './EvmTransaction.js'; - -/** - * - * @export - * @interface SolidityServiceSimulationResult - */ -export interface SolidityServiceSimulationResult { - /** - * - * @type {EvmTransaction} - * @memberof SolidityServiceSimulationResult - */ - transaction?: EvmTransaction; - /** - * - * @type {EvmTransactionReceipt} - * @memberof SolidityServiceSimulationResult - */ - transactionReceipt?: EvmTransactionReceipt; -} - -/** - * Check if a given object implements the SolidityServiceSimulationResult interface. - */ -export function instanceOfSolidityServiceSimulationResult(value: object): value is SolidityServiceSimulationResult { - return true; -} - -export function SolidityServiceSimulationResultFromJSON(json: any): SolidityServiceSimulationResult { - return SolidityServiceSimulationResultFromJSONTyped(json, false); -} - -export function SolidityServiceSimulationResultFromJSONTyped(json: any, ignoreDiscriminator: boolean): SolidityServiceSimulationResult { - if (json == null) { - return json; +import { EvmTransaction } from '../models/EvmTransaction.js'; +import { EvmTransactionReceipt } from '../models/EvmTransactionReceipt.js'; +import { HttpFile } from '../http/http.js'; + +export class SolidityServiceSimulationResult { + 'transaction'?: EvmTransaction; + 'transactionReceipt'?: EvmTransactionReceipt; + + static readonly discriminator: string | undefined = undefined; + + static readonly mapping: {[index: string]: string} | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "transaction", + "baseName": "transaction", + "type": "EvmTransaction", + "format": "" + }, + { + "name": "transactionReceipt", + "baseName": "transactionReceipt", + "type": "EvmTransactionReceipt", + "format": "" + } ]; + + static getAttributeTypeMap() { + return SolidityServiceSimulationResult.attributeTypeMap; } - return { - - 'transaction': json['transaction'] == null ? undefined : EvmTransactionFromJSON(json['transaction']), - 'transactionReceipt': json['transactionReceipt'] == null ? undefined : EvmTransactionReceiptFromJSON(json['transactionReceipt']), - }; -} - - export function SolidityServiceSimulationResultToJSON(json: any): SolidityServiceSimulationResult { - return SolidityServiceSimulationResultToJSONTyped(json, false); - } - export function SolidityServiceSimulationResultToJSONTyped(value?: SolidityServiceSimulationResult | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; + public constructor() { } - - return { - - 'transaction': EvmTransactionToJSON(value['transaction']), - 'transactionReceipt': EvmTransactionReceiptToJSON(value['transactionReceipt']), - }; } - diff --git a/src/models/SolidityServiceSolidityAPIServiceSimulateTransactionBody.ts b/src/models/SolidityServiceSolidityAPIServiceSimulateTransactionBody.ts index cb4e2e8..a816b25 100755 --- a/src/models/SolidityServiceSolidityAPIServiceSimulateTransactionBody.ts +++ b/src/models/SolidityServiceSolidityAPIServiceSimulateTransactionBody.ts @@ -1,10 +1,8 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Sentio API * Sentio Open API for query data * - * The version of the OpenAPI document: version not set + * OpenAPI spec version: version not set * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -12,63 +10,28 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime.js'; -import type { SolidityServiceSimulation } from './SolidityServiceSimulation.js'; -import { - SolidityServiceSimulationFromJSON, - SolidityServiceSimulationFromJSONTyped, - SolidityServiceSimulationToJSON, - SolidityServiceSimulationToJSONTyped, -} from './SolidityServiceSimulation.js'; +import { SolidityServiceSimulation } from '../models/SolidityServiceSimulation.js'; +import { HttpFile } from '../http/http.js'; -/** - * - * @export - * @interface SolidityServiceSolidityAPIServiceSimulateTransactionBody - */ -export interface SolidityServiceSolidityAPIServiceSimulateTransactionBody { - /** - * - * @type {SolidityServiceSimulation} - * @memberof SolidityServiceSolidityAPIServiceSimulateTransactionBody - */ - simulation: SolidityServiceSimulation; -} +export class SolidityServiceSolidityAPIServiceSimulateTransactionBody { + 'simulation': SolidityServiceSimulation; -/** - * Check if a given object implements the SolidityServiceSolidityAPIServiceSimulateTransactionBody interface. - */ -export function instanceOfSolidityServiceSolidityAPIServiceSimulateTransactionBody(value: object): value is SolidityServiceSolidityAPIServiceSimulateTransactionBody { - if (!('simulation' in value) || value['simulation'] === undefined) return false; - return true; -} + static readonly discriminator: string | undefined = undefined; -export function SolidityServiceSolidityAPIServiceSimulateTransactionBodyFromJSON(json: any): SolidityServiceSolidityAPIServiceSimulateTransactionBody { - return SolidityServiceSolidityAPIServiceSimulateTransactionBodyFromJSONTyped(json, false); -} - -export function SolidityServiceSolidityAPIServiceSimulateTransactionBodyFromJSONTyped(json: any, ignoreDiscriminator: boolean): SolidityServiceSolidityAPIServiceSimulateTransactionBody { - if (json == null) { - return json; - } - return { - - 'simulation': SolidityServiceSimulationFromJSON(json['simulation']), - }; -} + static readonly mapping: {[index: string]: string} | undefined = undefined; - export function SolidityServiceSolidityAPIServiceSimulateTransactionBodyToJSON(json: any): SolidityServiceSolidityAPIServiceSimulateTransactionBody { - return SolidityServiceSolidityAPIServiceSimulateTransactionBodyToJSONTyped(json, false); - } + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "simulation", + "baseName": "simulation", + "type": "SolidityServiceSimulation", + "format": "" + } ]; - export function SolidityServiceSolidityAPIServiceSimulateTransactionBodyToJSONTyped(value?: SolidityServiceSolidityAPIServiceSimulateTransactionBody | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; + static getAttributeTypeMap() { + return SolidityServiceSolidityAPIServiceSimulateTransactionBody.attributeTypeMap; } - return { - - 'simulation': SolidityServiceSimulationToJSON(value['simulation']), - }; + public constructor() { + } } - diff --git a/src/models/SolidityServiceSolidityAPIServiceSimulateTransactionBundleBody.ts b/src/models/SolidityServiceSolidityAPIServiceSimulateTransactionBundleBody.ts index 883e2ef..82ad42f 100755 --- a/src/models/SolidityServiceSolidityAPIServiceSimulateTransactionBundleBody.ts +++ b/src/models/SolidityServiceSolidityAPIServiceSimulateTransactionBundleBody.ts @@ -1,10 +1,8 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Sentio API * Sentio Open API for query data * - * The version of the OpenAPI document: version not set + * OpenAPI spec version: version not set * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -12,63 +10,31 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime.js'; -import type { SolidityServiceSimulation } from './SolidityServiceSimulation.js'; -import { - SolidityServiceSimulationFromJSON, - SolidityServiceSimulationFromJSONTyped, - SolidityServiceSimulationToJSON, - SolidityServiceSimulationToJSONTyped, -} from './SolidityServiceSimulation.js'; +import { SolidityServiceSimulation } from '../models/SolidityServiceSimulation.js'; +import { HttpFile } from '../http/http.js'; -/** - * - * @export - * @interface SolidityServiceSolidityAPIServiceSimulateTransactionBundleBody - */ -export interface SolidityServiceSolidityAPIServiceSimulateTransactionBundleBody { +export class SolidityServiceSolidityAPIServiceSimulateTransactionBundleBody { /** - * For blockNumber, transactionIndex, networkId, stateOverrides and blockOverrides fields, only the first simulation takes effect. - * @type {Array} - * @memberof SolidityServiceSolidityAPIServiceSimulateTransactionBundleBody - */ - simulations: Array; -} + * For blockNumber, transactionIndex, networkId, stateOverrides and blockOverrides fields, only the first simulation takes effect. + */ + 'simulations': Array; -/** - * Check if a given object implements the SolidityServiceSolidityAPIServiceSimulateTransactionBundleBody interface. - */ -export function instanceOfSolidityServiceSolidityAPIServiceSimulateTransactionBundleBody(value: object): value is SolidityServiceSolidityAPIServiceSimulateTransactionBundleBody { - if (!('simulations' in value) || value['simulations'] === undefined) return false; - return true; -} + static readonly discriminator: string | undefined = undefined; -export function SolidityServiceSolidityAPIServiceSimulateTransactionBundleBodyFromJSON(json: any): SolidityServiceSolidityAPIServiceSimulateTransactionBundleBody { - return SolidityServiceSolidityAPIServiceSimulateTransactionBundleBodyFromJSONTyped(json, false); -} - -export function SolidityServiceSolidityAPIServiceSimulateTransactionBundleBodyFromJSONTyped(json: any, ignoreDiscriminator: boolean): SolidityServiceSolidityAPIServiceSimulateTransactionBundleBody { - if (json == null) { - return json; - } - return { - - 'simulations': ((json['simulations'] as Array).map(SolidityServiceSimulationFromJSON)), - }; -} + static readonly mapping: {[index: string]: string} | undefined = undefined; - export function SolidityServiceSolidityAPIServiceSimulateTransactionBundleBodyToJSON(json: any): SolidityServiceSolidityAPIServiceSimulateTransactionBundleBody { - return SolidityServiceSolidityAPIServiceSimulateTransactionBundleBodyToJSONTyped(json, false); - } + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "simulations", + "baseName": "simulations", + "type": "Array", + "format": "" + } ]; - export function SolidityServiceSolidityAPIServiceSimulateTransactionBundleBodyToJSONTyped(value?: SolidityServiceSolidityAPIServiceSimulateTransactionBundleBody | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; + static getAttributeTypeMap() { + return SolidityServiceSolidityAPIServiceSimulateTransactionBundleBody.attributeTypeMap; } - return { - - 'simulations': ((value['simulations'] as Array).map(SolidityServiceSimulationToJSON)), - }; + public constructor() { + } } - diff --git a/src/models/SolidityServiceSolidityAPIServiceSimulateTransactionBundleOnForkBody.ts b/src/models/SolidityServiceSolidityAPIServiceSimulateTransactionBundleOnForkBody.ts index a160865..56b17e1 100755 --- a/src/models/SolidityServiceSolidityAPIServiceSimulateTransactionBundleOnForkBody.ts +++ b/src/models/SolidityServiceSolidityAPIServiceSimulateTransactionBundleOnForkBody.ts @@ -1,10 +1,8 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Sentio API * Sentio Open API for query data * - * The version of the OpenAPI document: version not set + * OpenAPI spec version: version not set * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -12,63 +10,31 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime.js'; -import type { SolidityServiceSimulation } from './SolidityServiceSimulation.js'; -import { - SolidityServiceSimulationFromJSON, - SolidityServiceSimulationFromJSONTyped, - SolidityServiceSimulationToJSON, - SolidityServiceSimulationToJSONTyped, -} from './SolidityServiceSimulation.js'; +import { SolidityServiceSimulation } from '../models/SolidityServiceSimulation.js'; +import { HttpFile } from '../http/http.js'; -/** - * - * @export - * @interface SolidityServiceSolidityAPIServiceSimulateTransactionBundleOnForkBody - */ -export interface SolidityServiceSolidityAPIServiceSimulateTransactionBundleOnForkBody { +export class SolidityServiceSolidityAPIServiceSimulateTransactionBundleOnForkBody { /** - * For blockNumber, transactionIndex, networkId, stateOverrides and blockOverrides fields, only the first simulation takes effect. - * @type {Array} - * @memberof SolidityServiceSolidityAPIServiceSimulateTransactionBundleOnForkBody - */ - simulations: Array; -} + * For blockNumber, transactionIndex, networkId, stateOverrides and blockOverrides fields, only the first simulation takes effect. + */ + 'simulations': Array; -/** - * Check if a given object implements the SolidityServiceSolidityAPIServiceSimulateTransactionBundleOnForkBody interface. - */ -export function instanceOfSolidityServiceSolidityAPIServiceSimulateTransactionBundleOnForkBody(value: object): value is SolidityServiceSolidityAPIServiceSimulateTransactionBundleOnForkBody { - if (!('simulations' in value) || value['simulations'] === undefined) return false; - return true; -} + static readonly discriminator: string | undefined = undefined; -export function SolidityServiceSolidityAPIServiceSimulateTransactionBundleOnForkBodyFromJSON(json: any): SolidityServiceSolidityAPIServiceSimulateTransactionBundleOnForkBody { - return SolidityServiceSolidityAPIServiceSimulateTransactionBundleOnForkBodyFromJSONTyped(json, false); -} - -export function SolidityServiceSolidityAPIServiceSimulateTransactionBundleOnForkBodyFromJSONTyped(json: any, ignoreDiscriminator: boolean): SolidityServiceSolidityAPIServiceSimulateTransactionBundleOnForkBody { - if (json == null) { - return json; - } - return { - - 'simulations': ((json['simulations'] as Array).map(SolidityServiceSimulationFromJSON)), - }; -} + static readonly mapping: {[index: string]: string} | undefined = undefined; - export function SolidityServiceSolidityAPIServiceSimulateTransactionBundleOnForkBodyToJSON(json: any): SolidityServiceSolidityAPIServiceSimulateTransactionBundleOnForkBody { - return SolidityServiceSolidityAPIServiceSimulateTransactionBundleOnForkBodyToJSONTyped(json, false); - } + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "simulations", + "baseName": "simulations", + "type": "Array", + "format": "" + } ]; - export function SolidityServiceSolidityAPIServiceSimulateTransactionBundleOnForkBodyToJSONTyped(value?: SolidityServiceSolidityAPIServiceSimulateTransactionBundleOnForkBody | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; + static getAttributeTypeMap() { + return SolidityServiceSolidityAPIServiceSimulateTransactionBundleOnForkBody.attributeTypeMap; } - return { - - 'simulations': ((value['simulations'] as Array).map(SolidityServiceSimulationToJSON)), - }; + public constructor() { + } } - diff --git a/src/models/SolidityServiceSolidityAPIServiceSimulateTransactionOnForkBody.ts b/src/models/SolidityServiceSolidityAPIServiceSimulateTransactionOnForkBody.ts index 769ca65..4fcf93a 100755 --- a/src/models/SolidityServiceSolidityAPIServiceSimulateTransactionOnForkBody.ts +++ b/src/models/SolidityServiceSolidityAPIServiceSimulateTransactionOnForkBody.ts @@ -1,10 +1,8 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Sentio API * Sentio Open API for query data * - * The version of the OpenAPI document: version not set + * OpenAPI spec version: version not set * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -12,63 +10,28 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime.js'; -import type { SolidityServiceSimulation } from './SolidityServiceSimulation.js'; -import { - SolidityServiceSimulationFromJSON, - SolidityServiceSimulationFromJSONTyped, - SolidityServiceSimulationToJSON, - SolidityServiceSimulationToJSONTyped, -} from './SolidityServiceSimulation.js'; +import { SolidityServiceSimulation } from '../models/SolidityServiceSimulation.js'; +import { HttpFile } from '../http/http.js'; -/** - * - * @export - * @interface SolidityServiceSolidityAPIServiceSimulateTransactionOnForkBody - */ -export interface SolidityServiceSolidityAPIServiceSimulateTransactionOnForkBody { - /** - * - * @type {SolidityServiceSimulation} - * @memberof SolidityServiceSolidityAPIServiceSimulateTransactionOnForkBody - */ - simulation: SolidityServiceSimulation; -} +export class SolidityServiceSolidityAPIServiceSimulateTransactionOnForkBody { + 'simulation': SolidityServiceSimulation; -/** - * Check if a given object implements the SolidityServiceSolidityAPIServiceSimulateTransactionOnForkBody interface. - */ -export function instanceOfSolidityServiceSolidityAPIServiceSimulateTransactionOnForkBody(value: object): value is SolidityServiceSolidityAPIServiceSimulateTransactionOnForkBody { - if (!('simulation' in value) || value['simulation'] === undefined) return false; - return true; -} + static readonly discriminator: string | undefined = undefined; -export function SolidityServiceSolidityAPIServiceSimulateTransactionOnForkBodyFromJSON(json: any): SolidityServiceSolidityAPIServiceSimulateTransactionOnForkBody { - return SolidityServiceSolidityAPIServiceSimulateTransactionOnForkBodyFromJSONTyped(json, false); -} - -export function SolidityServiceSolidityAPIServiceSimulateTransactionOnForkBodyFromJSONTyped(json: any, ignoreDiscriminator: boolean): SolidityServiceSolidityAPIServiceSimulateTransactionOnForkBody { - if (json == null) { - return json; - } - return { - - 'simulation': SolidityServiceSimulationFromJSON(json['simulation']), - }; -} + static readonly mapping: {[index: string]: string} | undefined = undefined; - export function SolidityServiceSolidityAPIServiceSimulateTransactionOnForkBodyToJSON(json: any): SolidityServiceSolidityAPIServiceSimulateTransactionOnForkBody { - return SolidityServiceSolidityAPIServiceSimulateTransactionOnForkBodyToJSONTyped(json, false); - } + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "simulation", + "baseName": "simulation", + "type": "SolidityServiceSimulation", + "format": "" + } ]; - export function SolidityServiceSolidityAPIServiceSimulateTransactionOnForkBodyToJSONTyped(value?: SolidityServiceSolidityAPIServiceSimulateTransactionOnForkBody | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; + static getAttributeTypeMap() { + return SolidityServiceSolidityAPIServiceSimulateTransactionOnForkBody.attributeTypeMap; } - return { - - 'simulation': SolidityServiceSimulationToJSON(value['simulation']), - }; + public constructor() { + } } - diff --git a/src/models/SolidityServiceSourceFetcherType.ts b/src/models/SolidityServiceSourceFetcherType.ts index 44e689c..f01ad19 100755 --- a/src/models/SolidityServiceSourceFetcherType.ts +++ b/src/models/SolidityServiceSourceFetcherType.ts @@ -1,10 +1,8 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Sentio API * Sentio Open API for query data * - * The version of the OpenAPI document: version not set + * OpenAPI spec version: version not set * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -12,43 +10,10 @@ * Do not edit the class manually. */ +import { HttpFile } from '../http/http.js'; -/** - * - * @export - */ -export const SolidityServiceSourceFetcherType = { - Etherscan: 'ETHERSCAN', - Blockscout: 'BLOCKSCOUT', - Oklink: 'OKLINK' -} as const; -export type SolidityServiceSourceFetcherType = typeof SolidityServiceSourceFetcherType[keyof typeof SolidityServiceSourceFetcherType]; - - -export function instanceOfSolidityServiceSourceFetcherType(value: any): boolean { - for (const key in SolidityServiceSourceFetcherType) { - if (Object.prototype.hasOwnProperty.call(SolidityServiceSourceFetcherType, key)) { - if (SolidityServiceSourceFetcherType[key as keyof typeof SolidityServiceSourceFetcherType] === value) { - return true; - } - } - } - return false; -} - -export function SolidityServiceSourceFetcherTypeFromJSON(json: any): SolidityServiceSourceFetcherType { - return SolidityServiceSourceFetcherTypeFromJSONTyped(json, false); +export enum SolidityServiceSourceFetcherType { + Etherscan = 'ETHERSCAN', + Blockscout = 'BLOCKSCOUT', + Oklink = 'OKLINK' } - -export function SolidityServiceSourceFetcherTypeFromJSONTyped(json: any, ignoreDiscriminator: boolean): SolidityServiceSourceFetcherType { - return json as SolidityServiceSourceFetcherType; -} - -export function SolidityServiceSourceFetcherTypeToJSON(value?: SolidityServiceSourceFetcherType | null): any { - return value as any; -} - -export function SolidityServiceSourceFetcherTypeToJSONTyped(value: any, ignoreDiscriminator: boolean): SolidityServiceSourceFetcherType { - return value as SolidityServiceSourceFetcherType; -} - diff --git a/src/models/SolidityServiceSourceInfo.ts b/src/models/SolidityServiceSourceInfo.ts index f2c517a..d22c2cd 100755 --- a/src/models/SolidityServiceSourceInfo.ts +++ b/src/models/SolidityServiceSourceInfo.ts @@ -1,10 +1,8 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Sentio API * Sentio Open API for query data * - * The version of the OpenAPI document: version not set + * OpenAPI spec version: version not set * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -12,70 +10,35 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime.js'; -import type { SolidityServiceCompilerOptions } from './SolidityServiceCompilerOptions.js'; -import { - SolidityServiceCompilerOptionsFromJSON, - SolidityServiceCompilerOptionsFromJSONTyped, - SolidityServiceCompilerOptionsToJSON, - SolidityServiceCompilerOptionsToJSONTyped, -} from './SolidityServiceCompilerOptions.js'; - -/** - * - * @export - * @interface SolidityServiceSourceInfo - */ -export interface SolidityServiceSourceInfo { - /** - * - * @type {string} - * @memberof SolidityServiceSourceInfo - */ - contractName?: string; - /** - * - * @type {SolidityServiceCompilerOptions} - * @memberof SolidityServiceSourceInfo - */ - options?: SolidityServiceCompilerOptions; -} - -/** - * Check if a given object implements the SolidityServiceSourceInfo interface. - */ -export function instanceOfSolidityServiceSourceInfo(value: object): value is SolidityServiceSourceInfo { - return true; -} - -export function SolidityServiceSourceInfoFromJSON(json: any): SolidityServiceSourceInfo { - return SolidityServiceSourceInfoFromJSONTyped(json, false); -} - -export function SolidityServiceSourceInfoFromJSONTyped(json: any, ignoreDiscriminator: boolean): SolidityServiceSourceInfo { - if (json == null) { - return json; +import { SolidityServiceCompilerOptions } from '../models/SolidityServiceCompilerOptions.js'; +import { HttpFile } from '../http/http.js'; + +export class SolidityServiceSourceInfo { + 'contractName'?: string; + 'options'?: SolidityServiceCompilerOptions; + + static readonly discriminator: string | undefined = undefined; + + static readonly mapping: {[index: string]: string} | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "contractName", + "baseName": "contractName", + "type": "string", + "format": "" + }, + { + "name": "options", + "baseName": "options", + "type": "SolidityServiceCompilerOptions", + "format": "" + } ]; + + static getAttributeTypeMap() { + return SolidityServiceSourceInfo.attributeTypeMap; } - return { - - 'contractName': json['contractName'] == null ? undefined : json['contractName'], - 'options': json['options'] == null ? undefined : SolidityServiceCompilerOptionsFromJSON(json['options']), - }; -} - - export function SolidityServiceSourceInfoToJSON(json: any): SolidityServiceSourceInfo { - return SolidityServiceSourceInfoToJSONTyped(json, false); - } - export function SolidityServiceSourceInfoToJSONTyped(value?: SolidityServiceSourceInfo | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; + public constructor() { } - - return { - - 'contractName': value['contractName'], - 'options': SolidityServiceCompilerOptionsToJSON(value['options']), - }; } - diff --git a/src/models/SolidityServiceSourceMultiFile.ts b/src/models/SolidityServiceSourceMultiFile.ts index c4070af..ef698b4 100755 --- a/src/models/SolidityServiceSourceMultiFile.ts +++ b/src/models/SolidityServiceSourceMultiFile.ts @@ -1,10 +1,8 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Sentio API * Sentio Open API for query data * - * The version of the OpenAPI document: version not set + * OpenAPI spec version: version not set * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -12,62 +10,34 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime.js'; -/** - * - * @export - * @interface SolidityServiceSourceMultiFile - */ -export interface SolidityServiceSourceMultiFile { - /** - * - * @type {{ [key: string]: string; }} - * @memberof SolidityServiceSourceMultiFile - */ - source?: { [key: string]: string; }; - /** - * - * @type {string} - * @memberof SolidityServiceSourceMultiFile - */ - compilerSettings?: string; -} +import { HttpFile } from '../http/http.js'; -/** - * Check if a given object implements the SolidityServiceSourceMultiFile interface. - */ -export function instanceOfSolidityServiceSourceMultiFile(value: object): value is SolidityServiceSourceMultiFile { - return true; -} +export class SolidityServiceSourceMultiFile { + 'source'?: { [key: string]: string; }; + 'compilerSettings'?: string; -export function SolidityServiceSourceMultiFileFromJSON(json: any): SolidityServiceSourceMultiFile { - return SolidityServiceSourceMultiFileFromJSONTyped(json, false); -} + static readonly discriminator: string | undefined = undefined; -export function SolidityServiceSourceMultiFileFromJSONTyped(json: any, ignoreDiscriminator: boolean): SolidityServiceSourceMultiFile { - if (json == null) { - return json; - } - return { - - 'source': json['source'] == null ? undefined : json['source'], - 'compilerSettings': json['compilerSettings'] == null ? undefined : json['compilerSettings'], - }; -} + static readonly mapping: {[index: string]: string} | undefined = undefined; - export function SolidityServiceSourceMultiFileToJSON(json: any): SolidityServiceSourceMultiFile { - return SolidityServiceSourceMultiFileToJSONTyped(json, false); - } + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "source", + "baseName": "source", + "type": "{ [key: string]: string; }", + "format": "" + }, + { + "name": "compilerSettings", + "baseName": "compilerSettings", + "type": "string", + "format": "" + } ]; - export function SolidityServiceSourceMultiFileToJSONTyped(value?: SolidityServiceSourceMultiFile | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; + static getAttributeTypeMap() { + return SolidityServiceSourceMultiFile.attributeTypeMap; } - return { - - 'source': value['source'], - 'compilerSettings': value['compilerSettings'], - }; + public constructor() { + } } - diff --git a/src/models/SolidityServiceSourceSpec.ts b/src/models/SolidityServiceSourceSpec.ts index b4bebff..a0f3b94 100755 --- a/src/models/SolidityServiceSourceSpec.ts +++ b/src/models/SolidityServiceSourceSpec.ts @@ -1,10 +1,8 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Sentio API * Sentio Open API for query data * - * The version of the OpenAPI document: version not set + * OpenAPI spec version: version not set * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -12,110 +10,70 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime.js'; -import type { SolidityServiceSourceMultiFile } from './SolidityServiceSourceMultiFile.js'; -import { - SolidityServiceSourceMultiFileFromJSON, - SolidityServiceSourceMultiFileFromJSONTyped, - SolidityServiceSourceMultiFileToJSON, - SolidityServiceSourceMultiFileToJSONTyped, -} from './SolidityServiceSourceMultiFile.js'; +import { SolidityServiceSourceMultiFile } from '../models/SolidityServiceSourceMultiFile.js'; +import { HttpFile } from '../http/http.js'; -/** - * - * @export - * @interface SolidityServiceSourceSpec - */ -export interface SolidityServiceSourceSpec { - /** - * - * @type {string} - * @memberof SolidityServiceSourceSpec - */ - id?: string; - /** - * - * @type {SolidityServiceSourceMultiFile} - * @memberof SolidityServiceSourceSpec - */ - multiFile?: SolidityServiceSourceMultiFile; - /** - * - * @type {object} - * @memberof SolidityServiceSourceSpec - */ - standardJson?: object; - /** - * - * @type {object} - * @memberof SolidityServiceSourceSpec - */ - metadata?: object; - /** - * - * @type {string} - * @memberof SolidityServiceSourceSpec - */ - solidityVersion?: string; - /** - * - * @type {string} - * @memberof SolidityServiceSourceSpec - */ - contractName?: string; - /** - * - * @type {string} - * @memberof SolidityServiceSourceSpec - */ - constructorArgs?: string; -} +export class SolidityServiceSourceSpec { + 'id'?: string; + 'multiFile'?: SolidityServiceSourceMultiFile; + 'standardJson'?: any; + 'metadata'?: any; + 'solidityVersion'?: string; + 'contractName'?: string; + 'constructorArgs'?: string; -/** - * Check if a given object implements the SolidityServiceSourceSpec interface. - */ -export function instanceOfSolidityServiceSourceSpec(value: object): value is SolidityServiceSourceSpec { - return true; -} + static readonly discriminator: string | undefined = undefined; -export function SolidityServiceSourceSpecFromJSON(json: any): SolidityServiceSourceSpec { - return SolidityServiceSourceSpecFromJSONTyped(json, false); -} - -export function SolidityServiceSourceSpecFromJSONTyped(json: any, ignoreDiscriminator: boolean): SolidityServiceSourceSpec { - if (json == null) { - return json; - } - return { - - 'id': json['id'] == null ? undefined : json['id'], - 'multiFile': json['multiFile'] == null ? undefined : SolidityServiceSourceMultiFileFromJSON(json['multiFile']), - 'standardJson': json['standardJson'] == null ? undefined : json['standardJson'], - 'metadata': json['metadata'] == null ? undefined : json['metadata'], - 'solidityVersion': json['solidityVersion'] == null ? undefined : json['solidityVersion'], - 'contractName': json['contractName'] == null ? undefined : json['contractName'], - 'constructorArgs': json['constructorArgs'] == null ? undefined : json['constructorArgs'], - }; -} + static readonly mapping: {[index: string]: string} | undefined = undefined; - export function SolidityServiceSourceSpecToJSON(json: any): SolidityServiceSourceSpec { - return SolidityServiceSourceSpecToJSONTyped(json, false); - } + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "id", + "baseName": "id", + "type": "string", + "format": "" + }, + { + "name": "multiFile", + "baseName": "multiFile", + "type": "SolidityServiceSourceMultiFile", + "format": "" + }, + { + "name": "standardJson", + "baseName": "standardJson", + "type": "any", + "format": "" + }, + { + "name": "metadata", + "baseName": "metadata", + "type": "any", + "format": "" + }, + { + "name": "solidityVersion", + "baseName": "solidityVersion", + "type": "string", + "format": "" + }, + { + "name": "contractName", + "baseName": "contractName", + "type": "string", + "format": "" + }, + { + "name": "constructorArgs", + "baseName": "constructorArgs", + "type": "string", + "format": "" + } ]; - export function SolidityServiceSourceSpecToJSONTyped(value?: SolidityServiceSourceSpec | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; + static getAttributeTypeMap() { + return SolidityServiceSourceSpec.attributeTypeMap; } - return { - - 'id': value['id'], - 'multiFile': SolidityServiceSourceMultiFileToJSON(value['multiFile']), - 'standardJson': value['standardJson'], - 'metadata': value['metadata'], - 'solidityVersion': value['solidityVersion'], - 'contractName': value['contractName'], - 'constructorArgs': value['constructorArgs'], - }; + public constructor() { + } } - diff --git a/src/models/SolidityServiceSpecializations.ts b/src/models/SolidityServiceSpecializations.ts index 8c0bb12..0b84261 100755 --- a/src/models/SolidityServiceSpecializations.ts +++ b/src/models/SolidityServiceSpecializations.ts @@ -1,10 +1,8 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Sentio API * Sentio Open API for query data * - * The version of the OpenAPI document: version not set + * OpenAPI spec version: version not set * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -12,54 +10,27 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime.js'; -/** - * - * @export - * @interface SolidityServiceSpecializations - */ -export interface SolidityServiceSpecializations { - /** - * - * @type {string} - * @memberof SolidityServiceSpecializations - */ - constructorArguments?: string; -} +import { HttpFile } from '../http/http.js'; -/** - * Check if a given object implements the SolidityServiceSpecializations interface. - */ -export function instanceOfSolidityServiceSpecializations(value: object): value is SolidityServiceSpecializations { - return true; -} +export class SolidityServiceSpecializations { + 'constructorArguments'?: string; -export function SolidityServiceSpecializationsFromJSON(json: any): SolidityServiceSpecializations { - return SolidityServiceSpecializationsFromJSONTyped(json, false); -} + static readonly discriminator: string | undefined = undefined; -export function SolidityServiceSpecializationsFromJSONTyped(json: any, ignoreDiscriminator: boolean): SolidityServiceSpecializations { - if (json == null) { - return json; - } - return { - - 'constructorArguments': json['constructorArguments'] == null ? undefined : json['constructorArguments'], - }; -} + static readonly mapping: {[index: string]: string} | undefined = undefined; - export function SolidityServiceSpecializationsToJSON(json: any): SolidityServiceSpecializations { - return SolidityServiceSpecializationsToJSONTyped(json, false); - } + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "constructorArguments", + "baseName": "constructorArguments", + "type": "string", + "format": "" + } ]; - export function SolidityServiceSpecializationsToJSONTyped(value?: SolidityServiceSpecializations | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; + static getAttributeTypeMap() { + return SolidityServiceSpecializations.attributeTypeMap; } - return { - - 'constructorArguments': value['constructorArguments'], - }; + public constructor() { + } } - diff --git a/src/models/SolidityServiceStateOverride.ts b/src/models/SolidityServiceStateOverride.ts index 41cdf40..0b7b6f1 100755 --- a/src/models/SolidityServiceStateOverride.ts +++ b/src/models/SolidityServiceStateOverride.ts @@ -1,10 +1,8 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Sentio API * Sentio Open API for query data * - * The version of the OpenAPI document: version not set + * OpenAPI spec version: version not set * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -12,70 +10,44 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime.js'; -/** - * - * @export - * @interface SolidityServiceStateOverride - */ -export interface SolidityServiceStateOverride { - /** - * - * @type {{ [key: string]: string; }} - * @memberof SolidityServiceStateOverride - */ - state?: { [key: string]: string; }; - /** - * uint256 - * @type {string} - * @memberof SolidityServiceStateOverride - */ - balance?: string; - /** - * - * @type {string} - * @memberof SolidityServiceStateOverride - */ - code?: string; -} - -/** - * Check if a given object implements the SolidityServiceStateOverride interface. - */ -export function instanceOfSolidityServiceStateOverride(value: object): value is SolidityServiceStateOverride { - return true; -} +import { HttpFile } from '../http/http.js'; -export function SolidityServiceStateOverrideFromJSON(json: any): SolidityServiceStateOverride { - return SolidityServiceStateOverrideFromJSONTyped(json, false); -} - -export function SolidityServiceStateOverrideFromJSONTyped(json: any, ignoreDiscriminator: boolean): SolidityServiceStateOverride { - if (json == null) { - return json; +export class SolidityServiceStateOverride { + 'state'?: { [key: string]: string; }; + /** + * uint256 + */ + 'balance'?: string; + 'code'?: string; + + static readonly discriminator: string | undefined = undefined; + + static readonly mapping: {[index: string]: string} | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "state", + "baseName": "state", + "type": "{ [key: string]: string; }", + "format": "" + }, + { + "name": "balance", + "baseName": "balance", + "type": "string", + "format": "" + }, + { + "name": "code", + "baseName": "code", + "type": "string", + "format": "" + } ]; + + static getAttributeTypeMap() { + return SolidityServiceStateOverride.attributeTypeMap; } - return { - - 'state': json['state'] == null ? undefined : json['state'], - 'balance': json['balance'] == null ? undefined : json['balance'], - 'code': json['code'] == null ? undefined : json['code'], - }; -} - - export function SolidityServiceStateOverrideToJSON(json: any): SolidityServiceStateOverride { - return SolidityServiceStateOverrideToJSONTyped(json, false); - } - export function SolidityServiceStateOverrideToJSONTyped(value?: SolidityServiceStateOverride | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; + public constructor() { } - - return { - - 'state': value['state'], - 'balance': value['balance'], - 'code': value['code'], - }; } - diff --git a/src/models/SolidityServiceStorageSummaryResult.ts b/src/models/SolidityServiceStorageSummaryResult.ts index 730150e..efa1217 100755 --- a/src/models/SolidityServiceStorageSummaryResult.ts +++ b/src/models/SolidityServiceStorageSummaryResult.ts @@ -1,10 +1,8 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Sentio API * Sentio Open API for query data * - * The version of the OpenAPI document: version not set + * OpenAPI spec version: version not set * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -12,70 +10,41 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime.js'; -/** - * - * @export - * @interface SolidityServiceStorageSummaryResult - */ -export interface SolidityServiceStorageSummaryResult { - /** - * - * @type {string} - * @memberof SolidityServiceStorageSummaryResult - */ - address?: string; - /** - * - * @type {string} - * @memberof SolidityServiceStorageSummaryResult - */ - codeAddress?: string; - /** - * - * @type {Array} - * @memberof SolidityServiceStorageSummaryResult - */ - stateVariables?: Array; -} - -/** - * Check if a given object implements the SolidityServiceStorageSummaryResult interface. - */ -export function instanceOfSolidityServiceStorageSummaryResult(value: object): value is SolidityServiceStorageSummaryResult { - return true; -} - -export function SolidityServiceStorageSummaryResultFromJSON(json: any): SolidityServiceStorageSummaryResult { - return SolidityServiceStorageSummaryResultFromJSONTyped(json, false); -} - -export function SolidityServiceStorageSummaryResultFromJSONTyped(json: any, ignoreDiscriminator: boolean): SolidityServiceStorageSummaryResult { - if (json == null) { - return json; +import { HttpFile } from '../http/http.js'; + +export class SolidityServiceStorageSummaryResult { + 'address'?: string; + 'codeAddress'?: string; + 'stateVariables'?: Array; + + static readonly discriminator: string | undefined = undefined; + + static readonly mapping: {[index: string]: string} | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "address", + "baseName": "address", + "type": "string", + "format": "" + }, + { + "name": "codeAddress", + "baseName": "codeAddress", + "type": "string", + "format": "" + }, + { + "name": "stateVariables", + "baseName": "stateVariables", + "type": "Array", + "format": "" + } ]; + + static getAttributeTypeMap() { + return SolidityServiceStorageSummaryResult.attributeTypeMap; } - return { - - 'address': json['address'] == null ? undefined : json['address'], - 'codeAddress': json['codeAddress'] == null ? undefined : json['codeAddress'], - 'stateVariables': json['stateVariables'] == null ? undefined : json['stateVariables'], - }; -} - export function SolidityServiceStorageSummaryResultToJSON(json: any): SolidityServiceStorageSummaryResult { - return SolidityServiceStorageSummaryResultToJSONTyped(json, false); - } - - export function SolidityServiceStorageSummaryResultToJSONTyped(value?: SolidityServiceStorageSummaryResult | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; + public constructor() { } - - return { - - 'address': value['address'], - 'codeAddress': value['codeAddress'], - 'stateVariables': value['stateVariables'], - }; } - diff --git a/src/models/SolidityServiceUpdateForkResponse.ts b/src/models/SolidityServiceUpdateForkResponse.ts index 56a06ab..8ad5ca5 100755 --- a/src/models/SolidityServiceUpdateForkResponse.ts +++ b/src/models/SolidityServiceUpdateForkResponse.ts @@ -1,10 +1,8 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Sentio API * Sentio Open API for query data * - * The version of the OpenAPI document: version not set + * OpenAPI spec version: version not set * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -12,62 +10,28 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime.js'; -import type { SolidityServiceFork } from './SolidityServiceFork.js'; -import { - SolidityServiceForkFromJSON, - SolidityServiceForkFromJSONTyped, - SolidityServiceForkToJSON, - SolidityServiceForkToJSONTyped, -} from './SolidityServiceFork.js'; +import { SolidityServiceFork } from '../models/SolidityServiceFork.js'; +import { HttpFile } from '../http/http.js'; -/** - * - * @export - * @interface SolidityServiceUpdateForkResponse - */ -export interface SolidityServiceUpdateForkResponse { - /** - * - * @type {SolidityServiceFork} - * @memberof SolidityServiceUpdateForkResponse - */ - fork?: SolidityServiceFork; -} +export class SolidityServiceUpdateForkResponse { + 'fork'?: SolidityServiceFork; -/** - * Check if a given object implements the SolidityServiceUpdateForkResponse interface. - */ -export function instanceOfSolidityServiceUpdateForkResponse(value: object): value is SolidityServiceUpdateForkResponse { - return true; -} + static readonly discriminator: string | undefined = undefined; -export function SolidityServiceUpdateForkResponseFromJSON(json: any): SolidityServiceUpdateForkResponse { - return SolidityServiceUpdateForkResponseFromJSONTyped(json, false); -} - -export function SolidityServiceUpdateForkResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): SolidityServiceUpdateForkResponse { - if (json == null) { - return json; - } - return { - - 'fork': json['fork'] == null ? undefined : SolidityServiceForkFromJSON(json['fork']), - }; -} + static readonly mapping: {[index: string]: string} | undefined = undefined; - export function SolidityServiceUpdateForkResponseToJSON(json: any): SolidityServiceUpdateForkResponse { - return SolidityServiceUpdateForkResponseToJSONTyped(json, false); - } + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "fork", + "baseName": "fork", + "type": "SolidityServiceFork", + "format": "" + } ]; - export function SolidityServiceUpdateForkResponseToJSONTyped(value?: SolidityServiceUpdateForkResponse | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; + static getAttributeTypeMap() { + return SolidityServiceUpdateForkResponse.attributeTypeMap; } - return { - - 'fork': SolidityServiceForkToJSON(value['fork']), - }; + public constructor() { + } } - diff --git a/src/models/TxindexEvmRawTransaction.ts b/src/models/TxindexEvmRawTransaction.ts index 255ecc7..abcc8d7 100755 --- a/src/models/TxindexEvmRawTransaction.ts +++ b/src/models/TxindexEvmRawTransaction.ts @@ -1,10 +1,8 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Sentio API * Sentio Open API for query data * - * The version of the OpenAPI document: version not set + * OpenAPI spec version: version not set * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -12,142 +10,98 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime.js'; -import type { EvmTransaction } from './EvmTransaction.js'; -import { - EvmTransactionFromJSON, - EvmTransactionFromJSONTyped, - EvmTransactionToJSON, - EvmTransactionToJSONTyped, -} from './EvmTransaction.js'; +import { EvmTransaction } from '../models/EvmTransaction.js'; +import { HttpFile } from '../http/http.js'; -/** - * - * @export - * @interface TxindexEvmRawTransaction - */ -export interface TxindexEvmRawTransaction { - /** - * - * @type {string} - * @memberof TxindexEvmRawTransaction - */ - hash?: string; - /** - * - * @type {string} - * @memberof TxindexEvmRawTransaction - */ - blockNumber?: string; - /** - * - * @type {boolean} - * @memberof TxindexEvmRawTransaction - */ - isIn?: boolean; - /** - * - * @type {boolean} - * @memberof TxindexEvmRawTransaction - */ - trace?: boolean; - /** - * - * @type {EvmTransaction} - * @memberof TxindexEvmRawTransaction - */ - tx?: EvmTransaction; - /** - * - * @type {string} - * @memberof TxindexEvmRawTransaction - */ - json?: string; - /** - * - * @type {string} - * @memberof TxindexEvmRawTransaction - */ - timestamp?: string; - /** - * - * @type {number} - * @memberof TxindexEvmRawTransaction - */ - transactionStatus?: number; - /** - * - * @type {string} - * @memberof TxindexEvmRawTransaction - */ - methodSignature?: string; - /** - * - * @type {string} - * @memberof TxindexEvmRawTransaction - */ - methodSignatureText?: string; - /** - * - * @type {string} - * @memberof TxindexEvmRawTransaction - */ - abiItem?: string; -} +export class TxindexEvmRawTransaction { + 'hash'?: string; + 'blockNumber'?: string; + 'isIn'?: boolean; + 'trace'?: boolean; + 'tx'?: EvmTransaction; + 'json'?: string; + 'timestamp'?: string; + 'transactionStatus'?: number; + 'methodSignature'?: string; + 'methodSignatureText'?: string; + 'abiItem'?: string; -/** - * Check if a given object implements the TxindexEvmRawTransaction interface. - */ -export function instanceOfTxindexEvmRawTransaction(value: object): value is TxindexEvmRawTransaction { - return true; -} + static readonly discriminator: string | undefined = undefined; -export function TxindexEvmRawTransactionFromJSON(json: any): TxindexEvmRawTransaction { - return TxindexEvmRawTransactionFromJSONTyped(json, false); -} - -export function TxindexEvmRawTransactionFromJSONTyped(json: any, ignoreDiscriminator: boolean): TxindexEvmRawTransaction { - if (json == null) { - return json; - } - return { - - 'hash': json['hash'] == null ? undefined : json['hash'], - 'blockNumber': json['blockNumber'] == null ? undefined : json['blockNumber'], - 'isIn': json['isIn'] == null ? undefined : json['isIn'], - 'trace': json['trace'] == null ? undefined : json['trace'], - 'tx': json['tx'] == null ? undefined : EvmTransactionFromJSON(json['tx']), - 'json': json['json'] == null ? undefined : json['json'], - 'timestamp': json['timestamp'] == null ? undefined : json['timestamp'], - 'transactionStatus': json['transactionStatus'] == null ? undefined : json['transactionStatus'], - 'methodSignature': json['methodSignature'] == null ? undefined : json['methodSignature'], - 'methodSignatureText': json['methodSignatureText'] == null ? undefined : json['methodSignatureText'], - 'abiItem': json['abiItem'] == null ? undefined : json['abiItem'], - }; -} + static readonly mapping: {[index: string]: string} | undefined = undefined; - export function TxindexEvmRawTransactionToJSON(json: any): TxindexEvmRawTransaction { - return TxindexEvmRawTransactionToJSONTyped(json, false); - } + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "hash", + "baseName": "hash", + "type": "string", + "format": "" + }, + { + "name": "blockNumber", + "baseName": "blockNumber", + "type": "string", + "format": "int64" + }, + { + "name": "isIn", + "baseName": "isIn", + "type": "boolean", + "format": "" + }, + { + "name": "trace", + "baseName": "trace", + "type": "boolean", + "format": "" + }, + { + "name": "tx", + "baseName": "tx", + "type": "EvmTransaction", + "format": "" + }, + { + "name": "json", + "baseName": "json", + "type": "string", + "format": "" + }, + { + "name": "timestamp", + "baseName": "timestamp", + "type": "string", + "format": "int64" + }, + { + "name": "transactionStatus", + "baseName": "transactionStatus", + "type": "number", + "format": "int32" + }, + { + "name": "methodSignature", + "baseName": "methodSignature", + "type": "string", + "format": "" + }, + { + "name": "methodSignatureText", + "baseName": "methodSignatureText", + "type": "string", + "format": "" + }, + { + "name": "abiItem", + "baseName": "abiItem", + "type": "string", + "format": "" + } ]; - export function TxindexEvmRawTransactionToJSONTyped(value?: TxindexEvmRawTransaction | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; + static getAttributeTypeMap() { + return TxindexEvmRawTransaction.attributeTypeMap; } - return { - - 'hash': value['hash'], - 'blockNumber': value['blockNumber'], - 'isIn': value['isIn'], - 'trace': value['trace'], - 'tx': EvmTransactionToJSON(value['tx']), - 'json': value['json'], - 'timestamp': value['timestamp'], - 'transactionStatus': value['transactionStatus'], - 'methodSignature': value['methodSignature'], - 'methodSignatureText': value['methodSignatureText'], - 'abiItem': value['abiItem'], - }; + public constructor() { + } } - diff --git a/src/models/TxindexEvmSearchTransactionsResponse.ts b/src/models/TxindexEvmSearchTransactionsResponse.ts index 2219eb7..e4860db 100755 --- a/src/models/TxindexEvmSearchTransactionsResponse.ts +++ b/src/models/TxindexEvmSearchTransactionsResponse.ts @@ -1,10 +1,8 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Sentio API * Sentio Open API for query data * - * The version of the OpenAPI document: version not set + * OpenAPI spec version: version not set * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -12,70 +10,35 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime.js'; -import type { TxindexEvmRawTransaction } from './TxindexEvmRawTransaction.js'; -import { - TxindexEvmRawTransactionFromJSON, - TxindexEvmRawTransactionFromJSONTyped, - TxindexEvmRawTransactionToJSON, - TxindexEvmRawTransactionToJSONTyped, -} from './TxindexEvmRawTransaction.js'; - -/** - * - * @export - * @interface TxindexEvmSearchTransactionsResponse - */ -export interface TxindexEvmSearchTransactionsResponse { - /** - * - * @type {Array} - * @memberof TxindexEvmSearchTransactionsResponse - */ - transactions?: Array; - /** - * - * @type {string} - * @memberof TxindexEvmSearchTransactionsResponse - */ - nextPageToken?: string; -} - -/** - * Check if a given object implements the TxindexEvmSearchTransactionsResponse interface. - */ -export function instanceOfTxindexEvmSearchTransactionsResponse(value: object): value is TxindexEvmSearchTransactionsResponse { - return true; -} - -export function TxindexEvmSearchTransactionsResponseFromJSON(json: any): TxindexEvmSearchTransactionsResponse { - return TxindexEvmSearchTransactionsResponseFromJSONTyped(json, false); -} - -export function TxindexEvmSearchTransactionsResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): TxindexEvmSearchTransactionsResponse { - if (json == null) { - return json; +import { TxindexEvmRawTransaction } from '../models/TxindexEvmRawTransaction.js'; +import { HttpFile } from '../http/http.js'; + +export class TxindexEvmSearchTransactionsResponse { + 'transactions'?: Array; + 'nextPageToken'?: string; + + static readonly discriminator: string | undefined = undefined; + + static readonly mapping: {[index: string]: string} | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "transactions", + "baseName": "transactions", + "type": "Array", + "format": "" + }, + { + "name": "nextPageToken", + "baseName": "nextPageToken", + "type": "string", + "format": "byte" + } ]; + + static getAttributeTypeMap() { + return TxindexEvmSearchTransactionsResponse.attributeTypeMap; } - return { - - 'transactions': json['transactions'] == null ? undefined : ((json['transactions'] as Array).map(TxindexEvmRawTransactionFromJSON)), - 'nextPageToken': json['nextPageToken'] == null ? undefined : json['nextPageToken'], - }; -} - - export function TxindexEvmSearchTransactionsResponseToJSON(json: any): TxindexEvmSearchTransactionsResponse { - return TxindexEvmSearchTransactionsResponseToJSONTyped(json, false); - } - export function TxindexEvmSearchTransactionsResponseToJSONTyped(value?: TxindexEvmSearchTransactionsResponse | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; + public constructor() { } - - return { - - 'transactions': value['transactions'] == null ? undefined : ((value['transactions'] as Array).map(TxindexEvmRawTransactionToJSON)), - 'nextPageToken': value['nextPageToken'], - }; } - diff --git a/src/models/WebServiceChart.ts b/src/models/WebServiceChart.ts index 013ff33..de1d25c 100755 --- a/src/models/WebServiceChart.ts +++ b/src/models/WebServiceChart.ts @@ -1,10 +1,8 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Sentio API * Sentio Open API for query data * - * The version of the OpenAPI document: version not set + * OpenAPI spec version: version not set * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -12,207 +10,109 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime.js'; -import type { WebServiceChartConfig } from './WebServiceChartConfig.js'; -import { - WebServiceChartConfigFromJSON, - WebServiceChartConfigFromJSONTyped, - WebServiceChartConfigToJSON, - WebServiceChartConfigToJSONTyped, -} from './WebServiceChartConfig.js'; -import type { CommonQuery } from './CommonQuery.js'; -import { - CommonQueryFromJSON, - CommonQueryFromJSONTyped, - CommonQueryToJSON, - CommonQueryToJSONTyped, -} from './CommonQuery.js'; -import type { CommonFormula } from './CommonFormula.js'; -import { - CommonFormulaFromJSON, - CommonFormulaFromJSONTyped, - CommonFormulaToJSON, - CommonFormulaToJSONTyped, -} from './CommonFormula.js'; -import type { CommonSegmentationQuery } from './CommonSegmentationQuery.js'; -import { - CommonSegmentationQueryFromJSON, - CommonSegmentationQueryFromJSONTyped, - CommonSegmentationQueryToJSON, - CommonSegmentationQueryToJSONTyped, -} from './CommonSegmentationQuery.js'; -import type { WebServiceChartDataSourceType } from './WebServiceChartDataSourceType.js'; -import { - WebServiceChartDataSourceTypeFromJSON, - WebServiceChartDataSourceTypeFromJSONTyped, - WebServiceChartDataSourceTypeToJSON, - WebServiceChartDataSourceTypeToJSONTyped, -} from './WebServiceChartDataSourceType.js'; -import type { WebServiceEventLogsConfig } from './WebServiceEventLogsConfig.js'; -import { - WebServiceEventLogsConfigFromJSON, - WebServiceEventLogsConfigFromJSONTyped, - WebServiceEventLogsConfigToJSON, - WebServiceEventLogsConfigToJSONTyped, -} from './WebServiceEventLogsConfig.js'; -import type { WebServiceNote } from './WebServiceNote.js'; -import { - WebServiceNoteFromJSON, - WebServiceNoteFromJSONTyped, - WebServiceNoteToJSON, - WebServiceNoteToJSONTyped, -} from './WebServiceNote.js'; -import type { CommonRetentionQuery } from './CommonRetentionQuery.js'; -import { - CommonRetentionQueryFromJSON, - CommonRetentionQueryFromJSONTyped, - CommonRetentionQueryToJSON, - CommonRetentionQueryToJSONTyped, -} from './CommonRetentionQuery.js'; -import type { WebServiceChartChartType } from './WebServiceChartChartType.js'; -import { - WebServiceChartChartTypeFromJSON, - WebServiceChartChartTypeFromJSONTyped, - WebServiceChartChartTypeToJSON, - WebServiceChartChartTypeToJSONTyped, -} from './WebServiceChartChartType.js'; -import type { InsightsServiceQueryRequestQuery } from './InsightsServiceQueryRequestQuery.js'; -import { - InsightsServiceQueryRequestQueryFromJSON, - InsightsServiceQueryRequestQueryFromJSONTyped, - InsightsServiceQueryRequestQueryToJSON, - InsightsServiceQueryRequestQueryToJSONTyped, -} from './InsightsServiceQueryRequestQuery.js'; +import { CommonFormula } from '../models/CommonFormula.js'; +import { CommonQuery } from '../models/CommonQuery.js'; +import { CommonRetentionQuery } from '../models/CommonRetentionQuery.js'; +import { CommonSegmentationQuery } from '../models/CommonSegmentationQuery.js'; +import { InsightsServiceQueryRequestQuery } from '../models/InsightsServiceQueryRequestQuery.js'; +import { WebServiceChartChartType } from '../models/WebServiceChartChartType.js'; +import { WebServiceChartConfig } from '../models/WebServiceChartConfig.js'; +import { WebServiceChartDataSourceType } from '../models/WebServiceChartDataSourceType.js'; +import { WebServiceEventLogsConfig } from '../models/WebServiceEventLogsConfig.js'; +import { WebServiceNote } from '../models/WebServiceNote.js'; +import { HttpFile } from '../http/http.js'; -/** - * - * @export - * @interface WebServiceChart - */ -export interface WebServiceChart { - /** - * - * @type {WebServiceChartChartType} - * @memberof WebServiceChart - */ - type?: WebServiceChartChartType; - /** - * - * @type {Array} - * @memberof WebServiceChart - */ - queries?: Array; - /** - * - * @type {Array} - * @memberof WebServiceChart - */ - formulas?: Array; - /** - * - * @type {WebServiceChartConfig} - * @memberof WebServiceChart - */ - config?: WebServiceChartConfig; - /** - * - * @type {WebServiceNote} - * @memberof WebServiceChart - */ - note?: WebServiceNote; - /** - * - * @type {WebServiceChartDataSourceType} - * @memberof WebServiceChart - */ - datasourceType?: WebServiceChartDataSourceType; - /** - * - * @type {Array} - * @memberof WebServiceChart - */ - segmentationQueries?: Array; - /** - * - * @type {Array} - * @memberof WebServiceChart - */ - insightsQueries?: Array; - /** - * - * @type {WebServiceEventLogsConfig} - * @memberof WebServiceChart - */ - eventLogsConfig?: WebServiceEventLogsConfig; - /** - * - * @type {CommonRetentionQuery} - * @memberof WebServiceChart - */ - retentionQuery?: CommonRetentionQuery; - /** - * - * @type {string} - * @memberof WebServiceChart - */ - sqlQuery?: string; -} +export class WebServiceChart { + 'type'?: WebServiceChartChartType; + 'queries'?: Array; + 'formulas'?: Array; + 'config'?: WebServiceChartConfig; + 'note'?: WebServiceNote; + 'datasourceType'?: WebServiceChartDataSourceType; + 'segmentationQueries'?: Array; + 'insightsQueries'?: Array; + 'eventLogsConfig'?: WebServiceEventLogsConfig; + 'retentionQuery'?: CommonRetentionQuery; + 'sqlQuery'?: string; + static readonly discriminator: string | undefined = undefined; + static readonly mapping: {[index: string]: string} | undefined = undefined; -/** - * Check if a given object implements the WebServiceChart interface. - */ -export function instanceOfWebServiceChart(value: object): value is WebServiceChart { - return true; -} + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "type", + "baseName": "type", + "type": "WebServiceChartChartType", + "format": "" + }, + { + "name": "queries", + "baseName": "queries", + "type": "Array", + "format": "" + }, + { + "name": "formulas", + "baseName": "formulas", + "type": "Array", + "format": "" + }, + { + "name": "config", + "baseName": "config", + "type": "WebServiceChartConfig", + "format": "" + }, + { + "name": "note", + "baseName": "note", + "type": "WebServiceNote", + "format": "" + }, + { + "name": "datasourceType", + "baseName": "datasourceType", + "type": "WebServiceChartDataSourceType", + "format": "" + }, + { + "name": "segmentationQueries", + "baseName": "segmentationQueries", + "type": "Array", + "format": "" + }, + { + "name": "insightsQueries", + "baseName": "insightsQueries", + "type": "Array", + "format": "" + }, + { + "name": "eventLogsConfig", + "baseName": "eventLogsConfig", + "type": "WebServiceEventLogsConfig", + "format": "" + }, + { + "name": "retentionQuery", + "baseName": "retentionQuery", + "type": "CommonRetentionQuery", + "format": "" + }, + { + "name": "sqlQuery", + "baseName": "sqlQuery", + "type": "string", + "format": "" + } ]; -export function WebServiceChartFromJSON(json: any): WebServiceChart { - return WebServiceChartFromJSONTyped(json, false); -} - -export function WebServiceChartFromJSONTyped(json: any, ignoreDiscriminator: boolean): WebServiceChart { - if (json == null) { - return json; + static getAttributeTypeMap() { + return WebServiceChart.attributeTypeMap; } - return { - - 'type': json['type'] == null ? undefined : WebServiceChartChartTypeFromJSON(json['type']), - 'queries': json['queries'] == null ? undefined : ((json['queries'] as Array).map(CommonQueryFromJSON)), - 'formulas': json['formulas'] == null ? undefined : ((json['formulas'] as Array).map(CommonFormulaFromJSON)), - 'config': json['config'] == null ? undefined : WebServiceChartConfigFromJSON(json['config']), - 'note': json['note'] == null ? undefined : WebServiceNoteFromJSON(json['note']), - 'datasourceType': json['datasourceType'] == null ? undefined : WebServiceChartDataSourceTypeFromJSON(json['datasourceType']), - 'segmentationQueries': json['segmentationQueries'] == null ? undefined : ((json['segmentationQueries'] as Array).map(CommonSegmentationQueryFromJSON)), - 'insightsQueries': json['insightsQueries'] == null ? undefined : ((json['insightsQueries'] as Array).map(InsightsServiceQueryRequestQueryFromJSON)), - 'eventLogsConfig': json['eventLogsConfig'] == null ? undefined : WebServiceEventLogsConfigFromJSON(json['eventLogsConfig']), - 'retentionQuery': json['retentionQuery'] == null ? undefined : CommonRetentionQueryFromJSON(json['retentionQuery']), - 'sqlQuery': json['sqlQuery'] == null ? undefined : json['sqlQuery'], - }; -} - export function WebServiceChartToJSON(json: any): WebServiceChart { - return WebServiceChartToJSONTyped(json, false); - } - - export function WebServiceChartToJSONTyped(value?: WebServiceChart | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; + public constructor() { } - - return { - - 'type': WebServiceChartChartTypeToJSON(value['type']), - 'queries': value['queries'] == null ? undefined : ((value['queries'] as Array).map(CommonQueryToJSON)), - 'formulas': value['formulas'] == null ? undefined : ((value['formulas'] as Array).map(CommonFormulaToJSON)), - 'config': WebServiceChartConfigToJSON(value['config']), - 'note': WebServiceNoteToJSON(value['note']), - 'datasourceType': WebServiceChartDataSourceTypeToJSON(value['datasourceType']), - 'segmentationQueries': value['segmentationQueries'] == null ? undefined : ((value['segmentationQueries'] as Array).map(CommonSegmentationQueryToJSON)), - 'insightsQueries': value['insightsQueries'] == null ? undefined : ((value['insightsQueries'] as Array).map(InsightsServiceQueryRequestQueryToJSON)), - 'eventLogsConfig': WebServiceEventLogsConfigToJSON(value['eventLogsConfig']), - 'retentionQuery': CommonRetentionQueryToJSON(value['retentionQuery']), - 'sqlQuery': value['sqlQuery'], - }; } + diff --git a/src/models/WebServiceChartChartType.ts b/src/models/WebServiceChartChartType.ts index e315655..5caaf00 100755 --- a/src/models/WebServiceChartChartType.ts +++ b/src/models/WebServiceChartChartType.ts @@ -1,10 +1,8 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Sentio API * Sentio Open API for query data * - * The version of the OpenAPI document: version not set + * OpenAPI spec version: version not set * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -12,48 +10,15 @@ * Do not edit the class manually. */ - -/** - * - * @export - */ -export const WebServiceChartChartType = { - Line: 'LINE', - Area: 'AREA', - Bar: 'BAR', - BarGauge: 'BAR_GAUGE', - Table: 'TABLE', - QueryValue: 'QUERY_VALUE', - Pie: 'PIE', - Note: 'NOTE' -} as const; -export type WebServiceChartChartType = typeof WebServiceChartChartType[keyof typeof WebServiceChartChartType]; - - -export function instanceOfWebServiceChartChartType(value: any): boolean { - for (const key in WebServiceChartChartType) { - if (Object.prototype.hasOwnProperty.call(WebServiceChartChartType, key)) { - if (WebServiceChartChartType[key as keyof typeof WebServiceChartChartType] === value) { - return true; - } - } - } - return false; -} - -export function WebServiceChartChartTypeFromJSON(json: any): WebServiceChartChartType { - return WebServiceChartChartTypeFromJSONTyped(json, false); +import { HttpFile } from '../http/http.js'; + +export enum WebServiceChartChartType { + Line = 'LINE', + Area = 'AREA', + Bar = 'BAR', + BarGauge = 'BAR_GAUGE', + Table = 'TABLE', + QueryValue = 'QUERY_VALUE', + Pie = 'PIE', + Note = 'NOTE' } - -export function WebServiceChartChartTypeFromJSONTyped(json: any, ignoreDiscriminator: boolean): WebServiceChartChartType { - return json as WebServiceChartChartType; -} - -export function WebServiceChartChartTypeToJSON(value?: WebServiceChartChartType | null): any { - return value as any; -} - -export function WebServiceChartChartTypeToJSONTyped(value: any, ignoreDiscriminator: boolean): WebServiceChartChartType { - return value as WebServiceChartChartType; -} - diff --git a/src/models/WebServiceChartConfig.ts b/src/models/WebServiceChartConfig.ts index 1295054..3c4bb8d 100755 --- a/src/models/WebServiceChartConfig.ts +++ b/src/models/WebServiceChartConfig.ts @@ -1,10 +1,8 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Sentio API * Sentio Open API for query data * - * The version of the OpenAPI document: version not set + * OpenAPI spec version: version not set * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -12,182 +10,92 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime.js'; -import type { WebServiceChartConfigTableConfig } from './WebServiceChartConfigTableConfig.js'; -import { - WebServiceChartConfigTableConfigFromJSON, - WebServiceChartConfigTableConfigFromJSONTyped, - WebServiceChartConfigTableConfigToJSON, - WebServiceChartConfigTableConfigToJSONTyped, -} from './WebServiceChartConfigTableConfig.js'; -import type { WebServiceChartConfigValueConfig } from './WebServiceChartConfigValueConfig.js'; -import { - WebServiceChartConfigValueConfigFromJSON, - WebServiceChartConfigValueConfigFromJSONTyped, - WebServiceChartConfigValueConfigToJSON, - WebServiceChartConfigValueConfigToJSONTyped, -} from './WebServiceChartConfigValueConfig.js'; -import type { WebServiceChartConfigLineConfig } from './WebServiceChartConfigLineConfig.js'; -import { - WebServiceChartConfigLineConfigFromJSON, - WebServiceChartConfigLineConfigFromJSONTyped, - WebServiceChartConfigLineConfigToJSON, - WebServiceChartConfigLineConfigToJSONTyped, -} from './WebServiceChartConfigLineConfig.js'; -import type { WebServiceChartConfigTimeRangeOverride } from './WebServiceChartConfigTimeRangeOverride.js'; -import { - WebServiceChartConfigTimeRangeOverrideFromJSON, - WebServiceChartConfigTimeRangeOverrideFromJSONTyped, - WebServiceChartConfigTimeRangeOverrideToJSON, - WebServiceChartConfigTimeRangeOverrideToJSONTyped, -} from './WebServiceChartConfigTimeRangeOverride.js'; -import type { WebServiceChartConfigPieConfig } from './WebServiceChartConfigPieConfig.js'; -import { - WebServiceChartConfigPieConfigFromJSON, - WebServiceChartConfigPieConfigFromJSONTyped, - WebServiceChartConfigPieConfigToJSON, - WebServiceChartConfigPieConfigToJSONTyped, -} from './WebServiceChartConfigPieConfig.js'; -import type { WebServiceChartConfigMarker } from './WebServiceChartConfigMarker.js'; -import { - WebServiceChartConfigMarkerFromJSON, - WebServiceChartConfigMarkerFromJSONTyped, - WebServiceChartConfigMarkerToJSON, - WebServiceChartConfigMarkerToJSONTyped, -} from './WebServiceChartConfigMarker.js'; -import type { WebServiceChartConfigBarGaugeConfig } from './WebServiceChartConfigBarGaugeConfig.js'; -import { - WebServiceChartConfigBarGaugeConfigFromJSON, - WebServiceChartConfigBarGaugeConfigFromJSONTyped, - WebServiceChartConfigBarGaugeConfigToJSON, - WebServiceChartConfigBarGaugeConfigToJSONTyped, -} from './WebServiceChartConfigBarGaugeConfig.js'; -import type { WebServiceChartConfigYAxisConfig } from './WebServiceChartConfigYAxisConfig.js'; -import { - WebServiceChartConfigYAxisConfigFromJSON, - WebServiceChartConfigYAxisConfigFromJSONTyped, - WebServiceChartConfigYAxisConfigToJSON, - WebServiceChartConfigYAxisConfigToJSONTyped, -} from './WebServiceChartConfigYAxisConfig.js'; -import type { WebServiceChartConfigQueryValueConfig } from './WebServiceChartConfigQueryValueConfig.js'; -import { - WebServiceChartConfigQueryValueConfigFromJSON, - WebServiceChartConfigQueryValueConfigFromJSONTyped, - WebServiceChartConfigQueryValueConfigToJSON, - WebServiceChartConfigQueryValueConfigToJSONTyped, -} from './WebServiceChartConfigQueryValueConfig.js'; +import { WebServiceChartConfigBarGaugeConfig } from '../models/WebServiceChartConfigBarGaugeConfig.js'; +import { WebServiceChartConfigLineConfig } from '../models/WebServiceChartConfigLineConfig.js'; +import { WebServiceChartConfigMarker } from '../models/WebServiceChartConfigMarker.js'; +import { WebServiceChartConfigPieConfig } from '../models/WebServiceChartConfigPieConfig.js'; +import { WebServiceChartConfigQueryValueConfig } from '../models/WebServiceChartConfigQueryValueConfig.js'; +import { WebServiceChartConfigTableConfig } from '../models/WebServiceChartConfigTableConfig.js'; +import { WebServiceChartConfigTimeRangeOverride } from '../models/WebServiceChartConfigTimeRangeOverride.js'; +import { WebServiceChartConfigValueConfig } from '../models/WebServiceChartConfigValueConfig.js'; +import { WebServiceChartConfigYAxisConfig } from '../models/WebServiceChartConfigYAxisConfig.js'; +import { HttpFile } from '../http/http.js'; -/** - * - * @export - * @interface WebServiceChartConfig - */ -export interface WebServiceChartConfig { - /** - * - * @type {WebServiceChartConfigYAxisConfig} - * @memberof WebServiceChartConfig - */ - yAxis?: WebServiceChartConfigYAxisConfig; - /** - * - * @type {WebServiceChartConfigBarGaugeConfig} - * @memberof WebServiceChartConfig - */ - barGauge?: WebServiceChartConfigBarGaugeConfig; - /** - * - * @type {WebServiceChartConfigValueConfig} - * @memberof WebServiceChartConfig - */ - valueConfig?: WebServiceChartConfigValueConfig; - /** - * - * @type {WebServiceChartConfigTimeRangeOverride} - * @memberof WebServiceChartConfig - */ - timeRangeOverride?: WebServiceChartConfigTimeRangeOverride; - /** - * - * @type {WebServiceChartConfigTableConfig} - * @memberof WebServiceChartConfig - */ - tableConfig?: WebServiceChartConfigTableConfig; - /** - * - * @type {WebServiceChartConfigQueryValueConfig} - * @memberof WebServiceChartConfig - */ - queryValueConfig?: WebServiceChartConfigQueryValueConfig; - /** - * - * @type {WebServiceChartConfigPieConfig} - * @memberof WebServiceChartConfig - */ - pieConfig?: WebServiceChartConfigPieConfig; - /** - * - * @type {Array} - * @memberof WebServiceChartConfig - */ - markers?: Array; - /** - * - * @type {WebServiceChartConfigLineConfig} - * @memberof WebServiceChartConfig - */ - lineConfig?: WebServiceChartConfigLineConfig; -} +export class WebServiceChartConfig { + 'yAxis'?: WebServiceChartConfigYAxisConfig; + 'barGauge'?: WebServiceChartConfigBarGaugeConfig; + 'valueConfig'?: WebServiceChartConfigValueConfig; + 'timeRangeOverride'?: WebServiceChartConfigTimeRangeOverride; + 'tableConfig'?: WebServiceChartConfigTableConfig; + 'queryValueConfig'?: WebServiceChartConfigQueryValueConfig; + 'pieConfig'?: WebServiceChartConfigPieConfig; + 'markers'?: Array; + 'lineConfig'?: WebServiceChartConfigLineConfig; -/** - * Check if a given object implements the WebServiceChartConfig interface. - */ -export function instanceOfWebServiceChartConfig(value: object): value is WebServiceChartConfig { - return true; -} + static readonly discriminator: string | undefined = undefined; -export function WebServiceChartConfigFromJSON(json: any): WebServiceChartConfig { - return WebServiceChartConfigFromJSONTyped(json, false); -} - -export function WebServiceChartConfigFromJSONTyped(json: any, ignoreDiscriminator: boolean): WebServiceChartConfig { - if (json == null) { - return json; - } - return { - - 'yAxis': json['yAxis'] == null ? undefined : WebServiceChartConfigYAxisConfigFromJSON(json['yAxis']), - 'barGauge': json['barGauge'] == null ? undefined : WebServiceChartConfigBarGaugeConfigFromJSON(json['barGauge']), - 'valueConfig': json['valueConfig'] == null ? undefined : WebServiceChartConfigValueConfigFromJSON(json['valueConfig']), - 'timeRangeOverride': json['timeRangeOverride'] == null ? undefined : WebServiceChartConfigTimeRangeOverrideFromJSON(json['timeRangeOverride']), - 'tableConfig': json['tableConfig'] == null ? undefined : WebServiceChartConfigTableConfigFromJSON(json['tableConfig']), - 'queryValueConfig': json['queryValueConfig'] == null ? undefined : WebServiceChartConfigQueryValueConfigFromJSON(json['queryValueConfig']), - 'pieConfig': json['pieConfig'] == null ? undefined : WebServiceChartConfigPieConfigFromJSON(json['pieConfig']), - 'markers': json['markers'] == null ? undefined : ((json['markers'] as Array).map(WebServiceChartConfigMarkerFromJSON)), - 'lineConfig': json['lineConfig'] == null ? undefined : WebServiceChartConfigLineConfigFromJSON(json['lineConfig']), - }; -} + static readonly mapping: {[index: string]: string} | undefined = undefined; - export function WebServiceChartConfigToJSON(json: any): WebServiceChartConfig { - return WebServiceChartConfigToJSONTyped(json, false); - } + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "yAxis", + "baseName": "yAxis", + "type": "WebServiceChartConfigYAxisConfig", + "format": "" + }, + { + "name": "barGauge", + "baseName": "barGauge", + "type": "WebServiceChartConfigBarGaugeConfig", + "format": "" + }, + { + "name": "valueConfig", + "baseName": "valueConfig", + "type": "WebServiceChartConfigValueConfig", + "format": "" + }, + { + "name": "timeRangeOverride", + "baseName": "timeRangeOverride", + "type": "WebServiceChartConfigTimeRangeOverride", + "format": "" + }, + { + "name": "tableConfig", + "baseName": "tableConfig", + "type": "WebServiceChartConfigTableConfig", + "format": "" + }, + { + "name": "queryValueConfig", + "baseName": "queryValueConfig", + "type": "WebServiceChartConfigQueryValueConfig", + "format": "" + }, + { + "name": "pieConfig", + "baseName": "pieConfig", + "type": "WebServiceChartConfigPieConfig", + "format": "" + }, + { + "name": "markers", + "baseName": "markers", + "type": "Array", + "format": "" + }, + { + "name": "lineConfig", + "baseName": "lineConfig", + "type": "WebServiceChartConfigLineConfig", + "format": "" + } ]; - export function WebServiceChartConfigToJSONTyped(value?: WebServiceChartConfig | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; + static getAttributeTypeMap() { + return WebServiceChartConfig.attributeTypeMap; } - return { - - 'yAxis': WebServiceChartConfigYAxisConfigToJSON(value['yAxis']), - 'barGauge': WebServiceChartConfigBarGaugeConfigToJSON(value['barGauge']), - 'valueConfig': WebServiceChartConfigValueConfigToJSON(value['valueConfig']), - 'timeRangeOverride': WebServiceChartConfigTimeRangeOverrideToJSON(value['timeRangeOverride']), - 'tableConfig': WebServiceChartConfigTableConfigToJSON(value['tableConfig']), - 'queryValueConfig': WebServiceChartConfigQueryValueConfigToJSON(value['queryValueConfig']), - 'pieConfig': WebServiceChartConfigPieConfigToJSON(value['pieConfig']), - 'markers': value['markers'] == null ? undefined : ((value['markers'] as Array).map(WebServiceChartConfigMarkerToJSON)), - 'lineConfig': WebServiceChartConfigLineConfigToJSON(value['lineConfig']), - }; + public constructor() { + } } - diff --git a/src/models/WebServiceChartConfigBarGaugeConfig.ts b/src/models/WebServiceChartConfigBarGaugeConfig.ts index a622a43..93de242 100755 --- a/src/models/WebServiceChartConfigBarGaugeConfig.ts +++ b/src/models/WebServiceChartConfigBarGaugeConfig.ts @@ -1,10 +1,8 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Sentio API * Sentio Open API for query data * - * The version of the OpenAPI document: version not set + * OpenAPI spec version: version not set * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -12,94 +10,46 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime.js'; -import type { WebServiceChartConfigCalculation } from './WebServiceChartConfigCalculation.js'; -import { - WebServiceChartConfigCalculationFromJSON, - WebServiceChartConfigCalculationFromJSONTyped, - WebServiceChartConfigCalculationToJSON, - WebServiceChartConfigCalculationToJSONTyped, -} from './WebServiceChartConfigCalculation.js'; -import type { WebServiceChartConfigSort } from './WebServiceChartConfigSort.js'; -import { - WebServiceChartConfigSortFromJSON, - WebServiceChartConfigSortFromJSONTyped, - WebServiceChartConfigSortToJSON, - WebServiceChartConfigSortToJSONTyped, -} from './WebServiceChartConfigSort.js'; -import type { WebServiceChartConfigDirection } from './WebServiceChartConfigDirection.js'; -import { - WebServiceChartConfigDirectionFromJSON, - WebServiceChartConfigDirectionFromJSONTyped, - WebServiceChartConfigDirectionToJSON, - WebServiceChartConfigDirectionToJSONTyped, -} from './WebServiceChartConfigDirection.js'; - -/** - * - * @export - * @interface WebServiceChartConfigBarGaugeConfig - */ -export interface WebServiceChartConfigBarGaugeConfig { - /** - * - * @type {WebServiceChartConfigDirection} - * @memberof WebServiceChartConfigBarGaugeConfig - */ - direction?: WebServiceChartConfigDirection; - /** - * - * @type {WebServiceChartConfigCalculation} - * @memberof WebServiceChartConfigBarGaugeConfig - */ - calculation?: WebServiceChartConfigCalculation; - /** - * - * @type {WebServiceChartConfigSort} - * @memberof WebServiceChartConfigBarGaugeConfig - */ - sort?: WebServiceChartConfigSort; -} - - - -/** - * Check if a given object implements the WebServiceChartConfigBarGaugeConfig interface. - */ -export function instanceOfWebServiceChartConfigBarGaugeConfig(value: object): value is WebServiceChartConfigBarGaugeConfig { - return true; -} - -export function WebServiceChartConfigBarGaugeConfigFromJSON(json: any): WebServiceChartConfigBarGaugeConfig { - return WebServiceChartConfigBarGaugeConfigFromJSONTyped(json, false); -} - -export function WebServiceChartConfigBarGaugeConfigFromJSONTyped(json: any, ignoreDiscriminator: boolean): WebServiceChartConfigBarGaugeConfig { - if (json == null) { - return json; +import { WebServiceChartConfigCalculation } from '../models/WebServiceChartConfigCalculation.js'; +import { WebServiceChartConfigDirection } from '../models/WebServiceChartConfigDirection.js'; +import { WebServiceChartConfigSort } from '../models/WebServiceChartConfigSort.js'; +import { HttpFile } from '../http/http.js'; + +export class WebServiceChartConfigBarGaugeConfig { + 'direction'?: WebServiceChartConfigDirection; + 'calculation'?: WebServiceChartConfigCalculation; + 'sort'?: WebServiceChartConfigSort; + + static readonly discriminator: string | undefined = undefined; + + static readonly mapping: {[index: string]: string} | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "direction", + "baseName": "direction", + "type": "WebServiceChartConfigDirection", + "format": "" + }, + { + "name": "calculation", + "baseName": "calculation", + "type": "WebServiceChartConfigCalculation", + "format": "" + }, + { + "name": "sort", + "baseName": "sort", + "type": "WebServiceChartConfigSort", + "format": "" + } ]; + + static getAttributeTypeMap() { + return WebServiceChartConfigBarGaugeConfig.attributeTypeMap; } - return { - - 'direction': json['direction'] == null ? undefined : WebServiceChartConfigDirectionFromJSON(json['direction']), - 'calculation': json['calculation'] == null ? undefined : WebServiceChartConfigCalculationFromJSON(json['calculation']), - 'sort': json['sort'] == null ? undefined : WebServiceChartConfigSortFromJSON(json['sort']), - }; -} - - export function WebServiceChartConfigBarGaugeConfigToJSON(json: any): WebServiceChartConfigBarGaugeConfig { - return WebServiceChartConfigBarGaugeConfigToJSONTyped(json, false); - } - export function WebServiceChartConfigBarGaugeConfigToJSONTyped(value?: WebServiceChartConfigBarGaugeConfig | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; + public constructor() { } - - return { - - 'direction': WebServiceChartConfigDirectionToJSON(value['direction']), - 'calculation': WebServiceChartConfigCalculationToJSON(value['calculation']), - 'sort': WebServiceChartConfigSortToJSON(value['sort']), - }; } + diff --git a/src/models/WebServiceChartConfigCalculation.ts b/src/models/WebServiceChartConfigCalculation.ts index 6bb0284..25f1949 100755 --- a/src/models/WebServiceChartConfigCalculation.ts +++ b/src/models/WebServiceChartConfigCalculation.ts @@ -1,10 +1,8 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Sentio API * Sentio Open API for query data * - * The version of the OpenAPI document: version not set + * OpenAPI spec version: version not set * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -12,47 +10,14 @@ * Do not edit the class manually. */ +import { HttpFile } from '../http/http.js'; -/** - * - * @export - */ -export const WebServiceChartConfigCalculation = { - Last: 'LAST', - First: 'FIRST', - Mean: 'MEAN', - Total: 'TOTAL', - All: 'ALL', - Min: 'MIN', - Max: 'MAX' -} as const; -export type WebServiceChartConfigCalculation = typeof WebServiceChartConfigCalculation[keyof typeof WebServiceChartConfigCalculation]; - - -export function instanceOfWebServiceChartConfigCalculation(value: any): boolean { - for (const key in WebServiceChartConfigCalculation) { - if (Object.prototype.hasOwnProperty.call(WebServiceChartConfigCalculation, key)) { - if (WebServiceChartConfigCalculation[key as keyof typeof WebServiceChartConfigCalculation] === value) { - return true; - } - } - } - return false; -} - -export function WebServiceChartConfigCalculationFromJSON(json: any): WebServiceChartConfigCalculation { - return WebServiceChartConfigCalculationFromJSONTyped(json, false); +export enum WebServiceChartConfigCalculation { + Last = 'LAST', + First = 'FIRST', + Mean = 'MEAN', + Total = 'TOTAL', + All = 'ALL', + Min = 'MIN', + Max = 'MAX' } - -export function WebServiceChartConfigCalculationFromJSONTyped(json: any, ignoreDiscriminator: boolean): WebServiceChartConfigCalculation { - return json as WebServiceChartConfigCalculation; -} - -export function WebServiceChartConfigCalculationToJSON(value?: WebServiceChartConfigCalculation | null): any { - return value as any; -} - -export function WebServiceChartConfigCalculationToJSONTyped(value: any, ignoreDiscriminator: boolean): WebServiceChartConfigCalculation { - return value as WebServiceChartConfigCalculation; -} - diff --git a/src/models/WebServiceChartConfigColorTheme.ts b/src/models/WebServiceChartConfigColorTheme.ts index 38cd103..40785bd 100755 --- a/src/models/WebServiceChartConfigColorTheme.ts +++ b/src/models/WebServiceChartConfigColorTheme.ts @@ -1,10 +1,8 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Sentio API * Sentio Open API for query data * - * The version of the OpenAPI document: version not set + * OpenAPI spec version: version not set * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -12,70 +10,41 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime.js'; -/** - * - * @export - * @interface WebServiceChartConfigColorTheme - */ -export interface WebServiceChartConfigColorTheme { - /** - * - * @type {string} - * @memberof WebServiceChartConfigColorTheme - */ - textColor?: string; - /** - * - * @type {string} - * @memberof WebServiceChartConfigColorTheme - */ - backgroundColor?: string; - /** - * - * @type {string} - * @memberof WebServiceChartConfigColorTheme - */ - themeType?: string; -} - -/** - * Check if a given object implements the WebServiceChartConfigColorTheme interface. - */ -export function instanceOfWebServiceChartConfigColorTheme(value: object): value is WebServiceChartConfigColorTheme { - return true; -} - -export function WebServiceChartConfigColorThemeFromJSON(json: any): WebServiceChartConfigColorTheme { - return WebServiceChartConfigColorThemeFromJSONTyped(json, false); -} - -export function WebServiceChartConfigColorThemeFromJSONTyped(json: any, ignoreDiscriminator: boolean): WebServiceChartConfigColorTheme { - if (json == null) { - return json; +import { HttpFile } from '../http/http.js'; + +export class WebServiceChartConfigColorTheme { + 'textColor'?: string; + 'backgroundColor'?: string; + 'themeType'?: string; + + static readonly discriminator: string | undefined = undefined; + + static readonly mapping: {[index: string]: string} | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "textColor", + "baseName": "textColor", + "type": "string", + "format": "" + }, + { + "name": "backgroundColor", + "baseName": "backgroundColor", + "type": "string", + "format": "" + }, + { + "name": "themeType", + "baseName": "themeType", + "type": "string", + "format": "" + } ]; + + static getAttributeTypeMap() { + return WebServiceChartConfigColorTheme.attributeTypeMap; } - return { - - 'textColor': json['textColor'] == null ? undefined : json['textColor'], - 'backgroundColor': json['backgroundColor'] == null ? undefined : json['backgroundColor'], - 'themeType': json['themeType'] == null ? undefined : json['themeType'], - }; -} - export function WebServiceChartConfigColorThemeToJSON(json: any): WebServiceChartConfigColorTheme { - return WebServiceChartConfigColorThemeToJSONTyped(json, false); - } - - export function WebServiceChartConfigColorThemeToJSONTyped(value?: WebServiceChartConfigColorTheme | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; + public constructor() { } - - return { - - 'textColor': value['textColor'], - 'backgroundColor': value['backgroundColor'], - 'themeType': value['themeType'], - }; } - diff --git a/src/models/WebServiceChartConfigColumnSort.ts b/src/models/WebServiceChartConfigColumnSort.ts index 1001f29..1f770c2 100755 --- a/src/models/WebServiceChartConfigColumnSort.ts +++ b/src/models/WebServiceChartConfigColumnSort.ts @@ -1,10 +1,8 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Sentio API * Sentio Open API for query data * - * The version of the OpenAPI document: version not set + * OpenAPI spec version: version not set * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -12,62 +10,34 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime.js'; -/** - * - * @export - * @interface WebServiceChartConfigColumnSort - */ -export interface WebServiceChartConfigColumnSort { - /** - * - * @type {string} - * @memberof WebServiceChartConfigColumnSort - */ - column?: string; - /** - * - * @type {boolean} - * @memberof WebServiceChartConfigColumnSort - */ - orderDesc?: boolean; -} +import { HttpFile } from '../http/http.js'; -/** - * Check if a given object implements the WebServiceChartConfigColumnSort interface. - */ -export function instanceOfWebServiceChartConfigColumnSort(value: object): value is WebServiceChartConfigColumnSort { - return true; -} +export class WebServiceChartConfigColumnSort { + 'column'?: string; + 'orderDesc'?: boolean; -export function WebServiceChartConfigColumnSortFromJSON(json: any): WebServiceChartConfigColumnSort { - return WebServiceChartConfigColumnSortFromJSONTyped(json, false); -} + static readonly discriminator: string | undefined = undefined; -export function WebServiceChartConfigColumnSortFromJSONTyped(json: any, ignoreDiscriminator: boolean): WebServiceChartConfigColumnSort { - if (json == null) { - return json; - } - return { - - 'column': json['column'] == null ? undefined : json['column'], - 'orderDesc': json['orderDesc'] == null ? undefined : json['orderDesc'], - }; -} + static readonly mapping: {[index: string]: string} | undefined = undefined; - export function WebServiceChartConfigColumnSortToJSON(json: any): WebServiceChartConfigColumnSort { - return WebServiceChartConfigColumnSortToJSONTyped(json, false); - } + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "column", + "baseName": "column", + "type": "string", + "format": "" + }, + { + "name": "orderDesc", + "baseName": "orderDesc", + "type": "boolean", + "format": "" + } ]; - export function WebServiceChartConfigColumnSortToJSONTyped(value?: WebServiceChartConfigColumnSort | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; + static getAttributeTypeMap() { + return WebServiceChartConfigColumnSort.attributeTypeMap; } - return { - - 'column': value['column'], - 'orderDesc': value['orderDesc'], - }; + public constructor() { + } } - diff --git a/src/models/WebServiceChartConfigCompareTime.ts b/src/models/WebServiceChartConfigCompareTime.ts index 3923633..7d4ea8e 100755 --- a/src/models/WebServiceChartConfigCompareTime.ts +++ b/src/models/WebServiceChartConfigCompareTime.ts @@ -1,10 +1,8 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Sentio API * Sentio Open API for query data * - * The version of the OpenAPI document: version not set + * OpenAPI spec version: version not set * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -12,62 +10,28 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime.js'; -import type { CommonDuration } from './CommonDuration.js'; -import { - CommonDurationFromJSON, - CommonDurationFromJSONTyped, - CommonDurationToJSON, - CommonDurationToJSONTyped, -} from './CommonDuration.js'; +import { CommonDuration } from '../models/CommonDuration.js'; +import { HttpFile } from '../http/http.js'; -/** - * - * @export - * @interface WebServiceChartConfigCompareTime - */ -export interface WebServiceChartConfigCompareTime { - /** - * - * @type {CommonDuration} - * @memberof WebServiceChartConfigCompareTime - */ - ago?: CommonDuration; -} +export class WebServiceChartConfigCompareTime { + 'ago'?: CommonDuration; -/** - * Check if a given object implements the WebServiceChartConfigCompareTime interface. - */ -export function instanceOfWebServiceChartConfigCompareTime(value: object): value is WebServiceChartConfigCompareTime { - return true; -} + static readonly discriminator: string | undefined = undefined; -export function WebServiceChartConfigCompareTimeFromJSON(json: any): WebServiceChartConfigCompareTime { - return WebServiceChartConfigCompareTimeFromJSONTyped(json, false); -} - -export function WebServiceChartConfigCompareTimeFromJSONTyped(json: any, ignoreDiscriminator: boolean): WebServiceChartConfigCompareTime { - if (json == null) { - return json; - } - return { - - 'ago': json['ago'] == null ? undefined : CommonDurationFromJSON(json['ago']), - }; -} + static readonly mapping: {[index: string]: string} | undefined = undefined; - export function WebServiceChartConfigCompareTimeToJSON(json: any): WebServiceChartConfigCompareTime { - return WebServiceChartConfigCompareTimeToJSONTyped(json, false); - } + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "ago", + "baseName": "ago", + "type": "CommonDuration", + "format": "" + } ]; - export function WebServiceChartConfigCompareTimeToJSONTyped(value?: WebServiceChartConfigCompareTime | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; + static getAttributeTypeMap() { + return WebServiceChartConfigCompareTime.attributeTypeMap; } - return { - - 'ago': CommonDurationToJSON(value['ago']), - }; + public constructor() { + } } - diff --git a/src/models/WebServiceChartConfigDirection.ts b/src/models/WebServiceChartConfigDirection.ts index e45d10c..158a583 100755 --- a/src/models/WebServiceChartConfigDirection.ts +++ b/src/models/WebServiceChartConfigDirection.ts @@ -1,10 +1,8 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Sentio API * Sentio Open API for query data * - * The version of the OpenAPI document: version not set + * OpenAPI spec version: version not set * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -12,42 +10,9 @@ * Do not edit the class manually. */ +import { HttpFile } from '../http/http.js'; -/** - * - * @export - */ -export const WebServiceChartConfigDirection = { - Horizontal: 'HORIZONTAL', - Vertical: 'VERTICAL' -} as const; -export type WebServiceChartConfigDirection = typeof WebServiceChartConfigDirection[keyof typeof WebServiceChartConfigDirection]; - - -export function instanceOfWebServiceChartConfigDirection(value: any): boolean { - for (const key in WebServiceChartConfigDirection) { - if (Object.prototype.hasOwnProperty.call(WebServiceChartConfigDirection, key)) { - if (WebServiceChartConfigDirection[key as keyof typeof WebServiceChartConfigDirection] === value) { - return true; - } - } - } - return false; -} - -export function WebServiceChartConfigDirectionFromJSON(json: any): WebServiceChartConfigDirection { - return WebServiceChartConfigDirectionFromJSONTyped(json, false); +export enum WebServiceChartConfigDirection { + Horizontal = 'HORIZONTAL', + Vertical = 'VERTICAL' } - -export function WebServiceChartConfigDirectionFromJSONTyped(json: any, ignoreDiscriminator: boolean): WebServiceChartConfigDirection { - return json as WebServiceChartConfigDirection; -} - -export function WebServiceChartConfigDirectionToJSON(value?: WebServiceChartConfigDirection | null): any { - return value as any; -} - -export function WebServiceChartConfigDirectionToJSONTyped(value: any, ignoreDiscriminator: boolean): WebServiceChartConfigDirection { - return value as WebServiceChartConfigDirection; -} - diff --git a/src/models/WebServiceChartConfigLineConfig.ts b/src/models/WebServiceChartConfigLineConfig.ts index 1b2891d..3070a62 100755 --- a/src/models/WebServiceChartConfigLineConfig.ts +++ b/src/models/WebServiceChartConfigLineConfig.ts @@ -1,10 +1,8 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Sentio API * Sentio Open API for query data * - * The version of the OpenAPI document: version not set + * OpenAPI spec version: version not set * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -12,64 +10,30 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime.js'; -import type { WebServiceChartConfigLineConfigStyle } from './WebServiceChartConfigLineConfigStyle.js'; -import { - WebServiceChartConfigLineConfigStyleFromJSON, - WebServiceChartConfigLineConfigStyleFromJSONTyped, - WebServiceChartConfigLineConfigStyleToJSON, - WebServiceChartConfigLineConfigStyleToJSONTyped, -} from './WebServiceChartConfigLineConfigStyle.js'; +import { WebServiceChartConfigLineConfigStyle } from '../models/WebServiceChartConfigLineConfigStyle.js'; +import { HttpFile } from '../http/http.js'; -/** - * - * @export - * @interface WebServiceChartConfigLineConfig - */ -export interface WebServiceChartConfigLineConfig { - /** - * - * @type {WebServiceChartConfigLineConfigStyle} - * @memberof WebServiceChartConfigLineConfig - */ - style?: WebServiceChartConfigLineConfigStyle; -} +export class WebServiceChartConfigLineConfig { + 'style'?: WebServiceChartConfigLineConfigStyle; + static readonly discriminator: string | undefined = undefined; + static readonly mapping: {[index: string]: string} | undefined = undefined; -/** - * Check if a given object implements the WebServiceChartConfigLineConfig interface. - */ -export function instanceOfWebServiceChartConfigLineConfig(value: object): value is WebServiceChartConfigLineConfig { - return true; -} + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "style", + "baseName": "style", + "type": "WebServiceChartConfigLineConfigStyle", + "format": "" + } ]; -export function WebServiceChartConfigLineConfigFromJSON(json: any): WebServiceChartConfigLineConfig { - return WebServiceChartConfigLineConfigFromJSONTyped(json, false); -} - -export function WebServiceChartConfigLineConfigFromJSONTyped(json: any, ignoreDiscriminator: boolean): WebServiceChartConfigLineConfig { - if (json == null) { - return json; + static getAttributeTypeMap() { + return WebServiceChartConfigLineConfig.attributeTypeMap; } - return { - - 'style': json['style'] == null ? undefined : WebServiceChartConfigLineConfigStyleFromJSON(json['style']), - }; -} - export function WebServiceChartConfigLineConfigToJSON(json: any): WebServiceChartConfigLineConfig { - return WebServiceChartConfigLineConfigToJSONTyped(json, false); - } - - export function WebServiceChartConfigLineConfigToJSONTyped(value?: WebServiceChartConfigLineConfig | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; + public constructor() { } - - return { - - 'style': WebServiceChartConfigLineConfigStyleToJSON(value['style']), - }; } + diff --git a/src/models/WebServiceChartConfigLineConfigStyle.ts b/src/models/WebServiceChartConfigLineConfigStyle.ts index fefbd4f..55ce4b3 100755 --- a/src/models/WebServiceChartConfigLineConfigStyle.ts +++ b/src/models/WebServiceChartConfigLineConfigStyle.ts @@ -1,10 +1,8 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Sentio API * Sentio Open API for query data * - * The version of the OpenAPI document: version not set + * OpenAPI spec version: version not set * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -12,42 +10,9 @@ * Do not edit the class manually. */ +import { HttpFile } from '../http/http.js'; -/** - * - * @export - */ -export const WebServiceChartConfigLineConfigStyle = { - Solid: 'Solid', - Dotted: 'Dotted' -} as const; -export type WebServiceChartConfigLineConfigStyle = typeof WebServiceChartConfigLineConfigStyle[keyof typeof WebServiceChartConfigLineConfigStyle]; - - -export function instanceOfWebServiceChartConfigLineConfigStyle(value: any): boolean { - for (const key in WebServiceChartConfigLineConfigStyle) { - if (Object.prototype.hasOwnProperty.call(WebServiceChartConfigLineConfigStyle, key)) { - if (WebServiceChartConfigLineConfigStyle[key as keyof typeof WebServiceChartConfigLineConfigStyle] === value) { - return true; - } - } - } - return false; -} - -export function WebServiceChartConfigLineConfigStyleFromJSON(json: any): WebServiceChartConfigLineConfigStyle { - return WebServiceChartConfigLineConfigStyleFromJSONTyped(json, false); +export enum WebServiceChartConfigLineConfigStyle { + Solid = 'Solid', + Dotted = 'Dotted' } - -export function WebServiceChartConfigLineConfigStyleFromJSONTyped(json: any, ignoreDiscriminator: boolean): WebServiceChartConfigLineConfigStyle { - return json as WebServiceChartConfigLineConfigStyle; -} - -export function WebServiceChartConfigLineConfigStyleToJSON(value?: WebServiceChartConfigLineConfigStyle | null): any { - return value as any; -} - -export function WebServiceChartConfigLineConfigStyleToJSONTyped(value: any, ignoreDiscriminator: boolean): WebServiceChartConfigLineConfigStyle { - return value as WebServiceChartConfigLineConfigStyle; -} - diff --git a/src/models/WebServiceChartConfigMappingRule.ts b/src/models/WebServiceChartConfigMappingRule.ts index 48fbbc1..a7ff511 100755 --- a/src/models/WebServiceChartConfigMappingRule.ts +++ b/src/models/WebServiceChartConfigMappingRule.ts @@ -1,10 +1,8 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Sentio API * Sentio Open API for query data * - * The version of the OpenAPI document: version not set + * OpenAPI spec version: version not set * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -12,86 +10,49 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime.js'; -import type { WebServiceChartConfigColorTheme } from './WebServiceChartConfigColorTheme.js'; -import { - WebServiceChartConfigColorThemeFromJSON, - WebServiceChartConfigColorThemeFromJSONTyped, - WebServiceChartConfigColorThemeToJSON, - WebServiceChartConfigColorThemeToJSONTyped, -} from './WebServiceChartConfigColorTheme.js'; - -/** - * - * @export - * @interface WebServiceChartConfigMappingRule - */ -export interface WebServiceChartConfigMappingRule { - /** - * - * @type {string} - * @memberof WebServiceChartConfigMappingRule - */ - comparison?: string; - /** - * - * @type {number} - * @memberof WebServiceChartConfigMappingRule - */ - value?: number; - /** - * - * @type {string} - * @memberof WebServiceChartConfigMappingRule - */ - text?: string; - /** - * - * @type {WebServiceChartConfigColorTheme} - * @memberof WebServiceChartConfigMappingRule - */ - colorTheme?: WebServiceChartConfigColorTheme; -} - -/** - * Check if a given object implements the WebServiceChartConfigMappingRule interface. - */ -export function instanceOfWebServiceChartConfigMappingRule(value: object): value is WebServiceChartConfigMappingRule { - return true; -} - -export function WebServiceChartConfigMappingRuleFromJSON(json: any): WebServiceChartConfigMappingRule { - return WebServiceChartConfigMappingRuleFromJSONTyped(json, false); -} - -export function WebServiceChartConfigMappingRuleFromJSONTyped(json: any, ignoreDiscriminator: boolean): WebServiceChartConfigMappingRule { - if (json == null) { - return json; +import { WebServiceChartConfigColorTheme } from '../models/WebServiceChartConfigColorTheme.js'; +import { HttpFile } from '../http/http.js'; + +export class WebServiceChartConfigMappingRule { + 'comparison'?: string; + 'value'?: number; + 'text'?: string; + 'colorTheme'?: WebServiceChartConfigColorTheme; + + static readonly discriminator: string | undefined = undefined; + + static readonly mapping: {[index: string]: string} | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "comparison", + "baseName": "comparison", + "type": "string", + "format": "" + }, + { + "name": "value", + "baseName": "value", + "type": "number", + "format": "double" + }, + { + "name": "text", + "baseName": "text", + "type": "string", + "format": "" + }, + { + "name": "colorTheme", + "baseName": "colorTheme", + "type": "WebServiceChartConfigColorTheme", + "format": "" + } ]; + + static getAttributeTypeMap() { + return WebServiceChartConfigMappingRule.attributeTypeMap; } - return { - - 'comparison': json['comparison'] == null ? undefined : json['comparison'], - 'value': json['value'] == null ? undefined : json['value'], - 'text': json['text'] == null ? undefined : json['text'], - 'colorTheme': json['colorTheme'] == null ? undefined : WebServiceChartConfigColorThemeFromJSON(json['colorTheme']), - }; -} - - export function WebServiceChartConfigMappingRuleToJSON(json: any): WebServiceChartConfigMappingRule { - return WebServiceChartConfigMappingRuleToJSONTyped(json, false); - } - export function WebServiceChartConfigMappingRuleToJSONTyped(value?: WebServiceChartConfigMappingRule | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; + public constructor() { } - - return { - - 'comparison': value['comparison'], - 'value': value['value'], - 'text': value['text'], - 'colorTheme': WebServiceChartConfigColorThemeToJSON(value['colorTheme']), - }; } - diff --git a/src/models/WebServiceChartConfigMarker.ts b/src/models/WebServiceChartConfigMarker.ts index d9391b6..bf701dc 100755 --- a/src/models/WebServiceChartConfigMarker.ts +++ b/src/models/WebServiceChartConfigMarker.ts @@ -1,10 +1,8 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Sentio API * Sentio Open API for query data * - * The version of the OpenAPI document: version not set + * OpenAPI spec version: version not set * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -12,96 +10,58 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime.js'; -import type { WebServiceChartConfigMarkerType } from './WebServiceChartConfigMarkerType.js'; -import { - WebServiceChartConfigMarkerTypeFromJSON, - WebServiceChartConfigMarkerTypeFromJSONTyped, - WebServiceChartConfigMarkerTypeToJSON, - WebServiceChartConfigMarkerTypeToJSONTyped, -} from './WebServiceChartConfigMarkerType.js'; +import { WebServiceChartConfigMarkerType } from '../models/WebServiceChartConfigMarkerType.js'; +import { HttpFile } from '../http/http.js'; -/** - * - * @export - * @interface WebServiceChartConfigMarker - */ -export interface WebServiceChartConfigMarker { - /** - * - * @type {WebServiceChartConfigMarkerType} - * @memberof WebServiceChartConfigMarker - */ - type?: WebServiceChartConfigMarkerType; - /** - * - * @type {number} - * @memberof WebServiceChartConfigMarker - */ - value?: number; - /** - * - * @type {string} - * @memberof WebServiceChartConfigMarker - */ - color?: string; - /** - * - * @type {string} - * @memberof WebServiceChartConfigMarker - */ - label?: string; - /** - * - * @type {string} - * @memberof WebServiceChartConfigMarker - */ - valueX?: string; -} +export class WebServiceChartConfigMarker { + 'type'?: WebServiceChartConfigMarkerType; + 'value'?: number; + 'color'?: string; + 'label'?: string; + 'valueX'?: string; + static readonly discriminator: string | undefined = undefined; + static readonly mapping: {[index: string]: string} | undefined = undefined; -/** - * Check if a given object implements the WebServiceChartConfigMarker interface. - */ -export function instanceOfWebServiceChartConfigMarker(value: object): value is WebServiceChartConfigMarker { - return true; -} + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "type", + "baseName": "type", + "type": "WebServiceChartConfigMarkerType", + "format": "" + }, + { + "name": "value", + "baseName": "value", + "type": "number", + "format": "double" + }, + { + "name": "color", + "baseName": "color", + "type": "string", + "format": "" + }, + { + "name": "label", + "baseName": "label", + "type": "string", + "format": "" + }, + { + "name": "valueX", + "baseName": "valueX", + "type": "string", + "format": "" + } ]; -export function WebServiceChartConfigMarkerFromJSON(json: any): WebServiceChartConfigMarker { - return WebServiceChartConfigMarkerFromJSONTyped(json, false); -} - -export function WebServiceChartConfigMarkerFromJSONTyped(json: any, ignoreDiscriminator: boolean): WebServiceChartConfigMarker { - if (json == null) { - return json; + static getAttributeTypeMap() { + return WebServiceChartConfigMarker.attributeTypeMap; } - return { - - 'type': json['type'] == null ? undefined : WebServiceChartConfigMarkerTypeFromJSON(json['type']), - 'value': json['value'] == null ? undefined : json['value'], - 'color': json['color'] == null ? undefined : json['color'], - 'label': json['label'] == null ? undefined : json['label'], - 'valueX': json['valueX'] == null ? undefined : json['valueX'], - }; -} - export function WebServiceChartConfigMarkerToJSON(json: any): WebServiceChartConfigMarker { - return WebServiceChartConfigMarkerToJSONTyped(json, false); - } - - export function WebServiceChartConfigMarkerToJSONTyped(value?: WebServiceChartConfigMarker | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; + public constructor() { } - - return { - - 'type': WebServiceChartConfigMarkerTypeToJSON(value['type']), - 'value': value['value'], - 'color': value['color'], - 'label': value['label'], - 'valueX': value['valueX'], - }; } + diff --git a/src/models/WebServiceChartConfigMarkerType.ts b/src/models/WebServiceChartConfigMarkerType.ts index 3a343ba..2b03f6c 100755 --- a/src/models/WebServiceChartConfigMarkerType.ts +++ b/src/models/WebServiceChartConfigMarkerType.ts @@ -1,10 +1,8 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Sentio API * Sentio Open API for query data * - * The version of the OpenAPI document: version not set + * OpenAPI spec version: version not set * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -12,43 +10,10 @@ * Do not edit the class manually. */ +import { HttpFile } from '../http/http.js'; -/** - * - * @export - */ -export const WebServiceChartConfigMarkerType = { - Line: 'LINE', - Area: 'AREA', - Linex: 'LINEX' -} as const; -export type WebServiceChartConfigMarkerType = typeof WebServiceChartConfigMarkerType[keyof typeof WebServiceChartConfigMarkerType]; - - -export function instanceOfWebServiceChartConfigMarkerType(value: any): boolean { - for (const key in WebServiceChartConfigMarkerType) { - if (Object.prototype.hasOwnProperty.call(WebServiceChartConfigMarkerType, key)) { - if (WebServiceChartConfigMarkerType[key as keyof typeof WebServiceChartConfigMarkerType] === value) { - return true; - } - } - } - return false; -} - -export function WebServiceChartConfigMarkerTypeFromJSON(json: any): WebServiceChartConfigMarkerType { - return WebServiceChartConfigMarkerTypeFromJSONTyped(json, false); +export enum WebServiceChartConfigMarkerType { + Line = 'LINE', + Area = 'AREA', + Linex = 'LINEX' } - -export function WebServiceChartConfigMarkerTypeFromJSONTyped(json: any, ignoreDiscriminator: boolean): WebServiceChartConfigMarkerType { - return json as WebServiceChartConfigMarkerType; -} - -export function WebServiceChartConfigMarkerTypeToJSON(value?: WebServiceChartConfigMarkerType | null): any { - return value as any; -} - -export function WebServiceChartConfigMarkerTypeToJSONTyped(value: any, ignoreDiscriminator: boolean): WebServiceChartConfigMarkerType { - return value as WebServiceChartConfigMarkerType; -} - diff --git a/src/models/WebServiceChartConfigPieConfig.ts b/src/models/WebServiceChartConfigPieConfig.ts index a79f4ae..8218347 100755 --- a/src/models/WebServiceChartConfigPieConfig.ts +++ b/src/models/WebServiceChartConfigPieConfig.ts @@ -1,10 +1,8 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Sentio API * Sentio Open API for query data * - * The version of the OpenAPI document: version not set + * OpenAPI spec version: version not set * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -12,95 +10,52 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime.js'; -import type { WebServiceChartConfigCalculation } from './WebServiceChartConfigCalculation.js'; -import { - WebServiceChartConfigCalculationFromJSON, - WebServiceChartConfigCalculationFromJSONTyped, - WebServiceChartConfigCalculationToJSON, - WebServiceChartConfigCalculationToJSONTyped, -} from './WebServiceChartConfigCalculation.js'; -import type { WebServiceChartConfigPieConfigPieType } from './WebServiceChartConfigPieConfigPieType.js'; -import { - WebServiceChartConfigPieConfigPieTypeFromJSON, - WebServiceChartConfigPieConfigPieTypeFromJSONTyped, - WebServiceChartConfigPieConfigPieTypeToJSON, - WebServiceChartConfigPieConfigPieTypeToJSONTyped, -} from './WebServiceChartConfigPieConfigPieType.js'; - -/** - * - * @export - * @interface WebServiceChartConfigPieConfig - */ -export interface WebServiceChartConfigPieConfig { - /** - * - * @type {WebServiceChartConfigPieConfigPieType} - * @memberof WebServiceChartConfigPieConfig - */ - pieType?: WebServiceChartConfigPieConfigPieType; - /** - * - * @type {boolean} - * @memberof WebServiceChartConfigPieConfig - */ - showPercent?: boolean; - /** - * - * @type {boolean} - * @memberof WebServiceChartConfigPieConfig - */ - showValue?: boolean; - /** - * - * @type {WebServiceChartConfigCalculation} - * @memberof WebServiceChartConfigPieConfig - */ - calculation?: WebServiceChartConfigCalculation; -} - - - -/** - * Check if a given object implements the WebServiceChartConfigPieConfig interface. - */ -export function instanceOfWebServiceChartConfigPieConfig(value: object): value is WebServiceChartConfigPieConfig { - return true; -} - -export function WebServiceChartConfigPieConfigFromJSON(json: any): WebServiceChartConfigPieConfig { - return WebServiceChartConfigPieConfigFromJSONTyped(json, false); -} - -export function WebServiceChartConfigPieConfigFromJSONTyped(json: any, ignoreDiscriminator: boolean): WebServiceChartConfigPieConfig { - if (json == null) { - return json; +import { WebServiceChartConfigCalculation } from '../models/WebServiceChartConfigCalculation.js'; +import { WebServiceChartConfigPieConfigPieType } from '../models/WebServiceChartConfigPieConfigPieType.js'; +import { HttpFile } from '../http/http.js'; + +export class WebServiceChartConfigPieConfig { + 'pieType'?: WebServiceChartConfigPieConfigPieType; + 'showPercent'?: boolean; + 'showValue'?: boolean; + 'calculation'?: WebServiceChartConfigCalculation; + + static readonly discriminator: string | undefined = undefined; + + static readonly mapping: {[index: string]: string} | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "pieType", + "baseName": "pieType", + "type": "WebServiceChartConfigPieConfigPieType", + "format": "" + }, + { + "name": "showPercent", + "baseName": "showPercent", + "type": "boolean", + "format": "" + }, + { + "name": "showValue", + "baseName": "showValue", + "type": "boolean", + "format": "" + }, + { + "name": "calculation", + "baseName": "calculation", + "type": "WebServiceChartConfigCalculation", + "format": "" + } ]; + + static getAttributeTypeMap() { + return WebServiceChartConfigPieConfig.attributeTypeMap; } - return { - - 'pieType': json['pieType'] == null ? undefined : WebServiceChartConfigPieConfigPieTypeFromJSON(json['pieType']), - 'showPercent': json['showPercent'] == null ? undefined : json['showPercent'], - 'showValue': json['showValue'] == null ? undefined : json['showValue'], - 'calculation': json['calculation'] == null ? undefined : WebServiceChartConfigCalculationFromJSON(json['calculation']), - }; -} - - export function WebServiceChartConfigPieConfigToJSON(json: any): WebServiceChartConfigPieConfig { - return WebServiceChartConfigPieConfigToJSONTyped(json, false); - } - export function WebServiceChartConfigPieConfigToJSONTyped(value?: WebServiceChartConfigPieConfig | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; + public constructor() { } - - return { - - 'pieType': WebServiceChartConfigPieConfigPieTypeToJSON(value['pieType']), - 'showPercent': value['showPercent'], - 'showValue': value['showValue'], - 'calculation': WebServiceChartConfigCalculationToJSON(value['calculation']), - }; } + diff --git a/src/models/WebServiceChartConfigPieConfigPieType.ts b/src/models/WebServiceChartConfigPieConfigPieType.ts index a1d0ac3..88cf1a2 100755 --- a/src/models/WebServiceChartConfigPieConfigPieType.ts +++ b/src/models/WebServiceChartConfigPieConfigPieType.ts @@ -1,10 +1,8 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Sentio API * Sentio Open API for query data * - * The version of the OpenAPI document: version not set + * OpenAPI spec version: version not set * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -12,42 +10,9 @@ * Do not edit the class manually. */ +import { HttpFile } from '../http/http.js'; -/** - * - * @export - */ -export const WebServiceChartConfigPieConfigPieType = { - Pie: 'Pie', - Donut: 'Donut' -} as const; -export type WebServiceChartConfigPieConfigPieType = typeof WebServiceChartConfigPieConfigPieType[keyof typeof WebServiceChartConfigPieConfigPieType]; - - -export function instanceOfWebServiceChartConfigPieConfigPieType(value: any): boolean { - for (const key in WebServiceChartConfigPieConfigPieType) { - if (Object.prototype.hasOwnProperty.call(WebServiceChartConfigPieConfigPieType, key)) { - if (WebServiceChartConfigPieConfigPieType[key as keyof typeof WebServiceChartConfigPieConfigPieType] === value) { - return true; - } - } - } - return false; -} - -export function WebServiceChartConfigPieConfigPieTypeFromJSON(json: any): WebServiceChartConfigPieConfigPieType { - return WebServiceChartConfigPieConfigPieTypeFromJSONTyped(json, false); +export enum WebServiceChartConfigPieConfigPieType { + Pie = 'Pie', + Donut = 'Donut' } - -export function WebServiceChartConfigPieConfigPieTypeFromJSONTyped(json: any, ignoreDiscriminator: boolean): WebServiceChartConfigPieConfigPieType { - return json as WebServiceChartConfigPieConfigPieType; -} - -export function WebServiceChartConfigPieConfigPieTypeToJSON(value?: WebServiceChartConfigPieConfigPieType | null): any { - return value as any; -} - -export function WebServiceChartConfigPieConfigPieTypeToJSONTyped(value: any, ignoreDiscriminator: boolean): WebServiceChartConfigPieConfigPieType { - return value as WebServiceChartConfigPieConfigPieType; -} - diff --git a/src/models/WebServiceChartConfigQueryValueConfig.ts b/src/models/WebServiceChartConfigQueryValueConfig.ts index 238a78c..c0d57fe 100755 --- a/src/models/WebServiceChartConfigQueryValueConfig.ts +++ b/src/models/WebServiceChartConfigQueryValueConfig.ts @@ -1,10 +1,8 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Sentio API * Sentio Open API for query data * - * The version of the OpenAPI document: version not set + * OpenAPI spec version: version not set * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -12,95 +10,52 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime.js'; -import type { WebServiceChartConfigCalculation } from './WebServiceChartConfigCalculation.js'; -import { - WebServiceChartConfigCalculationFromJSON, - WebServiceChartConfigCalculationFromJSONTyped, - WebServiceChartConfigCalculationToJSON, - WebServiceChartConfigCalculationToJSONTyped, -} from './WebServiceChartConfigCalculation.js'; -import type { WebServiceChartConfigColorTheme } from './WebServiceChartConfigColorTheme.js'; -import { - WebServiceChartConfigColorThemeFromJSON, - WebServiceChartConfigColorThemeFromJSONTyped, - WebServiceChartConfigColorThemeToJSON, - WebServiceChartConfigColorThemeToJSONTyped, -} from './WebServiceChartConfigColorTheme.js'; - -/** - * - * @export - * @interface WebServiceChartConfigQueryValueConfig - */ -export interface WebServiceChartConfigQueryValueConfig { - /** - * - * @type {WebServiceChartConfigColorTheme} - * @memberof WebServiceChartConfigQueryValueConfig - */ - colorTheme?: WebServiceChartConfigColorTheme; - /** - * - * @type {boolean} - * @memberof WebServiceChartConfigQueryValueConfig - */ - showBackgroundChart?: boolean; - /** - * - * @type {WebServiceChartConfigCalculation} - * @memberof WebServiceChartConfigQueryValueConfig - */ - calculation?: WebServiceChartConfigCalculation; - /** - * - * @type {WebServiceChartConfigCalculation} - * @memberof WebServiceChartConfigQueryValueConfig - */ - seriesCalculation?: WebServiceChartConfigCalculation; -} - - - -/** - * Check if a given object implements the WebServiceChartConfigQueryValueConfig interface. - */ -export function instanceOfWebServiceChartConfigQueryValueConfig(value: object): value is WebServiceChartConfigQueryValueConfig { - return true; -} - -export function WebServiceChartConfigQueryValueConfigFromJSON(json: any): WebServiceChartConfigQueryValueConfig { - return WebServiceChartConfigQueryValueConfigFromJSONTyped(json, false); -} - -export function WebServiceChartConfigQueryValueConfigFromJSONTyped(json: any, ignoreDiscriminator: boolean): WebServiceChartConfigQueryValueConfig { - if (json == null) { - return json; +import { WebServiceChartConfigCalculation } from '../models/WebServiceChartConfigCalculation.js'; +import { WebServiceChartConfigColorTheme } from '../models/WebServiceChartConfigColorTheme.js'; +import { HttpFile } from '../http/http.js'; + +export class WebServiceChartConfigQueryValueConfig { + 'colorTheme'?: WebServiceChartConfigColorTheme; + 'showBackgroundChart'?: boolean; + 'calculation'?: WebServiceChartConfigCalculation; + 'seriesCalculation'?: WebServiceChartConfigCalculation; + + static readonly discriminator: string | undefined = undefined; + + static readonly mapping: {[index: string]: string} | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "colorTheme", + "baseName": "colorTheme", + "type": "WebServiceChartConfigColorTheme", + "format": "" + }, + { + "name": "showBackgroundChart", + "baseName": "showBackgroundChart", + "type": "boolean", + "format": "" + }, + { + "name": "calculation", + "baseName": "calculation", + "type": "WebServiceChartConfigCalculation", + "format": "" + }, + { + "name": "seriesCalculation", + "baseName": "seriesCalculation", + "type": "WebServiceChartConfigCalculation", + "format": "" + } ]; + + static getAttributeTypeMap() { + return WebServiceChartConfigQueryValueConfig.attributeTypeMap; } - return { - - 'colorTheme': json['colorTheme'] == null ? undefined : WebServiceChartConfigColorThemeFromJSON(json['colorTheme']), - 'showBackgroundChart': json['showBackgroundChart'] == null ? undefined : json['showBackgroundChart'], - 'calculation': json['calculation'] == null ? undefined : WebServiceChartConfigCalculationFromJSON(json['calculation']), - 'seriesCalculation': json['seriesCalculation'] == null ? undefined : WebServiceChartConfigCalculationFromJSON(json['seriesCalculation']), - }; -} - - export function WebServiceChartConfigQueryValueConfigToJSON(json: any): WebServiceChartConfigQueryValueConfig { - return WebServiceChartConfigQueryValueConfigToJSONTyped(json, false); - } - export function WebServiceChartConfigQueryValueConfigToJSONTyped(value?: WebServiceChartConfigQueryValueConfig | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; + public constructor() { } - - return { - - 'colorTheme': WebServiceChartConfigColorThemeToJSON(value['colorTheme']), - 'showBackgroundChart': value['showBackgroundChart'], - 'calculation': WebServiceChartConfigCalculationToJSON(value['calculation']), - 'seriesCalculation': WebServiceChartConfigCalculationToJSON(value['seriesCalculation']), - }; } + diff --git a/src/models/WebServiceChartConfigSort.ts b/src/models/WebServiceChartConfigSort.ts index 1126fe9..9b1c857 100755 --- a/src/models/WebServiceChartConfigSort.ts +++ b/src/models/WebServiceChartConfigSort.ts @@ -1,10 +1,8 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Sentio API * Sentio Open API for query data * - * The version of the OpenAPI document: version not set + * OpenAPI spec version: version not set * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -12,72 +10,37 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime.js'; -import type { WebServiceChartConfigSortBy } from './WebServiceChartConfigSortBy.js'; -import { - WebServiceChartConfigSortByFromJSON, - WebServiceChartConfigSortByFromJSONTyped, - WebServiceChartConfigSortByToJSON, - WebServiceChartConfigSortByToJSONTyped, -} from './WebServiceChartConfigSortBy.js'; - -/** - * - * @export - * @interface WebServiceChartConfigSort - */ -export interface WebServiceChartConfigSort { - /** - * - * @type {WebServiceChartConfigSortBy} - * @memberof WebServiceChartConfigSort - */ - sortBy?: WebServiceChartConfigSortBy; - /** - * - * @type {boolean} - * @memberof WebServiceChartConfigSort - */ - orderDesc?: boolean; -} - - - -/** - * Check if a given object implements the WebServiceChartConfigSort interface. - */ -export function instanceOfWebServiceChartConfigSort(value: object): value is WebServiceChartConfigSort { - return true; -} - -export function WebServiceChartConfigSortFromJSON(json: any): WebServiceChartConfigSort { - return WebServiceChartConfigSortFromJSONTyped(json, false); -} - -export function WebServiceChartConfigSortFromJSONTyped(json: any, ignoreDiscriminator: boolean): WebServiceChartConfigSort { - if (json == null) { - return json; +import { WebServiceChartConfigSortBy } from '../models/WebServiceChartConfigSortBy.js'; +import { HttpFile } from '../http/http.js'; + +export class WebServiceChartConfigSort { + 'sortBy'?: WebServiceChartConfigSortBy; + 'orderDesc'?: boolean; + + static readonly discriminator: string | undefined = undefined; + + static readonly mapping: {[index: string]: string} | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "sortBy", + "baseName": "sortBy", + "type": "WebServiceChartConfigSortBy", + "format": "" + }, + { + "name": "orderDesc", + "baseName": "orderDesc", + "type": "boolean", + "format": "" + } ]; + + static getAttributeTypeMap() { + return WebServiceChartConfigSort.attributeTypeMap; } - return { - - 'sortBy': json['sortBy'] == null ? undefined : WebServiceChartConfigSortByFromJSON(json['sortBy']), - 'orderDesc': json['orderDesc'] == null ? undefined : json['orderDesc'], - }; -} - - export function WebServiceChartConfigSortToJSON(json: any): WebServiceChartConfigSort { - return WebServiceChartConfigSortToJSONTyped(json, false); - } - export function WebServiceChartConfigSortToJSONTyped(value?: WebServiceChartConfigSort | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; + public constructor() { } - - return { - - 'sortBy': WebServiceChartConfigSortByToJSON(value['sortBy']), - 'orderDesc': value['orderDesc'], - }; } + diff --git a/src/models/WebServiceChartConfigSortBy.ts b/src/models/WebServiceChartConfigSortBy.ts index e58a16e..1916283 100755 --- a/src/models/WebServiceChartConfigSortBy.ts +++ b/src/models/WebServiceChartConfigSortBy.ts @@ -1,10 +1,8 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Sentio API * Sentio Open API for query data * - * The version of the OpenAPI document: version not set + * OpenAPI spec version: version not set * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -12,42 +10,9 @@ * Do not edit the class manually. */ +import { HttpFile } from '../http/http.js'; -/** - * - * @export - */ -export const WebServiceChartConfigSortBy = { - ByName: 'ByName', - ByValue: 'ByValue' -} as const; -export type WebServiceChartConfigSortBy = typeof WebServiceChartConfigSortBy[keyof typeof WebServiceChartConfigSortBy]; - - -export function instanceOfWebServiceChartConfigSortBy(value: any): boolean { - for (const key in WebServiceChartConfigSortBy) { - if (Object.prototype.hasOwnProperty.call(WebServiceChartConfigSortBy, key)) { - if (WebServiceChartConfigSortBy[key as keyof typeof WebServiceChartConfigSortBy] === value) { - return true; - } - } - } - return false; -} - -export function WebServiceChartConfigSortByFromJSON(json: any): WebServiceChartConfigSortBy { - return WebServiceChartConfigSortByFromJSONTyped(json, false); +export enum WebServiceChartConfigSortBy { + ByName = 'ByName', + ByValue = 'ByValue' } - -export function WebServiceChartConfigSortByFromJSONTyped(json: any, ignoreDiscriminator: boolean): WebServiceChartConfigSortBy { - return json as WebServiceChartConfigSortBy; -} - -export function WebServiceChartConfigSortByToJSON(value?: WebServiceChartConfigSortBy | null): any { - return value as any; -} - -export function WebServiceChartConfigSortByToJSONTyped(value: any, ignoreDiscriminator: boolean): WebServiceChartConfigSortBy { - return value as WebServiceChartConfigSortBy; -} - diff --git a/src/models/WebServiceChartConfigTableConfig.ts b/src/models/WebServiceChartConfigTableConfig.ts index cebf271..0e13528 100755 --- a/src/models/WebServiceChartConfigTableConfig.ts +++ b/src/models/WebServiceChartConfigTableConfig.ts @@ -1,10 +1,8 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Sentio API * Sentio Open API for query data * - * The version of the OpenAPI document: version not set + * OpenAPI spec version: version not set * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -12,142 +10,88 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime.js'; -import type { WebServiceChartConfigCalculation } from './WebServiceChartConfigCalculation.js'; -import { - WebServiceChartConfigCalculationFromJSON, - WebServiceChartConfigCalculationFromJSONTyped, - WebServiceChartConfigCalculationToJSON, - WebServiceChartConfigCalculationToJSONTyped, -} from './WebServiceChartConfigCalculation.js'; -import type { WebServiceChartConfigValueConfig } from './WebServiceChartConfigValueConfig.js'; -import { - WebServiceChartConfigValueConfigFromJSON, - WebServiceChartConfigValueConfigFromJSONTyped, - WebServiceChartConfigValueConfigToJSON, - WebServiceChartConfigValueConfigToJSONTyped, -} from './WebServiceChartConfigValueConfig.js'; -import type { WebServiceChartConfigColumnSort } from './WebServiceChartConfigColumnSort.js'; -import { - WebServiceChartConfigColumnSortFromJSON, - WebServiceChartConfigColumnSortFromJSONTyped, - WebServiceChartConfigColumnSortToJSON, - WebServiceChartConfigColumnSortToJSONTyped, -} from './WebServiceChartConfigColumnSort.js'; +import { WebServiceChartConfigCalculation } from '../models/WebServiceChartConfigCalculation.js'; +import { WebServiceChartConfigColumnSort } from '../models/WebServiceChartConfigColumnSort.js'; +import { WebServiceChartConfigValueConfig } from '../models/WebServiceChartConfigValueConfig.js'; +import { HttpFile } from '../http/http.js'; -/** - * - * @export - * @interface WebServiceChartConfigTableConfig - */ -export interface WebServiceChartConfigTableConfig { - /** - * - * @type {WebServiceChartConfigCalculation} - * @memberof WebServiceChartConfigTableConfig - */ - calculation?: WebServiceChartConfigCalculation; - /** - * - * @type {{ [key: string]: boolean; }} - * @memberof WebServiceChartConfigTableConfig - */ - showColumns?: { [key: string]: boolean; }; - /** - * - * @type {Array} - * @memberof WebServiceChartConfigTableConfig - */ - sortColumns?: Array; - /** - * - * @type {Array} - * @memberof WebServiceChartConfigTableConfig - */ - columnOrders?: Array; - /** - * - * @type {{ [key: string]: number; }} - * @memberof WebServiceChartConfigTableConfig - */ - columnWidths?: { [key: string]: number; }; - /** - * - * @type {boolean} - * @memberof WebServiceChartConfigTableConfig - */ - showPlainData?: boolean; - /** - * - * @type {{ [key: string]: WebServiceChartConfigCalculation; }} - * @memberof WebServiceChartConfigTableConfig - */ - calculations?: { [key: string]: WebServiceChartConfigCalculation; }; - /** - * - * @type {{ [key: string]: WebServiceChartConfigValueConfig; }} - * @memberof WebServiceChartConfigTableConfig - */ - valueConfigs?: { [key: string]: WebServiceChartConfigValueConfig; }; - /** - * - * @type {number} - * @memberof WebServiceChartConfigTableConfig - */ - rowLimit?: number; -} +export class WebServiceChartConfigTableConfig { + 'calculation'?: WebServiceChartConfigCalculation; + 'showColumns'?: { [key: string]: boolean; }; + 'sortColumns'?: Array; + 'columnOrders'?: Array; + 'columnWidths'?: { [key: string]: number; }; + 'showPlainData'?: boolean; + 'calculations'?: { [key: string]: WebServiceChartConfigCalculation; }; + 'valueConfigs'?: { [key: string]: WebServiceChartConfigValueConfig; }; + 'rowLimit'?: number; + static readonly discriminator: string | undefined = undefined; + static readonly mapping: {[index: string]: string} | undefined = undefined; -/** - * Check if a given object implements the WebServiceChartConfigTableConfig interface. - */ -export function instanceOfWebServiceChartConfigTableConfig(value: object): value is WebServiceChartConfigTableConfig { - return true; -} + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "calculation", + "baseName": "calculation", + "type": "WebServiceChartConfigCalculation", + "format": "" + }, + { + "name": "showColumns", + "baseName": "showColumns", + "type": "{ [key: string]: boolean; }", + "format": "" + }, + { + "name": "sortColumns", + "baseName": "sortColumns", + "type": "Array", + "format": "" + }, + { + "name": "columnOrders", + "baseName": "columnOrders", + "type": "Array", + "format": "" + }, + { + "name": "columnWidths", + "baseName": "columnWidths", + "type": "{ [key: string]: number; }", + "format": "int32" + }, + { + "name": "showPlainData", + "baseName": "showPlainData", + "type": "boolean", + "format": "" + }, + { + "name": "calculations", + "baseName": "calculations", + "type": "{ [key: string]: WebServiceChartConfigCalculation; }", + "format": "" + }, + { + "name": "valueConfigs", + "baseName": "valueConfigs", + "type": "{ [key: string]: WebServiceChartConfigValueConfig; }", + "format": "" + }, + { + "name": "rowLimit", + "baseName": "rowLimit", + "type": "number", + "format": "int32" + } ]; -export function WebServiceChartConfigTableConfigFromJSON(json: any): WebServiceChartConfigTableConfig { - return WebServiceChartConfigTableConfigFromJSONTyped(json, false); -} - -export function WebServiceChartConfigTableConfigFromJSONTyped(json: any, ignoreDiscriminator: boolean): WebServiceChartConfigTableConfig { - if (json == null) { - return json; + static getAttributeTypeMap() { + return WebServiceChartConfigTableConfig.attributeTypeMap; } - return { - - 'calculation': json['calculation'] == null ? undefined : WebServiceChartConfigCalculationFromJSON(json['calculation']), - 'showColumns': json['showColumns'] == null ? undefined : json['showColumns'], - 'sortColumns': json['sortColumns'] == null ? undefined : ((json['sortColumns'] as Array).map(WebServiceChartConfigColumnSortFromJSON)), - 'columnOrders': json['columnOrders'] == null ? undefined : json['columnOrders'], - 'columnWidths': json['columnWidths'] == null ? undefined : json['columnWidths'], - 'showPlainData': json['showPlainData'] == null ? undefined : json['showPlainData'], - 'calculations': json['calculations'] == null ? undefined : (mapValues(json['calculations'], WebServiceChartConfigCalculationFromJSON)), - 'valueConfigs': json['valueConfigs'] == null ? undefined : (mapValues(json['valueConfigs'], WebServiceChartConfigValueConfigFromJSON)), - 'rowLimit': json['rowLimit'] == null ? undefined : json['rowLimit'], - }; -} - export function WebServiceChartConfigTableConfigToJSON(json: any): WebServiceChartConfigTableConfig { - return WebServiceChartConfigTableConfigToJSONTyped(json, false); - } - - export function WebServiceChartConfigTableConfigToJSONTyped(value?: WebServiceChartConfigTableConfig | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; + public constructor() { } - - return { - - 'calculation': WebServiceChartConfigCalculationToJSON(value['calculation']), - 'showColumns': value['showColumns'], - 'sortColumns': value['sortColumns'] == null ? undefined : ((value['sortColumns'] as Array).map(WebServiceChartConfigColumnSortToJSON)), - 'columnOrders': value['columnOrders'], - 'columnWidths': value['columnWidths'], - 'showPlainData': value['showPlainData'], - 'calculations': value['calculations'] == null ? undefined : (mapValues(value['calculations'], WebServiceChartConfigCalculationToJSON)), - 'valueConfigs': value['valueConfigs'] == null ? undefined : (mapValues(value['valueConfigs'], WebServiceChartConfigValueConfigToJSON)), - 'rowLimit': value['rowLimit'], - }; } + diff --git a/src/models/WebServiceChartConfigTimeRangeOverride.ts b/src/models/WebServiceChartConfigTimeRangeOverride.ts index 0a61c70..fae5679 100755 --- a/src/models/WebServiceChartConfigTimeRangeOverride.ts +++ b/src/models/WebServiceChartConfigTimeRangeOverride.ts @@ -1,10 +1,8 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Sentio API * Sentio Open API for query data * - * The version of the OpenAPI document: version not set + * OpenAPI spec version: version not set * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -12,85 +10,43 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime.js'; -import type { CommonTimeRange } from './CommonTimeRange.js'; -import { - CommonTimeRangeFromJSON, - CommonTimeRangeFromJSONTyped, - CommonTimeRangeToJSON, - CommonTimeRangeToJSONTyped, -} from './CommonTimeRange.js'; -import type { WebServiceChartConfigCompareTime } from './WebServiceChartConfigCompareTime.js'; -import { - WebServiceChartConfigCompareTimeFromJSON, - WebServiceChartConfigCompareTimeFromJSONTyped, - WebServiceChartConfigCompareTimeToJSON, - WebServiceChartConfigCompareTimeToJSONTyped, -} from './WebServiceChartConfigCompareTime.js'; - -/** - * - * @export - * @interface WebServiceChartConfigTimeRangeOverride - */ -export interface WebServiceChartConfigTimeRangeOverride { - /** - * - * @type {boolean} - * @memberof WebServiceChartConfigTimeRangeOverride - */ - enabled?: boolean; - /** - * - * @type {CommonTimeRange} - * @memberof WebServiceChartConfigTimeRangeOverride - */ - timeRange?: CommonTimeRange; - /** - * - * @type {WebServiceChartConfigCompareTime} - * @memberof WebServiceChartConfigTimeRangeOverride - */ - compareTime?: WebServiceChartConfigCompareTime; -} - -/** - * Check if a given object implements the WebServiceChartConfigTimeRangeOverride interface. - */ -export function instanceOfWebServiceChartConfigTimeRangeOverride(value: object): value is WebServiceChartConfigTimeRangeOverride { - return true; -} - -export function WebServiceChartConfigTimeRangeOverrideFromJSON(json: any): WebServiceChartConfigTimeRangeOverride { - return WebServiceChartConfigTimeRangeOverrideFromJSONTyped(json, false); -} - -export function WebServiceChartConfigTimeRangeOverrideFromJSONTyped(json: any, ignoreDiscriminator: boolean): WebServiceChartConfigTimeRangeOverride { - if (json == null) { - return json; +import { CommonTimeRange } from '../models/CommonTimeRange.js'; +import { WebServiceChartConfigCompareTime } from '../models/WebServiceChartConfigCompareTime.js'; +import { HttpFile } from '../http/http.js'; + +export class WebServiceChartConfigTimeRangeOverride { + 'enabled'?: boolean; + 'timeRange'?: CommonTimeRange; + 'compareTime'?: WebServiceChartConfigCompareTime; + + static readonly discriminator: string | undefined = undefined; + + static readonly mapping: {[index: string]: string} | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "enabled", + "baseName": "enabled", + "type": "boolean", + "format": "" + }, + { + "name": "timeRange", + "baseName": "timeRange", + "type": "CommonTimeRange", + "format": "" + }, + { + "name": "compareTime", + "baseName": "compareTime", + "type": "WebServiceChartConfigCompareTime", + "format": "" + } ]; + + static getAttributeTypeMap() { + return WebServiceChartConfigTimeRangeOverride.attributeTypeMap; } - return { - - 'enabled': json['enabled'] == null ? undefined : json['enabled'], - 'timeRange': json['timeRange'] == null ? undefined : CommonTimeRangeFromJSON(json['timeRange']), - 'compareTime': json['compareTime'] == null ? undefined : WebServiceChartConfigCompareTimeFromJSON(json['compareTime']), - }; -} - - export function WebServiceChartConfigTimeRangeOverrideToJSON(json: any): WebServiceChartConfigTimeRangeOverride { - return WebServiceChartConfigTimeRangeOverrideToJSONTyped(json, false); - } - export function WebServiceChartConfigTimeRangeOverrideToJSONTyped(value?: WebServiceChartConfigTimeRangeOverride | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; + public constructor() { } - - return { - - 'enabled': value['enabled'], - 'timeRange': CommonTimeRangeToJSON(value['timeRange']), - 'compareTime': WebServiceChartConfigCompareTimeToJSON(value['compareTime']), - }; } - diff --git a/src/models/WebServiceChartConfigValueConfig.ts b/src/models/WebServiceChartConfigValueConfig.ts index 454c66f..91df5d0 100755 --- a/src/models/WebServiceChartConfigValueConfig.ts +++ b/src/models/WebServiceChartConfigValueConfig.ts @@ -1,10 +1,8 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Sentio API * Sentio Open API for query data * - * The version of the OpenAPI document: version not set + * OpenAPI spec version: version not set * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -12,142 +10,88 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime.js'; -import type { WebServiceChartConfigMappingRule } from './WebServiceChartConfigMappingRule.js'; -import { - WebServiceChartConfigMappingRuleFromJSON, - WebServiceChartConfigMappingRuleFromJSONTyped, - WebServiceChartConfigMappingRuleToJSON, - WebServiceChartConfigMappingRuleToJSONTyped, -} from './WebServiceChartConfigMappingRule.js'; -import type { WebServiceChartConfigValueConfigStyle } from './WebServiceChartConfigValueConfigStyle.js'; -import { - WebServiceChartConfigValueConfigStyleFromJSON, - WebServiceChartConfigValueConfigStyleFromJSONTyped, - WebServiceChartConfigValueConfigStyleToJSON, - WebServiceChartConfigValueConfigStyleToJSONTyped, -} from './WebServiceChartConfigValueConfigStyle.js'; -import type { WebServiceChartConfigValueFormatter } from './WebServiceChartConfigValueFormatter.js'; -import { - WebServiceChartConfigValueFormatterFromJSON, - WebServiceChartConfigValueFormatterFromJSONTyped, - WebServiceChartConfigValueFormatterToJSON, - WebServiceChartConfigValueFormatterToJSONTyped, -} from './WebServiceChartConfigValueFormatter.js'; +import { WebServiceChartConfigMappingRule } from '../models/WebServiceChartConfigMappingRule.js'; +import { WebServiceChartConfigValueConfigStyle } from '../models/WebServiceChartConfigValueConfigStyle.js'; +import { WebServiceChartConfigValueFormatter } from '../models/WebServiceChartConfigValueFormatter.js'; +import { HttpFile } from '../http/http.js'; -/** - * - * @export - * @interface WebServiceChartConfigValueConfig - */ -export interface WebServiceChartConfigValueConfig { - /** - * - * @type {WebServiceChartConfigValueFormatter} - * @memberof WebServiceChartConfigValueConfig - */ - valueFormatter?: WebServiceChartConfigValueFormatter; - /** - * - * @type {boolean} - * @memberof WebServiceChartConfigValueConfig - */ - showValueLabel?: boolean; - /** - * - * @type {number} - * @memberof WebServiceChartConfigValueConfig - */ - maxSignificantDigits?: number; - /** - * - * @type {string} - * @memberof WebServiceChartConfigValueConfig - */ - dateFormat?: string; - /** - * - * @type {Array} - * @memberof WebServiceChartConfigValueConfig - */ - mappingRules?: Array; - /** - * - * @type {WebServiceChartConfigValueConfigStyle} - * @memberof WebServiceChartConfigValueConfig - */ - style?: WebServiceChartConfigValueConfigStyle; - /** - * - * @type {number} - * @memberof WebServiceChartConfigValueConfig - */ - maxFractionDigits?: number; - /** - * - * @type {number} - * @memberof WebServiceChartConfigValueConfig - */ - precision?: number; - /** - * - * @type {string} - * @memberof WebServiceChartConfigValueConfig - */ - currencySymbol?: string; -} +export class WebServiceChartConfigValueConfig { + 'valueFormatter'?: WebServiceChartConfigValueFormatter; + 'showValueLabel'?: boolean; + 'maxSignificantDigits'?: number; + 'dateFormat'?: string; + 'mappingRules'?: Array; + 'style'?: WebServiceChartConfigValueConfigStyle; + 'maxFractionDigits'?: number; + 'precision'?: number; + 'currencySymbol'?: string; + static readonly discriminator: string | undefined = undefined; + static readonly mapping: {[index: string]: string} | undefined = undefined; -/** - * Check if a given object implements the WebServiceChartConfigValueConfig interface. - */ -export function instanceOfWebServiceChartConfigValueConfig(value: object): value is WebServiceChartConfigValueConfig { - return true; -} + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "valueFormatter", + "baseName": "valueFormatter", + "type": "WebServiceChartConfigValueFormatter", + "format": "" + }, + { + "name": "showValueLabel", + "baseName": "showValueLabel", + "type": "boolean", + "format": "" + }, + { + "name": "maxSignificantDigits", + "baseName": "maxSignificantDigits", + "type": "number", + "format": "int32" + }, + { + "name": "dateFormat", + "baseName": "dateFormat", + "type": "string", + "format": "" + }, + { + "name": "mappingRules", + "baseName": "mappingRules", + "type": "Array", + "format": "" + }, + { + "name": "style", + "baseName": "style", + "type": "WebServiceChartConfigValueConfigStyle", + "format": "" + }, + { + "name": "maxFractionDigits", + "baseName": "maxFractionDigits", + "type": "number", + "format": "int32" + }, + { + "name": "precision", + "baseName": "precision", + "type": "number", + "format": "int32" + }, + { + "name": "currencySymbol", + "baseName": "currencySymbol", + "type": "string", + "format": "" + } ]; -export function WebServiceChartConfigValueConfigFromJSON(json: any): WebServiceChartConfigValueConfig { - return WebServiceChartConfigValueConfigFromJSONTyped(json, false); -} - -export function WebServiceChartConfigValueConfigFromJSONTyped(json: any, ignoreDiscriminator: boolean): WebServiceChartConfigValueConfig { - if (json == null) { - return json; + static getAttributeTypeMap() { + return WebServiceChartConfigValueConfig.attributeTypeMap; } - return { - - 'valueFormatter': json['valueFormatter'] == null ? undefined : WebServiceChartConfigValueFormatterFromJSON(json['valueFormatter']), - 'showValueLabel': json['showValueLabel'] == null ? undefined : json['showValueLabel'], - 'maxSignificantDigits': json['maxSignificantDigits'] == null ? undefined : json['maxSignificantDigits'], - 'dateFormat': json['dateFormat'] == null ? undefined : json['dateFormat'], - 'mappingRules': json['mappingRules'] == null ? undefined : ((json['mappingRules'] as Array).map(WebServiceChartConfigMappingRuleFromJSON)), - 'style': json['style'] == null ? undefined : WebServiceChartConfigValueConfigStyleFromJSON(json['style']), - 'maxFractionDigits': json['maxFractionDigits'] == null ? undefined : json['maxFractionDigits'], - 'precision': json['precision'] == null ? undefined : json['precision'], - 'currencySymbol': json['currencySymbol'] == null ? undefined : json['currencySymbol'], - }; -} - export function WebServiceChartConfigValueConfigToJSON(json: any): WebServiceChartConfigValueConfig { - return WebServiceChartConfigValueConfigToJSONTyped(json, false); - } - - export function WebServiceChartConfigValueConfigToJSONTyped(value?: WebServiceChartConfigValueConfig | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; + public constructor() { } - - return { - - 'valueFormatter': WebServiceChartConfigValueFormatterToJSON(value['valueFormatter']), - 'showValueLabel': value['showValueLabel'], - 'maxSignificantDigits': value['maxSignificantDigits'], - 'dateFormat': value['dateFormat'], - 'mappingRules': value['mappingRules'] == null ? undefined : ((value['mappingRules'] as Array).map(WebServiceChartConfigMappingRuleToJSON)), - 'style': WebServiceChartConfigValueConfigStyleToJSON(value['style']), - 'maxFractionDigits': value['maxFractionDigits'], - 'precision': value['precision'], - 'currencySymbol': value['currencySymbol'], - }; } + diff --git a/src/models/WebServiceChartConfigValueConfigStyle.ts b/src/models/WebServiceChartConfigValueConfigStyle.ts index 93137ec..9ec2848 100755 --- a/src/models/WebServiceChartConfigValueConfigStyle.ts +++ b/src/models/WebServiceChartConfigValueConfigStyle.ts @@ -1,10 +1,8 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Sentio API * Sentio Open API for query data * - * The version of the OpenAPI document: version not set + * OpenAPI spec version: version not set * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -12,46 +10,13 @@ * Do not edit the class manually. */ +import { HttpFile } from '../http/http.js'; -/** - * - * @export - */ -export const WebServiceChartConfigValueConfigStyle = { - Standard: 'Standard', - Compact: 'Compact', - Scientific: 'Scientific', - Percent: 'Percent', - Currency: 'Currency', - None: 'None' -} as const; -export type WebServiceChartConfigValueConfigStyle = typeof WebServiceChartConfigValueConfigStyle[keyof typeof WebServiceChartConfigValueConfigStyle]; - - -export function instanceOfWebServiceChartConfigValueConfigStyle(value: any): boolean { - for (const key in WebServiceChartConfigValueConfigStyle) { - if (Object.prototype.hasOwnProperty.call(WebServiceChartConfigValueConfigStyle, key)) { - if (WebServiceChartConfigValueConfigStyle[key as keyof typeof WebServiceChartConfigValueConfigStyle] === value) { - return true; - } - } - } - return false; -} - -export function WebServiceChartConfigValueConfigStyleFromJSON(json: any): WebServiceChartConfigValueConfigStyle { - return WebServiceChartConfigValueConfigStyleFromJSONTyped(json, false); +export enum WebServiceChartConfigValueConfigStyle { + Standard = 'Standard', + Compact = 'Compact', + Scientific = 'Scientific', + Percent = 'Percent', + Currency = 'Currency', + None = 'None' } - -export function WebServiceChartConfigValueConfigStyleFromJSONTyped(json: any, ignoreDiscriminator: boolean): WebServiceChartConfigValueConfigStyle { - return json as WebServiceChartConfigValueConfigStyle; -} - -export function WebServiceChartConfigValueConfigStyleToJSON(value?: WebServiceChartConfigValueConfigStyle | null): any { - return value as any; -} - -export function WebServiceChartConfigValueConfigStyleToJSONTyped(value: any, ignoreDiscriminator: boolean): WebServiceChartConfigValueConfigStyle { - return value as WebServiceChartConfigValueConfigStyle; -} - diff --git a/src/models/WebServiceChartConfigValueFormatter.ts b/src/models/WebServiceChartConfigValueFormatter.ts index 6c53d26..0708fea 100755 --- a/src/models/WebServiceChartConfigValueFormatter.ts +++ b/src/models/WebServiceChartConfigValueFormatter.ts @@ -1,10 +1,8 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Sentio API * Sentio Open API for query data * - * The version of the OpenAPI document: version not set + * OpenAPI spec version: version not set * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -12,43 +10,10 @@ * Do not edit the class manually. */ +import { HttpFile } from '../http/http.js'; -/** - * - * @export - */ -export const WebServiceChartConfigValueFormatter = { - NumberFormatter: 'NumberFormatter', - DateFormatter: 'DateFormatter', - StringFormatter: 'StringFormatter' -} as const; -export type WebServiceChartConfigValueFormatter = typeof WebServiceChartConfigValueFormatter[keyof typeof WebServiceChartConfigValueFormatter]; - - -export function instanceOfWebServiceChartConfigValueFormatter(value: any): boolean { - for (const key in WebServiceChartConfigValueFormatter) { - if (Object.prototype.hasOwnProperty.call(WebServiceChartConfigValueFormatter, key)) { - if (WebServiceChartConfigValueFormatter[key as keyof typeof WebServiceChartConfigValueFormatter] === value) { - return true; - } - } - } - return false; -} - -export function WebServiceChartConfigValueFormatterFromJSON(json: any): WebServiceChartConfigValueFormatter { - return WebServiceChartConfigValueFormatterFromJSONTyped(json, false); +export enum WebServiceChartConfigValueFormatter { + NumberFormatter = 'NumberFormatter', + DateFormatter = 'DateFormatter', + StringFormatter = 'StringFormatter' } - -export function WebServiceChartConfigValueFormatterFromJSONTyped(json: any, ignoreDiscriminator: boolean): WebServiceChartConfigValueFormatter { - return json as WebServiceChartConfigValueFormatter; -} - -export function WebServiceChartConfigValueFormatterToJSON(value?: WebServiceChartConfigValueFormatter | null): any { - return value as any; -} - -export function WebServiceChartConfigValueFormatterToJSONTyped(value: any, ignoreDiscriminator: boolean): WebServiceChartConfigValueFormatter { - return value as WebServiceChartConfigValueFormatter; -} - diff --git a/src/models/WebServiceChartConfigYAxisConfig.ts b/src/models/WebServiceChartConfigYAxisConfig.ts index 23a45ab..813e7df 100755 --- a/src/models/WebServiceChartConfigYAxisConfig.ts +++ b/src/models/WebServiceChartConfigYAxisConfig.ts @@ -1,10 +1,8 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Sentio API * Sentio Open API for query data * - * The version of the OpenAPI document: version not set + * OpenAPI spec version: version not set * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -12,78 +10,48 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime.js'; -/** - * - * @export - * @interface WebServiceChartConfigYAxisConfig - */ -export interface WebServiceChartConfigYAxisConfig { - /** - * - * @type {string} - * @memberof WebServiceChartConfigYAxisConfig - */ - min?: string; - /** - * - * @type {string} - * @memberof WebServiceChartConfigYAxisConfig - */ - max?: string; - /** - * - * @type {boolean} - * @memberof WebServiceChartConfigYAxisConfig - */ - scale?: boolean; - /** - * - * @type {string} - * @memberof WebServiceChartConfigYAxisConfig - */ - stacked?: string; -} - -/** - * Check if a given object implements the WebServiceChartConfigYAxisConfig interface. - */ -export function instanceOfWebServiceChartConfigYAxisConfig(value: object): value is WebServiceChartConfigYAxisConfig { - return true; -} - -export function WebServiceChartConfigYAxisConfigFromJSON(json: any): WebServiceChartConfigYAxisConfig { - return WebServiceChartConfigYAxisConfigFromJSONTyped(json, false); -} - -export function WebServiceChartConfigYAxisConfigFromJSONTyped(json: any, ignoreDiscriminator: boolean): WebServiceChartConfigYAxisConfig { - if (json == null) { - return json; +import { HttpFile } from '../http/http.js'; + +export class WebServiceChartConfigYAxisConfig { + 'min'?: string; + 'max'?: string; + 'scale'?: boolean; + 'stacked'?: string; + + static readonly discriminator: string | undefined = undefined; + + static readonly mapping: {[index: string]: string} | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "min", + "baseName": "min", + "type": "string", + "format": "" + }, + { + "name": "max", + "baseName": "max", + "type": "string", + "format": "" + }, + { + "name": "scale", + "baseName": "scale", + "type": "boolean", + "format": "" + }, + { + "name": "stacked", + "baseName": "stacked", + "type": "string", + "format": "" + } ]; + + static getAttributeTypeMap() { + return WebServiceChartConfigYAxisConfig.attributeTypeMap; } - return { - - 'min': json['min'] == null ? undefined : json['min'], - 'max': json['max'] == null ? undefined : json['max'], - 'scale': json['scale'] == null ? undefined : json['scale'], - 'stacked': json['stacked'] == null ? undefined : json['stacked'], - }; -} - export function WebServiceChartConfigYAxisConfigToJSON(json: any): WebServiceChartConfigYAxisConfig { - return WebServiceChartConfigYAxisConfigToJSONTyped(json, false); - } - - export function WebServiceChartConfigYAxisConfigToJSONTyped(value?: WebServiceChartConfigYAxisConfig | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; + public constructor() { } - - return { - - 'min': value['min'], - 'max': value['max'], - 'scale': value['scale'], - 'stacked': value['stacked'], - }; } - diff --git a/src/models/WebServiceChartDataSourceType.ts b/src/models/WebServiceChartDataSourceType.ts index 4aa5329..fd98f79 100755 --- a/src/models/WebServiceChartDataSourceType.ts +++ b/src/models/WebServiceChartDataSourceType.ts @@ -1,10 +1,8 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Sentio API * Sentio Open API for query data * - * The version of the OpenAPI document: version not set + * OpenAPI spec version: version not set * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -12,47 +10,14 @@ * Do not edit the class manually. */ +import { HttpFile } from '../http/http.js'; -/** - * - * @export - */ -export const WebServiceChartDataSourceType = { - Metrics: 'METRICS', - Notes: 'NOTES', - Analytics: 'ANALYTICS', - Insights: 'INSIGHTS', - Events: 'EVENTS', - Retention: 'RETENTION', - Sql: 'SQL' -} as const; -export type WebServiceChartDataSourceType = typeof WebServiceChartDataSourceType[keyof typeof WebServiceChartDataSourceType]; - - -export function instanceOfWebServiceChartDataSourceType(value: any): boolean { - for (const key in WebServiceChartDataSourceType) { - if (Object.prototype.hasOwnProperty.call(WebServiceChartDataSourceType, key)) { - if (WebServiceChartDataSourceType[key as keyof typeof WebServiceChartDataSourceType] === value) { - return true; - } - } - } - return false; -} - -export function WebServiceChartDataSourceTypeFromJSON(json: any): WebServiceChartDataSourceType { - return WebServiceChartDataSourceTypeFromJSONTyped(json, false); +export enum WebServiceChartDataSourceType { + Metrics = 'METRICS', + Notes = 'NOTES', + Analytics = 'ANALYTICS', + Insights = 'INSIGHTS', + Events = 'EVENTS', + Retention = 'RETENTION', + Sql = 'SQL' } - -export function WebServiceChartDataSourceTypeFromJSONTyped(json: any, ignoreDiscriminator: boolean): WebServiceChartDataSourceType { - return json as WebServiceChartDataSourceType; -} - -export function WebServiceChartDataSourceTypeToJSON(value?: WebServiceChartDataSourceType | null): any { - return value as any; -} - -export function WebServiceChartDataSourceTypeToJSONTyped(value: any, ignoreDiscriminator: boolean): WebServiceChartDataSourceType { - return value as WebServiceChartDataSourceType; -} - diff --git a/src/models/WebServiceDashboard.ts b/src/models/WebServiceDashboard.ts index f59edda..7f25d12 100755 --- a/src/models/WebServiceDashboard.ts +++ b/src/models/WebServiceDashboard.ts @@ -1,10 +1,8 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Sentio API * Sentio Open API for query data * - * The version of the OpenAPI document: version not set + * OpenAPI spec version: version not set * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -12,204 +10,132 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime.js'; -import type { WebServiceDashboardExtra } from './WebServiceDashboardExtra.js'; -import { - WebServiceDashboardExtraFromJSON, - WebServiceDashboardExtraFromJSONTyped, - WebServiceDashboardExtraToJSON, - WebServiceDashboardExtraToJSONTyped, -} from './WebServiceDashboardExtra.js'; -import type { WebServiceDashboardDashboardVisibility } from './WebServiceDashboardDashboardVisibility.js'; -import { - WebServiceDashboardDashboardVisibilityFromJSON, - WebServiceDashboardDashboardVisibilityFromJSONTyped, - WebServiceDashboardDashboardVisibilityToJSON, - WebServiceDashboardDashboardVisibilityToJSONTyped, -} from './WebServiceDashboardDashboardVisibility.js'; -import type { WebServiceDashboardResponsiveLayouts } from './WebServiceDashboardResponsiveLayouts.js'; -import { - WebServiceDashboardResponsiveLayoutsFromJSON, - WebServiceDashboardResponsiveLayoutsFromJSONTyped, - WebServiceDashboardResponsiveLayoutsToJSON, - WebServiceDashboardResponsiveLayoutsToJSONTyped, -} from './WebServiceDashboardResponsiveLayouts.js'; -import type { WebServicePanel } from './WebServicePanel.js'; -import { - WebServicePanelFromJSON, - WebServicePanelFromJSONTyped, - WebServicePanelToJSON, - WebServicePanelToJSONTyped, -} from './WebServicePanel.js'; -import type { WebServiceDashboardSharing } from './WebServiceDashboardSharing.js'; -import { - WebServiceDashboardSharingFromJSON, - WebServiceDashboardSharingFromJSONTyped, - WebServiceDashboardSharingToJSON, - WebServiceDashboardSharingToJSONTyped, -} from './WebServiceDashboardSharing.js'; +import { WebServiceDashboardDashboardVisibility } from '../models/WebServiceDashboardDashboardVisibility.js'; +import { WebServiceDashboardExtra } from '../models/WebServiceDashboardExtra.js'; +import { WebServiceDashboardResponsiveLayouts } from '../models/WebServiceDashboardResponsiveLayouts.js'; +import { WebServiceDashboardSharing } from '../models/WebServiceDashboardSharing.js'; +import { WebServicePanel } from '../models/WebServicePanel.js'; +import { HttpFile } from '../http/http.js'; -/** - * - * @export - * @interface WebServiceDashboard - */ -export interface WebServiceDashboard { - /** - * - * @type {string} - * @memberof WebServiceDashboard - */ - id?: string; - /** - * - * @type {string} - * @memberof WebServiceDashboard - */ - name?: string; - /** - * - * @type {string} - * @memberof WebServiceDashboard - */ - projectId?: string; - /** - * - * @type {string} - * @memberof WebServiceDashboard - */ - description?: string; - /** - * - * @type {Date} - * @memberof WebServiceDashboard - */ - createdAt?: Date; - /** - * - * @type {Date} - * @memberof WebServiceDashboard - */ - updatedAt?: Date; - /** - * - * @type {{ [key: string]: WebServicePanel; }} - * @memberof WebServiceDashboard - */ - panels?: { [key: string]: WebServicePanel; }; - /** - * - * @type {WebServiceDashboardResponsiveLayouts} - * @memberof WebServiceDashboard - */ - layouts?: WebServiceDashboardResponsiveLayouts; - /** - * - * @type {WebServiceDashboardExtra} - * @memberof WebServiceDashboard - */ - extra?: WebServiceDashboardExtra; - /** - * - * @type {WebServiceDashboardSharing} - * @memberof WebServiceDashboard - */ - sharing?: WebServiceDashboardSharing; - /** - * - * @type {boolean} - * @memberof WebServiceDashboard - */ - _default?: boolean; - /** - * - * @type {WebServiceDashboardDashboardVisibility} - * @memberof WebServiceDashboard - */ - visibility?: WebServiceDashboardDashboardVisibility; - /** - * - * @type {string} - * @memberof WebServiceDashboard - */ - ownerId?: string; - /** - * - * @type {Array} - * @memberof WebServiceDashboard - */ - tags?: Array; - /** - * - * @type {string} - * @memberof WebServiceDashboard - */ - url?: string; -} +export class WebServiceDashboard { + 'id'?: string; + 'name'?: string; + 'projectId'?: string; + 'description'?: string; + 'createdAt'?: Date; + 'updatedAt'?: Date; + 'panels'?: { [key: string]: WebServicePanel; }; + 'layouts'?: WebServiceDashboardResponsiveLayouts; + 'extra'?: WebServiceDashboardExtra; + 'sharing'?: WebServiceDashboardSharing; + '_default'?: boolean; + 'visibility'?: WebServiceDashboardDashboardVisibility; + 'ownerId'?: string; + 'tags'?: Array; + 'url'?: string; + static readonly discriminator: string | undefined = undefined; + static readonly mapping: {[index: string]: string} | undefined = undefined; -/** - * Check if a given object implements the WebServiceDashboard interface. - */ -export function instanceOfWebServiceDashboard(value: object): value is WebServiceDashboard { - return true; -} + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "id", + "baseName": "id", + "type": "string", + "format": "" + }, + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + }, + { + "name": "projectId", + "baseName": "projectId", + "type": "string", + "format": "" + }, + { + "name": "description", + "baseName": "description", + "type": "string", + "format": "" + }, + { + "name": "createdAt", + "baseName": "createdAt", + "type": "Date", + "format": "date-time" + }, + { + "name": "updatedAt", + "baseName": "updatedAt", + "type": "Date", + "format": "date-time" + }, + { + "name": "panels", + "baseName": "panels", + "type": "{ [key: string]: WebServicePanel; }", + "format": "" + }, + { + "name": "layouts", + "baseName": "layouts", + "type": "WebServiceDashboardResponsiveLayouts", + "format": "" + }, + { + "name": "extra", + "baseName": "extra", + "type": "WebServiceDashboardExtra", + "format": "" + }, + { + "name": "sharing", + "baseName": "sharing", + "type": "WebServiceDashboardSharing", + "format": "" + }, + { + "name": "_default", + "baseName": "default", + "type": "boolean", + "format": "" + }, + { + "name": "visibility", + "baseName": "visibility", + "type": "WebServiceDashboardDashboardVisibility", + "format": "" + }, + { + "name": "ownerId", + "baseName": "ownerId", + "type": "string", + "format": "" + }, + { + "name": "tags", + "baseName": "tags", + "type": "Array", + "format": "" + }, + { + "name": "url", + "baseName": "url", + "type": "string", + "format": "" + } ]; -export function WebServiceDashboardFromJSON(json: any): WebServiceDashboard { - return WebServiceDashboardFromJSONTyped(json, false); -} - -export function WebServiceDashboardFromJSONTyped(json: any, ignoreDiscriminator: boolean): WebServiceDashboard { - if (json == null) { - return json; + static getAttributeTypeMap() { + return WebServiceDashboard.attributeTypeMap; } - return { - - 'id': json['id'] == null ? undefined : json['id'], - 'name': json['name'] == null ? undefined : json['name'], - 'projectId': json['projectId'] == null ? undefined : json['projectId'], - 'description': json['description'] == null ? undefined : json['description'], - 'createdAt': json['createdAt'] == null ? undefined : (new Date(json['createdAt'])), - 'updatedAt': json['updatedAt'] == null ? undefined : (new Date(json['updatedAt'])), - 'panels': json['panels'] == null ? undefined : (mapValues(json['panels'], WebServicePanelFromJSON)), - 'layouts': json['layouts'] == null ? undefined : WebServiceDashboardResponsiveLayoutsFromJSON(json['layouts']), - 'extra': json['extra'] == null ? undefined : WebServiceDashboardExtraFromJSON(json['extra']), - 'sharing': json['sharing'] == null ? undefined : WebServiceDashboardSharingFromJSON(json['sharing']), - '_default': json['default'] == null ? undefined : json['default'], - 'visibility': json['visibility'] == null ? undefined : WebServiceDashboardDashboardVisibilityFromJSON(json['visibility']), - 'ownerId': json['ownerId'] == null ? undefined : json['ownerId'], - 'tags': json['tags'] == null ? undefined : json['tags'], - 'url': json['url'] == null ? undefined : json['url'], - }; -} - export function WebServiceDashboardToJSON(json: any): WebServiceDashboard { - return WebServiceDashboardToJSONTyped(json, false); - } - - export function WebServiceDashboardToJSONTyped(value?: WebServiceDashboard | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; + public constructor() { } - - return { - - 'id': value['id'], - 'name': value['name'], - 'projectId': value['projectId'], - 'description': value['description'], - 'createdAt': value['createdAt'] == null ? undefined : ((value['createdAt']).toISOString()), - 'updatedAt': value['updatedAt'] == null ? undefined : ((value['updatedAt']).toISOString()), - 'panels': value['panels'] == null ? undefined : (mapValues(value['panels'], WebServicePanelToJSON)), - 'layouts': WebServiceDashboardResponsiveLayoutsToJSON(value['layouts']), - 'extra': WebServiceDashboardExtraToJSON(value['extra']), - 'sharing': WebServiceDashboardSharingToJSON(value['sharing']), - 'default': value['_default'], - 'visibility': WebServiceDashboardDashboardVisibilityToJSON(value['visibility']), - 'ownerId': value['ownerId'], - 'tags': value['tags'], - 'url': value['url'], - }; } + diff --git a/src/models/WebServiceDashboardDashboardVisibility.ts b/src/models/WebServiceDashboardDashboardVisibility.ts index a5374d0..c753c6e 100755 --- a/src/models/WebServiceDashboardDashboardVisibility.ts +++ b/src/models/WebServiceDashboardDashboardVisibility.ts @@ -1,10 +1,8 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Sentio API * Sentio Open API for query data * - * The version of the OpenAPI document: version not set + * OpenAPI spec version: version not set * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -12,43 +10,10 @@ * Do not edit the class manually. */ +import { HttpFile } from '../http/http.js'; -/** - * - * @export - */ -export const WebServiceDashboardDashboardVisibility = { - Internal: 'INTERNAL', - Private: 'PRIVATE', - Public: 'PUBLIC' -} as const; -export type WebServiceDashboardDashboardVisibility = typeof WebServiceDashboardDashboardVisibility[keyof typeof WebServiceDashboardDashboardVisibility]; - - -export function instanceOfWebServiceDashboardDashboardVisibility(value: any): boolean { - for (const key in WebServiceDashboardDashboardVisibility) { - if (Object.prototype.hasOwnProperty.call(WebServiceDashboardDashboardVisibility, key)) { - if (WebServiceDashboardDashboardVisibility[key as keyof typeof WebServiceDashboardDashboardVisibility] === value) { - return true; - } - } - } - return false; -} - -export function WebServiceDashboardDashboardVisibilityFromJSON(json: any): WebServiceDashboardDashboardVisibility { - return WebServiceDashboardDashboardVisibilityFromJSONTyped(json, false); +export enum WebServiceDashboardDashboardVisibility { + Internal = 'INTERNAL', + Private = 'PRIVATE', + Public = 'PUBLIC' } - -export function WebServiceDashboardDashboardVisibilityFromJSONTyped(json: any, ignoreDiscriminator: boolean): WebServiceDashboardDashboardVisibility { - return json as WebServiceDashboardDashboardVisibility; -} - -export function WebServiceDashboardDashboardVisibilityToJSON(value?: WebServiceDashboardDashboardVisibility | null): any { - return value as any; -} - -export function WebServiceDashboardDashboardVisibilityToJSONTyped(value: any, ignoreDiscriminator: boolean): WebServiceDashboardDashboardVisibility { - return value as WebServiceDashboardDashboardVisibility; -} - diff --git a/src/models/WebServiceDashboardExtra.ts b/src/models/WebServiceDashboardExtra.ts index 1fe3d4b..1961d70 100755 --- a/src/models/WebServiceDashboardExtra.ts +++ b/src/models/WebServiceDashboardExtra.ts @@ -1,10 +1,8 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Sentio API * Sentio Open API for query data * - * The version of the OpenAPI document: version not set + * OpenAPI spec version: version not set * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -12,77 +10,36 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime.js'; -import type { WebServiceDashboardExtraTemplateVariable } from './WebServiceDashboardExtraTemplateVariable.js'; -import { - WebServiceDashboardExtraTemplateVariableFromJSON, - WebServiceDashboardExtraTemplateVariableFromJSONTyped, - WebServiceDashboardExtraTemplateVariableToJSON, - WebServiceDashboardExtraTemplateVariableToJSONTyped, -} from './WebServiceDashboardExtraTemplateVariable.js'; -import type { WebServiceDashboardExtraTemplateView } from './WebServiceDashboardExtraTemplateView.js'; -import { - WebServiceDashboardExtraTemplateViewFromJSON, - WebServiceDashboardExtraTemplateViewFromJSONTyped, - WebServiceDashboardExtraTemplateViewToJSON, - WebServiceDashboardExtraTemplateViewToJSONTyped, -} from './WebServiceDashboardExtraTemplateView.js'; - -/** - * - * @export - * @interface WebServiceDashboardExtra - */ -export interface WebServiceDashboardExtra { - /** - * - * @type {{ [key: string]: WebServiceDashboardExtraTemplateVariable; }} - * @memberof WebServiceDashboardExtra - */ - templateVariables?: { [key: string]: WebServiceDashboardExtraTemplateVariable; }; - /** - * - * @type {Array} - * @memberof WebServiceDashboardExtra - */ - templateViews?: Array; -} - -/** - * Check if a given object implements the WebServiceDashboardExtra interface. - */ -export function instanceOfWebServiceDashboardExtra(value: object): value is WebServiceDashboardExtra { - return true; -} - -export function WebServiceDashboardExtraFromJSON(json: any): WebServiceDashboardExtra { - return WebServiceDashboardExtraFromJSONTyped(json, false); -} - -export function WebServiceDashboardExtraFromJSONTyped(json: any, ignoreDiscriminator: boolean): WebServiceDashboardExtra { - if (json == null) { - return json; +import { WebServiceDashboardExtraTemplateVariable } from '../models/WebServiceDashboardExtraTemplateVariable.js'; +import { WebServiceDashboardExtraTemplateView } from '../models/WebServiceDashboardExtraTemplateView.js'; +import { HttpFile } from '../http/http.js'; + +export class WebServiceDashboardExtra { + 'templateVariables'?: { [key: string]: WebServiceDashboardExtraTemplateVariable; }; + 'templateViews'?: Array; + + static readonly discriminator: string | undefined = undefined; + + static readonly mapping: {[index: string]: string} | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "templateVariables", + "baseName": "templateVariables", + "type": "{ [key: string]: WebServiceDashboardExtraTemplateVariable; }", + "format": "" + }, + { + "name": "templateViews", + "baseName": "templateViews", + "type": "Array", + "format": "" + } ]; + + static getAttributeTypeMap() { + return WebServiceDashboardExtra.attributeTypeMap; } - return { - - 'templateVariables': json['templateVariables'] == null ? undefined : (mapValues(json['templateVariables'], WebServiceDashboardExtraTemplateVariableFromJSON)), - 'templateViews': json['templateViews'] == null ? undefined : ((json['templateViews'] as Array).map(WebServiceDashboardExtraTemplateViewFromJSON)), - }; -} - - export function WebServiceDashboardExtraToJSON(json: any): WebServiceDashboardExtra { - return WebServiceDashboardExtraToJSONTyped(json, false); - } - export function WebServiceDashboardExtraToJSONTyped(value?: WebServiceDashboardExtra | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; + public constructor() { } - - return { - - 'templateVariables': value['templateVariables'] == null ? undefined : (mapValues(value['templateVariables'], WebServiceDashboardExtraTemplateVariableToJSON)), - 'templateViews': value['templateViews'] == null ? undefined : ((value['templateViews'] as Array).map(WebServiceDashboardExtraTemplateViewToJSON)), - }; } - diff --git a/src/models/WebServiceDashboardExtraTemplateVariable.ts b/src/models/WebServiceDashboardExtraTemplateVariable.ts index 70159b0..97572e5 100755 --- a/src/models/WebServiceDashboardExtraTemplateVariable.ts +++ b/src/models/WebServiceDashboardExtraTemplateVariable.ts @@ -1,10 +1,8 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Sentio API * Sentio Open API for query data * - * The version of the OpenAPI document: version not set + * OpenAPI spec version: version not set * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -12,78 +10,48 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime.js'; -/** - * - * @export - * @interface WebServiceDashboardExtraTemplateVariable - */ -export interface WebServiceDashboardExtraTemplateVariable { - /** - * - * @type {string} - * @memberof WebServiceDashboardExtraTemplateVariable - */ - field?: string; - /** - * - * @type {string} - * @memberof WebServiceDashboardExtraTemplateVariable - */ - defaultValue?: string; - /** - * - * @type {string} - * @memberof WebServiceDashboardExtraTemplateVariable - */ - sourceName?: string; - /** - * - * @type {Array} - * @memberof WebServiceDashboardExtraTemplateVariable - */ - options?: Array; -} - -/** - * Check if a given object implements the WebServiceDashboardExtraTemplateVariable interface. - */ -export function instanceOfWebServiceDashboardExtraTemplateVariable(value: object): value is WebServiceDashboardExtraTemplateVariable { - return true; -} - -export function WebServiceDashboardExtraTemplateVariableFromJSON(json: any): WebServiceDashboardExtraTemplateVariable { - return WebServiceDashboardExtraTemplateVariableFromJSONTyped(json, false); -} - -export function WebServiceDashboardExtraTemplateVariableFromJSONTyped(json: any, ignoreDiscriminator: boolean): WebServiceDashboardExtraTemplateVariable { - if (json == null) { - return json; +import { HttpFile } from '../http/http.js'; + +export class WebServiceDashboardExtraTemplateVariable { + 'field'?: string; + 'defaultValue'?: string; + 'sourceName'?: string; + 'options'?: Array; + + static readonly discriminator: string | undefined = undefined; + + static readonly mapping: {[index: string]: string} | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "field", + "baseName": "field", + "type": "string", + "format": "" + }, + { + "name": "defaultValue", + "baseName": "defaultValue", + "type": "string", + "format": "" + }, + { + "name": "sourceName", + "baseName": "sourceName", + "type": "string", + "format": "" + }, + { + "name": "options", + "baseName": "options", + "type": "Array", + "format": "" + } ]; + + static getAttributeTypeMap() { + return WebServiceDashboardExtraTemplateVariable.attributeTypeMap; } - return { - - 'field': json['field'] == null ? undefined : json['field'], - 'defaultValue': json['defaultValue'] == null ? undefined : json['defaultValue'], - 'sourceName': json['sourceName'] == null ? undefined : json['sourceName'], - 'options': json['options'] == null ? undefined : json['options'], - }; -} - export function WebServiceDashboardExtraTemplateVariableToJSON(json: any): WebServiceDashboardExtraTemplateVariable { - return WebServiceDashboardExtraTemplateVariableToJSONTyped(json, false); - } - - export function WebServiceDashboardExtraTemplateVariableToJSONTyped(value?: WebServiceDashboardExtraTemplateVariable | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; + public constructor() { } - - return { - - 'field': value['field'], - 'defaultValue': value['defaultValue'], - 'sourceName': value['sourceName'], - 'options': value['options'], - }; } - diff --git a/src/models/WebServiceDashboardExtraTemplateView.ts b/src/models/WebServiceDashboardExtraTemplateView.ts index 058c311..ecc7be3 100755 --- a/src/models/WebServiceDashboardExtraTemplateView.ts +++ b/src/models/WebServiceDashboardExtraTemplateView.ts @@ -1,10 +1,8 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Sentio API * Sentio Open API for query data * - * The version of the OpenAPI document: version not set + * OpenAPI spec version: version not set * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -12,54 +10,27 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime.js'; -/** - * - * @export - * @interface WebServiceDashboardExtraTemplateView - */ -export interface WebServiceDashboardExtraTemplateView { - /** - * - * @type {{ [key: string]: string; }} - * @memberof WebServiceDashboardExtraTemplateView - */ - values?: { [key: string]: string; }; -} +import { HttpFile } from '../http/http.js'; -/** - * Check if a given object implements the WebServiceDashboardExtraTemplateView interface. - */ -export function instanceOfWebServiceDashboardExtraTemplateView(value: object): value is WebServiceDashboardExtraTemplateView { - return true; -} +export class WebServiceDashboardExtraTemplateView { + 'values'?: { [key: string]: string; }; -export function WebServiceDashboardExtraTemplateViewFromJSON(json: any): WebServiceDashboardExtraTemplateView { - return WebServiceDashboardExtraTemplateViewFromJSONTyped(json, false); -} + static readonly discriminator: string | undefined = undefined; -export function WebServiceDashboardExtraTemplateViewFromJSONTyped(json: any, ignoreDiscriminator: boolean): WebServiceDashboardExtraTemplateView { - if (json == null) { - return json; - } - return { - - 'values': json['values'] == null ? undefined : json['values'], - }; -} + static readonly mapping: {[index: string]: string} | undefined = undefined; - export function WebServiceDashboardExtraTemplateViewToJSON(json: any): WebServiceDashboardExtraTemplateView { - return WebServiceDashboardExtraTemplateViewToJSONTyped(json, false); - } + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "values", + "baseName": "values", + "type": "{ [key: string]: string; }", + "format": "" + } ]; - export function WebServiceDashboardExtraTemplateViewToJSONTyped(value?: WebServiceDashboardExtraTemplateView | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; + static getAttributeTypeMap() { + return WebServiceDashboardExtraTemplateView.attributeTypeMap; } - return { - - 'values': value['values'], - }; + public constructor() { + } } - diff --git a/src/models/WebServiceDashboardLayouts.ts b/src/models/WebServiceDashboardLayouts.ts index 47236b4..edc155d 100755 --- a/src/models/WebServiceDashboardLayouts.ts +++ b/src/models/WebServiceDashboardLayouts.ts @@ -1,10 +1,8 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Sentio API * Sentio Open API for query data * - * The version of the OpenAPI document: version not set + * OpenAPI spec version: version not set * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -12,62 +10,28 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime.js'; -import type { WebServiceDashboardLayoutsLayout } from './WebServiceDashboardLayoutsLayout.js'; -import { - WebServiceDashboardLayoutsLayoutFromJSON, - WebServiceDashboardLayoutsLayoutFromJSONTyped, - WebServiceDashboardLayoutsLayoutToJSON, - WebServiceDashboardLayoutsLayoutToJSONTyped, -} from './WebServiceDashboardLayoutsLayout.js'; +import { WebServiceDashboardLayoutsLayout } from '../models/WebServiceDashboardLayoutsLayout.js'; +import { HttpFile } from '../http/http.js'; -/** - * - * @export - * @interface WebServiceDashboardLayouts - */ -export interface WebServiceDashboardLayouts { - /** - * - * @type {Array} - * @memberof WebServiceDashboardLayouts - */ - layouts?: Array; -} +export class WebServiceDashboardLayouts { + 'layouts'?: Array; -/** - * Check if a given object implements the WebServiceDashboardLayouts interface. - */ -export function instanceOfWebServiceDashboardLayouts(value: object): value is WebServiceDashboardLayouts { - return true; -} + static readonly discriminator: string | undefined = undefined; -export function WebServiceDashboardLayoutsFromJSON(json: any): WebServiceDashboardLayouts { - return WebServiceDashboardLayoutsFromJSONTyped(json, false); -} - -export function WebServiceDashboardLayoutsFromJSONTyped(json: any, ignoreDiscriminator: boolean): WebServiceDashboardLayouts { - if (json == null) { - return json; - } - return { - - 'layouts': json['layouts'] == null ? undefined : ((json['layouts'] as Array).map(WebServiceDashboardLayoutsLayoutFromJSON)), - }; -} + static readonly mapping: {[index: string]: string} | undefined = undefined; - export function WebServiceDashboardLayoutsToJSON(json: any): WebServiceDashboardLayouts { - return WebServiceDashboardLayoutsToJSONTyped(json, false); - } + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "layouts", + "baseName": "layouts", + "type": "Array", + "format": "" + } ]; - export function WebServiceDashboardLayoutsToJSONTyped(value?: WebServiceDashboardLayouts | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; + static getAttributeTypeMap() { + return WebServiceDashboardLayouts.attributeTypeMap; } - return { - - 'layouts': value['layouts'] == null ? undefined : ((value['layouts'] as Array).map(WebServiceDashboardLayoutsLayoutToJSON)), - }; + public constructor() { + } } - diff --git a/src/models/WebServiceDashboardLayoutsLayout.ts b/src/models/WebServiceDashboardLayoutsLayout.ts index ff9279b..e876370 100755 --- a/src/models/WebServiceDashboardLayoutsLayout.ts +++ b/src/models/WebServiceDashboardLayoutsLayout.ts @@ -1,10 +1,8 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Sentio API * Sentio Open API for query data * - * The version of the OpenAPI document: version not set + * OpenAPI spec version: version not set * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -12,86 +10,55 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime.js'; -/** - * - * @export - * @interface WebServiceDashboardLayoutsLayout - */ -export interface WebServiceDashboardLayoutsLayout { - /** - * - * @type {string} - * @memberof WebServiceDashboardLayoutsLayout - */ - i?: string; - /** - * - * @type {number} - * @memberof WebServiceDashboardLayoutsLayout - */ - x?: number; - /** - * - * @type {number} - * @memberof WebServiceDashboardLayoutsLayout - */ - y?: number; - /** - * - * @type {number} - * @memberof WebServiceDashboardLayoutsLayout - */ - w?: number; - /** - * - * @type {number} - * @memberof WebServiceDashboardLayoutsLayout - */ - h?: number; -} +import { HttpFile } from '../http/http.js'; -/** - * Check if a given object implements the WebServiceDashboardLayoutsLayout interface. - */ -export function instanceOfWebServiceDashboardLayoutsLayout(value: object): value is WebServiceDashboardLayoutsLayout { - return true; -} +export class WebServiceDashboardLayoutsLayout { + 'i'?: string; + 'x'?: number; + 'y'?: number; + 'w'?: number; + 'h'?: number; -export function WebServiceDashboardLayoutsLayoutFromJSON(json: any): WebServiceDashboardLayoutsLayout { - return WebServiceDashboardLayoutsLayoutFromJSONTyped(json, false); -} + static readonly discriminator: string | undefined = undefined; -export function WebServiceDashboardLayoutsLayoutFromJSONTyped(json: any, ignoreDiscriminator: boolean): WebServiceDashboardLayoutsLayout { - if (json == null) { - return json; - } - return { - - 'i': json['i'] == null ? undefined : json['i'], - 'x': json['x'] == null ? undefined : json['x'], - 'y': json['y'] == null ? undefined : json['y'], - 'w': json['w'] == null ? undefined : json['w'], - 'h': json['h'] == null ? undefined : json['h'], - }; -} + static readonly mapping: {[index: string]: string} | undefined = undefined; - export function WebServiceDashboardLayoutsLayoutToJSON(json: any): WebServiceDashboardLayoutsLayout { - return WebServiceDashboardLayoutsLayoutToJSONTyped(json, false); - } + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "i", + "baseName": "i", + "type": "string", + "format": "" + }, + { + "name": "x", + "baseName": "x", + "type": "number", + "format": "int32" + }, + { + "name": "y", + "baseName": "y", + "type": "number", + "format": "int32" + }, + { + "name": "w", + "baseName": "w", + "type": "number", + "format": "int32" + }, + { + "name": "h", + "baseName": "h", + "type": "number", + "format": "int32" + } ]; - export function WebServiceDashboardLayoutsLayoutToJSONTyped(value?: WebServiceDashboardLayoutsLayout | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; + static getAttributeTypeMap() { + return WebServiceDashboardLayoutsLayout.attributeTypeMap; } - return { - - 'i': value['i'], - 'x': value['x'], - 'y': value['y'], - 'w': value['w'], - 'h': value['h'], - }; + public constructor() { + } } - diff --git a/src/models/WebServiceDashboardResponsiveLayouts.ts b/src/models/WebServiceDashboardResponsiveLayouts.ts index faa5bf0..c1160b6 100755 --- a/src/models/WebServiceDashboardResponsiveLayouts.ts +++ b/src/models/WebServiceDashboardResponsiveLayouts.ts @@ -1,10 +1,8 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Sentio API * Sentio Open API for query data * - * The version of the OpenAPI document: version not set + * OpenAPI spec version: version not set * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -12,62 +10,28 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime.js'; -import type { WebServiceDashboardLayouts } from './WebServiceDashboardLayouts.js'; -import { - WebServiceDashboardLayoutsFromJSON, - WebServiceDashboardLayoutsFromJSONTyped, - WebServiceDashboardLayoutsToJSON, - WebServiceDashboardLayoutsToJSONTyped, -} from './WebServiceDashboardLayouts.js'; +import { WebServiceDashboardLayouts } from '../models/WebServiceDashboardLayouts.js'; +import { HttpFile } from '../http/http.js'; -/** - * - * @export - * @interface WebServiceDashboardResponsiveLayouts - */ -export interface WebServiceDashboardResponsiveLayouts { - /** - * - * @type {{ [key: string]: WebServiceDashboardLayouts; }} - * @memberof WebServiceDashboardResponsiveLayouts - */ - responsiveLayouts?: { [key: string]: WebServiceDashboardLayouts; }; -} +export class WebServiceDashboardResponsiveLayouts { + 'responsiveLayouts'?: { [key: string]: WebServiceDashboardLayouts; }; -/** - * Check if a given object implements the WebServiceDashboardResponsiveLayouts interface. - */ -export function instanceOfWebServiceDashboardResponsiveLayouts(value: object): value is WebServiceDashboardResponsiveLayouts { - return true; -} + static readonly discriminator: string | undefined = undefined; -export function WebServiceDashboardResponsiveLayoutsFromJSON(json: any): WebServiceDashboardResponsiveLayouts { - return WebServiceDashboardResponsiveLayoutsFromJSONTyped(json, false); -} - -export function WebServiceDashboardResponsiveLayoutsFromJSONTyped(json: any, ignoreDiscriminator: boolean): WebServiceDashboardResponsiveLayouts { - if (json == null) { - return json; - } - return { - - 'responsiveLayouts': json['responsiveLayouts'] == null ? undefined : (mapValues(json['responsiveLayouts'], WebServiceDashboardLayoutsFromJSON)), - }; -} + static readonly mapping: {[index: string]: string} | undefined = undefined; - export function WebServiceDashboardResponsiveLayoutsToJSON(json: any): WebServiceDashboardResponsiveLayouts { - return WebServiceDashboardResponsiveLayoutsToJSONTyped(json, false); - } + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "responsiveLayouts", + "baseName": "responsiveLayouts", + "type": "{ [key: string]: WebServiceDashboardLayouts; }", + "format": "" + } ]; - export function WebServiceDashboardResponsiveLayoutsToJSONTyped(value?: WebServiceDashboardResponsiveLayouts | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; + static getAttributeTypeMap() { + return WebServiceDashboardResponsiveLayouts.attributeTypeMap; } - return { - - 'responsiveLayouts': value['responsiveLayouts'] == null ? undefined : (mapValues(value['responsiveLayouts'], WebServiceDashboardLayoutsToJSON)), - }; + public constructor() { + } } - diff --git a/src/models/WebServiceDashboardSharing.ts b/src/models/WebServiceDashboardSharing.ts index 6e2a174..25df453 100755 --- a/src/models/WebServiceDashboardSharing.ts +++ b/src/models/WebServiceDashboardSharing.ts @@ -1,10 +1,8 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Sentio API * Sentio Open API for query data * - * The version of the OpenAPI document: version not set + * OpenAPI spec version: version not set * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -12,78 +10,48 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime.js'; -/** - * - * @export - * @interface WebServiceDashboardSharing - */ -export interface WebServiceDashboardSharing { - /** - * - * @type {string} - * @memberof WebServiceDashboardSharing - */ - id?: string; - /** - * - * @type {string} - * @memberof WebServiceDashboardSharing - */ - dashboardId?: string; - /** - * - * @type {boolean} - * @memberof WebServiceDashboardSharing - */ - isPublic?: boolean; - /** - * - * @type {Array} - * @memberof WebServiceDashboardSharing - */ - viewers?: Array; -} - -/** - * Check if a given object implements the WebServiceDashboardSharing interface. - */ -export function instanceOfWebServiceDashboardSharing(value: object): value is WebServiceDashboardSharing { - return true; -} - -export function WebServiceDashboardSharingFromJSON(json: any): WebServiceDashboardSharing { - return WebServiceDashboardSharingFromJSONTyped(json, false); -} - -export function WebServiceDashboardSharingFromJSONTyped(json: any, ignoreDiscriminator: boolean): WebServiceDashboardSharing { - if (json == null) { - return json; +import { HttpFile } from '../http/http.js'; + +export class WebServiceDashboardSharing { + 'id'?: string; + 'dashboardId'?: string; + 'isPublic'?: boolean; + 'viewers'?: Array; + + static readonly discriminator: string | undefined = undefined; + + static readonly mapping: {[index: string]: string} | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "id", + "baseName": "id", + "type": "string", + "format": "" + }, + { + "name": "dashboardId", + "baseName": "dashboardId", + "type": "string", + "format": "" + }, + { + "name": "isPublic", + "baseName": "isPublic", + "type": "boolean", + "format": "" + }, + { + "name": "viewers", + "baseName": "viewers", + "type": "Array", + "format": "" + } ]; + + static getAttributeTypeMap() { + return WebServiceDashboardSharing.attributeTypeMap; } - return { - - 'id': json['id'] == null ? undefined : json['id'], - 'dashboardId': json['dashboardId'] == null ? undefined : json['dashboardId'], - 'isPublic': json['isPublic'] == null ? undefined : json['isPublic'], - 'viewers': json['viewers'] == null ? undefined : json['viewers'], - }; -} - export function WebServiceDashboardSharingToJSON(json: any): WebServiceDashboardSharing { - return WebServiceDashboardSharingToJSONTyped(json, false); - } - - export function WebServiceDashboardSharingToJSONTyped(value?: WebServiceDashboardSharing | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; + public constructor() { } - - return { - - 'id': value['id'], - 'dashboardId': value['dashboardId'], - 'isPublic': value['isPublic'], - 'viewers': value['viewers'], - }; } - diff --git a/src/models/WebServiceEventLogsConfig.ts b/src/models/WebServiceEventLogsConfig.ts index 2fe47f8..fb6a8c1 100755 --- a/src/models/WebServiceEventLogsConfig.ts +++ b/src/models/WebServiceEventLogsConfig.ts @@ -1,10 +1,8 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Sentio API * Sentio Open API for query data * - * The version of the OpenAPI document: version not set + * OpenAPI spec version: version not set * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -12,93 +10,50 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime.js'; -import type { CommonEventLogConfig } from './CommonEventLogConfig.js'; -import { - CommonEventLogConfigFromJSON, - CommonEventLogConfigFromJSONTyped, - CommonEventLogConfigToJSON, - CommonEventLogConfigToJSONTyped, -} from './CommonEventLogConfig.js'; -import type { WebServiceEventLogsConfigTimeRangeOverride } from './WebServiceEventLogsConfigTimeRangeOverride.js'; -import { - WebServiceEventLogsConfigTimeRangeOverrideFromJSON, - WebServiceEventLogsConfigTimeRangeOverrideFromJSONTyped, - WebServiceEventLogsConfigTimeRangeOverrideToJSON, - WebServiceEventLogsConfigTimeRangeOverrideToJSONTyped, -} from './WebServiceEventLogsConfigTimeRangeOverride.js'; - -/** - * - * @export - * @interface WebServiceEventLogsConfig - */ -export interface WebServiceEventLogsConfig { - /** - * - * @type {CommonEventLogConfig} - * @memberof WebServiceEventLogsConfig - */ - columnsConfig?: CommonEventLogConfig; - /** - * - * @type {WebServiceEventLogsConfigTimeRangeOverride} - * @memberof WebServiceEventLogsConfig - */ - timeRangeOverride?: WebServiceEventLogsConfigTimeRangeOverride; - /** - * - * @type {string} - * @memberof WebServiceEventLogsConfig - */ - query?: string; - /** - * - * @type {string} - * @memberof WebServiceEventLogsConfig - */ - sourceName?: string; -} - -/** - * Check if a given object implements the WebServiceEventLogsConfig interface. - */ -export function instanceOfWebServiceEventLogsConfig(value: object): value is WebServiceEventLogsConfig { - return true; -} - -export function WebServiceEventLogsConfigFromJSON(json: any): WebServiceEventLogsConfig { - return WebServiceEventLogsConfigFromJSONTyped(json, false); -} - -export function WebServiceEventLogsConfigFromJSONTyped(json: any, ignoreDiscriminator: boolean): WebServiceEventLogsConfig { - if (json == null) { - return json; +import { CommonEventLogConfig } from '../models/CommonEventLogConfig.js'; +import { WebServiceEventLogsConfigTimeRangeOverride } from '../models/WebServiceEventLogsConfigTimeRangeOverride.js'; +import { HttpFile } from '../http/http.js'; + +export class WebServiceEventLogsConfig { + 'columnsConfig'?: CommonEventLogConfig; + 'timeRangeOverride'?: WebServiceEventLogsConfigTimeRangeOverride; + 'query'?: string; + 'sourceName'?: string; + + static readonly discriminator: string | undefined = undefined; + + static readonly mapping: {[index: string]: string} | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "columnsConfig", + "baseName": "columnsConfig", + "type": "CommonEventLogConfig", + "format": "" + }, + { + "name": "timeRangeOverride", + "baseName": "timeRangeOverride", + "type": "WebServiceEventLogsConfigTimeRangeOverride", + "format": "" + }, + { + "name": "query", + "baseName": "query", + "type": "string", + "format": "" + }, + { + "name": "sourceName", + "baseName": "sourceName", + "type": "string", + "format": "" + } ]; + + static getAttributeTypeMap() { + return WebServiceEventLogsConfig.attributeTypeMap; } - return { - - 'columnsConfig': json['columnsConfig'] == null ? undefined : CommonEventLogConfigFromJSON(json['columnsConfig']), - 'timeRangeOverride': json['timeRangeOverride'] == null ? undefined : WebServiceEventLogsConfigTimeRangeOverrideFromJSON(json['timeRangeOverride']), - 'query': json['query'] == null ? undefined : json['query'], - 'sourceName': json['sourceName'] == null ? undefined : json['sourceName'], - }; -} - - export function WebServiceEventLogsConfigToJSON(json: any): WebServiceEventLogsConfig { - return WebServiceEventLogsConfigToJSONTyped(json, false); - } - export function WebServiceEventLogsConfigToJSONTyped(value?: WebServiceEventLogsConfig | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; + public constructor() { } - - return { - - 'columnsConfig': CommonEventLogConfigToJSON(value['columnsConfig']), - 'timeRangeOverride': WebServiceEventLogsConfigTimeRangeOverrideToJSON(value['timeRangeOverride']), - 'query': value['query'], - 'sourceName': value['sourceName'], - }; } - diff --git a/src/models/WebServiceEventLogsConfigTimeRangeOverride.ts b/src/models/WebServiceEventLogsConfigTimeRangeOverride.ts index c3b84c4..0d0646a 100755 --- a/src/models/WebServiceEventLogsConfigTimeRangeOverride.ts +++ b/src/models/WebServiceEventLogsConfigTimeRangeOverride.ts @@ -1,10 +1,8 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Sentio API * Sentio Open API for query data * - * The version of the OpenAPI document: version not set + * OpenAPI spec version: version not set * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -12,70 +10,35 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime.js'; -import type { CommonTimeRange } from './CommonTimeRange.js'; -import { - CommonTimeRangeFromJSON, - CommonTimeRangeFromJSONTyped, - CommonTimeRangeToJSON, - CommonTimeRangeToJSONTyped, -} from './CommonTimeRange.js'; - -/** - * - * @export - * @interface WebServiceEventLogsConfigTimeRangeOverride - */ -export interface WebServiceEventLogsConfigTimeRangeOverride { - /** - * - * @type {boolean} - * @memberof WebServiceEventLogsConfigTimeRangeOverride - */ - enabled?: boolean; - /** - * - * @type {CommonTimeRange} - * @memberof WebServiceEventLogsConfigTimeRangeOverride - */ - timeRange?: CommonTimeRange; -} - -/** - * Check if a given object implements the WebServiceEventLogsConfigTimeRangeOverride interface. - */ -export function instanceOfWebServiceEventLogsConfigTimeRangeOverride(value: object): value is WebServiceEventLogsConfigTimeRangeOverride { - return true; -} - -export function WebServiceEventLogsConfigTimeRangeOverrideFromJSON(json: any): WebServiceEventLogsConfigTimeRangeOverride { - return WebServiceEventLogsConfigTimeRangeOverrideFromJSONTyped(json, false); -} - -export function WebServiceEventLogsConfigTimeRangeOverrideFromJSONTyped(json: any, ignoreDiscriminator: boolean): WebServiceEventLogsConfigTimeRangeOverride { - if (json == null) { - return json; +import { CommonTimeRange } from '../models/CommonTimeRange.js'; +import { HttpFile } from '../http/http.js'; + +export class WebServiceEventLogsConfigTimeRangeOverride { + 'enabled'?: boolean; + 'timeRange'?: CommonTimeRange; + + static readonly discriminator: string | undefined = undefined; + + static readonly mapping: {[index: string]: string} | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "enabled", + "baseName": "enabled", + "type": "boolean", + "format": "" + }, + { + "name": "timeRange", + "baseName": "timeRange", + "type": "CommonTimeRange", + "format": "" + } ]; + + static getAttributeTypeMap() { + return WebServiceEventLogsConfigTimeRangeOverride.attributeTypeMap; } - return { - - 'enabled': json['enabled'] == null ? undefined : json['enabled'], - 'timeRange': json['timeRange'] == null ? undefined : CommonTimeRangeFromJSON(json['timeRange']), - }; -} - - export function WebServiceEventLogsConfigTimeRangeOverrideToJSON(json: any): WebServiceEventLogsConfigTimeRangeOverride { - return WebServiceEventLogsConfigTimeRangeOverrideToJSONTyped(json, false); - } - export function WebServiceEventLogsConfigTimeRangeOverrideToJSONTyped(value?: WebServiceEventLogsConfigTimeRangeOverride | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; + public constructor() { } - - return { - - 'enabled': value['enabled'], - 'timeRange': CommonTimeRangeToJSON(value['timeRange']), - }; } - diff --git a/src/models/WebServiceExportDashboardResponse.ts b/src/models/WebServiceExportDashboardResponse.ts index d4157b3..b50d30e 100755 --- a/src/models/WebServiceExportDashboardResponse.ts +++ b/src/models/WebServiceExportDashboardResponse.ts @@ -1,10 +1,8 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Sentio API * Sentio Open API for query data * - * The version of the OpenAPI document: version not set + * OpenAPI spec version: version not set * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -12,54 +10,27 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime.js'; -/** - * - * @export - * @interface WebServiceExportDashboardResponse - */ -export interface WebServiceExportDashboardResponse { - /** - * - * @type {object} - * @memberof WebServiceExportDashboardResponse - */ - dashboardJson?: object; -} +import { HttpFile } from '../http/http.js'; -/** - * Check if a given object implements the WebServiceExportDashboardResponse interface. - */ -export function instanceOfWebServiceExportDashboardResponse(value: object): value is WebServiceExportDashboardResponse { - return true; -} +export class WebServiceExportDashboardResponse { + 'dashboardJson'?: any; -export function WebServiceExportDashboardResponseFromJSON(json: any): WebServiceExportDashboardResponse { - return WebServiceExportDashboardResponseFromJSONTyped(json, false); -} + static readonly discriminator: string | undefined = undefined; -export function WebServiceExportDashboardResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): WebServiceExportDashboardResponse { - if (json == null) { - return json; - } - return { - - 'dashboardJson': json['dashboardJson'] == null ? undefined : json['dashboardJson'], - }; -} + static readonly mapping: {[index: string]: string} | undefined = undefined; - export function WebServiceExportDashboardResponseToJSON(json: any): WebServiceExportDashboardResponse { - return WebServiceExportDashboardResponseToJSONTyped(json, false); - } + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "dashboardJson", + "baseName": "dashboardJson", + "type": "any", + "format": "" + } ]; - export function WebServiceExportDashboardResponseToJSONTyped(value?: WebServiceExportDashboardResponse | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; + static getAttributeTypeMap() { + return WebServiceExportDashboardResponse.attributeTypeMap; } - return { - - 'dashboardJson': value['dashboardJson'], - }; + public constructor() { + } } - diff --git a/src/models/WebServiceGetDashboardResponse.ts b/src/models/WebServiceGetDashboardResponse.ts index 3ba74f9..99f1586 100755 --- a/src/models/WebServiceGetDashboardResponse.ts +++ b/src/models/WebServiceGetDashboardResponse.ts @@ -1,10 +1,8 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Sentio API * Sentio Open API for query data * - * The version of the OpenAPI document: version not set + * OpenAPI spec version: version not set * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -12,77 +10,36 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime.js'; -import type { CommonPermission } from './CommonPermission.js'; -import { - CommonPermissionFromJSON, - CommonPermissionFromJSONTyped, - CommonPermissionToJSON, - CommonPermissionToJSONTyped, -} from './CommonPermission.js'; -import type { WebServiceDashboard } from './WebServiceDashboard.js'; -import { - WebServiceDashboardFromJSON, - WebServiceDashboardFromJSONTyped, - WebServiceDashboardToJSON, - WebServiceDashboardToJSONTyped, -} from './WebServiceDashboard.js'; - -/** - * - * @export - * @interface WebServiceGetDashboardResponse - */ -export interface WebServiceGetDashboardResponse { - /** - * - * @type {Array} - * @memberof WebServiceGetDashboardResponse - */ - dashboards?: Array; - /** - * - * @type {Array} - * @memberof WebServiceGetDashboardResponse - */ - permissions?: Array; -} - -/** - * Check if a given object implements the WebServiceGetDashboardResponse interface. - */ -export function instanceOfWebServiceGetDashboardResponse(value: object): value is WebServiceGetDashboardResponse { - return true; -} - -export function WebServiceGetDashboardResponseFromJSON(json: any): WebServiceGetDashboardResponse { - return WebServiceGetDashboardResponseFromJSONTyped(json, false); -} - -export function WebServiceGetDashboardResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): WebServiceGetDashboardResponse { - if (json == null) { - return json; +import { CommonPermission } from '../models/CommonPermission.js'; +import { WebServiceDashboard } from '../models/WebServiceDashboard.js'; +import { HttpFile } from '../http/http.js'; + +export class WebServiceGetDashboardResponse { + 'dashboards'?: Array; + 'permissions'?: Array; + + static readonly discriminator: string | undefined = undefined; + + static readonly mapping: {[index: string]: string} | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "dashboards", + "baseName": "dashboards", + "type": "Array", + "format": "" + }, + { + "name": "permissions", + "baseName": "permissions", + "type": "Array", + "format": "" + } ]; + + static getAttributeTypeMap() { + return WebServiceGetDashboardResponse.attributeTypeMap; } - return { - - 'dashboards': json['dashboards'] == null ? undefined : ((json['dashboards'] as Array).map(WebServiceDashboardFromJSON)), - 'permissions': json['permissions'] == null ? undefined : ((json['permissions'] as Array).map(CommonPermissionFromJSON)), - }; -} - - export function WebServiceGetDashboardResponseToJSON(json: any): WebServiceGetDashboardResponse { - return WebServiceGetDashboardResponseToJSONTyped(json, false); - } - export function WebServiceGetDashboardResponseToJSONTyped(value?: WebServiceGetDashboardResponse | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; + public constructor() { } - - return { - - 'dashboards': value['dashboards'] == null ? undefined : ((value['dashboards'] as Array).map(WebServiceDashboardToJSON)), - 'permissions': value['permissions'] == null ? undefined : ((value['permissions'] as Array).map(CommonPermissionToJSON)), - }; } - diff --git a/src/models/WebServiceGetProjectListResponse.ts b/src/models/WebServiceGetProjectListResponse.ts index 9b63fd4..abffabc 100755 --- a/src/models/WebServiceGetProjectListResponse.ts +++ b/src/models/WebServiceGetProjectListResponse.ts @@ -1,10 +1,8 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Sentio API * Sentio Open API for query data * - * The version of the OpenAPI document: version not set + * OpenAPI spec version: version not set * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -12,78 +10,42 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime.js'; -import type { CommonProject } from './CommonProject.js'; -import { - CommonProjectFromJSON, - CommonProjectFromJSONTyped, - CommonProjectToJSON, - CommonProjectToJSONTyped, -} from './CommonProject.js'; - -/** - * - * @export - * @interface WebServiceGetProjectListResponse - */ -export interface WebServiceGetProjectListResponse { - /** - * - * @type {Array} - * @memberof WebServiceGetProjectListResponse - */ - projects?: Array; - /** - * - * @type {Array} - * @memberof WebServiceGetProjectListResponse - */ - sharedProjects?: Array; - /** - * - * @type {Array} - * @memberof WebServiceGetProjectListResponse - */ - orgProjects?: Array; -} - -/** - * Check if a given object implements the WebServiceGetProjectListResponse interface. - */ -export function instanceOfWebServiceGetProjectListResponse(value: object): value is WebServiceGetProjectListResponse { - return true; -} - -export function WebServiceGetProjectListResponseFromJSON(json: any): WebServiceGetProjectListResponse { - return WebServiceGetProjectListResponseFromJSONTyped(json, false); -} - -export function WebServiceGetProjectListResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): WebServiceGetProjectListResponse { - if (json == null) { - return json; +import { CommonProject } from '../models/CommonProject.js'; +import { HttpFile } from '../http/http.js'; + +export class WebServiceGetProjectListResponse { + 'projects'?: Array; + 'sharedProjects'?: Array; + 'orgProjects'?: Array; + + static readonly discriminator: string | undefined = undefined; + + static readonly mapping: {[index: string]: string} | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "projects", + "baseName": "projects", + "type": "Array", + "format": "" + }, + { + "name": "sharedProjects", + "baseName": "sharedProjects", + "type": "Array", + "format": "" + }, + { + "name": "orgProjects", + "baseName": "orgProjects", + "type": "Array", + "format": "" + } ]; + + static getAttributeTypeMap() { + return WebServiceGetProjectListResponse.attributeTypeMap; } - return { - - 'projects': json['projects'] == null ? undefined : ((json['projects'] as Array).map(CommonProjectFromJSON)), - 'sharedProjects': json['sharedProjects'] == null ? undefined : ((json['sharedProjects'] as Array).map(CommonProjectFromJSON)), - 'orgProjects': json['orgProjects'] == null ? undefined : ((json['orgProjects'] as Array).map(CommonProjectFromJSON)), - }; -} - - export function WebServiceGetProjectListResponseToJSON(json: any): WebServiceGetProjectListResponse { - return WebServiceGetProjectListResponseToJSONTyped(json, false); - } - export function WebServiceGetProjectListResponseToJSONTyped(value?: WebServiceGetProjectListResponse | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; + public constructor() { } - - return { - - 'projects': value['projects'] == null ? undefined : ((value['projects'] as Array).map(CommonProjectToJSON)), - 'sharedProjects': value['sharedProjects'] == null ? undefined : ((value['sharedProjects'] as Array).map(CommonProjectToJSON)), - 'orgProjects': value['orgProjects'] == null ? undefined : ((value['orgProjects'] as Array).map(CommonProjectToJSON)), - }; } - diff --git a/src/models/WebServiceGetProjectResponse.ts b/src/models/WebServiceGetProjectResponse.ts index d6fadf6..102d910 100755 --- a/src/models/WebServiceGetProjectResponse.ts +++ b/src/models/WebServiceGetProjectResponse.ts @@ -1,10 +1,8 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Sentio API * Sentio Open API for query data * - * The version of the OpenAPI document: version not set + * OpenAPI spec version: version not set * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -12,77 +10,36 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime.js'; -import type { CommonPermission } from './CommonPermission.js'; -import { - CommonPermissionFromJSON, - CommonPermissionFromJSONTyped, - CommonPermissionToJSON, - CommonPermissionToJSONTyped, -} from './CommonPermission.js'; -import type { CommonProject } from './CommonProject.js'; -import { - CommonProjectFromJSON, - CommonProjectFromJSONTyped, - CommonProjectToJSON, - CommonProjectToJSONTyped, -} from './CommonProject.js'; - -/** - * - * @export - * @interface WebServiceGetProjectResponse - */ -export interface WebServiceGetProjectResponse { - /** - * - * @type {CommonProject} - * @memberof WebServiceGetProjectResponse - */ - project?: CommonProject; - /** - * - * @type {Array} - * @memberof WebServiceGetProjectResponse - */ - permissions?: Array; -} - -/** - * Check if a given object implements the WebServiceGetProjectResponse interface. - */ -export function instanceOfWebServiceGetProjectResponse(value: object): value is WebServiceGetProjectResponse { - return true; -} - -export function WebServiceGetProjectResponseFromJSON(json: any): WebServiceGetProjectResponse { - return WebServiceGetProjectResponseFromJSONTyped(json, false); -} - -export function WebServiceGetProjectResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): WebServiceGetProjectResponse { - if (json == null) { - return json; +import { CommonPermission } from '../models/CommonPermission.js'; +import { CommonProject } from '../models/CommonProject.js'; +import { HttpFile } from '../http/http.js'; + +export class WebServiceGetProjectResponse { + 'project'?: CommonProject; + 'permissions'?: Array; + + static readonly discriminator: string | undefined = undefined; + + static readonly mapping: {[index: string]: string} | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "project", + "baseName": "project", + "type": "CommonProject", + "format": "" + }, + { + "name": "permissions", + "baseName": "permissions", + "type": "Array", + "format": "" + } ]; + + static getAttributeTypeMap() { + return WebServiceGetProjectResponse.attributeTypeMap; } - return { - - 'project': json['project'] == null ? undefined : CommonProjectFromJSON(json['project']), - 'permissions': json['permissions'] == null ? undefined : ((json['permissions'] as Array).map(CommonPermissionFromJSON)), - }; -} - - export function WebServiceGetProjectResponseToJSON(json: any): WebServiceGetProjectResponse { - return WebServiceGetProjectResponseToJSONTyped(json, false); - } - export function WebServiceGetProjectResponseToJSONTyped(value?: WebServiceGetProjectResponse | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; + public constructor() { } - - return { - - 'project': CommonProjectToJSON(value['project']), - 'permissions': value['permissions'] == null ? undefined : ((value['permissions'] as Array).map(CommonPermissionToJSON)), - }; } - diff --git a/src/models/WebServiceImportDashboardRequest.ts b/src/models/WebServiceImportDashboardRequest.ts index f77c9a1..5f427e4 100755 --- a/src/models/WebServiceImportDashboardRequest.ts +++ b/src/models/WebServiceImportDashboardRequest.ts @@ -1,10 +1,8 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Sentio API * Sentio Open API for query data * - * The version of the OpenAPI document: version not set + * OpenAPI spec version: version not set * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -12,72 +10,50 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime.js'; -/** - * - * @export - * @interface WebServiceImportDashboardRequest - */ -export interface WebServiceImportDashboardRequest { +import { HttpFile } from '../http/http.js'; + +export class WebServiceImportDashboardRequest { /** - * The id of the target dashboard to import into. - * @type {string} - * @memberof WebServiceImportDashboardRequest - */ - dashboardId: string; + * The id of the target dashboard to import into. + */ + 'dashboardId': string; /** - * The json data of a previously exported dashboard. - * @type {object} - * @memberof WebServiceImportDashboardRequest - */ - dashboardJson: object; + * The json data of a previously exported dashboard. + */ + 'dashboardJson': any; /** - * Override the layout of target dashboard. - * @type {boolean} - * @memberof WebServiceImportDashboardRequest - */ - overrideLayouts?: boolean; -} - -/** - * Check if a given object implements the WebServiceImportDashboardRequest interface. - */ -export function instanceOfWebServiceImportDashboardRequest(value: object): value is WebServiceImportDashboardRequest { - if (!('dashboardId' in value) || value['dashboardId'] === undefined) return false; - if (!('dashboardJson' in value) || value['dashboardJson'] === undefined) return false; - return true; -} - -export function WebServiceImportDashboardRequestFromJSON(json: any): WebServiceImportDashboardRequest { - return WebServiceImportDashboardRequestFromJSONTyped(json, false); -} - -export function WebServiceImportDashboardRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): WebServiceImportDashboardRequest { - if (json == null) { - return json; + * Override the layout of target dashboard. + */ + 'overrideLayouts'?: boolean; + + static readonly discriminator: string | undefined = undefined; + + static readonly mapping: {[index: string]: string} | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "dashboardId", + "baseName": "dashboardId", + "type": "string", + "format": "" + }, + { + "name": "dashboardJson", + "baseName": "dashboardJson", + "type": "any", + "format": "" + }, + { + "name": "overrideLayouts", + "baseName": "overrideLayouts", + "type": "boolean", + "format": "" + } ]; + + static getAttributeTypeMap() { + return WebServiceImportDashboardRequest.attributeTypeMap; } - return { - - 'dashboardId': json['dashboardId'], - 'dashboardJson': json['dashboardJson'], - 'overrideLayouts': json['overrideLayouts'] == null ? undefined : json['overrideLayouts'], - }; -} - - export function WebServiceImportDashboardRequestToJSON(json: any): WebServiceImportDashboardRequest { - return WebServiceImportDashboardRequestToJSONTyped(json, false); - } - export function WebServiceImportDashboardRequestToJSONTyped(value?: WebServiceImportDashboardRequest | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; + public constructor() { } - - return { - - 'dashboardId': value['dashboardId'], - 'dashboardJson': value['dashboardJson'], - 'overrideLayouts': value['overrideLayouts'], - }; } - diff --git a/src/models/WebServiceImportDashboardResponse.ts b/src/models/WebServiceImportDashboardResponse.ts index 20c162d..1e53204 100755 --- a/src/models/WebServiceImportDashboardResponse.ts +++ b/src/models/WebServiceImportDashboardResponse.ts @@ -1,10 +1,8 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Sentio API * Sentio Open API for query data * - * The version of the OpenAPI document: version not set + * OpenAPI spec version: version not set * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -12,62 +10,28 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime.js'; -import type { WebServiceDashboard } from './WebServiceDashboard.js'; -import { - WebServiceDashboardFromJSON, - WebServiceDashboardFromJSONTyped, - WebServiceDashboardToJSON, - WebServiceDashboardToJSONTyped, -} from './WebServiceDashboard.js'; +import { WebServiceDashboard } from '../models/WebServiceDashboard.js'; +import { HttpFile } from '../http/http.js'; -/** - * - * @export - * @interface WebServiceImportDashboardResponse - */ -export interface WebServiceImportDashboardResponse { - /** - * - * @type {WebServiceDashboard} - * @memberof WebServiceImportDashboardResponse - */ - dashboard?: WebServiceDashboard; -} +export class WebServiceImportDashboardResponse { + 'dashboard'?: WebServiceDashboard; -/** - * Check if a given object implements the WebServiceImportDashboardResponse interface. - */ -export function instanceOfWebServiceImportDashboardResponse(value: object): value is WebServiceImportDashboardResponse { - return true; -} + static readonly discriminator: string | undefined = undefined; -export function WebServiceImportDashboardResponseFromJSON(json: any): WebServiceImportDashboardResponse { - return WebServiceImportDashboardResponseFromJSONTyped(json, false); -} - -export function WebServiceImportDashboardResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): WebServiceImportDashboardResponse { - if (json == null) { - return json; - } - return { - - 'dashboard': json['dashboard'] == null ? undefined : WebServiceDashboardFromJSON(json['dashboard']), - }; -} + static readonly mapping: {[index: string]: string} | undefined = undefined; - export function WebServiceImportDashboardResponseToJSON(json: any): WebServiceImportDashboardResponse { - return WebServiceImportDashboardResponseToJSONTyped(json, false); - } + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "dashboard", + "baseName": "dashboard", + "type": "WebServiceDashboard", + "format": "" + } ]; - export function WebServiceImportDashboardResponseToJSONTyped(value?: WebServiceImportDashboardResponse | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; + static getAttributeTypeMap() { + return WebServiceImportDashboardResponse.attributeTypeMap; } - return { - - 'dashboard': WebServiceDashboardToJSON(value['dashboard']), - }; + public constructor() { + } } - diff --git a/src/models/WebServiceNote.ts b/src/models/WebServiceNote.ts index b801a17..5463968 100755 --- a/src/models/WebServiceNote.ts +++ b/src/models/WebServiceNote.ts @@ -1,10 +1,8 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Sentio API * Sentio Open API for query data * - * The version of the OpenAPI document: version not set + * OpenAPI spec version: version not set * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -12,118 +10,67 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime.js'; -import type { WebServiceNoteFontSize } from './WebServiceNoteFontSize.js'; -import { - WebServiceNoteFontSizeFromJSON, - WebServiceNoteFontSizeFromJSONTyped, - WebServiceNoteFontSizeToJSON, - WebServiceNoteFontSizeToJSONTyped, -} from './WebServiceNoteFontSize.js'; -import type { WebServiceNoteVerticalAlignment } from './WebServiceNoteVerticalAlignment.js'; -import { - WebServiceNoteVerticalAlignmentFromJSON, - WebServiceNoteVerticalAlignmentFromJSONTyped, - WebServiceNoteVerticalAlignmentToJSON, - WebServiceNoteVerticalAlignmentToJSONTyped, -} from './WebServiceNoteVerticalAlignment.js'; -import type { WebServiceNoteAlignment } from './WebServiceNoteAlignment.js'; -import { - WebServiceNoteAlignmentFromJSON, - WebServiceNoteAlignmentFromJSONTyped, - WebServiceNoteAlignmentToJSON, - WebServiceNoteAlignmentToJSONTyped, -} from './WebServiceNoteAlignment.js'; +import { WebServiceNoteAlignment } from '../models/WebServiceNoteAlignment.js'; +import { WebServiceNoteFontSize } from '../models/WebServiceNoteFontSize.js'; +import { WebServiceNoteVerticalAlignment } from '../models/WebServiceNoteVerticalAlignment.js'; +import { HttpFile } from '../http/http.js'; -/** - * - * @export - * @interface WebServiceNote - */ -export interface WebServiceNote { - /** - * - * @type {string} - * @memberof WebServiceNote - */ - content?: string; - /** - * - * @type {WebServiceNoteFontSize} - * @memberof WebServiceNote - */ - fontSize?: WebServiceNoteFontSize; - /** - * - * @type {WebServiceNoteAlignment} - * @memberof WebServiceNote - */ - textAlign?: WebServiceNoteAlignment; - /** - * - * @type {WebServiceNoteVerticalAlignment} - * @memberof WebServiceNote - */ - verticalAlign?: WebServiceNoteVerticalAlignment; - /** - * - * @type {string} - * @memberof WebServiceNote - */ - backgroundColor?: string; - /** - * - * @type {string} - * @memberof WebServiceNote - */ - textColor?: string; -} +export class WebServiceNote { + 'content'?: string; + 'fontSize'?: WebServiceNoteFontSize; + 'textAlign'?: WebServiceNoteAlignment; + 'verticalAlign'?: WebServiceNoteVerticalAlignment; + 'backgroundColor'?: string; + 'textColor'?: string; + static readonly discriminator: string | undefined = undefined; + static readonly mapping: {[index: string]: string} | undefined = undefined; -/** - * Check if a given object implements the WebServiceNote interface. - */ -export function instanceOfWebServiceNote(value: object): value is WebServiceNote { - return true; -} + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "content", + "baseName": "content", + "type": "string", + "format": "" + }, + { + "name": "fontSize", + "baseName": "fontSize", + "type": "WebServiceNoteFontSize", + "format": "" + }, + { + "name": "textAlign", + "baseName": "textAlign", + "type": "WebServiceNoteAlignment", + "format": "" + }, + { + "name": "verticalAlign", + "baseName": "verticalAlign", + "type": "WebServiceNoteVerticalAlignment", + "format": "" + }, + { + "name": "backgroundColor", + "baseName": "backgroundColor", + "type": "string", + "format": "" + }, + { + "name": "textColor", + "baseName": "textColor", + "type": "string", + "format": "" + } ]; -export function WebServiceNoteFromJSON(json: any): WebServiceNote { - return WebServiceNoteFromJSONTyped(json, false); -} - -export function WebServiceNoteFromJSONTyped(json: any, ignoreDiscriminator: boolean): WebServiceNote { - if (json == null) { - return json; + static getAttributeTypeMap() { + return WebServiceNote.attributeTypeMap; } - return { - - 'content': json['content'] == null ? undefined : json['content'], - 'fontSize': json['fontSize'] == null ? undefined : WebServiceNoteFontSizeFromJSON(json['fontSize']), - 'textAlign': json['textAlign'] == null ? undefined : WebServiceNoteAlignmentFromJSON(json['textAlign']), - 'verticalAlign': json['verticalAlign'] == null ? undefined : WebServiceNoteVerticalAlignmentFromJSON(json['verticalAlign']), - 'backgroundColor': json['backgroundColor'] == null ? undefined : json['backgroundColor'], - 'textColor': json['textColor'] == null ? undefined : json['textColor'], - }; -} - export function WebServiceNoteToJSON(json: any): WebServiceNote { - return WebServiceNoteToJSONTyped(json, false); - } - - export function WebServiceNoteToJSONTyped(value?: WebServiceNote | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; + public constructor() { } - - return { - - 'content': value['content'], - 'fontSize': WebServiceNoteFontSizeToJSON(value['fontSize']), - 'textAlign': WebServiceNoteAlignmentToJSON(value['textAlign']), - 'verticalAlign': WebServiceNoteVerticalAlignmentToJSON(value['verticalAlign']), - 'backgroundColor': value['backgroundColor'], - 'textColor': value['textColor'], - }; } + diff --git a/src/models/WebServiceNoteAlignment.ts b/src/models/WebServiceNoteAlignment.ts index b1b57c5..eb3c641 100755 --- a/src/models/WebServiceNoteAlignment.ts +++ b/src/models/WebServiceNoteAlignment.ts @@ -1,10 +1,8 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Sentio API * Sentio Open API for query data * - * The version of the OpenAPI document: version not set + * OpenAPI spec version: version not set * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -12,43 +10,10 @@ * Do not edit the class manually. */ +import { HttpFile } from '../http/http.js'; -/** - * - * @export - */ -export const WebServiceNoteAlignment = { - Left: 'LEFT', - Center: 'CENTER', - Right: 'RIGHT' -} as const; -export type WebServiceNoteAlignment = typeof WebServiceNoteAlignment[keyof typeof WebServiceNoteAlignment]; - - -export function instanceOfWebServiceNoteAlignment(value: any): boolean { - for (const key in WebServiceNoteAlignment) { - if (Object.prototype.hasOwnProperty.call(WebServiceNoteAlignment, key)) { - if (WebServiceNoteAlignment[key as keyof typeof WebServiceNoteAlignment] === value) { - return true; - } - } - } - return false; -} - -export function WebServiceNoteAlignmentFromJSON(json: any): WebServiceNoteAlignment { - return WebServiceNoteAlignmentFromJSONTyped(json, false); +export enum WebServiceNoteAlignment { + Left = 'LEFT', + Center = 'CENTER', + Right = 'RIGHT' } - -export function WebServiceNoteAlignmentFromJSONTyped(json: any, ignoreDiscriminator: boolean): WebServiceNoteAlignment { - return json as WebServiceNoteAlignment; -} - -export function WebServiceNoteAlignmentToJSON(value?: WebServiceNoteAlignment | null): any { - return value as any; -} - -export function WebServiceNoteAlignmentToJSONTyped(value: any, ignoreDiscriminator: boolean): WebServiceNoteAlignment { - return value as WebServiceNoteAlignment; -} - diff --git a/src/models/WebServiceNoteFontSize.ts b/src/models/WebServiceNoteFontSize.ts index 14dd455..d929cf7 100755 --- a/src/models/WebServiceNoteFontSize.ts +++ b/src/models/WebServiceNoteFontSize.ts @@ -1,10 +1,8 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Sentio API * Sentio Open API for query data * - * The version of the OpenAPI document: version not set + * OpenAPI spec version: version not set * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -12,45 +10,12 @@ * Do not edit the class manually. */ +import { HttpFile } from '../http/http.js'; -/** - * - * @export - */ -export const WebServiceNoteFontSize = { - Md: 'MD', - Sm: 'SM', - Lg: 'LG', - Xl: 'XL', - Xxl: 'XXL' -} as const; -export type WebServiceNoteFontSize = typeof WebServiceNoteFontSize[keyof typeof WebServiceNoteFontSize]; - - -export function instanceOfWebServiceNoteFontSize(value: any): boolean { - for (const key in WebServiceNoteFontSize) { - if (Object.prototype.hasOwnProperty.call(WebServiceNoteFontSize, key)) { - if (WebServiceNoteFontSize[key as keyof typeof WebServiceNoteFontSize] === value) { - return true; - } - } - } - return false; -} - -export function WebServiceNoteFontSizeFromJSON(json: any): WebServiceNoteFontSize { - return WebServiceNoteFontSizeFromJSONTyped(json, false); +export enum WebServiceNoteFontSize { + Md = 'MD', + Sm = 'SM', + Lg = 'LG', + Xl = 'XL', + Xxl = 'XXL' } - -export function WebServiceNoteFontSizeFromJSONTyped(json: any, ignoreDiscriminator: boolean): WebServiceNoteFontSize { - return json as WebServiceNoteFontSize; -} - -export function WebServiceNoteFontSizeToJSON(value?: WebServiceNoteFontSize | null): any { - return value as any; -} - -export function WebServiceNoteFontSizeToJSONTyped(value: any, ignoreDiscriminator: boolean): WebServiceNoteFontSize { - return value as WebServiceNoteFontSize; -} - diff --git a/src/models/WebServiceNoteVerticalAlignment.ts b/src/models/WebServiceNoteVerticalAlignment.ts index dc2360e..98bd861 100755 --- a/src/models/WebServiceNoteVerticalAlignment.ts +++ b/src/models/WebServiceNoteVerticalAlignment.ts @@ -1,10 +1,8 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Sentio API * Sentio Open API for query data * - * The version of the OpenAPI document: version not set + * OpenAPI spec version: version not set * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -12,43 +10,10 @@ * Do not edit the class manually. */ +import { HttpFile } from '../http/http.js'; -/** - * - * @export - */ -export const WebServiceNoteVerticalAlignment = { - Top: 'TOP', - Middle: 'MIDDLE', - Bottom: 'BOTTOM' -} as const; -export type WebServiceNoteVerticalAlignment = typeof WebServiceNoteVerticalAlignment[keyof typeof WebServiceNoteVerticalAlignment]; - - -export function instanceOfWebServiceNoteVerticalAlignment(value: any): boolean { - for (const key in WebServiceNoteVerticalAlignment) { - if (Object.prototype.hasOwnProperty.call(WebServiceNoteVerticalAlignment, key)) { - if (WebServiceNoteVerticalAlignment[key as keyof typeof WebServiceNoteVerticalAlignment] === value) { - return true; - } - } - } - return false; -} - -export function WebServiceNoteVerticalAlignmentFromJSON(json: any): WebServiceNoteVerticalAlignment { - return WebServiceNoteVerticalAlignmentFromJSONTyped(json, false); +export enum WebServiceNoteVerticalAlignment { + Top = 'TOP', + Middle = 'MIDDLE', + Bottom = 'BOTTOM' } - -export function WebServiceNoteVerticalAlignmentFromJSONTyped(json: any, ignoreDiscriminator: boolean): WebServiceNoteVerticalAlignment { - return json as WebServiceNoteVerticalAlignment; -} - -export function WebServiceNoteVerticalAlignmentToJSON(value?: WebServiceNoteVerticalAlignment | null): any { - return value as any; -} - -export function WebServiceNoteVerticalAlignmentToJSONTyped(value: any, ignoreDiscriminator: boolean): WebServiceNoteVerticalAlignment { - return value as WebServiceNoteVerticalAlignment; -} - diff --git a/src/models/WebServicePanel.ts b/src/models/WebServicePanel.ts index 6b08a08..e37ada7 100755 --- a/src/models/WebServicePanel.ts +++ b/src/models/WebServicePanel.ts @@ -1,10 +1,8 @@ -/* tslint:disable */ -/* eslint-disable */ /** * Sentio API * Sentio Open API for query data * - * The version of the OpenAPI document: version not set + * OpenAPI spec version: version not set * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -12,86 +10,49 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime.js'; -import type { WebServiceChart } from './WebServiceChart.js'; -import { - WebServiceChartFromJSON, - WebServiceChartFromJSONTyped, - WebServiceChartToJSON, - WebServiceChartToJSONTyped, -} from './WebServiceChart.js'; - -/** - * - * @export - * @interface WebServicePanel - */ -export interface WebServicePanel { - /** - * - * @type {string} - * @memberof WebServicePanel - */ - id?: string; - /** - * - * @type {string} - * @memberof WebServicePanel - */ - name?: string; - /** - * - * @type {string} - * @memberof WebServicePanel - */ - dashboardId?: string; - /** - * - * @type {WebServiceChart} - * @memberof WebServicePanel - */ - chart?: WebServiceChart; -} - -/** - * Check if a given object implements the WebServicePanel interface. - */ -export function instanceOfWebServicePanel(value: object): value is WebServicePanel { - return true; -} - -export function WebServicePanelFromJSON(json: any): WebServicePanel { - return WebServicePanelFromJSONTyped(json, false); -} - -export function WebServicePanelFromJSONTyped(json: any, ignoreDiscriminator: boolean): WebServicePanel { - if (json == null) { - return json; +import { WebServiceChart } from '../models/WebServiceChart.js'; +import { HttpFile } from '../http/http.js'; + +export class WebServicePanel { + 'id'?: string; + 'name'?: string; + 'dashboardId'?: string; + 'chart'?: WebServiceChart; + + static readonly discriminator: string | undefined = undefined; + + static readonly mapping: {[index: string]: string} | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "id", + "baseName": "id", + "type": "string", + "format": "" + }, + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + }, + { + "name": "dashboardId", + "baseName": "dashboardId", + "type": "string", + "format": "" + }, + { + "name": "chart", + "baseName": "chart", + "type": "WebServiceChart", + "format": "" + } ]; + + static getAttributeTypeMap() { + return WebServicePanel.attributeTypeMap; } - return { - - 'id': json['id'] == null ? undefined : json['id'], - 'name': json['name'] == null ? undefined : json['name'], - 'dashboardId': json['dashboardId'] == null ? undefined : json['dashboardId'], - 'chart': json['chart'] == null ? undefined : WebServiceChartFromJSON(json['chart']), - }; -} - - export function WebServicePanelToJSON(json: any): WebServicePanel { - return WebServicePanelToJSONTyped(json, false); - } - export function WebServicePanelToJSONTyped(value?: WebServicePanel | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; + public constructor() { } - - return { - - 'id': value['id'], - 'name': value['name'], - 'dashboardId': value['dashboardId'], - 'chart': WebServiceChartToJSON(value['chart']), - }; } - diff --git a/src/models/all.ts b/src/models/all.ts new file mode 100755 index 0000000..94f1ab3 --- /dev/null +++ b/src/models/all.ts @@ -0,0 +1,233 @@ +export * from '../models/AnalyticServiceAnalyticServiceExecuteSQLBody.js' +export * from '../models/AnalyticServiceLogQueryRequestFilter.js' +export * from '../models/AnalyticServiceLogQueryRequestSort.js' +export * from '../models/AnalyticServiceLogQueryResponse.js' +export * from '../models/AnalyticServiceSQLQuery.js' +export * from '../models/AnalyticServiceSearchServiceQueryLogBody.js' +export * from '../models/AnalyticServiceSyncExecuteSQLResponse.js' +export * from '../models/CommonAggregate.js' +export * from '../models/CommonAggregateAggregateOps.js' +export * from '../models/CommonAny.js' +export * from '../models/CommonArgument.js' +export * from '../models/CommonBigDecimal.js' +export * from '../models/CommonBigInteger.js' +export * from '../models/CommonCachePolicy.js' +export * from '../models/CommonChannel.js' +export * from '../models/CommonChannelType.js' +export * from '../models/CommonCohortsFilter.js' +export * from '../models/CommonCohortsFilterAggregation.js' +export * from '../models/CommonCohortsFilterAggregationAggregateProperties.js' +export * from '../models/CommonCohortsFilterAggregationAggregatePropertiesAggregationType.js' +export * from '../models/CommonCohortsFilterAggregationOperatorType.js' +export * from '../models/CommonCohortsGroup.js' +export * from '../models/CommonCohortsQuery.js' +export * from '../models/CommonCoinID.js' +export * from '../models/CommonCoinIDAddressIdentifier.js' +export * from '../models/CommonColumnState.js' +export * from '../models/CommonColumnStateSort.js' +export * from '../models/CommonComputeStats.js' +export * from '../models/CommonDuration.js' +export * from '../models/CommonEventLogColumn.js' +export * from '../models/CommonEventLogConfig.js' +export * from '../models/CommonEventLogEntry.js' +export * from '../models/CommonFormula.js' +export * from '../models/CommonFunction.js' +export * from '../models/CommonJoinOperator.js' +export * from '../models/CommonMatrix.js' +export * from '../models/CommonMatrixMetric.js' +export * from '../models/CommonMatrixSample.js' +export * from '../models/CommonMatrixValue.js' +export * from '../models/CommonOrganization.js' +export * from '../models/CommonOrganizationMember.js' +export * from '../models/CommonOrganizationRole.js' +export * from '../models/CommonOwner.js' +export * from '../models/CommonPermission.js' +export * from '../models/CommonPriceSegmentationQuery.js' +export * from '../models/CommonProject.js' +export * from '../models/CommonProjectInfo.js' +export * from '../models/CommonProjectProjectMember.js' +export * from '../models/CommonProjectSuperset.js' +export * from '../models/CommonProjectType.js' +export * from '../models/CommonProjectView.js' +export * from '../models/CommonProjectViewProjectViewConfig.js' +export * from '../models/CommonProjectVisibility.js' +export * from '../models/CommonQuery.js' +export * from '../models/CommonRetentionMatrix.js' +export * from '../models/CommonRetentionMatrixSample.js' +export * from '../models/CommonRetentionQuery.js' +export * from '../models/CommonRetentionQueryCriteria.js' +export * from '../models/CommonRetentionQueryFilter.js' +export * from '../models/CommonRetentionQueryFilterTimeFilter.js' +export * from '../models/CommonRetentionQueryFilterTimeFilterType.js' +export * from '../models/CommonRetentionQueryInterval.js' +export * from '../models/CommonRetentionQueryIntervalUnit.js' +export * from '../models/CommonRetentionQueryResource.js' +export * from '../models/CommonRichStruct.js' +export * from '../models/CommonRichValue.js' +export * from '../models/CommonRichValueList.js' +export * from '../models/CommonRichValueNullValue.js' +export * from '../models/CommonSegmentParameter.js' +export * from '../models/CommonSegmentationQuery.js' +export * from '../models/CommonSegmentationQueryAggregation.js' +export * from '../models/CommonSegmentationQueryAggregationAggregateProperties.js' +export * from '../models/CommonSegmentationQueryAggregationAggregatePropertiesAggregationType.js' +export * from '../models/CommonSegmentationQueryAggregationCountUnique.js' +export * from '../models/CommonSegmentationQueryResource.js' +export * from '../models/CommonSegmentationQueryResourceType.js' +export * from '../models/CommonSegmentationQuerySelectorExpr.js' +export * from '../models/CommonSegmentationQuerySelectorExprLogicExpr.js' +export * from '../models/CommonSelector.js' +export * from '../models/CommonSelectorExpr.js' +export * from '../models/CommonSelectorExprLogicExpr.js' +export * from '../models/CommonSelectorOperatorType.js' +export * from '../models/CommonStringList.js' +export * from '../models/CommonTabularData.js' +export * from '../models/CommonTabularDataColumnType.js' +export * from '../models/CommonTier.js' +export * from '../models/CommonTimeRange.js' +export * from '../models/CommonTimeRangeLite.js' +export * from '../models/CommonTimeRangeRelativeTime.js' +export * from '../models/CommonTimeRangeTimeLike.js' +export * from '../models/CommonUser.js' +export * from '../models/CommonUserAccountStatus.js' +export * from '../models/CommonUserInfo.js' +export * from '../models/EvmAccessListItem.js' +export * from '../models/EvmTransaction.js' +export * from '../models/EvmTransactionReceipt.js' +export * from '../models/GoogleApiHttpBody.js' +export * from '../models/GoogleProtobufAny.js' +export * from '../models/GoogleProtobufNullValue.js' +export * from '../models/InsightsServiceDataSource.js' +export * from '../models/InsightsServiceInsightsServiceQueryBody.js' +export * from '../models/InsightsServiceInsightsServiceRetentionBody.js' +export * from '../models/InsightsServiceListCoinsResponse.js' +export * from '../models/InsightsServiceQueryRequestQuery.js' +export * from '../models/InsightsServiceQueryResponse.js' +export * from '../models/InsightsServiceQueryResponseResult.js' +export * from '../models/InsightsServiceRetentionRequest.js' +export * from '../models/InsightsServiceRetentionResponse.js' +export * from '../models/MetricsServiceGetMetricsResponse.js' +export * from '../models/MetricsServiceMetricInfo.js' +export * from '../models/MetricsServiceMetricInfoLabelValues.js' +export * from '../models/MetricsServiceMetricMetadata.js' +export * from '../models/MetricsServiceMetricsQueryResponse.js' +export * from '../models/MetricsServiceMetricsQueryResponseMatrix.js' +export * from '../models/MetricsServiceMetricsQueryResponseMetric.js' +export * from '../models/MetricsServiceMetricsQueryResponseResult.js' +export * from '../models/MetricsServiceMetricsQueryResponseSample.js' +export * from '../models/MetricsServiceMetricsQueryResponseValue.js' +export * from '../models/MetricsServiceObservabilityServiceQueryBody.js' +export * from '../models/MetricsServiceObservabilityServiceQueryRangeBody.js' +export * from '../models/MetricsServiceQueryValueResponse.js' +export * from '../models/MetricsServiceQueryValueResponseResult.js' +export * from '../models/PriceServiceBatchGetPricesRequest.js' +export * from '../models/PriceServiceBatchGetPricesResponse.js' +export * from '../models/PriceServiceBatchGetPricesResponseCoinPrice.js' +export * from '../models/PriceServiceBatchGetPricesResponseCoinPricePrice.js' +export * from '../models/PriceServiceCheckLatestPriceResponse.js' +export * from '../models/PriceServiceCheckLatestPriceResponseCoinPrice.js' +export * from '../models/PriceServiceCoinID.js' +export * from '../models/PriceServiceCoinIDAddressIdentifier.js' +export * from '../models/PriceServiceGetPriceResponse.js' +export * from '../models/PriceServiceListCoinsResponse.js' +export * from '../models/SolidityServiceBaseChainConfig.js' +export * from '../models/SolidityServiceBlockOverrides.js' +export * from '../models/SolidityServiceChainIdentifier.js' +export * from '../models/SolidityServiceCompileSourceInternalResponse.js' +export * from '../models/SolidityServiceCompilerOptions.js' +export * from '../models/SolidityServiceContractKeyInfo.js' +export * from '../models/SolidityServiceCreateForkResponse.js' +export * from '../models/SolidityServiceDecodeStateDiffResponse.js' +export * from '../models/SolidityServiceExternalFork.js' +export * from '../models/SolidityServiceFailure.js' +export * from '../models/SolidityServiceFetchAndCompileInternalResponse.js' +export * from '../models/SolidityServiceFork.js' +export * from '../models/SolidityServiceForkServiceCreateForkBody.js' +export * from '../models/SolidityServiceForkServiceUpdateForkBody.js' +export * from '../models/SolidityServiceForkType.js' +export * from '../models/SolidityServiceGetForkInfoResponse.js' +export * from '../models/SolidityServiceGetForkResponse.js' +export * from '../models/SolidityServiceGetSimulationBundleResponse.js' +export * from '../models/SolidityServiceGetSimulationResponse.js' +export * from '../models/SolidityServiceGetSimulationsResponse.js' +export * from '../models/SolidityServiceGetStorageSummaryInternalResponse.js' +export * from '../models/SolidityServiceGetTraceCallInternalRequestBundle.js' +export * from '../models/SolidityServiceGetTraceCallInternalRequestStateContext.js' +export * from '../models/SolidityServiceGetTraceCallInternalResponse.js' +export * from '../models/SolidityServiceGetTraceTransactionInternalResponse.js' +export * from '../models/SolidityServiceListForksResponse.js' +export * from '../models/SolidityServiceManagedFork.js' +export * from '../models/SolidityServiceMetadata.js' +export * from '../models/SolidityServiceNodeEnvironment.js' +export * from '../models/SolidityServiceNodeForkConfig.js' +export * from '../models/SolidityServiceOptimizer.js' +export * from '../models/SolidityServiceOptimizerDetails.js' +export * from '../models/SolidityServiceOptimizerDetailsYulDetails.js' +export * from '../models/SolidityServicePreProcessCompilationInternalResponse.js' +export * from '../models/SolidityServiceSettings.js' +export * from '../models/SolidityServiceSimulateTransactionBundleResponse.js' +export * from '../models/SolidityServiceSimulateTransactionResponse.js' +export * from '../models/SolidityServiceSimulation.js' +export * from '../models/SolidityServiceSimulationResult.js' +export * from '../models/SolidityServiceSolidityAPIServiceSimulateTransactionBody.js' +export * from '../models/SolidityServiceSolidityAPIServiceSimulateTransactionBundleBody.js' +export * from '../models/SolidityServiceSolidityAPIServiceSimulateTransactionBundleOnForkBody.js' +export * from '../models/SolidityServiceSolidityAPIServiceSimulateTransactionOnForkBody.js' +export * from '../models/SolidityServiceSourceFetcherType.js' +export * from '../models/SolidityServiceSourceInfo.js' +export * from '../models/SolidityServiceSourceMultiFile.js' +export * from '../models/SolidityServiceSourceSpec.js' +export * from '../models/SolidityServiceSpecializations.js' +export * from '../models/SolidityServiceStateOverride.js' +export * from '../models/SolidityServiceStorageSummaryResult.js' +export * from '../models/SolidityServiceUpdateForkResponse.js' +export * from '../models/TxindexEvmRawTransaction.js' +export * from '../models/TxindexEvmSearchTransactionsResponse.js' +export * from '../models/WebServiceChart.js' +export * from '../models/WebServiceChartChartType.js' +export * from '../models/WebServiceChartConfig.js' +export * from '../models/WebServiceChartConfigBarGaugeConfig.js' +export * from '../models/WebServiceChartConfigCalculation.js' +export * from '../models/WebServiceChartConfigColorTheme.js' +export * from '../models/WebServiceChartConfigColumnSort.js' +export * from '../models/WebServiceChartConfigCompareTime.js' +export * from '../models/WebServiceChartConfigDirection.js' +export * from '../models/WebServiceChartConfigLineConfig.js' +export * from '../models/WebServiceChartConfigLineConfigStyle.js' +export * from '../models/WebServiceChartConfigMappingRule.js' +export * from '../models/WebServiceChartConfigMarker.js' +export * from '../models/WebServiceChartConfigMarkerType.js' +export * from '../models/WebServiceChartConfigPieConfig.js' +export * from '../models/WebServiceChartConfigPieConfigPieType.js' +export * from '../models/WebServiceChartConfigQueryValueConfig.js' +export * from '../models/WebServiceChartConfigSort.js' +export * from '../models/WebServiceChartConfigSortBy.js' +export * from '../models/WebServiceChartConfigTableConfig.js' +export * from '../models/WebServiceChartConfigTimeRangeOverride.js' +export * from '../models/WebServiceChartConfigValueConfig.js' +export * from '../models/WebServiceChartConfigValueConfigStyle.js' +export * from '../models/WebServiceChartConfigValueFormatter.js' +export * from '../models/WebServiceChartConfigYAxisConfig.js' +export * from '../models/WebServiceChartDataSourceType.js' +export * from '../models/WebServiceDashboard.js' +export * from '../models/WebServiceDashboardDashboardVisibility.js' +export * from '../models/WebServiceDashboardExtra.js' +export * from '../models/WebServiceDashboardExtraTemplateVariable.js' +export * from '../models/WebServiceDashboardExtraTemplateView.js' +export * from '../models/WebServiceDashboardLayouts.js' +export * from '../models/WebServiceDashboardLayoutsLayout.js' +export * from '../models/WebServiceDashboardResponsiveLayouts.js' +export * from '../models/WebServiceDashboardSharing.js' +export * from '../models/WebServiceEventLogsConfig.js' +export * from '../models/WebServiceEventLogsConfigTimeRangeOverride.js' +export * from '../models/WebServiceExportDashboardResponse.js' +export * from '../models/WebServiceGetDashboardResponse.js' +export * from '../models/WebServiceGetProjectListResponse.js' +export * from '../models/WebServiceGetProjectResponse.js' +export * from '../models/WebServiceImportDashboardRequest.js' +export * from '../models/WebServiceImportDashboardResponse.js' +export * from '../models/WebServiceNote.js' +export * from '../models/WebServiceNoteAlignment.js' +export * from '../models/WebServiceNoteFontSize.js' +export * from '../models/WebServiceNoteVerticalAlignment.js' +export * from '../models/WebServicePanel.js' diff --git a/src/models/index.ts b/src/models/index.ts deleted file mode 100755 index 7ab99c6..0000000 --- a/src/models/index.ts +++ /dev/null @@ -1,235 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -export * from './AnalyticServiceAnalyticServiceExecuteSQLBody.js'; -export * from './AnalyticServiceLogQueryRequestFilter.js'; -export * from './AnalyticServiceLogQueryRequestSort.js'; -export * from './AnalyticServiceLogQueryResponse.js'; -export * from './AnalyticServiceSQLQuery.js'; -export * from './AnalyticServiceSearchServiceQueryLogBody.js'; -export * from './AnalyticServiceSyncExecuteSQLResponse.js'; -export * from './CommonAggregate.js'; -export * from './CommonAggregateAggregateOps.js'; -export * from './CommonAny.js'; -export * from './CommonArgument.js'; -export * from './CommonBigDecimal.js'; -export * from './CommonBigInteger.js'; -export * from './CommonCachePolicy.js'; -export * from './CommonChannel.js'; -export * from './CommonChannelType.js'; -export * from './CommonCohortsFilter.js'; -export * from './CommonCohortsFilterAggregation.js'; -export * from './CommonCohortsFilterAggregationAggregateProperties.js'; -export * from './CommonCohortsFilterAggregationAggregatePropertiesAggregationType.js'; -export * from './CommonCohortsFilterAggregationOperatorType.js'; -export * from './CommonCohortsGroup.js'; -export * from './CommonCohortsQuery.js'; -export * from './CommonCoinID.js'; -export * from './CommonCoinIDAddressIdentifier.js'; -export * from './CommonColumnState.js'; -export * from './CommonColumnStateSort.js'; -export * from './CommonComputeStats.js'; -export * from './CommonDuration.js'; -export * from './CommonEventLogColumn.js'; -export * from './CommonEventLogConfig.js'; -export * from './CommonEventLogEntry.js'; -export * from './CommonFormula.js'; -export * from './CommonFunction.js'; -export * from './CommonJoinOperator.js'; -export * from './CommonMatrix.js'; -export * from './CommonMatrixMetric.js'; -export * from './CommonMatrixSample.js'; -export * from './CommonMatrixValue.js'; -export * from './CommonOrganization.js'; -export * from './CommonOrganizationMember.js'; -export * from './CommonOrganizationRole.js'; -export * from './CommonOwner.js'; -export * from './CommonPermission.js'; -export * from './CommonPriceSegmentationQuery.js'; -export * from './CommonProject.js'; -export * from './CommonProjectInfo.js'; -export * from './CommonProjectProjectMember.js'; -export * from './CommonProjectSuperset.js'; -export * from './CommonProjectType.js'; -export * from './CommonProjectView.js'; -export * from './CommonProjectViewProjectViewConfig.js'; -export * from './CommonProjectVisibility.js'; -export * from './CommonQuery.js'; -export * from './CommonRetentionMatrix.js'; -export * from './CommonRetentionMatrixSample.js'; -export * from './CommonRetentionQuery.js'; -export * from './CommonRetentionQueryCriteria.js'; -export * from './CommonRetentionQueryFilter.js'; -export * from './CommonRetentionQueryFilterTimeFilter.js'; -export * from './CommonRetentionQueryFilterTimeFilterType.js'; -export * from './CommonRetentionQueryInterval.js'; -export * from './CommonRetentionQueryIntervalUnit.js'; -export * from './CommonRetentionQueryResource.js'; -export * from './CommonRichStruct.js'; -export * from './CommonRichValue.js'; -export * from './CommonRichValueList.js'; -export * from './CommonRichValueNullValue.js'; -export * from './CommonSegmentParameter.js'; -export * from './CommonSegmentationQuery.js'; -export * from './CommonSegmentationQueryAggregation.js'; -export * from './CommonSegmentationQueryAggregationAggregateProperties.js'; -export * from './CommonSegmentationQueryAggregationAggregatePropertiesAggregationType.js'; -export * from './CommonSegmentationQueryAggregationCountUnique.js'; -export * from './CommonSegmentationQueryResource.js'; -export * from './CommonSegmentationQueryResourceType.js'; -export * from './CommonSegmentationQuerySelectorExpr.js'; -export * from './CommonSegmentationQuerySelectorExprLogicExpr.js'; -export * from './CommonSelector.js'; -export * from './CommonSelectorExpr.js'; -export * from './CommonSelectorExprLogicExpr.js'; -export * from './CommonSelectorOperatorType.js'; -export * from './CommonStringList.js'; -export * from './CommonTabularData.js'; -export * from './CommonTabularDataColumnType.js'; -export * from './CommonTier.js'; -export * from './CommonTimeRange.js'; -export * from './CommonTimeRangeLite.js'; -export * from './CommonTimeRangeRelativeTime.js'; -export * from './CommonTimeRangeTimeLike.js'; -export * from './CommonUser.js'; -export * from './CommonUserAccountStatus.js'; -export * from './CommonUserInfo.js'; -export * from './EvmAccessListItem.js'; -export * from './EvmTransaction.js'; -export * from './EvmTransactionReceipt.js'; -export * from './GoogleApiHttpBody.js'; -export * from './GoogleProtobufAny.js'; -export * from './GoogleProtobufNullValue.js'; -export * from './InsightsServiceDataSource.js'; -export * from './InsightsServiceInsightsServiceQueryBody.js'; -export * from './InsightsServiceInsightsServiceRetentionBody.js'; -export * from './InsightsServiceListCoinsResponse.js'; -export * from './InsightsServiceQueryRequestQuery.js'; -export * from './InsightsServiceQueryResponse.js'; -export * from './InsightsServiceQueryResponseResult.js'; -export * from './InsightsServiceRetentionRequest.js'; -export * from './InsightsServiceRetentionResponse.js'; -export * from './MetricsServiceGetMetricsResponse.js'; -export * from './MetricsServiceMetricInfo.js'; -export * from './MetricsServiceMetricInfoLabelValues.js'; -export * from './MetricsServiceMetricMetadata.js'; -export * from './MetricsServiceMetricsQueryResponse.js'; -export * from './MetricsServiceMetricsQueryResponseMatrix.js'; -export * from './MetricsServiceMetricsQueryResponseMetric.js'; -export * from './MetricsServiceMetricsQueryResponseResult.js'; -export * from './MetricsServiceMetricsQueryResponseSample.js'; -export * from './MetricsServiceMetricsQueryResponseValue.js'; -export * from './MetricsServiceObservabilityServiceQueryBody.js'; -export * from './MetricsServiceObservabilityServiceQueryRangeBody.js'; -export * from './MetricsServiceQueryValueResponse.js'; -export * from './MetricsServiceQueryValueResponseResult.js'; -export * from './PriceServiceBatchGetPricesRequest.js'; -export * from './PriceServiceBatchGetPricesResponse.js'; -export * from './PriceServiceBatchGetPricesResponseCoinPrice.js'; -export * from './PriceServiceBatchGetPricesResponseCoinPricePrice.js'; -export * from './PriceServiceCheckLatestPriceResponse.js'; -export * from './PriceServiceCheckLatestPriceResponseCoinPrice.js'; -export * from './PriceServiceCoinID.js'; -export * from './PriceServiceCoinIDAddressIdentifier.js'; -export * from './PriceServiceGetPriceResponse.js'; -export * from './PriceServiceListCoinsResponse.js'; -export * from './SolidityServiceBaseChainConfig.js'; -export * from './SolidityServiceBlockOverrides.js'; -export * from './SolidityServiceChainIdentifier.js'; -export * from './SolidityServiceCompileSourceInternalResponse.js'; -export * from './SolidityServiceCompilerOptions.js'; -export * from './SolidityServiceContractKeyInfo.js'; -export * from './SolidityServiceCreateForkResponse.js'; -export * from './SolidityServiceDecodeStateDiffResponse.js'; -export * from './SolidityServiceExternalFork.js'; -export * from './SolidityServiceFailure.js'; -export * from './SolidityServiceFetchAndCompileInternalResponse.js'; -export * from './SolidityServiceFork.js'; -export * from './SolidityServiceForkServiceCreateForkBody.js'; -export * from './SolidityServiceForkServiceUpdateForkBody.js'; -export * from './SolidityServiceForkType.js'; -export * from './SolidityServiceGetForkInfoResponse.js'; -export * from './SolidityServiceGetForkResponse.js'; -export * from './SolidityServiceGetSimulationBundleResponse.js'; -export * from './SolidityServiceGetSimulationResponse.js'; -export * from './SolidityServiceGetSimulationsResponse.js'; -export * from './SolidityServiceGetStorageSummaryInternalResponse.js'; -export * from './SolidityServiceGetTraceCallInternalRequestBundle.js'; -export * from './SolidityServiceGetTraceCallInternalRequestStateContext.js'; -export * from './SolidityServiceGetTraceCallInternalResponse.js'; -export * from './SolidityServiceGetTraceTransactionInternalResponse.js'; -export * from './SolidityServiceListForksResponse.js'; -export * from './SolidityServiceManagedFork.js'; -export * from './SolidityServiceMetadata.js'; -export * from './SolidityServiceNodeEnvironment.js'; -export * from './SolidityServiceNodeForkConfig.js'; -export * from './SolidityServiceOptimizer.js'; -export * from './SolidityServiceOptimizerDetails.js'; -export * from './SolidityServiceOptimizerDetailsYulDetails.js'; -export * from './SolidityServicePreProcessCompilationInternalResponse.js'; -export * from './SolidityServiceSettings.js'; -export * from './SolidityServiceSimulateTransactionBundleResponse.js'; -export * from './SolidityServiceSimulateTransactionResponse.js'; -export * from './SolidityServiceSimulation.js'; -export * from './SolidityServiceSimulationResult.js'; -export * from './SolidityServiceSolidityAPIServiceSimulateTransactionBody.js'; -export * from './SolidityServiceSolidityAPIServiceSimulateTransactionBundleBody.js'; -export * from './SolidityServiceSolidityAPIServiceSimulateTransactionBundleOnForkBody.js'; -export * from './SolidityServiceSolidityAPIServiceSimulateTransactionOnForkBody.js'; -export * from './SolidityServiceSourceFetcherType.js'; -export * from './SolidityServiceSourceInfo.js'; -export * from './SolidityServiceSourceMultiFile.js'; -export * from './SolidityServiceSourceSpec.js'; -export * from './SolidityServiceSpecializations.js'; -export * from './SolidityServiceStateOverride.js'; -export * from './SolidityServiceStorageSummaryResult.js'; -export * from './SolidityServiceUpdateForkResponse.js'; -export * from './TxindexEvmRawTransaction.js'; -export * from './TxindexEvmSearchTransactionsResponse.js'; -export * from './WebServiceChart.js'; -export * from './WebServiceChartChartType.js'; -export * from './WebServiceChartConfig.js'; -export * from './WebServiceChartConfigBarGaugeConfig.js'; -export * from './WebServiceChartConfigCalculation.js'; -export * from './WebServiceChartConfigColorTheme.js'; -export * from './WebServiceChartConfigColumnSort.js'; -export * from './WebServiceChartConfigCompareTime.js'; -export * from './WebServiceChartConfigDirection.js'; -export * from './WebServiceChartConfigLineConfig.js'; -export * from './WebServiceChartConfigLineConfigStyle.js'; -export * from './WebServiceChartConfigMappingRule.js'; -export * from './WebServiceChartConfigMarker.js'; -export * from './WebServiceChartConfigMarkerType.js'; -export * from './WebServiceChartConfigPieConfig.js'; -export * from './WebServiceChartConfigPieConfigPieType.js'; -export * from './WebServiceChartConfigQueryValueConfig.js'; -export * from './WebServiceChartConfigSort.js'; -export * from './WebServiceChartConfigSortBy.js'; -export * from './WebServiceChartConfigTableConfig.js'; -export * from './WebServiceChartConfigTimeRangeOverride.js'; -export * from './WebServiceChartConfigValueConfig.js'; -export * from './WebServiceChartConfigValueConfigStyle.js'; -export * from './WebServiceChartConfigValueFormatter.js'; -export * from './WebServiceChartConfigYAxisConfig.js'; -export * from './WebServiceChartDataSourceType.js'; -export * from './WebServiceDashboard.js'; -export * from './WebServiceDashboardDashboardVisibility.js'; -export * from './WebServiceDashboardExtra.js'; -export * from './WebServiceDashboardExtraTemplateVariable.js'; -export * from './WebServiceDashboardExtraTemplateView.js'; -export * from './WebServiceDashboardLayouts.js'; -export * from './WebServiceDashboardLayoutsLayout.js'; -export * from './WebServiceDashboardResponsiveLayouts.js'; -export * from './WebServiceDashboardSharing.js'; -export * from './WebServiceEventLogsConfig.js'; -export * from './WebServiceEventLogsConfigTimeRangeOverride.js'; -export * from './WebServiceExportDashboardResponse.js'; -export * from './WebServiceGetDashboardResponse.js'; -export * from './WebServiceGetProjectListResponse.js'; -export * from './WebServiceGetProjectResponse.js'; -export * from './WebServiceImportDashboardRequest.js'; -export * from './WebServiceImportDashboardResponse.js'; -export * from './WebServiceNote.js'; -export * from './WebServiceNoteAlignment.js'; -export * from './WebServiceNoteFontSize.js'; -export * from './WebServiceNoteVerticalAlignment.js'; -export * from './WebServicePanel.js'; diff --git a/src/package.json b/src/package.json new file mode 100755 index 0000000..ba2d8ae --- /dev/null +++ b/src/package.json @@ -0,0 +1,43 @@ +{ + "name": "", + "version": "", + "description": "OpenAPI client for ", + "author": "OpenAPI-Generator Contributors", + "repository": { + "type": "git", + "url": "https://github.com/GIT_USER_ID/GIT_REPO_ID.git" + }, + "keywords": [ + "fetch", + "typescript", + "openapi-client", + "openapi-generator" + ], + "license": "Unlicense", + "main": "./dist/index.js", + "type": "module", + "module": "./dist/index.js", + "exports": { + ".": { + "import": "./dist/index.js", + "types": "./dist/index.d.js" + } + }, + "files": [ + "dist" + ], + "typings": "./dist/index.d.ts", + "scripts": { + "build": "tsc", + "prepare": "npm run build" + }, + "dependencies": { + "whatwg-fetch": "^3.0.0", + "es6-promise": "^4.2.4", + "url-parse": "^1.4.3" + }, + "devDependencies": { + "typescript": "^4.0", + "@types/url-parse": "1.4.4" + } +} diff --git a/src/runtime.ts b/src/runtime.ts deleted file mode 100755 index 6313333..0000000 --- a/src/runtime.ts +++ /dev/null @@ -1,426 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Sentio API - * Sentio Open API for query data - * - * The version of the OpenAPI document: version not set - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -export const BASE_PATH = "https://app.sentio.xyz".replace(/\/+$/, ""); - -export interface ConfigurationParameters { - basePath?: string; // override base path - fetchApi?: FetchAPI; // override for fetch implementation - middleware?: Middleware[]; // middleware to apply before/after fetch requests - queryParamsStringify?: (params: HTTPQuery) => string; // stringify function for query strings - username?: string; // parameter for basic security - password?: string; // parameter for basic security - apiKey?: string | Promise | ((name: string) => string | Promise); // parameter for apiKey security - accessToken?: string | Promise | ((name?: string, scopes?: string[]) => string | Promise); // parameter for oauth2 security - headers?: HTTPHeaders; //header params we want to use on every request - credentials?: RequestCredentials; //value for the credentials param we want to use on each request -} - -export class Configuration { - constructor(private configuration: ConfigurationParameters = {}) {} - - set config(configuration: Configuration) { - this.configuration = configuration; - } - - get basePath(): string { - return this.configuration.basePath != null ? this.configuration.basePath : BASE_PATH; - } - - get fetchApi(): FetchAPI | undefined { - return this.configuration.fetchApi; - } - - get middleware(): Middleware[] { - return this.configuration.middleware || []; - } - - get queryParamsStringify(): (params: HTTPQuery) => string { - return this.configuration.queryParamsStringify || querystring; - } - - get username(): string | undefined { - return this.configuration.username; - } - - get password(): string | undefined { - return this.configuration.password; - } - - get apiKey(): ((name: string) => string | Promise) | undefined { - const apiKey = this.configuration.apiKey; - if (apiKey) { - return typeof apiKey === 'function' ? apiKey : () => apiKey; - } - return undefined; - } - - get accessToken(): ((name?: string, scopes?: string[]) => string | Promise) | undefined { - const accessToken = this.configuration.accessToken; - if (accessToken) { - return typeof accessToken === 'function' ? accessToken : async () => accessToken; - } - return undefined; - } - - get headers(): HTTPHeaders | undefined { - return this.configuration.headers; - } - - get credentials(): RequestCredentials | undefined { - return this.configuration.credentials; - } -} - -export const DefaultConfig = new Configuration(); - -/** - * This is the base class for all generated API classes. - */ -export class BaseAPI { - - private static readonly jsonRegex = new RegExp('^(:?application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(:?;.*)?$', 'i'); - private middleware: Middleware[]; - - constructor(protected configuration = DefaultConfig) { - this.middleware = configuration.middleware; - } - - withMiddleware(this: T, ...middlewares: Middleware[]) { - const next = this.clone(); - next.middleware = next.middleware.concat(...middlewares); - return next; - } - - withPreMiddleware(this: T, ...preMiddlewares: Array) { - const middlewares = preMiddlewares.map((pre) => ({ pre })); - return this.withMiddleware(...middlewares); - } - - withPostMiddleware(this: T, ...postMiddlewares: Array) { - const middlewares = postMiddlewares.map((post) => ({ post })); - return this.withMiddleware(...middlewares); - } - - /** - * Check if the given MIME is a JSON MIME. - * JSON MIME examples: - * application/json - * application/json; charset=UTF8 - * APPLICATION/JSON - * application/vnd.company+json - * @param mime - MIME (Multipurpose Internet Mail Extensions) - * @return True if the given MIME is JSON, false otherwise. - */ - protected isJsonMime(mime: string | null | undefined): boolean { - if (!mime) { - return false; - } - return BaseAPI.jsonRegex.test(mime); - } - - protected async request(context: RequestOpts, initOverrides?: RequestInit | InitOverrideFunction): Promise { - const { url, init } = await this.createFetchParams(context, initOverrides); - const response = await this.fetchApi(url, init); - if (response && (response.status >= 200 && response.status < 300)) { - return response; - } - throw new ResponseError(response, 'Response returned an error code'); - } - - private async createFetchParams(context: RequestOpts, initOverrides?: RequestInit | InitOverrideFunction) { - let url = this.configuration.basePath + context.path; - if (context.query !== undefined && Object.keys(context.query).length !== 0) { - // only add the querystring to the URL if there are query parameters. - // this is done to avoid urls ending with a "?" character which buggy webservers - // do not handle correctly sometimes. - url += '?' + this.configuration.queryParamsStringify(context.query); - } - - const headers = Object.assign({}, this.configuration.headers, context.headers); - Object.keys(headers).forEach(key => headers[key] === undefined ? delete headers[key] : {}); - - const initOverrideFn = - typeof initOverrides === "function" - ? initOverrides - : async () => initOverrides; - - const initParams = { - method: context.method, - headers, - body: context.body, - credentials: this.configuration.credentials, - }; - - const overriddenInit: RequestInit = { - ...initParams, - ...(await initOverrideFn({ - init: initParams, - context, - })) - }; - - let body: any; - if (isFormData(overriddenInit.body) - || (overriddenInit.body instanceof URLSearchParams) - || isBlob(overriddenInit.body)) { - body = overriddenInit.body; - } else if (this.isJsonMime(headers['Content-Type'])) { - body = JSON.stringify(overriddenInit.body); - } else { - body = overriddenInit.body; - } - - const init: RequestInit = { - ...overriddenInit, - body - }; - - return { url, init }; - } - - private fetchApi = async (url: string, init: RequestInit) => { - let fetchParams = { url, init }; - for (const middleware of this.middleware) { - if (middleware.pre) { - fetchParams = await middleware.pre({ - fetch: this.fetchApi, - ...fetchParams, - }) || fetchParams; - } - } - let response: Response | undefined = undefined; - try { - response = await (this.configuration.fetchApi || fetch)(fetchParams.url, fetchParams.init); - } catch (e) { - for (const middleware of this.middleware) { - if (middleware.onError) { - response = await middleware.onError({ - fetch: this.fetchApi, - url: fetchParams.url, - init: fetchParams.init, - error: e, - response: response ? response.clone() : undefined, - }) || response; - } - } - if (response === undefined) { - if (e instanceof Error) { - throw new FetchError(e, 'The request failed and the interceptors did not return an alternative response'); - } else { - throw e; - } - } - } - for (const middleware of this.middleware) { - if (middleware.post) { - response = await middleware.post({ - fetch: this.fetchApi, - url: fetchParams.url, - init: fetchParams.init, - response: response.clone(), - }) || response; - } - } - return response; - } - - /** - * Create a shallow clone of `this` by constructing a new instance - * and then shallow cloning data members. - */ - private clone(this: T): T { - const constructor = this.constructor as any; - const next = new constructor(this.configuration); - next.middleware = this.middleware.slice(); - return next; - } -}; - -function isBlob(value: any): value is Blob { - return typeof Blob !== 'undefined' && value instanceof Blob; -} - -function isFormData(value: any): value is FormData { - return typeof FormData !== "undefined" && value instanceof FormData; -} - -export class ResponseError extends Error { - override name: "ResponseError" = "ResponseError"; - constructor(public response: Response, msg?: string) { - super(msg); - } -} - -export class FetchError extends Error { - override name: "FetchError" = "FetchError"; - constructor(public cause: Error, msg?: string) { - super(msg); - } -} - -export class RequiredError extends Error { - override name: "RequiredError" = "RequiredError"; - constructor(public field: string, msg?: string) { - super(msg); - } -} - -export const COLLECTION_FORMATS = { - csv: ",", - ssv: " ", - tsv: "\t", - pipes: "|", -}; - -export type FetchAPI = WindowOrWorkerGlobalScope['fetch']; - -export type Json = any; -export type HTTPMethod = 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE' | 'OPTIONS' | 'HEAD'; -export type HTTPHeaders = { [key: string]: string }; -export type HTTPQuery = { [key: string]: string | number | null | boolean | Array | Set | HTTPQuery }; -export type HTTPBody = Json | FormData | URLSearchParams; -export type HTTPRequestInit = { headers?: HTTPHeaders; method: HTTPMethod; credentials?: RequestCredentials; body?: HTTPBody }; -export type ModelPropertyNaming = 'camelCase' | 'snake_case' | 'PascalCase' | 'original'; - -export type InitOverrideFunction = (requestContext: { init: HTTPRequestInit, context: RequestOpts }) => Promise - -export interface FetchParams { - url: string; - init: RequestInit; -} - -export interface RequestOpts { - path: string; - method: HTTPMethod; - headers: HTTPHeaders; - query?: HTTPQuery; - body?: HTTPBody; -} - -export function querystring(params: HTTPQuery, prefix: string = ''): string { - return Object.keys(params) - .map(key => querystringSingleKey(key, params[key], prefix)) - .filter(part => part.length > 0) - .join('&'); -} - -function querystringSingleKey(key: string, value: string | number | null | undefined | boolean | Array | Set | HTTPQuery, keyPrefix: string = ''): string { - const fullKey = keyPrefix + (keyPrefix.length ? `[${key}]` : key); - if (value instanceof Array) { - const multiValue = value.map(singleValue => encodeURIComponent(String(singleValue))) - .join(`&${encodeURIComponent(fullKey)}=`); - return `${encodeURIComponent(fullKey)}=${multiValue}`; - } - if (value instanceof Set) { - const valueAsArray = Array.from(value); - return querystringSingleKey(key, valueAsArray, keyPrefix); - } - if (value instanceof Date) { - return `${encodeURIComponent(fullKey)}=${encodeURIComponent(value.toISOString())}`; - } - if (value instanceof Object) { - return querystring(value as HTTPQuery, fullKey); - } - return `${encodeURIComponent(fullKey)}=${encodeURIComponent(String(value))}`; -} - -export function mapValues(data: any, fn: (item: any) => any) { - return Object.keys(data).reduce( - (acc, key) => ({ ...acc, [key]: fn(data[key]) }), - {} - ); -} - -export function canConsumeForm(consumes: Consume[]): boolean { - for (const consume of consumes) { - if ('multipart/form-data' === consume.contentType) { - return true; - } - } - return false; -} - -export interface Consume { - contentType: string; -} - -export interface RequestContext { - fetch: FetchAPI; - url: string; - init: RequestInit; -} - -export interface ResponseContext { - fetch: FetchAPI; - url: string; - init: RequestInit; - response: Response; -} - -export interface ErrorContext { - fetch: FetchAPI; - url: string; - init: RequestInit; - error: unknown; - response?: Response; -} - -export interface Middleware { - pre?(context: RequestContext): Promise; - post?(context: ResponseContext): Promise; - onError?(context: ErrorContext): Promise; -} - -export interface ApiResponse { - raw: Response; - value(): Promise; -} - -export interface ResponseTransformer { - (json: any): T; -} - -export class JSONApiResponse { - constructor(public raw: Response, private transformer: ResponseTransformer = (jsonValue: any) => jsonValue) {} - - async value(): Promise { - return this.transformer(await this.raw.json()); - } -} - -export class VoidApiResponse { - constructor(public raw: Response) {} - - async value(): Promise { - return undefined; - } -} - -export class BlobApiResponse { - constructor(public raw: Response) {} - - async value(): Promise { - return await this.raw.blob(); - }; -} - -export class TextApiResponse { - constructor(public raw: Response) {} - - async value(): Promise { - return await this.raw.text(); - }; -} diff --git a/src/rxjsStub.ts b/src/rxjsStub.ts new file mode 100755 index 0000000..4c73715 --- /dev/null +++ b/src/rxjsStub.ts @@ -0,0 +1,27 @@ +export class Observable { + constructor(private promise: Promise) {} + + toPromise() { + return this.promise; + } + + pipe(callback: (value: T) => S | Promise): Observable { + return new Observable(this.promise.then(callback)); + } +} + +export function from(promise: Promise) { + return new Observable(promise); +} + +export function of(value: T) { + return new Observable(Promise.resolve(value)); +} + +export function mergeMap(callback: (value: T) => Observable) { + return (value: T) => callback(value).toPromise(); +} + +export function map(callback: any) { + return callback; +} diff --git a/src/servers.ts b/src/servers.ts new file mode 100755 index 0000000..0321836 --- /dev/null +++ b/src/servers.ts @@ -0,0 +1,55 @@ +import { RequestContext, HttpMethod } from "./http/http.js"; + +export interface BaseServerConfiguration { + makeRequestContext(endpoint: string, httpMethod: HttpMethod): RequestContext; +} + +/** + * + * Represents the configuration of a server including its + * url template and variable configuration based on the url. + * + */ +export class ServerConfiguration implements BaseServerConfiguration { + public constructor(private url: string, private variableConfiguration: T) {} + + /** + * Sets the value of the variables of this server. Variables are included in + * the `url` of this ServerConfiguration in the form `{variableName}` + * + * @param variableConfiguration a partial variable configuration for the + * variables contained in the url + */ + public setVariables(variableConfiguration: Partial) { + Object.assign(this.variableConfiguration, variableConfiguration); + } + + public getConfiguration(): T { + return this.variableConfiguration + } + + private getUrl() { + let replacedUrl = this.url; + for (const key in this.variableConfiguration) { + var re = new RegExp("{" + key + "}","g"); + replacedUrl = replacedUrl.replace(re, this.variableConfiguration[key]); + } + return replacedUrl + } + + /** + * Creates a new request context for this server using the url with variables + * replaced with their respective values and the endpoint of the request appended. + * + * @param endpoint the endpoint to be queried on the server + * @param httpMethod httpMethod to be used + * + */ + public makeRequestContext(endpoint: string, httpMethod: HttpMethod): RequestContext { + return new RequestContext(this.getUrl() + endpoint, httpMethod); + } +} + +export const server1 = new ServerConfiguration<{ }>("https://app.sentio.xyz", { }) + +export const servers = [server1]; diff --git a/src/tsconfig.json b/src/tsconfig.json new file mode 100755 index 0000000..2cc80c6 --- /dev/null +++ b/src/tsconfig.json @@ -0,0 +1,29 @@ +{ + "compilerOptions": { + "strict": true, + /* Basic Options */ + "target": "es6", + "esModuleInterop": true, + "moduleResolution": "node", + "declaration": true, + + /* Additional Checks */ + "noUnusedLocals": false, /* Report errors on unused locals. */ // TODO: reenable (unused imports!) + "noUnusedParameters": false, /* Report errors on unused parameters. */ // TODO: set to true again + "noImplicitReturns": true, /* Report error when not all code paths in function return a value. */ + "noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */ + + "removeComments": true, + "sourceMap": true, + "outDir": "./dist", + "noLib": false, + "lib": [ "es6", "dom" ], + }, + "exclude": [ + "dist", + "node_modules" + ], + "filesGlob": [ + "./**/*.ts", + ] +} diff --git a/src/types/ObjectParamAPI.ts b/src/types/ObjectParamAPI.ts new file mode 100755 index 0000000..06ba92a --- /dev/null +++ b/src/types/ObjectParamAPI.ts @@ -0,0 +1,2497 @@ +import { ResponseContext, RequestContext, HttpFile, HttpInfo } from '../http/http.js'; +import { Configuration} from '../configuration.js' + +import { AnalyticServiceAnalyticServiceExecuteSQLBody } from '../models/AnalyticServiceAnalyticServiceExecuteSQLBody.js'; +import { AnalyticServiceLogQueryRequestFilter } from '../models/AnalyticServiceLogQueryRequestFilter.js'; +import { AnalyticServiceLogQueryRequestSort } from '../models/AnalyticServiceLogQueryRequestSort.js'; +import { AnalyticServiceLogQueryResponse } from '../models/AnalyticServiceLogQueryResponse.js'; +import { AnalyticServiceSQLQuery } from '../models/AnalyticServiceSQLQuery.js'; +import { AnalyticServiceSearchServiceQueryLogBody } from '../models/AnalyticServiceSearchServiceQueryLogBody.js'; +import { AnalyticServiceSyncExecuteSQLResponse } from '../models/AnalyticServiceSyncExecuteSQLResponse.js'; +import { CommonAggregate } from '../models/CommonAggregate.js'; +import { CommonAggregateAggregateOps } from '../models/CommonAggregateAggregateOps.js'; +import { CommonAny } from '../models/CommonAny.js'; +import { CommonArgument } from '../models/CommonArgument.js'; +import { CommonBigDecimal } from '../models/CommonBigDecimal.js'; +import { CommonBigInteger } from '../models/CommonBigInteger.js'; +import { CommonCachePolicy } from '../models/CommonCachePolicy.js'; +import { CommonChannel } from '../models/CommonChannel.js'; +import { CommonChannelType } from '../models/CommonChannelType.js'; +import { CommonCohortsFilter } from '../models/CommonCohortsFilter.js'; +import { CommonCohortsFilterAggregation } from '../models/CommonCohortsFilterAggregation.js'; +import { CommonCohortsFilterAggregationAggregateProperties } from '../models/CommonCohortsFilterAggregationAggregateProperties.js'; +import { CommonCohortsFilterAggregationAggregatePropertiesAggregationType } from '../models/CommonCohortsFilterAggregationAggregatePropertiesAggregationType.js'; +import { CommonCohortsFilterAggregationOperatorType } from '../models/CommonCohortsFilterAggregationOperatorType.js'; +import { CommonCohortsGroup } from '../models/CommonCohortsGroup.js'; +import { CommonCohortsQuery } from '../models/CommonCohortsQuery.js'; +import { CommonCoinID } from '../models/CommonCoinID.js'; +import { CommonCoinIDAddressIdentifier } from '../models/CommonCoinIDAddressIdentifier.js'; +import { CommonColumnState } from '../models/CommonColumnState.js'; +import { CommonColumnStateSort } from '../models/CommonColumnStateSort.js'; +import { CommonComputeStats } from '../models/CommonComputeStats.js'; +import { CommonDuration } from '../models/CommonDuration.js'; +import { CommonEventLogColumn } from '../models/CommonEventLogColumn.js'; +import { CommonEventLogConfig } from '../models/CommonEventLogConfig.js'; +import { CommonEventLogEntry } from '../models/CommonEventLogEntry.js'; +import { CommonFormula } from '../models/CommonFormula.js'; +import { CommonFunction } from '../models/CommonFunction.js'; +import { CommonJoinOperator } from '../models/CommonJoinOperator.js'; +import { CommonMatrix } from '../models/CommonMatrix.js'; +import { CommonMatrixMetric } from '../models/CommonMatrixMetric.js'; +import { CommonMatrixSample } from '../models/CommonMatrixSample.js'; +import { CommonMatrixValue } from '../models/CommonMatrixValue.js'; +import { CommonOrganization } from '../models/CommonOrganization.js'; +import { CommonOrganizationMember } from '../models/CommonOrganizationMember.js'; +import { CommonOrganizationRole } from '../models/CommonOrganizationRole.js'; +import { CommonOwner } from '../models/CommonOwner.js'; +import { CommonPermission } from '../models/CommonPermission.js'; +import { CommonPriceSegmentationQuery } from '../models/CommonPriceSegmentationQuery.js'; +import { CommonProject } from '../models/CommonProject.js'; +import { CommonProjectInfo } from '../models/CommonProjectInfo.js'; +import { CommonProjectProjectMember } from '../models/CommonProjectProjectMember.js'; +import { CommonProjectSuperset } from '../models/CommonProjectSuperset.js'; +import { CommonProjectType } from '../models/CommonProjectType.js'; +import { CommonProjectView } from '../models/CommonProjectView.js'; +import { CommonProjectViewProjectViewConfig } from '../models/CommonProjectViewProjectViewConfig.js'; +import { CommonProjectVisibility } from '../models/CommonProjectVisibility.js'; +import { CommonQuery } from '../models/CommonQuery.js'; +import { CommonRetentionMatrix } from '../models/CommonRetentionMatrix.js'; +import { CommonRetentionMatrixSample } from '../models/CommonRetentionMatrixSample.js'; +import { CommonRetentionQuery } from '../models/CommonRetentionQuery.js'; +import { CommonRetentionQueryCriteria } from '../models/CommonRetentionQueryCriteria.js'; +import { CommonRetentionQueryFilter } from '../models/CommonRetentionQueryFilter.js'; +import { CommonRetentionQueryFilterTimeFilter } from '../models/CommonRetentionQueryFilterTimeFilter.js'; +import { CommonRetentionQueryFilterTimeFilterType } from '../models/CommonRetentionQueryFilterTimeFilterType.js'; +import { CommonRetentionQueryInterval } from '../models/CommonRetentionQueryInterval.js'; +import { CommonRetentionQueryIntervalUnit } from '../models/CommonRetentionQueryIntervalUnit.js'; +import { CommonRetentionQueryResource } from '../models/CommonRetentionQueryResource.js'; +import { CommonRichStruct } from '../models/CommonRichStruct.js'; +import { CommonRichValue } from '../models/CommonRichValue.js'; +import { CommonRichValueList } from '../models/CommonRichValueList.js'; +import { CommonRichValueNullValue } from '../models/CommonRichValueNullValue.js'; +import { CommonSegmentParameter } from '../models/CommonSegmentParameter.js'; +import { CommonSegmentationQuery } from '../models/CommonSegmentationQuery.js'; +import { CommonSegmentationQueryAggregation } from '../models/CommonSegmentationQueryAggregation.js'; +import { CommonSegmentationQueryAggregationAggregateProperties } from '../models/CommonSegmentationQueryAggregationAggregateProperties.js'; +import { CommonSegmentationQueryAggregationAggregatePropertiesAggregationType } from '../models/CommonSegmentationQueryAggregationAggregatePropertiesAggregationType.js'; +import { CommonSegmentationQueryAggregationCountUnique } from '../models/CommonSegmentationQueryAggregationCountUnique.js'; +import { CommonSegmentationQueryResource } from '../models/CommonSegmentationQueryResource.js'; +import { CommonSegmentationQueryResourceType } from '../models/CommonSegmentationQueryResourceType.js'; +import { CommonSegmentationQuerySelectorExpr } from '../models/CommonSegmentationQuerySelectorExpr.js'; +import { CommonSegmentationQuerySelectorExprLogicExpr } from '../models/CommonSegmentationQuerySelectorExprLogicExpr.js'; +import { CommonSelector } from '../models/CommonSelector.js'; +import { CommonSelectorExpr } from '../models/CommonSelectorExpr.js'; +import { CommonSelectorExprLogicExpr } from '../models/CommonSelectorExprLogicExpr.js'; +import { CommonSelectorOperatorType } from '../models/CommonSelectorOperatorType.js'; +import { CommonStringList } from '../models/CommonStringList.js'; +import { CommonTabularData } from '../models/CommonTabularData.js'; +import { CommonTabularDataColumnType } from '../models/CommonTabularDataColumnType.js'; +import { CommonTier } from '../models/CommonTier.js'; +import { CommonTimeRange } from '../models/CommonTimeRange.js'; +import { CommonTimeRangeLite } from '../models/CommonTimeRangeLite.js'; +import { CommonTimeRangeRelativeTime } from '../models/CommonTimeRangeRelativeTime.js'; +import { CommonTimeRangeTimeLike } from '../models/CommonTimeRangeTimeLike.js'; +import { CommonUser } from '../models/CommonUser.js'; +import { CommonUserAccountStatus } from '../models/CommonUserAccountStatus.js'; +import { CommonUserInfo } from '../models/CommonUserInfo.js'; +import { EvmAccessListItem } from '../models/EvmAccessListItem.js'; +import { EvmTransaction } from '../models/EvmTransaction.js'; +import { EvmTransactionReceipt } from '../models/EvmTransactionReceipt.js'; +import { GoogleApiHttpBody } from '../models/GoogleApiHttpBody.js'; +import { GoogleProtobufAny } from '../models/GoogleProtobufAny.js'; +import { GoogleProtobufNullValue } from '../models/GoogleProtobufNullValue.js'; +import { InsightsServiceDataSource } from '../models/InsightsServiceDataSource.js'; +import { InsightsServiceInsightsServiceQueryBody } from '../models/InsightsServiceInsightsServiceQueryBody.js'; +import { InsightsServiceInsightsServiceRetentionBody } from '../models/InsightsServiceInsightsServiceRetentionBody.js'; +import { InsightsServiceListCoinsResponse } from '../models/InsightsServiceListCoinsResponse.js'; +import { InsightsServiceQueryRequestQuery } from '../models/InsightsServiceQueryRequestQuery.js'; +import { InsightsServiceQueryResponse } from '../models/InsightsServiceQueryResponse.js'; +import { InsightsServiceQueryResponseResult } from '../models/InsightsServiceQueryResponseResult.js'; +import { InsightsServiceRetentionRequest } from '../models/InsightsServiceRetentionRequest.js'; +import { InsightsServiceRetentionResponse } from '../models/InsightsServiceRetentionResponse.js'; +import { MetricsServiceGetMetricsResponse } from '../models/MetricsServiceGetMetricsResponse.js'; +import { MetricsServiceMetricInfo } from '../models/MetricsServiceMetricInfo.js'; +import { MetricsServiceMetricInfoLabelValues } from '../models/MetricsServiceMetricInfoLabelValues.js'; +import { MetricsServiceMetricMetadata } from '../models/MetricsServiceMetricMetadata.js'; +import { MetricsServiceMetricsQueryResponse } from '../models/MetricsServiceMetricsQueryResponse.js'; +import { MetricsServiceMetricsQueryResponseMatrix } from '../models/MetricsServiceMetricsQueryResponseMatrix.js'; +import { MetricsServiceMetricsQueryResponseMetric } from '../models/MetricsServiceMetricsQueryResponseMetric.js'; +import { MetricsServiceMetricsQueryResponseResult } from '../models/MetricsServiceMetricsQueryResponseResult.js'; +import { MetricsServiceMetricsQueryResponseSample } from '../models/MetricsServiceMetricsQueryResponseSample.js'; +import { MetricsServiceMetricsQueryResponseValue } from '../models/MetricsServiceMetricsQueryResponseValue.js'; +import { MetricsServiceObservabilityServiceQueryBody } from '../models/MetricsServiceObservabilityServiceQueryBody.js'; +import { MetricsServiceObservabilityServiceQueryRangeBody } from '../models/MetricsServiceObservabilityServiceQueryRangeBody.js'; +import { MetricsServiceQueryValueResponse } from '../models/MetricsServiceQueryValueResponse.js'; +import { MetricsServiceQueryValueResponseResult } from '../models/MetricsServiceQueryValueResponseResult.js'; +import { PriceServiceBatchGetPricesRequest } from '../models/PriceServiceBatchGetPricesRequest.js'; +import { PriceServiceBatchGetPricesResponse } from '../models/PriceServiceBatchGetPricesResponse.js'; +import { PriceServiceBatchGetPricesResponseCoinPrice } from '../models/PriceServiceBatchGetPricesResponseCoinPrice.js'; +import { PriceServiceBatchGetPricesResponseCoinPricePrice } from '../models/PriceServiceBatchGetPricesResponseCoinPricePrice.js'; +import { PriceServiceCheckLatestPriceResponse } from '../models/PriceServiceCheckLatestPriceResponse.js'; +import { PriceServiceCheckLatestPriceResponseCoinPrice } from '../models/PriceServiceCheckLatestPriceResponseCoinPrice.js'; +import { PriceServiceCoinID } from '../models/PriceServiceCoinID.js'; +import { PriceServiceCoinIDAddressIdentifier } from '../models/PriceServiceCoinIDAddressIdentifier.js'; +import { PriceServiceGetPriceResponse } from '../models/PriceServiceGetPriceResponse.js'; +import { PriceServiceListCoinsResponse } from '../models/PriceServiceListCoinsResponse.js'; +import { SolidityServiceBaseChainConfig } from '../models/SolidityServiceBaseChainConfig.js'; +import { SolidityServiceBlockOverrides } from '../models/SolidityServiceBlockOverrides.js'; +import { SolidityServiceChainIdentifier } from '../models/SolidityServiceChainIdentifier.js'; +import { SolidityServiceCompileSourceInternalResponse } from '../models/SolidityServiceCompileSourceInternalResponse.js'; +import { SolidityServiceCompilerOptions } from '../models/SolidityServiceCompilerOptions.js'; +import { SolidityServiceContractKeyInfo } from '../models/SolidityServiceContractKeyInfo.js'; +import { SolidityServiceCreateForkResponse } from '../models/SolidityServiceCreateForkResponse.js'; +import { SolidityServiceDecodeStateDiffResponse } from '../models/SolidityServiceDecodeStateDiffResponse.js'; +import { SolidityServiceExternalFork } from '../models/SolidityServiceExternalFork.js'; +import { SolidityServiceFailure } from '../models/SolidityServiceFailure.js'; +import { SolidityServiceFetchAndCompileInternalResponse } from '../models/SolidityServiceFetchAndCompileInternalResponse.js'; +import { SolidityServiceFork } from '../models/SolidityServiceFork.js'; +import { SolidityServiceForkServiceCreateForkBody } from '../models/SolidityServiceForkServiceCreateForkBody.js'; +import { SolidityServiceForkServiceUpdateForkBody } from '../models/SolidityServiceForkServiceUpdateForkBody.js'; +import { SolidityServiceForkType } from '../models/SolidityServiceForkType.js'; +import { SolidityServiceGetForkInfoResponse } from '../models/SolidityServiceGetForkInfoResponse.js'; +import { SolidityServiceGetForkResponse } from '../models/SolidityServiceGetForkResponse.js'; +import { SolidityServiceGetSimulationBundleResponse } from '../models/SolidityServiceGetSimulationBundleResponse.js'; +import { SolidityServiceGetSimulationResponse } from '../models/SolidityServiceGetSimulationResponse.js'; +import { SolidityServiceGetSimulationsResponse } from '../models/SolidityServiceGetSimulationsResponse.js'; +import { SolidityServiceGetStorageSummaryInternalResponse } from '../models/SolidityServiceGetStorageSummaryInternalResponse.js'; +import { SolidityServiceGetTraceCallInternalRequestBundle } from '../models/SolidityServiceGetTraceCallInternalRequestBundle.js'; +import { SolidityServiceGetTraceCallInternalRequestStateContext } from '../models/SolidityServiceGetTraceCallInternalRequestStateContext.js'; +import { SolidityServiceGetTraceCallInternalResponse } from '../models/SolidityServiceGetTraceCallInternalResponse.js'; +import { SolidityServiceGetTraceTransactionInternalResponse } from '../models/SolidityServiceGetTraceTransactionInternalResponse.js'; +import { SolidityServiceListForksResponse } from '../models/SolidityServiceListForksResponse.js'; +import { SolidityServiceManagedFork } from '../models/SolidityServiceManagedFork.js'; +import { SolidityServiceMetadata } from '../models/SolidityServiceMetadata.js'; +import { SolidityServiceNodeEnvironment } from '../models/SolidityServiceNodeEnvironment.js'; +import { SolidityServiceNodeForkConfig } from '../models/SolidityServiceNodeForkConfig.js'; +import { SolidityServiceOptimizer } from '../models/SolidityServiceOptimizer.js'; +import { SolidityServiceOptimizerDetails } from '../models/SolidityServiceOptimizerDetails.js'; +import { SolidityServiceOptimizerDetailsYulDetails } from '../models/SolidityServiceOptimizerDetailsYulDetails.js'; +import { SolidityServicePreProcessCompilationInternalResponse } from '../models/SolidityServicePreProcessCompilationInternalResponse.js'; +import { SolidityServiceSettings } from '../models/SolidityServiceSettings.js'; +import { SolidityServiceSimulateTransactionBundleResponse } from '../models/SolidityServiceSimulateTransactionBundleResponse.js'; +import { SolidityServiceSimulateTransactionResponse } from '../models/SolidityServiceSimulateTransactionResponse.js'; +import { SolidityServiceSimulation } from '../models/SolidityServiceSimulation.js'; +import { SolidityServiceSimulationResult } from '../models/SolidityServiceSimulationResult.js'; +import { SolidityServiceSolidityAPIServiceSimulateTransactionBody } from '../models/SolidityServiceSolidityAPIServiceSimulateTransactionBody.js'; +import { SolidityServiceSolidityAPIServiceSimulateTransactionBundleBody } from '../models/SolidityServiceSolidityAPIServiceSimulateTransactionBundleBody.js'; +import { SolidityServiceSolidityAPIServiceSimulateTransactionBundleOnForkBody } from '../models/SolidityServiceSolidityAPIServiceSimulateTransactionBundleOnForkBody.js'; +import { SolidityServiceSolidityAPIServiceSimulateTransactionOnForkBody } from '../models/SolidityServiceSolidityAPIServiceSimulateTransactionOnForkBody.js'; +import { SolidityServiceSourceFetcherType } from '../models/SolidityServiceSourceFetcherType.js'; +import { SolidityServiceSourceInfo } from '../models/SolidityServiceSourceInfo.js'; +import { SolidityServiceSourceMultiFile } from '../models/SolidityServiceSourceMultiFile.js'; +import { SolidityServiceSourceSpec } from '../models/SolidityServiceSourceSpec.js'; +import { SolidityServiceSpecializations } from '../models/SolidityServiceSpecializations.js'; +import { SolidityServiceStateOverride } from '../models/SolidityServiceStateOverride.js'; +import { SolidityServiceStorageSummaryResult } from '../models/SolidityServiceStorageSummaryResult.js'; +import { SolidityServiceUpdateForkResponse } from '../models/SolidityServiceUpdateForkResponse.js'; +import { TxindexEvmRawTransaction } from '../models/TxindexEvmRawTransaction.js'; +import { TxindexEvmSearchTransactionsResponse } from '../models/TxindexEvmSearchTransactionsResponse.js'; +import { WebServiceChart } from '../models/WebServiceChart.js'; +import { WebServiceChartChartType } from '../models/WebServiceChartChartType.js'; +import { WebServiceChartConfig } from '../models/WebServiceChartConfig.js'; +import { WebServiceChartConfigBarGaugeConfig } from '../models/WebServiceChartConfigBarGaugeConfig.js'; +import { WebServiceChartConfigCalculation } from '../models/WebServiceChartConfigCalculation.js'; +import { WebServiceChartConfigColorTheme } from '../models/WebServiceChartConfigColorTheme.js'; +import { WebServiceChartConfigColumnSort } from '../models/WebServiceChartConfigColumnSort.js'; +import { WebServiceChartConfigCompareTime } from '../models/WebServiceChartConfigCompareTime.js'; +import { WebServiceChartConfigDirection } from '../models/WebServiceChartConfigDirection.js'; +import { WebServiceChartConfigLineConfig } from '../models/WebServiceChartConfigLineConfig.js'; +import { WebServiceChartConfigLineConfigStyle } from '../models/WebServiceChartConfigLineConfigStyle.js'; +import { WebServiceChartConfigMappingRule } from '../models/WebServiceChartConfigMappingRule.js'; +import { WebServiceChartConfigMarker } from '../models/WebServiceChartConfigMarker.js'; +import { WebServiceChartConfigMarkerType } from '../models/WebServiceChartConfigMarkerType.js'; +import { WebServiceChartConfigPieConfig } from '../models/WebServiceChartConfigPieConfig.js'; +import { WebServiceChartConfigPieConfigPieType } from '../models/WebServiceChartConfigPieConfigPieType.js'; +import { WebServiceChartConfigQueryValueConfig } from '../models/WebServiceChartConfigQueryValueConfig.js'; +import { WebServiceChartConfigSort } from '../models/WebServiceChartConfigSort.js'; +import { WebServiceChartConfigSortBy } from '../models/WebServiceChartConfigSortBy.js'; +import { WebServiceChartConfigTableConfig } from '../models/WebServiceChartConfigTableConfig.js'; +import { WebServiceChartConfigTimeRangeOverride } from '../models/WebServiceChartConfigTimeRangeOverride.js'; +import { WebServiceChartConfigValueConfig } from '../models/WebServiceChartConfigValueConfig.js'; +import { WebServiceChartConfigValueConfigStyle } from '../models/WebServiceChartConfigValueConfigStyle.js'; +import { WebServiceChartConfigValueFormatter } from '../models/WebServiceChartConfigValueFormatter.js'; +import { WebServiceChartConfigYAxisConfig } from '../models/WebServiceChartConfigYAxisConfig.js'; +import { WebServiceChartDataSourceType } from '../models/WebServiceChartDataSourceType.js'; +import { WebServiceDashboard } from '../models/WebServiceDashboard.js'; +import { WebServiceDashboardDashboardVisibility } from '../models/WebServiceDashboardDashboardVisibility.js'; +import { WebServiceDashboardExtra } from '../models/WebServiceDashboardExtra.js'; +import { WebServiceDashboardExtraTemplateVariable } from '../models/WebServiceDashboardExtraTemplateVariable.js'; +import { WebServiceDashboardExtraTemplateView } from '../models/WebServiceDashboardExtraTemplateView.js'; +import { WebServiceDashboardLayouts } from '../models/WebServiceDashboardLayouts.js'; +import { WebServiceDashboardLayoutsLayout } from '../models/WebServiceDashboardLayoutsLayout.js'; +import { WebServiceDashboardResponsiveLayouts } from '../models/WebServiceDashboardResponsiveLayouts.js'; +import { WebServiceDashboardSharing } from '../models/WebServiceDashboardSharing.js'; +import { WebServiceEventLogsConfig } from '../models/WebServiceEventLogsConfig.js'; +import { WebServiceEventLogsConfigTimeRangeOverride } from '../models/WebServiceEventLogsConfigTimeRangeOverride.js'; +import { WebServiceExportDashboardResponse } from '../models/WebServiceExportDashboardResponse.js'; +import { WebServiceGetDashboardResponse } from '../models/WebServiceGetDashboardResponse.js'; +import { WebServiceGetProjectListResponse } from '../models/WebServiceGetProjectListResponse.js'; +import { WebServiceGetProjectResponse } from '../models/WebServiceGetProjectResponse.js'; +import { WebServiceImportDashboardRequest } from '../models/WebServiceImportDashboardRequest.js'; +import { WebServiceImportDashboardResponse } from '../models/WebServiceImportDashboardResponse.js'; +import { WebServiceNote } from '../models/WebServiceNote.js'; +import { WebServiceNoteAlignment } from '../models/WebServiceNoteAlignment.js'; +import { WebServiceNoteFontSize } from '../models/WebServiceNoteFontSize.js'; +import { WebServiceNoteVerticalAlignment } from '../models/WebServiceNoteVerticalAlignment.js'; +import { WebServicePanel } from '../models/WebServicePanel.js'; + +import { ObservableDataApi } from "./ObservableAPI.js"; +import { DataApiRequestFactory, DataApiResponseProcessor} from "../apis/DataApi.js"; + +export interface DataApiExecuteSQLRequest { + /** + * username or organization name + * Defaults to: undefined + * @type string + * @memberof DataApiexecuteSQL + */ + owner: string + /** + * project slug + * Defaults to: undefined + * @type string + * @memberof DataApiexecuteSQL + */ + slug: string + /** + * + * @type AnalyticServiceAnalyticServiceExecuteSQLBody + * @memberof DataApiexecuteSQL + */ + body: AnalyticServiceAnalyticServiceExecuteSQLBody +} + +export interface DataApiGetMetricsRequest { + /** + * + * Defaults to: undefined + * @type string + * @memberof DataApigetMetrics + */ + projectId?: string + /** + * + * Defaults to: undefined + * @type string + * @memberof DataApigetMetrics + */ + name?: string + /** + * + * Defaults to: undefined + * @type number + * @memberof DataApigetMetrics + */ + version?: number +} + +export interface DataApiListCoinsRequest { + /** + * + * Defaults to: undefined + * @type string + * @memberof DataApilistCoins + */ + owner: string + /** + * + * Defaults to: undefined + * @type string + * @memberof DataApilistCoins + */ + slug: string + /** + * + * Defaults to: undefined + * @type string + * @memberof DataApilistCoins + */ + projectId?: string + /** + * + * Defaults to: undefined + * @type number + * @memberof DataApilistCoins + */ + version?: number + /** + * + * Defaults to: undefined + * @type number + * @memberof DataApilistCoins + */ + limit?: number + /** + * + * Defaults to: undefined + * @type number + * @memberof DataApilistCoins + */ + offset?: number + /** + * + * Defaults to: undefined + * @type string + * @memberof DataApilistCoins + */ + searchQuery?: string +} + +export interface DataApiListCoins2Request { + /** + * + * Defaults to: undefined + * @type string + * @memberof DataApilistCoins2 + */ + projectOwner?: string + /** + * + * Defaults to: undefined + * @type string + * @memberof DataApilistCoins2 + */ + projectSlug?: string + /** + * + * Defaults to: undefined + * @type string + * @memberof DataApilistCoins2 + */ + projectId?: string + /** + * + * Defaults to: undefined + * @type number + * @memberof DataApilistCoins2 + */ + version?: number + /** + * + * Defaults to: undefined + * @type number + * @memberof DataApilistCoins2 + */ + limit?: number + /** + * + * Defaults to: undefined + * @type number + * @memberof DataApilistCoins2 + */ + offset?: number + /** + * + * Defaults to: undefined + * @type string + * @memberof DataApilistCoins2 + */ + searchQuery?: string +} + +export interface DataApiQueryRequest { + /** + * username or organization name + * Defaults to: undefined + * @type string + * @memberof DataApiquery + */ + owner: string + /** + * project slug + * Defaults to: undefined + * @type string + * @memberof DataApiquery + */ + slug: string + /** + * + * @type InsightsServiceInsightsServiceQueryBody + * @memberof DataApiquery + */ + body: InsightsServiceInsightsServiceQueryBody +} + +export interface DataApiQueryInstantRequest { + /** + * username or organization name + * Defaults to: undefined + * @type string + * @memberof DataApiqueryInstant + */ + owner: string + /** + * project slug + * Defaults to: undefined + * @type string + * @memberof DataApiqueryInstant + */ + slug: string + /** + * + * @type MetricsServiceObservabilityServiceQueryBody + * @memberof DataApiqueryInstant + */ + body: MetricsServiceObservabilityServiceQueryBody +} + +export interface DataApiQueryLogRequest { + /** + * + * Defaults to: undefined + * @type string + * @memberof DataApiqueryLog + */ + owner: string + /** + * + * Defaults to: undefined + * @type string + * @memberof DataApiqueryLog + */ + slug: string + /** + * + * @type AnalyticServiceSearchServiceQueryLogBody + * @memberof DataApiqueryLog + */ + body: AnalyticServiceSearchServiceQueryLogBody +} + +export interface DataApiQueryLog2Request { + /** + * + * Defaults to: undefined + * @type string + * @memberof DataApiqueryLog2 + */ + owner: string + /** + * + * Defaults to: undefined + * @type string + * @memberof DataApiqueryLog2 + */ + slug: string + /** + * + * Defaults to: undefined + * @type string + * @memberof DataApiqueryLog2 + */ + projectId?: string + /** + * + * Defaults to: undefined + * @type string + * @memberof DataApiqueryLog2 + */ + query?: string + /** + * + * Defaults to: undefined + * @type string + * @memberof DataApiqueryLog2 + */ + timeRangeStartRelativeTimeUnit?: string + /** + * + * Defaults to: undefined + * @type number + * @memberof DataApiqueryLog2 + */ + timeRangeStartRelativeTimeValue?: number + /** + * + * Defaults to: undefined + * @type string + * @memberof DataApiqueryLog2 + */ + timeRangeStartRelativeTimeAlign?: string + /** + * + * Defaults to: undefined + * @type string + * @memberof DataApiqueryLog2 + */ + timeRangeStartAbsoluteTime?: string + /** + * + * Defaults to: undefined + * @type string + * @memberof DataApiqueryLog2 + */ + timeRangeEndRelativeTimeUnit?: string + /** + * + * Defaults to: undefined + * @type number + * @memberof DataApiqueryLog2 + */ + timeRangeEndRelativeTimeValue?: number + /** + * + * Defaults to: undefined + * @type string + * @memberof DataApiqueryLog2 + */ + timeRangeEndRelativeTimeAlign?: string + /** + * + * Defaults to: undefined + * @type string + * @memberof DataApiqueryLog2 + */ + timeRangeEndAbsoluteTime?: string + /** + * + * Defaults to: undefined + * @type string + * @memberof DataApiqueryLog2 + */ + timeRangeStep?: string + /** + * + * Defaults to: undefined + * @type number + * @memberof DataApiqueryLog2 + */ + timeRangeIntervalValue?: number + /** + * + * Defaults to: undefined + * @type string + * @memberof DataApiqueryLog2 + */ + timeRangeIntervalUnit?: string + /** + * + * Defaults to: undefined + * @type string + * @memberof DataApiqueryLog2 + */ + timeRangeTimezone?: string + /** + * + * Defaults to: undefined + * @type number + * @memberof DataApiqueryLog2 + */ + limit?: number + /** + * + * Defaults to: undefined + * @type number + * @memberof DataApiqueryLog2 + */ + offset?: number + /** + * + * Defaults to: undefined + * @type number + * @memberof DataApiqueryLog2 + */ + version?: number +} + +export interface DataApiQueryRangeRequest { + /** + * username or organization name + * Defaults to: undefined + * @type string + * @memberof DataApiqueryRange + */ + owner: string + /** + * project slug + * Defaults to: undefined + * @type string + * @memberof DataApiqueryRange + */ + slug: string + /** + * + * @type MetricsServiceObservabilityServiceQueryRangeBody + * @memberof DataApiqueryRange + */ + body: MetricsServiceObservabilityServiceQueryRangeBody +} + +export interface DataApiRetentionRequest { + /** + * + * Defaults to: undefined + * @type string + * @memberof DataApiretention + */ + owner: string + /** + * + * Defaults to: undefined + * @type string + * @memberof DataApiretention + */ + slug: string + /** + * + * @type InsightsServiceInsightsServiceRetentionBody + * @memberof DataApiretention + */ + body: InsightsServiceInsightsServiceRetentionBody +} + +export interface DataApiRetention2Request { + /** + * + * @type InsightsServiceRetentionRequest + * @memberof DataApiretention2 + */ + body: InsightsServiceRetentionRequest +} + +export class ObjectDataApi { + private api: ObservableDataApi + + public constructor(configuration: Configuration, requestFactory?: DataApiRequestFactory, responseProcessor?: DataApiResponseProcessor) { + this.api = new ObservableDataApi(configuration, requestFactory, responseProcessor); + } + + /** + * Execute SQL in a project. Go to \"Data Studio\" -> \"SQL Editor\", write your query and then click \"Export as cURL\" ![screenshot](https://raw.githubusercontent.com/sentioxyz/docs/main/.gitbook/assets/image%20(102).png) Find more: https://docs.sentio.xyz/reference/data#sql-api + * Execute SQL + * @param param the request object + */ + public executeSQLWithHttpInfo(param: DataApiExecuteSQLRequest, options?: Configuration): Promise> { + return this.api.executeSQLWithHttpInfo(param.owner, param.slug, param.body, options).toPromise(); + } + + /** + * Execute SQL in a project. Go to \"Data Studio\" -> \"SQL Editor\", write your query and then click \"Export as cURL\" ![screenshot](https://raw.githubusercontent.com/sentioxyz/docs/main/.gitbook/assets/image%20(102).png) Find more: https://docs.sentio.xyz/reference/data#sql-api + * Execute SQL + * @param param the request object + */ + public executeSQL(param: DataApiExecuteSQLRequest, options?: Configuration): Promise { + return this.api.executeSQL(param.owner, param.slug, param.body, options).toPromise(); + } + + /** + * Get a list of metrics in a project + * @param param the request object + */ + public getMetricsWithHttpInfo(param: DataApiGetMetricsRequest = {}, options?: Configuration): Promise> { + return this.api.getMetricsWithHttpInfo(param.projectId, param.name, param.version, options).toPromise(); + } + + /** + * Get a list of metrics in a project + * @param param the request object + */ + public getMetrics(param: DataApiGetMetricsRequest = {}, options?: Configuration): Promise { + return this.api.getMetrics(param.projectId, param.name, param.version, options).toPromise(); + } + + /** + * Get a list of coins in a project. + * List coins + * @param param the request object + */ + public listCoinsWithHttpInfo(param: DataApiListCoinsRequest, options?: Configuration): Promise> { + return this.api.listCoinsWithHttpInfo(param.owner, param.slug, param.projectId, param.version, param.limit, param.offset, param.searchQuery, options).toPromise(); + } + + /** + * Get a list of coins in a project. + * List coins + * @param param the request object + */ + public listCoins(param: DataApiListCoinsRequest, options?: Configuration): Promise { + return this.api.listCoins(param.owner, param.slug, param.projectId, param.version, param.limit, param.offset, param.searchQuery, options).toPromise(); + } + + /** + * Get a list of coins in a project. + * List coins + * @param param the request object + */ + public listCoins2WithHttpInfo(param: DataApiListCoins2Request = {}, options?: Configuration): Promise> { + return this.api.listCoins2WithHttpInfo(param.projectOwner, param.projectSlug, param.projectId, param.version, param.limit, param.offset, param.searchQuery, options).toPromise(); + } + + /** + * Get a list of coins in a project. + * List coins + * @param param the request object + */ + public listCoins2(param: DataApiListCoins2Request = {}, options?: Configuration): Promise { + return this.api.listCoins2(param.projectOwner, param.projectSlug, param.projectId, param.version, param.limit, param.offset, param.searchQuery, options).toPromise(); + } + + /** + * Query for metrics,event logs and coin prices in a project. + * Insight Query + * @param param the request object + */ + public queryWithHttpInfo(param: DataApiQueryRequest, options?: Configuration): Promise> { + return this.api.queryWithHttpInfo(param.owner, param.slug, param.body, options).toPromise(); + } + + /** + * Query for metrics,event logs and coin prices in a project. + * Insight Query + * @param param the request object + */ + public query(param: DataApiQueryRequest, options?: Configuration): Promise { + return this.api.query(param.owner, param.slug, param.body, options).toPromise(); + } + + /** + * Metric instant queries + * @param param the request object + */ + public queryInstantWithHttpInfo(param: DataApiQueryInstantRequest, options?: Configuration): Promise> { + return this.api.queryInstantWithHttpInfo(param.owner, param.slug, param.body, options).toPromise(); + } + + /** + * Metric instant queries + * @param param the request object + */ + public queryInstant(param: DataApiQueryInstantRequest, options?: Configuration): Promise { + return this.api.queryInstant(param.owner, param.slug, param.body, options).toPromise(); + } + + /** + * Query event logs + * @param param the request object + */ + public queryLogWithHttpInfo(param: DataApiQueryLogRequest, options?: Configuration): Promise> { + return this.api.queryLogWithHttpInfo(param.owner, param.slug, param.body, options).toPromise(); + } + + /** + * Query event logs + * @param param the request object + */ + public queryLog(param: DataApiQueryLogRequest, options?: Configuration): Promise { + return this.api.queryLog(param.owner, param.slug, param.body, options).toPromise(); + } + + /** + * Query event logs + * @param param the request object + */ + public queryLog2WithHttpInfo(param: DataApiQueryLog2Request, options?: Configuration): Promise> { + return this.api.queryLog2WithHttpInfo(param.owner, param.slug, param.projectId, param.query, param.timeRangeStartRelativeTimeUnit, param.timeRangeStartRelativeTimeValue, param.timeRangeStartRelativeTimeAlign, param.timeRangeStartAbsoluteTime, param.timeRangeEndRelativeTimeUnit, param.timeRangeEndRelativeTimeValue, param.timeRangeEndRelativeTimeAlign, param.timeRangeEndAbsoluteTime, param.timeRangeStep, param.timeRangeIntervalValue, param.timeRangeIntervalUnit, param.timeRangeTimezone, param.limit, param.offset, param.version, options).toPromise(); + } + + /** + * Query event logs + * @param param the request object + */ + public queryLog2(param: DataApiQueryLog2Request, options?: Configuration): Promise { + return this.api.queryLog2(param.owner, param.slug, param.projectId, param.query, param.timeRangeStartRelativeTimeUnit, param.timeRangeStartRelativeTimeValue, param.timeRangeStartRelativeTimeAlign, param.timeRangeStartAbsoluteTime, param.timeRangeEndRelativeTimeUnit, param.timeRangeEndRelativeTimeValue, param.timeRangeEndRelativeTimeAlign, param.timeRangeEndAbsoluteTime, param.timeRangeStep, param.timeRangeIntervalValue, param.timeRangeIntervalUnit, param.timeRangeTimezone, param.limit, param.offset, param.version, options).toPromise(); + } + + /** + * The easiest way to build query is through UI, you could first create an insight chart, and then **Export as cURL**. ![screenshot](https://raw.githubusercontent.com/sentioxyz/docs/main/.gitbook/assets/image%20(101).png) + * Metric range queries + * @param param the request object + */ + public queryRangeWithHttpInfo(param: DataApiQueryRangeRequest, options?: Configuration): Promise> { + return this.api.queryRangeWithHttpInfo(param.owner, param.slug, param.body, options).toPromise(); + } + + /** + * The easiest way to build query is through UI, you could first create an insight chart, and then **Export as cURL**. ![screenshot](https://raw.githubusercontent.com/sentioxyz/docs/main/.gitbook/assets/image%20(101).png) + * Metric range queries + * @param param the request object + */ + public queryRange(param: DataApiQueryRangeRequest, options?: Configuration): Promise { + return this.api.queryRange(param.owner, param.slug, param.body, options).toPromise(); + } + + /** + * Query for retention. + * Retention query + * @param param the request object + */ + public retentionWithHttpInfo(param: DataApiRetentionRequest, options?: Configuration): Promise> { + return this.api.retentionWithHttpInfo(param.owner, param.slug, param.body, options).toPromise(); + } + + /** + * Query for retention. + * Retention query + * @param param the request object + */ + public retention(param: DataApiRetentionRequest, options?: Configuration): Promise { + return this.api.retention(param.owner, param.slug, param.body, options).toPromise(); + } + + /** + * Query for retention. + * Retention query + * @param param the request object + */ + public retention2WithHttpInfo(param: DataApiRetention2Request, options?: Configuration): Promise> { + return this.api.retention2WithHttpInfo(param.body, options).toPromise(); + } + + /** + * Query for retention. + * Retention query + * @param param the request object + */ + public retention2(param: DataApiRetention2Request, options?: Configuration): Promise { + return this.api.retention2(param.body, options).toPromise(); + } + +} + +import { ObservableDebugAndSimulationApi } from "./ObservableAPI.js"; +import { DebugAndSimulationApiRequestFactory, DebugAndSimulationApiResponseProcessor} from "../apis/DebugAndSimulationApi.js"; + +export interface DebugAndSimulationApiGetCallTraceByBundleRequest { + /** + * + * Defaults to: undefined + * @type string + * @memberof DebugAndSimulationApigetCallTraceByBundle + */ + owner: string + /** + * + * Defaults to: undefined + * @type string + * @memberof DebugAndSimulationApigetCallTraceByBundle + */ + slug: string + /** + * + * Defaults to: undefined + * @type string + * @memberof DebugAndSimulationApigetCallTraceByBundle + */ + chainId: string + /** + * + * Defaults to: undefined + * @type string + * @memberof DebugAndSimulationApigetCallTraceByBundle + */ + bundleId: string + /** + * Fetch the decoded trace, which will give you the function info, decoded parameters of both external and internal call trace. + * Defaults to: undefined + * @type boolean + * @memberof DebugAndSimulationApigetCallTraceByBundle + */ + withInternalCalls?: boolean + /** + * Disable optimizations to make internal calls more accurate, but gas costs will differ from the actual execution. + * Defaults to: undefined + * @type boolean + * @memberof DebugAndSimulationApigetCallTraceByBundle + */ + disableOptimizer?: boolean + /** + * Only effective when disableOptimizer=true. + * Defaults to: undefined + * @type boolean + * @memberof DebugAndSimulationApigetCallTraceByBundle + */ + ignoreGasCost?: boolean +} + +export interface DebugAndSimulationApiGetCallTraceBySimulationRequest { + /** + * + * Defaults to: undefined + * @type string + * @memberof DebugAndSimulationApigetCallTraceBySimulation + */ + owner: string + /** + * + * Defaults to: undefined + * @type string + * @memberof DebugAndSimulationApigetCallTraceBySimulation + */ + slug: string + /** + * + * Defaults to: undefined + * @type string + * @memberof DebugAndSimulationApigetCallTraceBySimulation + */ + chainId: string + /** + * + * Defaults to: undefined + * @type string + * @memberof DebugAndSimulationApigetCallTraceBySimulation + */ + simulationId: string + /** + * Fetch the decoded trace, which will give you the function info, decoded parameters of both external and internal call trace. + * Defaults to: undefined + * @type boolean + * @memberof DebugAndSimulationApigetCallTraceBySimulation + */ + withInternalCalls?: boolean + /** + * Disable optimizations to make internal calls more accurate, but gas costs will differ from the actual execution. + * Defaults to: undefined + * @type boolean + * @memberof DebugAndSimulationApigetCallTraceBySimulation + */ + disableOptimizer?: boolean + /** + * Only effective when disableOptimizer=true. + * Defaults to: undefined + * @type boolean + * @memberof DebugAndSimulationApigetCallTraceBySimulation + */ + ignoreGasCost?: boolean +} + +export interface DebugAndSimulationApiGetCallTraceByTransactionRequest { + /** + * + * Defaults to: undefined + * @type string + * @memberof DebugAndSimulationApigetCallTraceByTransaction + */ + owner: string + /** + * + * Defaults to: undefined + * @type string + * @memberof DebugAndSimulationApigetCallTraceByTransaction + */ + slug: string + /** + * + * Defaults to: undefined + * @type string + * @memberof DebugAndSimulationApigetCallTraceByTransaction + */ + chainId: string + /** + * + * Defaults to: undefined + * @type string + * @memberof DebugAndSimulationApigetCallTraceByTransaction + */ + txHash: string + /** + * Fetch the decoded trace, which will give you the function info, decoded parameters of both external and internal call trace. + * Defaults to: undefined + * @type boolean + * @memberof DebugAndSimulationApigetCallTraceByTransaction + */ + withInternalCalls?: boolean + /** + * Disable optimizations to make internal calls more accurate, but gas costs will differ from the actual execution. + * Defaults to: undefined + * @type boolean + * @memberof DebugAndSimulationApigetCallTraceByTransaction + */ + disableOptimizer?: boolean + /** + * Only effective when disableOptimizer=true. + * Defaults to: undefined + * @type boolean + * @memberof DebugAndSimulationApigetCallTraceByTransaction + */ + ignoreGasCost?: boolean +} + +export interface DebugAndSimulationApiGetSimulationRequest { + /** + * + * Defaults to: undefined + * @type string + * @memberof DebugAndSimulationApigetSimulation + */ + owner: string + /** + * + * Defaults to: undefined + * @type string + * @memberof DebugAndSimulationApigetSimulation + */ + slug: string + /** + * + * Defaults to: undefined + * @type string + * @memberof DebugAndSimulationApigetSimulation + */ + simulationId: string +} + +export interface DebugAndSimulationApiGetSimulationBundleInProjectRequest { + /** + * + * Defaults to: undefined + * @type string + * @memberof DebugAndSimulationApigetSimulationBundleInProject + */ + owner: string + /** + * + * Defaults to: undefined + * @type string + * @memberof DebugAndSimulationApigetSimulationBundleInProject + */ + slug: string + /** + * + * Defaults to: undefined + * @type string + * @memberof DebugAndSimulationApigetSimulationBundleInProject + */ + bundleId: string +} + +export interface DebugAndSimulationApiGetSimulationsRequest { + /** + * + * Defaults to: undefined + * @type string + * @memberof DebugAndSimulationApigetSimulations + */ + owner: string + /** + * + * Defaults to: undefined + * @type string + * @memberof DebugAndSimulationApigetSimulations + */ + slug: string + /** + * + * Defaults to: undefined + * @type string + * @memberof DebugAndSimulationApigetSimulations + */ + labelContains?: string + /** + * + * Defaults to: undefined + * @type number + * @memberof DebugAndSimulationApigetSimulations + */ + page?: number + /** + * + * Defaults to: undefined + * @type number + * @memberof DebugAndSimulationApigetSimulations + */ + pageSize?: number +} + +export interface DebugAndSimulationApiSearchTransactionsRequest { + /** + * + * Defaults to: undefined + * @type string + * @memberof DebugAndSimulationApisearchTransactions + */ + owner: string + /** + * + * Defaults to: undefined + * @type string + * @memberof DebugAndSimulationApisearchTransactions + */ + slug: string + /** + * + * Defaults to: undefined + * @type Array<string> + * @memberof DebugAndSimulationApisearchTransactions + */ + chainId?: Array + /** + * + * Defaults to: undefined + * @type Array<string> + * @memberof DebugAndSimulationApisearchTransactions + */ + address?: Array + /** + * + * Defaults to: undefined + * @type boolean + * @memberof DebugAndSimulationApisearchTransactions + */ + includeDirect?: boolean + /** + * + * Defaults to: undefined + * @type boolean + * @memberof DebugAndSimulationApisearchTransactions + */ + includeTrace?: boolean + /** + * + * Defaults to: undefined + * @type boolean + * @memberof DebugAndSimulationApisearchTransactions + */ + includeIn?: boolean + /** + * + * Defaults to: undefined + * @type boolean + * @memberof DebugAndSimulationApisearchTransactions + */ + includeOut?: boolean + /** + * + * Defaults to: undefined + * @type string + * @memberof DebugAndSimulationApisearchTransactions + */ + startBlock?: string + /** + * + * Defaults to: undefined + * @type string + * @memberof DebugAndSimulationApisearchTransactions + */ + endBlock?: string + /** + * + * Defaults to: undefined + * @type string + * @memberof DebugAndSimulationApisearchTransactions + */ + startTimestamp?: string + /** + * + * Defaults to: undefined + * @type string + * @memberof DebugAndSimulationApisearchTransactions + */ + endTimestamp?: string + /** + * + * Defaults to: undefined + * @type Array<number> + * @memberof DebugAndSimulationApisearchTransactions + */ + transactionStatus?: Array + /** + * + * Defaults to: undefined + * @type string + * @memberof DebugAndSimulationApisearchTransactions + */ + methodSignature?: string + /** + * + * Defaults to: undefined + * @type number + * @memberof DebugAndSimulationApisearchTransactions + */ + limit?: number + /** + * + * Defaults to: undefined + * @type string + * @memberof DebugAndSimulationApisearchTransactions + */ + pageToken?: string +} + +export interface DebugAndSimulationApiSimulateTransactionRequest { + /** + * + * Defaults to: undefined + * @type string + * @memberof DebugAndSimulationApisimulateTransaction + */ + owner: string + /** + * + * Defaults to: undefined + * @type string + * @memberof DebugAndSimulationApisimulateTransaction + */ + slug: string + /** + * + * Defaults to: undefined + * @type string + * @memberof DebugAndSimulationApisimulateTransaction + */ + chainId: string + /** + * + * @type SolidityServiceSolidityAPIServiceSimulateTransactionBody + * @memberof DebugAndSimulationApisimulateTransaction + */ + body: SolidityServiceSolidityAPIServiceSimulateTransactionBody +} + +export interface DebugAndSimulationApiSimulateTransactionBundleRequest { + /** + * + * Defaults to: undefined + * @type string + * @memberof DebugAndSimulationApisimulateTransactionBundle + */ + owner: string + /** + * + * Defaults to: undefined + * @type string + * @memberof DebugAndSimulationApisimulateTransactionBundle + */ + slug: string + /** + * + * Defaults to: undefined + * @type string + * @memberof DebugAndSimulationApisimulateTransactionBundle + */ + chainId: string + /** + * + * @type SolidityServiceSolidityAPIServiceSimulateTransactionBundleBody + * @memberof DebugAndSimulationApisimulateTransactionBundle + */ + body: SolidityServiceSolidityAPIServiceSimulateTransactionBundleBody +} + +export class ObjectDebugAndSimulationApi { + private api: ObservableDebugAndSimulationApi + + public constructor(configuration: Configuration, requestFactory?: DebugAndSimulationApiRequestFactory, responseProcessor?: DebugAndSimulationApiResponseProcessor) { + this.api = new ObservableDebugAndSimulationApi(configuration, requestFactory, responseProcessor); + } + + /** + * Get trace by bundle simulation + * @param param the request object + */ + public getCallTraceByBundleWithHttpInfo(param: DebugAndSimulationApiGetCallTraceByBundleRequest, options?: Configuration): Promise> { + return this.api.getCallTraceByBundleWithHttpInfo(param.owner, param.slug, param.chainId, param.bundleId, param.withInternalCalls, param.disableOptimizer, param.ignoreGasCost, options).toPromise(); + } + + /** + * Get trace by bundle simulation + * @param param the request object + */ + public getCallTraceByBundle(param: DebugAndSimulationApiGetCallTraceByBundleRequest, options?: Configuration): Promise { + return this.api.getCallTraceByBundle(param.owner, param.slug, param.chainId, param.bundleId, param.withInternalCalls, param.disableOptimizer, param.ignoreGasCost, options).toPromise(); + } + + /** + * Get trace by simulation + * @param param the request object + */ + public getCallTraceBySimulationWithHttpInfo(param: DebugAndSimulationApiGetCallTraceBySimulationRequest, options?: Configuration): Promise> { + return this.api.getCallTraceBySimulationWithHttpInfo(param.owner, param.slug, param.chainId, param.simulationId, param.withInternalCalls, param.disableOptimizer, param.ignoreGasCost, options).toPromise(); + } + + /** + * Get trace by simulation + * @param param the request object + */ + public getCallTraceBySimulation(param: DebugAndSimulationApiGetCallTraceBySimulationRequest, options?: Configuration): Promise { + return this.api.getCallTraceBySimulation(param.owner, param.slug, param.chainId, param.simulationId, param.withInternalCalls, param.disableOptimizer, param.ignoreGasCost, options).toPromise(); + } + + /** + * API to get Sentio call trace. It takes `txId.txHash` and `chainSpec.chainId` arguments, where the first is transaction hash, and the second is the numeric ethereum chain ID. The results looks very similar to the normal [Ethereum call trace](https://raw.githubusercontent.com/sentioxyz/docs/main/.gitbook/assets/image%20(2)%20(1)%20(1)%20(1).png). But we have an additional `startIndex` and `startIndex` on each trace entry even for the LOG, representing the execution order in the trace. This allows you to build chart that marks the order of fund flow. ![screenshot](https://raw.githubusercontent.com/sentioxyz/docs/main/.gitbook/assets/image%20(2)%20(1)%20(1)%20(1).png) + * Get trace by transaction + * @param param the request object + */ + public getCallTraceByTransactionWithHttpInfo(param: DebugAndSimulationApiGetCallTraceByTransactionRequest, options?: Configuration): Promise> { + return this.api.getCallTraceByTransactionWithHttpInfo(param.owner, param.slug, param.chainId, param.txHash, param.withInternalCalls, param.disableOptimizer, param.ignoreGasCost, options).toPromise(); + } + + /** + * API to get Sentio call trace. It takes `txId.txHash` and `chainSpec.chainId` arguments, where the first is transaction hash, and the second is the numeric ethereum chain ID. The results looks very similar to the normal [Ethereum call trace](https://raw.githubusercontent.com/sentioxyz/docs/main/.gitbook/assets/image%20(2)%20(1)%20(1)%20(1).png). But we have an additional `startIndex` and `startIndex` on each trace entry even for the LOG, representing the execution order in the trace. This allows you to build chart that marks the order of fund flow. ![screenshot](https://raw.githubusercontent.com/sentioxyz/docs/main/.gitbook/assets/image%20(2)%20(1)%20(1)%20(1).png) + * Get trace by transaction + * @param param the request object + */ + public getCallTraceByTransaction(param: DebugAndSimulationApiGetCallTraceByTransactionRequest, options?: Configuration): Promise { + return this.api.getCallTraceByTransaction(param.owner, param.slug, param.chainId, param.txHash, param.withInternalCalls, param.disableOptimizer, param.ignoreGasCost, options).toPromise(); + } + + /** + * Get simulation by ID + * @param param the request object + */ + public getSimulationWithHttpInfo(param: DebugAndSimulationApiGetSimulationRequest, options?: Configuration): Promise> { + return this.api.getSimulationWithHttpInfo(param.owner, param.slug, param.simulationId, options).toPromise(); + } + + /** + * Get simulation by ID + * @param param the request object + */ + public getSimulation(param: DebugAndSimulationApiGetSimulationRequest, options?: Configuration): Promise { + return this.api.getSimulation(param.owner, param.slug, param.simulationId, options).toPromise(); + } + + /** + * Get bundle simulation by ID + * @param param the request object + */ + public getSimulationBundleInProjectWithHttpInfo(param: DebugAndSimulationApiGetSimulationBundleInProjectRequest, options?: Configuration): Promise> { + return this.api.getSimulationBundleInProjectWithHttpInfo(param.owner, param.slug, param.bundleId, options).toPromise(); + } + + /** + * Get bundle simulation by ID + * @param param the request object + */ + public getSimulationBundleInProject(param: DebugAndSimulationApiGetSimulationBundleInProjectRequest, options?: Configuration): Promise { + return this.api.getSimulationBundleInProject(param.owner, param.slug, param.bundleId, options).toPromise(); + } + + /** + * Get list of simulations + * @param param the request object + */ + public getSimulationsWithHttpInfo(param: DebugAndSimulationApiGetSimulationsRequest, options?: Configuration): Promise> { + return this.api.getSimulationsWithHttpInfo(param.owner, param.slug, param.labelContains, param.page, param.pageSize, options).toPromise(); + } + + /** + * Get list of simulations + * @param param the request object + */ + public getSimulations(param: DebugAndSimulationApiGetSimulationsRequest, options?: Configuration): Promise { + return this.api.getSimulations(param.owner, param.slug, param.labelContains, param.page, param.pageSize, options).toPromise(); + } + + /** + * Search transactions + * @param param the request object + */ + public searchTransactionsWithHttpInfo(param: DebugAndSimulationApiSearchTransactionsRequest, options?: Configuration): Promise> { + return this.api.searchTransactionsWithHttpInfo(param.owner, param.slug, param.chainId, param.address, param.includeDirect, param.includeTrace, param.includeIn, param.includeOut, param.startBlock, param.endBlock, param.startTimestamp, param.endTimestamp, param.transactionStatus, param.methodSignature, param.limit, param.pageToken, options).toPromise(); + } + + /** + * Search transactions + * @param param the request object + */ + public searchTransactions(param: DebugAndSimulationApiSearchTransactionsRequest, options?: Configuration): Promise { + return this.api.searchTransactions(param.owner, param.slug, param.chainId, param.address, param.includeDirect, param.includeTrace, param.includeIn, param.includeOut, param.startBlock, param.endBlock, param.startTimestamp, param.endTimestamp, param.transactionStatus, param.methodSignature, param.limit, param.pageToken, options).toPromise(); + } + + /** + * Create a new transaction simulation. The simulation body should be included in the request body. Your simulations will be saved, and a unique ID for each simulation is included in the response. It will be useful for fetching simulation details. + * Run simulation + * @param param the request object + */ + public simulateTransactionWithHttpInfo(param: DebugAndSimulationApiSimulateTransactionRequest, options?: Configuration): Promise> { + return this.api.simulateTransactionWithHttpInfo(param.owner, param.slug, param.chainId, param.body, options).toPromise(); + } + + /** + * Create a new transaction simulation. The simulation body should be included in the request body. Your simulations will be saved, and a unique ID for each simulation is included in the response. It will be useful for fetching simulation details. + * Run simulation + * @param param the request object + */ + public simulateTransaction(param: DebugAndSimulationApiSimulateTransactionRequest, options?: Configuration): Promise { + return this.api.simulateTransaction(param.owner, param.slug, param.chainId, param.body, options).toPromise(); + } + + /** + * You could also create bundle simulations so that one transaction could be executed one after another. For `blockNumber` `transactionIndex` `networkId` `stateOverrides` and `blockOverrides` fields, only the first simulation takes effect. + * Run bundle simulation + * @param param the request object + */ + public simulateTransactionBundleWithHttpInfo(param: DebugAndSimulationApiSimulateTransactionBundleRequest, options?: Configuration): Promise> { + return this.api.simulateTransactionBundleWithHttpInfo(param.owner, param.slug, param.chainId, param.body, options).toPromise(); + } + + /** + * You could also create bundle simulations so that one transaction could be executed one after another. For `blockNumber` `transactionIndex` `networkId` `stateOverrides` and `blockOverrides` fields, only the first simulation takes effect. + * Run bundle simulation + * @param param the request object + */ + public simulateTransactionBundle(param: DebugAndSimulationApiSimulateTransactionBundleRequest, options?: Configuration): Promise { + return this.api.simulateTransactionBundle(param.owner, param.slug, param.chainId, param.body, options).toPromise(); + } + +} + +import { ObservableForksApi } from "./ObservableAPI.js"; +import { ForksApiRequestFactory, ForksApiResponseProcessor} from "../apis/ForksApi.js"; + +export interface ForksApiCreateForkRequest { + /** + * + * Defaults to: undefined + * @type string + * @memberof ForksApicreateFork + */ + owner: string + /** + * + * Defaults to: undefined + * @type string + * @memberof ForksApicreateFork + */ + slug: string + /** + * + * @type SolidityServiceForkServiceCreateForkBody + * @memberof ForksApicreateFork + */ + body: SolidityServiceForkServiceCreateForkBody +} + +export interface ForksApiDeleteForkRequest { + /** + * + * Defaults to: undefined + * @type string + * @memberof ForksApideleteFork + */ + owner: string + /** + * + * Defaults to: undefined + * @type string + * @memberof ForksApideleteFork + */ + slug: string + /** + * + * Defaults to: undefined + * @type string + * @memberof ForksApideleteFork + */ + id: string +} + +export interface ForksApiGetCallTraceOnForkBundleRequest { + /** + * + * Defaults to: undefined + * @type string + * @memberof ForksApigetCallTraceOnForkBundle + */ + owner: string + /** + * + * Defaults to: undefined + * @type string + * @memberof ForksApigetCallTraceOnForkBundle + */ + slug: string + /** + * + * Defaults to: undefined + * @type string + * @memberof ForksApigetCallTraceOnForkBundle + */ + forkId: string + /** + * + * Defaults to: undefined + * @type string + * @memberof ForksApigetCallTraceOnForkBundle + */ + bundleId: string + /** + * Fetch the decoded trace, which will give you the function info, decoded parameters of both external and internal call trace. + * Defaults to: undefined + * @type boolean + * @memberof ForksApigetCallTraceOnForkBundle + */ + withInternalCalls?: boolean + /** + * Disable optimizations to make internal calls more accurate, but gas costs will differ from the actual execution. + * Defaults to: undefined + * @type boolean + * @memberof ForksApigetCallTraceOnForkBundle + */ + disableOptimizer?: boolean + /** + * Only effective when disableOptimizer=true. + * Defaults to: undefined + * @type boolean + * @memberof ForksApigetCallTraceOnForkBundle + */ + ignoreGasCost?: boolean +} + +export interface ForksApiGetCallTraceOnForkSimulationRequest { + /** + * + * Defaults to: undefined + * @type string + * @memberof ForksApigetCallTraceOnForkSimulation + */ + owner: string + /** + * + * Defaults to: undefined + * @type string + * @memberof ForksApigetCallTraceOnForkSimulation + */ + slug: string + /** + * + * Defaults to: undefined + * @type string + * @memberof ForksApigetCallTraceOnForkSimulation + */ + forkId: string + /** + * + * Defaults to: undefined + * @type string + * @memberof ForksApigetCallTraceOnForkSimulation + */ + simulationId: string + /** + * Fetch the decoded trace, which will give you the function info, decoded parameters of both external and internal call trace. + * Defaults to: undefined + * @type boolean + * @memberof ForksApigetCallTraceOnForkSimulation + */ + withInternalCalls?: boolean + /** + * Disable optimizations to make internal calls more accurate, but gas costs will differ from the actual execution. + * Defaults to: undefined + * @type boolean + * @memberof ForksApigetCallTraceOnForkSimulation + */ + disableOptimizer?: boolean + /** + * Only effective when disableOptimizer=true. + * Defaults to: undefined + * @type boolean + * @memberof ForksApigetCallTraceOnForkSimulation + */ + ignoreGasCost?: boolean +} + +export interface ForksApiGetCallTraceOnForkTransactionRequest { + /** + * + * Defaults to: undefined + * @type string + * @memberof ForksApigetCallTraceOnForkTransaction + */ + owner: string + /** + * + * Defaults to: undefined + * @type string + * @memberof ForksApigetCallTraceOnForkTransaction + */ + slug: string + /** + * + * Defaults to: undefined + * @type string + * @memberof ForksApigetCallTraceOnForkTransaction + */ + forkId: string + /** + * + * Defaults to: undefined + * @type string + * @memberof ForksApigetCallTraceOnForkTransaction + */ + txHash: string + /** + * Fetch the decoded trace, which will give you the function info, decoded parameters of both external and internal call trace. + * Defaults to: undefined + * @type boolean + * @memberof ForksApigetCallTraceOnForkTransaction + */ + withInternalCalls?: boolean + /** + * Disable optimizations to make internal calls more accurate, but gas costs will differ from the actual execution. + * Defaults to: undefined + * @type boolean + * @memberof ForksApigetCallTraceOnForkTransaction + */ + disableOptimizer?: boolean + /** + * Only effective when disableOptimizer=true. + * Defaults to: undefined + * @type boolean + * @memberof ForksApigetCallTraceOnForkTransaction + */ + ignoreGasCost?: boolean +} + +export interface ForksApiGetForkRequest { + /** + * + * Defaults to: undefined + * @type string + * @memberof ForksApigetFork + */ + owner: string + /** + * + * Defaults to: undefined + * @type string + * @memberof ForksApigetFork + */ + slug: string + /** + * + * Defaults to: undefined + * @type string + * @memberof ForksApigetFork + */ + id: string +} + +export interface ForksApiGetForkInfoRequest { + /** + * + * Defaults to: undefined + * @type string + * @memberof ForksApigetForkInfo + */ + owner: string + /** + * + * Defaults to: undefined + * @type string + * @memberof ForksApigetForkInfo + */ + slug: string + /** + * + * Defaults to: undefined + * @type string + * @memberof ForksApigetForkInfo + */ + id: string +} + +export interface ForksApiListForksRequest { + /** + * + * Defaults to: undefined + * @type string + * @memberof ForksApilistForks + */ + owner: string + /** + * + * Defaults to: undefined + * @type string + * @memberof ForksApilistForks + */ + slug: string +} + +export interface ForksApiSimulateTransactionBundleOnForkRequest { + /** + * + * Defaults to: undefined + * @type string + * @memberof ForksApisimulateTransactionBundleOnFork + */ + owner: string + /** + * + * Defaults to: undefined + * @type string + * @memberof ForksApisimulateTransactionBundleOnFork + */ + slug: string + /** + * + * Defaults to: undefined + * @type string + * @memberof ForksApisimulateTransactionBundleOnFork + */ + forkId: string + /** + * + * @type SolidityServiceSolidityAPIServiceSimulateTransactionBundleOnForkBody + * @memberof ForksApisimulateTransactionBundleOnFork + */ + body: SolidityServiceSolidityAPIServiceSimulateTransactionBundleOnForkBody +} + +export interface ForksApiSimulateTransactionOnForkRequest { + /** + * + * Defaults to: undefined + * @type string + * @memberof ForksApisimulateTransactionOnFork + */ + owner: string + /** + * + * Defaults to: undefined + * @type string + * @memberof ForksApisimulateTransactionOnFork + */ + slug: string + /** + * + * Defaults to: undefined + * @type string + * @memberof ForksApisimulateTransactionOnFork + */ + forkId: string + /** + * + * @type SolidityServiceSolidityAPIServiceSimulateTransactionOnForkBody + * @memberof ForksApisimulateTransactionOnFork + */ + body: SolidityServiceSolidityAPIServiceSimulateTransactionOnForkBody +} + +export interface ForksApiUpdateForkRequest { + /** + * + * Defaults to: undefined + * @type string + * @memberof ForksApiupdateFork + */ + owner: string + /** + * + * Defaults to: undefined + * @type string + * @memberof ForksApiupdateFork + */ + slug: string + /** + * + * Defaults to: undefined + * @type string + * @memberof ForksApiupdateFork + */ + id: string + /** + * + * @type SolidityServiceForkServiceUpdateForkBody + * @memberof ForksApiupdateFork + */ + body: SolidityServiceForkServiceUpdateForkBody +} + +export class ObjectForksApi { + private api: ObservableForksApi + + public constructor(configuration: Configuration, requestFactory?: ForksApiRequestFactory, responseProcessor?: ForksApiResponseProcessor) { + this.api = new ObservableForksApi(configuration, requestFactory, responseProcessor); + } + + /** + * Create a fork + * @param param the request object + */ + public createForkWithHttpInfo(param: ForksApiCreateForkRequest, options?: Configuration): Promise> { + return this.api.createForkWithHttpInfo(param.owner, param.slug, param.body, options).toPromise(); + } + + /** + * Create a fork + * @param param the request object + */ + public createFork(param: ForksApiCreateForkRequest, options?: Configuration): Promise { + return this.api.createFork(param.owner, param.slug, param.body, options).toPromise(); + } + + /** + * Delete fork by id + * @param param the request object + */ + public deleteForkWithHttpInfo(param: ForksApiDeleteForkRequest, options?: Configuration): Promise> { + return this.api.deleteForkWithHttpInfo(param.owner, param.slug, param.id, options).toPromise(); + } + + /** + * Delete fork by id + * @param param the request object + */ + public deleteFork(param: ForksApiDeleteForkRequest, options?: Configuration): Promise { + return this.api.deleteFork(param.owner, param.slug, param.id, options).toPromise(); + } + + /** + * Get trace by bundle simulation + * @param param the request object + */ + public getCallTraceOnForkBundleWithHttpInfo(param: ForksApiGetCallTraceOnForkBundleRequest, options?: Configuration): Promise> { + return this.api.getCallTraceOnForkBundleWithHttpInfo(param.owner, param.slug, param.forkId, param.bundleId, param.withInternalCalls, param.disableOptimizer, param.ignoreGasCost, options).toPromise(); + } + + /** + * Get trace by bundle simulation + * @param param the request object + */ + public getCallTraceOnForkBundle(param: ForksApiGetCallTraceOnForkBundleRequest, options?: Configuration): Promise { + return this.api.getCallTraceOnForkBundle(param.owner, param.slug, param.forkId, param.bundleId, param.withInternalCalls, param.disableOptimizer, param.ignoreGasCost, options).toPromise(); + } + + /** + * Get trace by simulation + * @param param the request object + */ + public getCallTraceOnForkSimulationWithHttpInfo(param: ForksApiGetCallTraceOnForkSimulationRequest, options?: Configuration): Promise> { + return this.api.getCallTraceOnForkSimulationWithHttpInfo(param.owner, param.slug, param.forkId, param.simulationId, param.withInternalCalls, param.disableOptimizer, param.ignoreGasCost, options).toPromise(); + } + + /** + * Get trace by simulation + * @param param the request object + */ + public getCallTraceOnForkSimulation(param: ForksApiGetCallTraceOnForkSimulationRequest, options?: Configuration): Promise { + return this.api.getCallTraceOnForkSimulation(param.owner, param.slug, param.forkId, param.simulationId, param.withInternalCalls, param.disableOptimizer, param.ignoreGasCost, options).toPromise(); + } + + /** + * Get trace by transaction + * @param param the request object + */ + public getCallTraceOnForkTransactionWithHttpInfo(param: ForksApiGetCallTraceOnForkTransactionRequest, options?: Configuration): Promise> { + return this.api.getCallTraceOnForkTransactionWithHttpInfo(param.owner, param.slug, param.forkId, param.txHash, param.withInternalCalls, param.disableOptimizer, param.ignoreGasCost, options).toPromise(); + } + + /** + * Get trace by transaction + * @param param the request object + */ + public getCallTraceOnForkTransaction(param: ForksApiGetCallTraceOnForkTransactionRequest, options?: Configuration): Promise { + return this.api.getCallTraceOnForkTransaction(param.owner, param.slug, param.forkId, param.txHash, param.withInternalCalls, param.disableOptimizer, param.ignoreGasCost, options).toPromise(); + } + + /** + * Get fork by id + * @param param the request object + */ + public getForkWithHttpInfo(param: ForksApiGetForkRequest, options?: Configuration): Promise> { + return this.api.getForkWithHttpInfo(param.owner, param.slug, param.id, options).toPromise(); + } + + /** + * Get fork by id + * @param param the request object + */ + public getFork(param: ForksApiGetForkRequest, options?: Configuration): Promise { + return this.api.getFork(param.owner, param.slug, param.id, options).toPromise(); + } + + /** + * Get fork info by id + * @param param the request object + */ + public getForkInfoWithHttpInfo(param: ForksApiGetForkInfoRequest, options?: Configuration): Promise> { + return this.api.getForkInfoWithHttpInfo(param.owner, param.slug, param.id, options).toPromise(); + } + + /** + * Get fork info by id + * @param param the request object + */ + public getForkInfo(param: ForksApiGetForkInfoRequest, options?: Configuration): Promise { + return this.api.getForkInfo(param.owner, param.slug, param.id, options).toPromise(); + } + + /** + * List all forks + * @param param the request object + */ + public listForksWithHttpInfo(param: ForksApiListForksRequest, options?: Configuration): Promise> { + return this.api.listForksWithHttpInfo(param.owner, param.slug, options).toPromise(); + } + + /** + * List all forks + * @param param the request object + */ + public listForks(param: ForksApiListForksRequest, options?: Configuration): Promise { + return this.api.listForks(param.owner, param.slug, options).toPromise(); + } + + /** + * Run bundle simulation + * @param param the request object + */ + public simulateTransactionBundleOnForkWithHttpInfo(param: ForksApiSimulateTransactionBundleOnForkRequest, options?: Configuration): Promise> { + return this.api.simulateTransactionBundleOnForkWithHttpInfo(param.owner, param.slug, param.forkId, param.body, options).toPromise(); + } + + /** + * Run bundle simulation + * @param param the request object + */ + public simulateTransactionBundleOnFork(param: ForksApiSimulateTransactionBundleOnForkRequest, options?: Configuration): Promise { + return this.api.simulateTransactionBundleOnFork(param.owner, param.slug, param.forkId, param.body, options).toPromise(); + } + + /** + * Run Simulation + * @param param the request object + */ + public simulateTransactionOnForkWithHttpInfo(param: ForksApiSimulateTransactionOnForkRequest, options?: Configuration): Promise> { + return this.api.simulateTransactionOnForkWithHttpInfo(param.owner, param.slug, param.forkId, param.body, options).toPromise(); + } + + /** + * Run Simulation + * @param param the request object + */ + public simulateTransactionOnFork(param: ForksApiSimulateTransactionOnForkRequest, options?: Configuration): Promise { + return this.api.simulateTransactionOnFork(param.owner, param.slug, param.forkId, param.body, options).toPromise(); + } + + /** + * Update fork by id + * @param param the request object + */ + public updateForkWithHttpInfo(param: ForksApiUpdateForkRequest, options?: Configuration): Promise> { + return this.api.updateForkWithHttpInfo(param.owner, param.slug, param.id, param.body, options).toPromise(); + } + + /** + * Update fork by id + * @param param the request object + */ + public updateFork(param: ForksApiUpdateForkRequest, options?: Configuration): Promise { + return this.api.updateFork(param.owner, param.slug, param.id, param.body, options).toPromise(); + } + +} + +import { ObservablePriceApi } from "./ObservableAPI.js"; +import { PriceApiRequestFactory, PriceApiResponseProcessor} from "../apis/PriceApi.js"; + +export interface PriceApiBatchGetPricesRequest { + /** + * + * @type PriceServiceBatchGetPricesRequest + * @memberof PriceApibatchGetPrices + */ + body: PriceServiceBatchGetPricesRequest +} + +export interface PriceApiCheckLatestPriceRequest { +} + +export interface PriceApiGetPriceRequest { + /** + * The timestamp we request the price at. Note, the price service may not have the price at the exact timestamp, in which case it will return the price at the closest timestamp. + * Defaults to: undefined + * @type Date + * @memberof PriceApigetPrice + */ + timestamp?: Date + /** + * + * Defaults to: undefined + * @type string + * @memberof PriceApigetPrice + */ + coinIdSymbol?: string + /** + * + * Defaults to: undefined + * @type string + * @memberof PriceApigetPrice + */ + coinIdAddressAddress?: string + /** + * + * Defaults to: undefined + * @type string + * @memberof PriceApigetPrice + */ + coinIdAddressChain?: string + /** + * + * Defaults to: undefined + * @type string + * @memberof PriceApigetPrice + */ + source?: string +} + +export interface PriceApiPriceListCoinsRequest { + /** + * + * Defaults to: undefined + * @type number + * @memberof PriceApipriceListCoins + */ + limit?: number + /** + * + * Defaults to: undefined + * @type number + * @memberof PriceApipriceListCoins + */ + offset?: number + /** + * + * Defaults to: undefined + * @type string + * @memberof PriceApipriceListCoins + */ + searchQuery?: string + /** + * + * Defaults to: undefined + * @type string + * @memberof PriceApipriceListCoins + */ + chain?: string +} + +export class ObjectPriceApi { + private api: ObservablePriceApi + + public constructor(configuration: Configuration, requestFactory?: PriceApiRequestFactory, responseProcessor?: PriceApiResponseProcessor) { + this.api = new ObservablePriceApi(configuration, requestFactory, responseProcessor); + } + + /** + * Batch get prices + * @param param the request object + */ + public batchGetPricesWithHttpInfo(param: PriceApiBatchGetPricesRequest, options?: Configuration): Promise> { + return this.api.batchGetPricesWithHttpInfo(param.body, options).toPromise(); + } + + /** + * Batch get prices + * @param param the request object + */ + public batchGetPrices(param: PriceApiBatchGetPricesRequest, options?: Configuration): Promise { + return this.api.batchGetPrices(param.body, options).toPromise(); + } + + /** + * Check latest price + * @param param the request object + */ + public checkLatestPriceWithHttpInfo(param: PriceApiCheckLatestPriceRequest = {}, options?: Configuration): Promise> { + return this.api.checkLatestPriceWithHttpInfo( options).toPromise(); + } + + /** + * Check latest price + * @param param the request object + */ + public checkLatestPrice(param: PriceApiCheckLatestPriceRequest = {}, options?: Configuration): Promise { + return this.api.checkLatestPrice( options).toPromise(); + } + + /** + * GetPrice returns the price of a given coin identifier, in a best effort way. If we do not have any price data for the given coin, we will return NOT_FOUND error. If we have at least one price data for the given coin, we will return it with the actual timestamp. Client is responsible for checking the timestamp and decide whether to use the price or not. + * Get price + * @param param the request object + */ + public getPriceWithHttpInfo(param: PriceApiGetPriceRequest = {}, options?: Configuration): Promise> { + return this.api.getPriceWithHttpInfo(param.timestamp, param.coinIdSymbol, param.coinIdAddressAddress, param.coinIdAddressChain, param.source, options).toPromise(); + } + + /** + * GetPrice returns the price of a given coin identifier, in a best effort way. If we do not have any price data for the given coin, we will return NOT_FOUND error. If we have at least one price data for the given coin, we will return it with the actual timestamp. Client is responsible for checking the timestamp and decide whether to use the price or not. + * Get price + * @param param the request object + */ + public getPrice(param: PriceApiGetPriceRequest = {}, options?: Configuration): Promise { + return this.api.getPrice(param.timestamp, param.coinIdSymbol, param.coinIdAddressAddress, param.coinIdAddressChain, param.source, options).toPromise(); + } + + /** + * List coins + * @param param the request object + */ + public priceListCoinsWithHttpInfo(param: PriceApiPriceListCoinsRequest = {}, options?: Configuration): Promise> { + return this.api.priceListCoinsWithHttpInfo(param.limit, param.offset, param.searchQuery, param.chain, options).toPromise(); + } + + /** + * List coins + * @param param the request object + */ + public priceListCoins(param: PriceApiPriceListCoinsRequest = {}, options?: Configuration): Promise { + return this.api.priceListCoins(param.limit, param.offset, param.searchQuery, param.chain, options).toPromise(); + } + +} + +import { ObservableWebApi } from "./ObservableAPI.js"; +import { WebApiRequestFactory, WebApiResponseProcessor} from "../apis/WebApi.js"; + +export interface WebApiDeleteDashboardRequest { + /** + * filter the dashboard by id + * Defaults to: undefined + * @type string + * @memberof WebApideleteDashboard + */ + dashboardId: string + /** + * filter the dashboard by project id + * Defaults to: undefined + * @type string + * @memberof WebApideleteDashboard + */ + projectId?: string + /** + * username or organization name + * Defaults to: undefined + * @type string + * @memberof WebApideleteDashboard + */ + ownerName?: string + /** + * project slug + * Defaults to: undefined + * @type string + * @memberof WebApideleteDashboard + */ + slug?: string +} + +export interface WebApiExportDashboardRequest { + /** + * + * Defaults to: undefined + * @type string + * @memberof WebApiexportDashboard + */ + dashboardId: string +} + +export interface WebApiGetDashboardRequest { + /** + * filter the dashboard by id + * Defaults to: undefined + * @type string + * @memberof WebApigetDashboard + */ + dashboardId: string + /** + * filter the dashboard by project id + * Defaults to: undefined + * @type string + * @memberof WebApigetDashboard + */ + projectId?: string + /** + * username or organization name + * Defaults to: undefined + * @type string + * @memberof WebApigetDashboard + */ + ownerName?: string + /** + * project slug + * Defaults to: undefined + * @type string + * @memberof WebApigetDashboard + */ + slug?: string +} + +export interface WebApiGetDashboard2Request { + /** + * username or organization name + * Defaults to: undefined + * @type string + * @memberof WebApigetDashboard2 + */ + owner: string + /** + * project slug + * Defaults to: undefined + * @type string + * @memberof WebApigetDashboard2 + */ + slug: string + /** + * filter the dashboard by id + * Defaults to: undefined + * @type string + * @memberof WebApigetDashboard2 + */ + dashboardId: string + /** + * filter the dashboard by project id + * Defaults to: undefined + * @type string + * @memberof WebApigetDashboard2 + */ + projectId?: string +} + +export interface WebApiGetProjectRequest { + /** + * username or organization name + * Defaults to: undefined + * @type string + * @memberof WebApigetProject + */ + owner: string + /** + * project slug + * Defaults to: undefined + * @type string + * @memberof WebApigetProject + */ + slug: string +} + +export interface WebApiGetProjectListRequest { + /** + * + * Defaults to: undefined + * @type string + * @memberof WebApigetProjectList + */ + userId?: string + /** + * + * Defaults to: undefined + * @type string + * @memberof WebApigetProjectList + */ + organizationId?: string +} + +export interface WebApiImportDashboardRequest { + /** + * + * @type WebServiceImportDashboardRequest + * @memberof WebApiimportDashboard + */ + body: WebServiceImportDashboardRequest +} + +export interface WebApiListDashboardsRequest { + /** + * filter the dashboard by id + * Defaults to: undefined + * @type string + * @memberof WebApilistDashboards + */ + dashboardId?: string + /** + * filter the dashboard by project id + * Defaults to: undefined + * @type string + * @memberof WebApilistDashboards + */ + projectId?: string + /** + * username or organization name + * Defaults to: undefined + * @type string + * @memberof WebApilistDashboards + */ + ownerName?: string + /** + * project slug + * Defaults to: undefined + * @type string + * @memberof WebApilistDashboards + */ + slug?: string +} + +export interface WebApiListDashboards2Request { + /** + * username or organization name + * Defaults to: undefined + * @type string + * @memberof WebApilistDashboards2 + */ + owner: string + /** + * project slug + * Defaults to: undefined + * @type string + * @memberof WebApilistDashboards2 + */ + slug: string + /** + * filter the dashboard by id + * Defaults to: undefined + * @type string + * @memberof WebApilistDashboards2 + */ + dashboardId?: string + /** + * filter the dashboard by project id + * Defaults to: undefined + * @type string + * @memberof WebApilistDashboards2 + */ + projectId?: string +} + +export class ObjectWebApi { + private api: ObservableWebApi + + public constructor(configuration: Configuration, requestFactory?: WebApiRequestFactory, responseProcessor?: WebApiResponseProcessor) { + this.api = new ObservableWebApi(configuration, requestFactory, responseProcessor); + } + + /** + * Delete a dashboard by id + * @param param the request object + */ + public deleteDashboardWithHttpInfo(param: WebApiDeleteDashboardRequest, options?: Configuration): Promise> { + return this.api.deleteDashboardWithHttpInfo(param.dashboardId, param.projectId, param.ownerName, param.slug, options).toPromise(); + } + + /** + * Delete a dashboard by id + * @param param the request object + */ + public deleteDashboard(param: WebApiDeleteDashboardRequest, options?: Configuration): Promise { + return this.api.deleteDashboard(param.dashboardId, param.projectId, param.ownerName, param.slug, options).toPromise(); + } + + /** + * Export a dashboard to json + * @param param the request object + */ + public exportDashboardWithHttpInfo(param: WebApiExportDashboardRequest, options?: Configuration): Promise> { + return this.api.exportDashboardWithHttpInfo(param.dashboardId, options).toPromise(); + } + + /** + * Export a dashboard to json + * @param param the request object + */ + public exportDashboard(param: WebApiExportDashboardRequest, options?: Configuration): Promise { + return this.api.exportDashboard(param.dashboardId, options).toPromise(); + } + + /** + * Get a dashboard by id + * @param param the request object + */ + public getDashboardWithHttpInfo(param: WebApiGetDashboardRequest, options?: Configuration): Promise> { + return this.api.getDashboardWithHttpInfo(param.dashboardId, param.projectId, param.ownerName, param.slug, options).toPromise(); + } + + /** + * Get a dashboard by id + * @param param the request object + */ + public getDashboard(param: WebApiGetDashboardRequest, options?: Configuration): Promise { + return this.api.getDashboard(param.dashboardId, param.projectId, param.ownerName, param.slug, options).toPromise(); + } + + /** + * Get a dashboard by id + * @param param the request object + */ + public getDashboard2WithHttpInfo(param: WebApiGetDashboard2Request, options?: Configuration): Promise> { + return this.api.getDashboard2WithHttpInfo(param.owner, param.slug, param.dashboardId, param.projectId, options).toPromise(); + } + + /** + * Get a dashboard by id + * @param param the request object + */ + public getDashboard2(param: WebApiGetDashboard2Request, options?: Configuration): Promise { + return this.api.getDashboard2(param.owner, param.slug, param.dashboardId, param.projectId, options).toPromise(); + } + + /** + * Get project details + * @param param the request object + */ + public getProjectWithHttpInfo(param: WebApiGetProjectRequest, options?: Configuration): Promise> { + return this.api.getProjectWithHttpInfo(param.owner, param.slug, options).toPromise(); + } + + /** + * Get project details + * @param param the request object + */ + public getProject(param: WebApiGetProjectRequest, options?: Configuration): Promise { + return this.api.getProject(param.owner, param.slug, options).toPromise(); + } + + /** + * Get project list + * @param param the request object + */ + public getProjectListWithHttpInfo(param: WebApiGetProjectListRequest = {}, options?: Configuration): Promise> { + return this.api.getProjectListWithHttpInfo(param.userId, param.organizationId, options).toPromise(); + } + + /** + * Get project list + * @param param the request object + */ + public getProjectList(param: WebApiGetProjectListRequest = {}, options?: Configuration): Promise { + return this.api.getProjectList(param.userId, param.organizationId, options).toPromise(); + } + + /** + * Import a dashboard to another dashboard + * @param param the request object + */ + public importDashboardWithHttpInfo(param: WebApiImportDashboardRequest, options?: Configuration): Promise> { + return this.api.importDashboardWithHttpInfo(param.body, options).toPromise(); + } + + /** + * Import a dashboard to another dashboard + * @param param the request object + */ + public importDashboard(param: WebApiImportDashboardRequest, options?: Configuration): Promise { + return this.api.importDashboard(param.body, options).toPromise(); + } + + /** + * List all dashboards in a project + * @param param the request object + */ + public listDashboardsWithHttpInfo(param: WebApiListDashboardsRequest = {}, options?: Configuration): Promise> { + return this.api.listDashboardsWithHttpInfo(param.dashboardId, param.projectId, param.ownerName, param.slug, options).toPromise(); + } + + /** + * List all dashboards in a project + * @param param the request object + */ + public listDashboards(param: WebApiListDashboardsRequest = {}, options?: Configuration): Promise { + return this.api.listDashboards(param.dashboardId, param.projectId, param.ownerName, param.slug, options).toPromise(); + } + + /** + * List all dashboards in a project + * @param param the request object + */ + public listDashboards2WithHttpInfo(param: WebApiListDashboards2Request, options?: Configuration): Promise> { + return this.api.listDashboards2WithHttpInfo(param.owner, param.slug, param.dashboardId, param.projectId, options).toPromise(); + } + + /** + * List all dashboards in a project + * @param param the request object + */ + public listDashboards2(param: WebApiListDashboards2Request, options?: Configuration): Promise { + return this.api.listDashboards2(param.owner, param.slug, param.dashboardId, param.projectId, options).toPromise(); + } + +} diff --git a/src/types/ObservableAPI.ts b/src/types/ObservableAPI.ts new file mode 100755 index 0000000..50ab19f --- /dev/null +++ b/src/types/ObservableAPI.ts @@ -0,0 +1,2013 @@ +import { ResponseContext, RequestContext, HttpFile, HttpInfo } from '../http/http.js'; +import { Configuration} from '../configuration.js' +import { Observable, of, from } from '../rxjsStub.js'; +import {mergeMap, map} from '../rxjsStub.js'; +import { AnalyticServiceAnalyticServiceExecuteSQLBody } from '../models/AnalyticServiceAnalyticServiceExecuteSQLBody.js'; +import { AnalyticServiceLogQueryRequestFilter } from '../models/AnalyticServiceLogQueryRequestFilter.js'; +import { AnalyticServiceLogQueryRequestSort } from '../models/AnalyticServiceLogQueryRequestSort.js'; +import { AnalyticServiceLogQueryResponse } from '../models/AnalyticServiceLogQueryResponse.js'; +import { AnalyticServiceSQLQuery } from '../models/AnalyticServiceSQLQuery.js'; +import { AnalyticServiceSearchServiceQueryLogBody } from '../models/AnalyticServiceSearchServiceQueryLogBody.js'; +import { AnalyticServiceSyncExecuteSQLResponse } from '../models/AnalyticServiceSyncExecuteSQLResponse.js'; +import { CommonAggregate } from '../models/CommonAggregate.js'; +import { CommonAggregateAggregateOps } from '../models/CommonAggregateAggregateOps.js'; +import { CommonAny } from '../models/CommonAny.js'; +import { CommonArgument } from '../models/CommonArgument.js'; +import { CommonBigDecimal } from '../models/CommonBigDecimal.js'; +import { CommonBigInteger } from '../models/CommonBigInteger.js'; +import { CommonCachePolicy } from '../models/CommonCachePolicy.js'; +import { CommonChannel } from '../models/CommonChannel.js'; +import { CommonChannelType } from '../models/CommonChannelType.js'; +import { CommonCohortsFilter } from '../models/CommonCohortsFilter.js'; +import { CommonCohortsFilterAggregation } from '../models/CommonCohortsFilterAggregation.js'; +import { CommonCohortsFilterAggregationAggregateProperties } from '../models/CommonCohortsFilterAggregationAggregateProperties.js'; +import { CommonCohortsFilterAggregationAggregatePropertiesAggregationType } from '../models/CommonCohortsFilterAggregationAggregatePropertiesAggregationType.js'; +import { CommonCohortsFilterAggregationOperatorType } from '../models/CommonCohortsFilterAggregationOperatorType.js'; +import { CommonCohortsGroup } from '../models/CommonCohortsGroup.js'; +import { CommonCohortsQuery } from '../models/CommonCohortsQuery.js'; +import { CommonCoinID } from '../models/CommonCoinID.js'; +import { CommonCoinIDAddressIdentifier } from '../models/CommonCoinIDAddressIdentifier.js'; +import { CommonColumnState } from '../models/CommonColumnState.js'; +import { CommonColumnStateSort } from '../models/CommonColumnStateSort.js'; +import { CommonComputeStats } from '../models/CommonComputeStats.js'; +import { CommonDuration } from '../models/CommonDuration.js'; +import { CommonEventLogColumn } from '../models/CommonEventLogColumn.js'; +import { CommonEventLogConfig } from '../models/CommonEventLogConfig.js'; +import { CommonEventLogEntry } from '../models/CommonEventLogEntry.js'; +import { CommonFormula } from '../models/CommonFormula.js'; +import { CommonFunction } from '../models/CommonFunction.js'; +import { CommonJoinOperator } from '../models/CommonJoinOperator.js'; +import { CommonMatrix } from '../models/CommonMatrix.js'; +import { CommonMatrixMetric } from '../models/CommonMatrixMetric.js'; +import { CommonMatrixSample } from '../models/CommonMatrixSample.js'; +import { CommonMatrixValue } from '../models/CommonMatrixValue.js'; +import { CommonOrganization } from '../models/CommonOrganization.js'; +import { CommonOrganizationMember } from '../models/CommonOrganizationMember.js'; +import { CommonOrganizationRole } from '../models/CommonOrganizationRole.js'; +import { CommonOwner } from '../models/CommonOwner.js'; +import { CommonPermission } from '../models/CommonPermission.js'; +import { CommonPriceSegmentationQuery } from '../models/CommonPriceSegmentationQuery.js'; +import { CommonProject } from '../models/CommonProject.js'; +import { CommonProjectInfo } from '../models/CommonProjectInfo.js'; +import { CommonProjectProjectMember } from '../models/CommonProjectProjectMember.js'; +import { CommonProjectSuperset } from '../models/CommonProjectSuperset.js'; +import { CommonProjectType } from '../models/CommonProjectType.js'; +import { CommonProjectView } from '../models/CommonProjectView.js'; +import { CommonProjectViewProjectViewConfig } from '../models/CommonProjectViewProjectViewConfig.js'; +import { CommonProjectVisibility } from '../models/CommonProjectVisibility.js'; +import { CommonQuery } from '../models/CommonQuery.js'; +import { CommonRetentionMatrix } from '../models/CommonRetentionMatrix.js'; +import { CommonRetentionMatrixSample } from '../models/CommonRetentionMatrixSample.js'; +import { CommonRetentionQuery } from '../models/CommonRetentionQuery.js'; +import { CommonRetentionQueryCriteria } from '../models/CommonRetentionQueryCriteria.js'; +import { CommonRetentionQueryFilter } from '../models/CommonRetentionQueryFilter.js'; +import { CommonRetentionQueryFilterTimeFilter } from '../models/CommonRetentionQueryFilterTimeFilter.js'; +import { CommonRetentionQueryFilterTimeFilterType } from '../models/CommonRetentionQueryFilterTimeFilterType.js'; +import { CommonRetentionQueryInterval } from '../models/CommonRetentionQueryInterval.js'; +import { CommonRetentionQueryIntervalUnit } from '../models/CommonRetentionQueryIntervalUnit.js'; +import { CommonRetentionQueryResource } from '../models/CommonRetentionQueryResource.js'; +import { CommonRichStruct } from '../models/CommonRichStruct.js'; +import { CommonRichValue } from '../models/CommonRichValue.js'; +import { CommonRichValueList } from '../models/CommonRichValueList.js'; +import { CommonRichValueNullValue } from '../models/CommonRichValueNullValue.js'; +import { CommonSegmentParameter } from '../models/CommonSegmentParameter.js'; +import { CommonSegmentationQuery } from '../models/CommonSegmentationQuery.js'; +import { CommonSegmentationQueryAggregation } from '../models/CommonSegmentationQueryAggregation.js'; +import { CommonSegmentationQueryAggregationAggregateProperties } from '../models/CommonSegmentationQueryAggregationAggregateProperties.js'; +import { CommonSegmentationQueryAggregationAggregatePropertiesAggregationType } from '../models/CommonSegmentationQueryAggregationAggregatePropertiesAggregationType.js'; +import { CommonSegmentationQueryAggregationCountUnique } from '../models/CommonSegmentationQueryAggregationCountUnique.js'; +import { CommonSegmentationQueryResource } from '../models/CommonSegmentationQueryResource.js'; +import { CommonSegmentationQueryResourceType } from '../models/CommonSegmentationQueryResourceType.js'; +import { CommonSegmentationQuerySelectorExpr } from '../models/CommonSegmentationQuerySelectorExpr.js'; +import { CommonSegmentationQuerySelectorExprLogicExpr } from '../models/CommonSegmentationQuerySelectorExprLogicExpr.js'; +import { CommonSelector } from '../models/CommonSelector.js'; +import { CommonSelectorExpr } from '../models/CommonSelectorExpr.js'; +import { CommonSelectorExprLogicExpr } from '../models/CommonSelectorExprLogicExpr.js'; +import { CommonSelectorOperatorType } from '../models/CommonSelectorOperatorType.js'; +import { CommonStringList } from '../models/CommonStringList.js'; +import { CommonTabularData } from '../models/CommonTabularData.js'; +import { CommonTabularDataColumnType } from '../models/CommonTabularDataColumnType.js'; +import { CommonTier } from '../models/CommonTier.js'; +import { CommonTimeRange } from '../models/CommonTimeRange.js'; +import { CommonTimeRangeLite } from '../models/CommonTimeRangeLite.js'; +import { CommonTimeRangeRelativeTime } from '../models/CommonTimeRangeRelativeTime.js'; +import { CommonTimeRangeTimeLike } from '../models/CommonTimeRangeTimeLike.js'; +import { CommonUser } from '../models/CommonUser.js'; +import { CommonUserAccountStatus } from '../models/CommonUserAccountStatus.js'; +import { CommonUserInfo } from '../models/CommonUserInfo.js'; +import { EvmAccessListItem } from '../models/EvmAccessListItem.js'; +import { EvmTransaction } from '../models/EvmTransaction.js'; +import { EvmTransactionReceipt } from '../models/EvmTransactionReceipt.js'; +import { GoogleApiHttpBody } from '../models/GoogleApiHttpBody.js'; +import { GoogleProtobufAny } from '../models/GoogleProtobufAny.js'; +import { GoogleProtobufNullValue } from '../models/GoogleProtobufNullValue.js'; +import { InsightsServiceDataSource } from '../models/InsightsServiceDataSource.js'; +import { InsightsServiceInsightsServiceQueryBody } from '../models/InsightsServiceInsightsServiceQueryBody.js'; +import { InsightsServiceInsightsServiceRetentionBody } from '../models/InsightsServiceInsightsServiceRetentionBody.js'; +import { InsightsServiceListCoinsResponse } from '../models/InsightsServiceListCoinsResponse.js'; +import { InsightsServiceQueryRequestQuery } from '../models/InsightsServiceQueryRequestQuery.js'; +import { InsightsServiceQueryResponse } from '../models/InsightsServiceQueryResponse.js'; +import { InsightsServiceQueryResponseResult } from '../models/InsightsServiceQueryResponseResult.js'; +import { InsightsServiceRetentionRequest } from '../models/InsightsServiceRetentionRequest.js'; +import { InsightsServiceRetentionResponse } from '../models/InsightsServiceRetentionResponse.js'; +import { MetricsServiceGetMetricsResponse } from '../models/MetricsServiceGetMetricsResponse.js'; +import { MetricsServiceMetricInfo } from '../models/MetricsServiceMetricInfo.js'; +import { MetricsServiceMetricInfoLabelValues } from '../models/MetricsServiceMetricInfoLabelValues.js'; +import { MetricsServiceMetricMetadata } from '../models/MetricsServiceMetricMetadata.js'; +import { MetricsServiceMetricsQueryResponse } from '../models/MetricsServiceMetricsQueryResponse.js'; +import { MetricsServiceMetricsQueryResponseMatrix } from '../models/MetricsServiceMetricsQueryResponseMatrix.js'; +import { MetricsServiceMetricsQueryResponseMetric } from '../models/MetricsServiceMetricsQueryResponseMetric.js'; +import { MetricsServiceMetricsQueryResponseResult } from '../models/MetricsServiceMetricsQueryResponseResult.js'; +import { MetricsServiceMetricsQueryResponseSample } from '../models/MetricsServiceMetricsQueryResponseSample.js'; +import { MetricsServiceMetricsQueryResponseValue } from '../models/MetricsServiceMetricsQueryResponseValue.js'; +import { MetricsServiceObservabilityServiceQueryBody } from '../models/MetricsServiceObservabilityServiceQueryBody.js'; +import { MetricsServiceObservabilityServiceQueryRangeBody } from '../models/MetricsServiceObservabilityServiceQueryRangeBody.js'; +import { MetricsServiceQueryValueResponse } from '../models/MetricsServiceQueryValueResponse.js'; +import { MetricsServiceQueryValueResponseResult } from '../models/MetricsServiceQueryValueResponseResult.js'; +import { PriceServiceBatchGetPricesRequest } from '../models/PriceServiceBatchGetPricesRequest.js'; +import { PriceServiceBatchGetPricesResponse } from '../models/PriceServiceBatchGetPricesResponse.js'; +import { PriceServiceBatchGetPricesResponseCoinPrice } from '../models/PriceServiceBatchGetPricesResponseCoinPrice.js'; +import { PriceServiceBatchGetPricesResponseCoinPricePrice } from '../models/PriceServiceBatchGetPricesResponseCoinPricePrice.js'; +import { PriceServiceCheckLatestPriceResponse } from '../models/PriceServiceCheckLatestPriceResponse.js'; +import { PriceServiceCheckLatestPriceResponseCoinPrice } from '../models/PriceServiceCheckLatestPriceResponseCoinPrice.js'; +import { PriceServiceCoinID } from '../models/PriceServiceCoinID.js'; +import { PriceServiceCoinIDAddressIdentifier } from '../models/PriceServiceCoinIDAddressIdentifier.js'; +import { PriceServiceGetPriceResponse } from '../models/PriceServiceGetPriceResponse.js'; +import { PriceServiceListCoinsResponse } from '../models/PriceServiceListCoinsResponse.js'; +import { SolidityServiceBaseChainConfig } from '../models/SolidityServiceBaseChainConfig.js'; +import { SolidityServiceBlockOverrides } from '../models/SolidityServiceBlockOverrides.js'; +import { SolidityServiceChainIdentifier } from '../models/SolidityServiceChainIdentifier.js'; +import { SolidityServiceCompileSourceInternalResponse } from '../models/SolidityServiceCompileSourceInternalResponse.js'; +import { SolidityServiceCompilerOptions } from '../models/SolidityServiceCompilerOptions.js'; +import { SolidityServiceContractKeyInfo } from '../models/SolidityServiceContractKeyInfo.js'; +import { SolidityServiceCreateForkResponse } from '../models/SolidityServiceCreateForkResponse.js'; +import { SolidityServiceDecodeStateDiffResponse } from '../models/SolidityServiceDecodeStateDiffResponse.js'; +import { SolidityServiceExternalFork } from '../models/SolidityServiceExternalFork.js'; +import { SolidityServiceFailure } from '../models/SolidityServiceFailure.js'; +import { SolidityServiceFetchAndCompileInternalResponse } from '../models/SolidityServiceFetchAndCompileInternalResponse.js'; +import { SolidityServiceFork } from '../models/SolidityServiceFork.js'; +import { SolidityServiceForkServiceCreateForkBody } from '../models/SolidityServiceForkServiceCreateForkBody.js'; +import { SolidityServiceForkServiceUpdateForkBody } from '../models/SolidityServiceForkServiceUpdateForkBody.js'; +import { SolidityServiceForkType } from '../models/SolidityServiceForkType.js'; +import { SolidityServiceGetForkInfoResponse } from '../models/SolidityServiceGetForkInfoResponse.js'; +import { SolidityServiceGetForkResponse } from '../models/SolidityServiceGetForkResponse.js'; +import { SolidityServiceGetSimulationBundleResponse } from '../models/SolidityServiceGetSimulationBundleResponse.js'; +import { SolidityServiceGetSimulationResponse } from '../models/SolidityServiceGetSimulationResponse.js'; +import { SolidityServiceGetSimulationsResponse } from '../models/SolidityServiceGetSimulationsResponse.js'; +import { SolidityServiceGetStorageSummaryInternalResponse } from '../models/SolidityServiceGetStorageSummaryInternalResponse.js'; +import { SolidityServiceGetTraceCallInternalRequestBundle } from '../models/SolidityServiceGetTraceCallInternalRequestBundle.js'; +import { SolidityServiceGetTraceCallInternalRequestStateContext } from '../models/SolidityServiceGetTraceCallInternalRequestStateContext.js'; +import { SolidityServiceGetTraceCallInternalResponse } from '../models/SolidityServiceGetTraceCallInternalResponse.js'; +import { SolidityServiceGetTraceTransactionInternalResponse } from '../models/SolidityServiceGetTraceTransactionInternalResponse.js'; +import { SolidityServiceListForksResponse } from '../models/SolidityServiceListForksResponse.js'; +import { SolidityServiceManagedFork } from '../models/SolidityServiceManagedFork.js'; +import { SolidityServiceMetadata } from '../models/SolidityServiceMetadata.js'; +import { SolidityServiceNodeEnvironment } from '../models/SolidityServiceNodeEnvironment.js'; +import { SolidityServiceNodeForkConfig } from '../models/SolidityServiceNodeForkConfig.js'; +import { SolidityServiceOptimizer } from '../models/SolidityServiceOptimizer.js'; +import { SolidityServiceOptimizerDetails } from '../models/SolidityServiceOptimizerDetails.js'; +import { SolidityServiceOptimizerDetailsYulDetails } from '../models/SolidityServiceOptimizerDetailsYulDetails.js'; +import { SolidityServicePreProcessCompilationInternalResponse } from '../models/SolidityServicePreProcessCompilationInternalResponse.js'; +import { SolidityServiceSettings } from '../models/SolidityServiceSettings.js'; +import { SolidityServiceSimulateTransactionBundleResponse } from '../models/SolidityServiceSimulateTransactionBundleResponse.js'; +import { SolidityServiceSimulateTransactionResponse } from '../models/SolidityServiceSimulateTransactionResponse.js'; +import { SolidityServiceSimulation } from '../models/SolidityServiceSimulation.js'; +import { SolidityServiceSimulationResult } from '../models/SolidityServiceSimulationResult.js'; +import { SolidityServiceSolidityAPIServiceSimulateTransactionBody } from '../models/SolidityServiceSolidityAPIServiceSimulateTransactionBody.js'; +import { SolidityServiceSolidityAPIServiceSimulateTransactionBundleBody } from '../models/SolidityServiceSolidityAPIServiceSimulateTransactionBundleBody.js'; +import { SolidityServiceSolidityAPIServiceSimulateTransactionBundleOnForkBody } from '../models/SolidityServiceSolidityAPIServiceSimulateTransactionBundleOnForkBody.js'; +import { SolidityServiceSolidityAPIServiceSimulateTransactionOnForkBody } from '../models/SolidityServiceSolidityAPIServiceSimulateTransactionOnForkBody.js'; +import { SolidityServiceSourceFetcherType } from '../models/SolidityServiceSourceFetcherType.js'; +import { SolidityServiceSourceInfo } from '../models/SolidityServiceSourceInfo.js'; +import { SolidityServiceSourceMultiFile } from '../models/SolidityServiceSourceMultiFile.js'; +import { SolidityServiceSourceSpec } from '../models/SolidityServiceSourceSpec.js'; +import { SolidityServiceSpecializations } from '../models/SolidityServiceSpecializations.js'; +import { SolidityServiceStateOverride } from '../models/SolidityServiceStateOverride.js'; +import { SolidityServiceStorageSummaryResult } from '../models/SolidityServiceStorageSummaryResult.js'; +import { SolidityServiceUpdateForkResponse } from '../models/SolidityServiceUpdateForkResponse.js'; +import { TxindexEvmRawTransaction } from '../models/TxindexEvmRawTransaction.js'; +import { TxindexEvmSearchTransactionsResponse } from '../models/TxindexEvmSearchTransactionsResponse.js'; +import { WebServiceChart } from '../models/WebServiceChart.js'; +import { WebServiceChartChartType } from '../models/WebServiceChartChartType.js'; +import { WebServiceChartConfig } from '../models/WebServiceChartConfig.js'; +import { WebServiceChartConfigBarGaugeConfig } from '../models/WebServiceChartConfigBarGaugeConfig.js'; +import { WebServiceChartConfigCalculation } from '../models/WebServiceChartConfigCalculation.js'; +import { WebServiceChartConfigColorTheme } from '../models/WebServiceChartConfigColorTheme.js'; +import { WebServiceChartConfigColumnSort } from '../models/WebServiceChartConfigColumnSort.js'; +import { WebServiceChartConfigCompareTime } from '../models/WebServiceChartConfigCompareTime.js'; +import { WebServiceChartConfigDirection } from '../models/WebServiceChartConfigDirection.js'; +import { WebServiceChartConfigLineConfig } from '../models/WebServiceChartConfigLineConfig.js'; +import { WebServiceChartConfigLineConfigStyle } from '../models/WebServiceChartConfigLineConfigStyle.js'; +import { WebServiceChartConfigMappingRule } from '../models/WebServiceChartConfigMappingRule.js'; +import { WebServiceChartConfigMarker } from '../models/WebServiceChartConfigMarker.js'; +import { WebServiceChartConfigMarkerType } from '../models/WebServiceChartConfigMarkerType.js'; +import { WebServiceChartConfigPieConfig } from '../models/WebServiceChartConfigPieConfig.js'; +import { WebServiceChartConfigPieConfigPieType } from '../models/WebServiceChartConfigPieConfigPieType.js'; +import { WebServiceChartConfigQueryValueConfig } from '../models/WebServiceChartConfigQueryValueConfig.js'; +import { WebServiceChartConfigSort } from '../models/WebServiceChartConfigSort.js'; +import { WebServiceChartConfigSortBy } from '../models/WebServiceChartConfigSortBy.js'; +import { WebServiceChartConfigTableConfig } from '../models/WebServiceChartConfigTableConfig.js'; +import { WebServiceChartConfigTimeRangeOverride } from '../models/WebServiceChartConfigTimeRangeOverride.js'; +import { WebServiceChartConfigValueConfig } from '../models/WebServiceChartConfigValueConfig.js'; +import { WebServiceChartConfigValueConfigStyle } from '../models/WebServiceChartConfigValueConfigStyle.js'; +import { WebServiceChartConfigValueFormatter } from '../models/WebServiceChartConfigValueFormatter.js'; +import { WebServiceChartConfigYAxisConfig } from '../models/WebServiceChartConfigYAxisConfig.js'; +import { WebServiceChartDataSourceType } from '../models/WebServiceChartDataSourceType.js'; +import { WebServiceDashboard } from '../models/WebServiceDashboard.js'; +import { WebServiceDashboardDashboardVisibility } from '../models/WebServiceDashboardDashboardVisibility.js'; +import { WebServiceDashboardExtra } from '../models/WebServiceDashboardExtra.js'; +import { WebServiceDashboardExtraTemplateVariable } from '../models/WebServiceDashboardExtraTemplateVariable.js'; +import { WebServiceDashboardExtraTemplateView } from '../models/WebServiceDashboardExtraTemplateView.js'; +import { WebServiceDashboardLayouts } from '../models/WebServiceDashboardLayouts.js'; +import { WebServiceDashboardLayoutsLayout } from '../models/WebServiceDashboardLayoutsLayout.js'; +import { WebServiceDashboardResponsiveLayouts } from '../models/WebServiceDashboardResponsiveLayouts.js'; +import { WebServiceDashboardSharing } from '../models/WebServiceDashboardSharing.js'; +import { WebServiceEventLogsConfig } from '../models/WebServiceEventLogsConfig.js'; +import { WebServiceEventLogsConfigTimeRangeOverride } from '../models/WebServiceEventLogsConfigTimeRangeOverride.js'; +import { WebServiceExportDashboardResponse } from '../models/WebServiceExportDashboardResponse.js'; +import { WebServiceGetDashboardResponse } from '../models/WebServiceGetDashboardResponse.js'; +import { WebServiceGetProjectListResponse } from '../models/WebServiceGetProjectListResponse.js'; +import { WebServiceGetProjectResponse } from '../models/WebServiceGetProjectResponse.js'; +import { WebServiceImportDashboardRequest } from '../models/WebServiceImportDashboardRequest.js'; +import { WebServiceImportDashboardResponse } from '../models/WebServiceImportDashboardResponse.js'; +import { WebServiceNote } from '../models/WebServiceNote.js'; +import { WebServiceNoteAlignment } from '../models/WebServiceNoteAlignment.js'; +import { WebServiceNoteFontSize } from '../models/WebServiceNoteFontSize.js'; +import { WebServiceNoteVerticalAlignment } from '../models/WebServiceNoteVerticalAlignment.js'; +import { WebServicePanel } from '../models/WebServicePanel.js'; + +import { DataApiRequestFactory, DataApiResponseProcessor} from "../apis/DataApi.js"; +export class ObservableDataApi { + private requestFactory: DataApiRequestFactory; + private responseProcessor: DataApiResponseProcessor; + private configuration: Configuration; + + public constructor( + configuration: Configuration, + requestFactory?: DataApiRequestFactory, + responseProcessor?: DataApiResponseProcessor + ) { + this.configuration = configuration; + this.requestFactory = requestFactory || new DataApiRequestFactory(configuration); + this.responseProcessor = responseProcessor || new DataApiResponseProcessor(); + } + + /** + * Execute SQL in a project. Go to \"Data Studio\" -> \"SQL Editor\", write your query and then click \"Export as cURL\" ![screenshot](https://raw.githubusercontent.com/sentioxyz/docs/main/.gitbook/assets/image%20(102).png) Find more: https://docs.sentio.xyz/reference/data#sql-api + * Execute SQL + * @param owner username or organization name + * @param slug project slug + * @param body + */ + public executeSQLWithHttpInfo(owner: string, slug: string, body: AnalyticServiceAnalyticServiceExecuteSQLBody, _options?: Configuration): Observable> { + const requestContextPromise = this.requestFactory.executeSQL(owner, slug, body, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (const middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (const middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.executeSQLWithHttpInfo(rsp))); + })); + } + + /** + * Execute SQL in a project. Go to \"Data Studio\" -> \"SQL Editor\", write your query and then click \"Export as cURL\" ![screenshot](https://raw.githubusercontent.com/sentioxyz/docs/main/.gitbook/assets/image%20(102).png) Find more: https://docs.sentio.xyz/reference/data#sql-api + * Execute SQL + * @param owner username or organization name + * @param slug project slug + * @param body + */ + public executeSQL(owner: string, slug: string, body: AnalyticServiceAnalyticServiceExecuteSQLBody, _options?: Configuration): Observable { + return this.executeSQLWithHttpInfo(owner, slug, body, _options).pipe(map((apiResponse: HttpInfo) => apiResponse.data)); + } + + /** + * Get a list of metrics in a project + * @param [projectId] + * @param [name] + * @param [version] + */ + public getMetricsWithHttpInfo(projectId?: string, name?: string, version?: number, _options?: Configuration): Observable> { + const requestContextPromise = this.requestFactory.getMetrics(projectId, name, version, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (const middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (const middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.getMetricsWithHttpInfo(rsp))); + })); + } + + /** + * Get a list of metrics in a project + * @param [projectId] + * @param [name] + * @param [version] + */ + public getMetrics(projectId?: string, name?: string, version?: number, _options?: Configuration): Observable { + return this.getMetricsWithHttpInfo(projectId, name, version, _options).pipe(map((apiResponse: HttpInfo) => apiResponse.data)); + } + + /** + * Get a list of coins in a project. + * List coins + * @param owner + * @param slug + * @param [projectId] + * @param [version] + * @param [limit] + * @param [offset] + * @param [searchQuery] + */ + public listCoinsWithHttpInfo(owner: string, slug: string, projectId?: string, version?: number, limit?: number, offset?: number, searchQuery?: string, _options?: Configuration): Observable> { + const requestContextPromise = this.requestFactory.listCoins(owner, slug, projectId, version, limit, offset, searchQuery, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (const middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (const middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.listCoinsWithHttpInfo(rsp))); + })); + } + + /** + * Get a list of coins in a project. + * List coins + * @param owner + * @param slug + * @param [projectId] + * @param [version] + * @param [limit] + * @param [offset] + * @param [searchQuery] + */ + public listCoins(owner: string, slug: string, projectId?: string, version?: number, limit?: number, offset?: number, searchQuery?: string, _options?: Configuration): Observable { + return this.listCoinsWithHttpInfo(owner, slug, projectId, version, limit, offset, searchQuery, _options).pipe(map((apiResponse: HttpInfo) => apiResponse.data)); + } + + /** + * Get a list of coins in a project. + * List coins + * @param [projectOwner] + * @param [projectSlug] + * @param [projectId] + * @param [version] + * @param [limit] + * @param [offset] + * @param [searchQuery] + */ + public listCoins2WithHttpInfo(projectOwner?: string, projectSlug?: string, projectId?: string, version?: number, limit?: number, offset?: number, searchQuery?: string, _options?: Configuration): Observable> { + const requestContextPromise = this.requestFactory.listCoins2(projectOwner, projectSlug, projectId, version, limit, offset, searchQuery, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (const middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (const middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.listCoins2WithHttpInfo(rsp))); + })); + } + + /** + * Get a list of coins in a project. + * List coins + * @param [projectOwner] + * @param [projectSlug] + * @param [projectId] + * @param [version] + * @param [limit] + * @param [offset] + * @param [searchQuery] + */ + public listCoins2(projectOwner?: string, projectSlug?: string, projectId?: string, version?: number, limit?: number, offset?: number, searchQuery?: string, _options?: Configuration): Observable { + return this.listCoins2WithHttpInfo(projectOwner, projectSlug, projectId, version, limit, offset, searchQuery, _options).pipe(map((apiResponse: HttpInfo) => apiResponse.data)); + } + + /** + * Query for metrics,event logs and coin prices in a project. + * Insight Query + * @param owner username or organization name + * @param slug project slug + * @param body + */ + public queryWithHttpInfo(owner: string, slug: string, body: InsightsServiceInsightsServiceQueryBody, _options?: Configuration): Observable> { + const requestContextPromise = this.requestFactory.query(owner, slug, body, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (const middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (const middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.queryWithHttpInfo(rsp))); + })); + } + + /** + * Query for metrics,event logs and coin prices in a project. + * Insight Query + * @param owner username or organization name + * @param slug project slug + * @param body + */ + public query(owner: string, slug: string, body: InsightsServiceInsightsServiceQueryBody, _options?: Configuration): Observable { + return this.queryWithHttpInfo(owner, slug, body, _options).pipe(map((apiResponse: HttpInfo) => apiResponse.data)); + } + + /** + * Metric instant queries + * @param owner username or organization name + * @param slug project slug + * @param body + */ + public queryInstantWithHttpInfo(owner: string, slug: string, body: MetricsServiceObservabilityServiceQueryBody, _options?: Configuration): Observable> { + const requestContextPromise = this.requestFactory.queryInstant(owner, slug, body, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (const middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (const middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.queryInstantWithHttpInfo(rsp))); + })); + } + + /** + * Metric instant queries + * @param owner username or organization name + * @param slug project slug + * @param body + */ + public queryInstant(owner: string, slug: string, body: MetricsServiceObservabilityServiceQueryBody, _options?: Configuration): Observable { + return this.queryInstantWithHttpInfo(owner, slug, body, _options).pipe(map((apiResponse: HttpInfo) => apiResponse.data)); + } + + /** + * Query event logs + * @param owner + * @param slug + * @param body + */ + public queryLogWithHttpInfo(owner: string, slug: string, body: AnalyticServiceSearchServiceQueryLogBody, _options?: Configuration): Observable> { + const requestContextPromise = this.requestFactory.queryLog(owner, slug, body, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (const middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (const middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.queryLogWithHttpInfo(rsp))); + })); + } + + /** + * Query event logs + * @param owner + * @param slug + * @param body + */ + public queryLog(owner: string, slug: string, body: AnalyticServiceSearchServiceQueryLogBody, _options?: Configuration): Observable { + return this.queryLogWithHttpInfo(owner, slug, body, _options).pipe(map((apiResponse: HttpInfo) => apiResponse.data)); + } + + /** + * Query event logs + * @param owner + * @param slug + * @param [projectId] + * @param [query] + * @param [timeRangeStartRelativeTimeUnit] + * @param [timeRangeStartRelativeTimeValue] + * @param [timeRangeStartRelativeTimeAlign] + * @param [timeRangeStartAbsoluteTime] + * @param [timeRangeEndRelativeTimeUnit] + * @param [timeRangeEndRelativeTimeValue] + * @param [timeRangeEndRelativeTimeAlign] + * @param [timeRangeEndAbsoluteTime] + * @param [timeRangeStep] + * @param [timeRangeIntervalValue] + * @param [timeRangeIntervalUnit] + * @param [timeRangeTimezone] + * @param [limit] + * @param [offset] + * @param [version] + */ + public queryLog2WithHttpInfo(owner: string, slug: string, projectId?: string, query?: string, timeRangeStartRelativeTimeUnit?: string, timeRangeStartRelativeTimeValue?: number, timeRangeStartRelativeTimeAlign?: string, timeRangeStartAbsoluteTime?: string, timeRangeEndRelativeTimeUnit?: string, timeRangeEndRelativeTimeValue?: number, timeRangeEndRelativeTimeAlign?: string, timeRangeEndAbsoluteTime?: string, timeRangeStep?: string, timeRangeIntervalValue?: number, timeRangeIntervalUnit?: string, timeRangeTimezone?: string, limit?: number, offset?: number, version?: number, _options?: Configuration): Observable> { + const requestContextPromise = this.requestFactory.queryLog2(owner, slug, projectId, query, timeRangeStartRelativeTimeUnit, timeRangeStartRelativeTimeValue, timeRangeStartRelativeTimeAlign, timeRangeStartAbsoluteTime, timeRangeEndRelativeTimeUnit, timeRangeEndRelativeTimeValue, timeRangeEndRelativeTimeAlign, timeRangeEndAbsoluteTime, timeRangeStep, timeRangeIntervalValue, timeRangeIntervalUnit, timeRangeTimezone, limit, offset, version, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (const middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (const middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.queryLog2WithHttpInfo(rsp))); + })); + } + + /** + * Query event logs + * @param owner + * @param slug + * @param [projectId] + * @param [query] + * @param [timeRangeStartRelativeTimeUnit] + * @param [timeRangeStartRelativeTimeValue] + * @param [timeRangeStartRelativeTimeAlign] + * @param [timeRangeStartAbsoluteTime] + * @param [timeRangeEndRelativeTimeUnit] + * @param [timeRangeEndRelativeTimeValue] + * @param [timeRangeEndRelativeTimeAlign] + * @param [timeRangeEndAbsoluteTime] + * @param [timeRangeStep] + * @param [timeRangeIntervalValue] + * @param [timeRangeIntervalUnit] + * @param [timeRangeTimezone] + * @param [limit] + * @param [offset] + * @param [version] + */ + public queryLog2(owner: string, slug: string, projectId?: string, query?: string, timeRangeStartRelativeTimeUnit?: string, timeRangeStartRelativeTimeValue?: number, timeRangeStartRelativeTimeAlign?: string, timeRangeStartAbsoluteTime?: string, timeRangeEndRelativeTimeUnit?: string, timeRangeEndRelativeTimeValue?: number, timeRangeEndRelativeTimeAlign?: string, timeRangeEndAbsoluteTime?: string, timeRangeStep?: string, timeRangeIntervalValue?: number, timeRangeIntervalUnit?: string, timeRangeTimezone?: string, limit?: number, offset?: number, version?: number, _options?: Configuration): Observable { + return this.queryLog2WithHttpInfo(owner, slug, projectId, query, timeRangeStartRelativeTimeUnit, timeRangeStartRelativeTimeValue, timeRangeStartRelativeTimeAlign, timeRangeStartAbsoluteTime, timeRangeEndRelativeTimeUnit, timeRangeEndRelativeTimeValue, timeRangeEndRelativeTimeAlign, timeRangeEndAbsoluteTime, timeRangeStep, timeRangeIntervalValue, timeRangeIntervalUnit, timeRangeTimezone, limit, offset, version, _options).pipe(map((apiResponse: HttpInfo) => apiResponse.data)); + } + + /** + * The easiest way to build query is through UI, you could first create an insight chart, and then **Export as cURL**. ![screenshot](https://raw.githubusercontent.com/sentioxyz/docs/main/.gitbook/assets/image%20(101).png) + * Metric range queries + * @param owner username or organization name + * @param slug project slug + * @param body + */ + public queryRangeWithHttpInfo(owner: string, slug: string, body: MetricsServiceObservabilityServiceQueryRangeBody, _options?: Configuration): Observable> { + const requestContextPromise = this.requestFactory.queryRange(owner, slug, body, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (const middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (const middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.queryRangeWithHttpInfo(rsp))); + })); + } + + /** + * The easiest way to build query is through UI, you could first create an insight chart, and then **Export as cURL**. ![screenshot](https://raw.githubusercontent.com/sentioxyz/docs/main/.gitbook/assets/image%20(101).png) + * Metric range queries + * @param owner username or organization name + * @param slug project slug + * @param body + */ + public queryRange(owner: string, slug: string, body: MetricsServiceObservabilityServiceQueryRangeBody, _options?: Configuration): Observable { + return this.queryRangeWithHttpInfo(owner, slug, body, _options).pipe(map((apiResponse: HttpInfo) => apiResponse.data)); + } + + /** + * Query for retention. + * Retention query + * @param owner + * @param slug + * @param body + */ + public retentionWithHttpInfo(owner: string, slug: string, body: InsightsServiceInsightsServiceRetentionBody, _options?: Configuration): Observable> { + const requestContextPromise = this.requestFactory.retention(owner, slug, body, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (const middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (const middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.retentionWithHttpInfo(rsp))); + })); + } + + /** + * Query for retention. + * Retention query + * @param owner + * @param slug + * @param body + */ + public retention(owner: string, slug: string, body: InsightsServiceInsightsServiceRetentionBody, _options?: Configuration): Observable { + return this.retentionWithHttpInfo(owner, slug, body, _options).pipe(map((apiResponse: HttpInfo) => apiResponse.data)); + } + + /** + * Query for retention. + * Retention query + * @param body + */ + public retention2WithHttpInfo(body: InsightsServiceRetentionRequest, _options?: Configuration): Observable> { + const requestContextPromise = this.requestFactory.retention2(body, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (const middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (const middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.retention2WithHttpInfo(rsp))); + })); + } + + /** + * Query for retention. + * Retention query + * @param body + */ + public retention2(body: InsightsServiceRetentionRequest, _options?: Configuration): Observable { + return this.retention2WithHttpInfo(body, _options).pipe(map((apiResponse: HttpInfo) => apiResponse.data)); + } + +} + +import { DebugAndSimulationApiRequestFactory, DebugAndSimulationApiResponseProcessor} from "../apis/DebugAndSimulationApi.js"; +export class ObservableDebugAndSimulationApi { + private requestFactory: DebugAndSimulationApiRequestFactory; + private responseProcessor: DebugAndSimulationApiResponseProcessor; + private configuration: Configuration; + + public constructor( + configuration: Configuration, + requestFactory?: DebugAndSimulationApiRequestFactory, + responseProcessor?: DebugAndSimulationApiResponseProcessor + ) { + this.configuration = configuration; + this.requestFactory = requestFactory || new DebugAndSimulationApiRequestFactory(configuration); + this.responseProcessor = responseProcessor || new DebugAndSimulationApiResponseProcessor(); + } + + /** + * Get trace by bundle simulation + * @param owner + * @param slug + * @param chainId + * @param bundleId + * @param [withInternalCalls] Fetch the decoded trace, which will give you the function info, decoded parameters of both external and internal call trace. + * @param [disableOptimizer] Disable optimizations to make internal calls more accurate, but gas costs will differ from the actual execution. + * @param [ignoreGasCost] Only effective when disableOptimizer=true. + */ + public getCallTraceByBundleWithHttpInfo(owner: string, slug: string, chainId: string, bundleId: string, withInternalCalls?: boolean, disableOptimizer?: boolean, ignoreGasCost?: boolean, _options?: Configuration): Observable> { + const requestContextPromise = this.requestFactory.getCallTraceByBundle(owner, slug, chainId, bundleId, withInternalCalls, disableOptimizer, ignoreGasCost, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (const middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (const middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.getCallTraceByBundleWithHttpInfo(rsp))); + })); + } + + /** + * Get trace by bundle simulation + * @param owner + * @param slug + * @param chainId + * @param bundleId + * @param [withInternalCalls] Fetch the decoded trace, which will give you the function info, decoded parameters of both external and internal call trace. + * @param [disableOptimizer] Disable optimizations to make internal calls more accurate, but gas costs will differ from the actual execution. + * @param [ignoreGasCost] Only effective when disableOptimizer=true. + */ + public getCallTraceByBundle(owner: string, slug: string, chainId: string, bundleId: string, withInternalCalls?: boolean, disableOptimizer?: boolean, ignoreGasCost?: boolean, _options?: Configuration): Observable { + return this.getCallTraceByBundleWithHttpInfo(owner, slug, chainId, bundleId, withInternalCalls, disableOptimizer, ignoreGasCost, _options).pipe(map((apiResponse: HttpInfo) => apiResponse.data)); + } + + /** + * Get trace by simulation + * @param owner + * @param slug + * @param chainId + * @param simulationId + * @param [withInternalCalls] Fetch the decoded trace, which will give you the function info, decoded parameters of both external and internal call trace. + * @param [disableOptimizer] Disable optimizations to make internal calls more accurate, but gas costs will differ from the actual execution. + * @param [ignoreGasCost] Only effective when disableOptimizer=true. + */ + public getCallTraceBySimulationWithHttpInfo(owner: string, slug: string, chainId: string, simulationId: string, withInternalCalls?: boolean, disableOptimizer?: boolean, ignoreGasCost?: boolean, _options?: Configuration): Observable> { + const requestContextPromise = this.requestFactory.getCallTraceBySimulation(owner, slug, chainId, simulationId, withInternalCalls, disableOptimizer, ignoreGasCost, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (const middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (const middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.getCallTraceBySimulationWithHttpInfo(rsp))); + })); + } + + /** + * Get trace by simulation + * @param owner + * @param slug + * @param chainId + * @param simulationId + * @param [withInternalCalls] Fetch the decoded trace, which will give you the function info, decoded parameters of both external and internal call trace. + * @param [disableOptimizer] Disable optimizations to make internal calls more accurate, but gas costs will differ from the actual execution. + * @param [ignoreGasCost] Only effective when disableOptimizer=true. + */ + public getCallTraceBySimulation(owner: string, slug: string, chainId: string, simulationId: string, withInternalCalls?: boolean, disableOptimizer?: boolean, ignoreGasCost?: boolean, _options?: Configuration): Observable { + return this.getCallTraceBySimulationWithHttpInfo(owner, slug, chainId, simulationId, withInternalCalls, disableOptimizer, ignoreGasCost, _options).pipe(map((apiResponse: HttpInfo) => apiResponse.data)); + } + + /** + * API to get Sentio call trace. It takes `txId.txHash` and `chainSpec.chainId` arguments, where the first is transaction hash, and the second is the numeric ethereum chain ID. The results looks very similar to the normal [Ethereum call trace](https://raw.githubusercontent.com/sentioxyz/docs/main/.gitbook/assets/image%20(2)%20(1)%20(1)%20(1).png). But we have an additional `startIndex` and `startIndex` on each trace entry even for the LOG, representing the execution order in the trace. This allows you to build chart that marks the order of fund flow. ![screenshot](https://raw.githubusercontent.com/sentioxyz/docs/main/.gitbook/assets/image%20(2)%20(1)%20(1)%20(1).png) + * Get trace by transaction + * @param owner + * @param slug + * @param chainId + * @param txHash + * @param [withInternalCalls] Fetch the decoded trace, which will give you the function info, decoded parameters of both external and internal call trace. + * @param [disableOptimizer] Disable optimizations to make internal calls more accurate, but gas costs will differ from the actual execution. + * @param [ignoreGasCost] Only effective when disableOptimizer=true. + */ + public getCallTraceByTransactionWithHttpInfo(owner: string, slug: string, chainId: string, txHash: string, withInternalCalls?: boolean, disableOptimizer?: boolean, ignoreGasCost?: boolean, _options?: Configuration): Observable> { + const requestContextPromise = this.requestFactory.getCallTraceByTransaction(owner, slug, chainId, txHash, withInternalCalls, disableOptimizer, ignoreGasCost, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (const middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (const middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.getCallTraceByTransactionWithHttpInfo(rsp))); + })); + } + + /** + * API to get Sentio call trace. It takes `txId.txHash` and `chainSpec.chainId` arguments, where the first is transaction hash, and the second is the numeric ethereum chain ID. The results looks very similar to the normal [Ethereum call trace](https://raw.githubusercontent.com/sentioxyz/docs/main/.gitbook/assets/image%20(2)%20(1)%20(1)%20(1).png). But we have an additional `startIndex` and `startIndex` on each trace entry even for the LOG, representing the execution order in the trace. This allows you to build chart that marks the order of fund flow. ![screenshot](https://raw.githubusercontent.com/sentioxyz/docs/main/.gitbook/assets/image%20(2)%20(1)%20(1)%20(1).png) + * Get trace by transaction + * @param owner + * @param slug + * @param chainId + * @param txHash + * @param [withInternalCalls] Fetch the decoded trace, which will give you the function info, decoded parameters of both external and internal call trace. + * @param [disableOptimizer] Disable optimizations to make internal calls more accurate, but gas costs will differ from the actual execution. + * @param [ignoreGasCost] Only effective when disableOptimizer=true. + */ + public getCallTraceByTransaction(owner: string, slug: string, chainId: string, txHash: string, withInternalCalls?: boolean, disableOptimizer?: boolean, ignoreGasCost?: boolean, _options?: Configuration): Observable { + return this.getCallTraceByTransactionWithHttpInfo(owner, slug, chainId, txHash, withInternalCalls, disableOptimizer, ignoreGasCost, _options).pipe(map((apiResponse: HttpInfo) => apiResponse.data)); + } + + /** + * Get simulation by ID + * @param owner + * @param slug + * @param simulationId + */ + public getSimulationWithHttpInfo(owner: string, slug: string, simulationId: string, _options?: Configuration): Observable> { + const requestContextPromise = this.requestFactory.getSimulation(owner, slug, simulationId, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (const middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (const middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.getSimulationWithHttpInfo(rsp))); + })); + } + + /** + * Get simulation by ID + * @param owner + * @param slug + * @param simulationId + */ + public getSimulation(owner: string, slug: string, simulationId: string, _options?: Configuration): Observable { + return this.getSimulationWithHttpInfo(owner, slug, simulationId, _options).pipe(map((apiResponse: HttpInfo) => apiResponse.data)); + } + + /** + * Get bundle simulation by ID + * @param owner + * @param slug + * @param bundleId + */ + public getSimulationBundleInProjectWithHttpInfo(owner: string, slug: string, bundleId: string, _options?: Configuration): Observable> { + const requestContextPromise = this.requestFactory.getSimulationBundleInProject(owner, slug, bundleId, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (const middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (const middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.getSimulationBundleInProjectWithHttpInfo(rsp))); + })); + } + + /** + * Get bundle simulation by ID + * @param owner + * @param slug + * @param bundleId + */ + public getSimulationBundleInProject(owner: string, slug: string, bundleId: string, _options?: Configuration): Observable { + return this.getSimulationBundleInProjectWithHttpInfo(owner, slug, bundleId, _options).pipe(map((apiResponse: HttpInfo) => apiResponse.data)); + } + + /** + * Get list of simulations + * @param owner + * @param slug + * @param [labelContains] + * @param [page] + * @param [pageSize] + */ + public getSimulationsWithHttpInfo(owner: string, slug: string, labelContains?: string, page?: number, pageSize?: number, _options?: Configuration): Observable> { + const requestContextPromise = this.requestFactory.getSimulations(owner, slug, labelContains, page, pageSize, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (const middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (const middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.getSimulationsWithHttpInfo(rsp))); + })); + } + + /** + * Get list of simulations + * @param owner + * @param slug + * @param [labelContains] + * @param [page] + * @param [pageSize] + */ + public getSimulations(owner: string, slug: string, labelContains?: string, page?: number, pageSize?: number, _options?: Configuration): Observable { + return this.getSimulationsWithHttpInfo(owner, slug, labelContains, page, pageSize, _options).pipe(map((apiResponse: HttpInfo) => apiResponse.data)); + } + + /** + * Search transactions + * @param owner + * @param slug + * @param [chainId] + * @param [address] + * @param [includeDirect] + * @param [includeTrace] + * @param [includeIn] + * @param [includeOut] + * @param [startBlock] + * @param [endBlock] + * @param [startTimestamp] + * @param [endTimestamp] + * @param [transactionStatus] + * @param [methodSignature] + * @param [limit] + * @param [pageToken] + */ + public searchTransactionsWithHttpInfo(owner: string, slug: string, chainId?: Array, address?: Array, includeDirect?: boolean, includeTrace?: boolean, includeIn?: boolean, includeOut?: boolean, startBlock?: string, endBlock?: string, startTimestamp?: string, endTimestamp?: string, transactionStatus?: Array, methodSignature?: string, limit?: number, pageToken?: string, _options?: Configuration): Observable> { + const requestContextPromise = this.requestFactory.searchTransactions(owner, slug, chainId, address, includeDirect, includeTrace, includeIn, includeOut, startBlock, endBlock, startTimestamp, endTimestamp, transactionStatus, methodSignature, limit, pageToken, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (const middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (const middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.searchTransactionsWithHttpInfo(rsp))); + })); + } + + /** + * Search transactions + * @param owner + * @param slug + * @param [chainId] + * @param [address] + * @param [includeDirect] + * @param [includeTrace] + * @param [includeIn] + * @param [includeOut] + * @param [startBlock] + * @param [endBlock] + * @param [startTimestamp] + * @param [endTimestamp] + * @param [transactionStatus] + * @param [methodSignature] + * @param [limit] + * @param [pageToken] + */ + public searchTransactions(owner: string, slug: string, chainId?: Array, address?: Array, includeDirect?: boolean, includeTrace?: boolean, includeIn?: boolean, includeOut?: boolean, startBlock?: string, endBlock?: string, startTimestamp?: string, endTimestamp?: string, transactionStatus?: Array, methodSignature?: string, limit?: number, pageToken?: string, _options?: Configuration): Observable { + return this.searchTransactionsWithHttpInfo(owner, slug, chainId, address, includeDirect, includeTrace, includeIn, includeOut, startBlock, endBlock, startTimestamp, endTimestamp, transactionStatus, methodSignature, limit, pageToken, _options).pipe(map((apiResponse: HttpInfo) => apiResponse.data)); + } + + /** + * Create a new transaction simulation. The simulation body should be included in the request body. Your simulations will be saved, and a unique ID for each simulation is included in the response. It will be useful for fetching simulation details. + * Run simulation + * @param owner + * @param slug + * @param chainId + * @param body + */ + public simulateTransactionWithHttpInfo(owner: string, slug: string, chainId: string, body: SolidityServiceSolidityAPIServiceSimulateTransactionBody, _options?: Configuration): Observable> { + const requestContextPromise = this.requestFactory.simulateTransaction(owner, slug, chainId, body, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (const middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (const middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.simulateTransactionWithHttpInfo(rsp))); + })); + } + + /** + * Create a new transaction simulation. The simulation body should be included in the request body. Your simulations will be saved, and a unique ID for each simulation is included in the response. It will be useful for fetching simulation details. + * Run simulation + * @param owner + * @param slug + * @param chainId + * @param body + */ + public simulateTransaction(owner: string, slug: string, chainId: string, body: SolidityServiceSolidityAPIServiceSimulateTransactionBody, _options?: Configuration): Observable { + return this.simulateTransactionWithHttpInfo(owner, slug, chainId, body, _options).pipe(map((apiResponse: HttpInfo) => apiResponse.data)); + } + + /** + * You could also create bundle simulations so that one transaction could be executed one after another. For `blockNumber` `transactionIndex` `networkId` `stateOverrides` and `blockOverrides` fields, only the first simulation takes effect. + * Run bundle simulation + * @param owner + * @param slug + * @param chainId + * @param body + */ + public simulateTransactionBundleWithHttpInfo(owner: string, slug: string, chainId: string, body: SolidityServiceSolidityAPIServiceSimulateTransactionBundleBody, _options?: Configuration): Observable> { + const requestContextPromise = this.requestFactory.simulateTransactionBundle(owner, slug, chainId, body, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (const middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (const middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.simulateTransactionBundleWithHttpInfo(rsp))); + })); + } + + /** + * You could also create bundle simulations so that one transaction could be executed one after another. For `blockNumber` `transactionIndex` `networkId` `stateOverrides` and `blockOverrides` fields, only the first simulation takes effect. + * Run bundle simulation + * @param owner + * @param slug + * @param chainId + * @param body + */ + public simulateTransactionBundle(owner: string, slug: string, chainId: string, body: SolidityServiceSolidityAPIServiceSimulateTransactionBundleBody, _options?: Configuration): Observable { + return this.simulateTransactionBundleWithHttpInfo(owner, slug, chainId, body, _options).pipe(map((apiResponse: HttpInfo) => apiResponse.data)); + } + +} + +import { ForksApiRequestFactory, ForksApiResponseProcessor} from "../apis/ForksApi.js"; +export class ObservableForksApi { + private requestFactory: ForksApiRequestFactory; + private responseProcessor: ForksApiResponseProcessor; + private configuration: Configuration; + + public constructor( + configuration: Configuration, + requestFactory?: ForksApiRequestFactory, + responseProcessor?: ForksApiResponseProcessor + ) { + this.configuration = configuration; + this.requestFactory = requestFactory || new ForksApiRequestFactory(configuration); + this.responseProcessor = responseProcessor || new ForksApiResponseProcessor(); + } + + /** + * Create a fork + * @param owner + * @param slug + * @param body + */ + public createForkWithHttpInfo(owner: string, slug: string, body: SolidityServiceForkServiceCreateForkBody, _options?: Configuration): Observable> { + const requestContextPromise = this.requestFactory.createFork(owner, slug, body, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (const middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (const middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.createForkWithHttpInfo(rsp))); + })); + } + + /** + * Create a fork + * @param owner + * @param slug + * @param body + */ + public createFork(owner: string, slug: string, body: SolidityServiceForkServiceCreateForkBody, _options?: Configuration): Observable { + return this.createForkWithHttpInfo(owner, slug, body, _options).pipe(map((apiResponse: HttpInfo) => apiResponse.data)); + } + + /** + * Delete fork by id + * @param owner + * @param slug + * @param id + */ + public deleteForkWithHttpInfo(owner: string, slug: string, id: string, _options?: Configuration): Observable> { + const requestContextPromise = this.requestFactory.deleteFork(owner, slug, id, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (const middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (const middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.deleteForkWithHttpInfo(rsp))); + })); + } + + /** + * Delete fork by id + * @param owner + * @param slug + * @param id + */ + public deleteFork(owner: string, slug: string, id: string, _options?: Configuration): Observable { + return this.deleteForkWithHttpInfo(owner, slug, id, _options).pipe(map((apiResponse: HttpInfo) => apiResponse.data)); + } + + /** + * Get trace by bundle simulation + * @param owner + * @param slug + * @param forkId + * @param bundleId + * @param [withInternalCalls] Fetch the decoded trace, which will give you the function info, decoded parameters of both external and internal call trace. + * @param [disableOptimizer] Disable optimizations to make internal calls more accurate, but gas costs will differ from the actual execution. + * @param [ignoreGasCost] Only effective when disableOptimizer=true. + */ + public getCallTraceOnForkBundleWithHttpInfo(owner: string, slug: string, forkId: string, bundleId: string, withInternalCalls?: boolean, disableOptimizer?: boolean, ignoreGasCost?: boolean, _options?: Configuration): Observable> { + const requestContextPromise = this.requestFactory.getCallTraceOnForkBundle(owner, slug, forkId, bundleId, withInternalCalls, disableOptimizer, ignoreGasCost, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (const middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (const middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.getCallTraceOnForkBundleWithHttpInfo(rsp))); + })); + } + + /** + * Get trace by bundle simulation + * @param owner + * @param slug + * @param forkId + * @param bundleId + * @param [withInternalCalls] Fetch the decoded trace, which will give you the function info, decoded parameters of both external and internal call trace. + * @param [disableOptimizer] Disable optimizations to make internal calls more accurate, but gas costs will differ from the actual execution. + * @param [ignoreGasCost] Only effective when disableOptimizer=true. + */ + public getCallTraceOnForkBundle(owner: string, slug: string, forkId: string, bundleId: string, withInternalCalls?: boolean, disableOptimizer?: boolean, ignoreGasCost?: boolean, _options?: Configuration): Observable { + return this.getCallTraceOnForkBundleWithHttpInfo(owner, slug, forkId, bundleId, withInternalCalls, disableOptimizer, ignoreGasCost, _options).pipe(map((apiResponse: HttpInfo) => apiResponse.data)); + } + + /** + * Get trace by simulation + * @param owner + * @param slug + * @param forkId + * @param simulationId + * @param [withInternalCalls] Fetch the decoded trace, which will give you the function info, decoded parameters of both external and internal call trace. + * @param [disableOptimizer] Disable optimizations to make internal calls more accurate, but gas costs will differ from the actual execution. + * @param [ignoreGasCost] Only effective when disableOptimizer=true. + */ + public getCallTraceOnForkSimulationWithHttpInfo(owner: string, slug: string, forkId: string, simulationId: string, withInternalCalls?: boolean, disableOptimizer?: boolean, ignoreGasCost?: boolean, _options?: Configuration): Observable> { + const requestContextPromise = this.requestFactory.getCallTraceOnForkSimulation(owner, slug, forkId, simulationId, withInternalCalls, disableOptimizer, ignoreGasCost, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (const middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (const middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.getCallTraceOnForkSimulationWithHttpInfo(rsp))); + })); + } + + /** + * Get trace by simulation + * @param owner + * @param slug + * @param forkId + * @param simulationId + * @param [withInternalCalls] Fetch the decoded trace, which will give you the function info, decoded parameters of both external and internal call trace. + * @param [disableOptimizer] Disable optimizations to make internal calls more accurate, but gas costs will differ from the actual execution. + * @param [ignoreGasCost] Only effective when disableOptimizer=true. + */ + public getCallTraceOnForkSimulation(owner: string, slug: string, forkId: string, simulationId: string, withInternalCalls?: boolean, disableOptimizer?: boolean, ignoreGasCost?: boolean, _options?: Configuration): Observable { + return this.getCallTraceOnForkSimulationWithHttpInfo(owner, slug, forkId, simulationId, withInternalCalls, disableOptimizer, ignoreGasCost, _options).pipe(map((apiResponse: HttpInfo) => apiResponse.data)); + } + + /** + * Get trace by transaction + * @param owner + * @param slug + * @param forkId + * @param txHash + * @param [withInternalCalls] Fetch the decoded trace, which will give you the function info, decoded parameters of both external and internal call trace. + * @param [disableOptimizer] Disable optimizations to make internal calls more accurate, but gas costs will differ from the actual execution. + * @param [ignoreGasCost] Only effective when disableOptimizer=true. + */ + public getCallTraceOnForkTransactionWithHttpInfo(owner: string, slug: string, forkId: string, txHash: string, withInternalCalls?: boolean, disableOptimizer?: boolean, ignoreGasCost?: boolean, _options?: Configuration): Observable> { + const requestContextPromise = this.requestFactory.getCallTraceOnForkTransaction(owner, slug, forkId, txHash, withInternalCalls, disableOptimizer, ignoreGasCost, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (const middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (const middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.getCallTraceOnForkTransactionWithHttpInfo(rsp))); + })); + } + + /** + * Get trace by transaction + * @param owner + * @param slug + * @param forkId + * @param txHash + * @param [withInternalCalls] Fetch the decoded trace, which will give you the function info, decoded parameters of both external and internal call trace. + * @param [disableOptimizer] Disable optimizations to make internal calls more accurate, but gas costs will differ from the actual execution. + * @param [ignoreGasCost] Only effective when disableOptimizer=true. + */ + public getCallTraceOnForkTransaction(owner: string, slug: string, forkId: string, txHash: string, withInternalCalls?: boolean, disableOptimizer?: boolean, ignoreGasCost?: boolean, _options?: Configuration): Observable { + return this.getCallTraceOnForkTransactionWithHttpInfo(owner, slug, forkId, txHash, withInternalCalls, disableOptimizer, ignoreGasCost, _options).pipe(map((apiResponse: HttpInfo) => apiResponse.data)); + } + + /** + * Get fork by id + * @param owner + * @param slug + * @param id + */ + public getForkWithHttpInfo(owner: string, slug: string, id: string, _options?: Configuration): Observable> { + const requestContextPromise = this.requestFactory.getFork(owner, slug, id, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (const middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (const middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.getForkWithHttpInfo(rsp))); + })); + } + + /** + * Get fork by id + * @param owner + * @param slug + * @param id + */ + public getFork(owner: string, slug: string, id: string, _options?: Configuration): Observable { + return this.getForkWithHttpInfo(owner, slug, id, _options).pipe(map((apiResponse: HttpInfo) => apiResponse.data)); + } + + /** + * Get fork info by id + * @param owner + * @param slug + * @param id + */ + public getForkInfoWithHttpInfo(owner: string, slug: string, id: string, _options?: Configuration): Observable> { + const requestContextPromise = this.requestFactory.getForkInfo(owner, slug, id, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (const middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (const middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.getForkInfoWithHttpInfo(rsp))); + })); + } + + /** + * Get fork info by id + * @param owner + * @param slug + * @param id + */ + public getForkInfo(owner: string, slug: string, id: string, _options?: Configuration): Observable { + return this.getForkInfoWithHttpInfo(owner, slug, id, _options).pipe(map((apiResponse: HttpInfo) => apiResponse.data)); + } + + /** + * List all forks + * @param owner + * @param slug + */ + public listForksWithHttpInfo(owner: string, slug: string, _options?: Configuration): Observable> { + const requestContextPromise = this.requestFactory.listForks(owner, slug, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (const middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (const middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.listForksWithHttpInfo(rsp))); + })); + } + + /** + * List all forks + * @param owner + * @param slug + */ + public listForks(owner: string, slug: string, _options?: Configuration): Observable { + return this.listForksWithHttpInfo(owner, slug, _options).pipe(map((apiResponse: HttpInfo) => apiResponse.data)); + } + + /** + * Run bundle simulation + * @param owner + * @param slug + * @param forkId + * @param body + */ + public simulateTransactionBundleOnForkWithHttpInfo(owner: string, slug: string, forkId: string, body: SolidityServiceSolidityAPIServiceSimulateTransactionBundleOnForkBody, _options?: Configuration): Observable> { + const requestContextPromise = this.requestFactory.simulateTransactionBundleOnFork(owner, slug, forkId, body, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (const middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (const middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.simulateTransactionBundleOnForkWithHttpInfo(rsp))); + })); + } + + /** + * Run bundle simulation + * @param owner + * @param slug + * @param forkId + * @param body + */ + public simulateTransactionBundleOnFork(owner: string, slug: string, forkId: string, body: SolidityServiceSolidityAPIServiceSimulateTransactionBundleOnForkBody, _options?: Configuration): Observable { + return this.simulateTransactionBundleOnForkWithHttpInfo(owner, slug, forkId, body, _options).pipe(map((apiResponse: HttpInfo) => apiResponse.data)); + } + + /** + * Run Simulation + * @param owner + * @param slug + * @param forkId + * @param body + */ + public simulateTransactionOnForkWithHttpInfo(owner: string, slug: string, forkId: string, body: SolidityServiceSolidityAPIServiceSimulateTransactionOnForkBody, _options?: Configuration): Observable> { + const requestContextPromise = this.requestFactory.simulateTransactionOnFork(owner, slug, forkId, body, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (const middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (const middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.simulateTransactionOnForkWithHttpInfo(rsp))); + })); + } + + /** + * Run Simulation + * @param owner + * @param slug + * @param forkId + * @param body + */ + public simulateTransactionOnFork(owner: string, slug: string, forkId: string, body: SolidityServiceSolidityAPIServiceSimulateTransactionOnForkBody, _options?: Configuration): Observable { + return this.simulateTransactionOnForkWithHttpInfo(owner, slug, forkId, body, _options).pipe(map((apiResponse: HttpInfo) => apiResponse.data)); + } + + /** + * Update fork by id + * @param owner + * @param slug + * @param id + * @param body + */ + public updateForkWithHttpInfo(owner: string, slug: string, id: string, body: SolidityServiceForkServiceUpdateForkBody, _options?: Configuration): Observable> { + const requestContextPromise = this.requestFactory.updateFork(owner, slug, id, body, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (const middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (const middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.updateForkWithHttpInfo(rsp))); + })); + } + + /** + * Update fork by id + * @param owner + * @param slug + * @param id + * @param body + */ + public updateFork(owner: string, slug: string, id: string, body: SolidityServiceForkServiceUpdateForkBody, _options?: Configuration): Observable { + return this.updateForkWithHttpInfo(owner, slug, id, body, _options).pipe(map((apiResponse: HttpInfo) => apiResponse.data)); + } + +} + +import { PriceApiRequestFactory, PriceApiResponseProcessor} from "../apis/PriceApi.js"; +export class ObservablePriceApi { + private requestFactory: PriceApiRequestFactory; + private responseProcessor: PriceApiResponseProcessor; + private configuration: Configuration; + + public constructor( + configuration: Configuration, + requestFactory?: PriceApiRequestFactory, + responseProcessor?: PriceApiResponseProcessor + ) { + this.configuration = configuration; + this.requestFactory = requestFactory || new PriceApiRequestFactory(configuration); + this.responseProcessor = responseProcessor || new PriceApiResponseProcessor(); + } + + /** + * Batch get prices + * @param body + */ + public batchGetPricesWithHttpInfo(body: PriceServiceBatchGetPricesRequest, _options?: Configuration): Observable> { + const requestContextPromise = this.requestFactory.batchGetPrices(body, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (const middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (const middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.batchGetPricesWithHttpInfo(rsp))); + })); + } + + /** + * Batch get prices + * @param body + */ + public batchGetPrices(body: PriceServiceBatchGetPricesRequest, _options?: Configuration): Observable { + return this.batchGetPricesWithHttpInfo(body, _options).pipe(map((apiResponse: HttpInfo) => apiResponse.data)); + } + + /** + * Check latest price + */ + public checkLatestPriceWithHttpInfo(_options?: Configuration): Observable> { + const requestContextPromise = this.requestFactory.checkLatestPrice(_options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (const middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (const middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.checkLatestPriceWithHttpInfo(rsp))); + })); + } + + /** + * Check latest price + */ + public checkLatestPrice(_options?: Configuration): Observable { + return this.checkLatestPriceWithHttpInfo(_options).pipe(map((apiResponse: HttpInfo) => apiResponse.data)); + } + + /** + * GetPrice returns the price of a given coin identifier, in a best effort way. If we do not have any price data for the given coin, we will return NOT_FOUND error. If we have at least one price data for the given coin, we will return it with the actual timestamp. Client is responsible for checking the timestamp and decide whether to use the price or not. + * Get price + * @param [timestamp] The timestamp we request the price at. Note, the price service may not have the price at the exact timestamp, in which case it will return the price at the closest timestamp. + * @param [coinIdSymbol] + * @param [coinIdAddressAddress] + * @param [coinIdAddressChain] + * @param [source] + */ + public getPriceWithHttpInfo(timestamp?: Date, coinIdSymbol?: string, coinIdAddressAddress?: string, coinIdAddressChain?: string, source?: string, _options?: Configuration): Observable> { + const requestContextPromise = this.requestFactory.getPrice(timestamp, coinIdSymbol, coinIdAddressAddress, coinIdAddressChain, source, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (const middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (const middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.getPriceWithHttpInfo(rsp))); + })); + } + + /** + * GetPrice returns the price of a given coin identifier, in a best effort way. If we do not have any price data for the given coin, we will return NOT_FOUND error. If we have at least one price data for the given coin, we will return it with the actual timestamp. Client is responsible for checking the timestamp and decide whether to use the price or not. + * Get price + * @param [timestamp] The timestamp we request the price at. Note, the price service may not have the price at the exact timestamp, in which case it will return the price at the closest timestamp. + * @param [coinIdSymbol] + * @param [coinIdAddressAddress] + * @param [coinIdAddressChain] + * @param [source] + */ + public getPrice(timestamp?: Date, coinIdSymbol?: string, coinIdAddressAddress?: string, coinIdAddressChain?: string, source?: string, _options?: Configuration): Observable { + return this.getPriceWithHttpInfo(timestamp, coinIdSymbol, coinIdAddressAddress, coinIdAddressChain, source, _options).pipe(map((apiResponse: HttpInfo) => apiResponse.data)); + } + + /** + * List coins + * @param [limit] + * @param [offset] + * @param [searchQuery] + * @param [chain] + */ + public priceListCoinsWithHttpInfo(limit?: number, offset?: number, searchQuery?: string, chain?: string, _options?: Configuration): Observable> { + const requestContextPromise = this.requestFactory.priceListCoins(limit, offset, searchQuery, chain, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (const middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (const middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.priceListCoinsWithHttpInfo(rsp))); + })); + } + + /** + * List coins + * @param [limit] + * @param [offset] + * @param [searchQuery] + * @param [chain] + */ + public priceListCoins(limit?: number, offset?: number, searchQuery?: string, chain?: string, _options?: Configuration): Observable { + return this.priceListCoinsWithHttpInfo(limit, offset, searchQuery, chain, _options).pipe(map((apiResponse: HttpInfo) => apiResponse.data)); + } + +} + +import { WebApiRequestFactory, WebApiResponseProcessor} from "../apis/WebApi.js"; +export class ObservableWebApi { + private requestFactory: WebApiRequestFactory; + private responseProcessor: WebApiResponseProcessor; + private configuration: Configuration; + + public constructor( + configuration: Configuration, + requestFactory?: WebApiRequestFactory, + responseProcessor?: WebApiResponseProcessor + ) { + this.configuration = configuration; + this.requestFactory = requestFactory || new WebApiRequestFactory(configuration); + this.responseProcessor = responseProcessor || new WebApiResponseProcessor(); + } + + /** + * Delete a dashboard by id + * @param dashboardId filter the dashboard by id + * @param [projectId] filter the dashboard by project id + * @param [ownerName] username or organization name + * @param [slug] project slug + */ + public deleteDashboardWithHttpInfo(dashboardId: string, projectId?: string, ownerName?: string, slug?: string, _options?: Configuration): Observable> { + const requestContextPromise = this.requestFactory.deleteDashboard(dashboardId, projectId, ownerName, slug, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (const middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (const middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.deleteDashboardWithHttpInfo(rsp))); + })); + } + + /** + * Delete a dashboard by id + * @param dashboardId filter the dashboard by id + * @param [projectId] filter the dashboard by project id + * @param [ownerName] username or organization name + * @param [slug] project slug + */ + public deleteDashboard(dashboardId: string, projectId?: string, ownerName?: string, slug?: string, _options?: Configuration): Observable { + return this.deleteDashboardWithHttpInfo(dashboardId, projectId, ownerName, slug, _options).pipe(map((apiResponse: HttpInfo) => apiResponse.data)); + } + + /** + * Export a dashboard to json + * @param dashboardId + */ + public exportDashboardWithHttpInfo(dashboardId: string, _options?: Configuration): Observable> { + const requestContextPromise = this.requestFactory.exportDashboard(dashboardId, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (const middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (const middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.exportDashboardWithHttpInfo(rsp))); + })); + } + + /** + * Export a dashboard to json + * @param dashboardId + */ + public exportDashboard(dashboardId: string, _options?: Configuration): Observable { + return this.exportDashboardWithHttpInfo(dashboardId, _options).pipe(map((apiResponse: HttpInfo) => apiResponse.data)); + } + + /** + * Get a dashboard by id + * @param dashboardId filter the dashboard by id + * @param [projectId] filter the dashboard by project id + * @param [ownerName] username or organization name + * @param [slug] project slug + */ + public getDashboardWithHttpInfo(dashboardId: string, projectId?: string, ownerName?: string, slug?: string, _options?: Configuration): Observable> { + const requestContextPromise = this.requestFactory.getDashboard(dashboardId, projectId, ownerName, slug, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (const middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (const middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.getDashboardWithHttpInfo(rsp))); + })); + } + + /** + * Get a dashboard by id + * @param dashboardId filter the dashboard by id + * @param [projectId] filter the dashboard by project id + * @param [ownerName] username or organization name + * @param [slug] project slug + */ + public getDashboard(dashboardId: string, projectId?: string, ownerName?: string, slug?: string, _options?: Configuration): Observable { + return this.getDashboardWithHttpInfo(dashboardId, projectId, ownerName, slug, _options).pipe(map((apiResponse: HttpInfo) => apiResponse.data)); + } + + /** + * Get a dashboard by id + * @param owner username or organization name + * @param slug project slug + * @param dashboardId filter the dashboard by id + * @param [projectId] filter the dashboard by project id + */ + public getDashboard2WithHttpInfo(owner: string, slug: string, dashboardId: string, projectId?: string, _options?: Configuration): Observable> { + const requestContextPromise = this.requestFactory.getDashboard2(owner, slug, dashboardId, projectId, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (const middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (const middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.getDashboard2WithHttpInfo(rsp))); + })); + } + + /** + * Get a dashboard by id + * @param owner username or organization name + * @param slug project slug + * @param dashboardId filter the dashboard by id + * @param [projectId] filter the dashboard by project id + */ + public getDashboard2(owner: string, slug: string, dashboardId: string, projectId?: string, _options?: Configuration): Observable { + return this.getDashboard2WithHttpInfo(owner, slug, dashboardId, projectId, _options).pipe(map((apiResponse: HttpInfo) => apiResponse.data)); + } + + /** + * Get project details + * @param owner username or organization name + * @param slug project slug + */ + public getProjectWithHttpInfo(owner: string, slug: string, _options?: Configuration): Observable> { + const requestContextPromise = this.requestFactory.getProject(owner, slug, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (const middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (const middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.getProjectWithHttpInfo(rsp))); + })); + } + + /** + * Get project details + * @param owner username or organization name + * @param slug project slug + */ + public getProject(owner: string, slug: string, _options?: Configuration): Observable { + return this.getProjectWithHttpInfo(owner, slug, _options).pipe(map((apiResponse: HttpInfo) => apiResponse.data)); + } + + /** + * Get project list + * @param [userId] + * @param [organizationId] + */ + public getProjectListWithHttpInfo(userId?: string, organizationId?: string, _options?: Configuration): Observable> { + const requestContextPromise = this.requestFactory.getProjectList(userId, organizationId, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (const middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (const middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.getProjectListWithHttpInfo(rsp))); + })); + } + + /** + * Get project list + * @param [userId] + * @param [organizationId] + */ + public getProjectList(userId?: string, organizationId?: string, _options?: Configuration): Observable { + return this.getProjectListWithHttpInfo(userId, organizationId, _options).pipe(map((apiResponse: HttpInfo) => apiResponse.data)); + } + + /** + * Import a dashboard to another dashboard + * @param body + */ + public importDashboardWithHttpInfo(body: WebServiceImportDashboardRequest, _options?: Configuration): Observable> { + const requestContextPromise = this.requestFactory.importDashboard(body, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (const middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (const middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.importDashboardWithHttpInfo(rsp))); + })); + } + + /** + * Import a dashboard to another dashboard + * @param body + */ + public importDashboard(body: WebServiceImportDashboardRequest, _options?: Configuration): Observable { + return this.importDashboardWithHttpInfo(body, _options).pipe(map((apiResponse: HttpInfo) => apiResponse.data)); + } + + /** + * List all dashboards in a project + * @param [dashboardId] filter the dashboard by id + * @param [projectId] filter the dashboard by project id + * @param [ownerName] username or organization name + * @param [slug] project slug + */ + public listDashboardsWithHttpInfo(dashboardId?: string, projectId?: string, ownerName?: string, slug?: string, _options?: Configuration): Observable> { + const requestContextPromise = this.requestFactory.listDashboards(dashboardId, projectId, ownerName, slug, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (const middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (const middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.listDashboardsWithHttpInfo(rsp))); + })); + } + + /** + * List all dashboards in a project + * @param [dashboardId] filter the dashboard by id + * @param [projectId] filter the dashboard by project id + * @param [ownerName] username or organization name + * @param [slug] project slug + */ + public listDashboards(dashboardId?: string, projectId?: string, ownerName?: string, slug?: string, _options?: Configuration): Observable { + return this.listDashboardsWithHttpInfo(dashboardId, projectId, ownerName, slug, _options).pipe(map((apiResponse: HttpInfo) => apiResponse.data)); + } + + /** + * List all dashboards in a project + * @param owner username or organization name + * @param slug project slug + * @param [dashboardId] filter the dashboard by id + * @param [projectId] filter the dashboard by project id + */ + public listDashboards2WithHttpInfo(owner: string, slug: string, dashboardId?: string, projectId?: string, _options?: Configuration): Observable> { + const requestContextPromise = this.requestFactory.listDashboards2(owner, slug, dashboardId, projectId, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (const middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (const middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.listDashboards2WithHttpInfo(rsp))); + })); + } + + /** + * List all dashboards in a project + * @param owner username or organization name + * @param slug project slug + * @param [dashboardId] filter the dashboard by id + * @param [projectId] filter the dashboard by project id + */ + public listDashboards2(owner: string, slug: string, dashboardId?: string, projectId?: string, _options?: Configuration): Observable { + return this.listDashboards2WithHttpInfo(owner, slug, dashboardId, projectId, _options).pipe(map((apiResponse: HttpInfo) => apiResponse.data)); + } + +} diff --git a/src/types/PromiseAPI.ts b/src/types/PromiseAPI.ts new file mode 100755 index 0000000..fe1d06b --- /dev/null +++ b/src/types/PromiseAPI.ts @@ -0,0 +1,1445 @@ +import { ResponseContext, RequestContext, HttpFile, HttpInfo } from '../http/http.js'; +import { Configuration} from '../configuration.js' + +import { AnalyticServiceAnalyticServiceExecuteSQLBody } from '../models/AnalyticServiceAnalyticServiceExecuteSQLBody.js'; +import { AnalyticServiceLogQueryRequestFilter } from '../models/AnalyticServiceLogQueryRequestFilter.js'; +import { AnalyticServiceLogQueryRequestSort } from '../models/AnalyticServiceLogQueryRequestSort.js'; +import { AnalyticServiceLogQueryResponse } from '../models/AnalyticServiceLogQueryResponse.js'; +import { AnalyticServiceSQLQuery } from '../models/AnalyticServiceSQLQuery.js'; +import { AnalyticServiceSearchServiceQueryLogBody } from '../models/AnalyticServiceSearchServiceQueryLogBody.js'; +import { AnalyticServiceSyncExecuteSQLResponse } from '../models/AnalyticServiceSyncExecuteSQLResponse.js'; +import { CommonAggregate } from '../models/CommonAggregate.js'; +import { CommonAggregateAggregateOps } from '../models/CommonAggregateAggregateOps.js'; +import { CommonAny } from '../models/CommonAny.js'; +import { CommonArgument } from '../models/CommonArgument.js'; +import { CommonBigDecimal } from '../models/CommonBigDecimal.js'; +import { CommonBigInteger } from '../models/CommonBigInteger.js'; +import { CommonCachePolicy } from '../models/CommonCachePolicy.js'; +import { CommonChannel } from '../models/CommonChannel.js'; +import { CommonChannelType } from '../models/CommonChannelType.js'; +import { CommonCohortsFilter } from '../models/CommonCohortsFilter.js'; +import { CommonCohortsFilterAggregation } from '../models/CommonCohortsFilterAggregation.js'; +import { CommonCohortsFilterAggregationAggregateProperties } from '../models/CommonCohortsFilterAggregationAggregateProperties.js'; +import { CommonCohortsFilterAggregationAggregatePropertiesAggregationType } from '../models/CommonCohortsFilterAggregationAggregatePropertiesAggregationType.js'; +import { CommonCohortsFilterAggregationOperatorType } from '../models/CommonCohortsFilterAggregationOperatorType.js'; +import { CommonCohortsGroup } from '../models/CommonCohortsGroup.js'; +import { CommonCohortsQuery } from '../models/CommonCohortsQuery.js'; +import { CommonCoinID } from '../models/CommonCoinID.js'; +import { CommonCoinIDAddressIdentifier } from '../models/CommonCoinIDAddressIdentifier.js'; +import { CommonColumnState } from '../models/CommonColumnState.js'; +import { CommonColumnStateSort } from '../models/CommonColumnStateSort.js'; +import { CommonComputeStats } from '../models/CommonComputeStats.js'; +import { CommonDuration } from '../models/CommonDuration.js'; +import { CommonEventLogColumn } from '../models/CommonEventLogColumn.js'; +import { CommonEventLogConfig } from '../models/CommonEventLogConfig.js'; +import { CommonEventLogEntry } from '../models/CommonEventLogEntry.js'; +import { CommonFormula } from '../models/CommonFormula.js'; +import { CommonFunction } from '../models/CommonFunction.js'; +import { CommonJoinOperator } from '../models/CommonJoinOperator.js'; +import { CommonMatrix } from '../models/CommonMatrix.js'; +import { CommonMatrixMetric } from '../models/CommonMatrixMetric.js'; +import { CommonMatrixSample } from '../models/CommonMatrixSample.js'; +import { CommonMatrixValue } from '../models/CommonMatrixValue.js'; +import { CommonOrganization } from '../models/CommonOrganization.js'; +import { CommonOrganizationMember } from '../models/CommonOrganizationMember.js'; +import { CommonOrganizationRole } from '../models/CommonOrganizationRole.js'; +import { CommonOwner } from '../models/CommonOwner.js'; +import { CommonPermission } from '../models/CommonPermission.js'; +import { CommonPriceSegmentationQuery } from '../models/CommonPriceSegmentationQuery.js'; +import { CommonProject } from '../models/CommonProject.js'; +import { CommonProjectInfo } from '../models/CommonProjectInfo.js'; +import { CommonProjectProjectMember } from '../models/CommonProjectProjectMember.js'; +import { CommonProjectSuperset } from '../models/CommonProjectSuperset.js'; +import { CommonProjectType } from '../models/CommonProjectType.js'; +import { CommonProjectView } from '../models/CommonProjectView.js'; +import { CommonProjectViewProjectViewConfig } from '../models/CommonProjectViewProjectViewConfig.js'; +import { CommonProjectVisibility } from '../models/CommonProjectVisibility.js'; +import { CommonQuery } from '../models/CommonQuery.js'; +import { CommonRetentionMatrix } from '../models/CommonRetentionMatrix.js'; +import { CommonRetentionMatrixSample } from '../models/CommonRetentionMatrixSample.js'; +import { CommonRetentionQuery } from '../models/CommonRetentionQuery.js'; +import { CommonRetentionQueryCriteria } from '../models/CommonRetentionQueryCriteria.js'; +import { CommonRetentionQueryFilter } from '../models/CommonRetentionQueryFilter.js'; +import { CommonRetentionQueryFilterTimeFilter } from '../models/CommonRetentionQueryFilterTimeFilter.js'; +import { CommonRetentionQueryFilterTimeFilterType } from '../models/CommonRetentionQueryFilterTimeFilterType.js'; +import { CommonRetentionQueryInterval } from '../models/CommonRetentionQueryInterval.js'; +import { CommonRetentionQueryIntervalUnit } from '../models/CommonRetentionQueryIntervalUnit.js'; +import { CommonRetentionQueryResource } from '../models/CommonRetentionQueryResource.js'; +import { CommonRichStruct } from '../models/CommonRichStruct.js'; +import { CommonRichValue } from '../models/CommonRichValue.js'; +import { CommonRichValueList } from '../models/CommonRichValueList.js'; +import { CommonRichValueNullValue } from '../models/CommonRichValueNullValue.js'; +import { CommonSegmentParameter } from '../models/CommonSegmentParameter.js'; +import { CommonSegmentationQuery } from '../models/CommonSegmentationQuery.js'; +import { CommonSegmentationQueryAggregation } from '../models/CommonSegmentationQueryAggregation.js'; +import { CommonSegmentationQueryAggregationAggregateProperties } from '../models/CommonSegmentationQueryAggregationAggregateProperties.js'; +import { CommonSegmentationQueryAggregationAggregatePropertiesAggregationType } from '../models/CommonSegmentationQueryAggregationAggregatePropertiesAggregationType.js'; +import { CommonSegmentationQueryAggregationCountUnique } from '../models/CommonSegmentationQueryAggregationCountUnique.js'; +import { CommonSegmentationQueryResource } from '../models/CommonSegmentationQueryResource.js'; +import { CommonSegmentationQueryResourceType } from '../models/CommonSegmentationQueryResourceType.js'; +import { CommonSegmentationQuerySelectorExpr } from '../models/CommonSegmentationQuerySelectorExpr.js'; +import { CommonSegmentationQuerySelectorExprLogicExpr } from '../models/CommonSegmentationQuerySelectorExprLogicExpr.js'; +import { CommonSelector } from '../models/CommonSelector.js'; +import { CommonSelectorExpr } from '../models/CommonSelectorExpr.js'; +import { CommonSelectorExprLogicExpr } from '../models/CommonSelectorExprLogicExpr.js'; +import { CommonSelectorOperatorType } from '../models/CommonSelectorOperatorType.js'; +import { CommonStringList } from '../models/CommonStringList.js'; +import { CommonTabularData } from '../models/CommonTabularData.js'; +import { CommonTabularDataColumnType } from '../models/CommonTabularDataColumnType.js'; +import { CommonTier } from '../models/CommonTier.js'; +import { CommonTimeRange } from '../models/CommonTimeRange.js'; +import { CommonTimeRangeLite } from '../models/CommonTimeRangeLite.js'; +import { CommonTimeRangeRelativeTime } from '../models/CommonTimeRangeRelativeTime.js'; +import { CommonTimeRangeTimeLike } from '../models/CommonTimeRangeTimeLike.js'; +import { CommonUser } from '../models/CommonUser.js'; +import { CommonUserAccountStatus } from '../models/CommonUserAccountStatus.js'; +import { CommonUserInfo } from '../models/CommonUserInfo.js'; +import { EvmAccessListItem } from '../models/EvmAccessListItem.js'; +import { EvmTransaction } from '../models/EvmTransaction.js'; +import { EvmTransactionReceipt } from '../models/EvmTransactionReceipt.js'; +import { GoogleApiHttpBody } from '../models/GoogleApiHttpBody.js'; +import { GoogleProtobufAny } from '../models/GoogleProtobufAny.js'; +import { GoogleProtobufNullValue } from '../models/GoogleProtobufNullValue.js'; +import { InsightsServiceDataSource } from '../models/InsightsServiceDataSource.js'; +import { InsightsServiceInsightsServiceQueryBody } from '../models/InsightsServiceInsightsServiceQueryBody.js'; +import { InsightsServiceInsightsServiceRetentionBody } from '../models/InsightsServiceInsightsServiceRetentionBody.js'; +import { InsightsServiceListCoinsResponse } from '../models/InsightsServiceListCoinsResponse.js'; +import { InsightsServiceQueryRequestQuery } from '../models/InsightsServiceQueryRequestQuery.js'; +import { InsightsServiceQueryResponse } from '../models/InsightsServiceQueryResponse.js'; +import { InsightsServiceQueryResponseResult } from '../models/InsightsServiceQueryResponseResult.js'; +import { InsightsServiceRetentionRequest } from '../models/InsightsServiceRetentionRequest.js'; +import { InsightsServiceRetentionResponse } from '../models/InsightsServiceRetentionResponse.js'; +import { MetricsServiceGetMetricsResponse } from '../models/MetricsServiceGetMetricsResponse.js'; +import { MetricsServiceMetricInfo } from '../models/MetricsServiceMetricInfo.js'; +import { MetricsServiceMetricInfoLabelValues } from '../models/MetricsServiceMetricInfoLabelValues.js'; +import { MetricsServiceMetricMetadata } from '../models/MetricsServiceMetricMetadata.js'; +import { MetricsServiceMetricsQueryResponse } from '../models/MetricsServiceMetricsQueryResponse.js'; +import { MetricsServiceMetricsQueryResponseMatrix } from '../models/MetricsServiceMetricsQueryResponseMatrix.js'; +import { MetricsServiceMetricsQueryResponseMetric } from '../models/MetricsServiceMetricsQueryResponseMetric.js'; +import { MetricsServiceMetricsQueryResponseResult } from '../models/MetricsServiceMetricsQueryResponseResult.js'; +import { MetricsServiceMetricsQueryResponseSample } from '../models/MetricsServiceMetricsQueryResponseSample.js'; +import { MetricsServiceMetricsQueryResponseValue } from '../models/MetricsServiceMetricsQueryResponseValue.js'; +import { MetricsServiceObservabilityServiceQueryBody } from '../models/MetricsServiceObservabilityServiceQueryBody.js'; +import { MetricsServiceObservabilityServiceQueryRangeBody } from '../models/MetricsServiceObservabilityServiceQueryRangeBody.js'; +import { MetricsServiceQueryValueResponse } from '../models/MetricsServiceQueryValueResponse.js'; +import { MetricsServiceQueryValueResponseResult } from '../models/MetricsServiceQueryValueResponseResult.js'; +import { PriceServiceBatchGetPricesRequest } from '../models/PriceServiceBatchGetPricesRequest.js'; +import { PriceServiceBatchGetPricesResponse } from '../models/PriceServiceBatchGetPricesResponse.js'; +import { PriceServiceBatchGetPricesResponseCoinPrice } from '../models/PriceServiceBatchGetPricesResponseCoinPrice.js'; +import { PriceServiceBatchGetPricesResponseCoinPricePrice } from '../models/PriceServiceBatchGetPricesResponseCoinPricePrice.js'; +import { PriceServiceCheckLatestPriceResponse } from '../models/PriceServiceCheckLatestPriceResponse.js'; +import { PriceServiceCheckLatestPriceResponseCoinPrice } from '../models/PriceServiceCheckLatestPriceResponseCoinPrice.js'; +import { PriceServiceCoinID } from '../models/PriceServiceCoinID.js'; +import { PriceServiceCoinIDAddressIdentifier } from '../models/PriceServiceCoinIDAddressIdentifier.js'; +import { PriceServiceGetPriceResponse } from '../models/PriceServiceGetPriceResponse.js'; +import { PriceServiceListCoinsResponse } from '../models/PriceServiceListCoinsResponse.js'; +import { SolidityServiceBaseChainConfig } from '../models/SolidityServiceBaseChainConfig.js'; +import { SolidityServiceBlockOverrides } from '../models/SolidityServiceBlockOverrides.js'; +import { SolidityServiceChainIdentifier } from '../models/SolidityServiceChainIdentifier.js'; +import { SolidityServiceCompileSourceInternalResponse } from '../models/SolidityServiceCompileSourceInternalResponse.js'; +import { SolidityServiceCompilerOptions } from '../models/SolidityServiceCompilerOptions.js'; +import { SolidityServiceContractKeyInfo } from '../models/SolidityServiceContractKeyInfo.js'; +import { SolidityServiceCreateForkResponse } from '../models/SolidityServiceCreateForkResponse.js'; +import { SolidityServiceDecodeStateDiffResponse } from '../models/SolidityServiceDecodeStateDiffResponse.js'; +import { SolidityServiceExternalFork } from '../models/SolidityServiceExternalFork.js'; +import { SolidityServiceFailure } from '../models/SolidityServiceFailure.js'; +import { SolidityServiceFetchAndCompileInternalResponse } from '../models/SolidityServiceFetchAndCompileInternalResponse.js'; +import { SolidityServiceFork } from '../models/SolidityServiceFork.js'; +import { SolidityServiceForkServiceCreateForkBody } from '../models/SolidityServiceForkServiceCreateForkBody.js'; +import { SolidityServiceForkServiceUpdateForkBody } from '../models/SolidityServiceForkServiceUpdateForkBody.js'; +import { SolidityServiceForkType } from '../models/SolidityServiceForkType.js'; +import { SolidityServiceGetForkInfoResponse } from '../models/SolidityServiceGetForkInfoResponse.js'; +import { SolidityServiceGetForkResponse } from '../models/SolidityServiceGetForkResponse.js'; +import { SolidityServiceGetSimulationBundleResponse } from '../models/SolidityServiceGetSimulationBundleResponse.js'; +import { SolidityServiceGetSimulationResponse } from '../models/SolidityServiceGetSimulationResponse.js'; +import { SolidityServiceGetSimulationsResponse } from '../models/SolidityServiceGetSimulationsResponse.js'; +import { SolidityServiceGetStorageSummaryInternalResponse } from '../models/SolidityServiceGetStorageSummaryInternalResponse.js'; +import { SolidityServiceGetTraceCallInternalRequestBundle } from '../models/SolidityServiceGetTraceCallInternalRequestBundle.js'; +import { SolidityServiceGetTraceCallInternalRequestStateContext } from '../models/SolidityServiceGetTraceCallInternalRequestStateContext.js'; +import { SolidityServiceGetTraceCallInternalResponse } from '../models/SolidityServiceGetTraceCallInternalResponse.js'; +import { SolidityServiceGetTraceTransactionInternalResponse } from '../models/SolidityServiceGetTraceTransactionInternalResponse.js'; +import { SolidityServiceListForksResponse } from '../models/SolidityServiceListForksResponse.js'; +import { SolidityServiceManagedFork } from '../models/SolidityServiceManagedFork.js'; +import { SolidityServiceMetadata } from '../models/SolidityServiceMetadata.js'; +import { SolidityServiceNodeEnvironment } from '../models/SolidityServiceNodeEnvironment.js'; +import { SolidityServiceNodeForkConfig } from '../models/SolidityServiceNodeForkConfig.js'; +import { SolidityServiceOptimizer } from '../models/SolidityServiceOptimizer.js'; +import { SolidityServiceOptimizerDetails } from '../models/SolidityServiceOptimizerDetails.js'; +import { SolidityServiceOptimizerDetailsYulDetails } from '../models/SolidityServiceOptimizerDetailsYulDetails.js'; +import { SolidityServicePreProcessCompilationInternalResponse } from '../models/SolidityServicePreProcessCompilationInternalResponse.js'; +import { SolidityServiceSettings } from '../models/SolidityServiceSettings.js'; +import { SolidityServiceSimulateTransactionBundleResponse } from '../models/SolidityServiceSimulateTransactionBundleResponse.js'; +import { SolidityServiceSimulateTransactionResponse } from '../models/SolidityServiceSimulateTransactionResponse.js'; +import { SolidityServiceSimulation } from '../models/SolidityServiceSimulation.js'; +import { SolidityServiceSimulationResult } from '../models/SolidityServiceSimulationResult.js'; +import { SolidityServiceSolidityAPIServiceSimulateTransactionBody } from '../models/SolidityServiceSolidityAPIServiceSimulateTransactionBody.js'; +import { SolidityServiceSolidityAPIServiceSimulateTransactionBundleBody } from '../models/SolidityServiceSolidityAPIServiceSimulateTransactionBundleBody.js'; +import { SolidityServiceSolidityAPIServiceSimulateTransactionBundleOnForkBody } from '../models/SolidityServiceSolidityAPIServiceSimulateTransactionBundleOnForkBody.js'; +import { SolidityServiceSolidityAPIServiceSimulateTransactionOnForkBody } from '../models/SolidityServiceSolidityAPIServiceSimulateTransactionOnForkBody.js'; +import { SolidityServiceSourceFetcherType } from '../models/SolidityServiceSourceFetcherType.js'; +import { SolidityServiceSourceInfo } from '../models/SolidityServiceSourceInfo.js'; +import { SolidityServiceSourceMultiFile } from '../models/SolidityServiceSourceMultiFile.js'; +import { SolidityServiceSourceSpec } from '../models/SolidityServiceSourceSpec.js'; +import { SolidityServiceSpecializations } from '../models/SolidityServiceSpecializations.js'; +import { SolidityServiceStateOverride } from '../models/SolidityServiceStateOverride.js'; +import { SolidityServiceStorageSummaryResult } from '../models/SolidityServiceStorageSummaryResult.js'; +import { SolidityServiceUpdateForkResponse } from '../models/SolidityServiceUpdateForkResponse.js'; +import { TxindexEvmRawTransaction } from '../models/TxindexEvmRawTransaction.js'; +import { TxindexEvmSearchTransactionsResponse } from '../models/TxindexEvmSearchTransactionsResponse.js'; +import { WebServiceChart } from '../models/WebServiceChart.js'; +import { WebServiceChartChartType } from '../models/WebServiceChartChartType.js'; +import { WebServiceChartConfig } from '../models/WebServiceChartConfig.js'; +import { WebServiceChartConfigBarGaugeConfig } from '../models/WebServiceChartConfigBarGaugeConfig.js'; +import { WebServiceChartConfigCalculation } from '../models/WebServiceChartConfigCalculation.js'; +import { WebServiceChartConfigColorTheme } from '../models/WebServiceChartConfigColorTheme.js'; +import { WebServiceChartConfigColumnSort } from '../models/WebServiceChartConfigColumnSort.js'; +import { WebServiceChartConfigCompareTime } from '../models/WebServiceChartConfigCompareTime.js'; +import { WebServiceChartConfigDirection } from '../models/WebServiceChartConfigDirection.js'; +import { WebServiceChartConfigLineConfig } from '../models/WebServiceChartConfigLineConfig.js'; +import { WebServiceChartConfigLineConfigStyle } from '../models/WebServiceChartConfigLineConfigStyle.js'; +import { WebServiceChartConfigMappingRule } from '../models/WebServiceChartConfigMappingRule.js'; +import { WebServiceChartConfigMarker } from '../models/WebServiceChartConfigMarker.js'; +import { WebServiceChartConfigMarkerType } from '../models/WebServiceChartConfigMarkerType.js'; +import { WebServiceChartConfigPieConfig } from '../models/WebServiceChartConfigPieConfig.js'; +import { WebServiceChartConfigPieConfigPieType } from '../models/WebServiceChartConfigPieConfigPieType.js'; +import { WebServiceChartConfigQueryValueConfig } from '../models/WebServiceChartConfigQueryValueConfig.js'; +import { WebServiceChartConfigSort } from '../models/WebServiceChartConfigSort.js'; +import { WebServiceChartConfigSortBy } from '../models/WebServiceChartConfigSortBy.js'; +import { WebServiceChartConfigTableConfig } from '../models/WebServiceChartConfigTableConfig.js'; +import { WebServiceChartConfigTimeRangeOverride } from '../models/WebServiceChartConfigTimeRangeOverride.js'; +import { WebServiceChartConfigValueConfig } from '../models/WebServiceChartConfigValueConfig.js'; +import { WebServiceChartConfigValueConfigStyle } from '../models/WebServiceChartConfigValueConfigStyle.js'; +import { WebServiceChartConfigValueFormatter } from '../models/WebServiceChartConfigValueFormatter.js'; +import { WebServiceChartConfigYAxisConfig } from '../models/WebServiceChartConfigYAxisConfig.js'; +import { WebServiceChartDataSourceType } from '../models/WebServiceChartDataSourceType.js'; +import { WebServiceDashboard } from '../models/WebServiceDashboard.js'; +import { WebServiceDashboardDashboardVisibility } from '../models/WebServiceDashboardDashboardVisibility.js'; +import { WebServiceDashboardExtra } from '../models/WebServiceDashboardExtra.js'; +import { WebServiceDashboardExtraTemplateVariable } from '../models/WebServiceDashboardExtraTemplateVariable.js'; +import { WebServiceDashboardExtraTemplateView } from '../models/WebServiceDashboardExtraTemplateView.js'; +import { WebServiceDashboardLayouts } from '../models/WebServiceDashboardLayouts.js'; +import { WebServiceDashboardLayoutsLayout } from '../models/WebServiceDashboardLayoutsLayout.js'; +import { WebServiceDashboardResponsiveLayouts } from '../models/WebServiceDashboardResponsiveLayouts.js'; +import { WebServiceDashboardSharing } from '../models/WebServiceDashboardSharing.js'; +import { WebServiceEventLogsConfig } from '../models/WebServiceEventLogsConfig.js'; +import { WebServiceEventLogsConfigTimeRangeOverride } from '../models/WebServiceEventLogsConfigTimeRangeOverride.js'; +import { WebServiceExportDashboardResponse } from '../models/WebServiceExportDashboardResponse.js'; +import { WebServiceGetDashboardResponse } from '../models/WebServiceGetDashboardResponse.js'; +import { WebServiceGetProjectListResponse } from '../models/WebServiceGetProjectListResponse.js'; +import { WebServiceGetProjectResponse } from '../models/WebServiceGetProjectResponse.js'; +import { WebServiceImportDashboardRequest } from '../models/WebServiceImportDashboardRequest.js'; +import { WebServiceImportDashboardResponse } from '../models/WebServiceImportDashboardResponse.js'; +import { WebServiceNote } from '../models/WebServiceNote.js'; +import { WebServiceNoteAlignment } from '../models/WebServiceNoteAlignment.js'; +import { WebServiceNoteFontSize } from '../models/WebServiceNoteFontSize.js'; +import { WebServiceNoteVerticalAlignment } from '../models/WebServiceNoteVerticalAlignment.js'; +import { WebServicePanel } from '../models/WebServicePanel.js'; +import { ObservableDataApi } from './ObservableAPI.js'; + +import { DataApiRequestFactory, DataApiResponseProcessor} from "../apis/DataApi.js"; +export class PromiseDataApi { + private api: ObservableDataApi + + public constructor( + configuration: Configuration, + requestFactory?: DataApiRequestFactory, + responseProcessor?: DataApiResponseProcessor + ) { + this.api = new ObservableDataApi(configuration, requestFactory, responseProcessor); + } + + /** + * Execute SQL in a project. Go to \"Data Studio\" -> \"SQL Editor\", write your query and then click \"Export as cURL\" ![screenshot](https://raw.githubusercontent.com/sentioxyz/docs/main/.gitbook/assets/image%20(102).png) Find more: https://docs.sentio.xyz/reference/data#sql-api + * Execute SQL + * @param owner username or organization name + * @param slug project slug + * @param body + */ + public executeSQLWithHttpInfo(owner: string, slug: string, body: AnalyticServiceAnalyticServiceExecuteSQLBody, _options?: Configuration): Promise> { + const result = this.api.executeSQLWithHttpInfo(owner, slug, body, _options); + return result.toPromise(); + } + + /** + * Execute SQL in a project. Go to \"Data Studio\" -> \"SQL Editor\", write your query and then click \"Export as cURL\" ![screenshot](https://raw.githubusercontent.com/sentioxyz/docs/main/.gitbook/assets/image%20(102).png) Find more: https://docs.sentio.xyz/reference/data#sql-api + * Execute SQL + * @param owner username or organization name + * @param slug project slug + * @param body + */ + public executeSQL(owner: string, slug: string, body: AnalyticServiceAnalyticServiceExecuteSQLBody, _options?: Configuration): Promise { + const result = this.api.executeSQL(owner, slug, body, _options); + return result.toPromise(); + } + + /** + * Get a list of metrics in a project + * @param [projectId] + * @param [name] + * @param [version] + */ + public getMetricsWithHttpInfo(projectId?: string, name?: string, version?: number, _options?: Configuration): Promise> { + const result = this.api.getMetricsWithHttpInfo(projectId, name, version, _options); + return result.toPromise(); + } + + /** + * Get a list of metrics in a project + * @param [projectId] + * @param [name] + * @param [version] + */ + public getMetrics(projectId?: string, name?: string, version?: number, _options?: Configuration): Promise { + const result = this.api.getMetrics(projectId, name, version, _options); + return result.toPromise(); + } + + /** + * Get a list of coins in a project. + * List coins + * @param owner + * @param slug + * @param [projectId] + * @param [version] + * @param [limit] + * @param [offset] + * @param [searchQuery] + */ + public listCoinsWithHttpInfo(owner: string, slug: string, projectId?: string, version?: number, limit?: number, offset?: number, searchQuery?: string, _options?: Configuration): Promise> { + const result = this.api.listCoinsWithHttpInfo(owner, slug, projectId, version, limit, offset, searchQuery, _options); + return result.toPromise(); + } + + /** + * Get a list of coins in a project. + * List coins + * @param owner + * @param slug + * @param [projectId] + * @param [version] + * @param [limit] + * @param [offset] + * @param [searchQuery] + */ + public listCoins(owner: string, slug: string, projectId?: string, version?: number, limit?: number, offset?: number, searchQuery?: string, _options?: Configuration): Promise { + const result = this.api.listCoins(owner, slug, projectId, version, limit, offset, searchQuery, _options); + return result.toPromise(); + } + + /** + * Get a list of coins in a project. + * List coins + * @param [projectOwner] + * @param [projectSlug] + * @param [projectId] + * @param [version] + * @param [limit] + * @param [offset] + * @param [searchQuery] + */ + public listCoins2WithHttpInfo(projectOwner?: string, projectSlug?: string, projectId?: string, version?: number, limit?: number, offset?: number, searchQuery?: string, _options?: Configuration): Promise> { + const result = this.api.listCoins2WithHttpInfo(projectOwner, projectSlug, projectId, version, limit, offset, searchQuery, _options); + return result.toPromise(); + } + + /** + * Get a list of coins in a project. + * List coins + * @param [projectOwner] + * @param [projectSlug] + * @param [projectId] + * @param [version] + * @param [limit] + * @param [offset] + * @param [searchQuery] + */ + public listCoins2(projectOwner?: string, projectSlug?: string, projectId?: string, version?: number, limit?: number, offset?: number, searchQuery?: string, _options?: Configuration): Promise { + const result = this.api.listCoins2(projectOwner, projectSlug, projectId, version, limit, offset, searchQuery, _options); + return result.toPromise(); + } + + /** + * Query for metrics,event logs and coin prices in a project. + * Insight Query + * @param owner username or organization name + * @param slug project slug + * @param body + */ + public queryWithHttpInfo(owner: string, slug: string, body: InsightsServiceInsightsServiceQueryBody, _options?: Configuration): Promise> { + const result = this.api.queryWithHttpInfo(owner, slug, body, _options); + return result.toPromise(); + } + + /** + * Query for metrics,event logs and coin prices in a project. + * Insight Query + * @param owner username or organization name + * @param slug project slug + * @param body + */ + public query(owner: string, slug: string, body: InsightsServiceInsightsServiceQueryBody, _options?: Configuration): Promise { + const result = this.api.query(owner, slug, body, _options); + return result.toPromise(); + } + + /** + * Metric instant queries + * @param owner username or organization name + * @param slug project slug + * @param body + */ + public queryInstantWithHttpInfo(owner: string, slug: string, body: MetricsServiceObservabilityServiceQueryBody, _options?: Configuration): Promise> { + const result = this.api.queryInstantWithHttpInfo(owner, slug, body, _options); + return result.toPromise(); + } + + /** + * Metric instant queries + * @param owner username or organization name + * @param slug project slug + * @param body + */ + public queryInstant(owner: string, slug: string, body: MetricsServiceObservabilityServiceQueryBody, _options?: Configuration): Promise { + const result = this.api.queryInstant(owner, slug, body, _options); + return result.toPromise(); + } + + /** + * Query event logs + * @param owner + * @param slug + * @param body + */ + public queryLogWithHttpInfo(owner: string, slug: string, body: AnalyticServiceSearchServiceQueryLogBody, _options?: Configuration): Promise> { + const result = this.api.queryLogWithHttpInfo(owner, slug, body, _options); + return result.toPromise(); + } + + /** + * Query event logs + * @param owner + * @param slug + * @param body + */ + public queryLog(owner: string, slug: string, body: AnalyticServiceSearchServiceQueryLogBody, _options?: Configuration): Promise { + const result = this.api.queryLog(owner, slug, body, _options); + return result.toPromise(); + } + + /** + * Query event logs + * @param owner + * @param slug + * @param [projectId] + * @param [query] + * @param [timeRangeStartRelativeTimeUnit] + * @param [timeRangeStartRelativeTimeValue] + * @param [timeRangeStartRelativeTimeAlign] + * @param [timeRangeStartAbsoluteTime] + * @param [timeRangeEndRelativeTimeUnit] + * @param [timeRangeEndRelativeTimeValue] + * @param [timeRangeEndRelativeTimeAlign] + * @param [timeRangeEndAbsoluteTime] + * @param [timeRangeStep] + * @param [timeRangeIntervalValue] + * @param [timeRangeIntervalUnit] + * @param [timeRangeTimezone] + * @param [limit] + * @param [offset] + * @param [version] + */ + public queryLog2WithHttpInfo(owner: string, slug: string, projectId?: string, query?: string, timeRangeStartRelativeTimeUnit?: string, timeRangeStartRelativeTimeValue?: number, timeRangeStartRelativeTimeAlign?: string, timeRangeStartAbsoluteTime?: string, timeRangeEndRelativeTimeUnit?: string, timeRangeEndRelativeTimeValue?: number, timeRangeEndRelativeTimeAlign?: string, timeRangeEndAbsoluteTime?: string, timeRangeStep?: string, timeRangeIntervalValue?: number, timeRangeIntervalUnit?: string, timeRangeTimezone?: string, limit?: number, offset?: number, version?: number, _options?: Configuration): Promise> { + const result = this.api.queryLog2WithHttpInfo(owner, slug, projectId, query, timeRangeStartRelativeTimeUnit, timeRangeStartRelativeTimeValue, timeRangeStartRelativeTimeAlign, timeRangeStartAbsoluteTime, timeRangeEndRelativeTimeUnit, timeRangeEndRelativeTimeValue, timeRangeEndRelativeTimeAlign, timeRangeEndAbsoluteTime, timeRangeStep, timeRangeIntervalValue, timeRangeIntervalUnit, timeRangeTimezone, limit, offset, version, _options); + return result.toPromise(); + } + + /** + * Query event logs + * @param owner + * @param slug + * @param [projectId] + * @param [query] + * @param [timeRangeStartRelativeTimeUnit] + * @param [timeRangeStartRelativeTimeValue] + * @param [timeRangeStartRelativeTimeAlign] + * @param [timeRangeStartAbsoluteTime] + * @param [timeRangeEndRelativeTimeUnit] + * @param [timeRangeEndRelativeTimeValue] + * @param [timeRangeEndRelativeTimeAlign] + * @param [timeRangeEndAbsoluteTime] + * @param [timeRangeStep] + * @param [timeRangeIntervalValue] + * @param [timeRangeIntervalUnit] + * @param [timeRangeTimezone] + * @param [limit] + * @param [offset] + * @param [version] + */ + public queryLog2(owner: string, slug: string, projectId?: string, query?: string, timeRangeStartRelativeTimeUnit?: string, timeRangeStartRelativeTimeValue?: number, timeRangeStartRelativeTimeAlign?: string, timeRangeStartAbsoluteTime?: string, timeRangeEndRelativeTimeUnit?: string, timeRangeEndRelativeTimeValue?: number, timeRangeEndRelativeTimeAlign?: string, timeRangeEndAbsoluteTime?: string, timeRangeStep?: string, timeRangeIntervalValue?: number, timeRangeIntervalUnit?: string, timeRangeTimezone?: string, limit?: number, offset?: number, version?: number, _options?: Configuration): Promise { + const result = this.api.queryLog2(owner, slug, projectId, query, timeRangeStartRelativeTimeUnit, timeRangeStartRelativeTimeValue, timeRangeStartRelativeTimeAlign, timeRangeStartAbsoluteTime, timeRangeEndRelativeTimeUnit, timeRangeEndRelativeTimeValue, timeRangeEndRelativeTimeAlign, timeRangeEndAbsoluteTime, timeRangeStep, timeRangeIntervalValue, timeRangeIntervalUnit, timeRangeTimezone, limit, offset, version, _options); + return result.toPromise(); + } + + /** + * The easiest way to build query is through UI, you could first create an insight chart, and then **Export as cURL**. ![screenshot](https://raw.githubusercontent.com/sentioxyz/docs/main/.gitbook/assets/image%20(101).png) + * Metric range queries + * @param owner username or organization name + * @param slug project slug + * @param body + */ + public queryRangeWithHttpInfo(owner: string, slug: string, body: MetricsServiceObservabilityServiceQueryRangeBody, _options?: Configuration): Promise> { + const result = this.api.queryRangeWithHttpInfo(owner, slug, body, _options); + return result.toPromise(); + } + + /** + * The easiest way to build query is through UI, you could first create an insight chart, and then **Export as cURL**. ![screenshot](https://raw.githubusercontent.com/sentioxyz/docs/main/.gitbook/assets/image%20(101).png) + * Metric range queries + * @param owner username or organization name + * @param slug project slug + * @param body + */ + public queryRange(owner: string, slug: string, body: MetricsServiceObservabilityServiceQueryRangeBody, _options?: Configuration): Promise { + const result = this.api.queryRange(owner, slug, body, _options); + return result.toPromise(); + } + + /** + * Query for retention. + * Retention query + * @param owner + * @param slug + * @param body + */ + public retentionWithHttpInfo(owner: string, slug: string, body: InsightsServiceInsightsServiceRetentionBody, _options?: Configuration): Promise> { + const result = this.api.retentionWithHttpInfo(owner, slug, body, _options); + return result.toPromise(); + } + + /** + * Query for retention. + * Retention query + * @param owner + * @param slug + * @param body + */ + public retention(owner: string, slug: string, body: InsightsServiceInsightsServiceRetentionBody, _options?: Configuration): Promise { + const result = this.api.retention(owner, slug, body, _options); + return result.toPromise(); + } + + /** + * Query for retention. + * Retention query + * @param body + */ + public retention2WithHttpInfo(body: InsightsServiceRetentionRequest, _options?: Configuration): Promise> { + const result = this.api.retention2WithHttpInfo(body, _options); + return result.toPromise(); + } + + /** + * Query for retention. + * Retention query + * @param body + */ + public retention2(body: InsightsServiceRetentionRequest, _options?: Configuration): Promise { + const result = this.api.retention2(body, _options); + return result.toPromise(); + } + + +} + + + +import { ObservableDebugAndSimulationApi } from './ObservableAPI.js'; + +import { DebugAndSimulationApiRequestFactory, DebugAndSimulationApiResponseProcessor} from "../apis/DebugAndSimulationApi.js"; +export class PromiseDebugAndSimulationApi { + private api: ObservableDebugAndSimulationApi + + public constructor( + configuration: Configuration, + requestFactory?: DebugAndSimulationApiRequestFactory, + responseProcessor?: DebugAndSimulationApiResponseProcessor + ) { + this.api = new ObservableDebugAndSimulationApi(configuration, requestFactory, responseProcessor); + } + + /** + * Get trace by bundle simulation + * @param owner + * @param slug + * @param chainId + * @param bundleId + * @param [withInternalCalls] Fetch the decoded trace, which will give you the function info, decoded parameters of both external and internal call trace. + * @param [disableOptimizer] Disable optimizations to make internal calls more accurate, but gas costs will differ from the actual execution. + * @param [ignoreGasCost] Only effective when disableOptimizer=true. + */ + public getCallTraceByBundleWithHttpInfo(owner: string, slug: string, chainId: string, bundleId: string, withInternalCalls?: boolean, disableOptimizer?: boolean, ignoreGasCost?: boolean, _options?: Configuration): Promise> { + const result = this.api.getCallTraceByBundleWithHttpInfo(owner, slug, chainId, bundleId, withInternalCalls, disableOptimizer, ignoreGasCost, _options); + return result.toPromise(); + } + + /** + * Get trace by bundle simulation + * @param owner + * @param slug + * @param chainId + * @param bundleId + * @param [withInternalCalls] Fetch the decoded trace, which will give you the function info, decoded parameters of both external and internal call trace. + * @param [disableOptimizer] Disable optimizations to make internal calls more accurate, but gas costs will differ from the actual execution. + * @param [ignoreGasCost] Only effective when disableOptimizer=true. + */ + public getCallTraceByBundle(owner: string, slug: string, chainId: string, bundleId: string, withInternalCalls?: boolean, disableOptimizer?: boolean, ignoreGasCost?: boolean, _options?: Configuration): Promise { + const result = this.api.getCallTraceByBundle(owner, slug, chainId, bundleId, withInternalCalls, disableOptimizer, ignoreGasCost, _options); + return result.toPromise(); + } + + /** + * Get trace by simulation + * @param owner + * @param slug + * @param chainId + * @param simulationId + * @param [withInternalCalls] Fetch the decoded trace, which will give you the function info, decoded parameters of both external and internal call trace. + * @param [disableOptimizer] Disable optimizations to make internal calls more accurate, but gas costs will differ from the actual execution. + * @param [ignoreGasCost] Only effective when disableOptimizer=true. + */ + public getCallTraceBySimulationWithHttpInfo(owner: string, slug: string, chainId: string, simulationId: string, withInternalCalls?: boolean, disableOptimizer?: boolean, ignoreGasCost?: boolean, _options?: Configuration): Promise> { + const result = this.api.getCallTraceBySimulationWithHttpInfo(owner, slug, chainId, simulationId, withInternalCalls, disableOptimizer, ignoreGasCost, _options); + return result.toPromise(); + } + + /** + * Get trace by simulation + * @param owner + * @param slug + * @param chainId + * @param simulationId + * @param [withInternalCalls] Fetch the decoded trace, which will give you the function info, decoded parameters of both external and internal call trace. + * @param [disableOptimizer] Disable optimizations to make internal calls more accurate, but gas costs will differ from the actual execution. + * @param [ignoreGasCost] Only effective when disableOptimizer=true. + */ + public getCallTraceBySimulation(owner: string, slug: string, chainId: string, simulationId: string, withInternalCalls?: boolean, disableOptimizer?: boolean, ignoreGasCost?: boolean, _options?: Configuration): Promise { + const result = this.api.getCallTraceBySimulation(owner, slug, chainId, simulationId, withInternalCalls, disableOptimizer, ignoreGasCost, _options); + return result.toPromise(); + } + + /** + * API to get Sentio call trace. It takes `txId.txHash` and `chainSpec.chainId` arguments, where the first is transaction hash, and the second is the numeric ethereum chain ID. The results looks very similar to the normal [Ethereum call trace](https://raw.githubusercontent.com/sentioxyz/docs/main/.gitbook/assets/image%20(2)%20(1)%20(1)%20(1).png). But we have an additional `startIndex` and `startIndex` on each trace entry even for the LOG, representing the execution order in the trace. This allows you to build chart that marks the order of fund flow. ![screenshot](https://raw.githubusercontent.com/sentioxyz/docs/main/.gitbook/assets/image%20(2)%20(1)%20(1)%20(1).png) + * Get trace by transaction + * @param owner + * @param slug + * @param chainId + * @param txHash + * @param [withInternalCalls] Fetch the decoded trace, which will give you the function info, decoded parameters of both external and internal call trace. + * @param [disableOptimizer] Disable optimizations to make internal calls more accurate, but gas costs will differ from the actual execution. + * @param [ignoreGasCost] Only effective when disableOptimizer=true. + */ + public getCallTraceByTransactionWithHttpInfo(owner: string, slug: string, chainId: string, txHash: string, withInternalCalls?: boolean, disableOptimizer?: boolean, ignoreGasCost?: boolean, _options?: Configuration): Promise> { + const result = this.api.getCallTraceByTransactionWithHttpInfo(owner, slug, chainId, txHash, withInternalCalls, disableOptimizer, ignoreGasCost, _options); + return result.toPromise(); + } + + /** + * API to get Sentio call trace. It takes `txId.txHash` and `chainSpec.chainId` arguments, where the first is transaction hash, and the second is the numeric ethereum chain ID. The results looks very similar to the normal [Ethereum call trace](https://raw.githubusercontent.com/sentioxyz/docs/main/.gitbook/assets/image%20(2)%20(1)%20(1)%20(1).png). But we have an additional `startIndex` and `startIndex` on each trace entry even for the LOG, representing the execution order in the trace. This allows you to build chart that marks the order of fund flow. ![screenshot](https://raw.githubusercontent.com/sentioxyz/docs/main/.gitbook/assets/image%20(2)%20(1)%20(1)%20(1).png) + * Get trace by transaction + * @param owner + * @param slug + * @param chainId + * @param txHash + * @param [withInternalCalls] Fetch the decoded trace, which will give you the function info, decoded parameters of both external and internal call trace. + * @param [disableOptimizer] Disable optimizations to make internal calls more accurate, but gas costs will differ from the actual execution. + * @param [ignoreGasCost] Only effective when disableOptimizer=true. + */ + public getCallTraceByTransaction(owner: string, slug: string, chainId: string, txHash: string, withInternalCalls?: boolean, disableOptimizer?: boolean, ignoreGasCost?: boolean, _options?: Configuration): Promise { + const result = this.api.getCallTraceByTransaction(owner, slug, chainId, txHash, withInternalCalls, disableOptimizer, ignoreGasCost, _options); + return result.toPromise(); + } + + /** + * Get simulation by ID + * @param owner + * @param slug + * @param simulationId + */ + public getSimulationWithHttpInfo(owner: string, slug: string, simulationId: string, _options?: Configuration): Promise> { + const result = this.api.getSimulationWithHttpInfo(owner, slug, simulationId, _options); + return result.toPromise(); + } + + /** + * Get simulation by ID + * @param owner + * @param slug + * @param simulationId + */ + public getSimulation(owner: string, slug: string, simulationId: string, _options?: Configuration): Promise { + const result = this.api.getSimulation(owner, slug, simulationId, _options); + return result.toPromise(); + } + + /** + * Get bundle simulation by ID + * @param owner + * @param slug + * @param bundleId + */ + public getSimulationBundleInProjectWithHttpInfo(owner: string, slug: string, bundleId: string, _options?: Configuration): Promise> { + const result = this.api.getSimulationBundleInProjectWithHttpInfo(owner, slug, bundleId, _options); + return result.toPromise(); + } + + /** + * Get bundle simulation by ID + * @param owner + * @param slug + * @param bundleId + */ + public getSimulationBundleInProject(owner: string, slug: string, bundleId: string, _options?: Configuration): Promise { + const result = this.api.getSimulationBundleInProject(owner, slug, bundleId, _options); + return result.toPromise(); + } + + /** + * Get list of simulations + * @param owner + * @param slug + * @param [labelContains] + * @param [page] + * @param [pageSize] + */ + public getSimulationsWithHttpInfo(owner: string, slug: string, labelContains?: string, page?: number, pageSize?: number, _options?: Configuration): Promise> { + const result = this.api.getSimulationsWithHttpInfo(owner, slug, labelContains, page, pageSize, _options); + return result.toPromise(); + } + + /** + * Get list of simulations + * @param owner + * @param slug + * @param [labelContains] + * @param [page] + * @param [pageSize] + */ + public getSimulations(owner: string, slug: string, labelContains?: string, page?: number, pageSize?: number, _options?: Configuration): Promise { + const result = this.api.getSimulations(owner, slug, labelContains, page, pageSize, _options); + return result.toPromise(); + } + + /** + * Search transactions + * @param owner + * @param slug + * @param [chainId] + * @param [address] + * @param [includeDirect] + * @param [includeTrace] + * @param [includeIn] + * @param [includeOut] + * @param [startBlock] + * @param [endBlock] + * @param [startTimestamp] + * @param [endTimestamp] + * @param [transactionStatus] + * @param [methodSignature] + * @param [limit] + * @param [pageToken] + */ + public searchTransactionsWithHttpInfo(owner: string, slug: string, chainId?: Array, address?: Array, includeDirect?: boolean, includeTrace?: boolean, includeIn?: boolean, includeOut?: boolean, startBlock?: string, endBlock?: string, startTimestamp?: string, endTimestamp?: string, transactionStatus?: Array, methodSignature?: string, limit?: number, pageToken?: string, _options?: Configuration): Promise> { + const result = this.api.searchTransactionsWithHttpInfo(owner, slug, chainId, address, includeDirect, includeTrace, includeIn, includeOut, startBlock, endBlock, startTimestamp, endTimestamp, transactionStatus, methodSignature, limit, pageToken, _options); + return result.toPromise(); + } + + /** + * Search transactions + * @param owner + * @param slug + * @param [chainId] + * @param [address] + * @param [includeDirect] + * @param [includeTrace] + * @param [includeIn] + * @param [includeOut] + * @param [startBlock] + * @param [endBlock] + * @param [startTimestamp] + * @param [endTimestamp] + * @param [transactionStatus] + * @param [methodSignature] + * @param [limit] + * @param [pageToken] + */ + public searchTransactions(owner: string, slug: string, chainId?: Array, address?: Array, includeDirect?: boolean, includeTrace?: boolean, includeIn?: boolean, includeOut?: boolean, startBlock?: string, endBlock?: string, startTimestamp?: string, endTimestamp?: string, transactionStatus?: Array, methodSignature?: string, limit?: number, pageToken?: string, _options?: Configuration): Promise { + const result = this.api.searchTransactions(owner, slug, chainId, address, includeDirect, includeTrace, includeIn, includeOut, startBlock, endBlock, startTimestamp, endTimestamp, transactionStatus, methodSignature, limit, pageToken, _options); + return result.toPromise(); + } + + /** + * Create a new transaction simulation. The simulation body should be included in the request body. Your simulations will be saved, and a unique ID for each simulation is included in the response. It will be useful for fetching simulation details. + * Run simulation + * @param owner + * @param slug + * @param chainId + * @param body + */ + public simulateTransactionWithHttpInfo(owner: string, slug: string, chainId: string, body: SolidityServiceSolidityAPIServiceSimulateTransactionBody, _options?: Configuration): Promise> { + const result = this.api.simulateTransactionWithHttpInfo(owner, slug, chainId, body, _options); + return result.toPromise(); + } + + /** + * Create a new transaction simulation. The simulation body should be included in the request body. Your simulations will be saved, and a unique ID for each simulation is included in the response. It will be useful for fetching simulation details. + * Run simulation + * @param owner + * @param slug + * @param chainId + * @param body + */ + public simulateTransaction(owner: string, slug: string, chainId: string, body: SolidityServiceSolidityAPIServiceSimulateTransactionBody, _options?: Configuration): Promise { + const result = this.api.simulateTransaction(owner, slug, chainId, body, _options); + return result.toPromise(); + } + + /** + * You could also create bundle simulations so that one transaction could be executed one after another. For `blockNumber` `transactionIndex` `networkId` `stateOverrides` and `blockOverrides` fields, only the first simulation takes effect. + * Run bundle simulation + * @param owner + * @param slug + * @param chainId + * @param body + */ + public simulateTransactionBundleWithHttpInfo(owner: string, slug: string, chainId: string, body: SolidityServiceSolidityAPIServiceSimulateTransactionBundleBody, _options?: Configuration): Promise> { + const result = this.api.simulateTransactionBundleWithHttpInfo(owner, slug, chainId, body, _options); + return result.toPromise(); + } + + /** + * You could also create bundle simulations so that one transaction could be executed one after another. For `blockNumber` `transactionIndex` `networkId` `stateOverrides` and `blockOverrides` fields, only the first simulation takes effect. + * Run bundle simulation + * @param owner + * @param slug + * @param chainId + * @param body + */ + public simulateTransactionBundle(owner: string, slug: string, chainId: string, body: SolidityServiceSolidityAPIServiceSimulateTransactionBundleBody, _options?: Configuration): Promise { + const result = this.api.simulateTransactionBundle(owner, slug, chainId, body, _options); + return result.toPromise(); + } + + +} + + + +import { ObservableForksApi } from './ObservableAPI.js'; + +import { ForksApiRequestFactory, ForksApiResponseProcessor} from "../apis/ForksApi.js"; +export class PromiseForksApi { + private api: ObservableForksApi + + public constructor( + configuration: Configuration, + requestFactory?: ForksApiRequestFactory, + responseProcessor?: ForksApiResponseProcessor + ) { + this.api = new ObservableForksApi(configuration, requestFactory, responseProcessor); + } + + /** + * Create a fork + * @param owner + * @param slug + * @param body + */ + public createForkWithHttpInfo(owner: string, slug: string, body: SolidityServiceForkServiceCreateForkBody, _options?: Configuration): Promise> { + const result = this.api.createForkWithHttpInfo(owner, slug, body, _options); + return result.toPromise(); + } + + /** + * Create a fork + * @param owner + * @param slug + * @param body + */ + public createFork(owner: string, slug: string, body: SolidityServiceForkServiceCreateForkBody, _options?: Configuration): Promise { + const result = this.api.createFork(owner, slug, body, _options); + return result.toPromise(); + } + + /** + * Delete fork by id + * @param owner + * @param slug + * @param id + */ + public deleteForkWithHttpInfo(owner: string, slug: string, id: string, _options?: Configuration): Promise> { + const result = this.api.deleteForkWithHttpInfo(owner, slug, id, _options); + return result.toPromise(); + } + + /** + * Delete fork by id + * @param owner + * @param slug + * @param id + */ + public deleteFork(owner: string, slug: string, id: string, _options?: Configuration): Promise { + const result = this.api.deleteFork(owner, slug, id, _options); + return result.toPromise(); + } + + /** + * Get trace by bundle simulation + * @param owner + * @param slug + * @param forkId + * @param bundleId + * @param [withInternalCalls] Fetch the decoded trace, which will give you the function info, decoded parameters of both external and internal call trace. + * @param [disableOptimizer] Disable optimizations to make internal calls more accurate, but gas costs will differ from the actual execution. + * @param [ignoreGasCost] Only effective when disableOptimizer=true. + */ + public getCallTraceOnForkBundleWithHttpInfo(owner: string, slug: string, forkId: string, bundleId: string, withInternalCalls?: boolean, disableOptimizer?: boolean, ignoreGasCost?: boolean, _options?: Configuration): Promise> { + const result = this.api.getCallTraceOnForkBundleWithHttpInfo(owner, slug, forkId, bundleId, withInternalCalls, disableOptimizer, ignoreGasCost, _options); + return result.toPromise(); + } + + /** + * Get trace by bundle simulation + * @param owner + * @param slug + * @param forkId + * @param bundleId + * @param [withInternalCalls] Fetch the decoded trace, which will give you the function info, decoded parameters of both external and internal call trace. + * @param [disableOptimizer] Disable optimizations to make internal calls more accurate, but gas costs will differ from the actual execution. + * @param [ignoreGasCost] Only effective when disableOptimizer=true. + */ + public getCallTraceOnForkBundle(owner: string, slug: string, forkId: string, bundleId: string, withInternalCalls?: boolean, disableOptimizer?: boolean, ignoreGasCost?: boolean, _options?: Configuration): Promise { + const result = this.api.getCallTraceOnForkBundle(owner, slug, forkId, bundleId, withInternalCalls, disableOptimizer, ignoreGasCost, _options); + return result.toPromise(); + } + + /** + * Get trace by simulation + * @param owner + * @param slug + * @param forkId + * @param simulationId + * @param [withInternalCalls] Fetch the decoded trace, which will give you the function info, decoded parameters of both external and internal call trace. + * @param [disableOptimizer] Disable optimizations to make internal calls more accurate, but gas costs will differ from the actual execution. + * @param [ignoreGasCost] Only effective when disableOptimizer=true. + */ + public getCallTraceOnForkSimulationWithHttpInfo(owner: string, slug: string, forkId: string, simulationId: string, withInternalCalls?: boolean, disableOptimizer?: boolean, ignoreGasCost?: boolean, _options?: Configuration): Promise> { + const result = this.api.getCallTraceOnForkSimulationWithHttpInfo(owner, slug, forkId, simulationId, withInternalCalls, disableOptimizer, ignoreGasCost, _options); + return result.toPromise(); + } + + /** + * Get trace by simulation + * @param owner + * @param slug + * @param forkId + * @param simulationId + * @param [withInternalCalls] Fetch the decoded trace, which will give you the function info, decoded parameters of both external and internal call trace. + * @param [disableOptimizer] Disable optimizations to make internal calls more accurate, but gas costs will differ from the actual execution. + * @param [ignoreGasCost] Only effective when disableOptimizer=true. + */ + public getCallTraceOnForkSimulation(owner: string, slug: string, forkId: string, simulationId: string, withInternalCalls?: boolean, disableOptimizer?: boolean, ignoreGasCost?: boolean, _options?: Configuration): Promise { + const result = this.api.getCallTraceOnForkSimulation(owner, slug, forkId, simulationId, withInternalCalls, disableOptimizer, ignoreGasCost, _options); + return result.toPromise(); + } + + /** + * Get trace by transaction + * @param owner + * @param slug + * @param forkId + * @param txHash + * @param [withInternalCalls] Fetch the decoded trace, which will give you the function info, decoded parameters of both external and internal call trace. + * @param [disableOptimizer] Disable optimizations to make internal calls more accurate, but gas costs will differ from the actual execution. + * @param [ignoreGasCost] Only effective when disableOptimizer=true. + */ + public getCallTraceOnForkTransactionWithHttpInfo(owner: string, slug: string, forkId: string, txHash: string, withInternalCalls?: boolean, disableOptimizer?: boolean, ignoreGasCost?: boolean, _options?: Configuration): Promise> { + const result = this.api.getCallTraceOnForkTransactionWithHttpInfo(owner, slug, forkId, txHash, withInternalCalls, disableOptimizer, ignoreGasCost, _options); + return result.toPromise(); + } + + /** + * Get trace by transaction + * @param owner + * @param slug + * @param forkId + * @param txHash + * @param [withInternalCalls] Fetch the decoded trace, which will give you the function info, decoded parameters of both external and internal call trace. + * @param [disableOptimizer] Disable optimizations to make internal calls more accurate, but gas costs will differ from the actual execution. + * @param [ignoreGasCost] Only effective when disableOptimizer=true. + */ + public getCallTraceOnForkTransaction(owner: string, slug: string, forkId: string, txHash: string, withInternalCalls?: boolean, disableOptimizer?: boolean, ignoreGasCost?: boolean, _options?: Configuration): Promise { + const result = this.api.getCallTraceOnForkTransaction(owner, slug, forkId, txHash, withInternalCalls, disableOptimizer, ignoreGasCost, _options); + return result.toPromise(); + } + + /** + * Get fork by id + * @param owner + * @param slug + * @param id + */ + public getForkWithHttpInfo(owner: string, slug: string, id: string, _options?: Configuration): Promise> { + const result = this.api.getForkWithHttpInfo(owner, slug, id, _options); + return result.toPromise(); + } + + /** + * Get fork by id + * @param owner + * @param slug + * @param id + */ + public getFork(owner: string, slug: string, id: string, _options?: Configuration): Promise { + const result = this.api.getFork(owner, slug, id, _options); + return result.toPromise(); + } + + /** + * Get fork info by id + * @param owner + * @param slug + * @param id + */ + public getForkInfoWithHttpInfo(owner: string, slug: string, id: string, _options?: Configuration): Promise> { + const result = this.api.getForkInfoWithHttpInfo(owner, slug, id, _options); + return result.toPromise(); + } + + /** + * Get fork info by id + * @param owner + * @param slug + * @param id + */ + public getForkInfo(owner: string, slug: string, id: string, _options?: Configuration): Promise { + const result = this.api.getForkInfo(owner, slug, id, _options); + return result.toPromise(); + } + + /** + * List all forks + * @param owner + * @param slug + */ + public listForksWithHttpInfo(owner: string, slug: string, _options?: Configuration): Promise> { + const result = this.api.listForksWithHttpInfo(owner, slug, _options); + return result.toPromise(); + } + + /** + * List all forks + * @param owner + * @param slug + */ + public listForks(owner: string, slug: string, _options?: Configuration): Promise { + const result = this.api.listForks(owner, slug, _options); + return result.toPromise(); + } + + /** + * Run bundle simulation + * @param owner + * @param slug + * @param forkId + * @param body + */ + public simulateTransactionBundleOnForkWithHttpInfo(owner: string, slug: string, forkId: string, body: SolidityServiceSolidityAPIServiceSimulateTransactionBundleOnForkBody, _options?: Configuration): Promise> { + const result = this.api.simulateTransactionBundleOnForkWithHttpInfo(owner, slug, forkId, body, _options); + return result.toPromise(); + } + + /** + * Run bundle simulation + * @param owner + * @param slug + * @param forkId + * @param body + */ + public simulateTransactionBundleOnFork(owner: string, slug: string, forkId: string, body: SolidityServiceSolidityAPIServiceSimulateTransactionBundleOnForkBody, _options?: Configuration): Promise { + const result = this.api.simulateTransactionBundleOnFork(owner, slug, forkId, body, _options); + return result.toPromise(); + } + + /** + * Run Simulation + * @param owner + * @param slug + * @param forkId + * @param body + */ + public simulateTransactionOnForkWithHttpInfo(owner: string, slug: string, forkId: string, body: SolidityServiceSolidityAPIServiceSimulateTransactionOnForkBody, _options?: Configuration): Promise> { + const result = this.api.simulateTransactionOnForkWithHttpInfo(owner, slug, forkId, body, _options); + return result.toPromise(); + } + + /** + * Run Simulation + * @param owner + * @param slug + * @param forkId + * @param body + */ + public simulateTransactionOnFork(owner: string, slug: string, forkId: string, body: SolidityServiceSolidityAPIServiceSimulateTransactionOnForkBody, _options?: Configuration): Promise { + const result = this.api.simulateTransactionOnFork(owner, slug, forkId, body, _options); + return result.toPromise(); + } + + /** + * Update fork by id + * @param owner + * @param slug + * @param id + * @param body + */ + public updateForkWithHttpInfo(owner: string, slug: string, id: string, body: SolidityServiceForkServiceUpdateForkBody, _options?: Configuration): Promise> { + const result = this.api.updateForkWithHttpInfo(owner, slug, id, body, _options); + return result.toPromise(); + } + + /** + * Update fork by id + * @param owner + * @param slug + * @param id + * @param body + */ + public updateFork(owner: string, slug: string, id: string, body: SolidityServiceForkServiceUpdateForkBody, _options?: Configuration): Promise { + const result = this.api.updateFork(owner, slug, id, body, _options); + return result.toPromise(); + } + + +} + + + +import { ObservablePriceApi } from './ObservableAPI.js'; + +import { PriceApiRequestFactory, PriceApiResponseProcessor} from "../apis/PriceApi.js"; +export class PromisePriceApi { + private api: ObservablePriceApi + + public constructor( + configuration: Configuration, + requestFactory?: PriceApiRequestFactory, + responseProcessor?: PriceApiResponseProcessor + ) { + this.api = new ObservablePriceApi(configuration, requestFactory, responseProcessor); + } + + /** + * Batch get prices + * @param body + */ + public batchGetPricesWithHttpInfo(body: PriceServiceBatchGetPricesRequest, _options?: Configuration): Promise> { + const result = this.api.batchGetPricesWithHttpInfo(body, _options); + return result.toPromise(); + } + + /** + * Batch get prices + * @param body + */ + public batchGetPrices(body: PriceServiceBatchGetPricesRequest, _options?: Configuration): Promise { + const result = this.api.batchGetPrices(body, _options); + return result.toPromise(); + } + + /** + * Check latest price + */ + public checkLatestPriceWithHttpInfo(_options?: Configuration): Promise> { + const result = this.api.checkLatestPriceWithHttpInfo(_options); + return result.toPromise(); + } + + /** + * Check latest price + */ + public checkLatestPrice(_options?: Configuration): Promise { + const result = this.api.checkLatestPrice(_options); + return result.toPromise(); + } + + /** + * GetPrice returns the price of a given coin identifier, in a best effort way. If we do not have any price data for the given coin, we will return NOT_FOUND error. If we have at least one price data for the given coin, we will return it with the actual timestamp. Client is responsible for checking the timestamp and decide whether to use the price or not. + * Get price + * @param [timestamp] The timestamp we request the price at. Note, the price service may not have the price at the exact timestamp, in which case it will return the price at the closest timestamp. + * @param [coinIdSymbol] + * @param [coinIdAddressAddress] + * @param [coinIdAddressChain] + * @param [source] + */ + public getPriceWithHttpInfo(timestamp?: Date, coinIdSymbol?: string, coinIdAddressAddress?: string, coinIdAddressChain?: string, source?: string, _options?: Configuration): Promise> { + const result = this.api.getPriceWithHttpInfo(timestamp, coinIdSymbol, coinIdAddressAddress, coinIdAddressChain, source, _options); + return result.toPromise(); + } + + /** + * GetPrice returns the price of a given coin identifier, in a best effort way. If we do not have any price data for the given coin, we will return NOT_FOUND error. If we have at least one price data for the given coin, we will return it with the actual timestamp. Client is responsible for checking the timestamp and decide whether to use the price or not. + * Get price + * @param [timestamp] The timestamp we request the price at. Note, the price service may not have the price at the exact timestamp, in which case it will return the price at the closest timestamp. + * @param [coinIdSymbol] + * @param [coinIdAddressAddress] + * @param [coinIdAddressChain] + * @param [source] + */ + public getPrice(timestamp?: Date, coinIdSymbol?: string, coinIdAddressAddress?: string, coinIdAddressChain?: string, source?: string, _options?: Configuration): Promise { + const result = this.api.getPrice(timestamp, coinIdSymbol, coinIdAddressAddress, coinIdAddressChain, source, _options); + return result.toPromise(); + } + + /** + * List coins + * @param [limit] + * @param [offset] + * @param [searchQuery] + * @param [chain] + */ + public priceListCoinsWithHttpInfo(limit?: number, offset?: number, searchQuery?: string, chain?: string, _options?: Configuration): Promise> { + const result = this.api.priceListCoinsWithHttpInfo(limit, offset, searchQuery, chain, _options); + return result.toPromise(); + } + + /** + * List coins + * @param [limit] + * @param [offset] + * @param [searchQuery] + * @param [chain] + */ + public priceListCoins(limit?: number, offset?: number, searchQuery?: string, chain?: string, _options?: Configuration): Promise { + const result = this.api.priceListCoins(limit, offset, searchQuery, chain, _options); + return result.toPromise(); + } + + +} + + + +import { ObservableWebApi } from './ObservableAPI.js'; + +import { WebApiRequestFactory, WebApiResponseProcessor} from "../apis/WebApi.js"; +export class PromiseWebApi { + private api: ObservableWebApi + + public constructor( + configuration: Configuration, + requestFactory?: WebApiRequestFactory, + responseProcessor?: WebApiResponseProcessor + ) { + this.api = new ObservableWebApi(configuration, requestFactory, responseProcessor); + } + + /** + * Delete a dashboard by id + * @param dashboardId filter the dashboard by id + * @param [projectId] filter the dashboard by project id + * @param [ownerName] username or organization name + * @param [slug] project slug + */ + public deleteDashboardWithHttpInfo(dashboardId: string, projectId?: string, ownerName?: string, slug?: string, _options?: Configuration): Promise> { + const result = this.api.deleteDashboardWithHttpInfo(dashboardId, projectId, ownerName, slug, _options); + return result.toPromise(); + } + + /** + * Delete a dashboard by id + * @param dashboardId filter the dashboard by id + * @param [projectId] filter the dashboard by project id + * @param [ownerName] username or organization name + * @param [slug] project slug + */ + public deleteDashboard(dashboardId: string, projectId?: string, ownerName?: string, slug?: string, _options?: Configuration): Promise { + const result = this.api.deleteDashboard(dashboardId, projectId, ownerName, slug, _options); + return result.toPromise(); + } + + /** + * Export a dashboard to json + * @param dashboardId + */ + public exportDashboardWithHttpInfo(dashboardId: string, _options?: Configuration): Promise> { + const result = this.api.exportDashboardWithHttpInfo(dashboardId, _options); + return result.toPromise(); + } + + /** + * Export a dashboard to json + * @param dashboardId + */ + public exportDashboard(dashboardId: string, _options?: Configuration): Promise { + const result = this.api.exportDashboard(dashboardId, _options); + return result.toPromise(); + } + + /** + * Get a dashboard by id + * @param dashboardId filter the dashboard by id + * @param [projectId] filter the dashboard by project id + * @param [ownerName] username or organization name + * @param [slug] project slug + */ + public getDashboardWithHttpInfo(dashboardId: string, projectId?: string, ownerName?: string, slug?: string, _options?: Configuration): Promise> { + const result = this.api.getDashboardWithHttpInfo(dashboardId, projectId, ownerName, slug, _options); + return result.toPromise(); + } + + /** + * Get a dashboard by id + * @param dashboardId filter the dashboard by id + * @param [projectId] filter the dashboard by project id + * @param [ownerName] username or organization name + * @param [slug] project slug + */ + public getDashboard(dashboardId: string, projectId?: string, ownerName?: string, slug?: string, _options?: Configuration): Promise { + const result = this.api.getDashboard(dashboardId, projectId, ownerName, slug, _options); + return result.toPromise(); + } + + /** + * Get a dashboard by id + * @param owner username or organization name + * @param slug project slug + * @param dashboardId filter the dashboard by id + * @param [projectId] filter the dashboard by project id + */ + public getDashboard2WithHttpInfo(owner: string, slug: string, dashboardId: string, projectId?: string, _options?: Configuration): Promise> { + const result = this.api.getDashboard2WithHttpInfo(owner, slug, dashboardId, projectId, _options); + return result.toPromise(); + } + + /** + * Get a dashboard by id + * @param owner username or organization name + * @param slug project slug + * @param dashboardId filter the dashboard by id + * @param [projectId] filter the dashboard by project id + */ + public getDashboard2(owner: string, slug: string, dashboardId: string, projectId?: string, _options?: Configuration): Promise { + const result = this.api.getDashboard2(owner, slug, dashboardId, projectId, _options); + return result.toPromise(); + } + + /** + * Get project details + * @param owner username or organization name + * @param slug project slug + */ + public getProjectWithHttpInfo(owner: string, slug: string, _options?: Configuration): Promise> { + const result = this.api.getProjectWithHttpInfo(owner, slug, _options); + return result.toPromise(); + } + + /** + * Get project details + * @param owner username or organization name + * @param slug project slug + */ + public getProject(owner: string, slug: string, _options?: Configuration): Promise { + const result = this.api.getProject(owner, slug, _options); + return result.toPromise(); + } + + /** + * Get project list + * @param [userId] + * @param [organizationId] + */ + public getProjectListWithHttpInfo(userId?: string, organizationId?: string, _options?: Configuration): Promise> { + const result = this.api.getProjectListWithHttpInfo(userId, organizationId, _options); + return result.toPromise(); + } + + /** + * Get project list + * @param [userId] + * @param [organizationId] + */ + public getProjectList(userId?: string, organizationId?: string, _options?: Configuration): Promise { + const result = this.api.getProjectList(userId, organizationId, _options); + return result.toPromise(); + } + + /** + * Import a dashboard to another dashboard + * @param body + */ + public importDashboardWithHttpInfo(body: WebServiceImportDashboardRequest, _options?: Configuration): Promise> { + const result = this.api.importDashboardWithHttpInfo(body, _options); + return result.toPromise(); + } + + /** + * Import a dashboard to another dashboard + * @param body + */ + public importDashboard(body: WebServiceImportDashboardRequest, _options?: Configuration): Promise { + const result = this.api.importDashboard(body, _options); + return result.toPromise(); + } + + /** + * List all dashboards in a project + * @param [dashboardId] filter the dashboard by id + * @param [projectId] filter the dashboard by project id + * @param [ownerName] username or organization name + * @param [slug] project slug + */ + public listDashboardsWithHttpInfo(dashboardId?: string, projectId?: string, ownerName?: string, slug?: string, _options?: Configuration): Promise> { + const result = this.api.listDashboardsWithHttpInfo(dashboardId, projectId, ownerName, slug, _options); + return result.toPromise(); + } + + /** + * List all dashboards in a project + * @param [dashboardId] filter the dashboard by id + * @param [projectId] filter the dashboard by project id + * @param [ownerName] username or organization name + * @param [slug] project slug + */ + public listDashboards(dashboardId?: string, projectId?: string, ownerName?: string, slug?: string, _options?: Configuration): Promise { + const result = this.api.listDashboards(dashboardId, projectId, ownerName, slug, _options); + return result.toPromise(); + } + + /** + * List all dashboards in a project + * @param owner username or organization name + * @param slug project slug + * @param [dashboardId] filter the dashboard by id + * @param [projectId] filter the dashboard by project id + */ + public listDashboards2WithHttpInfo(owner: string, slug: string, dashboardId?: string, projectId?: string, _options?: Configuration): Promise> { + const result = this.api.listDashboards2WithHttpInfo(owner, slug, dashboardId, projectId, _options); + return result.toPromise(); + } + + /** + * List all dashboards in a project + * @param owner username or organization name + * @param slug project slug + * @param [dashboardId] filter the dashboard by id + * @param [projectId] filter the dashboard by project id + */ + public listDashboards2(owner: string, slug: string, dashboardId?: string, projectId?: string, _options?: Configuration): Promise { + const result = this.api.listDashboards2(owner, slug, dashboardId, projectId, _options); + return result.toPromise(); + } + + +} + + + diff --git a/src/util.ts b/src/util.ts new file mode 100755 index 0000000..96ea3df --- /dev/null +++ b/src/util.ts @@ -0,0 +1,37 @@ +/** + * Returns if a specific http code is in a given code range + * where the code range is defined as a combination of digits + * and "X" (the letter X) with a length of 3 + * + * @param codeRange string with length 3 consisting of digits and "X" (the letter X) + * @param code the http status code to be checked against the code range + */ +export function isCodeInRange(codeRange: string, code: number): boolean { + // This is how the default value is encoded in OAG + if (codeRange === "0") { + return true; + } + if (codeRange == code.toString()) { + return true; + } else { + const codeString = code.toString(); + if (codeString.length != codeRange.length) { + return false; + } + for (let i = 0; i < codeString.length; i++) { + if (codeRange.charAt(i) != "X" && codeRange.charAt(i) != codeString.charAt(i)) { + return false; + } + } + return true; + } +} + +/** +* Returns if it can consume form +* +* @param consumes array +*/ +export function canConsumeForm(contentTypes: string[]): boolean { + return contentTypes.indexOf('multipart/form-data') !== -1 +}