robosystems-client 0.2.11__py3-none-any.whl → 0.2.12__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.

Potentially problematic release.


This version of robosystems-client might be problematic. Click here for more details.

Files changed (61) hide show
  1. robosystems_client/api/auth/register_user.py +36 -8
  2. robosystems_client/api/billing/{cancel_subscription.py → cancel_org_subscription.py} +34 -9
  3. robosystems_client/api/billing/create_checkout_session.py +28 -20
  4. robosystems_client/api/billing/get_org_billing_customer.py +189 -0
  5. robosystems_client/api/billing/{get_subscription.py → get_org_subscription.py} +30 -5
  6. robosystems_client/api/billing/{get_upcoming_invoice.py → get_org_upcoming_invoice.py} +68 -22
  7. robosystems_client/api/billing/{list_invoices.py → list_org_invoices.py} +38 -9
  8. robosystems_client/api/billing/{list_subscriptions.py → list_org_subscriptions.py} +64 -22
  9. robosystems_client/api/billing/{update_payment_method.py → update_org_payment_method.py} +34 -9
  10. robosystems_client/api/org/__init__.py +1 -0
  11. robosystems_client/api/org/create_org.py +174 -0
  12. robosystems_client/api/{billing/get_billing_customer.py → org/get_org.py} +50 -28
  13. robosystems_client/api/org/list_org_graphs.py +170 -0
  14. robosystems_client/api/{user/get_user_limits.py → org/list_user_orgs.py} +21 -25
  15. robosystems_client/api/org/update_org.py +187 -0
  16. robosystems_client/api/org_members/__init__.py +1 -0
  17. robosystems_client/api/org_members/invite_org_member.py +207 -0
  18. robosystems_client/api/org_members/list_org_members.py +165 -0
  19. robosystems_client/api/org_members/remove_org_member.py +176 -0
  20. robosystems_client/api/org_members/update_org_member_role.py +200 -0
  21. robosystems_client/api/org_usage/__init__.py +1 -0
  22. robosystems_client/api/org_usage/get_org_limits.py +165 -0
  23. robosystems_client/api/org_usage/get_org_usage.py +186 -0
  24. robosystems_client/api/service_offerings/get_service_offerings.py +32 -8
  25. robosystems_client/api/usage/get_graph_usage_analytics.py +4 -4
  26. robosystems_client/models/__init__.py +44 -6
  27. robosystems_client/models/auth_response.py +35 -0
  28. robosystems_client/models/{user_usage_response_graphs.py → auth_response_org_type_0.py} +6 -6
  29. robosystems_client/models/billing_customer.py +8 -8
  30. robosystems_client/models/checkout_response.py +65 -22
  31. robosystems_client/models/create_org_request.py +79 -0
  32. robosystems_client/models/graph_subscription_tier.py +40 -48
  33. robosystems_client/models/graph_subscriptions.py +17 -5
  34. robosystems_client/models/invite_member_request.py +93 -0
  35. robosystems_client/models/list_org_graphs_response_200_item.py +44 -0
  36. robosystems_client/models/org_detail_response.py +174 -0
  37. robosystems_client/models/org_detail_response_graphs_item.py +44 -0
  38. robosystems_client/models/org_detail_response_limits_type_0.py +44 -0
  39. robosystems_client/models/org_detail_response_members_item.py +44 -0
  40. robosystems_client/models/org_limits_response.py +98 -0
  41. robosystems_client/models/org_limits_response_current_usage.py +44 -0
  42. robosystems_client/models/org_list_response.py +82 -0
  43. robosystems_client/models/org_member_list_response.py +90 -0
  44. robosystems_client/models/org_member_response.py +104 -0
  45. robosystems_client/models/org_response.py +121 -0
  46. robosystems_client/models/org_role.py +10 -0
  47. robosystems_client/models/org_type.py +10 -0
  48. robosystems_client/models/org_usage_response.py +146 -0
  49. robosystems_client/models/org_usage_response_daily_trend_item.py +44 -0
  50. robosystems_client/models/org_usage_response_graph_details_item.py +44 -0
  51. robosystems_client/models/org_usage_summary.py +158 -0
  52. robosystems_client/models/repository_subscriptions.py +15 -4
  53. robosystems_client/models/service_offerings_response.py +15 -0
  54. robosystems_client/models/update_member_role_request.py +62 -0
  55. robosystems_client/models/update_org_request.py +103 -0
  56. {robosystems_client-0.2.11.dist-info → robosystems_client-0.2.12.dist-info}/METADATA +1 -1
  57. {robosystems_client-0.2.11.dist-info → robosystems_client-0.2.12.dist-info}/RECORD +59 -27
  58. robosystems_client/models/user_limits_response.py +0 -95
  59. robosystems_client/models/user_usage_response.py +0 -90
  60. {robosystems_client-0.2.11.dist-info → robosystems_client-0.2.12.dist-info}/WHEEL +0 -0
  61. {robosystems_client-0.2.11.dist-info → robosystems_client-0.2.12.dist-info}/licenses/LICENSE +0 -0
@@ -0,0 +1,104 @@
1
+ import datetime
2
+ from collections.abc import Mapping
3
+ from typing import Any, TypeVar
4
+
5
+ from attrs import define as _attrs_define
6
+ from attrs import field as _attrs_field
7
+ from dateutil.parser import isoparse
8
+
9
+ from ..models.org_role import OrgRole
10
+
11
+ T = TypeVar("T", bound="OrgMemberResponse")
12
+
13
+
14
+ @_attrs_define
15
+ class OrgMemberResponse:
16
+ """Organization member response.
17
+
18
+ Attributes:
19
+ user_id (str):
20
+ name (str):
21
+ email (str):
22
+ role (OrgRole):
23
+ joined_at (datetime.datetime):
24
+ is_active (bool):
25
+ """
26
+
27
+ user_id: str
28
+ name: str
29
+ email: str
30
+ role: OrgRole
31
+ joined_at: datetime.datetime
32
+ is_active: bool
33
+ additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
34
+
35
+ def to_dict(self) -> dict[str, Any]:
36
+ user_id = self.user_id
37
+
38
+ name = self.name
39
+
40
+ email = self.email
41
+
42
+ role = self.role.value
43
+
44
+ joined_at = self.joined_at.isoformat()
45
+
46
+ is_active = self.is_active
47
+
48
+ field_dict: dict[str, Any] = {}
49
+ field_dict.update(self.additional_properties)
50
+ field_dict.update(
51
+ {
52
+ "user_id": user_id,
53
+ "name": name,
54
+ "email": email,
55
+ "role": role,
56
+ "joined_at": joined_at,
57
+ "is_active": is_active,
58
+ }
59
+ )
60
+
61
+ return field_dict
62
+
63
+ @classmethod
64
+ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
65
+ d = dict(src_dict)
66
+ user_id = d.pop("user_id")
67
+
68
+ name = d.pop("name")
69
+
70
+ email = d.pop("email")
71
+
72
+ role = OrgRole(d.pop("role"))
73
+
74
+ joined_at = isoparse(d.pop("joined_at"))
75
+
76
+ is_active = d.pop("is_active")
77
+
78
+ org_member_response = cls(
79
+ user_id=user_id,
80
+ name=name,
81
+ email=email,
82
+ role=role,
83
+ joined_at=joined_at,
84
+ is_active=is_active,
85
+ )
86
+
87
+ org_member_response.additional_properties = d
88
+ return org_member_response
89
+
90
+ @property
91
+ def additional_keys(self) -> list[str]:
92
+ return list(self.additional_properties.keys())
93
+
94
+ def __getitem__(self, key: str) -> Any:
95
+ return self.additional_properties[key]
96
+
97
+ def __setitem__(self, key: str, value: Any) -> None:
98
+ self.additional_properties[key] = value
99
+
100
+ def __delitem__(self, key: str) -> None:
101
+ del self.additional_properties[key]
102
+
103
+ def __contains__(self, key: str) -> bool:
104
+ return key in self.additional_properties
@@ -0,0 +1,121 @@
1
+ import datetime
2
+ from collections.abc import Mapping
3
+ from typing import Any, TypeVar
4
+
5
+ from attrs import define as _attrs_define
6
+ from attrs import field as _attrs_field
7
+ from dateutil.parser import isoparse
8
+
9
+ from ..models.org_role import OrgRole
10
+ from ..models.org_type import OrgType
11
+
12
+ T = TypeVar("T", bound="OrgResponse")
13
+
14
+
15
+ @_attrs_define
16
+ class OrgResponse:
17
+ """Organization summary response.
18
+
19
+ Attributes:
20
+ id (str):
21
+ name (str):
22
+ org_type (OrgType):
23
+ role (OrgRole):
24
+ member_count (int):
25
+ graph_count (int):
26
+ created_at (datetime.datetime):
27
+ joined_at (datetime.datetime):
28
+ """
29
+
30
+ id: str
31
+ name: str
32
+ org_type: OrgType
33
+ role: OrgRole
34
+ member_count: int
35
+ graph_count: int
36
+ created_at: datetime.datetime
37
+ joined_at: datetime.datetime
38
+ additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
39
+
40
+ def to_dict(self) -> dict[str, Any]:
41
+ id = self.id
42
+
43
+ name = self.name
44
+
45
+ org_type = self.org_type.value
46
+
47
+ role = self.role.value
48
+
49
+ member_count = self.member_count
50
+
51
+ graph_count = self.graph_count
52
+
53
+ created_at = self.created_at.isoformat()
54
+
55
+ joined_at = self.joined_at.isoformat()
56
+
57
+ field_dict: dict[str, Any] = {}
58
+ field_dict.update(self.additional_properties)
59
+ field_dict.update(
60
+ {
61
+ "id": id,
62
+ "name": name,
63
+ "org_type": org_type,
64
+ "role": role,
65
+ "member_count": member_count,
66
+ "graph_count": graph_count,
67
+ "created_at": created_at,
68
+ "joined_at": joined_at,
69
+ }
70
+ )
71
+
72
+ return field_dict
73
+
74
+ @classmethod
75
+ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
76
+ d = dict(src_dict)
77
+ id = d.pop("id")
78
+
79
+ name = d.pop("name")
80
+
81
+ org_type = OrgType(d.pop("org_type"))
82
+
83
+ role = OrgRole(d.pop("role"))
84
+
85
+ member_count = d.pop("member_count")
86
+
87
+ graph_count = d.pop("graph_count")
88
+
89
+ created_at = isoparse(d.pop("created_at"))
90
+
91
+ joined_at = isoparse(d.pop("joined_at"))
92
+
93
+ org_response = cls(
94
+ id=id,
95
+ name=name,
96
+ org_type=org_type,
97
+ role=role,
98
+ member_count=member_count,
99
+ graph_count=graph_count,
100
+ created_at=created_at,
101
+ joined_at=joined_at,
102
+ )
103
+
104
+ org_response.additional_properties = d
105
+ return org_response
106
+
107
+ @property
108
+ def additional_keys(self) -> list[str]:
109
+ return list(self.additional_properties.keys())
110
+
111
+ def __getitem__(self, key: str) -> Any:
112
+ return self.additional_properties[key]
113
+
114
+ def __setitem__(self, key: str, value: Any) -> None:
115
+ self.additional_properties[key] = value
116
+
117
+ def __delitem__(self, key: str) -> None:
118
+ del self.additional_properties[key]
119
+
120
+ def __contains__(self, key: str) -> bool:
121
+ return key in self.additional_properties
@@ -0,0 +1,10 @@
1
+ from enum import Enum
2
+
3
+
4
+ class OrgRole(str, Enum):
5
+ ADMIN = "admin"
6
+ MEMBER = "member"
7
+ OWNER = "owner"
8
+
9
+ def __str__(self) -> str:
10
+ return str(self.value)
@@ -0,0 +1,10 @@
1
+ from enum import Enum
2
+
3
+
4
+ class OrgType(str, Enum):
5
+ ENTERPRISE = "enterprise"
6
+ PERSONAL = "personal"
7
+ TEAM = "team"
8
+
9
+ def __str__(self) -> str:
10
+ return str(self.value)
@@ -0,0 +1,146 @@
1
+ import datetime
2
+ from collections.abc import Mapping
3
+ from typing import TYPE_CHECKING, Any, TypeVar
4
+
5
+ from attrs import define as _attrs_define
6
+ from attrs import field as _attrs_field
7
+ from dateutil.parser import isoparse
8
+
9
+ if TYPE_CHECKING:
10
+ from ..models.org_usage_response_daily_trend_item import (
11
+ OrgUsageResponseDailyTrendItem,
12
+ )
13
+ from ..models.org_usage_response_graph_details_item import (
14
+ OrgUsageResponseGraphDetailsItem,
15
+ )
16
+ from ..models.org_usage_summary import OrgUsageSummary
17
+
18
+
19
+ T = TypeVar("T", bound="OrgUsageResponse")
20
+
21
+
22
+ @_attrs_define
23
+ class OrgUsageResponse:
24
+ """Organization usage response.
25
+
26
+ Attributes:
27
+ org_id (str):
28
+ period_days (int):
29
+ start_date (datetime.datetime):
30
+ end_date (datetime.datetime):
31
+ summary (OrgUsageSummary): Organization usage summary.
32
+ graph_details (list['OrgUsageResponseGraphDetailsItem']):
33
+ daily_trend (list['OrgUsageResponseDailyTrendItem']):
34
+ """
35
+
36
+ org_id: str
37
+ period_days: int
38
+ start_date: datetime.datetime
39
+ end_date: datetime.datetime
40
+ summary: "OrgUsageSummary"
41
+ graph_details: list["OrgUsageResponseGraphDetailsItem"]
42
+ daily_trend: list["OrgUsageResponseDailyTrendItem"]
43
+ additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
44
+
45
+ def to_dict(self) -> dict[str, Any]:
46
+ org_id = self.org_id
47
+
48
+ period_days = self.period_days
49
+
50
+ start_date = self.start_date.isoformat()
51
+
52
+ end_date = self.end_date.isoformat()
53
+
54
+ summary = self.summary.to_dict()
55
+
56
+ graph_details = []
57
+ for graph_details_item_data in self.graph_details:
58
+ graph_details_item = graph_details_item_data.to_dict()
59
+ graph_details.append(graph_details_item)
60
+
61
+ daily_trend = []
62
+ for daily_trend_item_data in self.daily_trend:
63
+ daily_trend_item = daily_trend_item_data.to_dict()
64
+ daily_trend.append(daily_trend_item)
65
+
66
+ field_dict: dict[str, Any] = {}
67
+ field_dict.update(self.additional_properties)
68
+ field_dict.update(
69
+ {
70
+ "org_id": org_id,
71
+ "period_days": period_days,
72
+ "start_date": start_date,
73
+ "end_date": end_date,
74
+ "summary": summary,
75
+ "graph_details": graph_details,
76
+ "daily_trend": daily_trend,
77
+ }
78
+ )
79
+
80
+ return field_dict
81
+
82
+ @classmethod
83
+ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
84
+ from ..models.org_usage_response_daily_trend_item import (
85
+ OrgUsageResponseDailyTrendItem,
86
+ )
87
+ from ..models.org_usage_response_graph_details_item import (
88
+ OrgUsageResponseGraphDetailsItem,
89
+ )
90
+ from ..models.org_usage_summary import OrgUsageSummary
91
+
92
+ d = dict(src_dict)
93
+ org_id = d.pop("org_id")
94
+
95
+ period_days = d.pop("period_days")
96
+
97
+ start_date = isoparse(d.pop("start_date"))
98
+
99
+ end_date = isoparse(d.pop("end_date"))
100
+
101
+ summary = OrgUsageSummary.from_dict(d.pop("summary"))
102
+
103
+ graph_details = []
104
+ _graph_details = d.pop("graph_details")
105
+ for graph_details_item_data in _graph_details:
106
+ graph_details_item = OrgUsageResponseGraphDetailsItem.from_dict(
107
+ graph_details_item_data
108
+ )
109
+
110
+ graph_details.append(graph_details_item)
111
+
112
+ daily_trend = []
113
+ _daily_trend = d.pop("daily_trend")
114
+ for daily_trend_item_data in _daily_trend:
115
+ daily_trend_item = OrgUsageResponseDailyTrendItem.from_dict(daily_trend_item_data)
116
+
117
+ daily_trend.append(daily_trend_item)
118
+
119
+ org_usage_response = cls(
120
+ org_id=org_id,
121
+ period_days=period_days,
122
+ start_date=start_date,
123
+ end_date=end_date,
124
+ summary=summary,
125
+ graph_details=graph_details,
126
+ daily_trend=daily_trend,
127
+ )
128
+
129
+ org_usage_response.additional_properties = d
130
+ return org_usage_response
131
+
132
+ @property
133
+ def additional_keys(self) -> list[str]:
134
+ return list(self.additional_properties.keys())
135
+
136
+ def __getitem__(self, key: str) -> Any:
137
+ return self.additional_properties[key]
138
+
139
+ def __setitem__(self, key: str, value: Any) -> None:
140
+ self.additional_properties[key] = value
141
+
142
+ def __delitem__(self, key: str) -> None:
143
+ del self.additional_properties[key]
144
+
145
+ def __contains__(self, key: str) -> bool:
146
+ return key in self.additional_properties
@@ -0,0 +1,44 @@
1
+ from collections.abc import Mapping
2
+ from typing import Any, TypeVar
3
+
4
+ from attrs import define as _attrs_define
5
+ from attrs import field as _attrs_field
6
+
7
+ T = TypeVar("T", bound="OrgUsageResponseDailyTrendItem")
8
+
9
+
10
+ @_attrs_define
11
+ class OrgUsageResponseDailyTrendItem:
12
+ """ """
13
+
14
+ additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
15
+
16
+ def to_dict(self) -> dict[str, Any]:
17
+ field_dict: dict[str, Any] = {}
18
+ field_dict.update(self.additional_properties)
19
+
20
+ return field_dict
21
+
22
+ @classmethod
23
+ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
24
+ d = dict(src_dict)
25
+ org_usage_response_daily_trend_item = cls()
26
+
27
+ org_usage_response_daily_trend_item.additional_properties = d
28
+ return org_usage_response_daily_trend_item
29
+
30
+ @property
31
+ def additional_keys(self) -> list[str]:
32
+ return list(self.additional_properties.keys())
33
+
34
+ def __getitem__(self, key: str) -> Any:
35
+ return self.additional_properties[key]
36
+
37
+ def __setitem__(self, key: str, value: Any) -> None:
38
+ self.additional_properties[key] = value
39
+
40
+ def __delitem__(self, key: str) -> None:
41
+ del self.additional_properties[key]
42
+
43
+ def __contains__(self, key: str) -> bool:
44
+ return key in self.additional_properties
@@ -0,0 +1,44 @@
1
+ from collections.abc import Mapping
2
+ from typing import Any, TypeVar
3
+
4
+ from attrs import define as _attrs_define
5
+ from attrs import field as _attrs_field
6
+
7
+ T = TypeVar("T", bound="OrgUsageResponseGraphDetailsItem")
8
+
9
+
10
+ @_attrs_define
11
+ class OrgUsageResponseGraphDetailsItem:
12
+ """ """
13
+
14
+ additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
15
+
16
+ def to_dict(self) -> dict[str, Any]:
17
+ field_dict: dict[str, Any] = {}
18
+ field_dict.update(self.additional_properties)
19
+
20
+ return field_dict
21
+
22
+ @classmethod
23
+ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
24
+ d = dict(src_dict)
25
+ org_usage_response_graph_details_item = cls()
26
+
27
+ org_usage_response_graph_details_item.additional_properties = d
28
+ return org_usage_response_graph_details_item
29
+
30
+ @property
31
+ def additional_keys(self) -> list[str]:
32
+ return list(self.additional_properties.keys())
33
+
34
+ def __getitem__(self, key: str) -> Any:
35
+ return self.additional_properties[key]
36
+
37
+ def __setitem__(self, key: str, value: Any) -> None:
38
+ self.additional_properties[key] = value
39
+
40
+ def __delitem__(self, key: str) -> None:
41
+ del self.additional_properties[key]
42
+
43
+ def __contains__(self, key: str) -> bool:
44
+ return key in self.additional_properties
@@ -0,0 +1,158 @@
1
+ from collections.abc import Mapping
2
+ from typing import Any, TypeVar, Union, cast
3
+
4
+ from attrs import define as _attrs_define
5
+ from attrs import field as _attrs_field
6
+
7
+ T = TypeVar("T", bound="OrgUsageSummary")
8
+
9
+
10
+ @_attrs_define
11
+ class OrgUsageSummary:
12
+ """Organization usage summary.
13
+
14
+ Attributes:
15
+ total_credits_used (float):
16
+ total_ai_operations (int):
17
+ total_storage_gb (float):
18
+ total_api_calls (int):
19
+ daily_avg_credits (float):
20
+ daily_avg_api_calls (float):
21
+ projected_monthly_credits (float):
22
+ projected_monthly_api_calls (int):
23
+ credits_limit (Union[None, int]):
24
+ api_calls_limit (Union[None, int]):
25
+ storage_limit_gb (Union[None, int]):
26
+ """
27
+
28
+ total_credits_used: float
29
+ total_ai_operations: int
30
+ total_storage_gb: float
31
+ total_api_calls: int
32
+ daily_avg_credits: float
33
+ daily_avg_api_calls: float
34
+ projected_monthly_credits: float
35
+ projected_monthly_api_calls: int
36
+ credits_limit: Union[None, int]
37
+ api_calls_limit: Union[None, int]
38
+ storage_limit_gb: Union[None, int]
39
+ additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
40
+
41
+ def to_dict(self) -> dict[str, Any]:
42
+ total_credits_used = self.total_credits_used
43
+
44
+ total_ai_operations = self.total_ai_operations
45
+
46
+ total_storage_gb = self.total_storage_gb
47
+
48
+ total_api_calls = self.total_api_calls
49
+
50
+ daily_avg_credits = self.daily_avg_credits
51
+
52
+ daily_avg_api_calls = self.daily_avg_api_calls
53
+
54
+ projected_monthly_credits = self.projected_monthly_credits
55
+
56
+ projected_monthly_api_calls = self.projected_monthly_api_calls
57
+
58
+ credits_limit: Union[None, int]
59
+ credits_limit = self.credits_limit
60
+
61
+ api_calls_limit: Union[None, int]
62
+ api_calls_limit = self.api_calls_limit
63
+
64
+ storage_limit_gb: Union[None, int]
65
+ storage_limit_gb = self.storage_limit_gb
66
+
67
+ field_dict: dict[str, Any] = {}
68
+ field_dict.update(self.additional_properties)
69
+ field_dict.update(
70
+ {
71
+ "total_credits_used": total_credits_used,
72
+ "total_ai_operations": total_ai_operations,
73
+ "total_storage_gb": total_storage_gb,
74
+ "total_api_calls": total_api_calls,
75
+ "daily_avg_credits": daily_avg_credits,
76
+ "daily_avg_api_calls": daily_avg_api_calls,
77
+ "projected_monthly_credits": projected_monthly_credits,
78
+ "projected_monthly_api_calls": projected_monthly_api_calls,
79
+ "credits_limit": credits_limit,
80
+ "api_calls_limit": api_calls_limit,
81
+ "storage_limit_gb": storage_limit_gb,
82
+ }
83
+ )
84
+
85
+ return field_dict
86
+
87
+ @classmethod
88
+ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
89
+ d = dict(src_dict)
90
+ total_credits_used = d.pop("total_credits_used")
91
+
92
+ total_ai_operations = d.pop("total_ai_operations")
93
+
94
+ total_storage_gb = d.pop("total_storage_gb")
95
+
96
+ total_api_calls = d.pop("total_api_calls")
97
+
98
+ daily_avg_credits = d.pop("daily_avg_credits")
99
+
100
+ daily_avg_api_calls = d.pop("daily_avg_api_calls")
101
+
102
+ projected_monthly_credits = d.pop("projected_monthly_credits")
103
+
104
+ projected_monthly_api_calls = d.pop("projected_monthly_api_calls")
105
+
106
+ def _parse_credits_limit(data: object) -> Union[None, int]:
107
+ if data is None:
108
+ return data
109
+ return cast(Union[None, int], data)
110
+
111
+ credits_limit = _parse_credits_limit(d.pop("credits_limit"))
112
+
113
+ def _parse_api_calls_limit(data: object) -> Union[None, int]:
114
+ if data is None:
115
+ return data
116
+ return cast(Union[None, int], data)
117
+
118
+ api_calls_limit = _parse_api_calls_limit(d.pop("api_calls_limit"))
119
+
120
+ def _parse_storage_limit_gb(data: object) -> Union[None, int]:
121
+ if data is None:
122
+ return data
123
+ return cast(Union[None, int], data)
124
+
125
+ storage_limit_gb = _parse_storage_limit_gb(d.pop("storage_limit_gb"))
126
+
127
+ org_usage_summary = cls(
128
+ total_credits_used=total_credits_used,
129
+ total_ai_operations=total_ai_operations,
130
+ total_storage_gb=total_storage_gb,
131
+ total_api_calls=total_api_calls,
132
+ daily_avg_credits=daily_avg_credits,
133
+ daily_avg_api_calls=daily_avg_api_calls,
134
+ projected_monthly_credits=projected_monthly_credits,
135
+ projected_monthly_api_calls=projected_monthly_api_calls,
136
+ credits_limit=credits_limit,
137
+ api_calls_limit=api_calls_limit,
138
+ storage_limit_gb=storage_limit_gb,
139
+ )
140
+
141
+ org_usage_summary.additional_properties = d
142
+ return org_usage_summary
143
+
144
+ @property
145
+ def additional_keys(self) -> list[str]:
146
+ return list(self.additional_properties.keys())
147
+
148
+ def __getitem__(self, key: str) -> Any:
149
+ return self.additional_properties[key]
150
+
151
+ def __setitem__(self, key: str, value: Any) -> None:
152
+ self.additional_properties[key] = value
153
+
154
+ def __delitem__(self, key: str) -> None:
155
+ del self.additional_properties[key]
156
+
157
+ def __contains__(self, key: str) -> bool:
158
+ return key in self.additional_properties
@@ -15,13 +15,18 @@ T = TypeVar("T", bound="RepositorySubscriptions")
15
15
  class RepositorySubscriptions:
16
16
  """Repository subscription offerings.
17
17
 
18
- Attributes:
19
- description (str): Description of repository subscriptions
20
- repositories (list['RepositoryInfo']): Available repositories
21
- notes (list[str]): Important notes
18
+ Repository subscriptions are per-organization, not per-graph. All members
19
+ of an organization share access to subscribed repositories.
20
+
21
+ Attributes:
22
+ description (str): Description of repository subscriptions
23
+ pricing_model (str): Pricing model type (per_graph or per_organization)
24
+ repositories (list['RepositoryInfo']): Available repositories
25
+ notes (list[str]): Important notes
22
26
  """
23
27
 
24
28
  description: str
29
+ pricing_model: str
25
30
  repositories: list["RepositoryInfo"]
26
31
  notes: list[str]
27
32
  additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
@@ -29,6 +34,8 @@ class RepositorySubscriptions:
29
34
  def to_dict(self) -> dict[str, Any]:
30
35
  description = self.description
31
36
 
37
+ pricing_model = self.pricing_model
38
+
32
39
  repositories = []
33
40
  for repositories_item_data in self.repositories:
34
41
  repositories_item = repositories_item_data.to_dict()
@@ -41,6 +48,7 @@ class RepositorySubscriptions:
41
48
  field_dict.update(
42
49
  {
43
50
  "description": description,
51
+ "pricing_model": pricing_model,
44
52
  "repositories": repositories,
45
53
  "notes": notes,
46
54
  }
@@ -55,6 +63,8 @@ class RepositorySubscriptions:
55
63
  d = dict(src_dict)
56
64
  description = d.pop("description")
57
65
 
66
+ pricing_model = d.pop("pricing_model")
67
+
58
68
  repositories = []
59
69
  _repositories = d.pop("repositories")
60
70
  for repositories_item_data in _repositories:
@@ -66,6 +76,7 @@ class RepositorySubscriptions:
66
76
 
67
77
  repository_subscriptions = cls(
68
78
  description=description,
79
+ pricing_model=pricing_model,
69
80
  repositories=repositories,
70
81
  notes=notes,
71
82
  )