qanswer_sdk 3.1213.0__py3-none-any.whl → 3.1245.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 (140) hide show
  1. qanswer_sdk/__init__.py +66 -43
  2. qanswer_sdk/api/__init__.py +7 -4
  3. qanswer_sdk/api/admin_api.py +590 -7695
  4. qanswer_sdk/api/ai_assistant_access_rights_api.py +72 -73
  5. qanswer_sdk/api/ai_assistant_api.py +567 -46
  6. qanswer_sdk/api/branding_api.py +4578 -0
  7. qanswer_sdk/api/chatbot_api.py +72 -87
  8. qanswer_sdk/api/{tag_api.py → connector_imap_connector_api.py} +415 -997
  9. qanswer_sdk/api/connector_rdf_api.py +30 -31
  10. qanswer_sdk/api/connectors_api.py +183 -166
  11. qanswer_sdk/api/connectors_data_api.py +345 -1
  12. qanswer_sdk/api/dataset_config_api.py +0 -245
  13. qanswer_sdk/api/llm_api.py +30 -30
  14. qanswer_sdk/api/payment_api.py +17 -16
  15. qanswer_sdk/api/speech_to_text_api.py +2 -2
  16. qanswer_sdk/api/task_chat_api.py +8 -7
  17. qanswer_sdk/api/task_rdf_linker_api.py +35 -36
  18. qanswer_sdk/api/task_rdf_sparql_endpoint_api.py +16 -16
  19. qanswer_sdk/api/task_report_copilot_api.py +895 -281
  20. qanswer_sdk/api/task_search_api.py +8 -7
  21. qanswer_sdk/api/tool_embedder_api.py +4040 -0
  22. qanswer_sdk/api/{user_api.py → tool_llm_api.py} +735 -2749
  23. qanswer_sdk/api/unit_organizations_api.py +4547 -0
  24. qanswer_sdk/api/unit_teams_api.py +3906 -0
  25. qanswer_sdk/api/{organizations_teams_api.py → unit_user_api.py} +1345 -1394
  26. qanswer_sdk/api_client.py +1 -1
  27. qanswer_sdk/configuration.py +1 -1
  28. qanswer_sdk/models/__init__.py +58 -38
  29. qanswer_sdk/models/aggregation.py +2 -2
  30. qanswer_sdk/models/ai_assistant_filter_dto.py +105 -0
  31. qanswer_sdk/models/{user_profile_paginated.py → ai_assistant_list.py} +18 -18
  32. qanswer_sdk/models/{embedding_model.py → available_aggregation.py} +13 -11
  33. qanswer_sdk/models/available_connectors_response.py +2 -2
  34. qanswer_sdk/models/{branding_data.py → branding_app_title.py} +4 -4
  35. qanswer_sdk/models/{api_response.py → branding_system_message.py} +8 -8
  36. qanswer_sdk/models/chat_task_settings.py +12 -12
  37. qanswer_sdk/models/chat_task_update.py +13 -5
  38. qanswer_sdk/models/chatbot_chat_payload.py +19 -2
  39. qanswer_sdk/models/chatbot_conversation_model.py +10 -0
  40. qanswer_sdk/models/chatbot_response.py +22 -2
  41. qanswer_sdk/models/{user_chatbot_setting_payload.py → chatbot_setting_dto.py} +12 -13
  42. qanswer_sdk/models/chatbot_setting_request.py +96 -0
  43. qanswer_sdk/models/{question_completion.py → clip_connector_file_structure.py} +9 -9
  44. qanswer_sdk/models/clip_connector_structure.py +97 -0
  45. qanswer_sdk/models/connector_model.py +2 -2
  46. qanswer_sdk/models/conversation_message.py +4 -12
  47. qanswer_sdk/models/{cost_summary.py → cost_summary_dto.py} +4 -4
  48. qanswer_sdk/models/create_connector_request.py +4 -2
  49. qanswer_sdk/models/create_imap_connector_request.py +105 -0
  50. qanswer_sdk/models/create_pinecone_connector_request.py +3 -1
  51. qanswer_sdk/models/create_sharepoint_connector_from_certificate_request.py +3 -1
  52. qanswer_sdk/models/create_sharepoint_connector_request.py +3 -1
  53. qanswer_sdk/models/dataset_detail_kg.py +27 -1
  54. qanswer_sdk/models/dataset_schema.py +4 -2
  55. qanswer_sdk/models/dataset_update_object.py +3 -1
  56. qanswer_sdk/models/delete_connector_model.py +2 -2
  57. qanswer_sdk/models/delete_connectors_response.py +2 -4
  58. qanswer_sdk/models/{json_nullable_source_metadata.py → duplicate_report_template_response.py} +11 -9
  59. qanswer_sdk/models/{json_nullable_file_failure_reason.py → email_folder.py} +12 -8
  60. qanswer_sdk/models/{embedding_endpoint.py → embedder_detailed_dto.py} +16 -8
  61. qanswer_sdk/models/{tag_payload.py → embedder_dto.py} +11 -7
  62. qanswer_sdk/models/{pageable_object.py → embedder_list_dto.py} +20 -20
  63. qanswer_sdk/models/embedding_endpoint_create.py +3 -1
  64. qanswer_sdk/models/embedding_endpoint_update.py +4 -2
  65. qanswer_sdk/models/{sort_object.py → entity_description.py} +16 -12
  66. qanswer_sdk/models/{dataset_description.py → entity_description_dto.py} +9 -7
  67. qanswer_sdk/models/file_model.py +2 -2
  68. qanswer_sdk/models/imap_add_payload.py +103 -0
  69. qanswer_sdk/models/imap_additional_fields.py +101 -0
  70. qanswer_sdk/models/imap_file_metadata.py +114 -0
  71. qanswer_sdk/models/imap_search_response.py +113 -0
  72. qanswer_sdk/models/llm.py +129 -0
  73. qanswer_sdk/models/llm_consumption.py +118 -0
  74. qanswer_sdk/models/{pageable.py → llm_context_ranges.py} +14 -13
  75. qanswer_sdk/models/{llm_cost.py → llm_cost_filter.py} +11 -7
  76. qanswer_sdk/models/llm_cost_list.py +101 -0
  77. qanswer_sdk/models/llm_detailed_dto.py +179 -0
  78. qanswer_sdk/models/{llm_details.py → llm_dto.py} +14 -18
  79. qanswer_sdk/models/llm_endpoint.py +8 -2
  80. qanswer_sdk/models/llm_endpoint_read_input.py +173 -0
  81. qanswer_sdk/models/llm_endpoint_read_output.py +173 -0
  82. qanswer_sdk/models/llm_filter_dto.py +99 -0
  83. qanswer_sdk/models/llm_list_detailed_dto.py +101 -0
  84. qanswer_sdk/models/llm_list_dto.py +101 -0
  85. qanswer_sdk/models/modify_connector_request.py +5 -11
  86. qanswer_sdk/models/{o_auth_service.py → o_auth_service_dto.py} +4 -4
  87. qanswer_sdk/models/organization_admin.py +95 -0
  88. qanswer_sdk/models/organization_filter_dto.py +97 -0
  89. qanswer_sdk/models/organization_list_dto.py +101 -0
  90. qanswer_sdk/models/organization_llm.py +103 -0
  91. qanswer_sdk/models/{plan.py → plan_dto.py} +4 -4
  92. qanswer_sdk/models/prompt_token_count_details.py +3 -3
  93. qanswer_sdk/models/rag_payload.py +4 -4
  94. qanswer_sdk/models/rag_response.py +4 -2
  95. qanswer_sdk/models/relation_extraction_task_settings.py +12 -10
  96. qanswer_sdk/models/relation_extraction_task_update.py +14 -4
  97. qanswer_sdk/models/report_copilot_slot_task_settings.py +12 -10
  98. qanswer_sdk/models/report_copilot_slot_task_update.py +13 -3
  99. qanswer_sdk/models/report_copilot_task_settings.py +12 -10
  100. qanswer_sdk/models/report_copilot_task_update.py +14 -4
  101. qanswer_sdk/models/{report_copilot_template.py → report_template.py} +17 -7
  102. qanswer_sdk/models/{report_copilot_create_payload.py → report_template_create_payload.py} +4 -4
  103. qanswer_sdk/models/{report_copilot_template_simplified.py → report_template_simplified.py} +11 -7
  104. qanswer_sdk/models/{report_copilot_export_template_as_docx_payload_simplified.py → report_template_simplified_payload.py} +4 -4
  105. qanswer_sdk/models/{report_copilot_update_payload.py → report_template_update_payload.py} +15 -9
  106. qanswer_sdk/models/search_task_settings.py +12 -12
  107. qanswer_sdk/models/search_task_update.py +13 -3
  108. qanswer_sdk/models/{set_logo1_request.py → set_logo2_request.py} +4 -4
  109. qanswer_sdk/models/shared_organization_access.py +7 -3
  110. qanswer_sdk/models/shared_team_access.py +10 -4
  111. qanswer_sdk/models/slot.py +5 -1
  112. qanswer_sdk/models/slot_update.py +5 -1
  113. qanswer_sdk/models/socket_conversation_message.py +3 -11
  114. qanswer_sdk/models/socket_file_metadata.py +17 -11
  115. qanswer_sdk/models/source_metadata.py +109 -0
  116. qanswer_sdk/models/{tag_qa_list_payload.py → subscription_response.py} +22 -21
  117. qanswer_sdk/models/{team_with_count.py → team_admin.py} +8 -8
  118. qanswer_sdk/models/{team_filter.py → team_filter_dto.py} +16 -6
  119. qanswer_sdk/models/team_list_dto.py +101 -0
  120. qanswer_sdk/models/{available_endpoints_response.py → template_clip_structure_input.py} +14 -14
  121. qanswer_sdk/models/{available_embedding_models_response.py → template_clip_structure_output.py} +14 -14
  122. qanswer_sdk/models/test_imap_connection_payload.py +95 -0
  123. qanswer_sdk/models/text2_sparql_payload.py +4 -4
  124. qanswer_sdk/models/text2_sparql_task_settings.py +12 -10
  125. qanswer_sdk/models/text2_sparql_task_update.py +14 -4
  126. qanswer_sdk/models/{user_chatbot_setting_response.py → user_chatbot_setting.py} +24 -24
  127. qanswer_sdk/models/user_dataset.py +38 -2
  128. qanswer_sdk/models/{qa_metadata_payload.py → user_dataset_shared.py} +27 -37
  129. qanswer_sdk/models/{user_filter.py → user_filter_dto.py} +4 -4
  130. qanswer_sdk/models/{user_profile.py → user_profile_dto.py} +10 -10
  131. qanswer_sdk/models/user_profile_list_dto.py +3 -3
  132. qanswer_sdk/models/widget_configs.py +4 -2
  133. {qanswer_sdk-3.1213.0.dist-info → qanswer_sdk-3.1245.0.dist-info}/METADATA +2 -2
  134. {qanswer_sdk-3.1213.0.dist-info → qanswer_sdk-3.1245.0.dist-info}/RECORD +135 -112
  135. qanswer_sdk/api/llm_consumption_controller_api.py +0 -310
  136. qanswer_sdk/models/organization_filter.py +0 -87
  137. qanswer_sdk/models/page_organization.py +0 -123
  138. qanswer_sdk/models/page_team_with_count.py +0 -123
  139. qanswer_sdk/models/tag_qa_payload.py +0 -91
  140. {qanswer_sdk-3.1213.0.dist-info → qanswer_sdk-3.1245.0.dist-info}/WHEEL +0 -0
@@ -0,0 +1,99 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ QAnswer: Api Documentation
5
+
6
+ APIs provided by QAnswer
7
+
8
+ The version of the OpenAPI document: 1.0
9
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
10
+
11
+ Do not edit the class manually.
12
+ """ # noqa: E501
13
+
14
+
15
+ from __future__ import annotations
16
+ import pprint
17
+ import re # noqa: F401
18
+ import json
19
+
20
+ from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr
21
+ from typing import Any, ClassVar, Dict, List, Optional
22
+ from typing import Optional, Set
23
+ from typing_extensions import Self
24
+
25
+ class LlmFilterDto(BaseModel):
26
+ """
27
+ LlmFilterDto
28
+ """ # noqa: E501
29
+ search: Optional[StrictStr] = Field(default='QAnswer LLM', description="Search to filter over the llm name")
30
+ organization_id: Optional[StrictInt] = Field(default=None, description="Search to filter over the organizationId", alias="organizationId")
31
+ sensitivity_level: Optional[StrictStr] = Field(default=None, description="Search to filter over the sensitivity level", alias="sensitivityLevel")
32
+ is_active: Optional[StrictBool] = Field(default=None, alias="isActive")
33
+ page: Optional[StrictInt] = None
34
+ size: Optional[StrictInt] = None
35
+ sort_by: Optional[StrictStr] = Field(default=None, alias="sortBy")
36
+ __properties: ClassVar[List[str]] = ["search", "organizationId", "sensitivityLevel", "isActive", "page", "size", "sortBy"]
37
+
38
+ model_config = ConfigDict(
39
+ populate_by_name=True,
40
+ validate_assignment=True,
41
+ protected_namespaces=(),
42
+ )
43
+
44
+
45
+ def to_str(self) -> str:
46
+ """Returns the string representation of the model using alias"""
47
+ return pprint.pformat(self.model_dump(by_alias=True))
48
+
49
+ def to_json(self) -> str:
50
+ """Returns the JSON representation of the model using alias"""
51
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
52
+ return json.dumps(self.to_dict())
53
+
54
+ @classmethod
55
+ def from_json(cls, json_str: str) -> Optional[Self]:
56
+ """Create an instance of LlmFilterDto from a JSON string"""
57
+ return cls.from_dict(json.loads(json_str))
58
+
59
+ def to_dict(self) -> Dict[str, Any]:
60
+ """Return the dictionary representation of the model using alias.
61
+
62
+ This has the following differences from calling pydantic's
63
+ `self.model_dump(by_alias=True)`:
64
+
65
+ * `None` is only added to the output dict for nullable fields that
66
+ were set at model initialization. Other fields with value `None`
67
+ are ignored.
68
+ """
69
+ excluded_fields: Set[str] = set([
70
+ ])
71
+
72
+ _dict = self.model_dump(
73
+ by_alias=True,
74
+ exclude=excluded_fields,
75
+ exclude_none=True,
76
+ )
77
+ return _dict
78
+
79
+ @classmethod
80
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
81
+ """Create an instance of LlmFilterDto from a dict"""
82
+ if obj is None:
83
+ return None
84
+
85
+ if not isinstance(obj, dict):
86
+ return cls.model_validate(obj)
87
+
88
+ _obj = cls.model_validate({
89
+ "search": obj.get("search") if obj.get("search") is not None else 'QAnswer LLM',
90
+ "organizationId": obj.get("organizationId"),
91
+ "sensitivityLevel": obj.get("sensitivityLevel"),
92
+ "isActive": obj.get("isActive"),
93
+ "page": obj.get("page"),
94
+ "size": obj.get("size"),
95
+ "sortBy": obj.get("sortBy")
96
+ })
97
+ return _obj
98
+
99
+
@@ -0,0 +1,101 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ QAnswer: Api Documentation
5
+
6
+ APIs provided by QAnswer
7
+
8
+ The version of the OpenAPI document: 1.0
9
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
10
+
11
+ Do not edit the class manually.
12
+ """ # noqa: E501
13
+
14
+
15
+ from __future__ import annotations
16
+ import pprint
17
+ import re # noqa: F401
18
+ import json
19
+
20
+ from pydantic import BaseModel, ConfigDict, Field, StrictInt
21
+ from typing import Any, ClassVar, Dict, List, Optional
22
+ from qanswer_sdk.models.llm_detailed_dto import LlmDetailedDto
23
+ from typing import Optional, Set
24
+ from typing_extensions import Self
25
+
26
+ class LlmListDetailedDto(BaseModel):
27
+ """
28
+ LlmListDetailedDto
29
+ """ # noqa: E501
30
+ llms: Optional[List[LlmDetailedDto]] = None
31
+ page: Optional[StrictInt] = None
32
+ page_size: Optional[StrictInt] = Field(default=None, alias="pageSize")
33
+ total: Optional[StrictInt] = None
34
+ __properties: ClassVar[List[str]] = ["llms", "page", "pageSize", "total"]
35
+
36
+ model_config = ConfigDict(
37
+ populate_by_name=True,
38
+ validate_assignment=True,
39
+ protected_namespaces=(),
40
+ )
41
+
42
+
43
+ def to_str(self) -> str:
44
+ """Returns the string representation of the model using alias"""
45
+ return pprint.pformat(self.model_dump(by_alias=True))
46
+
47
+ def to_json(self) -> str:
48
+ """Returns the JSON representation of the model using alias"""
49
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
50
+ return json.dumps(self.to_dict())
51
+
52
+ @classmethod
53
+ def from_json(cls, json_str: str) -> Optional[Self]:
54
+ """Create an instance of LlmListDetailedDto from a JSON string"""
55
+ return cls.from_dict(json.loads(json_str))
56
+
57
+ def to_dict(self) -> Dict[str, Any]:
58
+ """Return the dictionary representation of the model using alias.
59
+
60
+ This has the following differences from calling pydantic's
61
+ `self.model_dump(by_alias=True)`:
62
+
63
+ * `None` is only added to the output dict for nullable fields that
64
+ were set at model initialization. Other fields with value `None`
65
+ are ignored.
66
+ """
67
+ excluded_fields: Set[str] = set([
68
+ ])
69
+
70
+ _dict = self.model_dump(
71
+ by_alias=True,
72
+ exclude=excluded_fields,
73
+ exclude_none=True,
74
+ )
75
+ # override the default output from pydantic by calling `to_dict()` of each item in llms (list)
76
+ _items = []
77
+ if self.llms:
78
+ for _item_llms in self.llms:
79
+ if _item_llms:
80
+ _items.append(_item_llms.to_dict())
81
+ _dict['llms'] = _items
82
+ return _dict
83
+
84
+ @classmethod
85
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
86
+ """Create an instance of LlmListDetailedDto from a dict"""
87
+ if obj is None:
88
+ return None
89
+
90
+ if not isinstance(obj, dict):
91
+ return cls.model_validate(obj)
92
+
93
+ _obj = cls.model_validate({
94
+ "llms": [LlmDetailedDto.from_dict(_item) for _item in obj["llms"]] if obj.get("llms") is not None else None,
95
+ "page": obj.get("page"),
96
+ "pageSize": obj.get("pageSize"),
97
+ "total": obj.get("total")
98
+ })
99
+ return _obj
100
+
101
+
@@ -0,0 +1,101 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ QAnswer: Api Documentation
5
+
6
+ APIs provided by QAnswer
7
+
8
+ The version of the OpenAPI document: 1.0
9
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
10
+
11
+ Do not edit the class manually.
12
+ """ # noqa: E501
13
+
14
+
15
+ from __future__ import annotations
16
+ import pprint
17
+ import re # noqa: F401
18
+ import json
19
+
20
+ from pydantic import BaseModel, ConfigDict, Field, StrictInt
21
+ from typing import Any, ClassVar, Dict, List, Optional
22
+ from qanswer_sdk.models.llm_dto import LlmDto
23
+ from typing import Optional, Set
24
+ from typing_extensions import Self
25
+
26
+ class LlmListDto(BaseModel):
27
+ """
28
+ LlmListDto
29
+ """ # noqa: E501
30
+ llms: Optional[List[LlmDto]] = None
31
+ page: Optional[StrictInt] = None
32
+ page_size: Optional[StrictInt] = Field(default=None, alias="pageSize")
33
+ total: Optional[StrictInt] = None
34
+ __properties: ClassVar[List[str]] = ["llms", "page", "pageSize", "total"]
35
+
36
+ model_config = ConfigDict(
37
+ populate_by_name=True,
38
+ validate_assignment=True,
39
+ protected_namespaces=(),
40
+ )
41
+
42
+
43
+ def to_str(self) -> str:
44
+ """Returns the string representation of the model using alias"""
45
+ return pprint.pformat(self.model_dump(by_alias=True))
46
+
47
+ def to_json(self) -> str:
48
+ """Returns the JSON representation of the model using alias"""
49
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
50
+ return json.dumps(self.to_dict())
51
+
52
+ @classmethod
53
+ def from_json(cls, json_str: str) -> Optional[Self]:
54
+ """Create an instance of LlmListDto from a JSON string"""
55
+ return cls.from_dict(json.loads(json_str))
56
+
57
+ def to_dict(self) -> Dict[str, Any]:
58
+ """Return the dictionary representation of the model using alias.
59
+
60
+ This has the following differences from calling pydantic's
61
+ `self.model_dump(by_alias=True)`:
62
+
63
+ * `None` is only added to the output dict for nullable fields that
64
+ were set at model initialization. Other fields with value `None`
65
+ are ignored.
66
+ """
67
+ excluded_fields: Set[str] = set([
68
+ ])
69
+
70
+ _dict = self.model_dump(
71
+ by_alias=True,
72
+ exclude=excluded_fields,
73
+ exclude_none=True,
74
+ )
75
+ # override the default output from pydantic by calling `to_dict()` of each item in llms (list)
76
+ _items = []
77
+ if self.llms:
78
+ for _item_llms in self.llms:
79
+ if _item_llms:
80
+ _items.append(_item_llms.to_dict())
81
+ _dict['llms'] = _items
82
+ return _dict
83
+
84
+ @classmethod
85
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
86
+ """Create an instance of LlmListDto from a dict"""
87
+ if obj is None:
88
+ return None
89
+
90
+ if not isinstance(obj, dict):
91
+ return cls.model_validate(obj)
92
+
93
+ _obj = cls.model_validate({
94
+ "llms": [LlmDto.from_dict(_item) for _item in obj["llms"]] if obj.get("llms") is not None else None,
95
+ "page": obj.get("page"),
96
+ "pageSize": obj.get("pageSize"),
97
+ "total": obj.get("total")
98
+ })
99
+ return _obj
100
+
101
+
@@ -29,21 +29,16 @@ class ModifyConnectorRequest(BaseModel):
29
29
  username: StrictStr
30
30
  dataset: StrictStr
31
31
  connector_id: StrictInt
32
- connector_type: StrictStr
33
32
  connector_name: Optional[StrictStr] = None
34
- refresh_frequency: StrictStr
35
- __properties: ClassVar[List[str]] = ["username", "dataset", "connector_id", "connector_type", "connector_name", "refresh_frequency"]
36
-
37
- @field_validator('connector_type')
38
- def connector_type_validate_enum(cls, value):
39
- """Validates the enum"""
40
- if value not in set(['document', 'website', 'qna', 'pinecone', 'rdf', 'websearch', 'econsilium', 'econsilium_search_index', 'publication_office', 'onedrive', 'sharepoint', 'gdrive', 'onenote']):
41
- raise ValueError("must be one of enum values ('document', 'website', 'qna', 'pinecone', 'rdf', 'websearch', 'econsilium', 'econsilium_search_index', 'publication_office', 'onedrive', 'sharepoint', 'gdrive', 'onenote')")
42
- return value
33
+ refresh_frequency: Optional[StrictStr] = None
34
+ __properties: ClassVar[List[str]] = ["username", "dataset", "connector_id", "connector_name", "refresh_frequency"]
43
35
 
44
36
  @field_validator('refresh_frequency')
45
37
  def refresh_frequency_validate_enum(cls, value):
46
38
  """Validates the enum"""
39
+ if value is None:
40
+ return value
41
+
47
42
  if value not in set(['never', 'daily', 'weekly', 'monthly']):
48
43
  raise ValueError("must be one of enum values ('never', 'daily', 'weekly', 'monthly')")
49
44
  return value
@@ -102,7 +97,6 @@ class ModifyConnectorRequest(BaseModel):
102
97
  "username": obj.get("username"),
103
98
  "dataset": obj.get("dataset"),
104
99
  "connector_id": obj.get("connector_id"),
105
- "connector_type": obj.get("connector_type"),
106
100
  "connector_name": obj.get("connector_name"),
107
101
  "refresh_frequency": obj.get("refresh_frequency")
108
102
  })
@@ -22,9 +22,9 @@ from typing import Any, ClassVar, Dict, List, Optional
22
22
  from typing import Optional, Set
23
23
  from typing_extensions import Self
24
24
 
25
- class OAuthService(BaseModel):
25
+ class OAuthServiceDto(BaseModel):
26
26
  """
27
- OAuthService
27
+ OAuthServiceDto
28
28
  """ # noqa: E501
29
29
  client_name: Optional[StrictStr] = Field(default=None, alias="clientName")
30
30
  authorization_url: Optional[StrictStr] = Field(default=None, alias="authorizationURL")
@@ -48,7 +48,7 @@ class OAuthService(BaseModel):
48
48
 
49
49
  @classmethod
50
50
  def from_json(cls, json_str: str) -> Optional[Self]:
51
- """Create an instance of OAuthService from a JSON string"""
51
+ """Create an instance of OAuthServiceDto from a JSON string"""
52
52
  return cls.from_dict(json.loads(json_str))
53
53
 
54
54
  def to_dict(self) -> Dict[str, Any]:
@@ -73,7 +73,7 @@ class OAuthService(BaseModel):
73
73
 
74
74
  @classmethod
75
75
  def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
76
- """Create an instance of OAuthService from a dict"""
76
+ """Create an instance of OAuthServiceDto from a dict"""
77
77
  if obj is None:
78
78
  return None
79
79
 
@@ -0,0 +1,95 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ QAnswer: Api Documentation
5
+
6
+ APIs provided by QAnswer
7
+
8
+ The version of the OpenAPI document: 1.0
9
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
10
+
11
+ Do not edit the class manually.
12
+ """ # noqa: E501
13
+
14
+
15
+ from __future__ import annotations
16
+ import pprint
17
+ import re # noqa: F401
18
+ import json
19
+
20
+ from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr
21
+ from typing import Any, ClassVar, Dict, List, Optional
22
+ from typing import Optional, Set
23
+ from typing_extensions import Self
24
+
25
+ class OrganizationAdmin(BaseModel):
26
+ """
27
+ Represents an organization and the role.
28
+ """ # noqa: E501
29
+ name: Optional[StrictStr] = Field(default=None, description="Name of the organization.")
30
+ description: Optional[StrictStr] = Field(default=None, description="Detailed description of the organization.")
31
+ website: Optional[StrictStr] = Field(default=None, description="Official website URL of the organization.")
32
+ id: Optional[StrictInt] = Field(default=None, description="Unique identifier of the organization.")
33
+ admin: Optional[StrictBool] = Field(default=None, description="Indicates if the user is an admin or not")
34
+ __properties: ClassVar[List[str]] = ["name", "description", "website", "id", "admin"]
35
+
36
+ model_config = ConfigDict(
37
+ populate_by_name=True,
38
+ validate_assignment=True,
39
+ protected_namespaces=(),
40
+ )
41
+
42
+
43
+ def to_str(self) -> str:
44
+ """Returns the string representation of the model using alias"""
45
+ return pprint.pformat(self.model_dump(by_alias=True))
46
+
47
+ def to_json(self) -> str:
48
+ """Returns the JSON representation of the model using alias"""
49
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
50
+ return json.dumps(self.to_dict())
51
+
52
+ @classmethod
53
+ def from_json(cls, json_str: str) -> Optional[Self]:
54
+ """Create an instance of OrganizationAdmin from a JSON string"""
55
+ return cls.from_dict(json.loads(json_str))
56
+
57
+ def to_dict(self) -> Dict[str, Any]:
58
+ """Return the dictionary representation of the model using alias.
59
+
60
+ This has the following differences from calling pydantic's
61
+ `self.model_dump(by_alias=True)`:
62
+
63
+ * `None` is only added to the output dict for nullable fields that
64
+ were set at model initialization. Other fields with value `None`
65
+ are ignored.
66
+ """
67
+ excluded_fields: Set[str] = set([
68
+ ])
69
+
70
+ _dict = self.model_dump(
71
+ by_alias=True,
72
+ exclude=excluded_fields,
73
+ exclude_none=True,
74
+ )
75
+ return _dict
76
+
77
+ @classmethod
78
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
79
+ """Create an instance of OrganizationAdmin from a dict"""
80
+ if obj is None:
81
+ return None
82
+
83
+ if not isinstance(obj, dict):
84
+ return cls.model_validate(obj)
85
+
86
+ _obj = cls.model_validate({
87
+ "name": obj.get("name"),
88
+ "description": obj.get("description"),
89
+ "website": obj.get("website"),
90
+ "id": obj.get("id"),
91
+ "admin": obj.get("admin")
92
+ })
93
+ return _obj
94
+
95
+
@@ -0,0 +1,97 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ QAnswer: Api Documentation
5
+
6
+ APIs provided by QAnswer
7
+
8
+ The version of the OpenAPI document: 1.0
9
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
10
+
11
+ Do not edit the class manually.
12
+ """ # noqa: E501
13
+
14
+
15
+ from __future__ import annotations
16
+ import pprint
17
+ import re # noqa: F401
18
+ import json
19
+
20
+ from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr
21
+ from typing import Any, ClassVar, Dict, List, Optional
22
+ from typing import Optional, Set
23
+ from typing_extensions import Self
24
+
25
+ class OrganizationFilterDto(BaseModel):
26
+ """
27
+ OrganizationFilterDto
28
+ """ # noqa: E501
29
+ search: Optional[StrictStr] = None
30
+ user_id: Optional[StrictInt] = Field(default=None, alias="userId")
31
+ page: Optional[StrictInt] = None
32
+ size: Optional[StrictInt] = None
33
+ sort_by: Optional[StrictStr] = Field(default=None, alias="sortBy")
34
+ sort_dir: Optional[StrictStr] = Field(default=None, alias="sortDir")
35
+ __properties: ClassVar[List[str]] = ["search", "userId", "page", "size", "sortBy", "sortDir"]
36
+
37
+ model_config = ConfigDict(
38
+ populate_by_name=True,
39
+ validate_assignment=True,
40
+ protected_namespaces=(),
41
+ )
42
+
43
+
44
+ def to_str(self) -> str:
45
+ """Returns the string representation of the model using alias"""
46
+ return pprint.pformat(self.model_dump(by_alias=True))
47
+
48
+ def to_json(self) -> str:
49
+ """Returns the JSON representation of the model using alias"""
50
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
51
+ return json.dumps(self.to_dict())
52
+
53
+ @classmethod
54
+ def from_json(cls, json_str: str) -> Optional[Self]:
55
+ """Create an instance of OrganizationFilterDto from a JSON string"""
56
+ return cls.from_dict(json.loads(json_str))
57
+
58
+ def to_dict(self) -> Dict[str, Any]:
59
+ """Return the dictionary representation of the model using alias.
60
+
61
+ This has the following differences from calling pydantic's
62
+ `self.model_dump(by_alias=True)`:
63
+
64
+ * `None` is only added to the output dict for nullable fields that
65
+ were set at model initialization. Other fields with value `None`
66
+ are ignored.
67
+ """
68
+ excluded_fields: Set[str] = set([
69
+ ])
70
+
71
+ _dict = self.model_dump(
72
+ by_alias=True,
73
+ exclude=excluded_fields,
74
+ exclude_none=True,
75
+ )
76
+ return _dict
77
+
78
+ @classmethod
79
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
80
+ """Create an instance of OrganizationFilterDto from a dict"""
81
+ if obj is None:
82
+ return None
83
+
84
+ if not isinstance(obj, dict):
85
+ return cls.model_validate(obj)
86
+
87
+ _obj = cls.model_validate({
88
+ "search": obj.get("search"),
89
+ "userId": obj.get("userId"),
90
+ "page": obj.get("page"),
91
+ "size": obj.get("size"),
92
+ "sortBy": obj.get("sortBy"),
93
+ "sortDir": obj.get("sortDir")
94
+ })
95
+ return _obj
96
+
97
+
@@ -0,0 +1,101 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ QAnswer: Api Documentation
5
+
6
+ APIs provided by QAnswer
7
+
8
+ The version of the OpenAPI document: 1.0
9
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
10
+
11
+ Do not edit the class manually.
12
+ """ # noqa: E501
13
+
14
+
15
+ from __future__ import annotations
16
+ import pprint
17
+ import re # noqa: F401
18
+ import json
19
+
20
+ from pydantic import BaseModel, ConfigDict, Field, StrictInt
21
+ from typing import Any, ClassVar, Dict, List, Optional
22
+ from qanswer_sdk.models.organization import Organization
23
+ from typing import Optional, Set
24
+ from typing_extensions import Self
25
+
26
+ class OrganizationListDto(BaseModel):
27
+ """
28
+ OrganizationListDto
29
+ """ # noqa: E501
30
+ organizations: Optional[List[Organization]] = None
31
+ page: Optional[StrictInt] = None
32
+ page_size: Optional[StrictInt] = Field(default=None, alias="pageSize")
33
+ total: Optional[StrictInt] = None
34
+ __properties: ClassVar[List[str]] = ["organizations", "page", "pageSize", "total"]
35
+
36
+ model_config = ConfigDict(
37
+ populate_by_name=True,
38
+ validate_assignment=True,
39
+ protected_namespaces=(),
40
+ )
41
+
42
+
43
+ def to_str(self) -> str:
44
+ """Returns the string representation of the model using alias"""
45
+ return pprint.pformat(self.model_dump(by_alias=True))
46
+
47
+ def to_json(self) -> str:
48
+ """Returns the JSON representation of the model using alias"""
49
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
50
+ return json.dumps(self.to_dict())
51
+
52
+ @classmethod
53
+ def from_json(cls, json_str: str) -> Optional[Self]:
54
+ """Create an instance of OrganizationListDto from a JSON string"""
55
+ return cls.from_dict(json.loads(json_str))
56
+
57
+ def to_dict(self) -> Dict[str, Any]:
58
+ """Return the dictionary representation of the model using alias.
59
+
60
+ This has the following differences from calling pydantic's
61
+ `self.model_dump(by_alias=True)`:
62
+
63
+ * `None` is only added to the output dict for nullable fields that
64
+ were set at model initialization. Other fields with value `None`
65
+ are ignored.
66
+ """
67
+ excluded_fields: Set[str] = set([
68
+ ])
69
+
70
+ _dict = self.model_dump(
71
+ by_alias=True,
72
+ exclude=excluded_fields,
73
+ exclude_none=True,
74
+ )
75
+ # override the default output from pydantic by calling `to_dict()` of each item in organizations (list)
76
+ _items = []
77
+ if self.organizations:
78
+ for _item_organizations in self.organizations:
79
+ if _item_organizations:
80
+ _items.append(_item_organizations.to_dict())
81
+ _dict['organizations'] = _items
82
+ return _dict
83
+
84
+ @classmethod
85
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
86
+ """Create an instance of OrganizationListDto from a dict"""
87
+ if obj is None:
88
+ return None
89
+
90
+ if not isinstance(obj, dict):
91
+ return cls.model_validate(obj)
92
+
93
+ _obj = cls.model_validate({
94
+ "organizations": [Organization.from_dict(_item) for _item in obj["organizations"]] if obj.get("organizations") is not None else None,
95
+ "page": obj.get("page"),
96
+ "pageSize": obj.get("pageSize"),
97
+ "total": obj.get("total")
98
+ })
99
+ return _obj
100
+
101
+