agenta 0.32.0a2__py3-none-any.whl → 0.33.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (64) hide show
  1. agenta/__init__.py +2 -0
  2. agenta/client/backend/__init__.py +35 -23
  3. agenta/client/backend/admin/__init__.py +1 -0
  4. agenta/client/backend/admin/client.py +576 -0
  5. agenta/client/backend/apps/client.py +384 -2
  6. agenta/client/backend/client.py +22 -40
  7. agenta/client/backend/core/http_client.py +3 -3
  8. agenta/client/backend/evaluations/client.py +0 -6
  9. agenta/client/backend/human_evaluations/client.py +2 -6
  10. agenta/client/backend/observability/__init__.py +4 -0
  11. agenta/client/backend/observability/client.py +221 -744
  12. agenta/client/backend/testsets/client.py +16 -180
  13. agenta/client/backend/types/__init__.py +32 -22
  14. agenta/client/backend/types/account_response.py +24 -0
  15. agenta/client/backend/types/app_variant_revision.py +2 -1
  16. agenta/client/backend/types/{create_trace_response.py → legacy_scope_request.py} +3 -4
  17. agenta/client/backend/types/legacy_scopes_response.py +29 -0
  18. agenta/client/backend/types/{span_variant.py → legacy_user_request.py} +4 -5
  19. agenta/client/backend/types/{llm_tokens.py → legacy_user_response.py} +2 -4
  20. agenta/client/backend/types/{with_pagination.py → organization_membership_request.py} +6 -7
  21. agenta/client/backend/types/organization_request.py +23 -0
  22. agenta/client/backend/types/permission.py +4 -0
  23. agenta/client/backend/types/project_membership_request.py +26 -0
  24. agenta/client/backend/types/project_request.py +26 -0
  25. agenta/client/backend/types/project_scope.py +29 -0
  26. agenta/client/backend/types/provider_kind.py +1 -1
  27. agenta/client/backend/types/reference.py +22 -0
  28. agenta/client/backend/types/role.py +15 -0
  29. agenta/client/backend/types/scopes_response_model.py +22 -0
  30. agenta/client/backend/types/score.py +1 -1
  31. agenta/client/backend/types/secret_response_dto.py +2 -2
  32. agenta/client/backend/types/user_request.py +22 -0
  33. agenta/client/backend/types/workspace_membership_request.py +26 -0
  34. agenta/client/backend/types/workspace_request.py +25 -0
  35. agenta/client/backend/variants/client.py +166 -12
  36. agenta/client/backend/vault/client.py +11 -9
  37. agenta/sdk/__init__.py +3 -0
  38. agenta/sdk/agenta_init.py +3 -1
  39. agenta/sdk/assets.py +4 -4
  40. agenta/sdk/decorators/routing.py +97 -13
  41. agenta/sdk/managers/apps.py +64 -0
  42. agenta/sdk/managers/shared.py +2 -2
  43. agenta/sdk/middleware/auth.py +156 -57
  44. agenta/sdk/middleware/config.py +18 -14
  45. agenta/sdk/middleware/inline.py +1 -1
  46. agenta/sdk/middleware/mock.py +1 -1
  47. agenta/sdk/middleware/otel.py +1 -1
  48. agenta/sdk/middleware/vault.py +1 -1
  49. {agenta-0.32.0a2.dist-info → agenta-0.33.0.dist-info}/METADATA +19 -14
  50. {agenta-0.32.0a2.dist-info → agenta-0.33.0.dist-info}/RECORD +56 -49
  51. agenta/client/backend/observability_v_1/__init__.py +0 -5
  52. agenta/client/backend/observability_v_1/client.py +0 -763
  53. agenta/client/backend/types/create_span.py +0 -45
  54. agenta/client/backend/types/outputs.py +0 -5
  55. agenta/client/backend/types/span.py +0 -42
  56. agenta/client/backend/types/span_detail.py +0 -44
  57. agenta/client/backend/types/span_status_code.py +0 -5
  58. agenta/client/backend/types/trace_detail.py +0 -44
  59. /agenta/client/backend/{observability_v_1 → observability}/types/__init__.py +0 -0
  60. /agenta/client/backend/{observability_v_1 → observability}/types/format.py +0 -0
  61. /agenta/client/backend/{observability_v_1 → observability}/types/query_analytics_response.py +0 -0
  62. /agenta/client/backend/{observability_v_1 → observability}/types/query_traces_response.py +0 -0
  63. {agenta-0.32.0a2.dist-info → agenta-0.33.0.dist-info}/WHEEL +0 -0
  64. {agenta-0.32.0a2.dist-info → agenta-0.33.0.dist-info}/entry_points.txt +0 -0
@@ -108,6 +108,7 @@ class TestsetsClient:
108
108
  def import_testset(
109
109
  self,
110
110
  *,
111
+ authorization: typing.Optional[str] = None,
111
112
  endpoint: typing.Optional[str] = OMIT,
112
113
  testset_name: typing.Optional[str] = OMIT,
113
114
  request_options: typing.Optional[RequestOptions] = None,
@@ -124,6 +125,8 @@ class TestsetsClient:
124
125
 
125
126
  Parameters
126
127
  ----------
128
+ authorization : typing.Optional[str]
129
+
127
130
  endpoint : typing.Optional[str]
128
131
 
129
132
  testset_name : typing.Optional[str]
@@ -149,6 +152,9 @@ class TestsetsClient:
149
152
  _response = self._client_wrapper.httpx_client.request(
150
153
  "testsets/endpoint",
151
154
  method="POST",
155
+ params={
156
+ "authorization": authorization,
157
+ },
152
158
  json={
153
159
  "endpoint": endpoint,
154
160
  "testset_name": testset_name,
@@ -187,11 +193,9 @@ class TestsetsClient:
187
193
  Get all testsets.
188
194
 
189
195
  Returns:
190
-
191
196
  - A list of testset objects.
192
197
 
193
198
  Raises:
194
-
195
199
  - `HTTPException` with status code 404 if no testsets are found.
196
200
 
197
201
  Parameters
@@ -386,88 +390,6 @@ class TestsetsClient:
386
390
  raise ApiError(status_code=_response.status_code, body=_response.text)
387
391
  raise ApiError(status_code=_response.status_code, body=_response_json)
388
392
 
389
- def deprecating_create_testset(
390
- self,
391
- app_id: str,
392
- *,
393
- name: str,
394
- csvdata: typing.Sequence[typing.Dict[str, typing.Optional[typing.Any]]],
395
- request_options: typing.Optional[RequestOptions] = None,
396
- ) -> TestSetSimpleResponse:
397
- """
398
- Create a testset with given name, save the testset to Postgres.
399
-
400
- Args:
401
- name (str): name of the test set.
402
- testset (Dict[str, str]): test set data.
403
-
404
- Returns:
405
- str: The id of the test set created.
406
-
407
- Parameters
408
- ----------
409
- app_id : str
410
-
411
- name : str
412
-
413
- csvdata : typing.Sequence[typing.Dict[str, typing.Optional[typing.Any]]]
414
-
415
- request_options : typing.Optional[RequestOptions]
416
- Request-specific configuration.
417
-
418
- Returns
419
- -------
420
- TestSetSimpleResponse
421
- Successful Response
422
-
423
- Examples
424
- --------
425
- from agenta import AgentaApi
426
-
427
- client = AgentaApi(
428
- api_key="YOUR_API_KEY",
429
- base_url="https://yourhost.com/path/to/api",
430
- )
431
- client.testsets.deprecating_create_testset(
432
- app_id="app_id",
433
- name="name",
434
- csvdata=[{"key": "value"}],
435
- )
436
- """
437
- _response = self._client_wrapper.httpx_client.request(
438
- f"testsets/{jsonable_encoder(app_id)}",
439
- method="POST",
440
- json={
441
- "name": name,
442
- "csvdata": csvdata,
443
- },
444
- request_options=request_options,
445
- omit=OMIT,
446
- )
447
- try:
448
- if 200 <= _response.status_code < 300:
449
- return typing.cast(
450
- TestSetSimpleResponse,
451
- parse_obj_as(
452
- type_=TestSetSimpleResponse, # type: ignore
453
- object_=_response.json(),
454
- ),
455
- )
456
- if _response.status_code == 422:
457
- raise UnprocessableEntityError(
458
- typing.cast(
459
- HttpValidationError,
460
- parse_obj_as(
461
- type_=HttpValidationError, # type: ignore
462
- object_=_response.json(),
463
- ),
464
- )
465
- )
466
- _response_json = _response.json()
467
- except JSONDecodeError:
468
- raise ApiError(status_code=_response.status_code, body=_response.text)
469
- raise ApiError(status_code=_response.status_code, body=_response_json)
470
-
471
393
  def get_single_testset(
472
394
  self,
473
395
  testset_id: str,
@@ -475,10 +397,10 @@ class TestsetsClient:
475
397
  request_options: typing.Optional[RequestOptions] = None,
476
398
  ) -> typing.Optional[typing.Any]:
477
399
  """
478
- Fetch a specific testset in a MongoDB collection using its _id.
400
+ Fetch a specific testset in Postgres.
479
401
 
480
402
  Args:
481
- testset_id (str): The _id of the testset to fetch.
403
+ testset_id (str): The id of the testset to fetch.
482
404
 
483
405
  Returns:
484
406
  The requested testset if found, else an HTTPException.
@@ -717,6 +639,7 @@ class AsyncTestsetsClient:
717
639
  async def import_testset(
718
640
  self,
719
641
  *,
642
+ authorization: typing.Optional[str] = None,
720
643
  endpoint: typing.Optional[str] = OMIT,
721
644
  testset_name: typing.Optional[str] = OMIT,
722
645
  request_options: typing.Optional[RequestOptions] = None,
@@ -733,6 +656,8 @@ class AsyncTestsetsClient:
733
656
 
734
657
  Parameters
735
658
  ----------
659
+ authorization : typing.Optional[str]
660
+
736
661
  endpoint : typing.Optional[str]
737
662
 
738
663
  testset_name : typing.Optional[str]
@@ -766,6 +691,9 @@ class AsyncTestsetsClient:
766
691
  _response = await self._client_wrapper.httpx_client.request(
767
692
  "testsets/endpoint",
768
693
  method="POST",
694
+ params={
695
+ "authorization": authorization,
696
+ },
769
697
  json={
770
698
  "endpoint": endpoint,
771
699
  "testset_name": testset_name,
@@ -804,11 +732,9 @@ class AsyncTestsetsClient:
804
732
  Get all testsets.
805
733
 
806
734
  Returns:
807
-
808
735
  - A list of testset objects.
809
736
 
810
737
  Raises:
811
-
812
738
  - `HTTPException` with status code 404 if no testsets are found.
813
739
 
814
740
  Parameters
@@ -1027,96 +953,6 @@ class AsyncTestsetsClient:
1027
953
  raise ApiError(status_code=_response.status_code, body=_response.text)
1028
954
  raise ApiError(status_code=_response.status_code, body=_response_json)
1029
955
 
1030
- async def deprecating_create_testset(
1031
- self,
1032
- app_id: str,
1033
- *,
1034
- name: str,
1035
- csvdata: typing.Sequence[typing.Dict[str, typing.Optional[typing.Any]]],
1036
- request_options: typing.Optional[RequestOptions] = None,
1037
- ) -> TestSetSimpleResponse:
1038
- """
1039
- Create a testset with given name, save the testset to Postgres.
1040
-
1041
- Args:
1042
- name (str): name of the test set.
1043
- testset (Dict[str, str]): test set data.
1044
-
1045
- Returns:
1046
- str: The id of the test set created.
1047
-
1048
- Parameters
1049
- ----------
1050
- app_id : str
1051
-
1052
- name : str
1053
-
1054
- csvdata : typing.Sequence[typing.Dict[str, typing.Optional[typing.Any]]]
1055
-
1056
- request_options : typing.Optional[RequestOptions]
1057
- Request-specific configuration.
1058
-
1059
- Returns
1060
- -------
1061
- TestSetSimpleResponse
1062
- Successful Response
1063
-
1064
- Examples
1065
- --------
1066
- import asyncio
1067
-
1068
- from agenta import AsyncAgentaApi
1069
-
1070
- client = AsyncAgentaApi(
1071
- api_key="YOUR_API_KEY",
1072
- base_url="https://yourhost.com/path/to/api",
1073
- )
1074
-
1075
-
1076
- async def main() -> None:
1077
- await client.testsets.deprecating_create_testset(
1078
- app_id="app_id",
1079
- name="name",
1080
- csvdata=[{"key": "value"}],
1081
- )
1082
-
1083
-
1084
- asyncio.run(main())
1085
- """
1086
- _response = await self._client_wrapper.httpx_client.request(
1087
- f"testsets/{jsonable_encoder(app_id)}",
1088
- method="POST",
1089
- json={
1090
- "name": name,
1091
- "csvdata": csvdata,
1092
- },
1093
- request_options=request_options,
1094
- omit=OMIT,
1095
- )
1096
- try:
1097
- if 200 <= _response.status_code < 300:
1098
- return typing.cast(
1099
- TestSetSimpleResponse,
1100
- parse_obj_as(
1101
- type_=TestSetSimpleResponse, # type: ignore
1102
- object_=_response.json(),
1103
- ),
1104
- )
1105
- if _response.status_code == 422:
1106
- raise UnprocessableEntityError(
1107
- typing.cast(
1108
- HttpValidationError,
1109
- parse_obj_as(
1110
- type_=HttpValidationError, # type: ignore
1111
- object_=_response.json(),
1112
- ),
1113
- )
1114
- )
1115
- _response_json = _response.json()
1116
- except JSONDecodeError:
1117
- raise ApiError(status_code=_response.status_code, body=_response.text)
1118
- raise ApiError(status_code=_response.status_code, body=_response_json)
1119
-
1120
956
  async def get_single_testset(
1121
957
  self,
1122
958
  testset_id: str,
@@ -1124,10 +960,10 @@ class AsyncTestsetsClient:
1124
960
  request_options: typing.Optional[RequestOptions] = None,
1125
961
  ) -> typing.Optional[typing.Any]:
1126
962
  """
1127
- Fetch a specific testset in a MongoDB collection using its _id.
963
+ Fetch a specific testset in Postgres.
1128
964
 
1129
965
  Args:
1130
- testset_id (str): The _id of the testset to fetch.
966
+ testset_id (str): The id of the testset to fetch.
1131
967
 
1132
968
  Returns:
1133
969
  The requested testset if found, else an HTTPException.
@@ -1,5 +1,6 @@
1
1
  # This file was auto-generated by Fern from our API Definition.
2
2
 
3
+ from .account_response import AccountResponse
3
4
  from .agenta_node_dto import AgentaNodeDto
4
5
  from .agenta_node_dto_nodes_value import AgentaNodeDtoNodesValue
5
6
  from .agenta_nodes_response import AgentaNodesResponse
@@ -22,8 +23,6 @@ from .config_dto import ConfigDto
22
23
  from .config_response_model import ConfigResponseModel
23
24
  from .correct_answer import CorrectAnswer
24
25
  from .create_app_output import CreateAppOutput
25
- from .create_span import CreateSpan
26
- from .create_trace_response import CreateTraceResponse
27
26
  from .delete_evaluation import DeleteEvaluation
28
27
  from .docker_env_vars import DockerEnvVars
29
28
  from .environment_output import EnvironmentOutput
@@ -53,16 +52,18 @@ from .image import Image
53
52
  from .invite_request import InviteRequest
54
53
  from .legacy_analytics_response import LegacyAnalyticsResponse
55
54
  from .legacy_data_point import LegacyDataPoint
55
+ from .legacy_scope_request import LegacyScopeRequest
56
+ from .legacy_scopes_response import LegacyScopesResponse
57
+ from .legacy_user_request import LegacyUserRequest
58
+ from .legacy_user_response import LegacyUserResponse
56
59
  from .lifecycle_dto import LifecycleDto
57
60
  from .link_dto import LinkDto
58
61
  from .list_api_keys_response import ListApiKeysResponse
59
62
  from .llm_run_rate_limit import LlmRunRateLimit
60
- from .llm_tokens import LlmTokens
61
63
  from .metrics_dto import MetricsDto
62
64
  from .new_testset import NewTestset
63
65
  from .node_dto import NodeDto
64
66
  from .node_type import NodeType
65
-
66
67
  from .o_tel_context_dto import OTelContextDto
67
68
  from .o_tel_event_dto import OTelEventDto
68
69
  from .o_tel_extra_dto import OTelExtraDto
@@ -72,28 +73,31 @@ from .o_tel_span_kind import OTelSpanKind
72
73
  from .o_tel_spans_response import OTelSpansResponse
73
74
  from .o_tel_status_code import OTelStatusCode
74
75
  from .organization import Organization
76
+ from .organization_membership_request import OrganizationMembershipRequest
75
77
  from .organization_output import OrganizationOutput
76
- from .outputs import Outputs
78
+ from .organization_request import OrganizationRequest
77
79
  from .parent_dto import ParentDto
78
80
  from .permission import Permission
81
+ from .project_membership_request import ProjectMembershipRequest
82
+ from .project_request import ProjectRequest
83
+ from .project_scope import ProjectScope
79
84
  from .projects_response import ProjectsResponse
80
85
  from .provider_key_dto import ProviderKeyDto
81
86
  from .provider_kind import ProviderKind
87
+ from .reference import Reference
82
88
  from .reference_dto import ReferenceDto
83
89
  from .reference_request_model import ReferenceRequestModel
84
90
  from .result import Result
91
+ from .role import Role
85
92
  from .root_dto import RootDto
93
+ from .scopes_response_model import ScopesResponseModel
86
94
  from .score import Score
87
95
  from .secret_dto import SecretDto
88
96
  from .secret_kind import SecretKind
89
97
  from .secret_response_dto import SecretResponseDto
90
98
  from .simple_evaluation_output import SimpleEvaluationOutput
91
- from .span import Span
92
- from .span_detail import SpanDetail
93
99
  from .span_dto import SpanDto
94
100
  from .span_dto_nodes_value import SpanDtoNodesValue
95
- from .span_status_code import SpanStatusCode
96
- from .span_variant import SpanVariant
97
101
  from .status_code import StatusCode
98
102
  from .status_dto import StatusDto
99
103
  from .template import Template
@@ -101,23 +105,25 @@ from .template_image_info import TemplateImageInfo
101
105
  from .test_set_output_response import TestSetOutputResponse
102
106
  from .test_set_simple_response import TestSetSimpleResponse
103
107
  from .time_dto import TimeDto
104
- from .trace_detail import TraceDetail
105
108
  from .tree_dto import TreeDto
106
109
  from .tree_type import TreeType
107
110
  from .update_app_output import UpdateAppOutput
108
111
  from .uri import Uri
112
+ from .user_request import UserRequest
109
113
  from .validation_error import ValidationError
110
114
  from .validation_error_loc_item import ValidationErrorLocItem
111
115
  from .variant_action import VariantAction
112
116
  from .variant_action_enum import VariantActionEnum
113
- from .with_pagination import WithPagination
114
117
  from .workspace_member_response import WorkspaceMemberResponse
118
+ from .workspace_membership_request import WorkspaceMembershipRequest
115
119
  from .workspace_permission import WorkspacePermission
120
+ from .workspace_request import WorkspaceRequest
116
121
  from .workspace_response import WorkspaceResponse
117
122
  from .workspace_role import WorkspaceRole
118
123
  from .workspace_role_response import WorkspaceRoleResponse
119
124
 
120
125
  __all__ = [
126
+ "AccountResponse",
121
127
  "AgentaNodeDto",
122
128
  "AgentaNodeDtoNodesValue",
123
129
  "AgentaNodesResponse",
@@ -140,8 +146,6 @@ __all__ = [
140
146
  "ConfigResponseModel",
141
147
  "CorrectAnswer",
142
148
  "CreateAppOutput",
143
- "CreateSpan",
144
- "CreateTraceResponse",
145
149
  "DeleteEvaluation",
146
150
  "DockerEnvVars",
147
151
  "EnvironmentOutput",
@@ -171,13 +175,15 @@ __all__ = [
171
175
  "InviteRequest",
172
176
  "LegacyAnalyticsResponse",
173
177
  "LegacyDataPoint",
178
+ "LegacyScopeRequest",
179
+ "LegacyScopesResponse",
180
+ "LegacyUserRequest",
181
+ "LegacyUserResponse",
174
182
  "LifecycleDto",
175
183
  "LinkDto",
176
184
  "ListApiKeysResponse",
177
185
  "LlmRunRateLimit",
178
- "LlmTokens",
179
186
  "MetricsDto",
180
- "NewHumanEvaluation",
181
187
  "NewTestset",
182
188
  "NodeDto",
183
189
  "NodeType",
@@ -190,28 +196,31 @@ __all__ = [
190
196
  "OTelSpansResponse",
191
197
  "OTelStatusCode",
192
198
  "Organization",
199
+ "OrganizationMembershipRequest",
193
200
  "OrganizationOutput",
194
- "Outputs",
201
+ "OrganizationRequest",
195
202
  "ParentDto",
196
203
  "Permission",
204
+ "ProjectMembershipRequest",
205
+ "ProjectRequest",
206
+ "ProjectScope",
197
207
  "ProjectsResponse",
198
208
  "ProviderKeyDto",
199
209
  "ProviderKind",
210
+ "Reference",
200
211
  "ReferenceDto",
201
212
  "ReferenceRequestModel",
202
213
  "Result",
214
+ "Role",
203
215
  "RootDto",
216
+ "ScopesResponseModel",
204
217
  "Score",
205
218
  "SecretDto",
206
219
  "SecretKind",
207
220
  "SecretResponseDto",
208
221
  "SimpleEvaluationOutput",
209
- "Span",
210
- "SpanDetail",
211
222
  "SpanDto",
212
223
  "SpanDtoNodesValue",
213
- "SpanStatusCode",
214
- "SpanVariant",
215
224
  "StatusCode",
216
225
  "StatusDto",
217
226
  "Template",
@@ -219,18 +228,19 @@ __all__ = [
219
228
  "TestSetOutputResponse",
220
229
  "TestSetSimpleResponse",
221
230
  "TimeDto",
222
- "TraceDetail",
223
231
  "TreeDto",
224
232
  "TreeType",
225
233
  "UpdateAppOutput",
226
234
  "Uri",
235
+ "UserRequest",
227
236
  "ValidationError",
228
237
  "ValidationErrorLocItem",
229
238
  "VariantAction",
230
239
  "VariantActionEnum",
231
- "WithPagination",
232
240
  "WorkspaceMemberResponse",
241
+ "WorkspaceMembershipRequest",
233
242
  "WorkspacePermission",
243
+ "WorkspaceRequest",
234
244
  "WorkspaceResponse",
235
245
  "WorkspaceRole",
236
246
  "WorkspaceRoleResponse",
@@ -0,0 +1,24 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ from ..core.pydantic_utilities import UniversalBaseModel
4
+ import typing
5
+ from .legacy_user_response import LegacyUserResponse
6
+ from .legacy_scopes_response import LegacyScopesResponse
7
+ from ..core.pydantic_utilities import IS_PYDANTIC_V2
8
+ import pydantic
9
+
10
+
11
+ class AccountResponse(UniversalBaseModel):
12
+ user: typing.Optional[LegacyUserResponse] = None
13
+ scopes: typing.Optional[typing.List[LegacyScopesResponse]] = None
14
+
15
+ if IS_PYDANTIC_V2:
16
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(
17
+ extra="allow", frozen=True
18
+ ) # type: ignore # Pydantic v2
19
+ else:
20
+
21
+ class Config:
22
+ frozen = True
23
+ smart_union = True
24
+ extra = pydantic.Extra.allow
@@ -1,13 +1,14 @@
1
1
  # This file was auto-generated by Fern from our API Definition.
2
2
 
3
3
  from ..core.pydantic_utilities import UniversalBaseModel
4
+ import typing
4
5
  from .config_db import ConfigDb
5
6
  from ..core.pydantic_utilities import IS_PYDANTIC_V2
6
- import typing
7
7
  import pydantic
8
8
 
9
9
 
10
10
  class AppVariantRevision(UniversalBaseModel):
11
+ id: typing.Optional[str] = None
11
12
  revision: int
12
13
  modified_by: str
13
14
  config: ConfigDb
@@ -1,14 +1,13 @@
1
1
  # This file was auto-generated by Fern from our API Definition.
2
2
 
3
3
  from ..core.pydantic_utilities import UniversalBaseModel
4
- import typing
5
4
  from ..core.pydantic_utilities import IS_PYDANTIC_V2
5
+ import typing
6
6
  import pydantic
7
7
 
8
8
 
9
- class CreateTraceResponse(UniversalBaseModel):
10
- message: str
11
- data: typing.Dict[str, typing.Optional[typing.Any]]
9
+ class LegacyScopeRequest(UniversalBaseModel):
10
+ name: str
12
11
 
13
12
  if IS_PYDANTIC_V2:
14
13
  model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(
@@ -0,0 +1,29 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ from ..core.pydantic_utilities import UniversalBaseModel
4
+ import typing
5
+ from ..core.pydantic_utilities import IS_PYDANTIC_V2
6
+ import pydantic
7
+
8
+
9
+ class LegacyScopesResponse(UniversalBaseModel):
10
+ organization_id: typing.Optional[str] = None
11
+ organization_name: typing.Optional[str] = None
12
+ workspace_id: typing.Optional[str] = None
13
+ workspace_name: typing.Optional[str] = None
14
+ project_id: typing.Optional[str] = None
15
+ project_name: typing.Optional[str] = None
16
+ is_demo: typing.Optional[bool] = None
17
+ user_role: typing.Optional[str] = None
18
+ credentials: typing.Optional[str] = None
19
+
20
+ if IS_PYDANTIC_V2:
21
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(
22
+ extra="allow", frozen=True
23
+ ) # type: ignore # Pydantic v2
24
+ else:
25
+
26
+ class Config:
27
+ frozen = True
28
+ smart_union = True
29
+ extra = pydantic.Extra.allow
@@ -1,15 +1,14 @@
1
1
  # This file was auto-generated by Fern from our API Definition.
2
2
 
3
3
  from ..core.pydantic_utilities import UniversalBaseModel
4
- import typing
5
4
  from ..core.pydantic_utilities import IS_PYDANTIC_V2
5
+ import typing
6
6
  import pydantic
7
7
 
8
8
 
9
- class SpanVariant(UniversalBaseModel):
10
- variant_id: typing.Optional[str] = None
11
- variant_name: typing.Optional[str] = None
12
- revision: typing.Optional[int] = None
9
+ class LegacyUserRequest(UniversalBaseModel):
10
+ name: str
11
+ email: str
13
12
 
14
13
  if IS_PYDANTIC_V2:
15
14
  model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(
@@ -6,10 +6,8 @@ from ..core.pydantic_utilities import IS_PYDANTIC_V2
6
6
  import pydantic
7
7
 
8
8
 
9
- class LlmTokens(UniversalBaseModel):
10
- prompt_tokens: typing.Optional[int] = None
11
- completion_tokens: typing.Optional[int] = None
12
- total_tokens: typing.Optional[int] = None
9
+ class LegacyUserResponse(UniversalBaseModel):
10
+ id: typing.Optional[str] = None
13
11
 
14
12
  if IS_PYDANTIC_V2:
15
13
  model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(
@@ -2,17 +2,16 @@
2
2
 
3
3
  from ..core.pydantic_utilities import UniversalBaseModel
4
4
  import typing
5
- import typing_extensions
6
- from ..core.serialization import FieldMetadata
5
+ from .reference import Reference
7
6
  from ..core.pydantic_utilities import IS_PYDANTIC_V2
8
7
  import pydantic
9
8
 
10
9
 
11
- class WithPagination(UniversalBaseModel):
12
- data: typing.List[typing.Optional[typing.Any]]
13
- total: int
14
- page: int
15
- page_size: typing_extensions.Annotated[int, FieldMetadata(alias="pageSize")]
10
+ class OrganizationMembershipRequest(UniversalBaseModel):
11
+ role: typing.Literal["owner"] = "owner"
12
+ is_demo: bool
13
+ user_ref: Reference
14
+ organization_ref: Reference
16
15
 
17
16
  if IS_PYDANTIC_V2:
18
17
  model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(
@@ -0,0 +1,23 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ from ..core.pydantic_utilities import UniversalBaseModel
4
+ from ..core.pydantic_utilities import IS_PYDANTIC_V2
5
+ import typing
6
+ import pydantic
7
+
8
+
9
+ class OrganizationRequest(UniversalBaseModel):
10
+ name: str
11
+ description: str
12
+ is_paying: bool
13
+
14
+ if IS_PYDANTIC_V2:
15
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(
16
+ extra="allow", frozen=True
17
+ ) # type: ignore # Pydantic v2
18
+ else:
19
+
20
+ class Config:
21
+ frozen = True
22
+ smart_union = True
23
+ extra = pydantic.Extra.allow
@@ -14,6 +14,10 @@ Permission = typing.Union[
14
14
  "modify_variant_configurations",
15
15
  "delete_application_variant",
16
16
  "run_service",
17
+ "create_secret",
18
+ "view_secret",
19
+ "update_secret",
20
+ "delete_secret",
17
21
  "view_app_environment_deployment",
18
22
  "edit_app_environment_deployment",
19
23
  "create_app_environment_deployment",
@@ -0,0 +1,26 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ from ..core.pydantic_utilities import UniversalBaseModel
4
+ from .role import Role
5
+ from .reference import Reference
6
+ from ..core.pydantic_utilities import IS_PYDANTIC_V2
7
+ import typing
8
+ import pydantic
9
+
10
+
11
+ class ProjectMembershipRequest(UniversalBaseModel):
12
+ role: Role
13
+ is_demo: bool
14
+ user_ref: Reference
15
+ project_ref: Reference
16
+
17
+ if IS_PYDANTIC_V2:
18
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(
19
+ extra="allow", frozen=True
20
+ ) # type: ignore # Pydantic v2
21
+ else:
22
+
23
+ class Config:
24
+ frozen = True
25
+ smart_union = True
26
+ extra = pydantic.Extra.allow