Skip to content

feat: update immutable zkEVM API package #384

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 26, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/Packages/ZkEvmApi/Documentation~/CollectionsApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -333,6 +333,8 @@ namespace Example
{
Configuration config = new Configuration();
config.BasePath = "https://api.sandbox.immutable.com";
// Configure Bearer token for authorization: BearerAuthWithClient
config.AccessToken = "YOUR_BEARER_TOKEN";
// Configure API key authorization: ImmutableApiKey
config.AddApiKey("x-immutable-api-key", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
Expand Down Expand Up @@ -396,7 +398,7 @@ catch (ApiException e)

### Authorization

[ImmutableApiKey](../README.md#ImmutableApiKey), [BearerAuth](../README.md#BearerAuth)
[BearerAuthWithClient](../README.md#BearerAuthWithClient), [ImmutableApiKey](../README.md#ImmutableApiKey), [BearerAuth](../README.md#BearerAuth)

### HTTP request headers

Expand Down
12 changes: 12 additions & 0 deletions src/Packages/ZkEvmApi/Runtime/Api/CollectionsApi.cs
Original file line number Diff line number Diff line change
Expand Up @@ -947,6 +947,12 @@ public Immutable.Api.ZkEvm.Client.ApiResponse<RefreshCollectionMetadataResult> R
localVarRequestOptions.PathParameters.Add("chain_name", Immutable.Api.ZkEvm.Client.ClientUtils.ParameterToString(chainName)); // path parameter
localVarRequestOptions.Data = refreshCollectionMetadataRequest;

// authentication (BearerAuthWithClient) required
// bearer authentication required
if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization"))
{
localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken);
}
// authentication (ImmutableApiKey) required
if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-immutable-api-key")))
{
Expand Down Expand Up @@ -1037,6 +1043,12 @@ public Immutable.Api.ZkEvm.Client.ApiResponse<RefreshCollectionMetadataResult> R
localVarRequestOptions.PathParameters.Add("chain_name", Immutable.Api.ZkEvm.Client.ClientUtils.ParameterToString(chainName)); // path parameter
localVarRequestOptions.Data = refreshCollectionMetadataRequest;

// authentication (BearerAuthWithClient) required
// bearer authentication required
if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization"))
{
localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken);
}
// authentication (ImmutableApiKey) required
if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-immutable-api-key")))
{
Expand Down
10 changes: 6 additions & 4 deletions src/Packages/ZkEvmApi/api~/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -541,6 +541,8 @@ paths:
security:
- ImmutableApiKey:
- refresh:metadata
- BearerAuthWithClient:
- refresh:metadata
- BearerAuth:
- refresh:metadata
summary: Refresh collection metadata
Expand Down Expand Up @@ -11746,6 +11748,10 @@ components:
- $ref: '#/components/schemas/MarketPriceNativeToken'
- $ref: '#/components/schemas/MarketPriceERC20Token'
securitySchemes:
BearerAuthWithClient:
bearerFormat: JWT
scheme: bearer
type: http
BearerAuth:
bearerFormat: JWT
scheme: bearer
Expand All @@ -11755,8 +11761,4 @@ components:
name: x-immutable-api-key
type: apiKey
x-go-name: ImmutableApiKey
BearerAuthWithClient:
bearerFormat: JWT
scheme: bearer
type: http

Loading