Skip to content
Closed
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
11 changes: 11 additions & 0 deletions .auto-changelog
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"output": "CHANGELOG.md",
"template": "keepachangelog",
"unreleased": false,
"commitLimit": 0,
"backfillLimit": 3,
"hideCredit": true,
"replaceText": {
"\\[([^\\]]+)\\]\\(https://github.com/[^/]+/[^/]+/compare/[^)]+\\)": "[$1](https://github.com/fireblocks/ts-sdk/releases/tag/$1)"
}
}
56 changes: 0 additions & 56 deletions .github/release-drafter.yml

This file was deleted.

91 changes: 91 additions & 0 deletions .github/workflows/draft-release-from-pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
name: Draft Release from PR

on:
push:
branches:
- master_changelog_test

permissions:
contents: write
pull-requests: read

jobs:
draft-release:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Get last merged PR
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh pr list \
--state merged \
--base master_changelog_test \
--limit 1 \
--json number,title,body,labels \
> pr.json

PR_NUM=$(jq -r '.[0].number // "none"' pr.json)
PR_TITLE=$(jq -r '.[0].title // "none"' pr.json)
echo "Found merged PR: #$PR_NUM - $PR_TITLE"

- name: Get latest release version
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
LAST_TAG=$(gh release list --limit 1 --json tagName -q '.[0].tagName')

if [[ -z "$LAST_TAG" || "$LAST_TAG" == "null" ]]; then
echo "No existing release found, starting from v0.1.0"
echo "LAST_TAG=v0.1.0" >> $GITHUB_ENV
else
echo "Found latest release: $LAST_TAG"
echo "LAST_TAG=$LAST_TAG" >> $GITHUB_ENV
fi

- name: Calculate next version from labels
run: |
V="${LAST_TAG#v}"

MAJOR=$(echo $V | cut -d. -f1)
MINOR=$(echo $V | cut -d. -f2)
PATCH=$(echo $V | cut -d. -f3)

LABELS=$(jq -r '.[0].labels[].name' pr.json)
echo "Found labels: $LABELS"

if echo "$LABELS" | grep -q "major"; then
echo "Bumping MAJOR version"
MAJOR=$((MAJOR+1))
MINOR=0
PATCH=0
elif echo "$LABELS" | grep -q "minor"; then
echo "Bumping MINOR version"
MINOR=$((MINOR+1))
PATCH=0
else
echo "Bumping PATCH version"
PATCH=$((PATCH+1))
fi

echo "Calculated next version: v$MAJOR.$MINOR.$PATCH"
echo "VERSION=v$MAJOR.$MINOR.$PATCH" >> $GITHUB_ENV

- name: Create DRAFT release using PR BODY
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
PR_BODY=$(jq -r '.[0].body // ""' pr.json)

echo "Creating draft release..."
echo "Version: $VERSION"

gh release create "$VERSION" \
--draft \
--title "$VERSION" \
--notes "$PR_BODY"

echo "Draft release created successfully!"
37 changes: 37 additions & 0 deletions .github/workflows/pr-auto-label.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: PR Auto Label

on:
pull_request:
types: [opened, edited, reopened, synchronize]

permissions:
pull-requests: write
contents: read

jobs:
label:
runs-on: ubuntu-latest
steps:
- name: Label PR by title
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
TITLE: ${{ github.event.pull_request.title }}
PR: ${{ github.event.pull_request.number }}
REPO: ${{ github.repository }}
run: |
label=""

if [[ "$TITLE" =~ \(major\) ]]; then
label="major"
elif [[ "$TITLE" =~ \(minor\) ]]; then
label="minor"
elif [[ "$TITLE" =~ \(patch\) ]]; then
label="patch"
fi

if [[ -n "$label" ]]; then
echo "Found label: $label"
gh pr edit "$PR" --repo "$REPO" --add-label "$label"
else
echo "No label found in title: $TITLE"
fi
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ jobs:
- uses: deepakputhraya/action-pr-title@master
with:
disallowed_prefixes: 'COR-'
prefix_case_sensitive: false
prefix_case_sensitive: false
16 changes: 0 additions & 16 deletions .github/workflows/release-drafter.yml

This file was deleted.

1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -577,6 +577,7 @@ Class | Method | HTTP request | Description
*WebhooksApi* | [**resend_transaction_webhooks**](docs/WebhooksApi.md#resend_transaction_webhooks) | **POST** /webhooks/resend/{txId} | Resend webhooks for a transaction by ID
*WebhooksApi* | [**resend_webhooks**](docs/WebhooksApi.md#resend_webhooks) | **POST** /webhooks/resend | Resend failed webhooks
*WebhooksV2Api* | [**create_webhook**](docs/WebhooksV2Api.md#create_webhook) | **POST** /webhooks | Create a new webhook
*WebhooksV2Api* | [**delete_notification**](docs/WebhooksV2Api.md#delete_notification) | **DELETE** /webhooks/{webhookId}/notifications/{notificationId} | Delete notification by id
*WebhooksV2Api* | [**delete_webhook**](docs/WebhooksV2Api.md#delete_webhook) | **DELETE** /webhooks/{webhookId} | Delete webhook
*WebhooksV2Api* | [**get_metrics**](docs/WebhooksV2Api.md#get_metrics) | **GET** /webhooks/{webhookId}/metrics/{metricName} | Get webhook metrics
*WebhooksV2Api* | [**get_notification**](docs/WebhooksV2Api.md#get_notification) | **GET** /webhooks/{webhookId}/notifications/{notificationId} | Get notification by id
Expand Down
1 change: 1 addition & 0 deletions docs/UnmanagedWallet.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ Name | Type | Description | Notes
**name** | **str** | |
**customer_ref_id** | **str** | | [optional]
**assets** | [**List[WalletAsset]**](WalletAsset.md) | |
**test** | **bool** | |

## Example

Expand Down
2 changes: 1 addition & 1 deletion docs/WalletAsset.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Name | Type | Description | Notes
**locked_amount** | **str** | | [optional]
**status** | [**ConfigChangeRequestStatus**](ConfigChangeRequestStatus.md) | | [optional]
**address** | **str** | | [optional]
**tag** | **str** | | [optional]
**tag** | **bool** | | [optional]
**activation_time** | **str** | | [optional]

## Example
Expand Down
74 changes: 74 additions & 0 deletions docs/WebhooksV2Api.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ All URIs are relative to *https://api.fireblocks.io/v1*
Method | HTTP request | Description
------------- | ------------- | -------------
[**create_webhook**](WebhooksV2Api.md#create_webhook) | **POST** /webhooks | Create a new webhook
[**delete_notification**](WebhooksV2Api.md#delete_notification) | **DELETE** /webhooks/{webhookId}/notifications/{notificationId} | Delete notification by id
[**delete_webhook**](WebhooksV2Api.md#delete_webhook) | **DELETE** /webhooks/{webhookId} | Delete webhook
[**get_metrics**](WebhooksV2Api.md#get_metrics) | **GET** /webhooks/{webhookId}/metrics/{metricName} | Get webhook metrics
[**get_notification**](WebhooksV2Api.md#get_notification) | **GET** /webhooks/{webhookId}/notifications/{notificationId} | Get notification by id
Expand Down Expand Up @@ -99,6 +100,79 @@ No authorization required

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

# **delete_notification**
> delete_notification(webhook_id, notification_id)

Delete notification by id

Delete notification by id


### Example


```python
from fireblocks.client import Fireblocks
from fireblocks.client_configuration import ClientConfiguration
from fireblocks.exceptions import ApiException
from fireblocks.base_path import BasePath

# load the secret key content from a file
with open('your_secret_key_file_path', 'r') as file:
secret_key_value = file.read()

# build the configuration
configuration = ClientConfiguration(
api_key="your_api_key",
secret_key=secret_key_value,
base_path=BasePath.Sandbox, # or set it directly to a string "https://sandbox-api.fireblocks.io/v1"
)


# Enter a context with an instance of the API client
with Fireblocks(configuration) as fireblocks:
webhook_id = 'webhook_id_example' # str | The ID of the webhook to fetch
notification_id = 'notification_id_example' # str | The ID of the notification to fetch

try:
# Delete notification by id
fireblocks.webhooks_v2.delete_notification(webhook_id, notification_id).result()
except Exception as e:
print("Exception when calling WebhooksV2Api->delete_notification: %s\n" % e)
```



### Parameters


Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**webhook_id** | **str**| The ID of the webhook to fetch |
**notification_id** | **str**| The ID of the notification to fetch |

### Return type

void (empty response body)

### Authorization

No authorization required

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: application/json

### HTTP response details

| Status code | Description | Response headers |
|-------------|-------------|------------------|
**204** | OK | * X-Request-ID - <br> |
**0** | Error Response | * X-Request-ID - <br> |

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

# **delete_webhook**
> Webhook delete_webhook(webhook_id)

Expand Down
2 changes: 1 addition & 1 deletion fireblocks/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
""" # noqa: E501


__version__ = "14.0.0"
__version__ = "0.0.0"

# import apis into sdk package
from fireblocks.api.api_user_api import ApiUserApi
Expand Down
Loading
Loading