@flexprice/sdk 1.0.17 → 1.0.28
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/README.md +281 -200
- package/package.json +29 -41
- package/LICENSE +0 -663
- package/dist/ApiClient.js +0 -653
- package/dist/api/AuthApi.js +0 -100
- package/dist/api/CustomersApi.js +0 -376
- package/dist/api/EntitlementsApi.js +0 -267
- package/dist/api/EnvironmentsApi.js +0 -184
- package/dist/api/EventsApi.js +0 -238
- package/dist/api/FeaturesApi.js +0 -263
- package/dist/api/IntegrationsApi.js +0 -169
- package/dist/api/InvoicesApi.js +0 -419
- package/dist/api/PaymentsApi.js +0 -272
- package/dist/api/PlansApi.js +0 -226
- package/dist/api/PricesApi.js +0 -228
- package/dist/api/SecretsApi.js +0 -137
- package/dist/api/SubscriptionsApi.js +0 -353
- package/dist/api/TasksApi.js +0 -232
- package/dist/api/TenantsApi.js +0 -162
- package/dist/api/UsersApi.js +0 -61
- package/dist/api/WalletsApi.js +0 -392
- package/dist/index.js +0 -1102
- package/dist/model/DtoAddress.js +0 -132
- package/dist/model/DtoAggregatedEntitlement.js +0 -106
- package/dist/model/DtoAggregatedFeature.js +0 -109
- package/dist/model/DtoAuthResponse.js +0 -96
- package/dist/model/DtoBillingPeriodInfo.js +0 -97
- package/dist/model/DtoBulkIngestEventRequest.js +0 -91
- package/dist/model/DtoCreateAPIKeyRequest.js +0 -117
- package/dist/model/DtoCreateAPIKeyResponse.js +0 -86
- package/dist/model/DtoCreateCustomerRequest.js +0 -188
- package/dist/model/DtoCreateEntitlementRequest.js +0 -150
- package/dist/model/DtoCreateEnvironmentRequest.js +0 -96
- package/dist/model/DtoCreateFeatureRequest.js +0 -177
- package/dist/model/DtoCreateIntegrationRequest.js +0 -105
- package/dist/model/DtoCreateInvoiceLineItemRequest.js +0 -206
- package/dist/model/DtoCreateInvoiceRequest.js +0 -289
- package/dist/model/DtoCreateMeterRequest.js +0 -144
- package/dist/model/DtoCreatePaymentRequest.js +0 -172
- package/dist/model/DtoCreatePlanEntitlementRequest.js +0 -150
- package/dist/model/DtoCreatePlanPriceRequest.js +0 -279
- package/dist/model/DtoCreatePlanRequest.js +0 -148
- package/dist/model/DtoCreatePriceRequest.js +0 -279
- package/dist/model/DtoCreatePriceTier.js +0 -102
- package/dist/model/DtoCreateSubscriptionRequest.js +0 -223
- package/dist/model/DtoCreateTaskRequest.js +0 -137
- package/dist/model/DtoCreateTenantRequest.js +0 -96
- package/dist/model/DtoCreateWalletRequest.js +0 -205
- package/dist/model/DtoCustomerEntitlementsResponse.js +0 -93
- package/dist/model/DtoCustomerInvoiceSummary.js +0 -148
- package/dist/model/DtoCustomerMultiCurrencyInvoiceSummary.js +0 -105
- package/dist/model/DtoCustomerResponse.js +0 -283
- package/dist/model/DtoCustomerUsageSummaryResponse.js +0 -121
- package/dist/model/DtoEntitlementResponse.js +0 -259
- package/dist/model/DtoEntitlementSource.js +0 -144
- package/dist/model/DtoEnvironmentResponse.js +0 -120
- package/dist/model/DtoEvent.js +0 -154
- package/dist/model/DtoFeatureResponse.js +0 -258
- package/dist/model/DtoFeatureUsageSummary.js +0 -135
- package/dist/model/DtoGetEventsRequest.js +0 -219
- package/dist/model/DtoGetEventsResponse.js +0 -129
- package/dist/model/DtoGetPreviewInvoiceRequest.js +0 -106
- package/dist/model/DtoGetUsageAnalyticsRequest.js +0 -152
- package/dist/model/DtoGetUsageAnalyticsResponse.js +0 -101
- package/dist/model/DtoGetUsageByMeterRequest.js +0 -149
- package/dist/model/DtoGetUsageBySubscriptionRequest.js +0 -114
- package/dist/model/DtoGetUsageBySubscriptionResponse.js +0 -137
- package/dist/model/DtoGetUsageRequest.js +0 -173
- package/dist/model/DtoGetUsageResponse.js +0 -110
- package/dist/model/DtoIngestEventRequest.js +0 -156
- package/dist/model/DtoInvoiceLineItemResponse.js +0 -326
- package/dist/model/DtoInvoiceResponse.js +0 -450
- package/dist/model/DtoLinkedIntegrationsResponse.js +0 -72
- package/dist/model/DtoListCustomersResponse.js +0 -95
- package/dist/model/DtoListEntitlementsResponse.js +0 -95
- package/dist/model/DtoListEnvironmentsResponse.js +0 -105
- package/dist/model/DtoListFeaturesResponse.js +0 -95
- package/dist/model/DtoListInvoicesResponse.js +0 -95
- package/dist/model/DtoListPaymentsResponse.js +0 -95
- package/dist/model/DtoListPlansResponse.js +0 -95
- package/dist/model/DtoListPricesResponse.js +0 -95
- package/dist/model/DtoListSecretsResponse.js +0 -95
- package/dist/model/DtoListSubscriptionPausesResponse.js +0 -89
- package/dist/model/DtoListSubscriptionsResponse.js +0 -95
- package/dist/model/DtoListTasksResponse.js +0 -95
- package/dist/model/DtoListWalletTransactionsResponse.js +0 -95
- package/dist/model/DtoLoginRequest.js +0 -108
- package/dist/model/DtoMeterResponse.js +0 -188
- package/dist/model/DtoPauseSubscriptionRequest.js +0 -141
- package/dist/model/DtoPaymentAttemptResponse.js +0 -174
- package/dist/model/DtoPaymentResponse.js +0 -314
- package/dist/model/DtoPlanResponse.js +0 -231
- package/dist/model/DtoPriceResponse.js +0 -373
- package/dist/model/DtoResumeSubscriptionRequest.js +0 -97
- package/dist/model/DtoSecretResponse.js +0 -183
- package/dist/model/DtoSignUpRequest.js +0 -118
- package/dist/model/DtoSubscriptionPauseResponse.js +0 -283
- package/dist/model/DtoSubscriptionResponse.js +0 -489
- package/dist/model/DtoSubscriptionUsageByMetersResponse.js +0 -148
- package/dist/model/DtoTaskResponse.js +0 -294
- package/dist/model/DtoTenantBillingDetails.js +0 -110
- package/dist/model/DtoTenantBillingUsage.js +0 -95
- package/dist/model/DtoTenantResponse.js +0 -134
- package/dist/model/DtoTopUpWalletRequest.js +0 -148
- package/dist/model/DtoUpdateCustomerRequest.js +0 -178
- package/dist/model/DtoUpdateEntitlementRequest.js +0 -105
- package/dist/model/DtoUpdateEnvironmentRequest.js +0 -84
- package/dist/model/DtoUpdateFeatureRequest.js +0 -139
- package/dist/model/DtoUpdatePaymentRequest.js +0 -82
- package/dist/model/DtoUpdatePaymentStatusRequest.js +0 -87
- package/dist/model/DtoUpdatePlanEntitlementRequest.js +0 -163
- package/dist/model/DtoUpdatePlanPriceRequest.js +0 -292
- package/dist/model/DtoUpdatePlanRequest.js +0 -138
- package/dist/model/DtoUpdatePriceRequest.js +0 -94
- package/dist/model/DtoUpdateTaskStatusRequest.js +0 -79
- package/dist/model/DtoUpdateTenantRequest.js +0 -86
- package/dist/model/DtoUpdateWalletRequest.js +0 -133
- package/dist/model/DtoUsageAnalyticItem.js +0 -190
- package/dist/model/DtoUsageAnalyticPoint.js +0 -88
- package/dist/model/DtoUsageResult.js +0 -80
- package/dist/model/DtoUserResponse.js +0 -98
- package/dist/model/DtoWalletBalanceResponse.js +0 -336
- package/dist/model/DtoWalletResponse.js +0 -235
- package/dist/model/DtoWalletTransactionResponse.js +0 -221
- package/dist/model/ErrorsErrorDetail.js +0 -94
- package/dist/model/ErrorsErrorResponse.js +0 -82
- package/dist/model/GithubComFlexpriceFlexpriceInternalTypesValue.js +0 -112
- package/dist/model/MeterAggregation.js +0 -82
- package/dist/model/MeterFilter.js +0 -86
- package/dist/model/PriceJSONBTransformQuantity.js +0 -82
- package/dist/model/PricePrice.js +0 -359
- package/dist/model/PricePriceTier.js +0 -87
- package/dist/model/PriceTransformQuantity.js +0 -82
- package/dist/model/SubscriptionSubscriptionLineItem.js +0 -338
- package/dist/model/SubscriptionSubscriptionPause.js +0 -283
- package/dist/model/TypesAggregationType.js +0 -53
- package/dist/model/TypesAutoTopupTrigger.js +0 -41
- package/dist/model/TypesBillingCadence.js +0 -41
- package/dist/model/TypesBillingCycle.js +0 -41
- package/dist/model/TypesBillingModel.js +0 -47
- package/dist/model/TypesBillingPeriod.js +0 -65
- package/dist/model/TypesBillingTier.js +0 -41
- package/dist/model/TypesCustomerFilter.js +0 -230
- package/dist/model/TypesDataType.js +0 -53
- package/dist/model/TypesEntityType.js +0 -47
- package/dist/model/TypesFeatureFilter.js +0 -243
- package/dist/model/TypesFeatureType.js +0 -47
- package/dist/model/TypesFileType.js +0 -41
- package/dist/model/TypesFilterCondition.js +0 -104
- package/dist/model/TypesFilterOperatorType.js +0 -77
- package/dist/model/TypesInvoiceBillingReason.js +0 -53
- package/dist/model/TypesInvoiceCadence.js +0 -41
- package/dist/model/TypesInvoiceStatus.js +0 -47
- package/dist/model/TypesInvoiceType.js +0 -47
- package/dist/model/TypesPaginationResponse.js +0 -84
- package/dist/model/TypesPauseMode.js +0 -47
- package/dist/model/TypesPauseStatus.js +0 -59
- package/dist/model/TypesPaymentDestinationType.js +0 -35
- package/dist/model/TypesPaymentMethodType.js +0 -53
- package/dist/model/TypesPaymentStatus.js +0 -65
- package/dist/model/TypesPriceType.js +0 -41
- package/dist/model/TypesResetUsage.js +0 -41
- package/dist/model/TypesResumeMode.js +0 -47
- package/dist/model/TypesSecretProvider.js +0 -47
- package/dist/model/TypesSecretType.js +0 -47
- package/dist/model/TypesSortCondition.js +0 -81
- package/dist/model/TypesSortDirection.js +0 -41
- package/dist/model/TypesStatus.js +0 -47
- package/dist/model/TypesSubscriptionStatus.js +0 -77
- package/dist/model/TypesTaskStatus.js +0 -53
- package/dist/model/TypesTaskType.js +0 -41
- package/dist/model/TypesTransactionReason.js +0 -77
- package/dist/model/TypesTransactionStatus.js +0 -47
- package/dist/model/TypesTransactionType.js +0 -41
- package/dist/model/TypesWalletConfig.js +0 -74
- package/dist/model/TypesWalletConfigPriceType.js +0 -47
- package/dist/model/TypesWalletStatus.js +0 -47
- package/dist/model/TypesWalletTxReferenceType.js +0 -47
- package/dist/model/TypesWalletType.js +0 -41
- package/dist/model/TypesWindowSize.js +0 -83
|
@@ -1,221 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* FlexPrice API
|
|
3
|
-
* FlexPrice API Service
|
|
4
|
-
*
|
|
5
|
-
* The version of the OpenAPI document: 1.0
|
|
6
|
-
*
|
|
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
|
-
*/
|
|
13
|
-
|
|
14
|
-
import ApiClient from '../ApiClient';
|
|
15
|
-
import TypesTransactionReason from './TypesTransactionReason';
|
|
16
|
-
import TypesTransactionStatus from './TypesTransactionStatus';
|
|
17
|
-
import TypesWalletTxReferenceType from './TypesWalletTxReferenceType';
|
|
18
|
-
|
|
19
|
-
/**
|
|
20
|
-
* The DtoWalletTransactionResponse model module.
|
|
21
|
-
* @module model/DtoWalletTransactionResponse
|
|
22
|
-
* @version 1.0
|
|
23
|
-
*/
|
|
24
|
-
class DtoWalletTransactionResponse {
|
|
25
|
-
/**
|
|
26
|
-
* Constructs a new <code>DtoWalletTransactionResponse</code>.
|
|
27
|
-
* @alias module:model/DtoWalletTransactionResponse
|
|
28
|
-
*/
|
|
29
|
-
constructor() {
|
|
30
|
-
DtoWalletTransactionResponse.initialize(this);
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
/**
|
|
34
|
-
* Initializes the fields of this object.
|
|
35
|
-
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
|
|
36
|
-
* Only for internal use.
|
|
37
|
-
*/
|
|
38
|
-
static initialize(obj) {}
|
|
39
|
-
|
|
40
|
-
/**
|
|
41
|
-
* Constructs a <code>DtoWalletTransactionResponse</code> from a plain JavaScript object, optionally creating a new instance.
|
|
42
|
-
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
|
|
43
|
-
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
44
|
-
* @param {module:model/DtoWalletTransactionResponse} obj Optional instance to populate.
|
|
45
|
-
* @return {module:model/DtoWalletTransactionResponse} The populated <code>DtoWalletTransactionResponse</code> instance.
|
|
46
|
-
*/
|
|
47
|
-
static constructFromObject(data, obj) {
|
|
48
|
-
if (data) {
|
|
49
|
-
obj = obj || new DtoWalletTransactionResponse();
|
|
50
|
-
if (data.hasOwnProperty('amount')) {
|
|
51
|
-
obj['amount'] = ApiClient.convertToType(data['amount'], 'Number');
|
|
52
|
-
}
|
|
53
|
-
if (data.hasOwnProperty('created_at')) {
|
|
54
|
-
obj['created_at'] = ApiClient.convertToType(data['created_at'], 'String');
|
|
55
|
-
}
|
|
56
|
-
if (data.hasOwnProperty('credit_amount')) {
|
|
57
|
-
obj['credit_amount'] = ApiClient.convertToType(data['credit_amount'], 'Number');
|
|
58
|
-
}
|
|
59
|
-
if (data.hasOwnProperty('credit_balance_after')) {
|
|
60
|
-
obj['credit_balance_after'] = ApiClient.convertToType(data['credit_balance_after'], 'Number');
|
|
61
|
-
}
|
|
62
|
-
if (data.hasOwnProperty('credit_balance_before')) {
|
|
63
|
-
obj['credit_balance_before'] = ApiClient.convertToType(data['credit_balance_before'], 'Number');
|
|
64
|
-
}
|
|
65
|
-
if (data.hasOwnProperty('credits_available')) {
|
|
66
|
-
obj['credits_available'] = ApiClient.convertToType(data['credits_available'], 'Number');
|
|
67
|
-
}
|
|
68
|
-
if (data.hasOwnProperty('description')) {
|
|
69
|
-
obj['description'] = ApiClient.convertToType(data['description'], 'String');
|
|
70
|
-
}
|
|
71
|
-
if (data.hasOwnProperty('expiry_date')) {
|
|
72
|
-
obj['expiry_date'] = ApiClient.convertToType(data['expiry_date'], 'String');
|
|
73
|
-
}
|
|
74
|
-
if (data.hasOwnProperty('id')) {
|
|
75
|
-
obj['id'] = ApiClient.convertToType(data['id'], 'String');
|
|
76
|
-
}
|
|
77
|
-
if (data.hasOwnProperty('metadata')) {
|
|
78
|
-
obj['metadata'] = ApiClient.convertToType(data['metadata'], {
|
|
79
|
-
'String': 'String'
|
|
80
|
-
});
|
|
81
|
-
}
|
|
82
|
-
if (data.hasOwnProperty('reference_id')) {
|
|
83
|
-
obj['reference_id'] = ApiClient.convertToType(data['reference_id'], 'String');
|
|
84
|
-
}
|
|
85
|
-
if (data.hasOwnProperty('reference_type')) {
|
|
86
|
-
obj['reference_type'] = TypesWalletTxReferenceType.constructFromObject(data['reference_type']);
|
|
87
|
-
}
|
|
88
|
-
if (data.hasOwnProperty('transaction_reason')) {
|
|
89
|
-
obj['transaction_reason'] = TypesTransactionReason.constructFromObject(data['transaction_reason']);
|
|
90
|
-
}
|
|
91
|
-
if (data.hasOwnProperty('transaction_status')) {
|
|
92
|
-
obj['transaction_status'] = TypesTransactionStatus.constructFromObject(data['transaction_status']);
|
|
93
|
-
}
|
|
94
|
-
if (data.hasOwnProperty('type')) {
|
|
95
|
-
obj['type'] = ApiClient.convertToType(data['type'], 'String');
|
|
96
|
-
}
|
|
97
|
-
if (data.hasOwnProperty('wallet_id')) {
|
|
98
|
-
obj['wallet_id'] = ApiClient.convertToType(data['wallet_id'], 'String');
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
return obj;
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
/**
|
|
105
|
-
* Validates the JSON data with respect to <code>DtoWalletTransactionResponse</code>.
|
|
106
|
-
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
107
|
-
* @return {boolean} to indicate whether the JSON data is valid with respect to <code>DtoWalletTransactionResponse</code>.
|
|
108
|
-
*/
|
|
109
|
-
static validateJSON(data) {
|
|
110
|
-
// ensure the json data is a string
|
|
111
|
-
if (data['created_at'] && !(typeof data['created_at'] === 'string' || data['created_at'] instanceof String)) {
|
|
112
|
-
throw new Error("Expected the field `created_at` to be a primitive type in the JSON string but got " + data['created_at']);
|
|
113
|
-
}
|
|
114
|
-
// ensure the json data is a string
|
|
115
|
-
if (data['description'] && !(typeof data['description'] === 'string' || data['description'] instanceof String)) {
|
|
116
|
-
throw new Error("Expected the field `description` to be a primitive type in the JSON string but got " + data['description']);
|
|
117
|
-
}
|
|
118
|
-
// ensure the json data is a string
|
|
119
|
-
if (data['expiry_date'] && !(typeof data['expiry_date'] === 'string' || data['expiry_date'] instanceof String)) {
|
|
120
|
-
throw new Error("Expected the field `expiry_date` to be a primitive type in the JSON string but got " + data['expiry_date']);
|
|
121
|
-
}
|
|
122
|
-
// ensure the json data is a string
|
|
123
|
-
if (data['id'] && !(typeof data['id'] === 'string' || data['id'] instanceof String)) {
|
|
124
|
-
throw new Error("Expected the field `id` to be a primitive type in the JSON string but got " + data['id']);
|
|
125
|
-
}
|
|
126
|
-
// ensure the json data is a string
|
|
127
|
-
if (data['reference_id'] && !(typeof data['reference_id'] === 'string' || data['reference_id'] instanceof String)) {
|
|
128
|
-
throw new Error("Expected the field `reference_id` to be a primitive type in the JSON string but got " + data['reference_id']);
|
|
129
|
-
}
|
|
130
|
-
// ensure the json data is a string
|
|
131
|
-
if (data['type'] && !(typeof data['type'] === 'string' || data['type'] instanceof String)) {
|
|
132
|
-
throw new Error("Expected the field `type` to be a primitive type in the JSON string but got " + data['type']);
|
|
133
|
-
}
|
|
134
|
-
// ensure the json data is a string
|
|
135
|
-
if (data['wallet_id'] && !(typeof data['wallet_id'] === 'string' || data['wallet_id'] instanceof String)) {
|
|
136
|
-
throw new Error("Expected the field `wallet_id` to be a primitive type in the JSON string but got " + data['wallet_id']);
|
|
137
|
-
}
|
|
138
|
-
return true;
|
|
139
|
-
}
|
|
140
|
-
}
|
|
141
|
-
|
|
142
|
-
/**
|
|
143
|
-
* @member {Number} amount
|
|
144
|
-
*/
|
|
145
|
-
DtoWalletTransactionResponse.prototype['amount'] = undefined;
|
|
146
|
-
|
|
147
|
-
/**
|
|
148
|
-
* @member {String} created_at
|
|
149
|
-
*/
|
|
150
|
-
DtoWalletTransactionResponse.prototype['created_at'] = undefined;
|
|
151
|
-
|
|
152
|
-
/**
|
|
153
|
-
* @member {Number} credit_amount
|
|
154
|
-
*/
|
|
155
|
-
DtoWalletTransactionResponse.prototype['credit_amount'] = undefined;
|
|
156
|
-
|
|
157
|
-
/**
|
|
158
|
-
* @member {Number} credit_balance_after
|
|
159
|
-
*/
|
|
160
|
-
DtoWalletTransactionResponse.prototype['credit_balance_after'] = undefined;
|
|
161
|
-
|
|
162
|
-
/**
|
|
163
|
-
* @member {Number} credit_balance_before
|
|
164
|
-
*/
|
|
165
|
-
DtoWalletTransactionResponse.prototype['credit_balance_before'] = undefined;
|
|
166
|
-
|
|
167
|
-
/**
|
|
168
|
-
* @member {Number} credits_available
|
|
169
|
-
*/
|
|
170
|
-
DtoWalletTransactionResponse.prototype['credits_available'] = undefined;
|
|
171
|
-
|
|
172
|
-
/**
|
|
173
|
-
* @member {String} description
|
|
174
|
-
*/
|
|
175
|
-
DtoWalletTransactionResponse.prototype['description'] = undefined;
|
|
176
|
-
|
|
177
|
-
/**
|
|
178
|
-
* @member {String} expiry_date
|
|
179
|
-
*/
|
|
180
|
-
DtoWalletTransactionResponse.prototype['expiry_date'] = undefined;
|
|
181
|
-
|
|
182
|
-
/**
|
|
183
|
-
* @member {String} id
|
|
184
|
-
*/
|
|
185
|
-
DtoWalletTransactionResponse.prototype['id'] = undefined;
|
|
186
|
-
|
|
187
|
-
/**
|
|
188
|
-
* @member {Object.<String, String>} metadata
|
|
189
|
-
*/
|
|
190
|
-
DtoWalletTransactionResponse.prototype['metadata'] = undefined;
|
|
191
|
-
|
|
192
|
-
/**
|
|
193
|
-
* @member {String} reference_id
|
|
194
|
-
*/
|
|
195
|
-
DtoWalletTransactionResponse.prototype['reference_id'] = undefined;
|
|
196
|
-
|
|
197
|
-
/**
|
|
198
|
-
* @member {module:model/TypesWalletTxReferenceType} reference_type
|
|
199
|
-
*/
|
|
200
|
-
DtoWalletTransactionResponse.prototype['reference_type'] = undefined;
|
|
201
|
-
|
|
202
|
-
/**
|
|
203
|
-
* @member {module:model/TypesTransactionReason} transaction_reason
|
|
204
|
-
*/
|
|
205
|
-
DtoWalletTransactionResponse.prototype['transaction_reason'] = undefined;
|
|
206
|
-
|
|
207
|
-
/**
|
|
208
|
-
* @member {module:model/TypesTransactionStatus} transaction_status
|
|
209
|
-
*/
|
|
210
|
-
DtoWalletTransactionResponse.prototype['transaction_status'] = undefined;
|
|
211
|
-
|
|
212
|
-
/**
|
|
213
|
-
* @member {String} type
|
|
214
|
-
*/
|
|
215
|
-
DtoWalletTransactionResponse.prototype['type'] = undefined;
|
|
216
|
-
|
|
217
|
-
/**
|
|
218
|
-
* @member {String} wallet_id
|
|
219
|
-
*/
|
|
220
|
-
DtoWalletTransactionResponse.prototype['wallet_id'] = undefined;
|
|
221
|
-
export default DtoWalletTransactionResponse;
|
|
@@ -1,94 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* FlexPrice API
|
|
3
|
-
* FlexPrice API Service
|
|
4
|
-
*
|
|
5
|
-
* The version of the OpenAPI document: 1.0
|
|
6
|
-
*
|
|
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
|
-
*/
|
|
13
|
-
|
|
14
|
-
import ApiClient from '../ApiClient';
|
|
15
|
-
|
|
16
|
-
/**
|
|
17
|
-
* The ErrorsErrorDetail model module.
|
|
18
|
-
* @module model/ErrorsErrorDetail
|
|
19
|
-
* @version 1.0
|
|
20
|
-
*/
|
|
21
|
-
class ErrorsErrorDetail {
|
|
22
|
-
/**
|
|
23
|
-
* Constructs a new <code>ErrorsErrorDetail</code>.
|
|
24
|
-
* @alias module:model/ErrorsErrorDetail
|
|
25
|
-
*/
|
|
26
|
-
constructor() {
|
|
27
|
-
ErrorsErrorDetail.initialize(this);
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
/**
|
|
31
|
-
* Initializes the fields of this object.
|
|
32
|
-
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
|
|
33
|
-
* Only for internal use.
|
|
34
|
-
*/
|
|
35
|
-
static initialize(obj) {}
|
|
36
|
-
|
|
37
|
-
/**
|
|
38
|
-
* Constructs a <code>ErrorsErrorDetail</code> from a plain JavaScript object, optionally creating a new instance.
|
|
39
|
-
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
|
|
40
|
-
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
41
|
-
* @param {module:model/ErrorsErrorDetail} obj Optional instance to populate.
|
|
42
|
-
* @return {module:model/ErrorsErrorDetail} The populated <code>ErrorsErrorDetail</code> instance.
|
|
43
|
-
*/
|
|
44
|
-
static constructFromObject(data, obj) {
|
|
45
|
-
if (data) {
|
|
46
|
-
obj = obj || new ErrorsErrorDetail();
|
|
47
|
-
if (data.hasOwnProperty('details')) {
|
|
48
|
-
obj['details'] = ApiClient.convertToType(data['details'], {
|
|
49
|
-
'String': Object
|
|
50
|
-
});
|
|
51
|
-
}
|
|
52
|
-
if (data.hasOwnProperty('internal_error')) {
|
|
53
|
-
obj['internal_error'] = ApiClient.convertToType(data['internal_error'], 'String');
|
|
54
|
-
}
|
|
55
|
-
if (data.hasOwnProperty('message')) {
|
|
56
|
-
obj['message'] = ApiClient.convertToType(data['message'], 'String');
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
return obj;
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
/**
|
|
63
|
-
* Validates the JSON data with respect to <code>ErrorsErrorDetail</code>.
|
|
64
|
-
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
65
|
-
* @return {boolean} to indicate whether the JSON data is valid with respect to <code>ErrorsErrorDetail</code>.
|
|
66
|
-
*/
|
|
67
|
-
static validateJSON(data) {
|
|
68
|
-
// ensure the json data is a string
|
|
69
|
-
if (data['internal_error'] && !(typeof data['internal_error'] === 'string' || data['internal_error'] instanceof String)) {
|
|
70
|
-
throw new Error("Expected the field `internal_error` to be a primitive type in the JSON string but got " + data['internal_error']);
|
|
71
|
-
}
|
|
72
|
-
// ensure the json data is a string
|
|
73
|
-
if (data['message'] && !(typeof data['message'] === 'string' || data['message'] instanceof String)) {
|
|
74
|
-
throw new Error("Expected the field `message` to be a primitive type in the JSON string but got " + data['message']);
|
|
75
|
-
}
|
|
76
|
-
return true;
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
/**
|
|
81
|
-
* @member {Object.<String, Object>} details
|
|
82
|
-
*/
|
|
83
|
-
ErrorsErrorDetail.prototype['details'] = undefined;
|
|
84
|
-
|
|
85
|
-
/**
|
|
86
|
-
* @member {String} internal_error
|
|
87
|
-
*/
|
|
88
|
-
ErrorsErrorDetail.prototype['internal_error'] = undefined;
|
|
89
|
-
|
|
90
|
-
/**
|
|
91
|
-
* @member {String} message
|
|
92
|
-
*/
|
|
93
|
-
ErrorsErrorDetail.prototype['message'] = undefined;
|
|
94
|
-
export default ErrorsErrorDetail;
|
|
@@ -1,82 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* FlexPrice API
|
|
3
|
-
* FlexPrice API Service
|
|
4
|
-
*
|
|
5
|
-
* The version of the OpenAPI document: 1.0
|
|
6
|
-
*
|
|
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
|
-
*/
|
|
13
|
-
|
|
14
|
-
import ApiClient from '../ApiClient';
|
|
15
|
-
import ErrorsErrorDetail from './ErrorsErrorDetail';
|
|
16
|
-
|
|
17
|
-
/**
|
|
18
|
-
* The ErrorsErrorResponse model module.
|
|
19
|
-
* @module model/ErrorsErrorResponse
|
|
20
|
-
* @version 1.0
|
|
21
|
-
*/
|
|
22
|
-
class ErrorsErrorResponse {
|
|
23
|
-
/**
|
|
24
|
-
* Constructs a new <code>ErrorsErrorResponse</code>.
|
|
25
|
-
* @alias module:model/ErrorsErrorResponse
|
|
26
|
-
*/
|
|
27
|
-
constructor() {
|
|
28
|
-
ErrorsErrorResponse.initialize(this);
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
/**
|
|
32
|
-
* Initializes the fields of this object.
|
|
33
|
-
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
|
|
34
|
-
* Only for internal use.
|
|
35
|
-
*/
|
|
36
|
-
static initialize(obj) {}
|
|
37
|
-
|
|
38
|
-
/**
|
|
39
|
-
* Constructs a <code>ErrorsErrorResponse</code> from a plain JavaScript object, optionally creating a new instance.
|
|
40
|
-
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
|
|
41
|
-
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
42
|
-
* @param {module:model/ErrorsErrorResponse} obj Optional instance to populate.
|
|
43
|
-
* @return {module:model/ErrorsErrorResponse} The populated <code>ErrorsErrorResponse</code> instance.
|
|
44
|
-
*/
|
|
45
|
-
static constructFromObject(data, obj) {
|
|
46
|
-
if (data) {
|
|
47
|
-
obj = obj || new ErrorsErrorResponse();
|
|
48
|
-
if (data.hasOwnProperty('error')) {
|
|
49
|
-
obj['error'] = ErrorsErrorDetail.constructFromObject(data['error']);
|
|
50
|
-
}
|
|
51
|
-
if (data.hasOwnProperty('success')) {
|
|
52
|
-
obj['success'] = ApiClient.convertToType(data['success'], 'Boolean');
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
return obj;
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
/**
|
|
59
|
-
* Validates the JSON data with respect to <code>ErrorsErrorResponse</code>.
|
|
60
|
-
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
61
|
-
* @return {boolean} to indicate whether the JSON data is valid with respect to <code>ErrorsErrorResponse</code>.
|
|
62
|
-
*/
|
|
63
|
-
static validateJSON(data) {
|
|
64
|
-
// validate the optional field `error`
|
|
65
|
-
if (data['error']) {
|
|
66
|
-
// data not null
|
|
67
|
-
ErrorsErrorDetail.validateJSON(data['error']);
|
|
68
|
-
}
|
|
69
|
-
return true;
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
/**
|
|
74
|
-
* @member {module:model/ErrorsErrorDetail} error
|
|
75
|
-
*/
|
|
76
|
-
ErrorsErrorResponse.prototype['error'] = undefined;
|
|
77
|
-
|
|
78
|
-
/**
|
|
79
|
-
* @member {Boolean} success
|
|
80
|
-
*/
|
|
81
|
-
ErrorsErrorResponse.prototype['success'] = undefined;
|
|
82
|
-
export default ErrorsErrorResponse;
|
|
@@ -1,112 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* FlexPrice API
|
|
3
|
-
* FlexPrice API Service
|
|
4
|
-
*
|
|
5
|
-
* The version of the OpenAPI document: 1.0
|
|
6
|
-
*
|
|
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
|
-
*/
|
|
13
|
-
|
|
14
|
-
import ApiClient from '../ApiClient';
|
|
15
|
-
|
|
16
|
-
/**
|
|
17
|
-
* The GithubComFlexpriceFlexpriceInternalTypesValue model module.
|
|
18
|
-
* @module model/GithubComFlexpriceFlexpriceInternalTypesValue
|
|
19
|
-
* @version 1.0
|
|
20
|
-
*/
|
|
21
|
-
class GithubComFlexpriceFlexpriceInternalTypesValue {
|
|
22
|
-
/**
|
|
23
|
-
* Constructs a new <code>GithubComFlexpriceFlexpriceInternalTypesValue</code>.
|
|
24
|
-
* @alias module:model/GithubComFlexpriceFlexpriceInternalTypesValue
|
|
25
|
-
*/
|
|
26
|
-
constructor() {
|
|
27
|
-
GithubComFlexpriceFlexpriceInternalTypesValue.initialize(this);
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
/**
|
|
31
|
-
* Initializes the fields of this object.
|
|
32
|
-
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
|
|
33
|
-
* Only for internal use.
|
|
34
|
-
*/
|
|
35
|
-
static initialize(obj) {}
|
|
36
|
-
|
|
37
|
-
/**
|
|
38
|
-
* Constructs a <code>GithubComFlexpriceFlexpriceInternalTypesValue</code> from a plain JavaScript object, optionally creating a new instance.
|
|
39
|
-
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
|
|
40
|
-
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
41
|
-
* @param {module:model/GithubComFlexpriceFlexpriceInternalTypesValue} obj Optional instance to populate.
|
|
42
|
-
* @return {module:model/GithubComFlexpriceFlexpriceInternalTypesValue} The populated <code>GithubComFlexpriceFlexpriceInternalTypesValue</code> instance.
|
|
43
|
-
*/
|
|
44
|
-
static constructFromObject(data, obj) {
|
|
45
|
-
if (data) {
|
|
46
|
-
obj = obj || new GithubComFlexpriceFlexpriceInternalTypesValue();
|
|
47
|
-
if (data.hasOwnProperty('array')) {
|
|
48
|
-
obj['array'] = ApiClient.convertToType(data['array'], ['String']);
|
|
49
|
-
}
|
|
50
|
-
if (data.hasOwnProperty('boolean')) {
|
|
51
|
-
obj['boolean'] = ApiClient.convertToType(data['boolean'], 'Boolean');
|
|
52
|
-
}
|
|
53
|
-
if (data.hasOwnProperty('date')) {
|
|
54
|
-
obj['date'] = ApiClient.convertToType(data['date'], 'String');
|
|
55
|
-
}
|
|
56
|
-
if (data.hasOwnProperty('number')) {
|
|
57
|
-
obj['number'] = ApiClient.convertToType(data['number'], 'Number');
|
|
58
|
-
}
|
|
59
|
-
if (data.hasOwnProperty('string')) {
|
|
60
|
-
obj['string'] = ApiClient.convertToType(data['string'], 'String');
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
return obj;
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
/**
|
|
67
|
-
* Validates the JSON data with respect to <code>GithubComFlexpriceFlexpriceInternalTypesValue</code>.
|
|
68
|
-
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
69
|
-
* @return {boolean} to indicate whether the JSON data is valid with respect to <code>GithubComFlexpriceFlexpriceInternalTypesValue</code>.
|
|
70
|
-
*/
|
|
71
|
-
static validateJSON(data) {
|
|
72
|
-
// ensure the json data is an array
|
|
73
|
-
if (!Array.isArray(data['array'])) {
|
|
74
|
-
throw new Error("Expected the field `array` to be an array in the JSON data but got " + data['array']);
|
|
75
|
-
}
|
|
76
|
-
// ensure the json data is a string
|
|
77
|
-
if (data['date'] && !(typeof data['date'] === 'string' || data['date'] instanceof String)) {
|
|
78
|
-
throw new Error("Expected the field `date` to be a primitive type in the JSON string but got " + data['date']);
|
|
79
|
-
}
|
|
80
|
-
// ensure the json data is a string
|
|
81
|
-
if (data['string'] && !(typeof data['string'] === 'string' || data['string'] instanceof String)) {
|
|
82
|
-
throw new Error("Expected the field `string` to be a primitive type in the JSON string but got " + data['string']);
|
|
83
|
-
}
|
|
84
|
-
return true;
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
/**
|
|
89
|
-
* @member {Array.<String>} array
|
|
90
|
-
*/
|
|
91
|
-
GithubComFlexpriceFlexpriceInternalTypesValue.prototype['array'] = undefined;
|
|
92
|
-
|
|
93
|
-
/**
|
|
94
|
-
* @member {Boolean} boolean
|
|
95
|
-
*/
|
|
96
|
-
GithubComFlexpriceFlexpriceInternalTypesValue.prototype['boolean'] = undefined;
|
|
97
|
-
|
|
98
|
-
/**
|
|
99
|
-
* @member {String} date
|
|
100
|
-
*/
|
|
101
|
-
GithubComFlexpriceFlexpriceInternalTypesValue.prototype['date'] = undefined;
|
|
102
|
-
|
|
103
|
-
/**
|
|
104
|
-
* @member {Number} number
|
|
105
|
-
*/
|
|
106
|
-
GithubComFlexpriceFlexpriceInternalTypesValue.prototype['number'] = undefined;
|
|
107
|
-
|
|
108
|
-
/**
|
|
109
|
-
* @member {String} string
|
|
110
|
-
*/
|
|
111
|
-
GithubComFlexpriceFlexpriceInternalTypesValue.prototype['string'] = undefined;
|
|
112
|
-
export default GithubComFlexpriceFlexpriceInternalTypesValue;
|
|
@@ -1,82 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* FlexPrice API
|
|
3
|
-
* FlexPrice API Service
|
|
4
|
-
*
|
|
5
|
-
* The version of the OpenAPI document: 1.0
|
|
6
|
-
*
|
|
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
|
-
*/
|
|
13
|
-
|
|
14
|
-
import ApiClient from '../ApiClient';
|
|
15
|
-
import TypesAggregationType from './TypesAggregationType';
|
|
16
|
-
|
|
17
|
-
/**
|
|
18
|
-
* The MeterAggregation model module.
|
|
19
|
-
* @module model/MeterAggregation
|
|
20
|
-
* @version 1.0
|
|
21
|
-
*/
|
|
22
|
-
class MeterAggregation {
|
|
23
|
-
/**
|
|
24
|
-
* Constructs a new <code>MeterAggregation</code>.
|
|
25
|
-
* @alias module:model/MeterAggregation
|
|
26
|
-
*/
|
|
27
|
-
constructor() {
|
|
28
|
-
MeterAggregation.initialize(this);
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
/**
|
|
32
|
-
* Initializes the fields of this object.
|
|
33
|
-
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
|
|
34
|
-
* Only for internal use.
|
|
35
|
-
*/
|
|
36
|
-
static initialize(obj) {}
|
|
37
|
-
|
|
38
|
-
/**
|
|
39
|
-
* Constructs a <code>MeterAggregation</code> from a plain JavaScript object, optionally creating a new instance.
|
|
40
|
-
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
|
|
41
|
-
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
42
|
-
* @param {module:model/MeterAggregation} obj Optional instance to populate.
|
|
43
|
-
* @return {module:model/MeterAggregation} The populated <code>MeterAggregation</code> instance.
|
|
44
|
-
*/
|
|
45
|
-
static constructFromObject(data, obj) {
|
|
46
|
-
if (data) {
|
|
47
|
-
obj = obj || new MeterAggregation();
|
|
48
|
-
if (data.hasOwnProperty('field')) {
|
|
49
|
-
obj['field'] = ApiClient.convertToType(data['field'], 'String');
|
|
50
|
-
}
|
|
51
|
-
if (data.hasOwnProperty('type')) {
|
|
52
|
-
obj['type'] = TypesAggregationType.constructFromObject(data['type']);
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
return obj;
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
/**
|
|
59
|
-
* Validates the JSON data with respect to <code>MeterAggregation</code>.
|
|
60
|
-
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
61
|
-
* @return {boolean} to indicate whether the JSON data is valid with respect to <code>MeterAggregation</code>.
|
|
62
|
-
*/
|
|
63
|
-
static validateJSON(data) {
|
|
64
|
-
// ensure the json data is a string
|
|
65
|
-
if (data['field'] && !(typeof data['field'] === 'string' || data['field'] instanceof String)) {
|
|
66
|
-
throw new Error("Expected the field `field` to be a primitive type in the JSON string but got " + data['field']);
|
|
67
|
-
}
|
|
68
|
-
return true;
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
/**
|
|
73
|
-
* Field is the key in $event.properties on which the aggregation is to be applied For ex if the aggregation type is sum for API usage, the field could be \"duration_ms\"
|
|
74
|
-
* @member {String} field
|
|
75
|
-
*/
|
|
76
|
-
MeterAggregation.prototype['field'] = undefined;
|
|
77
|
-
|
|
78
|
-
/**
|
|
79
|
-
* @member {module:model/TypesAggregationType} type
|
|
80
|
-
*/
|
|
81
|
-
MeterAggregation.prototype['type'] = undefined;
|
|
82
|
-
export default MeterAggregation;
|
|
@@ -1,86 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* FlexPrice API
|
|
3
|
-
* FlexPrice API Service
|
|
4
|
-
*
|
|
5
|
-
* The version of the OpenAPI document: 1.0
|
|
6
|
-
*
|
|
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
|
-
*/
|
|
13
|
-
|
|
14
|
-
import ApiClient from '../ApiClient';
|
|
15
|
-
|
|
16
|
-
/**
|
|
17
|
-
* The MeterFilter model module.
|
|
18
|
-
* @module model/MeterFilter
|
|
19
|
-
* @version 1.0
|
|
20
|
-
*/
|
|
21
|
-
class MeterFilter {
|
|
22
|
-
/**
|
|
23
|
-
* Constructs a new <code>MeterFilter</code>.
|
|
24
|
-
* @alias module:model/MeterFilter
|
|
25
|
-
*/
|
|
26
|
-
constructor() {
|
|
27
|
-
MeterFilter.initialize(this);
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
/**
|
|
31
|
-
* Initializes the fields of this object.
|
|
32
|
-
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
|
|
33
|
-
* Only for internal use.
|
|
34
|
-
*/
|
|
35
|
-
static initialize(obj) {}
|
|
36
|
-
|
|
37
|
-
/**
|
|
38
|
-
* Constructs a <code>MeterFilter</code> from a plain JavaScript object, optionally creating a new instance.
|
|
39
|
-
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
|
|
40
|
-
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
41
|
-
* @param {module:model/MeterFilter} obj Optional instance to populate.
|
|
42
|
-
* @return {module:model/MeterFilter} The populated <code>MeterFilter</code> instance.
|
|
43
|
-
*/
|
|
44
|
-
static constructFromObject(data, obj) {
|
|
45
|
-
if (data) {
|
|
46
|
-
obj = obj || new MeterFilter();
|
|
47
|
-
if (data.hasOwnProperty('key')) {
|
|
48
|
-
obj['key'] = ApiClient.convertToType(data['key'], 'String');
|
|
49
|
-
}
|
|
50
|
-
if (data.hasOwnProperty('values')) {
|
|
51
|
-
obj['values'] = ApiClient.convertToType(data['values'], ['String']);
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
return obj;
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
/**
|
|
58
|
-
* Validates the JSON data with respect to <code>MeterFilter</code>.
|
|
59
|
-
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
60
|
-
* @return {boolean} to indicate whether the JSON data is valid with respect to <code>MeterFilter</code>.
|
|
61
|
-
*/
|
|
62
|
-
static validateJSON(data) {
|
|
63
|
-
// ensure the json data is a string
|
|
64
|
-
if (data['key'] && !(typeof data['key'] === 'string' || data['key'] instanceof String)) {
|
|
65
|
-
throw new Error("Expected the field `key` to be a primitive type in the JSON string but got " + data['key']);
|
|
66
|
-
}
|
|
67
|
-
// ensure the json data is an array
|
|
68
|
-
if (!Array.isArray(data['values'])) {
|
|
69
|
-
throw new Error("Expected the field `values` to be an array in the JSON data but got " + data['values']);
|
|
70
|
-
}
|
|
71
|
-
return true;
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
/**
|
|
76
|
-
* Key is the key for the filter from $event.properties Currently we support only first level keys in the properties and not nested keys
|
|
77
|
-
* @member {String} key
|
|
78
|
-
*/
|
|
79
|
-
MeterFilter.prototype['key'] = undefined;
|
|
80
|
-
|
|
81
|
-
/**
|
|
82
|
-
* Values are the possible values for the filter to be considered for the meter For ex \"model_name\" could have values \"o1-mini\", \"gpt-4o\" etc
|
|
83
|
-
* @member {Array.<String>} values
|
|
84
|
-
*/
|
|
85
|
-
MeterFilter.prototype['values'] = undefined;
|
|
86
|
-
export default MeterFilter;
|