vayu-ts 0.3.4 → 0.3.7
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/AuthApi.js +8 -4
- package/dist/openapi/apis/CatalogProductsApi.js +46 -23
- package/dist/openapi/apis/CloudUsageSubmissionApi.js +8 -4
- package/dist/openapi/apis/ContractsApi.js +48 -22
- package/dist/openapi/apis/CreditsApi.js +24 -12
- package/dist/openapi/apis/CustomFieldsApi.d.ts +89 -0
- package/dist/openapi/apis/CustomFieldsApi.js +377 -0
- package/dist/openapi/apis/CustomersApi.js +124 -52
- package/dist/openapi/apis/EventsApi.d.ts +116 -1
- package/dist/openapi/apis/EventsApi.js +605 -25
- package/dist/openapi/apis/InvoicesApi.js +26 -13
- package/dist/openapi/apis/MeasurementsApi.js +36 -18
- package/dist/openapi/apis/MetersApi.js +38 -19
- package/dist/openapi/apis/PlansApi.d.ts +56 -0
- package/dist/openapi/apis/PlansApi.js +225 -0
- package/dist/openapi/apis/ProductConsumptionsApi.js +12 -4
- package/dist/openapi/apis/WebhooksApi.js +12 -4
- package/dist/openapi/index.d.ts +1 -1
- package/dist/openapi/index.js +3 -1
- package/dist/openapi/models/BillingInterval.d.ts +18 -0
- package/dist/openapi/models/BillingInterval.js +22 -0
- package/dist/openapi/models/ConflictErrorResponse.d.ts +42 -0
- package/dist/openapi/models/ConflictErrorResponse.js +52 -0
- package/dist/openapi/models/Contact.js +1 -1
- package/dist/openapi/models/CreateContractRequest.d.ts +6 -0
- package/dist/openapi/models/CreateContractRequest.js +12 -0
- package/dist/openapi/models/CreateCustomFieldRequest.d.ts +71 -0
- package/dist/openapi/models/CreateCustomFieldRequest.js +90 -0
- package/dist/openapi/models/CreateCustomFieldResponse.d.ts +32 -0
- package/dist/openapi/models/CreateCustomFieldResponse.js +32 -0
- package/dist/openapi/models/CreateCustomFieldResponseCustomField.d.ts +74 -0
- package/dist/openapi/models/CreateCustomFieldResponseCustomField.js +108 -0
- package/dist/openapi/models/CreateCustomerRequest.d.ts +20 -0
- package/dist/openapi/models/CreateCustomerRequest.js +30 -0
- package/dist/openapi/models/CreateCustomerResponseCustomer.d.ts +20 -0
- package/dist/openapi/models/CreateCustomerResponseCustomer.js +30 -0
- package/dist/openapi/models/CustomFieldEntities.d.ts +20 -0
- package/dist/openapi/models/CustomFieldEntities.js +24 -0
- package/dist/openapi/models/CustomFieldValueTypes.d.ts +2 -1
- package/dist/openapi/models/CustomFieldValueTypes.js +1 -0
- package/dist/openapi/models/DeleteContractResponseContract.d.ts +6 -0
- package/dist/openapi/models/DeleteContractResponseContract.js +12 -0
- package/dist/openapi/models/DeleteCustomFieldResponse.d.ts +32 -0
- package/dist/openapi/models/DeleteCustomFieldResponse.js +32 -0
- package/dist/openapi/models/DeleteCustomFieldResponseCustomField.d.ts +75 -0
- package/dist/openapi/models/DeleteCustomFieldResponseCustomField.js +114 -0
- package/dist/openapi/models/DeleteCustomerResponseCustomer.d.ts +20 -0
- package/dist/openapi/models/DeleteCustomerResponseCustomer.js +30 -0
- package/dist/openapi/models/DeletePlanResponse.d.ts +32 -0
- package/dist/openapi/models/DeletePlanResponse.js +32 -0
- package/dist/openapi/models/DeletePlanResponsePlan.d.ts +42 -0
- package/dist/openapi/models/DeletePlanResponsePlan.js +68 -0
- package/dist/openapi/models/EventsDryRunResponseObjectMeterWithValuesInner.d.ts +1 -1
- package/dist/openapi/models/GetContractResponseContract.d.ts +6 -0
- package/dist/openapi/models/GetContractResponseContract.js +12 -0
- package/dist/openapi/models/GetCustomFieldResponse.d.ts +32 -0
- package/dist/openapi/models/GetCustomFieldResponse.js +32 -0
- package/dist/openapi/models/GetCustomerByNameResponseCustomer.d.ts +20 -0
- package/dist/openapi/models/GetCustomerByNameResponseCustomer.js +30 -0
- package/dist/openapi/models/GetPlanResponse.d.ts +32 -0
- package/dist/openapi/models/GetPlanResponse.js +32 -0
- package/dist/openapi/models/GetPlanResponsePlan.d.ts +41 -0
- package/dist/openapi/models/GetPlanResponsePlan.js +62 -0
- package/dist/openapi/models/InternalServerErrorResponse.d.ts +42 -0
- package/dist/openapi/models/InternalServerErrorResponse.js +52 -0
- package/dist/openapi/models/ListCustomFieldsResponse.d.ts +35 -0
- package/dist/openapi/models/ListCustomFieldsResponse.js +50 -0
- package/dist/openapi/models/ListPlansResponse.d.ts +35 -0
- package/dist/openapi/models/ListPlansResponse.js +50 -0
- package/dist/openapi/models/NotFoundErrorResponse.d.ts +42 -0
- package/dist/openapi/models/NotFoundErrorResponse.js +52 -0
- package/dist/openapi/models/NotificationEventType.d.ts +5 -1
- package/dist/openapi/models/NotificationEventType.js +4 -0
- package/dist/openapi/models/ObjectSerializer.d.ts +51 -0
- package/dist/openapi/models/ObjectSerializer.js +176 -0
- package/dist/openapi/models/PlanBillingData.d.ts +41 -0
- package/dist/openapi/models/PlanBillingData.js +59 -0
- package/dist/openapi/models/PlanDuration.d.ts +30 -0
- package/dist/openapi/models/PlanDuration.js +25 -0
- package/dist/openapi/models/PlanStatus.d.ts +19 -0
- package/dist/openapi/models/PlanStatus.js +23 -0
- package/dist/openapi/models/ProductGroupCommitment.d.ts +8 -0
- package/dist/openapi/models/ProductGroupCommitment.js +12 -1
- package/dist/openapi/models/ProductGroupProductsInnerCommitment.d.ts +8 -0
- package/dist/openapi/models/ProductGroupProductsInnerCommitment.js +12 -1
- package/dist/openapi/models/ProductGroupProductsInnerCommitmentScheduling.d.ts +4 -4
- package/dist/openapi/models/ProductGroupProductsInnerCommitmentScheduling.js +2 -2
- package/dist/openapi/models/ProductGroupProductsInnerCommitmentSchedulingDuration.d.ts +41 -0
- package/dist/openapi/models/ProductGroupProductsInnerCommitmentSchedulingDuration.js +48 -0
- package/dist/openapi/models/ProductGroupProductsInnerPricing.d.ts +3 -1
- package/dist/openapi/models/ProductGroupProductsInnerPricingOneOf.d.ts +6 -0
- package/dist/openapi/models/ProductGroupProductsInnerPricingOneOf.js +12 -0
- package/dist/openapi/models/ProductGroupProductsInnerPricingOneOf1.d.ts +2 -0
- package/dist/openapi/models/ProductGroupProductsInnerPricingOneOf1.js +6 -0
- package/dist/openapi/models/ProductGroupProductsInnerPricingOneOf2.d.ts +2 -0
- package/dist/openapi/models/ProductGroupProductsInnerPricingOneOf2.js +6 -0
- package/dist/openapi/models/ProductGroupProductsInnerPricingOneOf5.d.ts +42 -0
- package/dist/openapi/models/ProductGroupProductsInnerPricingOneOf5.js +48 -0
- package/dist/openapi/models/ProductGroupProductsInnerPricingOneOf6.d.ts +42 -0
- package/dist/openapi/models/ProductGroupProductsInnerPricingOneOf6.js +48 -0
- package/dist/openapi/models/ProductGroupProductsInnerPricingOneOfDiscount.d.ts +53 -0
- package/dist/openapi/models/ProductGroupProductsInnerPricingOneOfDiscount.js +58 -0
- package/dist/openapi/models/QueryEventsResponse.d.ts +3 -3
- package/dist/openapi/models/QueryEventsResponse.js +18 -0
- package/dist/openapi/models/RateLimitErrorResponse.d.ts +42 -0
- package/dist/openapi/models/RateLimitErrorResponse.js +52 -0
- package/dist/openapi/models/RequestTooLongErrorResponse.d.ts +42 -0
- package/dist/openapi/models/RequestTooLongErrorResponse.js +52 -0
- package/dist/openapi/models/UnauthorizedErrorResponse.d.ts +42 -0
- package/dist/openapi/models/UnauthorizedErrorResponse.js +52 -0
- package/dist/openapi/models/UnlimitedDuration.d.ts +14 -0
- package/dist/openapi/models/UnlimitedDuration.js +18 -0
- package/dist/openapi/models/UpdateCustomFieldRequest.d.ts +71 -0
- package/dist/openapi/models/UpdateCustomFieldRequest.js +90 -0
- package/dist/openapi/models/UpdateCustomFieldResponse.d.ts +32 -0
- package/dist/openapi/models/UpdateCustomFieldResponse.js +32 -0
- package/dist/openapi/models/UpdateCustomerRequest.d.ts +20 -0
- package/dist/openapi/models/UpdateCustomerRequest.js +30 -0
- package/dist/openapi/models/V2DeleteEventResponse.d.ts +32 -0
- package/dist/openapi/models/V2DeleteEventResponse.js +32 -0
- package/dist/openapi/models/V2DeleteEventsByRefsRequest.d.ts +31 -0
- package/dist/openapi/models/V2DeleteEventsByRefsRequest.js +32 -0
- package/dist/openapi/models/V2DeleteEventsByRefsResponse.d.ts +35 -0
- package/dist/openapi/models/V2DeleteEventsByRefsResponse.js +32 -0
- package/dist/openapi/models/V2EventsDryRunRequest.d.ts +32 -0
- package/dist/openapi/models/V2EventsDryRunRequest.js +32 -0
- package/dist/openapi/models/V2EventsDryRunResponse.d.ts +32 -0
- package/dist/openapi/models/V2EventsDryRunResponse.js +32 -0
- package/dist/openapi/models/V2GetEventResponse.d.ts +32 -0
- package/dist/openapi/models/V2GetEventResponse.js +32 -0
- package/dist/openapi/models/V2QueryEventsAggregationRequest.d.ts +45 -0
- package/dist/openapi/models/V2QueryEventsAggregationRequest.js +70 -0
- package/dist/openapi/models/V2QueryEventsAggregationRequestMetersInner.d.ts +39 -0
- package/dist/openapi/models/V2QueryEventsAggregationRequestMetersInner.js +62 -0
- package/dist/openapi/models/V2QueryEventsAggregationRequestMetersInnerAggregation.d.ts +35 -0
- package/dist/openapi/models/V2QueryEventsAggregationRequestMetersInnerAggregation.js +44 -0
- package/dist/openapi/models/V2QueryEventsAggregationRequestMetersInnerAggregationFieldArithmetic.d.ts +38 -0
- package/dist/openapi/models/V2QueryEventsAggregationRequestMetersInnerAggregationFieldArithmetic.js +45 -0
- package/dist/openapi/models/V2QueryEventsAggregationRequestMetersInnerFiltersInner.d.ts +43 -0
- package/dist/openapi/models/V2QueryEventsAggregationRequestMetersInnerFiltersInner.js +54 -0
- package/dist/openapi/models/V2QueryEventsAggregationRequestMetersInnerFiltersInnerValue.d.ts +30 -0
- package/dist/openapi/models/V2QueryEventsAggregationRequestMetersInnerFiltersInnerValue.js +25 -0
- package/dist/openapi/models/V2QueryEventsAggregationRequestMetersInnerSqlFullQuery.d.ts +34 -0
- package/dist/openapi/models/V2QueryEventsAggregationRequestMetersInnerSqlFullQuery.js +38 -0
- package/dist/openapi/models/V2QueryEventsAggregationRequestPeriod.d.ts +32 -0
- package/dist/openapi/models/V2QueryEventsAggregationRequestPeriod.js +38 -0
- package/dist/openapi/models/V2QueryEventsAggregationResponse.d.ts +42 -0
- package/dist/openapi/models/V2QueryEventsAggregationResponse.js +52 -0
- package/dist/openapi/models/V2QueryEventsAggregationResponseDataPointsInner.d.ts +34 -0
- package/dist/openapi/models/V2QueryEventsAggregationResponseDataPointsInner.js +38 -0
- package/dist/openapi/models/V2QueryEventsResponse.d.ts +35 -0
- package/dist/openapi/models/V2QueryEventsResponse.js +50 -0
- package/dist/openapi/models/V2SendEventsRequest.d.ts +32 -0
- package/dist/openapi/models/V2SendEventsRequest.js +32 -0
- package/dist/openapi/models/V2SendEventsResponse.d.ts +40 -0
- package/dist/openapi/models/V2SendEventsResponse.js +38 -0
- package/dist/openapi/models/ValidationErrorResponse.d.ts +51 -0
- package/dist/openapi/models/ValidationErrorResponse.js +60 -0
- package/dist/openapi/models/ValidationErrorResponseParamsInner.d.ts +38 -0
- package/dist/openapi/models/ValidationErrorResponseParamsInner.js +38 -0
- package/dist/openapi/models/WebhookSubscribeRequest.d.ts +1 -0
- package/dist/openapi/models/WebhookSubscribeRequest.js +6 -0
- package/dist/openapi/models/all.d.ts +51 -0
- package/dist/openapi/models/all.js +51 -0
- package/dist/openapi/types/ObservableAPI.d.ts +235 -2
- package/dist/openapi/types/ObservableAPI.js +476 -5
- package/dist/openapi/types/PromiseAPI.d.ts +231 -2
- package/dist/openapi/types/PromiseAPI.js +320 -18
- package/dist/sdk/clients/EventsClient.js +1 -1
- package/dist/sdk/clients/WebhooksClient.d.ts +2 -0
- package/dist/sdk/clients/WebhooksClient.js +14 -0
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ObservableWebhooksApi = exports.ObservableProductConsumptionsApi = exports.ObservableMetersApi = exports.ObservableMeasurementsApi = exports.ObservableInvoicesApi = exports.ObservableEventsApi = exports.ObservableCustomersApi = exports.ObservableCreditsApi = exports.ObservableContractsApi = exports.ObservableCloudUsageSubmissionApi = exports.ObservableCatalogProductsApi = exports.ObservableAuthApi = void 0;
|
|
3
|
+
exports.ObservableWebhooksApi = exports.ObservableProductConsumptionsApi = exports.ObservablePlansApi = exports.ObservableMetersApi = exports.ObservableMeasurementsApi = exports.ObservableInvoicesApi = exports.ObservableEventsApi = exports.ObservableCustomersApi = exports.ObservableCustomFieldsApi = exports.ObservableCreditsApi = exports.ObservableContractsApi = exports.ObservableCloudUsageSubmissionApi = exports.ObservableCatalogProductsApi = exports.ObservableAuthApi = void 0;
|
|
4
4
|
const rxjsStub_1 = require("../rxjsStub");
|
|
5
5
|
const rxjsStub_2 = require("../rxjsStub");
|
|
6
6
|
const AuthApi_1 = require("../apis/AuthApi");
|
|
@@ -497,6 +497,164 @@ class ObservableCreditsApi {
|
|
|
497
497
|
}
|
|
498
498
|
}
|
|
499
499
|
exports.ObservableCreditsApi = ObservableCreditsApi;
|
|
500
|
+
const CustomFieldsApi_1 = require("../apis/CustomFieldsApi");
|
|
501
|
+
class ObservableCustomFieldsApi {
|
|
502
|
+
constructor(configuration, requestFactory, responseProcessor) {
|
|
503
|
+
this.configuration = configuration;
|
|
504
|
+
this.requestFactory = requestFactory || new CustomFieldsApi_1.CustomFieldsApiRequestFactory(configuration);
|
|
505
|
+
this.responseProcessor = responseProcessor || new CustomFieldsApi_1.CustomFieldsApiResponseProcessor();
|
|
506
|
+
}
|
|
507
|
+
/**
|
|
508
|
+
* Create a new Custom field.
|
|
509
|
+
* Create Custom field
|
|
510
|
+
* @param createCustomFieldRequest
|
|
511
|
+
*/
|
|
512
|
+
createCustomFieldWithHttpInfo(createCustomFieldRequest, _options) {
|
|
513
|
+
const requestContextPromise = this.requestFactory.createCustomField(createCustomFieldRequest, _options);
|
|
514
|
+
// build promise chain
|
|
515
|
+
let middlewarePreObservable = (0, rxjsStub_1.from)(requestContextPromise);
|
|
516
|
+
for (const middleware of this.configuration.middleware) {
|
|
517
|
+
middlewarePreObservable = middlewarePreObservable.pipe((0, rxjsStub_2.mergeMap)((ctx) => middleware.pre(ctx)));
|
|
518
|
+
}
|
|
519
|
+
return middlewarePreObservable.pipe((0, rxjsStub_2.mergeMap)((ctx) => this.configuration.httpApi.send(ctx))).
|
|
520
|
+
pipe((0, rxjsStub_2.mergeMap)((response) => {
|
|
521
|
+
let middlewarePostObservable = (0, rxjsStub_1.of)(response);
|
|
522
|
+
for (const middleware of this.configuration.middleware) {
|
|
523
|
+
middlewarePostObservable = middlewarePostObservable.pipe((0, rxjsStub_2.mergeMap)((rsp) => middleware.post(rsp)));
|
|
524
|
+
}
|
|
525
|
+
return middlewarePostObservable.pipe((0, rxjsStub_2.map)((rsp) => this.responseProcessor.createCustomFieldWithHttpInfo(rsp)));
|
|
526
|
+
}));
|
|
527
|
+
}
|
|
528
|
+
/**
|
|
529
|
+
* Create a new Custom field.
|
|
530
|
+
* Create Custom field
|
|
531
|
+
* @param createCustomFieldRequest
|
|
532
|
+
*/
|
|
533
|
+
createCustomField(createCustomFieldRequest, _options) {
|
|
534
|
+
return this.createCustomFieldWithHttpInfo(createCustomFieldRequest, _options).pipe((0, rxjsStub_2.map)((apiResponse) => apiResponse.data));
|
|
535
|
+
}
|
|
536
|
+
/**
|
|
537
|
+
* Delete a Custom field by id.
|
|
538
|
+
* Delete Custom field
|
|
539
|
+
* @param customFieldId
|
|
540
|
+
*/
|
|
541
|
+
deleteCustomFieldWithHttpInfo(customFieldId, _options) {
|
|
542
|
+
const requestContextPromise = this.requestFactory.deleteCustomField(customFieldId, _options);
|
|
543
|
+
// build promise chain
|
|
544
|
+
let middlewarePreObservable = (0, rxjsStub_1.from)(requestContextPromise);
|
|
545
|
+
for (const middleware of this.configuration.middleware) {
|
|
546
|
+
middlewarePreObservable = middlewarePreObservable.pipe((0, rxjsStub_2.mergeMap)((ctx) => middleware.pre(ctx)));
|
|
547
|
+
}
|
|
548
|
+
return middlewarePreObservable.pipe((0, rxjsStub_2.mergeMap)((ctx) => this.configuration.httpApi.send(ctx))).
|
|
549
|
+
pipe((0, rxjsStub_2.mergeMap)((response) => {
|
|
550
|
+
let middlewarePostObservable = (0, rxjsStub_1.of)(response);
|
|
551
|
+
for (const middleware of this.configuration.middleware) {
|
|
552
|
+
middlewarePostObservable = middlewarePostObservable.pipe((0, rxjsStub_2.mergeMap)((rsp) => middleware.post(rsp)));
|
|
553
|
+
}
|
|
554
|
+
return middlewarePostObservable.pipe((0, rxjsStub_2.map)((rsp) => this.responseProcessor.deleteCustomFieldWithHttpInfo(rsp)));
|
|
555
|
+
}));
|
|
556
|
+
}
|
|
557
|
+
/**
|
|
558
|
+
* Delete a Custom field by id.
|
|
559
|
+
* Delete Custom field
|
|
560
|
+
* @param customFieldId
|
|
561
|
+
*/
|
|
562
|
+
deleteCustomField(customFieldId, _options) {
|
|
563
|
+
return this.deleteCustomFieldWithHttpInfo(customFieldId, _options).pipe((0, rxjsStub_2.map)((apiResponse) => apiResponse.data));
|
|
564
|
+
}
|
|
565
|
+
/**
|
|
566
|
+
* Get a Custom field by id.
|
|
567
|
+
* Get Custom field
|
|
568
|
+
* @param customFieldId
|
|
569
|
+
*/
|
|
570
|
+
getCustomFieldWithHttpInfo(customFieldId, _options) {
|
|
571
|
+
const requestContextPromise = this.requestFactory.getCustomField(customFieldId, _options);
|
|
572
|
+
// build promise chain
|
|
573
|
+
let middlewarePreObservable = (0, rxjsStub_1.from)(requestContextPromise);
|
|
574
|
+
for (const middleware of this.configuration.middleware) {
|
|
575
|
+
middlewarePreObservable = middlewarePreObservable.pipe((0, rxjsStub_2.mergeMap)((ctx) => middleware.pre(ctx)));
|
|
576
|
+
}
|
|
577
|
+
return middlewarePreObservable.pipe((0, rxjsStub_2.mergeMap)((ctx) => this.configuration.httpApi.send(ctx))).
|
|
578
|
+
pipe((0, rxjsStub_2.mergeMap)((response) => {
|
|
579
|
+
let middlewarePostObservable = (0, rxjsStub_1.of)(response);
|
|
580
|
+
for (const middleware of this.configuration.middleware) {
|
|
581
|
+
middlewarePostObservable = middlewarePostObservable.pipe((0, rxjsStub_2.mergeMap)((rsp) => middleware.post(rsp)));
|
|
582
|
+
}
|
|
583
|
+
return middlewarePostObservable.pipe((0, rxjsStub_2.map)((rsp) => this.responseProcessor.getCustomFieldWithHttpInfo(rsp)));
|
|
584
|
+
}));
|
|
585
|
+
}
|
|
586
|
+
/**
|
|
587
|
+
* Get a Custom field by id.
|
|
588
|
+
* Get Custom field
|
|
589
|
+
* @param customFieldId
|
|
590
|
+
*/
|
|
591
|
+
getCustomField(customFieldId, _options) {
|
|
592
|
+
return this.getCustomFieldWithHttpInfo(customFieldId, _options).pipe((0, rxjsStub_2.map)((apiResponse) => apiResponse.data));
|
|
593
|
+
}
|
|
594
|
+
/**
|
|
595
|
+
* Get a list of Custom fields.
|
|
596
|
+
* List Custom fields
|
|
597
|
+
* @param [limit]
|
|
598
|
+
* @param [cursor]
|
|
599
|
+
*/
|
|
600
|
+
listCustomFieldsWithHttpInfo(limit, cursor, _options) {
|
|
601
|
+
const requestContextPromise = this.requestFactory.listCustomFields(limit, cursor, _options);
|
|
602
|
+
// build promise chain
|
|
603
|
+
let middlewarePreObservable = (0, rxjsStub_1.from)(requestContextPromise);
|
|
604
|
+
for (const middleware of this.configuration.middleware) {
|
|
605
|
+
middlewarePreObservable = middlewarePreObservable.pipe((0, rxjsStub_2.mergeMap)((ctx) => middleware.pre(ctx)));
|
|
606
|
+
}
|
|
607
|
+
return middlewarePreObservable.pipe((0, rxjsStub_2.mergeMap)((ctx) => this.configuration.httpApi.send(ctx))).
|
|
608
|
+
pipe((0, rxjsStub_2.mergeMap)((response) => {
|
|
609
|
+
let middlewarePostObservable = (0, rxjsStub_1.of)(response);
|
|
610
|
+
for (const middleware of this.configuration.middleware) {
|
|
611
|
+
middlewarePostObservable = middlewarePostObservable.pipe((0, rxjsStub_2.mergeMap)((rsp) => middleware.post(rsp)));
|
|
612
|
+
}
|
|
613
|
+
return middlewarePostObservable.pipe((0, rxjsStub_2.map)((rsp) => this.responseProcessor.listCustomFieldsWithHttpInfo(rsp)));
|
|
614
|
+
}));
|
|
615
|
+
}
|
|
616
|
+
/**
|
|
617
|
+
* Get a list of Custom fields.
|
|
618
|
+
* List Custom fields
|
|
619
|
+
* @param [limit]
|
|
620
|
+
* @param [cursor]
|
|
621
|
+
*/
|
|
622
|
+
listCustomFields(limit, cursor, _options) {
|
|
623
|
+
return this.listCustomFieldsWithHttpInfo(limit, cursor, _options).pipe((0, rxjsStub_2.map)((apiResponse) => apiResponse.data));
|
|
624
|
+
}
|
|
625
|
+
/**
|
|
626
|
+
* Update a Custom field by id.
|
|
627
|
+
* Update Custom field
|
|
628
|
+
* @param updateCustomFieldRequest
|
|
629
|
+
* @param customFieldId
|
|
630
|
+
*/
|
|
631
|
+
updateCustomFieldWithHttpInfo(updateCustomFieldRequest, customFieldId, _options) {
|
|
632
|
+
const requestContextPromise = this.requestFactory.updateCustomField(updateCustomFieldRequest, customFieldId, _options);
|
|
633
|
+
// build promise chain
|
|
634
|
+
let middlewarePreObservable = (0, rxjsStub_1.from)(requestContextPromise);
|
|
635
|
+
for (const middleware of this.configuration.middleware) {
|
|
636
|
+
middlewarePreObservable = middlewarePreObservable.pipe((0, rxjsStub_2.mergeMap)((ctx) => middleware.pre(ctx)));
|
|
637
|
+
}
|
|
638
|
+
return middlewarePreObservable.pipe((0, rxjsStub_2.mergeMap)((ctx) => this.configuration.httpApi.send(ctx))).
|
|
639
|
+
pipe((0, rxjsStub_2.mergeMap)((response) => {
|
|
640
|
+
let middlewarePostObservable = (0, rxjsStub_1.of)(response);
|
|
641
|
+
for (const middleware of this.configuration.middleware) {
|
|
642
|
+
middlewarePostObservable = middlewarePostObservable.pipe((0, rxjsStub_2.mergeMap)((rsp) => middleware.post(rsp)));
|
|
643
|
+
}
|
|
644
|
+
return middlewarePostObservable.pipe((0, rxjsStub_2.map)((rsp) => this.responseProcessor.updateCustomFieldWithHttpInfo(rsp)));
|
|
645
|
+
}));
|
|
646
|
+
}
|
|
647
|
+
/**
|
|
648
|
+
* Update a Custom field by id.
|
|
649
|
+
* Update Custom field
|
|
650
|
+
* @param updateCustomFieldRequest
|
|
651
|
+
* @param customFieldId
|
|
652
|
+
*/
|
|
653
|
+
updateCustomField(updateCustomFieldRequest, customFieldId, _options) {
|
|
654
|
+
return this.updateCustomFieldWithHttpInfo(updateCustomFieldRequest, customFieldId, _options).pipe((0, rxjsStub_2.map)((apiResponse) => apiResponse.data));
|
|
655
|
+
}
|
|
656
|
+
}
|
|
657
|
+
exports.ObservableCustomFieldsApi = ObservableCustomFieldsApi;
|
|
500
658
|
const CustomersApi_1 = require("../apis/CustomersApi");
|
|
501
659
|
class ObservableCustomersApi {
|
|
502
660
|
constructor(configuration, requestFactory, responseProcessor) {
|
|
@@ -960,11 +1118,12 @@ class ObservableEventsApi {
|
|
|
960
1118
|
* @param startTime
|
|
961
1119
|
* @param endTime
|
|
962
1120
|
* @param [eventName]
|
|
1121
|
+
* @param [customerAlias]
|
|
963
1122
|
* @param [limit]
|
|
964
1123
|
* @param [cursor]
|
|
965
1124
|
*/
|
|
966
|
-
queryEventsWithHttpInfo(startTime, endTime, eventName, limit, cursor, _options) {
|
|
967
|
-
const requestContextPromise = this.requestFactory.queryEvents(startTime, endTime, eventName, limit, cursor, _options);
|
|
1125
|
+
queryEventsWithHttpInfo(startTime, endTime, eventName, customerAlias, limit, cursor, _options) {
|
|
1126
|
+
const requestContextPromise = this.requestFactory.queryEvents(startTime, endTime, eventName, customerAlias, limit, cursor, _options);
|
|
968
1127
|
// build promise chain
|
|
969
1128
|
let middlewarePreObservable = (0, rxjsStub_1.from)(requestContextPromise);
|
|
970
1129
|
for (const middleware of this.configuration.middleware) {
|
|
@@ -985,11 +1144,12 @@ class ObservableEventsApi {
|
|
|
985
1144
|
* @param startTime
|
|
986
1145
|
* @param endTime
|
|
987
1146
|
* @param [eventName]
|
|
1147
|
+
* @param [customerAlias]
|
|
988
1148
|
* @param [limit]
|
|
989
1149
|
* @param [cursor]
|
|
990
1150
|
*/
|
|
991
|
-
queryEvents(startTime, endTime, eventName, limit, cursor, _options) {
|
|
992
|
-
return this.queryEventsWithHttpInfo(startTime, endTime, eventName, limit, cursor, _options).pipe((0, rxjsStub_2.map)((apiResponse) => apiResponse.data));
|
|
1151
|
+
queryEvents(startTime, endTime, eventName, customerAlias, limit, cursor, _options) {
|
|
1152
|
+
return this.queryEventsWithHttpInfo(startTime, endTime, eventName, customerAlias, limit, cursor, _options).pipe((0, rxjsStub_2.map)((apiResponse) => apiResponse.data));
|
|
993
1153
|
}
|
|
994
1154
|
/**
|
|
995
1155
|
* Use this endpoint to send an array of events for processing and storage. Make sure to comply with the request schema for each event.
|
|
@@ -1049,6 +1209,219 @@ class ObservableEventsApi {
|
|
|
1049
1209
|
sendEventsDryRun(eventsDryRunRequest, _options) {
|
|
1050
1210
|
return this.sendEventsDryRunWithHttpInfo(eventsDryRunRequest, _options).pipe((0, rxjsStub_2.map)((apiResponse) => apiResponse.data));
|
|
1051
1211
|
}
|
|
1212
|
+
/**
|
|
1213
|
+
* Use this endpoint to remove a specific event using its reference ID (v2).
|
|
1214
|
+
* Delete an event by refId (v2)
|
|
1215
|
+
* @param refId
|
|
1216
|
+
*/
|
|
1217
|
+
v2DeleteEventByRefIdWithHttpInfo(refId, _options) {
|
|
1218
|
+
const requestContextPromise = this.requestFactory.v2DeleteEventByRefId(refId, _options);
|
|
1219
|
+
// build promise chain
|
|
1220
|
+
let middlewarePreObservable = (0, rxjsStub_1.from)(requestContextPromise);
|
|
1221
|
+
for (const middleware of this.configuration.middleware) {
|
|
1222
|
+
middlewarePreObservable = middlewarePreObservable.pipe((0, rxjsStub_2.mergeMap)((ctx) => middleware.pre(ctx)));
|
|
1223
|
+
}
|
|
1224
|
+
return middlewarePreObservable.pipe((0, rxjsStub_2.mergeMap)((ctx) => this.configuration.httpApi.send(ctx))).
|
|
1225
|
+
pipe((0, rxjsStub_2.mergeMap)((response) => {
|
|
1226
|
+
let middlewarePostObservable = (0, rxjsStub_1.of)(response);
|
|
1227
|
+
for (const middleware of this.configuration.middleware) {
|
|
1228
|
+
middlewarePostObservable = middlewarePostObservable.pipe((0, rxjsStub_2.mergeMap)((rsp) => middleware.post(rsp)));
|
|
1229
|
+
}
|
|
1230
|
+
return middlewarePostObservable.pipe((0, rxjsStub_2.map)((rsp) => this.responseProcessor.v2DeleteEventByRefIdWithHttpInfo(rsp)));
|
|
1231
|
+
}));
|
|
1232
|
+
}
|
|
1233
|
+
/**
|
|
1234
|
+
* Use this endpoint to remove a specific event using its reference ID (v2).
|
|
1235
|
+
* Delete an event by refId (v2)
|
|
1236
|
+
* @param refId
|
|
1237
|
+
*/
|
|
1238
|
+
v2DeleteEventByRefId(refId, _options) {
|
|
1239
|
+
return this.v2DeleteEventByRefIdWithHttpInfo(refId, _options).pipe((0, rxjsStub_2.map)((apiResponse) => apiResponse.data));
|
|
1240
|
+
}
|
|
1241
|
+
/**
|
|
1242
|
+
* Delete multiple events, identified by ref, in a single request (v2).
|
|
1243
|
+
* Delete events by refs (v2)
|
|
1244
|
+
* @param v2DeleteEventsByRefsRequest A list of event refs to delete. The request deletes the matching events for the authenticated account.
|
|
1245
|
+
*/
|
|
1246
|
+
v2DeleteEventsByRefsWithHttpInfo(v2DeleteEventsByRefsRequest, _options) {
|
|
1247
|
+
const requestContextPromise = this.requestFactory.v2DeleteEventsByRefs(v2DeleteEventsByRefsRequest, _options);
|
|
1248
|
+
// build promise chain
|
|
1249
|
+
let middlewarePreObservable = (0, rxjsStub_1.from)(requestContextPromise);
|
|
1250
|
+
for (const middleware of this.configuration.middleware) {
|
|
1251
|
+
middlewarePreObservable = middlewarePreObservable.pipe((0, rxjsStub_2.mergeMap)((ctx) => middleware.pre(ctx)));
|
|
1252
|
+
}
|
|
1253
|
+
return middlewarePreObservable.pipe((0, rxjsStub_2.mergeMap)((ctx) => this.configuration.httpApi.send(ctx))).
|
|
1254
|
+
pipe((0, rxjsStub_2.mergeMap)((response) => {
|
|
1255
|
+
let middlewarePostObservable = (0, rxjsStub_1.of)(response);
|
|
1256
|
+
for (const middleware of this.configuration.middleware) {
|
|
1257
|
+
middlewarePostObservable = middlewarePostObservable.pipe((0, rxjsStub_2.mergeMap)((rsp) => middleware.post(rsp)));
|
|
1258
|
+
}
|
|
1259
|
+
return middlewarePostObservable.pipe((0, rxjsStub_2.map)((rsp) => this.responseProcessor.v2DeleteEventsByRefsWithHttpInfo(rsp)));
|
|
1260
|
+
}));
|
|
1261
|
+
}
|
|
1262
|
+
/**
|
|
1263
|
+
* Delete multiple events, identified by ref, in a single request (v2).
|
|
1264
|
+
* Delete events by refs (v2)
|
|
1265
|
+
* @param v2DeleteEventsByRefsRequest A list of event refs to delete. The request deletes the matching events for the authenticated account.
|
|
1266
|
+
*/
|
|
1267
|
+
v2DeleteEventsByRefs(v2DeleteEventsByRefsRequest, _options) {
|
|
1268
|
+
return this.v2DeleteEventsByRefsWithHttpInfo(v2DeleteEventsByRefsRequest, _options).pipe((0, rxjsStub_2.map)((apiResponse) => apiResponse.data));
|
|
1269
|
+
}
|
|
1270
|
+
/**
|
|
1271
|
+
* Use this endpoint to get a specific event using its reference ID (v2).
|
|
1272
|
+
* Get event by refId (v2)
|
|
1273
|
+
* @param refId
|
|
1274
|
+
*/
|
|
1275
|
+
v2GetEventByRefIdWithHttpInfo(refId, _options) {
|
|
1276
|
+
const requestContextPromise = this.requestFactory.v2GetEventByRefId(refId, _options);
|
|
1277
|
+
// build promise chain
|
|
1278
|
+
let middlewarePreObservable = (0, rxjsStub_1.from)(requestContextPromise);
|
|
1279
|
+
for (const middleware of this.configuration.middleware) {
|
|
1280
|
+
middlewarePreObservable = middlewarePreObservable.pipe((0, rxjsStub_2.mergeMap)((ctx) => middleware.pre(ctx)));
|
|
1281
|
+
}
|
|
1282
|
+
return middlewarePreObservable.pipe((0, rxjsStub_2.mergeMap)((ctx) => this.configuration.httpApi.send(ctx))).
|
|
1283
|
+
pipe((0, rxjsStub_2.mergeMap)((response) => {
|
|
1284
|
+
let middlewarePostObservable = (0, rxjsStub_1.of)(response);
|
|
1285
|
+
for (const middleware of this.configuration.middleware) {
|
|
1286
|
+
middlewarePostObservable = middlewarePostObservable.pipe((0, rxjsStub_2.mergeMap)((rsp) => middleware.post(rsp)));
|
|
1287
|
+
}
|
|
1288
|
+
return middlewarePostObservable.pipe((0, rxjsStub_2.map)((rsp) => this.responseProcessor.v2GetEventByRefIdWithHttpInfo(rsp)));
|
|
1289
|
+
}));
|
|
1290
|
+
}
|
|
1291
|
+
/**
|
|
1292
|
+
* Use this endpoint to get a specific event using its reference ID (v2).
|
|
1293
|
+
* Get event by refId (v2)
|
|
1294
|
+
* @param refId
|
|
1295
|
+
*/
|
|
1296
|
+
v2GetEventByRefId(refId, _options) {
|
|
1297
|
+
return this.v2GetEventByRefIdWithHttpInfo(refId, _options).pipe((0, rxjsStub_2.map)((apiResponse) => apiResponse.data));
|
|
1298
|
+
}
|
|
1299
|
+
/**
|
|
1300
|
+
* Fetch events occurring within a specified timestamp range via the events-service (ClickHouse-backed).
|
|
1301
|
+
* Query events by timestamp period and optional event name (v2)
|
|
1302
|
+
* @param startTime
|
|
1303
|
+
* @param endTime
|
|
1304
|
+
* @param [eventName]
|
|
1305
|
+
* @param [customerAlias]
|
|
1306
|
+
* @param [limit]
|
|
1307
|
+
* @param [cursor]
|
|
1308
|
+
*/
|
|
1309
|
+
v2QueryEventsWithHttpInfo(startTime, endTime, eventName, customerAlias, limit, cursor, _options) {
|
|
1310
|
+
const requestContextPromise = this.requestFactory.v2QueryEvents(startTime, endTime, eventName, customerAlias, limit, cursor, _options);
|
|
1311
|
+
// build promise chain
|
|
1312
|
+
let middlewarePreObservable = (0, rxjsStub_1.from)(requestContextPromise);
|
|
1313
|
+
for (const middleware of this.configuration.middleware) {
|
|
1314
|
+
middlewarePreObservable = middlewarePreObservable.pipe((0, rxjsStub_2.mergeMap)((ctx) => middleware.pre(ctx)));
|
|
1315
|
+
}
|
|
1316
|
+
return middlewarePreObservable.pipe((0, rxjsStub_2.mergeMap)((ctx) => this.configuration.httpApi.send(ctx))).
|
|
1317
|
+
pipe((0, rxjsStub_2.mergeMap)((response) => {
|
|
1318
|
+
let middlewarePostObservable = (0, rxjsStub_1.of)(response);
|
|
1319
|
+
for (const middleware of this.configuration.middleware) {
|
|
1320
|
+
middlewarePostObservable = middlewarePostObservable.pipe((0, rxjsStub_2.mergeMap)((rsp) => middleware.post(rsp)));
|
|
1321
|
+
}
|
|
1322
|
+
return middlewarePostObservable.pipe((0, rxjsStub_2.map)((rsp) => this.responseProcessor.v2QueryEventsWithHttpInfo(rsp)));
|
|
1323
|
+
}));
|
|
1324
|
+
}
|
|
1325
|
+
/**
|
|
1326
|
+
* Fetch events occurring within a specified timestamp range via the events-service (ClickHouse-backed).
|
|
1327
|
+
* Query events by timestamp period and optional event name (v2)
|
|
1328
|
+
* @param startTime
|
|
1329
|
+
* @param endTime
|
|
1330
|
+
* @param [eventName]
|
|
1331
|
+
* @param [customerAlias]
|
|
1332
|
+
* @param [limit]
|
|
1333
|
+
* @param [cursor]
|
|
1334
|
+
*/
|
|
1335
|
+
v2QueryEvents(startTime, endTime, eventName, customerAlias, limit, cursor, _options) {
|
|
1336
|
+
return this.v2QueryEventsWithHttpInfo(startTime, endTime, eventName, customerAlias, limit, cursor, _options).pipe((0, rxjsStub_2.map)((apiResponse) => apiResponse.data));
|
|
1337
|
+
}
|
|
1338
|
+
/**
|
|
1339
|
+
* Aggregate events by meters and time grouping via the events-service.
|
|
1340
|
+
* Aggregate events (v2)
|
|
1341
|
+
* @param v2QueryEventsAggregationRequest Configuration for aggregating events by meters and time grouping.
|
|
1342
|
+
*/
|
|
1343
|
+
v2QueryEventsAggregationWithHttpInfo(v2QueryEventsAggregationRequest, _options) {
|
|
1344
|
+
const requestContextPromise = this.requestFactory.v2QueryEventsAggregation(v2QueryEventsAggregationRequest, _options);
|
|
1345
|
+
// build promise chain
|
|
1346
|
+
let middlewarePreObservable = (0, rxjsStub_1.from)(requestContextPromise);
|
|
1347
|
+
for (const middleware of this.configuration.middleware) {
|
|
1348
|
+
middlewarePreObservable = middlewarePreObservable.pipe((0, rxjsStub_2.mergeMap)((ctx) => middleware.pre(ctx)));
|
|
1349
|
+
}
|
|
1350
|
+
return middlewarePreObservable.pipe((0, rxjsStub_2.mergeMap)((ctx) => this.configuration.httpApi.send(ctx))).
|
|
1351
|
+
pipe((0, rxjsStub_2.mergeMap)((response) => {
|
|
1352
|
+
let middlewarePostObservable = (0, rxjsStub_1.of)(response);
|
|
1353
|
+
for (const middleware of this.configuration.middleware) {
|
|
1354
|
+
middlewarePostObservable = middlewarePostObservable.pipe((0, rxjsStub_2.mergeMap)((rsp) => middleware.post(rsp)));
|
|
1355
|
+
}
|
|
1356
|
+
return middlewarePostObservable.pipe((0, rxjsStub_2.map)((rsp) => this.responseProcessor.v2QueryEventsAggregationWithHttpInfo(rsp)));
|
|
1357
|
+
}));
|
|
1358
|
+
}
|
|
1359
|
+
/**
|
|
1360
|
+
* Aggregate events by meters and time grouping via the events-service.
|
|
1361
|
+
* Aggregate events (v2)
|
|
1362
|
+
* @param v2QueryEventsAggregationRequest Configuration for aggregating events by meters and time grouping.
|
|
1363
|
+
*/
|
|
1364
|
+
v2QueryEventsAggregation(v2QueryEventsAggregationRequest, _options) {
|
|
1365
|
+
return this.v2QueryEventsAggregationWithHttpInfo(v2QueryEventsAggregationRequest, _options).pipe((0, rxjsStub_2.map)((apiResponse) => apiResponse.data));
|
|
1366
|
+
}
|
|
1367
|
+
/**
|
|
1368
|
+
* Submit a batch of events for ingestion via the events-service.
|
|
1369
|
+
* Submit a batch of events for ingestion (v2)
|
|
1370
|
+
* @param v2SendEventsRequest An array of events following the EventInput schema. Up to 1000 events or a total payload max size of 256KB
|
|
1371
|
+
*/
|
|
1372
|
+
v2SendEventsWithHttpInfo(v2SendEventsRequest, _options) {
|
|
1373
|
+
const requestContextPromise = this.requestFactory.v2SendEvents(v2SendEventsRequest, _options);
|
|
1374
|
+
// build promise chain
|
|
1375
|
+
let middlewarePreObservable = (0, rxjsStub_1.from)(requestContextPromise);
|
|
1376
|
+
for (const middleware of this.configuration.middleware) {
|
|
1377
|
+
middlewarePreObservable = middlewarePreObservable.pipe((0, rxjsStub_2.mergeMap)((ctx) => middleware.pre(ctx)));
|
|
1378
|
+
}
|
|
1379
|
+
return middlewarePreObservable.pipe((0, rxjsStub_2.mergeMap)((ctx) => this.configuration.httpApi.send(ctx))).
|
|
1380
|
+
pipe((0, rxjsStub_2.mergeMap)((response) => {
|
|
1381
|
+
let middlewarePostObservable = (0, rxjsStub_1.of)(response);
|
|
1382
|
+
for (const middleware of this.configuration.middleware) {
|
|
1383
|
+
middlewarePostObservable = middlewarePostObservable.pipe((0, rxjsStub_2.mergeMap)((rsp) => middleware.post(rsp)));
|
|
1384
|
+
}
|
|
1385
|
+
return middlewarePostObservable.pipe((0, rxjsStub_2.map)((rsp) => this.responseProcessor.v2SendEventsWithHttpInfo(rsp)));
|
|
1386
|
+
}));
|
|
1387
|
+
}
|
|
1388
|
+
/**
|
|
1389
|
+
* Submit a batch of events for ingestion via the events-service.
|
|
1390
|
+
* Submit a batch of events for ingestion (v2)
|
|
1391
|
+
* @param v2SendEventsRequest An array of events following the EventInput schema. Up to 1000 events or a total payload max size of 256KB
|
|
1392
|
+
*/
|
|
1393
|
+
v2SendEvents(v2SendEventsRequest, _options) {
|
|
1394
|
+
return this.v2SendEventsWithHttpInfo(v2SendEventsRequest, _options).pipe((0, rxjsStub_2.map)((apiResponse) => apiResponse.data));
|
|
1395
|
+
}
|
|
1396
|
+
/**
|
|
1397
|
+
* Submit a batch of events for testing via the events-service. NOTE: this is a dry run and will not store the events.
|
|
1398
|
+
* Submit a batch of events for testing (v2)
|
|
1399
|
+
* @param v2EventsDryRunRequest An array of events following the EventInput schema. Up to 1000 events or a total payload max size of 256KB
|
|
1400
|
+
*/
|
|
1401
|
+
v2SendEventsDryRunWithHttpInfo(v2EventsDryRunRequest, _options) {
|
|
1402
|
+
const requestContextPromise = this.requestFactory.v2SendEventsDryRun(v2EventsDryRunRequest, _options);
|
|
1403
|
+
// build promise chain
|
|
1404
|
+
let middlewarePreObservable = (0, rxjsStub_1.from)(requestContextPromise);
|
|
1405
|
+
for (const middleware of this.configuration.middleware) {
|
|
1406
|
+
middlewarePreObservable = middlewarePreObservable.pipe((0, rxjsStub_2.mergeMap)((ctx) => middleware.pre(ctx)));
|
|
1407
|
+
}
|
|
1408
|
+
return middlewarePreObservable.pipe((0, rxjsStub_2.mergeMap)((ctx) => this.configuration.httpApi.send(ctx))).
|
|
1409
|
+
pipe((0, rxjsStub_2.mergeMap)((response) => {
|
|
1410
|
+
let middlewarePostObservable = (0, rxjsStub_1.of)(response);
|
|
1411
|
+
for (const middleware of this.configuration.middleware) {
|
|
1412
|
+
middlewarePostObservable = middlewarePostObservable.pipe((0, rxjsStub_2.mergeMap)((rsp) => middleware.post(rsp)));
|
|
1413
|
+
}
|
|
1414
|
+
return middlewarePostObservable.pipe((0, rxjsStub_2.map)((rsp) => this.responseProcessor.v2SendEventsDryRunWithHttpInfo(rsp)));
|
|
1415
|
+
}));
|
|
1416
|
+
}
|
|
1417
|
+
/**
|
|
1418
|
+
* Submit a batch of events for testing via the events-service. NOTE: this is a dry run and will not store the events.
|
|
1419
|
+
* Submit a batch of events for testing (v2)
|
|
1420
|
+
* @param v2EventsDryRunRequest An array of events following the EventInput schema. Up to 1000 events or a total payload max size of 256KB
|
|
1421
|
+
*/
|
|
1422
|
+
v2SendEventsDryRun(v2EventsDryRunRequest, _options) {
|
|
1423
|
+
return this.v2SendEventsDryRunWithHttpInfo(v2EventsDryRunRequest, _options).pipe((0, rxjsStub_2.map)((apiResponse) => apiResponse.data));
|
|
1424
|
+
}
|
|
1052
1425
|
}
|
|
1053
1426
|
exports.ObservableEventsApi = ObservableEventsApi;
|
|
1054
1427
|
const InvoicesApi_1 = require("../apis/InvoicesApi");
|
|
@@ -1407,6 +1780,104 @@ class ObservableMetersApi {
|
|
|
1407
1780
|
}
|
|
1408
1781
|
}
|
|
1409
1782
|
exports.ObservableMetersApi = ObservableMetersApi;
|
|
1783
|
+
const PlansApi_1 = require("../apis/PlansApi");
|
|
1784
|
+
class ObservablePlansApi {
|
|
1785
|
+
constructor(configuration, requestFactory, responseProcessor) {
|
|
1786
|
+
this.configuration = configuration;
|
|
1787
|
+
this.requestFactory = requestFactory || new PlansApi_1.PlansApiRequestFactory(configuration);
|
|
1788
|
+
this.responseProcessor = responseProcessor || new PlansApi_1.PlansApiResponseProcessor();
|
|
1789
|
+
}
|
|
1790
|
+
/**
|
|
1791
|
+
* Delete a Plan by id.
|
|
1792
|
+
* Delete Plan
|
|
1793
|
+
* @param planId
|
|
1794
|
+
*/
|
|
1795
|
+
deletePlanWithHttpInfo(planId, _options) {
|
|
1796
|
+
const requestContextPromise = this.requestFactory.deletePlan(planId, _options);
|
|
1797
|
+
// build promise chain
|
|
1798
|
+
let middlewarePreObservable = (0, rxjsStub_1.from)(requestContextPromise);
|
|
1799
|
+
for (const middleware of this.configuration.middleware) {
|
|
1800
|
+
middlewarePreObservable = middlewarePreObservable.pipe((0, rxjsStub_2.mergeMap)((ctx) => middleware.pre(ctx)));
|
|
1801
|
+
}
|
|
1802
|
+
return middlewarePreObservable.pipe((0, rxjsStub_2.mergeMap)((ctx) => this.configuration.httpApi.send(ctx))).
|
|
1803
|
+
pipe((0, rxjsStub_2.mergeMap)((response) => {
|
|
1804
|
+
let middlewarePostObservable = (0, rxjsStub_1.of)(response);
|
|
1805
|
+
for (const middleware of this.configuration.middleware) {
|
|
1806
|
+
middlewarePostObservable = middlewarePostObservable.pipe((0, rxjsStub_2.mergeMap)((rsp) => middleware.post(rsp)));
|
|
1807
|
+
}
|
|
1808
|
+
return middlewarePostObservable.pipe((0, rxjsStub_2.map)((rsp) => this.responseProcessor.deletePlanWithHttpInfo(rsp)));
|
|
1809
|
+
}));
|
|
1810
|
+
}
|
|
1811
|
+
/**
|
|
1812
|
+
* Delete a Plan by id.
|
|
1813
|
+
* Delete Plan
|
|
1814
|
+
* @param planId
|
|
1815
|
+
*/
|
|
1816
|
+
deletePlan(planId, _options) {
|
|
1817
|
+
return this.deletePlanWithHttpInfo(planId, _options).pipe((0, rxjsStub_2.map)((apiResponse) => apiResponse.data));
|
|
1818
|
+
}
|
|
1819
|
+
/**
|
|
1820
|
+
* Get a Plan by id.
|
|
1821
|
+
* Get Plan
|
|
1822
|
+
* @param planId
|
|
1823
|
+
*/
|
|
1824
|
+
getPlanWithHttpInfo(planId, _options) {
|
|
1825
|
+
const requestContextPromise = this.requestFactory.getPlan(planId, _options);
|
|
1826
|
+
// build promise chain
|
|
1827
|
+
let middlewarePreObservable = (0, rxjsStub_1.from)(requestContextPromise);
|
|
1828
|
+
for (const middleware of this.configuration.middleware) {
|
|
1829
|
+
middlewarePreObservable = middlewarePreObservable.pipe((0, rxjsStub_2.mergeMap)((ctx) => middleware.pre(ctx)));
|
|
1830
|
+
}
|
|
1831
|
+
return middlewarePreObservable.pipe((0, rxjsStub_2.mergeMap)((ctx) => this.configuration.httpApi.send(ctx))).
|
|
1832
|
+
pipe((0, rxjsStub_2.mergeMap)((response) => {
|
|
1833
|
+
let middlewarePostObservable = (0, rxjsStub_1.of)(response);
|
|
1834
|
+
for (const middleware of this.configuration.middleware) {
|
|
1835
|
+
middlewarePostObservable = middlewarePostObservable.pipe((0, rxjsStub_2.mergeMap)((rsp) => middleware.post(rsp)));
|
|
1836
|
+
}
|
|
1837
|
+
return middlewarePostObservable.pipe((0, rxjsStub_2.map)((rsp) => this.responseProcessor.getPlanWithHttpInfo(rsp)));
|
|
1838
|
+
}));
|
|
1839
|
+
}
|
|
1840
|
+
/**
|
|
1841
|
+
* Get a Plan by id.
|
|
1842
|
+
* Get Plan
|
|
1843
|
+
* @param planId
|
|
1844
|
+
*/
|
|
1845
|
+
getPlan(planId, _options) {
|
|
1846
|
+
return this.getPlanWithHttpInfo(planId, _options).pipe((0, rxjsStub_2.map)((apiResponse) => apiResponse.data));
|
|
1847
|
+
}
|
|
1848
|
+
/**
|
|
1849
|
+
* Get a list of Plans.
|
|
1850
|
+
* List Plans
|
|
1851
|
+
* @param [limit]
|
|
1852
|
+
* @param [cursor]
|
|
1853
|
+
*/
|
|
1854
|
+
listPlansWithHttpInfo(limit, cursor, _options) {
|
|
1855
|
+
const requestContextPromise = this.requestFactory.listPlans(limit, cursor, _options);
|
|
1856
|
+
// build promise chain
|
|
1857
|
+
let middlewarePreObservable = (0, rxjsStub_1.from)(requestContextPromise);
|
|
1858
|
+
for (const middleware of this.configuration.middleware) {
|
|
1859
|
+
middlewarePreObservable = middlewarePreObservable.pipe((0, rxjsStub_2.mergeMap)((ctx) => middleware.pre(ctx)));
|
|
1860
|
+
}
|
|
1861
|
+
return middlewarePreObservable.pipe((0, rxjsStub_2.mergeMap)((ctx) => this.configuration.httpApi.send(ctx))).
|
|
1862
|
+
pipe((0, rxjsStub_2.mergeMap)((response) => {
|
|
1863
|
+
let middlewarePostObservable = (0, rxjsStub_1.of)(response);
|
|
1864
|
+
for (const middleware of this.configuration.middleware) {
|
|
1865
|
+
middlewarePostObservable = middlewarePostObservable.pipe((0, rxjsStub_2.mergeMap)((rsp) => middleware.post(rsp)));
|
|
1866
|
+
}
|
|
1867
|
+
return middlewarePostObservable.pipe((0, rxjsStub_2.map)((rsp) => this.responseProcessor.listPlansWithHttpInfo(rsp)));
|
|
1868
|
+
}));
|
|
1869
|
+
}
|
|
1870
|
+
/**
|
|
1871
|
+
* Get a list of Plans.
|
|
1872
|
+
* List Plans
|
|
1873
|
+
* @param [limit]
|
|
1874
|
+
* @param [cursor]
|
|
1875
|
+
*/
|
|
1876
|
+
listPlans(limit, cursor, _options) {
|
|
1877
|
+
return this.listPlansWithHttpInfo(limit, cursor, _options).pipe((0, rxjsStub_2.map)((apiResponse) => apiResponse.data));
|
|
1878
|
+
}
|
|
1879
|
+
}
|
|
1880
|
+
exports.ObservablePlansApi = ObservablePlansApi;
|
|
1410
1881
|
const ProductConsumptionsApi_1 = require("../apis/ProductConsumptionsApi");
|
|
1411
1882
|
class ObservableProductConsumptionsApi {
|
|
1412
1883
|
constructor(configuration, requestFactory, responseProcessor) {
|