@avalabs/glacier-sdk 3.1.0-canary.dbb51d6.0 → 3.1.0-canary.fade9d5.0

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/index.d.ts CHANGED
@@ -148,6 +148,78 @@ type LogsResponseDTO = {
148
148
  logs: Array<LogsFormat>;
149
149
  };
150
150
 
151
+ type RpcUsageMetricsValueAggregated = {
152
+ /**
153
+ * The total number of requests
154
+ */
155
+ totalRequests: number;
156
+ /**
157
+ * The number of API credits used
158
+ */
159
+ apiCreditsUsed: number;
160
+ /**
161
+ * The number of requests per second
162
+ */
163
+ requestsPerSecond: number;
164
+ /**
165
+ * The success rate percentage
166
+ */
167
+ successRatePercent: number;
168
+ /**
169
+ * The median response time in milliseconds
170
+ */
171
+ medianResponseTimeMsecs: number;
172
+ /**
173
+ * The number of invalid requests
174
+ */
175
+ invalidRequests: number;
176
+ /**
177
+ * Column name used for data aggregation
178
+ */
179
+ groupedBy: RpcUsageMetricsValueAggregated.groupedBy;
180
+ /**
181
+ * The value of the column used for data aggregation
182
+ */
183
+ groupValue?: (string | number);
184
+ };
185
+ declare namespace RpcUsageMetricsValueAggregated {
186
+ /**
187
+ * Column name used for data aggregation
188
+ */
189
+ enum groupedBy {
190
+ RPC_METHOD = "rpcMethod",
191
+ RESPONSE_CODE = "responseCode",
192
+ RL_BYPASS_TOKEN = "rlBypassToken",
193
+ NONE = "None"
194
+ }
195
+ }
196
+
197
+ type RpcMetrics = {
198
+ /**
199
+ * The timestamp of the metrics value
200
+ */
201
+ timestamp: number;
202
+ /**
203
+ * The metrics values for the timestamp
204
+ */
205
+ values: Array<RpcUsageMetricsValueAggregated>;
206
+ };
207
+
208
+ type RpcUsageMetricsResponseDTO = {
209
+ /**
210
+ * Duration in which the metrics value is aggregated
211
+ */
212
+ aggregateDuration: string;
213
+ /**
214
+ * ChainId for which the metrics are aggregated
215
+ */
216
+ chainId: string;
217
+ /**
218
+ * Metrics values
219
+ */
220
+ metrics: Array<RpcMetrics>;
221
+ };
222
+
151
223
  declare enum TimeIntervalGranularityExtended {
152
224
  MINUTE = "minute",
153
225
  HOURLY = "hourly",
@@ -251,17 +323,17 @@ declare class DataApiUsageMetricsService {
251
323
  * @returns UsageMetricsResponseDTO Successful response
252
324
  * @throws ApiError
253
325
  */
254
- getApiUsageMetrics({ orgId, startTimestamp, endTimestamp, timeInterval, groupBy, requestPath, requestType, responseCode, chainId, apiKeyId, }: {
326
+ getApiUsageMetrics({ orgId, startTimestamp, endTimestamp, timeInterval, groupBy, chainId, requestPath, responseCode, requestType, apiKeyId, }: {
255
327
  /**
256
328
  * Organization ID to fetch usage metrics for
257
329
  */
258
330
  orgId?: string;
259
331
  /**
260
- * Query param for retrieving items after a specific timestamp.
332
+ * The start time of the range as a UNIX timestamp. The requested start time will be rounded down to 0:00 UTC of the day.
261
333
  */
262
334
  startTimestamp?: number;
263
335
  /**
264
- * Query param for retrieving items before a specific timestamp.
336
+ * The end time of the range as a UNIX timestamp. The requested end time will be rounded down to 0:00 UTC of the day. `endTimestamp` must be no earlier than 0:00 UTC of the day after `startTimestamp`.
265
337
  */
266
338
  endTimestamp?: number;
267
339
  /**
@@ -273,21 +345,21 @@ declare class DataApiUsageMetricsService {
273
345
  */
274
346
  groupBy?: UsageMetricsGroupByEnum;
275
347
  /**
276
- * Filter data by request path.
348
+ * Filter data by chain ID.
277
349
  */
278
- requestPath?: string;
350
+ chainId?: string;
279
351
  /**
280
- * Filter data by request type.
352
+ * Filter data by request path.
281
353
  */
282
- requestType?: 'data' | 'rpc';
354
+ requestPath?: string;
283
355
  /**
284
356
  * Filter data by response status code.
285
357
  */
286
358
  responseCode?: string;
287
359
  /**
288
- * Filter data by chain ID.
360
+ * Filter data by request type.
289
361
  */
290
- chainId?: string;
362
+ requestType?: 'data' | 'rpc';
291
363
  /**
292
364
  * Filter data by API key ID.
293
365
  */
@@ -299,35 +371,35 @@ declare class DataApiUsageMetricsService {
299
371
  * @returns LogsResponseDTO Successful response
300
372
  * @throws ApiError
301
373
  */
302
- getApiLogs({ orgId, startTimestamp, endTimestamp, requestPath, requestType, responseCode, chainId, apiKeyId, pageToken, pageSize, }: {
374
+ getApiLogs({ orgId, startTimestamp, endTimestamp, chainId, requestPath, responseCode, requestType, apiKeyId, pageToken, pageSize, }: {
303
375
  /**
304
376
  * Organization ID to fetch usage metrics for
305
377
  */
306
378
  orgId?: string;
307
379
  /**
308
- * Query param for retrieving items after a specific timestamp.
380
+ * The start time of the range as a UNIX timestamp. The requested start time will be rounded down to 0:00 UTC of the day.
309
381
  */
310
382
  startTimestamp?: number;
311
383
  /**
312
- * Query param for retrieving items before a specific timestamp.
384
+ * The end time of the range as a UNIX timestamp. The requested end time will be rounded down to 0:00 UTC of the day. `endTimestamp` must be no earlier than 0:00 UTC of the day after `startTimestamp`.
313
385
  */
314
386
  endTimestamp?: number;
315
387
  /**
316
- * Filter data by request path.
388
+ * Filter data by chain ID.
317
389
  */
318
- requestPath?: string;
390
+ chainId?: string;
319
391
  /**
320
- * Filter data by request type.
392
+ * Filter data by request path.
321
393
  */
322
- requestType?: 'data' | 'rpc';
394
+ requestPath?: string;
323
395
  /**
324
396
  * Filter data by response status code.
325
397
  */
326
398
  responseCode?: string;
327
399
  /**
328
- * Filter data by chain ID.
400
+ * Filter data by request type.
329
401
  */
330
- chainId?: string;
402
+ requestType?: 'data' | 'rpc';
331
403
  /**
332
404
  * Filter data by API key ID.
333
405
  */
@@ -341,6 +413,50 @@ declare class DataApiUsageMetricsService {
341
413
  */
342
414
  pageSize?: number;
343
415
  }): CancelablePromise<LogsResponseDTO>;
416
+ /**
417
+ * Get usage metrics for the Subnet RPC
418
+ * Gets metrics for Subnet RPC usage over a specified time interval aggregated at the specified time-duration granularity.
419
+ * @returns RpcUsageMetricsResponseDTO Successful response
420
+ * @throws ApiError
421
+ */
422
+ getRpcUsageMetrics({ timeInterval, startTimestamp, endTimestamp, groupBy, chainId, requestPath, responseCode, rpcMethod, rlBypassApiToken, }: {
423
+ /**
424
+ * Query param for setting time interval of data aggregation.
425
+ */
426
+ timeInterval?: string;
427
+ /**
428
+ * The start time of the range as a UNIX timestamp. The requested start time will be rounded down to 0:00 UTC of the day.
429
+ */
430
+ startTimestamp?: number;
431
+ /**
432
+ * The end time of the range as a UNIX timestamp. The requested end time will be rounded down to 0:00 UTC of the day. `endTimestamp` must be no earlier than 0:00 UTC of the day after `startTimestamp`.
433
+ */
434
+ endTimestamp?: number;
435
+ /**
436
+ * Query param for the criterion used for grouping metrics
437
+ */
438
+ groupBy?: UsageMetricsGroupByEnum;
439
+ /**
440
+ * Filter data by chain ID.
441
+ */
442
+ chainId?: string;
443
+ /**
444
+ * Filter data by request path.
445
+ */
446
+ requestPath?: string;
447
+ /**
448
+ * Filter data by response status code.
449
+ */
450
+ responseCode?: string;
451
+ /**
452
+ * Filter data by RPC method.
453
+ */
454
+ rpcMethod?: string;
455
+ /**
456
+ * Filter data by Rl Bypass API Token.
457
+ */
458
+ rlBypassApiToken?: string;
459
+ }): CancelablePromise<RpcUsageMetricsResponseDTO>;
344
460
  }
345
461
 
346
462
  declare class DefaultService {
@@ -5180,4 +5296,4 @@ type Unauthorized = {
5180
5296
  error: string;
5181
5297
  };
5182
5298
 
5183
- export { ActiveDelegatorDetails, ActiveValidatorDetails, AddressActivityMetadata, AddressesChangeRequest, AggregatedAssetAmount, ApiError, ApiFeature, AssetAmount, AssetWithPriceInfo, BadGateway, BadRequest, BaseHttpRequest, Blockchain, BlockchainId, BlockchainIds, BlockchainInfo, BlsCredentials, CChainAtomicBalances, CChainExportTransaction, CChainImportTransaction, CChainSharedAssetBalance, CancelError, CancelablePromise, ChainAddressChainIdMap, ChainAddressChainIdMapListResponse, ChainInfo, ChainStatus, CompletedDelegatorDetails, CompletedValidatorDetails, ContractDeploymentDetails, ContractSubmissionBody, ContractSubmissionErc1155, ContractSubmissionErc20, ContractSubmissionErc721, ContractSubmissionUnknown, CreateEvmTransactionExportRequest, CreatePrimaryNetworkTransactionExportRequest, CreateWebhookRequest, CurrencyCode, DataApiUsageMetricsService, DataListChainsResponse, DefaultService, DelegationStatusType, DelegatorsDetails, DeliveredSourceNotIndexedTeleporterMessage, DeliveredTeleporterMessage, EVMInput, EVMOperationType, EVMOutput, Erc1155Contract, Erc1155Token, Erc1155TokenBalance, Erc1155TokenMetadata, Erc1155Transfer, Erc1155TransferDetails, Erc20Contract, Erc20Token, Erc20TokenBalance, Erc20Transfer, Erc20TransferDetails, Erc721Contract, Erc721Token, Erc721TokenBalance, Erc721TokenMetadata, Erc721Transfer, Erc721TransferDetails, EventType, EvmBalancesService, EvmBlock, EvmBlocksService, EvmChainsService, EvmContractsService, EvmNetworkOptions, EvmTransactionsService, Forbidden, FullNativeTransactionDetails, GetChainResponse, GetEvmBlockResponse, GetNativeBalanceResponse, GetNetworkDetailsResponse, GetPrimaryNetworkBlockResponse, GetTransactionResponse, Glacier, HealthCheckService, HistoricalReward, ImageAsset, InternalServerError, InternalTransaction, InternalTransactionDetails, InternalTransactionOpCall, ListBlockchainsResponse, ListCChainAtomicBalancesResponse, ListCChainAtomicTransactionsResponse, ListChainsResponse, ListCollectibleBalancesResponse, ListContractsResponse, ListDelegatorDetailsResponse, ListErc1155BalancesResponse, ListErc1155TransactionsResponse, ListErc20BalancesResponse, ListErc20TransactionsResponse, ListErc721BalancesResponse, ListErc721TransactionsResponse, ListEvmBlocksResponse, ListHistoricalRewardsResponse, ListInternalTransactionsResponse, ListNativeTransactionsResponse, ListNftTokens, ListPChainBalancesResponse, ListPChainTransactionsResponse, ListPChainUtxosResponse, ListPendingRewardsResponse, ListPrimaryNetworkBlocksResponse, ListSubnetsResponse, ListTeleporterMessagesResponse, ListTransactionDetailsResponse, ListTransfersResponse, ListUtxosResponse, ListValidatorDetailsResponse, ListWebhookAddressesResponse, ListWebhooksResponse, ListXChainBalancesResponse, ListXChainTransactionsResponse, ListXChainVerticesResponse, LogsFormat, LogsFormatMetadata, LogsResponseDTO, Method, Metric, Money, NativeTokenBalance, NativeTransaction, Network, NetworkToken, NetworkTokenDetails, NextPageToken, NfTsService, NftTokenMetadataStatus, NotFound, OpenAPI, OpenAPIConfig, OperationStatus, OperationStatusCode, OperationStatusResponse, OperationType, OperationsService, PChainBalance, PChainId, PChainSharedAsset, PChainTransaction, PChainTransactionType, PChainUtxo, PendingDelegatorDetails, PendingReward, PendingTeleporterMessage, PendingValidatorDetails, PricingProviders, PrimaryNetwork, PrimaryNetworkAssetCap, PrimaryNetworkAssetType, PrimaryNetworkBalancesService, PrimaryNetworkBlock, PrimaryNetworkBlocksService, PrimaryNetworkChainInfo, PrimaryNetworkChainName, PrimaryNetworkOperationType, PrimaryNetworkOptions, PrimaryNetworkRewardsService, PrimaryNetworkService, PrimaryNetworkTransactionsService, PrimaryNetworkTxType, PrimaryNetworkUtxOsService, PrimaryNetworkVerticesService, ProposerDetails, RemovedValidatorDetails, RequestType, ResourceLink, ResourceLinkType, RewardType, Rewards, RichAddress, RpcErrorDto, RpcErrorResponseDto, RpcRequestBodyDto, RpcService, RpcSuccessResponseDto, ServiceUnavailable, SharedSecretsResponse, SignatureAggregationResponse, SignatureAggregatorRequest, SignatureAggregatorService, SortByOption, SortOrder, StakingDistribution, Subnet, SubnetOwnershipInfo, TeleporterDestinationTransaction, TeleporterMessageInfo, TeleporterReceipt, TeleporterRewardDetails, TeleporterService, TeleporterSourceTransaction, TimeIntervalGranularityExtended, TooManyRequests, TransactionDetails, TransactionDirectionType, TransactionExportMetadata, TransactionMethodType, TransactionStatus, TransactionVertexDetail, Unauthorized, UnknownContract, UpdateContractResponse, UpdateWebhookRequest, UsageMetricsGroupByEnum, UsageMetricsResponseDTO, UsageMetricsValueDTO, UtilityAddresses, Utxo, UtxoCredential, UtxoType, ValidationStatusType, ValidatorHealthDetails, ValidatorsDetails, VmName, WebhookResponse, WebhookStatus, WebhookStatusType, WebhooksService, XChainAssetDetails, XChainBalances, XChainId, XChainLinearTransaction, XChainNonLinearTransaction, XChainSharedAssetBalance, XChainTransactionType, XChainVertex };
5299
+ export { ActiveDelegatorDetails, ActiveValidatorDetails, AddressActivityMetadata, AddressesChangeRequest, AggregatedAssetAmount, ApiError, ApiFeature, AssetAmount, AssetWithPriceInfo, BadGateway, BadRequest, BaseHttpRequest, Blockchain, BlockchainId, BlockchainIds, BlockchainInfo, BlsCredentials, CChainAtomicBalances, CChainExportTransaction, CChainImportTransaction, CChainSharedAssetBalance, CancelError, CancelablePromise, ChainAddressChainIdMap, ChainAddressChainIdMapListResponse, ChainInfo, ChainStatus, CompletedDelegatorDetails, CompletedValidatorDetails, ContractDeploymentDetails, ContractSubmissionBody, ContractSubmissionErc1155, ContractSubmissionErc20, ContractSubmissionErc721, ContractSubmissionUnknown, CreateEvmTransactionExportRequest, CreatePrimaryNetworkTransactionExportRequest, CreateWebhookRequest, CurrencyCode, DataApiUsageMetricsService, DataListChainsResponse, DefaultService, DelegationStatusType, DelegatorsDetails, DeliveredSourceNotIndexedTeleporterMessage, DeliveredTeleporterMessage, EVMInput, EVMOperationType, EVMOutput, Erc1155Contract, Erc1155Token, Erc1155TokenBalance, Erc1155TokenMetadata, Erc1155Transfer, Erc1155TransferDetails, Erc20Contract, Erc20Token, Erc20TokenBalance, Erc20Transfer, Erc20TransferDetails, Erc721Contract, Erc721Token, Erc721TokenBalance, Erc721TokenMetadata, Erc721Transfer, Erc721TransferDetails, EventType, EvmBalancesService, EvmBlock, EvmBlocksService, EvmChainsService, EvmContractsService, EvmNetworkOptions, EvmTransactionsService, Forbidden, FullNativeTransactionDetails, GetChainResponse, GetEvmBlockResponse, GetNativeBalanceResponse, GetNetworkDetailsResponse, GetPrimaryNetworkBlockResponse, GetTransactionResponse, Glacier, HealthCheckService, HistoricalReward, ImageAsset, InternalServerError, InternalTransaction, InternalTransactionDetails, InternalTransactionOpCall, ListBlockchainsResponse, ListCChainAtomicBalancesResponse, ListCChainAtomicTransactionsResponse, ListChainsResponse, ListCollectibleBalancesResponse, ListContractsResponse, ListDelegatorDetailsResponse, ListErc1155BalancesResponse, ListErc1155TransactionsResponse, ListErc20BalancesResponse, ListErc20TransactionsResponse, ListErc721BalancesResponse, ListErc721TransactionsResponse, ListEvmBlocksResponse, ListHistoricalRewardsResponse, ListInternalTransactionsResponse, ListNativeTransactionsResponse, ListNftTokens, ListPChainBalancesResponse, ListPChainTransactionsResponse, ListPChainUtxosResponse, ListPendingRewardsResponse, ListPrimaryNetworkBlocksResponse, ListSubnetsResponse, ListTeleporterMessagesResponse, ListTransactionDetailsResponse, ListTransfersResponse, ListUtxosResponse, ListValidatorDetailsResponse, ListWebhookAddressesResponse, ListWebhooksResponse, ListXChainBalancesResponse, ListXChainTransactionsResponse, ListXChainVerticesResponse, LogsFormat, LogsFormatMetadata, LogsResponseDTO, Method, Metric, Money, NativeTokenBalance, NativeTransaction, Network, NetworkToken, NetworkTokenDetails, NextPageToken, NfTsService, NftTokenMetadataStatus, NotFound, OpenAPI, OpenAPIConfig, OperationStatus, OperationStatusCode, OperationStatusResponse, OperationType, OperationsService, PChainBalance, PChainId, PChainSharedAsset, PChainTransaction, PChainTransactionType, PChainUtxo, PendingDelegatorDetails, PendingReward, PendingTeleporterMessage, PendingValidatorDetails, PricingProviders, PrimaryNetwork, PrimaryNetworkAssetCap, PrimaryNetworkAssetType, PrimaryNetworkBalancesService, PrimaryNetworkBlock, PrimaryNetworkBlocksService, PrimaryNetworkChainInfo, PrimaryNetworkChainName, PrimaryNetworkOperationType, PrimaryNetworkOptions, PrimaryNetworkRewardsService, PrimaryNetworkService, PrimaryNetworkTransactionsService, PrimaryNetworkTxType, PrimaryNetworkUtxOsService, PrimaryNetworkVerticesService, ProposerDetails, RemovedValidatorDetails, RequestType, ResourceLink, ResourceLinkType, RewardType, Rewards, RichAddress, RpcErrorDto, RpcErrorResponseDto, RpcMetrics, RpcRequestBodyDto, RpcService, RpcSuccessResponseDto, RpcUsageMetricsResponseDTO, RpcUsageMetricsValueAggregated, ServiceUnavailable, SharedSecretsResponse, SignatureAggregationResponse, SignatureAggregatorRequest, SignatureAggregatorService, SortByOption, SortOrder, StakingDistribution, Subnet, SubnetOwnershipInfo, TeleporterDestinationTransaction, TeleporterMessageInfo, TeleporterReceipt, TeleporterRewardDetails, TeleporterService, TeleporterSourceTransaction, TimeIntervalGranularityExtended, TooManyRequests, TransactionDetails, TransactionDirectionType, TransactionExportMetadata, TransactionMethodType, TransactionStatus, TransactionVertexDetail, Unauthorized, UnknownContract, UpdateContractResponse, UpdateWebhookRequest, UsageMetricsGroupByEnum, UsageMetricsResponseDTO, UsageMetricsValueDTO, UtilityAddresses, Utxo, UtxoCredential, UtxoType, ValidationStatusType, ValidatorHealthDetails, ValidatorsDetails, VmName, WebhookResponse, WebhookStatus, WebhookStatusType, WebhooksService, XChainAssetDetails, XChainBalances, XChainId, XChainLinearTransaction, XChainNonLinearTransaction, XChainSharedAssetBalance, XChainTransactionType, XChainVertex };