Skip to content

Commit 1fa658c

Browse files
authored
Merge pull request #36 from universal-tool-calling-protocol/dev
Add API spec and update to 1.0
2 parents 972cfbf + 453d7dd commit 1fa658c

File tree

107 files changed

+8176
-3062
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

107 files changed

+8176
-3062
lines changed

docs/api/core/utcp/data/auth.md

Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
---
2+
title: auth
3+
sidebar_label: auth
4+
---
5+
6+
# auth
7+
8+
**File:** `core/src/utcp/data/auth.py`
9+
10+
### class Auth {#auth}
11+
12+
<details>
13+
<summary>Documentation</summary>
14+
15+
Authentication details for a provider.
16+
17+
18+
**Attributes**
19+
20+
- **`auth_type`**: The authentication type identifier.
21+
</details>
22+
23+
#### Fields:
24+
25+
- auth_type: str
26+
27+
---
28+
29+
### class AuthSerializer ([Serializer](./../interfaces/serializer.md#serializer)[Auth]) {#authserializer}
30+
31+
<details>
32+
<summary>Documentation</summary>
33+
34+
[Serializer](./../interfaces/serializer.md#serializer) for authentication details.
35+
36+
Defines the contract for serializers that convert authentication details to and from
37+
38+
**Dictionaries For Storage Or Transmission. Serializers Are Responsible For**
39+
40+
- Converting authentication details to dictionaries for storage or transmission
41+
- Converting dictionaries back to authentication details
42+
- Ensuring data consistency during serialization and deserialization
43+
</details>
44+
45+
#### Fields:
46+
47+
- auth_serializers: dict[str, [Serializer](./../interfaces/serializer.md#serializer)[Auth]]
48+
49+
#### Methods:
50+
51+
<details>
52+
<summary>to_dict(self, obj: Auth) -> dict</summary>
53+
54+
Convert an Auth object to a dictionary.
55+
56+
57+
**Args**
58+
59+
- **`obj`**: The Auth object to convert.
60+
61+
62+
63+
**Returns**
64+
65+
The dictionary converted from the Auth object.
66+
</details>
67+
68+
<details>
69+
<summary>validate_dict(self, obj: dict) -> Auth</summary>
70+
71+
Validate a dictionary and convert it to an Auth object.
72+
73+
74+
**Args**
75+
76+
- **`obj`**: The dictionary to validate and convert.
77+
78+
79+
80+
**Returns**
81+
82+
The Auth object converted from the dictionary.
83+
</details>
84+
85+
---
Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
---
2+
title: api_key_auth
3+
sidebar_label: api_key_auth
4+
---
5+
6+
# api_key_auth
7+
8+
**File:** `core/src/utcp/data/auth_implementations/api_key_auth.py`
9+
10+
### class ApiKeyAuth ([Auth](./../auth.md#auth)) {#apikeyauth}
11+
12+
<details>
13+
<summary>Documentation</summary>
14+
15+
Authentication using an API key.
16+
17+
The key can be provided directly or sourced from an environment variable.
18+
Supports placement in headers, query parameters, or cookies.
19+
20+
21+
**Attributes**
22+
23+
- **`auth_type`**: The authentication type identifier, always "api_key".
24+
- **`api_key`**: The API key for authentication. Values starting with '$' or formatted as '$\{\}' are
25+
treated as an injected variable from environment or configuration.
26+
- **`var_name`**: The name of the header, query parameter, or cookie that
27+
contains the API key.
28+
- **`location`**: Where to include the API key (header, query parameter, or cookie).
29+
</details>
30+
31+
#### Fields:
32+
33+
- auth_type: Literal['api_key']
34+
- api_key: str
35+
- var_name: str
36+
- location: Literal['header', 'query', 'cookie']
37+
38+
---
39+
40+
### class ApiKeyAuthSerializer ([Serializer](./../../interfaces/serializer.md#serializer)[ApiKeyAuth]) {#apikeyauthserializer}
41+
42+
*No class documentation available*
43+
44+
#### Methods:
45+
46+
<details>
47+
<summary>to_dict(self, obj: ApiKeyAuth) -> dict</summary>
48+
49+
Convert an ApiKeyAuth object to a dictionary.
50+
51+
52+
**Args**
53+
54+
- **`obj`**: The ApiKeyAuth object to convert.
55+
56+
57+
58+
**Returns**
59+
60+
The dictionary converted from the ApiKeyAuth object.
61+
</details>
62+
63+
<details>
64+
<summary>validate_dict(self, obj: dict) -> ApiKeyAuth</summary>
65+
66+
Validate a dictionary and convert it to an ApiKeyAuth object.
67+
68+
69+
**Args**
70+
71+
- **`obj`**: The dictionary to validate and convert.
72+
73+
74+
75+
**Returns**
76+
77+
The ApiKeyAuth object converted from the dictionary.
78+
</details>
79+
80+
---
Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
---
2+
title: basic_auth
3+
sidebar_label: basic_auth
4+
---
5+
6+
# basic_auth
7+
8+
**File:** `core/src/utcp/data/auth_implementations/basic_auth.py`
9+
10+
### class BasicAuth ([Auth](./../auth.md#auth)) {#basicauth}
11+
12+
<details>
13+
<summary>Documentation</summary>
14+
15+
Authentication using HTTP Basic Authentication.
16+
17+
Uses the standard HTTP Basic Authentication scheme with username and password
18+
encoded in the Authorization header.
19+
20+
21+
**Attributes**
22+
23+
- **`auth_type`**: The authentication type identifier, always "basic".
24+
- **`username`**: The username for basic authentication. Recommended to use injected variables.
25+
- **`password`**: The password for basic authentication. Recommended to use injected variables.
26+
</details>
27+
28+
#### Fields:
29+
30+
- auth_type: Literal['basic']
31+
- username: str
32+
- password: str
33+
34+
---
35+
36+
### class BasicAuthSerializer ([Serializer](./../../interfaces/serializer.md#serializer)[BasicAuth]) {#basicauthserializer}
37+
38+
*No class documentation available*
39+
40+
#### Methods:
41+
42+
<details>
43+
<summary>to_dict(self, obj: BasicAuth) -> dict</summary>
44+
45+
Convert a BasicAuth object to a dictionary.
46+
47+
48+
**Args**
49+
50+
- **`obj`**: The BasicAuth object to convert.
51+
52+
53+
54+
**Returns**
55+
56+
The dictionary converted from the BasicAuth object.
57+
</details>
58+
59+
<details>
60+
<summary>validate_dict(self, obj: dict) -> BasicAuth</summary>
61+
62+
Validate a dictionary and convert it to a BasicAuth object.
63+
64+
65+
**Args**
66+
67+
- **`obj`**: The dictionary to validate and convert.
68+
69+
70+
71+
**Returns**
72+
73+
The BasicAuth object converted from the dictionary.
74+
</details>
75+
76+
---
Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
---
2+
title: oauth2_auth
3+
sidebar_label: oauth2_auth
4+
---
5+
6+
# oauth2_auth
7+
8+
**File:** `core/src/utcp/data/auth_implementations/oauth2_auth.py`
9+
10+
### class OAuth2Auth ([Auth](./../auth.md#auth)) {#oauth2auth}
11+
12+
<details>
13+
<summary>Documentation</summary>
14+
15+
Authentication using OAuth2 client credentials flow.
16+
17+
Implements the OAuth2 client credentials grant type for machine-to-machine
18+
authentication. The client automatically handles token acquisition and refresh.
19+
20+
21+
**Attributes**
22+
23+
- **`auth_type`**: The authentication type identifier, always "oauth2".
24+
- **`token_url`**: The URL endpoint to fetch the OAuth2 access token from. Recommended to use injected variables.
25+
- **`client_id`**: The OAuth2 client identifier. Recommended to use injected variables.
26+
- **`client_secret`**: The OAuth2 client secret. Recommended to use injected variables.
27+
- **`scope`**: Optional scope parameter to limit the access token's permissions.
28+
</details>
29+
30+
#### Fields:
31+
32+
- auth_type: Literal['oauth2']
33+
- token_url: str
34+
- client_id: str
35+
- client_secret: str
36+
- scope: Optional[str]
37+
38+
---
39+
40+
### class OAuth2AuthSerializer ([Serializer](./../../interfaces/serializer.md#serializer)[OAuth2Auth]) {#oauth2authserializer}
41+
42+
*No class documentation available*
43+
44+
#### Methods:
45+
46+
<details>
47+
<summary>to_dict(self, obj: OAuth2Auth) -> dict</summary>
48+
49+
Convert an OAuth2Auth object to a dictionary.
50+
51+
52+
**Args**
53+
54+
- **`obj`**: The OAuth2Auth object to convert.
55+
56+
57+
58+
**Returns**
59+
60+
The dictionary converted from the OAuth2Auth object.
61+
</details>
62+
63+
<details>
64+
<summary>validate_dict(self, obj: dict) -> OAuth2Auth</summary>
65+
66+
Validate a dictionary and convert it to an OAuth2Auth object.
67+
68+
69+
**Args**
70+
71+
- **`obj`**: The dictionary to validate and convert.
72+
73+
74+
75+
**Returns**
76+
77+
The OAuth2Auth object converted from the dictionary.
78+
</details>
79+
80+
---

0 commit comments

Comments
 (0)