Files
Dmitry 90ba198c2a chore(app): сгенерированный Dart-клиент из OpenAPI
openapi-generator-cli -g dart-dio. Генерируется, но коммитится: CI ловит дрейф
openapi/openapi.json, а приложение собирается без запуска генератора.
Пересобирается через just gen-client после любого изменения роутов.
2026-09-18 13:44:09 +03:00

6.0 KiB

fintracker_api.api.RulesApi

Load the API package

import 'package:fintracker_api/api.dart';

All URIs are relative to http://localhost

Method HTTP request Description
rulesApply POST /api/v1/rules/apply Apply
rulesCreate POST /api/v1/rules Create
rulesDelete DELETE /api/v1/rules/{rule_id} Delete
rulesList GET /api/v1/rules List
rulesPatch PATCH /api/v1/rules/{rule_id} Patch
rulesStale GET /api/v1/rules/stale Stale

rulesApply

RefreshLogOut rulesApply()

Apply

Re-run the whole metric refresh so edited rules take effect everywhere at once.

Example

import 'package:fintracker_api/api.dart';

final api = FintrackerApi().getRulesApi();

try {
    final response = api.rulesApply();
    print(response);
} on DioException catch (e) {
    print('Exception when calling RulesApi->rulesApply: $e\n');
}

Parameters

This endpoint does not need any parameter.

Return type

RefreshLogOut

Authorization

HTTPBearer

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json, application/problem+json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

rulesCreate

RuleOut rulesCreate(ruleCreate)

Create

Example

import 'package:fintracker_api/api.dart';

final api = FintrackerApi().getRulesApi();
final RuleCreate ruleCreate = ; // RuleCreate | 

try {
    final response = api.rulesCreate(ruleCreate);
    print(response);
} on DioException catch (e) {
    print('Exception when calling RulesApi->rulesCreate: $e\n');
}

Parameters

Name Type Description Notes
ruleCreate RuleCreate

Return type

RuleOut

Authorization

HTTPBearer

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json, application/problem+json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

rulesDelete

rulesDelete(ruleId)

Delete

Example

import 'package:fintracker_api/api.dart';

final api = FintrackerApi().getRulesApi();
final int ruleId = 56; // int | 

try {
    api.rulesDelete(ruleId);
} on DioException catch (e) {
    print('Exception when calling RulesApi->rulesDelete: $e\n');
}

Parameters

Name Type Description Notes
ruleId int

Return type

void (empty response body)

Authorization

HTTPBearer

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/problem+json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

rulesList

List rulesList()

List

Example

import 'package:fintracker_api/api.dart';

final api = FintrackerApi().getRulesApi();

try {
    final response = api.rulesList();
    print(response);
} on DioException catch (e) {
    print('Exception when calling RulesApi->rulesList: $e\n');
}

Parameters

This endpoint does not need any parameter.

Return type

List<RuleOut>

Authorization

HTTPBearer

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json, application/problem+json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

rulesPatch

RuleOut rulesPatch(ruleId, rulePatch)

Patch

Example

import 'package:fintracker_api/api.dart';

final api = FintrackerApi().getRulesApi();
final int ruleId = 56; // int | 
final RulePatch rulePatch = ; // RulePatch | 

try {
    final response = api.rulesPatch(ruleId, rulePatch);
    print(response);
} on DioException catch (e) {
    print('Exception when calling RulesApi->rulesPatch: $e\n');
}

Parameters

Name Type Description Notes
ruleId int
rulePatch RulePatch

Return type

RuleOut

Authorization

HTTPBearer

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json, application/problem+json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

rulesStale

List rulesStale()

Stale

Enabled rules that matched nothing in the latest refresh: the payee was renamed, or the transaction was re-categorised in ZenMoney.

Example

import 'package:fintracker_api/api.dart';

final api = FintrackerApi().getRulesApi();

try {
    final response = api.rulesStale();
    print(response);
} on DioException catch (e) {
    print('Exception when calling RulesApi->rulesStale: $e\n');
}

Parameters

This endpoint does not need any parameter.

Return type

List<RuleOut>

Authorization

HTTPBearer

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json, application/problem+json

[Back to top] [Back to API list] [Back to Model list] [Back to README]