vayu-ts 0.2.13 → 0.2.14
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/dist/openapi/apis/CustomersApi.d.ts +15 -0
- package/dist/openapi/apis/CustomersApi.js +64 -0
- package/dist/openapi/apis/MeasurementsApi.d.ts +72 -0
- package/dist/openapi/apis/{PlansApi.js → MeasurementsApi.js} +106 -39
- package/dist/openapi/index.d.ts +1 -1
- package/dist/openapi/index.js +2 -4
- package/dist/openapi/models/CreateMeasurementRequest.d.ts +44 -0
- package/dist/openapi/models/{NetSuiteExportSalesOrderRequest.js → CreateMeasurementRequest.js} +21 -15
- package/dist/openapi/models/{NetSuiteSyncInvoicesRequestDataEntity.d.ts → CreateMeasurementRequestUsageDate.d.ts} +7 -2
- package/dist/openapi/models/{NetSuiteSyncInvoicesResponse.js → CreateMeasurementRequestUsageDate.js} +22 -13
- package/dist/openapi/models/{GetPlanResponse.d.ts → CreateMeasurementResponse.d.ts} +3 -3
- package/dist/openapi/models/{DeletePlanResponse.js → CreateMeasurementResponse.js} +10 -10
- package/dist/openapi/models/{GetPlanResponsePlan.d.ts → CreateMeasurementResponseMeasurement.d.ts} +13 -7
- package/dist/openapi/models/{DeletePlanResponsePlan.js → CreateMeasurementResponseMeasurement.js} +21 -21
- package/dist/openapi/models/CreditLedgerEntry.d.ts +5 -1
- package/dist/openapi/models/CreditLedgerEntry.js +27 -3
- package/dist/openapi/models/DeleteMeasurementResponse.d.ts +32 -0
- package/dist/openapi/models/{NetSuiteSyncInvoicesRequestDataEntity.js → DeleteMeasurementResponse.js} +10 -10
- package/dist/openapi/models/{DeletePlanResponsePlan.d.ts → DeleteMeasurementResponseMeasurement.d.ts} +13 -7
- package/dist/openapi/models/{GetPlanResponsePlan.js → DeleteMeasurementResponseMeasurement.js} +27 -15
- package/dist/openapi/models/{NetSuiteExportSalesOrderRequest.d.ts → GetCustomerProductsConsumptionsByAliasResponse.d.ts} +3 -4
- package/dist/openapi/models/{NetSuiteSyncInvoicesRequestDataItem.js → GetCustomerProductsConsumptionsByAliasResponse.js} +10 -10
- package/dist/openapi/models/{DeletePlanResponse.d.ts → GetMeasurementResponse.d.ts} +3 -3
- package/dist/openapi/models/{GetPlanResponse.js → GetMeasurementResponse.js} +10 -10
- package/dist/openapi/models/{ListPlansResponse.d.ts → ListMeasurementsResponse.d.ts} +3 -3
- package/dist/openapi/models/{ListPlansResponse.js → ListMeasurementsResponse.js} +10 -10
- package/dist/openapi/models/NotificationEventType.d.ts +4 -0
- package/dist/openapi/models/NotificationEventType.js +4 -0
- package/dist/openapi/models/ObjectSerializer.d.ts +9 -22
- package/dist/openapi/models/ObjectSerializer.js +27 -61
- package/dist/openapi/models/all.d.ts +9 -22
- package/dist/openapi/models/all.js +9 -22
- package/dist/openapi/types/ObservableAPI.d.ts +75 -117
- package/dist/openapi/types/ObservableAPI.js +142 -220
- package/dist/openapi/types/PromiseAPI.d.ts +73 -111
- package/dist/openapi/types/PromiseAPI.js +104 -156
- package/dist/sdk/clients/index.d.ts +0 -1
- package/dist/sdk/clients/index.js +0 -1
- package/dist/sdk/index.d.ts +1 -2
- package/dist/sdk/index.js +0 -3
- package/dist/sdk/types/index.d.ts +0 -1
- package/dist/sdk/types/index.js +0 -1
- package/package.json +1 -1
- package/dist/openapi/apis/IntegrationsApi.d.ts +0 -41
- package/dist/openapi/apis/IntegrationsApi.js +0 -151
- package/dist/openapi/apis/PlansApi.d.ts +0 -56
- package/dist/openapi/apis/ReportsApi.d.ts +0 -41
- package/dist/openapi/apis/ReportsApi.js +0 -147
- package/dist/openapi/models/BillingInterval.d.ts +0 -18
- package/dist/openapi/models/BillingInterval.js +0 -22
- package/dist/openapi/models/ContractStatus.d.ts +0 -19
- package/dist/openapi/models/ContractStatus.js +0 -23
- package/dist/openapi/models/Currency.d.ts +0 -17
- package/dist/openapi/models/Currency.js +0 -21
- package/dist/openapi/models/GetCommitmentReportResponse.d.ts +0 -49
- package/dist/openapi/models/GetCommitmentReportResponse.js +0 -128
- package/dist/openapi/models/GetProductsUsageReportResponse.d.ts +0 -49
- package/dist/openapi/models/GetProductsUsageReportResponse.js +0 -128
- package/dist/openapi/models/NetSuiteSyncInvoicesRequest.d.ts +0 -37
- package/dist/openapi/models/NetSuiteSyncInvoicesRequest.js +0 -48
- package/dist/openapi/models/NetSuiteSyncInvoicesRequestData.d.ts +0 -42
- package/dist/openapi/models/NetSuiteSyncInvoicesRequestData.js +0 -86
- package/dist/openapi/models/NetSuiteSyncInvoicesRequestDataItem.d.ts +0 -32
- package/dist/openapi/models/NetSuiteSyncInvoicesRequestDataItemItemsInner.d.ts +0 -36
- package/dist/openapi/models/NetSuiteSyncInvoicesRequestDataItemItemsInner.js +0 -56
- package/dist/openapi/models/NetSuiteSyncInvoicesResponse.d.ts +0 -32
- package/dist/openapi/models/PaymentTerm.d.ts +0 -18
- package/dist/openapi/models/PaymentTerm.js +0 -22
- package/dist/openapi/models/PlanBillingData.d.ts +0 -41
- package/dist/openapi/models/PlanBillingData.js +0 -59
- package/dist/openapi/models/PlanDuration.d.ts +0 -30
- package/dist/openapi/models/PlanDuration.js +0 -25
- package/dist/openapi/models/PlanStatus.d.ts +0 -19
- package/dist/openapi/models/PlanStatus.js +0 -23
- package/dist/openapi/models/UnlimitedDuration.d.ts +0 -14
- package/dist/openapi/models/UnlimitedDuration.js +0 -18
- package/dist/sdk/clients/PlansClient.d.ts +0 -8
- package/dist/sdk/clients/PlansClient.js +0 -22
- package/dist/sdk/types/Plans.d.ts +0 -1
- package/dist/sdk/types/Plans.js +0 -2
|
@@ -1,151 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.IntegrationsApiResponseProcessor = exports.IntegrationsApiRequestFactory = void 0;
|
|
4
|
-
// TODO: better import syntax?
|
|
5
|
-
const baseapi_1 = require("./baseapi");
|
|
6
|
-
const http_1 = require("../http/http");
|
|
7
|
-
const ObjectSerializer_1 = require("../models/ObjectSerializer");
|
|
8
|
-
const exception_1 = require("./exception");
|
|
9
|
-
const util_1 = require("../util");
|
|
10
|
-
/**
|
|
11
|
-
* no description
|
|
12
|
-
*/
|
|
13
|
-
class IntegrationsApiRequestFactory extends baseapi_1.BaseAPIRequestFactory {
|
|
14
|
-
/**
|
|
15
|
-
* This endpoint is used to export sales order to NetSuite.
|
|
16
|
-
* Export sales order to NetSuite
|
|
17
|
-
* @param netSuiteExportSalesOrderRequest
|
|
18
|
-
*/
|
|
19
|
-
async exportNetSuiteSalesOrder(netSuiteExportSalesOrderRequest, _options) {
|
|
20
|
-
let _config = _options || this.configuration;
|
|
21
|
-
// verify required parameter 'netSuiteExportSalesOrderRequest' is not null or undefined
|
|
22
|
-
if (netSuiteExportSalesOrderRequest === null || netSuiteExportSalesOrderRequest === undefined) {
|
|
23
|
-
throw new baseapi_1.RequiredError("IntegrationsApi", "exportNetSuiteSalesOrder", "netSuiteExportSalesOrderRequest");
|
|
24
|
-
}
|
|
25
|
-
// Path Params
|
|
26
|
-
const localVarPath = '/integrations/netsuite/export-sales-order';
|
|
27
|
-
// Make Request Context
|
|
28
|
-
const requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.POST);
|
|
29
|
-
requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
|
|
30
|
-
// Body Params
|
|
31
|
-
const contentType = ObjectSerializer_1.ObjectSerializer.getPreferredMediaType([
|
|
32
|
-
"application/json"
|
|
33
|
-
]);
|
|
34
|
-
requestContext.setHeaderParam("Content-Type", contentType);
|
|
35
|
-
const serializedBody = ObjectSerializer_1.ObjectSerializer.stringify(ObjectSerializer_1.ObjectSerializer.serialize(netSuiteExportSalesOrderRequest, "NetSuiteExportSalesOrderRequest", ""), contentType);
|
|
36
|
-
requestContext.setBody(serializedBody);
|
|
37
|
-
let authMethod;
|
|
38
|
-
// Apply auth methods
|
|
39
|
-
authMethod = _config.authMethods["BearerAuthorizer"];
|
|
40
|
-
if (authMethod?.applySecurityAuthentication) {
|
|
41
|
-
await authMethod?.applySecurityAuthentication(requestContext);
|
|
42
|
-
}
|
|
43
|
-
const defaultAuth = _options?.authMethods?.default || this.configuration?.authMethods?.default;
|
|
44
|
-
if (defaultAuth?.applySecurityAuthentication) {
|
|
45
|
-
await defaultAuth?.applySecurityAuthentication(requestContext);
|
|
46
|
-
}
|
|
47
|
-
return requestContext;
|
|
48
|
-
}
|
|
49
|
-
/**
|
|
50
|
-
* This endpoint is used to sync invoices to NetSuite.
|
|
51
|
-
* Sync invoices to NetSuite
|
|
52
|
-
* @param netSuiteSyncInvoicesRequest
|
|
53
|
-
*/
|
|
54
|
-
async netSuiteSyncInvoices(netSuiteSyncInvoicesRequest, _options) {
|
|
55
|
-
let _config = _options || this.configuration;
|
|
56
|
-
// verify required parameter 'netSuiteSyncInvoicesRequest' is not null or undefined
|
|
57
|
-
if (netSuiteSyncInvoicesRequest === null || netSuiteSyncInvoicesRequest === undefined) {
|
|
58
|
-
throw new baseapi_1.RequiredError("IntegrationsApi", "netSuiteSyncInvoices", "netSuiteSyncInvoicesRequest");
|
|
59
|
-
}
|
|
60
|
-
// Path Params
|
|
61
|
-
const localVarPath = '/integrations/netsuite/sync-invoices';
|
|
62
|
-
// Make Request Context
|
|
63
|
-
const requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.POST);
|
|
64
|
-
requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
|
|
65
|
-
// Body Params
|
|
66
|
-
const contentType = ObjectSerializer_1.ObjectSerializer.getPreferredMediaType([
|
|
67
|
-
"application/json"
|
|
68
|
-
]);
|
|
69
|
-
requestContext.setHeaderParam("Content-Type", contentType);
|
|
70
|
-
const serializedBody = ObjectSerializer_1.ObjectSerializer.stringify(ObjectSerializer_1.ObjectSerializer.serialize(netSuiteSyncInvoicesRequest, "NetSuiteSyncInvoicesRequest", ""), contentType);
|
|
71
|
-
requestContext.setBody(serializedBody);
|
|
72
|
-
let authMethod;
|
|
73
|
-
// Apply auth methods
|
|
74
|
-
authMethod = _config.authMethods["BearerAuthorizer"];
|
|
75
|
-
if (authMethod?.applySecurityAuthentication) {
|
|
76
|
-
await authMethod?.applySecurityAuthentication(requestContext);
|
|
77
|
-
}
|
|
78
|
-
const defaultAuth = _options?.authMethods?.default || this.configuration?.authMethods?.default;
|
|
79
|
-
if (defaultAuth?.applySecurityAuthentication) {
|
|
80
|
-
await defaultAuth?.applySecurityAuthentication(requestContext);
|
|
81
|
-
}
|
|
82
|
-
return requestContext;
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
exports.IntegrationsApiRequestFactory = IntegrationsApiRequestFactory;
|
|
86
|
-
class IntegrationsApiResponseProcessor {
|
|
87
|
-
/**
|
|
88
|
-
* Unwraps the actual response sent by the server from the response context and deserializes the response content
|
|
89
|
-
* to the expected objects
|
|
90
|
-
*
|
|
91
|
-
* @params response Response returned by the server for a request to exportNetSuiteSalesOrder
|
|
92
|
-
* @throws ApiException if the response code was not in [200, 299]
|
|
93
|
-
*/
|
|
94
|
-
async exportNetSuiteSalesOrderWithHttpInfo(response) {
|
|
95
|
-
const contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
|
|
96
|
-
if ((0, util_1.isCodeInRange)("200", response.httpStatusCode)) {
|
|
97
|
-
return new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, undefined);
|
|
98
|
-
}
|
|
99
|
-
if ((0, util_1.isCodeInRange)("400", response.httpStatusCode)) {
|
|
100
|
-
throw new exception_1.ApiException(response.httpStatusCode, "Bad Request", undefined, response.headers);
|
|
101
|
-
}
|
|
102
|
-
if ((0, util_1.isCodeInRange)("401", response.httpStatusCode)) {
|
|
103
|
-
throw new exception_1.ApiException(response.httpStatusCode, "Unauthorized", undefined, response.headers);
|
|
104
|
-
}
|
|
105
|
-
if ((0, util_1.isCodeInRange)("429", response.httpStatusCode)) {
|
|
106
|
-
throw new exception_1.ApiException(response.httpStatusCode, "Too Many Requests", undefined, response.headers);
|
|
107
|
-
}
|
|
108
|
-
if ((0, util_1.isCodeInRange)("500", response.httpStatusCode)) {
|
|
109
|
-
throw new exception_1.ApiException(response.httpStatusCode, "Internal Server Error", undefined, response.headers);
|
|
110
|
-
}
|
|
111
|
-
// Work around for missing responses in specification, e.g. for petstore.yaml
|
|
112
|
-
if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
|
|
113
|
-
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "void", "");
|
|
114
|
-
return new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body);
|
|
115
|
-
}
|
|
116
|
-
throw new exception_1.ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers);
|
|
117
|
-
}
|
|
118
|
-
/**
|
|
119
|
-
* Unwraps the actual response sent by the server from the response context and deserializes the response content
|
|
120
|
-
* to the expected objects
|
|
121
|
-
*
|
|
122
|
-
* @params response Response returned by the server for a request to netSuiteSyncInvoices
|
|
123
|
-
* @throws ApiException if the response code was not in [200, 299]
|
|
124
|
-
*/
|
|
125
|
-
async netSuiteSyncInvoicesWithHttpInfo(response) {
|
|
126
|
-
const contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
|
|
127
|
-
if ((0, util_1.isCodeInRange)("200", response.httpStatusCode)) {
|
|
128
|
-
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "NetSuiteSyncInvoicesResponse", "");
|
|
129
|
-
return new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body);
|
|
130
|
-
}
|
|
131
|
-
if ((0, util_1.isCodeInRange)("400", response.httpStatusCode)) {
|
|
132
|
-
throw new exception_1.ApiException(response.httpStatusCode, "Bad Request", undefined, response.headers);
|
|
133
|
-
}
|
|
134
|
-
if ((0, util_1.isCodeInRange)("401", response.httpStatusCode)) {
|
|
135
|
-
throw new exception_1.ApiException(response.httpStatusCode, "Unauthorized", undefined, response.headers);
|
|
136
|
-
}
|
|
137
|
-
if ((0, util_1.isCodeInRange)("429", response.httpStatusCode)) {
|
|
138
|
-
throw new exception_1.ApiException(response.httpStatusCode, "Too Many Requests", undefined, response.headers);
|
|
139
|
-
}
|
|
140
|
-
if ((0, util_1.isCodeInRange)("500", response.httpStatusCode)) {
|
|
141
|
-
throw new exception_1.ApiException(response.httpStatusCode, "Internal Server Error", undefined, response.headers);
|
|
142
|
-
}
|
|
143
|
-
// Work around for missing responses in specification, e.g. for petstore.yaml
|
|
144
|
-
if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
|
|
145
|
-
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "NetSuiteSyncInvoicesResponse", "");
|
|
146
|
-
return new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body);
|
|
147
|
-
}
|
|
148
|
-
throw new exception_1.ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers);
|
|
149
|
-
}
|
|
150
|
-
}
|
|
151
|
-
exports.IntegrationsApiResponseProcessor = IntegrationsApiResponseProcessor;
|
|
@@ -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
|
-
}
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import { BaseAPIRequestFactory } from './baseapi';
|
|
2
|
-
import { Configuration } from '../configuration';
|
|
3
|
-
import { RequestContext, ResponseContext, HttpInfo } from '../http/http';
|
|
4
|
-
import { GetCommitmentReportResponse } from '../models/GetCommitmentReportResponse';
|
|
5
|
-
import { GetProductsUsageReportResponse } from '../models/GetProductsUsageReportResponse';
|
|
6
|
-
/**
|
|
7
|
-
* no description
|
|
8
|
-
*/
|
|
9
|
-
export declare class ReportsApiRequestFactory extends BaseAPIRequestFactory {
|
|
10
|
-
/**
|
|
11
|
-
* Get commitment report
|
|
12
|
-
* @param reportId
|
|
13
|
-
*/
|
|
14
|
-
getCommitmentReportResponse(reportId?: string, _options?: Configuration): Promise<RequestContext>;
|
|
15
|
-
/**
|
|
16
|
-
* Use this endpoint to get the products usage report.
|
|
17
|
-
* Get products usage report
|
|
18
|
-
* @param reportId
|
|
19
|
-
* @param limit
|
|
20
|
-
* @param cursor
|
|
21
|
-
*/
|
|
22
|
-
getProductsUsageReport(reportId?: string, limit?: number, cursor?: string, _options?: Configuration): Promise<RequestContext>;
|
|
23
|
-
}
|
|
24
|
-
export declare class ReportsApiResponseProcessor {
|
|
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 getCommitmentReportResponse
|
|
30
|
-
* @throws ApiException if the response code was not in [200, 299]
|
|
31
|
-
*/
|
|
32
|
-
getCommitmentReportResponseWithHttpInfo(response: ResponseContext): Promise<HttpInfo<GetCommitmentReportResponse>>;
|
|
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 getProductsUsageReport
|
|
38
|
-
* @throws ApiException if the response code was not in [200, 299]
|
|
39
|
-
*/
|
|
40
|
-
getProductsUsageReportWithHttpInfo(response: ResponseContext): Promise<HttpInfo<GetProductsUsageReportResponse>>;
|
|
41
|
-
}
|
|
@@ -1,147 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ReportsApiResponseProcessor = exports.ReportsApiRequestFactory = void 0;
|
|
4
|
-
// TODO: better import syntax?
|
|
5
|
-
const baseapi_1 = require("./baseapi");
|
|
6
|
-
const http_1 = require("../http/http");
|
|
7
|
-
const ObjectSerializer_1 = require("../models/ObjectSerializer");
|
|
8
|
-
const exception_1 = require("./exception");
|
|
9
|
-
const util_1 = require("../util");
|
|
10
|
-
/**
|
|
11
|
-
* no description
|
|
12
|
-
*/
|
|
13
|
-
class ReportsApiRequestFactory extends baseapi_1.BaseAPIRequestFactory {
|
|
14
|
-
/**
|
|
15
|
-
* Get commitment report
|
|
16
|
-
* @param reportId
|
|
17
|
-
*/
|
|
18
|
-
async getCommitmentReportResponse(reportId, _options) {
|
|
19
|
-
let _config = _options || this.configuration;
|
|
20
|
-
// Path Params
|
|
21
|
-
const localVarPath = '/report/commitment';
|
|
22
|
-
// Make Request Context
|
|
23
|
-
const requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.GET);
|
|
24
|
-
requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
|
|
25
|
-
// Query Params
|
|
26
|
-
if (reportId !== undefined) {
|
|
27
|
-
requestContext.setQueryParam("reportId", ObjectSerializer_1.ObjectSerializer.serialize(reportId, "string", ""));
|
|
28
|
-
}
|
|
29
|
-
let authMethod;
|
|
30
|
-
// Apply auth methods
|
|
31
|
-
authMethod = _config.authMethods["BearerAuthorizer"];
|
|
32
|
-
if (authMethod?.applySecurityAuthentication) {
|
|
33
|
-
await authMethod?.applySecurityAuthentication(requestContext);
|
|
34
|
-
}
|
|
35
|
-
const defaultAuth = _options?.authMethods?.default || this.configuration?.authMethods?.default;
|
|
36
|
-
if (defaultAuth?.applySecurityAuthentication) {
|
|
37
|
-
await defaultAuth?.applySecurityAuthentication(requestContext);
|
|
38
|
-
}
|
|
39
|
-
return requestContext;
|
|
40
|
-
}
|
|
41
|
-
/**
|
|
42
|
-
* Use this endpoint to get the products usage report.
|
|
43
|
-
* Get products usage report
|
|
44
|
-
* @param reportId
|
|
45
|
-
* @param limit
|
|
46
|
-
* @param cursor
|
|
47
|
-
*/
|
|
48
|
-
async getProductsUsageReport(reportId, limit, cursor, _options) {
|
|
49
|
-
let _config = _options || this.configuration;
|
|
50
|
-
// Path Params
|
|
51
|
-
const localVarPath = '/report/products-usage';
|
|
52
|
-
// Make Request Context
|
|
53
|
-
const requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.GET);
|
|
54
|
-
requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
|
|
55
|
-
// Query Params
|
|
56
|
-
if (reportId !== undefined) {
|
|
57
|
-
requestContext.setQueryParam("reportId", ObjectSerializer_1.ObjectSerializer.serialize(reportId, "string", ""));
|
|
58
|
-
}
|
|
59
|
-
// Query Params
|
|
60
|
-
if (limit !== undefined) {
|
|
61
|
-
requestContext.setQueryParam("limit", ObjectSerializer_1.ObjectSerializer.serialize(limit, "number", ""));
|
|
62
|
-
}
|
|
63
|
-
// Query Params
|
|
64
|
-
if (cursor !== undefined) {
|
|
65
|
-
requestContext.setQueryParam("cursor", ObjectSerializer_1.ObjectSerializer.serialize(cursor, "string", ""));
|
|
66
|
-
}
|
|
67
|
-
let authMethod;
|
|
68
|
-
// Apply auth methods
|
|
69
|
-
authMethod = _config.authMethods["BearerAuthorizer"];
|
|
70
|
-
if (authMethod?.applySecurityAuthentication) {
|
|
71
|
-
await authMethod?.applySecurityAuthentication(requestContext);
|
|
72
|
-
}
|
|
73
|
-
const defaultAuth = _options?.authMethods?.default || this.configuration?.authMethods?.default;
|
|
74
|
-
if (defaultAuth?.applySecurityAuthentication) {
|
|
75
|
-
await defaultAuth?.applySecurityAuthentication(requestContext);
|
|
76
|
-
}
|
|
77
|
-
return requestContext;
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
exports.ReportsApiRequestFactory = ReportsApiRequestFactory;
|
|
81
|
-
class ReportsApiResponseProcessor {
|
|
82
|
-
/**
|
|
83
|
-
* Unwraps the actual response sent by the server from the response context and deserializes the response content
|
|
84
|
-
* to the expected objects
|
|
85
|
-
*
|
|
86
|
-
* @params response Response returned by the server for a request to getCommitmentReportResponse
|
|
87
|
-
* @throws ApiException if the response code was not in [200, 299]
|
|
88
|
-
*/
|
|
89
|
-
async getCommitmentReportResponseWithHttpInfo(response) {
|
|
90
|
-
const contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
|
|
91
|
-
if ((0, util_1.isCodeInRange)("200", response.httpStatusCode)) {
|
|
92
|
-
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "GetCommitmentReportResponse", "");
|
|
93
|
-
return new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body);
|
|
94
|
-
}
|
|
95
|
-
if ((0, util_1.isCodeInRange)("400", response.httpStatusCode)) {
|
|
96
|
-
throw new exception_1.ApiException(response.httpStatusCode, "Bad Request", undefined, response.headers);
|
|
97
|
-
}
|
|
98
|
-
if ((0, util_1.isCodeInRange)("401", response.httpStatusCode)) {
|
|
99
|
-
throw new exception_1.ApiException(response.httpStatusCode, "Unauthorized", undefined, response.headers);
|
|
100
|
-
}
|
|
101
|
-
if ((0, util_1.isCodeInRange)("429", response.httpStatusCode)) {
|
|
102
|
-
throw new exception_1.ApiException(response.httpStatusCode, "Too Many Requests", undefined, response.headers);
|
|
103
|
-
}
|
|
104
|
-
if ((0, util_1.isCodeInRange)("500", response.httpStatusCode)) {
|
|
105
|
-
throw new exception_1.ApiException(response.httpStatusCode, "Internal Server Error", undefined, response.headers);
|
|
106
|
-
}
|
|
107
|
-
// Work around for missing responses in specification, e.g. for petstore.yaml
|
|
108
|
-
if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
|
|
109
|
-
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "GetCommitmentReportResponse", "");
|
|
110
|
-
return new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body);
|
|
111
|
-
}
|
|
112
|
-
throw new exception_1.ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers);
|
|
113
|
-
}
|
|
114
|
-
/**
|
|
115
|
-
* Unwraps the actual response sent by the server from the response context and deserializes the response content
|
|
116
|
-
* to the expected objects
|
|
117
|
-
*
|
|
118
|
-
* @params response Response returned by the server for a request to getProductsUsageReport
|
|
119
|
-
* @throws ApiException if the response code was not in [200, 299]
|
|
120
|
-
*/
|
|
121
|
-
async getProductsUsageReportWithHttpInfo(response) {
|
|
122
|
-
const contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
|
|
123
|
-
if ((0, util_1.isCodeInRange)("200", response.httpStatusCode)) {
|
|
124
|
-
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "GetProductsUsageReportResponse", "");
|
|
125
|
-
return new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body);
|
|
126
|
-
}
|
|
127
|
-
if ((0, util_1.isCodeInRange)("400", response.httpStatusCode)) {
|
|
128
|
-
throw new exception_1.ApiException(response.httpStatusCode, "Bad Request", undefined, response.headers);
|
|
129
|
-
}
|
|
130
|
-
if ((0, util_1.isCodeInRange)("401", response.httpStatusCode)) {
|
|
131
|
-
throw new exception_1.ApiException(response.httpStatusCode, "Unauthorized", undefined, response.headers);
|
|
132
|
-
}
|
|
133
|
-
if ((0, util_1.isCodeInRange)("429", response.httpStatusCode)) {
|
|
134
|
-
throw new exception_1.ApiException(response.httpStatusCode, "Too Many Requests", undefined, response.headers);
|
|
135
|
-
}
|
|
136
|
-
if ((0, util_1.isCodeInRange)("500", response.httpStatusCode)) {
|
|
137
|
-
throw new exception_1.ApiException(response.httpStatusCode, "Internal Server Error", undefined, response.headers);
|
|
138
|
-
}
|
|
139
|
-
// Work around for missing responses in specification, e.g. for petstore.yaml
|
|
140
|
-
if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
|
|
141
|
-
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "GetProductsUsageReportResponse", "");
|
|
142
|
-
return new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body);
|
|
143
|
-
}
|
|
144
|
-
throw new exception_1.ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers);
|
|
145
|
-
}
|
|
146
|
-
}
|
|
147
|
-
exports.ReportsApiResponseProcessor = ReportsApiResponseProcessor;
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Vayu API
|
|
3
|
-
* The Vayu API is a RESTful API that allows you to submit events for processing and storage & manage billing related entities. The API is secured using the Bearer Authentication scheme with JWT tokens. To obtain a JWT token, please contact Vayu at team@withvayu.com
|
|
4
|
-
*
|
|
5
|
-
* OpenAPI spec version: 1.0.0
|
|
6
|
-
* Contact: dev@withvayu.com
|
|
7
|
-
*
|
|
8
|
-
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
-
* https://openapi-generator.tech
|
|
10
|
-
* Do not edit the class manually.
|
|
11
|
-
*/
|
|
12
|
-
export declare enum BillingInterval {
|
|
13
|
-
Monthly = "Monthly",
|
|
14
|
-
BiMonthly = "BiMonthly",
|
|
15
|
-
Quarterly = "Quarterly",
|
|
16
|
-
SixMonths = "SixMonths",
|
|
17
|
-
Yearly = "Yearly"
|
|
18
|
-
}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* Vayu API
|
|
4
|
-
* The Vayu API is a RESTful API that allows you to submit events for processing and storage & manage billing related entities. The API is secured using the Bearer Authentication scheme with JWT tokens. To obtain a JWT token, please contact Vayu at team@withvayu.com
|
|
5
|
-
*
|
|
6
|
-
* OpenAPI spec version: 1.0.0
|
|
7
|
-
* Contact: dev@withvayu.com
|
|
8
|
-
*
|
|
9
|
-
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
10
|
-
* https://openapi-generator.tech
|
|
11
|
-
* Do not edit the class manually.
|
|
12
|
-
*/
|
|
13
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
|
-
exports.BillingInterval = void 0;
|
|
15
|
-
var BillingInterval;
|
|
16
|
-
(function (BillingInterval) {
|
|
17
|
-
BillingInterval["Monthly"] = "Monthly";
|
|
18
|
-
BillingInterval["BiMonthly"] = "BiMonthly";
|
|
19
|
-
BillingInterval["Quarterly"] = "Quarterly";
|
|
20
|
-
BillingInterval["SixMonths"] = "SixMonths";
|
|
21
|
-
BillingInterval["Yearly"] = "Yearly";
|
|
22
|
-
})(BillingInterval = exports.BillingInterval || (exports.BillingInterval = {}));
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Vayu API
|
|
3
|
-
* The Vayu API is a RESTful API that allows you to submit events for processing and storage & manage billing related entities. The API is secured using the Bearer Authentication scheme with JWT tokens. To obtain a JWT token, please contact Vayu at team@withvayu.com
|
|
4
|
-
*
|
|
5
|
-
* OpenAPI spec version: 1.0.0
|
|
6
|
-
* Contact: dev@withvayu.com
|
|
7
|
-
*
|
|
8
|
-
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
-
* https://openapi-generator.tech
|
|
10
|
-
* Do not edit the class manually.
|
|
11
|
-
*/
|
|
12
|
-
export declare enum ContractStatus {
|
|
13
|
-
Active = "Active",
|
|
14
|
-
Inactive = "Inactive",
|
|
15
|
-
Expired = "Expired",
|
|
16
|
-
Terminated = "Terminated",
|
|
17
|
-
PendingTermination = "PendingTermination",
|
|
18
|
-
Error = "Error"
|
|
19
|
-
}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* Vayu API
|
|
4
|
-
* The Vayu API is a RESTful API that allows you to submit events for processing and storage & manage billing related entities. The API is secured using the Bearer Authentication scheme with JWT tokens. To obtain a JWT token, please contact Vayu at team@withvayu.com
|
|
5
|
-
*
|
|
6
|
-
* OpenAPI spec version: 1.0.0
|
|
7
|
-
* Contact: dev@withvayu.com
|
|
8
|
-
*
|
|
9
|
-
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
10
|
-
* https://openapi-generator.tech
|
|
11
|
-
* Do not edit the class manually.
|
|
12
|
-
*/
|
|
13
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
|
-
exports.ContractStatus = void 0;
|
|
15
|
-
var ContractStatus;
|
|
16
|
-
(function (ContractStatus) {
|
|
17
|
-
ContractStatus["Active"] = "Active";
|
|
18
|
-
ContractStatus["Inactive"] = "Inactive";
|
|
19
|
-
ContractStatus["Expired"] = "Expired";
|
|
20
|
-
ContractStatus["Terminated"] = "Terminated";
|
|
21
|
-
ContractStatus["PendingTermination"] = "PendingTermination";
|
|
22
|
-
ContractStatus["Error"] = "Error";
|
|
23
|
-
})(ContractStatus = exports.ContractStatus || (exports.ContractStatus = {}));
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Vayu API
|
|
3
|
-
* The Vayu API is a RESTful API that allows you to submit events for processing and storage & manage billing related entities. The API is secured using the Bearer Authentication scheme with JWT tokens. To obtain a JWT token, please contact Vayu at team@withvayu.com
|
|
4
|
-
*
|
|
5
|
-
* OpenAPI spec version: 1.0.0
|
|
6
|
-
* Contact: dev@withvayu.com
|
|
7
|
-
*
|
|
8
|
-
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
-
* https://openapi-generator.tech
|
|
10
|
-
* Do not edit the class manually.
|
|
11
|
-
*/
|
|
12
|
-
export declare enum Currency {
|
|
13
|
-
Usd = "USD",
|
|
14
|
-
Eur = "EUR",
|
|
15
|
-
Gbp = "GBP",
|
|
16
|
-
Ils = "ILS"
|
|
17
|
-
}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* Vayu API
|
|
4
|
-
* The Vayu API is a RESTful API that allows you to submit events for processing and storage & manage billing related entities. The API is secured using the Bearer Authentication scheme with JWT tokens. To obtain a JWT token, please contact Vayu at team@withvayu.com
|
|
5
|
-
*
|
|
6
|
-
* OpenAPI spec version: 1.0.0
|
|
7
|
-
* Contact: dev@withvayu.com
|
|
8
|
-
*
|
|
9
|
-
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
10
|
-
* https://openapi-generator.tech
|
|
11
|
-
* Do not edit the class manually.
|
|
12
|
-
*/
|
|
13
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
|
-
exports.Currency = void 0;
|
|
15
|
-
var Currency;
|
|
16
|
-
(function (Currency) {
|
|
17
|
-
Currency["Usd"] = "USD";
|
|
18
|
-
Currency["Eur"] = "EUR";
|
|
19
|
-
Currency["Gbp"] = "GBP";
|
|
20
|
-
Currency["Ils"] = "ILS";
|
|
21
|
-
})(Currency = exports.Currency || (exports.Currency = {}));
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Vayu API
|
|
3
|
-
* The Vayu API is a RESTful API that allows you to submit events for processing and storage & manage billing related entities. The API is secured using the Bearer Authentication scheme with JWT tokens. To obtain a JWT token, please contact Vayu at team@withvayu.com
|
|
4
|
-
*
|
|
5
|
-
* OpenAPI spec version: 1.0.0
|
|
6
|
-
* Contact: dev@withvayu.com
|
|
7
|
-
*
|
|
8
|
-
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
-
* https://openapi-generator.tech
|
|
10
|
-
* Do not edit the class manually.
|
|
11
|
-
*/
|
|
12
|
-
import { ContractStatus } from '../models/ContractStatus';
|
|
13
|
-
import { Currency } from '../models/Currency';
|
|
14
|
-
export declare class GetCommitmentReportResponse {
|
|
15
|
-
'contractStatus': ContractStatus;
|
|
16
|
-
'customerName': string;
|
|
17
|
-
'startDate': Date;
|
|
18
|
-
'endDate': Date;
|
|
19
|
-
'contractName'?: string;
|
|
20
|
-
'contractStartDate': Date;
|
|
21
|
-
'contractEndDate'?: Date;
|
|
22
|
-
'daysToContractEnd'?: number;
|
|
23
|
-
'productVariantName': string;
|
|
24
|
-
'commitmentConsumptionCurrencyAmount': number;
|
|
25
|
-
'commitmentConsumptionUnitsAmount': number;
|
|
26
|
-
'commitmentConsumptionPercentage': number;
|
|
27
|
-
'totalCommitmentCurrencyAmount': number;
|
|
28
|
-
'totalCommitmentUnitsAmount': number;
|
|
29
|
-
'commercialTermsAmount'?: number;
|
|
30
|
-
'erpId'?: string;
|
|
31
|
-
'currency': Currency;
|
|
32
|
-
static readonly discriminator: string | undefined;
|
|
33
|
-
static readonly mapping: {
|
|
34
|
-
[index: string]: string;
|
|
35
|
-
} | undefined;
|
|
36
|
-
static readonly attributeTypeMap: Array<{
|
|
37
|
-
name: string;
|
|
38
|
-
baseName: string;
|
|
39
|
-
type: string;
|
|
40
|
-
format: string;
|
|
41
|
-
}>;
|
|
42
|
-
static getAttributeTypeMap(): {
|
|
43
|
-
name: string;
|
|
44
|
-
baseName: string;
|
|
45
|
-
type: string;
|
|
46
|
-
format: string;
|
|
47
|
-
}[];
|
|
48
|
-
constructor();
|
|
49
|
-
}
|