diff --git a/CHANGELOG.md b/CHANGELOG.md index 02cef65..eb7b5fe 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,16 @@ # Changelog +## 0.5.0 + +FEATURES: + +* `quicknode_endpoint_rate_limits` gains `limit_by_ip`, the dashboard's "Limit by IP + address" setting. Left out of the configuration, it keeps the endpoint's current + value. Destroying the resource turns it off. +* `quicknode_endpoint_method_rate_limit` gains `limit_by_ip`. It defaults to `false`, + so a limiter set to count per IP outside Terraform plans a change back to `false` + unless the configuration sets it. + ## 0.4.0 FEATURES: diff --git a/api/admin/admin.gen.go b/api/admin/admin.gen.go index 3453b8b..b4f2aed 100644 --- a/api/admin/admin.gen.go +++ b/api/admin/admin.gen.go @@ -16,6 +16,33 @@ import ( "github.com/oapi-codegen/runtime" ) +// PostV0ActivityLogsParams defines parameters for PostV0ActivityLogs. +type PostV0ActivityLogsParams struct { + // Q Search entry descriptions, endpoint subdomains, and team names. Case-insensitive. + Q *string `form:"q,omitempty" json:"q,omitempty"` + + // Actor Only entries made by this user or API key. Use an id from /v0/activity_logs/filters. + Actor *string `form:"actor,omitempty" json:"actor,omitempty"` + + // Type Only entries about this kind of thing: endpoint, team, member, role, billing, add_on, or api_key. + Type *string `form:"type,omitempty" json:"type,omitempty"` + + // EndpointId Only entries about this endpoint, by endpoint ID. + EndpointId *string `form:"endpoint_id,omitempty" json:"endpoint_id,omitempty"` + + // From Only entries at or after this time. ISO 8601 date or date-time. + From *string `form:"from,omitempty" json:"from,omitempty"` + + // To Only entries at or before this time. ISO 8601 date or date-time. + To *string `form:"to,omitempty" json:"to,omitempty"` + + // Limit Page size. Defaults to 20, maximum 100; larger values return 100. + Limit *int `form:"limit,omitempty" json:"limit,omitempty"` + + // Offset Number of entries to skip. Defaults to 0. + Offset *int `form:"offset,omitempty" json:"offset,omitempty"` +} + // GetV0EndpointsParams defines parameters for GetV0Endpoints. type GetV0EndpointsParams struct { // Limit Specifies the maximum number of endpoints to retrieve in the response. The default value is set to 20 @@ -138,6 +165,9 @@ type PostV0EndpointsByIdMethodRateLimitsJSONBody struct { // Interval Specifies the time interval for the rate limit; valid values include second, minute or hour Interval string `json:"interval"` + // LimitByIp Set to true to apply the rate separately to each client IP. Set to false or omit this field to apply the rate to the endpoint as a whole (the existing behavior). + LimitByIp *bool `json:"limit_by_ip,omitempty"` + // Methods An array of method names to which the rate limiter applies Methods []string `json:"methods"` @@ -147,14 +177,17 @@ type PostV0EndpointsByIdMethodRateLimitsJSONBody struct { // PatchV0EndpointsByIdMethodRateLimitsByMethodRateLimitIdJSONBody defines parameters for PatchV0EndpointsByIdMethodRateLimitsByMethodRateLimitId. type PatchV0EndpointsByIdMethodRateLimitsByMethodRateLimitIdJSONBody struct { + // LimitByIp Set to true to apply the rate separately to each client IP, or false to apply it to the endpoint as a whole. Omit this field to keep the current setting. This can be the only field in the request. + LimitByIp *bool `json:"limit_by_ip,omitempty"` + // Methods An array of method names to which the rate limiter applies - Methods []string `json:"methods"` + Methods *[]string `json:"methods,omitempty"` // Rate Specifies the maximum number of requests allowed for the specified methods within the defined interval - Rate int `json:"rate"` + Rate *int `json:"rate,omitempty"` // Status The current status of the rate limiter; valid values include enabled or disabled - Status string `json:"status"` + Status *string `json:"status,omitempty"` } // GetV0EndpointsByIdMetricsParams defines parameters for GetV0EndpointsByIdMetrics. @@ -169,10 +202,37 @@ type GetV0EndpointsByIdMetricsParams struct { Percentile *int `form:"percentile,omitempty" json:"percentile,omitempty"` } +// PostV0EndpointsByIdMetricsErrorsSummaryParams defines parameters for PostV0EndpointsByIdMetricsErrorsSummary. +type PostV0EndpointsByIdMetricsErrorsSummaryParams struct { + // From ISO 8601 start time. Required together with to when last is omitted. + From *string `form:"from,omitempty" json:"from,omitempty"` + + // To ISO 8601 end time. Required together with from when last is omitted. + To *string `form:"to,omitempty" json:"to,omitempty"` + + // Last Relative time window instead of from and to; for example, 1h for the last hour. + Last *string `form:"last,omitempty" json:"last,omitempty"` + + // GroupBy Repeat this query parameter for grouping dimensions: method. Method grouping requires kind=rpc. + GroupBy *[]interface{} `form:"group_by[],omitempty" json:"group_by[],omitempty"` + + // Kind Filter errors to rpc or http. Omit to include both. Use rpc when grouping by method. + Kind *string `form:"kind,omitempty" json:"kind,omitempty"` + + // Limit Positive maximum number of results per page; for example, 2. + Limit *int `form:"limit,omitempty" json:"limit,omitempty"` + + // Cursor Opaque next_cursor from the previous response. Keep the same time range, filters, grouping, and limit when requesting subsequent pages. + Cursor *string `form:"cursor,omitempty" json:"cursor,omitempty"` +} + // PatchV0EndpointsByIdRateLimitsJSONBody defines parameters for PatchV0EndpointsByIdRateLimits. type PatchV0EndpointsByIdRateLimitsJSONBody struct { - // RateLimits Contains the rate limit configurations that you want to update - RateLimits struct { + // LimitByIp Set to true to apply the endpoint rate limits to each client IP address, or false to apply them to the endpoint as a whole. Omit to keep the current setting + LimitByIp *bool `json:"limit_by_ip,omitempty"` + + // RateLimits Contains the rate limit configurations that you want to update. Required unless limit_by_ip is present + RateLimits *struct { // Rpd Specifies the maximum number of requests allowed per day Rpd *int `json:"rpd,omitempty"` @@ -181,7 +241,7 @@ type PatchV0EndpointsByIdRateLimitsJSONBody struct { // Rps Specifies the maximum number of requests allowed per second Rps *int `json:"rps,omitempty"` - } `json:"rate_limits"` + } `json:"rate_limits,omitempty"` } // PostV0EndpointsByIdSecurityDomainMasksJSONBody defines parameters for PostV0EndpointsByIdSecurityDomainMasks. @@ -274,6 +334,51 @@ type GetV0MetricsParams struct { Metric string `form:"metric" json:"metric"` } +// PostV0MetricsErrorsSummaryParams defines parameters for PostV0MetricsErrorsSummary. +type PostV0MetricsErrorsSummaryParams struct { + // From ISO 8601 start time. Required together with to when last is omitted. + From *string `form:"from,omitempty" json:"from,omitempty"` + + // To ISO 8601 end time. Required together with from when last is omitted. + To *string `form:"to,omitempty" json:"to,omitempty"` + + // Last Relative time window instead of from and to; for example, 1h for the last hour. + Last *string `form:"last,omitempty" json:"last,omitempty"` + + // GroupBy Repeat this query parameter for grouping dimensions: method. Method grouping requires kind=rpc. + GroupBy *[]interface{} `form:"group_by[],omitempty" json:"group_by[],omitempty"` + + // Kind Filter errors to rpc or http. Omit to include both. Use rpc when grouping by method. + Kind *string `form:"kind,omitempty" json:"kind,omitempty"` + + // Limit Positive maximum number of results per page; for example, 2. + Limit *int `form:"limit,omitempty" json:"limit,omitempty"` + + // Cursor Opaque next_cursor from the previous response. Keep the same time range, filters, grouping, and limit when requesting subsequent pages. + Cursor *string `form:"cursor,omitempty" json:"cursor,omitempty"` +} + +// PostV0MetricsTrafficSummaryParams defines parameters for PostV0MetricsTrafficSummary. +type PostV0MetricsTrafficSummaryParams struct { + // From ISO 8601 start time. Required together with to when last is omitted. + From *string `form:"from,omitempty" json:"from,omitempty"` + + // To ISO 8601 end time. Required together with from when last is omitted. + To *string `form:"to,omitempty" json:"to,omitempty"` + + // Last Relative time window instead of from and to; for example, 1h for the last hour. + Last *string `form:"last,omitempty" json:"last,omitempty"` + + // GroupBy Repeat this query parameter for grouping dimensions: method, endpoint. Omit it to return totals without a breakdown. + GroupBy *[]interface{} `form:"group_by[],omitempty" json:"group_by[],omitempty"` + + // Limit Positive maximum number of results per page; for example, 2. + Limit *int `form:"limit,omitempty" json:"limit,omitempty"` + + // Cursor Opaque next_cursor from the previous response. Keep the same time range, filters, grouping, and limit when requesting subsequent pages. + Cursor *string `form:"cursor,omitempty" json:"cursor,omitempty"` +} + // PostV0TeamsJSONBody defines parameters for PostV0Teams. type PostV0TeamsJSONBody struct { // Name The name for the new team @@ -304,6 +409,45 @@ type PatchV0ToolingAccessJSONBody struct { Enabled bool `json:"enabled"` } +// PostV0TransactionsParams defines parameters for PostV0Transactions. +type PostV0TransactionsParams struct { + // From ISO 8601 start time. Required together with to when last is omitted. + From *string `form:"from,omitempty" json:"from,omitempty"` + + // To ISO 8601 end time. Required together with from when last is omitted. + To *string `form:"to,omitempty" json:"to,omitempty"` + + // Last Relative time window instead of from and to; for example, 1h for the last hour. + Last *string `form:"last,omitempty" json:"last,omitempty"` + + // Limit Positive maximum number of results per page; for example, 2. + Limit *int `form:"limit,omitempty" json:"limit,omitempty"` + + // Cursor Opaque next_cursor from the previous response. Keep the same time range, filters, grouping, and limit when requesting subsequent pages. + Cursor *string `form:"cursor,omitempty" json:"cursor,omitempty"` + + // Network Filter submissions by network identifier, such as robinhood-testnet. + Network *string `form:"network,omitempty" json:"network,omitempty"` +} + +// PostV0TransactionsByNetworkByHashParams defines parameters for PostV0TransactionsByNetworkByHash. +type PostV0TransactionsByNetworkByHashParams struct { + // IncludePayloads Set to true to include available request/response payload strings. Payloads are omitted when this parameter is not supplied. + IncludePayloads *bool `form:"include_payloads,omitempty" json:"include_payloads,omitempty"` +} + +// PostV0UsageCreditsSummaryParams defines parameters for PostV0UsageCreditsSummary. +type PostV0UsageCreditsSummaryParams struct { + // From ISO 8601 start time. Required together with to when last is omitted. + From *string `form:"from,omitempty" json:"from,omitempty"` + + // To ISO 8601 end time. Required together with from when last is omitted. + To *string `form:"to,omitempty" json:"to,omitempty"` + + // Last Relative time window instead of from and to; for example, 1h for the last hour. + Last *string `form:"last,omitempty" json:"last,omitempty"` +} + // GetV0UsageRpcParams defines parameters for GetV0UsageRpc. type GetV0UsageRpcParams struct { // StartTime Specifies the start of the time period for which the usage data is to be retrieved @@ -349,6 +493,69 @@ type GetV0UsageRpcByTagParams struct { EndTime *int `form:"end_time,omitempty" json:"end_time,omitempty"` } +// PostV0UsageRpcSummaryParams defines parameters for PostV0UsageRpcSummary. +type PostV0UsageRpcSummaryParams struct { + // From ISO 8601 start time. Required together with to when last is omitted. + From *string `form:"from,omitempty" json:"from,omitempty"` + + // To ISO 8601 end time. Required together with from when last is omitted. + To *string `form:"to,omitempty" json:"to,omitempty"` + + // Last Relative time window instead of from and to; for example, 1h for the last hour. + Last *string `form:"last,omitempty" json:"last,omitempty"` + + // GroupBy Repeat this query parameter for grouping dimensions: method, network, endpoint. Omit it to return totals without a breakdown. + GroupBy *[]interface{} `form:"group_by[],omitempty" json:"group_by[],omitempty"` + + // Limit Positive maximum number of results per page; for example, 2. + Limit *int `form:"limit,omitempty" json:"limit,omitempty"` + + // Cursor Opaque next_cursor from the previous response. Keep the same time range, filters, grouping, and limit when requesting subsequent pages. + Cursor *string `form:"cursor,omitempty" json:"cursor,omitempty"` +} + +// PostV0UsageStreamsSummaryParams defines parameters for PostV0UsageStreamsSummary. +type PostV0UsageStreamsSummaryParams struct { + // From ISO 8601 start time. Required together with to when last is omitted. + From *string `form:"from,omitempty" json:"from,omitempty"` + + // To ISO 8601 end time. Required together with from when last is omitted. + To *string `form:"to,omitempty" json:"to,omitempty"` + + // Last Relative time window instead of from and to; for example, 1h for the last hour. + Last *string `form:"last,omitempty" json:"last,omitempty"` + + // GroupBy Repeat this query parameter for grouping dimensions: stream. Omit it to return totals without a breakdown. + GroupBy *[]interface{} `form:"group_by[],omitempty" json:"group_by[],omitempty"` + + // Limit Positive maximum number of results per page; for example, 2. + Limit *int `form:"limit,omitempty" json:"limit,omitempty"` + + // Cursor Opaque next_cursor from the previous response. Keep the same time range, filters, grouping, and limit when requesting subsequent pages. + Cursor *string `form:"cursor,omitempty" json:"cursor,omitempty"` +} + +// PostV0UsageWebhooksSummaryParams defines parameters for PostV0UsageWebhooksSummary. +type PostV0UsageWebhooksSummaryParams struct { + // From ISO 8601 start time. Required together with to when last is omitted. + From *string `form:"from,omitempty" json:"from,omitempty"` + + // To ISO 8601 end time. Required together with from when last is omitted. + To *string `form:"to,omitempty" json:"to,omitempty"` + + // Last Relative time window instead of from and to; for example, 1h for the last hour. + Last *string `form:"last,omitempty" json:"last,omitempty"` + + // GroupBy Repeat this query parameter for grouping dimensions: webhook. Omit it to return totals without a breakdown. + GroupBy *[]interface{} `form:"group_by[],omitempty" json:"group_by[],omitempty"` + + // Limit Positive maximum number of results per page; for example, 2. + Limit *int `form:"limit,omitempty" json:"limit,omitempty"` + + // Cursor Opaque next_cursor from the previous response. Keep the same time range, filters, grouping, and limit when requesting subsequent pages. + Cursor *string `form:"cursor,omitempty" json:"cursor,omitempty"` +} + // PostV0EndpointsJSONRequestBody defines body for PostV0Endpoints for application/json ContentType. type PostV0EndpointsJSONRequestBody PostV0EndpointsJSONBody @@ -497,6 +704,21 @@ type ClientInterface interface { // Corresponds with GET /v0/account/info (the `GetV0AccountInfo` operationId). GetV0AccountInfo(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) + // PostV0ActivityLogs Returns activity log entries, newest first, with filters and pagination. + // + // Corresponds with POST /v0/activity_logs (the `PostV0ActivityLogs` operationId). + PostV0ActivityLogs(ctx context.Context, params *PostV0ActivityLogsParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetV0ActivityLogsFilters Returns the actors and types you can filter by when listing activity log entries. + // + // Corresponds with GET /v0/activity_logs/filters (the `GetV0ActivityLogsFilters` operationId). + GetV0ActivityLogsFilters(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetV0ActivityLogsById Returns a single activity log entry by ID. + // + // Corresponds with GET /v0/activity_logs/{id} (the `GetV0ActivityLogsById` operationId). + GetV0ActivityLogsById(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*http.Response, error) + // GetV0ApiCreditsByChain Returns the API credit cost of each RPC method available on a chain. // // Returns the API credit cost of each RPC method available on a chain. Credit costs are calculated using the account's billing version. @@ -689,19 +911,19 @@ type ClientInterface interface { // Corresponds with GET /v0/endpoints/{id}/logs (the `GetV0EndpointsByIdLogs` operationId). GetV0EndpointsByIdLogs(ctx context.Context, id string, params *GetV0EndpointsByIdLogsParams, reqEditors ...RequestEditorFn) (*http.Response, error) - // GetV0EndpointsByIdMethodRateLimits Gets method rate limits. + // GetV0EndpointsByIdMethodRateLimits Lists method rate limits, including whether each limit applies per client IP or to the endpoint as a whole. // // Corresponds with GET /v0/endpoints/{id}/method-rate-limits (the `GetV0EndpointsByIdMethodRateLimits` operationId). GetV0EndpointsByIdMethodRateLimits(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*http.Response, error) - // PostV0EndpointsByIdMethodRateLimitsWithBody Creates a method rate limit. + // PostV0EndpointsByIdMethodRateLimitsWithBody Creates a method rate limit per client IP or for the endpoint as a whole. // // Takes any type of body and a specified content type. // // Corresponds with POST /v0/endpoints/{id}/method-rate-limits (the `PostV0EndpointsByIdMethodRateLimits` operationId). PostV0EndpointsByIdMethodRateLimitsWithBody(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - // PostV0EndpointsByIdMethodRateLimits Creates a method rate limit. + // PostV0EndpointsByIdMethodRateLimits Creates a method rate limit per client IP or for the endpoint as a whole. // // Takes a body of the `application/json` content type. // @@ -715,6 +937,8 @@ type ClientInterface interface { // PatchV0EndpointsByIdMethodRateLimitsByMethodRateLimitIdWithBody Updates a method rate limit. // + // Updates a method rate limit. Send only the fields to change; omitted fields retain their current values. + // // Takes any type of body and a specified content type. // // Corresponds with PATCH /v0/endpoints/{id}/method-rate-limits/{method_rate_limit_id} (the `PatchV0EndpointsByIdMethodRateLimitsByMethodRateLimitId` operationId). @@ -722,6 +946,8 @@ type ClientInterface interface { // PatchV0EndpointsByIdMethodRateLimitsByMethodRateLimitId Updates a method rate limit. // + // Updates a method rate limit. Send only the fields to change; omitted fields retain their current values. + // // Takes a body of the `application/json` content type. // // Corresponds with PATCH /v0/endpoints/{id}/method-rate-limits/{method_rate_limit_id} (the `PatchV0EndpointsByIdMethodRateLimitsByMethodRateLimitId` operationId). @@ -732,6 +958,11 @@ type ClientInterface interface { // Corresponds with GET /v0/endpoints/{id}/metrics (the `GetV0EndpointsByIdMetrics` operationId). GetV0EndpointsByIdMetrics(ctx context.Context, id string, params *GetV0EndpointsByIdMetricsParams, reqEditors ...RequestEditorFn) (*http.Response, error) + // PostV0EndpointsByIdMetricsErrorsSummary Returns RPC and HTTP error counts for one endpoint for a time range. + // + // Corresponds with POST /v0/endpoints/{id}/metrics/errors/summary (the `PostV0EndpointsByIdMetricsErrorsSummary` operationId). + PostV0EndpointsByIdMetricsErrorsSummary(ctx context.Context, id string, params *PostV0EndpointsByIdMetricsErrorsSummaryParams, reqEditors ...RequestEditorFn) (*http.Response, error) + // GetV0EndpointsByIdRateLimits Gets endpoint rate limits. // // Gets endpoint rate limits. The response returns an array with the source for each rate limit, including plan defaults and user-set overrides. @@ -741,7 +972,7 @@ type ClientInterface interface { // PatchV0EndpointsByIdRateLimitsWithBody Updates endpoint rate limits. // - // Updates endpoint rate limits. Only rate limits specified in the payload are updated; omitted rate limits remain unchanged. The response returns the effective endpoint-level limits as a flat limits object. + // Updates endpoint rate limits. Only rate limits specified in the payload are updated; omitted rate limits remain unchanged. Set limit_by_ip to apply the endpoint rate limits to each client IP address. The response returns the effective endpoint-level limits as a flat limits object. // // Takes any type of body and a specified content type. // @@ -750,7 +981,7 @@ type ClientInterface interface { // PatchV0EndpointsByIdRateLimits Updates endpoint rate limits. // - // Updates endpoint rate limits. Only rate limits specified in the payload are updated; omitted rate limits remain unchanged. The response returns the effective endpoint-level limits as a flat limits object. + // Updates endpoint rate limits. Only rate limits specified in the payload are updated; omitted rate limits remain unchanged. Set limit_by_ip to apply the endpoint rate limits to each client IP address. The response returns the effective endpoint-level limits as a flat limits object. // // Takes a body of the `application/json` content type. // @@ -957,6 +1188,16 @@ type ClientInterface interface { // Corresponds with GET /v0/metrics (the `GetV0Metrics` operationId). GetV0Metrics(ctx context.Context, params *GetV0MetricsParams, reqEditors ...RequestEditorFn) (*http.Response, error) + // PostV0MetricsErrorsSummary Returns account RPC and HTTP error counts for a time range. + // + // Corresponds with POST /v0/metrics/errors/summary (the `PostV0MetricsErrorsSummary` operationId). + PostV0MetricsErrorsSummary(ctx context.Context, params *PostV0MetricsErrorsSummaryParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // PostV0MetricsTrafficSummary Returns successful requests, transferred bytes, credits, and distinct active methods for a time range. + // + // Corresponds with POST /v0/metrics/traffic/summary (the `PostV0MetricsTrafficSummary` operationId). + PostV0MetricsTrafficSummary(ctx context.Context, params *PostV0MetricsTrafficSummaryParams, reqEditors ...RequestEditorFn) (*http.Response, error) + // GetV0Teams Retrieves a list of all teams. // // Corresponds with GET /v0/teams (the `GetV0Teams` operationId). @@ -1061,6 +1302,21 @@ type ClientInterface interface { // Corresponds with POST /v0/tooling-access/token (the `PostV0ToolingAccessToken` operationId). PostV0ToolingAccessToken(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) + // PostV0Transactions Lists account transaction submissions for a time range, with cursor pagination. + // + // Corresponds with POST /v0/transactions (the `PostV0Transactions` operationId). + PostV0Transactions(ctx context.Context, params *PostV0TransactionsParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // PostV0TransactionsByNetworkByHash Returns recorded submission attempts for a transaction, optionally including request and response payloads. + // + // Corresponds with POST /v0/transactions/{network}/{hash} (the `PostV0TransactionsByNetworkByHash` operationId). + PostV0TransactionsByNetworkByHash(ctx context.Context, network string, hash string, params *PostV0TransactionsByNetworkByHashParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // PostV0UsageCreditsSummary Returns total account API credits for a time range. + // + // Corresponds with POST /v0/usage/credits/summary (the `PostV0UsageCreditsSummary` operationId). + PostV0UsageCreditsSummary(ctx context.Context, params *PostV0UsageCreditsSummaryParams, reqEditors ...RequestEditorFn) (*http.Response, error) + // GetV0UsageRpc Retrieves usage total for specified time range. // // Corresponds with GET /v0/usage/rpc (the `GetV0UsageRpc` operationId). @@ -1087,6 +1343,21 @@ type ClientInterface interface { // // Corresponds with GET /v0/usage/rpc/by-tag (the `GetV0UsageRpcByTag` operationId). GetV0UsageRpcByTag(ctx context.Context, params *GetV0UsageRpcByTagParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // PostV0UsageRpcSummary Returns account RPC requests, transferred bytes, and credits for a time range. + // + // Corresponds with POST /v0/usage/rpc/summary (the `PostV0UsageRpcSummary` operationId). + PostV0UsageRpcSummary(ctx context.Context, params *PostV0UsageRpcSummaryParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // PostV0UsageStreamsSummary Returns Streams blocks, transferred bytes, and block credits for a time range. + // + // Corresponds with POST /v0/usage/streams/summary (the `PostV0UsageStreamsSummary` operationId). + PostV0UsageStreamsSummary(ctx context.Context, params *PostV0UsageStreamsSummaryParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // PostV0UsageWebhooksSummary Returns Webhooks deliveries and credits for a time range. + // + // Corresponds with POST /v0/usage/webhooks/summary (the `PostV0UsageWebhooksSummary` operationId). + PostV0UsageWebhooksSummary(ctx context.Context, params *PostV0UsageWebhooksSummaryParams, reqEditors ...RequestEditorFn) (*http.Response, error) } // GetV0AccountInfo Returns information about the account associated with the API key. @@ -1104,6 +1375,51 @@ func (c *Client) GetV0AccountInfo(ctx context.Context, reqEditors ...RequestEdit return c.Client.Do(req) } +// PostV0ActivityLogs Returns activity log entries, newest first, with filters and pagination. +// +// Corresponds with POST /v0/activity_logs (the `PostV0ActivityLogs` operationId). +func (c *Client) PostV0ActivityLogs(ctx context.Context, params *PostV0ActivityLogsParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostV0ActivityLogsRequest(c.Server, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +// GetV0ActivityLogsFilters Returns the actors and types you can filter by when listing activity log entries. +// +// Corresponds with GET /v0/activity_logs/filters (the `GetV0ActivityLogsFilters` operationId). +func (c *Client) GetV0ActivityLogsFilters(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetV0ActivityLogsFiltersRequest(c.Server) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +// GetV0ActivityLogsById Returns a single activity log entry by ID. +// +// Corresponds with GET /v0/activity_logs/{id} (the `GetV0ActivityLogsById` operationId). +func (c *Client) GetV0ActivityLogsById(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetV0ActivityLogsByIdRequest(c.Server, id) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + // GetV0ApiCreditsByChain Returns the API credit cost of each RPC method available on a chain. // // Returns the API credit cost of each RPC method available on a chain. Credit costs are calculated using the account's billing version. @@ -1576,7 +1892,7 @@ func (c *Client) GetV0EndpointsByIdLogs(ctx context.Context, id string, params * return c.Client.Do(req) } -// GetV0EndpointsByIdMethodRateLimits Gets method rate limits. +// GetV0EndpointsByIdMethodRateLimits Lists method rate limits, including whether each limit applies per client IP or to the endpoint as a whole. // // Corresponds with GET /v0/endpoints/{id}/method-rate-limits (the `GetV0EndpointsByIdMethodRateLimits` operationId). func (c *Client) GetV0EndpointsByIdMethodRateLimits(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*http.Response, error) { @@ -1591,7 +1907,7 @@ func (c *Client) GetV0EndpointsByIdMethodRateLimits(ctx context.Context, id stri return c.Client.Do(req) } -// PostV0EndpointsByIdMethodRateLimitsWithBody Creates a method rate limit. +// PostV0EndpointsByIdMethodRateLimitsWithBody Creates a method rate limit per client IP or for the endpoint as a whole. // // Takes any type of body and a specified content type. // @@ -1608,7 +1924,7 @@ func (c *Client) PostV0EndpointsByIdMethodRateLimitsWithBody(ctx context.Context return c.Client.Do(req) } -// PostV0EndpointsByIdMethodRateLimits Creates a method rate limit. +// PostV0EndpointsByIdMethodRateLimits Creates a method rate limit per client IP or for the endpoint as a whole. // // Takes a body of the `application/json` content type. // @@ -1642,6 +1958,8 @@ func (c *Client) DeleteV0EndpointsByIdMethodRateLimitsByMethodRateLimitId(ctx co // PatchV0EndpointsByIdMethodRateLimitsByMethodRateLimitIdWithBody Updates a method rate limit. // +// Updates a method rate limit. Send only the fields to change; omitted fields retain their current values. +// // Takes any type of body and a specified content type. // // Corresponds with PATCH /v0/endpoints/{id}/method-rate-limits/{method_rate_limit_id} (the `PatchV0EndpointsByIdMethodRateLimitsByMethodRateLimitId` operationId). @@ -1659,6 +1977,8 @@ func (c *Client) PatchV0EndpointsByIdMethodRateLimitsByMethodRateLimitIdWithBody // PatchV0EndpointsByIdMethodRateLimitsByMethodRateLimitId Updates a method rate limit. // +// Updates a method rate limit. Send only the fields to change; omitted fields retain their current values. +// // Takes a body of the `application/json` content type. // // Corresponds with PATCH /v0/endpoints/{id}/method-rate-limits/{method_rate_limit_id} (the `PatchV0EndpointsByIdMethodRateLimitsByMethodRateLimitId` operationId). @@ -1689,6 +2009,21 @@ func (c *Client) GetV0EndpointsByIdMetrics(ctx context.Context, id string, param return c.Client.Do(req) } +// PostV0EndpointsByIdMetricsErrorsSummary Returns RPC and HTTP error counts for one endpoint for a time range. +// +// Corresponds with POST /v0/endpoints/{id}/metrics/errors/summary (the `PostV0EndpointsByIdMetricsErrorsSummary` operationId). +func (c *Client) PostV0EndpointsByIdMetricsErrorsSummary(ctx context.Context, id string, params *PostV0EndpointsByIdMetricsErrorsSummaryParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostV0EndpointsByIdMetricsErrorsSummaryRequest(c.Server, id, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + // GetV0EndpointsByIdRateLimits Gets endpoint rate limits. // // Gets endpoint rate limits. The response returns an array with the source for each rate limit, including plan defaults and user-set overrides. @@ -1708,7 +2043,7 @@ func (c *Client) GetV0EndpointsByIdRateLimits(ctx context.Context, id string, re // PatchV0EndpointsByIdRateLimitsWithBody Updates endpoint rate limits. // -// Updates endpoint rate limits. Only rate limits specified in the payload are updated; omitted rate limits remain unchanged. The response returns the effective endpoint-level limits as a flat limits object. +// Updates endpoint rate limits. Only rate limits specified in the payload are updated; omitted rate limits remain unchanged. Set limit_by_ip to apply the endpoint rate limits to each client IP address. The response returns the effective endpoint-level limits as a flat limits object. // // Takes any type of body and a specified content type. // @@ -1727,7 +2062,7 @@ func (c *Client) PatchV0EndpointsByIdRateLimitsWithBody(ctx context.Context, id // PatchV0EndpointsByIdRateLimits Updates endpoint rate limits. // -// Updates endpoint rate limits. Only rate limits specified in the payload are updated; omitted rate limits remain unchanged. The response returns the effective endpoint-level limits as a flat limits object. +// Updates endpoint rate limits. Only rate limits specified in the payload are updated; omitted rate limits remain unchanged. Set limit_by_ip to apply the endpoint rate limits to each client IP address. The response returns the effective endpoint-level limits as a flat limits object. // // Takes a body of the `application/json` content type. // @@ -2264,6 +2599,36 @@ func (c *Client) GetV0Metrics(ctx context.Context, params *GetV0MetricsParams, r return c.Client.Do(req) } +// PostV0MetricsErrorsSummary Returns account RPC and HTTP error counts for a time range. +// +// Corresponds with POST /v0/metrics/errors/summary (the `PostV0MetricsErrorsSummary` operationId). +func (c *Client) PostV0MetricsErrorsSummary(ctx context.Context, params *PostV0MetricsErrorsSummaryParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostV0MetricsErrorsSummaryRequest(c.Server, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +// PostV0MetricsTrafficSummary Returns successful requests, transferred bytes, credits, and distinct active methods for a time range. +// +// Corresponds with POST /v0/metrics/traffic/summary (the `PostV0MetricsTrafficSummary` operationId). +func (c *Client) PostV0MetricsTrafficSummary(ctx context.Context, params *PostV0MetricsTrafficSummaryParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostV0MetricsTrafficSummaryRequest(c.Server, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + // GetV0Teams Retrieves a list of all teams. // // Corresponds with GET /v0/teams (the `GetV0Teams` operationId). @@ -2528,6 +2893,51 @@ func (c *Client) PostV0ToolingAccessToken(ctx context.Context, reqEditors ...Req return c.Client.Do(req) } +// PostV0Transactions Lists account transaction submissions for a time range, with cursor pagination. +// +// Corresponds with POST /v0/transactions (the `PostV0Transactions` operationId). +func (c *Client) PostV0Transactions(ctx context.Context, params *PostV0TransactionsParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostV0TransactionsRequest(c.Server, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +// PostV0TransactionsByNetworkByHash Returns recorded submission attempts for a transaction, optionally including request and response payloads. +// +// Corresponds with POST /v0/transactions/{network}/{hash} (the `PostV0TransactionsByNetworkByHash` operationId). +func (c *Client) PostV0TransactionsByNetworkByHash(ctx context.Context, network string, hash string, params *PostV0TransactionsByNetworkByHashParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostV0TransactionsByNetworkByHashRequest(c.Server, network, hash, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +// PostV0UsageCreditsSummary Returns total account API credits for a time range. +// +// Corresponds with POST /v0/usage/credits/summary (the `PostV0UsageCreditsSummary` operationId). +func (c *Client) PostV0UsageCreditsSummary(ctx context.Context, params *PostV0UsageCreditsSummaryParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostV0UsageCreditsSummaryRequest(c.Server, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + // GetV0UsageRpc Retrieves usage total for specified time range. // // Corresponds with GET /v0/usage/rpc (the `GetV0UsageRpc` operationId). @@ -2605,50 +3015,61 @@ func (c *Client) GetV0UsageRpcByTag(ctx context.Context, params *GetV0UsageRpcBy return c.Client.Do(req) } -// NewGetV0AccountInfoRequest constructs an http.Request for the GetV0AccountInfo method -func NewGetV0AccountInfoRequest(server string) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) +// PostV0UsageRpcSummary Returns account RPC requests, transferred bytes, and credits for a time range. +// +// Corresponds with POST /v0/usage/rpc/summary (the `PostV0UsageRpcSummary` operationId). +func (c *Client) PostV0UsageRpcSummary(ctx context.Context, params *PostV0UsageRpcSummaryParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostV0UsageRpcSummaryRequest(c.Server, params) if err != nil { return nil, err } - - operationPath := fmt.Sprintf("/v0/account/info") - if operationPath[0] == '/' { - operationPath = "." + operationPath + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err } + return c.Client.Do(req) +} - queryURL, err := serverURL.Parse(operationPath) +// PostV0UsageStreamsSummary Returns Streams blocks, transferred bytes, and block credits for a time range. +// +// Corresponds with POST /v0/usage/streams/summary (the `PostV0UsageStreamsSummary` operationId). +func (c *Client) PostV0UsageStreamsSummary(ctx context.Context, params *PostV0UsageStreamsSummaryParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostV0UsageStreamsSummaryRequest(c.Server, params) if err != nil { return nil, err } - - req, err := http.NewRequest(http.MethodGet, queryURL.String(), nil) - if err != nil { + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { return nil, err } - - return req, nil + return c.Client.Do(req) } -// NewGetV0ApiCreditsByChainRequest constructs an http.Request for the GetV0ApiCreditsByChain method -func NewGetV0ApiCreditsByChainRequest(server string, chain string) (*http.Request, error) { - var err error - - var pathParam0 string - - pathParam0, err = runtime.StyleParamWithOptions("simple", false, "chain", chain, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: ""}) +// PostV0UsageWebhooksSummary Returns Webhooks deliveries and credits for a time range. +// +// Corresponds with POST /v0/usage/webhooks/summary (the `PostV0UsageWebhooksSummary` operationId). +func (c *Client) PostV0UsageWebhooksSummary(ctx context.Context, params *PostV0UsageWebhooksSummaryParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostV0UsageWebhooksSummaryRequest(c.Server, params) if err != nil { return nil, err } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +// NewGetV0AccountInfoRequest constructs an http.Request for the GetV0AccountInfo method +func NewGetV0AccountInfoRequest(server string) (*http.Request, error) { + var err error serverURL, err := url.Parse(server) if err != nil { return nil, err } - operationPath := fmt.Sprintf("/v0/api-credits/%s", pathParam0) + operationPath := fmt.Sprintf("/v0/account/info") if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -2666,8 +3087,8 @@ func NewGetV0ApiCreditsByChainRequest(server string, chain string) (*http.Reques return req, nil } -// NewGetV0BillingInvoicesRequest constructs an http.Request for the GetV0BillingInvoices method -func NewGetV0BillingInvoicesRequest(server string) (*http.Request, error) { +// NewPostV0ActivityLogsRequest constructs an http.Request for the PostV0ActivityLogs method +func NewPostV0ActivityLogsRequest(server string, params *PostV0ActivityLogsParams) (*http.Request, error) { var err error serverURL, err := url.Parse(server) @@ -2675,7 +3096,240 @@ func NewGetV0BillingInvoicesRequest(server string) (*http.Request, error) { return nil, err } - operationPath := fmt.Sprintf("/v0/billing/invoices") + operationPath := fmt.Sprintf("/v0/activity_logs") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + // queryValues collects non-styled parameters (passthrough, JSON) + // that are safe to round-trip through url.Values.Encode(). + queryValues := queryURL.Query() + // rawQueryFragments collects pre-encoded query fragments from + // styled parameters, preserving literal commas as delimiters + // per the OpenAPI spec (e.g. "color=blue,black,brown"). + var rawQueryFragments []string + + if params.Q != nil { + + if queryFrag, err := runtime.StyleParamWithOptions("form", true, "q", *params.Q, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil { + return nil, err + } else { + for _, qp := range strings.Split(queryFrag, "&") { + rawQueryFragments = append(rawQueryFragments, qp) + } + } + + } + + if params.Actor != nil { + + if queryFrag, err := runtime.StyleParamWithOptions("form", true, "actor", *params.Actor, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil { + return nil, err + } else { + for _, qp := range strings.Split(queryFrag, "&") { + rawQueryFragments = append(rawQueryFragments, qp) + } + } + + } + + if params.Type != nil { + + if queryFrag, err := runtime.StyleParamWithOptions("form", true, "type", *params.Type, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil { + return nil, err + } else { + for _, qp := range strings.Split(queryFrag, "&") { + rawQueryFragments = append(rawQueryFragments, qp) + } + } + + } + + if params.EndpointId != nil { + + if queryFrag, err := runtime.StyleParamWithOptions("form", true, "endpoint_id", *params.EndpointId, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil { + return nil, err + } else { + for _, qp := range strings.Split(queryFrag, "&") { + rawQueryFragments = append(rawQueryFragments, qp) + } + } + + } + + if params.From != nil { + + if queryFrag, err := runtime.StyleParamWithOptions("form", true, "from", *params.From, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil { + return nil, err + } else { + for _, qp := range strings.Split(queryFrag, "&") { + rawQueryFragments = append(rawQueryFragments, qp) + } + } + + } + + if params.To != nil { + + if queryFrag, err := runtime.StyleParamWithOptions("form", true, "to", *params.To, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil { + return nil, err + } else { + for _, qp := range strings.Split(queryFrag, "&") { + rawQueryFragments = append(rawQueryFragments, qp) + } + } + + } + + if params.Limit != nil { + + if queryFrag, err := runtime.StyleParamWithOptions("form", true, "limit", *params.Limit, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "integer", Format: ""}); err != nil { + return nil, err + } else { + for _, qp := range strings.Split(queryFrag, "&") { + rawQueryFragments = append(rawQueryFragments, qp) + } + } + + } + + if params.Offset != nil { + + if queryFrag, err := runtime.StyleParamWithOptions("form", true, "offset", *params.Offset, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "integer", Format: ""}); err != nil { + return nil, err + } else { + for _, qp := range strings.Split(queryFrag, "&") { + rawQueryFragments = append(rawQueryFragments, qp) + } + } + + } + + if encoded := queryValues.Encode(); encoded != "" { + rawQueryFragments = append(rawQueryFragments, encoded) + } + queryURL.RawQuery = strings.Join(rawQueryFragments, "&") + } + + req, err := http.NewRequest(http.MethodPost, queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewGetV0ActivityLogsFiltersRequest constructs an http.Request for the GetV0ActivityLogsFilters method +func NewGetV0ActivityLogsFiltersRequest(server string) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/v0/activity_logs/filters") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest(http.MethodGet, queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewGetV0ActivityLogsByIdRequest constructs an http.Request for the GetV0ActivityLogsById method +func NewGetV0ActivityLogsByIdRequest(server string, id string) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithOptions("simple", false, "id", id, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: ""}) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/v0/activity_logs/%s", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest(http.MethodGet, queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewGetV0ApiCreditsByChainRequest constructs an http.Request for the GetV0ApiCreditsByChain method +func NewGetV0ApiCreditsByChainRequest(server string, chain string) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithOptions("simple", false, "chain", chain, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: ""}) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/v0/api-credits/%s", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest(http.MethodGet, queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewGetV0BillingInvoicesRequest constructs an http.Request for the GetV0BillingInvoices method +func NewGetV0BillingInvoicesRequest(server string) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/v0/billing/invoices") if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -3876,8 +4530,8 @@ func NewGetV0EndpointsByIdMetricsRequest(server string, id string, params *GetV0 return req, nil } -// NewGetV0EndpointsByIdRateLimitsRequest constructs an http.Request for the GetV0EndpointsByIdRateLimits method -func NewGetV0EndpointsByIdRateLimitsRequest(server string, id string) (*http.Request, error) { +// NewPostV0EndpointsByIdMetricsErrorsSummaryRequest constructs an http.Request for the PostV0EndpointsByIdMetricsErrorsSummary method +func NewPostV0EndpointsByIdMetricsErrorsSummaryRequest(server string, id string, params *PostV0EndpointsByIdMetricsErrorsSummaryParams) (*http.Request, error) { var err error var pathParam0 string @@ -3892,7 +4546,7 @@ func NewGetV0EndpointsByIdRateLimitsRequest(server string, id string) (*http.Req return nil, err } - operationPath := fmt.Sprintf("/v0/endpoints/%s/rate-limits", pathParam0) + operationPath := fmt.Sprintf("/v0/endpoints/%s/metrics/errors/summary", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -3902,34 +4556,167 @@ func NewGetV0EndpointsByIdRateLimitsRequest(server string, id string) (*http.Req return nil, err } - req, err := http.NewRequest(http.MethodGet, queryURL.String(), nil) - if err != nil { - return nil, err - } + if params != nil { + // queryValues collects non-styled parameters (passthrough, JSON) + // that are safe to round-trip through url.Values.Encode(). + queryValues := queryURL.Query() + // rawQueryFragments collects pre-encoded query fragments from + // styled parameters, preserving literal commas as delimiters + // per the OpenAPI spec (e.g. "color=blue,black,brown"). + var rawQueryFragments []string - return req, nil -} + if params.From != nil { -// NewPatchV0EndpointsByIdRateLimitsRequest calls the generic PatchV0EndpointsByIdRateLimits builder with application/json body -func NewPatchV0EndpointsByIdRateLimitsRequest(server string, id string, body PatchV0EndpointsByIdRateLimitsJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPatchV0EndpointsByIdRateLimitsRequestWithBody(server, id, "application/json", bodyReader) -} + if queryFrag, err := runtime.StyleParamWithOptions("form", true, "from", *params.From, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil { + return nil, err + } else { + for _, qp := range strings.Split(queryFrag, "&") { + rawQueryFragments = append(rawQueryFragments, qp) + } + } -// NewPatchV0EndpointsByIdRateLimitsRequestWithBody constructs an http.Request for the PatchV0EndpointsByIdRateLimits method, with any body, and a specified content type -func NewPatchV0EndpointsByIdRateLimitsRequestWithBody(server string, id string, contentType string, body io.Reader) (*http.Request, error) { - var err error + } - var pathParam0 string + if params.To != nil { - pathParam0, err = runtime.StyleParamWithOptions("simple", false, "id", id, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: ""}) - if err != nil { - return nil, err + if queryFrag, err := runtime.StyleParamWithOptions("form", true, "to", *params.To, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil { + return nil, err + } else { + for _, qp := range strings.Split(queryFrag, "&") { + rawQueryFragments = append(rawQueryFragments, qp) + } + } + + } + + if params.Last != nil { + + if queryFrag, err := runtime.StyleParamWithOptions("form", true, "last", *params.Last, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil { + return nil, err + } else { + for _, qp := range strings.Split(queryFrag, "&") { + rawQueryFragments = append(rawQueryFragments, qp) + } + } + + } + + if params.GroupBy != nil { + + if queryFrag, err := runtime.StyleParamWithOptions("form", true, "group_by[]", *params.GroupBy, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "array", Format: ""}); err != nil { + return nil, err + } else { + for _, qp := range strings.Split(queryFrag, "&") { + rawQueryFragments = append(rawQueryFragments, qp) + } + } + + } + + if params.Kind != nil { + + if queryFrag, err := runtime.StyleParamWithOptions("form", true, "kind", *params.Kind, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil { + return nil, err + } else { + for _, qp := range strings.Split(queryFrag, "&") { + rawQueryFragments = append(rawQueryFragments, qp) + } + } + + } + + if params.Limit != nil { + + if queryFrag, err := runtime.StyleParamWithOptions("form", true, "limit", *params.Limit, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "integer", Format: ""}); err != nil { + return nil, err + } else { + for _, qp := range strings.Split(queryFrag, "&") { + rawQueryFragments = append(rawQueryFragments, qp) + } + } + + } + + if params.Cursor != nil { + + if queryFrag, err := runtime.StyleParamWithOptions("form", true, "cursor", *params.Cursor, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil { + return nil, err + } else { + for _, qp := range strings.Split(queryFrag, "&") { + rawQueryFragments = append(rawQueryFragments, qp) + } + } + + } + + if encoded := queryValues.Encode(); encoded != "" { + rawQueryFragments = append(rawQueryFragments, encoded) + } + queryURL.RawQuery = strings.Join(rawQueryFragments, "&") + } + + req, err := http.NewRequest(http.MethodPost, queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewGetV0EndpointsByIdRateLimitsRequest constructs an http.Request for the GetV0EndpointsByIdRateLimits method +func NewGetV0EndpointsByIdRateLimitsRequest(server string, id string) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithOptions("simple", false, "id", id, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: ""}) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/v0/endpoints/%s/rate-limits", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest(http.MethodGet, queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewPatchV0EndpointsByIdRateLimitsRequest calls the generic PatchV0EndpointsByIdRateLimits builder with application/json body +func NewPatchV0EndpointsByIdRateLimitsRequest(server string, id string, body PatchV0EndpointsByIdRateLimitsJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPatchV0EndpointsByIdRateLimitsRequestWithBody(server, id, "application/json", bodyReader) +} + +// NewPatchV0EndpointsByIdRateLimitsRequestWithBody constructs an http.Request for the PatchV0EndpointsByIdRateLimits method, with any body, and a specified content type +func NewPatchV0EndpointsByIdRateLimitsRequestWithBody(server string, id string, contentType string, body io.Reader) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithOptions("simple", false, "id", id, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: ""}) + if err != nil { + return nil, err } serverURL, err := url.Parse(server) @@ -4943,8 +5730,8 @@ func NewGetV0MetricsRequest(server string, params *GetV0MetricsParams) (*http.Re return req, nil } -// NewGetV0TeamsRequest constructs an http.Request for the GetV0Teams method -func NewGetV0TeamsRequest(server string) (*http.Request, error) { +// NewPostV0MetricsErrorsSummaryRequest constructs an http.Request for the PostV0MetricsErrorsSummary method +func NewPostV0MetricsErrorsSummaryRequest(server string, params *PostV0MetricsErrorsSummaryParams) (*http.Request, error) { var err error serverURL, err := url.Parse(server) @@ -4952,7 +5739,7 @@ func NewGetV0TeamsRequest(server string) (*http.Request, error) { return nil, err } - operationPath := fmt.Sprintf("/v0/teams") + operationPath := fmt.Sprintf("/v0/metrics/errors/summary") if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -4962,71 +5749,123 @@ func NewGetV0TeamsRequest(server string) (*http.Request, error) { return nil, err } - req, err := http.NewRequest(http.MethodGet, queryURL.String(), nil) - if err != nil { - return nil, err - } + if params != nil { + // queryValues collects non-styled parameters (passthrough, JSON) + // that are safe to round-trip through url.Values.Encode(). + queryValues := queryURL.Query() + // rawQueryFragments collects pre-encoded query fragments from + // styled parameters, preserving literal commas as delimiters + // per the OpenAPI spec (e.g. "color=blue,black,brown"). + var rawQueryFragments []string - return req, nil -} + if params.From != nil { -// NewPostV0TeamsRequest calls the generic PostV0Teams builder with application/json body -func NewPostV0TeamsRequest(server string, body PostV0TeamsJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPostV0TeamsRequestWithBody(server, "application/json", bodyReader) -} + if queryFrag, err := runtime.StyleParamWithOptions("form", true, "from", *params.From, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil { + return nil, err + } else { + for _, qp := range strings.Split(queryFrag, "&") { + rawQueryFragments = append(rawQueryFragments, qp) + } + } -// NewPostV0TeamsRequestWithBody constructs an http.Request for the PostV0Teams method, with any body, and a specified content type -func NewPostV0TeamsRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { - var err error + } - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } + if params.To != nil { - operationPath := fmt.Sprintf("/v0/teams") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } + if queryFrag, err := runtime.StyleParamWithOptions("form", true, "to", *params.To, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil { + return nil, err + } else { + for _, qp := range strings.Split(queryFrag, "&") { + rawQueryFragments = append(rawQueryFragments, qp) + } + } - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err + } + + if params.Last != nil { + + if queryFrag, err := runtime.StyleParamWithOptions("form", true, "last", *params.Last, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil { + return nil, err + } else { + for _, qp := range strings.Split(queryFrag, "&") { + rawQueryFragments = append(rawQueryFragments, qp) + } + } + + } + + if params.GroupBy != nil { + + if queryFrag, err := runtime.StyleParamWithOptions("form", true, "group_by[]", *params.GroupBy, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "array", Format: ""}); err != nil { + return nil, err + } else { + for _, qp := range strings.Split(queryFrag, "&") { + rawQueryFragments = append(rawQueryFragments, qp) + } + } + + } + + if params.Kind != nil { + + if queryFrag, err := runtime.StyleParamWithOptions("form", true, "kind", *params.Kind, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil { + return nil, err + } else { + for _, qp := range strings.Split(queryFrag, "&") { + rawQueryFragments = append(rawQueryFragments, qp) + } + } + + } + + if params.Limit != nil { + + if queryFrag, err := runtime.StyleParamWithOptions("form", true, "limit", *params.Limit, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "integer", Format: ""}); err != nil { + return nil, err + } else { + for _, qp := range strings.Split(queryFrag, "&") { + rawQueryFragments = append(rawQueryFragments, qp) + } + } + + } + + if params.Cursor != nil { + + if queryFrag, err := runtime.StyleParamWithOptions("form", true, "cursor", *params.Cursor, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil { + return nil, err + } else { + for _, qp := range strings.Split(queryFrag, "&") { + rawQueryFragments = append(rawQueryFragments, qp) + } + } + + } + + if encoded := queryValues.Encode(); encoded != "" { + rawQueryFragments = append(rawQueryFragments, encoded) + } + queryURL.RawQuery = strings.Join(rawQueryFragments, "&") } - req, err := http.NewRequest(http.MethodPost, queryURL.String(), body) + req, err := http.NewRequest(http.MethodPost, queryURL.String(), nil) if err != nil { return nil, err } - req.Header.Add("Content-Type", contentType) - return req, nil } -// NewDeleteV0TeamsByIdRequest constructs an http.Request for the DeleteV0TeamsById method -func NewDeleteV0TeamsByIdRequest(server string, id int) (*http.Request, error) { +// NewPostV0MetricsTrafficSummaryRequest constructs an http.Request for the PostV0MetricsTrafficSummary method +func NewPostV0MetricsTrafficSummaryRequest(server string, params *PostV0MetricsTrafficSummaryParams) (*http.Request, error) { var err error - var pathParam0 string - - pathParam0, err = runtime.StyleParamWithOptions("simple", false, "id", id, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "integer", Format: ""}) - if err != nil { - return nil, err - } - serverURL, err := url.Parse(server) if err != nil { return nil, err } - operationPath := fmt.Sprintf("/v0/teams/%s", pathParam0) + operationPath := fmt.Sprintf("/v0/metrics/traffic/summary") if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -5036,7 +5875,195 @@ func NewDeleteV0TeamsByIdRequest(server string, id int) (*http.Request, error) { return nil, err } - req, err := http.NewRequest(http.MethodDelete, queryURL.String(), nil) + if params != nil { + // queryValues collects non-styled parameters (passthrough, JSON) + // that are safe to round-trip through url.Values.Encode(). + queryValues := queryURL.Query() + // rawQueryFragments collects pre-encoded query fragments from + // styled parameters, preserving literal commas as delimiters + // per the OpenAPI spec (e.g. "color=blue,black,brown"). + var rawQueryFragments []string + + if params.From != nil { + + if queryFrag, err := runtime.StyleParamWithOptions("form", true, "from", *params.From, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil { + return nil, err + } else { + for _, qp := range strings.Split(queryFrag, "&") { + rawQueryFragments = append(rawQueryFragments, qp) + } + } + + } + + if params.To != nil { + + if queryFrag, err := runtime.StyleParamWithOptions("form", true, "to", *params.To, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil { + return nil, err + } else { + for _, qp := range strings.Split(queryFrag, "&") { + rawQueryFragments = append(rawQueryFragments, qp) + } + } + + } + + if params.Last != nil { + + if queryFrag, err := runtime.StyleParamWithOptions("form", true, "last", *params.Last, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil { + return nil, err + } else { + for _, qp := range strings.Split(queryFrag, "&") { + rawQueryFragments = append(rawQueryFragments, qp) + } + } + + } + + if params.GroupBy != nil { + + if queryFrag, err := runtime.StyleParamWithOptions("form", true, "group_by[]", *params.GroupBy, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "array", Format: ""}); err != nil { + return nil, err + } else { + for _, qp := range strings.Split(queryFrag, "&") { + rawQueryFragments = append(rawQueryFragments, qp) + } + } + + } + + if params.Limit != nil { + + if queryFrag, err := runtime.StyleParamWithOptions("form", true, "limit", *params.Limit, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "integer", Format: ""}); err != nil { + return nil, err + } else { + for _, qp := range strings.Split(queryFrag, "&") { + rawQueryFragments = append(rawQueryFragments, qp) + } + } + + } + + if params.Cursor != nil { + + if queryFrag, err := runtime.StyleParamWithOptions("form", true, "cursor", *params.Cursor, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil { + return nil, err + } else { + for _, qp := range strings.Split(queryFrag, "&") { + rawQueryFragments = append(rawQueryFragments, qp) + } + } + + } + + if encoded := queryValues.Encode(); encoded != "" { + rawQueryFragments = append(rawQueryFragments, encoded) + } + queryURL.RawQuery = strings.Join(rawQueryFragments, "&") + } + + req, err := http.NewRequest(http.MethodPost, queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewGetV0TeamsRequest constructs an http.Request for the GetV0Teams method +func NewGetV0TeamsRequest(server string) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/v0/teams") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest(http.MethodGet, queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewPostV0TeamsRequest calls the generic PostV0Teams builder with application/json body +func NewPostV0TeamsRequest(server string, body PostV0TeamsJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPostV0TeamsRequestWithBody(server, "application/json", bodyReader) +} + +// NewPostV0TeamsRequestWithBody constructs an http.Request for the PostV0Teams method, with any body, and a specified content type +func NewPostV0TeamsRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/v0/teams") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest(http.MethodPost, queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + +// NewDeleteV0TeamsByIdRequest constructs an http.Request for the DeleteV0TeamsById method +func NewDeleteV0TeamsByIdRequest(server string, id int) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithOptions("simple", false, "id", id, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "integer", Format: ""}) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/v0/teams/%s", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest(http.MethodDelete, queryURL.String(), nil) if err != nil { return nil, err } @@ -5382,8 +6409,8 @@ func NewPostV0ToolingAccessTokenRequest(server string) (*http.Request, error) { return req, nil } -// NewGetV0UsageRpcRequest constructs an http.Request for the GetV0UsageRpc method -func NewGetV0UsageRpcRequest(server string, params *GetV0UsageRpcParams) (*http.Request, error) { +// NewPostV0TransactionsRequest constructs an http.Request for the PostV0Transactions method +func NewPostV0TransactionsRequest(server string, params *PostV0TransactionsParams) (*http.Request, error) { var err error serverURL, err := url.Parse(server) @@ -5391,7 +6418,7 @@ func NewGetV0UsageRpcRequest(server string, params *GetV0UsageRpcParams) (*http. return nil, err } - operationPath := fmt.Sprintf("/v0/usage/rpc") + operationPath := fmt.Sprintf("/v0/transactions") if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -5410,9 +6437,9 @@ func NewGetV0UsageRpcRequest(server string, params *GetV0UsageRpcParams) (*http. // per the OpenAPI spec (e.g. "color=blue,black,brown"). var rawQueryFragments []string - if params.StartTime != nil { + if params.From != nil { - if queryFrag, err := runtime.StyleParamWithOptions("form", true, "start_time", *params.StartTime, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "integer", Format: ""}); err != nil { + if queryFrag, err := runtime.StyleParamWithOptions("form", true, "from", *params.From, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil { return nil, err } else { for _, qp := range strings.Split(queryFrag, "&") { @@ -5422,9 +6449,9 @@ func NewGetV0UsageRpcRequest(server string, params *GetV0UsageRpcParams) (*http. } - if params.EndTime != nil { + if params.To != nil { - if queryFrag, err := runtime.StyleParamWithOptions("form", true, "end_time", *params.EndTime, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "integer", Format: ""}); err != nil { + if queryFrag, err := runtime.StyleParamWithOptions("form", true, "to", *params.To, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil { return nil, err } else { for _, qp := range strings.Split(queryFrag, "&") { @@ -5434,51 +6461,33 @@ func NewGetV0UsageRpcRequest(server string, params *GetV0UsageRpcParams) (*http. } - if encoded := queryValues.Encode(); encoded != "" { - rawQueryFragments = append(rawQueryFragments, encoded) - } - queryURL.RawQuery = strings.Join(rawQueryFragments, "&") - } - - req, err := http.NewRequest(http.MethodGet, queryURL.String(), nil) - if err != nil { - return nil, err - } + if params.Last != nil { - return req, nil -} - -// NewGetV0UsageRpcByChainRequest constructs an http.Request for the GetV0UsageRpcByChain method -func NewGetV0UsageRpcByChainRequest(server string, params *GetV0UsageRpcByChainParams) (*http.Request, error) { - var err error + if queryFrag, err := runtime.StyleParamWithOptions("form", true, "last", *params.Last, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil { + return nil, err + } else { + for _, qp := range strings.Split(queryFrag, "&") { + rawQueryFragments = append(rawQueryFragments, qp) + } + } - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } + } - operationPath := fmt.Sprintf("/v0/usage/rpc/by-chain") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } + if params.Limit != nil { - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } + if queryFrag, err := runtime.StyleParamWithOptions("form", true, "limit", *params.Limit, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "integer", Format: ""}); err != nil { + return nil, err + } else { + for _, qp := range strings.Split(queryFrag, "&") { + rawQueryFragments = append(rawQueryFragments, qp) + } + } - if params != nil { - // queryValues collects non-styled parameters (passthrough, JSON) - // that are safe to round-trip through url.Values.Encode(). - queryValues := queryURL.Query() - // rawQueryFragments collects pre-encoded query fragments from - // styled parameters, preserving literal commas as delimiters - // per the OpenAPI spec (e.g. "color=blue,black,brown"). - var rawQueryFragments []string + } - if params.StartTime != nil { + if params.Cursor != nil { - if queryFrag, err := runtime.StyleParamWithOptions("form", true, "start_time", *params.StartTime, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "integer", Format: ""}); err != nil { + if queryFrag, err := runtime.StyleParamWithOptions("form", true, "cursor", *params.Cursor, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil { return nil, err } else { for _, qp := range strings.Split(queryFrag, "&") { @@ -5488,9 +6497,9 @@ func NewGetV0UsageRpcByChainRequest(server string, params *GetV0UsageRpcByChainP } - if params.EndTime != nil { + if params.Network != nil { - if queryFrag, err := runtime.StyleParamWithOptions("form", true, "end_time", *params.EndTime, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "integer", Format: ""}); err != nil { + if queryFrag, err := runtime.StyleParamWithOptions("form", true, "network", *params.Network, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil { return nil, err } else { for _, qp := range strings.Split(queryFrag, "&") { @@ -5506,7 +6515,7 @@ func NewGetV0UsageRpcByChainRequest(server string, params *GetV0UsageRpcByChainP queryURL.RawQuery = strings.Join(rawQueryFragments, "&") } - req, err := http.NewRequest(http.MethodGet, queryURL.String(), nil) + req, err := http.NewRequest(http.MethodPost, queryURL.String(), nil) if err != nil { return nil, err } @@ -5514,26 +6523,40 @@ func NewGetV0UsageRpcByChainRequest(server string, params *GetV0UsageRpcByChainP return req, nil } -// NewGetV0UsageRpcByEndpointRequest constructs an http.Request for the GetV0UsageRpcByEndpoint method -func NewGetV0UsageRpcByEndpointRequest(server string, params *GetV0UsageRpcByEndpointParams) (*http.Request, error) { +// NewPostV0TransactionsByNetworkByHashRequest constructs an http.Request for the PostV0TransactionsByNetworkByHash method +func NewPostV0TransactionsByNetworkByHashRequest(server string, network string, hash string, params *PostV0TransactionsByNetworkByHashParams) (*http.Request, error) { var err error - serverURL, err := url.Parse(server) + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithOptions("simple", false, "network", network, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: ""}) if err != nil { return nil, err } - operationPath := fmt.Sprintf("/v0/usage/rpc/by-endpoint") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } + var pathParam1 string - queryURL, err := serverURL.Parse(operationPath) + pathParam1, err = runtime.StyleParamWithOptions("simple", false, "hash", hash, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: ""}) if err != nil { return nil, err } - if params != nil { + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/v0/transactions/%s/%s", pathParam0, pathParam1) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { // queryValues collects non-styled parameters (passthrough, JSON) // that are safe to round-trip through url.Values.Encode(). queryValues := queryURL.Query() @@ -5542,9 +6565,9 @@ func NewGetV0UsageRpcByEndpointRequest(server string, params *GetV0UsageRpcByEnd // per the OpenAPI spec (e.g. "color=blue,black,brown"). var rawQueryFragments []string - if params.StartTime != nil { + if params.IncludePayloads != nil { - if queryFrag, err := runtime.StyleParamWithOptions("form", true, "start_time", *params.StartTime, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "integer", Format: ""}); err != nil { + if queryFrag, err := runtime.StyleParamWithOptions("form", true, "include_payloads", *params.IncludePayloads, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "boolean", Format: ""}); err != nil { return nil, err } else { for _, qp := range strings.Split(queryFrag, "&") { @@ -5554,9 +6577,75 @@ func NewGetV0UsageRpcByEndpointRequest(server string, params *GetV0UsageRpcByEnd } - if params.EndTime != nil { + if encoded := queryValues.Encode(); encoded != "" { + rawQueryFragments = append(rawQueryFragments, encoded) + } + queryURL.RawQuery = strings.Join(rawQueryFragments, "&") + } - if queryFrag, err := runtime.StyleParamWithOptions("form", true, "end_time", *params.EndTime, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "integer", Format: ""}); err != nil { + req, err := http.NewRequest(http.MethodPost, queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewPostV0UsageCreditsSummaryRequest constructs an http.Request for the PostV0UsageCreditsSummary method +func NewPostV0UsageCreditsSummaryRequest(server string, params *PostV0UsageCreditsSummaryParams) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/v0/usage/credits/summary") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + // queryValues collects non-styled parameters (passthrough, JSON) + // that are safe to round-trip through url.Values.Encode(). + queryValues := queryURL.Query() + // rawQueryFragments collects pre-encoded query fragments from + // styled parameters, preserving literal commas as delimiters + // per the OpenAPI spec (e.g. "color=blue,black,brown"). + var rawQueryFragments []string + + if params.From != nil { + + if queryFrag, err := runtime.StyleParamWithOptions("form", true, "from", *params.From, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil { + return nil, err + } else { + for _, qp := range strings.Split(queryFrag, "&") { + rawQueryFragments = append(rawQueryFragments, qp) + } + } + + } + + if params.To != nil { + + if queryFrag, err := runtime.StyleParamWithOptions("form", true, "to", *params.To, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil { + return nil, err + } else { + for _, qp := range strings.Split(queryFrag, "&") { + rawQueryFragments = append(rawQueryFragments, qp) + } + } + + } + + if params.Last != nil { + + if queryFrag, err := runtime.StyleParamWithOptions("form", true, "last", *params.Last, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil { return nil, err } else { for _, qp := range strings.Split(queryFrag, "&") { @@ -5572,7 +6661,7 @@ func NewGetV0UsageRpcByEndpointRequest(server string, params *GetV0UsageRpcByEnd queryURL.RawQuery = strings.Join(rawQueryFragments, "&") } - req, err := http.NewRequest(http.MethodGet, queryURL.String(), nil) + req, err := http.NewRequest(http.MethodPost, queryURL.String(), nil) if err != nil { return nil, err } @@ -5580,8 +6669,8 @@ func NewGetV0UsageRpcByEndpointRequest(server string, params *GetV0UsageRpcByEnd return req, nil } -// NewGetV0UsageRpcByMethodRequest constructs an http.Request for the GetV0UsageRpcByMethod method -func NewGetV0UsageRpcByMethodRequest(server string, params *GetV0UsageRpcByMethodParams) (*http.Request, error) { +// NewGetV0UsageRpcRequest constructs an http.Request for the GetV0UsageRpc method +func NewGetV0UsageRpcRequest(server string, params *GetV0UsageRpcParams) (*http.Request, error) { var err error serverURL, err := url.Parse(server) @@ -5589,7 +6678,7 @@ func NewGetV0UsageRpcByMethodRequest(server string, params *GetV0UsageRpcByMetho return nil, err } - operationPath := fmt.Sprintf("/v0/usage/rpc/by-method") + operationPath := fmt.Sprintf("/v0/usage/rpc") if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -5646,8 +6735,8 @@ func NewGetV0UsageRpcByMethodRequest(server string, params *GetV0UsageRpcByMetho return req, nil } -// NewGetV0UsageRpcByTagRequest constructs an http.Request for the GetV0UsageRpcByTag method -func NewGetV0UsageRpcByTagRequest(server string, params *GetV0UsageRpcByTagParams) (*http.Request, error) { +// NewGetV0UsageRpcByChainRequest constructs an http.Request for the GetV0UsageRpcByChain method +func NewGetV0UsageRpcByChainRequest(server string, params *GetV0UsageRpcByChainParams) (*http.Request, error) { var err error serverURL, err := url.Parse(server) @@ -5655,7 +6744,7 @@ func NewGetV0UsageRpcByTagRequest(server string, params *GetV0UsageRpcByTagParam return nil, err } - operationPath := fmt.Sprintf("/v0/usage/rpc/by-tag") + operationPath := fmt.Sprintf("/v0/usage/rpc/by-chain") if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -5712,818 +6801,2859 @@ func NewGetV0UsageRpcByTagRequest(server string, params *GetV0UsageRpcByTagParam return req, nil } -func (c *Client) applyEditors(ctx context.Context, req *http.Request, additionalEditors []RequestEditorFn) error { - for _, r := range c.RequestEditors { - if err := r(ctx, req); err != nil { - return err - } - } - for _, r := range additionalEditors { - if err := r(ctx, req); err != nil { - return err - } - } - return nil -} - -// ClientWithResponses builds on ClientInterface to offer response payloads -type ClientWithResponses struct { - ClientInterface -} +// NewGetV0UsageRpcByEndpointRequest constructs an http.Request for the GetV0UsageRpcByEndpoint method +func NewGetV0UsageRpcByEndpointRequest(server string, params *GetV0UsageRpcByEndpointParams) (*http.Request, error) { + var err error -// NewClientWithResponses creates a new ClientWithResponses, which wraps -// Client with return type handling -func NewClientWithResponses(server string, opts ...ClientOption) (*ClientWithResponses, error) { - client, err := NewClient(server, opts...) + serverURL, err := url.Parse(server) if err != nil { return nil, err } - return &ClientWithResponses{client}, nil -} -// WithBaseURL overrides the baseURL. -func WithBaseURL(baseURL string) ClientOption { - return func(c *Client) error { - newBaseURL, err := url.Parse(baseURL) - if err != nil { - return err - } - c.Server = newBaseURL.String() - return nil + operationPath := fmt.Sprintf("/v0/usage/rpc/by-endpoint") + if operationPath[0] == '/' { + operationPath = "." + operationPath } -} -// ClientWithResponsesInterface is the interface specification for the client with responses above. -type ClientWithResponsesInterface interface { + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } - // GetV0AccountInfoWithResponse Returns information about the account associated with the API key. - // - // Returns a wrapper object for the known response body format(s). - // - // Corresponds with GET /v0/account/info (the `GetV0AccountInfo` operationId). - GetV0AccountInfoWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetV0AccountInfoResponse, error) + if params != nil { + // queryValues collects non-styled parameters (passthrough, JSON) + // that are safe to round-trip through url.Values.Encode(). + queryValues := queryURL.Query() + // rawQueryFragments collects pre-encoded query fragments from + // styled parameters, preserving literal commas as delimiters + // per the OpenAPI spec (e.g. "color=blue,black,brown"). + var rawQueryFragments []string - // GetV0ApiCreditsByChainWithResponse Returns the API credit cost of each RPC method available on a chain. - // - // Returns the API credit cost of each RPC method available on a chain. Credit costs are calculated using the account's billing version. - // - // Returns a wrapper object for the known response body format(s). - // - // Corresponds with GET /v0/api-credits/{chain} (the `GetV0ApiCreditsByChain` operationId). - GetV0ApiCreditsByChainWithResponse(ctx context.Context, chain string, reqEditors ...RequestEditorFn) (*GetV0ApiCreditsByChainResponse, error) + if params.StartTime != nil { - // GetV0BillingInvoicesWithResponse Returns a list of invoices - // - // Returns a wrapper object for the known response body format(s). - // - // Corresponds with GET /v0/billing/invoices (the `GetV0BillingInvoices` operationId). - GetV0BillingInvoicesWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetV0BillingInvoicesResponse, error) + if queryFrag, err := runtime.StyleParamWithOptions("form", true, "start_time", *params.StartTime, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "integer", Format: ""}); err != nil { + return nil, err + } else { + for _, qp := range strings.Split(queryFrag, "&") { + rawQueryFragments = append(rawQueryFragments, qp) + } + } - // GetV0BillingPaymentsWithResponse Returns a list of payments. - // - // Returns a wrapper object for the known response body format(s). - // - // Corresponds with GET /v0/billing/payments (the `GetV0BillingPayments` operationId). - GetV0BillingPaymentsWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetV0BillingPaymentsResponse, error) + } - // GetV0ChainsWithResponse Returns a list of chains. - // - // Returns a wrapper object for the known response body format(s). - // - // Corresponds with GET /v0/chains (the `GetV0Chains` operationId). - GetV0ChainsWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetV0ChainsResponse, error) + if params.EndTime != nil { - // GetV0EndpointsWithResponse Retrieves a list of endpoints. - // - // Retrieves a list of endpoints. Supports searching, filtering, and sorting. - // - // Returns a wrapper object for the known response body format(s). - // - // Corresponds with GET /v0/endpoints (the `GetV0Endpoints` operationId). - GetV0EndpointsWithResponse(ctx context.Context, params *GetV0EndpointsParams, reqEditors ...RequestEditorFn) (*GetV0EndpointsResponse, error) + if queryFrag, err := runtime.StyleParamWithOptions("form", true, "end_time", *params.EndTime, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "integer", Format: ""}); err != nil { + return nil, err + } else { + for _, qp := range strings.Split(queryFrag, "&") { + rawQueryFragments = append(rawQueryFragments, qp) + } + } - // PostV0EndpointsWithBodyWithResponse Creates a new endpoint. - // - // Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s). - // - // Corresponds with POST /v0/endpoints (the `PostV0Endpoints` operationId). - PostV0EndpointsWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostV0EndpointsResponse, error) + } - // PostV0EndpointsWithResponse Creates a new endpoint. - // - // Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s). - // - // Corresponds with POST /v0/endpoints (the `PostV0Endpoints` operationId). - PostV0EndpointsWithResponse(ctx context.Context, body PostV0EndpointsJSONRequestBody, reqEditors ...RequestEditorFn) (*PostV0EndpointsResponse, error) + if encoded := queryValues.Encode(); encoded != "" { + rawQueryFragments = append(rawQueryFragments, encoded) + } + queryURL.RawQuery = strings.Join(rawQueryFragments, "&") + } - // PostV0EndpointsBulkStatusWithBodyWithResponse Pause or unpause multiple endpoints in a single call. - // - // Pause or unpause multiple endpoints in a single call. Admin-only. - // - // Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s). - // - // Corresponds with POST /v0/endpoints/bulk/status (the `PostV0EndpointsBulkStatus` operationId). - PostV0EndpointsBulkStatusWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostV0EndpointsBulkStatusResponse, error) + req, err := http.NewRequest(http.MethodGet, queryURL.String(), nil) + if err != nil { + return nil, err + } - // PostV0EndpointsBulkStatusWithResponse Pause or unpause multiple endpoints in a single call. - // - // Pause or unpause multiple endpoints in a single call. Admin-only. - // - // Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s). - // - // Corresponds with POST /v0/endpoints/bulk/status (the `PostV0EndpointsBulkStatus` operationId). - PostV0EndpointsBulkStatusWithResponse(ctx context.Context, body PostV0EndpointsBulkStatusJSONRequestBody, reqEditors ...RequestEditorFn) (*PostV0EndpointsBulkStatusResponse, error) + return req, nil +} - // DeleteV0EndpointsBulkTagsWithBodyWithResponse Remove a tag from multiple endpoints in a single call. - // - // Remove a tag from multiple endpoints in a single call. Admin-only. - // - // Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s). - // - // Corresponds with DELETE /v0/endpoints/bulk/tags (the `DeleteV0EndpointsBulkTags` operationId). - DeleteV0EndpointsBulkTagsWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*DeleteV0EndpointsBulkTagsResponse, error) +// NewGetV0UsageRpcByMethodRequest constructs an http.Request for the GetV0UsageRpcByMethod method +func NewGetV0UsageRpcByMethodRequest(server string, params *GetV0UsageRpcByMethodParams) (*http.Request, error) { + var err error - // DeleteV0EndpointsBulkTagsWithResponse Remove a tag from multiple endpoints in a single call. + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/v0/usage/rpc/by-method") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + // queryValues collects non-styled parameters (passthrough, JSON) + // that are safe to round-trip through url.Values.Encode(). + queryValues := queryURL.Query() + // rawQueryFragments collects pre-encoded query fragments from + // styled parameters, preserving literal commas as delimiters + // per the OpenAPI spec (e.g. "color=blue,black,brown"). + var rawQueryFragments []string + + if params.StartTime != nil { + + if queryFrag, err := runtime.StyleParamWithOptions("form", true, "start_time", *params.StartTime, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "integer", Format: ""}); err != nil { + return nil, err + } else { + for _, qp := range strings.Split(queryFrag, "&") { + rawQueryFragments = append(rawQueryFragments, qp) + } + } + + } + + if params.EndTime != nil { + + if queryFrag, err := runtime.StyleParamWithOptions("form", true, "end_time", *params.EndTime, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "integer", Format: ""}); err != nil { + return nil, err + } else { + for _, qp := range strings.Split(queryFrag, "&") { + rawQueryFragments = append(rawQueryFragments, qp) + } + } + + } + + if encoded := queryValues.Encode(); encoded != "" { + rawQueryFragments = append(rawQueryFragments, encoded) + } + queryURL.RawQuery = strings.Join(rawQueryFragments, "&") + } + + req, err := http.NewRequest(http.MethodGet, queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewGetV0UsageRpcByTagRequest constructs an http.Request for the GetV0UsageRpcByTag method +func NewGetV0UsageRpcByTagRequest(server string, params *GetV0UsageRpcByTagParams) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/v0/usage/rpc/by-tag") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + // queryValues collects non-styled parameters (passthrough, JSON) + // that are safe to round-trip through url.Values.Encode(). + queryValues := queryURL.Query() + // rawQueryFragments collects pre-encoded query fragments from + // styled parameters, preserving literal commas as delimiters + // per the OpenAPI spec (e.g. "color=blue,black,brown"). + var rawQueryFragments []string + + if params.StartTime != nil { + + if queryFrag, err := runtime.StyleParamWithOptions("form", true, "start_time", *params.StartTime, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "integer", Format: ""}); err != nil { + return nil, err + } else { + for _, qp := range strings.Split(queryFrag, "&") { + rawQueryFragments = append(rawQueryFragments, qp) + } + } + + } + + if params.EndTime != nil { + + if queryFrag, err := runtime.StyleParamWithOptions("form", true, "end_time", *params.EndTime, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "integer", Format: ""}); err != nil { + return nil, err + } else { + for _, qp := range strings.Split(queryFrag, "&") { + rawQueryFragments = append(rawQueryFragments, qp) + } + } + + } + + if encoded := queryValues.Encode(); encoded != "" { + rawQueryFragments = append(rawQueryFragments, encoded) + } + queryURL.RawQuery = strings.Join(rawQueryFragments, "&") + } + + req, err := http.NewRequest(http.MethodGet, queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewPostV0UsageRpcSummaryRequest constructs an http.Request for the PostV0UsageRpcSummary method +func NewPostV0UsageRpcSummaryRequest(server string, params *PostV0UsageRpcSummaryParams) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/v0/usage/rpc/summary") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + // queryValues collects non-styled parameters (passthrough, JSON) + // that are safe to round-trip through url.Values.Encode(). + queryValues := queryURL.Query() + // rawQueryFragments collects pre-encoded query fragments from + // styled parameters, preserving literal commas as delimiters + // per the OpenAPI spec (e.g. "color=blue,black,brown"). + var rawQueryFragments []string + + if params.From != nil { + + if queryFrag, err := runtime.StyleParamWithOptions("form", true, "from", *params.From, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil { + return nil, err + } else { + for _, qp := range strings.Split(queryFrag, "&") { + rawQueryFragments = append(rawQueryFragments, qp) + } + } + + } + + if params.To != nil { + + if queryFrag, err := runtime.StyleParamWithOptions("form", true, "to", *params.To, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil { + return nil, err + } else { + for _, qp := range strings.Split(queryFrag, "&") { + rawQueryFragments = append(rawQueryFragments, qp) + } + } + + } + + if params.Last != nil { + + if queryFrag, err := runtime.StyleParamWithOptions("form", true, "last", *params.Last, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil { + return nil, err + } else { + for _, qp := range strings.Split(queryFrag, "&") { + rawQueryFragments = append(rawQueryFragments, qp) + } + } + + } + + if params.GroupBy != nil { + + if queryFrag, err := runtime.StyleParamWithOptions("form", true, "group_by[]", *params.GroupBy, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "array", Format: ""}); err != nil { + return nil, err + } else { + for _, qp := range strings.Split(queryFrag, "&") { + rawQueryFragments = append(rawQueryFragments, qp) + } + } + + } + + if params.Limit != nil { + + if queryFrag, err := runtime.StyleParamWithOptions("form", true, "limit", *params.Limit, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "integer", Format: ""}); err != nil { + return nil, err + } else { + for _, qp := range strings.Split(queryFrag, "&") { + rawQueryFragments = append(rawQueryFragments, qp) + } + } + + } + + if params.Cursor != nil { + + if queryFrag, err := runtime.StyleParamWithOptions("form", true, "cursor", *params.Cursor, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil { + return nil, err + } else { + for _, qp := range strings.Split(queryFrag, "&") { + rawQueryFragments = append(rawQueryFragments, qp) + } + } + + } + + if encoded := queryValues.Encode(); encoded != "" { + rawQueryFragments = append(rawQueryFragments, encoded) + } + queryURL.RawQuery = strings.Join(rawQueryFragments, "&") + } + + req, err := http.NewRequest(http.MethodPost, queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewPostV0UsageStreamsSummaryRequest constructs an http.Request for the PostV0UsageStreamsSummary method +func NewPostV0UsageStreamsSummaryRequest(server string, params *PostV0UsageStreamsSummaryParams) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/v0/usage/streams/summary") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + // queryValues collects non-styled parameters (passthrough, JSON) + // that are safe to round-trip through url.Values.Encode(). + queryValues := queryURL.Query() + // rawQueryFragments collects pre-encoded query fragments from + // styled parameters, preserving literal commas as delimiters + // per the OpenAPI spec (e.g. "color=blue,black,brown"). + var rawQueryFragments []string + + if params.From != nil { + + if queryFrag, err := runtime.StyleParamWithOptions("form", true, "from", *params.From, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil { + return nil, err + } else { + for _, qp := range strings.Split(queryFrag, "&") { + rawQueryFragments = append(rawQueryFragments, qp) + } + } + + } + + if params.To != nil { + + if queryFrag, err := runtime.StyleParamWithOptions("form", true, "to", *params.To, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil { + return nil, err + } else { + for _, qp := range strings.Split(queryFrag, "&") { + rawQueryFragments = append(rawQueryFragments, qp) + } + } + + } + + if params.Last != nil { + + if queryFrag, err := runtime.StyleParamWithOptions("form", true, "last", *params.Last, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil { + return nil, err + } else { + for _, qp := range strings.Split(queryFrag, "&") { + rawQueryFragments = append(rawQueryFragments, qp) + } + } + + } + + if params.GroupBy != nil { + + if queryFrag, err := runtime.StyleParamWithOptions("form", true, "group_by[]", *params.GroupBy, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "array", Format: ""}); err != nil { + return nil, err + } else { + for _, qp := range strings.Split(queryFrag, "&") { + rawQueryFragments = append(rawQueryFragments, qp) + } + } + + } + + if params.Limit != nil { + + if queryFrag, err := runtime.StyleParamWithOptions("form", true, "limit", *params.Limit, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "integer", Format: ""}); err != nil { + return nil, err + } else { + for _, qp := range strings.Split(queryFrag, "&") { + rawQueryFragments = append(rawQueryFragments, qp) + } + } + + } + + if params.Cursor != nil { + + if queryFrag, err := runtime.StyleParamWithOptions("form", true, "cursor", *params.Cursor, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil { + return nil, err + } else { + for _, qp := range strings.Split(queryFrag, "&") { + rawQueryFragments = append(rawQueryFragments, qp) + } + } + + } + + if encoded := queryValues.Encode(); encoded != "" { + rawQueryFragments = append(rawQueryFragments, encoded) + } + queryURL.RawQuery = strings.Join(rawQueryFragments, "&") + } + + req, err := http.NewRequest(http.MethodPost, queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewPostV0UsageWebhooksSummaryRequest constructs an http.Request for the PostV0UsageWebhooksSummary method +func NewPostV0UsageWebhooksSummaryRequest(server string, params *PostV0UsageWebhooksSummaryParams) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/v0/usage/webhooks/summary") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + // queryValues collects non-styled parameters (passthrough, JSON) + // that are safe to round-trip through url.Values.Encode(). + queryValues := queryURL.Query() + // rawQueryFragments collects pre-encoded query fragments from + // styled parameters, preserving literal commas as delimiters + // per the OpenAPI spec (e.g. "color=blue,black,brown"). + var rawQueryFragments []string + + if params.From != nil { + + if queryFrag, err := runtime.StyleParamWithOptions("form", true, "from", *params.From, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil { + return nil, err + } else { + for _, qp := range strings.Split(queryFrag, "&") { + rawQueryFragments = append(rawQueryFragments, qp) + } + } + + } + + if params.To != nil { + + if queryFrag, err := runtime.StyleParamWithOptions("form", true, "to", *params.To, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil { + return nil, err + } else { + for _, qp := range strings.Split(queryFrag, "&") { + rawQueryFragments = append(rawQueryFragments, qp) + } + } + + } + + if params.Last != nil { + + if queryFrag, err := runtime.StyleParamWithOptions("form", true, "last", *params.Last, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil { + return nil, err + } else { + for _, qp := range strings.Split(queryFrag, "&") { + rawQueryFragments = append(rawQueryFragments, qp) + } + } + + } + + if params.GroupBy != nil { + + if queryFrag, err := runtime.StyleParamWithOptions("form", true, "group_by[]", *params.GroupBy, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "array", Format: ""}); err != nil { + return nil, err + } else { + for _, qp := range strings.Split(queryFrag, "&") { + rawQueryFragments = append(rawQueryFragments, qp) + } + } + + } + + if params.Limit != nil { + + if queryFrag, err := runtime.StyleParamWithOptions("form", true, "limit", *params.Limit, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "integer", Format: ""}); err != nil { + return nil, err + } else { + for _, qp := range strings.Split(queryFrag, "&") { + rawQueryFragments = append(rawQueryFragments, qp) + } + } + + } + + if params.Cursor != nil { + + if queryFrag, err := runtime.StyleParamWithOptions("form", true, "cursor", *params.Cursor, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil { + return nil, err + } else { + for _, qp := range strings.Split(queryFrag, "&") { + rawQueryFragments = append(rawQueryFragments, qp) + } + } + + } + + if encoded := queryValues.Encode(); encoded != "" { + rawQueryFragments = append(rawQueryFragments, encoded) + } + queryURL.RawQuery = strings.Join(rawQueryFragments, "&") + } + + req, err := http.NewRequest(http.MethodPost, queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +func (c *Client) applyEditors(ctx context.Context, req *http.Request, additionalEditors []RequestEditorFn) error { + for _, r := range c.RequestEditors { + if err := r(ctx, req); err != nil { + return err + } + } + for _, r := range additionalEditors { + if err := r(ctx, req); err != nil { + return err + } + } + return nil +} + +// ClientWithResponses builds on ClientInterface to offer response payloads +type ClientWithResponses struct { + ClientInterface +} + +// NewClientWithResponses creates a new ClientWithResponses, which wraps +// Client with return type handling +func NewClientWithResponses(server string, opts ...ClientOption) (*ClientWithResponses, error) { + client, err := NewClient(server, opts...) + if err != nil { + return nil, err + } + return &ClientWithResponses{client}, nil +} + +// WithBaseURL overrides the baseURL. +func WithBaseURL(baseURL string) ClientOption { + return func(c *Client) error { + newBaseURL, err := url.Parse(baseURL) + if err != nil { + return err + } + c.Server = newBaseURL.String() + return nil + } +} + +// ClientWithResponsesInterface is the interface specification for the client with responses above. +type ClientWithResponsesInterface interface { + + // GetV0AccountInfoWithResponse Returns information about the account associated with the API key. + // + // Returns a wrapper object for the known response body format(s). + // + // Corresponds with GET /v0/account/info (the `GetV0AccountInfo` operationId). + GetV0AccountInfoWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetV0AccountInfoResponse, error) + + // PostV0ActivityLogsWithResponse Returns activity log entries, newest first, with filters and pagination. + // + // Returns a wrapper object for the known response body format(s). + // + // Corresponds with POST /v0/activity_logs (the `PostV0ActivityLogs` operationId). + PostV0ActivityLogsWithResponse(ctx context.Context, params *PostV0ActivityLogsParams, reqEditors ...RequestEditorFn) (*PostV0ActivityLogsResponse, error) + + // GetV0ActivityLogsFiltersWithResponse Returns the actors and types you can filter by when listing activity log entries. + // + // Returns a wrapper object for the known response body format(s). + // + // Corresponds with GET /v0/activity_logs/filters (the `GetV0ActivityLogsFilters` operationId). + GetV0ActivityLogsFiltersWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetV0ActivityLogsFiltersResponse, error) + + // GetV0ActivityLogsByIdWithResponse Returns a single activity log entry by ID. + // + // Returns a wrapper object for the known response body format(s). + // + // Corresponds with GET /v0/activity_logs/{id} (the `GetV0ActivityLogsById` operationId). + GetV0ActivityLogsByIdWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*GetV0ActivityLogsByIdResponse, error) + + // GetV0ApiCreditsByChainWithResponse Returns the API credit cost of each RPC method available on a chain. + // + // Returns the API credit cost of each RPC method available on a chain. Credit costs are calculated using the account's billing version. + // + // Returns a wrapper object for the known response body format(s). + // + // Corresponds with GET /v0/api-credits/{chain} (the `GetV0ApiCreditsByChain` operationId). + GetV0ApiCreditsByChainWithResponse(ctx context.Context, chain string, reqEditors ...RequestEditorFn) (*GetV0ApiCreditsByChainResponse, error) + + // GetV0BillingInvoicesWithResponse Returns a list of invoices + // + // Returns a wrapper object for the known response body format(s). + // + // Corresponds with GET /v0/billing/invoices (the `GetV0BillingInvoices` operationId). + GetV0BillingInvoicesWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetV0BillingInvoicesResponse, error) + + // GetV0BillingPaymentsWithResponse Returns a list of payments. + // + // Returns a wrapper object for the known response body format(s). + // + // Corresponds with GET /v0/billing/payments (the `GetV0BillingPayments` operationId). + GetV0BillingPaymentsWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetV0BillingPaymentsResponse, error) + + // GetV0ChainsWithResponse Returns a list of chains. + // + // Returns a wrapper object for the known response body format(s). + // + // Corresponds with GET /v0/chains (the `GetV0Chains` operationId). + GetV0ChainsWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetV0ChainsResponse, error) + + // GetV0EndpointsWithResponse Retrieves a list of endpoints. + // + // Retrieves a list of endpoints. Supports searching, filtering, and sorting. + // + // Returns a wrapper object for the known response body format(s). + // + // Corresponds with GET /v0/endpoints (the `GetV0Endpoints` operationId). + GetV0EndpointsWithResponse(ctx context.Context, params *GetV0EndpointsParams, reqEditors ...RequestEditorFn) (*GetV0EndpointsResponse, error) + + // PostV0EndpointsWithBodyWithResponse Creates a new endpoint. + // + // Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s). + // + // Corresponds with POST /v0/endpoints (the `PostV0Endpoints` operationId). + PostV0EndpointsWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostV0EndpointsResponse, error) + + // PostV0EndpointsWithResponse Creates a new endpoint. + // + // Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s). + // + // Corresponds with POST /v0/endpoints (the `PostV0Endpoints` operationId). + PostV0EndpointsWithResponse(ctx context.Context, body PostV0EndpointsJSONRequestBody, reqEditors ...RequestEditorFn) (*PostV0EndpointsResponse, error) + + // PostV0EndpointsBulkStatusWithBodyWithResponse Pause or unpause multiple endpoints in a single call. + // + // Pause or unpause multiple endpoints in a single call. Admin-only. + // + // Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s). + // + // Corresponds with POST /v0/endpoints/bulk/status (the `PostV0EndpointsBulkStatus` operationId). + PostV0EndpointsBulkStatusWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostV0EndpointsBulkStatusResponse, error) + + // PostV0EndpointsBulkStatusWithResponse Pause or unpause multiple endpoints in a single call. + // + // Pause or unpause multiple endpoints in a single call. Admin-only. + // + // Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s). + // + // Corresponds with POST /v0/endpoints/bulk/status (the `PostV0EndpointsBulkStatus` operationId). + PostV0EndpointsBulkStatusWithResponse(ctx context.Context, body PostV0EndpointsBulkStatusJSONRequestBody, reqEditors ...RequestEditorFn) (*PostV0EndpointsBulkStatusResponse, error) + + // DeleteV0EndpointsBulkTagsWithBodyWithResponse Remove a tag from multiple endpoints in a single call. + // + // Remove a tag from multiple endpoints in a single call. Admin-only. + // + // Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s). + // + // Corresponds with DELETE /v0/endpoints/bulk/tags (the `DeleteV0EndpointsBulkTags` operationId). + DeleteV0EndpointsBulkTagsWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*DeleteV0EndpointsBulkTagsResponse, error) + + // DeleteV0EndpointsBulkTagsWithResponse Remove a tag from multiple endpoints in a single call. + // + // Remove a tag from multiple endpoints in a single call. Admin-only. + // + // Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s). + // + // Corresponds with DELETE /v0/endpoints/bulk/tags (the `DeleteV0EndpointsBulkTags` operationId). + DeleteV0EndpointsBulkTagsWithResponse(ctx context.Context, body DeleteV0EndpointsBulkTagsJSONRequestBody, reqEditors ...RequestEditorFn) (*DeleteV0EndpointsBulkTagsResponse, error) + + // PostV0EndpointsBulkTagsWithBodyWithResponse Add a tag to multiple endpoints in a single call. + // + // Add a tag to multiple endpoints in a single call. Admin-only. + // + // Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s). + // + // Corresponds with POST /v0/endpoints/bulk/tags (the `PostV0EndpointsBulkTags` operationId). + PostV0EndpointsBulkTagsWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostV0EndpointsBulkTagsResponse, error) + + // PostV0EndpointsBulkTagsWithResponse Add a tag to multiple endpoints in a single call. + // + // Add a tag to multiple endpoints in a single call. Admin-only. + // + // Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s). + // + // Corresponds with POST /v0/endpoints/bulk/tags (the `PostV0EndpointsBulkTags` operationId). + PostV0EndpointsBulkTagsWithResponse(ctx context.Context, body PostV0EndpointsBulkTagsJSONRequestBody, reqEditors ...RequestEditorFn) (*PostV0EndpointsBulkTagsResponse, error) + + // GetV0EndpointsTagsWithResponse Returns all account-level tags including those with zero endpoints. + // + // Returns all account-level tags including those with zero endpoints. Gated at Build/Growth+. + // + // Returns a wrapper object for the known response body format(s). + // + // Corresponds with GET /v0/endpoints/tags (the `GetV0EndpointsTags` operationId). + GetV0EndpointsTagsWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetV0EndpointsTagsResponse, error) + + // DeleteV0EndpointsTagsByIdWithResponse Deletes an account tag. + // + // Deletes an account tag. The tag must be removed from all endpoints before it can be deleted. Admin-only. + // + // Returns a wrapper object for the known response body format(s). + // + // Corresponds with DELETE /v0/endpoints/tags/{id} (the `DeleteV0EndpointsTagsById` operationId). + DeleteV0EndpointsTagsByIdWithResponse(ctx context.Context, id int, reqEditors ...RequestEditorFn) (*DeleteV0EndpointsTagsByIdResponse, error) + + // PatchV0EndpointsTagsByIdWithBodyWithResponse Renames an account tag. + // + // Renames an account tag. Because the tag is shared across endpoints, all associated endpoints reflect the new label immediately. Admin-only. + // + // Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s). + // + // Corresponds with PATCH /v0/endpoints/tags/{id} (the `PatchV0EndpointsTagsById` operationId). + PatchV0EndpointsTagsByIdWithBodyWithResponse(ctx context.Context, id int, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PatchV0EndpointsTagsByIdResponse, error) + + // PatchV0EndpointsTagsByIdWithResponse Renames an account tag. + // + // Renames an account tag. Because the tag is shared across endpoints, all associated endpoints reflect the new label immediately. Admin-only. + // + // Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s). + // + // Corresponds with PATCH /v0/endpoints/tags/{id} (the `PatchV0EndpointsTagsById` operationId). + PatchV0EndpointsTagsByIdWithResponse(ctx context.Context, id int, body PatchV0EndpointsTagsByIdJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchV0EndpointsTagsByIdResponse, error) + + // DeleteV0EndpointsByIdWithResponse Deletes an endpoint. + // + // Returns a wrapper object for the known response body format(s). + // + // Corresponds with DELETE /v0/endpoints/{id} (the `DeleteV0EndpointsById` operationId). + DeleteV0EndpointsByIdWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*DeleteV0EndpointsByIdResponse, error) + + // GetV0EndpointsByIdWithResponse Returns info for a specific endpoint. + // + // Returns a wrapper object for the known response body format(s). + // + // Corresponds with GET /v0/endpoints/{id} (the `GetV0EndpointsById` operationId). + GetV0EndpointsByIdWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*GetV0EndpointsByIdResponse, error) + + // PatchV0EndpointsByIdWithBodyWithResponse Updates an endpoint. + // + // Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s). + // + // Corresponds with PATCH /v0/endpoints/{id} (the `PatchV0EndpointsById` operationId). + PatchV0EndpointsByIdWithBodyWithResponse(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PatchV0EndpointsByIdResponse, error) + + // PatchV0EndpointsByIdWithResponse Updates an endpoint. + // + // Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s). + // + // Corresponds with PATCH /v0/endpoints/{id} (the `PatchV0EndpointsById` operationId). + PatchV0EndpointsByIdWithResponse(ctx context.Context, id string, body PatchV0EndpointsByIdJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchV0EndpointsByIdResponse, error) + + // PostV0EndpointsByIdDisableMultichainWithResponse Disables multichain for a specific endpoint. + // + // Returns a wrapper object for the known response body format(s). + // + // Corresponds with POST /v0/endpoints/{id}/disable_multichain (the `PostV0EndpointsByIdDisableMultichain` operationId). + PostV0EndpointsByIdDisableMultichainWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*PostV0EndpointsByIdDisableMultichainResponse, error) + + // PostV0EndpointsByIdEnableMultichainWithResponse Enables multichain for a specific endpoint. + // + // Returns a wrapper object for the known response body format(s). + // + // Corresponds with POST /v0/endpoints/{id}/enable_multichain (the `PostV0EndpointsByIdEnableMultichain` operationId). + PostV0EndpointsByIdEnableMultichainWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*PostV0EndpointsByIdEnableMultichainResponse, error) + + // DeleteV0EndpointsByIdIpCustomHeaderWithResponse Deletes the IP custom header for a specific endpoint. + // + // Returns a wrapper object for the known response body format(s). + // + // Corresponds with DELETE /v0/endpoints/{id}/ip_custom_header (the `DeleteV0EndpointsByIdIpCustomHeader` operationId). + DeleteV0EndpointsByIdIpCustomHeaderWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*DeleteV0EndpointsByIdIpCustomHeaderResponse, error) + + // PatchV0EndpointsByIdIpCustomHeaderWithBodyWithResponse Creates or updates an IP custom header for a specific endpoint. + // + // Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s). + // + // Corresponds with PATCH /v0/endpoints/{id}/ip_custom_header (the `PatchV0EndpointsByIdIpCustomHeader` operationId). + PatchV0EndpointsByIdIpCustomHeaderWithBodyWithResponse(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PatchV0EndpointsByIdIpCustomHeaderResponse, error) + + // PatchV0EndpointsByIdIpCustomHeaderWithResponse Creates or updates an IP custom header for a specific endpoint. + // + // Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s). + // + // Corresponds with PATCH /v0/endpoints/{id}/ip_custom_header (the `PatchV0EndpointsByIdIpCustomHeader` operationId). + PatchV0EndpointsByIdIpCustomHeaderWithResponse(ctx context.Context, id string, body PatchV0EndpointsByIdIpCustomHeaderJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchV0EndpointsByIdIpCustomHeaderResponse, error) + + // GetV0EndpointsByIdLogDetailsWithResponse Retrieves detailed request and response information for a specific log entry. + // + // Returns a wrapper object for the known response body format(s). + // + // Corresponds with GET /v0/endpoints/{id}/log_details (the `GetV0EndpointsByIdLogDetails` operationId). + GetV0EndpointsByIdLogDetailsWithResponse(ctx context.Context, id string, params *GetV0EndpointsByIdLogDetailsParams, reqEditors ...RequestEditorFn) (*GetV0EndpointsByIdLogDetailsResponse, error) + + // GetV0EndpointsByIdLogsWithResponse Retrieves logs for a specific endpoint with filtering and pagination options. + // + // Returns a wrapper object for the known response body format(s). + // + // Corresponds with GET /v0/endpoints/{id}/logs (the `GetV0EndpointsByIdLogs` operationId). + GetV0EndpointsByIdLogsWithResponse(ctx context.Context, id string, params *GetV0EndpointsByIdLogsParams, reqEditors ...RequestEditorFn) (*GetV0EndpointsByIdLogsResponse, error) + + // GetV0EndpointsByIdMethodRateLimitsWithResponse Lists method rate limits, including whether each limit applies per client IP or to the endpoint as a whole. + // + // Returns a wrapper object for the known response body format(s). + // + // Corresponds with GET /v0/endpoints/{id}/method-rate-limits (the `GetV0EndpointsByIdMethodRateLimits` operationId). + GetV0EndpointsByIdMethodRateLimitsWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*GetV0EndpointsByIdMethodRateLimitsResponse, error) + + // PostV0EndpointsByIdMethodRateLimitsWithBodyWithResponse Creates a method rate limit per client IP or for the endpoint as a whole. + // + // Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s). + // + // Corresponds with POST /v0/endpoints/{id}/method-rate-limits (the `PostV0EndpointsByIdMethodRateLimits` operationId). + PostV0EndpointsByIdMethodRateLimitsWithBodyWithResponse(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostV0EndpointsByIdMethodRateLimitsResponse, error) + + // PostV0EndpointsByIdMethodRateLimitsWithResponse Creates a method rate limit per client IP or for the endpoint as a whole. + // + // Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s). + // + // Corresponds with POST /v0/endpoints/{id}/method-rate-limits (the `PostV0EndpointsByIdMethodRateLimits` operationId). + PostV0EndpointsByIdMethodRateLimitsWithResponse(ctx context.Context, id string, body PostV0EndpointsByIdMethodRateLimitsJSONRequestBody, reqEditors ...RequestEditorFn) (*PostV0EndpointsByIdMethodRateLimitsResponse, error) + + // DeleteV0EndpointsByIdMethodRateLimitsByMethodRateLimitIdWithResponse Deletes a method rate limit. + // + // Returns a wrapper object for the known response body format(s). + // + // Corresponds with DELETE /v0/endpoints/{id}/method-rate-limits/{method_rate_limit_id} (the `DeleteV0EndpointsByIdMethodRateLimitsByMethodRateLimitId` operationId). + DeleteV0EndpointsByIdMethodRateLimitsByMethodRateLimitIdWithResponse(ctx context.Context, id string, methodRateLimitId string, reqEditors ...RequestEditorFn) (*DeleteV0EndpointsByIdMethodRateLimitsByMethodRateLimitIdResponse, error) + + // PatchV0EndpointsByIdMethodRateLimitsByMethodRateLimitIdWithBodyWithResponse Updates a method rate limit. + // + // Updates a method rate limit. Send only the fields to change; omitted fields retain their current values. + // + // Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s). + // + // Corresponds with PATCH /v0/endpoints/{id}/method-rate-limits/{method_rate_limit_id} (the `PatchV0EndpointsByIdMethodRateLimitsByMethodRateLimitId` operationId). + PatchV0EndpointsByIdMethodRateLimitsByMethodRateLimitIdWithBodyWithResponse(ctx context.Context, id string, methodRateLimitId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PatchV0EndpointsByIdMethodRateLimitsByMethodRateLimitIdResponse, error) + + // PatchV0EndpointsByIdMethodRateLimitsByMethodRateLimitIdWithResponse Updates a method rate limit. + // + // Updates a method rate limit. Send only the fields to change; omitted fields retain their current values. + // + // Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s). + // + // Corresponds with PATCH /v0/endpoints/{id}/method-rate-limits/{method_rate_limit_id} (the `PatchV0EndpointsByIdMethodRateLimitsByMethodRateLimitId` operationId). + PatchV0EndpointsByIdMethodRateLimitsByMethodRateLimitIdWithResponse(ctx context.Context, id string, methodRateLimitId string, body PatchV0EndpointsByIdMethodRateLimitsByMethodRateLimitIdJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchV0EndpointsByIdMethodRateLimitsByMethodRateLimitIdResponse, error) + + // GetV0EndpointsByIdMetricsWithResponse Returns a single metric. + // + // Returns a wrapper object for the known response body format(s). + // + // Corresponds with GET /v0/endpoints/{id}/metrics (the `GetV0EndpointsByIdMetrics` operationId). + GetV0EndpointsByIdMetricsWithResponse(ctx context.Context, id string, params *GetV0EndpointsByIdMetricsParams, reqEditors ...RequestEditorFn) (*GetV0EndpointsByIdMetricsResponse, error) + + // PostV0EndpointsByIdMetricsErrorsSummaryWithResponse Returns RPC and HTTP error counts for one endpoint for a time range. + // + // Returns a wrapper object for the known response body format(s). + // + // Corresponds with POST /v0/endpoints/{id}/metrics/errors/summary (the `PostV0EndpointsByIdMetricsErrorsSummary` operationId). + PostV0EndpointsByIdMetricsErrorsSummaryWithResponse(ctx context.Context, id string, params *PostV0EndpointsByIdMetricsErrorsSummaryParams, reqEditors ...RequestEditorFn) (*PostV0EndpointsByIdMetricsErrorsSummaryResponse, error) + + // GetV0EndpointsByIdRateLimitsWithResponse Gets endpoint rate limits. + // + // Gets endpoint rate limits. The response returns an array with the source for each rate limit, including plan defaults and user-set overrides. + // + // Returns a wrapper object for the known response body format(s). + // + // Corresponds with GET /v0/endpoints/{id}/rate-limits (the `GetV0EndpointsByIdRateLimits` operationId). + GetV0EndpointsByIdRateLimitsWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*GetV0EndpointsByIdRateLimitsResponse, error) + + // PatchV0EndpointsByIdRateLimitsWithBodyWithResponse Updates endpoint rate limits. + // + // Updates endpoint rate limits. Only rate limits specified in the payload are updated; omitted rate limits remain unchanged. Set limit_by_ip to apply the endpoint rate limits to each client IP address. The response returns the effective endpoint-level limits as a flat limits object. + // + // Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s). + // + // Corresponds with PATCH /v0/endpoints/{id}/rate-limits (the `PatchV0EndpointsByIdRateLimits` operationId). + PatchV0EndpointsByIdRateLimitsWithBodyWithResponse(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PatchV0EndpointsByIdRateLimitsResponse, error) + + // PatchV0EndpointsByIdRateLimitsWithResponse Updates endpoint rate limits. + // + // Updates endpoint rate limits. Only rate limits specified in the payload are updated; omitted rate limits remain unchanged. Set limit_by_ip to apply the endpoint rate limits to each client IP address. The response returns the effective endpoint-level limits as a flat limits object. + // + // Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s). + // + // Corresponds with PATCH /v0/endpoints/{id}/rate-limits (the `PatchV0EndpointsByIdRateLimits` operationId). + PatchV0EndpointsByIdRateLimitsWithResponse(ctx context.Context, id string, body PatchV0EndpointsByIdRateLimitsJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchV0EndpointsByIdRateLimitsResponse, error) + + // DeleteV0EndpointsByIdRateLimitsByOverrideIdWithResponse Deletes a user-set endpoint rate limit by UUID. + // + // Returns a wrapper object for the known response body format(s). + // + // Corresponds with DELETE /v0/endpoints/{id}/rate-limits/{override_id} (the `DeleteV0EndpointsByIdRateLimitsByOverrideId` operationId). + DeleteV0EndpointsByIdRateLimitsByOverrideIdWithResponse(ctx context.Context, id string, overrideId string, reqEditors ...RequestEditorFn) (*DeleteV0EndpointsByIdRateLimitsByOverrideIdResponse, error) + + // GetV0EndpointsByIdSecurityWithResponse Returns full security state (tokens, JWTs, IPs, referrers, domain masks, request filters, options) without fetching the + // + // Returns full security state (tokens, JWTs, IPs, referrers, domain masks, request filters, options) without fetching the full endpoint. + // + // Returns a wrapper object for the known response body format(s). + // + // Corresponds with GET /v0/endpoints/{id}/security (the `GetV0EndpointsByIdSecurity` operationId). + GetV0EndpointsByIdSecurityWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*GetV0EndpointsByIdSecurityResponse, error) + + // PostV0EndpointsByIdSecurityDomainMasksWithBodyWithResponse Create an endpoint domain mask. + // + // Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s). + // + // Corresponds with POST /v0/endpoints/{id}/security/domain_masks (the `PostV0EndpointsByIdSecurityDomainMasks` operationId). + PostV0EndpointsByIdSecurityDomainMasksWithBodyWithResponse(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostV0EndpointsByIdSecurityDomainMasksResponse, error) + + // PostV0EndpointsByIdSecurityDomainMasksWithResponse Create an endpoint domain mask. + // + // Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s). + // + // Corresponds with POST /v0/endpoints/{id}/security/domain_masks (the `PostV0EndpointsByIdSecurityDomainMasks` operationId). + PostV0EndpointsByIdSecurityDomainMasksWithResponse(ctx context.Context, id string, body PostV0EndpointsByIdSecurityDomainMasksJSONRequestBody, reqEditors ...RequestEditorFn) (*PostV0EndpointsByIdSecurityDomainMasksResponse, error) + + // DeleteV0EndpointsByIdSecurityDomainMasksByDomainMaskIdWithResponse Deletes an existing endpoint domain mask. + // + // Returns a wrapper object for the known response body format(s). + // + // Corresponds with DELETE /v0/endpoints/{id}/security/domain_masks/{domain_mask_id} (the `DeleteV0EndpointsByIdSecurityDomainMasksByDomainMaskId` operationId). + DeleteV0EndpointsByIdSecurityDomainMasksByDomainMaskIdWithResponse(ctx context.Context, id string, domainMaskId string, reqEditors ...RequestEditorFn) (*DeleteV0EndpointsByIdSecurityDomainMasksByDomainMaskIdResponse, error) + + // PostV0EndpointsByIdSecurityIpsWithBodyWithResponse Creates a new endpoint IP. + // + // Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s). + // + // Corresponds with POST /v0/endpoints/{id}/security/ips (the `PostV0EndpointsByIdSecurityIps` operationId). + PostV0EndpointsByIdSecurityIpsWithBodyWithResponse(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostV0EndpointsByIdSecurityIpsResponse, error) + + // PostV0EndpointsByIdSecurityIpsWithResponse Creates a new endpoint IP. + // + // Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s). + // + // Corresponds with POST /v0/endpoints/{id}/security/ips (the `PostV0EndpointsByIdSecurityIps` operationId). + PostV0EndpointsByIdSecurityIpsWithResponse(ctx context.Context, id string, body PostV0EndpointsByIdSecurityIpsJSONRequestBody, reqEditors ...RequestEditorFn) (*PostV0EndpointsByIdSecurityIpsResponse, error) + + // DeleteV0EndpointsByIdSecurityIpsByIpIdWithResponse Deletes an existing endpoint IP. + // + // Returns a wrapper object for the known response body format(s). + // + // Corresponds with DELETE /v0/endpoints/{id}/security/ips/{ip_id} (the `DeleteV0EndpointsByIdSecurityIpsByIpId` operationId). + DeleteV0EndpointsByIdSecurityIpsByIpIdWithResponse(ctx context.Context, id string, ipId string, reqEditors ...RequestEditorFn) (*DeleteV0EndpointsByIdSecurityIpsByIpIdResponse, error) + + // PostV0EndpointsByIdSecurityJwtsWithBodyWithResponse Creates a new endpoint JWT. + // + // Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s). + // + // Corresponds with POST /v0/endpoints/{id}/security/jwts (the `PostV0EndpointsByIdSecurityJwts` operationId). + PostV0EndpointsByIdSecurityJwtsWithBodyWithResponse(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostV0EndpointsByIdSecurityJwtsResponse, error) + + // PostV0EndpointsByIdSecurityJwtsWithResponse Creates a new endpoint JWT. + // + // Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s). + // + // Corresponds with POST /v0/endpoints/{id}/security/jwts (the `PostV0EndpointsByIdSecurityJwts` operationId). + PostV0EndpointsByIdSecurityJwtsWithResponse(ctx context.Context, id string, body PostV0EndpointsByIdSecurityJwtsJSONRequestBody, reqEditors ...RequestEditorFn) (*PostV0EndpointsByIdSecurityJwtsResponse, error) + + // DeleteV0EndpointsByIdSecurityJwtsByJwtIdWithResponse Deletes an existing endpoint JWT. + // + // Returns a wrapper object for the known response body format(s). + // + // Corresponds with DELETE /v0/endpoints/{id}/security/jwts/{jwt_id} (the `DeleteV0EndpointsByIdSecurityJwtsByJwtId` operationId). + DeleteV0EndpointsByIdSecurityJwtsByJwtIdWithResponse(ctx context.Context, id string, jwtId string, reqEditors ...RequestEditorFn) (*DeleteV0EndpointsByIdSecurityJwtsByJwtIdResponse, error) + + // PostV0EndpointsByIdSecurityReferrersWithBodyWithResponse Creates a new endpoint referrer. + // + // Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s). + // + // Corresponds with POST /v0/endpoints/{id}/security/referrers (the `PostV0EndpointsByIdSecurityReferrers` operationId). + PostV0EndpointsByIdSecurityReferrersWithBodyWithResponse(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostV0EndpointsByIdSecurityReferrersResponse, error) + + // PostV0EndpointsByIdSecurityReferrersWithResponse Creates a new endpoint referrer. + // + // Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s). + // + // Corresponds with POST /v0/endpoints/{id}/security/referrers (the `PostV0EndpointsByIdSecurityReferrers` operationId). + PostV0EndpointsByIdSecurityReferrersWithResponse(ctx context.Context, id string, body PostV0EndpointsByIdSecurityReferrersJSONRequestBody, reqEditors ...RequestEditorFn) (*PostV0EndpointsByIdSecurityReferrersResponse, error) + + // DeleteV0EndpointsByIdSecurityReferrersByReferrerIdWithResponse Deletes an existing endpoint referrer. + // + // Returns a wrapper object for the known response body format(s). + // + // Corresponds with DELETE /v0/endpoints/{id}/security/referrers/{referrer_id} (the `DeleteV0EndpointsByIdSecurityReferrersByReferrerId` operationId). + DeleteV0EndpointsByIdSecurityReferrersByReferrerIdWithResponse(ctx context.Context, id string, referrerId string, reqEditors ...RequestEditorFn) (*DeleteV0EndpointsByIdSecurityReferrersByReferrerIdResponse, error) + + // PostV0EndpointsByIdSecurityRequestFiltersWithBodyWithResponse Creates a new endpoint request filter for method whitelisting. + // + // Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s). + // + // Corresponds with POST /v0/endpoints/{id}/security/request_filters (the `PostV0EndpointsByIdSecurityRequestFilters` operationId). + PostV0EndpointsByIdSecurityRequestFiltersWithBodyWithResponse(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostV0EndpointsByIdSecurityRequestFiltersResponse, error) + + // PostV0EndpointsByIdSecurityRequestFiltersWithResponse Creates a new endpoint request filter for method whitelisting. + // + // Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s). + // + // Corresponds with POST /v0/endpoints/{id}/security/request_filters (the `PostV0EndpointsByIdSecurityRequestFilters` operationId). + PostV0EndpointsByIdSecurityRequestFiltersWithResponse(ctx context.Context, id string, body PostV0EndpointsByIdSecurityRequestFiltersJSONRequestBody, reqEditors ...RequestEditorFn) (*PostV0EndpointsByIdSecurityRequestFiltersResponse, error) + + // DeleteV0EndpointsByIdSecurityRequestFiltersByRequestFilterIdWithResponse Deletes an existing endpoint request filter. + // + // Returns a wrapper object for the known response body format(s). + // + // Corresponds with DELETE /v0/endpoints/{id}/security/request_filters/{request_filter_id} (the `DeleteV0EndpointsByIdSecurityRequestFiltersByRequestFilterId` operationId). + DeleteV0EndpointsByIdSecurityRequestFiltersByRequestFilterIdWithResponse(ctx context.Context, id string, requestFilterId string, reqEditors ...RequestEditorFn) (*DeleteV0EndpointsByIdSecurityRequestFiltersByRequestFilterIdResponse, error) + + // PutV0EndpointsByIdSecurityRequestFiltersByRequestFilterIdWithBodyWithResponse Updates an existing endpoint request filter. + // + // Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s). + // + // Corresponds with PUT /v0/endpoints/{id}/security/request_filters/{request_filter_id} (the `PutV0EndpointsByIdSecurityRequestFiltersByRequestFilterId` operationId). + PutV0EndpointsByIdSecurityRequestFiltersByRequestFilterIdWithBodyWithResponse(ctx context.Context, id string, requestFilterId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PutV0EndpointsByIdSecurityRequestFiltersByRequestFilterIdResponse, error) + + // PutV0EndpointsByIdSecurityRequestFiltersByRequestFilterIdWithResponse Updates an existing endpoint request filter. + // + // Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s). + // + // Corresponds with PUT /v0/endpoints/{id}/security/request_filters/{request_filter_id} (the `PutV0EndpointsByIdSecurityRequestFiltersByRequestFilterId` operationId). + PutV0EndpointsByIdSecurityRequestFiltersByRequestFilterIdWithResponse(ctx context.Context, id string, requestFilterId string, body PutV0EndpointsByIdSecurityRequestFiltersByRequestFilterIdJSONRequestBody, reqEditors ...RequestEditorFn) (*PutV0EndpointsByIdSecurityRequestFiltersByRequestFilterIdResponse, error) + + // PostV0EndpointsByIdSecurityTokensWithResponse Creates a new endpoint authentication token. + // + // Returns a wrapper object for the known response body format(s). + // + // Corresponds with POST /v0/endpoints/{id}/security/tokens (the `PostV0EndpointsByIdSecurityTokens` operationId). + PostV0EndpointsByIdSecurityTokensWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*PostV0EndpointsByIdSecurityTokensResponse, error) + + // DeleteV0EndpointsByIdSecurityTokensByTokenIdWithResponse Deletes an existing endpoint token. + // + // Returns a wrapper object for the known response body format(s). + // + // Corresponds with DELETE /v0/endpoints/{id}/security/tokens/{token_id} (the `DeleteV0EndpointsByIdSecurityTokensByTokenId` operationId). + DeleteV0EndpointsByIdSecurityTokensByTokenIdWithResponse(ctx context.Context, id string, tokenId string, reqEditors ...RequestEditorFn) (*DeleteV0EndpointsByIdSecurityTokensByTokenIdResponse, error) + + // GetV0EndpointsByIdSecurityOptionsWithResponse Gets security options for an endpoint. + // + // Returns a wrapper object for the known response body format(s). + // + // Corresponds with GET /v0/endpoints/{id}/security_options (the `GetV0EndpointsByIdSecurityOptions` operationId). + GetV0EndpointsByIdSecurityOptionsWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*GetV0EndpointsByIdSecurityOptionsResponse, error) + + // PatchV0EndpointsByIdSecurityOptionsWithBodyWithResponse Updates security options for an endpoint. // - // Remove a tag from multiple endpoints in a single call. Admin-only. + // Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s). + // + // Corresponds with PATCH /v0/endpoints/{id}/security_options (the `PatchV0EndpointsByIdSecurityOptions` operationId). + PatchV0EndpointsByIdSecurityOptionsWithBodyWithResponse(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PatchV0EndpointsByIdSecurityOptionsResponse, error) + + // PatchV0EndpointsByIdSecurityOptionsWithResponse Updates security options for an endpoint. + // + // Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s). + // + // Corresponds with PATCH /v0/endpoints/{id}/security_options (the `PatchV0EndpointsByIdSecurityOptions` operationId). + PatchV0EndpointsByIdSecurityOptionsWithResponse(ctx context.Context, id string, body PatchV0EndpointsByIdSecurityOptionsJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchV0EndpointsByIdSecurityOptionsResponse, error) + + // PatchV0EndpointsByIdStatusWithBodyWithResponse Pauses or unpauses a specific endpoint by updating its status to either 'active' or 'paused' + // + // Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s). + // + // Corresponds with PATCH /v0/endpoints/{id}/status (the `PatchV0EndpointsByIdStatus` operationId). + PatchV0EndpointsByIdStatusWithBodyWithResponse(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PatchV0EndpointsByIdStatusResponse, error) + + // PatchV0EndpointsByIdStatusWithResponse Pauses or unpauses a specific endpoint by updating its status to either 'active' or 'paused' + // + // Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s). + // + // Corresponds with PATCH /v0/endpoints/{id}/status (the `PatchV0EndpointsByIdStatus` operationId). + PatchV0EndpointsByIdStatusWithResponse(ctx context.Context, id string, body PatchV0EndpointsByIdStatusJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchV0EndpointsByIdStatusResponse, error) + + // GetV0EndpointsByIdTagsWithResponse Returns all tags for a specific endpoint. + // + // Returns a wrapper object for the known response body format(s). + // + // Corresponds with GET /v0/endpoints/{id}/tags (the `GetV0EndpointsByIdTags` operationId). + GetV0EndpointsByIdTagsWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*GetV0EndpointsByIdTagsResponse, error) + + // PostV0EndpointsByIdTagsWithBodyWithResponse Creates a new tag for a specific endpoint. + // + // Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s). + // + // Corresponds with POST /v0/endpoints/{id}/tags (the `PostV0EndpointsByIdTags` operationId). + PostV0EndpointsByIdTagsWithBodyWithResponse(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostV0EndpointsByIdTagsResponse, error) + + // PostV0EndpointsByIdTagsWithResponse Creates a new tag for a specific endpoint. + // + // Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s). + // + // Corresponds with POST /v0/endpoints/{id}/tags (the `PostV0EndpointsByIdTags` operationId). + PostV0EndpointsByIdTagsWithResponse(ctx context.Context, id string, body PostV0EndpointsByIdTagsJSONRequestBody, reqEditors ...RequestEditorFn) (*PostV0EndpointsByIdTagsResponse, error) + + // DeleteV0EndpointsByIdTagsByTagIdWithResponse Deletes a tag from a specific endpoint. + // + // Returns a wrapper object for the known response body format(s). + // + // Corresponds with DELETE /v0/endpoints/{id}/tags/{tag_id} (the `DeleteV0EndpointsByIdTagsByTagId` operationId). + DeleteV0EndpointsByIdTagsByTagIdWithResponse(ctx context.Context, id string, tagId string, reqEditors ...RequestEditorFn) (*DeleteV0EndpointsByIdTagsByTagIdResponse, error) + + // GetV0EndpointsByIdUrlsWithResponse Returns the URLs for a specific endpoint. + // + // Returns the URLs for a specific endpoint. For multichain endpoints, the response also includes a `multichain_urls` map with the URLs for every supported network. + // + // Returns a wrapper object for the known response body format(s). + // + // Corresponds with GET /v0/endpoints/{id}/urls (the `GetV0EndpointsByIdUrls` operationId). + GetV0EndpointsByIdUrlsWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*GetV0EndpointsByIdUrlsResponse, error) + + // GetV0MetricsWithResponse Fetches metrics aggregated across all endpoints for an account. + // + // Returns a wrapper object for the known response body format(s). + // + // Corresponds with GET /v0/metrics (the `GetV0Metrics` operationId). + GetV0MetricsWithResponse(ctx context.Context, params *GetV0MetricsParams, reqEditors ...RequestEditorFn) (*GetV0MetricsResponse, error) + + // PostV0MetricsErrorsSummaryWithResponse Returns account RPC and HTTP error counts for a time range. + // + // Returns a wrapper object for the known response body format(s). + // + // Corresponds with POST /v0/metrics/errors/summary (the `PostV0MetricsErrorsSummary` operationId). + PostV0MetricsErrorsSummaryWithResponse(ctx context.Context, params *PostV0MetricsErrorsSummaryParams, reqEditors ...RequestEditorFn) (*PostV0MetricsErrorsSummaryResponse, error) + + // PostV0MetricsTrafficSummaryWithResponse Returns successful requests, transferred bytes, credits, and distinct active methods for a time range. + // + // Returns a wrapper object for the known response body format(s). + // + // Corresponds with POST /v0/metrics/traffic/summary (the `PostV0MetricsTrafficSummary` operationId). + PostV0MetricsTrafficSummaryWithResponse(ctx context.Context, params *PostV0MetricsTrafficSummaryParams, reqEditors ...RequestEditorFn) (*PostV0MetricsTrafficSummaryResponse, error) + + // GetV0TeamsWithResponse Retrieves a list of all teams. + // + // Returns a wrapper object for the known response body format(s). + // + // Corresponds with GET /v0/teams (the `GetV0Teams` operationId). + GetV0TeamsWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetV0TeamsResponse, error) + + // PostV0TeamsWithBodyWithResponse Creates a new team. + // + // Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s). + // + // Corresponds with POST /v0/teams (the `PostV0Teams` operationId). + PostV0TeamsWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostV0TeamsResponse, error) + + // PostV0TeamsWithResponse Creates a new team. + // + // Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s). + // + // Corresponds with POST /v0/teams (the `PostV0Teams` operationId). + PostV0TeamsWithResponse(ctx context.Context, body PostV0TeamsJSONRequestBody, reqEditors ...RequestEditorFn) (*PostV0TeamsResponse, error) + + // DeleteV0TeamsByIdWithResponse Deletes an empty team. + // + // Deletes an empty team. The team must have no members before it can be deleted. + // + // Returns a wrapper object for the known response body format(s). + // + // Corresponds with DELETE /v0/teams/{id} (the `DeleteV0TeamsById` operationId). + DeleteV0TeamsByIdWithResponse(ctx context.Context, id int, reqEditors ...RequestEditorFn) (*DeleteV0TeamsByIdResponse, error) + + // GetV0TeamsByIdWithResponse Retrieves details for a specific team. + // + // Returns a wrapper object for the known response body format(s). + // + // Corresponds with GET /v0/teams/{id} (the `GetV0TeamsById` operationId). + GetV0TeamsByIdWithResponse(ctx context.Context, id int, reqEditors ...RequestEditorFn) (*GetV0TeamsByIdResponse, error) + + // GetV0TeamsByIdEndpointsWithResponse Retrieves a list of endpoints accessible to a team. + // + // Returns a wrapper object for the known response body format(s). + // + // Corresponds with GET /v0/teams/{id}/endpoints (the `GetV0TeamsByIdEndpoints` operationId). + GetV0TeamsByIdEndpointsWithResponse(ctx context.Context, id int, reqEditors ...RequestEditorFn) (*GetV0TeamsByIdEndpointsResponse, error) + + // PatchV0TeamsByIdEndpointsWithBodyWithResponse Assigns or unassigns endpoints to a team. + // + // Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s). + // + // Corresponds with PATCH /v0/teams/{id}/endpoints (the `PatchV0TeamsByIdEndpoints` operationId). + PatchV0TeamsByIdEndpointsWithBodyWithResponse(ctx context.Context, id int, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PatchV0TeamsByIdEndpointsResponse, error) + + // PatchV0TeamsByIdEndpointsWithResponse Assigns or unassigns endpoints to a team. + // + // Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s). + // + // Corresponds with PATCH /v0/teams/{id}/endpoints (the `PatchV0TeamsByIdEndpoints` operationId). + PatchV0TeamsByIdEndpointsWithResponse(ctx context.Context, id int, body PatchV0TeamsByIdEndpointsJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchV0TeamsByIdEndpointsResponse, error) + + // PostV0TeamsByIdMembersWithBodyWithResponse Invites a user to a team. + // + // Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s). + // + // Corresponds with POST /v0/teams/{id}/members (the `PostV0TeamsByIdMembers` operationId). + PostV0TeamsByIdMembersWithBodyWithResponse(ctx context.Context, id int, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostV0TeamsByIdMembersResponse, error) + + // PostV0TeamsByIdMembersWithResponse Invites a user to a team. + // + // Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s). + // + // Corresponds with POST /v0/teams/{id}/members (the `PostV0TeamsByIdMembers` operationId). + PostV0TeamsByIdMembersWithResponse(ctx context.Context, id int, body PostV0TeamsByIdMembersJSONRequestBody, reqEditors ...RequestEditorFn) (*PostV0TeamsByIdMembersResponse, error) + + // DeleteV0TeamsByIdMembersByUserIdWithResponse Removes a user from a team. + // + // Returns a wrapper object for the known response body format(s). + // + // Corresponds with DELETE /v0/teams/{id}/members/{user_id} (the `DeleteV0TeamsByIdMembersByUserId` operationId). + DeleteV0TeamsByIdMembersByUserIdWithResponse(ctx context.Context, id int, userId int, reqEditors ...RequestEditorFn) (*DeleteV0TeamsByIdMembersByUserIdResponse, error) + + // PostV0TeamsByIdMembersByUserIdResendInviteWithResponse Resends an invitation email to a pending team member. + // + // Returns a wrapper object for the known response body format(s). + // + // Corresponds with POST /v0/teams/{id}/members/{user_id}/resend_invite (the `PostV0TeamsByIdMembersByUserIdResendInvite` operationId). + PostV0TeamsByIdMembersByUserIdResendInviteWithResponse(ctx context.Context, id int, userId int, reqEditors ...RequestEditorFn) (*PostV0TeamsByIdMembersByUserIdResendInviteResponse, error) + + // GetV0ToolingAccessWithResponse Returns whether Tooling Access is enabled for the account. + // + // Returns a wrapper object for the known response body format(s). + // + // Corresponds with GET /v0/tooling-access (the `GetV0ToolingAccess` operationId). + GetV0ToolingAccessWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetV0ToolingAccessResponse, error) + + // PatchV0ToolingAccessWithBodyWithResponse Enable (provision/reactivate) or disable Tooling Access for the account. + // + // Enable (provision/reactivate) or disable Tooling Access for the account. Enabling is idempotent and requires an admin role. + // + // Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s). + // + // Corresponds with PATCH /v0/tooling-access (the `PatchV0ToolingAccess` operationId). + PatchV0ToolingAccessWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PatchV0ToolingAccessResponse, error) + + // PatchV0ToolingAccessWithResponse Enable (provision/reactivate) or disable Tooling Access for the account. + // + // Enable (provision/reactivate) or disable Tooling Access for the account. Enabling is idempotent and requires an admin role. + // + // Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s). + // + // Corresponds with PATCH /v0/tooling-access (the `PatchV0ToolingAccess` operationId). + PatchV0ToolingAccessWithResponse(ctx context.Context, body PatchV0ToolingAccessJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchV0ToolingAccessResponse, error) + + // PostV0ToolingAccessTokenWithResponse Mints a short-lived ES256 JWT for authenticating data-plane RPC calls. + // + // Mints a short-lived ES256 JWT for authenticating data-plane RPC calls. Requires Tooling Access to be enabled first. + // + // Returns a wrapper object for the known response body format(s). + // + // Corresponds with POST /v0/tooling-access/token (the `PostV0ToolingAccessToken` operationId). + PostV0ToolingAccessTokenWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*PostV0ToolingAccessTokenResponse, error) + + // PostV0TransactionsWithResponse Lists account transaction submissions for a time range, with cursor pagination. + // + // Returns a wrapper object for the known response body format(s). + // + // Corresponds with POST /v0/transactions (the `PostV0Transactions` operationId). + PostV0TransactionsWithResponse(ctx context.Context, params *PostV0TransactionsParams, reqEditors ...RequestEditorFn) (*PostV0TransactionsResponse, error) + + // PostV0TransactionsByNetworkByHashWithResponse Returns recorded submission attempts for a transaction, optionally including request and response payloads. + // + // Returns a wrapper object for the known response body format(s). + // + // Corresponds with POST /v0/transactions/{network}/{hash} (the `PostV0TransactionsByNetworkByHash` operationId). + PostV0TransactionsByNetworkByHashWithResponse(ctx context.Context, network string, hash string, params *PostV0TransactionsByNetworkByHashParams, reqEditors ...RequestEditorFn) (*PostV0TransactionsByNetworkByHashResponse, error) + + // PostV0UsageCreditsSummaryWithResponse Returns total account API credits for a time range. + // + // Returns a wrapper object for the known response body format(s). + // + // Corresponds with POST /v0/usage/credits/summary (the `PostV0UsageCreditsSummary` operationId). + PostV0UsageCreditsSummaryWithResponse(ctx context.Context, params *PostV0UsageCreditsSummaryParams, reqEditors ...RequestEditorFn) (*PostV0UsageCreditsSummaryResponse, error) + + // GetV0UsageRpcWithResponse Retrieves usage total for specified time range. + // + // Returns a wrapper object for the known response body format(s). + // + // Corresponds with GET /v0/usage/rpc (the `GetV0UsageRpc` operationId). + GetV0UsageRpcWithResponse(ctx context.Context, params *GetV0UsageRpcParams, reqEditors ...RequestEditorFn) (*GetV0UsageRpcResponse, error) + + // GetV0UsageRpcByChainWithResponse Retrieves usage data by chain. + // + // Returns a wrapper object for the known response body format(s). + // + // Corresponds with GET /v0/usage/rpc/by-chain (the `GetV0UsageRpcByChain` operationId). + GetV0UsageRpcByChainWithResponse(ctx context.Context, params *GetV0UsageRpcByChainParams, reqEditors ...RequestEditorFn) (*GetV0UsageRpcByChainResponse, error) + + // GetV0UsageRpcByEndpointWithResponse Retrieves usage data by endpoint. + // + // Returns a wrapper object for the known response body format(s). + // + // Corresponds with GET /v0/usage/rpc/by-endpoint (the `GetV0UsageRpcByEndpoint` operationId). + GetV0UsageRpcByEndpointWithResponse(ctx context.Context, params *GetV0UsageRpcByEndpointParams, reqEditors ...RequestEditorFn) (*GetV0UsageRpcByEndpointResponse, error) + + // GetV0UsageRpcByMethodWithResponse Retrieves usage data by method. + // + // Returns a wrapper object for the known response body format(s). + // + // Corresponds with GET /v0/usage/rpc/by-method (the `GetV0UsageRpcByMethod` operationId). + GetV0UsageRpcByMethodWithResponse(ctx context.Context, params *GetV0UsageRpcByMethodParams, reqEditors ...RequestEditorFn) (*GetV0UsageRpcByMethodResponse, error) + + // GetV0UsageRpcByTagWithResponse Retrieves usage data grouped by tag. + // + // Retrieves usage data grouped by tag. Includes an untagged bucket for endpoints with no tags. + // + // Returns a wrapper object for the known response body format(s). + // + // Corresponds with GET /v0/usage/rpc/by-tag (the `GetV0UsageRpcByTag` operationId). + GetV0UsageRpcByTagWithResponse(ctx context.Context, params *GetV0UsageRpcByTagParams, reqEditors ...RequestEditorFn) (*GetV0UsageRpcByTagResponse, error) + + // PostV0UsageRpcSummaryWithResponse Returns account RPC requests, transferred bytes, and credits for a time range. + // + // Returns a wrapper object for the known response body format(s). + // + // Corresponds with POST /v0/usage/rpc/summary (the `PostV0UsageRpcSummary` operationId). + PostV0UsageRpcSummaryWithResponse(ctx context.Context, params *PostV0UsageRpcSummaryParams, reqEditors ...RequestEditorFn) (*PostV0UsageRpcSummaryResponse, error) + + // PostV0UsageStreamsSummaryWithResponse Returns Streams blocks, transferred bytes, and block credits for a time range. + // + // Returns a wrapper object for the known response body format(s). + // + // Corresponds with POST /v0/usage/streams/summary (the `PostV0UsageStreamsSummary` operationId). + PostV0UsageStreamsSummaryWithResponse(ctx context.Context, params *PostV0UsageStreamsSummaryParams, reqEditors ...RequestEditorFn) (*PostV0UsageStreamsSummaryResponse, error) + + // PostV0UsageWebhooksSummaryWithResponse Returns Webhooks deliveries and credits for a time range. // - // Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s). + // Returns a wrapper object for the known response body format(s). // - // Corresponds with DELETE /v0/endpoints/bulk/tags (the `DeleteV0EndpointsBulkTags` operationId). - DeleteV0EndpointsBulkTagsWithResponse(ctx context.Context, body DeleteV0EndpointsBulkTagsJSONRequestBody, reqEditors ...RequestEditorFn) (*DeleteV0EndpointsBulkTagsResponse, error) + // Corresponds with POST /v0/usage/webhooks/summary (the `PostV0UsageWebhooksSummary` operationId). + PostV0UsageWebhooksSummaryWithResponse(ctx context.Context, params *PostV0UsageWebhooksSummaryParams, reqEditors ...RequestEditorFn) (*PostV0UsageWebhooksSummaryResponse, error) +} + +type GetV0AccountInfoResponse struct { + Body []byte + HTTPResponse *http.Response + // JSON200 the response for an HTTP 200 `application/json` response + JSON200 *struct { + // Data An object which contains the following fields: + Data *struct { + // BillingVersion The billing version associated with the account + BillingVersion *string `json:"billing_version,omitempty"` + + // CreatedAt The timestamp when the account was created + CreatedAt *string `json:"created_at,omitempty"` + + // Id The unique identifier for the account + Id *int `json:"id,omitempty"` + + // Name The name of the account + Name *string `json:"name,omitempty"` + + // Subscription An object containing the account's subscription details: + Subscription *struct { + // Interval The billing interval of the subscription + Interval *string `json:"interval,omitempty"` + + // PlanName The name of the subscription plan + PlanName *string `json:"plan_name,omitempty"` + + // Status The status of the subscription + Status *string `json:"status,omitempty"` + } `json:"subscription,omitempty"` + } `json:"data,omitempty"` + + // Error An error message if any issue occurs + Error *string `json:"error,omitempty"` + } +} + +// GetJSON200 returns the response for an HTTP 200 `application/json` response +func (r GetV0AccountInfoResponse) GetJSON200() *struct { + // Data An object which contains the following fields: + Data *struct { + // BillingVersion The billing version associated with the account + BillingVersion *string `json:"billing_version,omitempty"` + + // CreatedAt The timestamp when the account was created + CreatedAt *string `json:"created_at,omitempty"` + + // Id The unique identifier for the account + Id *int `json:"id,omitempty"` + + // Name The name of the account + Name *string `json:"name,omitempty"` + + // Subscription An object containing the account's subscription details: + Subscription *struct { + // Interval The billing interval of the subscription + Interval *string `json:"interval,omitempty"` + + // PlanName The name of the subscription plan + PlanName *string `json:"plan_name,omitempty"` + + // Status The status of the subscription + Status *string `json:"status,omitempty"` + } `json:"subscription,omitempty"` + } `json:"data,omitempty"` + + // Error An error message if any issue occurs + Error *string `json:"error,omitempty"` +} { + return r.JSON200 +} + +// GetBody returns the raw response body bytes +func (r GetV0AccountInfoResponse) GetBody() []byte { + return r.Body +} + +// Status returns HTTPResponse.Status +func (r GetV0AccountInfoResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetV0AccountInfoResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers +func (r GetV0AccountInfoResponse) ContentType() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Header.Get("Content-Type") + } + return "" +} + +type PostV0ActivityLogsResponse struct { + Body []byte + HTTPResponse *http.Response + // JSON200 the response for an HTTP 200 `application/json` response + JSON200 *struct { + // Data Array of activity log entries, newest first. + Data *[]struct { + // Action What happened, such as created, updated, deleted, paused, invited, member_removed. + Action *string `json:"action,omitempty"` + + // Actor Who made the change. + Actor *struct { + // Email Member's email; null for api_key, quicknode, deleted_user. + Email *string `json:"email,omitempty"` + + // Id User UUID or API key ID; null for quicknode or deleted_user. + Id *string `json:"id,omitempty"` + + // Name Member's name or Quicknode; null for api_key. + Name *string `json:"name,omitempty"` + + // Type One of: user, api_key, quicknode, deleted_user. + Type *string `json:"type,omitempty"` + } `json:"actor,omitempty"` + + // Description Human-readable summary, the same text the dashboard shows. + Description *string `json:"description,omitempty"` + + // Id Stable UUID for the entry. + Id *string `json:"id,omitempty"` + + // OccurredAt When the change happened, in ISO 8601 UTC format. + OccurredAt *string `json:"occurred_at,omitempty"` + + // Target What was changed. + Target *struct { + // Id ID of the thing that changed. + Id *string `json:"id,omitempty"` + + // Kind One of: endpoint, team, member, role, billing, add_on, api_key. + Kind *string `json:"kind,omitempty"` + + // Label Display name of the kind. + Label *string `json:"label,omitempty"` + + // Name Current name where there is one; null otherwise. + Name *string `json:"name,omitempty"` + } `json:"target,omitempty"` + } `json:"data,omitempty"` + + // Error Error message on failure; null on success. + Error *string `json:"error,omitempty"` + + // Pagination Pagination metadata. + Pagination *struct { + // Limit Page size used. + Limit *int `json:"limit,omitempty"` + + // Offset Number of entries skipped. + Offset *int `json:"offset,omitempty"` + + // Total Total count of entries matching the filters. + Total *int `json:"total,omitempty"` + } `json:"pagination,omitempty"` + } +} + +// GetJSON200 returns the response for an HTTP 200 `application/json` response +func (r PostV0ActivityLogsResponse) GetJSON200() *struct { + // Data Array of activity log entries, newest first. + Data *[]struct { + // Action What happened, such as created, updated, deleted, paused, invited, member_removed. + Action *string `json:"action,omitempty"` + + // Actor Who made the change. + Actor *struct { + // Email Member's email; null for api_key, quicknode, deleted_user. + Email *string `json:"email,omitempty"` + + // Id User UUID or API key ID; null for quicknode or deleted_user. + Id *string `json:"id,omitempty"` + + // Name Member's name or Quicknode; null for api_key. + Name *string `json:"name,omitempty"` + + // Type One of: user, api_key, quicknode, deleted_user. + Type *string `json:"type,omitempty"` + } `json:"actor,omitempty"` + + // Description Human-readable summary, the same text the dashboard shows. + Description *string `json:"description,omitempty"` + + // Id Stable UUID for the entry. + Id *string `json:"id,omitempty"` + + // OccurredAt When the change happened, in ISO 8601 UTC format. + OccurredAt *string `json:"occurred_at,omitempty"` + + // Target What was changed. + Target *struct { + // Id ID of the thing that changed. + Id *string `json:"id,omitempty"` + + // Kind One of: endpoint, team, member, role, billing, add_on, api_key. + Kind *string `json:"kind,omitempty"` + + // Label Display name of the kind. + Label *string `json:"label,omitempty"` + + // Name Current name where there is one; null otherwise. + Name *string `json:"name,omitempty"` + } `json:"target,omitempty"` + } `json:"data,omitempty"` + + // Error Error message on failure; null on success. + Error *string `json:"error,omitempty"` + + // Pagination Pagination metadata. + Pagination *struct { + // Limit Page size used. + Limit *int `json:"limit,omitempty"` + + // Offset Number of entries skipped. + Offset *int `json:"offset,omitempty"` + + // Total Total count of entries matching the filters. + Total *int `json:"total,omitempty"` + } `json:"pagination,omitempty"` +} { + return r.JSON200 +} + +// GetBody returns the raw response body bytes +func (r PostV0ActivityLogsResponse) GetBody() []byte { + return r.Body +} + +// Status returns HTTPResponse.Status +func (r PostV0ActivityLogsResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r PostV0ActivityLogsResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers +func (r PostV0ActivityLogsResponse) ContentType() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Header.Get("Content-Type") + } + return "" +} + +type GetV0ActivityLogsFiltersResponse struct { + Body []byte + HTTPResponse *http.Response + // JSON200 the response for an HTTP 200 `application/json` response + JSON200 *struct { + // Data Filter values available for your account. + Data *struct { + // Actors Members and API keys that appear in your log. + Actors *[]struct { + // Id User UUID or API key ID. Use this value for the actor filter. + Id *string `json:"id,omitempty"` + + // Name Member's name; null for API keys. + Name *string `json:"name,omitempty"` + + // Type Either user or api_key. + Type *string `json:"type,omitempty"` + } `json:"actors,omitempty"` + + // Types Entry types you can filter by. + Types *[]struct { + // Label Display name for the type. + Label *string `json:"label,omitempty"` + + // Value Type value to use in the type filter. + Value *string `json:"value,omitempty"` + } `json:"types,omitempty"` + } `json:"data,omitempty"` + + // Error Error message on failure; null on success. + Error *string `json:"error,omitempty"` + } +} + +// GetJSON200 returns the response for an HTTP 200 `application/json` response +func (r GetV0ActivityLogsFiltersResponse) GetJSON200() *struct { + // Data Filter values available for your account. + Data *struct { + // Actors Members and API keys that appear in your log. + Actors *[]struct { + // Id User UUID or API key ID. Use this value for the actor filter. + Id *string `json:"id,omitempty"` + + // Name Member's name; null for API keys. + Name *string `json:"name,omitempty"` + + // Type Either user or api_key. + Type *string `json:"type,omitempty"` + } `json:"actors,omitempty"` + + // Types Entry types you can filter by. + Types *[]struct { + // Label Display name for the type. + Label *string `json:"label,omitempty"` + + // Value Type value to use in the type filter. + Value *string `json:"value,omitempty"` + } `json:"types,omitempty"` + } `json:"data,omitempty"` + + // Error Error message on failure; null on success. + Error *string `json:"error,omitempty"` +} { + return r.JSON200 +} + +// GetBody returns the raw response body bytes +func (r GetV0ActivityLogsFiltersResponse) GetBody() []byte { + return r.Body +} + +// Status returns HTTPResponse.Status +func (r GetV0ActivityLogsFiltersResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetV0ActivityLogsFiltersResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers +func (r GetV0ActivityLogsFiltersResponse) ContentType() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Header.Get("Content-Type") + } + return "" +} + +type GetV0ActivityLogsByIdResponse struct { + Body []byte + HTTPResponse *http.Response + // JSON200 the response for an HTTP 200 `application/json` response + JSON200 *struct { + // Data The activity log entry. + Data *struct { + // Action What happened, such as created, updated, deleted, paused, invited, member_removed. + Action *string `json:"action,omitempty"` + + // Actor Who made the change. + Actor *struct { + // Email Member's email; null for api_key, quicknode, deleted_user. + Email *string `json:"email,omitempty"` + + // Id User UUID or API key ID; null for quicknode or deleted_user. + Id *string `json:"id,omitempty"` + + // Name Member's name or Quicknode; null for api_key. + Name *string `json:"name,omitempty"` + + // Type One of: user, api_key, quicknode, deleted_user. + Type *string `json:"type,omitempty"` + } `json:"actor,omitempty"` + + // Description Human-readable summary, the same text the dashboard shows. + Description *string `json:"description,omitempty"` + + // Id Stable UUID for the entry. + Id *string `json:"id,omitempty"` + + // OccurredAt When the change happened, in ISO 8601 UTC format. + OccurredAt *string `json:"occurred_at,omitempty"` + + // Target What was changed. + Target *struct { + // Id ID of the thing that changed. + Id *string `json:"id,omitempty"` + + // Kind One of: endpoint, team, member, role, billing, add_on, api_key. + Kind *string `json:"kind,omitempty"` + + // Label Display name of the kind. + Label *string `json:"label,omitempty"` + + // Name Current name where there is one; null otherwise. + Name *string `json:"name,omitempty"` + } `json:"target,omitempty"` + } `json:"data,omitempty"` + + // Error Error message on failure; null on success. + Error *string `json:"error,omitempty"` + } +} + +// GetJSON200 returns the response for an HTTP 200 `application/json` response +func (r GetV0ActivityLogsByIdResponse) GetJSON200() *struct { + // Data The activity log entry. + Data *struct { + // Action What happened, such as created, updated, deleted, paused, invited, member_removed. + Action *string `json:"action,omitempty"` + + // Actor Who made the change. + Actor *struct { + // Email Member's email; null for api_key, quicknode, deleted_user. + Email *string `json:"email,omitempty"` + + // Id User UUID or API key ID; null for quicknode or deleted_user. + Id *string `json:"id,omitempty"` + + // Name Member's name or Quicknode; null for api_key. + Name *string `json:"name,omitempty"` + + // Type One of: user, api_key, quicknode, deleted_user. + Type *string `json:"type,omitempty"` + } `json:"actor,omitempty"` + + // Description Human-readable summary, the same text the dashboard shows. + Description *string `json:"description,omitempty"` + + // Id Stable UUID for the entry. + Id *string `json:"id,omitempty"` + + // OccurredAt When the change happened, in ISO 8601 UTC format. + OccurredAt *string `json:"occurred_at,omitempty"` + + // Target What was changed. + Target *struct { + // Id ID of the thing that changed. + Id *string `json:"id,omitempty"` + + // Kind One of: endpoint, team, member, role, billing, add_on, api_key. + Kind *string `json:"kind,omitempty"` + + // Label Display name of the kind. + Label *string `json:"label,omitempty"` + + // Name Current name where there is one; null otherwise. + Name *string `json:"name,omitempty"` + } `json:"target,omitempty"` + } `json:"data,omitempty"` + + // Error Error message on failure; null on success. + Error *string `json:"error,omitempty"` +} { + return r.JSON200 +} + +// GetBody returns the raw response body bytes +func (r GetV0ActivityLogsByIdResponse) GetBody() []byte { + return r.Body +} + +// Status returns HTTPResponse.Status +func (r GetV0ActivityLogsByIdResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetV0ActivityLogsByIdResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers +func (r GetV0ActivityLogsByIdResponse) ContentType() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Header.Get("Content-Type") + } + return "" +} + +type GetV0ApiCreditsByChainResponse struct { + Body []byte + HTTPResponse *http.Response + // JSON200 the response for an HTTP 200 `application/json` response + JSON200 *struct { + // Data An array of data which contains the following fields: + Data *[]struct { + // Credits The API credit cost of the method for the account's billing version + Credits *int `json:"credits,omitempty"` + + // Method The name of the RPC method + Method *string `json:"method,omitempty"` + } `json:"data,omitempty"` + + // Error An error message if any issue occurs + Error *string `json:"error,omitempty"` + } +} + +// GetJSON200 returns the response for an HTTP 200 `application/json` response +func (r GetV0ApiCreditsByChainResponse) GetJSON200() *struct { + // Data An array of data which contains the following fields: + Data *[]struct { + // Credits The API credit cost of the method for the account's billing version + Credits *int `json:"credits,omitempty"` + + // Method The name of the RPC method + Method *string `json:"method,omitempty"` + } `json:"data,omitempty"` + + // Error An error message if any issue occurs + Error *string `json:"error,omitempty"` +} { + return r.JSON200 +} + +// GetBody returns the raw response body bytes +func (r GetV0ApiCreditsByChainResponse) GetBody() []byte { + return r.Body +} + +// Status returns HTTPResponse.Status +func (r GetV0ApiCreditsByChainResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetV0ApiCreditsByChainResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers +func (r GetV0ApiCreditsByChainResponse) ContentType() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Header.Get("Content-Type") + } + return "" +} + +type GetV0BillingInvoicesResponse struct { + Body []byte + HTTPResponse *http.Response + // JSON200 the response for an HTTP 200 `application/json` response + JSON200 *struct { + // Data The data object which contains the following fields: + Data *struct { + // Invoices An array of invoices + Invoices *[]struct { + // AmountDue The total amount that is due on the invoice + AmountDue *int `json:"amount_due,omitempty"` + + // AmountPaid The total amount that has been paid for the invoice + AmountPaid *int `json:"amount_paid,omitempty"` + + // BillingReason The reason for generating the invoice + BillingReason *string `json:"billing_reason,omitempty"` + + // Created The timestamp when the invoice was created in second + Created *int `json:"created,omitempty"` + + // Id The unique identifier for the invoice + Id *string `json:"id,omitempty"` + + // Lines An array of lines which contains the following fields: + Lines *[]struct { + // Amount The cost associated with each line item + Amount *int `json:"amount,omitempty"` + + // Description A detailed description of each line item billed + Description *string `json:"description,omitempty"` + } `json:"lines,omitempty"` + + // PeriodEnd The end timestamp of the billing period for the invoice in second + PeriodEnd *int `json:"period_end,omitempty"` + + // PeriodStart The start timestamp of the billing period for the invoice in second + PeriodStart *int `json:"period_start,omitempty"` + + // Status The current state of the invoice + Status *string `json:"status,omitempty"` + + // Subtotal The total cost of the invoice + Subtotal *int `json:"subtotal,omitempty"` + } `json:"invoices,omitempty"` + } `json:"data,omitempty"` + + // Error An error message if any issue occurs + Error *string `json:"error,omitempty"` + } +} + +// GetJSON200 returns the response for an HTTP 200 `application/json` response +func (r GetV0BillingInvoicesResponse) GetJSON200() *struct { + // Data The data object which contains the following fields: + Data *struct { + // Invoices An array of invoices + Invoices *[]struct { + // AmountDue The total amount that is due on the invoice + AmountDue *int `json:"amount_due,omitempty"` + + // AmountPaid The total amount that has been paid for the invoice + AmountPaid *int `json:"amount_paid,omitempty"` + + // BillingReason The reason for generating the invoice + BillingReason *string `json:"billing_reason,omitempty"` + + // Created The timestamp when the invoice was created in second + Created *int `json:"created,omitempty"` + + // Id The unique identifier for the invoice + Id *string `json:"id,omitempty"` + + // Lines An array of lines which contains the following fields: + Lines *[]struct { + // Amount The cost associated with each line item + Amount *int `json:"amount,omitempty"` + + // Description A detailed description of each line item billed + Description *string `json:"description,omitempty"` + } `json:"lines,omitempty"` + + // PeriodEnd The end timestamp of the billing period for the invoice in second + PeriodEnd *int `json:"period_end,omitempty"` + + // PeriodStart The start timestamp of the billing period for the invoice in second + PeriodStart *int `json:"period_start,omitempty"` + + // Status The current state of the invoice + Status *string `json:"status,omitempty"` + + // Subtotal The total cost of the invoice + Subtotal *int `json:"subtotal,omitempty"` + } `json:"invoices,omitempty"` + } `json:"data,omitempty"` + + // Error An error message if any issue occurs + Error *string `json:"error,omitempty"` +} { + return r.JSON200 +} + +// GetBody returns the raw response body bytes +func (r GetV0BillingInvoicesResponse) GetBody() []byte { + return r.Body +} + +// Status returns HTTPResponse.Status +func (r GetV0BillingInvoicesResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetV0BillingInvoicesResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers +func (r GetV0BillingInvoicesResponse) ContentType() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Header.Get("Content-Type") + } + return "" +} + +type GetV0BillingPaymentsResponse struct { + Body []byte + HTTPResponse *http.Response + // JSON200 the response for an HTTP 200 `application/json` response + JSON200 *struct { + // Data The data object which contains the following fields: + Data *struct { + // Payments An array of payments associated with the account + Payments *[]struct { + // Amount The total amount of the payment + Amount *string `json:"amount,omitempty"` + + // CardLast4 The last four digits of the card used for the payment (masked for security) + CardLast4 *string `json:"card_last_4,omitempty"` + + // CreatedAt The timestamp when the payment was created in second + CreatedAt *string `json:"created_at,omitempty"` + + // Currency The currency in which the payment was made + Currency *string `json:"currency,omitempty"` + + // MarketplaceAmount The total amount spent in the marketplace + MarketplaceAmount *string `json:"marketplace_amount,omitempty"` + + // Status The current status of the payment + Status *string `json:"status,omitempty"` + } `json:"payments,omitempty"` + } `json:"data,omitempty"` + + // Error An error message if any issue occurs + Error *string `json:"error,omitempty"` + } +} + +// GetJSON200 returns the response for an HTTP 200 `application/json` response +func (r GetV0BillingPaymentsResponse) GetJSON200() *struct { + // Data The data object which contains the following fields: + Data *struct { + // Payments An array of payments associated with the account + Payments *[]struct { + // Amount The total amount of the payment + Amount *string `json:"amount,omitempty"` + + // CardLast4 The last four digits of the card used for the payment (masked for security) + CardLast4 *string `json:"card_last_4,omitempty"` + + // CreatedAt The timestamp when the payment was created in second + CreatedAt *string `json:"created_at,omitempty"` + + // Currency The currency in which the payment was made + Currency *string `json:"currency,omitempty"` + + // MarketplaceAmount The total amount spent in the marketplace + MarketplaceAmount *string `json:"marketplace_amount,omitempty"` + + // Status The current status of the payment + Status *string `json:"status,omitempty"` + } `json:"payments,omitempty"` + } `json:"data,omitempty"` + + // Error An error message if any issue occurs + Error *string `json:"error,omitempty"` +} { + return r.JSON200 +} + +// GetBody returns the raw response body bytes +func (r GetV0BillingPaymentsResponse) GetBody() []byte { + return r.Body +} + +// Status returns HTTPResponse.Status +func (r GetV0BillingPaymentsResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetV0BillingPaymentsResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers +func (r GetV0BillingPaymentsResponse) ContentType() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Header.Get("Content-Type") + } + return "" +} + +type GetV0ChainsResponse struct { + Body []byte + HTTPResponse *http.Response + // JSON200 the response for an HTTP 200 `application/json` response + JSON200 *struct { + // Data An array of data which contains the following fields: + Data *[]struct { + IsSelectChain *bool `json:"is_select_chain,omitempty"` + + // Networks An array of networks + Networks *[]struct { + ChainId *int `json:"chain_id,omitempty"` + + // Name The name of the specific network + Name *string `json:"name,omitempty"` + + // Slug A short, unique identifier for the specific network + Slug *string `json:"slug,omitempty"` + } `json:"networks,omitempty"` + + // Slug A short, unique identifier for the blockchain network + Slug *string `json:"slug,omitempty"` + } `json:"data,omitempty"` + + // Error An error message if any issue occurs + Error *string `json:"error,omitempty"` + } +} + +// GetJSON200 returns the response for an HTTP 200 `application/json` response +func (r GetV0ChainsResponse) GetJSON200() *struct { + // Data An array of data which contains the following fields: + Data *[]struct { + IsSelectChain *bool `json:"is_select_chain,omitempty"` + + // Networks An array of networks + Networks *[]struct { + ChainId *int `json:"chain_id,omitempty"` + + // Name The name of the specific network + Name *string `json:"name,omitempty"` + + // Slug A short, unique identifier for the specific network + Slug *string `json:"slug,omitempty"` + } `json:"networks,omitempty"` + + // Slug A short, unique identifier for the blockchain network + Slug *string `json:"slug,omitempty"` + } `json:"data,omitempty"` + + // Error An error message if any issue occurs + Error *string `json:"error,omitempty"` +} { + return r.JSON200 +} + +// GetBody returns the raw response body bytes +func (r GetV0ChainsResponse) GetBody() []byte { + return r.Body +} + +// Status returns HTTPResponse.Status +func (r GetV0ChainsResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetV0ChainsResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers +func (r GetV0ChainsResponse) ContentType() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Header.Get("Content-Type") + } + return "" +} + +type GetV0EndpointsResponse struct { + Body []byte + HTTPResponse *http.Response + // JSON200 the response for an HTTP 200 `application/json` response + JSON200 *struct { + // Data An array of data which contains the following fields: + Data *[]struct { + // Chain The blockchain the endpoint is associated with + Chain *string `json:"chain,omitempty"` + + // HttpUrl The HTTP URL to access the endpoint + HttpUrl *string `json:"http_url,omitempty"` + + // Id A unique identifier for the specific endpoint + Id *string `json:"id,omitempty"` + + // IsDedicated Whether the endpoint is a dedicated endpoint + IsDedicated *bool `json:"is_dedicated,omitempty"` + + // IsFlatRate Whether the endpoint is a flat rate endpoint + IsFlatRate *bool `json:"is_flat_rate,omitempty"` + + // IsMultichain Whether the endpoint is a multichain endpoint + IsMultichain *bool `json:"is_multichain,omitempty"` + + // Label A descriptive label for the endpoint + Label *string `json:"label,omitempty"` + + // Name The endpoint subdomain + Name *string `json:"name,omitempty"` + + // Network The specific network of the blockchain + Network *string `json:"network,omitempty"` + + // Status The current status of the endpoint (active or paused) + Status *string `json:"status,omitempty"` + + // Tags An array of tags associated with the endpoint + Tags *[]struct { + // Label The label/name of the tag + Label *string `json:"label,omitempty"` + + // TagId The unique identifier for the tag + TagId *int `json:"tag_id,omitempty"` + } `json:"tags,omitempty"` + + // WssUrl The WebSocket URL to access the endpoint + WssUrl *string `json:"wss_url,omitempty"` + } `json:"data,omitempty"` - // PostV0EndpointsBulkTagsWithBodyWithResponse Add a tag to multiple endpoints in a single call. - // - // Add a tag to multiple endpoints in a single call. Admin-only. - // - // Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s). - // - // Corresponds with POST /v0/endpoints/bulk/tags (the `PostV0EndpointsBulkTags` operationId). - PostV0EndpointsBulkTagsWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostV0EndpointsBulkTagsResponse, error) + // Error An error message if any issue occurs + Error *string `json:"error,omitempty"` - // PostV0EndpointsBulkTagsWithResponse Add a tag to multiple endpoints in a single call. - // - // Add a tag to multiple endpoints in a single call. Admin-only. - // - // Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s). - // - // Corresponds with POST /v0/endpoints/bulk/tags (the `PostV0EndpointsBulkTags` operationId). - PostV0EndpointsBulkTagsWithResponse(ctx context.Context, body PostV0EndpointsBulkTagsJSONRequestBody, reqEditors ...RequestEditorFn) (*PostV0EndpointsBulkTagsResponse, error) + // Pagination Pagination details for the response + Pagination *struct { + // Limit The maximum number of endpoints returned per page + Limit *int `json:"limit,omitempty"` - // GetV0EndpointsTagsWithResponse Returns all account-level tags including those with zero endpoints. - // - // Returns all account-level tags including those with zero endpoints. Gated at Build/Growth+. - // - // Returns a wrapper object for the known response body format(s). - // - // Corresponds with GET /v0/endpoints/tags (the `GetV0EndpointsTags` operationId). - GetV0EndpointsTagsWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetV0EndpointsTagsResponse, error) + // Offset The number of endpoints skipped + Offset *int `json:"offset,omitempty"` - // DeleteV0EndpointsTagsByIdWithResponse Deletes an account tag. - // - // Deletes an account tag. The tag must be removed from all endpoints before it can be deleted. Admin-only. - // - // Returns a wrapper object for the known response body format(s). - // - // Corresponds with DELETE /v0/endpoints/tags/{id} (the `DeleteV0EndpointsTagsById` operationId). - DeleteV0EndpointsTagsByIdWithResponse(ctx context.Context, id int, reqEditors ...RequestEditorFn) (*DeleteV0EndpointsTagsByIdResponse, error) + // Total The total number of endpoints matching the query + Total *int `json:"total,omitempty"` + } `json:"pagination,omitempty"` + } +} - // PatchV0EndpointsTagsByIdWithBodyWithResponse Renames an account tag. - // - // Renames an account tag. Because the tag is shared across endpoints, all associated endpoints reflect the new label immediately. Admin-only. - // - // Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s). - // - // Corresponds with PATCH /v0/endpoints/tags/{id} (the `PatchV0EndpointsTagsById` operationId). - PatchV0EndpointsTagsByIdWithBodyWithResponse(ctx context.Context, id int, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PatchV0EndpointsTagsByIdResponse, error) +// GetJSON200 returns the response for an HTTP 200 `application/json` response +func (r GetV0EndpointsResponse) GetJSON200() *struct { + // Data An array of data which contains the following fields: + Data *[]struct { + // Chain The blockchain the endpoint is associated with + Chain *string `json:"chain,omitempty"` - // PatchV0EndpointsTagsByIdWithResponse Renames an account tag. - // - // Renames an account tag. Because the tag is shared across endpoints, all associated endpoints reflect the new label immediately. Admin-only. - // - // Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s). - // - // Corresponds with PATCH /v0/endpoints/tags/{id} (the `PatchV0EndpointsTagsById` operationId). - PatchV0EndpointsTagsByIdWithResponse(ctx context.Context, id int, body PatchV0EndpointsTagsByIdJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchV0EndpointsTagsByIdResponse, error) + // HttpUrl The HTTP URL to access the endpoint + HttpUrl *string `json:"http_url,omitempty"` - // DeleteV0EndpointsByIdWithResponse Deletes an endpoint. - // - // Returns a wrapper object for the known response body format(s). - // - // Corresponds with DELETE /v0/endpoints/{id} (the `DeleteV0EndpointsById` operationId). - DeleteV0EndpointsByIdWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*DeleteV0EndpointsByIdResponse, error) + // Id A unique identifier for the specific endpoint + Id *string `json:"id,omitempty"` - // GetV0EndpointsByIdWithResponse Returns info for a specific endpoint. - // - // Returns a wrapper object for the known response body format(s). - // - // Corresponds with GET /v0/endpoints/{id} (the `GetV0EndpointsById` operationId). - GetV0EndpointsByIdWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*GetV0EndpointsByIdResponse, error) + // IsDedicated Whether the endpoint is a dedicated endpoint + IsDedicated *bool `json:"is_dedicated,omitempty"` - // PatchV0EndpointsByIdWithBodyWithResponse Updates an endpoint. - // - // Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s). - // - // Corresponds with PATCH /v0/endpoints/{id} (the `PatchV0EndpointsById` operationId). - PatchV0EndpointsByIdWithBodyWithResponse(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PatchV0EndpointsByIdResponse, error) + // IsFlatRate Whether the endpoint is a flat rate endpoint + IsFlatRate *bool `json:"is_flat_rate,omitempty"` - // PatchV0EndpointsByIdWithResponse Updates an endpoint. - // - // Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s). - // - // Corresponds with PATCH /v0/endpoints/{id} (the `PatchV0EndpointsById` operationId). - PatchV0EndpointsByIdWithResponse(ctx context.Context, id string, body PatchV0EndpointsByIdJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchV0EndpointsByIdResponse, error) + // IsMultichain Whether the endpoint is a multichain endpoint + IsMultichain *bool `json:"is_multichain,omitempty"` - // PostV0EndpointsByIdDisableMultichainWithResponse Disables multichain for a specific endpoint. - // - // Returns a wrapper object for the known response body format(s). - // - // Corresponds with POST /v0/endpoints/{id}/disable_multichain (the `PostV0EndpointsByIdDisableMultichain` operationId). - PostV0EndpointsByIdDisableMultichainWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*PostV0EndpointsByIdDisableMultichainResponse, error) + // Label A descriptive label for the endpoint + Label *string `json:"label,omitempty"` + + // Name The endpoint subdomain + Name *string `json:"name,omitempty"` + + // Network The specific network of the blockchain + Network *string `json:"network,omitempty"` + + // Status The current status of the endpoint (active or paused) + Status *string `json:"status,omitempty"` + + // Tags An array of tags associated with the endpoint + Tags *[]struct { + // Label The label/name of the tag + Label *string `json:"label,omitempty"` + + // TagId The unique identifier for the tag + TagId *int `json:"tag_id,omitempty"` + } `json:"tags,omitempty"` + + // WssUrl The WebSocket URL to access the endpoint + WssUrl *string `json:"wss_url,omitempty"` + } `json:"data,omitempty"` + + // Error An error message if any issue occurs + Error *string `json:"error,omitempty"` + + // Pagination Pagination details for the response + Pagination *struct { + // Limit The maximum number of endpoints returned per page + Limit *int `json:"limit,omitempty"` + + // Offset The number of endpoints skipped + Offset *int `json:"offset,omitempty"` + + // Total The total number of endpoints matching the query + Total *int `json:"total,omitempty"` + } `json:"pagination,omitempty"` +} { + return r.JSON200 +} + +// GetBody returns the raw response body bytes +func (r GetV0EndpointsResponse) GetBody() []byte { + return r.Body +} + +// Status returns HTTPResponse.Status +func (r GetV0EndpointsResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetV0EndpointsResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers +func (r GetV0EndpointsResponse) ContentType() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Header.Get("Content-Type") + } + return "" +} + +type PostV0EndpointsResponse struct { + Body []byte + HTTPResponse *http.Response + // JSON200 the response for an HTTP 200 `application/json` response + JSON200 *struct { + // Data The data object which contains the following fields: + Data *struct { + // Chain The blockchain the endpoint is associated with + Chain *string `json:"chain,omitempty"` + + // HttpUrl The HTTP URL to access the newly created endpoint + HttpUrl *string `json:"http_url,omitempty"` + + // Id A unique identifier for the created endpoint + Id *string `json:"id,omitempty"` + + // Label A descriptive label for the endpoint + Label *string `json:"label,omitempty"` + + // Network The specific network of the blockchain + Network *string `json:"network,omitempty"` + + // RateLimits The rate_limits object which contains the following fields: + RateLimits *struct { + // Account The account-level rate limit + Account *int `json:"account,omitempty"` + + // RateLimitByIp Specifies if rate limiting is applied per IP + RateLimitByIp *bool `json:"rate_limit_by_ip,omitempty"` + + // Rpd Requests per day limit + Rpd *int `json:"rpd,omitempty"` + + // Rpm Requests per minute limit + Rpm *int `json:"rpm,omitempty"` + + // Rps Requests per second limit + Rps *int `json:"rps,omitempty"` + } `json:"rate_limits,omitempty"` + + // Security The security object which contains the following fields: + Security *struct { + // DomainMasks An array of domain-based security configurations + DomainMasks *[]struct { + // Domain The allowed domain for accessing the endpoint + Domain *string `json:"domain,omitempty"` + + // Id A unique identifier for the domain mask + Id *string `json:"id,omitempty"` + } `json:"domainMasks,omitempty"` + + // Ips An array of IP-based security configurations + Ips *[]struct { + // Id A unique identifier for the IP configuration + Id *string `json:"id,omitempty"` + + // Ip The allowed IP address for accessing the endpoint + Ip *string `json:"ip,omitempty"` + } `json:"ips,omitempty"` + + // Jwts An array of JSON Web Token (JWT) configurations + Jwts *[]struct { + // Id A unique identifier for the JWT + Id *string `json:"id,omitempty"` + + // Kid A unique key identifier for the JWT public key + Kid *string `json:"kid,omitempty"` + + // Name The name of the JWT + Name *string `json:"name,omitempty"` + + // PublicKey The public key used in the JWT + PublicKey *string `json:"public_key,omitempty"` + } `json:"jwts,omitempty"` - // PostV0EndpointsByIdEnableMultichainWithResponse Enables multichain for a specific endpoint. - // - // Returns a wrapper object for the known response body format(s). - // - // Corresponds with POST /v0/endpoints/{id}/enable_multichain (the `PostV0EndpointsByIdEnableMultichain` operationId). - PostV0EndpointsByIdEnableMultichainWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*PostV0EndpointsByIdEnableMultichainResponse, error) + // Options A list of security options available for the endpoint + Options *struct { + // Cors Indicates whether Cross-Origin Resource Sharing (CORS) is enabled + Cors *bool `json:"cors,omitempty"` - // DeleteV0EndpointsByIdIpCustomHeaderWithResponse Deletes the IP custom header for a specific endpoint. - // - // Returns a wrapper object for the known response body format(s). - // - // Corresponds with DELETE /v0/endpoints/{id}/ip_custom_header (the `DeleteV0EndpointsByIdIpCustomHeader` operationId). - DeleteV0EndpointsByIdIpCustomHeaderWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*DeleteV0EndpointsByIdIpCustomHeaderResponse, error) + // DebugAuthErrors Indicates whether detailed authentication error debugging is enabled + DebugAuthErrors *bool `json:"debugAuthErrors,omitempty"` - // PatchV0EndpointsByIdIpCustomHeaderWithBodyWithResponse Creates or updates an IP custom header for a specific endpoint. - // - // Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s). - // - // Corresponds with PATCH /v0/endpoints/{id}/ip_custom_header (the `PatchV0EndpointsByIdIpCustomHeader` operationId). - PatchV0EndpointsByIdIpCustomHeaderWithBodyWithResponse(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PatchV0EndpointsByIdIpCustomHeaderResponse, error) + // DomainMasks Indicates whether domain mask security is enabled + DomainMasks *bool `json:"domainMasks,omitempty"` - // PatchV0EndpointsByIdIpCustomHeaderWithResponse Creates or updates an IP custom header for a specific endpoint. - // - // Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s). - // - // Corresponds with PATCH /v0/endpoints/{id}/ip_custom_header (the `PatchV0EndpointsByIdIpCustomHeader` operationId). - PatchV0EndpointsByIdIpCustomHeaderWithResponse(ctx context.Context, id string, body PatchV0EndpointsByIdIpCustomHeaderJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchV0EndpointsByIdIpCustomHeaderResponse, error) + // EnforceChainNetwork Indicates whether the specified chain and network are enforced for the endpoint + EnforceChainNetwork *bool `json:"enforceChainNetwork,omitempty"` - // GetV0EndpointsByIdLogDetailsWithResponse Retrieves detailed request and response information for a specific log entry. - // - // Returns a wrapper object for the known response body format(s). - // - // Corresponds with GET /v0/endpoints/{id}/log_details (the `GetV0EndpointsByIdLogDetails` operationId). - GetV0EndpointsByIdLogDetailsWithResponse(ctx context.Context, id string, params *GetV0EndpointsByIdLogDetailsParams, reqEditors ...RequestEditorFn) (*GetV0EndpointsByIdLogDetailsResponse, error) + // Hosts Indicates whether host-based security is enabled + Hosts *bool `json:"hosts,omitempty"` - // GetV0EndpointsByIdLogsWithResponse Retrieves logs for a specific endpoint with filtering and pagination options. - // - // Returns a wrapper object for the known response body format(s). - // - // Corresponds with GET /v0/endpoints/{id}/logs (the `GetV0EndpointsByIdLogs` operationId). - GetV0EndpointsByIdLogsWithResponse(ctx context.Context, id string, params *GetV0EndpointsByIdLogsParams, reqEditors ...RequestEditorFn) (*GetV0EndpointsByIdLogsResponse, error) + // Hsts Indicates whether HTTP Strict Transport Security (HSTS) is enforced + Hsts *bool `json:"hsts,omitempty"` + IpCustomHeader *struct { + Value *string `json:"value,omitempty"` + } `json:"ipCustomHeader,omitempty"` - // GetV0EndpointsByIdMethodRateLimitsWithResponse Gets method rate limits. - // - // Returns a wrapper object for the known response body format(s). - // - // Corresponds with GET /v0/endpoints/{id}/method-rate-limits (the `GetV0EndpointsByIdMethodRateLimits` operationId). - GetV0EndpointsByIdMethodRateLimitsWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*GetV0EndpointsByIdMethodRateLimitsResponse, error) + // Ips Indicates whether IP-based security is enabled + Ips *bool `json:"ips,omitempty"` - // PostV0EndpointsByIdMethodRateLimitsWithBodyWithResponse Creates a method rate limit. - // - // Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s). - // - // Corresponds with POST /v0/endpoints/{id}/method-rate-limits (the `PostV0EndpointsByIdMethodRateLimits` operationId). - PostV0EndpointsByIdMethodRateLimitsWithBodyWithResponse(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostV0EndpointsByIdMethodRateLimitsResponse, error) + // Jwts Indicates whether JWT-based security is enabled + Jwts *bool `json:"jwts,omitempty"` - // PostV0EndpointsByIdMethodRateLimitsWithResponse Creates a method rate limit. - // - // Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s). - // - // Corresponds with POST /v0/endpoints/{id}/method-rate-limits (the `PostV0EndpointsByIdMethodRateLimits` operationId). - PostV0EndpointsByIdMethodRateLimitsWithResponse(ctx context.Context, id string, body PostV0EndpointsByIdMethodRateLimitsJSONRequestBody, reqEditors ...RequestEditorFn) (*PostV0EndpointsByIdMethodRateLimitsResponse, error) + // Referrers Indicates whether referrer-based security is enable + Referrers *bool `json:"referrers,omitempty"` - // DeleteV0EndpointsByIdMethodRateLimitsByMethodRateLimitIdWithResponse Deletes a method rate limit. - // - // Returns a wrapper object for the known response body format(s). - // - // Corresponds with DELETE /v0/endpoints/{id}/method-rate-limits/{method_rate_limit_id} (the `DeleteV0EndpointsByIdMethodRateLimitsByMethodRateLimitId` operationId). - DeleteV0EndpointsByIdMethodRateLimitsByMethodRateLimitIdWithResponse(ctx context.Context, id string, methodRateLimitId string, reqEditors ...RequestEditorFn) (*DeleteV0EndpointsByIdMethodRateLimitsByMethodRateLimitIdResponse, error) + // RequestFilters Indicates whether request filters are applied + RequestFilters *bool `json:"requestFilters,omitempty"` - // PatchV0EndpointsByIdMethodRateLimitsByMethodRateLimitIdWithBodyWithResponse Updates a method rate limit. - // - // Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s). - // - // Corresponds with PATCH /v0/endpoints/{id}/method-rate-limits/{method_rate_limit_id} (the `PatchV0EndpointsByIdMethodRateLimitsByMethodRateLimitId` operationId). - PatchV0EndpointsByIdMethodRateLimitsByMethodRateLimitIdWithBodyWithResponse(ctx context.Context, id string, methodRateLimitId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PatchV0EndpointsByIdMethodRateLimitsByMethodRateLimitIdResponse, error) + // Tokens Indicates whether token-based security is enabled + Tokens *bool `json:"tokens,omitempty"` - // PatchV0EndpointsByIdMethodRateLimitsByMethodRateLimitIdWithResponse Updates a method rate limit. - // - // Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s). - // - // Corresponds with PATCH /v0/endpoints/{id}/method-rate-limits/{method_rate_limit_id} (the `PatchV0EndpointsByIdMethodRateLimitsByMethodRateLimitId` operationId). - PatchV0EndpointsByIdMethodRateLimitsByMethodRateLimitIdWithResponse(ctx context.Context, id string, methodRateLimitId string, body PatchV0EndpointsByIdMethodRateLimitsByMethodRateLimitIdJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchV0EndpointsByIdMethodRateLimitsByMethodRateLimitIdResponse, error) + // ValidHosts Indicates whether only valid hosts are allowed + ValidHosts *bool `json:"validHosts,omitempty"` + } `json:"options,omitempty"` - // GetV0EndpointsByIdMetricsWithResponse Returns a single metric. - // - // Returns a wrapper object for the known response body format(s). - // - // Corresponds with GET /v0/endpoints/{id}/metrics (the `GetV0EndpointsByIdMetrics` operationId). - GetV0EndpointsByIdMetricsWithResponse(ctx context.Context, id string, params *GetV0EndpointsByIdMetricsParams, reqEditors ...RequestEditorFn) (*GetV0EndpointsByIdMetricsResponse, error) + // Referrers An array of referrer-based security configurations + Referrers *[]struct { + // Id A unique identifier for the referrer. + Id *string `json:"id,omitempty"` - // GetV0EndpointsByIdRateLimitsWithResponse Gets endpoint rate limits. - // - // Gets endpoint rate limits. The response returns an array with the source for each rate limit, including plan defaults and user-set overrides. - // - // Returns a wrapper object for the known response body format(s). - // - // Corresponds with GET /v0/endpoints/{id}/rate-limits (the `GetV0EndpointsByIdRateLimits` operationId). - GetV0EndpointsByIdRateLimitsWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*GetV0EndpointsByIdRateLimitsResponse, error) + // Referrer The referrer URL allowed to access the endpoint + Referrer *string `json:"referrer,omitempty"` + } `json:"referrers,omitempty"` - // PatchV0EndpointsByIdRateLimitsWithBodyWithResponse Updates endpoint rate limits. - // - // Updates endpoint rate limits. Only rate limits specified in the payload are updated; omitted rate limits remain unchanged. The response returns the effective endpoint-level limits as a flat limits object. - // - // Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s). - // - // Corresponds with PATCH /v0/endpoints/{id}/rate-limits (the `PatchV0EndpointsByIdRateLimits` operationId). - PatchV0EndpointsByIdRateLimitsWithBodyWithResponse(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PatchV0EndpointsByIdRateLimitsResponse, error) + // Tokens An array of token-based security configurations + Tokens *[]struct { + // Id A unique identifier for the token + Id *string `json:"id,omitempty"` - // PatchV0EndpointsByIdRateLimitsWithResponse Updates endpoint rate limits. - // - // Updates endpoint rate limits. Only rate limits specified in the payload are updated; omitted rate limits remain unchanged. The response returns the effective endpoint-level limits as a flat limits object. - // - // Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s). - // - // Corresponds with PATCH /v0/endpoints/{id}/rate-limits (the `PatchV0EndpointsByIdRateLimits` operationId). - PatchV0EndpointsByIdRateLimitsWithResponse(ctx context.Context, id string, body PatchV0EndpointsByIdRateLimitsJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchV0EndpointsByIdRateLimitsResponse, error) + // Token The actual token value used for authentication + Token *string `json:"token,omitempty"` + } `json:"tokens,omitempty"` + } `json:"security,omitempty"` - // DeleteV0EndpointsByIdRateLimitsByOverrideIdWithResponse Deletes a user-set endpoint rate limit by UUID. - // - // Returns a wrapper object for the known response body format(s). - // - // Corresponds with DELETE /v0/endpoints/{id}/rate-limits/{override_id} (the `DeleteV0EndpointsByIdRateLimitsByOverrideId` operationId). - DeleteV0EndpointsByIdRateLimitsByOverrideIdWithResponse(ctx context.Context, id string, overrideId string, reqEditors ...RequestEditorFn) (*DeleteV0EndpointsByIdRateLimitsByOverrideIdResponse, error) + // WssUrl The WebSocket URL to access the newly created endpoint + WssUrl *string `json:"wss_url,omitempty"` + } `json:"data,omitempty"` - // GetV0EndpointsByIdSecurityWithResponse Returns full security state (tokens, JWTs, IPs, referrers, domain masks, request filters, options) without fetching the - // - // Returns full security state (tokens, JWTs, IPs, referrers, domain masks, request filters, options) without fetching the full endpoint. - // - // Returns a wrapper object for the known response body format(s). - // - // Corresponds with GET /v0/endpoints/{id}/security (the `GetV0EndpointsByIdSecurity` operationId). - GetV0EndpointsByIdSecurityWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*GetV0EndpointsByIdSecurityResponse, error) + // Error Contains error information, if any + Error *string `json:"error,omitempty"` + } +} - // PostV0EndpointsByIdSecurityDomainMasksWithBodyWithResponse Create an endpoint domain mask. - // - // Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s). - // - // Corresponds with POST /v0/endpoints/{id}/security/domain_masks (the `PostV0EndpointsByIdSecurityDomainMasks` operationId). - PostV0EndpointsByIdSecurityDomainMasksWithBodyWithResponse(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostV0EndpointsByIdSecurityDomainMasksResponse, error) +// GetJSON200 returns the response for an HTTP 200 `application/json` response +func (r PostV0EndpointsResponse) GetJSON200() *struct { + // Data The data object which contains the following fields: + Data *struct { + // Chain The blockchain the endpoint is associated with + Chain *string `json:"chain,omitempty"` - // PostV0EndpointsByIdSecurityDomainMasksWithResponse Create an endpoint domain mask. - // - // Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s). - // - // Corresponds with POST /v0/endpoints/{id}/security/domain_masks (the `PostV0EndpointsByIdSecurityDomainMasks` operationId). - PostV0EndpointsByIdSecurityDomainMasksWithResponse(ctx context.Context, id string, body PostV0EndpointsByIdSecurityDomainMasksJSONRequestBody, reqEditors ...RequestEditorFn) (*PostV0EndpointsByIdSecurityDomainMasksResponse, error) + // HttpUrl The HTTP URL to access the newly created endpoint + HttpUrl *string `json:"http_url,omitempty"` - // DeleteV0EndpointsByIdSecurityDomainMasksByDomainMaskIdWithResponse Deletes an existing endpoint domain mask. - // - // Returns a wrapper object for the known response body format(s). - // - // Corresponds with DELETE /v0/endpoints/{id}/security/domain_masks/{domain_mask_id} (the `DeleteV0EndpointsByIdSecurityDomainMasksByDomainMaskId` operationId). - DeleteV0EndpointsByIdSecurityDomainMasksByDomainMaskIdWithResponse(ctx context.Context, id string, domainMaskId string, reqEditors ...RequestEditorFn) (*DeleteV0EndpointsByIdSecurityDomainMasksByDomainMaskIdResponse, error) + // Id A unique identifier for the created endpoint + Id *string `json:"id,omitempty"` - // PostV0EndpointsByIdSecurityIpsWithBodyWithResponse Creates a new endpoint IP. - // - // Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s). - // - // Corresponds with POST /v0/endpoints/{id}/security/ips (the `PostV0EndpointsByIdSecurityIps` operationId). - PostV0EndpointsByIdSecurityIpsWithBodyWithResponse(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostV0EndpointsByIdSecurityIpsResponse, error) + // Label A descriptive label for the endpoint + Label *string `json:"label,omitempty"` - // PostV0EndpointsByIdSecurityIpsWithResponse Creates a new endpoint IP. - // - // Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s). - // - // Corresponds with POST /v0/endpoints/{id}/security/ips (the `PostV0EndpointsByIdSecurityIps` operationId). - PostV0EndpointsByIdSecurityIpsWithResponse(ctx context.Context, id string, body PostV0EndpointsByIdSecurityIpsJSONRequestBody, reqEditors ...RequestEditorFn) (*PostV0EndpointsByIdSecurityIpsResponse, error) + // Network The specific network of the blockchain + Network *string `json:"network,omitempty"` - // DeleteV0EndpointsByIdSecurityIpsByIpIdWithResponse Deletes an existing endpoint IP. - // - // Returns a wrapper object for the known response body format(s). - // - // Corresponds with DELETE /v0/endpoints/{id}/security/ips/{ip_id} (the `DeleteV0EndpointsByIdSecurityIpsByIpId` operationId). - DeleteV0EndpointsByIdSecurityIpsByIpIdWithResponse(ctx context.Context, id string, ipId string, reqEditors ...RequestEditorFn) (*DeleteV0EndpointsByIdSecurityIpsByIpIdResponse, error) + // RateLimits The rate_limits object which contains the following fields: + RateLimits *struct { + // Account The account-level rate limit + Account *int `json:"account,omitempty"` - // PostV0EndpointsByIdSecurityJwtsWithBodyWithResponse Creates a new endpoint JWT. - // - // Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s). - // - // Corresponds with POST /v0/endpoints/{id}/security/jwts (the `PostV0EndpointsByIdSecurityJwts` operationId). - PostV0EndpointsByIdSecurityJwtsWithBodyWithResponse(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostV0EndpointsByIdSecurityJwtsResponse, error) + // RateLimitByIp Specifies if rate limiting is applied per IP + RateLimitByIp *bool `json:"rate_limit_by_ip,omitempty"` - // PostV0EndpointsByIdSecurityJwtsWithResponse Creates a new endpoint JWT. - // - // Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s). - // - // Corresponds with POST /v0/endpoints/{id}/security/jwts (the `PostV0EndpointsByIdSecurityJwts` operationId). - PostV0EndpointsByIdSecurityJwtsWithResponse(ctx context.Context, id string, body PostV0EndpointsByIdSecurityJwtsJSONRequestBody, reqEditors ...RequestEditorFn) (*PostV0EndpointsByIdSecurityJwtsResponse, error) + // Rpd Requests per day limit + Rpd *int `json:"rpd,omitempty"` - // DeleteV0EndpointsByIdSecurityJwtsByJwtIdWithResponse Deletes an existing endpoint JWT. - // - // Returns a wrapper object for the known response body format(s). - // - // Corresponds with DELETE /v0/endpoints/{id}/security/jwts/{jwt_id} (the `DeleteV0EndpointsByIdSecurityJwtsByJwtId` operationId). - DeleteV0EndpointsByIdSecurityJwtsByJwtIdWithResponse(ctx context.Context, id string, jwtId string, reqEditors ...RequestEditorFn) (*DeleteV0EndpointsByIdSecurityJwtsByJwtIdResponse, error) + // Rpm Requests per minute limit + Rpm *int `json:"rpm,omitempty"` - // PostV0EndpointsByIdSecurityReferrersWithBodyWithResponse Creates a new endpoint referrer. - // - // Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s). - // - // Corresponds with POST /v0/endpoints/{id}/security/referrers (the `PostV0EndpointsByIdSecurityReferrers` operationId). - PostV0EndpointsByIdSecurityReferrersWithBodyWithResponse(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostV0EndpointsByIdSecurityReferrersResponse, error) + // Rps Requests per second limit + Rps *int `json:"rps,omitempty"` + } `json:"rate_limits,omitempty"` + + // Security The security object which contains the following fields: + Security *struct { + // DomainMasks An array of domain-based security configurations + DomainMasks *[]struct { + // Domain The allowed domain for accessing the endpoint + Domain *string `json:"domain,omitempty"` - // PostV0EndpointsByIdSecurityReferrersWithResponse Creates a new endpoint referrer. - // - // Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s). - // - // Corresponds with POST /v0/endpoints/{id}/security/referrers (the `PostV0EndpointsByIdSecurityReferrers` operationId). - PostV0EndpointsByIdSecurityReferrersWithResponse(ctx context.Context, id string, body PostV0EndpointsByIdSecurityReferrersJSONRequestBody, reqEditors ...RequestEditorFn) (*PostV0EndpointsByIdSecurityReferrersResponse, error) + // Id A unique identifier for the domain mask + Id *string `json:"id,omitempty"` + } `json:"domainMasks,omitempty"` - // DeleteV0EndpointsByIdSecurityReferrersByReferrerIdWithResponse Deletes an existing endpoint referrer. - // - // Returns a wrapper object for the known response body format(s). - // - // Corresponds with DELETE /v0/endpoints/{id}/security/referrers/{referrer_id} (the `DeleteV0EndpointsByIdSecurityReferrersByReferrerId` operationId). - DeleteV0EndpointsByIdSecurityReferrersByReferrerIdWithResponse(ctx context.Context, id string, referrerId string, reqEditors ...RequestEditorFn) (*DeleteV0EndpointsByIdSecurityReferrersByReferrerIdResponse, error) + // Ips An array of IP-based security configurations + Ips *[]struct { + // Id A unique identifier for the IP configuration + Id *string `json:"id,omitempty"` - // PostV0EndpointsByIdSecurityRequestFiltersWithBodyWithResponse Creates a new endpoint request filter for method whitelisting. - // - // Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s). - // - // Corresponds with POST /v0/endpoints/{id}/security/request_filters (the `PostV0EndpointsByIdSecurityRequestFilters` operationId). - PostV0EndpointsByIdSecurityRequestFiltersWithBodyWithResponse(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostV0EndpointsByIdSecurityRequestFiltersResponse, error) + // Ip The allowed IP address for accessing the endpoint + Ip *string `json:"ip,omitempty"` + } `json:"ips,omitempty"` - // PostV0EndpointsByIdSecurityRequestFiltersWithResponse Creates a new endpoint request filter for method whitelisting. - // - // Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s). - // - // Corresponds with POST /v0/endpoints/{id}/security/request_filters (the `PostV0EndpointsByIdSecurityRequestFilters` operationId). - PostV0EndpointsByIdSecurityRequestFiltersWithResponse(ctx context.Context, id string, body PostV0EndpointsByIdSecurityRequestFiltersJSONRequestBody, reqEditors ...RequestEditorFn) (*PostV0EndpointsByIdSecurityRequestFiltersResponse, error) + // Jwts An array of JSON Web Token (JWT) configurations + Jwts *[]struct { + // Id A unique identifier for the JWT + Id *string `json:"id,omitempty"` - // DeleteV0EndpointsByIdSecurityRequestFiltersByRequestFilterIdWithResponse Deletes an existing endpoint request filter. - // - // Returns a wrapper object for the known response body format(s). - // - // Corresponds with DELETE /v0/endpoints/{id}/security/request_filters/{request_filter_id} (the `DeleteV0EndpointsByIdSecurityRequestFiltersByRequestFilterId` operationId). - DeleteV0EndpointsByIdSecurityRequestFiltersByRequestFilterIdWithResponse(ctx context.Context, id string, requestFilterId string, reqEditors ...RequestEditorFn) (*DeleteV0EndpointsByIdSecurityRequestFiltersByRequestFilterIdResponse, error) + // Kid A unique key identifier for the JWT public key + Kid *string `json:"kid,omitempty"` - // PutV0EndpointsByIdSecurityRequestFiltersByRequestFilterIdWithBodyWithResponse Updates an existing endpoint request filter. - // - // Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s). - // - // Corresponds with PUT /v0/endpoints/{id}/security/request_filters/{request_filter_id} (the `PutV0EndpointsByIdSecurityRequestFiltersByRequestFilterId` operationId). - PutV0EndpointsByIdSecurityRequestFiltersByRequestFilterIdWithBodyWithResponse(ctx context.Context, id string, requestFilterId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PutV0EndpointsByIdSecurityRequestFiltersByRequestFilterIdResponse, error) + // Name The name of the JWT + Name *string `json:"name,omitempty"` - // PutV0EndpointsByIdSecurityRequestFiltersByRequestFilterIdWithResponse Updates an existing endpoint request filter. - // - // Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s). - // - // Corresponds with PUT /v0/endpoints/{id}/security/request_filters/{request_filter_id} (the `PutV0EndpointsByIdSecurityRequestFiltersByRequestFilterId` operationId). - PutV0EndpointsByIdSecurityRequestFiltersByRequestFilterIdWithResponse(ctx context.Context, id string, requestFilterId string, body PutV0EndpointsByIdSecurityRequestFiltersByRequestFilterIdJSONRequestBody, reqEditors ...RequestEditorFn) (*PutV0EndpointsByIdSecurityRequestFiltersByRequestFilterIdResponse, error) + // PublicKey The public key used in the JWT + PublicKey *string `json:"public_key,omitempty"` + } `json:"jwts,omitempty"` - // PostV0EndpointsByIdSecurityTokensWithResponse Creates a new endpoint authentication token. - // - // Returns a wrapper object for the known response body format(s). - // - // Corresponds with POST /v0/endpoints/{id}/security/tokens (the `PostV0EndpointsByIdSecurityTokens` operationId). - PostV0EndpointsByIdSecurityTokensWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*PostV0EndpointsByIdSecurityTokensResponse, error) + // Options A list of security options available for the endpoint + Options *struct { + // Cors Indicates whether Cross-Origin Resource Sharing (CORS) is enabled + Cors *bool `json:"cors,omitempty"` - // DeleteV0EndpointsByIdSecurityTokensByTokenIdWithResponse Deletes an existing endpoint token. - // - // Returns a wrapper object for the known response body format(s). - // - // Corresponds with DELETE /v0/endpoints/{id}/security/tokens/{token_id} (the `DeleteV0EndpointsByIdSecurityTokensByTokenId` operationId). - DeleteV0EndpointsByIdSecurityTokensByTokenIdWithResponse(ctx context.Context, id string, tokenId string, reqEditors ...RequestEditorFn) (*DeleteV0EndpointsByIdSecurityTokensByTokenIdResponse, error) + // DebugAuthErrors Indicates whether detailed authentication error debugging is enabled + DebugAuthErrors *bool `json:"debugAuthErrors,omitempty"` - // GetV0EndpointsByIdSecurityOptionsWithResponse Gets security options for an endpoint. - // - // Returns a wrapper object for the known response body format(s). - // - // Corresponds with GET /v0/endpoints/{id}/security_options (the `GetV0EndpointsByIdSecurityOptions` operationId). - GetV0EndpointsByIdSecurityOptionsWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*GetV0EndpointsByIdSecurityOptionsResponse, error) + // DomainMasks Indicates whether domain mask security is enabled + DomainMasks *bool `json:"domainMasks,omitempty"` - // PatchV0EndpointsByIdSecurityOptionsWithBodyWithResponse Updates security options for an endpoint. - // - // Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s). - // - // Corresponds with PATCH /v0/endpoints/{id}/security_options (the `PatchV0EndpointsByIdSecurityOptions` operationId). - PatchV0EndpointsByIdSecurityOptionsWithBodyWithResponse(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PatchV0EndpointsByIdSecurityOptionsResponse, error) + // EnforceChainNetwork Indicates whether the specified chain and network are enforced for the endpoint + EnforceChainNetwork *bool `json:"enforceChainNetwork,omitempty"` - // PatchV0EndpointsByIdSecurityOptionsWithResponse Updates security options for an endpoint. - // - // Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s). - // - // Corresponds with PATCH /v0/endpoints/{id}/security_options (the `PatchV0EndpointsByIdSecurityOptions` operationId). - PatchV0EndpointsByIdSecurityOptionsWithResponse(ctx context.Context, id string, body PatchV0EndpointsByIdSecurityOptionsJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchV0EndpointsByIdSecurityOptionsResponse, error) + // Hosts Indicates whether host-based security is enabled + Hosts *bool `json:"hosts,omitempty"` - // PatchV0EndpointsByIdStatusWithBodyWithResponse Pauses or unpauses a specific endpoint by updating its status to either 'active' or 'paused' - // - // Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s). - // - // Corresponds with PATCH /v0/endpoints/{id}/status (the `PatchV0EndpointsByIdStatus` operationId). - PatchV0EndpointsByIdStatusWithBodyWithResponse(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PatchV0EndpointsByIdStatusResponse, error) + // Hsts Indicates whether HTTP Strict Transport Security (HSTS) is enforced + Hsts *bool `json:"hsts,omitempty"` + IpCustomHeader *struct { + Value *string `json:"value,omitempty"` + } `json:"ipCustomHeader,omitempty"` - // PatchV0EndpointsByIdStatusWithResponse Pauses or unpauses a specific endpoint by updating its status to either 'active' or 'paused' - // - // Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s). - // - // Corresponds with PATCH /v0/endpoints/{id}/status (the `PatchV0EndpointsByIdStatus` operationId). - PatchV0EndpointsByIdStatusWithResponse(ctx context.Context, id string, body PatchV0EndpointsByIdStatusJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchV0EndpointsByIdStatusResponse, error) + // Ips Indicates whether IP-based security is enabled + Ips *bool `json:"ips,omitempty"` - // GetV0EndpointsByIdTagsWithResponse Returns all tags for a specific endpoint. - // - // Returns a wrapper object for the known response body format(s). - // - // Corresponds with GET /v0/endpoints/{id}/tags (the `GetV0EndpointsByIdTags` operationId). - GetV0EndpointsByIdTagsWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*GetV0EndpointsByIdTagsResponse, error) + // Jwts Indicates whether JWT-based security is enabled + Jwts *bool `json:"jwts,omitempty"` - // PostV0EndpointsByIdTagsWithBodyWithResponse Creates a new tag for a specific endpoint. - // - // Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s). - // - // Corresponds with POST /v0/endpoints/{id}/tags (the `PostV0EndpointsByIdTags` operationId). - PostV0EndpointsByIdTagsWithBodyWithResponse(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostV0EndpointsByIdTagsResponse, error) + // Referrers Indicates whether referrer-based security is enable + Referrers *bool `json:"referrers,omitempty"` - // PostV0EndpointsByIdTagsWithResponse Creates a new tag for a specific endpoint. - // - // Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s). - // - // Corresponds with POST /v0/endpoints/{id}/tags (the `PostV0EndpointsByIdTags` operationId). - PostV0EndpointsByIdTagsWithResponse(ctx context.Context, id string, body PostV0EndpointsByIdTagsJSONRequestBody, reqEditors ...RequestEditorFn) (*PostV0EndpointsByIdTagsResponse, error) + // RequestFilters Indicates whether request filters are applied + RequestFilters *bool `json:"requestFilters,omitempty"` - // DeleteV0EndpointsByIdTagsByTagIdWithResponse Deletes a tag from a specific endpoint. - // - // Returns a wrapper object for the known response body format(s). - // - // Corresponds with DELETE /v0/endpoints/{id}/tags/{tag_id} (the `DeleteV0EndpointsByIdTagsByTagId` operationId). - DeleteV0EndpointsByIdTagsByTagIdWithResponse(ctx context.Context, id string, tagId string, reqEditors ...RequestEditorFn) (*DeleteV0EndpointsByIdTagsByTagIdResponse, error) + // Tokens Indicates whether token-based security is enabled + Tokens *bool `json:"tokens,omitempty"` - // GetV0EndpointsByIdUrlsWithResponse Returns the URLs for a specific endpoint. - // - // Returns the URLs for a specific endpoint. For multichain endpoints, the response also includes a `multichain_urls` map with the URLs for every supported network. - // - // Returns a wrapper object for the known response body format(s). - // - // Corresponds with GET /v0/endpoints/{id}/urls (the `GetV0EndpointsByIdUrls` operationId). - GetV0EndpointsByIdUrlsWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*GetV0EndpointsByIdUrlsResponse, error) + // ValidHosts Indicates whether only valid hosts are allowed + ValidHosts *bool `json:"validHosts,omitempty"` + } `json:"options,omitempty"` - // GetV0MetricsWithResponse Fetches metrics aggregated across all endpoints for an account. - // - // Returns a wrapper object for the known response body format(s). - // - // Corresponds with GET /v0/metrics (the `GetV0Metrics` operationId). - GetV0MetricsWithResponse(ctx context.Context, params *GetV0MetricsParams, reqEditors ...RequestEditorFn) (*GetV0MetricsResponse, error) + // Referrers An array of referrer-based security configurations + Referrers *[]struct { + // Id A unique identifier for the referrer. + Id *string `json:"id,omitempty"` - // GetV0TeamsWithResponse Retrieves a list of all teams. - // - // Returns a wrapper object for the known response body format(s). - // - // Corresponds with GET /v0/teams (the `GetV0Teams` operationId). - GetV0TeamsWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetV0TeamsResponse, error) + // Referrer The referrer URL allowed to access the endpoint + Referrer *string `json:"referrer,omitempty"` + } `json:"referrers,omitempty"` - // PostV0TeamsWithBodyWithResponse Creates a new team. - // - // Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s). - // - // Corresponds with POST /v0/teams (the `PostV0Teams` operationId). - PostV0TeamsWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostV0TeamsResponse, error) + // Tokens An array of token-based security configurations + Tokens *[]struct { + // Id A unique identifier for the token + Id *string `json:"id,omitempty"` - // PostV0TeamsWithResponse Creates a new team. - // - // Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s). - // - // Corresponds with POST /v0/teams (the `PostV0Teams` operationId). - PostV0TeamsWithResponse(ctx context.Context, body PostV0TeamsJSONRequestBody, reqEditors ...RequestEditorFn) (*PostV0TeamsResponse, error) + // Token The actual token value used for authentication + Token *string `json:"token,omitempty"` + } `json:"tokens,omitempty"` + } `json:"security,omitempty"` - // DeleteV0TeamsByIdWithResponse Deletes an empty team. - // - // Deletes an empty team. The team must have no members before it can be deleted. - // - // Returns a wrapper object for the known response body format(s). - // - // Corresponds with DELETE /v0/teams/{id} (the `DeleteV0TeamsById` operationId). - DeleteV0TeamsByIdWithResponse(ctx context.Context, id int, reqEditors ...RequestEditorFn) (*DeleteV0TeamsByIdResponse, error) + // WssUrl The WebSocket URL to access the newly created endpoint + WssUrl *string `json:"wss_url,omitempty"` + } `json:"data,omitempty"` - // GetV0TeamsByIdWithResponse Retrieves details for a specific team. - // - // Returns a wrapper object for the known response body format(s). - // - // Corresponds with GET /v0/teams/{id} (the `GetV0TeamsById` operationId). - GetV0TeamsByIdWithResponse(ctx context.Context, id int, reqEditors ...RequestEditorFn) (*GetV0TeamsByIdResponse, error) + // Error Contains error information, if any + Error *string `json:"error,omitempty"` +} { + return r.JSON200 +} - // GetV0TeamsByIdEndpointsWithResponse Retrieves a list of endpoints accessible to a team. - // - // Returns a wrapper object for the known response body format(s). - // - // Corresponds with GET /v0/teams/{id}/endpoints (the `GetV0TeamsByIdEndpoints` operationId). - GetV0TeamsByIdEndpointsWithResponse(ctx context.Context, id int, reqEditors ...RequestEditorFn) (*GetV0TeamsByIdEndpointsResponse, error) +// GetBody returns the raw response body bytes +func (r PostV0EndpointsResponse) GetBody() []byte { + return r.Body +} - // PatchV0TeamsByIdEndpointsWithBodyWithResponse Assigns or unassigns endpoints to a team. - // - // Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s). - // - // Corresponds with PATCH /v0/teams/{id}/endpoints (the `PatchV0TeamsByIdEndpoints` operationId). - PatchV0TeamsByIdEndpointsWithBodyWithResponse(ctx context.Context, id int, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PatchV0TeamsByIdEndpointsResponse, error) +// Status returns HTTPResponse.Status +func (r PostV0EndpointsResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r PostV0EndpointsResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} - // PatchV0TeamsByIdEndpointsWithResponse Assigns or unassigns endpoints to a team. - // - // Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s). - // - // Corresponds with PATCH /v0/teams/{id}/endpoints (the `PatchV0TeamsByIdEndpoints` operationId). - PatchV0TeamsByIdEndpointsWithResponse(ctx context.Context, id int, body PatchV0TeamsByIdEndpointsJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchV0TeamsByIdEndpointsResponse, error) +// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers +func (r PostV0EndpointsResponse) ContentType() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Header.Get("Content-Type") + } + return "" +} - // PostV0TeamsByIdMembersWithBodyWithResponse Invites a user to a team. - // - // Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s). - // - // Corresponds with POST /v0/teams/{id}/members (the `PostV0TeamsByIdMembers` operationId). - PostV0TeamsByIdMembersWithBodyWithResponse(ctx context.Context, id int, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostV0TeamsByIdMembersResponse, error) +type PostV0EndpointsBulkStatusResponse struct { + Body []byte + HTTPResponse *http.Response + // JSON200 the response for an HTTP 200 `application/json` response + JSON200 *struct { + // Data Contains the result of the bulk status update + Data *struct { + // FailedCount The number of endpoints that failed to update + FailedCount *int `json:"failed_count,omitempty"` - // PostV0TeamsByIdMembersWithResponse Invites a user to a team. - // - // Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s). - // - // Corresponds with POST /v0/teams/{id}/members (the `PostV0TeamsByIdMembers` operationId). - PostV0TeamsByIdMembersWithResponse(ctx context.Context, id int, body PostV0TeamsByIdMembersJSONRequestBody, reqEditors ...RequestEditorFn) (*PostV0TeamsByIdMembersResponse, error) + // Results An array of result objects for each endpoint + Results *[]struct { + // Id The endpoint ID + Id *string `json:"id,omitempty"` - // DeleteV0TeamsByIdMembersByUserIdWithResponse Removes a user from a team. - // - // Returns a wrapper object for the known response body format(s). - // - // Corresponds with DELETE /v0/teams/{id}/members/{user_id} (the `DeleteV0TeamsByIdMembersByUserId` operationId). - DeleteV0TeamsByIdMembersByUserIdWithResponse(ctx context.Context, id int, userId int, reqEditors ...RequestEditorFn) (*DeleteV0TeamsByIdMembersByUserIdResponse, error) + // Success Whether the status update succeeded for this endpoint + Success *bool `json:"success,omitempty"` + } `json:"results,omitempty"` - // PostV0TeamsByIdMembersByUserIdResendInviteWithResponse Resends an invitation email to a pending team member. - // - // Returns a wrapper object for the known response body format(s). - // - // Corresponds with POST /v0/teams/{id}/members/{user_id}/resend_invite (the `PostV0TeamsByIdMembersByUserIdResendInvite` operationId). - PostV0TeamsByIdMembersByUserIdResendInviteWithResponse(ctx context.Context, id int, userId int, reqEditors ...RequestEditorFn) (*PostV0TeamsByIdMembersByUserIdResendInviteResponse, error) + // Total The total number of endpoints in the request + Total *int `json:"total,omitempty"` - // GetV0ToolingAccessWithResponse Returns whether Tooling Access is enabled for the account. - // - // Returns a wrapper object for the known response body format(s). - // - // Corresponds with GET /v0/tooling-access (the `GetV0ToolingAccess` operationId). - GetV0ToolingAccessWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetV0ToolingAccessResponse, error) + // UpdatedCount The number of endpoints successfully updated + UpdatedCount *int `json:"updated_count,omitempty"` + } `json:"data,omitempty"` + } +} - // PatchV0ToolingAccessWithBodyWithResponse Enable (provision/reactivate) or disable Tooling Access for the account. - // - // Enable (provision/reactivate) or disable Tooling Access for the account. Enabling is idempotent and requires an admin role. - // - // Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s). - // - // Corresponds with PATCH /v0/tooling-access (the `PatchV0ToolingAccess` operationId). - PatchV0ToolingAccessWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PatchV0ToolingAccessResponse, error) +// GetJSON200 returns the response for an HTTP 200 `application/json` response +func (r PostV0EndpointsBulkStatusResponse) GetJSON200() *struct { + // Data Contains the result of the bulk status update + Data *struct { + // FailedCount The number of endpoints that failed to update + FailedCount *int `json:"failed_count,omitempty"` - // PatchV0ToolingAccessWithResponse Enable (provision/reactivate) or disable Tooling Access for the account. - // - // Enable (provision/reactivate) or disable Tooling Access for the account. Enabling is idempotent and requires an admin role. - // - // Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s). - // - // Corresponds with PATCH /v0/tooling-access (the `PatchV0ToolingAccess` operationId). - PatchV0ToolingAccessWithResponse(ctx context.Context, body PatchV0ToolingAccessJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchV0ToolingAccessResponse, error) + // Results An array of result objects for each endpoint + Results *[]struct { + // Id The endpoint ID + Id *string `json:"id,omitempty"` - // PostV0ToolingAccessTokenWithResponse Mints a short-lived ES256 JWT for authenticating data-plane RPC calls. - // - // Mints a short-lived ES256 JWT for authenticating data-plane RPC calls. Requires Tooling Access to be enabled first. - // - // Returns a wrapper object for the known response body format(s). - // - // Corresponds with POST /v0/tooling-access/token (the `PostV0ToolingAccessToken` operationId). - PostV0ToolingAccessTokenWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*PostV0ToolingAccessTokenResponse, error) + // Success Whether the status update succeeded for this endpoint + Success *bool `json:"success,omitempty"` + } `json:"results,omitempty"` - // GetV0UsageRpcWithResponse Retrieves usage total for specified time range. - // - // Returns a wrapper object for the known response body format(s). - // - // Corresponds with GET /v0/usage/rpc (the `GetV0UsageRpc` operationId). - GetV0UsageRpcWithResponse(ctx context.Context, params *GetV0UsageRpcParams, reqEditors ...RequestEditorFn) (*GetV0UsageRpcResponse, error) + // Total The total number of endpoints in the request + Total *int `json:"total,omitempty"` - // GetV0UsageRpcByChainWithResponse Retrieves usage data by chain. - // - // Returns a wrapper object for the known response body format(s). - // - // Corresponds with GET /v0/usage/rpc/by-chain (the `GetV0UsageRpcByChain` operationId). - GetV0UsageRpcByChainWithResponse(ctx context.Context, params *GetV0UsageRpcByChainParams, reqEditors ...RequestEditorFn) (*GetV0UsageRpcByChainResponse, error) + // UpdatedCount The number of endpoints successfully updated + UpdatedCount *int `json:"updated_count,omitempty"` + } `json:"data,omitempty"` +} { + return r.JSON200 +} - // GetV0UsageRpcByEndpointWithResponse Retrieves usage data by endpoint. - // - // Returns a wrapper object for the known response body format(s). - // - // Corresponds with GET /v0/usage/rpc/by-endpoint (the `GetV0UsageRpcByEndpoint` operationId). - GetV0UsageRpcByEndpointWithResponse(ctx context.Context, params *GetV0UsageRpcByEndpointParams, reqEditors ...RequestEditorFn) (*GetV0UsageRpcByEndpointResponse, error) +// GetBody returns the raw response body bytes +func (r PostV0EndpointsBulkStatusResponse) GetBody() []byte { + return r.Body +} - // GetV0UsageRpcByMethodWithResponse Retrieves usage data by method. - // - // Returns a wrapper object for the known response body format(s). - // - // Corresponds with GET /v0/usage/rpc/by-method (the `GetV0UsageRpcByMethod` operationId). - GetV0UsageRpcByMethodWithResponse(ctx context.Context, params *GetV0UsageRpcByMethodParams, reqEditors ...RequestEditorFn) (*GetV0UsageRpcByMethodResponse, error) +// Status returns HTTPResponse.Status +func (r PostV0EndpointsBulkStatusResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} - // GetV0UsageRpcByTagWithResponse Retrieves usage data grouped by tag. - // - // Retrieves usage data grouped by tag. Includes an untagged bucket for endpoints with no tags. - // - // Returns a wrapper object for the known response body format(s). - // - // Corresponds with GET /v0/usage/rpc/by-tag (the `GetV0UsageRpcByTag` operationId). - GetV0UsageRpcByTagWithResponse(ctx context.Context, params *GetV0UsageRpcByTagParams, reqEditors ...RequestEditorFn) (*GetV0UsageRpcByTagResponse, error) +// StatusCode returns HTTPResponse.StatusCode +func (r PostV0EndpointsBulkStatusResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 } -type GetV0AccountInfoResponse struct { +// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers +func (r PostV0EndpointsBulkStatusResponse) ContentType() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Header.Get("Content-Type") + } + return "" +} + +type DeleteV0EndpointsBulkTagsResponse struct { Body []byte HTTPResponse *http.Response // JSON200 the response for an HTTP 200 `application/json` response JSON200 *struct { - // Data An object which contains the following fields: + // Data Contains the result of the bulk tag removal Data *struct { - // BillingVersion The billing version associated with the account - BillingVersion *string `json:"billing_version,omitempty"` - - // CreatedAt The timestamp when the account was created - CreatedAt *string `json:"created_at,omitempty"` - - // Id The unique identifier for the account - Id *int `json:"id,omitempty"` + // FailedCount The number of endpoints that failed to update + FailedCount *int `json:"failed_count,omitempty"` - // Name The name of the account - Name *string `json:"name,omitempty"` + // Results An array of result objects for each endpoint + Results *[]struct { + // Id The endpoint ID + Id *string `json:"id,omitempty"` - // Subscription An object containing the account's subscription details: - Subscription *struct { - // Interval The billing interval of the subscription - Interval *string `json:"interval,omitempty"` + // Success Whether the tag was successfully removed from this endpoint + Success *bool `json:"success,omitempty"` + } `json:"results,omitempty"` - // PlanName The name of the subscription plan - PlanName *string `json:"plan_name,omitempty"` + // Total The total number of endpoints in the request + Total *int `json:"total,omitempty"` - // Status The status of the subscription - Status *string `json:"status,omitempty"` - } `json:"subscription,omitempty"` + // UpdatedCount The number of endpoints successfully updated + UpdatedCount *int `json:"updated_count,omitempty"` } `json:"data,omitempty"` - - // Error An error message if any issue occurs - Error *string `json:"error,omitempty"` } } // GetJSON200 returns the response for an HTTP 200 `application/json` response -func (r GetV0AccountInfoResponse) GetJSON200() *struct { - // Data An object which contains the following fields: +func (r DeleteV0EndpointsBulkTagsResponse) GetJSON200() *struct { + // Data Contains the result of the bulk tag removal Data *struct { - // BillingVersion The billing version associated with the account - BillingVersion *string `json:"billing_version,omitempty"` - - // CreatedAt The timestamp when the account was created - CreatedAt *string `json:"created_at,omitempty"` - - // Id The unique identifier for the account - Id *int `json:"id,omitempty"` + // FailedCount The number of endpoints that failed to update + FailedCount *int `json:"failed_count,omitempty"` - // Name The name of the account - Name *string `json:"name,omitempty"` + // Results An array of result objects for each endpoint + Results *[]struct { + // Id The endpoint ID + Id *string `json:"id,omitempty"` - // Subscription An object containing the account's subscription details: - Subscription *struct { - // Interval The billing interval of the subscription - Interval *string `json:"interval,omitempty"` + // Success Whether the tag was successfully removed from this endpoint + Success *bool `json:"success,omitempty"` + } `json:"results,omitempty"` - // PlanName The name of the subscription plan - PlanName *string `json:"plan_name,omitempty"` + // Total The total number of endpoints in the request + Total *int `json:"total,omitempty"` - // Status The status of the subscription - Status *string `json:"status,omitempty"` - } `json:"subscription,omitempty"` + // UpdatedCount The number of endpoints successfully updated + UpdatedCount *int `json:"updated_count,omitempty"` } `json:"data,omitempty"` - - // Error An error message if any issue occurs - Error *string `json:"error,omitempty"` } { return r.JSON200 } // GetBody returns the raw response body bytes -func (r GetV0AccountInfoResponse) GetBody() []byte { +func (r DeleteV0EndpointsBulkTagsResponse) GetBody() []byte { return r.Body } // Status returns HTTPResponse.Status -func (r GetV0AccountInfoResponse) Status() string { +func (r DeleteV0EndpointsBulkTagsResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -6531,7 +9661,7 @@ func (r GetV0AccountInfoResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r GetV0AccountInfoResponse) StatusCode() int { +func (r DeleteV0EndpointsBulkTagsResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } @@ -6539,56 +9669,92 @@ func (r GetV0AccountInfoResponse) StatusCode() int { } // ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers -func (r GetV0AccountInfoResponse) ContentType() string { +func (r DeleteV0EndpointsBulkTagsResponse) ContentType() string { if r.HTTPResponse != nil { return r.HTTPResponse.Header.Get("Content-Type") } return "" } -type GetV0ApiCreditsByChainResponse struct { +type PostV0EndpointsBulkTagsResponse struct { Body []byte HTTPResponse *http.Response // JSON200 the response for an HTTP 200 `application/json` response JSON200 *struct { - // Data An array of data which contains the following fields: - Data *[]struct { - // Credits The API credit cost of the method for the account's billing version - Credits *int `json:"credits,omitempty"` + // Data Contains the result of the bulk tag operation + Data *struct { + // FailedCount The number of endpoints that failed to update + FailedCount *int `json:"failed_count,omitempty"` - // Method The name of the RPC method - Method *string `json:"method,omitempty"` - } `json:"data,omitempty"` + // Results An array of result objects for each endpoint + Results *[]struct { + // Id The endpoint ID + Id *string `json:"id,omitempty"` - // Error An error message if any issue occurs - Error *string `json:"error,omitempty"` + // Success Whether the tag was successfully added to this endpoint + Success *bool `json:"success,omitempty"` + } `json:"results,omitempty"` + + // Tag The tag that was added to the endpoints + Tag *struct { + // Label The label/name of the tag + Label *string `json:"label,omitempty"` + + // TagId The unique identifier of the tag + TagId *int `json:"tag_id,omitempty"` + } `json:"tag,omitempty"` + + // Total The total number of endpoints in the request + Total *int `json:"total,omitempty"` + + // UpdatedCount The number of endpoints successfully updated + UpdatedCount *int `json:"updated_count,omitempty"` + } `json:"data,omitempty"` } } // GetJSON200 returns the response for an HTTP 200 `application/json` response -func (r GetV0ApiCreditsByChainResponse) GetJSON200() *struct { - // Data An array of data which contains the following fields: - Data *[]struct { - // Credits The API credit cost of the method for the account's billing version - Credits *int `json:"credits,omitempty"` +func (r PostV0EndpointsBulkTagsResponse) GetJSON200() *struct { + // Data Contains the result of the bulk tag operation + Data *struct { + // FailedCount The number of endpoints that failed to update + FailedCount *int `json:"failed_count,omitempty"` - // Method The name of the RPC method - Method *string `json:"method,omitempty"` - } `json:"data,omitempty"` + // Results An array of result objects for each endpoint + Results *[]struct { + // Id The endpoint ID + Id *string `json:"id,omitempty"` - // Error An error message if any issue occurs - Error *string `json:"error,omitempty"` + // Success Whether the tag was successfully added to this endpoint + Success *bool `json:"success,omitempty"` + } `json:"results,omitempty"` + + // Tag The tag that was added to the endpoints + Tag *struct { + // Label The label/name of the tag + Label *string `json:"label,omitempty"` + + // TagId The unique identifier of the tag + TagId *int `json:"tag_id,omitempty"` + } `json:"tag,omitempty"` + + // Total The total number of endpoints in the request + Total *int `json:"total,omitempty"` + + // UpdatedCount The number of endpoints successfully updated + UpdatedCount *int `json:"updated_count,omitempty"` + } `json:"data,omitempty"` } { return r.JSON200 } // GetBody returns the raw response body bytes -func (r GetV0ApiCreditsByChainResponse) GetBody() []byte { +func (r PostV0EndpointsBulkTagsResponse) GetBody() []byte { return r.Body } // Status returns HTTPResponse.Status -func (r GetV0ApiCreditsByChainResponse) Status() string { +func (r PostV0EndpointsBulkTagsResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -6596,7 +9762,7 @@ func (r GetV0ApiCreditsByChainResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r GetV0ApiCreditsByChainResponse) StatusCode() int { +func (r PostV0EndpointsBulkTagsResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } @@ -6604,122 +9770,68 @@ func (r GetV0ApiCreditsByChainResponse) StatusCode() int { } // ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers -func (r GetV0ApiCreditsByChainResponse) ContentType() string { +func (r PostV0EndpointsBulkTagsResponse) ContentType() string { if r.HTTPResponse != nil { return r.HTTPResponse.Header.Get("Content-Type") } return "" } -type GetV0BillingInvoicesResponse struct { +type GetV0EndpointsTagsResponse struct { Body []byte HTTPResponse *http.Response // JSON200 the response for an HTTP 200 `application/json` response JSON200 *struct { - // Data The data object which contains the following fields: + // Data Contains the tags data Data *struct { - // Invoices An array of invoices - Invoices *[]struct { - // AmountDue The total amount that is due on the invoice - AmountDue *int `json:"amount_due,omitempty"` - - // AmountPaid The total amount that has been paid for the invoice - AmountPaid *int `json:"amount_paid,omitempty"` - - // BillingReason The reason for generating the invoice - BillingReason *string `json:"billing_reason,omitempty"` - - // Created The timestamp when the invoice was created in second - Created *int `json:"created,omitempty"` - - // Id The unique identifier for the invoice - Id *string `json:"id,omitempty"` - - // Lines An array of lines which contains the following fields: - Lines *[]struct { - // Amount The cost associated with each line item - Amount *int `json:"amount,omitempty"` - - // Description A detailed description of each line item billed - Description *string `json:"description,omitempty"` - } `json:"lines,omitempty"` - - // PeriodEnd The end timestamp of the billing period for the invoice in second - PeriodEnd *int `json:"period_end,omitempty"` - - // PeriodStart The start timestamp of the billing period for the invoice in second - PeriodStart *int `json:"period_start,omitempty"` + // Tags An array of tag objects + Tags *[]struct { + // Id The unique identifier for the tag + Id *int `json:"id,omitempty"` - // Status The current state of the invoice - Status *string `json:"status,omitempty"` + // Label The label/name of the tag + Label *string `json:"label,omitempty"` - // Subtotal The total cost of the invoice - Subtotal *int `json:"subtotal,omitempty"` - } `json:"invoices,omitempty"` + // UsageCount The number of endpoints associated with this tag + UsageCount *int `json:"usage_count,omitempty"` + } `json:"tags,omitempty"` } `json:"data,omitempty"` - // Error An error message if any issue occurs + // Error Contains error details if the request failed; null if successful Error *string `json:"error,omitempty"` } } // GetJSON200 returns the response for an HTTP 200 `application/json` response -func (r GetV0BillingInvoicesResponse) GetJSON200() *struct { - // Data The data object which contains the following fields: +func (r GetV0EndpointsTagsResponse) GetJSON200() *struct { + // Data Contains the tags data Data *struct { - // Invoices An array of invoices - Invoices *[]struct { - // AmountDue The total amount that is due on the invoice - AmountDue *int `json:"amount_due,omitempty"` - - // AmountPaid The total amount that has been paid for the invoice - AmountPaid *int `json:"amount_paid,omitempty"` - - // BillingReason The reason for generating the invoice - BillingReason *string `json:"billing_reason,omitempty"` - - // Created The timestamp when the invoice was created in second - Created *int `json:"created,omitempty"` - - // Id The unique identifier for the invoice - Id *string `json:"id,omitempty"` - - // Lines An array of lines which contains the following fields: - Lines *[]struct { - // Amount The cost associated with each line item - Amount *int `json:"amount,omitempty"` - - // Description A detailed description of each line item billed - Description *string `json:"description,omitempty"` - } `json:"lines,omitempty"` - - // PeriodEnd The end timestamp of the billing period for the invoice in second - PeriodEnd *int `json:"period_end,omitempty"` - - // PeriodStart The start timestamp of the billing period for the invoice in second - PeriodStart *int `json:"period_start,omitempty"` + // Tags An array of tag objects + Tags *[]struct { + // Id The unique identifier for the tag + Id *int `json:"id,omitempty"` - // Status The current state of the invoice - Status *string `json:"status,omitempty"` + // Label The label/name of the tag + Label *string `json:"label,omitempty"` - // Subtotal The total cost of the invoice - Subtotal *int `json:"subtotal,omitempty"` - } `json:"invoices,omitempty"` + // UsageCount The number of endpoints associated with this tag + UsageCount *int `json:"usage_count,omitempty"` + } `json:"tags,omitempty"` } `json:"data,omitempty"` - // Error An error message if any issue occurs + // Error Contains error details if the request failed; null if successful Error *string `json:"error,omitempty"` } { return r.JSON200 } // GetBody returns the raw response body bytes -func (r GetV0BillingInvoicesResponse) GetBody() []byte { +func (r GetV0EndpointsTagsResponse) GetBody() []byte { return r.Body } // Status returns HTTPResponse.Status -func (r GetV0BillingInvoicesResponse) Status() string { +func (r GetV0EndpointsTagsResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -6727,7 +9839,7 @@ func (r GetV0BillingInvoicesResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r GetV0BillingInvoicesResponse) StatusCode() int { +func (r GetV0EndpointsTagsResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } @@ -6735,86 +9847,44 @@ func (r GetV0BillingInvoicesResponse) StatusCode() int { } // ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers -func (r GetV0BillingInvoicesResponse) ContentType() string { +func (r GetV0EndpointsTagsResponse) ContentType() string { if r.HTTPResponse != nil { return r.HTTPResponse.Header.Get("Content-Type") } return "" } -type GetV0BillingPaymentsResponse struct { +type DeleteV0EndpointsTagsByIdResponse struct { Body []byte HTTPResponse *http.Response // JSON200 the response for an HTTP 200 `application/json` response JSON200 *struct { - // Data The data object which contains the following fields: - Data *struct { - // Payments An array of payments associated with the account - Payments *[]struct { - // Amount The total amount of the payment - Amount *string `json:"amount,omitempty"` - - // CardLast4 The last four digits of the card used for the payment (masked for security) - CardLast4 *string `json:"card_last_4,omitempty"` - - // CreatedAt The timestamp when the payment was created in second - CreatedAt *string `json:"created_at,omitempty"` - - // Currency The currency in which the payment was made - Currency *string `json:"currency,omitempty"` - - // MarketplaceAmount The total amount spent in the marketplace - MarketplaceAmount *string `json:"marketplace_amount,omitempty"` - - // Status The current status of the payment - Status *string `json:"status,omitempty"` - } `json:"payments,omitempty"` - } `json:"data,omitempty"` + // Data Contains the result of the deletion + Data *map[string]interface{} `json:"data,omitempty"` - // Error An error message if any issue occurs + // Error Contains error details if the request failed; null if successful Error *string `json:"error,omitempty"` } } // GetJSON200 returns the response for an HTTP 200 `application/json` response -func (r GetV0BillingPaymentsResponse) GetJSON200() *struct { - // Data The data object which contains the following fields: - Data *struct { - // Payments An array of payments associated with the account - Payments *[]struct { - // Amount The total amount of the payment - Amount *string `json:"amount,omitempty"` - - // CardLast4 The last four digits of the card used for the payment (masked for security) - CardLast4 *string `json:"card_last_4,omitempty"` - - // CreatedAt The timestamp when the payment was created in second - CreatedAt *string `json:"created_at,omitempty"` - - // Currency The currency in which the payment was made - Currency *string `json:"currency,omitempty"` - - // MarketplaceAmount The total amount spent in the marketplace - MarketplaceAmount *string `json:"marketplace_amount,omitempty"` - - // Status The current status of the payment - Status *string `json:"status,omitempty"` - } `json:"payments,omitempty"` - } `json:"data,omitempty"` +func (r DeleteV0EndpointsTagsByIdResponse) GetJSON200() *struct { + // Data Contains the result of the deletion + Data *map[string]interface{} `json:"data,omitempty"` - // Error An error message if any issue occurs + // Error Contains error details if the request failed; null if successful Error *string `json:"error,omitempty"` } { return r.JSON200 } // GetBody returns the raw response body bytes -func (r GetV0BillingPaymentsResponse) GetBody() []byte { +func (r DeleteV0EndpointsTagsByIdResponse) GetBody() []byte { return r.Body } // Status returns HTTPResponse.Status -func (r GetV0BillingPaymentsResponse) Status() string { +func (r DeleteV0EndpointsTagsByIdResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -6822,7 +9892,7 @@ func (r GetV0BillingPaymentsResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r GetV0BillingPaymentsResponse) StatusCode() int { +func (r DeleteV0EndpointsTagsByIdResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } @@ -6830,76 +9900,62 @@ func (r GetV0BillingPaymentsResponse) StatusCode() int { } // ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers -func (r GetV0BillingPaymentsResponse) ContentType() string { +func (r DeleteV0EndpointsTagsByIdResponse) ContentType() string { if r.HTTPResponse != nil { return r.HTTPResponse.Header.Get("Content-Type") } return "" } -type GetV0ChainsResponse struct { +type PatchV0EndpointsTagsByIdResponse struct { Body []byte HTTPResponse *http.Response // JSON200 the response for an HTTP 200 `application/json` response JSON200 *struct { - // Data An array of data which contains the following fields: - Data *[]struct { - IsSelectChain *bool `json:"is_select_chain,omitempty"` - - // Networks An array of networks - Networks *[]struct { - ChainId *int `json:"chain_id,omitempty"` - - // Name The name of the specific network - Name *string `json:"name,omitempty"` + // Data Contains the updated tag details + Data *struct { + // Id The unique identifier of the tag + Id *int `json:"id,omitempty"` - // Slug A short, unique identifier for the specific network - Slug *string `json:"slug,omitempty"` - } `json:"networks,omitempty"` + // Label The updated label/name of the tag + Label *string `json:"label,omitempty"` - // Slug A short, unique identifier for the blockchain network - Slug *string `json:"slug,omitempty"` + // UsageCount The number of endpoints currently using this tag + UsageCount *int `json:"usage_count,omitempty"` } `json:"data,omitempty"` - // Error An error message if any issue occurs + // Error Contains error details if the request failed; null if successful Error *string `json:"error,omitempty"` } } // GetJSON200 returns the response for an HTTP 200 `application/json` response -func (r GetV0ChainsResponse) GetJSON200() *struct { - // Data An array of data which contains the following fields: - Data *[]struct { - IsSelectChain *bool `json:"is_select_chain,omitempty"` - - // Networks An array of networks - Networks *[]struct { - ChainId *int `json:"chain_id,omitempty"` - - // Name The name of the specific network - Name *string `json:"name,omitempty"` +func (r PatchV0EndpointsTagsByIdResponse) GetJSON200() *struct { + // Data Contains the updated tag details + Data *struct { + // Id The unique identifier of the tag + Id *int `json:"id,omitempty"` - // Slug A short, unique identifier for the specific network - Slug *string `json:"slug,omitempty"` - } `json:"networks,omitempty"` + // Label The updated label/name of the tag + Label *string `json:"label,omitempty"` - // Slug A short, unique identifier for the blockchain network - Slug *string `json:"slug,omitempty"` + // UsageCount The number of endpoints currently using this tag + UsageCount *int `json:"usage_count,omitempty"` } `json:"data,omitempty"` - // Error An error message if any issue occurs + // Error Contains error details if the request failed; null if successful Error *string `json:"error,omitempty"` } { return r.JSON200 } // GetBody returns the raw response body bytes -func (r GetV0ChainsResponse) GetBody() []byte { +func (r PatchV0EndpointsTagsByIdResponse) GetBody() []byte { return r.Body } // Status returns HTTPResponse.Status -func (r GetV0ChainsResponse) Status() string { +func (r PatchV0EndpointsTagsByIdResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -6907,7 +9963,7 @@ func (r GetV0ChainsResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r GetV0ChainsResponse) StatusCode() int { +func (r PatchV0EndpointsTagsByIdResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } @@ -6915,152 +9971,38 @@ func (r GetV0ChainsResponse) StatusCode() int { } // ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers -func (r GetV0ChainsResponse) ContentType() string { +func (r PatchV0EndpointsTagsByIdResponse) ContentType() string { if r.HTTPResponse != nil { return r.HTTPResponse.Header.Get("Content-Type") } return "" } -type GetV0EndpointsResponse struct { +type DeleteV0EndpointsByIdResponse struct { Body []byte HTTPResponse *http.Response // JSON200 the response for an HTTP 200 `application/json` response JSON200 *struct { - // Data An array of data which contains the following fields: - Data *[]struct { - // Chain The blockchain the endpoint is associated with - Chain *string `json:"chain,omitempty"` - - // HttpUrl The HTTP URL to access the endpoint - HttpUrl *string `json:"http_url,omitempty"` - - // Id A unique identifier for the specific endpoint - Id *string `json:"id,omitempty"` - - // IsDedicated Whether the endpoint is a dedicated endpoint - IsDedicated *bool `json:"is_dedicated,omitempty"` - - // IsFlatRate Whether the endpoint is a flat rate endpoint - IsFlatRate *bool `json:"is_flat_rate,omitempty"` - - // IsMultichain Whether the endpoint is a multichain endpoint - IsMultichain *bool `json:"is_multichain,omitempty"` - - // Label A descriptive label for the endpoint - Label *string `json:"label,omitempty"` - - // Name The endpoint subdomain - Name *string `json:"name,omitempty"` - - // Network The specific network of the blockchain - Network *string `json:"network,omitempty"` - - // Status The current status of the endpoint (active or paused) - Status *string `json:"status,omitempty"` - - // Tags An array of tags associated with the endpoint - Tags *[]struct { - // Label The label/name of the tag - Label *string `json:"label,omitempty"` - - // TagId The unique identifier for the tag - TagId *int `json:"tag_id,omitempty"` - } `json:"tags,omitempty"` - - // WssUrl The WebSocket URL to access the endpoint - WssUrl *string `json:"wss_url,omitempty"` - } `json:"data,omitempty"` - - // Error An error message if any issue occurs - Error *string `json:"error,omitempty"` - - // Pagination Pagination details for the response - Pagination *struct { - // Limit The maximum number of endpoints returned per page - Limit *int `json:"limit,omitempty"` - - // Offset The number of endpoints skipped - Offset *int `json:"offset,omitempty"` - - // Total The total number of endpoints matching the query - Total *int `json:"total,omitempty"` - } `json:"pagination,omitempty"` + // Result Indicates whether the endpoint was deleted + Result *bool `json:"result,omitempty"` } } // GetJSON200 returns the response for an HTTP 200 `application/json` response -func (r GetV0EndpointsResponse) GetJSON200() *struct { - // Data An array of data which contains the following fields: - Data *[]struct { - // Chain The blockchain the endpoint is associated with - Chain *string `json:"chain,omitempty"` - - // HttpUrl The HTTP URL to access the endpoint - HttpUrl *string `json:"http_url,omitempty"` - - // Id A unique identifier for the specific endpoint - Id *string `json:"id,omitempty"` - - // IsDedicated Whether the endpoint is a dedicated endpoint - IsDedicated *bool `json:"is_dedicated,omitempty"` - - // IsFlatRate Whether the endpoint is a flat rate endpoint - IsFlatRate *bool `json:"is_flat_rate,omitempty"` - - // IsMultichain Whether the endpoint is a multichain endpoint - IsMultichain *bool `json:"is_multichain,omitempty"` - - // Label A descriptive label for the endpoint - Label *string `json:"label,omitempty"` - - // Name The endpoint subdomain - Name *string `json:"name,omitempty"` - - // Network The specific network of the blockchain - Network *string `json:"network,omitempty"` - - // Status The current status of the endpoint (active or paused) - Status *string `json:"status,omitempty"` - - // Tags An array of tags associated with the endpoint - Tags *[]struct { - // Label The label/name of the tag - Label *string `json:"label,omitempty"` - - // TagId The unique identifier for the tag - TagId *int `json:"tag_id,omitempty"` - } `json:"tags,omitempty"` - - // WssUrl The WebSocket URL to access the endpoint - WssUrl *string `json:"wss_url,omitempty"` - } `json:"data,omitempty"` - - // Error An error message if any issue occurs - Error *string `json:"error,omitempty"` - - // Pagination Pagination details for the response - Pagination *struct { - // Limit The maximum number of endpoints returned per page - Limit *int `json:"limit,omitempty"` - - // Offset The number of endpoints skipped - Offset *int `json:"offset,omitempty"` - - // Total The total number of endpoints matching the query - Total *int `json:"total,omitempty"` - } `json:"pagination,omitempty"` +func (r DeleteV0EndpointsByIdResponse) GetJSON200() *struct { + // Result Indicates whether the endpoint was deleted + Result *bool `json:"result,omitempty"` } { return r.JSON200 } // GetBody returns the raw response body bytes -func (r GetV0EndpointsResponse) GetBody() []byte { +func (r DeleteV0EndpointsByIdResponse) GetBody() []byte { return r.Body } // Status returns HTTPResponse.Status -func (r GetV0EndpointsResponse) Status() string { +func (r DeleteV0EndpointsByIdResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -7068,7 +10010,7 @@ func (r GetV0EndpointsResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r GetV0EndpointsResponse) StatusCode() int { +func (r DeleteV0EndpointsByIdResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } @@ -7076,14 +10018,14 @@ func (r GetV0EndpointsResponse) StatusCode() int { } // ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers -func (r GetV0EndpointsResponse) ContentType() string { +func (r DeleteV0EndpointsByIdResponse) ContentType() string { if r.HTTPResponse != nil { return r.HTTPResponse.Header.Get("Content-Type") } return "" } -type PostV0EndpointsResponse struct { +type GetV0EndpointsByIdResponse struct { Body []byte HTTPResponse *http.Response // JSON200 the response for an HTTP 200 `application/json` response @@ -7097,7 +10039,8 @@ type PostV0EndpointsResponse struct { HttpUrl *string `json:"http_url,omitempty"` // Id A unique identifier for the created endpoint - Id *string `json:"id,omitempty"` + Id *string `json:"id,omitempty"` + IsMultichain *bool `json:"is_multichain,omitempty"` // Label A descriptive label for the endpoint Label *string `json:"label,omitempty"` @@ -7125,14 +10068,10 @@ type PostV0EndpointsResponse struct { // Security The security object which contains the following fields: Security *struct { - // DomainMasks An array of domain-based security configurations DomainMasks *[]struct { - // Domain The allowed domain for accessing the endpoint Domain *string `json:"domain,omitempty"` - - // Id A unique identifier for the domain mask - Id *string `json:"id,omitempty"` - } `json:"domainMasks,omitempty"` + Id *string `json:"id,omitempty"` + } `json:"domain_masks,omitempty"` // Ips An array of IP-based security configurations Ips *[]struct { @@ -7157,47 +10096,19 @@ type PostV0EndpointsResponse struct { // PublicKey The public key used in the JWT PublicKey *string `json:"public_key,omitempty"` } `json:"jwts,omitempty"` - - // Options A list of security options available for the endpoint Options *struct { - // Cors Indicates whether Cross-Origin Resource Sharing (CORS) is enabled - Cors *bool `json:"cors,omitempty"` - - // DebugAuthErrors Indicates whether detailed authentication error debugging is enabled - DebugAuthErrors *bool `json:"debugAuthErrors,omitempty"` - - // DomainMasks Indicates whether domain mask security is enabled - DomainMasks *bool `json:"domainMasks,omitempty"` - - // EnforceChainNetwork Indicates whether the specified chain and network are enforced for the endpoint - EnforceChainNetwork *bool `json:"enforceChainNetwork,omitempty"` - - // Hosts Indicates whether host-based security is enabled - Hosts *bool `json:"hosts,omitempty"` - - // Hsts Indicates whether HTTP Strict Transport Security (HSTS) is enforced - Hsts *bool `json:"hsts,omitempty"` - IpCustomHeader *struct { - Value *string `json:"value,omitempty"` - } `json:"ipCustomHeader,omitempty"` - - // Ips Indicates whether IP-based security is enabled - Ips *bool `json:"ips,omitempty"` - - // Jwts Indicates whether JWT-based security is enabled - Jwts *bool `json:"jwts,omitempty"` - - // Referrers Indicates whether referrer-based security is enable - Referrers *bool `json:"referrers,omitempty"` - - // RequestFilters Indicates whether request filters are applied - RequestFilters *bool `json:"requestFilters,omitempty"` - - // Tokens Indicates whether token-based security is enabled - Tokens *bool `json:"tokens,omitempty"` - - // ValidHosts Indicates whether only valid hosts are allowed - ValidHosts *bool `json:"validHosts,omitempty"` + Cors *bool `json:"cors,omitempty"` + DomainMasks *bool `json:"domainMasks,omitempty"` + Hsts *bool `json:"hsts,omitempty"` + IpCustomHeader *struct { + Value *string `json:"value,omitempty"` + } `json:"ipCustomHeader,omitempty"` + Ips *bool `json:"ips,omitempty"` + Jwts *bool `json:"jwts,omitempty"` + Referrers *bool `json:"referrers,omitempty"` + RequestFilters *bool `json:"requestFilters,omitempty"` + ResponseLogging *bool `json:"responseLogging,omitempty"` + Tokens *bool `json:"tokens,omitempty"` } `json:"options,omitempty"` // Referrers An array of referrer-based security configurations @@ -7208,6 +10119,10 @@ type PostV0EndpointsResponse struct { // Referrer The referrer URL allowed to access the endpoint Referrer *string `json:"referrer,omitempty"` } `json:"referrers,omitempty"` + RequestFilters *[]struct { + Id *string `json:"id,omitempty"` + Method *[]string `json:"method,omitempty"` + } `json:"request_filters,omitempty"` // Tokens An array of token-based security configurations Tokens *[]struct { @@ -7219,6 +10134,13 @@ type PostV0EndpointsResponse struct { } `json:"tokens,omitempty"` } `json:"security,omitempty"` + // Status Current state of the endpoint — either `active` or `paused` + Status *string `json:"status,omitempty"` + Tags *[]struct { + Label *string `json:"label,omitempty"` + TagId *int `json:"tag_id,omitempty"` + } `json:"tags,omitempty"` + // WssUrl The WebSocket URL to access the newly created endpoint WssUrl *string `json:"wss_url,omitempty"` } `json:"data,omitempty"` @@ -7229,7 +10151,7 @@ type PostV0EndpointsResponse struct { } // GetJSON200 returns the response for an HTTP 200 `application/json` response -func (r PostV0EndpointsResponse) GetJSON200() *struct { +func (r GetV0EndpointsByIdResponse) GetJSON200() *struct { // Data The data object which contains the following fields: Data *struct { // Chain The blockchain the endpoint is associated with @@ -7239,7 +10161,8 @@ func (r PostV0EndpointsResponse) GetJSON200() *struct { HttpUrl *string `json:"http_url,omitempty"` // Id A unique identifier for the created endpoint - Id *string `json:"id,omitempty"` + Id *string `json:"id,omitempty"` + IsMultichain *bool `json:"is_multichain,omitempty"` // Label A descriptive label for the endpoint Label *string `json:"label,omitempty"` @@ -7267,14 +10190,10 @@ func (r PostV0EndpointsResponse) GetJSON200() *struct { // Security The security object which contains the following fields: Security *struct { - // DomainMasks An array of domain-based security configurations DomainMasks *[]struct { - // Domain The allowed domain for accessing the endpoint Domain *string `json:"domain,omitempty"` - - // Id A unique identifier for the domain mask - Id *string `json:"id,omitempty"` - } `json:"domainMasks,omitempty"` + Id *string `json:"id,omitempty"` + } `json:"domain_masks,omitempty"` // Ips An array of IP-based security configurations Ips *[]struct { @@ -7299,47 +10218,19 @@ func (r PostV0EndpointsResponse) GetJSON200() *struct { // PublicKey The public key used in the JWT PublicKey *string `json:"public_key,omitempty"` } `json:"jwts,omitempty"` - - // Options A list of security options available for the endpoint Options *struct { - // Cors Indicates whether Cross-Origin Resource Sharing (CORS) is enabled - Cors *bool `json:"cors,omitempty"` - - // DebugAuthErrors Indicates whether detailed authentication error debugging is enabled - DebugAuthErrors *bool `json:"debugAuthErrors,omitempty"` - - // DomainMasks Indicates whether domain mask security is enabled - DomainMasks *bool `json:"domainMasks,omitempty"` - - // EnforceChainNetwork Indicates whether the specified chain and network are enforced for the endpoint - EnforceChainNetwork *bool `json:"enforceChainNetwork,omitempty"` - - // Hosts Indicates whether host-based security is enabled - Hosts *bool `json:"hosts,omitempty"` - - // Hsts Indicates whether HTTP Strict Transport Security (HSTS) is enforced + Cors *bool `json:"cors,omitempty"` + DomainMasks *bool `json:"domainMasks,omitempty"` Hsts *bool `json:"hsts,omitempty"` IpCustomHeader *struct { Value *string `json:"value,omitempty"` } `json:"ipCustomHeader,omitempty"` - - // Ips Indicates whether IP-based security is enabled - Ips *bool `json:"ips,omitempty"` - - // Jwts Indicates whether JWT-based security is enabled - Jwts *bool `json:"jwts,omitempty"` - - // Referrers Indicates whether referrer-based security is enable - Referrers *bool `json:"referrers,omitempty"` - - // RequestFilters Indicates whether request filters are applied - RequestFilters *bool `json:"requestFilters,omitempty"` - - // Tokens Indicates whether token-based security is enabled - Tokens *bool `json:"tokens,omitempty"` - - // ValidHosts Indicates whether only valid hosts are allowed - ValidHosts *bool `json:"validHosts,omitempty"` + Ips *bool `json:"ips,omitempty"` + Jwts *bool `json:"jwts,omitempty"` + Referrers *bool `json:"referrers,omitempty"` + RequestFilters *bool `json:"requestFilters,omitempty"` + ResponseLogging *bool `json:"responseLogging,omitempty"` + Tokens *bool `json:"tokens,omitempty"` } `json:"options,omitempty"` // Referrers An array of referrer-based security configurations @@ -7350,6 +10241,10 @@ func (r PostV0EndpointsResponse) GetJSON200() *struct { // Referrer The referrer URL allowed to access the endpoint Referrer *string `json:"referrer,omitempty"` } `json:"referrers,omitempty"` + RequestFilters *[]struct { + Id *string `json:"id,omitempty"` + Method *[]string `json:"method,omitempty"` + } `json:"request_filters,omitempty"` // Tokens An array of token-based security configurations Tokens *[]struct { @@ -7361,189 +10256,30 @@ func (r PostV0EndpointsResponse) GetJSON200() *struct { } `json:"tokens,omitempty"` } `json:"security,omitempty"` - // WssUrl The WebSocket URL to access the newly created endpoint - WssUrl *string `json:"wss_url,omitempty"` - } `json:"data,omitempty"` - - // Error Contains error information, if any - Error *string `json:"error,omitempty"` -} { - return r.JSON200 -} - -// GetBody returns the raw response body bytes -func (r PostV0EndpointsResponse) GetBody() []byte { - return r.Body -} - -// Status returns HTTPResponse.Status -func (r PostV0EndpointsResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r PostV0EndpointsResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers -func (r PostV0EndpointsResponse) ContentType() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Header.Get("Content-Type") - } - return "" -} - -type PostV0EndpointsBulkStatusResponse struct { - Body []byte - HTTPResponse *http.Response - // JSON200 the response for an HTTP 200 `application/json` response - JSON200 *struct { - // Data Contains the result of the bulk status update - Data *struct { - // FailedCount The number of endpoints that failed to update - FailedCount *int `json:"failed_count,omitempty"` - - // Results An array of result objects for each endpoint - Results *[]struct { - // Id The endpoint ID - Id *string `json:"id,omitempty"` - - // Success Whether the status update succeeded for this endpoint - Success *bool `json:"success,omitempty"` - } `json:"results,omitempty"` - - // Total The total number of endpoints in the request - Total *int `json:"total,omitempty"` - - // UpdatedCount The number of endpoints successfully updated - UpdatedCount *int `json:"updated_count,omitempty"` - } `json:"data,omitempty"` - } -} - -// GetJSON200 returns the response for an HTTP 200 `application/json` response -func (r PostV0EndpointsBulkStatusResponse) GetJSON200() *struct { - // Data Contains the result of the bulk status update - Data *struct { - // FailedCount The number of endpoints that failed to update - FailedCount *int `json:"failed_count,omitempty"` - - // Results An array of result objects for each endpoint - Results *[]struct { - // Id The endpoint ID - Id *string `json:"id,omitempty"` - - // Success Whether the status update succeeded for this endpoint - Success *bool `json:"success,omitempty"` - } `json:"results,omitempty"` - - // Total The total number of endpoints in the request - Total *int `json:"total,omitempty"` - - // UpdatedCount The number of endpoints successfully updated - UpdatedCount *int `json:"updated_count,omitempty"` - } `json:"data,omitempty"` -} { - return r.JSON200 -} - -// GetBody returns the raw response body bytes -func (r PostV0EndpointsBulkStatusResponse) GetBody() []byte { - return r.Body -} - -// Status returns HTTPResponse.Status -func (r PostV0EndpointsBulkStatusResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r PostV0EndpointsBulkStatusResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers -func (r PostV0EndpointsBulkStatusResponse) ContentType() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Header.Get("Content-Type") - } - return "" -} - -type DeleteV0EndpointsBulkTagsResponse struct { - Body []byte - HTTPResponse *http.Response - // JSON200 the response for an HTTP 200 `application/json` response - JSON200 *struct { - // Data Contains the result of the bulk tag removal - Data *struct { - // FailedCount The number of endpoints that failed to update - FailedCount *int `json:"failed_count,omitempty"` - - // Results An array of result objects for each endpoint - Results *[]struct { - // Id The endpoint ID - Id *string `json:"id,omitempty"` - - // Success Whether the tag was successfully removed from this endpoint - Success *bool `json:"success,omitempty"` - } `json:"results,omitempty"` - - // Total The total number of endpoints in the request - Total *int `json:"total,omitempty"` - - // UpdatedCount The number of endpoints successfully updated - UpdatedCount *int `json:"updated_count,omitempty"` - } `json:"data,omitempty"` - } -} - -// GetJSON200 returns the response for an HTTP 200 `application/json` response -func (r DeleteV0EndpointsBulkTagsResponse) GetJSON200() *struct { - // Data Contains the result of the bulk tag removal - Data *struct { - // FailedCount The number of endpoints that failed to update - FailedCount *int `json:"failed_count,omitempty"` - - // Results An array of result objects for each endpoint - Results *[]struct { - // Id The endpoint ID - Id *string `json:"id,omitempty"` - - // Success Whether the tag was successfully removed from this endpoint - Success *bool `json:"success,omitempty"` - } `json:"results,omitempty"` - - // Total The total number of endpoints in the request - Total *int `json:"total,omitempty"` + // Status Current state of the endpoint — either `active` or `paused` + Status *string `json:"status,omitempty"` + Tags *[]struct { + Label *string `json:"label,omitempty"` + TagId *int `json:"tag_id,omitempty"` + } `json:"tags,omitempty"` - // UpdatedCount The number of endpoints successfully updated - UpdatedCount *int `json:"updated_count,omitempty"` + // WssUrl The WebSocket URL to access the newly created endpoint + WssUrl *string `json:"wss_url,omitempty"` } `json:"data,omitempty"` + + // Error Contains error information, if any + Error *string `json:"error,omitempty"` } { return r.JSON200 } // GetBody returns the raw response body bytes -func (r DeleteV0EndpointsBulkTagsResponse) GetBody() []byte { +func (r GetV0EndpointsByIdResponse) GetBody() []byte { return r.Body } // Status returns HTTPResponse.Status -func (r DeleteV0EndpointsBulkTagsResponse) Status() string { +func (r GetV0EndpointsByIdResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -7551,7 +10287,7 @@ func (r DeleteV0EndpointsBulkTagsResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r DeleteV0EndpointsBulkTagsResponse) StatusCode() int { +func (r GetV0EndpointsByIdResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } @@ -7559,92 +10295,97 @@ func (r DeleteV0EndpointsBulkTagsResponse) StatusCode() int { } // ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers -func (r DeleteV0EndpointsBulkTagsResponse) ContentType() string { +func (r GetV0EndpointsByIdResponse) ContentType() string { if r.HTTPResponse != nil { return r.HTTPResponse.Header.Get("Content-Type") } return "" } -type PostV0EndpointsBulkTagsResponse struct { +type PatchV0EndpointsByIdResponse struct { Body []byte HTTPResponse *http.Response // JSON200 the response for an HTTP 200 `application/json` response JSON200 *struct { - // Data Contains the result of the bulk tag operation - Data *struct { - // FailedCount The number of endpoints that failed to update - FailedCount *int `json:"failed_count,omitempty"` - - // Results An array of result objects for each endpoint - Results *[]struct { - // Id The endpoint ID - Id *string `json:"id,omitempty"` + // Data Indicates whether the updation is done or not + Data *bool `json:"data,omitempty"` - // Success Whether the tag was successfully added to this endpoint - Success *bool `json:"success,omitempty"` - } `json:"results,omitempty"` + // Error Contains error information, if any + Error *string `json:"error,omitempty"` + } +} - // Tag The tag that was added to the endpoints - Tag *struct { - // Label The label/name of the tag - Label *string `json:"label,omitempty"` +// GetJSON200 returns the response for an HTTP 200 `application/json` response +func (r PatchV0EndpointsByIdResponse) GetJSON200() *struct { + // Data Indicates whether the updation is done or not + Data *bool `json:"data,omitempty"` - // TagId The unique identifier of the tag - TagId *int `json:"tag_id,omitempty"` - } `json:"tag,omitempty"` + // Error Contains error information, if any + Error *string `json:"error,omitempty"` +} { + return r.JSON200 +} - // Total The total number of endpoints in the request - Total *int `json:"total,omitempty"` +// GetBody returns the raw response body bytes +func (r PatchV0EndpointsByIdResponse) GetBody() []byte { + return r.Body +} - // UpdatedCount The number of endpoints successfully updated - UpdatedCount *int `json:"updated_count,omitempty"` - } `json:"data,omitempty"` +// Status returns HTTPResponse.Status +func (r PatchV0EndpointsByIdResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status } + return http.StatusText(0) } -// GetJSON200 returns the response for an HTTP 200 `application/json` response -func (r PostV0EndpointsBulkTagsResponse) GetJSON200() *struct { - // Data Contains the result of the bulk tag operation - Data *struct { - // FailedCount The number of endpoints that failed to update - FailedCount *int `json:"failed_count,omitempty"` - - // Results An array of result objects for each endpoint - Results *[]struct { - // Id The endpoint ID - Id *string `json:"id,omitempty"` +// StatusCode returns HTTPResponse.StatusCode +func (r PatchV0EndpointsByIdResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} - // Success Whether the tag was successfully added to this endpoint - Success *bool `json:"success,omitempty"` - } `json:"results,omitempty"` +// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers +func (r PatchV0EndpointsByIdResponse) ContentType() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Header.Get("Content-Type") + } + return "" +} - // Tag The tag that was added to the endpoints - Tag *struct { - // Label The label/name of the tag - Label *string `json:"label,omitempty"` +type PostV0EndpointsByIdDisableMultichainResponse struct { + Body []byte + HTTPResponse *http.Response + // JSON200 the response for an HTTP 200 `application/json` response + JSON200 *struct { + // Data Returns true when multichain is successfully disabled + Data *bool `json:"data,omitempty"` - // TagId The unique identifier of the tag - TagId *int `json:"tag_id,omitempty"` - } `json:"tag,omitempty"` + // Error Contains error details if the request failed; null if successful + Error *string `json:"error,omitempty"` + } +} - // Total The total number of endpoints in the request - Total *int `json:"total,omitempty"` +// GetJSON200 returns the response for an HTTP 200 `application/json` response +func (r PostV0EndpointsByIdDisableMultichainResponse) GetJSON200() *struct { + // Data Returns true when multichain is successfully disabled + Data *bool `json:"data,omitempty"` - // UpdatedCount The number of endpoints successfully updated - UpdatedCount *int `json:"updated_count,omitempty"` - } `json:"data,omitempty"` + // Error Contains error details if the request failed; null if successful + Error *string `json:"error,omitempty"` } { return r.JSON200 } // GetBody returns the raw response body bytes -func (r PostV0EndpointsBulkTagsResponse) GetBody() []byte { +func (r PostV0EndpointsByIdDisableMultichainResponse) GetBody() []byte { return r.Body } // Status returns HTTPResponse.Status -func (r PostV0EndpointsBulkTagsResponse) Status() string { +func (r PostV0EndpointsByIdDisableMultichainResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -7652,7 +10393,7 @@ func (r PostV0EndpointsBulkTagsResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r PostV0EndpointsBulkTagsResponse) StatusCode() int { +func (r PostV0EndpointsByIdDisableMultichainResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } @@ -7660,32 +10401,20 @@ func (r PostV0EndpointsBulkTagsResponse) StatusCode() int { } // ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers -func (r PostV0EndpointsBulkTagsResponse) ContentType() string { +func (r PostV0EndpointsByIdDisableMultichainResponse) ContentType() string { if r.HTTPResponse != nil { return r.HTTPResponse.Header.Get("Content-Type") } return "" } -type GetV0EndpointsTagsResponse struct { +type PostV0EndpointsByIdEnableMultichainResponse struct { Body []byte HTTPResponse *http.Response // JSON200 the response for an HTTP 200 `application/json` response JSON200 *struct { - // Data Contains the tags data - Data *struct { - // Tags An array of tag objects - Tags *[]struct { - // Id The unique identifier for the tag - Id *int `json:"id,omitempty"` - - // Label The label/name of the tag - Label *string `json:"label,omitempty"` - - // UsageCount The number of endpoints associated with this tag - UsageCount *int `json:"usage_count,omitempty"` - } `json:"tags,omitempty"` - } `json:"data,omitempty"` + // Data Returns true when multichain is successfully enabled + Data *bool `json:"data,omitempty"` // Error Contains error details if the request failed; null if successful Error *string `json:"error,omitempty"` @@ -7693,21 +10422,9 @@ type GetV0EndpointsTagsResponse struct { } // GetJSON200 returns the response for an HTTP 200 `application/json` response -func (r GetV0EndpointsTagsResponse) GetJSON200() *struct { - // Data Contains the tags data - Data *struct { - // Tags An array of tag objects - Tags *[]struct { - // Id The unique identifier for the tag - Id *int `json:"id,omitempty"` - - // Label The label/name of the tag - Label *string `json:"label,omitempty"` - - // UsageCount The number of endpoints associated with this tag - UsageCount *int `json:"usage_count,omitempty"` - } `json:"tags,omitempty"` - } `json:"data,omitempty"` +func (r PostV0EndpointsByIdEnableMultichainResponse) GetJSON200() *struct { + // Data Returns true when multichain is successfully enabled + Data *bool `json:"data,omitempty"` // Error Contains error details if the request failed; null if successful Error *string `json:"error,omitempty"` @@ -7716,12 +10433,12 @@ func (r GetV0EndpointsTagsResponse) GetJSON200() *struct { } // GetBody returns the raw response body bytes -func (r GetV0EndpointsTagsResponse) GetBody() []byte { +func (r PostV0EndpointsByIdEnableMultichainResponse) GetBody() []byte { return r.Body } // Status returns HTTPResponse.Status -func (r GetV0EndpointsTagsResponse) Status() string { +func (r PostV0EndpointsByIdEnableMultichainResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -7729,7 +10446,7 @@ func (r GetV0EndpointsTagsResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r GetV0EndpointsTagsResponse) StatusCode() int { +func (r PostV0EndpointsByIdEnableMultichainResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } @@ -7737,20 +10454,20 @@ func (r GetV0EndpointsTagsResponse) StatusCode() int { } // ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers -func (r GetV0EndpointsTagsResponse) ContentType() string { +func (r PostV0EndpointsByIdEnableMultichainResponse) ContentType() string { if r.HTTPResponse != nil { return r.HTTPResponse.Header.Get("Content-Type") } return "" } -type DeleteV0EndpointsTagsByIdResponse struct { +type DeleteV0EndpointsByIdIpCustomHeaderResponse struct { Body []byte HTTPResponse *http.Response // JSON200 the response for an HTTP 200 `application/json` response JSON200 *struct { - // Data Contains the result of the deletion - Data *map[string]interface{} `json:"data,omitempty"` + // Data Returns true when the IP custom header is successfully deleted + Data *bool `json:"data,omitempty"` // Error Contains error details if the request failed; null if successful Error *string `json:"error,omitempty"` @@ -7758,9 +10475,9 @@ type DeleteV0EndpointsTagsByIdResponse struct { } // GetJSON200 returns the response for an HTTP 200 `application/json` response -func (r DeleteV0EndpointsTagsByIdResponse) GetJSON200() *struct { - // Data Contains the result of the deletion - Data *map[string]interface{} `json:"data,omitempty"` +func (r DeleteV0EndpointsByIdIpCustomHeaderResponse) GetJSON200() *struct { + // Data Returns true when the IP custom header is successfully deleted + Data *bool `json:"data,omitempty"` // Error Contains error details if the request failed; null if successful Error *string `json:"error,omitempty"` @@ -7769,12 +10486,12 @@ func (r DeleteV0EndpointsTagsByIdResponse) GetJSON200() *struct { } // GetBody returns the raw response body bytes -func (r DeleteV0EndpointsTagsByIdResponse) GetBody() []byte { +func (r DeleteV0EndpointsByIdIpCustomHeaderResponse) GetBody() []byte { return r.Body } // Status returns HTTPResponse.Status -func (r DeleteV0EndpointsTagsByIdResponse) Status() string { +func (r DeleteV0EndpointsByIdIpCustomHeaderResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -7782,7 +10499,7 @@ func (r DeleteV0EndpointsTagsByIdResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r DeleteV0EndpointsTagsByIdResponse) StatusCode() int { +func (r DeleteV0EndpointsByIdIpCustomHeaderResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } @@ -7790,28 +10507,22 @@ func (r DeleteV0EndpointsTagsByIdResponse) StatusCode() int { } // ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers -func (r DeleteV0EndpointsTagsByIdResponse) ContentType() string { +func (r DeleteV0EndpointsByIdIpCustomHeaderResponse) ContentType() string { if r.HTTPResponse != nil { return r.HTTPResponse.Header.Get("Content-Type") } return "" } -type PatchV0EndpointsTagsByIdResponse struct { +type PatchV0EndpointsByIdIpCustomHeaderResponse struct { Body []byte HTTPResponse *http.Response // JSON200 the response for an HTTP 200 `application/json` response JSON200 *struct { - // Data Contains the updated tag details + // Data Contains the updated IP custom header details Data *struct { - // Id The unique identifier of the tag - Id *int `json:"id,omitempty"` - - // Label The updated label/name of the tag - Label *string `json:"label,omitempty"` - - // UsageCount The number of endpoints currently using this tag - UsageCount *int `json:"usage_count,omitempty"` + // HeaderName The name of the IP custom header that was set + HeaderName *string `json:"header_name,omitempty"` } `json:"data,omitempty"` // Error Contains error details if the request failed; null if successful @@ -7820,17 +10531,11 @@ type PatchV0EndpointsTagsByIdResponse struct { } // GetJSON200 returns the response for an HTTP 200 `application/json` response -func (r PatchV0EndpointsTagsByIdResponse) GetJSON200() *struct { - // Data Contains the updated tag details +func (r PatchV0EndpointsByIdIpCustomHeaderResponse) GetJSON200() *struct { + // Data Contains the updated IP custom header details Data *struct { - // Id The unique identifier of the tag - Id *int `json:"id,omitempty"` - - // Label The updated label/name of the tag - Label *string `json:"label,omitempty"` - - // UsageCount The number of endpoints currently using this tag - UsageCount *int `json:"usage_count,omitempty"` + // HeaderName The name of the IP custom header that was set + HeaderName *string `json:"header_name,omitempty"` } `json:"data,omitempty"` // Error Contains error details if the request failed; null if successful @@ -7840,12 +10545,12 @@ func (r PatchV0EndpointsTagsByIdResponse) GetJSON200() *struct { } // GetBody returns the raw response body bytes -func (r PatchV0EndpointsTagsByIdResponse) GetBody() []byte { +func (r PatchV0EndpointsByIdIpCustomHeaderResponse) GetBody() []byte { return r.Body } // Status returns HTTPResponse.Status -func (r PatchV0EndpointsTagsByIdResponse) Status() string { +func (r PatchV0EndpointsByIdIpCustomHeaderResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -7853,7 +10558,7 @@ func (r PatchV0EndpointsTagsByIdResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r PatchV0EndpointsTagsByIdResponse) StatusCode() int { +func (r PatchV0EndpointsByIdIpCustomHeaderResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } @@ -7861,38 +10566,50 @@ func (r PatchV0EndpointsTagsByIdResponse) StatusCode() int { } // ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers -func (r PatchV0EndpointsTagsByIdResponse) ContentType() string { +func (r PatchV0EndpointsByIdIpCustomHeaderResponse) ContentType() string { if r.HTTPResponse != nil { return r.HTTPResponse.Header.Get("Content-Type") } return "" } -type DeleteV0EndpointsByIdResponse struct { +type GetV0EndpointsByIdLogDetailsResponse struct { Body []byte HTTPResponse *http.Response // JSON200 the response for an HTTP 200 `application/json` response JSON200 *struct { - // Result Indicates whether the endpoint was deleted - Result *bool `json:"result,omitempty"` + // Data Contains detailed information about a specific log entry, including the raw request that was sent and the response that was received. + Data *struct { + // Request A JSON-encoded string representing the request payload that was sent in the original log entry. The logs are truncated after 2KB. + Request *string `json:"request,omitempty"` + + // Response A JSON-encoded string containing the full response returned by the API or aggregator for the logged request. The logs are truncated after 2KB. + Response *string `json:"response,omitempty"` + } `json:"data,omitempty"` } } // GetJSON200 returns the response for an HTTP 200 `application/json` response -func (r DeleteV0EndpointsByIdResponse) GetJSON200() *struct { - // Result Indicates whether the endpoint was deleted - Result *bool `json:"result,omitempty"` +func (r GetV0EndpointsByIdLogDetailsResponse) GetJSON200() *struct { + // Data Contains detailed information about a specific log entry, including the raw request that was sent and the response that was received. + Data *struct { + // Request A JSON-encoded string representing the request payload that was sent in the original log entry. The logs are truncated after 2KB. + Request *string `json:"request,omitempty"` + + // Response A JSON-encoded string containing the full response returned by the API or aggregator for the logged request. The logs are truncated after 2KB. + Response *string `json:"response,omitempty"` + } `json:"data,omitempty"` } { return r.JSON200 } // GetBody returns the raw response body bytes -func (r DeleteV0EndpointsByIdResponse) GetBody() []byte { +func (r GetV0EndpointsByIdLogDetailsResponse) GetBody() []byte { return r.Body } // Status returns HTTPResponse.Status -func (r DeleteV0EndpointsByIdResponse) Status() string { +func (r GetV0EndpointsByIdLogDetailsResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -7900,7 +10617,7 @@ func (r DeleteV0EndpointsByIdResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r DeleteV0EndpointsByIdResponse) StatusCode() int { +func (r GetV0EndpointsByIdLogDetailsResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } @@ -7908,268 +10625,98 @@ func (r DeleteV0EndpointsByIdResponse) StatusCode() int { } // ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers -func (r DeleteV0EndpointsByIdResponse) ContentType() string { +func (r GetV0EndpointsByIdLogDetailsResponse) ContentType() string { if r.HTTPResponse != nil { return r.HTTPResponse.Header.Get("Content-Type") } return "" } -type GetV0EndpointsByIdResponse struct { +type GetV0EndpointsByIdLogsResponse struct { Body []byte HTTPResponse *http.Response // JSON200 the response for an HTTP 200 `application/json` response JSON200 *struct { - // Data The data object which contains the following fields: - Data *struct { - // Chain The blockchain the endpoint is associated with - Chain *string `json:"chain,omitempty"` + // Data An array of log entries which contains the following fields: + Data *[]struct { + // Details Additional error details if available (nullable) + Details *string `json:"details,omitempty"` - // HttpUrl The HTTP URL to access the newly created endpoint - HttpUrl *string `json:"http_url,omitempty"` + // ErrorCode The application-specific error code returned + ErrorCode *int `json:"error_code,omitempty"` - // Id A unique identifier for the created endpoint - Id *string `json:"id,omitempty"` - IsMultichain *bool `json:"is_multichain,omitempty"` + // HttpMethod The HTTP method used for the request + HttpMethod *string `json:"http_method,omitempty"` - // Label A descriptive label for the endpoint - Label *string `json:"label,omitempty"` + // Method The name of the method invoked + Method *string `json:"method,omitempty"` - // Network The specific network of the blockchain + // Network The name of the network on which the method was called Network *string `json:"network,omitempty"` - // RateLimits The rate_limits object which contains the following fields: - RateLimits *struct { - // Account The account-level rate limit - Account *int `json:"account,omitempty"` - - // RateLimitByIp Specifies if rate limiting is applied per IP - RateLimitByIp *bool `json:"rate_limit_by_ip,omitempty"` - - // Rpd Requests per day limit - Rpd *int `json:"rpd,omitempty"` - - // Rpm Requests per minute limit - Rpm *int `json:"rpm,omitempty"` - - // Rps Requests per second limit - Rps *int `json:"rps,omitempty"` - } `json:"rate_limits,omitempty"` - - // Security The security object which contains the following fields: - Security *struct { - DomainMasks *[]struct { - Domain *string `json:"domain,omitempty"` - Id *string `json:"id,omitempty"` - } `json:"domain_masks,omitempty"` - - // Ips An array of IP-based security configurations - Ips *[]struct { - // Id A unique identifier for the IP configuration - Id *string `json:"id,omitempty"` - - // Ip The allowed IP address for accessing the endpoint - Ip *string `json:"ip,omitempty"` - } `json:"ips,omitempty"` - - // Jwts An array of JSON Web Token (JWT) configurations - Jwts *[]struct { - // Id A unique identifier for the JWT - Id *string `json:"id,omitempty"` - - // Kid A unique key identifier for the JWT public key - Kid *string `json:"kid,omitempty"` - - // Name The name of the JWT - Name *string `json:"name,omitempty"` - - // PublicKey The public key used in the JWT - PublicKey *string `json:"public_key,omitempty"` - } `json:"jwts,omitempty"` - Options *struct { - Cors *bool `json:"cors,omitempty"` - DomainMasks *bool `json:"domainMasks,omitempty"` - Hsts *bool `json:"hsts,omitempty"` - IpCustomHeader *struct { - Value *string `json:"value,omitempty"` - } `json:"ipCustomHeader,omitempty"` - Ips *bool `json:"ips,omitempty"` - Jwts *bool `json:"jwts,omitempty"` - Referrers *bool `json:"referrers,omitempty"` - RequestFilters *bool `json:"requestFilters,omitempty"` - ResponseLogging *bool `json:"responseLogging,omitempty"` - Tokens *bool `json:"tokens,omitempty"` - } `json:"options,omitempty"` - - // Referrers An array of referrer-based security configurations - Referrers *[]struct { - // Id A unique identifier for the referrer. - Id *string `json:"id,omitempty"` - - // Referrer The referrer URL allowed to access the endpoint - Referrer *string `json:"referrer,omitempty"` - } `json:"referrers,omitempty"` - RequestFilters *[]struct { - Id *string `json:"id,omitempty"` - Method *[]string `json:"method,omitempty"` - } `json:"request_filters,omitempty"` - - // Tokens An array of token-based security configurations - Tokens *[]struct { - // Id A unique identifier for the token - Id *string `json:"id,omitempty"` + // RequestId The unique identifier for the request + RequestId *string `json:"request_id,omitempty"` - // Token The actual token value used for authentication - Token *string `json:"token,omitempty"` - } `json:"tokens,omitempty"` - } `json:"security,omitempty"` + // Status The HTTP status code returned by the request + Status *int `json:"status,omitempty"` - // Status Current state of the endpoint — either `active` or `paused` - Status *string `json:"status,omitempty"` - Tags *[]struct { - Label *string `json:"label,omitempty"` - TagId *int `json:"tag_id,omitempty"` - } `json:"tags,omitempty"` + // Timestamp The timestamp when the log was recorded + Timestamp *string `json:"timestamp,omitempty"` - // WssUrl The WebSocket URL to access the newly created endpoint - WssUrl *string `json:"wss_url,omitempty"` + // Url The request URL + Url *string `json:"url,omitempty"` } `json:"data,omitempty"` - // Error Contains error information, if any - Error *string `json:"error,omitempty"` + // NextAt A cursor string used for pagination to fetch the next set of logs + NextAt *string `json:"next_at,omitempty"` } } // GetJSON200 returns the response for an HTTP 200 `application/json` response -func (r GetV0EndpointsByIdResponse) GetJSON200() *struct { - // Data The data object which contains the following fields: - Data *struct { - // Chain The blockchain the endpoint is associated with - Chain *string `json:"chain,omitempty"` +func (r GetV0EndpointsByIdLogsResponse) GetJSON200() *struct { + // Data An array of log entries which contains the following fields: + Data *[]struct { + // Details Additional error details if available (nullable) + Details *string `json:"details,omitempty"` - // HttpUrl The HTTP URL to access the newly created endpoint - HttpUrl *string `json:"http_url,omitempty"` + // ErrorCode The application-specific error code returned + ErrorCode *int `json:"error_code,omitempty"` - // Id A unique identifier for the created endpoint - Id *string `json:"id,omitempty"` - IsMultichain *bool `json:"is_multichain,omitempty"` + // HttpMethod The HTTP method used for the request + HttpMethod *string `json:"http_method,omitempty"` - // Label A descriptive label for the endpoint - Label *string `json:"label,omitempty"` + // Method The name of the method invoked + Method *string `json:"method,omitempty"` - // Network The specific network of the blockchain + // Network The name of the network on which the method was called Network *string `json:"network,omitempty"` - // RateLimits The rate_limits object which contains the following fields: - RateLimits *struct { - // Account The account-level rate limit - Account *int `json:"account,omitempty"` - - // RateLimitByIp Specifies if rate limiting is applied per IP - RateLimitByIp *bool `json:"rate_limit_by_ip,omitempty"` - - // Rpd Requests per day limit - Rpd *int `json:"rpd,omitempty"` - - // Rpm Requests per minute limit - Rpm *int `json:"rpm,omitempty"` - - // Rps Requests per second limit - Rps *int `json:"rps,omitempty"` - } `json:"rate_limits,omitempty"` - - // Security The security object which contains the following fields: - Security *struct { - DomainMasks *[]struct { - Domain *string `json:"domain,omitempty"` - Id *string `json:"id,omitempty"` - } `json:"domain_masks,omitempty"` - - // Ips An array of IP-based security configurations - Ips *[]struct { - // Id A unique identifier for the IP configuration - Id *string `json:"id,omitempty"` - - // Ip The allowed IP address for accessing the endpoint - Ip *string `json:"ip,omitempty"` - } `json:"ips,omitempty"` - - // Jwts An array of JSON Web Token (JWT) configurations - Jwts *[]struct { - // Id A unique identifier for the JWT - Id *string `json:"id,omitempty"` - - // Kid A unique key identifier for the JWT public key - Kid *string `json:"kid,omitempty"` - - // Name The name of the JWT - Name *string `json:"name,omitempty"` - - // PublicKey The public key used in the JWT - PublicKey *string `json:"public_key,omitempty"` - } `json:"jwts,omitempty"` - Options *struct { - Cors *bool `json:"cors,omitempty"` - DomainMasks *bool `json:"domainMasks,omitempty"` - Hsts *bool `json:"hsts,omitempty"` - IpCustomHeader *struct { - Value *string `json:"value,omitempty"` - } `json:"ipCustomHeader,omitempty"` - Ips *bool `json:"ips,omitempty"` - Jwts *bool `json:"jwts,omitempty"` - Referrers *bool `json:"referrers,omitempty"` - RequestFilters *bool `json:"requestFilters,omitempty"` - ResponseLogging *bool `json:"responseLogging,omitempty"` - Tokens *bool `json:"tokens,omitempty"` - } `json:"options,omitempty"` - - // Referrers An array of referrer-based security configurations - Referrers *[]struct { - // Id A unique identifier for the referrer. - Id *string `json:"id,omitempty"` - - // Referrer The referrer URL allowed to access the endpoint - Referrer *string `json:"referrer,omitempty"` - } `json:"referrers,omitempty"` - RequestFilters *[]struct { - Id *string `json:"id,omitempty"` - Method *[]string `json:"method,omitempty"` - } `json:"request_filters,omitempty"` - - // Tokens An array of token-based security configurations - Tokens *[]struct { - // Id A unique identifier for the token - Id *string `json:"id,omitempty"` - - // Token The actual token value used for authentication - Token *string `json:"token,omitempty"` - } `json:"tokens,omitempty"` - } `json:"security,omitempty"` + // RequestId The unique identifier for the request + RequestId *string `json:"request_id,omitempty"` - // Status Current state of the endpoint — either `active` or `paused` - Status *string `json:"status,omitempty"` - Tags *[]struct { - Label *string `json:"label,omitempty"` - TagId *int `json:"tag_id,omitempty"` - } `json:"tags,omitempty"` + // Status The HTTP status code returned by the request + Status *int `json:"status,omitempty"` - // WssUrl The WebSocket URL to access the newly created endpoint - WssUrl *string `json:"wss_url,omitempty"` + // Timestamp The timestamp when the log was recorded + Timestamp *string `json:"timestamp,omitempty"` + + // Url The request URL + Url *string `json:"url,omitempty"` } `json:"data,omitempty"` - // Error Contains error information, if any - Error *string `json:"error,omitempty"` + // NextAt A cursor string used for pagination to fetch the next set of logs + NextAt *string `json:"next_at,omitempty"` } { return r.JSON200 } // GetBody returns the raw response body bytes -func (r GetV0EndpointsByIdResponse) GetBody() []byte { +func (r GetV0EndpointsByIdLogsResponse) GetBody() []byte { return r.Body } // Status returns HTTPResponse.Status -func (r GetV0EndpointsByIdResponse) Status() string { +func (r GetV0EndpointsByIdLogsResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -8177,7 +10724,7 @@ func (r GetV0EndpointsByIdResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r GetV0EndpointsByIdResponse) StatusCode() int { +func (r GetV0EndpointsByIdLogsResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } @@ -8185,44 +10732,92 @@ func (r GetV0EndpointsByIdResponse) StatusCode() int { } // ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers -func (r GetV0EndpointsByIdResponse) ContentType() string { +func (r GetV0EndpointsByIdLogsResponse) ContentType() string { if r.HTTPResponse != nil { return r.HTTPResponse.Header.Get("Content-Type") } return "" } -type PatchV0EndpointsByIdResponse struct { +type GetV0EndpointsByIdMethodRateLimitsResponse struct { Body []byte HTTPResponse *http.Response // JSON200 the response for an HTTP 200 `application/json` response JSON200 *struct { - // Data Indicates whether the updation is done or not - Data *bool `json:"data,omitempty"` + // Data The data object which contains the following fields: + Data *struct { + // RateLimiters An array of rate limiter configurations + RateLimiters *[]struct { + // Created The timestamp when the rate limiter was created in second + Created *string `json:"created,omitempty"` - // Error Contains error information, if any + // Id A unique identifier for the rate limiter + Id *string `json:"id,omitempty"` + + // Interval The time interval for the rate limit + Interval *string `json:"interval,omitempty"` + + // LimitByIp Whether the rate limit applies separately to each client IP (true) or to the endpoint as a whole (false) + LimitByIp *bool `json:"limit_by_ip,omitempty"` + + // Methods A list of method names to which the rate limiter applies + Methods *[]string `json:"methods,omitempty"` + + // Rate The number of allowed requests within the specified interval + Rate *int `json:"rate,omitempty"` + + // Status The current status of the rate limiter + Status *string `json:"status,omitempty"` + } `json:"rate_limiters,omitempty"` + } `json:"data,omitempty"` + + // Error A field containing an error message if any issue occurs Error *string `json:"error,omitempty"` } } // GetJSON200 returns the response for an HTTP 200 `application/json` response -func (r PatchV0EndpointsByIdResponse) GetJSON200() *struct { - // Data Indicates whether the updation is done or not - Data *bool `json:"data,omitempty"` +func (r GetV0EndpointsByIdMethodRateLimitsResponse) GetJSON200() *struct { + // Data The data object which contains the following fields: + Data *struct { + // RateLimiters An array of rate limiter configurations + RateLimiters *[]struct { + // Created The timestamp when the rate limiter was created in second + Created *string `json:"created,omitempty"` - // Error Contains error information, if any + // Id A unique identifier for the rate limiter + Id *string `json:"id,omitempty"` + + // Interval The time interval for the rate limit + Interval *string `json:"interval,omitempty"` + + // LimitByIp Whether the rate limit applies separately to each client IP (true) or to the endpoint as a whole (false) + LimitByIp *bool `json:"limit_by_ip,omitempty"` + + // Methods A list of method names to which the rate limiter applies + Methods *[]string `json:"methods,omitempty"` + + // Rate The number of allowed requests within the specified interval + Rate *int `json:"rate,omitempty"` + + // Status The current status of the rate limiter + Status *string `json:"status,omitempty"` + } `json:"rate_limiters,omitempty"` + } `json:"data,omitempty"` + + // Error A field containing an error message if any issue occurs Error *string `json:"error,omitempty"` } { return r.JSON200 } // GetBody returns the raw response body bytes -func (r PatchV0EndpointsByIdResponse) GetBody() []byte { +func (r GetV0EndpointsByIdMethodRateLimitsResponse) GetBody() []byte { return r.Body } // Status returns HTTPResponse.Status -func (r PatchV0EndpointsByIdResponse) Status() string { +func (r GetV0EndpointsByIdMethodRateLimitsResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -8230,7 +10825,7 @@ func (r PatchV0EndpointsByIdResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r PatchV0EndpointsByIdResponse) StatusCode() int { +func (r GetV0EndpointsByIdMethodRateLimitsResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } @@ -8238,44 +10833,86 @@ func (r PatchV0EndpointsByIdResponse) StatusCode() int { } // ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers -func (r PatchV0EndpointsByIdResponse) ContentType() string { +func (r GetV0EndpointsByIdMethodRateLimitsResponse) ContentType() string { if r.HTTPResponse != nil { return r.HTTPResponse.Header.Get("Content-Type") } return "" } -type PostV0EndpointsByIdDisableMultichainResponse struct { +type PostV0EndpointsByIdMethodRateLimitsResponse struct { Body []byte HTTPResponse *http.Response // JSON200 the response for an HTTP 200 `application/json` response JSON200 *struct { - // Data Returns true when multichain is successfully disabled - Data *bool `json:"data,omitempty"` + // Data The data object which contains the following fields: + Data *struct { + // Created The timestamp when the rate limiter was created in second + Created *string `json:"created,omitempty"` - // Error Contains error details if the request failed; null if successful + // Id A unique identifier for the rate limiter + Id *string `json:"id,omitempty"` + + // Interval The time interval for the rate limit + Interval *string `json:"interval,omitempty"` + + // LimitByIp Whether the rate limit applies separately to each client IP (true) or to the endpoint as a whole (false) + LimitByIp *bool `json:"limit_by_ip,omitempty"` + + // Methods A list of methods the rate limiter applies to + Methods *[]string `json:"methods,omitempty"` + + // Rate The maximum number of requests allowed within the specified interval + Rate *int `json:"rate,omitempty"` + + // Status The current status of the rate limiter + Status *string `json:"status,omitempty"` + } `json:"data,omitempty"` + + // Error A field containing an error message if any issue occurs Error *string `json:"error,omitempty"` } } // GetJSON200 returns the response for an HTTP 200 `application/json` response -func (r PostV0EndpointsByIdDisableMultichainResponse) GetJSON200() *struct { - // Data Returns true when multichain is successfully disabled - Data *bool `json:"data,omitempty"` +func (r PostV0EndpointsByIdMethodRateLimitsResponse) GetJSON200() *struct { + // Data The data object which contains the following fields: + Data *struct { + // Created The timestamp when the rate limiter was created in second + Created *string `json:"created,omitempty"` - // Error Contains error details if the request failed; null if successful + // Id A unique identifier for the rate limiter + Id *string `json:"id,omitempty"` + + // Interval The time interval for the rate limit + Interval *string `json:"interval,omitempty"` + + // LimitByIp Whether the rate limit applies separately to each client IP (true) or to the endpoint as a whole (false) + LimitByIp *bool `json:"limit_by_ip,omitempty"` + + // Methods A list of methods the rate limiter applies to + Methods *[]string `json:"methods,omitempty"` + + // Rate The maximum number of requests allowed within the specified interval + Rate *int `json:"rate,omitempty"` + + // Status The current status of the rate limiter + Status *string `json:"status,omitempty"` + } `json:"data,omitempty"` + + // Error A field containing an error message if any issue occurs Error *string `json:"error,omitempty"` } { return r.JSON200 } // GetBody returns the raw response body bytes -func (r PostV0EndpointsByIdDisableMultichainResponse) GetBody() []byte { +func (r PostV0EndpointsByIdMethodRateLimitsResponse) GetBody() []byte { return r.Body } // Status returns HTTPResponse.Status -func (r PostV0EndpointsByIdDisableMultichainResponse) Status() string { +func (r PostV0EndpointsByIdMethodRateLimitsResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -8283,7 +10920,7 @@ func (r PostV0EndpointsByIdDisableMultichainResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r PostV0EndpointsByIdDisableMultichainResponse) StatusCode() int { +func (r PostV0EndpointsByIdMethodRateLimitsResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } @@ -8291,44 +10928,44 @@ func (r PostV0EndpointsByIdDisableMultichainResponse) StatusCode() int { } // ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers -func (r PostV0EndpointsByIdDisableMultichainResponse) ContentType() string { +func (r PostV0EndpointsByIdMethodRateLimitsResponse) ContentType() string { if r.HTTPResponse != nil { return r.HTTPResponse.Header.Get("Content-Type") } return "" } -type PostV0EndpointsByIdEnableMultichainResponse struct { +type DeleteV0EndpointsByIdMethodRateLimitsByMethodRateLimitIdResponse struct { Body []byte HTTPResponse *http.Response // JSON200 the response for an HTTP 200 `application/json` response JSON200 *struct { - // Data Returns true when multichain is successfully enabled - Data *bool `json:"data,omitempty"` + // Data A message indicating the result of the operation + Data *string `json:"data,omitempty"` - // Error Contains error details if the request failed; null if successful + // Error A field containing an error message if any issue occurs Error *string `json:"error,omitempty"` } } // GetJSON200 returns the response for an HTTP 200 `application/json` response -func (r PostV0EndpointsByIdEnableMultichainResponse) GetJSON200() *struct { - // Data Returns true when multichain is successfully enabled - Data *bool `json:"data,omitempty"` +func (r DeleteV0EndpointsByIdMethodRateLimitsByMethodRateLimitIdResponse) GetJSON200() *struct { + // Data A message indicating the result of the operation + Data *string `json:"data,omitempty"` - // Error Contains error details if the request failed; null if successful + // Error A field containing an error message if any issue occurs Error *string `json:"error,omitempty"` } { return r.JSON200 } // GetBody returns the raw response body bytes -func (r PostV0EndpointsByIdEnableMultichainResponse) GetBody() []byte { +func (r DeleteV0EndpointsByIdMethodRateLimitsByMethodRateLimitIdResponse) GetBody() []byte { return r.Body } // Status returns HTTPResponse.Status -func (r PostV0EndpointsByIdEnableMultichainResponse) Status() string { +func (r DeleteV0EndpointsByIdMethodRateLimitsByMethodRateLimitIdResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -8336,7 +10973,7 @@ func (r PostV0EndpointsByIdEnableMultichainResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r PostV0EndpointsByIdEnableMultichainResponse) StatusCode() int { +func (r DeleteV0EndpointsByIdMethodRateLimitsByMethodRateLimitIdResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } @@ -8344,103 +10981,86 @@ func (r PostV0EndpointsByIdEnableMultichainResponse) StatusCode() int { } // ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers -func (r PostV0EndpointsByIdEnableMultichainResponse) ContentType() string { +func (r DeleteV0EndpointsByIdMethodRateLimitsByMethodRateLimitIdResponse) ContentType() string { if r.HTTPResponse != nil { return r.HTTPResponse.Header.Get("Content-Type") } return "" } -type DeleteV0EndpointsByIdIpCustomHeaderResponse struct { +type PatchV0EndpointsByIdMethodRateLimitsByMethodRateLimitIdResponse struct { Body []byte HTTPResponse *http.Response // JSON200 the response for an HTTP 200 `application/json` response JSON200 *struct { - // Data Returns true when the IP custom header is successfully deleted - Data *bool `json:"data,omitempty"` + // Data The data object which contains the following fields: + Data *struct { + // Created The timestamp when the rate limiter was created in second + Created *string `json:"created,omitempty"` - // Error Contains error details if the request failed; null if successful - Error *string `json:"error,omitempty"` - } -} + // Id A unique identifier for the rate limiter + Id *string `json:"id,omitempty"` -// GetJSON200 returns the response for an HTTP 200 `application/json` response -func (r DeleteV0EndpointsByIdIpCustomHeaderResponse) GetJSON200() *struct { - // Data Returns true when the IP custom header is successfully deleted - Data *bool `json:"data,omitempty"` + // Interval The time interval for the rate limit + Interval *string `json:"interval,omitempty"` - // Error Contains error details if the request failed; null if successful - Error *string `json:"error,omitempty"` -} { - return r.JSON200 -} + // LimitByIp Whether the rate limit applies separately to each client IP (true) or to the endpoint as a whole (false) + LimitByIp *bool `json:"limit_by_ip,omitempty"` -// GetBody returns the raw response body bytes -func (r DeleteV0EndpointsByIdIpCustomHeaderResponse) GetBody() []byte { - return r.Body -} + // Methods A list of methods the rate limiter applies to + Methods *[]string `json:"methods,omitempty"` -// Status returns HTTPResponse.Status -func (r DeleteV0EndpointsByIdIpCustomHeaderResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} + // Rate The maximum number of requests allowed within the specified interval + Rate *int `json:"rate,omitempty"` -// StatusCode returns HTTPResponse.StatusCode -func (r DeleteV0EndpointsByIdIpCustomHeaderResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} + // Status The current status of the rate limiter + Status *string `json:"status,omitempty"` + } `json:"data,omitempty"` -// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers -func (r DeleteV0EndpointsByIdIpCustomHeaderResponse) ContentType() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Header.Get("Content-Type") + // Error A field containing an error message if any issue occurs + Error *string `json:"error,omitempty"` } - return "" } -type PatchV0EndpointsByIdIpCustomHeaderResponse struct { - Body []byte - HTTPResponse *http.Response - // JSON200 the response for an HTTP 200 `application/json` response - JSON200 *struct { - // Data Contains the updated IP custom header details - Data *struct { - // HeaderName The name of the IP custom header that was set - HeaderName *string `json:"header_name,omitempty"` - } `json:"data,omitempty"` +// GetJSON200 returns the response for an HTTP 200 `application/json` response +func (r PatchV0EndpointsByIdMethodRateLimitsByMethodRateLimitIdResponse) GetJSON200() *struct { + // Data The data object which contains the following fields: + Data *struct { + // Created The timestamp when the rate limiter was created in second + Created *string `json:"created,omitempty"` + + // Id A unique identifier for the rate limiter + Id *string `json:"id,omitempty"` + + // Interval The time interval for the rate limit + Interval *string `json:"interval,omitempty"` + + // LimitByIp Whether the rate limit applies separately to each client IP (true) or to the endpoint as a whole (false) + LimitByIp *bool `json:"limit_by_ip,omitempty"` + + // Methods A list of methods the rate limiter applies to + Methods *[]string `json:"methods,omitempty"` - // Error Contains error details if the request failed; null if successful - Error *string `json:"error,omitempty"` - } -} + // Rate The maximum number of requests allowed within the specified interval + Rate *int `json:"rate,omitempty"` -// GetJSON200 returns the response for an HTTP 200 `application/json` response -func (r PatchV0EndpointsByIdIpCustomHeaderResponse) GetJSON200() *struct { - // Data Contains the updated IP custom header details - Data *struct { - // HeaderName The name of the IP custom header that was set - HeaderName *string `json:"header_name,omitempty"` + // Status The current status of the rate limiter + Status *string `json:"status,omitempty"` } `json:"data,omitempty"` - // Error Contains error details if the request failed; null if successful + // Error A field containing an error message if any issue occurs Error *string `json:"error,omitempty"` } { return r.JSON200 } // GetBody returns the raw response body bytes -func (r PatchV0EndpointsByIdIpCustomHeaderResponse) GetBody() []byte { +func (r PatchV0EndpointsByIdMethodRateLimitsByMethodRateLimitIdResponse) GetBody() []byte { return r.Body } // Status returns HTTPResponse.Status -func (r PatchV0EndpointsByIdIpCustomHeaderResponse) Status() string { +func (r PatchV0EndpointsByIdMethodRateLimitsByMethodRateLimitIdResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -8448,7 +11068,7 @@ func (r PatchV0EndpointsByIdIpCustomHeaderResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r PatchV0EndpointsByIdIpCustomHeaderResponse) StatusCode() int { +func (r PatchV0EndpointsByIdMethodRateLimitsByMethodRateLimitIdResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } @@ -8456,50 +11076,56 @@ func (r PatchV0EndpointsByIdIpCustomHeaderResponse) StatusCode() int { } // ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers -func (r PatchV0EndpointsByIdIpCustomHeaderResponse) ContentType() string { +func (r PatchV0EndpointsByIdMethodRateLimitsByMethodRateLimitIdResponse) ContentType() string { if r.HTTPResponse != nil { return r.HTTPResponse.Header.Get("Content-Type") } return "" } -type GetV0EndpointsByIdLogDetailsResponse struct { +type GetV0EndpointsByIdMetricsResponse struct { Body []byte HTTPResponse *http.Response // JSON200 the response for an HTTP 200 `application/json` response JSON200 *struct { - // Data Contains detailed information about a specific log entry, including the raw request that was sent and the response that was received. - Data *struct { - // Request A JSON-encoded string representing the request payload that was sent in the original log entry. The logs are truncated after 2KB. - Request *string `json:"request,omitempty"` + // Data An array of data + Data *[]struct { + // Data A nested list of numerical values representing the metric fetched for the endpoint + Data *[]interface{} `json:"data,omitempty"` - // Response A JSON-encoded string containing the full response returned by the API or aggregator for the logged request. The logs are truncated after 2KB. - Response *string `json:"response,omitempty"` + // Tag A string label that identifies or categorizes the specific metric + Tag *string `json:"tag,omitempty"` } `json:"data,omitempty"` + + // Error A string containing an error message if the request to fetch the metric fails + Error *string `json:"error,omitempty"` } } // GetJSON200 returns the response for an HTTP 200 `application/json` response -func (r GetV0EndpointsByIdLogDetailsResponse) GetJSON200() *struct { - // Data Contains detailed information about a specific log entry, including the raw request that was sent and the response that was received. - Data *struct { - // Request A JSON-encoded string representing the request payload that was sent in the original log entry. The logs are truncated after 2KB. - Request *string `json:"request,omitempty"` +func (r GetV0EndpointsByIdMetricsResponse) GetJSON200() *struct { + // Data An array of data + Data *[]struct { + // Data A nested list of numerical values representing the metric fetched for the endpoint + Data *[]interface{} `json:"data,omitempty"` - // Response A JSON-encoded string containing the full response returned by the API or aggregator for the logged request. The logs are truncated after 2KB. - Response *string `json:"response,omitempty"` + // Tag A string label that identifies or categorizes the specific metric + Tag *string `json:"tag,omitempty"` } `json:"data,omitempty"` + + // Error A string containing an error message if the request to fetch the metric fails + Error *string `json:"error,omitempty"` } { return r.JSON200 } // GetBody returns the raw response body bytes -func (r GetV0EndpointsByIdLogDetailsResponse) GetBody() []byte { +func (r GetV0EndpointsByIdMetricsResponse) GetBody() []byte { return r.Body } // Status returns HTTPResponse.Status -func (r GetV0EndpointsByIdLogDetailsResponse) Status() string { +func (r GetV0EndpointsByIdMetricsResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -8507,7 +11133,7 @@ func (r GetV0EndpointsByIdLogDetailsResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r GetV0EndpointsByIdLogDetailsResponse) StatusCode() int { +func (r GetV0EndpointsByIdMetricsResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } @@ -8515,98 +11141,104 @@ func (r GetV0EndpointsByIdLogDetailsResponse) StatusCode() int { } // ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers -func (r GetV0EndpointsByIdLogDetailsResponse) ContentType() string { +func (r GetV0EndpointsByIdMetricsResponse) ContentType() string { if r.HTTPResponse != nil { return r.HTTPResponse.Header.Get("Content-Type") } return "" } -type GetV0EndpointsByIdLogsResponse struct { +type PostV0EndpointsByIdMetricsErrorsSummaryResponse struct { Body []byte HTTPResponse *http.Response // JSON200 the response for an HTTP 200 `application/json` response JSON200 *struct { - // Data An array of log entries which contains the following fields: - Data *[]struct { - // Details Additional error details if available (nullable) - Details *string `json:"details,omitempty"` - - // ErrorCode The application-specific error code returned - ErrorCode *int `json:"error_code,omitempty"` + // Data Response data. Null when the request fails. + Data *struct { + // Breakdown Grouped results. Present when grouping is requested; can be empty. + Breakdown *[]struct { + // Count Number of errors in this group. + Count *float32 `json:"count,omitempty"` - // HttpMethod The HTTP method used for the request - HttpMethod *string `json:"http_method,omitempty"` + // Kind Error kind: rpc or http. + Kind *string `json:"kind,omitempty"` - // Method The name of the method invoked - Method *string `json:"method,omitempty"` + // Method RPC method name. In a breakdown, present when grouping by method. + Method *string `json:"method,omitempty"` + } `json:"breakdown,omitempty"` - // Network The name of the network on which the method was called - Network *string `json:"network,omitempty"` + // From Effective start of the returned time range, in ISO 8601 format. + From *string `json:"from,omitempty"` - // RequestId The unique identifier for the request - RequestId *string `json:"request_id,omitempty"` + // NextCursor Opaque continuation cursor. Present when another page is available. Pass it unchanged as cursor. + NextCursor *string `json:"next_cursor,omitempty"` - // Status The HTTP status code returned by the request - Status *int `json:"status,omitempty"` + // To Effective end of the returned time range, in ISO 8601 format. + To *string `json:"to,omitempty"` - // Timestamp The timestamp when the log was recorded - Timestamp *string `json:"timestamp,omitempty"` + // Totals Aggregate totals for the selected time range. + Totals *struct { + // HttpErrors Number of HTTP errors. + HttpErrors *float32 `json:"http_errors,omitempty"` - // Url The request URL - Url *string `json:"url,omitempty"` + // RpcErrors Number of RPC errors. + RpcErrors *float32 `json:"rpc_errors,omitempty"` + } `json:"totals,omitempty"` } `json:"data,omitempty"` - // NextAt A cursor string used for pagination to fetch the next set of logs - NextAt *string `json:"next_at,omitempty"` + // Error Error message on failure; null on success. + Error *string `json:"error,omitempty"` } } // GetJSON200 returns the response for an HTTP 200 `application/json` response -func (r GetV0EndpointsByIdLogsResponse) GetJSON200() *struct { - // Data An array of log entries which contains the following fields: - Data *[]struct { - // Details Additional error details if available (nullable) - Details *string `json:"details,omitempty"` - - // ErrorCode The application-specific error code returned - ErrorCode *int `json:"error_code,omitempty"` +func (r PostV0EndpointsByIdMetricsErrorsSummaryResponse) GetJSON200() *struct { + // Data Response data. Null when the request fails. + Data *struct { + // Breakdown Grouped results. Present when grouping is requested; can be empty. + Breakdown *[]struct { + // Count Number of errors in this group. + Count *float32 `json:"count,omitempty"` - // HttpMethod The HTTP method used for the request - HttpMethod *string `json:"http_method,omitempty"` + // Kind Error kind: rpc or http. + Kind *string `json:"kind,omitempty"` - // Method The name of the method invoked - Method *string `json:"method,omitempty"` + // Method RPC method name. In a breakdown, present when grouping by method. + Method *string `json:"method,omitempty"` + } `json:"breakdown,omitempty"` - // Network The name of the network on which the method was called - Network *string `json:"network,omitempty"` + // From Effective start of the returned time range, in ISO 8601 format. + From *string `json:"from,omitempty"` - // RequestId The unique identifier for the request - RequestId *string `json:"request_id,omitempty"` + // NextCursor Opaque continuation cursor. Present when another page is available. Pass it unchanged as cursor. + NextCursor *string `json:"next_cursor,omitempty"` - // Status The HTTP status code returned by the request - Status *int `json:"status,omitempty"` + // To Effective end of the returned time range, in ISO 8601 format. + To *string `json:"to,omitempty"` - // Timestamp The timestamp when the log was recorded - Timestamp *string `json:"timestamp,omitempty"` + // Totals Aggregate totals for the selected time range. + Totals *struct { + // HttpErrors Number of HTTP errors. + HttpErrors *float32 `json:"http_errors,omitempty"` - // Url The request URL - Url *string `json:"url,omitempty"` + // RpcErrors Number of RPC errors. + RpcErrors *float32 `json:"rpc_errors,omitempty"` + } `json:"totals,omitempty"` } `json:"data,omitempty"` - // NextAt A cursor string used for pagination to fetch the next set of logs - NextAt *string `json:"next_at,omitempty"` + // Error Error message on failure; null on success. + Error *string `json:"error,omitempty"` } { return r.JSON200 } // GetBody returns the raw response body bytes -func (r GetV0EndpointsByIdLogsResponse) GetBody() []byte { +func (r PostV0EndpointsByIdMetricsErrorsSummaryResponse) GetBody() []byte { return r.Body } // Status returns HTTPResponse.Status -func (r GetV0EndpointsByIdLogsResponse) Status() string { +func (r PostV0EndpointsByIdMetricsErrorsSummaryResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -8614,7 +11246,7 @@ func (r GetV0EndpointsByIdLogsResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r GetV0EndpointsByIdLogsResponse) StatusCode() int { +func (r PostV0EndpointsByIdMetricsErrorsSummaryResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } @@ -8622,40 +11254,37 @@ func (r GetV0EndpointsByIdLogsResponse) StatusCode() int { } // ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers -func (r GetV0EndpointsByIdLogsResponse) ContentType() string { +func (r PostV0EndpointsByIdMetricsErrorsSummaryResponse) ContentType() string { if r.HTTPResponse != nil { return r.HTTPResponse.Header.Get("Content-Type") } return "" } -type GetV0EndpointsByIdMethodRateLimitsResponse struct { +type GetV0EndpointsByIdRateLimitsResponse struct { Body []byte HTTPResponse *http.Response // JSON200 the response for an HTTP 200 `application/json` response JSON200 *struct { - // Data The data object which contains the following fields: + // Data The data object which contains the endpoint rate limit configuration Data *struct { - // RateLimiters An array of rate limiter configurations - RateLimiters *[]struct { - // Created The timestamp when the rate limiter was created in second - Created *string `json:"created,omitempty"` + // LimitByIp Whether the endpoint rate limits apply to each client IP address + LimitByIp *bool `json:"limit_by_ip,omitempty"` - // Id A unique identifier for the rate limiter - Id *string `json:"id,omitempty"` - - // Interval The time interval for the rate limit - Interval *string `json:"interval,omitempty"` + // RateLimits An array of endpoint rate limit configurations + RateLimits *[]struct { + // Bucket The rate limit bucket, such as rps, rpm, or rpd + Bucket *string `json:"bucket,omitempty"` - // Methods A list of method names to which the rate limiter applies - Methods *[]string `json:"methods,omitempty"` + // Id The unique identifier for a user-set endpoint rate limit override. This field is returned for user_override rate limits and can be used to delete a specific endpoint rate limit. + Id *string `json:"id,omitempty"` - // Rate The number of allowed requests within the specified interval - Rate *int `json:"rate,omitempty"` + // RateLimit The rate limit value for the bucket + RateLimit *int `json:"rate_limit,omitempty"` - // Status The current status of the rate limiter - Status *string `json:"status,omitempty"` - } `json:"rate_limiters,omitempty"` + // Source The source of the rate limit, such as plan_default or user_override + Source *string `json:"source,omitempty"` + } `json:"rate_limits,omitempty"` } `json:"data,omitempty"` // Error A field containing an error message if any issue occurs @@ -8664,29 +11293,26 @@ type GetV0EndpointsByIdMethodRateLimitsResponse struct { } // GetJSON200 returns the response for an HTTP 200 `application/json` response -func (r GetV0EndpointsByIdMethodRateLimitsResponse) GetJSON200() *struct { - // Data The data object which contains the following fields: +func (r GetV0EndpointsByIdRateLimitsResponse) GetJSON200() *struct { + // Data The data object which contains the endpoint rate limit configuration Data *struct { - // RateLimiters An array of rate limiter configurations - RateLimiters *[]struct { - // Created The timestamp when the rate limiter was created in second - Created *string `json:"created,omitempty"` - - // Id A unique identifier for the rate limiter - Id *string `json:"id,omitempty"` + // LimitByIp Whether the endpoint rate limits apply to each client IP address + LimitByIp *bool `json:"limit_by_ip,omitempty"` - // Interval The time interval for the rate limit - Interval *string `json:"interval,omitempty"` + // RateLimits An array of endpoint rate limit configurations + RateLimits *[]struct { + // Bucket The rate limit bucket, such as rps, rpm, or rpd + Bucket *string `json:"bucket,omitempty"` - // Methods A list of method names to which the rate limiter applies - Methods *[]string `json:"methods,omitempty"` + // Id The unique identifier for a user-set endpoint rate limit override. This field is returned for user_override rate limits and can be used to delete a specific endpoint rate limit. + Id *string `json:"id,omitempty"` - // Rate The number of allowed requests within the specified interval - Rate *int `json:"rate,omitempty"` + // RateLimit The rate limit value for the bucket + RateLimit *int `json:"rate_limit,omitempty"` - // Status The current status of the rate limiter - Status *string `json:"status,omitempty"` - } `json:"rate_limiters,omitempty"` + // Source The source of the rate limit, such as plan_default or user_override + Source *string `json:"source,omitempty"` + } `json:"rate_limits,omitempty"` } `json:"data,omitempty"` // Error A field containing an error message if any issue occurs @@ -8696,12 +11322,12 @@ func (r GetV0EndpointsByIdMethodRateLimitsResponse) GetJSON200() *struct { } // GetBody returns the raw response body bytes -func (r GetV0EndpointsByIdMethodRateLimitsResponse) GetBody() []byte { +func (r GetV0EndpointsByIdRateLimitsResponse) GetBody() []byte { return r.Body } // Status returns HTTPResponse.Status -func (r GetV0EndpointsByIdMethodRateLimitsResponse) Status() string { +func (r GetV0EndpointsByIdRateLimitsResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -8709,7 +11335,7 @@ func (r GetV0EndpointsByIdMethodRateLimitsResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r GetV0EndpointsByIdMethodRateLimitsResponse) StatusCode() int { +func (r GetV0EndpointsByIdRateLimitsResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } @@ -8717,37 +11343,34 @@ func (r GetV0EndpointsByIdMethodRateLimitsResponse) StatusCode() int { } // ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers -func (r GetV0EndpointsByIdMethodRateLimitsResponse) ContentType() string { +func (r GetV0EndpointsByIdRateLimitsResponse) ContentType() string { if r.HTTPResponse != nil { return r.HTTPResponse.Header.Get("Content-Type") } return "" } -type PostV0EndpointsByIdMethodRateLimitsResponse struct { +type PatchV0EndpointsByIdRateLimitsResponse struct { Body []byte HTTPResponse *http.Response // JSON200 the response for an HTTP 200 `application/json` response JSON200 *struct { // Data The data object which contains the following fields: Data *struct { - // Created The timestamp when the rate limiter was created in second - Created *string `json:"created,omitempty"` - - // Id A unique identifier for the rate limiter - Id *string `json:"id,omitempty"` - - // Interval The time interval for the rate limit - Interval *string `json:"interval,omitempty"` + // LimitByIp Whether the endpoint rate limits apply to each client IP address + LimitByIp *bool `json:"limit_by_ip,omitempty"` - // Methods A list of methods the rate limiter applies to - Methods *[]string `json:"methods,omitempty"` + // Limits The limits object which contains the following fields: + Limits *struct { + // Rpd The maximum number of requests allowed per day. A value of -1 indicates that no endpoint-level override is set for this bucket. + Rpd *int `json:"rpd,omitempty"` - // Rate The maximum number of requests allowed within the specified interval - Rate *int `json:"rate,omitempty"` + // Rpm The maximum number of requests allowed per minute. A value of -1 indicates that no endpoint-level override is set for this bucket. + Rpm *int `json:"rpm,omitempty"` - // Status The current status of the rate limiter - Status *string `json:"status,omitempty"` + // Rps The maximum number of requests allowed per second. A value of -1 indicates that no endpoint-level override is set for this bucket. + Rps *int `json:"rps,omitempty"` + } `json:"limits,omitempty"` } `json:"data,omitempty"` // Error A field containing an error message if any issue occurs @@ -8756,26 +11379,23 @@ type PostV0EndpointsByIdMethodRateLimitsResponse struct { } // GetJSON200 returns the response for an HTTP 200 `application/json` response -func (r PostV0EndpointsByIdMethodRateLimitsResponse) GetJSON200() *struct { +func (r PatchV0EndpointsByIdRateLimitsResponse) GetJSON200() *struct { // Data The data object which contains the following fields: Data *struct { - // Created The timestamp when the rate limiter was created in second - Created *string `json:"created,omitempty"` - - // Id A unique identifier for the rate limiter - Id *string `json:"id,omitempty"` - - // Interval The time interval for the rate limit - Interval *string `json:"interval,omitempty"` + // LimitByIp Whether the endpoint rate limits apply to each client IP address + LimitByIp *bool `json:"limit_by_ip,omitempty"` - // Methods A list of methods the rate limiter applies to - Methods *[]string `json:"methods,omitempty"` + // Limits The limits object which contains the following fields: + Limits *struct { + // Rpd The maximum number of requests allowed per day. A value of -1 indicates that no endpoint-level override is set for this bucket. + Rpd *int `json:"rpd,omitempty"` - // Rate The maximum number of requests allowed within the specified interval - Rate *int `json:"rate,omitempty"` + // Rpm The maximum number of requests allowed per minute. A value of -1 indicates that no endpoint-level override is set for this bucket. + Rpm *int `json:"rpm,omitempty"` - // Status The current status of the rate limiter - Status *string `json:"status,omitempty"` + // Rps The maximum number of requests allowed per second. A value of -1 indicates that no endpoint-level override is set for this bucket. + Rps *int `json:"rps,omitempty"` + } `json:"limits,omitempty"` } `json:"data,omitempty"` // Error A field containing an error message if any issue occurs @@ -8785,12 +11405,12 @@ func (r PostV0EndpointsByIdMethodRateLimitsResponse) GetJSON200() *struct { } // GetBody returns the raw response body bytes -func (r PostV0EndpointsByIdMethodRateLimitsResponse) GetBody() []byte { +func (r PatchV0EndpointsByIdRateLimitsResponse) GetBody() []byte { return r.Body } // Status returns HTTPResponse.Status -func (r PostV0EndpointsByIdMethodRateLimitsResponse) Status() string { +func (r PatchV0EndpointsByIdRateLimitsResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -8798,7 +11418,7 @@ func (r PostV0EndpointsByIdMethodRateLimitsResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r PostV0EndpointsByIdMethodRateLimitsResponse) StatusCode() int { +func (r PatchV0EndpointsByIdRateLimitsResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } @@ -8806,20 +11426,23 @@ func (r PostV0EndpointsByIdMethodRateLimitsResponse) StatusCode() int { } // ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers -func (r PostV0EndpointsByIdMethodRateLimitsResponse) ContentType() string { +func (r PatchV0EndpointsByIdRateLimitsResponse) ContentType() string { if r.HTTPResponse != nil { return r.HTTPResponse.Header.Get("Content-Type") } return "" } -type DeleteV0EndpointsByIdMethodRateLimitsByMethodRateLimitIdResponse struct { +type DeleteV0EndpointsByIdRateLimitsByOverrideIdResponse struct { Body []byte HTTPResponse *http.Response // JSON200 the response for an HTTP 200 `application/json` response JSON200 *struct { - // Data A message indicating the result of the operation - Data *string `json:"data,omitempty"` + // Data The data object which contains the result of the operation + Data *struct { + // Success Indicates whether the endpoint rate limit was deleted + Success *bool `json:"success,omitempty"` + } `json:"data,omitempty"` // Error A field containing an error message if any issue occurs Error *string `json:"error,omitempty"` @@ -8827,9 +11450,12 @@ type DeleteV0EndpointsByIdMethodRateLimitsByMethodRateLimitIdResponse struct { } // GetJSON200 returns the response for an HTTP 200 `application/json` response -func (r DeleteV0EndpointsByIdMethodRateLimitsByMethodRateLimitIdResponse) GetJSON200() *struct { - // Data A message indicating the result of the operation - Data *string `json:"data,omitempty"` +func (r DeleteV0EndpointsByIdRateLimitsByOverrideIdResponse) GetJSON200() *struct { + // Data The data object which contains the result of the operation + Data *struct { + // Success Indicates whether the endpoint rate limit was deleted + Success *bool `json:"success,omitempty"` + } `json:"data,omitempty"` // Error A field containing an error message if any issue occurs Error *string `json:"error,omitempty"` @@ -8838,12 +11464,12 @@ func (r DeleteV0EndpointsByIdMethodRateLimitsByMethodRateLimitIdResponse) GetJSO } // GetBody returns the raw response body bytes -func (r DeleteV0EndpointsByIdMethodRateLimitsByMethodRateLimitIdResponse) GetBody() []byte { +func (r DeleteV0EndpointsByIdRateLimitsByOverrideIdResponse) GetBody() []byte { return r.Body } // Status returns HTTPResponse.Status -func (r DeleteV0EndpointsByIdMethodRateLimitsByMethodRateLimitIdResponse) Status() string { +func (r DeleteV0EndpointsByIdRateLimitsByOverrideIdResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -8851,7 +11477,7 @@ func (r DeleteV0EndpointsByIdMethodRateLimitsByMethodRateLimitIdResponse) Status } // StatusCode returns HTTPResponse.StatusCode -func (r DeleteV0EndpointsByIdMethodRateLimitsByMethodRateLimitIdResponse) StatusCode() int { +func (r DeleteV0EndpointsByIdRateLimitsByOverrideIdResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } @@ -8859,80 +11485,210 @@ func (r DeleteV0EndpointsByIdMethodRateLimitsByMethodRateLimitIdResponse) Status } // ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers -func (r DeleteV0EndpointsByIdMethodRateLimitsByMethodRateLimitIdResponse) ContentType() string { +func (r DeleteV0EndpointsByIdRateLimitsByOverrideIdResponse) ContentType() string { if r.HTTPResponse != nil { return r.HTTPResponse.Header.Get("Content-Type") } return "" } -type PatchV0EndpointsByIdMethodRateLimitsByMethodRateLimitIdResponse struct { +type GetV0EndpointsByIdSecurityResponse struct { Body []byte HTTPResponse *http.Response // JSON200 the response for an HTTP 200 `application/json` response JSON200 *struct { - // Data The data object which contains the following fields: + // Data Contains the security state of the endpoint Data *struct { - // Created The timestamp when the rate limiter was created in second - Created *string `json:"created,omitempty"` + // DomainMasks An array of domain mask entries; null if none configured + DomainMasks *[]struct { + Domain *string `json:"domain,omitempty"` + Id *string `json:"id,omitempty"` + } `json:"domain_masks,omitempty"` - // Id A unique identifier for the rate limiter - Id *string `json:"id,omitempty"` + // Ips An array of allowed IP entries; null if none configured + Ips *[]struct { + Id *string `json:"id,omitempty"` + Ip *string `json:"ip,omitempty"` + } `json:"ips,omitempty"` - // Interval The time interval for the rate limit - Interval *string `json:"interval,omitempty"` + // Jwts An array of JWT configuration objects; null if none configured + Jwts *[]struct { + Id *string `json:"id,omitempty"` + Kid *string `json:"kid,omitempty"` + Name *string `json:"name,omitempty"` + PublicKey *string `json:"public_key,omitempty"` + } `json:"jwts,omitempty"` - // Methods A list of methods the rate limiter applies to - Methods *[]string `json:"methods,omitempty"` + // Options Security feature toggles for the endpoint + Options *struct { + // Cors Whether CORS is enabled + Cors *bool `json:"cors,omitempty"` - // Rate The maximum number of requests allowed within the specified interval - Rate *int `json:"rate,omitempty"` + // DomainMasks Whether domain mask restrictions are enabled + DomainMasks *bool `json:"domainMasks,omitempty"` - // Status The current status of the rate limiter - Status *string `json:"status,omitempty"` + // Hsts Whether HSTS is enabled + Hsts *bool `json:"hsts,omitempty"` + + // IpCustomHeader IP custom header configuration + IpCustomHeader *struct { + // Value The IP custom header value; null if not set + Value *string `json:"value,omitempty"` + } `json:"ipCustomHeader,omitempty"` + + // Ips Whether IP-based restrictions are enabled + Ips *bool `json:"ips,omitempty"` + + // Jwts Whether JWT-based authentication is enabled + Jwts *bool `json:"jwts,omitempty"` + + // Referrers Whether referrer-based restrictions are enabled + Referrers *bool `json:"referrers,omitempty"` + + // RequestFilters Whether request filters are enabled + RequestFilters *bool `json:"requestFilters,omitempty"` + + // ResponseLogging Whether response logging is enabled + ResponseLogging *bool `json:"responseLogging,omitempty"` + + // Tokens Whether token-based authentication is enabled + Tokens *bool `json:"tokens,omitempty"` + } `json:"options,omitempty"` + + // Referrers An array of allowed referrer entries; null if none configured + Referrers *[]struct { + Id *string `json:"id,omitempty"` + Referrer *string `json:"referrer,omitempty"` + } `json:"referrers,omitempty"` + + // RequestFilters An array of request filter objects; null if none configured + RequestFilters *[]struct { + // Id The unique identifier (UUID) of the request filter + Id *string `json:"id,omitempty"` + + // Method An array of whitelisted method names + Method *[]string `json:"method,omitempty"` + + // Params Parameter constraints for the filter + Params *map[string]interface{} `json:"params,omitempty"` + } `json:"request_filters,omitempty"` + + // Tokens An array of authentication token objects; null if none configured + Tokens *[]struct { + // Id The unique identifier (UUID) of the token + Id *string `json:"id,omitempty"` + + // Token The authentication token value + Token *string `json:"token,omitempty"` + } `json:"tokens,omitempty"` } `json:"data,omitempty"` - // Error A field containing an error message if any issue occurs + // Error Contains error details if the request failed; null if successful Error *string `json:"error,omitempty"` } } // GetJSON200 returns the response for an HTTP 200 `application/json` response -func (r PatchV0EndpointsByIdMethodRateLimitsByMethodRateLimitIdResponse) GetJSON200() *struct { - // Data The data object which contains the following fields: +func (r GetV0EndpointsByIdSecurityResponse) GetJSON200() *struct { + // Data Contains the security state of the endpoint Data *struct { - // Created The timestamp when the rate limiter was created in second - Created *string `json:"created,omitempty"` + // DomainMasks An array of domain mask entries; null if none configured + DomainMasks *[]struct { + Domain *string `json:"domain,omitempty"` + Id *string `json:"id,omitempty"` + } `json:"domain_masks,omitempty"` - // Id A unique identifier for the rate limiter - Id *string `json:"id,omitempty"` + // Ips An array of allowed IP entries; null if none configured + Ips *[]struct { + Id *string `json:"id,omitempty"` + Ip *string `json:"ip,omitempty"` + } `json:"ips,omitempty"` - // Interval The time interval for the rate limit - Interval *string `json:"interval,omitempty"` + // Jwts An array of JWT configuration objects; null if none configured + Jwts *[]struct { + Id *string `json:"id,omitempty"` + Kid *string `json:"kid,omitempty"` + Name *string `json:"name,omitempty"` + PublicKey *string `json:"public_key,omitempty"` + } `json:"jwts,omitempty"` - // Methods A list of methods the rate limiter applies to - Methods *[]string `json:"methods,omitempty"` + // Options Security feature toggles for the endpoint + Options *struct { + // Cors Whether CORS is enabled + Cors *bool `json:"cors,omitempty"` - // Rate The maximum number of requests allowed within the specified interval - Rate *int `json:"rate,omitempty"` + // DomainMasks Whether domain mask restrictions are enabled + DomainMasks *bool `json:"domainMasks,omitempty"` - // Status The current status of the rate limiter - Status *string `json:"status,omitempty"` + // Hsts Whether HSTS is enabled + Hsts *bool `json:"hsts,omitempty"` + + // IpCustomHeader IP custom header configuration + IpCustomHeader *struct { + // Value The IP custom header value; null if not set + Value *string `json:"value,omitempty"` + } `json:"ipCustomHeader,omitempty"` + + // Ips Whether IP-based restrictions are enabled + Ips *bool `json:"ips,omitempty"` + + // Jwts Whether JWT-based authentication is enabled + Jwts *bool `json:"jwts,omitempty"` + + // Referrers Whether referrer-based restrictions are enabled + Referrers *bool `json:"referrers,omitempty"` + + // RequestFilters Whether request filters are enabled + RequestFilters *bool `json:"requestFilters,omitempty"` + + // ResponseLogging Whether response logging is enabled + ResponseLogging *bool `json:"responseLogging,omitempty"` + + // Tokens Whether token-based authentication is enabled + Tokens *bool `json:"tokens,omitempty"` + } `json:"options,omitempty"` + + // Referrers An array of allowed referrer entries; null if none configured + Referrers *[]struct { + Id *string `json:"id,omitempty"` + Referrer *string `json:"referrer,omitempty"` + } `json:"referrers,omitempty"` + + // RequestFilters An array of request filter objects; null if none configured + RequestFilters *[]struct { + // Id The unique identifier (UUID) of the request filter + Id *string `json:"id,omitempty"` + + // Method An array of whitelisted method names + Method *[]string `json:"method,omitempty"` + + // Params Parameter constraints for the filter + Params *map[string]interface{} `json:"params,omitempty"` + } `json:"request_filters,omitempty"` + + // Tokens An array of authentication token objects; null if none configured + Tokens *[]struct { + // Id The unique identifier (UUID) of the token + Id *string `json:"id,omitempty"` + + // Token The authentication token value + Token *string `json:"token,omitempty"` + } `json:"tokens,omitempty"` } `json:"data,omitempty"` - // Error A field containing an error message if any issue occurs + // Error Contains error details if the request failed; null if successful Error *string `json:"error,omitempty"` } { return r.JSON200 } // GetBody returns the raw response body bytes -func (r PatchV0EndpointsByIdMethodRateLimitsByMethodRateLimitIdResponse) GetBody() []byte { +func (r GetV0EndpointsByIdSecurityResponse) GetBody() []byte { return r.Body } // Status returns HTTPResponse.Status -func (r PatchV0EndpointsByIdMethodRateLimitsByMethodRateLimitIdResponse) Status() string { +func (r GetV0EndpointsByIdSecurityResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -8940,7 +11696,7 @@ func (r PatchV0EndpointsByIdMethodRateLimitsByMethodRateLimitIdResponse) Status( } // StatusCode returns HTTPResponse.StatusCode -func (r PatchV0EndpointsByIdMethodRateLimitsByMethodRateLimitIdResponse) StatusCode() int { +func (r GetV0EndpointsByIdSecurityResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } @@ -8948,56 +11704,56 @@ func (r PatchV0EndpointsByIdMethodRateLimitsByMethodRateLimitIdResponse) StatusC } // ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers -func (r PatchV0EndpointsByIdMethodRateLimitsByMethodRateLimitIdResponse) ContentType() string { +func (r GetV0EndpointsByIdSecurityResponse) ContentType() string { if r.HTTPResponse != nil { return r.HTTPResponse.Header.Get("Content-Type") } return "" } -type GetV0EndpointsByIdMetricsResponse struct { +type PostV0EndpointsByIdSecurityDomainMasksResponse struct { Body []byte HTTPResponse *http.Response // JSON200 the response for an HTTP 200 `application/json` response JSON200 *struct { - // Data An array of data - Data *[]struct { - // Data A nested list of numerical values representing the metric fetched for the endpoint - Data *[]interface{} `json:"data,omitempty"` + // Data The data object which contains the following fields: + Data *struct { + // DomainMask The domain mask that you used to mask your endpoint + DomainMask *string `json:"domain_mask,omitempty"` - // Tag A string label that identifies or categorizes the specific metric - Tag *string `json:"tag,omitempty"` + // Id A unique identifier for the domain mask + Id *string `json:"id,omitempty"` } `json:"data,omitempty"` - // Error A string containing an error message if the request to fetch the metric fails + // Error A field containing an error message if any issue occurs Error *string `json:"error,omitempty"` } } // GetJSON200 returns the response for an HTTP 200 `application/json` response -func (r GetV0EndpointsByIdMetricsResponse) GetJSON200() *struct { - // Data An array of data - Data *[]struct { - // Data A nested list of numerical values representing the metric fetched for the endpoint - Data *[]interface{} `json:"data,omitempty"` +func (r PostV0EndpointsByIdSecurityDomainMasksResponse) GetJSON200() *struct { + // Data The data object which contains the following fields: + Data *struct { + // DomainMask The domain mask that you used to mask your endpoint + DomainMask *string `json:"domain_mask,omitempty"` - // Tag A string label that identifies or categorizes the specific metric - Tag *string `json:"tag,omitempty"` + // Id A unique identifier for the domain mask + Id *string `json:"id,omitempty"` } `json:"data,omitempty"` - // Error A string containing an error message if the request to fetch the metric fails + // Error A field containing an error message if any issue occurs Error *string `json:"error,omitempty"` } { return r.JSON200 } // GetBody returns the raw response body bytes -func (r GetV0EndpointsByIdMetricsResponse) GetBody() []byte { +func (r PostV0EndpointsByIdSecurityDomainMasksResponse) GetBody() []byte { return r.Body } // Status returns HTTPResponse.Status -func (r GetV0EndpointsByIdMetricsResponse) Status() string { +func (r PostV0EndpointsByIdSecurityDomainMasksResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -9005,7 +11761,7 @@ func (r GetV0EndpointsByIdMetricsResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r GetV0EndpointsByIdMetricsResponse) StatusCode() int { +func (r PostV0EndpointsByIdSecurityDomainMasksResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } @@ -9013,35 +11769,20 @@ func (r GetV0EndpointsByIdMetricsResponse) StatusCode() int { } // ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers -func (r GetV0EndpointsByIdMetricsResponse) ContentType() string { +func (r PostV0EndpointsByIdSecurityDomainMasksResponse) ContentType() string { if r.HTTPResponse != nil { return r.HTTPResponse.Header.Get("Content-Type") } return "" } -type GetV0EndpointsByIdRateLimitsResponse struct { +type DeleteV0EndpointsByIdSecurityDomainMasksByDomainMaskIdResponse struct { Body []byte HTTPResponse *http.Response // JSON200 the response for an HTTP 200 `application/json` response JSON200 *struct { - // Data The data object which contains the endpoint rate limit configuration - Data *struct { - // RateLimits An array of endpoint rate limit configurations - RateLimits *[]struct { - // Bucket The rate limit bucket, such as rps, rpm, or rpd - Bucket *string `json:"bucket,omitempty"` - - // Id The unique identifier for a user-set endpoint rate limit override. This field is returned for user_override rate limits and can be used to delete a specific endpoint rate limit. - Id *string `json:"id,omitempty"` - - // RateLimit The rate limit value for the bucket - RateLimit *int `json:"rate_limit,omitempty"` - - // Source The source of the rate limit, such as plan_default or user_override - Source *string `json:"source,omitempty"` - } `json:"rate_limits,omitempty"` - } `json:"data,omitempty"` + // Data Represent successfully deleted the existing endpoint domain mask + Data *bool `json:"data,omitempty"` // Error A field containing an error message if any issue occurs Error *string `json:"error,omitempty"` @@ -9049,24 +11790,9 @@ type GetV0EndpointsByIdRateLimitsResponse struct { } // GetJSON200 returns the response for an HTTP 200 `application/json` response -func (r GetV0EndpointsByIdRateLimitsResponse) GetJSON200() *struct { - // Data The data object which contains the endpoint rate limit configuration - Data *struct { - // RateLimits An array of endpoint rate limit configurations - RateLimits *[]struct { - // Bucket The rate limit bucket, such as rps, rpm, or rpd - Bucket *string `json:"bucket,omitempty"` - - // Id The unique identifier for a user-set endpoint rate limit override. This field is returned for user_override rate limits and can be used to delete a specific endpoint rate limit. - Id *string `json:"id,omitempty"` - - // RateLimit The rate limit value for the bucket - RateLimit *int `json:"rate_limit,omitempty"` - - // Source The source of the rate limit, such as plan_default or user_override - Source *string `json:"source,omitempty"` - } `json:"rate_limits,omitempty"` - } `json:"data,omitempty"` +func (r DeleteV0EndpointsByIdSecurityDomainMasksByDomainMaskIdResponse) GetJSON200() *struct { + // Data Represent successfully deleted the existing endpoint domain mask + Data *bool `json:"data,omitempty"` // Error A field containing an error message if any issue occurs Error *string `json:"error,omitempty"` @@ -9075,12 +11801,12 @@ func (r GetV0EndpointsByIdRateLimitsResponse) GetJSON200() *struct { } // GetBody returns the raw response body bytes -func (r GetV0EndpointsByIdRateLimitsResponse) GetBody() []byte { +func (r DeleteV0EndpointsByIdSecurityDomainMasksByDomainMaskIdResponse) GetBody() []byte { return r.Body } // Status returns HTTPResponse.Status -func (r GetV0EndpointsByIdRateLimitsResponse) Status() string { +func (r DeleteV0EndpointsByIdSecurityDomainMasksByDomainMaskIdResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -9088,7 +11814,7 @@ func (r GetV0EndpointsByIdRateLimitsResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r GetV0EndpointsByIdRateLimitsResponse) StatusCode() int { +func (r DeleteV0EndpointsByIdSecurityDomainMasksByDomainMaskIdResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } @@ -9096,31 +11822,25 @@ func (r GetV0EndpointsByIdRateLimitsResponse) StatusCode() int { } // ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers -func (r GetV0EndpointsByIdRateLimitsResponse) ContentType() string { +func (r DeleteV0EndpointsByIdSecurityDomainMasksByDomainMaskIdResponse) ContentType() string { if r.HTTPResponse != nil { return r.HTTPResponse.Header.Get("Content-Type") } return "" } -type PatchV0EndpointsByIdRateLimitsResponse struct { +type PostV0EndpointsByIdSecurityIpsResponse struct { Body []byte HTTPResponse *http.Response // JSON200 the response for an HTTP 200 `application/json` response JSON200 *struct { // Data The data object which contains the following fields: Data *struct { - // Limits The limits object which contains the following fields: - Limits *struct { - // Rpd The maximum number of requests allowed per day. A value of -1 indicates that no endpoint-level override is set for this bucket. - Rpd *int `json:"rpd,omitempty"` - - // Rpm The maximum number of requests allowed per minute. A value of -1 indicates that no endpoint-level override is set for this bucket. - Rpm *int `json:"rpm,omitempty"` + // Id A unique identifier for the IP rule + Id *string `json:"id,omitempty"` - // Rps The maximum number of requests allowed per second. A value of -1 indicates that no endpoint-level override is set for this bucket. - Rps *int `json:"rps,omitempty"` - } `json:"limits,omitempty"` + // Ip The IP address that is allowed to access the API endpoint + Ip *string `json:"ip,omitempty"` } `json:"data,omitempty"` // Error A field containing an error message if any issue occurs @@ -9129,20 +11849,14 @@ type PatchV0EndpointsByIdRateLimitsResponse struct { } // GetJSON200 returns the response for an HTTP 200 `application/json` response -func (r PatchV0EndpointsByIdRateLimitsResponse) GetJSON200() *struct { +func (r PostV0EndpointsByIdSecurityIpsResponse) GetJSON200() *struct { // Data The data object which contains the following fields: Data *struct { - // Limits The limits object which contains the following fields: - Limits *struct { - // Rpd The maximum number of requests allowed per day. A value of -1 indicates that no endpoint-level override is set for this bucket. - Rpd *int `json:"rpd,omitempty"` - - // Rpm The maximum number of requests allowed per minute. A value of -1 indicates that no endpoint-level override is set for this bucket. - Rpm *int `json:"rpm,omitempty"` + // Id A unique identifier for the IP rule + Id *string `json:"id,omitempty"` - // Rps The maximum number of requests allowed per second. A value of -1 indicates that no endpoint-level override is set for this bucket. - Rps *int `json:"rps,omitempty"` - } `json:"limits,omitempty"` + // Ip The IP address that is allowed to access the API endpoint + Ip *string `json:"ip,omitempty"` } `json:"data,omitempty"` // Error A field containing an error message if any issue occurs @@ -9152,12 +11866,12 @@ func (r PatchV0EndpointsByIdRateLimitsResponse) GetJSON200() *struct { } // GetBody returns the raw response body bytes -func (r PatchV0EndpointsByIdRateLimitsResponse) GetBody() []byte { +func (r PostV0EndpointsByIdSecurityIpsResponse) GetBody() []byte { return r.Body } // Status returns HTTPResponse.Status -func (r PatchV0EndpointsByIdRateLimitsResponse) Status() string { +func (r PostV0EndpointsByIdSecurityIpsResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -9165,7 +11879,7 @@ func (r PatchV0EndpointsByIdRateLimitsResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r PatchV0EndpointsByIdRateLimitsResponse) StatusCode() int { +func (r PostV0EndpointsByIdSecurityIpsResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } @@ -9173,23 +11887,20 @@ func (r PatchV0EndpointsByIdRateLimitsResponse) StatusCode() int { } // ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers -func (r PatchV0EndpointsByIdRateLimitsResponse) ContentType() string { +func (r PostV0EndpointsByIdSecurityIpsResponse) ContentType() string { if r.HTTPResponse != nil { return r.HTTPResponse.Header.Get("Content-Type") } return "" } -type DeleteV0EndpointsByIdRateLimitsByOverrideIdResponse struct { +type DeleteV0EndpointsByIdSecurityIpsByIpIdResponse struct { Body []byte HTTPResponse *http.Response // JSON200 the response for an HTTP 200 `application/json` response JSON200 *struct { - // Data The data object which contains the result of the operation - Data *struct { - // Success Indicates whether the endpoint rate limit was deleted - Success *bool `json:"success,omitempty"` - } `json:"data,omitempty"` + // Data Represent successfully deleted the existing endpoint IP + Data *bool `json:"data,omitempty"` // Error A field containing an error message if any issue occurs Error *string `json:"error,omitempty"` @@ -9197,12 +11908,9 @@ type DeleteV0EndpointsByIdRateLimitsByOverrideIdResponse struct { } // GetJSON200 returns the response for an HTTP 200 `application/json` response -func (r DeleteV0EndpointsByIdRateLimitsByOverrideIdResponse) GetJSON200() *struct { - // Data The data object which contains the result of the operation - Data *struct { - // Success Indicates whether the endpoint rate limit was deleted - Success *bool `json:"success,omitempty"` - } `json:"data,omitempty"` +func (r DeleteV0EndpointsByIdSecurityIpsByIpIdResponse) GetJSON200() *struct { + // Data Represent successfully deleted the existing endpoint IP + Data *bool `json:"data,omitempty"` // Error A field containing an error message if any issue occurs Error *string `json:"error,omitempty"` @@ -9211,12 +11919,12 @@ func (r DeleteV0EndpointsByIdRateLimitsByOverrideIdResponse) GetJSON200() *struc } // GetBody returns the raw response body bytes -func (r DeleteV0EndpointsByIdRateLimitsByOverrideIdResponse) GetBody() []byte { +func (r DeleteV0EndpointsByIdSecurityIpsByIpIdResponse) GetBody() []byte { return r.Body } // Status returns HTTPResponse.Status -func (r DeleteV0EndpointsByIdRateLimitsByOverrideIdResponse) Status() string { +func (r DeleteV0EndpointsByIdSecurityIpsByIpIdResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -9224,7 +11932,7 @@ func (r DeleteV0EndpointsByIdRateLimitsByOverrideIdResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r DeleteV0EndpointsByIdRateLimitsByOverrideIdResponse) StatusCode() int { +func (r DeleteV0EndpointsByIdSecurityIpsByIpIdResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } @@ -9232,210 +11940,121 @@ func (r DeleteV0EndpointsByIdRateLimitsByOverrideIdResponse) StatusCode() int { } // ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers -func (r DeleteV0EndpointsByIdRateLimitsByOverrideIdResponse) ContentType() string { +func (r DeleteV0EndpointsByIdSecurityIpsByIpIdResponse) ContentType() string { if r.HTTPResponse != nil { return r.HTTPResponse.Header.Get("Content-Type") } return "" } -type GetV0EndpointsByIdSecurityResponse struct { +type PostV0EndpointsByIdSecurityJwtsResponse struct { Body []byte HTTPResponse *http.Response // JSON200 the response for an HTTP 200 `application/json` response JSON200 *struct { - // Data Contains the security state of the endpoint + // Data The data object which contains the following fields: Data *struct { - // DomainMasks An array of domain mask entries; null if none configured - DomainMasks *[]struct { - Domain *string `json:"domain,omitempty"` - Id *string `json:"id,omitempty"` - } `json:"domain_masks,omitempty"` - - // Ips An array of allowed IP entries; null if none configured - Ips *[]struct { - Id *string `json:"id,omitempty"` - Ip *string `json:"ip,omitempty"` - } `json:"ips,omitempty"` - - // Jwts An array of JWT configuration objects; null if none configured - Jwts *[]struct { - Id *string `json:"id,omitempty"` - Kid *string `json:"kid,omitempty"` - Name *string `json:"name,omitempty"` - PublicKey *string `json:"public_key,omitempty"` - } `json:"jwts,omitempty"` - - // Options Security feature toggles for the endpoint - Options *struct { - // Cors Whether CORS is enabled - Cors *bool `json:"cors,omitempty"` - - // DomainMasks Whether domain mask restrictions are enabled - DomainMasks *bool `json:"domainMasks,omitempty"` - - // Hsts Whether HSTS is enabled - Hsts *bool `json:"hsts,omitempty"` - - // IpCustomHeader IP custom header configuration - IpCustomHeader *struct { - // Value The IP custom header value; null if not set - Value *string `json:"value,omitempty"` - } `json:"ipCustomHeader,omitempty"` - - // Ips Whether IP-based restrictions are enabled - Ips *bool `json:"ips,omitempty"` - - // Jwts Whether JWT-based authentication is enabled - Jwts *bool `json:"jwts,omitempty"` - - // Referrers Whether referrer-based restrictions are enabled - Referrers *bool `json:"referrers,omitempty"` - - // RequestFilters Whether request filters are enabled - RequestFilters *bool `json:"requestFilters,omitempty"` - - // ResponseLogging Whether response logging is enabled - ResponseLogging *bool `json:"responseLogging,omitempty"` - - // Tokens Whether token-based authentication is enabled - Tokens *bool `json:"tokens,omitempty"` - } `json:"options,omitempty"` - - // Referrers An array of allowed referrer entries; null if none configured - Referrers *[]struct { - Id *string `json:"id,omitempty"` - Referrer *string `json:"referrer,omitempty"` - } `json:"referrers,omitempty"` - - // RequestFilters An array of request filter objects; null if none configured - RequestFilters *[]struct { - // Id The unique identifier (UUID) of the request filter - Id *string `json:"id,omitempty"` - - // Method An array of whitelisted method names - Method *[]string `json:"method,omitempty"` + // Id A unique identifier for the JWT configuration + Id *string `json:"id,omitempty"` - // Params Parameter constraints for the filter - Params *map[string]interface{} `json:"params,omitempty"` - } `json:"request_filters,omitempty"` + // Kid The key identifier (KID) associated with the public key + Kid *string `json:"kid,omitempty"` - // Tokens An array of authentication token objects; null if none configured - Tokens *[]struct { - // Id The unique identifier (UUID) of the token - Id *string `json:"id,omitempty"` + // Name A human-readable name for the JWT configuration + Name *string `json:"name,omitempty"` - // Token The authentication token value - Token *string `json:"token,omitempty"` - } `json:"tokens,omitempty"` + // PublicKey The public key used to verify the JWT token + PublicKey *string `json:"public_key,omitempty"` } `json:"data,omitempty"` - // Error Contains error details if the request failed; null if successful + // Error A field containing an error message if any issue occurs Error *string `json:"error,omitempty"` } } // GetJSON200 returns the response for an HTTP 200 `application/json` response -func (r GetV0EndpointsByIdSecurityResponse) GetJSON200() *struct { - // Data Contains the security state of the endpoint - Data *struct { - // DomainMasks An array of domain mask entries; null if none configured - DomainMasks *[]struct { - Domain *string `json:"domain,omitempty"` - Id *string `json:"id,omitempty"` - } `json:"domain_masks,omitempty"` - - // Ips An array of allowed IP entries; null if none configured - Ips *[]struct { - Id *string `json:"id,omitempty"` - Ip *string `json:"ip,omitempty"` - } `json:"ips,omitempty"` - - // Jwts An array of JWT configuration objects; null if none configured - Jwts *[]struct { - Id *string `json:"id,omitempty"` - Kid *string `json:"kid,omitempty"` - Name *string `json:"name,omitempty"` - PublicKey *string `json:"public_key,omitempty"` - } `json:"jwts,omitempty"` - - // Options Security feature toggles for the endpoint - Options *struct { - // Cors Whether CORS is enabled - Cors *bool `json:"cors,omitempty"` - - // DomainMasks Whether domain mask restrictions are enabled - DomainMasks *bool `json:"domainMasks,omitempty"` - - // Hsts Whether HSTS is enabled - Hsts *bool `json:"hsts,omitempty"` - - // IpCustomHeader IP custom header configuration - IpCustomHeader *struct { - // Value The IP custom header value; null if not set - Value *string `json:"value,omitempty"` - } `json:"ipCustomHeader,omitempty"` - - // Ips Whether IP-based restrictions are enabled - Ips *bool `json:"ips,omitempty"` +func (r PostV0EndpointsByIdSecurityJwtsResponse) GetJSON200() *struct { + // Data The data object which contains the following fields: + Data *struct { + // Id A unique identifier for the JWT configuration + Id *string `json:"id,omitempty"` - // Jwts Whether JWT-based authentication is enabled - Jwts *bool `json:"jwts,omitempty"` + // Kid The key identifier (KID) associated with the public key + Kid *string `json:"kid,omitempty"` - // Referrers Whether referrer-based restrictions are enabled - Referrers *bool `json:"referrers,omitempty"` + // Name A human-readable name for the JWT configuration + Name *string `json:"name,omitempty"` - // RequestFilters Whether request filters are enabled - RequestFilters *bool `json:"requestFilters,omitempty"` + // PublicKey The public key used to verify the JWT token + PublicKey *string `json:"public_key,omitempty"` + } `json:"data,omitempty"` - // ResponseLogging Whether response logging is enabled - ResponseLogging *bool `json:"responseLogging,omitempty"` + // Error A field containing an error message if any issue occurs + Error *string `json:"error,omitempty"` +} { + return r.JSON200 +} - // Tokens Whether token-based authentication is enabled - Tokens *bool `json:"tokens,omitempty"` - } `json:"options,omitempty"` +// GetBody returns the raw response body bytes +func (r PostV0EndpointsByIdSecurityJwtsResponse) GetBody() []byte { + return r.Body +} - // Referrers An array of allowed referrer entries; null if none configured - Referrers *[]struct { - Id *string `json:"id,omitempty"` - Referrer *string `json:"referrer,omitempty"` - } `json:"referrers,omitempty"` +// Status returns HTTPResponse.Status +func (r PostV0EndpointsByIdSecurityJwtsResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} - // RequestFilters An array of request filter objects; null if none configured - RequestFilters *[]struct { - // Id The unique identifier (UUID) of the request filter - Id *string `json:"id,omitempty"` +// StatusCode returns HTTPResponse.StatusCode +func (r PostV0EndpointsByIdSecurityJwtsResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} - // Method An array of whitelisted method names - Method *[]string `json:"method,omitempty"` +// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers +func (r PostV0EndpointsByIdSecurityJwtsResponse) ContentType() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Header.Get("Content-Type") + } + return "" +} - // Params Parameter constraints for the filter - Params *map[string]interface{} `json:"params,omitempty"` - } `json:"request_filters,omitempty"` +type DeleteV0EndpointsByIdSecurityJwtsByJwtIdResponse struct { + Body []byte + HTTPResponse *http.Response + // JSON200 the response for an HTTP 200 `application/json` response + JSON200 *struct { + // Data Represent successfully deleted the existing endpoint jwt + Data *bool `json:"data,omitempty"` - // Tokens An array of authentication token objects; null if none configured - Tokens *[]struct { - // Id The unique identifier (UUID) of the token - Id *string `json:"id,omitempty"` + // Error A field containing an error message if any issue occurs + Error *string `json:"error,omitempty"` + } +} - // Token The authentication token value - Token *string `json:"token,omitempty"` - } `json:"tokens,omitempty"` - } `json:"data,omitempty"` +// GetJSON200 returns the response for an HTTP 200 `application/json` response +func (r DeleteV0EndpointsByIdSecurityJwtsByJwtIdResponse) GetJSON200() *struct { + // Data Represent successfully deleted the existing endpoint jwt + Data *bool `json:"data,omitempty"` - // Error Contains error details if the request failed; null if successful + // Error A field containing an error message if any issue occurs Error *string `json:"error,omitempty"` } { return r.JSON200 } // GetBody returns the raw response body bytes -func (r GetV0EndpointsByIdSecurityResponse) GetBody() []byte { +func (r DeleteV0EndpointsByIdSecurityJwtsByJwtIdResponse) GetBody() []byte { return r.Body } // Status returns HTTPResponse.Status -func (r GetV0EndpointsByIdSecurityResponse) Status() string { +func (r DeleteV0EndpointsByIdSecurityJwtsByJwtIdResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -9443,7 +12062,7 @@ func (r GetV0EndpointsByIdSecurityResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r GetV0EndpointsByIdSecurityResponse) StatusCode() int { +func (r DeleteV0EndpointsByIdSecurityJwtsByJwtIdResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } @@ -9451,25 +12070,25 @@ func (r GetV0EndpointsByIdSecurityResponse) StatusCode() int { } // ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers -func (r GetV0EndpointsByIdSecurityResponse) ContentType() string { +func (r DeleteV0EndpointsByIdSecurityJwtsByJwtIdResponse) ContentType() string { if r.HTTPResponse != nil { return r.HTTPResponse.Header.Get("Content-Type") } return "" } -type PostV0EndpointsByIdSecurityDomainMasksResponse struct { +type PostV0EndpointsByIdSecurityReferrersResponse struct { Body []byte HTTPResponse *http.Response // JSON200 the response for an HTTP 200 `application/json` response JSON200 *struct { // Data The data object which contains the following fields: Data *struct { - // DomainMask The domain mask that you used to mask your endpoint - DomainMask *string `json:"domain_mask,omitempty"` - - // Id A unique identifier for the domain mask + // Id A unique identifier for the referrer Id *string `json:"id,omitempty"` + + // Referrer The URL or domain that is allowed to access the specific API endpoint. Only requests coming from this referrer will be permitted + Referrer *string `json:"referrer,omitempty"` } `json:"data,omitempty"` // Error A field containing an error message if any issue occurs @@ -9478,14 +12097,14 @@ type PostV0EndpointsByIdSecurityDomainMasksResponse struct { } // GetJSON200 returns the response for an HTTP 200 `application/json` response -func (r PostV0EndpointsByIdSecurityDomainMasksResponse) GetJSON200() *struct { +func (r PostV0EndpointsByIdSecurityReferrersResponse) GetJSON200() *struct { // Data The data object which contains the following fields: Data *struct { - // DomainMask The domain mask that you used to mask your endpoint - DomainMask *string `json:"domain_mask,omitempty"` - - // Id A unique identifier for the domain mask + // Id A unique identifier for the referrer Id *string `json:"id,omitempty"` + + // Referrer The URL or domain that is allowed to access the specific API endpoint. Only requests coming from this referrer will be permitted + Referrer *string `json:"referrer,omitempty"` } `json:"data,omitempty"` // Error A field containing an error message if any issue occurs @@ -9495,12 +12114,12 @@ func (r PostV0EndpointsByIdSecurityDomainMasksResponse) GetJSON200() *struct { } // GetBody returns the raw response body bytes -func (r PostV0EndpointsByIdSecurityDomainMasksResponse) GetBody() []byte { +func (r PostV0EndpointsByIdSecurityReferrersResponse) GetBody() []byte { return r.Body } // Status returns HTTPResponse.Status -func (r PostV0EndpointsByIdSecurityDomainMasksResponse) Status() string { +func (r PostV0EndpointsByIdSecurityReferrersResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -9508,7 +12127,7 @@ func (r PostV0EndpointsByIdSecurityDomainMasksResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r PostV0EndpointsByIdSecurityDomainMasksResponse) StatusCode() int { +func (r PostV0EndpointsByIdSecurityReferrersResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } @@ -9516,19 +12135,19 @@ func (r PostV0EndpointsByIdSecurityDomainMasksResponse) StatusCode() int { } // ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers -func (r PostV0EndpointsByIdSecurityDomainMasksResponse) ContentType() string { +func (r PostV0EndpointsByIdSecurityReferrersResponse) ContentType() string { if r.HTTPResponse != nil { return r.HTTPResponse.Header.Get("Content-Type") } return "" } -type DeleteV0EndpointsByIdSecurityDomainMasksByDomainMaskIdResponse struct { +type DeleteV0EndpointsByIdSecurityReferrersByReferrerIdResponse struct { Body []byte HTTPResponse *http.Response // JSON200 the response for an HTTP 200 `application/json` response JSON200 *struct { - // Data Represent successfully deleted the existing endpoint domain mask + // Data Represent successfully deleted the existing endpoint referrer Data *bool `json:"data,omitempty"` // Error A field containing an error message if any issue occurs @@ -9537,8 +12156,8 @@ type DeleteV0EndpointsByIdSecurityDomainMasksByDomainMaskIdResponse struct { } // GetJSON200 returns the response for an HTTP 200 `application/json` response -func (r DeleteV0EndpointsByIdSecurityDomainMasksByDomainMaskIdResponse) GetJSON200() *struct { - // Data Represent successfully deleted the existing endpoint domain mask +func (r DeleteV0EndpointsByIdSecurityReferrersByReferrerIdResponse) GetJSON200() *struct { + // Data Represent successfully deleted the existing endpoint referrer Data *bool `json:"data,omitempty"` // Error A field containing an error message if any issue occurs @@ -9548,12 +12167,139 @@ func (r DeleteV0EndpointsByIdSecurityDomainMasksByDomainMaskIdResponse) GetJSON2 } // GetBody returns the raw response body bytes -func (r DeleteV0EndpointsByIdSecurityDomainMasksByDomainMaskIdResponse) GetBody() []byte { +func (r DeleteV0EndpointsByIdSecurityReferrersByReferrerIdResponse) GetBody() []byte { + return r.Body +} + +// Status returns HTTPResponse.Status +func (r DeleteV0EndpointsByIdSecurityReferrersByReferrerIdResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r DeleteV0EndpointsByIdSecurityReferrersByReferrerIdResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers +func (r DeleteV0EndpointsByIdSecurityReferrersByReferrerIdResponse) ContentType() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Header.Get("Content-Type") + } + return "" +} + +type PostV0EndpointsByIdSecurityRequestFiltersResponse struct { + Body []byte + HTTPResponse *http.Response + // JSON200 the response for an HTTP 200 `application/json` response + JSON200 *struct { + // Data Contains the created request filter details + Data *struct { + // Id The unique identifier (UUID) of the newly created request filter + Id *string `json:"id,omitempty"` + } `json:"data,omitempty"` + + // Error Contains error details if the request failed; null if successful + Error *string `json:"error,omitempty"` + } +} + +// GetJSON200 returns the response for an HTTP 200 `application/json` response +func (r PostV0EndpointsByIdSecurityRequestFiltersResponse) GetJSON200() *struct { + // Data Contains the created request filter details + Data *struct { + // Id The unique identifier (UUID) of the newly created request filter + Id *string `json:"id,omitempty"` + } `json:"data,omitempty"` + + // Error Contains error details if the request failed; null if successful + Error *string `json:"error,omitempty"` +} { + return r.JSON200 +} + +// GetBody returns the raw response body bytes +func (r PostV0EndpointsByIdSecurityRequestFiltersResponse) GetBody() []byte { + return r.Body +} + +// Status returns HTTPResponse.Status +func (r PostV0EndpointsByIdSecurityRequestFiltersResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r PostV0EndpointsByIdSecurityRequestFiltersResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers +func (r PostV0EndpointsByIdSecurityRequestFiltersResponse) ContentType() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Header.Get("Content-Type") + } + return "" +} + +type DeleteV0EndpointsByIdSecurityRequestFiltersByRequestFilterIdResponse struct { + Body []byte + HTTPResponse *http.Response +} + +// GetBody returns the raw response body bytes +func (r DeleteV0EndpointsByIdSecurityRequestFiltersByRequestFilterIdResponse) GetBody() []byte { + return r.Body +} + +// Status returns HTTPResponse.Status +func (r DeleteV0EndpointsByIdSecurityRequestFiltersByRequestFilterIdResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r DeleteV0EndpointsByIdSecurityRequestFiltersByRequestFilterIdResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers +func (r DeleteV0EndpointsByIdSecurityRequestFiltersByRequestFilterIdResponse) ContentType() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Header.Get("Content-Type") + } + return "" +} + +type PutV0EndpointsByIdSecurityRequestFiltersByRequestFilterIdResponse struct { + Body []byte + HTTPResponse *http.Response +} + +// GetBody returns the raw response body bytes +func (r PutV0EndpointsByIdSecurityRequestFiltersByRequestFilterIdResponse) GetBody() []byte { return r.Body } // Status returns HTTPResponse.Status -func (r DeleteV0EndpointsByIdSecurityDomainMasksByDomainMaskIdResponse) Status() string { +func (r PutV0EndpointsByIdSecurityRequestFiltersByRequestFilterIdResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -9561,7 +12307,7 @@ func (r DeleteV0EndpointsByIdSecurityDomainMasksByDomainMaskIdResponse) Status() } // StatusCode returns HTTPResponse.StatusCode -func (r DeleteV0EndpointsByIdSecurityDomainMasksByDomainMaskIdResponse) StatusCode() int { +func (r PutV0EndpointsByIdSecurityRequestFiltersByRequestFilterIdResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } @@ -9569,25 +12315,25 @@ func (r DeleteV0EndpointsByIdSecurityDomainMasksByDomainMaskIdResponse) StatusCo } // ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers -func (r DeleteV0EndpointsByIdSecurityDomainMasksByDomainMaskIdResponse) ContentType() string { +func (r PutV0EndpointsByIdSecurityRequestFiltersByRequestFilterIdResponse) ContentType() string { if r.HTTPResponse != nil { return r.HTTPResponse.Header.Get("Content-Type") } return "" } -type PostV0EndpointsByIdSecurityIpsResponse struct { +type PostV0EndpointsByIdSecurityTokensResponse struct { Body []byte HTTPResponse *http.Response // JSON200 the response for an HTTP 200 `application/json` response JSON200 *struct { // Data The data object which contains the following fields: Data *struct { - // Id A unique identifier for the IP rule + // Id A unique identifier for the token Id *string `json:"id,omitempty"` - // Ip The IP address that is allowed to access the API endpoint - Ip *string `json:"ip,omitempty"` + // Token The generated token string used for authentication + Token *string `json:"token,omitempty"` } `json:"data,omitempty"` // Error A field containing an error message if any issue occurs @@ -9596,14 +12342,14 @@ type PostV0EndpointsByIdSecurityIpsResponse struct { } // GetJSON200 returns the response for an HTTP 200 `application/json` response -func (r PostV0EndpointsByIdSecurityIpsResponse) GetJSON200() *struct { +func (r PostV0EndpointsByIdSecurityTokensResponse) GetJSON200() *struct { // Data The data object which contains the following fields: Data *struct { - // Id A unique identifier for the IP rule + // Id A unique identifier for the token Id *string `json:"id,omitempty"` - // Ip The IP address that is allowed to access the API endpoint - Ip *string `json:"ip,omitempty"` + // Token The generated token string used for authentication + Token *string `json:"token,omitempty"` } `json:"data,omitempty"` // Error A field containing an error message if any issue occurs @@ -9613,12 +12359,12 @@ func (r PostV0EndpointsByIdSecurityIpsResponse) GetJSON200() *struct { } // GetBody returns the raw response body bytes -func (r PostV0EndpointsByIdSecurityIpsResponse) GetBody() []byte { +func (r PostV0EndpointsByIdSecurityTokensResponse) GetBody() []byte { return r.Body } // Status returns HTTPResponse.Status -func (r PostV0EndpointsByIdSecurityIpsResponse) Status() string { +func (r PostV0EndpointsByIdSecurityTokensResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -9626,7 +12372,7 @@ func (r PostV0EndpointsByIdSecurityIpsResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r PostV0EndpointsByIdSecurityIpsResponse) StatusCode() int { +func (r PostV0EndpointsByIdSecurityTokensResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } @@ -9634,19 +12380,19 @@ func (r PostV0EndpointsByIdSecurityIpsResponse) StatusCode() int { } // ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers -func (r PostV0EndpointsByIdSecurityIpsResponse) ContentType() string { +func (r PostV0EndpointsByIdSecurityTokensResponse) ContentType() string { if r.HTTPResponse != nil { return r.HTTPResponse.Header.Get("Content-Type") } return "" } -type DeleteV0EndpointsByIdSecurityIpsByIpIdResponse struct { +type DeleteV0EndpointsByIdSecurityTokensByTokenIdResponse struct { Body []byte HTTPResponse *http.Response // JSON200 the response for an HTTP 200 `application/json` response JSON200 *struct { - // Data Represent successfully deleted the existing endpoint IP + // Data Represent successfully deleted the existing endpoint token Data *bool `json:"data,omitempty"` // Error A field containing an error message if any issue occurs @@ -9655,8 +12401,8 @@ type DeleteV0EndpointsByIdSecurityIpsByIpIdResponse struct { } // GetJSON200 returns the response for an HTTP 200 `application/json` response -func (r DeleteV0EndpointsByIdSecurityIpsByIpIdResponse) GetJSON200() *struct { - // Data Represent successfully deleted the existing endpoint IP +func (r DeleteV0EndpointsByIdSecurityTokensByTokenIdResponse) GetJSON200() *struct { + // Data Represent successfully deleted the existing endpoint token Data *bool `json:"data,omitempty"` // Error A field containing an error message if any issue occurs @@ -9666,12 +12412,12 @@ func (r DeleteV0EndpointsByIdSecurityIpsByIpIdResponse) GetJSON200() *struct { } // GetBody returns the raw response body bytes -func (r DeleteV0EndpointsByIdSecurityIpsByIpIdResponse) GetBody() []byte { +func (r DeleteV0EndpointsByIdSecurityTokensByTokenIdResponse) GetBody() []byte { return r.Body } // Status returns HTTPResponse.Status -func (r DeleteV0EndpointsByIdSecurityIpsByIpIdResponse) Status() string { +func (r DeleteV0EndpointsByIdSecurityTokensByTokenIdResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -9679,7 +12425,7 @@ func (r DeleteV0EndpointsByIdSecurityIpsByIpIdResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r DeleteV0EndpointsByIdSecurityIpsByIpIdResponse) StatusCode() int { +func (r DeleteV0EndpointsByIdSecurityTokensByTokenIdResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } @@ -9687,31 +12433,25 @@ func (r DeleteV0EndpointsByIdSecurityIpsByIpIdResponse) StatusCode() int { } // ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers -func (r DeleteV0EndpointsByIdSecurityIpsByIpIdResponse) ContentType() string { +func (r DeleteV0EndpointsByIdSecurityTokensByTokenIdResponse) ContentType() string { if r.HTTPResponse != nil { return r.HTTPResponse.Header.Get("Content-Type") } return "" } -type PostV0EndpointsByIdSecurityJwtsResponse struct { +type GetV0EndpointsByIdSecurityOptionsResponse struct { Body []byte HTTPResponse *http.Response // JSON200 the response for an HTTP 200 `application/json` response JSON200 *struct { // Data The data object which contains the following fields: Data *struct { - // Id A unique identifier for the JWT configuration - Id *string `json:"id,omitempty"` - - // Kid The key identifier (KID) associated with the public key - Kid *string `json:"kid,omitempty"` - - // Name A human-readable name for the JWT configuration - Name *string `json:"name,omitempty"` + // Option Represents the security options + Option *string `json:"option,omitempty"` - // PublicKey The public key used to verify the JWT token - PublicKey *string `json:"public_key,omitempty"` + // Status Indicates the status of the option. Possible values: enabled, disabled + Status *string `json:"status,omitempty"` } `json:"data,omitempty"` // Error A field containing an error message if any issue occurs @@ -9720,20 +12460,14 @@ type PostV0EndpointsByIdSecurityJwtsResponse struct { } // GetJSON200 returns the response for an HTTP 200 `application/json` response -func (r PostV0EndpointsByIdSecurityJwtsResponse) GetJSON200() *struct { +func (r GetV0EndpointsByIdSecurityOptionsResponse) GetJSON200() *struct { // Data The data object which contains the following fields: Data *struct { - // Id A unique identifier for the JWT configuration - Id *string `json:"id,omitempty"` - - // Kid The key identifier (KID) associated with the public key - Kid *string `json:"kid,omitempty"` - - // Name A human-readable name for the JWT configuration - Name *string `json:"name,omitempty"` + // Option Represents the security options + Option *string `json:"option,omitempty"` - // PublicKey The public key used to verify the JWT token - PublicKey *string `json:"public_key,omitempty"` + // Status Indicates the status of the option. Possible values: enabled, disabled + Status *string `json:"status,omitempty"` } `json:"data,omitempty"` // Error A field containing an error message if any issue occurs @@ -9743,12 +12477,12 @@ func (r PostV0EndpointsByIdSecurityJwtsResponse) GetJSON200() *struct { } // GetBody returns the raw response body bytes -func (r PostV0EndpointsByIdSecurityJwtsResponse) GetBody() []byte { +func (r GetV0EndpointsByIdSecurityOptionsResponse) GetBody() []byte { return r.Body } // Status returns HTTPResponse.Status -func (r PostV0EndpointsByIdSecurityJwtsResponse) Status() string { +func (r GetV0EndpointsByIdSecurityOptionsResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -9756,7 +12490,7 @@ func (r PostV0EndpointsByIdSecurityJwtsResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r PostV0EndpointsByIdSecurityJwtsResponse) StatusCode() int { +func (r GetV0EndpointsByIdSecurityOptionsResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } @@ -9764,20 +12498,22 @@ func (r PostV0EndpointsByIdSecurityJwtsResponse) StatusCode() int { } // ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers -func (r PostV0EndpointsByIdSecurityJwtsResponse) ContentType() string { +func (r GetV0EndpointsByIdSecurityOptionsResponse) ContentType() string { if r.HTTPResponse != nil { return r.HTTPResponse.Header.Get("Content-Type") } return "" } -type DeleteV0EndpointsByIdSecurityJwtsByJwtIdResponse struct { +type PatchV0EndpointsByIdSecurityOptionsResponse struct { Body []byte HTTPResponse *http.Response // JSON200 the response for an HTTP 200 `application/json` response JSON200 *struct { - // Data Represent successfully deleted the existing endpoint jwt - Data *bool `json:"data,omitempty"` + Data *[]struct { + Option *string `json:"option,omitempty"` + Status *string `json:"status,omitempty"` + } `json:"data,omitempty"` // Error A field containing an error message if any issue occurs Error *string `json:"error,omitempty"` @@ -9785,9 +12521,11 @@ type DeleteV0EndpointsByIdSecurityJwtsByJwtIdResponse struct { } // GetJSON200 returns the response for an HTTP 200 `application/json` response -func (r DeleteV0EndpointsByIdSecurityJwtsByJwtIdResponse) GetJSON200() *struct { - // Data Represent successfully deleted the existing endpoint jwt - Data *bool `json:"data,omitempty"` +func (r PatchV0EndpointsByIdSecurityOptionsResponse) GetJSON200() *struct { + Data *[]struct { + Option *string `json:"option,omitempty"` + Status *string `json:"status,omitempty"` + } `json:"data,omitempty"` // Error A field containing an error message if any issue occurs Error *string `json:"error,omitempty"` @@ -9796,12 +12534,12 @@ func (r DeleteV0EndpointsByIdSecurityJwtsByJwtIdResponse) GetJSON200() *struct { } // GetBody returns the raw response body bytes -func (r DeleteV0EndpointsByIdSecurityJwtsByJwtIdResponse) GetBody() []byte { +func (r PatchV0EndpointsByIdSecurityOptionsResponse) GetBody() []byte { return r.Body } // Status returns HTTPResponse.Status -func (r DeleteV0EndpointsByIdSecurityJwtsByJwtIdResponse) Status() string { +func (r PatchV0EndpointsByIdSecurityOptionsResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -9809,7 +12547,7 @@ func (r DeleteV0EndpointsByIdSecurityJwtsByJwtIdResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r DeleteV0EndpointsByIdSecurityJwtsByJwtIdResponse) StatusCode() int { +func (r PatchV0EndpointsByIdSecurityOptionsResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } @@ -9817,56 +12555,44 @@ func (r DeleteV0EndpointsByIdSecurityJwtsByJwtIdResponse) StatusCode() int { } // ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers -func (r DeleteV0EndpointsByIdSecurityJwtsByJwtIdResponse) ContentType() string { +func (r PatchV0EndpointsByIdSecurityOptionsResponse) ContentType() string { if r.HTTPResponse != nil { return r.HTTPResponse.Header.Get("Content-Type") } return "" } -type PostV0EndpointsByIdSecurityReferrersResponse struct { +type PatchV0EndpointsByIdStatusResponse struct { Body []byte HTTPResponse *http.Response // JSON200 the response for an HTTP 200 `application/json` response JSON200 *struct { - // Data The data object which contains the following fields: - Data *struct { - // Id A unique identifier for the referrer - Id *string `json:"id,omitempty"` - - // Referrer The URL or domain that is allowed to access the specific API endpoint. Only requests coming from this referrer will be permitted - Referrer *string `json:"referrer,omitempty"` - } `json:"data,omitempty"` + // Data The updated status of the endpoint (either 'active' or 'paused') + Data *string `json:"data,omitempty"` - // Error A field containing an error message if any issue occurs + // Error Contains error details if the request failed; null if successful Error *string `json:"error,omitempty"` } } // GetJSON200 returns the response for an HTTP 200 `application/json` response -func (r PostV0EndpointsByIdSecurityReferrersResponse) GetJSON200() *struct { - // Data The data object which contains the following fields: - Data *struct { - // Id A unique identifier for the referrer - Id *string `json:"id,omitempty"` - - // Referrer The URL or domain that is allowed to access the specific API endpoint. Only requests coming from this referrer will be permitted - Referrer *string `json:"referrer,omitempty"` - } `json:"data,omitempty"` +func (r PatchV0EndpointsByIdStatusResponse) GetJSON200() *struct { + // Data The updated status of the endpoint (either 'active' or 'paused') + Data *string `json:"data,omitempty"` - // Error A field containing an error message if any issue occurs + // Error Contains error details if the request failed; null if successful Error *string `json:"error,omitempty"` } { return r.JSON200 } // GetBody returns the raw response body bytes -func (r PostV0EndpointsByIdSecurityReferrersResponse) GetBody() []byte { +func (r PatchV0EndpointsByIdStatusResponse) GetBody() []byte { return r.Body } // Status returns HTTPResponse.Status -func (r PostV0EndpointsByIdSecurityReferrersResponse) Status() string { +func (r PatchV0EndpointsByIdStatusResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -9874,7 +12600,7 @@ func (r PostV0EndpointsByIdSecurityReferrersResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r PostV0EndpointsByIdSecurityReferrersResponse) StatusCode() int { +func (r PatchV0EndpointsByIdStatusResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } @@ -9882,103 +12608,92 @@ func (r PostV0EndpointsByIdSecurityReferrersResponse) StatusCode() int { } // ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers -func (r PostV0EndpointsByIdSecurityReferrersResponse) ContentType() string { +func (r PatchV0EndpointsByIdStatusResponse) ContentType() string { if r.HTTPResponse != nil { return r.HTTPResponse.Header.Get("Content-Type") } return "" } -type DeleteV0EndpointsByIdSecurityReferrersByReferrerIdResponse struct { +type GetV0EndpointsByIdTagsResponse struct { Body []byte HTTPResponse *http.Response // JSON200 the response for an HTTP 200 `application/json` response JSON200 *struct { - // Data Represent successfully deleted the existing endpoint referrer - Data *bool `json:"data,omitempty"` - - // Error A field containing an error message if any issue occurs - Error *string `json:"error,omitempty"` - } -} - -// GetJSON200 returns the response for an HTTP 200 `application/json` response -func (r DeleteV0EndpointsByIdSecurityReferrersByReferrerIdResponse) GetJSON200() *struct { - // Data Represent successfully deleted the existing endpoint referrer - Data *bool `json:"data,omitempty"` + // Data The data object which contains the following fields: + Data *struct { + // Tags An array of tags associated with the endpoint + Tags *[]struct { + // AccountId The account identifier associated with the tag + AccountId *int `json:"account_id,omitempty"` - // Error A field containing an error message if any issue occurs - Error *string `json:"error,omitempty"` -} { - return r.JSON200 -} + // CreatedAt The timestamp when the tag was created + CreatedAt *string `json:"created_at,omitempty"` -// GetBody returns the raw response body bytes -func (r DeleteV0EndpointsByIdSecurityReferrersByReferrerIdResponse) GetBody() []byte { - return r.Body -} + // EndpointId The endpoint identifier associated with the tag + EndpointId *int `json:"endpoint_id,omitempty"` -// Status returns HTTPResponse.Status -func (r DeleteV0EndpointsByIdSecurityReferrersByReferrerIdResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} + // Id The unique identifier for the endpoint-tag relationship + Id *int `json:"id,omitempty"` -// StatusCode returns HTTPResponse.StatusCode -func (r DeleteV0EndpointsByIdSecurityReferrersByReferrerIdResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} + // Label The label/name of the tag + Label *string `json:"label,omitempty"` -// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers -func (r DeleteV0EndpointsByIdSecurityReferrersByReferrerIdResponse) ContentType() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Header.Get("Content-Type") - } - return "" -} + // TagId The unique identifier for the tag + TagId *int `json:"tag_id,omitempty"` -type PostV0EndpointsByIdSecurityRequestFiltersResponse struct { - Body []byte - HTTPResponse *http.Response - // JSON200 the response for an HTTP 200 `application/json` response - JSON200 *struct { - // Data Contains the created request filter details - Data *struct { - // Id The unique identifier (UUID) of the newly created request filter - Id *string `json:"id,omitempty"` + // UpdatedAt The timestamp when the tag was last updated + UpdatedAt *string `json:"updated_at,omitempty"` + } `json:"tags,omitempty"` } `json:"data,omitempty"` - // Error Contains error details if the request failed; null if successful + // Error Contains error information, if any Error *string `json:"error,omitempty"` } } // GetJSON200 returns the response for an HTTP 200 `application/json` response -func (r PostV0EndpointsByIdSecurityRequestFiltersResponse) GetJSON200() *struct { - // Data Contains the created request filter details +func (r GetV0EndpointsByIdTagsResponse) GetJSON200() *struct { + // Data The data object which contains the following fields: Data *struct { - // Id The unique identifier (UUID) of the newly created request filter - Id *string `json:"id,omitempty"` + // Tags An array of tags associated with the endpoint + Tags *[]struct { + // AccountId The account identifier associated with the tag + AccountId *int `json:"account_id,omitempty"` + + // CreatedAt The timestamp when the tag was created + CreatedAt *string `json:"created_at,omitempty"` + + // EndpointId The endpoint identifier associated with the tag + EndpointId *int `json:"endpoint_id,omitempty"` + + // Id The unique identifier for the endpoint-tag relationship + Id *int `json:"id,omitempty"` + + // Label The label/name of the tag + Label *string `json:"label,omitempty"` + + // TagId The unique identifier for the tag + TagId *int `json:"tag_id,omitempty"` + + // UpdatedAt The timestamp when the tag was last updated + UpdatedAt *string `json:"updated_at,omitempty"` + } `json:"tags,omitempty"` } `json:"data,omitempty"` - // Error Contains error details if the request failed; null if successful + // Error Contains error information, if any Error *string `json:"error,omitempty"` } { return r.JSON200 } // GetBody returns the raw response body bytes -func (r PostV0EndpointsByIdSecurityRequestFiltersResponse) GetBody() []byte { +func (r GetV0EndpointsByIdTagsResponse) GetBody() []byte { return r.Body } // Status returns HTTPResponse.Status -func (r PostV0EndpointsByIdSecurityRequestFiltersResponse) Status() string { +func (r GetV0EndpointsByIdTagsResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -9986,7 +12701,7 @@ func (r PostV0EndpointsByIdSecurityRequestFiltersResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r PostV0EndpointsByIdSecurityRequestFiltersResponse) StatusCode() int { +func (r GetV0EndpointsByIdTagsResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } @@ -9994,25 +12709,92 @@ func (r PostV0EndpointsByIdSecurityRequestFiltersResponse) StatusCode() int { } // ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers -func (r PostV0EndpointsByIdSecurityRequestFiltersResponse) ContentType() string { +func (r GetV0EndpointsByIdTagsResponse) ContentType() string { if r.HTTPResponse != nil { return r.HTTPResponse.Header.Get("Content-Type") } return "" } -type DeleteV0EndpointsByIdSecurityRequestFiltersByRequestFilterIdResponse struct { +type PostV0EndpointsByIdTagsResponse struct { Body []byte HTTPResponse *http.Response + // JSON200 the response for an HTTP 200 `application/json` response + JSON200 *struct { + // Data The data object which contains the following fields: + Data *struct { + // Tags An array containing the newly created tag + Tags *[]struct { + // AccountId The account identifier associated with the tag + AccountId *int `json:"account_id,omitempty"` + + // CreatedAt The timestamp when the tag was created + CreatedAt *string `json:"created_at,omitempty"` + + // EndpointId The endpoint identifier associated with the tag + EndpointId *int `json:"endpoint_id,omitempty"` + + // Id The unique identifier for the endpoint-tag relationship + Id *int `json:"id,omitempty"` + + // Label The label/name of the newly created tag + Label *string `json:"label,omitempty"` + + // TagId The unique identifier for the newly created tag + TagId *int `json:"tag_id,omitempty"` + + // UpdatedAt The timestamp when the tag was last updated + UpdatedAt *string `json:"updated_at,omitempty"` + } `json:"tags,omitempty"` + } `json:"data,omitempty"` + + // Error Contains error information, if any + Error *string `json:"error,omitempty"` + } +} + +// GetJSON200 returns the response for an HTTP 200 `application/json` response +func (r PostV0EndpointsByIdTagsResponse) GetJSON200() *struct { + // Data The data object which contains the following fields: + Data *struct { + // Tags An array containing the newly created tag + Tags *[]struct { + // AccountId The account identifier associated with the tag + AccountId *int `json:"account_id,omitempty"` + + // CreatedAt The timestamp when the tag was created + CreatedAt *string `json:"created_at,omitempty"` + + // EndpointId The endpoint identifier associated with the tag + EndpointId *int `json:"endpoint_id,omitempty"` + + // Id The unique identifier for the endpoint-tag relationship + Id *int `json:"id,omitempty"` + + // Label The label/name of the newly created tag + Label *string `json:"label,omitempty"` + + // TagId The unique identifier for the newly created tag + TagId *int `json:"tag_id,omitempty"` + + // UpdatedAt The timestamp when the tag was last updated + UpdatedAt *string `json:"updated_at,omitempty"` + } `json:"tags,omitempty"` + } `json:"data,omitempty"` + + // Error Contains error information, if any + Error *string `json:"error,omitempty"` +} { + return r.JSON200 } // GetBody returns the raw response body bytes -func (r DeleteV0EndpointsByIdSecurityRequestFiltersByRequestFilterIdResponse) GetBody() []byte { +func (r PostV0EndpointsByIdTagsResponse) GetBody() []byte { return r.Body } // Status returns HTTPResponse.Status -func (r DeleteV0EndpointsByIdSecurityRequestFiltersByRequestFilterIdResponse) Status() string { +func (r PostV0EndpointsByIdTagsResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -10020,7 +12802,7 @@ func (r DeleteV0EndpointsByIdSecurityRequestFiltersByRequestFilterIdResponse) St } // StatusCode returns HTTPResponse.StatusCode -func (r DeleteV0EndpointsByIdSecurityRequestFiltersByRequestFilterIdResponse) StatusCode() int { +func (r PostV0EndpointsByIdTagsResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } @@ -10028,25 +12810,50 @@ func (r DeleteV0EndpointsByIdSecurityRequestFiltersByRequestFilterIdResponse) St } // ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers -func (r DeleteV0EndpointsByIdSecurityRequestFiltersByRequestFilterIdResponse) ContentType() string { +func (r PostV0EndpointsByIdTagsResponse) ContentType() string { if r.HTTPResponse != nil { return r.HTTPResponse.Header.Get("Content-Type") } return "" } -type PutV0EndpointsByIdSecurityRequestFiltersByRequestFilterIdResponse struct { +type DeleteV0EndpointsByIdTagsByTagIdResponse struct { Body []byte HTTPResponse *http.Response + // JSON200 the response for an HTTP 200 `application/json` response + JSON200 *struct { + // Data Contains the result of the tag deletion + Data *struct { + // Success Whether the tag was successfully deleted from the endpoint + Success *bool `json:"success,omitempty"` + } `json:"data,omitempty"` + + // Error Contains error details if the request failed; null if successful + Error *string `json:"error,omitempty"` + } +} + +// GetJSON200 returns the response for an HTTP 200 `application/json` response +func (r DeleteV0EndpointsByIdTagsByTagIdResponse) GetJSON200() *struct { + // Data Contains the result of the tag deletion + Data *struct { + // Success Whether the tag was successfully deleted from the endpoint + Success *bool `json:"success,omitempty"` + } `json:"data,omitempty"` + + // Error Contains error details if the request failed; null if successful + Error *string `json:"error,omitempty"` +} { + return r.JSON200 } // GetBody returns the raw response body bytes -func (r PutV0EndpointsByIdSecurityRequestFiltersByRequestFilterIdResponse) GetBody() []byte { +func (r DeleteV0EndpointsByIdTagsByTagIdResponse) GetBody() []byte { return r.Body } // Status returns HTTPResponse.Status -func (r PutV0EndpointsByIdSecurityRequestFiltersByRequestFilterIdResponse) Status() string { +func (r DeleteV0EndpointsByIdTagsByTagIdResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -10054,7 +12861,7 @@ func (r PutV0EndpointsByIdSecurityRequestFiltersByRequestFilterIdResponse) Statu } // StatusCode returns HTTPResponse.StatusCode -func (r PutV0EndpointsByIdSecurityRequestFiltersByRequestFilterIdResponse) StatusCode() int { +func (r DeleteV0EndpointsByIdTagsByTagIdResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } @@ -10062,56 +12869,68 @@ func (r PutV0EndpointsByIdSecurityRequestFiltersByRequestFilterIdResponse) Statu } // ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers -func (r PutV0EndpointsByIdSecurityRequestFiltersByRequestFilterIdResponse) ContentType() string { +func (r DeleteV0EndpointsByIdTagsByTagIdResponse) ContentType() string { if r.HTTPResponse != nil { return r.HTTPResponse.Header.Get("Content-Type") } return "" } -type PostV0EndpointsByIdSecurityTokensResponse struct { +type GetV0EndpointsByIdUrlsResponse struct { Body []byte HTTPResponse *http.Response // JSON200 the response for an HTTP 200 `application/json` response JSON200 *struct { // Data The data object which contains the following fields: Data *struct { - // Id A unique identifier for the token - Id *string `json:"id,omitempty"` + // HttpUrl The HTTP URL to access the endpoint + HttpUrl *string `json:"http_url,omitempty"` - // Token The generated token string used for authentication - Token *string `json:"token,omitempty"` + // MultichainUrls Only present for multichain endpoints. Keyed by network slug, each value holds the network's HTTP and WebSocket URLs. + MultichainUrls *map[string]struct { + HttpUrl *string `json:"http_url,omitempty"` + WssUrl *string `json:"wss_url,omitempty"` + } `json:"multichain_urls,omitempty"` + + // WssUrl The WebSocket URL to access the endpoint + WssUrl *string `json:"wss_url,omitempty"` } `json:"data,omitempty"` - // Error A field containing an error message if any issue occurs + // Error Contains error information, if any Error *string `json:"error,omitempty"` } } // GetJSON200 returns the response for an HTTP 200 `application/json` response -func (r PostV0EndpointsByIdSecurityTokensResponse) GetJSON200() *struct { +func (r GetV0EndpointsByIdUrlsResponse) GetJSON200() *struct { // Data The data object which contains the following fields: Data *struct { - // Id A unique identifier for the token - Id *string `json:"id,omitempty"` + // HttpUrl The HTTP URL to access the endpoint + HttpUrl *string `json:"http_url,omitempty"` - // Token The generated token string used for authentication - Token *string `json:"token,omitempty"` + // MultichainUrls Only present for multichain endpoints. Keyed by network slug, each value holds the network's HTTP and WebSocket URLs. + MultichainUrls *map[string]struct { + HttpUrl *string `json:"http_url,omitempty"` + WssUrl *string `json:"wss_url,omitempty"` + } `json:"multichain_urls,omitempty"` + + // WssUrl The WebSocket URL to access the endpoint + WssUrl *string `json:"wss_url,omitempty"` } `json:"data,omitempty"` - // Error A field containing an error message if any issue occurs + // Error Contains error information, if any Error *string `json:"error,omitempty"` } { return r.JSON200 } // GetBody returns the raw response body bytes -func (r PostV0EndpointsByIdSecurityTokensResponse) GetBody() []byte { +func (r GetV0EndpointsByIdUrlsResponse) GetBody() []byte { return r.Body } // Status returns HTTPResponse.Status -func (r PostV0EndpointsByIdSecurityTokensResponse) Status() string { +func (r GetV0EndpointsByIdUrlsResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -10119,7 +12938,7 @@ func (r PostV0EndpointsByIdSecurityTokensResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r PostV0EndpointsByIdSecurityTokensResponse) StatusCode() int { +func (r GetV0EndpointsByIdUrlsResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } @@ -10127,44 +12946,56 @@ func (r PostV0EndpointsByIdSecurityTokensResponse) StatusCode() int { } // ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers -func (r PostV0EndpointsByIdSecurityTokensResponse) ContentType() string { +func (r GetV0EndpointsByIdUrlsResponse) ContentType() string { if r.HTTPResponse != nil { return r.HTTPResponse.Header.Get("Content-Type") } return "" } -type DeleteV0EndpointsByIdSecurityTokensByTokenIdResponse struct { +type GetV0MetricsResponse struct { Body []byte HTTPResponse *http.Response // JSON200 the response for an HTTP 200 `application/json` response JSON200 *struct { - // Data Represent successfully deleted the existing endpoint token - Data *bool `json:"data,omitempty"` + // Data An array of metric objects, each containing a tag and its associated data points + Data *[]struct { + // Data An array of [timestamp, value] pairs representing the metric data points + Data *[]interface{} `json:"data,omitempty"` - // Error A field containing an error message if any issue occurs + // Tag An array of strings identifying the metric group (e.g., network name) + Tag *[]interface{} `json:"tag,omitempty"` + } `json:"data,omitempty"` + + // Error Contains error details if the request failed; null if successful Error *string `json:"error,omitempty"` } } // GetJSON200 returns the response for an HTTP 200 `application/json` response -func (r DeleteV0EndpointsByIdSecurityTokensByTokenIdResponse) GetJSON200() *struct { - // Data Represent successfully deleted the existing endpoint token - Data *bool `json:"data,omitempty"` +func (r GetV0MetricsResponse) GetJSON200() *struct { + // Data An array of metric objects, each containing a tag and its associated data points + Data *[]struct { + // Data An array of [timestamp, value] pairs representing the metric data points + Data *[]interface{} `json:"data,omitempty"` - // Error A field containing an error message if any issue occurs + // Tag An array of strings identifying the metric group (e.g., network name) + Tag *[]interface{} `json:"tag,omitempty"` + } `json:"data,omitempty"` + + // Error Contains error details if the request failed; null if successful Error *string `json:"error,omitempty"` } { return r.JSON200 } // GetBody returns the raw response body bytes -func (r DeleteV0EndpointsByIdSecurityTokensByTokenIdResponse) GetBody() []byte { +func (r GetV0MetricsResponse) GetBody() []byte { return r.Body } // Status returns HTTPResponse.Status -func (r DeleteV0EndpointsByIdSecurityTokensByTokenIdResponse) Status() string { +func (r GetV0MetricsResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -10172,7 +13003,7 @@ func (r DeleteV0EndpointsByIdSecurityTokensByTokenIdResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r DeleteV0EndpointsByIdSecurityTokensByTokenIdResponse) StatusCode() int { +func (r GetV0MetricsResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } @@ -10180,56 +13011,104 @@ func (r DeleteV0EndpointsByIdSecurityTokensByTokenIdResponse) StatusCode() int { } // ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers -func (r DeleteV0EndpointsByIdSecurityTokensByTokenIdResponse) ContentType() string { +func (r GetV0MetricsResponse) ContentType() string { if r.HTTPResponse != nil { return r.HTTPResponse.Header.Get("Content-Type") } return "" } -type GetV0EndpointsByIdSecurityOptionsResponse struct { +type PostV0MetricsErrorsSummaryResponse struct { Body []byte HTTPResponse *http.Response // JSON200 the response for an HTTP 200 `application/json` response JSON200 *struct { - // Data The data object which contains the following fields: + // Data Response data. Null when the request fails. Data *struct { - // Option Represents the security options - Option *string `json:"option,omitempty"` + // Breakdown Grouped results. Present when grouping is requested; can be empty. + Breakdown *[]struct { + // Count Number of errors in this group. + Count *float32 `json:"count,omitempty"` - // Status Indicates the status of the option. Possible values: enabled, disabled - Status *string `json:"status,omitempty"` + // Kind Error kind: rpc or http. + Kind *string `json:"kind,omitempty"` + + // Method RPC method name. In a breakdown, present when grouping by method. + Method *string `json:"method,omitempty"` + } `json:"breakdown,omitempty"` + + // From Effective start of the returned time range, in ISO 8601 format. + From *string `json:"from,omitempty"` + + // NextCursor Opaque continuation cursor. Present when another page is available. Pass it unchanged as cursor. + NextCursor *string `json:"next_cursor,omitempty"` + + // To Effective end of the returned time range, in ISO 8601 format. + To *string `json:"to,omitempty"` + + // Totals Aggregate totals for the selected time range. + Totals *struct { + // HttpErrors Number of HTTP errors. + HttpErrors *float32 `json:"http_errors,omitempty"` + + // RpcErrors Number of RPC errors. + RpcErrors *float32 `json:"rpc_errors,omitempty"` + } `json:"totals,omitempty"` } `json:"data,omitempty"` - // Error A field containing an error message if any issue occurs + // Error Error message on failure; null on success. Error *string `json:"error,omitempty"` } } // GetJSON200 returns the response for an HTTP 200 `application/json` response -func (r GetV0EndpointsByIdSecurityOptionsResponse) GetJSON200() *struct { - // Data The data object which contains the following fields: +func (r PostV0MetricsErrorsSummaryResponse) GetJSON200() *struct { + // Data Response data. Null when the request fails. Data *struct { - // Option Represents the security options - Option *string `json:"option,omitempty"` + // Breakdown Grouped results. Present when grouping is requested; can be empty. + Breakdown *[]struct { + // Count Number of errors in this group. + Count *float32 `json:"count,omitempty"` - // Status Indicates the status of the option. Possible values: enabled, disabled - Status *string `json:"status,omitempty"` + // Kind Error kind: rpc or http. + Kind *string `json:"kind,omitempty"` + + // Method RPC method name. In a breakdown, present when grouping by method. + Method *string `json:"method,omitempty"` + } `json:"breakdown,omitempty"` + + // From Effective start of the returned time range, in ISO 8601 format. + From *string `json:"from,omitempty"` + + // NextCursor Opaque continuation cursor. Present when another page is available. Pass it unchanged as cursor. + NextCursor *string `json:"next_cursor,omitempty"` + + // To Effective end of the returned time range, in ISO 8601 format. + To *string `json:"to,omitempty"` + + // Totals Aggregate totals for the selected time range. + Totals *struct { + // HttpErrors Number of HTTP errors. + HttpErrors *float32 `json:"http_errors,omitempty"` + + // RpcErrors Number of RPC errors. + RpcErrors *float32 `json:"rpc_errors,omitempty"` + } `json:"totals,omitempty"` } `json:"data,omitempty"` - // Error A field containing an error message if any issue occurs + // Error Error message on failure; null on success. Error *string `json:"error,omitempty"` } { return r.JSON200 } // GetBody returns the raw response body bytes -func (r GetV0EndpointsByIdSecurityOptionsResponse) GetBody() []byte { +func (r PostV0MetricsErrorsSummaryResponse) GetBody() []byte { return r.Body } // Status returns HTTPResponse.Status -func (r GetV0EndpointsByIdSecurityOptionsResponse) Status() string { +func (r PostV0MetricsErrorsSummaryResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -10237,7 +13116,7 @@ func (r GetV0EndpointsByIdSecurityOptionsResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r GetV0EndpointsByIdSecurityOptionsResponse) StatusCode() int { +func (r PostV0MetricsErrorsSummaryResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } @@ -10245,48 +13124,158 @@ func (r GetV0EndpointsByIdSecurityOptionsResponse) StatusCode() int { } // ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers -func (r GetV0EndpointsByIdSecurityOptionsResponse) ContentType() string { +func (r PostV0MetricsErrorsSummaryResponse) ContentType() string { if r.HTTPResponse != nil { return r.HTTPResponse.Header.Get("Content-Type") } return "" } -type PatchV0EndpointsByIdSecurityOptionsResponse struct { +type PostV0MetricsTrafficSummaryResponse struct { Body []byte HTTPResponse *http.Response // JSON200 the response for an HTTP 200 `application/json` response JSON200 *struct { - Data *[]struct { - Option *string `json:"option,omitempty"` - Status *string `json:"status,omitempty"` + // Data Response data. Null when the request fails. + Data *struct { + // Breakdown Grouped results. Present when grouping is requested; can be empty. + Breakdown *[]struct { + // ActiveMethods Number of distinct active methods. + ActiveMethods *int `json:"active_methods,omitempty"` + + // Bytes Number of bytes transferred. + Bytes *int `json:"bytes,omitempty"` + + // BytesCredits Credits consumed by transferred bytes. + BytesCredits *int `json:"bytes_credits,omitempty"` + + // Credits Total API credits consumed. + Credits *int `json:"credits,omitempty"` + + // Endpoint Endpoint UUID; present when grouping by endpoint. + Endpoint *string `json:"endpoint,omitempty"` + + // Method RPC method name. In a breakdown, present when grouping by method. + Method *string `json:"method,omitempty"` + + // RequestCredits Credits consumed by requests. + RequestCredits *int `json:"request_credits,omitempty"` + + // SuccessfulRequests Number of successful requests. + SuccessfulRequests *int `json:"successful_requests,omitempty"` + } `json:"breakdown,omitempty"` + + // From Effective start of the returned time range, in ISO 8601 format. + From *string `json:"from,omitempty"` + + // NextCursor Opaque continuation cursor. Present when another page is available. Pass it unchanged as cursor. + NextCursor *string `json:"next_cursor,omitempty"` + + // To Effective end of the returned time range, in ISO 8601 format. + To *string `json:"to,omitempty"` + + // Totals Aggregate totals for the selected time range. + Totals *struct { + // ActiveMethods Number of distinct active methods. + ActiveMethods *int `json:"active_methods,omitempty"` + + // Bytes Number of bytes transferred. + Bytes *int `json:"bytes,omitempty"` + + // BytesCredits Credits consumed by transferred bytes. + BytesCredits *int `json:"bytes_credits,omitempty"` + + // Credits Total API credits consumed. + Credits *int `json:"credits,omitempty"` + + // RequestCredits Credits consumed by requests. + RequestCredits *int `json:"request_credits,omitempty"` + + // SuccessfulRequests Number of successful requests. + SuccessfulRequests *int `json:"successful_requests,omitempty"` + } `json:"totals,omitempty"` } `json:"data,omitempty"` - // Error A field containing an error message if any issue occurs + // Error Error message on failure; null on success. Error *string `json:"error,omitempty"` } } // GetJSON200 returns the response for an HTTP 200 `application/json` response -func (r PatchV0EndpointsByIdSecurityOptionsResponse) GetJSON200() *struct { - Data *[]struct { - Option *string `json:"option,omitempty"` - Status *string `json:"status,omitempty"` +func (r PostV0MetricsTrafficSummaryResponse) GetJSON200() *struct { + // Data Response data. Null when the request fails. + Data *struct { + // Breakdown Grouped results. Present when grouping is requested; can be empty. + Breakdown *[]struct { + // ActiveMethods Number of distinct active methods. + ActiveMethods *int `json:"active_methods,omitempty"` + + // Bytes Number of bytes transferred. + Bytes *int `json:"bytes,omitempty"` + + // BytesCredits Credits consumed by transferred bytes. + BytesCredits *int `json:"bytes_credits,omitempty"` + + // Credits Total API credits consumed. + Credits *int `json:"credits,omitempty"` + + // Endpoint Endpoint UUID; present when grouping by endpoint. + Endpoint *string `json:"endpoint,omitempty"` + + // Method RPC method name. In a breakdown, present when grouping by method. + Method *string `json:"method,omitempty"` + + // RequestCredits Credits consumed by requests. + RequestCredits *int `json:"request_credits,omitempty"` + + // SuccessfulRequests Number of successful requests. + SuccessfulRequests *int `json:"successful_requests,omitempty"` + } `json:"breakdown,omitempty"` + + // From Effective start of the returned time range, in ISO 8601 format. + From *string `json:"from,omitempty"` + + // NextCursor Opaque continuation cursor. Present when another page is available. Pass it unchanged as cursor. + NextCursor *string `json:"next_cursor,omitempty"` + + // To Effective end of the returned time range, in ISO 8601 format. + To *string `json:"to,omitempty"` + + // Totals Aggregate totals for the selected time range. + Totals *struct { + // ActiveMethods Number of distinct active methods. + ActiveMethods *int `json:"active_methods,omitempty"` + + // Bytes Number of bytes transferred. + Bytes *int `json:"bytes,omitempty"` + + // BytesCredits Credits consumed by transferred bytes. + BytesCredits *int `json:"bytes_credits,omitempty"` + + // Credits Total API credits consumed. + Credits *int `json:"credits,omitempty"` + + // RequestCredits Credits consumed by requests. + RequestCredits *int `json:"request_credits,omitempty"` + + // SuccessfulRequests Number of successful requests. + SuccessfulRequests *int `json:"successful_requests,omitempty"` + } `json:"totals,omitempty"` } `json:"data,omitempty"` - // Error A field containing an error message if any issue occurs + // Error Error message on failure; null on success. Error *string `json:"error,omitempty"` } { return r.JSON200 } // GetBody returns the raw response body bytes -func (r PatchV0EndpointsByIdSecurityOptionsResponse) GetBody() []byte { +func (r PostV0MetricsTrafficSummaryResponse) GetBody() []byte { return r.Body } // Status returns HTTPResponse.Status -func (r PatchV0EndpointsByIdSecurityOptionsResponse) Status() string { +func (r PostV0MetricsTrafficSummaryResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -10294,7 +13283,7 @@ func (r PatchV0EndpointsByIdSecurityOptionsResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r PatchV0EndpointsByIdSecurityOptionsResponse) StatusCode() int { +func (r PostV0MetricsTrafficSummaryResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } @@ -10302,44 +13291,104 @@ func (r PatchV0EndpointsByIdSecurityOptionsResponse) StatusCode() int { } // ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers -func (r PatchV0EndpointsByIdSecurityOptionsResponse) ContentType() string { +func (r PostV0MetricsTrafficSummaryResponse) ContentType() string { if r.HTTPResponse != nil { return r.HTTPResponse.Header.Get("Content-Type") } return "" } -type PatchV0EndpointsByIdStatusResponse struct { +type GetV0TeamsResponse struct { Body []byte HTTPResponse *http.Response // JSON200 the response for an HTTP 200 `application/json` response JSON200 *struct { - // Data The updated status of the endpoint (either 'active' or 'paused') - Data *string `json:"data,omitempty"` + // Data An array of team objects containing the following fields: + Data *[]struct { + // Id A unique identifier for the team + Id *int `json:"id,omitempty"` - // Error Contains error details if the request failed; null if successful - Error *string `json:"error,omitempty"` + // MembersCount The number of members in the team + MembersCount *int `json:"members_count,omitempty"` + + // Name The name of the team + Name *string `json:"name,omitempty"` + + // Users An array of user objects in the team + Users *[]struct { + // CreatedAt The timestamp when the user was added to the team + CreatedAt *string `json:"created_at,omitempty"` + + // Email The email address of the user + Email *string `json:"email,omitempty"` + + // FullName The full name of the user + FullName *string `json:"full_name,omitempty"` + + // Id A unique identifier for the user + Id *int `json:"id,omitempty"` + + // PhotoUrl The URL of the user's profile photo + PhotoUrl *string `json:"photo_url,omitempty"` + + // Role The role of the user in the team (admin, viewer, or billing) + Role *string `json:"role,omitempty"` + + // Status The status of the user (e.g., Active, Pending) + Status *string `json:"status,omitempty"` + } `json:"users,omitempty"` + } `json:"data,omitempty"` } } // GetJSON200 returns the response for an HTTP 200 `application/json` response -func (r PatchV0EndpointsByIdStatusResponse) GetJSON200() *struct { - // Data The updated status of the endpoint (either 'active' or 'paused') - Data *string `json:"data,omitempty"` +func (r GetV0TeamsResponse) GetJSON200() *struct { + // Data An array of team objects containing the following fields: + Data *[]struct { + // Id A unique identifier for the team + Id *int `json:"id,omitempty"` - // Error Contains error details if the request failed; null if successful - Error *string `json:"error,omitempty"` + // MembersCount The number of members in the team + MembersCount *int `json:"members_count,omitempty"` + + // Name The name of the team + Name *string `json:"name,omitempty"` + + // Users An array of user objects in the team + Users *[]struct { + // CreatedAt The timestamp when the user was added to the team + CreatedAt *string `json:"created_at,omitempty"` + + // Email The email address of the user + Email *string `json:"email,omitempty"` + + // FullName The full name of the user + FullName *string `json:"full_name,omitempty"` + + // Id A unique identifier for the user + Id *int `json:"id,omitempty"` + + // PhotoUrl The URL of the user's profile photo + PhotoUrl *string `json:"photo_url,omitempty"` + + // Role The role of the user in the team (admin, viewer, or billing) + Role *string `json:"role,omitempty"` + + // Status The status of the user (e.g., Active, Pending) + Status *string `json:"status,omitempty"` + } `json:"users,omitempty"` + } `json:"data,omitempty"` } { return r.JSON200 } // GetBody returns the raw response body bytes -func (r PatchV0EndpointsByIdStatusResponse) GetBody() []byte { +func (r GetV0TeamsResponse) GetBody() []byte { return r.Body } // Status returns HTTPResponse.Status -func (r PatchV0EndpointsByIdStatusResponse) Status() string { +func (r GetV0TeamsResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -10347,7 +13396,7 @@ func (r PatchV0EndpointsByIdStatusResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r PatchV0EndpointsByIdStatusResponse) StatusCode() int { +func (r GetV0TeamsResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } @@ -10355,92 +13404,68 @@ func (r PatchV0EndpointsByIdStatusResponse) StatusCode() int { } // ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers -func (r PatchV0EndpointsByIdStatusResponse) ContentType() string { +func (r GetV0TeamsResponse) ContentType() string { if r.HTTPResponse != nil { return r.HTTPResponse.Header.Get("Content-Type") } return "" } -type GetV0EndpointsByIdTagsResponse struct { +type PostV0TeamsResponse struct { Body []byte HTTPResponse *http.Response // JSON200 the response for an HTTP 200 `application/json` response JSON200 *struct { - // Data The data object which contains the following fields: + // Data The created team object containing the following fields: Data *struct { - // Tags An array of tags associated with the endpoint - Tags *[]struct { - // AccountId The account identifier associated with the tag - AccountId *int `json:"account_id,omitempty"` - - // CreatedAt The timestamp when the tag was created - CreatedAt *string `json:"created_at,omitempty"` - - // EndpointId The endpoint identifier associated with the tag - EndpointId *int `json:"endpoint_id,omitempty"` - - // Id The unique identifier for the endpoint-tag relationship - Id *int `json:"id,omitempty"` + // DefaultRole The default role assigned to new team members (admin, viewer, or billing) + DefaultRole *string `json:"default_role,omitempty"` - // Label The label/name of the tag - Label *string `json:"label,omitempty"` + // Id A unique identifier for the created team + Id *int `json:"id,omitempty"` - // TagId The unique identifier for the tag - TagId *int `json:"tag_id,omitempty"` + // MembersCount The number of members in the team + MembersCount *int `json:"members_count,omitempty"` - // UpdatedAt The timestamp when the tag was last updated - UpdatedAt *string `json:"updated_at,omitempty"` - } `json:"tags,omitempty"` + // Name The name of the created team + Name *string `json:"name,omitempty"` } `json:"data,omitempty"` - // Error Contains error information, if any + // Error An error message if any issue occurs Error *string `json:"error,omitempty"` } } // GetJSON200 returns the response for an HTTP 200 `application/json` response -func (r GetV0EndpointsByIdTagsResponse) GetJSON200() *struct { - // Data The data object which contains the following fields: +func (r PostV0TeamsResponse) GetJSON200() *struct { + // Data The created team object containing the following fields: Data *struct { - // Tags An array of tags associated with the endpoint - Tags *[]struct { - // AccountId The account identifier associated with the tag - AccountId *int `json:"account_id,omitempty"` - - // CreatedAt The timestamp when the tag was created - CreatedAt *string `json:"created_at,omitempty"` - - // EndpointId The endpoint identifier associated with the tag - EndpointId *int `json:"endpoint_id,omitempty"` - - // Id The unique identifier for the endpoint-tag relationship - Id *int `json:"id,omitempty"` + // DefaultRole The default role assigned to new team members (admin, viewer, or billing) + DefaultRole *string `json:"default_role,omitempty"` - // Label The label/name of the tag - Label *string `json:"label,omitempty"` + // Id A unique identifier for the created team + Id *int `json:"id,omitempty"` - // TagId The unique identifier for the tag - TagId *int `json:"tag_id,omitempty"` + // MembersCount The number of members in the team + MembersCount *int `json:"members_count,omitempty"` - // UpdatedAt The timestamp when the tag was last updated - UpdatedAt *string `json:"updated_at,omitempty"` - } `json:"tags,omitempty"` + // Name The name of the created team + Name *string `json:"name,omitempty"` } `json:"data,omitempty"` - // Error Contains error information, if any + // Error An error message if any issue occurs Error *string `json:"error,omitempty"` } { return r.JSON200 } // GetBody returns the raw response body bytes -func (r GetV0EndpointsByIdTagsResponse) GetBody() []byte { +func (r PostV0TeamsResponse) GetBody() []byte { return r.Body } // Status returns HTTPResponse.Status -func (r GetV0EndpointsByIdTagsResponse) Status() string { +func (r PostV0TeamsResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -10448,7 +13473,7 @@ func (r GetV0EndpointsByIdTagsResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r GetV0EndpointsByIdTagsResponse) StatusCode() int { +func (r PostV0TeamsResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } @@ -10456,92 +13481,50 @@ func (r GetV0EndpointsByIdTagsResponse) StatusCode() int { } // ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers -func (r GetV0EndpointsByIdTagsResponse) ContentType() string { +func (r PostV0TeamsResponse) ContentType() string { if r.HTTPResponse != nil { return r.HTTPResponse.Header.Get("Content-Type") } return "" } -type PostV0EndpointsByIdTagsResponse struct { +type DeleteV0TeamsByIdResponse struct { Body []byte HTTPResponse *http.Response // JSON200 the response for an HTTP 200 `application/json` response JSON200 *struct { - // Data The data object which contains the following fields: + // Data The response object containing the following fields: Data *struct { - // Tags An array containing the newly created tag - Tags *[]struct { - // AccountId The account identifier associated with the tag - AccountId *int `json:"account_id,omitempty"` - - // CreatedAt The timestamp when the tag was created - CreatedAt *string `json:"created_at,omitempty"` - - // EndpointId The endpoint identifier associated with the tag - EndpointId *int `json:"endpoint_id,omitempty"` - - // Id The unique identifier for the endpoint-tag relationship - Id *int `json:"id,omitempty"` - - // Label The label/name of the newly created tag - Label *string `json:"label,omitempty"` - - // TagId The unique identifier for the newly created tag - TagId *int `json:"tag_id,omitempty"` - - // UpdatedAt The timestamp when the tag was last updated - UpdatedAt *string `json:"updated_at,omitempty"` - } `json:"tags,omitempty"` + // Message A message confirming the team was deleted successfully + Message *string `json:"message,omitempty"` } `json:"data,omitempty"` - // Error Contains error information, if any - Error *string `json:"error,omitempty"` - } -} - -// GetJSON200 returns the response for an HTTP 200 `application/json` response -func (r PostV0EndpointsByIdTagsResponse) GetJSON200() *struct { - // Data The data object which contains the following fields: - Data *struct { - // Tags An array containing the newly created tag - Tags *[]struct { - // AccountId The account identifier associated with the tag - AccountId *int `json:"account_id,omitempty"` - - // CreatedAt The timestamp when the tag was created - CreatedAt *string `json:"created_at,omitempty"` - - // EndpointId The endpoint identifier associated with the tag - EndpointId *int `json:"endpoint_id,omitempty"` - - // Id The unique identifier for the endpoint-tag relationship - Id *int `json:"id,omitempty"` - - // Label The label/name of the newly created tag - Label *string `json:"label,omitempty"` - - // TagId The unique identifier for the newly created tag - TagId *int `json:"tag_id,omitempty"` + // Error An error message if any issue occurs + Error *string `json:"error,omitempty"` + } +} - // UpdatedAt The timestamp when the tag was last updated - UpdatedAt *string `json:"updated_at,omitempty"` - } `json:"tags,omitempty"` +// GetJSON200 returns the response for an HTTP 200 `application/json` response +func (r DeleteV0TeamsByIdResponse) GetJSON200() *struct { + // Data The response object containing the following fields: + Data *struct { + // Message A message confirming the team was deleted successfully + Message *string `json:"message,omitempty"` } `json:"data,omitempty"` - // Error Contains error information, if any + // Error An error message if any issue occurs Error *string `json:"error,omitempty"` } { return r.JSON200 } // GetBody returns the raw response body bytes -func (r PostV0EndpointsByIdTagsResponse) GetBody() []byte { +func (r DeleteV0TeamsByIdResponse) GetBody() []byte { return r.Body } // Status returns HTTPResponse.Status -func (r PostV0EndpointsByIdTagsResponse) Status() string { +func (r DeleteV0TeamsByIdResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -10549,7 +13532,7 @@ func (r PostV0EndpointsByIdTagsResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r PostV0EndpointsByIdTagsResponse) StatusCode() int { +func (r DeleteV0TeamsByIdResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } @@ -10557,50 +13540,170 @@ func (r PostV0EndpointsByIdTagsResponse) StatusCode() int { } // ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers -func (r PostV0EndpointsByIdTagsResponse) ContentType() string { +func (r DeleteV0TeamsByIdResponse) ContentType() string { if r.HTTPResponse != nil { return r.HTTPResponse.Header.Get("Content-Type") } return "" } -type DeleteV0EndpointsByIdTagsByTagIdResponse struct { +type GetV0TeamsByIdResponse struct { Body []byte HTTPResponse *http.Response // JSON200 the response for an HTTP 200 `application/json` response JSON200 *struct { - // Data Contains the result of the tag deletion + // Data The team object containing the following fields: Data *struct { - // Success Whether the tag was successfully deleted from the endpoint - Success *bool `json:"success,omitempty"` - } `json:"data,omitempty"` + // DefaultRole The default role assigned to new team members (admin, viewer, or billing) + DefaultRole *string `json:"default_role,omitempty"` - // Error Contains error details if the request failed; null if successful - Error *string `json:"error,omitempty"` + // Id A unique identifier for the team + Id *int `json:"id,omitempty"` + + // MembersCount The number of members in the team + MembersCount *int `json:"members_count,omitempty"` + + // Name The name of the team + Name *string `json:"name,omitempty"` + + // PendingInvites An array of pending invite objects + PendingInvites *[]struct { + // AccountPrimaryUser Indicates if the invited user will be the primary account user + AccountPrimaryUser *bool `json:"account_primary_user,omitempty"` + + // CreatedAt The timestamp when the invite was created + CreatedAt *string `json:"created_at,omitempty"` + + // Email The email address of the invited user + Email *string `json:"email,omitempty"` + + // FullName The full name of the invited user + FullName *string `json:"full_name,omitempty"` + + // Id A unique identifier for the pending invite + Id *int `json:"id,omitempty"` + + // PhotoUrl The URL of the invited user's profile photo + PhotoUrl *string `json:"photo_url,omitempty"` + + // Role The role assigned to the invited user (admin, viewer, or billing) + Role *string `json:"role,omitempty"` + + // Status The status of the invite (e.g., Pending) + Status *string `json:"status,omitempty"` + } `json:"pending_invites,omitempty"` + + // Users An array of active user objects in the team + Users *[]struct { + // AccountPrimaryUser Indicates if the user is the primary account user + AccountPrimaryUser *bool `json:"account_primary_user,omitempty"` + + // CreatedAt The timestamp when the user was added to the team + CreatedAt *string `json:"created_at,omitempty"` + + // Email The email address of the user + Email *string `json:"email,omitempty"` + + // FullName The full name of the user + FullName *string `json:"full_name,omitempty"` + + // Id A unique identifier for the user + Id *int `json:"id,omitempty"` + + // PhotoUrl The URL of the user's profile photo + PhotoUrl *string `json:"photo_url,omitempty"` + + // Role The role of the user in the team (admin, viewer, or billing) + Role *string `json:"role,omitempty"` + + // Status The status of the user (e.g., Active) + Status *string `json:"status,omitempty"` + } `json:"users,omitempty"` + } `json:"data,omitempty"` } } // GetJSON200 returns the response for an HTTP 200 `application/json` response -func (r DeleteV0EndpointsByIdTagsByTagIdResponse) GetJSON200() *struct { - // Data Contains the result of the tag deletion +func (r GetV0TeamsByIdResponse) GetJSON200() *struct { + // Data The team object containing the following fields: Data *struct { - // Success Whether the tag was successfully deleted from the endpoint - Success *bool `json:"success,omitempty"` - } `json:"data,omitempty"` + // DefaultRole The default role assigned to new team members (admin, viewer, or billing) + DefaultRole *string `json:"default_role,omitempty"` - // Error Contains error details if the request failed; null if successful - Error *string `json:"error,omitempty"` + // Id A unique identifier for the team + Id *int `json:"id,omitempty"` + + // MembersCount The number of members in the team + MembersCount *int `json:"members_count,omitempty"` + + // Name The name of the team + Name *string `json:"name,omitempty"` + + // PendingInvites An array of pending invite objects + PendingInvites *[]struct { + // AccountPrimaryUser Indicates if the invited user will be the primary account user + AccountPrimaryUser *bool `json:"account_primary_user,omitempty"` + + // CreatedAt The timestamp when the invite was created + CreatedAt *string `json:"created_at,omitempty"` + + // Email The email address of the invited user + Email *string `json:"email,omitempty"` + + // FullName The full name of the invited user + FullName *string `json:"full_name,omitempty"` + + // Id A unique identifier for the pending invite + Id *int `json:"id,omitempty"` + + // PhotoUrl The URL of the invited user's profile photo + PhotoUrl *string `json:"photo_url,omitempty"` + + // Role The role assigned to the invited user (admin, viewer, or billing) + Role *string `json:"role,omitempty"` + + // Status The status of the invite (e.g., Pending) + Status *string `json:"status,omitempty"` + } `json:"pending_invites,omitempty"` + + // Users An array of active user objects in the team + Users *[]struct { + // AccountPrimaryUser Indicates if the user is the primary account user + AccountPrimaryUser *bool `json:"account_primary_user,omitempty"` + + // CreatedAt The timestamp when the user was added to the team + CreatedAt *string `json:"created_at,omitempty"` + + // Email The email address of the user + Email *string `json:"email,omitempty"` + + // FullName The full name of the user + FullName *string `json:"full_name,omitempty"` + + // Id A unique identifier for the user + Id *int `json:"id,omitempty"` + + // PhotoUrl The URL of the user's profile photo + PhotoUrl *string `json:"photo_url,omitempty"` + + // Role The role of the user in the team (admin, viewer, or billing) + Role *string `json:"role,omitempty"` + + // Status The status of the user (e.g., Active) + Status *string `json:"status,omitempty"` + } `json:"users,omitempty"` + } `json:"data,omitempty"` } { return r.JSON200 } // GetBody returns the raw response body bytes -func (r DeleteV0EndpointsByIdTagsByTagIdResponse) GetBody() []byte { +func (r GetV0TeamsByIdResponse) GetBody() []byte { return r.Body } // Status returns HTTPResponse.Status -func (r DeleteV0EndpointsByIdTagsByTagIdResponse) Status() string { +func (r GetV0TeamsByIdResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -10608,7 +13711,7 @@ func (r DeleteV0EndpointsByIdTagsByTagIdResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r DeleteV0EndpointsByIdTagsByTagIdResponse) StatusCode() int { +func (r GetV0TeamsByIdResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } @@ -10616,68 +13719,62 @@ func (r DeleteV0EndpointsByIdTagsByTagIdResponse) StatusCode() int { } // ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers -func (r DeleteV0EndpointsByIdTagsByTagIdResponse) ContentType() string { +func (r GetV0TeamsByIdResponse) ContentType() string { if r.HTTPResponse != nil { return r.HTTPResponse.Header.Get("Content-Type") } return "" } -type GetV0EndpointsByIdUrlsResponse struct { +type GetV0TeamsByIdEndpointsResponse struct { Body []byte HTTPResponse *http.Response // JSON200 the response for an HTTP 200 `application/json` response JSON200 *struct { - // Data The data object which contains the following fields: - Data *struct { - // HttpUrl The HTTP URL to access the endpoint - HttpUrl *string `json:"http_url,omitempty"` + // Data An array of endpoint objects containing the following fields: + Data *[]struct { + // Chain The blockchain the endpoint is associated with + Chain *string `json:"chain,omitempty"` - // MultichainUrls Only present for multichain endpoints. Keyed by network slug, each value holds the network's HTTP and WebSocket URLs. - MultichainUrls *map[string]struct { - HttpUrl *string `json:"http_url,omitempty"` - WssUrl *string `json:"wss_url,omitempty"` - } `json:"multichain_urls,omitempty"` + // Id A unique identifier for the endpoint + Id *int `json:"id,omitempty"` - // WssUrl The WebSocket URL to access the endpoint - WssUrl *string `json:"wss_url,omitempty"` - } `json:"data,omitempty"` + // Network The specific network of the blockchain + Network *string `json:"network,omitempty"` - // Error Contains error information, if any - Error *string `json:"error,omitempty"` + // Subdomain The subdomain name of the endpoint + Subdomain *string `json:"subdomain,omitempty"` + } `json:"data,omitempty"` } } // GetJSON200 returns the response for an HTTP 200 `application/json` response -func (r GetV0EndpointsByIdUrlsResponse) GetJSON200() *struct { - // Data The data object which contains the following fields: - Data *struct { - // HttpUrl The HTTP URL to access the endpoint - HttpUrl *string `json:"http_url,omitempty"` +func (r GetV0TeamsByIdEndpointsResponse) GetJSON200() *struct { + // Data An array of endpoint objects containing the following fields: + Data *[]struct { + // Chain The blockchain the endpoint is associated with + Chain *string `json:"chain,omitempty"` - // MultichainUrls Only present for multichain endpoints. Keyed by network slug, each value holds the network's HTTP and WebSocket URLs. - MultichainUrls *map[string]struct { - HttpUrl *string `json:"http_url,omitempty"` - WssUrl *string `json:"wss_url,omitempty"` - } `json:"multichain_urls,omitempty"` + // Id A unique identifier for the endpoint + Id *int `json:"id,omitempty"` - // WssUrl The WebSocket URL to access the endpoint - WssUrl *string `json:"wss_url,omitempty"` - } `json:"data,omitempty"` + // Network The specific network of the blockchain + Network *string `json:"network,omitempty"` - // Error Contains error information, if any - Error *string `json:"error,omitempty"` + // Subdomain The subdomain name of the endpoint + Subdomain *string `json:"subdomain,omitempty"` + } `json:"data,omitempty"` } { return r.JSON200 } // GetBody returns the raw response body bytes -func (r GetV0EndpointsByIdUrlsResponse) GetBody() []byte { +func (r GetV0TeamsByIdEndpointsResponse) GetBody() []byte { return r.Body } // Status returns HTTPResponse.Status -func (r GetV0EndpointsByIdUrlsResponse) Status() string { +func (r GetV0TeamsByIdEndpointsResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -10685,7 +13782,7 @@ func (r GetV0EndpointsByIdUrlsResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r GetV0EndpointsByIdUrlsResponse) StatusCode() int { +func (r GetV0TeamsByIdEndpointsResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } @@ -10693,56 +13790,50 @@ func (r GetV0EndpointsByIdUrlsResponse) StatusCode() int { } // ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers -func (r GetV0EndpointsByIdUrlsResponse) ContentType() string { +func (r GetV0TeamsByIdEndpointsResponse) ContentType() string { if r.HTTPResponse != nil { return r.HTTPResponse.Header.Get("Content-Type") } return "" } - -type GetV0MetricsResponse struct { - Body []byte - HTTPResponse *http.Response - // JSON200 the response for an HTTP 200 `application/json` response - JSON200 *struct { - // Data An array of metric objects, each containing a tag and its associated data points - Data *[]struct { - // Data An array of [timestamp, value] pairs representing the metric data points - Data *[]interface{} `json:"data,omitempty"` - - // Tag An array of strings identifying the metric group (e.g., network name) - Tag *[]interface{} `json:"tag,omitempty"` + +type PatchV0TeamsByIdEndpointsResponse struct { + Body []byte + HTTPResponse *http.Response + // JSON200 the response for an HTTP 200 `application/json` response + JSON200 *struct { + // Data The response object containing the following fields: + Data *struct { + // Success Indicates whether the operation was successful + Success *bool `json:"success,omitempty"` } `json:"data,omitempty"` - // Error Contains error details if the request failed; null if successful + // Error An error message if any issue occurs Error *string `json:"error,omitempty"` } } // GetJSON200 returns the response for an HTTP 200 `application/json` response -func (r GetV0MetricsResponse) GetJSON200() *struct { - // Data An array of metric objects, each containing a tag and its associated data points - Data *[]struct { - // Data An array of [timestamp, value] pairs representing the metric data points - Data *[]interface{} `json:"data,omitempty"` - - // Tag An array of strings identifying the metric group (e.g., network name) - Tag *[]interface{} `json:"tag,omitempty"` +func (r PatchV0TeamsByIdEndpointsResponse) GetJSON200() *struct { + // Data The response object containing the following fields: + Data *struct { + // Success Indicates whether the operation was successful + Success *bool `json:"success,omitempty"` } `json:"data,omitempty"` - // Error Contains error details if the request failed; null if successful + // Error An error message if any issue occurs Error *string `json:"error,omitempty"` } { return r.JSON200 } // GetBody returns the raw response body bytes -func (r GetV0MetricsResponse) GetBody() []byte { +func (r PatchV0TeamsByIdEndpointsResponse) GetBody() []byte { return r.Body } // Status returns HTTPResponse.Status -func (r GetV0MetricsResponse) Status() string { +func (r PatchV0TeamsByIdEndpointsResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -10750,7 +13841,7 @@ func (r GetV0MetricsResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r GetV0MetricsResponse) StatusCode() int { +func (r PatchV0TeamsByIdEndpointsResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } @@ -10758,104 +13849,74 @@ func (r GetV0MetricsResponse) StatusCode() int { } // ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers -func (r GetV0MetricsResponse) ContentType() string { +func (r PatchV0TeamsByIdEndpointsResponse) ContentType() string { if r.HTTPResponse != nil { return r.HTTPResponse.Header.Get("Content-Type") } return "" } -type GetV0TeamsResponse struct { +type PostV0TeamsByIdMembersResponse struct { Body []byte HTTPResponse *http.Response // JSON200 the response for an HTTP 200 `application/json` response JSON200 *struct { - // Data An array of team objects containing the following fields: - Data *[]struct { - // Id A unique identifier for the team - Id *int `json:"id,omitempty"` - - // MembersCount The number of members in the team - MembersCount *int `json:"members_count,omitempty"` - - // Name The name of the team - Name *string `json:"name,omitempty"` - - // Users An array of user objects in the team - Users *[]struct { - // CreatedAt The timestamp when the user was added to the team - CreatedAt *string `json:"created_at,omitempty"` - - // Email The email address of the user - Email *string `json:"email,omitempty"` - - // FullName The full name of the user - FullName *string `json:"full_name,omitempty"` + // Data The invited user object containing the following fields: + Data *struct { + // Email The email address of the invited user + Email *string `json:"email,omitempty"` - // Id A unique identifier for the user - Id *int `json:"id,omitempty"` + // FullName The full name of the invited user + FullName *string `json:"full_name,omitempty"` - // PhotoUrl The URL of the user's profile photo - PhotoUrl *string `json:"photo_url,omitempty"` + // Id A unique identifier for the invited user + Id *int `json:"id,omitempty"` - // Role The role of the user in the team (admin, viewer, or billing) - Role *string `json:"role,omitempty"` + // Role The role assigned to the invited user (admin, viewer, or billing) + Role *string `json:"role,omitempty"` - // Status The status of the user (e.g., Active, Pending) - Status *string `json:"status,omitempty"` - } `json:"users,omitempty"` + // Status The status of the invitation (e.g., Active, Pending) + Status *string `json:"status,omitempty"` } `json:"data,omitempty"` + + // Error An error message if any issue occurs + Error *string `json:"error,omitempty"` } } // GetJSON200 returns the response for an HTTP 200 `application/json` response -func (r GetV0TeamsResponse) GetJSON200() *struct { - // Data An array of team objects containing the following fields: - Data *[]struct { - // Id A unique identifier for the team - Id *int `json:"id,omitempty"` - - // MembersCount The number of members in the team - MembersCount *int `json:"members_count,omitempty"` - - // Name The name of the team - Name *string `json:"name,omitempty"` - - // Users An array of user objects in the team - Users *[]struct { - // CreatedAt The timestamp when the user was added to the team - CreatedAt *string `json:"created_at,omitempty"` - - // Email The email address of the user - Email *string `json:"email,omitempty"` - - // FullName The full name of the user - FullName *string `json:"full_name,omitempty"` +func (r PostV0TeamsByIdMembersResponse) GetJSON200() *struct { + // Data The invited user object containing the following fields: + Data *struct { + // Email The email address of the invited user + Email *string `json:"email,omitempty"` - // Id A unique identifier for the user - Id *int `json:"id,omitempty"` + // FullName The full name of the invited user + FullName *string `json:"full_name,omitempty"` - // PhotoUrl The URL of the user's profile photo - PhotoUrl *string `json:"photo_url,omitempty"` + // Id A unique identifier for the invited user + Id *int `json:"id,omitempty"` - // Role The role of the user in the team (admin, viewer, or billing) - Role *string `json:"role,omitempty"` + // Role The role assigned to the invited user (admin, viewer, or billing) + Role *string `json:"role,omitempty"` - // Status The status of the user (e.g., Active, Pending) - Status *string `json:"status,omitempty"` - } `json:"users,omitempty"` + // Status The status of the invitation (e.g., Active, Pending) + Status *string `json:"status,omitempty"` } `json:"data,omitempty"` + + // Error An error message if any issue occurs + Error *string `json:"error,omitempty"` } { return r.JSON200 } // GetBody returns the raw response body bytes -func (r GetV0TeamsResponse) GetBody() []byte { +func (r PostV0TeamsByIdMembersResponse) GetBody() []byte { return r.Body } // Status returns HTTPResponse.Status -func (r GetV0TeamsResponse) Status() string { +func (r PostV0TeamsByIdMembersResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -10863,7 +13924,7 @@ func (r GetV0TeamsResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r GetV0TeamsResponse) StatusCode() int { +func (r PostV0TeamsByIdMembersResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } @@ -10871,31 +13932,22 @@ func (r GetV0TeamsResponse) StatusCode() int { } // ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers -func (r GetV0TeamsResponse) ContentType() string { +func (r PostV0TeamsByIdMembersResponse) ContentType() string { if r.HTTPResponse != nil { return r.HTTPResponse.Header.Get("Content-Type") } return "" } -type PostV0TeamsResponse struct { +type DeleteV0TeamsByIdMembersByUserIdResponse struct { Body []byte HTTPResponse *http.Response // JSON200 the response for an HTTP 200 `application/json` response JSON200 *struct { - // Data The created team object containing the following fields: + // Data The response object containing the following fields: Data *struct { - // DefaultRole The default role assigned to new team members (admin, viewer, or billing) - DefaultRole *string `json:"default_role,omitempty"` - - // Id A unique identifier for the created team - Id *int `json:"id,omitempty"` - - // MembersCount The number of members in the team - MembersCount *int `json:"members_count,omitempty"` - - // Name The name of the created team - Name *string `json:"name,omitempty"` + // Message A message confirming the user was removed successfully + Message *string `json:"message,omitempty"` } `json:"data,omitempty"` // Error An error message if any issue occurs @@ -10904,20 +13956,11 @@ type PostV0TeamsResponse struct { } // GetJSON200 returns the response for an HTTP 200 `application/json` response -func (r PostV0TeamsResponse) GetJSON200() *struct { - // Data The created team object containing the following fields: +func (r DeleteV0TeamsByIdMembersByUserIdResponse) GetJSON200() *struct { + // Data The response object containing the following fields: Data *struct { - // DefaultRole The default role assigned to new team members (admin, viewer, or billing) - DefaultRole *string `json:"default_role,omitempty"` - - // Id A unique identifier for the created team - Id *int `json:"id,omitempty"` - - // MembersCount The number of members in the team - MembersCount *int `json:"members_count,omitempty"` - - // Name The name of the created team - Name *string `json:"name,omitempty"` + // Message A message confirming the user was removed successfully + Message *string `json:"message,omitempty"` } `json:"data,omitempty"` // Error An error message if any issue occurs @@ -10927,12 +13970,12 @@ func (r PostV0TeamsResponse) GetJSON200() *struct { } // GetBody returns the raw response body bytes -func (r PostV0TeamsResponse) GetBody() []byte { +func (r DeleteV0TeamsByIdMembersByUserIdResponse) GetBody() []byte { return r.Body } // Status returns HTTPResponse.Status -func (r PostV0TeamsResponse) Status() string { +func (r DeleteV0TeamsByIdMembersByUserIdResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -10940,7 +13983,7 @@ func (r PostV0TeamsResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r PostV0TeamsResponse) StatusCode() int { +func (r DeleteV0TeamsByIdMembersByUserIdResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } @@ -10948,21 +13991,21 @@ func (r PostV0TeamsResponse) StatusCode() int { } // ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers -func (r PostV0TeamsResponse) ContentType() string { +func (r DeleteV0TeamsByIdMembersByUserIdResponse) ContentType() string { if r.HTTPResponse != nil { return r.HTTPResponse.Header.Get("Content-Type") } return "" } -type DeleteV0TeamsByIdResponse struct { +type PostV0TeamsByIdMembersByUserIdResendInviteResponse struct { Body []byte HTTPResponse *http.Response // JSON200 the response for an HTTP 200 `application/json` response JSON200 *struct { // Data The response object containing the following fields: Data *struct { - // Message A message confirming the team was deleted successfully + // Message A message confirming the invitation was resent successfully Message *string `json:"message,omitempty"` } `json:"data,omitempty"` @@ -10972,10 +14015,10 @@ type DeleteV0TeamsByIdResponse struct { } // GetJSON200 returns the response for an HTTP 200 `application/json` response -func (r DeleteV0TeamsByIdResponse) GetJSON200() *struct { +func (r PostV0TeamsByIdMembersByUserIdResendInviteResponse) GetJSON200() *struct { // Data The response object containing the following fields: Data *struct { - // Message A message confirming the team was deleted successfully + // Message A message confirming the invitation was resent successfully Message *string `json:"message,omitempty"` } `json:"data,omitempty"` @@ -10986,12 +14029,12 @@ func (r DeleteV0TeamsByIdResponse) GetJSON200() *struct { } // GetBody returns the raw response body bytes -func (r DeleteV0TeamsByIdResponse) GetBody() []byte { +func (r PostV0TeamsByIdMembersByUserIdResendInviteResponse) GetBody() []byte { return r.Body } // Status returns HTTPResponse.Status -func (r DeleteV0TeamsByIdResponse) Status() string { +func (r PostV0TeamsByIdMembersByUserIdResendInviteResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -10999,7 +14042,7 @@ func (r DeleteV0TeamsByIdResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r DeleteV0TeamsByIdResponse) StatusCode() int { +func (r PostV0TeamsByIdMembersByUserIdResendInviteResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } @@ -11007,170 +14050,133 @@ func (r DeleteV0TeamsByIdResponse) StatusCode() int { } // ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers -func (r DeleteV0TeamsByIdResponse) ContentType() string { +func (r PostV0TeamsByIdMembersByUserIdResendInviteResponse) ContentType() string { if r.HTTPResponse != nil { return r.HTTPResponse.Header.Get("Content-Type") } return "" } -type GetV0TeamsByIdResponse struct { +type GetV0ToolingAccessResponse struct { Body []byte HTTPResponse *http.Response - // JSON200 the response for an HTTP 200 `application/json` response - JSON200 *struct { - // Data The team object containing the following fields: - Data *struct { - // DefaultRole The default role assigned to new team members (admin, viewer, or billing) - DefaultRole *string `json:"default_role,omitempty"` - - // Id A unique identifier for the team - Id *int `json:"id,omitempty"` - - // MembersCount The number of members in the team - MembersCount *int `json:"members_count,omitempty"` - - // Name The name of the team - Name *string `json:"name,omitempty"` - - // PendingInvites An array of pending invite objects - PendingInvites *[]struct { - // AccountPrimaryUser Indicates if the invited user will be the primary account user - AccountPrimaryUser *bool `json:"account_primary_user,omitempty"` - - // CreatedAt The timestamp when the invite was created - CreatedAt *string `json:"created_at,omitempty"` - - // Email The email address of the invited user - Email *string `json:"email,omitempty"` - - // FullName The full name of the invited user - FullName *string `json:"full_name,omitempty"` - - // Id A unique identifier for the pending invite - Id *int `json:"id,omitempty"` - - // PhotoUrl The URL of the invited user's profile photo - PhotoUrl *string `json:"photo_url,omitempty"` - - // Role The role assigned to the invited user (admin, viewer, or billing) - Role *string `json:"role,omitempty"` - - // Status The status of the invite (e.g., Pending) - Status *string `json:"status,omitempty"` - } `json:"pending_invites,omitempty"` - - // Users An array of active user objects in the team - Users *[]struct { - // AccountPrimaryUser Indicates if the user is the primary account user - AccountPrimaryUser *bool `json:"account_primary_user,omitempty"` - - // CreatedAt The timestamp when the user was added to the team - CreatedAt *string `json:"created_at,omitempty"` - - // Email The email address of the user - Email *string `json:"email,omitempty"` - - // FullName The full name of the user - FullName *string `json:"full_name,omitempty"` - - // Id A unique identifier for the user - Id *int `json:"id,omitempty"` + // JSON200 the response for an HTTP 200 `application/json` response + JSON200 *struct { + // Data An object which contains the following fields: + Data *struct { + // Enabled Whether Tooling Access is currently enabled for the account + Enabled *bool `json:"enabled,omitempty"` - // PhotoUrl The URL of the user's profile photo - PhotoUrl *string `json:"photo_url,omitempty"` + // EnabledAt The timestamp when Tooling Access was enabled + EnabledAt *string `json:"enabled_at,omitempty"` - // Role The role of the user in the team (admin, viewer, or billing) - Role *string `json:"role,omitempty"` + // EndpointId The unique identifier of the endpoint provisioned for Tooling Access + EndpointId *int `json:"endpoint_id,omitempty"` - // Status The status of the user (e.g., Active) - Status *string `json:"status,omitempty"` - } `json:"users,omitempty"` + // EndpointUrl The URL of the endpoint provisioned for Tooling Access. May be present even when disabled if the account was previously provisioned + EndpointUrl *string `json:"endpoint_url,omitempty"` } `json:"data,omitempty"` + + // Error An error message if any issue occurs + Error *string `json:"error,omitempty"` } } // GetJSON200 returns the response for an HTTP 200 `application/json` response -func (r GetV0TeamsByIdResponse) GetJSON200() *struct { - // Data The team object containing the following fields: +func (r GetV0ToolingAccessResponse) GetJSON200() *struct { + // Data An object which contains the following fields: Data *struct { - // DefaultRole The default role assigned to new team members (admin, viewer, or billing) - DefaultRole *string `json:"default_role,omitempty"` - - // Id A unique identifier for the team - Id *int `json:"id,omitempty"` - - // MembersCount The number of members in the team - MembersCount *int `json:"members_count,omitempty"` - - // Name The name of the team - Name *string `json:"name,omitempty"` - - // PendingInvites An array of pending invite objects - PendingInvites *[]struct { - // AccountPrimaryUser Indicates if the invited user will be the primary account user - AccountPrimaryUser *bool `json:"account_primary_user,omitempty"` - - // CreatedAt The timestamp when the invite was created - CreatedAt *string `json:"created_at,omitempty"` - - // Email The email address of the invited user - Email *string `json:"email,omitempty"` + // Enabled Whether Tooling Access is currently enabled for the account + Enabled *bool `json:"enabled,omitempty"` - // FullName The full name of the invited user - FullName *string `json:"full_name,omitempty"` + // EnabledAt The timestamp when Tooling Access was enabled + EnabledAt *string `json:"enabled_at,omitempty"` - // Id A unique identifier for the pending invite - Id *int `json:"id,omitempty"` + // EndpointId The unique identifier of the endpoint provisioned for Tooling Access + EndpointId *int `json:"endpoint_id,omitempty"` - // PhotoUrl The URL of the invited user's profile photo - PhotoUrl *string `json:"photo_url,omitempty"` + // EndpointUrl The URL of the endpoint provisioned for Tooling Access. May be present even when disabled if the account was previously provisioned + EndpointUrl *string `json:"endpoint_url,omitempty"` + } `json:"data,omitempty"` - // Role The role assigned to the invited user (admin, viewer, or billing) - Role *string `json:"role,omitempty"` + // Error An error message if any issue occurs + Error *string `json:"error,omitempty"` +} { + return r.JSON200 +} - // Status The status of the invite (e.g., Pending) - Status *string `json:"status,omitempty"` - } `json:"pending_invites,omitempty"` +// GetBody returns the raw response body bytes +func (r GetV0ToolingAccessResponse) GetBody() []byte { + return r.Body +} - // Users An array of active user objects in the team - Users *[]struct { - // AccountPrimaryUser Indicates if the user is the primary account user - AccountPrimaryUser *bool `json:"account_primary_user,omitempty"` +// Status returns HTTPResponse.Status +func (r GetV0ToolingAccessResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} - // CreatedAt The timestamp when the user was added to the team - CreatedAt *string `json:"created_at,omitempty"` +// StatusCode returns HTTPResponse.StatusCode +func (r GetV0ToolingAccessResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} - // Email The email address of the user - Email *string `json:"email,omitempty"` +// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers +func (r GetV0ToolingAccessResponse) ContentType() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Header.Get("Content-Type") + } + return "" +} - // FullName The full name of the user - FullName *string `json:"full_name,omitempty"` +type PatchV0ToolingAccessResponse struct { + Body []byte + HTTPResponse *http.Response + // JSON200 the response for an HTTP 200 `application/json` response + JSON200 *struct { + // Data An object which contains the following fields: + Data *struct { + // Enabled Whether Tooling Access is enabled after the update + Enabled *bool `json:"enabled,omitempty"` - // Id A unique identifier for the user - Id *int `json:"id,omitempty"` + // EndpointUrl The URL of the endpoint provisioned for Tooling Access + EndpointUrl *string `json:"endpoint_url,omitempty"` + } `json:"data,omitempty"` - // PhotoUrl The URL of the user's profile photo - PhotoUrl *string `json:"photo_url,omitempty"` + // Error An error message if any issue occurs + Error *string `json:"error,omitempty"` + } +} - // Role The role of the user in the team (admin, viewer, or billing) - Role *string `json:"role,omitempty"` +// GetJSON200 returns the response for an HTTP 200 `application/json` response +func (r PatchV0ToolingAccessResponse) GetJSON200() *struct { + // Data An object which contains the following fields: + Data *struct { + // Enabled Whether Tooling Access is enabled after the update + Enabled *bool `json:"enabled,omitempty"` - // Status The status of the user (e.g., Active) - Status *string `json:"status,omitempty"` - } `json:"users,omitempty"` + // EndpointUrl The URL of the endpoint provisioned for Tooling Access + EndpointUrl *string `json:"endpoint_url,omitempty"` } `json:"data,omitempty"` + + // Error An error message if any issue occurs + Error *string `json:"error,omitempty"` } { return r.JSON200 } // GetBody returns the raw response body bytes -func (r GetV0TeamsByIdResponse) GetBody() []byte { +func (r PatchV0ToolingAccessResponse) GetBody() []byte { return r.Body } // Status returns HTTPResponse.Status -func (r GetV0TeamsByIdResponse) Status() string { +func (r PatchV0ToolingAccessResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -11178,7 +14184,7 @@ func (r GetV0TeamsByIdResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r GetV0TeamsByIdResponse) StatusCode() int { +func (r PatchV0ToolingAccessResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } @@ -11186,62 +14192,62 @@ func (r GetV0TeamsByIdResponse) StatusCode() int { } // ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers -func (r GetV0TeamsByIdResponse) ContentType() string { +func (r PatchV0ToolingAccessResponse) ContentType() string { if r.HTTPResponse != nil { return r.HTTPResponse.Header.Get("Content-Type") } return "" } -type GetV0TeamsByIdEndpointsResponse struct { +type PostV0ToolingAccessTokenResponse struct { Body []byte HTTPResponse *http.Response // JSON200 the response for an HTTP 200 `application/json` response JSON200 *struct { - // Data An array of endpoint objects containing the following fields: - Data *[]struct { - // Chain The blockchain the endpoint is associated with - Chain *string `json:"chain,omitempty"` - - // Id A unique identifier for the endpoint - Id *int `json:"id,omitempty"` + // Data An object which contains the following fields: + Data *struct { + // EndpointUrl The URL of the Tooling Access endpoint the token authenticates against + EndpointUrl *string `json:"endpoint_url,omitempty"` - // Network The specific network of the blockchain - Network *string `json:"network,omitempty"` + // ExpiresAt The timestamp when the token expires + ExpiresAt *string `json:"expires_at,omitempty"` - // Subdomain The subdomain name of the endpoint - Subdomain *string `json:"subdomain,omitempty"` + // Token The short-lived ES256 JWT used to authenticate RPC calls + Token *string `json:"token,omitempty"` } `json:"data,omitempty"` + + // Error An error message if any issue occurs + Error *string `json:"error,omitempty"` } } // GetJSON200 returns the response for an HTTP 200 `application/json` response -func (r GetV0TeamsByIdEndpointsResponse) GetJSON200() *struct { - // Data An array of endpoint objects containing the following fields: - Data *[]struct { - // Chain The blockchain the endpoint is associated with - Chain *string `json:"chain,omitempty"` - - // Id A unique identifier for the endpoint - Id *int `json:"id,omitempty"` +func (r PostV0ToolingAccessTokenResponse) GetJSON200() *struct { + // Data An object which contains the following fields: + Data *struct { + // EndpointUrl The URL of the Tooling Access endpoint the token authenticates against + EndpointUrl *string `json:"endpoint_url,omitempty"` - // Network The specific network of the blockchain - Network *string `json:"network,omitempty"` + // ExpiresAt The timestamp when the token expires + ExpiresAt *string `json:"expires_at,omitempty"` - // Subdomain The subdomain name of the endpoint - Subdomain *string `json:"subdomain,omitempty"` + // Token The short-lived ES256 JWT used to authenticate RPC calls + Token *string `json:"token,omitempty"` } `json:"data,omitempty"` + + // Error An error message if any issue occurs + Error *string `json:"error,omitempty"` } { return r.JSON200 } // GetBody returns the raw response body bytes -func (r GetV0TeamsByIdEndpointsResponse) GetBody() []byte { +func (r PostV0ToolingAccessTokenResponse) GetBody() []byte { return r.Body } // Status returns HTTPResponse.Status -func (r GetV0TeamsByIdEndpointsResponse) Status() string { +func (r PostV0ToolingAccessTokenResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -11249,7 +14255,7 @@ func (r GetV0TeamsByIdEndpointsResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r GetV0TeamsByIdEndpointsResponse) StatusCode() int { +func (r PostV0ToolingAccessTokenResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } @@ -11257,50 +14263,128 @@ func (r GetV0TeamsByIdEndpointsResponse) StatusCode() int { } // ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers -func (r GetV0TeamsByIdEndpointsResponse) ContentType() string { +func (r PostV0ToolingAccessTokenResponse) ContentType() string { if r.HTTPResponse != nil { return r.HTTPResponse.Header.Get("Content-Type") } return "" } -type PatchV0TeamsByIdEndpointsResponse struct { +type PostV0TransactionsResponse struct { Body []byte HTTPResponse *http.Response // JSON200 the response for an HTTP 200 `application/json` response JSON200 *struct { - // Data The response object containing the following fields: + // Data Response data. Null when the request fails. Data *struct { - // Success Indicates whether the operation was successful - Success *bool `json:"success,omitempty"` + // From Effective start of the returned time range, in ISO 8601 format. + From *string `json:"from,omitempty"` + + // NextCursor Opaque continuation cursor. Present when another page is available. Pass it unchanged as cursor. + NextCursor *string `json:"next_cursor,omitempty"` + + // To Effective end of the returned time range, in ISO 8601 format. + To *string `json:"to,omitempty"` + + // Transactions Transaction submissions matching the selected time range and filters. + Transactions *[]struct { + // Archive Whether the transaction is marked as archived. + Archive *bool `json:"archive,omitempty"` + + // AttemptCount Number of recorded submission attempts. + AttemptCount *int `json:"attempt_count,omitempty"` + + // EndpointIds Endpoint UUIDs associated with the submissions. These are not the numeric Admin API endpoint IDs. + EndpointIds *[]interface{} `json:"endpoint_ids,omitempty"` + + // FirstSubmittedAt Timestamp of the first recorded submission. + FirstSubmittedAt *string `json:"first_submitted_at,omitempty"` + + // Height Block height when available; otherwise null. + Height *string `json:"height,omitempty"` + + // LastSubmittedAt Timestamp of the most recent recorded submission. + LastSubmittedAt *string `json:"last_submitted_at,omitempty"` + + // Methods RPC method names used for submission. + Methods *[]interface{} `json:"methods,omitempty"` + + // Network Network identifier. + Network *string `json:"network,omitempty"` + + // State Recorded transaction submission state; for example, submitted. This is not confirmation of inclusion or finality. + State *string `json:"state,omitempty"` + + // TransactionHash Transaction hash or signature. + TransactionHash *string `json:"transaction_hash,omitempty"` + } `json:"transactions,omitempty"` } `json:"data,omitempty"` - // Error An error message if any issue occurs + // Error Error message on failure; null on success. Error *string `json:"error,omitempty"` } } // GetJSON200 returns the response for an HTTP 200 `application/json` response -func (r PatchV0TeamsByIdEndpointsResponse) GetJSON200() *struct { - // Data The response object containing the following fields: +func (r PostV0TransactionsResponse) GetJSON200() *struct { + // Data Response data. Null when the request fails. Data *struct { - // Success Indicates whether the operation was successful - Success *bool `json:"success,omitempty"` + // From Effective start of the returned time range, in ISO 8601 format. + From *string `json:"from,omitempty"` + + // NextCursor Opaque continuation cursor. Present when another page is available. Pass it unchanged as cursor. + NextCursor *string `json:"next_cursor,omitempty"` + + // To Effective end of the returned time range, in ISO 8601 format. + To *string `json:"to,omitempty"` + + // Transactions Transaction submissions matching the selected time range and filters. + Transactions *[]struct { + // Archive Whether the transaction is marked as archived. + Archive *bool `json:"archive,omitempty"` + + // AttemptCount Number of recorded submission attempts. + AttemptCount *int `json:"attempt_count,omitempty"` + + // EndpointIds Endpoint UUIDs associated with the submissions. These are not the numeric Admin API endpoint IDs. + EndpointIds *[]interface{} `json:"endpoint_ids,omitempty"` + + // FirstSubmittedAt Timestamp of the first recorded submission. + FirstSubmittedAt *string `json:"first_submitted_at,omitempty"` + + // Height Block height when available; otherwise null. + Height *string `json:"height,omitempty"` + + // LastSubmittedAt Timestamp of the most recent recorded submission. + LastSubmittedAt *string `json:"last_submitted_at,omitempty"` + + // Methods RPC method names used for submission. + Methods *[]interface{} `json:"methods,omitempty"` + + // Network Network identifier. + Network *string `json:"network,omitempty"` + + // State Recorded transaction submission state; for example, submitted. This is not confirmation of inclusion or finality. + State *string `json:"state,omitempty"` + + // TransactionHash Transaction hash or signature. + TransactionHash *string `json:"transaction_hash,omitempty"` + } `json:"transactions,omitempty"` } `json:"data,omitempty"` - // Error An error message if any issue occurs + // Error Error message on failure; null on success. Error *string `json:"error,omitempty"` } { return r.JSON200 } // GetBody returns the raw response body bytes -func (r PatchV0TeamsByIdEndpointsResponse) GetBody() []byte { +func (r PostV0TransactionsResponse) GetBody() []byte { return r.Body } // Status returns HTTPResponse.Status -func (r PatchV0TeamsByIdEndpointsResponse) Status() string { +func (r PostV0TransactionsResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -11308,7 +14392,7 @@ func (r PatchV0TeamsByIdEndpointsResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r PatchV0TeamsByIdEndpointsResponse) StatusCode() int { +func (r PostV0TransactionsResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } @@ -11316,74 +14400,134 @@ func (r PatchV0TeamsByIdEndpointsResponse) StatusCode() int { } // ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers -func (r PatchV0TeamsByIdEndpointsResponse) ContentType() string { +func (r PostV0TransactionsResponse) ContentType() string { if r.HTTPResponse != nil { return r.HTTPResponse.Header.Get("Content-Type") } return "" } -type PostV0TeamsByIdMembersResponse struct { +type PostV0TransactionsByNetworkByHashResponse struct { Body []byte HTTPResponse *http.Response // JSON200 the response for an HTTP 200 `application/json` response JSON200 *struct { - // Data The invited user object containing the following fields: + // Data Response data. Null when the request fails. Data *struct { - // Email The email address of the invited user - Email *string `json:"email,omitempty"` + // Data Recorded transaction details; null when exists is false. + Data *struct { + // Attempts Recorded attempts to submit this transaction. + Attempts *[]struct { + // EndpointId Endpoint UUID for this attempt; not the numeric Admin API endpoint ID. + EndpointId *string `json:"endpoint_id,omitempty"` + + // Method RPC method name. In a breakdown, present when grouping by method. + Method *string `json:"method,omitempty"` - // FullName The full name of the invited user - FullName *string `json:"full_name,omitempty"` + // Payloads Optional request and response payloads, returned when include_payloads=true and available. + Payloads *struct { + // Request Recorded request payload as a JSON-encoded string. + Request *string `json:"request,omitempty"` - // Id A unique identifier for the invited user - Id *int `json:"id,omitempty"` + // Response Recorded response payload as a JSON-encoded string. + Response *string `json:"response,omitempty"` + } `json:"payloads,omitempty"` - // Role The role assigned to the invited user (admin, viewer, or billing) - Role *string `json:"role,omitempty"` + // RequestId Identifier of the recorded request. + RequestId *string `json:"request_id,omitempty"` - // Status The status of the invitation (e.g., Active, Pending) - Status *string `json:"status,omitempty"` + // SubmittedAt Timestamp of the submission attempt. + SubmittedAt *string `json:"submitted_at,omitempty"` + } `json:"attempts,omitempty"` + + // FirstSubmittedAt Timestamp of the first recorded submission. + FirstSubmittedAt *string `json:"first_submitted_at,omitempty"` + + // LastSubmittedAt Timestamp of the most recent recorded submission. + LastSubmittedAt *string `json:"last_submitted_at,omitempty"` + + // Network Network identifier. + Network *string `json:"network,omitempty"` + + // State Recorded transaction submission state; for example, submitted. This is not confirmation of inclusion or finality. + State *string `json:"state,omitempty"` + + // TransactionHash Transaction hash or signature. + TransactionHash *string `json:"transaction_hash,omitempty"` + } `json:"data,omitempty"` + + // Exists Whether a matching transaction submission was found. + Exists *bool `json:"exists,omitempty"` } `json:"data,omitempty"` - // Error An error message if any issue occurs + // Error Error message on failure; null on success. Error *string `json:"error,omitempty"` } } // GetJSON200 returns the response for an HTTP 200 `application/json` response -func (r PostV0TeamsByIdMembersResponse) GetJSON200() *struct { - // Data The invited user object containing the following fields: +func (r PostV0TransactionsByNetworkByHashResponse) GetJSON200() *struct { + // Data Response data. Null when the request fails. Data *struct { - // Email The email address of the invited user - Email *string `json:"email,omitempty"` + // Data Recorded transaction details; null when exists is false. + Data *struct { + // Attempts Recorded attempts to submit this transaction. + Attempts *[]struct { + // EndpointId Endpoint UUID for this attempt; not the numeric Admin API endpoint ID. + EndpointId *string `json:"endpoint_id,omitempty"` - // FullName The full name of the invited user - FullName *string `json:"full_name,omitempty"` + // Method RPC method name. In a breakdown, present when grouping by method. + Method *string `json:"method,omitempty"` - // Id A unique identifier for the invited user - Id *int `json:"id,omitempty"` + // Payloads Optional request and response payloads, returned when include_payloads=true and available. + Payloads *struct { + // Request Recorded request payload as a JSON-encoded string. + Request *string `json:"request,omitempty"` - // Role The role assigned to the invited user (admin, viewer, or billing) - Role *string `json:"role,omitempty"` + // Response Recorded response payload as a JSON-encoded string. + Response *string `json:"response,omitempty"` + } `json:"payloads,omitempty"` - // Status The status of the invitation (e.g., Active, Pending) - Status *string `json:"status,omitempty"` + // RequestId Identifier of the recorded request. + RequestId *string `json:"request_id,omitempty"` + + // SubmittedAt Timestamp of the submission attempt. + SubmittedAt *string `json:"submitted_at,omitempty"` + } `json:"attempts,omitempty"` + + // FirstSubmittedAt Timestamp of the first recorded submission. + FirstSubmittedAt *string `json:"first_submitted_at,omitempty"` + + // LastSubmittedAt Timestamp of the most recent recorded submission. + LastSubmittedAt *string `json:"last_submitted_at,omitempty"` + + // Network Network identifier. + Network *string `json:"network,omitempty"` + + // State Recorded transaction submission state; for example, submitted. This is not confirmation of inclusion or finality. + State *string `json:"state,omitempty"` + + // TransactionHash Transaction hash or signature. + TransactionHash *string `json:"transaction_hash,omitempty"` + } `json:"data,omitempty"` + + // Exists Whether a matching transaction submission was found. + Exists *bool `json:"exists,omitempty"` } `json:"data,omitempty"` - // Error An error message if any issue occurs + // Error Error message on failure; null on success. Error *string `json:"error,omitempty"` } { return r.JSON200 } // GetBody returns the raw response body bytes -func (r PostV0TeamsByIdMembersResponse) GetBody() []byte { +func (r PostV0TransactionsByNetworkByHashResponse) GetBody() []byte { return r.Body } // Status returns HTTPResponse.Status -func (r PostV0TeamsByIdMembersResponse) Status() string { +func (r PostV0TransactionsByNetworkByHashResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -11391,7 +14535,7 @@ func (r PostV0TeamsByIdMembersResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r PostV0TeamsByIdMembersResponse) StatusCode() int { +func (r PostV0TransactionsByNetworkByHashResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } @@ -11399,50 +14543,68 @@ func (r PostV0TeamsByIdMembersResponse) StatusCode() int { } // ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers -func (r PostV0TeamsByIdMembersResponse) ContentType() string { +func (r PostV0TransactionsByNetworkByHashResponse) ContentType() string { if r.HTTPResponse != nil { return r.HTTPResponse.Header.Get("Content-Type") } return "" } -type DeleteV0TeamsByIdMembersByUserIdResponse struct { +type PostV0UsageCreditsSummaryResponse struct { Body []byte HTTPResponse *http.Response // JSON200 the response for an HTTP 200 `application/json` response JSON200 *struct { - // Data The response object containing the following fields: + // Data Response data. Null when the request fails. Data *struct { - // Message A message confirming the user was removed successfully - Message *string `json:"message,omitempty"` + // From Effective start of the returned time range, in ISO 8601 format. + From *string `json:"from,omitempty"` + + // To Effective end of the returned time range, in ISO 8601 format. + To *string `json:"to,omitempty"` + + // Totals Aggregate totals for the selected time range. + Totals *struct { + // Credits Total API credits consumed. + Credits *int `json:"credits,omitempty"` + } `json:"totals,omitempty"` } `json:"data,omitempty"` - // Error An error message if any issue occurs + // Error Error message on failure; null on success. Error *string `json:"error,omitempty"` } } // GetJSON200 returns the response for an HTTP 200 `application/json` response -func (r DeleteV0TeamsByIdMembersByUserIdResponse) GetJSON200() *struct { - // Data The response object containing the following fields: +func (r PostV0UsageCreditsSummaryResponse) GetJSON200() *struct { + // Data Response data. Null when the request fails. Data *struct { - // Message A message confirming the user was removed successfully - Message *string `json:"message,omitempty"` + // From Effective start of the returned time range, in ISO 8601 format. + From *string `json:"from,omitempty"` + + // To Effective end of the returned time range, in ISO 8601 format. + To *string `json:"to,omitempty"` + + // Totals Aggregate totals for the selected time range. + Totals *struct { + // Credits Total API credits consumed. + Credits *int `json:"credits,omitempty"` + } `json:"totals,omitempty"` } `json:"data,omitempty"` - // Error An error message if any issue occurs + // Error Error message on failure; null on success. Error *string `json:"error,omitempty"` } { return r.JSON200 } // GetBody returns the raw response body bytes -func (r DeleteV0TeamsByIdMembersByUserIdResponse) GetBody() []byte { +func (r PostV0UsageCreditsSummaryResponse) GetBody() []byte { return r.Body } // Status returns HTTPResponse.Status -func (r DeleteV0TeamsByIdMembersByUserIdResponse) Status() string { +func (r PostV0UsageCreditsSummaryResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -11450,7 +14612,7 @@ func (r DeleteV0TeamsByIdMembersByUserIdResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r DeleteV0TeamsByIdMembersByUserIdResponse) StatusCode() int { +func (r PostV0UsageCreditsSummaryResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } @@ -11458,50 +14620,80 @@ func (r DeleteV0TeamsByIdMembersByUserIdResponse) StatusCode() int { } // ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers -func (r DeleteV0TeamsByIdMembersByUserIdResponse) ContentType() string { +func (r PostV0UsageCreditsSummaryResponse) ContentType() string { if r.HTTPResponse != nil { return r.HTTPResponse.Header.Get("Content-Type") } return "" } -type PostV0TeamsByIdMembersByUserIdResendInviteResponse struct { +type GetV0UsageRpcResponse struct { Body []byte HTTPResponse *http.Response // JSON200 the response for an HTTP 200 `application/json` response JSON200 *struct { - // Data The response object containing the following fields: + // Data The data object which contains the following fields: Data *struct { - // Message A message confirming the invitation was resent successfully - Message *string `json:"message,omitempty"` + // CreditsRemaining The number of credits remaining in the account + CreditsRemaining *int `json:"credits_remaining,omitempty"` + + // CreditsUsed The number of credits used within the specified time period + CreditsUsed *int `json:"credits_used,omitempty"` + + // EndTime The end timestamp for the usage data in second in second + EndTime *int `json:"end_time,omitempty"` + + // Limit The maximum number of credits available + Limit *int `json:"limit,omitempty"` + + // Overages The number of credits used beyond the limit + Overages *int `json:"overages,omitempty"` + + // StartTime The start timestamp for the usage data in second in second + StartTime *int `json:"start_time,omitempty"` } `json:"data,omitempty"` - // Error An error message if any issue occurs + // Error A string containing an error message, if any issues occur during the request Error *string `json:"error,omitempty"` } } // GetJSON200 returns the response for an HTTP 200 `application/json` response -func (r PostV0TeamsByIdMembersByUserIdResendInviteResponse) GetJSON200() *struct { - // Data The response object containing the following fields: +func (r GetV0UsageRpcResponse) GetJSON200() *struct { + // Data The data object which contains the following fields: Data *struct { - // Message A message confirming the invitation was resent successfully - Message *string `json:"message,omitempty"` + // CreditsRemaining The number of credits remaining in the account + CreditsRemaining *int `json:"credits_remaining,omitempty"` + + // CreditsUsed The number of credits used within the specified time period + CreditsUsed *int `json:"credits_used,omitempty"` + + // EndTime The end timestamp for the usage data in second in second + EndTime *int `json:"end_time,omitempty"` + + // Limit The maximum number of credits available + Limit *int `json:"limit,omitempty"` + + // Overages The number of credits used beyond the limit + Overages *int `json:"overages,omitempty"` + + // StartTime The start timestamp for the usage data in second in second + StartTime *int `json:"start_time,omitempty"` } `json:"data,omitempty"` - // Error An error message if any issue occurs + // Error A string containing an error message, if any issues occur during the request Error *string `json:"error,omitempty"` } { return r.JSON200 } // GetBody returns the raw response body bytes -func (r PostV0TeamsByIdMembersByUserIdResendInviteResponse) GetBody() []byte { +func (r GetV0UsageRpcResponse) GetBody() []byte { return r.Body } // Status returns HTTPResponse.Status -func (r PostV0TeamsByIdMembersByUserIdResendInviteResponse) Status() string { +func (r GetV0UsageRpcResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -11509,7 +14701,7 @@ func (r PostV0TeamsByIdMembersByUserIdResendInviteResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r PostV0TeamsByIdMembersByUserIdResendInviteResponse) StatusCode() int { +func (r GetV0UsageRpcResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } @@ -11517,68 +14709,92 @@ func (r PostV0TeamsByIdMembersByUserIdResendInviteResponse) StatusCode() int { } // ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers -func (r PostV0TeamsByIdMembersByUserIdResendInviteResponse) ContentType() string { +func (r GetV0UsageRpcResponse) ContentType() string { if r.HTTPResponse != nil { return r.HTTPResponse.Header.Get("Content-Type") } return "" } -type GetV0ToolingAccessResponse struct { +type GetV0UsageRpcByChainResponse struct { Body []byte HTTPResponse *http.Response // JSON200 the response for an HTTP 200 `application/json` response JSON200 *struct { - // Data An object which contains the following fields: + // Data The data object which contains the following fields: Data *struct { - // Enabled Whether Tooling Access is currently enabled for the account - Enabled *bool `json:"enabled,omitempty"` + // Chains An array of blockchains and their corresponding credit usage + Chains *[]struct { + // Bytes The total number of data bytes transferred on the specified blockchain (for example, Streams and Yellowstone gRPC data). Contributes to data_credits + Bytes *int `json:"bytes,omitempty"` - // EnabledAt The timestamp when Tooling Access was enabled - EnabledAt *string `json:"enabled_at,omitempty"` + // CreditsUsed The number of credits used by the specified blockchain (RPC credits and data credits combined) + CreditsUsed *int `json:"credits_used,omitempty"` - // EndpointId The unique identifier of the endpoint provisioned for Tooling Access - EndpointId *int `json:"endpoint_id,omitempty"` + // DataCredits The portion of credits_used consumed by data usage, such as Streams and Yellowstone gRPC bytes transferred + DataCredits *int `json:"data_credits,omitempty"` - // EndpointUrl The URL of the endpoint provisioned for Tooling Access. May be present even when disabled if the account was previously provisioned - EndpointUrl *string `json:"endpoint_url,omitempty"` + // Name The name of the blockchain + Name *string `json:"name,omitempty"` + + // RpcCredits The portion of credits_used consumed by RPC requests + RpcCredits *int `json:"rpc_credits,omitempty"` + } `json:"chains,omitempty"` + + // EndTime The end timestamp for the data in second in second + EndTime *int `json:"end_time,omitempty"` + + // StartTime The start timestamp for the data in second in second + StartTime *int `json:"start_time,omitempty"` } `json:"data,omitempty"` - // Error An error message if any issue occurs + // Error A field containing an error message if any issue occurs Error *string `json:"error,omitempty"` } } // GetJSON200 returns the response for an HTTP 200 `application/json` response -func (r GetV0ToolingAccessResponse) GetJSON200() *struct { - // Data An object which contains the following fields: +func (r GetV0UsageRpcByChainResponse) GetJSON200() *struct { + // Data The data object which contains the following fields: Data *struct { - // Enabled Whether Tooling Access is currently enabled for the account - Enabled *bool `json:"enabled,omitempty"` + // Chains An array of blockchains and their corresponding credit usage + Chains *[]struct { + // Bytes The total number of data bytes transferred on the specified blockchain (for example, Streams and Yellowstone gRPC data). Contributes to data_credits + Bytes *int `json:"bytes,omitempty"` - // EnabledAt The timestamp when Tooling Access was enabled - EnabledAt *string `json:"enabled_at,omitempty"` + // CreditsUsed The number of credits used by the specified blockchain (RPC credits and data credits combined) + CreditsUsed *int `json:"credits_used,omitempty"` - // EndpointId The unique identifier of the endpoint provisioned for Tooling Access - EndpointId *int `json:"endpoint_id,omitempty"` + // DataCredits The portion of credits_used consumed by data usage, such as Streams and Yellowstone gRPC bytes transferred + DataCredits *int `json:"data_credits,omitempty"` - // EndpointUrl The URL of the endpoint provisioned for Tooling Access. May be present even when disabled if the account was previously provisioned - EndpointUrl *string `json:"endpoint_url,omitempty"` + // Name The name of the blockchain + Name *string `json:"name,omitempty"` + + // RpcCredits The portion of credits_used consumed by RPC requests + RpcCredits *int `json:"rpc_credits,omitempty"` + } `json:"chains,omitempty"` + + // EndTime The end timestamp for the data in second in second + EndTime *int `json:"end_time,omitempty"` + + // StartTime The start timestamp for the data in second in second + StartTime *int `json:"start_time,omitempty"` } `json:"data,omitempty"` - // Error An error message if any issue occurs + // Error A field containing an error message if any issue occurs Error *string `json:"error,omitempty"` } { return r.JSON200 } // GetBody returns the raw response body bytes -func (r GetV0ToolingAccessResponse) GetBody() []byte { +func (r GetV0UsageRpcByChainResponse) GetBody() []byte { return r.Body } // Status returns HTTPResponse.Status -func (r GetV0ToolingAccessResponse) Status() string { +func (r GetV0UsageRpcByChainResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -11586,7 +14802,7 @@ func (r GetV0ToolingAccessResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r GetV0ToolingAccessResponse) StatusCode() int { +func (r GetV0UsageRpcByChainResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } @@ -11594,127 +14810,152 @@ func (r GetV0ToolingAccessResponse) StatusCode() int { } // ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers -func (r GetV0ToolingAccessResponse) ContentType() string { +func (r GetV0UsageRpcByChainResponse) ContentType() string { if r.HTTPResponse != nil { return r.HTTPResponse.Header.Get("Content-Type") } return "" } -type PatchV0ToolingAccessResponse struct { +type GetV0UsageRpcByEndpointResponse struct { Body []byte HTTPResponse *http.Response // JSON200 the response for an HTTP 200 `application/json` response JSON200 *struct { - // Data An object which contains the following fields: + // Data The data object which contains the following fields: Data *struct { - // Enabled Whether Tooling Access is enabled after the update - Enabled *bool `json:"enabled,omitempty"` + // EndTime The end timestamp for the data in second in second + EndTime *int `json:"end_time,omitempty"` + + // Endpoints An array of endpoints which contains the following fields: + Endpoints *[]struct { + // Bytes The total number of data bytes transferred by the endpoint (for example, Streams and Yellowstone gRPC data). Contributes to data_credits + Bytes *int `json:"bytes,omitempty"` + + // Chain The blockchain associated with the endpoint + Chain *string `json:"chain,omitempty"` + + // CreditsUsed The total number of credits used by the endpoint (RPC credits and data credits combined) + CreditsUsed *int `json:"credits_used,omitempty"` + + // DataCredits The portion of credits_used consumed by data usage, such as Streams and Yellowstone gRPC bytes transferred + DataCredits *int `json:"data_credits,omitempty"` + + // Label A custom label for the endpoint + Label *string `json:"label,omitempty"` + + // MethodsBreakdown An array of methods_breakdown + MethodsBreakdown *[]struct { + // Archive Indicates whether the request is using archived data + Archive *bool `json:"archive,omitempty"` + + // Bytes The number of data bytes transferred by the method (for streaming methods such as /geyser.geyser/subscribe) + Bytes *int `json:"bytes,omitempty"` + + // CreditsUsed The number of credits used by the method (RPC credits and data credits combined) + CreditsUsed *int `json:"credits_used,omitempty"` + + // MethodName The name of the method called. Streaming methods such as /geyser.geyser/subscribe also appear here with the data they transfer + MethodName *string `json:"method_name,omitempty"` + } `json:"methods_breakdown,omitempty"` + + // Name The name of the endpoint + Name *string `json:"name,omitempty"` + + // Network The specific network on the blockchain + Network *string `json:"network,omitempty"` + + // Requests The total number of requests made to the endpoint + Requests *int `json:"requests,omitempty"` + + // RpcCredits The portion of credits_used consumed by RPC requests + RpcCredits *int `json:"rpc_credits,omitempty"` + + // Status The current state of the RPC endpoint. Possible values include: active, archived, paused or terminated + Status *string `json:"status,omitempty"` + } `json:"endpoints,omitempty"` - // EndpointUrl The URL of the endpoint provisioned for Tooling Access - EndpointUrl *string `json:"endpoint_url,omitempty"` + // StartTime The start timestamp for the data in second in second + StartTime *int `json:"start_time,omitempty"` } `json:"data,omitempty"` - // Error An error message if any issue occurs + // Error A field containing an error message if any issue occurs Error *string `json:"error,omitempty"` } } // GetJSON200 returns the response for an HTTP 200 `application/json` response -func (r PatchV0ToolingAccessResponse) GetJSON200() *struct { - // Data An object which contains the following fields: +func (r GetV0UsageRpcByEndpointResponse) GetJSON200() *struct { + // Data The data object which contains the following fields: Data *struct { - // Enabled Whether Tooling Access is enabled after the update - Enabled *bool `json:"enabled,omitempty"` + // EndTime The end timestamp for the data in second in second + EndTime *int `json:"end_time,omitempty"` - // EndpointUrl The URL of the endpoint provisioned for Tooling Access - EndpointUrl *string `json:"endpoint_url,omitempty"` - } `json:"data,omitempty"` + // Endpoints An array of endpoints which contains the following fields: + Endpoints *[]struct { + // Bytes The total number of data bytes transferred by the endpoint (for example, Streams and Yellowstone gRPC data). Contributes to data_credits + Bytes *int `json:"bytes,omitempty"` - // Error An error message if any issue occurs - Error *string `json:"error,omitempty"` -} { - return r.JSON200 -} + // Chain The blockchain associated with the endpoint + Chain *string `json:"chain,omitempty"` -// GetBody returns the raw response body bytes -func (r PatchV0ToolingAccessResponse) GetBody() []byte { - return r.Body -} + // CreditsUsed The total number of credits used by the endpoint (RPC credits and data credits combined) + CreditsUsed *int `json:"credits_used,omitempty"` -// Status returns HTTPResponse.Status -func (r PatchV0ToolingAccessResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} + // DataCredits The portion of credits_used consumed by data usage, such as Streams and Yellowstone gRPC bytes transferred + DataCredits *int `json:"data_credits,omitempty"` -// StatusCode returns HTTPResponse.StatusCode -func (r PatchV0ToolingAccessResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} + // Label A custom label for the endpoint + Label *string `json:"label,omitempty"` -// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers -func (r PatchV0ToolingAccessResponse) ContentType() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Header.Get("Content-Type") - } - return "" -} + // MethodsBreakdown An array of methods_breakdown + MethodsBreakdown *[]struct { + // Archive Indicates whether the request is using archived data + Archive *bool `json:"archive,omitempty"` -type PostV0ToolingAccessTokenResponse struct { - Body []byte - HTTPResponse *http.Response - // JSON200 the response for an HTTP 200 `application/json` response - JSON200 *struct { - // Data An object which contains the following fields: - Data *struct { - // EndpointUrl The URL of the Tooling Access endpoint the token authenticates against - EndpointUrl *string `json:"endpoint_url,omitempty"` + // Bytes The number of data bytes transferred by the method (for streaming methods such as /geyser.geyser/subscribe) + Bytes *int `json:"bytes,omitempty"` - // ExpiresAt The timestamp when the token expires - ExpiresAt *string `json:"expires_at,omitempty"` + // CreditsUsed The number of credits used by the method (RPC credits and data credits combined) + CreditsUsed *int `json:"credits_used,omitempty"` - // Token The short-lived ES256 JWT used to authenticate RPC calls - Token *string `json:"token,omitempty"` - } `json:"data,omitempty"` + // MethodName The name of the method called. Streaming methods such as /geyser.geyser/subscribe also appear here with the data they transfer + MethodName *string `json:"method_name,omitempty"` + } `json:"methods_breakdown,omitempty"` - // Error An error message if any issue occurs - Error *string `json:"error,omitempty"` - } -} + // Name The name of the endpoint + Name *string `json:"name,omitempty"` -// GetJSON200 returns the response for an HTTP 200 `application/json` response -func (r PostV0ToolingAccessTokenResponse) GetJSON200() *struct { - // Data An object which contains the following fields: - Data *struct { - // EndpointUrl The URL of the Tooling Access endpoint the token authenticates against - EndpointUrl *string `json:"endpoint_url,omitempty"` + // Network The specific network on the blockchain + Network *string `json:"network,omitempty"` - // ExpiresAt The timestamp when the token expires - ExpiresAt *string `json:"expires_at,omitempty"` + // Requests The total number of requests made to the endpoint + Requests *int `json:"requests,omitempty"` - // Token The short-lived ES256 JWT used to authenticate RPC calls - Token *string `json:"token,omitempty"` + // RpcCredits The portion of credits_used consumed by RPC requests + RpcCredits *int `json:"rpc_credits,omitempty"` + + // Status The current state of the RPC endpoint. Possible values include: active, archived, paused or terminated + Status *string `json:"status,omitempty"` + } `json:"endpoints,omitempty"` + + // StartTime The start timestamp for the data in second in second + StartTime *int `json:"start_time,omitempty"` } `json:"data,omitempty"` - // Error An error message if any issue occurs + // Error A field containing an error message if any issue occurs Error *string `json:"error,omitempty"` } { return r.JSON200 } // GetBody returns the raw response body bytes -func (r PostV0ToolingAccessTokenResponse) GetBody() []byte { +func (r GetV0UsageRpcByEndpointResponse) GetBody() []byte { return r.Body } // Status returns HTTPResponse.Status -func (r PostV0ToolingAccessTokenResponse) Status() string { +func (r GetV0UsageRpcByEndpointResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -11722,7 +14963,7 @@ func (r PostV0ToolingAccessTokenResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r PostV0ToolingAccessTokenResponse) StatusCode() int { +func (r GetV0UsageRpcByEndpointResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } @@ -11730,80 +14971,86 @@ func (r PostV0ToolingAccessTokenResponse) StatusCode() int { } // ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers -func (r PostV0ToolingAccessTokenResponse) ContentType() string { +func (r GetV0UsageRpcByEndpointResponse) ContentType() string { if r.HTTPResponse != nil { return r.HTTPResponse.Header.Get("Content-Type") } return "" } -type GetV0UsageRpcResponse struct { +type GetV0UsageRpcByMethodResponse struct { Body []byte HTTPResponse *http.Response // JSON200 the response for an HTTP 200 `application/json` response JSON200 *struct { // Data The data object which contains the following fields: Data *struct { - // CreditsRemaining The number of credits remaining in the account - CreditsRemaining *int `json:"credits_remaining,omitempty"` + // EndTime The end timestamp for the data in second + EndTime *int `json:"end_time,omitempty"` - // CreditsUsed The number of credits used within the specified time period - CreditsUsed *int `json:"credits_used,omitempty"` + // Methods An array of method calls and their corresponding credit usage + Methods *[]struct { + // Archive Indicates whether the request used archived data + Archive *bool `json:"archive,omitempty"` - // EndTime The end timestamp for the usage data in second in second - EndTime *int `json:"end_time,omitempty"` + // Bytes The number of data bytes transferred by the method (for streaming methods such as /geyser.geyser/subscribe) + Bytes *int `json:"bytes,omitempty"` - // Limit The maximum number of credits available - Limit *int `json:"limit,omitempty"` + // CreditsUsed The number of credits used by the method (RPC credits and data credits combined) + CreditsUsed *int `json:"credits_used,omitempty"` - // Overages The number of credits used beyond the limit - Overages *int `json:"overages,omitempty"` + // MethodName The name of the method called. Streaming methods such as /geyser.geyser/subscribe also appear here with the data they transfer + MethodName *string `json:"method_name,omitempty"` + } `json:"methods,omitempty"` - // StartTime The start timestamp for the usage data in second in second + // StartTime The start timestamp for the data in second StartTime *int `json:"start_time,omitempty"` } `json:"data,omitempty"` - // Error A string containing an error message, if any issues occur during the request + // Error A field containing an error message if any issue occurs Error *string `json:"error,omitempty"` } } // GetJSON200 returns the response for an HTTP 200 `application/json` response -func (r GetV0UsageRpcResponse) GetJSON200() *struct { +func (r GetV0UsageRpcByMethodResponse) GetJSON200() *struct { // Data The data object which contains the following fields: Data *struct { - // CreditsRemaining The number of credits remaining in the account - CreditsRemaining *int `json:"credits_remaining,omitempty"` + // EndTime The end timestamp for the data in second + EndTime *int `json:"end_time,omitempty"` - // CreditsUsed The number of credits used within the specified time period - CreditsUsed *int `json:"credits_used,omitempty"` + // Methods An array of method calls and their corresponding credit usage + Methods *[]struct { + // Archive Indicates whether the request used archived data + Archive *bool `json:"archive,omitempty"` - // EndTime The end timestamp for the usage data in second in second - EndTime *int `json:"end_time,omitempty"` + // Bytes The number of data bytes transferred by the method (for streaming methods such as /geyser.geyser/subscribe) + Bytes *int `json:"bytes,omitempty"` - // Limit The maximum number of credits available - Limit *int `json:"limit,omitempty"` + // CreditsUsed The number of credits used by the method (RPC credits and data credits combined) + CreditsUsed *int `json:"credits_used,omitempty"` - // Overages The number of credits used beyond the limit - Overages *int `json:"overages,omitempty"` + // MethodName The name of the method called. Streaming methods such as /geyser.geyser/subscribe also appear here with the data they transfer + MethodName *string `json:"method_name,omitempty"` + } `json:"methods,omitempty"` - // StartTime The start timestamp for the usage data in second in second + // StartTime The start timestamp for the data in second StartTime *int `json:"start_time,omitempty"` } `json:"data,omitempty"` - // Error A string containing an error message, if any issues occur during the request + // Error A field containing an error message if any issue occurs Error *string `json:"error,omitempty"` } { return r.JSON200 } // GetBody returns the raw response body bytes -func (r GetV0UsageRpcResponse) GetBody() []byte { +func (r GetV0UsageRpcByMethodResponse) GetBody() []byte { return r.Body } // Status returns HTTPResponse.Status -func (r GetV0UsageRpcResponse) Status() string { +func (r GetV0UsageRpcByMethodResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -11811,7 +15058,7 @@ func (r GetV0UsageRpcResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r GetV0UsageRpcResponse) StatusCode() int { +func (r GetV0UsageRpcByMethodResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } @@ -11819,92 +15066,104 @@ func (r GetV0UsageRpcResponse) StatusCode() int { } // ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers -func (r GetV0UsageRpcResponse) ContentType() string { +func (r GetV0UsageRpcByMethodResponse) ContentType() string { if r.HTTPResponse != nil { return r.HTTPResponse.Header.Get("Content-Type") } return "" } -type GetV0UsageRpcByChainResponse struct { +type GetV0UsageRpcByTagResponse struct { Body []byte HTTPResponse *http.Response // JSON200 the response for an HTTP 200 `application/json` response JSON200 *struct { - // Data The data object which contains the following fields: + // Data Contains usage data grouped by tag Data *struct { - // Chains An array of blockchains and their corresponding credit usage - Chains *[]struct { - // Bytes The total number of data bytes transferred on the specified blockchain (for example, Streams and Yellowstone gRPC data). Contributes to data_credits + // EndTime The end time of the usage period as a unix timestamp + EndTime *int `json:"end_time,omitempty"` + + // StartTime The start time of the usage period as a unix timestamp + StartTime *int `json:"start_time,omitempty"` + + // Tags An array of usage data objects, one per tag + Tags *[]struct { + // Bytes The total number of data bytes transferred by endpoints with this tag (for example, Streams and Yellowstone gRPC data). Contributes to data_credits Bytes *int `json:"bytes,omitempty"` - // CreditsUsed The number of credits used by the specified blockchain (RPC credits and data credits combined) + // CreditsUsed The total number of credits used by endpoints with this tag (RPC credits and data credits combined) CreditsUsed *int `json:"credits_used,omitempty"` // DataCredits The portion of credits_used consumed by data usage, such as Streams and Yellowstone gRPC bytes transferred DataCredits *int `json:"data_credits,omitempty"` - // Name The name of the blockchain - Name *string `json:"name,omitempty"` + // Label The label/name of the tag + Label *string `json:"label,omitempty"` + + // Requests The total number of requests made by endpoints with this tag + Requests *int `json:"requests,omitempty"` // RpcCredits The portion of credits_used consumed by RPC requests RpcCredits *int `json:"rpc_credits,omitempty"` - } `json:"chains,omitempty"` - - // EndTime The end timestamp for the data in second in second - EndTime *int `json:"end_time,omitempty"` - // StartTime The start timestamp for the data in second in second - StartTime *int `json:"start_time,omitempty"` + // TagId The unique identifier of the tag + TagId *int `json:"tag_id,omitempty"` + } `json:"tags,omitempty"` } `json:"data,omitempty"` - // Error A field containing an error message if any issue occurs + // Error Contains error details if the request failed; null if successful Error *string `json:"error,omitempty"` } } // GetJSON200 returns the response for an HTTP 200 `application/json` response -func (r GetV0UsageRpcByChainResponse) GetJSON200() *struct { - // Data The data object which contains the following fields: +func (r GetV0UsageRpcByTagResponse) GetJSON200() *struct { + // Data Contains usage data grouped by tag Data *struct { - // Chains An array of blockchains and their corresponding credit usage - Chains *[]struct { - // Bytes The total number of data bytes transferred on the specified blockchain (for example, Streams and Yellowstone gRPC data). Contributes to data_credits + // EndTime The end time of the usage period as a unix timestamp + EndTime *int `json:"end_time,omitempty"` + + // StartTime The start time of the usage period as a unix timestamp + StartTime *int `json:"start_time,omitempty"` + + // Tags An array of usage data objects, one per tag + Tags *[]struct { + // Bytes The total number of data bytes transferred by endpoints with this tag (for example, Streams and Yellowstone gRPC data). Contributes to data_credits Bytes *int `json:"bytes,omitempty"` - // CreditsUsed The number of credits used by the specified blockchain (RPC credits and data credits combined) + // CreditsUsed The total number of credits used by endpoints with this tag (RPC credits and data credits combined) CreditsUsed *int `json:"credits_used,omitempty"` // DataCredits The portion of credits_used consumed by data usage, such as Streams and Yellowstone gRPC bytes transferred DataCredits *int `json:"data_credits,omitempty"` - // Name The name of the blockchain - Name *string `json:"name,omitempty"` + // Label The label/name of the tag + Label *string `json:"label,omitempty"` + + // Requests The total number of requests made by endpoints with this tag + Requests *int `json:"requests,omitempty"` // RpcCredits The portion of credits_used consumed by RPC requests RpcCredits *int `json:"rpc_credits,omitempty"` - } `json:"chains,omitempty"` - - // EndTime The end timestamp for the data in second in second - EndTime *int `json:"end_time,omitempty"` - // StartTime The start timestamp for the data in second in second - StartTime *int `json:"start_time,omitempty"` + // TagId The unique identifier of the tag + TagId *int `json:"tag_id,omitempty"` + } `json:"tags,omitempty"` } `json:"data,omitempty"` - // Error A field containing an error message if any issue occurs + // Error Contains error details if the request failed; null if successful Error *string `json:"error,omitempty"` } { return r.JSON200 } // GetBody returns the raw response body bytes -func (r GetV0UsageRpcByChainResponse) GetBody() []byte { +func (r GetV0UsageRpcByTagResponse) GetBody() []byte { return r.Body } // Status returns HTTPResponse.Status -func (r GetV0UsageRpcByChainResponse) Status() string { +func (r GetV0UsageRpcByTagResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -11912,7 +15171,7 @@ func (r GetV0UsageRpcByChainResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r GetV0UsageRpcByChainResponse) StatusCode() int { +func (r GetV0UsageRpcByTagResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } @@ -11920,152 +15179,152 @@ func (r GetV0UsageRpcByChainResponse) StatusCode() int { } // ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers -func (r GetV0UsageRpcByChainResponse) ContentType() string { +func (r GetV0UsageRpcByTagResponse) ContentType() string { if r.HTTPResponse != nil { return r.HTTPResponse.Header.Get("Content-Type") } return "" } -type GetV0UsageRpcByEndpointResponse struct { +type PostV0UsageRpcSummaryResponse struct { Body []byte HTTPResponse *http.Response // JSON200 the response for an HTTP 200 `application/json` response JSON200 *struct { - // Data The data object which contains the following fields: + // Data Response data. Null when the request fails. Data *struct { - // EndTime The end timestamp for the data in second in second - EndTime *int `json:"end_time,omitempty"` - - // Endpoints An array of endpoints which contains the following fields: - Endpoints *[]struct { - // Bytes The total number of data bytes transferred by the endpoint (for example, Streams and Yellowstone gRPC data). Contributes to data_credits + // Breakdown Grouped results. Present when grouping is requested; can be empty. + Breakdown *[]struct { + // Bytes Number of bytes transferred. Bytes *int `json:"bytes,omitempty"` - // Chain The blockchain associated with the endpoint - Chain *string `json:"chain,omitempty"` - - // CreditsUsed The total number of credits used by the endpoint (RPC credits and data credits combined) - CreditsUsed *int `json:"credits_used,omitempty"` + // Credits Total API credits consumed. + Credits *int `json:"credits,omitempty"` - // DataCredits The portion of credits_used consumed by data usage, such as Streams and Yellowstone gRPC bytes transferred + // DataCredits Credits consumed by data transfer. DataCredits *int `json:"data_credits,omitempty"` - // Label A custom label for the endpoint - Label *string `json:"label,omitempty"` + // Endpoint Endpoint UUID; present when grouping by endpoint. + Endpoint *string `json:"endpoint,omitempty"` - // MethodsBreakdown An array of methods_breakdown - MethodsBreakdown *[]struct { - // Archive Indicates whether the request is using archived data - Archive *bool `json:"archive,omitempty"` + // Method RPC method name. In a breakdown, present when grouping by method. + Method *string `json:"method,omitempty"` - // Bytes The number of data bytes transferred by the method (for streaming methods such as /geyser.geyser/subscribe) - Bytes *int `json:"bytes,omitempty"` + // Network Present when grouping by network. + Network *string `json:"network,omitempty"` - // CreditsUsed The number of credits used by the method (RPC credits and data credits combined) - CreditsUsed *int `json:"credits_used,omitempty"` + // Requests Number of RPC requests. + Requests *int `json:"requests,omitempty"` - // MethodName The name of the method called. Streaming methods such as /geyser.geyser/subscribe also appear here with the data they transfer - MethodName *string `json:"method_name,omitempty"` - } `json:"methods_breakdown,omitempty"` + // RpcCredits Credits consumed by RPC requests. + RpcCredits *int `json:"rpc_credits,omitempty"` + } `json:"breakdown,omitempty"` - // Name The name of the endpoint - Name *string `json:"name,omitempty"` + // From Effective start of the returned time range, in ISO 8601 format. + From *string `json:"from,omitempty"` - // Network The specific network on the blockchain - Network *string `json:"network,omitempty"` + // NextCursor Opaque continuation cursor. Present when another page is available. Pass it unchanged as cursor. + NextCursor *string `json:"next_cursor,omitempty"` - // Requests The total number of requests made to the endpoint - Requests *int `json:"requests,omitempty"` + // To Effective end of the returned time range, in ISO 8601 format. + To *string `json:"to,omitempty"` - // RpcCredits The portion of credits_used consumed by RPC requests - RpcCredits *int `json:"rpc_credits,omitempty"` + // Totals Aggregate totals for the selected time range. + Totals *struct { + // Bytes Number of bytes transferred. + Bytes *int `json:"bytes,omitempty"` - // Status The current state of the RPC endpoint. Possible values include: active, archived, paused or terminated - Status *string `json:"status,omitempty"` - } `json:"endpoints,omitempty"` + // Credits Total API credits consumed. + Credits *int `json:"credits,omitempty"` - // StartTime The start timestamp for the data in second in second - StartTime *int `json:"start_time,omitempty"` + // DataCredits Credits consumed by data transfer. + DataCredits *int `json:"data_credits,omitempty"` + + // Requests Number of RPC requests. + Requests *int `json:"requests,omitempty"` + + // RpcCredits Credits consumed by RPC requests. + RpcCredits *int `json:"rpc_credits,omitempty"` + } `json:"totals,omitempty"` } `json:"data,omitempty"` - // Error A field containing an error message if any issue occurs + // Error Error message on failure; null on success. Error *string `json:"error,omitempty"` } } // GetJSON200 returns the response for an HTTP 200 `application/json` response -func (r GetV0UsageRpcByEndpointResponse) GetJSON200() *struct { - // Data The data object which contains the following fields: +func (r PostV0UsageRpcSummaryResponse) GetJSON200() *struct { + // Data Response data. Null when the request fails. Data *struct { - // EndTime The end timestamp for the data in second in second - EndTime *int `json:"end_time,omitempty"` - - // Endpoints An array of endpoints which contains the following fields: - Endpoints *[]struct { - // Bytes The total number of data bytes transferred by the endpoint (for example, Streams and Yellowstone gRPC data). Contributes to data_credits + // Breakdown Grouped results. Present when grouping is requested; can be empty. + Breakdown *[]struct { + // Bytes Number of bytes transferred. Bytes *int `json:"bytes,omitempty"` - // Chain The blockchain associated with the endpoint - Chain *string `json:"chain,omitempty"` - - // CreditsUsed The total number of credits used by the endpoint (RPC credits and data credits combined) - CreditsUsed *int `json:"credits_used,omitempty"` + // Credits Total API credits consumed. + Credits *int `json:"credits,omitempty"` - // DataCredits The portion of credits_used consumed by data usage, such as Streams and Yellowstone gRPC bytes transferred + // DataCredits Credits consumed by data transfer. DataCredits *int `json:"data_credits,omitempty"` - // Label A custom label for the endpoint - Label *string `json:"label,omitempty"` + // Endpoint Endpoint UUID; present when grouping by endpoint. + Endpoint *string `json:"endpoint,omitempty"` - // MethodsBreakdown An array of methods_breakdown - MethodsBreakdown *[]struct { - // Archive Indicates whether the request is using archived data - Archive *bool `json:"archive,omitempty"` + // Method RPC method name. In a breakdown, present when grouping by method. + Method *string `json:"method,omitempty"` - // Bytes The number of data bytes transferred by the method (for streaming methods such as /geyser.geyser/subscribe) - Bytes *int `json:"bytes,omitempty"` + // Network Present when grouping by network. + Network *string `json:"network,omitempty"` - // CreditsUsed The number of credits used by the method (RPC credits and data credits combined) - CreditsUsed *int `json:"credits_used,omitempty"` + // Requests Number of RPC requests. + Requests *int `json:"requests,omitempty"` - // MethodName The name of the method called. Streaming methods such as /geyser.geyser/subscribe also appear here with the data they transfer - MethodName *string `json:"method_name,omitempty"` - } `json:"methods_breakdown,omitempty"` + // RpcCredits Credits consumed by RPC requests. + RpcCredits *int `json:"rpc_credits,omitempty"` + } `json:"breakdown,omitempty"` - // Name The name of the endpoint - Name *string `json:"name,omitempty"` + // From Effective start of the returned time range, in ISO 8601 format. + From *string `json:"from,omitempty"` - // Network The specific network on the blockchain - Network *string `json:"network,omitempty"` + // NextCursor Opaque continuation cursor. Present when another page is available. Pass it unchanged as cursor. + NextCursor *string `json:"next_cursor,omitempty"` - // Requests The total number of requests made to the endpoint - Requests *int `json:"requests,omitempty"` + // To Effective end of the returned time range, in ISO 8601 format. + To *string `json:"to,omitempty"` - // RpcCredits The portion of credits_used consumed by RPC requests - RpcCredits *int `json:"rpc_credits,omitempty"` + // Totals Aggregate totals for the selected time range. + Totals *struct { + // Bytes Number of bytes transferred. + Bytes *int `json:"bytes,omitempty"` - // Status The current state of the RPC endpoint. Possible values include: active, archived, paused or terminated - Status *string `json:"status,omitempty"` - } `json:"endpoints,omitempty"` + // Credits Total API credits consumed. + Credits *int `json:"credits,omitempty"` - // StartTime The start timestamp for the data in second in second - StartTime *int `json:"start_time,omitempty"` + // DataCredits Credits consumed by data transfer. + DataCredits *int `json:"data_credits,omitempty"` + + // Requests Number of RPC requests. + Requests *int `json:"requests,omitempty"` + + // RpcCredits Credits consumed by RPC requests. + RpcCredits *int `json:"rpc_credits,omitempty"` + } `json:"totals,omitempty"` } `json:"data,omitempty"` - // Error A field containing an error message if any issue occurs + // Error Error message on failure; null on success. Error *string `json:"error,omitempty"` } { return r.JSON200 } // GetBody returns the raw response body bytes -func (r GetV0UsageRpcByEndpointResponse) GetBody() []byte { +func (r PostV0UsageRpcSummaryResponse) GetBody() []byte { return r.Body } // Status returns HTTPResponse.Status -func (r GetV0UsageRpcByEndpointResponse) Status() string { +func (r PostV0UsageRpcSummaryResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -12073,7 +15332,7 @@ func (r GetV0UsageRpcByEndpointResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r GetV0UsageRpcByEndpointResponse) StatusCode() int { +func (r PostV0UsageRpcSummaryResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } @@ -12081,86 +15340,116 @@ func (r GetV0UsageRpcByEndpointResponse) StatusCode() int { } // ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers -func (r GetV0UsageRpcByEndpointResponse) ContentType() string { +func (r PostV0UsageRpcSummaryResponse) ContentType() string { if r.HTTPResponse != nil { return r.HTTPResponse.Header.Get("Content-Type") } return "" } -type GetV0UsageRpcByMethodResponse struct { +type PostV0UsageStreamsSummaryResponse struct { Body []byte HTTPResponse *http.Response // JSON200 the response for an HTTP 200 `application/json` response JSON200 *struct { - // Data The data object which contains the following fields: + // Data Response data. Null when the request fails. Data *struct { - // EndTime The end timestamp for the data in second - EndTime *int `json:"end_time,omitempty"` + // Breakdown Grouped results. Present when grouping is requested; can be empty. + Breakdown *[]struct { + // BlockCredits Credits consumed by Streams blocks. + BlockCredits *int `json:"block_credits,omitempty"` - // Methods An array of method calls and their corresponding credit usage - Methods *[]struct { - // Archive Indicates whether the request used archived data - Archive *bool `json:"archive,omitempty"` + // Blocks Number of Streams blocks processed. + Blocks *int `json:"blocks,omitempty"` - // Bytes The number of data bytes transferred by the method (for streaming methods such as /geyser.geyser/subscribe) + // Bytes Number of bytes transferred. Bytes *int `json:"bytes,omitempty"` - // CreditsUsed The number of credits used by the method (RPC credits and data credits combined) - CreditsUsed *int `json:"credits_used,omitempty"` + // Stream Stream identifier. Present when grouping by stream. + Stream *string `json:"stream,omitempty"` + } `json:"breakdown,omitempty"` - // MethodName The name of the method called. Streaming methods such as /geyser.geyser/subscribe also appear here with the data they transfer - MethodName *string `json:"method_name,omitempty"` - } `json:"methods,omitempty"` + // From Effective start of the returned time range, in ISO 8601 format. + From *string `json:"from,omitempty"` - // StartTime The start timestamp for the data in second - StartTime *int `json:"start_time,omitempty"` + // NextCursor Opaque continuation cursor. Present when another page is available. Pass it unchanged as cursor. + NextCursor *string `json:"next_cursor,omitempty"` + + // To Effective end of the returned time range, in ISO 8601 format. + To *string `json:"to,omitempty"` + + // Totals Aggregate totals for the selected time range. + Totals *struct { + // BlockCredits Credits consumed by Streams blocks. + BlockCredits *int `json:"block_credits,omitempty"` + + // Blocks Number of Streams blocks processed. + Blocks *int `json:"blocks,omitempty"` + + // Bytes Number of bytes transferred. + Bytes *int `json:"bytes,omitempty"` + } `json:"totals,omitempty"` } `json:"data,omitempty"` - // Error A field containing an error message if any issue occurs + // Error Error message on failure; null on success. Error *string `json:"error,omitempty"` } } // GetJSON200 returns the response for an HTTP 200 `application/json` response -func (r GetV0UsageRpcByMethodResponse) GetJSON200() *struct { - // Data The data object which contains the following fields: +func (r PostV0UsageStreamsSummaryResponse) GetJSON200() *struct { + // Data Response data. Null when the request fails. Data *struct { - // EndTime The end timestamp for the data in second - EndTime *int `json:"end_time,omitempty"` + // Breakdown Grouped results. Present when grouping is requested; can be empty. + Breakdown *[]struct { + // BlockCredits Credits consumed by Streams blocks. + BlockCredits *int `json:"block_credits,omitempty"` - // Methods An array of method calls and their corresponding credit usage - Methods *[]struct { - // Archive Indicates whether the request used archived data - Archive *bool `json:"archive,omitempty"` + // Blocks Number of Streams blocks processed. + Blocks *int `json:"blocks,omitempty"` - // Bytes The number of data bytes transferred by the method (for streaming methods such as /geyser.geyser/subscribe) + // Bytes Number of bytes transferred. Bytes *int `json:"bytes,omitempty"` - // CreditsUsed The number of credits used by the method (RPC credits and data credits combined) - CreditsUsed *int `json:"credits_used,omitempty"` + // Stream Stream identifier. Present when grouping by stream. + Stream *string `json:"stream,omitempty"` + } `json:"breakdown,omitempty"` - // MethodName The name of the method called. Streaming methods such as /geyser.geyser/subscribe also appear here with the data they transfer - MethodName *string `json:"method_name,omitempty"` - } `json:"methods,omitempty"` + // From Effective start of the returned time range, in ISO 8601 format. + From *string `json:"from,omitempty"` - // StartTime The start timestamp for the data in second - StartTime *int `json:"start_time,omitempty"` + // NextCursor Opaque continuation cursor. Present when another page is available. Pass it unchanged as cursor. + NextCursor *string `json:"next_cursor,omitempty"` + + // To Effective end of the returned time range, in ISO 8601 format. + To *string `json:"to,omitempty"` + + // Totals Aggregate totals for the selected time range. + Totals *struct { + // BlockCredits Credits consumed by Streams blocks. + BlockCredits *int `json:"block_credits,omitempty"` + + // Blocks Number of Streams blocks processed. + Blocks *int `json:"blocks,omitempty"` + + // Bytes Number of bytes transferred. + Bytes *int `json:"bytes,omitempty"` + } `json:"totals,omitempty"` } `json:"data,omitempty"` - // Error A field containing an error message if any issue occurs + // Error Error message on failure; null on success. Error *string `json:"error,omitempty"` } { return r.JSON200 } // GetBody returns the raw response body bytes -func (r GetV0UsageRpcByMethodResponse) GetBody() []byte { +func (r PostV0UsageStreamsSummaryResponse) GetBody() []byte { return r.Body } // Status returns HTTPResponse.Status -func (r GetV0UsageRpcByMethodResponse) Status() string { +func (r PostV0UsageStreamsSummaryResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -12168,7 +15457,7 @@ func (r GetV0UsageRpcByMethodResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r GetV0UsageRpcByMethodResponse) StatusCode() int { +func (r PostV0UsageStreamsSummaryResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } @@ -12176,104 +15465,104 @@ func (r GetV0UsageRpcByMethodResponse) StatusCode() int { } // ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers -func (r GetV0UsageRpcByMethodResponse) ContentType() string { +func (r PostV0UsageStreamsSummaryResponse) ContentType() string { if r.HTTPResponse != nil { return r.HTTPResponse.Header.Get("Content-Type") } return "" } -type GetV0UsageRpcByTagResponse struct { +type PostV0UsageWebhooksSummaryResponse struct { Body []byte HTTPResponse *http.Response // JSON200 the response for an HTTP 200 `application/json` response JSON200 *struct { - // Data Contains usage data grouped by tag + // Data Response data. Null when the request fails. Data *struct { - // EndTime The end time of the usage period as a unix timestamp - EndTime *int `json:"end_time,omitempty"` - - // StartTime The start time of the usage period as a unix timestamp - StartTime *int `json:"start_time,omitempty"` + // Breakdown Grouped results. Present when grouping is requested; can be empty. + Breakdown *[]struct { + // Credits Total API credits consumed. + Credits *int `json:"credits,omitempty"` - // Tags An array of usage data objects, one per tag - Tags *[]struct { - // Bytes The total number of data bytes transferred by endpoints with this tag (for example, Streams and Yellowstone gRPC data). Contributes to data_credits - Bytes *int `json:"bytes,omitempty"` + // Deliveries Number of Webhooks deliveries. + Deliveries *int `json:"deliveries,omitempty"` - // CreditsUsed The total number of credits used by endpoints with this tag (RPC credits and data credits combined) - CreditsUsed *int `json:"credits_used,omitempty"` + // Webhook Webhook identifier. Present when grouping by webhook. + Webhook *string `json:"webhook,omitempty"` + } `json:"breakdown,omitempty"` - // DataCredits The portion of credits_used consumed by data usage, such as Streams and Yellowstone gRPC bytes transferred - DataCredits *int `json:"data_credits,omitempty"` + // From Effective start of the returned time range, in ISO 8601 format. + From *string `json:"from,omitempty"` - // Label The label/name of the tag - Label *string `json:"label,omitempty"` + // NextCursor Opaque continuation cursor. Present when another page is available. Pass it unchanged as cursor. + NextCursor *string `json:"next_cursor,omitempty"` - // Requests The total number of requests made by endpoints with this tag - Requests *int `json:"requests,omitempty"` + // To Effective end of the returned time range, in ISO 8601 format. + To *string `json:"to,omitempty"` - // RpcCredits The portion of credits_used consumed by RPC requests - RpcCredits *int `json:"rpc_credits,omitempty"` + // Totals Aggregate totals for the selected time range. + Totals *struct { + // Credits Total API credits consumed. + Credits *int `json:"credits,omitempty"` - // TagId The unique identifier of the tag - TagId *int `json:"tag_id,omitempty"` - } `json:"tags,omitempty"` + // Deliveries Number of Webhooks deliveries. + Deliveries *int `json:"deliveries,omitempty"` + } `json:"totals,omitempty"` } `json:"data,omitempty"` - // Error Contains error details if the request failed; null if successful + // Error Error message on failure; null on success. Error *string `json:"error,omitempty"` } } // GetJSON200 returns the response for an HTTP 200 `application/json` response -func (r GetV0UsageRpcByTagResponse) GetJSON200() *struct { - // Data Contains usage data grouped by tag +func (r PostV0UsageWebhooksSummaryResponse) GetJSON200() *struct { + // Data Response data. Null when the request fails. Data *struct { - // EndTime The end time of the usage period as a unix timestamp - EndTime *int `json:"end_time,omitempty"` - - // StartTime The start time of the usage period as a unix timestamp - StartTime *int `json:"start_time,omitempty"` + // Breakdown Grouped results. Present when grouping is requested; can be empty. + Breakdown *[]struct { + // Credits Total API credits consumed. + Credits *int `json:"credits,omitempty"` - // Tags An array of usage data objects, one per tag - Tags *[]struct { - // Bytes The total number of data bytes transferred by endpoints with this tag (for example, Streams and Yellowstone gRPC data). Contributes to data_credits - Bytes *int `json:"bytes,omitempty"` + // Deliveries Number of Webhooks deliveries. + Deliveries *int `json:"deliveries,omitempty"` - // CreditsUsed The total number of credits used by endpoints with this tag (RPC credits and data credits combined) - CreditsUsed *int `json:"credits_used,omitempty"` + // Webhook Webhook identifier. Present when grouping by webhook. + Webhook *string `json:"webhook,omitempty"` + } `json:"breakdown,omitempty"` - // DataCredits The portion of credits_used consumed by data usage, such as Streams and Yellowstone gRPC bytes transferred - DataCredits *int `json:"data_credits,omitempty"` + // From Effective start of the returned time range, in ISO 8601 format. + From *string `json:"from,omitempty"` - // Label The label/name of the tag - Label *string `json:"label,omitempty"` + // NextCursor Opaque continuation cursor. Present when another page is available. Pass it unchanged as cursor. + NextCursor *string `json:"next_cursor,omitempty"` - // Requests The total number of requests made by endpoints with this tag - Requests *int `json:"requests,omitempty"` + // To Effective end of the returned time range, in ISO 8601 format. + To *string `json:"to,omitempty"` - // RpcCredits The portion of credits_used consumed by RPC requests - RpcCredits *int `json:"rpc_credits,omitempty"` + // Totals Aggregate totals for the selected time range. + Totals *struct { + // Credits Total API credits consumed. + Credits *int `json:"credits,omitempty"` - // TagId The unique identifier of the tag - TagId *int `json:"tag_id,omitempty"` - } `json:"tags,omitempty"` + // Deliveries Number of Webhooks deliveries. + Deliveries *int `json:"deliveries,omitempty"` + } `json:"totals,omitempty"` } `json:"data,omitempty"` - // Error Contains error details if the request failed; null if successful + // Error Error message on failure; null on success. Error *string `json:"error,omitempty"` } { return r.JSON200 } // GetBody returns the raw response body bytes -func (r GetV0UsageRpcByTagResponse) GetBody() []byte { +func (r PostV0UsageWebhooksSummaryResponse) GetBody() []byte { return r.Body } // Status returns HTTPResponse.Status -func (r GetV0UsageRpcByTagResponse) Status() string { +func (r PostV0UsageWebhooksSummaryResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -12281,32 +15570,71 @@ func (r GetV0UsageRpcByTagResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r GetV0UsageRpcByTagResponse) StatusCode() int { +func (r PostV0UsageWebhooksSummaryResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } - return 0 + return 0 +} + +// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers +func (r PostV0UsageWebhooksSummaryResponse) ContentType() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Header.Get("Content-Type") + } + return "" +} + +// GetV0AccountInfoWithResponse Returns information about the account associated with the API key. +// +// Returns a wrapper object for the known response body format(s). +// +// Corresponds with GET /v0/account/info (the `GetV0AccountInfo` operationId). +func (c *ClientWithResponses) GetV0AccountInfoWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetV0AccountInfoResponse, error) { + rsp, err := c.GetV0AccountInfo(ctx, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetV0AccountInfoResponse(rsp) +} + +// PostV0ActivityLogsWithResponse Returns activity log entries, newest first, with filters and pagination. +// +// Returns a wrapper object for the known response body format(s). +// +// Corresponds with POST /v0/activity_logs (the `PostV0ActivityLogs` operationId). +func (c *ClientWithResponses) PostV0ActivityLogsWithResponse(ctx context.Context, params *PostV0ActivityLogsParams, reqEditors ...RequestEditorFn) (*PostV0ActivityLogsResponse, error) { + rsp, err := c.PostV0ActivityLogs(ctx, params, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostV0ActivityLogsResponse(rsp) } -// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers -func (r GetV0UsageRpcByTagResponse) ContentType() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Header.Get("Content-Type") +// GetV0ActivityLogsFiltersWithResponse Returns the actors and types you can filter by when listing activity log entries. +// +// Returns a wrapper object for the known response body format(s). +// +// Corresponds with GET /v0/activity_logs/filters (the `GetV0ActivityLogsFilters` operationId). +func (c *ClientWithResponses) GetV0ActivityLogsFiltersWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetV0ActivityLogsFiltersResponse, error) { + rsp, err := c.GetV0ActivityLogsFilters(ctx, reqEditors...) + if err != nil { + return nil, err } - return "" + return ParseGetV0ActivityLogsFiltersResponse(rsp) } -// GetV0AccountInfoWithResponse Returns information about the account associated with the API key. +// GetV0ActivityLogsByIdWithResponse Returns a single activity log entry by ID. // // Returns a wrapper object for the known response body format(s). // -// Corresponds with GET /v0/account/info (the `GetV0AccountInfo` operationId). -func (c *ClientWithResponses) GetV0AccountInfoWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetV0AccountInfoResponse, error) { - rsp, err := c.GetV0AccountInfo(ctx, reqEditors...) +// Corresponds with GET /v0/activity_logs/{id} (the `GetV0ActivityLogsById` operationId). +func (c *ClientWithResponses) GetV0ActivityLogsByIdWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*GetV0ActivityLogsByIdResponse, error) { + rsp, err := c.GetV0ActivityLogsById(ctx, id, reqEditors...) if err != nil { return nil, err } - return ParseGetV0AccountInfoResponse(rsp) + return ParseGetV0ActivityLogsByIdResponse(rsp) } // GetV0ApiCreditsByChainWithResponse Returns the API credit cost of each RPC method available on a chain. @@ -12697,7 +16025,7 @@ func (c *ClientWithResponses) GetV0EndpointsByIdLogsWithResponse(ctx context.Con return ParseGetV0EndpointsByIdLogsResponse(rsp) } -// GetV0EndpointsByIdMethodRateLimitsWithResponse Gets method rate limits. +// GetV0EndpointsByIdMethodRateLimitsWithResponse Lists method rate limits, including whether each limit applies per client IP or to the endpoint as a whole. // // Returns a wrapper object for the known response body format(s). // @@ -12710,7 +16038,7 @@ func (c *ClientWithResponses) GetV0EndpointsByIdMethodRateLimitsWithResponse(ctx return ParseGetV0EndpointsByIdMethodRateLimitsResponse(rsp) } -// PostV0EndpointsByIdMethodRateLimitsWithBodyWithResponse Creates a method rate limit. +// PostV0EndpointsByIdMethodRateLimitsWithBodyWithResponse Creates a method rate limit per client IP or for the endpoint as a whole. // // Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s). // @@ -12723,7 +16051,7 @@ func (c *ClientWithResponses) PostV0EndpointsByIdMethodRateLimitsWithBodyWithRes return ParsePostV0EndpointsByIdMethodRateLimitsResponse(rsp) } -// PostV0EndpointsByIdMethodRateLimitsWithResponse Creates a method rate limit. +// PostV0EndpointsByIdMethodRateLimitsWithResponse Creates a method rate limit per client IP or for the endpoint as a whole. // // Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s). // @@ -12751,6 +16079,8 @@ func (c *ClientWithResponses) DeleteV0EndpointsByIdMethodRateLimitsByMethodRateL // PatchV0EndpointsByIdMethodRateLimitsByMethodRateLimitIdWithBodyWithResponse Updates a method rate limit. // +// Updates a method rate limit. Send only the fields to change; omitted fields retain their current values. +// // Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s). // // Corresponds with PATCH /v0/endpoints/{id}/method-rate-limits/{method_rate_limit_id} (the `PatchV0EndpointsByIdMethodRateLimitsByMethodRateLimitId` operationId). @@ -12764,6 +16094,8 @@ func (c *ClientWithResponses) PatchV0EndpointsByIdMethodRateLimitsByMethodRateLi // PatchV0EndpointsByIdMethodRateLimitsByMethodRateLimitIdWithResponse Updates a method rate limit. // +// Updates a method rate limit. Send only the fields to change; omitted fields retain their current values. +// // Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s). // // Corresponds with PATCH /v0/endpoints/{id}/method-rate-limits/{method_rate_limit_id} (the `PatchV0EndpointsByIdMethodRateLimitsByMethodRateLimitId` operationId). @@ -12788,6 +16120,19 @@ func (c *ClientWithResponses) GetV0EndpointsByIdMetricsWithResponse(ctx context. return ParseGetV0EndpointsByIdMetricsResponse(rsp) } +// PostV0EndpointsByIdMetricsErrorsSummaryWithResponse Returns RPC and HTTP error counts for one endpoint for a time range. +// +// Returns a wrapper object for the known response body format(s). +// +// Corresponds with POST /v0/endpoints/{id}/metrics/errors/summary (the `PostV0EndpointsByIdMetricsErrorsSummary` operationId). +func (c *ClientWithResponses) PostV0EndpointsByIdMetricsErrorsSummaryWithResponse(ctx context.Context, id string, params *PostV0EndpointsByIdMetricsErrorsSummaryParams, reqEditors ...RequestEditorFn) (*PostV0EndpointsByIdMetricsErrorsSummaryResponse, error) { + rsp, err := c.PostV0EndpointsByIdMetricsErrorsSummary(ctx, id, params, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostV0EndpointsByIdMetricsErrorsSummaryResponse(rsp) +} + // GetV0EndpointsByIdRateLimitsWithResponse Gets endpoint rate limits. // // Gets endpoint rate limits. The response returns an array with the source for each rate limit, including plan defaults and user-set overrides. @@ -12805,7 +16150,7 @@ func (c *ClientWithResponses) GetV0EndpointsByIdRateLimitsWithResponse(ctx conte // PatchV0EndpointsByIdRateLimitsWithBodyWithResponse Updates endpoint rate limits. // -// Updates endpoint rate limits. Only rate limits specified in the payload are updated; omitted rate limits remain unchanged. The response returns the effective endpoint-level limits as a flat limits object. +// Updates endpoint rate limits. Only rate limits specified in the payload are updated; omitted rate limits remain unchanged. Set limit_by_ip to apply the endpoint rate limits to each client IP address. The response returns the effective endpoint-level limits as a flat limits object. // // Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s). // @@ -12820,7 +16165,7 @@ func (c *ClientWithResponses) PatchV0EndpointsByIdRateLimitsWithBodyWithResponse // PatchV0EndpointsByIdRateLimitsWithResponse Updates endpoint rate limits. // -// Updates endpoint rate limits. Only rate limits specified in the payload are updated; omitted rate limits remain unchanged. The response returns the effective endpoint-level limits as a flat limits object. +// Updates endpoint rate limits. Only rate limits specified in the payload are updated; omitted rate limits remain unchanged. Set limit_by_ip to apply the endpoint rate limits to each client IP address. The response returns the effective endpoint-level limits as a flat limits object. // // Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s). // @@ -13253,6 +16598,32 @@ func (c *ClientWithResponses) GetV0MetricsWithResponse(ctx context.Context, para return ParseGetV0MetricsResponse(rsp) } +// PostV0MetricsErrorsSummaryWithResponse Returns account RPC and HTTP error counts for a time range. +// +// Returns a wrapper object for the known response body format(s). +// +// Corresponds with POST /v0/metrics/errors/summary (the `PostV0MetricsErrorsSummary` operationId). +func (c *ClientWithResponses) PostV0MetricsErrorsSummaryWithResponse(ctx context.Context, params *PostV0MetricsErrorsSummaryParams, reqEditors ...RequestEditorFn) (*PostV0MetricsErrorsSummaryResponse, error) { + rsp, err := c.PostV0MetricsErrorsSummary(ctx, params, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostV0MetricsErrorsSummaryResponse(rsp) +} + +// PostV0MetricsTrafficSummaryWithResponse Returns successful requests, transferred bytes, credits, and distinct active methods for a time range. +// +// Returns a wrapper object for the known response body format(s). +// +// Corresponds with POST /v0/metrics/traffic/summary (the `PostV0MetricsTrafficSummary` operationId). +func (c *ClientWithResponses) PostV0MetricsTrafficSummaryWithResponse(ctx context.Context, params *PostV0MetricsTrafficSummaryParams, reqEditors ...RequestEditorFn) (*PostV0MetricsTrafficSummaryResponse, error) { + rsp, err := c.PostV0MetricsTrafficSummary(ctx, params, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostV0MetricsTrafficSummaryResponse(rsp) +} + // GetV0TeamsWithResponse Retrieves a list of all teams. // // Returns a wrapper object for the known response body format(s). @@ -13469,82 +16840,355 @@ func (c *ClientWithResponses) PostV0ToolingAccessTokenWithResponse(ctx context.C return ParsePostV0ToolingAccessTokenResponse(rsp) } -// GetV0UsageRpcWithResponse Retrieves usage total for specified time range. -// -// Returns a wrapper object for the known response body format(s). -// -// Corresponds with GET /v0/usage/rpc (the `GetV0UsageRpc` operationId). -func (c *ClientWithResponses) GetV0UsageRpcWithResponse(ctx context.Context, params *GetV0UsageRpcParams, reqEditors ...RequestEditorFn) (*GetV0UsageRpcResponse, error) { - rsp, err := c.GetV0UsageRpc(ctx, params, reqEditors...) - if err != nil { - return nil, err - } - return ParseGetV0UsageRpcResponse(rsp) -} +// PostV0TransactionsWithResponse Lists account transaction submissions for a time range, with cursor pagination. +// +// Returns a wrapper object for the known response body format(s). +// +// Corresponds with POST /v0/transactions (the `PostV0Transactions` operationId). +func (c *ClientWithResponses) PostV0TransactionsWithResponse(ctx context.Context, params *PostV0TransactionsParams, reqEditors ...RequestEditorFn) (*PostV0TransactionsResponse, error) { + rsp, err := c.PostV0Transactions(ctx, params, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostV0TransactionsResponse(rsp) +} + +// PostV0TransactionsByNetworkByHashWithResponse Returns recorded submission attempts for a transaction, optionally including request and response payloads. +// +// Returns a wrapper object for the known response body format(s). +// +// Corresponds with POST /v0/transactions/{network}/{hash} (the `PostV0TransactionsByNetworkByHash` operationId). +func (c *ClientWithResponses) PostV0TransactionsByNetworkByHashWithResponse(ctx context.Context, network string, hash string, params *PostV0TransactionsByNetworkByHashParams, reqEditors ...RequestEditorFn) (*PostV0TransactionsByNetworkByHashResponse, error) { + rsp, err := c.PostV0TransactionsByNetworkByHash(ctx, network, hash, params, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostV0TransactionsByNetworkByHashResponse(rsp) +} + +// PostV0UsageCreditsSummaryWithResponse Returns total account API credits for a time range. +// +// Returns a wrapper object for the known response body format(s). +// +// Corresponds with POST /v0/usage/credits/summary (the `PostV0UsageCreditsSummary` operationId). +func (c *ClientWithResponses) PostV0UsageCreditsSummaryWithResponse(ctx context.Context, params *PostV0UsageCreditsSummaryParams, reqEditors ...RequestEditorFn) (*PostV0UsageCreditsSummaryResponse, error) { + rsp, err := c.PostV0UsageCreditsSummary(ctx, params, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostV0UsageCreditsSummaryResponse(rsp) +} + +// GetV0UsageRpcWithResponse Retrieves usage total for specified time range. +// +// Returns a wrapper object for the known response body format(s). +// +// Corresponds with GET /v0/usage/rpc (the `GetV0UsageRpc` operationId). +func (c *ClientWithResponses) GetV0UsageRpcWithResponse(ctx context.Context, params *GetV0UsageRpcParams, reqEditors ...RequestEditorFn) (*GetV0UsageRpcResponse, error) { + rsp, err := c.GetV0UsageRpc(ctx, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetV0UsageRpcResponse(rsp) +} + +// GetV0UsageRpcByChainWithResponse Retrieves usage data by chain. +// +// Returns a wrapper object for the known response body format(s). +// +// Corresponds with GET /v0/usage/rpc/by-chain (the `GetV0UsageRpcByChain` operationId). +func (c *ClientWithResponses) GetV0UsageRpcByChainWithResponse(ctx context.Context, params *GetV0UsageRpcByChainParams, reqEditors ...RequestEditorFn) (*GetV0UsageRpcByChainResponse, error) { + rsp, err := c.GetV0UsageRpcByChain(ctx, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetV0UsageRpcByChainResponse(rsp) +} + +// GetV0UsageRpcByEndpointWithResponse Retrieves usage data by endpoint. +// +// Returns a wrapper object for the known response body format(s). +// +// Corresponds with GET /v0/usage/rpc/by-endpoint (the `GetV0UsageRpcByEndpoint` operationId). +func (c *ClientWithResponses) GetV0UsageRpcByEndpointWithResponse(ctx context.Context, params *GetV0UsageRpcByEndpointParams, reqEditors ...RequestEditorFn) (*GetV0UsageRpcByEndpointResponse, error) { + rsp, err := c.GetV0UsageRpcByEndpoint(ctx, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetV0UsageRpcByEndpointResponse(rsp) +} + +// GetV0UsageRpcByMethodWithResponse Retrieves usage data by method. +// +// Returns a wrapper object for the known response body format(s). +// +// Corresponds with GET /v0/usage/rpc/by-method (the `GetV0UsageRpcByMethod` operationId). +func (c *ClientWithResponses) GetV0UsageRpcByMethodWithResponse(ctx context.Context, params *GetV0UsageRpcByMethodParams, reqEditors ...RequestEditorFn) (*GetV0UsageRpcByMethodResponse, error) { + rsp, err := c.GetV0UsageRpcByMethod(ctx, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetV0UsageRpcByMethodResponse(rsp) +} + +// GetV0UsageRpcByTagWithResponse Retrieves usage data grouped by tag. +// +// Retrieves usage data grouped by tag. Includes an untagged bucket for endpoints with no tags. +// +// Returns a wrapper object for the known response body format(s). +// +// Corresponds with GET /v0/usage/rpc/by-tag (the `GetV0UsageRpcByTag` operationId). +func (c *ClientWithResponses) GetV0UsageRpcByTagWithResponse(ctx context.Context, params *GetV0UsageRpcByTagParams, reqEditors ...RequestEditorFn) (*GetV0UsageRpcByTagResponse, error) { + rsp, err := c.GetV0UsageRpcByTag(ctx, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetV0UsageRpcByTagResponse(rsp) +} + +// PostV0UsageRpcSummaryWithResponse Returns account RPC requests, transferred bytes, and credits for a time range. +// +// Returns a wrapper object for the known response body format(s). +// +// Corresponds with POST /v0/usage/rpc/summary (the `PostV0UsageRpcSummary` operationId). +func (c *ClientWithResponses) PostV0UsageRpcSummaryWithResponse(ctx context.Context, params *PostV0UsageRpcSummaryParams, reqEditors ...RequestEditorFn) (*PostV0UsageRpcSummaryResponse, error) { + rsp, err := c.PostV0UsageRpcSummary(ctx, params, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostV0UsageRpcSummaryResponse(rsp) +} + +// PostV0UsageStreamsSummaryWithResponse Returns Streams blocks, transferred bytes, and block credits for a time range. +// +// Returns a wrapper object for the known response body format(s). +// +// Corresponds with POST /v0/usage/streams/summary (the `PostV0UsageStreamsSummary` operationId). +func (c *ClientWithResponses) PostV0UsageStreamsSummaryWithResponse(ctx context.Context, params *PostV0UsageStreamsSummaryParams, reqEditors ...RequestEditorFn) (*PostV0UsageStreamsSummaryResponse, error) { + rsp, err := c.PostV0UsageStreamsSummary(ctx, params, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostV0UsageStreamsSummaryResponse(rsp) +} + +// PostV0UsageWebhooksSummaryWithResponse Returns Webhooks deliveries and credits for a time range. +// +// Returns a wrapper object for the known response body format(s). +// +// Corresponds with POST /v0/usage/webhooks/summary (the `PostV0UsageWebhooksSummary` operationId). +func (c *ClientWithResponses) PostV0UsageWebhooksSummaryWithResponse(ctx context.Context, params *PostV0UsageWebhooksSummaryParams, reqEditors ...RequestEditorFn) (*PostV0UsageWebhooksSummaryResponse, error) { + rsp, err := c.PostV0UsageWebhooksSummary(ctx, params, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostV0UsageWebhooksSummaryResponse(rsp) +} + +// ParseGetV0AccountInfoResponse parses an HTTP response from a GetV0AccountInfoWithResponse call +func ParseGetV0AccountInfoResponse(rsp *http.Response) (*GetV0AccountInfoResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetV0AccountInfoResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest struct { + // Data An object which contains the following fields: + Data *struct { + // BillingVersion The billing version associated with the account + BillingVersion *string `json:"billing_version,omitempty"` + + // CreatedAt The timestamp when the account was created + CreatedAt *string `json:"created_at,omitempty"` + + // Id The unique identifier for the account + Id *int `json:"id,omitempty"` + + // Name The name of the account + Name *string `json:"name,omitempty"` + + // Subscription An object containing the account's subscription details: + Subscription *struct { + // Interval The billing interval of the subscription + Interval *string `json:"interval,omitempty"` + + // PlanName The name of the subscription plan + PlanName *string `json:"plan_name,omitempty"` + + // Status The status of the subscription + Status *string `json:"status,omitempty"` + } `json:"subscription,omitempty"` + } `json:"data,omitempty"` + + // Error An error message if any issue occurs + Error *string `json:"error,omitempty"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + } + + return response, nil +} + +// ParsePostV0ActivityLogsResponse parses an HTTP response from a PostV0ActivityLogsWithResponse call +func ParsePostV0ActivityLogsResponse(rsp *http.Response) (*PostV0ActivityLogsResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &PostV0ActivityLogsResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest struct { + // Data Array of activity log entries, newest first. + Data *[]struct { + // Action What happened, such as created, updated, deleted, paused, invited, member_removed. + Action *string `json:"action,omitempty"` + + // Actor Who made the change. + Actor *struct { + // Email Member's email; null for api_key, quicknode, deleted_user. + Email *string `json:"email,omitempty"` + + // Id User UUID or API key ID; null for quicknode or deleted_user. + Id *string `json:"id,omitempty"` + + // Name Member's name or Quicknode; null for api_key. + Name *string `json:"name,omitempty"` + + // Type One of: user, api_key, quicknode, deleted_user. + Type *string `json:"type,omitempty"` + } `json:"actor,omitempty"` + + // Description Human-readable summary, the same text the dashboard shows. + Description *string `json:"description,omitempty"` + + // Id Stable UUID for the entry. + Id *string `json:"id,omitempty"` + + // OccurredAt When the change happened, in ISO 8601 UTC format. + OccurredAt *string `json:"occurred_at,omitempty"` + + // Target What was changed. + Target *struct { + // Id ID of the thing that changed. + Id *string `json:"id,omitempty"` + + // Kind One of: endpoint, team, member, role, billing, add_on, api_key. + Kind *string `json:"kind,omitempty"` + + // Label Display name of the kind. + Label *string `json:"label,omitempty"` + + // Name Current name where there is one; null otherwise. + Name *string `json:"name,omitempty"` + } `json:"target,omitempty"` + } `json:"data,omitempty"` + + // Error Error message on failure; null on success. + Error *string `json:"error,omitempty"` + + // Pagination Pagination metadata. + Pagination *struct { + // Limit Page size used. + Limit *int `json:"limit,omitempty"` + + // Offset Number of entries skipped. + Offset *int `json:"offset,omitempty"` + + // Total Total count of entries matching the filters. + Total *int `json:"total,omitempty"` + } `json:"pagination,omitempty"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest -// GetV0UsageRpcByChainWithResponse Retrieves usage data by chain. -// -// Returns a wrapper object for the known response body format(s). -// -// Corresponds with GET /v0/usage/rpc/by-chain (the `GetV0UsageRpcByChain` operationId). -func (c *ClientWithResponses) GetV0UsageRpcByChainWithResponse(ctx context.Context, params *GetV0UsageRpcByChainParams, reqEditors ...RequestEditorFn) (*GetV0UsageRpcByChainResponse, error) { - rsp, err := c.GetV0UsageRpcByChain(ctx, params, reqEditors...) - if err != nil { - return nil, err } - return ParseGetV0UsageRpcByChainResponse(rsp) + + return response, nil } -// GetV0UsageRpcByEndpointWithResponse Retrieves usage data by endpoint. -// -// Returns a wrapper object for the known response body format(s). -// -// Corresponds with GET /v0/usage/rpc/by-endpoint (the `GetV0UsageRpcByEndpoint` operationId). -func (c *ClientWithResponses) GetV0UsageRpcByEndpointWithResponse(ctx context.Context, params *GetV0UsageRpcByEndpointParams, reqEditors ...RequestEditorFn) (*GetV0UsageRpcByEndpointResponse, error) { - rsp, err := c.GetV0UsageRpcByEndpoint(ctx, params, reqEditors...) +// ParseGetV0ActivityLogsFiltersResponse parses an HTTP response from a GetV0ActivityLogsFiltersWithResponse call +func ParseGetV0ActivityLogsFiltersResponse(rsp *http.Response) (*GetV0ActivityLogsFiltersResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - return ParseGetV0UsageRpcByEndpointResponse(rsp) -} -// GetV0UsageRpcByMethodWithResponse Retrieves usage data by method. -// -// Returns a wrapper object for the known response body format(s). -// -// Corresponds with GET /v0/usage/rpc/by-method (the `GetV0UsageRpcByMethod` operationId). -func (c *ClientWithResponses) GetV0UsageRpcByMethodWithResponse(ctx context.Context, params *GetV0UsageRpcByMethodParams, reqEditors ...RequestEditorFn) (*GetV0UsageRpcByMethodResponse, error) { - rsp, err := c.GetV0UsageRpcByMethod(ctx, params, reqEditors...) - if err != nil { - return nil, err + response := &GetV0ActivityLogsFiltersResponse{ + Body: bodyBytes, + HTTPResponse: rsp, } - return ParseGetV0UsageRpcByMethodResponse(rsp) -} -// GetV0UsageRpcByTagWithResponse Retrieves usage data grouped by tag. -// -// Retrieves usage data grouped by tag. Includes an untagged bucket for endpoints with no tags. -// -// Returns a wrapper object for the known response body format(s). -// -// Corresponds with GET /v0/usage/rpc/by-tag (the `GetV0UsageRpcByTag` operationId). -func (c *ClientWithResponses) GetV0UsageRpcByTagWithResponse(ctx context.Context, params *GetV0UsageRpcByTagParams, reqEditors ...RequestEditorFn) (*GetV0UsageRpcByTagResponse, error) { - rsp, err := c.GetV0UsageRpcByTag(ctx, params, reqEditors...) - if err != nil { - return nil, err + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest struct { + // Data Filter values available for your account. + Data *struct { + // Actors Members and API keys that appear in your log. + Actors *[]struct { + // Id User UUID or API key ID. Use this value for the actor filter. + Id *string `json:"id,omitempty"` + + // Name Member's name; null for API keys. + Name *string `json:"name,omitempty"` + + // Type Either user or api_key. + Type *string `json:"type,omitempty"` + } `json:"actors,omitempty"` + + // Types Entry types you can filter by. + Types *[]struct { + // Label Display name for the type. + Label *string `json:"label,omitempty"` + + // Value Type value to use in the type filter. + Value *string `json:"value,omitempty"` + } `json:"types,omitempty"` + } `json:"data,omitempty"` + + // Error Error message on failure; null on success. + Error *string `json:"error,omitempty"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + } - return ParseGetV0UsageRpcByTagResponse(rsp) + + return response, nil } -// ParseGetV0AccountInfoResponse parses an HTTP response from a GetV0AccountInfoWithResponse call -func ParseGetV0AccountInfoResponse(rsp *http.Response) (*GetV0AccountInfoResponse, error) { +// ParseGetV0ActivityLogsByIdResponse parses an HTTP response from a GetV0ActivityLogsByIdWithResponse call +func ParseGetV0ActivityLogsByIdResponse(rsp *http.Response) (*GetV0ActivityLogsByIdResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &GetV0AccountInfoResponse{ + response := &GetV0ActivityLogsByIdResponse{ Body: bodyBytes, HTTPResponse: rsp, } @@ -13552,34 +17196,52 @@ func ParseGetV0AccountInfoResponse(rsp *http.Response) (*GetV0AccountInfoRespons switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: var dest struct { - // Data An object which contains the following fields: + // Data The activity log entry. Data *struct { - // BillingVersion The billing version associated with the account - BillingVersion *string `json:"billing_version,omitempty"` + // Action What happened, such as created, updated, deleted, paused, invited, member_removed. + Action *string `json:"action,omitempty"` - // CreatedAt The timestamp when the account was created - CreatedAt *string `json:"created_at,omitempty"` + // Actor Who made the change. + Actor *struct { + // Email Member's email; null for api_key, quicknode, deleted_user. + Email *string `json:"email,omitempty"` - // Id The unique identifier for the account - Id *int `json:"id,omitempty"` + // Id User UUID or API key ID; null for quicknode or deleted_user. + Id *string `json:"id,omitempty"` - // Name The name of the account - Name *string `json:"name,omitempty"` + // Name Member's name or Quicknode; null for api_key. + Name *string `json:"name,omitempty"` - // Subscription An object containing the account's subscription details: - Subscription *struct { - // Interval The billing interval of the subscription - Interval *string `json:"interval,omitempty"` + // Type One of: user, api_key, quicknode, deleted_user. + Type *string `json:"type,omitempty"` + } `json:"actor,omitempty"` - // PlanName The name of the subscription plan - PlanName *string `json:"plan_name,omitempty"` + // Description Human-readable summary, the same text the dashboard shows. + Description *string `json:"description,omitempty"` - // Status The status of the subscription - Status *string `json:"status,omitempty"` - } `json:"subscription,omitempty"` + // Id Stable UUID for the entry. + Id *string `json:"id,omitempty"` + + // OccurredAt When the change happened, in ISO 8601 UTC format. + OccurredAt *string `json:"occurred_at,omitempty"` + + // Target What was changed. + Target *struct { + // Id ID of the thing that changed. + Id *string `json:"id,omitempty"` + + // Kind One of: endpoint, team, member, role, billing, add_on, api_key. + Kind *string `json:"kind,omitempty"` + + // Label Display name of the kind. + Label *string `json:"label,omitempty"` + + // Name Current name where there is one; null otherwise. + Name *string `json:"name,omitempty"` + } `json:"target,omitempty"` } `json:"data,omitempty"` - // Error An error message if any issue occurs + // Error Error message on failure; null on success. Error *string `json:"error,omitempty"` } if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -14778,6 +18440,9 @@ func ParseGetV0EndpointsByIdMethodRateLimitsResponse(rsp *http.Response) (*GetV0 // Interval The time interval for the rate limit Interval *string `json:"interval,omitempty"` + // LimitByIp Whether the rate limit applies separately to each client IP (true) or to the endpoint as a whole (false) + LimitByIp *bool `json:"limit_by_ip,omitempty"` + // Methods A list of method names to which the rate limiter applies Methods *[]string `json:"methods,omitempty"` @@ -14829,6 +18494,9 @@ func ParsePostV0EndpointsByIdMethodRateLimitsResponse(rsp *http.Response) (*Post // Interval The time interval for the rate limit Interval *string `json:"interval,omitempty"` + // LimitByIp Whether the rate limit applies separately to each client IP (true) or to the endpoint as a whole (false) + LimitByIp *bool `json:"limit_by_ip,omitempty"` + // Methods A list of methods the rate limiter applies to Methods *[]string `json:"methods,omitempty"` @@ -14911,6 +18579,9 @@ func ParsePatchV0EndpointsByIdMethodRateLimitsByMethodRateLimitIdResponse(rsp *h // Interval The time interval for the rate limit Interval *string `json:"interval,omitempty"` + // LimitByIp Whether the rate limit applies separately to each client IP (true) or to the endpoint as a whole (false) + LimitByIp *bool `json:"limit_by_ip,omitempty"` + // Methods A list of methods the rate limiter applies to Methods *[]string `json:"methods,omitempty"` @@ -14972,6 +18643,68 @@ func ParseGetV0EndpointsByIdMetricsResponse(rsp *http.Response) (*GetV0Endpoints return response, nil } +// ParsePostV0EndpointsByIdMetricsErrorsSummaryResponse parses an HTTP response from a PostV0EndpointsByIdMetricsErrorsSummaryWithResponse call +func ParsePostV0EndpointsByIdMetricsErrorsSummaryResponse(rsp *http.Response) (*PostV0EndpointsByIdMetricsErrorsSummaryResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &PostV0EndpointsByIdMetricsErrorsSummaryResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest struct { + // Data Response data. Null when the request fails. + Data *struct { + // Breakdown Grouped results. Present when grouping is requested; can be empty. + Breakdown *[]struct { + // Count Number of errors in this group. + Count *float32 `json:"count,omitempty"` + + // Kind Error kind: rpc or http. + Kind *string `json:"kind,omitempty"` + + // Method RPC method name. In a breakdown, present when grouping by method. + Method *string `json:"method,omitempty"` + } `json:"breakdown,omitempty"` + + // From Effective start of the returned time range, in ISO 8601 format. + From *string `json:"from,omitempty"` + + // NextCursor Opaque continuation cursor. Present when another page is available. Pass it unchanged as cursor. + NextCursor *string `json:"next_cursor,omitempty"` + + // To Effective end of the returned time range, in ISO 8601 format. + To *string `json:"to,omitempty"` + + // Totals Aggregate totals for the selected time range. + Totals *struct { + // HttpErrors Number of HTTP errors. + HttpErrors *float32 `json:"http_errors,omitempty"` + + // RpcErrors Number of RPC errors. + RpcErrors *float32 `json:"rpc_errors,omitempty"` + } `json:"totals,omitempty"` + } `json:"data,omitempty"` + + // Error Error message on failure; null on success. + Error *string `json:"error,omitempty"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + } + + return response, nil +} + // ParseGetV0EndpointsByIdRateLimitsResponse parses an HTTP response from a GetV0EndpointsByIdRateLimitsWithResponse call func ParseGetV0EndpointsByIdRateLimitsResponse(rsp *http.Response) (*GetV0EndpointsByIdRateLimitsResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) @@ -14990,6 +18723,9 @@ func ParseGetV0EndpointsByIdRateLimitsResponse(rsp *http.Response) (*GetV0Endpoi var dest struct { // Data The data object which contains the endpoint rate limit configuration Data *struct { + // LimitByIp Whether the endpoint rate limits apply to each client IP address + LimitByIp *bool `json:"limit_by_ip,omitempty"` + // RateLimits An array of endpoint rate limit configurations RateLimits *[]struct { // Bucket The rate limit bucket, such as rps, rpm, or rpd @@ -15037,6 +18773,9 @@ func ParsePatchV0EndpointsByIdRateLimitsResponse(rsp *http.Response) (*PatchV0En var dest struct { // Data The data object which contains the following fields: Data *struct { + // LimitByIp Whether the endpoint rate limits apply to each client IP address + LimitByIp *bool `json:"limit_by_ip,omitempty"` + // Limits The limits object which contains the following fields: Limits *struct { // Rpd The maximum number of requests allowed per day. A value of -1 indicates that no endpoint-level override is set for this bucket. @@ -15939,24 +19678,175 @@ func ParseGetV0MetricsResponse(rsp *http.Response) (*GetV0MetricsResponse, error return nil, err } - response := &GetV0MetricsResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } + response := &GetV0MetricsResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest struct { + // Data An array of metric objects, each containing a tag and its associated data points + Data *[]struct { + // Data An array of [timestamp, value] pairs representing the metric data points + Data *[]interface{} `json:"data,omitempty"` + + // Tag An array of strings identifying the metric group (e.g., network name) + Tag *[]interface{} `json:"tag,omitempty"` + } `json:"data,omitempty"` + + // Error Contains error details if the request failed; null if successful + Error *string `json:"error,omitempty"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + } + + return response, nil +} + +// ParsePostV0MetricsErrorsSummaryResponse parses an HTTP response from a PostV0MetricsErrorsSummaryWithResponse call +func ParsePostV0MetricsErrorsSummaryResponse(rsp *http.Response) (*PostV0MetricsErrorsSummaryResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &PostV0MetricsErrorsSummaryResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest struct { + // Data Response data. Null when the request fails. + Data *struct { + // Breakdown Grouped results. Present when grouping is requested; can be empty. + Breakdown *[]struct { + // Count Number of errors in this group. + Count *float32 `json:"count,omitempty"` + + // Kind Error kind: rpc or http. + Kind *string `json:"kind,omitempty"` + + // Method RPC method name. In a breakdown, present when grouping by method. + Method *string `json:"method,omitempty"` + } `json:"breakdown,omitempty"` + + // From Effective start of the returned time range, in ISO 8601 format. + From *string `json:"from,omitempty"` + + // NextCursor Opaque continuation cursor. Present when another page is available. Pass it unchanged as cursor. + NextCursor *string `json:"next_cursor,omitempty"` + + // To Effective end of the returned time range, in ISO 8601 format. + To *string `json:"to,omitempty"` + + // Totals Aggregate totals for the selected time range. + Totals *struct { + // HttpErrors Number of HTTP errors. + HttpErrors *float32 `json:"http_errors,omitempty"` + + // RpcErrors Number of RPC errors. + RpcErrors *float32 `json:"rpc_errors,omitempty"` + } `json:"totals,omitempty"` + } `json:"data,omitempty"` + + // Error Error message on failure; null on success. + Error *string `json:"error,omitempty"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + } + + return response, nil +} + +// ParsePostV0MetricsTrafficSummaryResponse parses an HTTP response from a PostV0MetricsTrafficSummaryWithResponse call +func ParsePostV0MetricsTrafficSummaryResponse(rsp *http.Response) (*PostV0MetricsTrafficSummaryResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &PostV0MetricsTrafficSummaryResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest struct { + // Data Response data. Null when the request fails. + Data *struct { + // Breakdown Grouped results. Present when grouping is requested; can be empty. + Breakdown *[]struct { + // ActiveMethods Number of distinct active methods. + ActiveMethods *int `json:"active_methods,omitempty"` + + // Bytes Number of bytes transferred. + Bytes *int `json:"bytes,omitempty"` + + // BytesCredits Credits consumed by transferred bytes. + BytesCredits *int `json:"bytes_credits,omitempty"` + + // Credits Total API credits consumed. + Credits *int `json:"credits,omitempty"` + + // Endpoint Endpoint UUID; present when grouping by endpoint. + Endpoint *string `json:"endpoint,omitempty"` + + // Method RPC method name. In a breakdown, present when grouping by method. + Method *string `json:"method,omitempty"` + + // RequestCredits Credits consumed by requests. + RequestCredits *int `json:"request_credits,omitempty"` + + // SuccessfulRequests Number of successful requests. + SuccessfulRequests *int `json:"successful_requests,omitempty"` + } `json:"breakdown,omitempty"` + + // From Effective start of the returned time range, in ISO 8601 format. + From *string `json:"from,omitempty"` + + // NextCursor Opaque continuation cursor. Present when another page is available. Pass it unchanged as cursor. + NextCursor *string `json:"next_cursor,omitempty"` + + // To Effective end of the returned time range, in ISO 8601 format. + To *string `json:"to,omitempty"` + + // Totals Aggregate totals for the selected time range. + Totals *struct { + // ActiveMethods Number of distinct active methods. + ActiveMethods *int `json:"active_methods,omitempty"` - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest struct { - // Data An array of metric objects, each containing a tag and its associated data points - Data *[]struct { - // Data An array of [timestamp, value] pairs representing the metric data points - Data *[]interface{} `json:"data,omitempty"` + // Bytes Number of bytes transferred. + Bytes *int `json:"bytes,omitempty"` - // Tag An array of strings identifying the metric group (e.g., network name) - Tag *[]interface{} `json:"tag,omitempty"` + // BytesCredits Credits consumed by transferred bytes. + BytesCredits *int `json:"bytes_credits,omitempty"` + + // Credits Total API credits consumed. + Credits *int `json:"credits,omitempty"` + + // RequestCredits Credits consumed by requests. + RequestCredits *int `json:"request_credits,omitempty"` + + // SuccessfulRequests Number of successful requests. + SuccessfulRequests *int `json:"successful_requests,omitempty"` + } `json:"totals,omitempty"` } `json:"data,omitempty"` - // Error Contains error details if the request failed; null if successful + // Error Error message on failure; null on success. Error *string `json:"error,omitempty"` } if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -16521,6 +20411,201 @@ func ParsePostV0ToolingAccessTokenResponse(rsp *http.Response) (*PostV0ToolingAc return response, nil } +// ParsePostV0TransactionsResponse parses an HTTP response from a PostV0TransactionsWithResponse call +func ParsePostV0TransactionsResponse(rsp *http.Response) (*PostV0TransactionsResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &PostV0TransactionsResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest struct { + // Data Response data. Null when the request fails. + Data *struct { + // From Effective start of the returned time range, in ISO 8601 format. + From *string `json:"from,omitempty"` + + // NextCursor Opaque continuation cursor. Present when another page is available. Pass it unchanged as cursor. + NextCursor *string `json:"next_cursor,omitempty"` + + // To Effective end of the returned time range, in ISO 8601 format. + To *string `json:"to,omitempty"` + + // Transactions Transaction submissions matching the selected time range and filters. + Transactions *[]struct { + // Archive Whether the transaction is marked as archived. + Archive *bool `json:"archive,omitempty"` + + // AttemptCount Number of recorded submission attempts. + AttemptCount *int `json:"attempt_count,omitempty"` + + // EndpointIds Endpoint UUIDs associated with the submissions. These are not the numeric Admin API endpoint IDs. + EndpointIds *[]interface{} `json:"endpoint_ids,omitempty"` + + // FirstSubmittedAt Timestamp of the first recorded submission. + FirstSubmittedAt *string `json:"first_submitted_at,omitempty"` + + // Height Block height when available; otherwise null. + Height *string `json:"height,omitempty"` + + // LastSubmittedAt Timestamp of the most recent recorded submission. + LastSubmittedAt *string `json:"last_submitted_at,omitempty"` + + // Methods RPC method names used for submission. + Methods *[]interface{} `json:"methods,omitempty"` + + // Network Network identifier. + Network *string `json:"network,omitempty"` + + // State Recorded transaction submission state; for example, submitted. This is not confirmation of inclusion or finality. + State *string `json:"state,omitempty"` + + // TransactionHash Transaction hash or signature. + TransactionHash *string `json:"transaction_hash,omitempty"` + } `json:"transactions,omitempty"` + } `json:"data,omitempty"` + + // Error Error message on failure; null on success. + Error *string `json:"error,omitempty"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + } + + return response, nil +} + +// ParsePostV0TransactionsByNetworkByHashResponse parses an HTTP response from a PostV0TransactionsByNetworkByHashWithResponse call +func ParsePostV0TransactionsByNetworkByHashResponse(rsp *http.Response) (*PostV0TransactionsByNetworkByHashResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &PostV0TransactionsByNetworkByHashResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest struct { + // Data Response data. Null when the request fails. + Data *struct { + // Data Recorded transaction details; null when exists is false. + Data *struct { + // Attempts Recorded attempts to submit this transaction. + Attempts *[]struct { + // EndpointId Endpoint UUID for this attempt; not the numeric Admin API endpoint ID. + EndpointId *string `json:"endpoint_id,omitempty"` + + // Method RPC method name. In a breakdown, present when grouping by method. + Method *string `json:"method,omitempty"` + + // Payloads Optional request and response payloads, returned when include_payloads=true and available. + Payloads *struct { + // Request Recorded request payload as a JSON-encoded string. + Request *string `json:"request,omitempty"` + + // Response Recorded response payload as a JSON-encoded string. + Response *string `json:"response,omitempty"` + } `json:"payloads,omitempty"` + + // RequestId Identifier of the recorded request. + RequestId *string `json:"request_id,omitempty"` + + // SubmittedAt Timestamp of the submission attempt. + SubmittedAt *string `json:"submitted_at,omitempty"` + } `json:"attempts,omitempty"` + + // FirstSubmittedAt Timestamp of the first recorded submission. + FirstSubmittedAt *string `json:"first_submitted_at,omitempty"` + + // LastSubmittedAt Timestamp of the most recent recorded submission. + LastSubmittedAt *string `json:"last_submitted_at,omitempty"` + + // Network Network identifier. + Network *string `json:"network,omitempty"` + + // State Recorded transaction submission state; for example, submitted. This is not confirmation of inclusion or finality. + State *string `json:"state,omitempty"` + + // TransactionHash Transaction hash or signature. + TransactionHash *string `json:"transaction_hash,omitempty"` + } `json:"data,omitempty"` + + // Exists Whether a matching transaction submission was found. + Exists *bool `json:"exists,omitempty"` + } `json:"data,omitempty"` + + // Error Error message on failure; null on success. + Error *string `json:"error,omitempty"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + } + + return response, nil +} + +// ParsePostV0UsageCreditsSummaryResponse parses an HTTP response from a PostV0UsageCreditsSummaryWithResponse call +func ParsePostV0UsageCreditsSummaryResponse(rsp *http.Response) (*PostV0UsageCreditsSummaryResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &PostV0UsageCreditsSummaryResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest struct { + // Data Response data. Null when the request fails. + Data *struct { + // From Effective start of the returned time range, in ISO 8601 format. + From *string `json:"from,omitempty"` + + // To Effective end of the returned time range, in ISO 8601 format. + To *string `json:"to,omitempty"` + + // Totals Aggregate totals for the selected time range. + Totals *struct { + // Credits Total API credits consumed. + Credits *int `json:"credits,omitempty"` + } `json:"totals,omitempty"` + } `json:"data,omitempty"` + + // Error Error message on failure; null on success. + Error *string `json:"error,omitempty"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + } + + return response, nil +} + // ParseGetV0UsageRpcResponse parses an HTTP response from a GetV0UsageRpcWithResponse call func ParseGetV0UsageRpcResponse(rsp *http.Response) (*GetV0UsageRpcResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) @@ -16827,3 +20912,219 @@ func ParseGetV0UsageRpcByTagResponse(rsp *http.Response) (*GetV0UsageRpcByTagRes return response, nil } + +// ParsePostV0UsageRpcSummaryResponse parses an HTTP response from a PostV0UsageRpcSummaryWithResponse call +func ParsePostV0UsageRpcSummaryResponse(rsp *http.Response) (*PostV0UsageRpcSummaryResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &PostV0UsageRpcSummaryResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest struct { + // Data Response data. Null when the request fails. + Data *struct { + // Breakdown Grouped results. Present when grouping is requested; can be empty. + Breakdown *[]struct { + // Bytes Number of bytes transferred. + Bytes *int `json:"bytes,omitempty"` + + // Credits Total API credits consumed. + Credits *int `json:"credits,omitempty"` + + // DataCredits Credits consumed by data transfer. + DataCredits *int `json:"data_credits,omitempty"` + + // Endpoint Endpoint UUID; present when grouping by endpoint. + Endpoint *string `json:"endpoint,omitempty"` + + // Method RPC method name. In a breakdown, present when grouping by method. + Method *string `json:"method,omitempty"` + + // Network Present when grouping by network. + Network *string `json:"network,omitempty"` + + // Requests Number of RPC requests. + Requests *int `json:"requests,omitempty"` + + // RpcCredits Credits consumed by RPC requests. + RpcCredits *int `json:"rpc_credits,omitempty"` + } `json:"breakdown,omitempty"` + + // From Effective start of the returned time range, in ISO 8601 format. + From *string `json:"from,omitempty"` + + // NextCursor Opaque continuation cursor. Present when another page is available. Pass it unchanged as cursor. + NextCursor *string `json:"next_cursor,omitempty"` + + // To Effective end of the returned time range, in ISO 8601 format. + To *string `json:"to,omitempty"` + + // Totals Aggregate totals for the selected time range. + Totals *struct { + // Bytes Number of bytes transferred. + Bytes *int `json:"bytes,omitempty"` + + // Credits Total API credits consumed. + Credits *int `json:"credits,omitempty"` + + // DataCredits Credits consumed by data transfer. + DataCredits *int `json:"data_credits,omitempty"` + + // Requests Number of RPC requests. + Requests *int `json:"requests,omitempty"` + + // RpcCredits Credits consumed by RPC requests. + RpcCredits *int `json:"rpc_credits,omitempty"` + } `json:"totals,omitempty"` + } `json:"data,omitempty"` + + // Error Error message on failure; null on success. + Error *string `json:"error,omitempty"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + } + + return response, nil +} + +// ParsePostV0UsageStreamsSummaryResponse parses an HTTP response from a PostV0UsageStreamsSummaryWithResponse call +func ParsePostV0UsageStreamsSummaryResponse(rsp *http.Response) (*PostV0UsageStreamsSummaryResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &PostV0UsageStreamsSummaryResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest struct { + // Data Response data. Null when the request fails. + Data *struct { + // Breakdown Grouped results. Present when grouping is requested; can be empty. + Breakdown *[]struct { + // BlockCredits Credits consumed by Streams blocks. + BlockCredits *int `json:"block_credits,omitempty"` + + // Blocks Number of Streams blocks processed. + Blocks *int `json:"blocks,omitempty"` + + // Bytes Number of bytes transferred. + Bytes *int `json:"bytes,omitempty"` + + // Stream Stream identifier. Present when grouping by stream. + Stream *string `json:"stream,omitempty"` + } `json:"breakdown,omitempty"` + + // From Effective start of the returned time range, in ISO 8601 format. + From *string `json:"from,omitempty"` + + // NextCursor Opaque continuation cursor. Present when another page is available. Pass it unchanged as cursor. + NextCursor *string `json:"next_cursor,omitempty"` + + // To Effective end of the returned time range, in ISO 8601 format. + To *string `json:"to,omitempty"` + + // Totals Aggregate totals for the selected time range. + Totals *struct { + // BlockCredits Credits consumed by Streams blocks. + BlockCredits *int `json:"block_credits,omitempty"` + + // Blocks Number of Streams blocks processed. + Blocks *int `json:"blocks,omitempty"` + + // Bytes Number of bytes transferred. + Bytes *int `json:"bytes,omitempty"` + } `json:"totals,omitempty"` + } `json:"data,omitempty"` + + // Error Error message on failure; null on success. + Error *string `json:"error,omitempty"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + } + + return response, nil +} + +// ParsePostV0UsageWebhooksSummaryResponse parses an HTTP response from a PostV0UsageWebhooksSummaryWithResponse call +func ParsePostV0UsageWebhooksSummaryResponse(rsp *http.Response) (*PostV0UsageWebhooksSummaryResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &PostV0UsageWebhooksSummaryResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest struct { + // Data Response data. Null when the request fails. + Data *struct { + // Breakdown Grouped results. Present when grouping is requested; can be empty. + Breakdown *[]struct { + // Credits Total API credits consumed. + Credits *int `json:"credits,omitempty"` + + // Deliveries Number of Webhooks deliveries. + Deliveries *int `json:"deliveries,omitempty"` + + // Webhook Webhook identifier. Present when grouping by webhook. + Webhook *string `json:"webhook,omitempty"` + } `json:"breakdown,omitempty"` + + // From Effective start of the returned time range, in ISO 8601 format. + From *string `json:"from,omitempty"` + + // NextCursor Opaque continuation cursor. Present when another page is available. Pass it unchanged as cursor. + NextCursor *string `json:"next_cursor,omitempty"` + + // To Effective end of the returned time range, in ISO 8601 format. + To *string `json:"to,omitempty"` + + // Totals Aggregate totals for the selected time range. + Totals *struct { + // Credits Total API credits consumed. + Credits *int `json:"credits,omitempty"` + + // Deliveries Number of Webhooks deliveries. + Deliveries *int `json:"deliveries,omitempty"` + } `json:"totals,omitempty"` + } `json:"data,omitempty"` + + // Error Error message on failure; null on success. + Error *string `json:"error,omitempty"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + } + + return response, nil +} diff --git a/api/admin/openapi.json b/api/admin/openapi.json index eaeeebb..6e8991b 100644 --- a/api/admin/openapi.json +++ b/api/admin/openapi.json @@ -86,24 +86,85 @@ ] } }, - "/v0/api-credits/{chain}": { - "get": { - "description": "Returns the API credit cost of each RPC method available on a chain. Credit costs are calculated using the account's billing version.", + "/v0/activity_logs": { + "post": { "externalDocs": { "description": "Quicknode docs", - "url": "https://www.quicknode.com/docs/admin-api/api-credits/v0-api-credits-chain" + "url": "https://www.quicknode.com/docs/admin-api/activity-logs/v0-activity-logs" }, - "operationId": "get_v0_api_credits_by_chain", + "operationId": "post_v0_activity_logs", "parameters": [ { - "description": "The chain slug from the GET /v0/chains response", - "in": "path", - "name": "chain", - "required": true, + "description": "Search entry descriptions, endpoint subdomains, and team names. Case-insensitive.", + "in": "query", + "name": "q", "schema": { - "description": "The chain slug from the GET /v0/chains response", + "description": "Search entry descriptions, endpoint subdomains, and team names. Case-insensitive.", + "type": "string" + } + }, + { + "description": "Only entries made by this user or API key. Use an id from /v0/activity_logs/filters.", + "in": "query", + "name": "actor", + "schema": { + "description": "Only entries made by this user or API key. Use an id from /v0/activity_logs/filters.", + "type": "string" + } + }, + { + "description": "Only entries about this kind of thing: endpoint, team, member, role, billing, add_on, or api_key.", + "in": "query", + "name": "type", + "schema": { + "description": "Only entries about this kind of thing: endpoint, team, member, role, billing, add_on, or api_key.", + "type": "string" + } + }, + { + "description": "Only entries about this endpoint, by endpoint ID.", + "in": "query", + "name": "endpoint_id", + "schema": { + "description": "Only entries about this endpoint, by endpoint ID.", + "type": "string" + } + }, + { + "description": "Only entries at or after this time. ISO 8601 date or date-time.", + "in": "query", + "name": "from", + "schema": { + "description": "Only entries at or after this time. ISO 8601 date or date-time.", + "type": "string" + } + }, + { + "description": "Only entries at or before this time. ISO 8601 date or date-time.", + "in": "query", + "name": "to", + "schema": { + "description": "Only entries at or before this time. ISO 8601 date or date-time.", "type": "string" } + }, + { + "description": "Page size. Defaults to 20, maximum 100; larger values return 100.", + "in": "query", + "name": "limit", + "schema": { + "description": "Page size. Defaults to 20, maximum 100; larger values return 100.", + "type": "integer" + } + }, + { + "description": "Number of entries to skip. Defaults to 0.", + "in": "query", + "name": "offset", + "schema": { + "description": "Number of entries to skip. Defaults to 0.", + "type": "integer" + } } ], "responses": { @@ -113,124 +174,110 @@ "schema": { "properties": { "data": { - "description": "An array of data which contains the following fields:", + "description": "Array of activity log entries, newest first.", "items": { "properties": { - "credits": { - "description": "The API credit cost of the method for the account's billing version", - "type": "integer" - }, - "method": { - "description": "The name of the RPC method", + "action": { + "description": "What happened, such as created, updated, deleted, paused, invited, member_removed.", "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "error": { - "description": "An error message if any issue occurs", - "type": "string" - } - }, - "type": "object" - } - } - }, - "description": "Successful response" - } - }, - "summary": "Returns the API credit cost of each RPC method available on a chain.", - "tags": [ - "api-credits" - ] - } - }, - "/v0/billing/invoices": { - "get": { - "externalDocs": { - "description": "Quicknode docs", - "url": "https://www.quicknode.com/docs/admin-api/billing/v0-billing-invoices" - }, - "operationId": "get_v0_billing_invoices", - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "properties": { - "data": { - "description": "The data object which contains the following fields:", - "properties": { - "invoices": { - "description": "An array of invoices", - "items": { + }, + "actor": { + "description": "Who made the change.", "properties": { - "amount_due": { - "description": "The total amount that is due on the invoice", - "type": "integer" - }, - "amount_paid": { - "description": "The total amount that has been paid for the invoice", - "type": "integer" + "email": { + "description": "Member's email; null for api_key, quicknode, deleted_user.", + "type": [ + "string", + "null" + ] }, - "billing_reason": { - "description": "The reason for generating the invoice", - "type": "string" + "id": { + "description": "User UUID or API key ID; null for quicknode or deleted_user.", + "type": [ + "string", + "null" + ] }, - "created": { - "description": "The timestamp when the invoice was created in second", - "type": "integer" + "name": { + "description": "Member's name or Quicknode; null for api_key.", + "type": [ + "string", + "null" + ] }, + "type": { + "description": "One of: user, api_key, quicknode, deleted_user.", + "type": "string" + } + }, + "type": "object" + }, + "description": { + "description": "Human-readable summary, the same text the dashboard shows.", + "type": "string" + }, + "id": { + "description": "Stable UUID for the entry.", + "type": "string" + }, + "occurred_at": { + "description": "When the change happened, in ISO 8601 UTC format.", + "type": "string" + }, + "target": { + "description": "What was changed.", + "properties": { "id": { - "description": "The unique identifier for the invoice", + "description": "ID of the thing that changed.", "type": "string" }, - "lines": { - "description": "An array of lines which contains the following fields:", - "items": { - "properties": { - "amount": { - "description": "The cost associated with each line item", - "type": "integer" - }, - "description": { - "description": "A detailed description of each line item billed", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "period_end": { - "description": "The end timestamp of the billing period for the invoice in second", - "type": "integer" - }, - "period_start": { - "description": "The start timestamp of the billing period for the invoice in second", - "type": "integer" + "kind": { + "description": "One of: endpoint, team, member, role, billing, add_on, api_key.", + "type": "string" }, - "status": { - "description": "The current state of the invoice", + "label": { + "description": "Display name of the kind.", "type": "string" }, - "subtotal": { - "description": "The total cost of the invoice", - "type": "integer" + "name": { + "description": "Current name where there is one; null otherwise.", + "type": [ + "string", + "null" + ] } }, "type": "object" - }, - "type": "array" - } + } + }, + "type": "object" }, - "type": "object" + "type": "array" }, "error": { - "description": "An error message if any issue occurs", - "type": "string" + "description": "Error message on failure; null on success.", + "type": [ + "string", + "null" + ] + }, + "pagination": { + "description": "Pagination metadata.", + "properties": { + "limit": { + "description": "Page size used.", + "type": "integer" + }, + "offset": { + "description": "Number of entries skipped.", + "type": "integer" + }, + "total": { + "description": "Total count of entries matching the filters.", + "type": "integer" + } + }, + "type": "object" } }, "type": "object" @@ -240,19 +287,19 @@ "description": "Successful response" } }, - "summary": "Returns a list of invoices", + "summary": "Returns activity log entries, newest first, with filters and pagination.", "tags": [ - "billing" + "activity_logs" ] } }, - "/v0/billing/payments": { + "/v0/activity_logs/filters": { "get": { "externalDocs": { "description": "Quicknode docs", - "url": "https://www.quicknode.com/docs/admin-api/billing/v0-billing-payments" + "url": "https://www.quicknode.com/docs/admin-api/activity-logs/v0-activity-logs-filters" }, - "operationId": "get_v0_billing_payments", + "operationId": "get_v0_activity_logs_filters", "responses": { "200": { "content": { @@ -260,34 +307,39 @@ "schema": { "properties": { "data": { - "description": "The data object which contains the following fields:", + "description": "Filter values available for your account.", "properties": { - "payments": { - "description": "An array of payments associated with the account", + "actors": { + "description": "Members and API keys that appear in your log.", "items": { "properties": { - "amount": { - "description": "The total amount of the payment", - "type": "string" - }, - "card_last_4": { - "description": "The last four digits of the card used for the payment (masked for security)", + "id": { + "description": "User UUID or API key ID. Use this value for the actor filter.", "type": "string" }, - "created_at": { - "description": "The timestamp when the payment was created in second", + "name": { + "description": "Member's name; null for API keys.", "type": "string" }, - "currency": { - "description": "The currency in which the payment was made", + "type": { + "description": "Either user or api_key.", "type": "string" - }, - "marketplace_amount": { - "description": "The total amount spent in the marketplace", + } + }, + "type": "object" + }, + "type": "array" + }, + "types": { + "description": "Entry types you can filter by.", + "items": { + "properties": { + "label": { + "description": "Display name for the type.", "type": "string" }, - "status": { - "description": "The current status of the payment", + "value": { + "description": "Type value to use in the type filter.", "type": "string" } }, @@ -299,8 +351,11 @@ "type": "object" }, "error": { - "description": "An error message if any issue occurs", - "type": "string" + "description": "Error message on failure; null on success.", + "type": [ + "string", + "null" + ] } }, "type": "object" @@ -310,23 +365,377 @@ "description": "Successful response" } }, - "summary": "Returns a list of payments.", + "summary": "Returns the actors and types you can filter by when listing activity log entries.", "tags": [ - "billing" + "activity_logs" ] } }, - "/v0/chains": { + "/v0/activity_logs/{id}": { "get": { "externalDocs": { "description": "Quicknode docs", - "url": "https://www.quicknode.com/docs/admin-api/chains/v0-chains" + "url": "https://www.quicknode.com/docs/admin-api/activity-logs/v0-activity-logs-id" }, - "operationId": "get_v0_chains", - "responses": { - "200": { - "content": { - "application/json": { + "operationId": "get_v0_activity_logs_by_id", + "parameters": [ + { + "description": "The UUID of the activity log entry. Get an id from the list activity log entries response. The ID is not case-sensitive. Returns 404 if the ID is not in your account's log.", + "in": "path", + "name": "id", + "required": true, + "schema": { + "description": "The UUID of the activity log entry. Get an id from the list activity log entries response. The ID is not case-sensitive. Returns 404 if the ID is not in your account's log.", + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "properties": { + "data": { + "description": "The activity log entry.", + "properties": { + "action": { + "description": "What happened, such as created, updated, deleted, paused, invited, member_removed.", + "type": "string" + }, + "actor": { + "description": "Who made the change.", + "properties": { + "email": { + "description": "Member's email; null for api_key, quicknode, deleted_user.", + "type": [ + "string", + "null" + ] + }, + "id": { + "description": "User UUID or API key ID; null for quicknode or deleted_user.", + "type": [ + "string", + "null" + ] + }, + "name": { + "description": "Member's name or Quicknode; null for api_key.", + "type": [ + "string", + "null" + ] + }, + "type": { + "description": "One of: user, api_key, quicknode, deleted_user.", + "type": "string" + } + }, + "type": "object" + }, + "description": { + "description": "Human-readable summary, the same text the dashboard shows.", + "type": "string" + }, + "id": { + "description": "Stable UUID for the entry.", + "type": "string" + }, + "occurred_at": { + "description": "When the change happened, in ISO 8601 UTC format.", + "type": "string" + }, + "target": { + "description": "What was changed.", + "properties": { + "id": { + "description": "ID of the thing that changed.", + "type": "string" + }, + "kind": { + "description": "One of: endpoint, team, member, role, billing, add_on, api_key.", + "type": "string" + }, + "label": { + "description": "Display name of the kind.", + "type": "string" + }, + "name": { + "description": "Current name where there is one; null otherwise.", + "type": [ + "string", + "null" + ] + } + }, + "type": "object" + } + }, + "type": "object" + }, + "error": { + "description": "Error message on failure; null on success.", + "type": [ + "string", + "null" + ] + } + }, + "type": "object" + } + } + }, + "description": "Successful response" + } + }, + "summary": "Returns a single activity log entry by ID.", + "tags": [ + "activity_logs" + ] + } + }, + "/v0/api-credits/{chain}": { + "get": { + "description": "Returns the API credit cost of each RPC method available on a chain. Credit costs are calculated using the account's billing version.", + "externalDocs": { + "description": "Quicknode docs", + "url": "https://www.quicknode.com/docs/admin-api/api-credits/v0-api-credits-chain" + }, + "operationId": "get_v0_api_credits_by_chain", + "parameters": [ + { + "description": "The chain slug from the GET /v0/chains response", + "in": "path", + "name": "chain", + "required": true, + "schema": { + "description": "The chain slug from the GET /v0/chains response", + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "properties": { + "data": { + "description": "An array of data which contains the following fields:", + "items": { + "properties": { + "credits": { + "description": "The API credit cost of the method for the account's billing version", + "type": "integer" + }, + "method": { + "description": "The name of the RPC method", + "type": "string" + } + }, + "type": "object" + }, + "type": "array" + }, + "error": { + "description": "An error message if any issue occurs", + "type": "string" + } + }, + "type": "object" + } + } + }, + "description": "Successful response" + } + }, + "summary": "Returns the API credit cost of each RPC method available on a chain.", + "tags": [ + "api-credits" + ] + } + }, + "/v0/billing/invoices": { + "get": { + "externalDocs": { + "description": "Quicknode docs", + "url": "https://www.quicknode.com/docs/admin-api/billing/v0-billing-invoices" + }, + "operationId": "get_v0_billing_invoices", + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "properties": { + "data": { + "description": "The data object which contains the following fields:", + "properties": { + "invoices": { + "description": "An array of invoices", + "items": { + "properties": { + "amount_due": { + "description": "The total amount that is due on the invoice", + "type": "integer" + }, + "amount_paid": { + "description": "The total amount that has been paid for the invoice", + "type": "integer" + }, + "billing_reason": { + "description": "The reason for generating the invoice", + "type": "string" + }, + "created": { + "description": "The timestamp when the invoice was created in second", + "type": "integer" + }, + "id": { + "description": "The unique identifier for the invoice", + "type": "string" + }, + "lines": { + "description": "An array of lines which contains the following fields:", + "items": { + "properties": { + "amount": { + "description": "The cost associated with each line item", + "type": "integer" + }, + "description": { + "description": "A detailed description of each line item billed", + "type": "string" + } + }, + "type": "object" + }, + "type": "array" + }, + "period_end": { + "description": "The end timestamp of the billing period for the invoice in second", + "type": "integer" + }, + "period_start": { + "description": "The start timestamp of the billing period for the invoice in second", + "type": "integer" + }, + "status": { + "description": "The current state of the invoice", + "type": "string" + }, + "subtotal": { + "description": "The total cost of the invoice", + "type": "integer" + } + }, + "type": "object" + }, + "type": "array" + } + }, + "type": "object" + }, + "error": { + "description": "An error message if any issue occurs", + "type": "string" + } + }, + "type": "object" + } + } + }, + "description": "Successful response" + } + }, + "summary": "Returns a list of invoices", + "tags": [ + "billing" + ] + } + }, + "/v0/billing/payments": { + "get": { + "externalDocs": { + "description": "Quicknode docs", + "url": "https://www.quicknode.com/docs/admin-api/billing/v0-billing-payments" + }, + "operationId": "get_v0_billing_payments", + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "properties": { + "data": { + "description": "The data object which contains the following fields:", + "properties": { + "payments": { + "description": "An array of payments associated with the account", + "items": { + "properties": { + "amount": { + "description": "The total amount of the payment", + "type": "string" + }, + "card_last_4": { + "description": "The last four digits of the card used for the payment (masked for security)", + "type": "string" + }, + "created_at": { + "description": "The timestamp when the payment was created in second", + "type": "string" + }, + "currency": { + "description": "The currency in which the payment was made", + "type": "string" + }, + "marketplace_amount": { + "description": "The total amount spent in the marketplace", + "type": "string" + }, + "status": { + "description": "The current status of the payment", + "type": "string" + } + }, + "type": "object" + }, + "type": "array" + } + }, + "type": "object" + }, + "error": { + "description": "An error message if any issue occurs", + "type": "string" + } + }, + "type": "object" + } + } + }, + "description": "Successful response" + } + }, + "summary": "Returns a list of payments.", + "tags": [ + "billing" + ] + } + }, + "/v0/chains": { + "get": { + "externalDocs": { + "description": "Quicknode docs", + "url": "https://www.quicknode.com/docs/admin-api/chains/v0-chains" + }, + "operationId": "get_v0_chains", + "responses": { + "200": { + "content": { + "application/json": { "schema": { "properties": { "data": { @@ -2195,6 +2604,10 @@ "description": "The time interval for the rate limit", "type": "string" }, + "limit_by_ip": { + "description": "Whether the rate limit applies separately to each client IP (true) or to the endpoint as a whole (false)", + "type": "boolean" + }, "methods": { "description": "A list of method names to which the rate limiter applies ", "items": { @@ -2230,7 +2643,7 @@ "description": "Successful response" } }, - "summary": "Gets method rate limits.", + "summary": "Lists method rate limits, including whether each limit applies per client IP or to the endpoint as a whole.", "tags": [ "endpoints" ] @@ -2262,6 +2675,10 @@ "description": "Specifies the time interval for the rate limit; valid values include second, minute or hour", "type": "string" }, + "limit_by_ip": { + "description": "Set to true to apply the rate separately to each client IP. Set to false or omit this field to apply the rate to the endpoint as a whole (the existing behavior).", + "type": "boolean" + }, "methods": { "description": "An array of method names to which the rate limiter applies", "items": { @@ -2306,6 +2723,10 @@ "description": "The time interval for the rate limit", "type": "string" }, + "limit_by_ip": { + "description": "Whether the rate limit applies separately to each client IP (true) or to the endpoint as a whole (false)", + "type": "boolean" + }, "methods": { "description": "A list of methods the rate limiter applies to", "items": { @@ -2336,7 +2757,7 @@ "description": "Successful response" } }, - "summary": "Creates a method rate limit.", + "summary": "Creates a method rate limit per client IP or for the endpoint as a whole.", "tags": [ "endpoints" ] @@ -2399,6 +2820,7 @@ ] }, "patch": { + "description": "Updates a method rate limit. Send only the fields to change; omitted fields retain their current values.", "externalDocs": { "description": "Quicknode docs", "url": "https://www.quicknode.com/docs/admin-api/endpoint-rate-limits/v0-endpoints-id-method-rate-limits-method_rate_limit_id" @@ -2431,6 +2853,10 @@ "application/json": { "schema": { "properties": { + "limit_by_ip": { + "description": "Set to true to apply the rate separately to each client IP, or false to apply it to the endpoint as a whole. Omit this field to keep the current setting. This can be the only field in the request.", + "type": "boolean" + }, "methods": { "description": "An array of method names to which the rate limiter applies", "items": { @@ -2447,16 +2873,11 @@ "type": "string" } }, - "required": [ - "status", - "methods", - "rate" - ], "type": "object" } } }, - "required": true + "required": false }, "responses": { "200": { @@ -2479,6 +2900,10 @@ "description": "The time interval for the rate limit", "type": "string" }, + "limit_by_ip": { + "description": "Whether the rate limit applies separately to each client IP (true) or to the endpoint as a whole (false)", + "type": "boolean" + }, "methods": { "description": "A list of methods the rate limiter applies to", "items": { @@ -2549,17 +2974,142 @@ "name": "metric", "required": true, "schema": { - "description": "Specifies the type of metric to retrieve. Valid values includes - method_calls_over_time, response_status_over_time, method_call_breakdown, response_status_breakdown or method_response_time_max", - "type": "string" + "description": "Specifies the type of metric to retrieve. Valid values includes - method_calls_over_time, response_status_over_time, method_call_breakdown, response_status_breakdown or method_response_time_max", + "type": "string" + } + }, + { + "description": "Required when metric is method_response_time_max. Selects the response time percentile to return. For example, 95 returns the response time at or below which 95% of observed RPC responses completed. Accepted values: integers from 1 to 100, such as 50, 95, or 99", + "in": "query", + "name": "percentile", + "schema": { + "description": "Required when metric is method_response_time_max. Selects the response time percentile to return. For example, 95 returns the response time at or below which 95% of observed RPC responses completed. Accepted values: integers from 1 to 100, such as 50, 95, or 99", + "type": "integer" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "properties": { + "data": { + "description": "An array of data", + "items": { + "properties": { + "data": { + "description": "A nested list of numerical values representing the metric fetched for the endpoint", + "items": {}, + "type": "array" + }, + "tag": { + "description": "A string label that identifies or categorizes the specific metric", + "type": "string" + } + }, + "type": "object" + }, + "type": "array" + }, + "error": { + "description": "A string containing an error message if the request to fetch the metric fails", + "type": "string" + } + }, + "type": "object" + } + } + }, + "description": "Successful response" + } + }, + "summary": "Returns a single metric.", + "tags": [ + "endpoints" + ] + } + }, + "/v0/endpoints/{id}/metrics/errors/summary": { + "post": { + "externalDocs": { + "description": "Quicknode docs", + "url": "https://www.quicknode.com/docs/admin-api/observability/v0-endpoints-id-metrics-errors-summary" + }, + "operationId": "post_v0_endpoints_by_id_metrics_errors_summary", + "parameters": [ + { + "description": "Numeric Admin API endpoint ID returned by GET /v0/endpoints. Do not use an endpoint UUID from a transaction record.", + "in": "path", + "name": "id", + "required": true, + "schema": { + "description": "Numeric Admin API endpoint ID returned by GET /v0/endpoints. Do not use an endpoint UUID from a transaction record.", + "type": "string" + } + }, + { + "description": "ISO 8601 start time. Required together with to when last is omitted.", + "in": "query", + "name": "from", + "schema": { + "description": "ISO 8601 start time. Required together with to when last is omitted.", + "type": "string" + } + }, + { + "description": "ISO 8601 end time. Required together with from when last is omitted.", + "in": "query", + "name": "to", + "schema": { + "description": "ISO 8601 end time. Required together with from when last is omitted.", + "type": "string" + } + }, + { + "description": "Relative time window instead of from and to; for example, 1h for the last hour.", + "in": "query", + "name": "last", + "schema": { + "description": "Relative time window instead of from and to; for example, 1h for the last hour.", + "type": "string" + } + }, + { + "description": "Repeat this query parameter for grouping dimensions: method. Method grouping requires kind=rpc.", + "in": "query", + "name": "group_by[]", + "schema": { + "description": "Repeat this query parameter for grouping dimensions: method. Method grouping requires kind=rpc.", + "items": {}, + "type": "array" + } + }, + { + "description": "Filter errors to rpc or http. Omit to include both. Use rpc when grouping by method.", + "in": "query", + "name": "kind", + "schema": { + "description": "Filter errors to rpc or http. Omit to include both. Use rpc when grouping by method.", + "type": "string" + } + }, + { + "description": "Positive maximum number of results per page; for example, 2.", + "in": "query", + "name": "limit", + "schema": { + "description": "Positive maximum number of results per page; for example, 2.", + "type": "integer" } }, { - "description": "Required when metric is method_response_time_max. Selects the response time percentile to return. For example, 95 returns the response time at or below which 95% of observed RPC responses completed. Accepted values: integers from 1 to 100, such as 50, 95, or 99", + "description": "Opaque next_cursor from the previous response. Keep the same time range, filters, grouping, and limit when requesting subsequent pages.", "in": "query", - "name": "percentile", + "name": "cursor", "schema": { - "description": "Required when metric is method_response_time_max. Selects the response time percentile to return. For example, 95 returns the response time at or below which 95% of observed RPC responses completed. Accepted values: integers from 1 to 100, such as 50, 95, or 99", - "type": "integer" + "description": "Opaque next_cursor from the previous response. Keep the same time range, filters, grouping, and limit when requesting subsequent pages.", + "type": "string" } } ], @@ -2570,26 +3120,71 @@ "schema": { "properties": { "data": { - "description": "An array of data", - "items": { - "properties": { - "data": { - "description": "A nested list of numerical values representing the metric fetched for the endpoint", - "items": {}, - "type": "array" + "description": "Response data. Null when the request fails.", + "oneOf": [ + { + "properties": { + "breakdown": { + "description": "Grouped results. Present when grouping is requested; can be empty.", + "items": { + "properties": { + "count": { + "description": "Number of errors in this group.", + "type": "number" + }, + "kind": { + "description": "Error kind: rpc or http.", + "type": "string" + }, + "method": { + "description": "RPC method name. In a breakdown, present when grouping by method.", + "type": "string" + } + }, + "type": "object" + }, + "type": "array" + }, + "from": { + "description": "Effective start of the returned time range, in ISO 8601 format.", + "type": "string" + }, + "next_cursor": { + "description": "Opaque continuation cursor. Present when another page is available. Pass it unchanged as cursor.", + "type": "string" + }, + "to": { + "description": "Effective end of the returned time range, in ISO 8601 format.", + "type": "string" + }, + "totals": { + "description": "Aggregate totals for the selected time range.", + "properties": { + "http_errors": { + "description": "Number of HTTP errors.", + "type": "number" + }, + "rpc_errors": { + "description": "Number of RPC errors.", + "type": "number" + } + }, + "type": "object" + } }, - "tag": { - "description": "A string label that identifies or categorizes the specific metric", - "type": "string" - } + "type": "object" }, - "type": "object" - }, - "type": "array" + { + "type": "null" + } + ] }, "error": { - "description": "A string containing an error message if the request to fetch the metric fails", - "type": "string" + "description": "Error message on failure; null on success.", + "type": [ + "string", + "null" + ] } }, "type": "object" @@ -2599,7 +3194,7 @@ "description": "Successful response" } }, - "summary": "Returns a single metric.", + "summary": "Returns RPC and HTTP error counts for one endpoint for a time range.", "tags": [ "endpoints" ] @@ -2634,6 +3229,10 @@ "data": { "description": "The data object which contains the endpoint rate limit configuration", "properties": { + "limit_by_ip": { + "description": "Whether the endpoint rate limits apply to each client IP address", + "type": "boolean" + }, "rate_limits": { "description": "An array of endpoint rate limit configurations", "items": { @@ -2680,7 +3279,7 @@ ] }, "patch": { - "description": "Updates endpoint rate limits. Only rate limits specified in the payload are updated; omitted rate limits remain unchanged. The response returns the effective endpoint-level limits as a flat limits object.", + "description": "Updates endpoint rate limits. Only rate limits specified in the payload are updated; omitted rate limits remain unchanged. Set limit_by_ip to apply the endpoint rate limits to each client IP address. The response returns the effective endpoint-level limits as a flat limits object.", "externalDocs": { "description": "Quicknode docs", "url": "https://www.quicknode.com/docs/admin-api/endpoint-rate-limits/v0-endpoints-id-rate-limits" @@ -2703,8 +3302,12 @@ "application/json": { "schema": { "properties": { + "limit_by_ip": { + "description": "Set to true to apply the endpoint rate limits to each client IP address, or false to apply them to the endpoint as a whole. Omit to keep the current setting", + "type": "boolean" + }, "rate_limits": { - "description": "Contains the rate limit configurations that you want to update", + "description": "Contains the rate limit configurations that you want to update. Required unless limit_by_ip is present", "properties": { "rpd": { "description": "Specifies the maximum number of requests allowed per day", @@ -2722,14 +3325,11 @@ "type": "object" } }, - "required": [ - "rate_limits" - ], "type": "object" } } }, - "required": true + "required": false }, "responses": { "200": { @@ -2740,6 +3340,10 @@ "data": { "description": "The data object which contains the following fields:", "properties": { + "limit_by_ip": { + "description": "Whether the endpoint rate limits apply to each client IP address", + "type": "boolean" + }, "limits": { "description": "The limits object which contains the following fields:", "properties": { @@ -4475,19 +5079,366 @@ "items": {}, "type": "array" }, - "tag": { - "description": "An array of strings identifying the metric group (e.g., network name)", - "items": {}, - "type": "array" - } + "tag": { + "description": "An array of strings identifying the metric group (e.g., network name)", + "items": {}, + "type": "array" + } + }, + "type": "object" + }, + "type": "array" + }, + "error": { + "description": "Contains error details if the request failed; null if successful", + "type": "string" + } + }, + "type": "object" + } + } + }, + "description": "Successful response" + } + }, + "summary": "Fetches metrics aggregated across all endpoints for an account.", + "tags": [ + "metrics" + ] + } + }, + "/v0/metrics/errors/summary": { + "post": { + "externalDocs": { + "description": "Quicknode docs", + "url": "https://www.quicknode.com/docs/admin-api/observability/v0-metrics-errors-summary" + }, + "operationId": "post_v0_metrics_errors_summary", + "parameters": [ + { + "description": "ISO 8601 start time. Required together with to when last is omitted.", + "in": "query", + "name": "from", + "schema": { + "description": "ISO 8601 start time. Required together with to when last is omitted.", + "type": "string" + } + }, + { + "description": "ISO 8601 end time. Required together with from when last is omitted.", + "in": "query", + "name": "to", + "schema": { + "description": "ISO 8601 end time. Required together with from when last is omitted.", + "type": "string" + } + }, + { + "description": "Relative time window instead of from and to; for example, 1h for the last hour.", + "in": "query", + "name": "last", + "schema": { + "description": "Relative time window instead of from and to; for example, 1h for the last hour.", + "type": "string" + } + }, + { + "description": "Repeat this query parameter for grouping dimensions: method. Method grouping requires kind=rpc.", + "in": "query", + "name": "group_by[]", + "schema": { + "description": "Repeat this query parameter for grouping dimensions: method. Method grouping requires kind=rpc.", + "items": {}, + "type": "array" + } + }, + { + "description": "Filter errors to rpc or http. Omit to include both. Use rpc when grouping by method.", + "in": "query", + "name": "kind", + "schema": { + "description": "Filter errors to rpc or http. Omit to include both. Use rpc when grouping by method.", + "type": "string" + } + }, + { + "description": "Positive maximum number of results per page; for example, 2.", + "in": "query", + "name": "limit", + "schema": { + "description": "Positive maximum number of results per page; for example, 2.", + "type": "integer" + } + }, + { + "description": "Opaque next_cursor from the previous response. Keep the same time range, filters, grouping, and limit when requesting subsequent pages.", + "in": "query", + "name": "cursor", + "schema": { + "description": "Opaque next_cursor from the previous response. Keep the same time range, filters, grouping, and limit when requesting subsequent pages.", + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "properties": { + "data": { + "description": "Response data. Null when the request fails.", + "oneOf": [ + { + "properties": { + "breakdown": { + "description": "Grouped results. Present when grouping is requested; can be empty.", + "items": { + "properties": { + "count": { + "description": "Number of errors in this group.", + "type": "number" + }, + "kind": { + "description": "Error kind: rpc or http.", + "type": "string" + }, + "method": { + "description": "RPC method name. In a breakdown, present when grouping by method.", + "type": "string" + } + }, + "type": "object" + }, + "type": "array" + }, + "from": { + "description": "Effective start of the returned time range, in ISO 8601 format.", + "type": "string" + }, + "next_cursor": { + "description": "Opaque continuation cursor. Present when another page is available. Pass it unchanged as cursor.", + "type": "string" + }, + "to": { + "description": "Effective end of the returned time range, in ISO 8601 format.", + "type": "string" + }, + "totals": { + "description": "Aggregate totals for the selected time range.", + "properties": { + "http_errors": { + "description": "Number of HTTP errors.", + "type": "number" + }, + "rpc_errors": { + "description": "Number of RPC errors.", + "type": "number" + } + }, + "type": "object" + } + }, + "type": "object" + }, + { + "type": "null" + } + ] + }, + "error": { + "description": "Error message on failure; null on success.", + "type": [ + "string", + "null" + ] + } + }, + "type": "object" + } + } + }, + "description": "Successful response" + } + }, + "summary": "Returns account RPC and HTTP error counts for a time range.", + "tags": [ + "metrics" + ] + } + }, + "/v0/metrics/traffic/summary": { + "post": { + "externalDocs": { + "description": "Quicknode docs", + "url": "https://www.quicknode.com/docs/admin-api/observability/v0-metrics-traffic-summary" + }, + "operationId": "post_v0_metrics_traffic_summary", + "parameters": [ + { + "description": "ISO 8601 start time. Required together with to when last is omitted.", + "in": "query", + "name": "from", + "schema": { + "description": "ISO 8601 start time. Required together with to when last is omitted.", + "type": "string" + } + }, + { + "description": "ISO 8601 end time. Required together with from when last is omitted.", + "in": "query", + "name": "to", + "schema": { + "description": "ISO 8601 end time. Required together with from when last is omitted.", + "type": "string" + } + }, + { + "description": "Relative time window instead of from and to; for example, 1h for the last hour.", + "in": "query", + "name": "last", + "schema": { + "description": "Relative time window instead of from and to; for example, 1h for the last hour.", + "type": "string" + } + }, + { + "description": "Repeat this query parameter for grouping dimensions: method, endpoint. Omit it to return totals without a breakdown.", + "in": "query", + "name": "group_by[]", + "schema": { + "description": "Repeat this query parameter for grouping dimensions: method, endpoint. Omit it to return totals without a breakdown.", + "items": {}, + "type": "array" + } + }, + { + "description": "Positive maximum number of results per page; for example, 2.", + "in": "query", + "name": "limit", + "schema": { + "description": "Positive maximum number of results per page; for example, 2.", + "type": "integer" + } + }, + { + "description": "Opaque next_cursor from the previous response. Keep the same time range, filters, grouping, and limit when requesting subsequent pages.", + "in": "query", + "name": "cursor", + "schema": { + "description": "Opaque next_cursor from the previous response. Keep the same time range, filters, grouping, and limit when requesting subsequent pages.", + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "properties": { + "data": { + "description": "Response data. Null when the request fails.", + "oneOf": [ + { + "properties": { + "breakdown": { + "description": "Grouped results. Present when grouping is requested; can be empty.", + "items": { + "properties": { + "active_methods": { + "description": "Number of distinct active methods.", + "type": "integer" + }, + "bytes": { + "description": "Number of bytes transferred.", + "type": "integer" + }, + "bytes_credits": { + "description": "Credits consumed by transferred bytes.", + "type": "integer" + }, + "credits": { + "description": "Total API credits consumed.", + "type": "integer" + }, + "endpoint": { + "description": "Endpoint UUID; present when grouping by endpoint.", + "type": "string" + }, + "method": { + "description": "RPC method name. In a breakdown, present when grouping by method.", + "type": "string" + }, + "request_credits": { + "description": "Credits consumed by requests.", + "type": "integer" + }, + "successful_requests": { + "description": "Number of successful requests.", + "type": "integer" + } + }, + "type": "object" + }, + "type": "array" + }, + "from": { + "description": "Effective start of the returned time range, in ISO 8601 format.", + "type": "string" + }, + "next_cursor": { + "description": "Opaque continuation cursor. Present when another page is available. Pass it unchanged as cursor.", + "type": "string" + }, + "to": { + "description": "Effective end of the returned time range, in ISO 8601 format.", + "type": "string" + }, + "totals": { + "description": "Aggregate totals for the selected time range.", + "properties": { + "active_methods": { + "description": "Number of distinct active methods.", + "type": "integer" + }, + "bytes": { + "description": "Number of bytes transferred.", + "type": "integer" + }, + "bytes_credits": { + "description": "Credits consumed by transferred bytes.", + "type": "integer" + }, + "credits": { + "description": "Total API credits consumed.", + "type": "integer" + }, + "request_credits": { + "description": "Credits consumed by requests.", + "type": "integer" + }, + "successful_requests": { + "description": "Number of successful requests.", + "type": "integer" + } + }, + "type": "object" + } + }, + "type": "object" }, - "type": "object" - }, - "type": "array" + { + "type": "null" + } + ] }, "error": { - "description": "Contains error details if the request failed; null if successful", - "type": "string" + "description": "Error message on failure; null on success.", + "type": [ + "string", + "null" + ] } }, "type": "object" @@ -4497,7 +5448,7 @@ "description": "Successful response" } }, - "summary": "Fetches metrics aggregated across all endpoints for an account.", + "summary": "Returns successful requests, transferred bytes, credits, and distinct active methods for a time range.", "tags": [ "metrics" ] @@ -4847,19 +5798,250 @@ "description": "Successful response" } }, - "summary": "Retrieves details for a specific team.", + "summary": "Retrieves details for a specific team.", + "tags": [ + "teams" + ] + } + }, + "/v0/teams/{id}/endpoints": { + "get": { + "externalDocs": { + "description": "Quicknode docs", + "url": "https://www.quicknode.com/docs/admin-api/team-control/v0-teams-id-endpoints" + }, + "operationId": "get_v0_teams_by_id_endpoints", + "parameters": [ + { + "description": "The unique identifier for the team", + "in": "path", + "name": "id", + "required": true, + "schema": { + "description": "The unique identifier for the team", + "type": "integer" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "properties": { + "data": { + "description": "An array of endpoint objects containing the following fields:", + "items": { + "properties": { + "chain": { + "description": "The blockchain the endpoint is associated with", + "type": "string" + }, + "id": { + "description": "A unique identifier for the endpoint", + "type": "integer" + }, + "network": { + "description": "The specific network of the blockchain", + "type": "string" + }, + "subdomain": { + "description": "The subdomain name of the endpoint", + "type": "string" + } + }, + "type": "object" + }, + "type": "array" + } + }, + "type": "object" + } + } + }, + "description": "Successful response" + } + }, + "summary": "Retrieves a list of endpoints accessible to a team.", + "tags": [ + "teams" + ] + }, + "patch": { + "externalDocs": { + "description": "Quicknode docs", + "url": "https://www.quicknode.com/docs/admin-api/team-control/v0-teams-id-endpoints-patch" + }, + "operationId": "patch_v0_teams_by_id_endpoints", + "parameters": [ + { + "description": "The unique identifier for the team", + "in": "path", + "name": "id", + "required": true, + "schema": { + "description": "The unique identifier for the team", + "type": "integer" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "properties": { + "endpoint_ids": { + "description": "An array of endpoint IDs to assign to the team. Pass an empty array to unassign all endpoints", + "items": {}, + "type": "array" + } + }, + "required": [ + "endpoint_ids" + ], + "type": "object" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "properties": { + "data": { + "description": "The response object containing the following fields:", + "properties": { + "success": { + "description": "Indicates whether the operation was successful", + "type": "boolean" + } + }, + "type": "object" + }, + "error": { + "description": "An error message if any issue occurs", + "type": "string" + } + }, + "type": "object" + } + } + }, + "description": "Successful response" + } + }, + "summary": "Assigns or unassigns endpoints to a team.", + "tags": [ + "teams" + ] + } + }, + "/v0/teams/{id}/members": { + "post": { + "externalDocs": { + "description": "Quicknode docs", + "url": "https://www.quicknode.com/docs/admin-api/team-control/v0-teams-id-members-post" + }, + "operationId": "post_v0_teams_by_id_members", + "parameters": [ + { + "description": "The unique identifier for the team", + "in": "path", + "name": "id", + "required": true, + "schema": { + "description": "The unique identifier for the team", + "type": "integer" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "properties": { + "email": { + "description": "The email address of the user to invite", + "type": "string" + }, + "full_name": { + "description": "The full name of the user to invite (required only for new users)", + "type": "string" + }, + "role": { + "description": "The role to assign to the invited user. Valid values: admin, viewer, billing. Required only for new users", + "type": "string" + } + }, + "required": [ + "email" + ], + "type": "object" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "properties": { + "data": { + "description": "The invited user object containing the following fields:", + "properties": { + "email": { + "description": "The email address of the invited user", + "type": "string" + }, + "full_name": { + "description": "The full name of the invited user", + "type": "string" + }, + "id": { + "description": "A unique identifier for the invited user", + "type": "integer" + }, + "role": { + "description": "The role assigned to the invited user (admin, viewer, or billing)", + "type": "string" + }, + "status": { + "description": "The status of the invitation (e.g., Active, Pending)", + "type": "string" + } + }, + "type": "object" + }, + "error": { + "description": "An error message if any issue occurs", + "type": "string" + } + }, + "type": "object" + } + } + }, + "description": "Successful response" + } + }, + "summary": "Invites a user to a team.", "tags": [ "teams" ] } }, - "/v0/teams/{id}/endpoints": { - "get": { + "/v0/teams/{id}/members/{user_id}": { + "delete": { "externalDocs": { "description": "Quicknode docs", - "url": "https://www.quicknode.com/docs/admin-api/team-control/v0-teams-id-endpoints" + "url": "https://www.quicknode.com/docs/admin-api/team-control/v0-teams-id-members-user_id-delete" }, - "operationId": "get_v0_teams_by_id_endpoints", + "operationId": "delete_v0_teams_by_id_members_by_user_id", "parameters": [ { "description": "The unique identifier for the team", @@ -4870,6 +6052,16 @@ "description": "The unique identifier for the team", "type": "integer" } + }, + { + "description": "The unique identifier for the user to remove", + "in": "path", + "name": "user_id", + "required": true, + "schema": { + "description": "The unique identifier for the user to remove", + "type": "integer" + } } ], "responses": { @@ -4879,29 +6071,18 @@ "schema": { "properties": { "data": { - "description": "An array of endpoint objects containing the following fields:", - "items": { - "properties": { - "chain": { - "description": "The blockchain the endpoint is associated with", - "type": "string" - }, - "id": { - "description": "A unique identifier for the endpoint", - "type": "integer" - }, - "network": { - "description": "The specific network of the blockchain", - "type": "string" - }, - "subdomain": { - "description": "The subdomain name of the endpoint", - "type": "string" - } - }, - "type": "object" + "description": "The response object containing the following fields:", + "properties": { + "message": { + "description": "A message confirming the user was removed successfully", + "type": "string" + } }, - "type": "array" + "type": "object" + }, + "error": { + "description": "An error message if any issue occurs", + "type": "string" } }, "type": "object" @@ -4911,17 +6092,19 @@ "description": "Successful response" } }, - "summary": "Retrieves a list of endpoints accessible to a team.", + "summary": "Removes a user from a team.", "tags": [ "teams" ] - }, - "patch": { + } + }, + "/v0/teams/{id}/members/{user_id}/resend_invite": { + "post": { "externalDocs": { "description": "Quicknode docs", - "url": "https://www.quicknode.com/docs/admin-api/team-control/v0-teams-id-endpoints-patch" + "url": "https://www.quicknode.com/docs/admin-api/team-control/v0-teams-id-members-user_id-resend_invite" }, - "operationId": "patch_v0_teams_by_id_endpoints", + "operationId": "post_v0_teams_by_id_members_by_user_id_resend_invite", "parameters": [ { "description": "The unique identifier for the team", @@ -4932,21 +6115,123 @@ "description": "The unique identifier for the team", "type": "integer" } + }, + { + "description": "The unique identifier for the user to resend the invitation to", + "in": "path", + "name": "user_id", + "required": true, + "schema": { + "description": "The unique identifier for the user to resend the invitation to", + "type": "integer" + } } ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "properties": { + "data": { + "description": "The response object containing the following fields:", + "properties": { + "message": { + "description": "A message confirming the invitation was resent successfully", + "type": "string" + } + }, + "type": "object" + }, + "error": { + "description": "An error message if any issue occurs", + "type": "string" + } + }, + "type": "object" + } + } + }, + "description": "Successful response" + } + }, + "summary": "Resends an invitation email to a pending team member.", + "tags": [ + "teams" + ] + } + }, + "/v0/tooling-access": { + "get": { + "externalDocs": { + "description": "Quicknode docs", + "url": "https://www.quicknode.com/docs/admin-api/tooling-access/v0-tooling-access" + }, + "operationId": "get_v0_tooling_access", + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "properties": { + "data": { + "description": "An object which contains the following fields:", + "properties": { + "enabled": { + "description": "Whether Tooling Access is currently enabled for the account", + "type": "boolean" + }, + "enabled_at": { + "description": "The timestamp when Tooling Access was enabled", + "type": "string" + }, + "endpoint_id": { + "description": "The unique identifier of the endpoint provisioned for Tooling Access", + "type": "integer" + }, + "endpoint_url": { + "description": "The URL of the endpoint provisioned for Tooling Access. May be present even when disabled if the account was previously provisioned", + "type": "string" + } + }, + "type": "object" + }, + "error": { + "description": "An error message if any issue occurs", + "type": "string" + } + }, + "type": "object" + } + } + }, + "description": "Successful response" + } + }, + "summary": "Returns whether Tooling Access is enabled for the account.", + "tags": [ + "tooling-access" + ] + }, + "patch": { + "description": "Enable (provision/reactivate) or disable Tooling Access for the account. Enabling is idempotent and requires an admin role.", + "externalDocs": { + "description": "Quicknode docs", + "url": "https://www.quicknode.com/docs/admin-api/tooling-access/v0-tooling-access-patch" + }, + "operationId": "patch_v0_tooling_access", "requestBody": { "content": { "application/json": { "schema": { "properties": { - "endpoint_ids": { - "description": "An array of endpoint IDs to assign to the team. Pass an empty array to unassign all endpoints", - "items": {}, - "type": "array" + "enabled": { + "description": "Set to true to enable (provision/reactivate) Tooling Access or false to disable it", + "type": "boolean" } }, "required": [ - "endpoint_ids" + "enabled" ], "type": "object" } @@ -4961,11 +6246,65 @@ "schema": { "properties": { "data": { - "description": "The response object containing the following fields:", + "description": "An object which contains the following fields:", "properties": { - "success": { - "description": "Indicates whether the operation was successful", + "enabled": { + "description": "Whether Tooling Access is enabled after the update", "type": "boolean" + }, + "endpoint_url": { + "description": "The URL of the endpoint provisioned for Tooling Access", + "type": "string" + } + }, + "type": "object" + }, + "error": { + "description": "An error message if any issue occurs", + "type": "string" + } + }, + "type": "object" + } + } + }, + "description": "Successful response" + } + }, + "summary": "Enable (provision/reactivate) or disable Tooling Access for the account.", + "tags": [ + "tooling-access" + ] + } + }, + "/v0/tooling-access/token": { + "post": { + "description": "Mints a short-lived ES256 JWT for authenticating data-plane RPC calls. Requires Tooling Access to be enabled first.", + "externalDocs": { + "description": "Quicknode docs", + "url": "https://www.quicknode.com/docs/admin-api/tooling-access/v0-tooling-access-token-post" + }, + "operationId": "post_v0_tooling_access_token", + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "properties": { + "data": { + "description": "An object which contains the following fields:", + "properties": { + "endpoint_url": { + "description": "The URL of the Tooling Access endpoint the token authenticates against", + "type": "string" + }, + "expires_at": { + "description": "The timestamp when the token expires", + "type": "string" + }, + "token": { + "description": "The short-lived ES256 JWT used to authenticate RPC calls", + "type": "string" } }, "type": "object" @@ -4982,58 +6321,75 @@ "description": "Successful response" } }, - "summary": "Assigns or unassigns endpoints to a team.", + "summary": "Mints a short-lived ES256 JWT for authenticating data-plane RPC calls.", "tags": [ - "teams" + "tooling-access" ] } }, - "/v0/teams/{id}/members": { + "/v0/transactions": { "post": { "externalDocs": { "description": "Quicknode docs", - "url": "https://www.quicknode.com/docs/admin-api/team-control/v0-teams-id-members-post" + "url": "https://www.quicknode.com/docs/admin-api/observability/v0-transactions" }, - "operationId": "post_v0_teams_by_id_members", + "operationId": "post_v0_transactions", "parameters": [ { - "description": "The unique identifier for the team", - "in": "path", - "name": "id", - "required": true, + "description": "ISO 8601 start time. Required together with to when last is omitted.", + "in": "query", + "name": "from", "schema": { - "description": "The unique identifier for the team", + "description": "ISO 8601 start time. Required together with to when last is omitted.", + "type": "string" + } + }, + { + "description": "ISO 8601 end time. Required together with from when last is omitted.", + "in": "query", + "name": "to", + "schema": { + "description": "ISO 8601 end time. Required together with from when last is omitted.", + "type": "string" + } + }, + { + "description": "Relative time window instead of from and to; for example, 1h for the last hour.", + "in": "query", + "name": "last", + "schema": { + "description": "Relative time window instead of from and to; for example, 1h for the last hour.", + "type": "string" + } + }, + { + "description": "Positive maximum number of results per page; for example, 2.", + "in": "query", + "name": "limit", + "schema": { + "description": "Positive maximum number of results per page; for example, 2.", "type": "integer" } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "properties": { - "email": { - "description": "The email address of the user to invite", - "type": "string" - }, - "full_name": { - "description": "The full name of the user to invite (required only for new users)", - "type": "string" - }, - "role": { - "description": "The role to assign to the invited user. Valid values: admin, viewer, billing. Required only for new users", - "type": "string" - } - }, - "required": [ - "email" - ], - "type": "object" - } + }, + { + "description": "Opaque next_cursor from the previous response. Keep the same time range, filters, grouping, and limit when requesting subsequent pages.", + "in": "query", + "name": "cursor", + "schema": { + "description": "Opaque next_cursor from the previous response. Keep the same time range, filters, grouping, and limit when requesting subsequent pages.", + "type": "string" } }, - "required": true - }, + { + "description": "Filter submissions by network identifier, such as robinhood-testnet.", + "in": "query", + "name": "network", + "schema": { + "description": "Filter submissions by network identifier, such as robinhood-testnet.", + "type": "string" + } + } + ], "responses": { "200": { "content": { @@ -5041,34 +6397,90 @@ "schema": { "properties": { "data": { - "description": "The invited user object containing the following fields:", - "properties": { - "email": { - "description": "The email address of the invited user", - "type": "string" - }, - "full_name": { - "description": "The full name of the invited user", - "type": "string" - }, - "id": { - "description": "A unique identifier for the invited user", - "type": "integer" - }, - "role": { - "description": "The role assigned to the invited user (admin, viewer, or billing)", - "type": "string" + "description": "Response data. Null when the request fails.", + "oneOf": [ + { + "properties": { + "from": { + "description": "Effective start of the returned time range, in ISO 8601 format.", + "type": "string" + }, + "next_cursor": { + "description": "Opaque continuation cursor. Present when another page is available. Pass it unchanged as cursor.", + "type": "string" + }, + "to": { + "description": "Effective end of the returned time range, in ISO 8601 format.", + "type": "string" + }, + "transactions": { + "description": "Transaction submissions matching the selected time range and filters.", + "items": { + "properties": { + "archive": { + "description": "Whether the transaction is marked as archived.", + "type": "boolean" + }, + "attempt_count": { + "description": "Number of recorded submission attempts.", + "type": "integer" + }, + "endpoint_ids": { + "description": "Endpoint UUIDs associated with the submissions. These are not the numeric Admin API endpoint IDs.", + "items": {}, + "type": "array" + }, + "first_submitted_at": { + "description": "Timestamp of the first recorded submission.", + "type": "string" + }, + "height": { + "description": "Block height when available; otherwise null.", + "type": [ + "string", + "null" + ] + }, + "last_submitted_at": { + "description": "Timestamp of the most recent recorded submission.", + "type": "string" + }, + "methods": { + "description": "RPC method names used for submission.", + "items": {}, + "type": "array" + }, + "network": { + "description": "Network identifier.", + "type": "string" + }, + "state": { + "description": "Recorded transaction submission state; for example, submitted. This is not confirmation of inclusion or finality.", + "type": "string" + }, + "transaction_hash": { + "description": "Transaction hash or signature.", + "type": "string" + } + }, + "type": "object" + }, + "type": "array" + } + }, + "type": "object" }, - "status": { - "description": "The status of the invitation (e.g., Active, Pending)", - "type": "string" + { + "type": "null" } - }, - "type": "object" + ] }, "error": { - "description": "An error message if any issue occurs", - "type": "string" + "description": "Error message on failure; null on success.", + "type": [ + "string", + "null" + ] } }, "type": "object" @@ -5078,38 +6490,47 @@ "description": "Successful response" } }, - "summary": "Invites a user to a team.", + "summary": "Lists account transaction submissions for a time range, with cursor pagination.", "tags": [ - "teams" + "transactions" ] } }, - "/v0/teams/{id}/members/{user_id}": { - "delete": { + "/v0/transactions/{network}/{hash}": { + "post": { "externalDocs": { "description": "Quicknode docs", - "url": "https://www.quicknode.com/docs/admin-api/team-control/v0-teams-id-members-user_id-delete" + "url": "https://www.quicknode.com/docs/admin-api/observability/v0-transactions-network-hash" }, - "operationId": "delete_v0_teams_by_id_members_by_user_id", + "operationId": "post_v0_transactions_by_network_by_hash", "parameters": [ { - "description": "The unique identifier for the team", + "description": "Network returned by GET /v0/transactions.", "in": "path", - "name": "id", + "name": "network", "required": true, "schema": { - "description": "The unique identifier for the team", - "type": "integer" + "description": "Network returned by GET /v0/transactions.", + "type": "string" } }, { - "description": "The unique identifier for the user to remove", + "description": "Transaction hash or signature returned by GET /v0/transactions. URL-encode this path segment.", "in": "path", - "name": "user_id", + "name": "hash", "required": true, "schema": { - "description": "The unique identifier for the user to remove", - "type": "integer" + "description": "Transaction hash or signature returned by GET /v0/transactions. URL-encode this path segment.", + "type": "string" + } + }, + { + "description": "Set to true to include available request/response payload strings. Payloads are omitted when this parameter is not supplied.", + "in": "query", + "name": "include_payloads", + "schema": { + "description": "Set to true to include available request/response payload strings. Payloads are omitted when this parameter is not supplied.", + "type": "boolean" } } ], @@ -5120,18 +6541,100 @@ "schema": { "properties": { "data": { - "description": "The response object containing the following fields:", - "properties": { - "message": { - "description": "A message confirming the user was removed successfully", - "type": "string" + "description": "Response data. Null when the request fails.", + "oneOf": [ + { + "properties": { + "data": { + "description": "Recorded transaction details; null when exists is false.", + "oneOf": [ + { + "properties": { + "attempts": { + "description": "Recorded attempts to submit this transaction.", + "items": { + "properties": { + "endpoint_id": { + "description": "Endpoint UUID for this attempt; not the numeric Admin API endpoint ID.", + "type": "string" + }, + "method": { + "description": "RPC method name. In a breakdown, present when grouping by method.", + "type": "string" + }, + "payloads": { + "description": "Optional request and response payloads, returned when include_payloads=true and available.", + "properties": { + "request": { + "description": "Recorded request payload as a JSON-encoded string.", + "type": "string" + }, + "response": { + "description": "Recorded response payload as a JSON-encoded string.", + "type": "string" + } + }, + "type": "object" + }, + "request_id": { + "description": "Identifier of the recorded request.", + "type": "string" + }, + "submitted_at": { + "description": "Timestamp of the submission attempt.", + "type": "string" + } + }, + "type": "object" + }, + "type": "array" + }, + "first_submitted_at": { + "description": "Timestamp of the first recorded submission.", + "type": "string" + }, + "last_submitted_at": { + "description": "Timestamp of the most recent recorded submission.", + "type": "string" + }, + "network": { + "description": "Network identifier.", + "type": "string" + }, + "state": { + "description": "Recorded transaction submission state; for example, submitted. This is not confirmation of inclusion or finality.", + "type": "string" + }, + "transaction_hash": { + "description": "Transaction hash or signature.", + "type": "string" + } + }, + "type": "object" + }, + { + "type": "null" + } + ] + }, + "exists": { + "description": "Whether a matching transaction submission was found.", + "type": "boolean" + } + }, + "type": "object" + }, + { + "type": "null" } - }, - "type": "object" + ] }, "error": { - "description": "An error message if any issue occurs", - "type": "string" + "description": "Error message on failure; null on success.", + "type": [ + "string", + "null" + ] } }, "type": "object" @@ -5141,38 +6644,45 @@ "description": "Successful response" } }, - "summary": "Removes a user from a team.", + "summary": "Returns recorded submission attempts for a transaction, optionally including request and response payloads.", "tags": [ - "teams" + "transactions" ] } }, - "/v0/teams/{id}/members/{user_id}/resend_invite": { + "/v0/usage/credits/summary": { "post": { "externalDocs": { "description": "Quicknode docs", - "url": "https://www.quicknode.com/docs/admin-api/team-control/v0-teams-id-members-user_id-resend_invite" + "url": "https://www.quicknode.com/docs/admin-api/observability/v0-usage-credits-summary" }, - "operationId": "post_v0_teams_by_id_members_by_user_id_resend_invite", + "operationId": "post_v0_usage_credits_summary", "parameters": [ { - "description": "The unique identifier for the team", - "in": "path", - "name": "id", - "required": true, + "description": "ISO 8601 start time. Required together with to when last is omitted.", + "in": "query", + "name": "from", "schema": { - "description": "The unique identifier for the team", - "type": "integer" + "description": "ISO 8601 start time. Required together with to when last is omitted.", + "type": "string" } }, { - "description": "The unique identifier for the user to resend the invitation to", - "in": "path", - "name": "user_id", - "required": true, + "description": "ISO 8601 end time. Required together with from when last is omitted.", + "in": "query", + "name": "to", "schema": { - "description": "The unique identifier for the user to resend the invitation to", - "type": "integer" + "description": "ISO 8601 end time. Required together with from when last is omitted.", + "type": "string" + } + }, + { + "description": "Relative time window instead of from and to; for example, 1h for the last hour.", + "in": "query", + "name": "last", + "schema": { + "description": "Relative time window instead of from and to; for example, 1h for the last hour.", + "type": "string" } } ], @@ -5183,18 +6693,42 @@ "schema": { "properties": { "data": { - "description": "The response object containing the following fields:", - "properties": { - "message": { - "description": "A message confirming the invitation was resent successfully", - "type": "string" + "description": "Response data. Null when the request fails.", + "oneOf": [ + { + "properties": { + "from": { + "description": "Effective start of the returned time range, in ISO 8601 format.", + "type": "string" + }, + "to": { + "description": "Effective end of the returned time range, in ISO 8601 format.", + "type": "string" + }, + "totals": { + "description": "Aggregate totals for the selected time range.", + "properties": { + "credits": { + "description": "Total API credits consumed.", + "type": "integer" + } + }, + "type": "object" + } + }, + "type": "object" + }, + { + "type": "null" } - }, - "type": "object" + ] }, "error": { - "description": "An error message if any issue occurs", - "type": "string" + "description": "Error message on failure; null on success.", + "type": [ + "string", + "null" + ] } }, "type": "object" @@ -5204,19 +6738,39 @@ "description": "Successful response" } }, - "summary": "Resends an invitation email to a pending team member.", + "summary": "Returns total account API credits for a time range.", "tags": [ - "teams" + "usage" ] } }, - "/v0/tooling-access": { + "/v0/usage/rpc": { "get": { "externalDocs": { "description": "Quicknode docs", - "url": "https://www.quicknode.com/docs/admin-api/tooling-access/v0-tooling-access" + "url": "https://www.quicknode.com/docs/admin-api/usage/v0-usage-rpc" }, - "operationId": "get_v0_tooling_access", + "operationId": "get_v0_usage_rpc", + "parameters": [ + { + "description": "Specifies the start of the time period for which the usage data is to be retrieved", + "in": "query", + "name": "start_time", + "schema": { + "description": "Specifies the start of the time period for which the usage data is to be retrieved", + "type": "integer" + } + }, + { + "description": "Specifies the end of the time period for which the usage data is to be retrieved", + "in": "query", + "name": "end_time", + "schema": { + "description": "Specifies the end of the time period for which the usage data is to be retrieved", + "type": "integer" + } + } + ], "responses": { "200": { "content": { @@ -5224,29 +6778,37 @@ "schema": { "properties": { "data": { - "description": "An object which contains the following fields:", + "description": "The data object which contains the following fields:", "properties": { - "enabled": { - "description": "Whether Tooling Access is currently enabled for the account", - "type": "boolean" + "credits_remaining": { + "description": "The number of credits remaining in the account", + "type": "integer" }, - "enabled_at": { - "description": "The timestamp when Tooling Access was enabled", - "type": "string" + "credits_used": { + "description": "The number of credits used within the specified time period", + "type": "integer" }, - "endpoint_id": { - "description": "The unique identifier of the endpoint provisioned for Tooling Access", + "end_time": { + "description": "The end timestamp for the usage data in second in second", "type": "integer" }, - "endpoint_url": { - "description": "The URL of the endpoint provisioned for Tooling Access. May be present even when disabled if the account was previously provisioned", - "type": "string" + "limit": { + "description": "The maximum number of credits available", + "type": "integer" + }, + "overages": { + "description": "The number of credits used beyond the limit", + "type": "integer" + }, + "start_time": { + "description": "The start timestamp for the usage data in second in second", + "type": "integer" } }, "type": "object" }, "error": { - "description": "An error message if any issue occurs", + "description": "A string containing an error message, if any issues occur during the request", "type": "string" } }, @@ -5257,37 +6819,39 @@ "description": "Successful response" } }, - "summary": "Returns whether Tooling Access is enabled for the account.", + "summary": "Retrieves usage total for specified time range.", "tags": [ - "tooling-access" + "usage" ] - }, - "patch": { - "description": "Enable (provision/reactivate) or disable Tooling Access for the account. Enabling is idempotent and requires an admin role.", + } + }, + "/v0/usage/rpc/by-chain": { + "get": { "externalDocs": { "description": "Quicknode docs", - "url": "https://www.quicknode.com/docs/admin-api/tooling-access/v0-tooling-access-patch" + "url": "https://www.quicknode.com/docs/admin-api/usage/v0-usage-rpc-by-chain" }, - "operationId": "patch_v0_tooling_access", - "requestBody": { - "content": { - "application/json": { - "schema": { - "properties": { - "enabled": { - "description": "Set to true to enable (provision/reactivate) Tooling Access or false to disable it", - "type": "boolean" - } - }, - "required": [ - "enabled" - ], - "type": "object" - } + "operationId": "get_v0_usage_rpc_by_chain", + "parameters": [ + { + "description": "Specifies the start of the time period for which the usage data is to be retrieved", + "in": "query", + "name": "start_time", + "schema": { + "description": "Specifies the start of the time period for which the usage data is to be retrieved", + "type": "integer" } }, - "required": true - }, + { + "description": "Specifies the end of the time period for which the usage data is to be retrieved", + "in": "query", + "name": "end_time", + "schema": { + "description": "Specifies the end of the time period for which the usage data is to be retrieved", + "type": "integer" + } + } + ], "responses": { "200": { "content": { @@ -5295,21 +6859,50 @@ "schema": { "properties": { "data": { - "description": "An object which contains the following fields:", + "description": "The data object which contains the following fields:", "properties": { - "enabled": { - "description": "Whether Tooling Access is enabled after the update", - "type": "boolean" + "chains": { + "description": "An array of blockchains and their corresponding credit usage", + "items": { + "properties": { + "bytes": { + "description": "The total number of data bytes transferred on the specified blockchain (for example, Streams and Yellowstone gRPC data). Contributes to data_credits", + "type": "integer" + }, + "credits_used": { + "description": "The number of credits used by the specified blockchain (RPC credits and data credits combined)", + "type": "integer" + }, + "data_credits": { + "description": "The portion of credits_used consumed by data usage, such as Streams and Yellowstone gRPC bytes transferred", + "type": "integer" + }, + "name": { + "description": "The name of the blockchain", + "type": "string" + }, + "rpc_credits": { + "description": "The portion of credits_used consumed by RPC requests", + "type": "integer" + } + }, + "type": "object" + }, + "type": "array" }, - "endpoint_url": { - "description": "The URL of the endpoint provisioned for Tooling Access", - "type": "string" + "end_time": { + "description": "The end timestamp for the data in second in second", + "type": "integer" + }, + "start_time": { + "description": "The start timestamp for the data in second in second", + "type": "integer" } }, "type": "object" }, "error": { - "description": "An error message if any issue occurs", + "description": "A field containing an error message if any issue occurs", "type": "string" } }, @@ -5320,20 +6913,39 @@ "description": "Successful response" } }, - "summary": "Enable (provision/reactivate) or disable Tooling Access for the account.", + "summary": "Retrieves usage data by chain.", "tags": [ - "tooling-access" + "usage" ] } }, - "/v0/tooling-access/token": { - "post": { - "description": "Mints a short-lived ES256 JWT for authenticating data-plane RPC calls. Requires Tooling Access to be enabled first.", + "/v0/usage/rpc/by-endpoint": { + "get": { "externalDocs": { "description": "Quicknode docs", - "url": "https://www.quicknode.com/docs/admin-api/tooling-access/v0-tooling-access-token-post" + "url": "https://www.quicknode.com/docs/admin-api/usage/v0-usage-rpc-by-endpoint" }, - "operationId": "post_v0_tooling_access_token", + "operationId": "get_v0_usage_rpc_by_endpoint", + "parameters": [ + { + "description": "Specifies the start of the time period for which the usage data is to be retrieved. For periods longer than a week, times are rounded down to midnight UTC for performance optimization.", + "in": "query", + "name": "start_time", + "schema": { + "description": "Specifies the start of the time period for which the usage data is to be retrieved. For periods longer than a week, times are rounded down to midnight UTC for performance optimization.", + "type": "integer" + } + }, + { + "description": "Specifies the end of the time period for which the usage data is to be retrieved. For periods longer than a week, times are rounded down to midnight UTC for performance optimization.", + "in": "query", + "name": "end_time", + "schema": { + "description": "Specifies the end of the time period for which the usage data is to be retrieved. For periods longer than a week, times are rounded down to midnight UTC for performance optimization.", + "type": "integer" + } + } + ], "responses": { "200": { "content": { @@ -5341,25 +6953,95 @@ "schema": { "properties": { "data": { - "description": "An object which contains the following fields:", + "description": "The data object which contains the following fields:", "properties": { - "endpoint_url": { - "description": "The URL of the Tooling Access endpoint the token authenticates against", - "type": "string" + "end_time": { + "description": "The end timestamp for the data in second in second", + "type": "integer" }, - "expires_at": { - "description": "The timestamp when the token expires", - "type": "string" + "endpoints": { + "description": "An array of endpoints which contains the following fields:", + "items": { + "properties": { + "bytes": { + "description": "The total number of data bytes transferred by the endpoint (for example, Streams and Yellowstone gRPC data). Contributes to data_credits", + "type": "integer" + }, + "chain": { + "description": "The blockchain associated with the endpoint", + "type": "string" + }, + "credits_used": { + "description": "The total number of credits used by the endpoint (RPC credits and data credits combined)", + "type": "integer" + }, + "data_credits": { + "description": "The portion of credits_used consumed by data usage, such as Streams and Yellowstone gRPC bytes transferred", + "type": "integer" + }, + "label": { + "description": "A custom label for the endpoint", + "type": "string" + }, + "methods_breakdown": { + "description": "An array of methods_breakdown", + "items": { + "properties": { + "archive": { + "description": "Indicates whether the request is using archived data", + "type": "boolean" + }, + "bytes": { + "description": "The number of data bytes transferred by the method (for streaming methods such as /geyser.geyser/subscribe)", + "type": "integer" + }, + "credits_used": { + "description": "The number of credits used by the method (RPC credits and data credits combined)", + "type": "integer" + }, + "method_name": { + "description": "The name of the method called. Streaming methods such as /geyser.geyser/subscribe also appear here with the data they transfer", + "type": "string" + } + }, + "type": "object" + }, + "type": "array" + }, + "name": { + "description": "The name of the endpoint", + "type": "string" + }, + "network": { + "description": "The specific network on the blockchain", + "type": "string" + }, + "requests": { + "description": "The total number of requests made to the endpoint", + "type": "integer" + }, + "rpc_credits": { + "description": "The portion of credits_used consumed by RPC requests", + "type": "integer" + }, + "status": { + "description": "The current state of the RPC endpoint. Possible values include: active, archived, paused or terminated", + "type": "string" + } + }, + "type": "object" + }, + "type": "array" }, - "token": { - "description": "The short-lived ES256 JWT used to authenticate RPC calls", - "type": "string" + "start_time": { + "description": "The start timestamp for the data in second in second", + "type": "integer" } }, "type": "object" }, "error": { - "description": "An error message if any issue occurs", + "description": "A field containing an error message if any issue occurs", "type": "string" } }, @@ -5370,35 +7052,35 @@ "description": "Successful response" } }, - "summary": "Mints a short-lived ES256 JWT for authenticating data-plane RPC calls.", + "summary": "Retrieves usage data by endpoint.", "tags": [ - "tooling-access" + "usage" ] } }, - "/v0/usage/rpc": { + "/v0/usage/rpc/by-method": { "get": { "externalDocs": { "description": "Quicknode docs", - "url": "https://www.quicknode.com/docs/admin-api/usage/v0-usage-rpc" + "url": "https://www.quicknode.com/docs/admin-api/usage/v0-usage-rpc-by-method" }, - "operationId": "get_v0_usage_rpc", + "operationId": "get_v0_usage_rpc_by_method", "parameters": [ { - "description": "Specifies the start of the time period for which the usage data is to be retrieved", + "description": "Specifies the start of the time period for which the usage data is to be retrieved. For periods longer than a week, times are rounded down to midnight UTC for performance optimization.", "in": "query", "name": "start_time", "schema": { - "description": "Specifies the start of the time period for which the usage data is to be retrieved", + "description": "Specifies the start of the time period for which the usage data is to be retrieved. For periods longer than a week, times are rounded down to midnight UTC for performance optimization.", "type": "integer" } }, { - "description": "Specifies the end of the time period for which the usage data is to be retrieved", + "description": "Specifies the end of the time period for which the usage data is to be retrieved. For periods longer than a week, times are rounded down to midnight UTC for performance optimization.", "in": "query", "name": "end_time", "schema": { - "description": "Specifies the end of the time period for which the usage data is to be retrieved", + "description": "Specifies the end of the time period for which the usage data is to be retrieved. For periods longer than a week, times are rounded down to midnight UTC for performance optimization.", "type": "integer" } } @@ -5412,35 +7094,44 @@ "data": { "description": "The data object which contains the following fields:", "properties": { - "credits_remaining": { - "description": "The number of credits remaining in the account", - "type": "integer" - }, - "credits_used": { - "description": "The number of credits used within the specified time period", - "type": "integer" - }, "end_time": { - "description": "The end timestamp for the usage data in second in second", - "type": "integer" - }, - "limit": { - "description": "The maximum number of credits available", + "description": "The end timestamp for the data in second", "type": "integer" }, - "overages": { - "description": "The number of credits used beyond the limit", - "type": "integer" + "methods": { + "description": "An array of method calls and their corresponding credit usage", + "items": { + "properties": { + "archive": { + "description": "Indicates whether the request used archived data", + "type": "boolean" + }, + "bytes": { + "description": "The number of data bytes transferred by the method (for streaming methods such as /geyser.geyser/subscribe)", + "type": "integer" + }, + "credits_used": { + "description": "The number of credits used by the method (RPC credits and data credits combined)", + "type": "integer" + }, + "method_name": { + "description": "The name of the method called. Streaming methods such as /geyser.geyser/subscribe also appear here with the data they transfer", + "type": "string" + } + }, + "type": "object" + }, + "type": "array" }, "start_time": { - "description": "The start timestamp for the usage data in second in second", + "description": "The start timestamp for the data in second", "type": "integer" } }, "type": "object" }, "error": { - "description": "A string containing an error message, if any issues occur during the request", + "description": "A field containing an error message if any issue occurs", "type": "string" } }, @@ -5451,35 +7142,36 @@ "description": "Successful response" } }, - "summary": "Retrieves usage total for specified time range.", + "summary": "Retrieves usage data by method.", "tags": [ "usage" ] } }, - "/v0/usage/rpc/by-chain": { + "/v0/usage/rpc/by-tag": { "get": { + "description": "Retrieves usage data grouped by tag. Includes an untagged bucket for endpoints with no tags.", "externalDocs": { "description": "Quicknode docs", - "url": "https://www.quicknode.com/docs/admin-api/usage/v0-usage-rpc-by-chain" + "url": "https://www.quicknode.com/docs/admin-api/usage/v0-usage-rpc-by-tag" }, - "operationId": "get_v0_usage_rpc_by_chain", + "operationId": "get_v0_usage_rpc_by_tag", "parameters": [ { - "description": "Specifies the start of the time period for which the usage data is to be retrieved", + "description": "Start time as a unix timestamp", "in": "query", "name": "start_time", "schema": { - "description": "Specifies the start of the time period for which the usage data is to be retrieved", + "description": "Start time as a unix timestamp", "type": "integer" } }, { - "description": "Specifies the end of the time period for which the usage data is to be retrieved", + "description": "End time as a unix timestamp", "in": "query", "name": "end_time", "schema": { - "description": "Specifies the end of the time period for which the usage data is to be retrieved", + "description": "End time as a unix timestamp", "type": "integer" } } @@ -5491,50 +7183,58 @@ "schema": { "properties": { "data": { - "description": "The data object which contains the following fields:", + "description": "Contains usage data grouped by tag", "properties": { - "chains": { - "description": "An array of blockchains and their corresponding credit usage", + "end_time": { + "description": "The end time of the usage period as a unix timestamp", + "type": "integer" + }, + "start_time": { + "description": "The start time of the usage period as a unix timestamp", + "type": "integer" + }, + "tags": { + "description": "An array of usage data objects, one per tag", "items": { "properties": { "bytes": { - "description": "The total number of data bytes transferred on the specified blockchain (for example, Streams and Yellowstone gRPC data). Contributes to data_credits", + "description": "The total number of data bytes transferred by endpoints with this tag (for example, Streams and Yellowstone gRPC data). Contributes to data_credits", "type": "integer" }, "credits_used": { - "description": "The number of credits used by the specified blockchain (RPC credits and data credits combined)", + "description": "The total number of credits used by endpoints with this tag (RPC credits and data credits combined)", "type": "integer" }, "data_credits": { "description": "The portion of credits_used consumed by data usage, such as Streams and Yellowstone gRPC bytes transferred", "type": "integer" }, - "name": { - "description": "The name of the blockchain", + "label": { + "description": "The label/name of the tag", "type": "string" }, + "requests": { + "description": "The total number of requests made by endpoints with this tag", + "type": "integer" + }, "rpc_credits": { "description": "The portion of credits_used consumed by RPC requests", "type": "integer" + }, + "tag_id": { + "description": "The unique identifier of the tag", + "type": "integer" } }, "type": "object" }, "type": "array" - }, - "end_time": { - "description": "The end timestamp for the data in second in second", - "type": "integer" - }, - "start_time": { - "description": "The start timestamp for the data in second in second", - "type": "integer" } }, "type": "object" }, "error": { - "description": "A field containing an error message if any issue occurs", + "description": "Contains error details if the request failed; null if successful", "type": "string" } }, @@ -5545,37 +7245,74 @@ "description": "Successful response" } }, - "summary": "Retrieves usage data by chain.", + "summary": "Retrieves usage data grouped by tag.", "tags": [ "usage" ] } }, - "/v0/usage/rpc/by-endpoint": { - "get": { + "/v0/usage/rpc/summary": { + "post": { "externalDocs": { "description": "Quicknode docs", - "url": "https://www.quicknode.com/docs/admin-api/usage/v0-usage-rpc-by-endpoint" + "url": "https://www.quicknode.com/docs/admin-api/observability/v0-usage-rpc-summary" }, - "operationId": "get_v0_usage_rpc_by_endpoint", + "operationId": "post_v0_usage_rpc_summary", "parameters": [ { - "description": "Specifies the start of the time period for which the usage data is to be retrieved. For periods longer than a week, times are rounded down to midnight UTC for performance optimization.", + "description": "ISO 8601 start time. Required together with to when last is omitted.", "in": "query", - "name": "start_time", + "name": "from", "schema": { - "description": "Specifies the start of the time period for which the usage data is to be retrieved. For periods longer than a week, times are rounded down to midnight UTC for performance optimization.", - "type": "integer" + "description": "ISO 8601 start time. Required together with to when last is omitted.", + "type": "string" } }, { - "description": "Specifies the end of the time period for which the usage data is to be retrieved. For periods longer than a week, times are rounded down to midnight UTC for performance optimization.", + "description": "ISO 8601 end time. Required together with from when last is omitted.", "in": "query", - "name": "end_time", + "name": "to", "schema": { - "description": "Specifies the end of the time period for which the usage data is to be retrieved. For periods longer than a week, times are rounded down to midnight UTC for performance optimization.", + "description": "ISO 8601 end time. Required together with from when last is omitted.", + "type": "string" + } + }, + { + "description": "Relative time window instead of from and to; for example, 1h for the last hour.", + "in": "query", + "name": "last", + "schema": { + "description": "Relative time window instead of from and to; for example, 1h for the last hour.", + "type": "string" + } + }, + { + "description": "Repeat this query parameter for grouping dimensions: method, network, endpoint. Omit it to return totals without a breakdown.", + "in": "query", + "name": "group_by[]", + "schema": { + "description": "Repeat this query parameter for grouping dimensions: method, network, endpoint. Omit it to return totals without a breakdown.", + "items": {}, + "type": "array" + } + }, + { + "description": "Positive maximum number of results per page; for example, 2.", + "in": "query", + "name": "limit", + "schema": { + "description": "Positive maximum number of results per page; for example, 2.", "type": "integer" } + }, + { + "description": "Opaque next_cursor from the previous response. Keep the same time range, filters, grouping, and limit when requesting subsequent pages.", + "in": "query", + "name": "cursor", + "schema": { + "description": "Opaque next_cursor from the previous response. Keep the same time range, filters, grouping, and limit when requesting subsequent pages.", + "type": "string" + } } ], "responses": { @@ -5585,96 +7322,103 @@ "schema": { "properties": { "data": { - "description": "The data object which contains the following fields:", - "properties": { - "end_time": { - "description": "The end timestamp for the data in second in second", - "type": "integer" - }, - "endpoints": { - "description": "An array of endpoints which contains the following fields:", - "items": { - "properties": { - "bytes": { - "description": "The total number of data bytes transferred by the endpoint (for example, Streams and Yellowstone gRPC data). Contributes to data_credits", - "type": "integer" - }, - "chain": { - "description": "The blockchain associated with the endpoint", - "type": "string" - }, - "credits_used": { - "description": "The total number of credits used by the endpoint (RPC credits and data credits combined)", - "type": "integer" - }, - "data_credits": { - "description": "The portion of credits_used consumed by data usage, such as Streams and Yellowstone gRPC bytes transferred", - "type": "integer" - }, - "label": { - "description": "A custom label for the endpoint", - "type": "string" - }, - "methods_breakdown": { - "description": "An array of methods_breakdown", - "items": { - "properties": { - "archive": { - "description": "Indicates whether the request is using archived data", - "type": "boolean" - }, - "bytes": { - "description": "The number of data bytes transferred by the method (for streaming methods such as /geyser.geyser/subscribe)", - "type": "integer" - }, - "credits_used": { - "description": "The number of credits used by the method (RPC credits and data credits combined)", - "type": "integer" - }, - "method_name": { - "description": "The name of the method called. Streaming methods such as /geyser.geyser/subscribe also appear here with the data they transfer", - "type": "string" - } + "description": "Response data. Null when the request fails.", + "oneOf": [ + { + "properties": { + "breakdown": { + "description": "Grouped results. Present when grouping is requested; can be empty.", + "items": { + "properties": { + "bytes": { + "description": "Number of bytes transferred.", + "type": "integer" }, - "type": "object" - }, - "type": "array" - }, - "name": { - "description": "The name of the endpoint", - "type": "string" - }, - "network": { - "description": "The specific network on the blockchain", - "type": "string" - }, - "requests": { - "description": "The total number of requests made to the endpoint", - "type": "integer" - }, - "rpc_credits": { - "description": "The portion of credits_used consumed by RPC requests", - "type": "integer" + "credits": { + "description": "Total API credits consumed.", + "type": "integer" + }, + "data_credits": { + "description": "Credits consumed by data transfer.", + "type": "integer" + }, + "endpoint": { + "description": "Endpoint UUID; present when grouping by endpoint.", + "type": "string" + }, + "method": { + "description": "RPC method name. In a breakdown, present when grouping by method.", + "type": "string" + }, + "network": { + "description": "Present when grouping by network.", + "type": "string" + }, + "requests": { + "description": "Number of RPC requests.", + "type": "integer" + }, + "rpc_credits": { + "description": "Credits consumed by RPC requests.", + "type": "integer" + } + }, + "type": "object" }, - "status": { - "description": "The current state of the RPC endpoint. Possible values include: active, archived, paused or terminated", - "type": "string" - } + "type": "array" }, - "type": "object" + "from": { + "description": "Effective start of the returned time range, in ISO 8601 format.", + "type": "string" + }, + "next_cursor": { + "description": "Opaque continuation cursor. Present when another page is available. Pass it unchanged as cursor.", + "type": "string" + }, + "to": { + "description": "Effective end of the returned time range, in ISO 8601 format.", + "type": "string" + }, + "totals": { + "description": "Aggregate totals for the selected time range.", + "properties": { + "bytes": { + "description": "Number of bytes transferred.", + "type": "integer" + }, + "credits": { + "description": "Total API credits consumed.", + "type": "integer" + }, + "data_credits": { + "description": "Credits consumed by data transfer.", + "type": "integer" + }, + "requests": { + "description": "Number of RPC requests.", + "type": "integer" + }, + "rpc_credits": { + "description": "Credits consumed by RPC requests.", + "type": "integer" + } + }, + "type": "object" + } }, - "type": "array" + "type": "object" }, - "start_time": { - "description": "The start timestamp for the data in second in second", - "type": "integer" + { + "type": "null" } - }, - "type": "object" + ] }, "error": { - "description": "A field containing an error message if any issue occurs", - "type": "string" + "description": "Error message on failure; null on success.", + "type": [ + "string", + "null" + ] } }, "type": "object" @@ -5684,37 +7428,74 @@ "description": "Successful response" } }, - "summary": "Retrieves usage data by endpoint.", + "summary": "Returns account RPC requests, transferred bytes, and credits for a time range.", "tags": [ "usage" ] } }, - "/v0/usage/rpc/by-method": { - "get": { + "/v0/usage/streams/summary": { + "post": { "externalDocs": { "description": "Quicknode docs", - "url": "https://www.quicknode.com/docs/admin-api/usage/v0-usage-rpc-by-method" + "url": "https://www.quicknode.com/docs/admin-api/observability/v0-usage-streams-summary" }, - "operationId": "get_v0_usage_rpc_by_method", + "operationId": "post_v0_usage_streams_summary", "parameters": [ { - "description": "Specifies the start of the time period for which the usage data is to be retrieved. For periods longer than a week, times are rounded down to midnight UTC for performance optimization.", + "description": "ISO 8601 start time. Required together with to when last is omitted.", "in": "query", - "name": "start_time", + "name": "from", "schema": { - "description": "Specifies the start of the time period for which the usage data is to be retrieved. For periods longer than a week, times are rounded down to midnight UTC for performance optimization.", - "type": "integer" + "description": "ISO 8601 start time. Required together with to when last is omitted.", + "type": "string" } }, { - "description": "Specifies the end of the time period for which the usage data is to be retrieved. For periods longer than a week, times are rounded down to midnight UTC for performance optimization.", + "description": "ISO 8601 end time. Required together with from when last is omitted.", "in": "query", - "name": "end_time", + "name": "to", "schema": { - "description": "Specifies the end of the time period for which the usage data is to be retrieved. For periods longer than a week, times are rounded down to midnight UTC for performance optimization.", + "description": "ISO 8601 end time. Required together with from when last is omitted.", + "type": "string" + } + }, + { + "description": "Relative time window instead of from and to; for example, 1h for the last hour.", + "in": "query", + "name": "last", + "schema": { + "description": "Relative time window instead of from and to; for example, 1h for the last hour.", + "type": "string" + } + }, + { + "description": "Repeat this query parameter for grouping dimensions: stream. Omit it to return totals without a breakdown.", + "in": "query", + "name": "group_by[]", + "schema": { + "description": "Repeat this query parameter for grouping dimensions: stream. Omit it to return totals without a breakdown.", + "items": {}, + "type": "array" + } + }, + { + "description": "Positive maximum number of results per page; for example, 2.", + "in": "query", + "name": "limit", + "schema": { + "description": "Positive maximum number of results per page; for example, 2.", "type": "integer" } + }, + { + "description": "Opaque next_cursor from the previous response. Keep the same time range, filters, grouping, and limit when requesting subsequent pages.", + "in": "query", + "name": "cursor", + "schema": { + "description": "Opaque next_cursor from the previous response. Keep the same time range, filters, grouping, and limit when requesting subsequent pages.", + "type": "string" + } } ], "responses": { @@ -5724,47 +7505,79 @@ "schema": { "properties": { "data": { - "description": "The data object which contains the following fields:", - "properties": { - "end_time": { - "description": "The end timestamp for the data in second", - "type": "integer" - }, - "methods": { - "description": "An array of method calls and their corresponding credit usage", - "items": { - "properties": { - "archive": { - "description": "Indicates whether the request used archived data", - "type": "boolean" - }, - "bytes": { - "description": "The number of data bytes transferred by the method (for streaming methods such as /geyser.geyser/subscribe)", - "type": "integer" - }, - "credits_used": { - "description": "The number of credits used by the method (RPC credits and data credits combined)", - "type": "integer" + "description": "Response data. Null when the request fails.", + "oneOf": [ + { + "properties": { + "breakdown": { + "description": "Grouped results. Present when grouping is requested; can be empty.", + "items": { + "properties": { + "block_credits": { + "description": "Credits consumed by Streams blocks.", + "type": "integer" + }, + "blocks": { + "description": "Number of Streams blocks processed.", + "type": "integer" + }, + "bytes": { + "description": "Number of bytes transferred.", + "type": "integer" + }, + "stream": { + "description": "Stream identifier. Present when grouping by stream.", + "type": "string" + } + }, + "type": "object" }, - "method_name": { - "description": "The name of the method called. Streaming methods such as /geyser.geyser/subscribe also appear here with the data they transfer", - "type": "string" - } + "type": "array" }, - "type": "object" + "from": { + "description": "Effective start of the returned time range, in ISO 8601 format.", + "type": "string" + }, + "next_cursor": { + "description": "Opaque continuation cursor. Present when another page is available. Pass it unchanged as cursor.", + "type": "string" + }, + "to": { + "description": "Effective end of the returned time range, in ISO 8601 format.", + "type": "string" + }, + "totals": { + "description": "Aggregate totals for the selected time range.", + "properties": { + "block_credits": { + "description": "Credits consumed by Streams blocks.", + "type": "integer" + }, + "blocks": { + "description": "Number of Streams blocks processed.", + "type": "integer" + }, + "bytes": { + "description": "Number of bytes transferred.", + "type": "integer" + } + }, + "type": "object" + } }, - "type": "array" + "type": "object" }, - "start_time": { - "description": "The start timestamp for the data in second", - "type": "integer" + { + "type": "null" } - }, - "type": "object" + ] }, "error": { - "description": "A field containing an error message if any issue occurs", - "type": "string" + "description": "Error message on failure; null on success.", + "type": [ + "string", + "null" + ] } }, "type": "object" @@ -5774,38 +7587,74 @@ "description": "Successful response" } }, - "summary": "Retrieves usage data by method.", + "summary": "Returns Streams blocks, transferred bytes, and block credits for a time range.", "tags": [ "usage" ] } }, - "/v0/usage/rpc/by-tag": { - "get": { - "description": "Retrieves usage data grouped by tag. Includes an untagged bucket for endpoints with no tags.", + "/v0/usage/webhooks/summary": { + "post": { "externalDocs": { "description": "Quicknode docs", - "url": "https://www.quicknode.com/docs/admin-api/usage/v0-usage-rpc-by-tag" + "url": "https://www.quicknode.com/docs/admin-api/observability/v0-usage-webhooks-summary" }, - "operationId": "get_v0_usage_rpc_by_tag", + "operationId": "post_v0_usage_webhooks_summary", "parameters": [ { - "description": "Start time as a unix timestamp", + "description": "ISO 8601 start time. Required together with to when last is omitted.", "in": "query", - "name": "start_time", + "name": "from", "schema": { - "description": "Start time as a unix timestamp", - "type": "integer" + "description": "ISO 8601 start time. Required together with to when last is omitted.", + "type": "string" } }, { - "description": "End time as a unix timestamp", + "description": "ISO 8601 end time. Required together with from when last is omitted.", "in": "query", - "name": "end_time", + "name": "to", "schema": { - "description": "End time as a unix timestamp", + "description": "ISO 8601 end time. Required together with from when last is omitted.", + "type": "string" + } + }, + { + "description": "Relative time window instead of from and to; for example, 1h for the last hour.", + "in": "query", + "name": "last", + "schema": { + "description": "Relative time window instead of from and to; for example, 1h for the last hour.", + "type": "string" + } + }, + { + "description": "Repeat this query parameter for grouping dimensions: webhook. Omit it to return totals without a breakdown.", + "in": "query", + "name": "group_by[]", + "schema": { + "description": "Repeat this query parameter for grouping dimensions: webhook. Omit it to return totals without a breakdown.", + "items": {}, + "type": "array" + } + }, + { + "description": "Positive maximum number of results per page; for example, 2.", + "in": "query", + "name": "limit", + "schema": { + "description": "Positive maximum number of results per page; for example, 2.", "type": "integer" } + }, + { + "description": "Opaque next_cursor from the previous response. Keep the same time range, filters, grouping, and limit when requesting subsequent pages.", + "in": "query", + "name": "cursor", + "schema": { + "description": "Opaque next_cursor from the previous response. Keep the same time range, filters, grouping, and limit when requesting subsequent pages.", + "type": "string" + } } ], "responses": { @@ -5815,59 +7664,71 @@ "schema": { "properties": { "data": { - "description": "Contains usage data grouped by tag", - "properties": { - "end_time": { - "description": "The end time of the usage period as a unix timestamp", - "type": "integer" - }, - "start_time": { - "description": "The start time of the usage period as a unix timestamp", - "type": "integer" - }, - "tags": { - "description": "An array of usage data objects, one per tag", - "items": { - "properties": { - "bytes": { - "description": "The total number of data bytes transferred by endpoints with this tag (for example, Streams and Yellowstone gRPC data). Contributes to data_credits", - "type": "integer" - }, - "credits_used": { - "description": "The total number of credits used by endpoints with this tag (RPC credits and data credits combined)", - "type": "integer" - }, - "data_credits": { - "description": "The portion of credits_used consumed by data usage, such as Streams and Yellowstone gRPC bytes transferred", - "type": "integer" - }, - "label": { - "description": "The label/name of the tag", - "type": "string" - }, - "requests": { - "description": "The total number of requests made by endpoints with this tag", - "type": "integer" - }, - "rpc_credits": { - "description": "The portion of credits_used consumed by RPC requests", - "type": "integer" + "description": "Response data. Null when the request fails.", + "oneOf": [ + { + "properties": { + "breakdown": { + "description": "Grouped results. Present when grouping is requested; can be empty.", + "items": { + "properties": { + "credits": { + "description": "Total API credits consumed.", + "type": "integer" + }, + "deliveries": { + "description": "Number of Webhooks deliveries.", + "type": "integer" + }, + "webhook": { + "description": "Webhook identifier. Present when grouping by webhook.", + "type": "string" + } + }, + "type": "object" }, - "tag_id": { - "description": "The unique identifier of the tag", - "type": "integer" - } + "type": "array" }, - "type": "object" + "from": { + "description": "Effective start of the returned time range, in ISO 8601 format.", + "type": "string" + }, + "next_cursor": { + "description": "Opaque continuation cursor. Present when another page is available. Pass it unchanged as cursor.", + "type": "string" + }, + "to": { + "description": "Effective end of the returned time range, in ISO 8601 format.", + "type": "string" + }, + "totals": { + "description": "Aggregate totals for the selected time range.", + "properties": { + "credits": { + "description": "Total API credits consumed.", + "type": "integer" + }, + "deliveries": { + "description": "Number of Webhooks deliveries.", + "type": "integer" + } + }, + "type": "object" + } }, - "type": "array" + "type": "object" + }, + { + "type": "null" } - }, - "type": "object" + ] }, "error": { - "description": "Contains error details if the request failed; null if successful", - "type": "string" + "description": "Error message on failure; null on success.", + "type": [ + "string", + "null" + ] } }, "type": "object" @@ -5877,7 +7738,7 @@ "description": "Successful response" } }, - "summary": "Retrieves usage data grouped by tag.", + "summary": "Returns Webhooks deliveries and credits for a time range.", "tags": [ "usage" ] diff --git a/api/admin/openapi.upstream.json b/api/admin/openapi.upstream.json index aa606b9..2008c61 100644 --- a/api/admin/openapi.upstream.json +++ b/api/admin/openapi.upstream.json @@ -149,28 +149,89 @@ } } }, - "/v0/api-credits/{chain}": { - "get": { - "operationId": "get_v0_api_credits_by_chain", - "summary": "Returns the API credit cost of each RPC method available on a chain.", + "/v0/activity_logs": { + "post": { + "operationId": "post_v0_activity_logs", + "summary": "Returns activity log entries, newest first, with filters and pagination.", "tags": [ - "api-credits" + "activity_logs" ], "externalDocs": { "description": "Quicknode docs", - "url": "https://www.quicknode.com/docs/admin-api/api-credits/v0-api-credits-chain" + "url": "https://www.quicknode.com/docs/admin-api/activity-logs/v0-activity-logs" }, - "description": "Returns the API credit cost of each RPC method available on a chain. Credit costs are calculated using the account's billing version.", "parameters": [ { - "name": "chain", - "in": "path", + "name": "q", + "in": "query", "schema": { "type": "string", - "description": "The chain slug from the GET /v0/chains response" + "description": "Search entry descriptions, endpoint subdomains, and team names. Case-insensitive." }, - "required": true, - "description": "The chain slug from the GET /v0/chains response" + "description": "Search entry descriptions, endpoint subdomains, and team names. Case-insensitive." + }, + { + "name": "actor", + "in": "query", + "schema": { + "type": "string", + "description": "Only entries made by this user or API key. Use an id from /v0/activity_logs/filters." + }, + "description": "Only entries made by this user or API key. Use an id from /v0/activity_logs/filters." + }, + { + "name": "type", + "in": "query", + "schema": { + "type": "string", + "description": "Only entries about this kind of thing: endpoint, team, member, role, billing, add_on, or api_key." + }, + "description": "Only entries about this kind of thing: endpoint, team, member, role, billing, add_on, or api_key." + }, + { + "name": "endpoint_id", + "in": "query", + "schema": { + "type": "string", + "description": "Only entries about this endpoint, by endpoint ID." + }, + "description": "Only entries about this endpoint, by endpoint ID." + }, + { + "name": "from", + "in": "query", + "schema": { + "type": "string", + "description": "Only entries at or after this time. ISO 8601 date or date-time." + }, + "description": "Only entries at or after this time. ISO 8601 date or date-time." + }, + { + "name": "to", + "in": "query", + "schema": { + "type": "string", + "description": "Only entries at or before this time. ISO 8601 date or date-time." + }, + "description": "Only entries at or before this time. ISO 8601 date or date-time." + }, + { + "name": "limit", + "in": "query", + "schema": { + "type": "integer", + "description": "Page size. Defaults to 20, maximum 100; larger values return 100." + }, + "description": "Page size. Defaults to 20, maximum 100; larger values return 100." + }, + { + "name": "offset", + "in": "query", + "schema": { + "type": "integer", + "description": "Number of entries to skip. Defaults to 0." + }, + "description": "Number of entries to skip. Defaults to 0." } ], "responses": { @@ -186,21 +247,106 @@ "items": { "type": "object", "properties": { - "method": { + "id": { "type": "string", - "description": "The name of the RPC method" + "description": "Stable UUID for the entry." }, - "credits": { - "type": "integer", - "description": "The API credit cost of the method for the account's billing version" + "occurred_at": { + "type": "string", + "description": "When the change happened, in ISO 8601 UTC format." + }, + "action": { + "type": "string", + "description": "What happened, such as created, updated, deleted, paused, invited, member_removed." + }, + "description": { + "type": "string", + "description": "Human-readable summary, the same text the dashboard shows." + }, + "target": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "ID of the thing that changed." + }, + "kind": { + "type": "string", + "description": "One of: endpoint, team, member, role, billing, add_on, api_key." + }, + "label": { + "type": "string", + "description": "Display name of the kind." + }, + "name": { + "type": [ + "string", + "null" + ], + "description": "Current name where there is one; null otherwise." + } + }, + "description": "What was changed." + }, + "actor": { + "type": "object", + "properties": { + "id": { + "type": [ + "string", + "null" + ], + "description": "User UUID or API key ID; null for quicknode or deleted_user." + }, + "type": { + "type": "string", + "description": "One of: user, api_key, quicknode, deleted_user." + }, + "name": { + "type": [ + "string", + "null" + ], + "description": "Member's name or Quicknode; null for api_key." + }, + "email": { + "type": [ + "string", + "null" + ], + "description": "Member's email; null for api_key, quicknode, deleted_user." + } + }, + "description": "Who made the change." } } }, - "description": "An array of data which contains the following fields:" + "description": "Array of activity log entries, newest first." + }, + "pagination": { + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total count of entries matching the filters." + }, + "limit": { + "type": "integer", + "description": "Page size used." + }, + "offset": { + "type": "integer", + "description": "Number of entries skipped." + } + }, + "description": "Pagination metadata." }, "error": { - "type": "string", - "description": "An error message if any issue occurs" + "type": [ + "string", + "null" + ], + "description": "Error message on failure; null on success." } } } @@ -210,16 +356,16 @@ } } }, - "/v0/billing/invoices": { + "/v0/activity_logs/filters": { "get": { - "operationId": "get_v0_billing_invoices", - "summary": "Returns a list of invoices", + "operationId": "get_v0_activity_logs_filters", + "summary": "Returns the actors and types you can filter by when listing activity log entries.", "tags": [ - "billing" + "activity_logs" ], "externalDocs": { "description": "Quicknode docs", - "url": "https://www.quicknode.com/docs/admin-api/billing/v0-billing-invoices" + "url": "https://www.quicknode.com/docs/admin-api/activity-logs/v0-activity-logs-filters" }, "responses": { "200": { @@ -232,74 +378,53 @@ "data": { "type": "object", "properties": { - "invoices": { + "actors": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string", - "description": "The unique identifier for the invoice" + "description": "User UUID or API key ID. Use this value for the actor filter." }, - "status": { + "type": { "type": "string", - "description": "The current state of the invoice" + "description": "Either user or api_key." }, - "billing_reason": { + "name": { "type": "string", - "description": "The reason for generating the invoice" - }, - "amount_due": { - "type": "integer", - "description": "The total amount that is due on the invoice" - }, - "amount_paid": { - "type": "integer", - "description": "The total amount that has been paid for the invoice" - }, - "subtotal": { - "type": "integer", - "description": "The total cost of the invoice" - }, - "lines": { - "type": "array", - "items": { - "type": "object", - "properties": { - "description": { - "type": "string", - "description": "A detailed description of each line item billed" - }, - "amount": { - "type": "integer", - "description": "The cost associated with each line item" - } - } - }, - "description": "An array of lines which contains the following fields:" - }, - "period_end": { - "type": "integer", - "description": "The end timestamp of the billing period for the invoice in second" - }, - "period_start": { - "type": "integer", - "description": "The start timestamp of the billing period for the invoice in second" + "description": "Member's name; null for API keys." + } + } + }, + "description": "Members and API keys that appear in your log." + }, + "types": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "type": "string", + "description": "Type value to use in the type filter." }, - "created": { - "type": "integer", - "description": "The timestamp when the invoice was created in second" + "label": { + "type": "string", + "description": "Display name for the type." } } }, - "description": "An array of invoices" + "description": "Entry types you can filter by." } }, - "description": "The data object which contains the following fields:" + "description": "Filter values available for your account." }, "error": { - "type": "string", - "description": "An error message if any issue occurs" + "type": [ + "string", + "null" + ], + "description": "Error message on failure; null on success." } } } @@ -309,17 +434,29 @@ } } }, - "/v0/billing/payments": { + "/v0/activity_logs/{id}": { "get": { - "operationId": "get_v0_billing_payments", - "summary": "Returns a list of payments.", + "operationId": "get_v0_activity_logs_by_id", + "summary": "Returns a single activity log entry by ID.", "tags": [ - "billing" + "activity_logs" ], "externalDocs": { "description": "Quicknode docs", - "url": "https://www.quicknode.com/docs/admin-api/billing/v0-billing-payments" + "url": "https://www.quicknode.com/docs/admin-api/activity-logs/v0-activity-logs-id" }, + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string", + "description": "The UUID of the activity log entry. Get an id from the list activity log entries response. The ID is not case-sensitive. Returns 404 if the ID is not in your account's log." + }, + "required": true, + "description": "The UUID of the activity log entry. Get an id from the list activity log entries response. The ID is not case-sensitive. Returns 404 if the ID is not in your account's log." + } + ], "responses": { "200": { "description": "Successful response", @@ -331,45 +468,317 @@ "data": { "type": "object", "properties": { - "payments": { - "type": "array", - "items": { - "type": "object", - "properties": { - "amount": { - "type": "string", - "description": "The total amount of the payment" - }, - "card_last_4": { - "type": "string", - "description": "The last four digits of the card used for the payment (masked for security)" - }, - "status": { - "type": "string", - "description": "The current status of the payment" - }, - "created_at": { - "type": "string", - "description": "The timestamp when the payment was created in second" - }, - "currency": { - "type": "string", - "description": "The currency in which the payment was made" - }, - "marketplace_amount": { - "type": "string", - "description": "The total amount spent in the marketplace" - } + "id": { + "type": "string", + "description": "Stable UUID for the entry." + }, + "occurred_at": { + "type": "string", + "description": "When the change happened, in ISO 8601 UTC format." + }, + "action": { + "type": "string", + "description": "What happened, such as created, updated, deleted, paused, invited, member_removed." + }, + "description": { + "type": "string", + "description": "Human-readable summary, the same text the dashboard shows." + }, + "target": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "ID of the thing that changed." + }, + "kind": { + "type": "string", + "description": "One of: endpoint, team, member, role, billing, add_on, api_key." + }, + "label": { + "type": "string", + "description": "Display name of the kind." + }, + "name": { + "type": [ + "string", + "null" + ], + "description": "Current name where there is one; null otherwise." } }, - "description": "An array of payments associated with the account" + "description": "What was changed." + }, + "actor": { + "type": "object", + "properties": { + "id": { + "type": [ + "string", + "null" + ], + "description": "User UUID or API key ID; null for quicknode or deleted_user." + }, + "type": { + "type": "string", + "description": "One of: user, api_key, quicknode, deleted_user." + }, + "name": { + "type": [ + "string", + "null" + ], + "description": "Member's name or Quicknode; null for api_key." + }, + "email": { + "type": [ + "string", + "null" + ], + "description": "Member's email; null for api_key, quicknode, deleted_user." + } + }, + "description": "Who made the change." } }, - "description": "The data object which contains the following fields:" + "description": "The activity log entry." }, "error": { - "type": "string", - "description": "An error message if any issue occurs" + "type": [ + "string", + "null" + ], + "description": "Error message on failure; null on success." + } + } + } + } + } + } + } + } + }, + "/v0/api-credits/{chain}": { + "get": { + "operationId": "get_v0_api_credits_by_chain", + "summary": "Returns the API credit cost of each RPC method available on a chain.", + "tags": [ + "api-credits" + ], + "externalDocs": { + "description": "Quicknode docs", + "url": "https://www.quicknode.com/docs/admin-api/api-credits/v0-api-credits-chain" + }, + "description": "Returns the API credit cost of each RPC method available on a chain. Credit costs are calculated using the account's billing version.", + "parameters": [ + { + "name": "chain", + "in": "path", + "schema": { + "type": "string", + "description": "The chain slug from the GET /v0/chains response" + }, + "required": true, + "description": "The chain slug from the GET /v0/chains response" + } + ], + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "type": "object", + "properties": { + "method": { + "type": "string", + "description": "The name of the RPC method" + }, + "credits": { + "type": "integer", + "description": "The API credit cost of the method for the account's billing version" + } + } + }, + "description": "An array of data which contains the following fields:" + }, + "error": { + "type": "string", + "description": "An error message if any issue occurs" + } + } + } + } + } + } + } + } + }, + "/v0/billing/invoices": { + "get": { + "operationId": "get_v0_billing_invoices", + "summary": "Returns a list of invoices", + "tags": [ + "billing" + ], + "externalDocs": { + "description": "Quicknode docs", + "url": "https://www.quicknode.com/docs/admin-api/billing/v0-billing-invoices" + }, + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "object", + "properties": { + "invoices": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "The unique identifier for the invoice" + }, + "status": { + "type": "string", + "description": "The current state of the invoice" + }, + "billing_reason": { + "type": "string", + "description": "The reason for generating the invoice" + }, + "amount_due": { + "type": "integer", + "description": "The total amount that is due on the invoice" + }, + "amount_paid": { + "type": "integer", + "description": "The total amount that has been paid for the invoice" + }, + "subtotal": { + "type": "integer", + "description": "The total cost of the invoice" + }, + "lines": { + "type": "array", + "items": { + "type": "object", + "properties": { + "description": { + "type": "string", + "description": "A detailed description of each line item billed" + }, + "amount": { + "type": "integer", + "description": "The cost associated with each line item" + } + } + }, + "description": "An array of lines which contains the following fields:" + }, + "period_end": { + "type": "integer", + "description": "The end timestamp of the billing period for the invoice in second" + }, + "period_start": { + "type": "integer", + "description": "The start timestamp of the billing period for the invoice in second" + }, + "created": { + "type": "integer", + "description": "The timestamp when the invoice was created in second" + } + } + }, + "description": "An array of invoices" + } + }, + "description": "The data object which contains the following fields:" + }, + "error": { + "type": "string", + "description": "An error message if any issue occurs" + } + } + } + } + } + } + } + } + }, + "/v0/billing/payments": { + "get": { + "operationId": "get_v0_billing_payments", + "summary": "Returns a list of payments.", + "tags": [ + "billing" + ], + "externalDocs": { + "description": "Quicknode docs", + "url": "https://www.quicknode.com/docs/admin-api/billing/v0-billing-payments" + }, + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "object", + "properties": { + "payments": { + "type": "array", + "items": { + "type": "object", + "properties": { + "amount": { + "type": "string", + "description": "The total amount of the payment" + }, + "card_last_4": { + "type": "string", + "description": "The last four digits of the card used for the payment (masked for security)" + }, + "status": { + "type": "string", + "description": "The current status of the payment" + }, + "created_at": { + "type": "string", + "description": "The timestamp when the payment was created in second" + }, + "currency": { + "type": "string", + "description": "The currency in which the payment was made" + }, + "marketplace_amount": { + "type": "string", + "description": "The total amount spent in the marketplace" + } + } + }, + "description": "An array of payments associated with the account" + } + }, + "description": "The data object which contains the following fields:" + }, + "error": { + "type": "string", + "description": "An error message if any issue occurs" } } } @@ -533,7 +942,7 @@ "/v0/endpoints/{id}/method-rate-limits": { "get": { "operationId": "get_v0_endpoints_by_id_method_rate_limits", - "summary": "Gets method rate limits.", + "summary": "Lists method rate limits, including whether each limit applies per client IP or to the endpoint as a whole.", "tags": [ "endpoints" ], @@ -582,6 +991,10 @@ "items": {}, "description": "A list of method names to which the rate limiter applies " }, + "limit_by_ip": { + "type": "boolean", + "description": "Whether the rate limit applies separately to each client IP (true) or to the endpoint as a whole (false)" + }, "rate": { "type": "integer", "description": "The number of allowed requests within the specified interval" @@ -614,7 +1027,7 @@ }, "post": { "operationId": "post_v0_endpoints_by_id_method_rate_limits", - "summary": "Creates a method rate limit.", + "summary": "Creates a method rate limit per client IP or for the endpoint as a whole.", "tags": [ "endpoints" ], @@ -653,6 +1066,10 @@ "rate": { "type": "integer", "description": " Specifies the maximum number of requests allowed for the specified methods within the defined interval" + }, + "limit_by_ip": { + "type": "boolean", + "description": "Set to true to apply the rate separately to each client IP. Set to false or omit this field to apply the rate to the endpoint as a whole (the existing behavior)." } }, "required": [ @@ -688,6 +1105,10 @@ "items": {}, "description": "A list of methods the rate limiter applies to" }, + "limit_by_ip": { + "type": "boolean", + "description": "Whether the rate limit applies separately to each client IP (true) or to the endpoint as a whole (false)" + }, "rate": { "type": "integer", "description": "The maximum number of requests allowed within the specified interval" @@ -726,6 +1147,7 @@ "description": "Quicknode docs", "url": "https://www.quicknode.com/docs/admin-api/endpoint-rate-limits/v0-endpoints-id-method-rate-limits-method_rate_limit_id" }, + "description": "Updates a method rate limit. Send only the fields to change; omitted fields retain their current values.", "parameters": [ { "name": "id", @@ -749,7 +1171,7 @@ } ], "requestBody": { - "required": true, + "required": false, "content": { "application/json": { "schema": { @@ -767,13 +1189,12 @@ "rate": { "type": "integer", "description": " Specifies the maximum number of requests allowed for the specified methods within the defined interval" + }, + "limit_by_ip": { + "type": "boolean", + "description": "Set to true to apply the rate separately to each client IP, or false to apply it to the endpoint as a whole. Omit this field to keep the current setting. This can be the only field in the request." } - }, - "required": [ - "status", - "methods", - "rate" - ] + } } } } @@ -802,6 +1223,10 @@ "items": {}, "description": "A list of methods the rate limiter applies to" }, + "limit_by_ip": { + "type": "boolean", + "description": "Whether the rate limit applies separately to each client IP (true) or to the endpoint as a whole (false)" + }, "rate": { "type": "integer", "description": "The maximum number of requests allowed within the specified interval" @@ -895,7 +1320,7 @@ "description": "Quicknode docs", "url": "https://www.quicknode.com/docs/admin-api/endpoint-rate-limits/v0-endpoints-id-rate-limits" }, - "description": "Updates endpoint rate limits. Only rate limits specified in the payload are updated; omitted rate limits remain unchanged. The response returns the effective endpoint-level limits as a flat limits object.", + "description": "Updates endpoint rate limits. Only rate limits specified in the payload are updated; omitted rate limits remain unchanged. Set limit_by_ip to apply the endpoint rate limits to each client IP address. The response returns the effective endpoint-level limits as a flat limits object.", "parameters": [ { "name": "id", @@ -909,7 +1334,7 @@ } ], "requestBody": { - "required": true, + "required": false, "content": { "application/json": { "schema": { @@ -931,12 +1356,13 @@ "description": "Specifies the maximum number of requests allowed per minute" } }, - "description": "Contains the rate limit configurations that you want to update" + "description": "Contains the rate limit configurations that you want to update. Required unless limit_by_ip is present" + }, + "limit_by_ip": { + "type": "boolean", + "description": "Set to true to apply the endpoint rate limits to each client IP address, or false to apply them to the endpoint as a whole. Omit to keep the current setting" } - }, - "required": [ - "rate_limits" - ] + } } } } @@ -969,6 +1395,10 @@ } }, "description": "The limits object which contains the following fields:" + }, + "limit_by_ip": { + "type": "boolean", + "description": "Whether the endpoint rate limits apply to each client IP address" } }, "description": "The data object which contains the following fields:" @@ -1042,6 +1472,10 @@ } }, "description": "An array of endpoint rate limit configurations" + }, + "limit_by_ip": { + "type": "boolean", + "description": "Whether the endpoint rate limits apply to each client IP address" } }, "description": "The data object which contains the endpoint rate limit configuration" @@ -4236,6 +4670,1433 @@ } } }, + "/v0/endpoints/{id}/metrics/errors/summary": { + "post": { + "operationId": "post_v0_endpoints_by_id_metrics_errors_summary", + "summary": "Returns RPC and HTTP error counts for one endpoint for a time range.", + "tags": [ + "endpoints" + ], + "externalDocs": { + "description": "Quicknode docs", + "url": "https://www.quicknode.com/docs/admin-api/observability/v0-endpoints-id-metrics-errors-summary" + }, + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string", + "description": "Numeric Admin API endpoint ID returned by GET /v0/endpoints. Do not use an endpoint UUID from a transaction record." + }, + "required": true, + "description": "Numeric Admin API endpoint ID returned by GET /v0/endpoints. Do not use an endpoint UUID from a transaction record." + }, + { + "name": "from", + "in": "query", + "schema": { + "type": "string", + "description": "ISO 8601 start time. Required together with to when last is omitted." + }, + "description": "ISO 8601 start time. Required together with to when last is omitted." + }, + { + "name": "to", + "in": "query", + "schema": { + "type": "string", + "description": "ISO 8601 end time. Required together with from when last is omitted." + }, + "description": "ISO 8601 end time. Required together with from when last is omitted." + }, + { + "name": "last", + "in": "query", + "schema": { + "type": "string", + "description": "Relative time window instead of from and to; for example, 1h for the last hour." + }, + "description": "Relative time window instead of from and to; for example, 1h for the last hour." + }, + { + "name": "group_by[]", + "in": "query", + "schema": { + "type": "array", + "items": {}, + "description": "Repeat this query parameter for grouping dimensions: method. Method grouping requires kind=rpc." + }, + "description": "Repeat this query parameter for grouping dimensions: method. Method grouping requires kind=rpc." + }, + { + "name": "kind", + "in": "query", + "schema": { + "type": "string", + "description": "Filter errors to rpc or http. Omit to include both. Use rpc when grouping by method." + }, + "description": "Filter errors to rpc or http. Omit to include both. Use rpc when grouping by method." + }, + { + "name": "limit", + "in": "query", + "schema": { + "type": "integer", + "description": "Positive maximum number of results per page; for example, 2." + }, + "description": "Positive maximum number of results per page; for example, 2." + }, + { + "name": "cursor", + "in": "query", + "schema": { + "type": "string", + "description": "Opaque next_cursor from the previous response. Keep the same time range, filters, grouping, and limit when requesting subsequent pages." + }, + "description": "Opaque next_cursor from the previous response. Keep the same time range, filters, grouping, and limit when requesting subsequent pages." + } + ], + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "oneOf": [ + { + "type": "object", + "properties": { + "from": { + "type": "string", + "description": "Effective start of the returned time range, in ISO 8601 format." + }, + "to": { + "type": "string", + "description": "Effective end of the returned time range, in ISO 8601 format." + }, + "totals": { + "type": "object", + "properties": { + "rpc_errors": { + "type": "number", + "description": "Number of RPC errors." + }, + "http_errors": { + "type": "number", + "description": "Number of HTTP errors." + } + }, + "description": "Aggregate totals for the selected time range." + }, + "next_cursor": { + "type": "string", + "description": "Opaque continuation cursor. Present when another page is available. Pass it unchanged as cursor." + }, + "breakdown": { + "type": "array", + "items": { + "type": "object", + "properties": { + "method": { + "type": "string", + "description": "RPC method name. In a breakdown, present when grouping by method." + }, + "kind": { + "type": "string", + "description": "Error kind: rpc or http." + }, + "count": { + "type": "number", + "description": "Number of errors in this group." + } + } + }, + "description": "Grouped results. Present when grouping is requested; can be empty." + } + } + }, + { + "type": "null" + } + ], + "description": "Response data. Null when the request fails." + }, + "error": { + "type": [ + "string", + "null" + ], + "description": "Error message on failure; null on success." + } + } + } + } + } + } + } + } + }, + "/v0/metrics/errors/summary": { + "post": { + "operationId": "post_v0_metrics_errors_summary", + "summary": "Returns account RPC and HTTP error counts for a time range.", + "tags": [ + "metrics" + ], + "externalDocs": { + "description": "Quicknode docs", + "url": "https://www.quicknode.com/docs/admin-api/observability/v0-metrics-errors-summary" + }, + "parameters": [ + { + "name": "from", + "in": "query", + "schema": { + "type": "string", + "description": "ISO 8601 start time. Required together with to when last is omitted." + }, + "description": "ISO 8601 start time. Required together with to when last is omitted." + }, + { + "name": "to", + "in": "query", + "schema": { + "type": "string", + "description": "ISO 8601 end time. Required together with from when last is omitted." + }, + "description": "ISO 8601 end time. Required together with from when last is omitted." + }, + { + "name": "last", + "in": "query", + "schema": { + "type": "string", + "description": "Relative time window instead of from and to; for example, 1h for the last hour." + }, + "description": "Relative time window instead of from and to; for example, 1h for the last hour." + }, + { + "name": "group_by[]", + "in": "query", + "schema": { + "type": "array", + "items": {}, + "description": "Repeat this query parameter for grouping dimensions: method. Method grouping requires kind=rpc." + }, + "description": "Repeat this query parameter for grouping dimensions: method. Method grouping requires kind=rpc." + }, + { + "name": "kind", + "in": "query", + "schema": { + "type": "string", + "description": "Filter errors to rpc or http. Omit to include both. Use rpc when grouping by method." + }, + "description": "Filter errors to rpc or http. Omit to include both. Use rpc when grouping by method." + }, + { + "name": "limit", + "in": "query", + "schema": { + "type": "integer", + "description": "Positive maximum number of results per page; for example, 2." + }, + "description": "Positive maximum number of results per page; for example, 2." + }, + { + "name": "cursor", + "in": "query", + "schema": { + "type": "string", + "description": "Opaque next_cursor from the previous response. Keep the same time range, filters, grouping, and limit when requesting subsequent pages." + }, + "description": "Opaque next_cursor from the previous response. Keep the same time range, filters, grouping, and limit when requesting subsequent pages." + } + ], + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "oneOf": [ + { + "type": "object", + "properties": { + "from": { + "type": "string", + "description": "Effective start of the returned time range, in ISO 8601 format." + }, + "to": { + "type": "string", + "description": "Effective end of the returned time range, in ISO 8601 format." + }, + "totals": { + "type": "object", + "properties": { + "rpc_errors": { + "type": "number", + "description": "Number of RPC errors." + }, + "http_errors": { + "type": "number", + "description": "Number of HTTP errors." + } + }, + "description": "Aggregate totals for the selected time range." + }, + "next_cursor": { + "type": "string", + "description": "Opaque continuation cursor. Present when another page is available. Pass it unchanged as cursor." + }, + "breakdown": { + "type": "array", + "items": { + "type": "object", + "properties": { + "method": { + "type": "string", + "description": "RPC method name. In a breakdown, present when grouping by method." + }, + "kind": { + "type": "string", + "description": "Error kind: rpc or http." + }, + "count": { + "type": "number", + "description": "Number of errors in this group." + } + } + }, + "description": "Grouped results. Present when grouping is requested; can be empty." + } + } + }, + { + "type": "null" + } + ], + "description": "Response data. Null when the request fails." + }, + "error": { + "type": [ + "string", + "null" + ], + "description": "Error message on failure; null on success." + } + } + } + } + } + } + } + } + }, + "/v0/metrics/traffic/summary": { + "post": { + "operationId": "post_v0_metrics_traffic_summary", + "summary": "Returns successful requests, transferred bytes, credits, and distinct active methods for a time range.", + "tags": [ + "metrics" + ], + "externalDocs": { + "description": "Quicknode docs", + "url": "https://www.quicknode.com/docs/admin-api/observability/v0-metrics-traffic-summary" + }, + "parameters": [ + { + "name": "from", + "in": "query", + "schema": { + "type": "string", + "description": "ISO 8601 start time. Required together with to when last is omitted." + }, + "description": "ISO 8601 start time. Required together with to when last is omitted." + }, + { + "name": "to", + "in": "query", + "schema": { + "type": "string", + "description": "ISO 8601 end time. Required together with from when last is omitted." + }, + "description": "ISO 8601 end time. Required together with from when last is omitted." + }, + { + "name": "last", + "in": "query", + "schema": { + "type": "string", + "description": "Relative time window instead of from and to; for example, 1h for the last hour." + }, + "description": "Relative time window instead of from and to; for example, 1h for the last hour." + }, + { + "name": "group_by[]", + "in": "query", + "schema": { + "type": "array", + "items": {}, + "description": "Repeat this query parameter for grouping dimensions: method, endpoint. Omit it to return totals without a breakdown." + }, + "description": "Repeat this query parameter for grouping dimensions: method, endpoint. Omit it to return totals without a breakdown." + }, + { + "name": "limit", + "in": "query", + "schema": { + "type": "integer", + "description": "Positive maximum number of results per page; for example, 2." + }, + "description": "Positive maximum number of results per page; for example, 2." + }, + { + "name": "cursor", + "in": "query", + "schema": { + "type": "string", + "description": "Opaque next_cursor from the previous response. Keep the same time range, filters, grouping, and limit when requesting subsequent pages." + }, + "description": "Opaque next_cursor from the previous response. Keep the same time range, filters, grouping, and limit when requesting subsequent pages." + } + ], + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "oneOf": [ + { + "type": "object", + "properties": { + "from": { + "type": "string", + "description": "Effective start of the returned time range, in ISO 8601 format." + }, + "to": { + "type": "string", + "description": "Effective end of the returned time range, in ISO 8601 format." + }, + "totals": { + "type": "object", + "properties": { + "successful_requests": { + "type": "integer", + "description": "Number of successful requests." + }, + "bytes": { + "type": "integer", + "description": "Number of bytes transferred." + }, + "request_credits": { + "type": "integer", + "description": "Credits consumed by requests." + }, + "bytes_credits": { + "type": "integer", + "description": "Credits consumed by transferred bytes." + }, + "credits": { + "type": "integer", + "description": "Total API credits consumed." + }, + "active_methods": { + "type": "integer", + "description": "Number of distinct active methods." + } + }, + "description": "Aggregate totals for the selected time range." + }, + "breakdown": { + "type": "array", + "items": { + "type": "object", + "properties": { + "method": { + "type": "string", + "description": "RPC method name. In a breakdown, present when grouping by method." + }, + "successful_requests": { + "type": "integer", + "description": "Number of successful requests." + }, + "bytes": { + "type": "integer", + "description": "Number of bytes transferred." + }, + "request_credits": { + "type": "integer", + "description": "Credits consumed by requests." + }, + "bytes_credits": { + "type": "integer", + "description": "Credits consumed by transferred bytes." + }, + "credits": { + "type": "integer", + "description": "Total API credits consumed." + }, + "active_methods": { + "type": "integer", + "description": "Number of distinct active methods." + }, + "endpoint": { + "type": "string", + "description": "Endpoint UUID; present when grouping by endpoint." + } + } + }, + "description": "Grouped results. Present when grouping is requested; can be empty." + }, + "next_cursor": { + "type": "string", + "description": "Opaque continuation cursor. Present when another page is available. Pass it unchanged as cursor." + } + } + }, + { + "type": "null" + } + ], + "description": "Response data. Null when the request fails." + }, + "error": { + "type": [ + "string", + "null" + ], + "description": "Error message on failure; null on success." + } + } + } + } + } + } + } + } + }, + "/v0/transactions": { + "post": { + "operationId": "post_v0_transactions", + "summary": "Lists account transaction submissions for a time range, with cursor pagination.", + "tags": [ + "transactions" + ], + "externalDocs": { + "description": "Quicknode docs", + "url": "https://www.quicknode.com/docs/admin-api/observability/v0-transactions" + }, + "parameters": [ + { + "name": "from", + "in": "query", + "schema": { + "type": "string", + "description": "ISO 8601 start time. Required together with to when last is omitted." + }, + "description": "ISO 8601 start time. Required together with to when last is omitted." + }, + { + "name": "to", + "in": "query", + "schema": { + "type": "string", + "description": "ISO 8601 end time. Required together with from when last is omitted." + }, + "description": "ISO 8601 end time. Required together with from when last is omitted." + }, + { + "name": "last", + "in": "query", + "schema": { + "type": "string", + "description": "Relative time window instead of from and to; for example, 1h for the last hour." + }, + "description": "Relative time window instead of from and to; for example, 1h for the last hour." + }, + { + "name": "limit", + "in": "query", + "schema": { + "type": "integer", + "description": "Positive maximum number of results per page; for example, 2." + }, + "description": "Positive maximum number of results per page; for example, 2." + }, + { + "name": "cursor", + "in": "query", + "schema": { + "type": "string", + "description": "Opaque next_cursor from the previous response. Keep the same time range, filters, grouping, and limit when requesting subsequent pages." + }, + "description": "Opaque next_cursor from the previous response. Keep the same time range, filters, grouping, and limit when requesting subsequent pages." + }, + { + "name": "network", + "in": "query", + "schema": { + "type": "string", + "description": "Filter submissions by network identifier, such as robinhood-testnet." + }, + "description": "Filter submissions by network identifier, such as robinhood-testnet." + } + ], + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "oneOf": [ + { + "type": "object", + "properties": { + "from": { + "type": "string", + "description": "Effective start of the returned time range, in ISO 8601 format." + }, + "to": { + "type": "string", + "description": "Effective end of the returned time range, in ISO 8601 format." + }, + "transactions": { + "type": "array", + "items": { + "type": "object", + "properties": { + "network": { + "type": "string", + "description": "Network identifier." + }, + "transaction_hash": { + "type": "string", + "description": "Transaction hash or signature." + }, + "first_submitted_at": { + "type": "string", + "description": "Timestamp of the first recorded submission." + }, + "last_submitted_at": { + "type": "string", + "description": "Timestamp of the most recent recorded submission." + }, + "attempt_count": { + "type": "integer", + "description": "Number of recorded submission attempts." + }, + "endpoint_ids": { + "type": "array", + "items": {}, + "description": "Endpoint UUIDs associated with the submissions. These are not the numeric Admin API endpoint IDs." + }, + "methods": { + "type": "array", + "items": {}, + "description": "RPC method names used for submission." + }, + "archive": { + "type": "boolean", + "description": "Whether the transaction is marked as archived." + }, + "height": { + "type": [ + "string", + "null" + ], + "description": "Block height when available; otherwise null." + }, + "state": { + "type": "string", + "description": "Recorded transaction submission state; for example, submitted. This is not confirmation of inclusion or finality." + } + } + }, + "description": "Transaction submissions matching the selected time range and filters." + }, + "next_cursor": { + "type": "string", + "description": "Opaque continuation cursor. Present when another page is available. Pass it unchanged as cursor." + } + } + }, + { + "type": "null" + } + ], + "description": "Response data. Null when the request fails." + }, + "error": { + "type": [ + "string", + "null" + ], + "description": "Error message on failure; null on success." + } + } + } + } + } + } + } + } + }, + "/v0/transactions/{network}/{hash}": { + "post": { + "operationId": "post_v0_transactions_by_network_by_hash", + "summary": "Returns recorded submission attempts for a transaction, optionally including request and response payloads.", + "tags": [ + "transactions" + ], + "externalDocs": { + "description": "Quicknode docs", + "url": "https://www.quicknode.com/docs/admin-api/observability/v0-transactions-network-hash" + }, + "parameters": [ + { + "name": "network", + "in": "path", + "schema": { + "type": "string", + "description": "Network returned by GET /v0/transactions." + }, + "required": true, + "description": "Network returned by GET /v0/transactions." + }, + { + "name": "hash", + "in": "path", + "schema": { + "type": "string", + "description": "Transaction hash or signature returned by GET /v0/transactions. URL-encode this path segment." + }, + "required": true, + "description": "Transaction hash or signature returned by GET /v0/transactions. URL-encode this path segment." + }, + { + "name": "include_payloads", + "in": "query", + "schema": { + "type": "boolean", + "description": "Set to true to include available request/response payload strings. Payloads are omitted when this parameter is not supplied." + }, + "description": "Set to true to include available request/response payload strings. Payloads are omitted when this parameter is not supplied." + } + ], + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "oneOf": [ + { + "type": "object", + "properties": { + "exists": { + "type": "boolean", + "description": "Whether a matching transaction submission was found." + }, + "data": { + "oneOf": [ + { + "type": "object", + "properties": { + "network": { + "type": "string", + "description": "Network identifier." + }, + "transaction_hash": { + "type": "string", + "description": "Transaction hash or signature." + }, + "first_submitted_at": { + "type": "string", + "description": "Timestamp of the first recorded submission." + }, + "last_submitted_at": { + "type": "string", + "description": "Timestamp of the most recent recorded submission." + }, + "state": { + "type": "string", + "description": "Recorded transaction submission state; for example, submitted. This is not confirmation of inclusion or finality." + }, + "attempts": { + "type": "array", + "items": { + "type": "object", + "properties": { + "submitted_at": { + "type": "string", + "description": "Timestamp of the submission attempt." + }, + "endpoint_id": { + "type": "string", + "description": "Endpoint UUID for this attempt; not the numeric Admin API endpoint ID." + }, + "method": { + "type": "string", + "description": "RPC method name. In a breakdown, present when grouping by method." + }, + "request_id": { + "type": "string", + "description": "Identifier of the recorded request." + }, + "payloads": { + "type": "object", + "properties": { + "request": { + "type": "string", + "description": "Recorded request payload as a JSON-encoded string." + }, + "response": { + "type": "string", + "description": "Recorded response payload as a JSON-encoded string." + } + }, + "description": "Optional request and response payloads, returned when include_payloads=true and available." + } + } + }, + "description": "Recorded attempts to submit this transaction." + } + } + }, + { + "type": "null" + } + ], + "description": "Recorded transaction details; null when exists is false." + } + } + }, + { + "type": "null" + } + ], + "description": "Response data. Null when the request fails." + }, + "error": { + "type": [ + "string", + "null" + ], + "description": "Error message on failure; null on success." + } + } + } + } + } + } + } + } + }, + "/v0/usage/credits/summary": { + "post": { + "operationId": "post_v0_usage_credits_summary", + "summary": "Returns total account API credits for a time range.", + "tags": [ + "usage" + ], + "externalDocs": { + "description": "Quicknode docs", + "url": "https://www.quicknode.com/docs/admin-api/observability/v0-usage-credits-summary" + }, + "parameters": [ + { + "name": "from", + "in": "query", + "schema": { + "type": "string", + "description": "ISO 8601 start time. Required together with to when last is omitted." + }, + "description": "ISO 8601 start time. Required together with to when last is omitted." + }, + { + "name": "to", + "in": "query", + "schema": { + "type": "string", + "description": "ISO 8601 end time. Required together with from when last is omitted." + }, + "description": "ISO 8601 end time. Required together with from when last is omitted." + }, + { + "name": "last", + "in": "query", + "schema": { + "type": "string", + "description": "Relative time window instead of from and to; for example, 1h for the last hour." + }, + "description": "Relative time window instead of from and to; for example, 1h for the last hour." + } + ], + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "oneOf": [ + { + "type": "object", + "properties": { + "from": { + "type": "string", + "description": "Effective start of the returned time range, in ISO 8601 format." + }, + "to": { + "type": "string", + "description": "Effective end of the returned time range, in ISO 8601 format." + }, + "totals": { + "type": "object", + "properties": { + "credits": { + "type": "integer", + "description": "Total API credits consumed." + } + }, + "description": "Aggregate totals for the selected time range." + } + } + }, + { + "type": "null" + } + ], + "description": "Response data. Null when the request fails." + }, + "error": { + "type": [ + "string", + "null" + ], + "description": "Error message on failure; null on success." + } + } + } + } + } + } + } + } + }, + "/v0/usage/rpc/summary": { + "post": { + "operationId": "post_v0_usage_rpc_summary", + "summary": "Returns account RPC requests, transferred bytes, and credits for a time range.", + "tags": [ + "usage" + ], + "externalDocs": { + "description": "Quicknode docs", + "url": "https://www.quicknode.com/docs/admin-api/observability/v0-usage-rpc-summary" + }, + "parameters": [ + { + "name": "from", + "in": "query", + "schema": { + "type": "string", + "description": "ISO 8601 start time. Required together with to when last is omitted." + }, + "description": "ISO 8601 start time. Required together with to when last is omitted." + }, + { + "name": "to", + "in": "query", + "schema": { + "type": "string", + "description": "ISO 8601 end time. Required together with from when last is omitted." + }, + "description": "ISO 8601 end time. Required together with from when last is omitted." + }, + { + "name": "last", + "in": "query", + "schema": { + "type": "string", + "description": "Relative time window instead of from and to; for example, 1h for the last hour." + }, + "description": "Relative time window instead of from and to; for example, 1h for the last hour." + }, + { + "name": "group_by[]", + "in": "query", + "schema": { + "type": "array", + "items": {}, + "description": "Repeat this query parameter for grouping dimensions: method, network, endpoint. Omit it to return totals without a breakdown." + }, + "description": "Repeat this query parameter for grouping dimensions: method, network, endpoint. Omit it to return totals without a breakdown." + }, + { + "name": "limit", + "in": "query", + "schema": { + "type": "integer", + "description": "Positive maximum number of results per page; for example, 2." + }, + "description": "Positive maximum number of results per page; for example, 2." + }, + { + "name": "cursor", + "in": "query", + "schema": { + "type": "string", + "description": "Opaque next_cursor from the previous response. Keep the same time range, filters, grouping, and limit when requesting subsequent pages." + }, + "description": "Opaque next_cursor from the previous response. Keep the same time range, filters, grouping, and limit when requesting subsequent pages." + } + ], + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "oneOf": [ + { + "type": "object", + "properties": { + "from": { + "type": "string", + "description": "Effective start of the returned time range, in ISO 8601 format." + }, + "to": { + "type": "string", + "description": "Effective end of the returned time range, in ISO 8601 format." + }, + "totals": { + "type": "object", + "properties": { + "requests": { + "type": "integer", + "description": "Number of RPC requests." + }, + "bytes": { + "type": "integer", + "description": "Number of bytes transferred." + }, + "rpc_credits": { + "type": "integer", + "description": "Credits consumed by RPC requests." + }, + "data_credits": { + "type": "integer", + "description": "Credits consumed by data transfer." + }, + "credits": { + "type": "integer", + "description": "Total API credits consumed." + } + }, + "description": "Aggregate totals for the selected time range." + }, + "breakdown": { + "type": "array", + "items": { + "type": "object", + "properties": { + "method": { + "type": "string", + "description": "RPC method name. In a breakdown, present when grouping by method." + }, + "requests": { + "type": "integer", + "description": "Number of RPC requests." + }, + "bytes": { + "type": "integer", + "description": "Number of bytes transferred." + }, + "rpc_credits": { + "type": "integer", + "description": "Credits consumed by RPC requests." + }, + "data_credits": { + "type": "integer", + "description": "Credits consumed by data transfer." + }, + "credits": { + "type": "integer", + "description": "Total API credits consumed." + }, + "network": { + "type": "string", + "description": "Present when grouping by network." + }, + "endpoint": { + "type": "string", + "description": "Endpoint UUID; present when grouping by endpoint." + } + } + }, + "description": "Grouped results. Present when grouping is requested; can be empty." + }, + "next_cursor": { + "type": "string", + "description": "Opaque continuation cursor. Present when another page is available. Pass it unchanged as cursor." + } + } + }, + { + "type": "null" + } + ], + "description": "Response data. Null when the request fails." + }, + "error": { + "type": [ + "string", + "null" + ], + "description": "Error message on failure; null on success." + } + } + } + } + } + } + } + } + }, + "/v0/usage/streams/summary": { + "post": { + "operationId": "post_v0_usage_streams_summary", + "summary": "Returns Streams blocks, transferred bytes, and block credits for a time range.", + "tags": [ + "usage" + ], + "externalDocs": { + "description": "Quicknode docs", + "url": "https://www.quicknode.com/docs/admin-api/observability/v0-usage-streams-summary" + }, + "parameters": [ + { + "name": "from", + "in": "query", + "schema": { + "type": "string", + "description": "ISO 8601 start time. Required together with to when last is omitted." + }, + "description": "ISO 8601 start time. Required together with to when last is omitted." + }, + { + "name": "to", + "in": "query", + "schema": { + "type": "string", + "description": "ISO 8601 end time. Required together with from when last is omitted." + }, + "description": "ISO 8601 end time. Required together with from when last is omitted." + }, + { + "name": "last", + "in": "query", + "schema": { + "type": "string", + "description": "Relative time window instead of from and to; for example, 1h for the last hour." + }, + "description": "Relative time window instead of from and to; for example, 1h for the last hour." + }, + { + "name": "group_by[]", + "in": "query", + "schema": { + "type": "array", + "items": {}, + "description": "Repeat this query parameter for grouping dimensions: stream. Omit it to return totals without a breakdown." + }, + "description": "Repeat this query parameter for grouping dimensions: stream. Omit it to return totals without a breakdown." + }, + { + "name": "limit", + "in": "query", + "schema": { + "type": "integer", + "description": "Positive maximum number of results per page; for example, 2." + }, + "description": "Positive maximum number of results per page; for example, 2." + }, + { + "name": "cursor", + "in": "query", + "schema": { + "type": "string", + "description": "Opaque next_cursor from the previous response. Keep the same time range, filters, grouping, and limit when requesting subsequent pages." + }, + "description": "Opaque next_cursor from the previous response. Keep the same time range, filters, grouping, and limit when requesting subsequent pages." + } + ], + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "oneOf": [ + { + "type": "object", + "properties": { + "from": { + "type": "string", + "description": "Effective start of the returned time range, in ISO 8601 format." + }, + "to": { + "type": "string", + "description": "Effective end of the returned time range, in ISO 8601 format." + }, + "totals": { + "type": "object", + "properties": { + "blocks": { + "type": "integer", + "description": "Number of Streams blocks processed." + }, + "bytes": { + "type": "integer", + "description": "Number of bytes transferred." + }, + "block_credits": { + "type": "integer", + "description": "Credits consumed by Streams blocks." + } + }, + "description": "Aggregate totals for the selected time range." + }, + "breakdown": { + "type": "array", + "items": { + "type": "object", + "properties": { + "stream": { + "type": "string", + "description": "Stream identifier. Present when grouping by stream." + }, + "blocks": { + "type": "integer", + "description": "Number of Streams blocks processed." + }, + "bytes": { + "type": "integer", + "description": "Number of bytes transferred." + }, + "block_credits": { + "type": "integer", + "description": "Credits consumed by Streams blocks." + } + } + }, + "description": "Grouped results. Present when grouping is requested; can be empty." + }, + "next_cursor": { + "type": "string", + "description": "Opaque continuation cursor. Present when another page is available. Pass it unchanged as cursor." + } + } + }, + { + "type": "null" + } + ], + "description": "Response data. Null when the request fails." + }, + "error": { + "type": [ + "string", + "null" + ], + "description": "Error message on failure; null on success." + } + } + } + } + } + } + } + } + }, + "/v0/usage/webhooks/summary": { + "post": { + "operationId": "post_v0_usage_webhooks_summary", + "summary": "Returns Webhooks deliveries and credits for a time range.", + "tags": [ + "usage" + ], + "externalDocs": { + "description": "Quicknode docs", + "url": "https://www.quicknode.com/docs/admin-api/observability/v0-usage-webhooks-summary" + }, + "parameters": [ + { + "name": "from", + "in": "query", + "schema": { + "type": "string", + "description": "ISO 8601 start time. Required together with to when last is omitted." + }, + "description": "ISO 8601 start time. Required together with to when last is omitted." + }, + { + "name": "to", + "in": "query", + "schema": { + "type": "string", + "description": "ISO 8601 end time. Required together with from when last is omitted." + }, + "description": "ISO 8601 end time. Required together with from when last is omitted." + }, + { + "name": "last", + "in": "query", + "schema": { + "type": "string", + "description": "Relative time window instead of from and to; for example, 1h for the last hour." + }, + "description": "Relative time window instead of from and to; for example, 1h for the last hour." + }, + { + "name": "group_by[]", + "in": "query", + "schema": { + "type": "array", + "items": {}, + "description": "Repeat this query parameter for grouping dimensions: webhook. Omit it to return totals without a breakdown." + }, + "description": "Repeat this query parameter for grouping dimensions: webhook. Omit it to return totals without a breakdown." + }, + { + "name": "limit", + "in": "query", + "schema": { + "type": "integer", + "description": "Positive maximum number of results per page; for example, 2." + }, + "description": "Positive maximum number of results per page; for example, 2." + }, + { + "name": "cursor", + "in": "query", + "schema": { + "type": "string", + "description": "Opaque next_cursor from the previous response. Keep the same time range, filters, grouping, and limit when requesting subsequent pages." + }, + "description": "Opaque next_cursor from the previous response. Keep the same time range, filters, grouping, and limit when requesting subsequent pages." + } + ], + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "oneOf": [ + { + "type": "object", + "properties": { + "from": { + "type": "string", + "description": "Effective start of the returned time range, in ISO 8601 format." + }, + "to": { + "type": "string", + "description": "Effective end of the returned time range, in ISO 8601 format." + }, + "totals": { + "type": "object", + "properties": { + "deliveries": { + "type": "integer", + "description": "Number of Webhooks deliveries." + }, + "credits": { + "type": "integer", + "description": "Total API credits consumed." + } + }, + "description": "Aggregate totals for the selected time range." + }, + "breakdown": { + "type": "array", + "items": { + "type": "object", + "properties": { + "webhook": { + "type": "string", + "description": "Webhook identifier. Present when grouping by webhook." + }, + "deliveries": { + "type": "integer", + "description": "Number of Webhooks deliveries." + }, + "credits": { + "type": "integer", + "description": "Total API credits consumed." + } + } + }, + "description": "Grouped results. Present when grouping is requested; can be empty." + }, + "next_cursor": { + "type": "string", + "description": "Opaque continuation cursor. Present when another page is available. Pass it unchanged as cursor." + } + } + }, + { + "type": "null" + } + ], + "description": "Response data. Null when the request fails." + }, + "error": { + "type": [ + "string", + "null" + ], + "description": "Error message on failure; null on success." + } + } + } + } + } + } + } + } + }, "/v0/endpoints/tags": { "get": { "operationId": "get_v0_endpoints_tags", diff --git a/docs/resources/endpoint_method_rate_limit.md b/docs/resources/endpoint_method_rate_limit.md index efc5d09..a84f1e5 100644 --- a/docs/resources/endpoint_method_rate_limit.md +++ b/docs/resources/endpoint_method_rate_limit.md @@ -30,6 +30,10 @@ resource "quicknode_endpoint_method_rate_limit" "heavy_reads" { methods = ["eth_getLogs", "debug_traceTransaction"] rate = 5 interval = "second" + + # Count the rate per client IP, so one busy client cannot use up the budget + # for everyone else. + limit_by_ip = true } # Disabling keeps the definition in place, which suits turning a limit off @@ -57,6 +61,7 @@ resource "quicknode_endpoint_method_rate_limit" "trace_block" { ### Optional - `enabled` (Boolean) Whether the limiter is applied. Disabling keeps the definition in place, which suits turning a limit off during an incident without losing it. +- `limit_by_ip` (Boolean) Count the rate separately for each client IP instead of for the endpoint as a whole. Independent of `limit_by_ip` on `quicknode_endpoint_rate_limits`. Behind a proxy, set `ip_custom_header` on the endpoint so the client IP is read from the header the proxy forwards it in. Defaults to `false`. ### Read-Only diff --git a/docs/resources/endpoint_rate_limits.md b/docs/resources/endpoint_rate_limits.md index e56e94b..7295386 100644 --- a/docs/resources/endpoint_rate_limits.md +++ b/docs/resources/endpoint_rate_limits.md @@ -30,6 +30,9 @@ resource "quicknode_endpoint_rate_limits" "api" { rps = 25 rpd = 1000000 + + # Each client IP gets its own 25 requests per second and 1,000,000 per day. + limit_by_ip = true } output "plan_allows_per_second" { @@ -46,6 +49,7 @@ output "plan_allows_per_second" { ### Optional +- `limit_by_ip` (Boolean) Count the buckets separately for each client IP instead of for the endpoint as a whole. Left out of the configuration, it keeps whatever value the endpoint already has. Behind a proxy, set `ip_custom_header` on the endpoint so the client IP is read from the header the proxy forwards it in. Destroying this resource turns it off. - `rpd` (Number) Maximum requests per day. Omit to keep the plan default. - `rpm` (Number) Maximum requests per minute. Omit to keep the plan default. - `rps` (Number) Maximum requests per second. Omit to keep the plan default. diff --git a/examples/resources/quicknode_endpoint_method_rate_limit/resource.tf b/examples/resources/quicknode_endpoint_method_rate_limit/resource.tf index d43fb1f..f1e8f47 100644 --- a/examples/resources/quicknode_endpoint_method_rate_limit/resource.tf +++ b/examples/resources/quicknode_endpoint_method_rate_limit/resource.tf @@ -12,6 +12,10 @@ resource "quicknode_endpoint_method_rate_limit" "heavy_reads" { methods = ["eth_getLogs", "debug_traceTransaction"] rate = 5 interval = "second" + + # Count the rate per client IP, so one busy client cannot use up the budget + # for everyone else. + limit_by_ip = true } # Disabling keeps the definition in place, which suits turning a limit off diff --git a/examples/resources/quicknode_endpoint_rate_limits/resource.tf b/examples/resources/quicknode_endpoint_rate_limits/resource.tf index 382332c..8f65b0f 100644 --- a/examples/resources/quicknode_endpoint_rate_limits/resource.tf +++ b/examples/resources/quicknode_endpoint_rate_limits/resource.tf @@ -12,6 +12,9 @@ resource "quicknode_endpoint_rate_limits" "api" { rps = 25 rpd = 1000000 + + # Each client IP gets its own 25 requests per second and 1,000,000 per day. + limit_by_ip = true } output "plan_allows_per_second" { diff --git a/internal/client/ratelimits.go b/internal/client/ratelimits.go index 2c93e02..645c83d 100644 --- a/internal/client/ratelimits.go +++ b/internal/client/ratelimits.go @@ -29,13 +29,19 @@ type RateLimit struct { ID string } -// RateLimitOverrides names the buckets a write can set. A nil field is left -// alone, so a configuration that manages only one bucket does not disturb the -// others. +type EndpointRateLimits struct { + Limits []RateLimit + LimitByIP bool +} + +// RateLimitOverrides names the settings a write can change. A nil field is +// left alone, so a configuration that manages only one bucket does not disturb +// the others. type RateLimitOverrides struct { - RPS *int - RPM *int - RPD *int + RPS *int + RPM *int + RPD *int + LimitByIP *bool } // MethodRateLimit throttles a named set of RPC methods independently of the @@ -47,9 +53,11 @@ type MethodRateLimit struct { Interval string Status string Created string + + LimitByIP bool } -func (c *Client) GetRateLimits(ctx context.Context, endpointID string) ([]RateLimit, error) { +func (c *Client) GetRateLimits(ctx context.Context, endpointID string) (*EndpointRateLimits, error) { const operation = "read endpoint rate limits" resp, err := c.api.GetV0EndpointsByIdRateLimitsWithResponse(ctx, endpointID) @@ -65,8 +73,14 @@ func (c *Client) GetRateLimits(ctx context.Context, endpointID string) ([]RateLi if err := envelopeError(operation, resp.StatusCode(), resp.JSON200.Error); err != nil { return nil, err } - if resp.JSON200.Data == nil || resp.JSON200.Data.RateLimits == nil { - return nil, nil + + result := &EndpointRateLimits{} + if resp.JSON200.Data == nil { + return result, nil + } + result.LimitByIP = deref(resp.JSON200.Data.LimitByIp) + if resp.JSON200.Data.RateLimits == nil { + return result, nil } limits := make([]RateLimit, 0, len(*resp.JSON200.Data.RateLimits)) @@ -82,22 +96,29 @@ func (c *Client) GetRateLimits(ctx context.Context, endpointID string) ([]RateLi } limits = append(limits, limit) } - return limits, nil + result.Limits = limits + return result, nil } -// SetRateLimits writes the buckets the caller manages. Managing none sends no -// request at all. +// SetRateLimits writes the settings the caller manages. Managing none sends no +// request at all. The route rejects an empty rate_limits object, so it is left +// out when no bucket is set. func (c *Client) SetRateLimits(ctx context.Context, endpointID string, overrides RateLimitOverrides) error { const operation = "update endpoint rate limits" - if overrides.RPS == nil && overrides.RPM == nil && overrides.RPD == nil { + setsBucket := overrides.RPS != nil || overrides.RPM != nil || overrides.RPD != nil + if !setsBucket && overrides.LimitByIP == nil { return nil } - body := admin.PatchV0EndpointsByIdRateLimitsJSONRequestBody{} - body.RateLimits.Rps = overrides.RPS - body.RateLimits.Rpm = overrides.RPM - body.RateLimits.Rpd = overrides.RPD + body := admin.PatchV0EndpointsByIdRateLimitsJSONRequestBody{LimitByIp: overrides.LimitByIP} + if setsBucket { + body.RateLimits = &struct { + Rpd *int `json:"rpd,omitempty"` + Rpm *int `json:"rpm,omitempty"` + Rps *int `json:"rps,omitempty"` + }{Rpd: overrides.RPD, Rpm: overrides.RPM, Rps: overrides.RPS} + } resp, err := c.api.PatchV0EndpointsByIdRateLimitsWithResponse(ctx, endpointID, body) if err != nil { @@ -156,10 +177,11 @@ func (c *Client) ListMethodRateLimits(ctx context.Context, endpointID string) ([ limiters := make([]MethodRateLimit, 0, len(*resp.JSON200.Data.RateLimiters)) for _, raw := range *resp.JSON200.Data.RateLimiters { limiter := MethodRateLimit{ - ID: deref(raw.Id), - Interval: deref(raw.Interval), - Status: deref(raw.Status), - Created: deref(raw.Created), + ID: deref(raw.Id), + Interval: deref(raw.Interval), + Status: deref(raw.Status), + Created: deref(raw.Created), + LimitByIP: deref(raw.LimitByIp), } if raw.Rate != nil { limiter.Rate = *raw.Rate @@ -177,9 +199,10 @@ func (c *Client) AddMethodRateLimit(ctx context.Context, endpointID string, limi resp, err := c.api.PostV0EndpointsByIdMethodRateLimitsWithResponse(ctx, endpointID, admin.PostV0EndpointsByIdMethodRateLimitsJSONRequestBody{ - Interval: limiter.Interval, - Methods: limiter.Methods, - Rate: limiter.Rate, + Interval: limiter.Interval, + LimitByIp: &limiter.LimitByIP, + Methods: limiter.Methods, + Rate: limiter.Rate, }) if err != nil { return nil, err @@ -196,10 +219,11 @@ func (c *Client) AddMethodRateLimit(ctx context.Context, endpointID string, limi data := resp.JSON200.Data created := &MethodRateLimit{ - ID: *data.Id, - Interval: deref(data.Interval), - Status: deref(data.Status), - Created: deref(data.Created), + ID: *data.Id, + Interval: deref(data.Interval), + Status: deref(data.Status), + Created: deref(data.Created), + LimitByIP: deref(data.LimitByIp), } if data.Rate != nil { created.Rate = *data.Rate @@ -218,9 +242,10 @@ func (c *Client) UpdateMethodRateLimit(ctx context.Context, endpointID, limiterI resp, err := c.api.PatchV0EndpointsByIdMethodRateLimitsByMethodRateLimitIdWithResponse(ctx, endpointID, limiterID, admin.PatchV0EndpointsByIdMethodRateLimitsByMethodRateLimitIdJSONRequestBody{ - Methods: limiter.Methods, - Rate: limiter.Rate, - Status: limiter.Status, + LimitByIp: &limiter.LimitByIP, + Methods: &limiter.Methods, + Rate: &limiter.Rate, + Status: &limiter.Status, }) if err != nil { return err diff --git a/internal/client/ratelimits_test.go b/internal/client/ratelimits_test.go index 2b72c63..eea0d51 100644 --- a/internal/client/ratelimits_test.go +++ b/internal/client/ratelimits_test.go @@ -15,13 +15,18 @@ const rateLimitsBody = `{"data":{"rate_limits":[ {"bucket":"rps","rate_limit":25,"source":"plan_default"}, {"bucket":"rpm","rate_limit":500,"source":"plan_default"}, {"bucket":"rpd","rate_limit":-1,"source":"plan_default"}, -{"bucket":"rps","rate_limit":10,"source":"user_override","id":"ovr-1"}]}}` +{"bucket":"rps","rate_limit":10,"source":"user_override","id":"ovr-1"}], +"limit_by_ip":true}}` func TestGetRateLimitsKeepsSourceAndID(t *testing.T) { - limits, err := newTestClient(t, rateLimitsBody).GetRateLimits(context.Background(), "1") + result, err := newTestClient(t, rateLimitsBody).GetRateLimits(context.Background(), "1") if err != nil { t.Fatalf("GetRateLimits: %v", err) } + if !result.LimitByIP { + t.Error("LimitByIP = false, want true") + } + limits := result.Limits if len(limits) != 4 { t.Fatalf("got %d limits, want 4", len(limits)) } @@ -85,6 +90,38 @@ func TestSetRateLimitsOmitsUnmanagedBuckets(t *testing.T) { t.Errorf("%s was sent although the caller left it unset", unmanaged) } } + if _, present := captured["limit_by_ip"]; present { + t.Error("limit_by_ip was sent although the caller left it unset") + } +} + +func TestSetRateLimitsSendsLimitByIPAlone(t *testing.T) { + var captured map[string]any + + server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + raw, _ := io.ReadAll(r.Body) + _ = json.Unmarshal(raw, &captured) + w.Header().Set("Content-Type", "application/json") + _, _ = w.Write([]byte(`{"data":{"limits":{"rps":-1,"rpm":-1,"rpd":-1},"limit_by_ip":false}}`)) + })) + t.Cleanup(server.Close) + + quicknode, err := New("test-key", WithBaseURL(server.URL)) + if err != nil { + t.Fatalf("New: %v", err) + } + + limitByIP := false + if err := quicknode.SetRateLimits(context.Background(), "1", RateLimitOverrides{LimitByIP: &limitByIP}); err != nil { + t.Fatalf("SetRateLimits: %v", err) + } + + if captured["limit_by_ip"] != false { + t.Errorf("limit_by_ip = %v, want false", captured["limit_by_ip"]) + } + if _, present := captured["rate_limits"]; present { + t.Errorf("rate_limits was sent with no bucket set, which the route rejects: %v", captured) + } } func TestDeleteRateLimitOverrideRejectsFalseSuccess(t *testing.T) { @@ -117,7 +154,7 @@ func TestRateLimitDeletesTolerateAbsence(t *testing.T) { func TestListMethodRateLimits(t *testing.T) { const body = `{"data":{"rate_limiters":[{"id":"lim-1","interval":"second","rate":5, -"status":"enabled","created":"1742400000","methods":["eth_getLogs","eth_call"]}]}}` +"status":"enabled","created":"1742400000","methods":["eth_getLogs","eth_call"],"limit_by_ip":true}]}}` limiters, err := newTestClient(t, body).ListMethodRateLimits(context.Background(), "1") if err != nil { @@ -127,7 +164,7 @@ func TestListMethodRateLimits(t *testing.T) { t.Fatalf("got %d limiters, want 1", len(limiters)) } limiter := limiters[0] - if limiter.ID != "lim-1" || limiter.Rate != 5 || limiter.Interval != "second" || limiter.Status != "enabled" { + if limiter.ID != "lim-1" || limiter.Rate != 5 || limiter.Interval != "second" || limiter.Status != "enabled" || !limiter.LimitByIP { t.Errorf("limiter = %+v", limiter) } if len(limiter.Methods) != 2 || limiter.Methods[0] != "eth_getLogs" { @@ -161,7 +198,7 @@ func TestUpdateMethodRateLimitSendsWholeObject(t *testing.T) { if err != nil { t.Fatalf("UpdateMethodRateLimit: %v", err) } - if captured["rate"] != float64(9) || captured["status"] != "disabled" { + if captured["rate"] != float64(9) || captured["status"] != "disabled" || captured["limit_by_ip"] != false { t.Errorf("body = %v", captured) } if _, present := captured["interval"]; present { diff --git a/internal/provider/acceptance_test.go b/internal/provider/acceptance_test.go index 8cac628..f99074f 100644 --- a/internal/provider/acceptance_test.go +++ b/internal/provider/acceptance_test.go @@ -269,10 +269,11 @@ resource "quicknode_endpoint_rate_limits" "test" { CheckDestroy: testAccCheckEndpointsDestroyed, Steps: []resource.TestStep{ { - Config: withBuckets(" rps = 25\n rpm = 500"), + Config: withBuckets(" rps = 25\n rpm = 500\n limit_by_ip = true"), Check: resource.ComposeAggregateTestCheckFunc( resource.TestCheckResourceAttr("quicknode_endpoint_rate_limits.test", "rps", "25"), resource.TestCheckResourceAttr("quicknode_endpoint_rate_limits.test", "rpm", "500"), + resource.TestCheckResourceAttr("quicknode_endpoint_rate_limits.test", "limit_by_ip", "true"), resource.TestCheckResourceAttrSet("quicknode_endpoint_rate_limits.test", "plan_default.rps"), ), }, @@ -281,6 +282,14 @@ resource "quicknode_endpoint_rate_limits" "test" { Check: resource.ComposeAggregateTestCheckFunc( resource.TestCheckResourceAttr("quicknode_endpoint_rate_limits.test", "rps", "25"), resource.TestCheckNoResourceAttr("quicknode_endpoint_rate_limits.test", "rpm"), + resource.TestCheckResourceAttr("quicknode_endpoint_rate_limits.test", "limit_by_ip", "true"), + ), + }, + { + Config: withBuckets(" limit_by_ip = false"), + Check: resource.ComposeAggregateTestCheckFunc( + resource.TestCheckNoResourceAttr("quicknode_endpoint_rate_limits.test", "rps"), + resource.TestCheckResourceAttr("quicknode_endpoint_rate_limits.test", "limit_by_ip", "false"), ), }, }, @@ -288,7 +297,7 @@ resource "quicknode_endpoint_rate_limits" "test" { } func TestAccMethodRateLimit_lifecycle(t *testing.T) { - withRate := func(rate int, enabled bool) string { + withRate := func(rate int, enabled, limitByIP bool) string { return fmt.Sprintf(` resource "quicknode_endpoint" "test" { chain = %q @@ -304,8 +313,9 @@ resource "quicknode_endpoint_method_rate_limit" "test" { rate = %d interval = "second" enabled = %t + limit_by_ip = %t } -`, acceptanceChain, acceptanceNetwork, rate, enabled) +`, acceptanceChain, acceptanceNetwork, rate, enabled, limitByIP) } resource.Test(t, resource.TestCase{ @@ -314,17 +324,19 @@ resource "quicknode_endpoint_method_rate_limit" "test" { CheckDestroy: testAccCheckEndpointsDestroyed, Steps: []resource.TestStep{ { - Config: withRate(5, true), + Config: withRate(5, true, true), Check: resource.ComposeAggregateTestCheckFunc( resource.TestCheckResourceAttr("quicknode_endpoint_method_rate_limit.test", "rate", "5"), resource.TestCheckResourceAttr("quicknode_endpoint_method_rate_limit.test", "enabled", "true"), + resource.TestCheckResourceAttr("quicknode_endpoint_method_rate_limit.test", "limit_by_ip", "true"), ), }, { - Config: withRate(9, false), + Config: withRate(9, false, false), Check: resource.ComposeAggregateTestCheckFunc( resource.TestCheckResourceAttr("quicknode_endpoint_method_rate_limit.test", "rate", "9"), resource.TestCheckResourceAttr("quicknode_endpoint_method_rate_limit.test", "enabled", "false"), + resource.TestCheckResourceAttr("quicknode_endpoint_method_rate_limit.test", "limit_by_ip", "false"), ), }, }, diff --git a/internal/provider/method_rate_limit_resource.go b/internal/provider/method_rate_limit_resource.go index 043b736..1071b1c 100644 --- a/internal/provider/method_rate_limit_resource.go +++ b/internal/provider/method_rate_limit_resource.go @@ -42,6 +42,7 @@ type methodRateLimitResourceModel struct { Rate types.Int64 `tfsdk:"rate"` Interval types.String `tfsdk:"interval"` Enabled types.Bool `tfsdk:"enabled"` + LimitByIP types.Bool `tfsdk:"limit_by_ip"` } func NewMethodRateLimitResource() resource.Resource { @@ -90,6 +91,12 @@ func (r *methodRateLimitResource) Schema(_ context.Context, _ resource.SchemaReq Default: booldefault.StaticBool(true), MarkdownDescription: "Whether the limiter is applied. Disabling keeps the definition in place, which suits turning a limit off during an incident without losing it.", }, + "limit_by_ip": schema.BoolAttribute{ + Optional: true, + Computed: true, + Default: booldefault.StaticBool(false), + MarkdownDescription: "Count the rate separately for each client IP instead of for the endpoint as a whole. Independent of `limit_by_ip` on `quicknode_endpoint_rate_limits`. Behind a proxy, set `ip_custom_header` on the endpoint so the client IP is read from the header the proxy forwards it in. Defaults to `false`.", + }, }, } } @@ -121,9 +128,10 @@ func (r *methodRateLimitResource) Create(ctx context.Context, req resource.Creat endpointID := plan.EndpointID.ValueString() created, err := r.client.AddMethodRateLimit(ctx, endpointID, client.MethodRateLimit{ - Methods: methods, - Rate: int(plan.Rate.ValueInt64()), - Interval: plan.Interval.ValueString(), + Methods: methods, + Rate: int(plan.Rate.ValueInt64()), + Interval: plan.Interval.ValueString(), + LimitByIP: plan.LimitByIP.ValueBool(), }) if err != nil { resp.Diagnostics.AddError("Could not create the method rate limit", err.Error()) @@ -140,9 +148,10 @@ func (r *methodRateLimitResource) Create(ctx context.Context, req resource.Creat // disabled needs a second call. if !plan.Enabled.ValueBool() { if err := r.client.UpdateMethodRateLimit(ctx, endpointID, created.ID, client.MethodRateLimit{ - Methods: methods, - Rate: int(plan.Rate.ValueInt64()), - Status: limiterDisabled, + Methods: methods, + Rate: int(plan.Rate.ValueInt64()), + Status: limiterDisabled, + LimitByIP: plan.LimitByIP.ValueBool(), }); err != nil { resp.Diagnostics.AddError("Created the method rate limit but could not disable it", err.Error()) } @@ -179,6 +188,7 @@ func (r *methodRateLimitResource) Read(ctx context.Context, req resource.ReadReq state.Rate = types.Int64Value(int64(limiter.Rate)) state.Interval = types.StringValue(limiter.Interval) state.Enabled = types.BoolValue(limiter.Status != limiterDisabled) + state.LimitByIP = types.BoolValue(limiter.LimitByIP) resp.Diagnostics.Append(resp.State.Set(ctx, &state)...) return } @@ -205,9 +215,10 @@ func (r *methodRateLimitResource) Update(ctx context.Context, req resource.Updat status = limiterDisabled } if err := r.client.UpdateMethodRateLimit(ctx, state.EndpointID.ValueString(), state.ID.ValueString(), client.MethodRateLimit{ - Methods: methods, - Rate: int(plan.Rate.ValueInt64()), - Status: status, + Methods: methods, + Rate: int(plan.Rate.ValueInt64()), + Status: status, + LimitByIP: plan.LimitByIP.ValueBool(), }); err != nil { resp.Diagnostics.AddError("Could not update the method rate limit", err.Error()) return @@ -261,6 +272,7 @@ func (r *methodRateLimitResource) ImportState(ctx context.Context, req resource. Rate: types.Int64Value(int64(limiter.Rate)), Interval: types.StringValue(limiter.Interval), Enabled: types.BoolValue(limiter.Status != limiterDisabled), + LimitByIP: types.BoolValue(limiter.LimitByIP), } resp.Diagnostics.Append(resp.State.Set(ctx, &state)...) return diff --git a/internal/provider/rate_limits_resource.go b/internal/provider/rate_limits_resource.go index 1282dcb..0c743bb 100644 --- a/internal/provider/rate_limits_resource.go +++ b/internal/provider/rate_limits_resource.go @@ -10,6 +10,7 @@ import ( "github.com/hashicorp/terraform-plugin-framework/path" "github.com/hashicorp/terraform-plugin-framework/resource" "github.com/hashicorp/terraform-plugin-framework/resource/schema" + "github.com/hashicorp/terraform-plugin-framework/resource/schema/boolplanmodifier" "github.com/hashicorp/terraform-plugin-framework/resource/schema/planmodifier" "github.com/hashicorp/terraform-plugin-framework/resource/schema/stringplanmodifier" "github.com/hashicorp/terraform-plugin-framework/schema/validator" @@ -38,6 +39,7 @@ type rateLimitsResourceModel struct { RPS types.Int64 `tfsdk:"rps"` RPM types.Int64 `tfsdk:"rpm"` RPD types.Int64 `tfsdk:"rpd"` + LimitByIP types.Bool `tfsdk:"limit_by_ip"` PlanDefault types.Object `tfsdk:"plan_default"` } @@ -75,6 +77,15 @@ func (r *rateLimitsResource) Schema(_ context.Context, _ resource.SchemaRequest, "rps": bucket("Maximum requests per second. Omit to keep the plan default."), "rpm": bucket("Maximum requests per minute. Omit to keep the plan default."), "rpd": bucket("Maximum requests per day. Omit to keep the plan default."), + "limit_by_ip": schema.BoolAttribute{ + Optional: true, + Computed: true, + MarkdownDescription: "Count the buckets separately for each client IP instead of for the endpoint as a whole. " + + "Left out of the configuration, it keeps whatever value the endpoint already has. " + + "Behind a proxy, set `ip_custom_header` on the endpoint so the client IP is read from the header the proxy forwards it in. " + + "Destroying this resource turns it off.", + PlanModifiers: []planmodifier.Bool{boolplanmodifier.UseStateForUnknown()}, + }, "plan_default": schema.SingleNestedAttribute{ Computed: true, MarkdownDescription: "What the account's Quicknode plan allows, before any override set here. A bucket the plan does not limit is reported as `-1`.", @@ -114,7 +125,7 @@ func (r *rateLimitsResource) Create(ctx context.Context, req resource.CreateRequ } plan.ID = plan.EndpointID - resp.Diagnostics.Append(r.readPlanDefaults(ctx, endpointID, &plan)...) + resp.Diagnostics.Append(r.readComputed(ctx, endpointID, &plan)...) if resp.Diagnostics.HasError() { return } @@ -138,11 +149,12 @@ func (r *rateLimitsResource) Read(ctx context.Context, req resource.ReadRequest, return } - overrides, defaults := splitRateLimits(limits) + overrides, defaults := splitRateLimits(limits.Limits) state.ID = state.EndpointID state.RPS = bucketOrNull(overrides, client.BucketRPS) state.RPM = bucketOrNull(overrides, client.BucketRPM) state.RPD = bucketOrNull(overrides, client.BucketRPD) + state.LimitByIP = types.BoolValue(limits.LimitByIP) planDefault, diags := planDefaultObject(defaults) resp.Diagnostics.Append(diags...) @@ -179,22 +191,24 @@ func (r *rateLimitsResource) Update(ctx context.Context, req resource.UpdateRequ } } - if overrides := overridesFrom(plan); overrides.RPS != nil || overrides.RPM != nil || overrides.RPD != nil { - if err := r.client.SetRateLimits(ctx, endpointID, overrides); err != nil { - resp.Diagnostics.AddError("Could not update the endpoint rate limits", err.Error()) - return - } + overrides := overridesFrom(plan) + if plan.LimitByIP.Equal(state.LimitByIP) { + overrides.LimitByIP = nil + } + if err := r.client.SetRateLimits(ctx, endpointID, overrides); err != nil { + resp.Diagnostics.AddError("Could not update the endpoint rate limits", err.Error()) + return } - resp.Diagnostics.Append(r.readPlanDefaults(ctx, endpointID, &plan)...) + resp.Diagnostics.Append(r.readComputed(ctx, endpointID, &plan)...) if resp.Diagnostics.HasError() { return } resp.Diagnostics.Append(resp.State.Set(ctx, &plan)...) } -// Delete returns every bucket to the plan default. The limits belong to the -// endpoint, so nothing is torn down. +// Delete returns every bucket to the plan default and stops counting them per +// client IP. The limits belong to the endpoint, so nothing is torn down. func (r *rateLimitsResource) Delete(ctx context.Context, req resource.DeleteRequest, resp *resource.DeleteResponse) { var state rateLimitsResourceModel resp.Diagnostics.Append(req.State.Get(ctx, &state)...) @@ -202,8 +216,18 @@ func (r *rateLimitsResource) Delete(ctx context.Context, req resource.DeleteRequ return } + endpointID := state.EndpointID.ValueString() all := map[string]bool{client.BucketRPS: true, client.BucketRPM: true, client.BucketRPD: true} - resp.Diagnostics.Append(r.dropOverrides(ctx, state.EndpointID.ValueString(), all)...) + resp.Diagnostics.Append(r.dropOverrides(ctx, endpointID, all)...) + if resp.Diagnostics.HasError() || !state.LimitByIP.ValueBool() { + return + } + + limitByIP := false + err := r.client.SetRateLimits(ctx, endpointID, client.RateLimitOverrides{LimitByIP: &limitByIP}) + if err != nil && !client.IsNotFound(err) { + resp.Diagnostics.AddError("Could not turn off per-IP rate limiting", err.Error()) + } } func (r *rateLimitsResource) ImportState(ctx context.Context, req resource.ImportStateRequest, resp *resource.ImportStateResponse) { @@ -223,7 +247,7 @@ func (r *rateLimitsResource) dropOverrides(ctx context.Context, endpointID strin return diags } - for _, limit := range limits { + for _, limit := range limits.Limits { if limit.Source != client.SourceUserOverride || limit.ID == "" || !buckets[limit.Bucket] { continue } @@ -235,15 +259,18 @@ func (r *rateLimitsResource) dropOverrides(ctx context.Context, endpointID strin return diags } -func (r *rateLimitsResource) readPlanDefaults(ctx context.Context, endpointID string, model *rateLimitsResourceModel) diag.Diagnostics { +func (r *rateLimitsResource) readComputed(ctx context.Context, endpointID string, model *rateLimitsResourceModel) diag.Diagnostics { limits, err := r.client.GetRateLimits(ctx, endpointID) if err != nil { var diags diag.Diagnostics diags.AddError("Could not read the endpoint rate limits back", err.Error()) return diags } - _, defaults := splitRateLimits(limits) + _, defaults := splitRateLimits(limits.Limits) + if model.LimitByIP.IsUnknown() { + model.LimitByIP = types.BoolValue(limits.LimitByIP) + } planDefault, diags := planDefaultObject(defaults) model.PlanDefault = planDefault return diags @@ -265,6 +292,10 @@ func overridesFrom(model rateLimitsResourceModel) client.RateLimitOverrides { wanted := int(bucket.value.ValueInt64()) *bucket.target = &wanted } + if !model.LimitByIP.IsNull() && !model.LimitByIP.IsUnknown() { + limitByIP := model.LimitByIP.ValueBool() + overrides.LimitByIP = &limitByIP + } return overrides }