vayu-ts 0.0.7 → 0.0.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/dist/index.d.ts +0 -1
- package/dist/index.js +0 -17
- package/dist/openapi/apis/AuthApi.d.ts +0 -26
- package/dist/openapi/apis/AuthApi.js +0 -93
- package/dist/openapi/apis/ContractsApi.d.ts +0 -72
- package/dist/openapi/apis/ContractsApi.js +0 -307
- package/dist/openapi/apis/CreditsApi.d.ts +0 -57
- package/dist/openapi/apis/CreditsApi.js +0 -248
- package/dist/openapi/apis/CustomersApi.d.ts +0 -89
- package/dist/openapi/apis/CustomersApi.js +0 -388
- package/dist/openapi/apis/EventsApi.d.ts +0 -91
- package/dist/openapi/apis/EventsApi.js +0 -408
- package/dist/openapi/apis/IntegrationsApi.d.ts +0 -41
- package/dist/openapi/apis/IntegrationsApi.js +0 -170
- package/dist/openapi/apis/InvoicesApi.d.ts +0 -41
- package/dist/openapi/apis/InvoicesApi.js +0 -166
- package/dist/openapi/apis/MetersApi.d.ts +0 -73
- package/dist/openapi/apis/MetersApi.js +0 -316
- package/dist/openapi/apis/PlansApi.d.ts +0 -56
- package/dist/openapi/apis/PlansApi.js +0 -235
- package/dist/openapi/apis/ReportsApi.d.ts +0 -41
- package/dist/openapi/apis/ReportsApi.js +0 -166
- package/dist/openapi/apis/WebhooksApi.d.ts +0 -25
- package/dist/openapi/apis/WebhooksApi.js +0 -101
- package/dist/openapi/apis/baseapi.d.ts +0 -33
- package/dist/openapi/apis/baseapi.js +0 -41
- package/dist/openapi/apis/exception.d.ts +0 -19
- package/dist/openapi/apis/exception.js +0 -22
- package/dist/openapi/auth/auth.d.ts +0 -54
- package/dist/openapi/auth/auth.js +0 -50
- package/dist/openapi/configuration.d.ts +0 -63
- package/dist/openapi/configuration.js +0 -34
- package/dist/openapi/http/http.d.ts +0 -142
- package/dist/openapi/http/http.js +0 -229
- package/dist/openapi/http/isomorphic-fetch.d.ts +0 -5
- package/dist/openapi/http/isomorphic-fetch.js +0 -33
- package/dist/openapi/index.d.ts +0 -10
- package/dist/openapi/index.js +0 -38
- package/dist/openapi/middleware.d.ts +0 -54
- package/dist/openapi/middleware.js +0 -16
- package/dist/openapi/models/AggregationMethod.d.ts +0 -40
- package/dist/openapi/models/AggregationMethod.js +0 -46
- package/dist/openapi/models/AggregationOperator.d.ts +0 -24
- package/dist/openapi/models/AggregationOperator.js +0 -28
- package/dist/openapi/models/BillingCycleStatus.d.ts +0 -15
- package/dist/openapi/models/BillingCycleStatus.js +0 -19
- package/dist/openapi/models/BillingInterval.d.ts +0 -18
- package/dist/openapi/models/BillingInterval.js +0 -22
- package/dist/openapi/models/Condition.d.ts +0 -29
- package/dist/openapi/models/Condition.js +0 -31
- package/dist/openapi/models/ContractStatus.d.ts +0 -18
- package/dist/openapi/models/ContractStatus.js +0 -22
- package/dist/openapi/models/CreateContractRequest.d.ts +0 -43
- package/dist/openapi/models/CreateContractRequest.js +0 -49
- package/dist/openapi/models/CreateContractResponse.d.ts +0 -29
- package/dist/openapi/models/CreateContractResponse.js +0 -31
- package/dist/openapi/models/CreateCustomerRequest.d.ts +0 -35
- package/dist/openapi/models/CreateCustomerRequest.js +0 -37
- package/dist/openapi/models/CreateCustomerResponse.d.ts +0 -29
- package/dist/openapi/models/CreateCustomerResponse.js +0 -31
- package/dist/openapi/models/CreateCustomerResponseCustomer.d.ts +0 -38
- package/dist/openapi/models/CreateCustomerResponseCustomer.js +0 -55
- package/dist/openapi/models/CreditLedgerEntry.d.ts +0 -32
- package/dist/openapi/models/CreditLedgerEntry.js +0 -49
- package/dist/openapi/models/Criterion.d.ts +0 -31
- package/dist/openapi/models/Criterion.js +0 -43
- package/dist/openapi/models/CriterionOperator.d.ts +0 -23
- package/dist/openapi/models/CriterionOperator.js +0 -27
- package/dist/openapi/models/Currency.d.ts +0 -17
- package/dist/openapi/models/Currency.js +0 -21
- package/dist/openapi/models/DeductCreditsRequest.d.ts +0 -35
- package/dist/openapi/models/DeductCreditsRequest.js +0 -37
- package/dist/openapi/models/DeleteContractResponse.d.ts +0 -29
- package/dist/openapi/models/DeleteContractResponse.js +0 -31
- package/dist/openapi/models/DeleteContractResponseContract.d.ts +0 -47
- package/dist/openapi/models/DeleteContractResponseContract.js +0 -73
- package/dist/openapi/models/DeleteCustomerResponse.d.ts +0 -29
- package/dist/openapi/models/DeleteCustomerResponse.js +0 -31
- package/dist/openapi/models/DeleteCustomerResponseCustomer.d.ts +0 -39
- package/dist/openapi/models/DeleteCustomerResponseCustomer.js +0 -61
- package/dist/openapi/models/DeleteEventResponse.d.ts +0 -29
- package/dist/openapi/models/DeleteEventResponse.js +0 -31
- package/dist/openapi/models/DeleteEventResponseEvent.d.ts +0 -56
- package/dist/openapi/models/DeleteEventResponseEvent.js +0 -82
- package/dist/openapi/models/DeleteMeterResponse.d.ts +0 -29
- package/dist/openapi/models/DeleteMeterResponse.js +0 -31
- package/dist/openapi/models/DeleteMeterResponseMeter.d.ts +0 -43
- package/dist/openapi/models/DeleteMeterResponseMeter.js +0 -73
- package/dist/openapi/models/DeletePlanResponse.d.ts +0 -29
- package/dist/openapi/models/DeletePlanResponse.js +0 -31
- package/dist/openapi/models/DeletePlanResponsePlan.d.ts +0 -39
- package/dist/openapi/models/DeletePlanResponsePlan.js +0 -67
- package/dist/openapi/models/Event.d.ts +0 -49
- package/dist/openapi/models/Event.js +0 -55
- package/dist/openapi/models/EventsDryRunRequest.d.ts +0 -29
- package/dist/openapi/models/EventsDryRunRequest.js +0 -31
- package/dist/openapi/models/EventsDryRunResponse.d.ts +0 -29
- package/dist/openapi/models/EventsDryRunResponse.js +0 -31
- package/dist/openapi/models/EventsDryRunResponseObject.d.ts +0 -32
- package/dist/openapi/models/EventsDryRunResponseObject.js +0 -43
- package/dist/openapi/models/EventsDryRunResponseObjectEvent.d.ts +0 -35
- package/dist/openapi/models/EventsDryRunResponseObjectEvent.js +0 -61
- package/dist/openapi/models/EventsDryRunResponseObjectMeterWithValuesInner.d.ts +0 -41
- package/dist/openapi/models/EventsDryRunResponseObjectMeterWithValuesInner.js +0 -61
- package/dist/openapi/models/Filter.d.ts +0 -32
- package/dist/openapi/models/Filter.js +0 -34
- package/dist/openapi/models/GetCommitmentReportResponse.d.ts +0 -44
- package/dist/openapi/models/GetCommitmentReportResponse.js +0 -115
- package/dist/openapi/models/GetContractResponse.d.ts +0 -29
- package/dist/openapi/models/GetContractResponse.js +0 -31
- package/dist/openapi/models/GetContractResponseContract.d.ts +0 -46
- package/dist/openapi/models/GetContractResponseContract.js +0 -67
- package/dist/openapi/models/GetCustomerResponse.d.ts +0 -29
- package/dist/openapi/models/GetCustomerResponse.js +0 -31
- package/dist/openapi/models/GetEventResponse.d.ts +0 -29
- package/dist/openapi/models/GetEventResponse.js +0 -31
- package/dist/openapi/models/GetEventResponseEvent.d.ts +0 -55
- package/dist/openapi/models/GetEventResponseEvent.js +0 -76
- package/dist/openapi/models/GetInvoiceResponse.d.ts +0 -29
- package/dist/openapi/models/GetInvoiceResponse.js +0 -31
- package/dist/openapi/models/GetInvoiceResponseInvoice.d.ts +0 -50
- package/dist/openapi/models/GetInvoiceResponseInvoice.js +0 -79
- package/dist/openapi/models/GetMeterResponse.d.ts +0 -29
- package/dist/openapi/models/GetMeterResponse.js +0 -31
- package/dist/openapi/models/GetMeterResponseMeter.d.ts +0 -42
- package/dist/openapi/models/GetMeterResponseMeter.js +0 -67
- package/dist/openapi/models/GetPlanResponse.d.ts +0 -29
- package/dist/openapi/models/GetPlanResponse.js +0 -31
- package/dist/openapi/models/GetPlanResponsePlan.d.ts +0 -38
- package/dist/openapi/models/GetPlanResponsePlan.js +0 -61
- package/dist/openapi/models/GetProductsUsageReportResponse.d.ts +0 -44
- package/dist/openapi/models/GetProductsUsageReportResponse.js +0 -115
- package/dist/openapi/models/GrantCreditsRequest.d.ts +0 -35
- package/dist/openapi/models/GrantCreditsRequest.js +0 -37
- package/dist/openapi/models/InvalidEvent.d.ts +0 -33
- package/dist/openapi/models/InvalidEvent.js +0 -37
- package/dist/openapi/models/LineItem.d.ts +0 -35
- package/dist/openapi/models/LineItem.js +0 -37
- package/dist/openapi/models/ListContractsResponse.d.ts +0 -32
- package/dist/openapi/models/ListContractsResponse.js +0 -49
- package/dist/openapi/models/ListCreditLedgerEntriesResponse.d.ts +0 -32
- package/dist/openapi/models/ListCreditLedgerEntriesResponse.js +0 -31
- package/dist/openapi/models/ListCustomersResponse.d.ts +0 -32
- package/dist/openapi/models/ListCustomersResponse.js +0 -49
- package/dist/openapi/models/ListInvoicesResponse.d.ts +0 -32
- package/dist/openapi/models/ListInvoicesResponse.js +0 -49
- package/dist/openapi/models/ListMetersResponse.d.ts +0 -32
- package/dist/openapi/models/ListMetersResponse.js +0 -49
- package/dist/openapi/models/ListPlansResponse.d.ts +0 -32
- package/dist/openapi/models/ListPlansResponse.js +0 -49
- package/dist/openapi/models/LoginRequest.d.ts +0 -31
- package/dist/openapi/models/LoginRequest.js +0 -31
- package/dist/openapi/models/LoginResponse.d.ts +0 -31
- package/dist/openapi/models/LoginResponse.js +0 -31
- package/dist/openapi/models/Meter.d.ts +0 -39
- package/dist/openapi/models/Meter.js +0 -49
- package/dist/openapi/models/NetSuiteExportSalesOrderRequest.d.ts +0 -30
- package/dist/openapi/models/NetSuiteExportSalesOrderRequest.js +0 -43
- package/dist/openapi/models/NetSuiteSyncInvoicesRequest.d.ts +0 -34
- package/dist/openapi/models/NetSuiteSyncInvoicesRequest.js +0 -47
- package/dist/openapi/models/NetSuiteSyncInvoicesRequestData.d.ts +0 -39
- package/dist/openapi/models/NetSuiteSyncInvoicesRequestData.js +0 -85
- package/dist/openapi/models/NetSuiteSyncInvoicesRequestDataEntity.d.ts +0 -28
- package/dist/openapi/models/NetSuiteSyncInvoicesRequestDataEntity.js +0 -31
- package/dist/openapi/models/NetSuiteSyncInvoicesRequestDataItem.d.ts +0 -29
- package/dist/openapi/models/NetSuiteSyncInvoicesRequestDataItem.js +0 -31
- package/dist/openapi/models/NetSuiteSyncInvoicesRequestDataItemItemsInner.d.ts +0 -33
- package/dist/openapi/models/NetSuiteSyncInvoicesRequestDataItemItemsInner.js +0 -55
- package/dist/openapi/models/NetSuiteSyncInvoicesResponse.d.ts +0 -29
- package/dist/openapi/models/NetSuiteSyncInvoicesResponse.js +0 -37
- package/dist/openapi/models/NotificationEventType.d.ts +0 -17
- package/dist/openapi/models/NotificationEventType.js +0 -21
- package/dist/openapi/models/ObjectSerializer.d.ts +0 -106
- package/dist/openapi/models/ObjectSerializer.js +0 -488
- package/dist/openapi/models/PaymentTerm.d.ts +0 -15
- package/dist/openapi/models/PaymentTerm.js +0 -19
- package/dist/openapi/models/Period.d.ts +0 -32
- package/dist/openapi/models/Period.js +0 -40
- package/dist/openapi/models/PlanBillingData.d.ts +0 -37
- package/dist/openapi/models/PlanBillingData.js +0 -58
- package/dist/openapi/models/PlanStatus.d.ts +0 -19
- package/dist/openapi/models/PlanStatus.js +0 -23
- package/dist/openapi/models/QueryEventsResponse.d.ts +0 -32
- package/dist/openapi/models/QueryEventsResponse.js +0 -31
- package/dist/openapi/models/QueryEventsResponseEventsInner.d.ts +0 -52
- package/dist/openapi/models/QueryEventsResponseEventsInner.js +0 -73
- package/dist/openapi/models/SendEventsRequest.d.ts +0 -29
- package/dist/openapi/models/SendEventsRequest.js +0 -31
- package/dist/openapi/models/SendEventsResponse.d.ts +0 -37
- package/dist/openapi/models/SendEventsResponse.js +0 -37
- package/dist/openapi/models/UpdateCustomerRequest.d.ts +0 -35
- package/dist/openapi/models/UpdateCustomerRequest.js +0 -37
- package/dist/openapi/models/UpdateCustomerResponse.d.ts +0 -29
- package/dist/openapi/models/UpdateCustomerResponse.js +0 -31
- package/dist/openapi/models/UpdateMeterRequest.d.ts +0 -39
- package/dist/openapi/models/UpdateMeterRequest.js +0 -49
- package/dist/openapi/models/UpdateMeterResponse.d.ts +0 -29
- package/dist/openapi/models/UpdateMeterResponse.js +0 -31
- package/dist/openapi/models/WebhookSubscribeRequest.d.ts +0 -30
- package/dist/openapi/models/WebhookSubscribeRequest.js +0 -37
- package/dist/openapi/models/all.d.ts +0 -79
- package/dist/openapi/models/all.js +0 -95
- package/dist/openapi/rxjsStub.d.ts +0 -10
- package/dist/openapi/rxjsStub.js +0 -31
- package/dist/openapi/servers.d.ts +0 -39
- package/dist/openapi/servers.js +0 -52
- package/dist/openapi/types/ObjectParamAPI.d.ts +0 -825
- package/dist/openapi/types/ObjectParamAPI.js +0 -590
- package/dist/openapi/types/ObservableAPI.d.ts +0 -532
- package/dist/openapi/types/ObservableAPI.js +0 -1060
- package/dist/openapi/types/PromiseAPI.d.ts +0 -509
- package/dist/openapi/types/PromiseAPI.js +0 -684
- package/dist/openapi/util.d.ts +0 -15
- package/dist/openapi/util.js +0 -42
- package/dist/sdk/clients/ContractsClient.d.ts +0 -10
- package/dist/sdk/clients/ContractsClient.js +0 -42
- package/dist/sdk/clients/CustomersClient.d.ts +0 -11
- package/dist/sdk/clients/CustomersClient.js +0 -47
- package/dist/sdk/clients/EventsClient.d.ts +0 -11
- package/dist/sdk/clients/EventsClient.js +0 -49
- package/dist/sdk/clients/InvoicesClient.d.ts +0 -7
- package/dist/sdk/clients/InvoicesClient.js +0 -32
- package/dist/sdk/clients/MetersClient.d.ts +0 -10
- package/dist/sdk/clients/MetersClient.js +0 -42
- package/dist/sdk/clients/PlansClient.d.ts +0 -8
- package/dist/sdk/clients/PlansClient.js +0 -37
- package/dist/sdk/clients/index.d.ts +0 -6
- package/dist/sdk/clients/index.js +0 -22
- package/dist/sdk/index.d.ts +0 -13
- package/dist/sdk/index.js +0 -59
- package/dist/sdk/services/configuration.service.d.ts +0 -21
- package/dist/sdk/services/configuration.service.js +0 -104
- package/dist/sdk/services/index.d.ts +0 -1
- package/dist/sdk/services/index.js +0 -17
- package/dist/sdk/types/Contracts.d.ts +0 -1
- package/dist/sdk/types/Contracts.js +0 -2
- package/dist/sdk/types/Customers.d.ts +0 -1
- package/dist/sdk/types/Customers.js +0 -2
- package/dist/sdk/types/Events.d.ts +0 -1
- package/dist/sdk/types/Events.js +0 -2
- package/dist/sdk/types/Invoices.d.ts +0 -1
- package/dist/sdk/types/Invoices.js +0 -2
- package/dist/sdk/types/Meters.d.ts +0 -1
- package/dist/sdk/types/Meters.js +0 -2
- package/dist/sdk/types/Plans.d.ts +0 -1
- package/dist/sdk/types/Plans.js +0 -2
- package/dist/sdk/types/index.d.ts +0 -7
- package/dist/sdk/types/index.js +0 -23
- package/dist/sdk/types/pagination-options.d.ts +0 -4
- package/dist/sdk/types/pagination-options.js +0 -2
- package/dist/types.d.ts +0 -1
- package/dist/types.js +0 -17
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import { BaseAPIRequestFactory } from './baseapi';
|
|
2
|
-
import { Configuration } from '../configuration';
|
|
3
|
-
import { RequestContext, ResponseContext, HttpInfo } from '../http/http';
|
|
4
|
-
import { GetInvoiceResponse } from '../models/GetInvoiceResponse';
|
|
5
|
-
import { ListInvoicesResponse } from '../models/ListInvoicesResponse';
|
|
6
|
-
/**
|
|
7
|
-
* no description
|
|
8
|
-
*/
|
|
9
|
-
export declare class InvoicesApiRequestFactory extends BaseAPIRequestFactory {
|
|
10
|
-
/**
|
|
11
|
-
* Get a Invoice by id.
|
|
12
|
-
* Get Invoice
|
|
13
|
-
* @param invoiceId
|
|
14
|
-
*/
|
|
15
|
-
getInvoice(invoiceId: string, _options?: Configuration): Promise<RequestContext>;
|
|
16
|
-
/**
|
|
17
|
-
* Get a list of Invoices.
|
|
18
|
-
* List Invoices
|
|
19
|
-
* @param limit
|
|
20
|
-
* @param cursor
|
|
21
|
-
*/
|
|
22
|
-
listInvoices(limit?: number, cursor?: string, _options?: Configuration): Promise<RequestContext>;
|
|
23
|
-
}
|
|
24
|
-
export declare class InvoicesApiResponseProcessor {
|
|
25
|
-
/**
|
|
26
|
-
* Unwraps the actual response sent by the server from the response context and deserializes the response content
|
|
27
|
-
* to the expected objects
|
|
28
|
-
*
|
|
29
|
-
* @params response Response returned by the server for a request to getInvoice
|
|
30
|
-
* @throws ApiException if the response code was not in [200, 299]
|
|
31
|
-
*/
|
|
32
|
-
getInvoiceWithHttpInfo(response: ResponseContext): Promise<HttpInfo<GetInvoiceResponse>>;
|
|
33
|
-
/**
|
|
34
|
-
* Unwraps the actual response sent by the server from the response context and deserializes the response content
|
|
35
|
-
* to the expected objects
|
|
36
|
-
*
|
|
37
|
-
* @params response Response returned by the server for a request to listInvoices
|
|
38
|
-
* @throws ApiException if the response code was not in [200, 299]
|
|
39
|
-
*/
|
|
40
|
-
listInvoicesWithHttpInfo(response: ResponseContext): Promise<HttpInfo<ListInvoicesResponse>>;
|
|
41
|
-
}
|
|
@@ -1,166 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.InvoicesApiResponseProcessor = exports.InvoicesApiRequestFactory = void 0;
|
|
13
|
-
// TODO: better import syntax?
|
|
14
|
-
const baseapi_1 = require("./baseapi");
|
|
15
|
-
const http_1 = require("../http/http");
|
|
16
|
-
const ObjectSerializer_1 = require("../models/ObjectSerializer");
|
|
17
|
-
const exception_1 = require("./exception");
|
|
18
|
-
const util_1 = require("../util");
|
|
19
|
-
/**
|
|
20
|
-
* no description
|
|
21
|
-
*/
|
|
22
|
-
class InvoicesApiRequestFactory extends baseapi_1.BaseAPIRequestFactory {
|
|
23
|
-
/**
|
|
24
|
-
* Get a Invoice by id.
|
|
25
|
-
* Get Invoice
|
|
26
|
-
* @param invoiceId
|
|
27
|
-
*/
|
|
28
|
-
getInvoice(invoiceId, _options) {
|
|
29
|
-
var _a, _b, _c;
|
|
30
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
31
|
-
let _config = _options || this.configuration;
|
|
32
|
-
// verify required parameter 'invoiceId' is not null or undefined
|
|
33
|
-
if (invoiceId === null || invoiceId === undefined) {
|
|
34
|
-
throw new baseapi_1.RequiredError("InvoicesApi", "getInvoice", "invoiceId");
|
|
35
|
-
}
|
|
36
|
-
// Path Params
|
|
37
|
-
const localVarPath = '/invoices/{invoiceId}'
|
|
38
|
-
.replace('{' + 'invoiceId' + '}', encodeURIComponent(String(invoiceId)));
|
|
39
|
-
// Make Request Context
|
|
40
|
-
const requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.GET);
|
|
41
|
-
requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
|
|
42
|
-
let authMethod;
|
|
43
|
-
// Apply auth methods
|
|
44
|
-
authMethod = _config.authMethods["BearerAuthorizer"];
|
|
45
|
-
if (authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication) {
|
|
46
|
-
yield (authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication(requestContext));
|
|
47
|
-
}
|
|
48
|
-
const defaultAuth = ((_a = _options === null || _options === void 0 ? void 0 : _options.authMethods) === null || _a === void 0 ? void 0 : _a.default) || ((_c = (_b = this.configuration) === null || _b === void 0 ? void 0 : _b.authMethods) === null || _c === void 0 ? void 0 : _c.default);
|
|
49
|
-
if (defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication) {
|
|
50
|
-
yield (defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication(requestContext));
|
|
51
|
-
}
|
|
52
|
-
return requestContext;
|
|
53
|
-
});
|
|
54
|
-
}
|
|
55
|
-
/**
|
|
56
|
-
* Get a list of Invoices.
|
|
57
|
-
* List Invoices
|
|
58
|
-
* @param limit
|
|
59
|
-
* @param cursor
|
|
60
|
-
*/
|
|
61
|
-
listInvoices(limit, cursor, _options) {
|
|
62
|
-
var _a, _b, _c;
|
|
63
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
64
|
-
let _config = _options || this.configuration;
|
|
65
|
-
// Path Params
|
|
66
|
-
const localVarPath = '/invoices';
|
|
67
|
-
// Make Request Context
|
|
68
|
-
const requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.GET);
|
|
69
|
-
requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
|
|
70
|
-
// Query Params
|
|
71
|
-
if (limit !== undefined) {
|
|
72
|
-
requestContext.setQueryParam("limit", ObjectSerializer_1.ObjectSerializer.serialize(limit, "number", ""));
|
|
73
|
-
}
|
|
74
|
-
// Query Params
|
|
75
|
-
if (cursor !== undefined) {
|
|
76
|
-
requestContext.setQueryParam("cursor", ObjectSerializer_1.ObjectSerializer.serialize(cursor, "string", ""));
|
|
77
|
-
}
|
|
78
|
-
let authMethod;
|
|
79
|
-
// Apply auth methods
|
|
80
|
-
authMethod = _config.authMethods["BearerAuthorizer"];
|
|
81
|
-
if (authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication) {
|
|
82
|
-
yield (authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication(requestContext));
|
|
83
|
-
}
|
|
84
|
-
const defaultAuth = ((_a = _options === null || _options === void 0 ? void 0 : _options.authMethods) === null || _a === void 0 ? void 0 : _a.default) || ((_c = (_b = this.configuration) === null || _b === void 0 ? void 0 : _b.authMethods) === null || _c === void 0 ? void 0 : _c.default);
|
|
85
|
-
if (defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication) {
|
|
86
|
-
yield (defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication(requestContext));
|
|
87
|
-
}
|
|
88
|
-
return requestContext;
|
|
89
|
-
});
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
exports.InvoicesApiRequestFactory = InvoicesApiRequestFactory;
|
|
93
|
-
class InvoicesApiResponseProcessor {
|
|
94
|
-
/**
|
|
95
|
-
* Unwraps the actual response sent by the server from the response context and deserializes the response content
|
|
96
|
-
* to the expected objects
|
|
97
|
-
*
|
|
98
|
-
* @params response Response returned by the server for a request to getInvoice
|
|
99
|
-
* @throws ApiException if the response code was not in [200, 299]
|
|
100
|
-
*/
|
|
101
|
-
getInvoiceWithHttpInfo(response) {
|
|
102
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
103
|
-
const contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
|
|
104
|
-
if ((0, util_1.isCodeInRange)("200", response.httpStatusCode)) {
|
|
105
|
-
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), "GetInvoiceResponse", "");
|
|
106
|
-
return new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body);
|
|
107
|
-
}
|
|
108
|
-
if ((0, util_1.isCodeInRange)("400", response.httpStatusCode)) {
|
|
109
|
-
throw new exception_1.ApiException(response.httpStatusCode, "Bad Request", undefined, response.headers);
|
|
110
|
-
}
|
|
111
|
-
if ((0, util_1.isCodeInRange)("401", response.httpStatusCode)) {
|
|
112
|
-
throw new exception_1.ApiException(response.httpStatusCode, "Unauthorized", undefined, response.headers);
|
|
113
|
-
}
|
|
114
|
-
if ((0, util_1.isCodeInRange)("404", response.httpStatusCode)) {
|
|
115
|
-
throw new exception_1.ApiException(response.httpStatusCode, "Not Found", undefined, response.headers);
|
|
116
|
-
}
|
|
117
|
-
if ((0, util_1.isCodeInRange)("429", response.httpStatusCode)) {
|
|
118
|
-
throw new exception_1.ApiException(response.httpStatusCode, "Too Many Requests", undefined, response.headers);
|
|
119
|
-
}
|
|
120
|
-
if ((0, util_1.isCodeInRange)("500", response.httpStatusCode)) {
|
|
121
|
-
throw new exception_1.ApiException(response.httpStatusCode, "Internal Server Error", undefined, response.headers);
|
|
122
|
-
}
|
|
123
|
-
// Work around for missing responses in specification, e.g. for petstore.yaml
|
|
124
|
-
if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
|
|
125
|
-
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), "GetInvoiceResponse", "");
|
|
126
|
-
return new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body);
|
|
127
|
-
}
|
|
128
|
-
throw new exception_1.ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers);
|
|
129
|
-
});
|
|
130
|
-
}
|
|
131
|
-
/**
|
|
132
|
-
* Unwraps the actual response sent by the server from the response context and deserializes the response content
|
|
133
|
-
* to the expected objects
|
|
134
|
-
*
|
|
135
|
-
* @params response Response returned by the server for a request to listInvoices
|
|
136
|
-
* @throws ApiException if the response code was not in [200, 299]
|
|
137
|
-
*/
|
|
138
|
-
listInvoicesWithHttpInfo(response) {
|
|
139
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
140
|
-
const contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
|
|
141
|
-
if ((0, util_1.isCodeInRange)("200", response.httpStatusCode)) {
|
|
142
|
-
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), "ListInvoicesResponse", "");
|
|
143
|
-
return new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body);
|
|
144
|
-
}
|
|
145
|
-
if ((0, util_1.isCodeInRange)("400", response.httpStatusCode)) {
|
|
146
|
-
throw new exception_1.ApiException(response.httpStatusCode, "Bad Request", undefined, response.headers);
|
|
147
|
-
}
|
|
148
|
-
if ((0, util_1.isCodeInRange)("401", response.httpStatusCode)) {
|
|
149
|
-
throw new exception_1.ApiException(response.httpStatusCode, "Unauthorized", undefined, response.headers);
|
|
150
|
-
}
|
|
151
|
-
if ((0, util_1.isCodeInRange)("429", response.httpStatusCode)) {
|
|
152
|
-
throw new exception_1.ApiException(response.httpStatusCode, "Too Many Requests", undefined, response.headers);
|
|
153
|
-
}
|
|
154
|
-
if ((0, util_1.isCodeInRange)("500", response.httpStatusCode)) {
|
|
155
|
-
throw new exception_1.ApiException(response.httpStatusCode, "Internal Server Error", undefined, response.headers);
|
|
156
|
-
}
|
|
157
|
-
// Work around for missing responses in specification, e.g. for petstore.yaml
|
|
158
|
-
if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
|
|
159
|
-
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), "ListInvoicesResponse", "");
|
|
160
|
-
return new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body);
|
|
161
|
-
}
|
|
162
|
-
throw new exception_1.ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers);
|
|
163
|
-
});
|
|
164
|
-
}
|
|
165
|
-
}
|
|
166
|
-
exports.InvoicesApiResponseProcessor = InvoicesApiResponseProcessor;
|
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
import { BaseAPIRequestFactory } from './baseapi';
|
|
2
|
-
import { Configuration } from '../configuration';
|
|
3
|
-
import { RequestContext, ResponseContext, HttpInfo } from '../http/http';
|
|
4
|
-
import { DeleteMeterResponse } from '../models/DeleteMeterResponse';
|
|
5
|
-
import { GetMeterResponse } from '../models/GetMeterResponse';
|
|
6
|
-
import { ListMetersResponse } from '../models/ListMetersResponse';
|
|
7
|
-
import { UpdateMeterRequest } from '../models/UpdateMeterRequest';
|
|
8
|
-
import { UpdateMeterResponse } from '../models/UpdateMeterResponse';
|
|
9
|
-
/**
|
|
10
|
-
* no description
|
|
11
|
-
*/
|
|
12
|
-
export declare class MetersApiRequestFactory extends BaseAPIRequestFactory {
|
|
13
|
-
/**
|
|
14
|
-
* Delete a Meter by id.
|
|
15
|
-
* Delete Meter
|
|
16
|
-
* @param meterId
|
|
17
|
-
*/
|
|
18
|
-
deleteMeter(meterId: string, _options?: Configuration): Promise<RequestContext>;
|
|
19
|
-
/**
|
|
20
|
-
* Get a Meter by id.
|
|
21
|
-
* Get Meter
|
|
22
|
-
* @param meterId
|
|
23
|
-
*/
|
|
24
|
-
getMeter(meterId: string, _options?: Configuration): Promise<RequestContext>;
|
|
25
|
-
/**
|
|
26
|
-
* Get a list of Meters.
|
|
27
|
-
* List Meters
|
|
28
|
-
* @param limit
|
|
29
|
-
* @param cursor
|
|
30
|
-
*/
|
|
31
|
-
listMeters(limit?: number, cursor?: string, _options?: Configuration): Promise<RequestContext>;
|
|
32
|
-
/**
|
|
33
|
-
* Update a Meter by id.
|
|
34
|
-
* Update Meter
|
|
35
|
-
* @param updateMeterRequest
|
|
36
|
-
* @param meterId
|
|
37
|
-
*/
|
|
38
|
-
updateMeter(updateMeterRequest: UpdateMeterRequest, meterId: string, _options?: Configuration): Promise<RequestContext>;
|
|
39
|
-
}
|
|
40
|
-
export declare class MetersApiResponseProcessor {
|
|
41
|
-
/**
|
|
42
|
-
* Unwraps the actual response sent by the server from the response context and deserializes the response content
|
|
43
|
-
* to the expected objects
|
|
44
|
-
*
|
|
45
|
-
* @params response Response returned by the server for a request to deleteMeter
|
|
46
|
-
* @throws ApiException if the response code was not in [200, 299]
|
|
47
|
-
*/
|
|
48
|
-
deleteMeterWithHttpInfo(response: ResponseContext): Promise<HttpInfo<DeleteMeterResponse>>;
|
|
49
|
-
/**
|
|
50
|
-
* Unwraps the actual response sent by the server from the response context and deserializes the response content
|
|
51
|
-
* to the expected objects
|
|
52
|
-
*
|
|
53
|
-
* @params response Response returned by the server for a request to getMeter
|
|
54
|
-
* @throws ApiException if the response code was not in [200, 299]
|
|
55
|
-
*/
|
|
56
|
-
getMeterWithHttpInfo(response: ResponseContext): Promise<HttpInfo<GetMeterResponse>>;
|
|
57
|
-
/**
|
|
58
|
-
* Unwraps the actual response sent by the server from the response context and deserializes the response content
|
|
59
|
-
* to the expected objects
|
|
60
|
-
*
|
|
61
|
-
* @params response Response returned by the server for a request to listMeters
|
|
62
|
-
* @throws ApiException if the response code was not in [200, 299]
|
|
63
|
-
*/
|
|
64
|
-
listMetersWithHttpInfo(response: ResponseContext): Promise<HttpInfo<ListMetersResponse>>;
|
|
65
|
-
/**
|
|
66
|
-
* Unwraps the actual response sent by the server from the response context and deserializes the response content
|
|
67
|
-
* to the expected objects
|
|
68
|
-
*
|
|
69
|
-
* @params response Response returned by the server for a request to updateMeter
|
|
70
|
-
* @throws ApiException if the response code was not in [200, 299]
|
|
71
|
-
*/
|
|
72
|
-
updateMeterWithHttpInfo(response: ResponseContext): Promise<HttpInfo<UpdateMeterResponse>>;
|
|
73
|
-
}
|
|
@@ -1,316 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.MetersApiResponseProcessor = exports.MetersApiRequestFactory = void 0;
|
|
13
|
-
// TODO: better import syntax?
|
|
14
|
-
const baseapi_1 = require("./baseapi");
|
|
15
|
-
const http_1 = require("../http/http");
|
|
16
|
-
const ObjectSerializer_1 = require("../models/ObjectSerializer");
|
|
17
|
-
const exception_1 = require("./exception");
|
|
18
|
-
const util_1 = require("../util");
|
|
19
|
-
/**
|
|
20
|
-
* no description
|
|
21
|
-
*/
|
|
22
|
-
class MetersApiRequestFactory extends baseapi_1.BaseAPIRequestFactory {
|
|
23
|
-
/**
|
|
24
|
-
* Delete a Meter by id.
|
|
25
|
-
* Delete Meter
|
|
26
|
-
* @param meterId
|
|
27
|
-
*/
|
|
28
|
-
deleteMeter(meterId, _options) {
|
|
29
|
-
var _a, _b, _c;
|
|
30
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
31
|
-
let _config = _options || this.configuration;
|
|
32
|
-
// verify required parameter 'meterId' is not null or undefined
|
|
33
|
-
if (meterId === null || meterId === undefined) {
|
|
34
|
-
throw new baseapi_1.RequiredError("MetersApi", "deleteMeter", "meterId");
|
|
35
|
-
}
|
|
36
|
-
// Path Params
|
|
37
|
-
const localVarPath = '/meters/{meterId}'
|
|
38
|
-
.replace('{' + 'meterId' + '}', encodeURIComponent(String(meterId)));
|
|
39
|
-
// Make Request Context
|
|
40
|
-
const requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.DELETE);
|
|
41
|
-
requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
|
|
42
|
-
let authMethod;
|
|
43
|
-
// Apply auth methods
|
|
44
|
-
authMethod = _config.authMethods["BearerAuthorizer"];
|
|
45
|
-
if (authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication) {
|
|
46
|
-
yield (authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication(requestContext));
|
|
47
|
-
}
|
|
48
|
-
const defaultAuth = ((_a = _options === null || _options === void 0 ? void 0 : _options.authMethods) === null || _a === void 0 ? void 0 : _a.default) || ((_c = (_b = this.configuration) === null || _b === void 0 ? void 0 : _b.authMethods) === null || _c === void 0 ? void 0 : _c.default);
|
|
49
|
-
if (defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication) {
|
|
50
|
-
yield (defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication(requestContext));
|
|
51
|
-
}
|
|
52
|
-
return requestContext;
|
|
53
|
-
});
|
|
54
|
-
}
|
|
55
|
-
/**
|
|
56
|
-
* Get a Meter by id.
|
|
57
|
-
* Get Meter
|
|
58
|
-
* @param meterId
|
|
59
|
-
*/
|
|
60
|
-
getMeter(meterId, _options) {
|
|
61
|
-
var _a, _b, _c;
|
|
62
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
63
|
-
let _config = _options || this.configuration;
|
|
64
|
-
// verify required parameter 'meterId' is not null or undefined
|
|
65
|
-
if (meterId === null || meterId === undefined) {
|
|
66
|
-
throw new baseapi_1.RequiredError("MetersApi", "getMeter", "meterId");
|
|
67
|
-
}
|
|
68
|
-
// Path Params
|
|
69
|
-
const localVarPath = '/meters/{meterId}'
|
|
70
|
-
.replace('{' + 'meterId' + '}', encodeURIComponent(String(meterId)));
|
|
71
|
-
// Make Request Context
|
|
72
|
-
const requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.GET);
|
|
73
|
-
requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
|
|
74
|
-
let authMethod;
|
|
75
|
-
// Apply auth methods
|
|
76
|
-
authMethod = _config.authMethods["BearerAuthorizer"];
|
|
77
|
-
if (authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication) {
|
|
78
|
-
yield (authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication(requestContext));
|
|
79
|
-
}
|
|
80
|
-
const defaultAuth = ((_a = _options === null || _options === void 0 ? void 0 : _options.authMethods) === null || _a === void 0 ? void 0 : _a.default) || ((_c = (_b = this.configuration) === null || _b === void 0 ? void 0 : _b.authMethods) === null || _c === void 0 ? void 0 : _c.default);
|
|
81
|
-
if (defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication) {
|
|
82
|
-
yield (defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication(requestContext));
|
|
83
|
-
}
|
|
84
|
-
return requestContext;
|
|
85
|
-
});
|
|
86
|
-
}
|
|
87
|
-
/**
|
|
88
|
-
* Get a list of Meters.
|
|
89
|
-
* List Meters
|
|
90
|
-
* @param limit
|
|
91
|
-
* @param cursor
|
|
92
|
-
*/
|
|
93
|
-
listMeters(limit, cursor, _options) {
|
|
94
|
-
var _a, _b, _c;
|
|
95
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
96
|
-
let _config = _options || this.configuration;
|
|
97
|
-
// Path Params
|
|
98
|
-
const localVarPath = '/meters';
|
|
99
|
-
// Make Request Context
|
|
100
|
-
const requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.GET);
|
|
101
|
-
requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
|
|
102
|
-
// Query Params
|
|
103
|
-
if (limit !== undefined) {
|
|
104
|
-
requestContext.setQueryParam("limit", ObjectSerializer_1.ObjectSerializer.serialize(limit, "number", ""));
|
|
105
|
-
}
|
|
106
|
-
// Query Params
|
|
107
|
-
if (cursor !== undefined) {
|
|
108
|
-
requestContext.setQueryParam("cursor", ObjectSerializer_1.ObjectSerializer.serialize(cursor, "string", ""));
|
|
109
|
-
}
|
|
110
|
-
let authMethod;
|
|
111
|
-
// Apply auth methods
|
|
112
|
-
authMethod = _config.authMethods["BearerAuthorizer"];
|
|
113
|
-
if (authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication) {
|
|
114
|
-
yield (authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication(requestContext));
|
|
115
|
-
}
|
|
116
|
-
const defaultAuth = ((_a = _options === null || _options === void 0 ? void 0 : _options.authMethods) === null || _a === void 0 ? void 0 : _a.default) || ((_c = (_b = this.configuration) === null || _b === void 0 ? void 0 : _b.authMethods) === null || _c === void 0 ? void 0 : _c.default);
|
|
117
|
-
if (defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication) {
|
|
118
|
-
yield (defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication(requestContext));
|
|
119
|
-
}
|
|
120
|
-
return requestContext;
|
|
121
|
-
});
|
|
122
|
-
}
|
|
123
|
-
/**
|
|
124
|
-
* Update a Meter by id.
|
|
125
|
-
* Update Meter
|
|
126
|
-
* @param updateMeterRequest
|
|
127
|
-
* @param meterId
|
|
128
|
-
*/
|
|
129
|
-
updateMeter(updateMeterRequest, meterId, _options) {
|
|
130
|
-
var _a, _b, _c;
|
|
131
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
132
|
-
let _config = _options || this.configuration;
|
|
133
|
-
// verify required parameter 'updateMeterRequest' is not null or undefined
|
|
134
|
-
if (updateMeterRequest === null || updateMeterRequest === undefined) {
|
|
135
|
-
throw new baseapi_1.RequiredError("MetersApi", "updateMeter", "updateMeterRequest");
|
|
136
|
-
}
|
|
137
|
-
// verify required parameter 'meterId' is not null or undefined
|
|
138
|
-
if (meterId === null || meterId === undefined) {
|
|
139
|
-
throw new baseapi_1.RequiredError("MetersApi", "updateMeter", "meterId");
|
|
140
|
-
}
|
|
141
|
-
// Path Params
|
|
142
|
-
const localVarPath = '/meters/{meterId}'
|
|
143
|
-
.replace('{' + 'meterId' + '}', encodeURIComponent(String(meterId)));
|
|
144
|
-
// Make Request Context
|
|
145
|
-
const requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.PUT);
|
|
146
|
-
requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
|
|
147
|
-
// Body Params
|
|
148
|
-
const contentType = ObjectSerializer_1.ObjectSerializer.getPreferredMediaType([
|
|
149
|
-
"application/json"
|
|
150
|
-
]);
|
|
151
|
-
requestContext.setHeaderParam("Content-Type", contentType);
|
|
152
|
-
const serializedBody = ObjectSerializer_1.ObjectSerializer.stringify(ObjectSerializer_1.ObjectSerializer.serialize(updateMeterRequest, "UpdateMeterRequest", ""), contentType);
|
|
153
|
-
requestContext.setBody(serializedBody);
|
|
154
|
-
let authMethod;
|
|
155
|
-
// Apply auth methods
|
|
156
|
-
authMethod = _config.authMethods["BearerAuthorizer"];
|
|
157
|
-
if (authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication) {
|
|
158
|
-
yield (authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication(requestContext));
|
|
159
|
-
}
|
|
160
|
-
const defaultAuth = ((_a = _options === null || _options === void 0 ? void 0 : _options.authMethods) === null || _a === void 0 ? void 0 : _a.default) || ((_c = (_b = this.configuration) === null || _b === void 0 ? void 0 : _b.authMethods) === null || _c === void 0 ? void 0 : _c.default);
|
|
161
|
-
if (defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication) {
|
|
162
|
-
yield (defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication(requestContext));
|
|
163
|
-
}
|
|
164
|
-
return requestContext;
|
|
165
|
-
});
|
|
166
|
-
}
|
|
167
|
-
}
|
|
168
|
-
exports.MetersApiRequestFactory = MetersApiRequestFactory;
|
|
169
|
-
class MetersApiResponseProcessor {
|
|
170
|
-
/**
|
|
171
|
-
* Unwraps the actual response sent by the server from the response context and deserializes the response content
|
|
172
|
-
* to the expected objects
|
|
173
|
-
*
|
|
174
|
-
* @params response Response returned by the server for a request to deleteMeter
|
|
175
|
-
* @throws ApiException if the response code was not in [200, 299]
|
|
176
|
-
*/
|
|
177
|
-
deleteMeterWithHttpInfo(response) {
|
|
178
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
179
|
-
const contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
|
|
180
|
-
if ((0, util_1.isCodeInRange)("200", response.httpStatusCode)) {
|
|
181
|
-
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), "DeleteMeterResponse", "");
|
|
182
|
-
return new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body);
|
|
183
|
-
}
|
|
184
|
-
if ((0, util_1.isCodeInRange)("400", response.httpStatusCode)) {
|
|
185
|
-
throw new exception_1.ApiException(response.httpStatusCode, "Bad Request", undefined, response.headers);
|
|
186
|
-
}
|
|
187
|
-
if ((0, util_1.isCodeInRange)("401", response.httpStatusCode)) {
|
|
188
|
-
throw new exception_1.ApiException(response.httpStatusCode, "Unauthorized", undefined, response.headers);
|
|
189
|
-
}
|
|
190
|
-
if ((0, util_1.isCodeInRange)("404", response.httpStatusCode)) {
|
|
191
|
-
throw new exception_1.ApiException(response.httpStatusCode, "Not Found", undefined, response.headers);
|
|
192
|
-
}
|
|
193
|
-
if ((0, util_1.isCodeInRange)("429", response.httpStatusCode)) {
|
|
194
|
-
throw new exception_1.ApiException(response.httpStatusCode, "Too Many Requests", undefined, response.headers);
|
|
195
|
-
}
|
|
196
|
-
if ((0, util_1.isCodeInRange)("500", response.httpStatusCode)) {
|
|
197
|
-
throw new exception_1.ApiException(response.httpStatusCode, "Internal Server Error", undefined, response.headers);
|
|
198
|
-
}
|
|
199
|
-
// Work around for missing responses in specification, e.g. for petstore.yaml
|
|
200
|
-
if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
|
|
201
|
-
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), "DeleteMeterResponse", "");
|
|
202
|
-
return new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body);
|
|
203
|
-
}
|
|
204
|
-
throw new exception_1.ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers);
|
|
205
|
-
});
|
|
206
|
-
}
|
|
207
|
-
/**
|
|
208
|
-
* Unwraps the actual response sent by the server from the response context and deserializes the response content
|
|
209
|
-
* to the expected objects
|
|
210
|
-
*
|
|
211
|
-
* @params response Response returned by the server for a request to getMeter
|
|
212
|
-
* @throws ApiException if the response code was not in [200, 299]
|
|
213
|
-
*/
|
|
214
|
-
getMeterWithHttpInfo(response) {
|
|
215
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
216
|
-
const contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
|
|
217
|
-
if ((0, util_1.isCodeInRange)("200", response.httpStatusCode)) {
|
|
218
|
-
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), "GetMeterResponse", "");
|
|
219
|
-
return new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body);
|
|
220
|
-
}
|
|
221
|
-
if ((0, util_1.isCodeInRange)("400", response.httpStatusCode)) {
|
|
222
|
-
throw new exception_1.ApiException(response.httpStatusCode, "Bad Request", undefined, response.headers);
|
|
223
|
-
}
|
|
224
|
-
if ((0, util_1.isCodeInRange)("401", response.httpStatusCode)) {
|
|
225
|
-
throw new exception_1.ApiException(response.httpStatusCode, "Unauthorized", undefined, response.headers);
|
|
226
|
-
}
|
|
227
|
-
if ((0, util_1.isCodeInRange)("404", response.httpStatusCode)) {
|
|
228
|
-
throw new exception_1.ApiException(response.httpStatusCode, "Not Found", undefined, response.headers);
|
|
229
|
-
}
|
|
230
|
-
if ((0, util_1.isCodeInRange)("429", response.httpStatusCode)) {
|
|
231
|
-
throw new exception_1.ApiException(response.httpStatusCode, "Too Many Requests", undefined, response.headers);
|
|
232
|
-
}
|
|
233
|
-
if ((0, util_1.isCodeInRange)("500", response.httpStatusCode)) {
|
|
234
|
-
throw new exception_1.ApiException(response.httpStatusCode, "Internal Server Error", undefined, response.headers);
|
|
235
|
-
}
|
|
236
|
-
// Work around for missing responses in specification, e.g. for petstore.yaml
|
|
237
|
-
if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
|
|
238
|
-
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), "GetMeterResponse", "");
|
|
239
|
-
return new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body);
|
|
240
|
-
}
|
|
241
|
-
throw new exception_1.ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers);
|
|
242
|
-
});
|
|
243
|
-
}
|
|
244
|
-
/**
|
|
245
|
-
* Unwraps the actual response sent by the server from the response context and deserializes the response content
|
|
246
|
-
* to the expected objects
|
|
247
|
-
*
|
|
248
|
-
* @params response Response returned by the server for a request to listMeters
|
|
249
|
-
* @throws ApiException if the response code was not in [200, 299]
|
|
250
|
-
*/
|
|
251
|
-
listMetersWithHttpInfo(response) {
|
|
252
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
253
|
-
const contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
|
|
254
|
-
if ((0, util_1.isCodeInRange)("200", response.httpStatusCode)) {
|
|
255
|
-
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), "ListMetersResponse", "");
|
|
256
|
-
return new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body);
|
|
257
|
-
}
|
|
258
|
-
if ((0, util_1.isCodeInRange)("400", response.httpStatusCode)) {
|
|
259
|
-
throw new exception_1.ApiException(response.httpStatusCode, "Bad Request", undefined, response.headers);
|
|
260
|
-
}
|
|
261
|
-
if ((0, util_1.isCodeInRange)("401", response.httpStatusCode)) {
|
|
262
|
-
throw new exception_1.ApiException(response.httpStatusCode, "Unauthorized", undefined, response.headers);
|
|
263
|
-
}
|
|
264
|
-
if ((0, util_1.isCodeInRange)("429", response.httpStatusCode)) {
|
|
265
|
-
throw new exception_1.ApiException(response.httpStatusCode, "Too Many Requests", undefined, response.headers);
|
|
266
|
-
}
|
|
267
|
-
if ((0, util_1.isCodeInRange)("500", response.httpStatusCode)) {
|
|
268
|
-
throw new exception_1.ApiException(response.httpStatusCode, "Internal Server Error", undefined, response.headers);
|
|
269
|
-
}
|
|
270
|
-
// Work around for missing responses in specification, e.g. for petstore.yaml
|
|
271
|
-
if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
|
|
272
|
-
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), "ListMetersResponse", "");
|
|
273
|
-
return new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body);
|
|
274
|
-
}
|
|
275
|
-
throw new exception_1.ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers);
|
|
276
|
-
});
|
|
277
|
-
}
|
|
278
|
-
/**
|
|
279
|
-
* Unwraps the actual response sent by the server from the response context and deserializes the response content
|
|
280
|
-
* to the expected objects
|
|
281
|
-
*
|
|
282
|
-
* @params response Response returned by the server for a request to updateMeter
|
|
283
|
-
* @throws ApiException if the response code was not in [200, 299]
|
|
284
|
-
*/
|
|
285
|
-
updateMeterWithHttpInfo(response) {
|
|
286
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
287
|
-
const contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
|
|
288
|
-
if ((0, util_1.isCodeInRange)("200", response.httpStatusCode)) {
|
|
289
|
-
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), "UpdateMeterResponse", "");
|
|
290
|
-
return new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body);
|
|
291
|
-
}
|
|
292
|
-
if ((0, util_1.isCodeInRange)("400", response.httpStatusCode)) {
|
|
293
|
-
throw new exception_1.ApiException(response.httpStatusCode, "Bad Request", undefined, response.headers);
|
|
294
|
-
}
|
|
295
|
-
if ((0, util_1.isCodeInRange)("401", response.httpStatusCode)) {
|
|
296
|
-
throw new exception_1.ApiException(response.httpStatusCode, "Unauthorized", undefined, response.headers);
|
|
297
|
-
}
|
|
298
|
-
if ((0, util_1.isCodeInRange)("404", response.httpStatusCode)) {
|
|
299
|
-
throw new exception_1.ApiException(response.httpStatusCode, "Not Found", undefined, response.headers);
|
|
300
|
-
}
|
|
301
|
-
if ((0, util_1.isCodeInRange)("429", response.httpStatusCode)) {
|
|
302
|
-
throw new exception_1.ApiException(response.httpStatusCode, "Too Many Requests", undefined, response.headers);
|
|
303
|
-
}
|
|
304
|
-
if ((0, util_1.isCodeInRange)("500", response.httpStatusCode)) {
|
|
305
|
-
throw new exception_1.ApiException(response.httpStatusCode, "Internal Server Error", undefined, response.headers);
|
|
306
|
-
}
|
|
307
|
-
// Work around for missing responses in specification, e.g. for petstore.yaml
|
|
308
|
-
if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
|
|
309
|
-
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), "UpdateMeterResponse", "");
|
|
310
|
-
return new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body);
|
|
311
|
-
}
|
|
312
|
-
throw new exception_1.ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers);
|
|
313
|
-
});
|
|
314
|
-
}
|
|
315
|
-
}
|
|
316
|
-
exports.MetersApiResponseProcessor = MetersApiResponseProcessor;
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
import { BaseAPIRequestFactory } from './baseapi';
|
|
2
|
-
import { Configuration } from '../configuration';
|
|
3
|
-
import { RequestContext, ResponseContext, HttpInfo } from '../http/http';
|
|
4
|
-
import { DeletePlanResponse } from '../models/DeletePlanResponse';
|
|
5
|
-
import { GetPlanResponse } from '../models/GetPlanResponse';
|
|
6
|
-
import { ListPlansResponse } from '../models/ListPlansResponse';
|
|
7
|
-
/**
|
|
8
|
-
* no description
|
|
9
|
-
*/
|
|
10
|
-
export declare class PlansApiRequestFactory extends BaseAPIRequestFactory {
|
|
11
|
-
/**
|
|
12
|
-
* Delete a Plan by id.
|
|
13
|
-
* Delete Plan
|
|
14
|
-
* @param planId
|
|
15
|
-
*/
|
|
16
|
-
deletePlan(planId: string, _options?: Configuration): Promise<RequestContext>;
|
|
17
|
-
/**
|
|
18
|
-
* Get a Plan by id.
|
|
19
|
-
* Get Plan
|
|
20
|
-
* @param planId
|
|
21
|
-
*/
|
|
22
|
-
getPlan(planId: string, _options?: Configuration): Promise<RequestContext>;
|
|
23
|
-
/**
|
|
24
|
-
* Get a list of Plans.
|
|
25
|
-
* List Plans
|
|
26
|
-
* @param limit
|
|
27
|
-
* @param cursor
|
|
28
|
-
*/
|
|
29
|
-
listPlans(limit?: number, cursor?: string, _options?: Configuration): Promise<RequestContext>;
|
|
30
|
-
}
|
|
31
|
-
export declare class PlansApiResponseProcessor {
|
|
32
|
-
/**
|
|
33
|
-
* Unwraps the actual response sent by the server from the response context and deserializes the response content
|
|
34
|
-
* to the expected objects
|
|
35
|
-
*
|
|
36
|
-
* @params response Response returned by the server for a request to deletePlan
|
|
37
|
-
* @throws ApiException if the response code was not in [200, 299]
|
|
38
|
-
*/
|
|
39
|
-
deletePlanWithHttpInfo(response: ResponseContext): Promise<HttpInfo<DeletePlanResponse>>;
|
|
40
|
-
/**
|
|
41
|
-
* Unwraps the actual response sent by the server from the response context and deserializes the response content
|
|
42
|
-
* to the expected objects
|
|
43
|
-
*
|
|
44
|
-
* @params response Response returned by the server for a request to getPlan
|
|
45
|
-
* @throws ApiException if the response code was not in [200, 299]
|
|
46
|
-
*/
|
|
47
|
-
getPlanWithHttpInfo(response: ResponseContext): Promise<HttpInfo<GetPlanResponse>>;
|
|
48
|
-
/**
|
|
49
|
-
* Unwraps the actual response sent by the server from the response context and deserializes the response content
|
|
50
|
-
* to the expected objects
|
|
51
|
-
*
|
|
52
|
-
* @params response Response returned by the server for a request to listPlans
|
|
53
|
-
* @throws ApiException if the response code was not in [200, 299]
|
|
54
|
-
*/
|
|
55
|
-
listPlansWithHttpInfo(response: ResponseContext): Promise<HttpInfo<ListPlansResponse>>;
|
|
56
|
-
}
|