about summary refs log tree commit diff stats
path: root/crates/rocie-client/README.md
blob: d020b94379c010b9d683150133ea689fc9d005c5 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
<!--
rocie - An enterprise grocery management system

Copyright (C) 2026 Benedikt Peetz <benedikt.peetz@b-peetz.de>
SPDX-License-Identifier: GPL-3.0-or-later

This file is part of Rocie.

You should have received a copy of the License along with this program.
If not, see <https://www.gnu.org/licenses/gpl-3.0.txt>.
-->

# Rust API client for rocie-client

An enterprise grocery management system - server

## Overview

This API client was generated by the
[OpenAPI Generator](https://openapi-generator.tech) project. By using the
[openapi-spec](https://openapis.org) from a remote server, you can easily
generate an API client.

- API version: 0.1.0
- Package version: 0.1.0
- Generator version: 7.17.0
- Build package: `org.openapitools.codegen.languages.RustClientCodegen`

## Installation

Put the package under your project folder in a directory named `rocie-client`
and add the following to `Cargo.toml` under `[dependencies]`:

```
rocie-client = { path = "./rocie-client" }
```

## Documentation for API Endpoints

All URIs are relative to _http://localhost_

| Class                        | Method                                                                                                            | HTTP request                                        | Description                                                            |
| ---------------------------- | ----------------------------------------------------------------------------------------------------------------- | --------------------------------------------------- | ---------------------------------------------------------------------- |
| _ApiGetAuthInventoryApi_     | [**amount_by_id**](docs/ApiGetAuthInventoryApi.md#amount_by_id)                                                   | **GET** /inventory/{id}                             | Get the amount of an product                                           |
| _ApiGetAuthProductApi_       | [**product_by_id**](docs/ApiGetAuthProductApi.md#product_by_id)                                                   | **GET** /product/by-id/{id}                         | Get Product by id                                                      |
| _ApiGetAuthProductApi_       | [**product_by_name**](docs/ApiGetAuthProductApi.md#product_by_name)                                               | **GET** /product/by-name/{name}                     | Get Product by name                                                    |
| _ApiGetAuthProductApi_       | [**product_suggestion_by_name**](docs/ApiGetAuthProductApi.md#product_suggestion_by_name)                         | **GET** /product/by-part-name/{name}                | Get Product suggestion by name                                         |
| _ApiGetAuthProductApi_       | [**products_by_product_parent_id_direct**](docs/ApiGetAuthProductApi.md#products_by_product_parent_id_direct)     | **GET** /product/by-product-parent-id-direct/{id}   | Get Products by it's product parent id                                 |
| _ApiGetAuthProductApi_       | [**products_by_product_parent_id_indirect**](docs/ApiGetAuthProductApi.md#products_by_product_parent_id_indirect) | **GET** /product/by-product-parent-id-indirect/{id} | Get Products by it's product parent id                                 |
| _ApiGetAuthProductApi_       | [**products_in_storage**](docs/ApiGetAuthProductApi.md#products_in_storage)                                       | **GET** /products_in_storage/                       | Return all products, which non-null amount in storage                  |
| _ApiGetAuthProductApi_       | [**products_registered**](docs/ApiGetAuthProductApi.md#products_registered)                                       | **GET** /products_registered/                       | Return all registered products                                         |
| _ApiGetAuthProductApi_       | [**products_without_product_parent**](docs/ApiGetAuthProductApi.md#products_without_product_parent)               | **GET** /product/without-product-parent             | Get Products by it's absents of a product parent                       |
| _ApiGetAuthProductParentApi_ | [**product_parents**](docs/ApiGetAuthProductParentApi.md#product_parents)                                         | **GET** /product_parents/                           | Return all registered product parents                                  |
| _ApiGetAuthProductParentApi_ | [**product_parents_toplevel**](docs/ApiGetAuthProductParentApi.md#product_parents_toplevel)                       | **GET** /product_parents_toplevel/                  | Return all registered product parents, that have no parents themselves |
| _ApiGetAuthProductParentApi_ | [**product_parents_under**](docs/ApiGetAuthProductParentApi.md#product_parents_under)                             | **GET** /product_parents_under/{id}                 | Return all parents, that have this parent as parent                    |
| _ApiGetAuthRecipeApi_        | [**recipe_by_id**](docs/ApiGetAuthRecipeApi.md#recipe_by_id)                                                      | **GET** /recipe/by-id/{id}                          | Get an recipe by it's id.                                              |
| _ApiGetAuthRecipeApi_        | [**recipe_by_name**](docs/ApiGetAuthRecipeApi.md#recipe_by_name)                                                  | **GET** /recipe/by-name/{name}                      | Get an recipe by it's name.                                            |
| _ApiGetAuthRecipeApi_        | [**recipes**](docs/ApiGetAuthRecipeApi.md#recipes)                                                                | **GET** /recipe/all                                 | Get all added recipes                                                  |
| _ApiGetAuthRecipeApi_        | [**recipes_by_recipe_parent_id_direct**](docs/ApiGetAuthRecipeApi.md#recipes_by_recipe_parent_id_direct)          | **GET** /recipe/by-recipe-parent-id-direct/{id}     | Get Recipes by it's recipe parent id                                   |
| _ApiGetAuthRecipeApi_        | [**recipes_by_recipe_parent_id_indirect**](docs/ApiGetAuthRecipeApi.md#recipes_by_recipe_parent_id_indirect)      | **GET** /recipe/by-recipe-parent-id-indirect/{id}   | Get Recipes by it's recipe parent id                                   |
| _ApiGetAuthRecipeApi_        | [**recipes_without_recipe_parent**](docs/ApiGetAuthRecipeApi.md#recipes_without_recipe_parent)                    | **GET** /recipe/without-recipe-parent               | Get Recipes by it's absents of a recipe parent                         |
| _ApiGetAuthRecipeParentApi_  | [**recipe_parents**](docs/ApiGetAuthRecipeParentApi.md#recipe_parents)                                            | **GET** /recipe_parents/                            | Return all registered recipe parents                                   |
| _ApiGetAuthRecipeParentApi_  | [**recipe_parents_toplevel**](docs/ApiGetAuthRecipeParentApi.md#recipe_parents_toplevel)                          | **GET** /recipe_parents_toplevel/                   | Return all registered recipe parents, that have no parents themselves  |
| _ApiGetAuthRecipeParentApi_  | [**recipe_parents_under**](docs/ApiGetAuthRecipeParentApi.md#recipe_parents_under)                                | **GET** /recipe_parents_under/{id}                  | Return all parents, that have this parent as parent                    |
| _ApiGetAuthUnitApi_          | [**unit_by_id**](docs/ApiGetAuthUnitApi.md#unit_by_id)                                                            | **GET** /unit/{id}                                  | Get Unit by id                                                         |
| _ApiGetAuthUnitApi_          | [**units**](docs/ApiGetAuthUnitApi.md#units)                                                                      | **GET** /units/                                     | Return all registered units                                            |
| _ApiGetAuthUnitApi_          | [**units_by_property_id**](docs/ApiGetAuthUnitApi.md#units_by_property_id)                                        | **GET** /units-by-property/{id}                     | Return all registered units for a specific unit property               |
| _ApiGetAuthUnitPropertyApi_  | [**unit_properties**](docs/ApiGetAuthUnitPropertyApi.md#unit_properties)                                          | **GET** /unit-properties/                           | Return all registered unit properties                                  |
| _ApiGetAuthUnitPropertyApi_  | [**unit_property_by_id**](docs/ApiGetAuthUnitPropertyApi.md#unit_property_by_id)                                  | **GET** /unit-property/{id}                         | Get Unit property by id                                                |
| _ApiGetAuthUserApi_          | [**user_by_id**](docs/ApiGetAuthUserApi.md#user_by_id)                                                            | **GET** /user/{id}                                  | Get an specific user by id.                                            |
| _ApiGetAuthUserApi_          | [**users**](docs/ApiGetAuthUserApi.md#users)                                                                      | **GET** /users                                      | Get all registered users.                                              |
| _ApiGetNoAuthStateApi_       | [**can_be_provisioned**](docs/ApiGetNoAuthStateApi.md#can_be_provisioned)                                         | **GET** /can-be-provisioned                         | Check if the server can be provisioned                                 |
| _ApiGetNoAuthStateApi_       | [**is_logged_in**](docs/ApiGetNoAuthStateApi.md#is_logged_in)                                                     | **GET** /is-logged-in                               | Check if you are logged in                                             |
| _ApiSetAuthBarcodeApi_       | [**buy_barcode**](docs/ApiSetAuthBarcodeApi.md#buy_barcode)                                                       | **POST** /barcode/{barcode_id}/buy/{times}          | Buy an barcode                                                         |
| _ApiSetAuthBarcodeApi_       | [**consume_barcode**](docs/ApiSetAuthBarcodeApi.md#consume_barcode)                                               | **POST** /barcode/{id}/consume                      | Consume an barcode                                                     |
| _ApiSetAuthProductApi_       | [**associate_barcode**](docs/ApiSetAuthProductApi.md#associate_barcode)                                           | **POST** /product/{id}/associate                    | Associate a barcode with a product                                     |
| _ApiSetAuthProductApi_       | [**register_product**](docs/ApiSetAuthProductApi.md#register_product)                                             | **POST** /product/new                               | Register a product                                                     |
| _ApiSetAuthProductParentApi_ | [**register_product_parent**](docs/ApiSetAuthProductParentApi.md#register_product_parent)                         | **POST** /product_parent/new                        | Register a product parent                                              |
| _ApiSetAuthRecipeApi_        | [**add_recipe**](docs/ApiSetAuthRecipeApi.md#add_recipe)                                                          | **POST** /recipe/new                                | Register a product parent                                              |
| _ApiSetAuthRecipeParentApi_  | [**register_recipe_parent**](docs/ApiSetAuthRecipeParentApi.md#register_recipe_parent)                            | **POST** /recipe_parent/new                         | Register a product parent                                              |
| _ApiSetAuthUnitApi_          | [**register_unit**](docs/ApiSetAuthUnitApi.md#register_unit)                                                      | **POST** /unit/new                                  | Register an Unit                                                       |
| _ApiSetAuthUnitPropertyApi_  | [**register_unit_property**](docs/ApiSetAuthUnitPropertyApi.md#register_unit_property)                            | **POST** /unit-property/new                         | Register an Unit Property                                              |
| _ApiSetAuthUserApi_          | [**register_user**](docs/ApiSetAuthUserApi.md#register_user)                                                      | **POST** /user/new                                  | Register an new User                                                   |
| _ApiSetNoAuthUserApi_        | [**login**](docs/ApiSetNoAuthUserApi.md#login)                                                                    | **POST** /login                                     | Log in as a specific user                                              |
| _ApiSetNoAuthUserApi_        | [**logout**](docs/ApiSetNoAuthUserApi.md#logout)                                                                  | **POST** /logout                                    | Log the current user out                                               |
| _ApiSetNoAuthUserApi_        | [**provision**](docs/ApiSetNoAuthUserApi.md#provision)                                                            | **POST** /provision                                 | Provision this instance.                                               |

## Documentation For Models

- [Barcode](docs/Barcode.md)
- [BarcodeId](docs/BarcodeId.md)
- [Content](docs/Content.md)
- [ContentOneOf](docs/ContentOneOf.md)
- [ContentOneOf1](docs/ContentOneOf1.md)
- [CooklangRecipe](docs/CooklangRecipe.md)
- [Cookware](docs/Cookware.md)
- [Ingredient](docs/Ingredient.md)
- [IngredientOneOf](docs/IngredientOneOf.md)
- [IngredientOneOf1](docs/IngredientOneOf1.md)
- [IngredientOneOf1NotRegisteredProduct](docs/IngredientOneOf1NotRegisteredProduct.md)
- [IngredientOneOf2](docs/IngredientOneOf2.md)
- [IngredientOneOf2RecipeReference](docs/IngredientOneOf2RecipeReference.md)
- [IngredientOneOfRegisteredProduct](docs/IngredientOneOfRegisteredProduct.md)
- [Item](docs/Item.md)
- [ItemOneOf](docs/ItemOneOf.md)
- [ItemOneOf1](docs/ItemOneOf1.md)
- [ItemOneOf1Ingredient](docs/ItemOneOf1Ingredient.md)
- [ItemOneOf2](docs/ItemOneOf2.md)
- [ItemOneOf3](docs/ItemOneOf3.md)
- [ItemOneOf4](docs/ItemOneOf4.md)
- [ItemOneOfText](docs/ItemOneOfText.md)
- [LoginInfo](docs/LoginInfo.md)
- [Metadata](docs/Metadata.md)
- [NameAndUrl](docs/NameAndUrl.md)
- [PasswordHash](docs/PasswordHash.md)
- [Product](docs/Product.md)
- [ProductAmount](docs/ProductAmount.md)
- [ProductId](docs/ProductId.md)
- [ProductParent](docs/ProductParent.md)
- [ProductParentId](docs/ProductParentId.md)
- [ProductParentStub](docs/ProductParentStub.md)
- [ProductStub](docs/ProductStub.md)
- [ProvisionInfo](docs/ProvisionInfo.md)
- [Recipe](docs/Recipe.md)
- [RecipeId](docs/RecipeId.md)
- [RecipeParent](docs/RecipeParent.md)
- [RecipeParentId](docs/RecipeParentId.md)
- [RecipeParentStub](docs/RecipeParentStub.md)
- [RecipeStub](docs/RecipeStub.md)
- [Section](docs/Section.md)
- [Step](docs/Step.md)
- [Timer](docs/Timer.md)
- [Unit](docs/Unit.md)
- [UnitAmount](docs/UnitAmount.md)
- [UnitId](docs/UnitId.md)
- [UnitProperty](docs/UnitProperty.md)
- [UnitPropertyId](docs/UnitPropertyId.md)
- [UnitPropertyStub](docs/UnitPropertyStub.md)
- [UnitStub](docs/UnitStub.md)
- [User](docs/User.md)
- [UserId](docs/UserId.md)
- [UserStub](docs/UserStub.md)

To get access to the crate's generated documentation, use:

```
cargo doc --open
```

## Author

benedikt.peetz@b-peetz.de