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,248 +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.CreditsApiResponseProcessor = exports.CreditsApiRequestFactory = 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 CreditsApiRequestFactory extends baseapi_1.BaseAPIRequestFactory {
|
|
23
|
-
/**
|
|
24
|
-
* This endpoint is used to deduct credits from the specified customer account. Submit the credit amount and customer ID in the request body to deduct the credits. The deducted credits will be subtracted from the customer\'s account.
|
|
25
|
-
* Deduct credits from customer credit ledger
|
|
26
|
-
* @param deductCreditsRequest
|
|
27
|
-
*/
|
|
28
|
-
deductCredits(deductCreditsRequest, _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 'deductCreditsRequest' is not null or undefined
|
|
33
|
-
if (deductCreditsRequest === null || deductCreditsRequest === undefined) {
|
|
34
|
-
throw new baseapi_1.RequiredError("CreditsApi", "deductCredits", "deductCreditsRequest");
|
|
35
|
-
}
|
|
36
|
-
// Path Params
|
|
37
|
-
const localVarPath = '/credits/deduct';
|
|
38
|
-
// Make Request Context
|
|
39
|
-
const requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.POST);
|
|
40
|
-
requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
|
|
41
|
-
// Body Params
|
|
42
|
-
const contentType = ObjectSerializer_1.ObjectSerializer.getPreferredMediaType([
|
|
43
|
-
"application/json"
|
|
44
|
-
]);
|
|
45
|
-
requestContext.setHeaderParam("Content-Type", contentType);
|
|
46
|
-
const serializedBody = ObjectSerializer_1.ObjectSerializer.stringify(ObjectSerializer_1.ObjectSerializer.serialize(deductCreditsRequest, "DeductCreditsRequest", ""), contentType);
|
|
47
|
-
requestContext.setBody(serializedBody);
|
|
48
|
-
let authMethod;
|
|
49
|
-
// Apply auth methods
|
|
50
|
-
authMethod = _config.authMethods["BearerAuthorizer"];
|
|
51
|
-
if (authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication) {
|
|
52
|
-
yield (authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication(requestContext));
|
|
53
|
-
}
|
|
54
|
-
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);
|
|
55
|
-
if (defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication) {
|
|
56
|
-
yield (defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication(requestContext));
|
|
57
|
-
}
|
|
58
|
-
return requestContext;
|
|
59
|
-
});
|
|
60
|
-
}
|
|
61
|
-
/**
|
|
62
|
-
* This endpoint is used to grant credits to a customer. Submit the credit amount and customer ID in the request body to grant the credits. The granted credits will be added to the customer\'s account.
|
|
63
|
-
* Grant credits to a customer credit ledger
|
|
64
|
-
* @param grantCreditsRequest
|
|
65
|
-
*/
|
|
66
|
-
grantCredits(grantCreditsRequest, _options) {
|
|
67
|
-
var _a, _b, _c;
|
|
68
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
69
|
-
let _config = _options || this.configuration;
|
|
70
|
-
// verify required parameter 'grantCreditsRequest' is not null or undefined
|
|
71
|
-
if (grantCreditsRequest === null || grantCreditsRequest === undefined) {
|
|
72
|
-
throw new baseapi_1.RequiredError("CreditsApi", "grantCredits", "grantCreditsRequest");
|
|
73
|
-
}
|
|
74
|
-
// Path Params
|
|
75
|
-
const localVarPath = '/credits/grant';
|
|
76
|
-
// Make Request Context
|
|
77
|
-
const requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.POST);
|
|
78
|
-
requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
|
|
79
|
-
// Body Params
|
|
80
|
-
const contentType = ObjectSerializer_1.ObjectSerializer.getPreferredMediaType([
|
|
81
|
-
"application/json"
|
|
82
|
-
]);
|
|
83
|
-
requestContext.setHeaderParam("Content-Type", contentType);
|
|
84
|
-
const serializedBody = ObjectSerializer_1.ObjectSerializer.stringify(ObjectSerializer_1.ObjectSerializer.serialize(grantCreditsRequest, "GrantCreditsRequest", ""), contentType);
|
|
85
|
-
requestContext.setBody(serializedBody);
|
|
86
|
-
let authMethod;
|
|
87
|
-
// Apply auth methods
|
|
88
|
-
authMethod = _config.authMethods["BearerAuthorizer"];
|
|
89
|
-
if (authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication) {
|
|
90
|
-
yield (authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication(requestContext));
|
|
91
|
-
}
|
|
92
|
-
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);
|
|
93
|
-
if (defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication) {
|
|
94
|
-
yield (defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication(requestContext));
|
|
95
|
-
}
|
|
96
|
-
return requestContext;
|
|
97
|
-
});
|
|
98
|
-
}
|
|
99
|
-
/**
|
|
100
|
-
* This endpoint is used to retrieve the credit ledger entries for a specific customer.
|
|
101
|
-
* Retrieve credit ledger entries for customer.
|
|
102
|
-
* @param customerId
|
|
103
|
-
* @param limit
|
|
104
|
-
* @param cursor
|
|
105
|
-
*/
|
|
106
|
-
listCreditLedgerEntries(customerId, limit, cursor, _options) {
|
|
107
|
-
var _a, _b, _c;
|
|
108
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
109
|
-
let _config = _options || this.configuration;
|
|
110
|
-
// verify required parameter 'customerId' is not null or undefined
|
|
111
|
-
if (customerId === null || customerId === undefined) {
|
|
112
|
-
throw new baseapi_1.RequiredError("CreditsApi", "listCreditLedgerEntries", "customerId");
|
|
113
|
-
}
|
|
114
|
-
// Path Params
|
|
115
|
-
const localVarPath = '/credits';
|
|
116
|
-
// Make Request Context
|
|
117
|
-
const requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.GET);
|
|
118
|
-
requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
|
|
119
|
-
// Query Params
|
|
120
|
-
if (customerId !== undefined) {
|
|
121
|
-
requestContext.setQueryParam("customerId", ObjectSerializer_1.ObjectSerializer.serialize(customerId, "string", ""));
|
|
122
|
-
}
|
|
123
|
-
// Query Params
|
|
124
|
-
if (limit !== undefined) {
|
|
125
|
-
requestContext.setQueryParam("limit", ObjectSerializer_1.ObjectSerializer.serialize(limit, "number", ""));
|
|
126
|
-
}
|
|
127
|
-
// Query Params
|
|
128
|
-
if (cursor !== undefined) {
|
|
129
|
-
requestContext.setQueryParam("cursor", ObjectSerializer_1.ObjectSerializer.serialize(cursor, "string", ""));
|
|
130
|
-
}
|
|
131
|
-
let authMethod;
|
|
132
|
-
// Apply auth methods
|
|
133
|
-
authMethod = _config.authMethods["BearerAuthorizer"];
|
|
134
|
-
if (authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication) {
|
|
135
|
-
yield (authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication(requestContext));
|
|
136
|
-
}
|
|
137
|
-
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);
|
|
138
|
-
if (defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication) {
|
|
139
|
-
yield (defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication(requestContext));
|
|
140
|
-
}
|
|
141
|
-
return requestContext;
|
|
142
|
-
});
|
|
143
|
-
}
|
|
144
|
-
}
|
|
145
|
-
exports.CreditsApiRequestFactory = CreditsApiRequestFactory;
|
|
146
|
-
class CreditsApiResponseProcessor {
|
|
147
|
-
/**
|
|
148
|
-
* Unwraps the actual response sent by the server from the response context and deserializes the response content
|
|
149
|
-
* to the expected objects
|
|
150
|
-
*
|
|
151
|
-
* @params response Response returned by the server for a request to deductCredits
|
|
152
|
-
* @throws ApiException if the response code was not in [200, 299]
|
|
153
|
-
*/
|
|
154
|
-
deductCreditsWithHttpInfo(response) {
|
|
155
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
156
|
-
const contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
|
|
157
|
-
if ((0, util_1.isCodeInRange)("200", response.httpStatusCode)) {
|
|
158
|
-
return new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, undefined);
|
|
159
|
-
}
|
|
160
|
-
if ((0, util_1.isCodeInRange)("400", response.httpStatusCode)) {
|
|
161
|
-
throw new exception_1.ApiException(response.httpStatusCode, "Bad Request", undefined, response.headers);
|
|
162
|
-
}
|
|
163
|
-
if ((0, util_1.isCodeInRange)("401", response.httpStatusCode)) {
|
|
164
|
-
throw new exception_1.ApiException(response.httpStatusCode, "Unauthorized", undefined, response.headers);
|
|
165
|
-
}
|
|
166
|
-
if ((0, util_1.isCodeInRange)("429", response.httpStatusCode)) {
|
|
167
|
-
throw new exception_1.ApiException(response.httpStatusCode, "Too Many Requests", undefined, response.headers);
|
|
168
|
-
}
|
|
169
|
-
if ((0, util_1.isCodeInRange)("500", response.httpStatusCode)) {
|
|
170
|
-
throw new exception_1.ApiException(response.httpStatusCode, "Internal Server Error", undefined, response.headers);
|
|
171
|
-
}
|
|
172
|
-
// Work around for missing responses in specification, e.g. for petstore.yaml
|
|
173
|
-
if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
|
|
174
|
-
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), "void", "");
|
|
175
|
-
return new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body);
|
|
176
|
-
}
|
|
177
|
-
throw new exception_1.ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers);
|
|
178
|
-
});
|
|
179
|
-
}
|
|
180
|
-
/**
|
|
181
|
-
* Unwraps the actual response sent by the server from the response context and deserializes the response content
|
|
182
|
-
* to the expected objects
|
|
183
|
-
*
|
|
184
|
-
* @params response Response returned by the server for a request to grantCredits
|
|
185
|
-
* @throws ApiException if the response code was not in [200, 299]
|
|
186
|
-
*/
|
|
187
|
-
grantCreditsWithHttpInfo(response) {
|
|
188
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
189
|
-
const contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
|
|
190
|
-
if ((0, util_1.isCodeInRange)("200", response.httpStatusCode)) {
|
|
191
|
-
return new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, undefined);
|
|
192
|
-
}
|
|
193
|
-
if ((0, util_1.isCodeInRange)("400", response.httpStatusCode)) {
|
|
194
|
-
throw new exception_1.ApiException(response.httpStatusCode, "Bad Request", undefined, response.headers);
|
|
195
|
-
}
|
|
196
|
-
if ((0, util_1.isCodeInRange)("401", response.httpStatusCode)) {
|
|
197
|
-
throw new exception_1.ApiException(response.httpStatusCode, "Unauthorized", undefined, response.headers);
|
|
198
|
-
}
|
|
199
|
-
if ((0, util_1.isCodeInRange)("429", response.httpStatusCode)) {
|
|
200
|
-
throw new exception_1.ApiException(response.httpStatusCode, "Too Many Requests", undefined, response.headers);
|
|
201
|
-
}
|
|
202
|
-
if ((0, util_1.isCodeInRange)("500", response.httpStatusCode)) {
|
|
203
|
-
throw new exception_1.ApiException(response.httpStatusCode, "Internal Server Error", undefined, response.headers);
|
|
204
|
-
}
|
|
205
|
-
// Work around for missing responses in specification, e.g. for petstore.yaml
|
|
206
|
-
if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
|
|
207
|
-
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), "void", "");
|
|
208
|
-
return new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body);
|
|
209
|
-
}
|
|
210
|
-
throw new exception_1.ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers);
|
|
211
|
-
});
|
|
212
|
-
}
|
|
213
|
-
/**
|
|
214
|
-
* Unwraps the actual response sent by the server from the response context and deserializes the response content
|
|
215
|
-
* to the expected objects
|
|
216
|
-
*
|
|
217
|
-
* @params response Response returned by the server for a request to listCreditLedgerEntries
|
|
218
|
-
* @throws ApiException if the response code was not in [200, 299]
|
|
219
|
-
*/
|
|
220
|
-
listCreditLedgerEntriesWithHttpInfo(response) {
|
|
221
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
222
|
-
const contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
|
|
223
|
-
if ((0, util_1.isCodeInRange)("200", response.httpStatusCode)) {
|
|
224
|
-
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), "ListCreditLedgerEntriesResponse", "");
|
|
225
|
-
return new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body);
|
|
226
|
-
}
|
|
227
|
-
if ((0, util_1.isCodeInRange)("400", response.httpStatusCode)) {
|
|
228
|
-
throw new exception_1.ApiException(response.httpStatusCode, "Bad Request", undefined, response.headers);
|
|
229
|
-
}
|
|
230
|
-
if ((0, util_1.isCodeInRange)("401", response.httpStatusCode)) {
|
|
231
|
-
throw new exception_1.ApiException(response.httpStatusCode, "Unauthorized", undefined, response.headers);
|
|
232
|
-
}
|
|
233
|
-
if ((0, util_1.isCodeInRange)("429", response.httpStatusCode)) {
|
|
234
|
-
throw new exception_1.ApiException(response.httpStatusCode, "Too Many Requests", undefined, response.headers);
|
|
235
|
-
}
|
|
236
|
-
if ((0, util_1.isCodeInRange)("500", response.httpStatusCode)) {
|
|
237
|
-
throw new exception_1.ApiException(response.httpStatusCode, "Internal Server Error", undefined, response.headers);
|
|
238
|
-
}
|
|
239
|
-
// Work around for missing responses in specification, e.g. for petstore.yaml
|
|
240
|
-
if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
|
|
241
|
-
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), "ListCreditLedgerEntriesResponse", "");
|
|
242
|
-
return new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body);
|
|
243
|
-
}
|
|
244
|
-
throw new exception_1.ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers);
|
|
245
|
-
});
|
|
246
|
-
}
|
|
247
|
-
}
|
|
248
|
-
exports.CreditsApiResponseProcessor = CreditsApiResponseProcessor;
|
|
@@ -1,89 +0,0 @@
|
|
|
1
|
-
import { BaseAPIRequestFactory } from './baseapi';
|
|
2
|
-
import { Configuration } from '../configuration';
|
|
3
|
-
import { RequestContext, ResponseContext, HttpInfo } from '../http/http';
|
|
4
|
-
import { CreateCustomerRequest } from '../models/CreateCustomerRequest';
|
|
5
|
-
import { CreateCustomerResponse } from '../models/CreateCustomerResponse';
|
|
6
|
-
import { DeleteCustomerResponse } from '../models/DeleteCustomerResponse';
|
|
7
|
-
import { GetCustomerResponse } from '../models/GetCustomerResponse';
|
|
8
|
-
import { ListCustomersResponse } from '../models/ListCustomersResponse';
|
|
9
|
-
import { UpdateCustomerRequest } from '../models/UpdateCustomerRequest';
|
|
10
|
-
import { UpdateCustomerResponse } from '../models/UpdateCustomerResponse';
|
|
11
|
-
/**
|
|
12
|
-
* no description
|
|
13
|
-
*/
|
|
14
|
-
export declare class CustomersApiRequestFactory extends BaseAPIRequestFactory {
|
|
15
|
-
/**
|
|
16
|
-
* Create a new Customer.
|
|
17
|
-
* Create Customer
|
|
18
|
-
* @param createCustomerRequest
|
|
19
|
-
*/
|
|
20
|
-
createCustomer(createCustomerRequest: CreateCustomerRequest, _options?: Configuration): Promise<RequestContext>;
|
|
21
|
-
/**
|
|
22
|
-
* Delete a Customer by id.
|
|
23
|
-
* Delete Customer
|
|
24
|
-
* @param customerId
|
|
25
|
-
*/
|
|
26
|
-
deleteCustomer(customerId: string, _options?: Configuration): Promise<RequestContext>;
|
|
27
|
-
/**
|
|
28
|
-
* Get a Customer by id.
|
|
29
|
-
* Get Customer
|
|
30
|
-
* @param customerId
|
|
31
|
-
*/
|
|
32
|
-
getCustomer(customerId: string, _options?: Configuration): Promise<RequestContext>;
|
|
33
|
-
/**
|
|
34
|
-
* Get a list of Customers.
|
|
35
|
-
* List Customers
|
|
36
|
-
* @param limit
|
|
37
|
-
* @param cursor
|
|
38
|
-
*/
|
|
39
|
-
listCustomers(limit?: number, cursor?: string, _options?: Configuration): Promise<RequestContext>;
|
|
40
|
-
/**
|
|
41
|
-
* Update a Customer by id.
|
|
42
|
-
* Update Customer
|
|
43
|
-
* @param updateCustomerRequest
|
|
44
|
-
* @param customerId
|
|
45
|
-
*/
|
|
46
|
-
updateCustomer(updateCustomerRequest: UpdateCustomerRequest, customerId: string, _options?: Configuration): Promise<RequestContext>;
|
|
47
|
-
}
|
|
48
|
-
export declare class CustomersApiResponseProcessor {
|
|
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 createCustomer
|
|
54
|
-
* @throws ApiException if the response code was not in [200, 299]
|
|
55
|
-
*/
|
|
56
|
-
createCustomerWithHttpInfo(response: ResponseContext): Promise<HttpInfo<CreateCustomerResponse>>;
|
|
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 deleteCustomer
|
|
62
|
-
* @throws ApiException if the response code was not in [200, 299]
|
|
63
|
-
*/
|
|
64
|
-
deleteCustomerWithHttpInfo(response: ResponseContext): Promise<HttpInfo<DeleteCustomerResponse>>;
|
|
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 getCustomer
|
|
70
|
-
* @throws ApiException if the response code was not in [200, 299]
|
|
71
|
-
*/
|
|
72
|
-
getCustomerWithHttpInfo(response: ResponseContext): Promise<HttpInfo<GetCustomerResponse>>;
|
|
73
|
-
/**
|
|
74
|
-
* Unwraps the actual response sent by the server from the response context and deserializes the response content
|
|
75
|
-
* to the expected objects
|
|
76
|
-
*
|
|
77
|
-
* @params response Response returned by the server for a request to listCustomers
|
|
78
|
-
* @throws ApiException if the response code was not in [200, 299]
|
|
79
|
-
*/
|
|
80
|
-
listCustomersWithHttpInfo(response: ResponseContext): Promise<HttpInfo<ListCustomersResponse>>;
|
|
81
|
-
/**
|
|
82
|
-
* Unwraps the actual response sent by the server from the response context and deserializes the response content
|
|
83
|
-
* to the expected objects
|
|
84
|
-
*
|
|
85
|
-
* @params response Response returned by the server for a request to updateCustomer
|
|
86
|
-
* @throws ApiException if the response code was not in [200, 299]
|
|
87
|
-
*/
|
|
88
|
-
updateCustomerWithHttpInfo(response: ResponseContext): Promise<HttpInfo<UpdateCustomerResponse>>;
|
|
89
|
-
}
|