structifyai 1.176.1__py3-none-any.whl → 1.178.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 (34) hide show
  1. structify/_version.py +1 -1
  2. structify/resources/admin/__init__.py +14 -0
  3. structify/resources/admin/admin.py +32 -0
  4. structify/resources/admin/connector.py +176 -0
  5. structify/resources/code.py +9 -1
  6. structify/resources/connector_catalog/connector_catalog.py +10 -2
  7. structify/resources/sessions.py +17 -5
  8. structify/types/__init__.py +4 -2
  9. structify/types/admin/__init__.py +3 -0
  10. structify/types/admin/clone_connector_item_param.py +15 -0
  11. structify/types/admin/clone_connectors_response.py +12 -0
  12. structify/types/admin/connector_clone_params.py +16 -0
  13. structify/types/chat_create_session_params.py +2 -0
  14. structify/types/chat_event.py +35 -1
  15. structify/types/code_generate_code_params.py +7 -0
  16. structify/types/connector_catalog_list_params.py +3 -0
  17. structify/types/dashboard.py +24 -0
  18. structify/types/dashboard_component.py +46 -2
  19. structify/types/dashboard_component_param.py +53 -3
  20. structify/types/dashboard_page.py +108 -0
  21. structify/types/dashboard_page_param.py +106 -0
  22. structify/types/dashboard_param.py +26 -0
  23. structify/types/dataset_view_tables_with_relationships_response.py +4 -0
  24. structify/types/job_get_scrapers_response.py +3 -0
  25. structify/types/session_finalize_dag_params.py +6 -2
  26. structify/types/session_upload_dashboard_layout_params.py +6 -2
  27. structify/types/tool_result.py +21 -6
  28. structify/types/workflow_dag.py +6 -2
  29. {structifyai-1.176.1.dist-info → structifyai-1.178.0.dist-info}/METADATA +1 -1
  30. {structifyai-1.176.1.dist-info → structifyai-1.178.0.dist-info}/RECORD +32 -26
  31. structify/types/dashboard_layout.py +0 -16
  32. structify/types/dashboard_layout_param.py +0 -18
  33. {structifyai-1.176.1.dist-info → structifyai-1.178.0.dist-info}/WHEEL +0 -0
  34. {structifyai-1.176.1.dist-info → structifyai-1.178.0.dist-info}/licenses/LICENSE +0 -0
@@ -5,6 +5,7 @@ from __future__ import annotations
5
5
  from typing import Optional
6
6
  from typing_extensions import Literal, Required, Annotated, TypedDict
7
7
 
8
+ from .._types import SequenceNotStr
8
9
  from .._utils import PropertyInfo
9
10
 
10
11
  __all__ = ["CodeGenerateCodeParams", "Config"]
@@ -20,6 +21,10 @@ class CodeGenerateCodeParams(TypedDict, total=False):
20
21
  config: Optional[Config]
21
22
  """Configuration for chat session with system prompt and LLM key"""
22
23
 
24
+ connector_ids: Annotated[SequenceNotStr[str], PropertyInfo(alias="connectorIds")]
25
+
26
+ file_paths: Annotated[SequenceNotStr[str], PropertyInfo(alias="filePaths")]
27
+
23
28
  trigger_workflow_execution: Annotated[bool, PropertyInfo(alias="triggerWorkflowExecution")]
24
29
 
25
30
  user_message_id: Annotated[Optional[str], PropertyInfo(alias="userMessageId")]
@@ -57,6 +62,8 @@ class Config(TypedDict, total=False):
57
62
  ]
58
63
  """LLM model keys available in the system. Format: <provider>.<model-name>"""
59
64
 
65
+ max_steps: Optional[int]
66
+
60
67
  reminder_message: Optional[str]
61
68
 
62
69
  system_prompt: Optional[str]
@@ -9,6 +9,9 @@ __all__ = ["ConnectorCatalogListParams"]
9
9
 
10
10
 
11
11
  class ConnectorCatalogListParams(TypedDict, total=False):
12
+ include_inactive: bool
13
+ """Include inactive auth methods (admin only)"""
14
+
12
15
  limit: int
13
16
 
14
17
  offset: int
@@ -0,0 +1,24 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from typing import List, Optional
4
+
5
+ from .._models import BaseModel
6
+ from .dashboard_page import DashboardPage
7
+
8
+ __all__ = ["Dashboard"]
9
+
10
+
11
+ class Dashboard(BaseModel):
12
+ """
13
+ A page is the top-level container with title/description
14
+ Can contain multiple dashboards with different datasets
15
+ """
16
+
17
+ dashboards: List[DashboardPage]
18
+ """One or more dashboards on this page"""
19
+
20
+ title: str
21
+ """Page title"""
22
+
23
+ description: Optional[str] = None
24
+ """Optional page description"""
@@ -1,17 +1,61 @@
1
1
  # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
 
3
- from typing import Optional
3
+ from typing import Dict, List, Union, Optional
4
+ from typing_extensions import TypeAlias
5
+
6
+ from pydantic import Field as FieldInfo
4
7
 
5
8
  from .._models import BaseModel
6
9
 
7
- __all__ = ["DashboardComponent"]
10
+ __all__ = ["DashboardComponent", "Mosaic", "MosaicFields", "MosaicFieldsUnionMember2", "MosaicBin"]
11
+
12
+
13
+ class MosaicFieldsUnionMember2(BaseModel):
14
+ expr: str
15
+
16
+ target: Optional[str] = None
17
+ """Optional Plotly property path (e.g., marker.color) to assign this column to"""
18
+
19
+
20
+ MosaicFields: TypeAlias = Union[str, bool, MosaicFieldsUnionMember2]
21
+
22
+
23
+ class MosaicBin(BaseModel):
24
+ as_: str = FieldInfo(alias="as")
25
+
26
+ field: str
27
+
28
+ step: float
29
+
30
+
31
+ class Mosaic(BaseModel):
32
+ fields: Dict[str, MosaicFields]
33
+
34
+ bin: Optional[MosaicBin] = None
35
+
36
+ group_by: Optional[List[str]] = FieldInfo(alias="groupBy", default=None)
37
+
38
+ limit: Optional[int] = None
39
+
40
+ order_by: Optional[str] = FieldInfo(alias="orderBy", default=None)
41
+
42
+ table: Optional[str] = None
43
+ """Table name - optional, derived from datasetNodeName in dashboard config"""
8
44
 
9
45
 
10
46
  class DashboardComponent(BaseModel):
47
+ """A component references a viz node and optionally includes mosaic metadata"""
48
+
11
49
  node_name: str
50
+ """Function name of the viz node that outputs the chart spec"""
12
51
 
13
52
  title: str
53
+ """Display title (overrides viz node title)"""
14
54
 
15
55
  description: Optional[str] = None
56
+ """Description (optional, can override viz node's description)"""
57
+
58
+ mosaic: Optional[Mosaic] = None
16
59
 
17
60
  span: Optional[int] = None
61
+ """Grid span: 1 (quarter), 2 (half), 3 (three-quarters), 4 (full width)"""
@@ -2,17 +2,67 @@
2
2
 
3
3
  from __future__ import annotations
4
4
 
5
- from typing import Optional
6
- from typing_extensions import Required, TypedDict
5
+ from typing import Dict, Union, Optional
6
+ from typing_extensions import Required, Annotated, TypeAlias, TypedDict
7
7
 
8
- __all__ = ["DashboardComponentParam"]
8
+ from .._types import SequenceNotStr
9
+ from .._utils import PropertyInfo
10
+
11
+ __all__ = ["DashboardComponentParam", "Mosaic", "MosaicFields", "MosaicFieldsUnionMember2", "MosaicBin"]
12
+
13
+
14
+ class MosaicFieldsUnionMember2(TypedDict, total=False):
15
+ expr: Required[str]
16
+
17
+ target: Optional[str]
18
+ """Optional Plotly property path (e.g., marker.color) to assign this column to"""
19
+
20
+
21
+ MosaicFields: TypeAlias = Union[str, bool, MosaicFieldsUnionMember2]
22
+
23
+ _MosaicBinReservedKeywords = TypedDict(
24
+ "_MosaicBinReservedKeywords",
25
+ {
26
+ "as": str,
27
+ },
28
+ total=False,
29
+ )
30
+
31
+
32
+ class MosaicBin(_MosaicBinReservedKeywords, total=False):
33
+ field: Required[str]
34
+
35
+ step: Required[float]
36
+
37
+
38
+ class Mosaic(TypedDict, total=False):
39
+ fields: Required[Dict[str, MosaicFields]]
40
+
41
+ bin: Optional[MosaicBin]
42
+
43
+ group_by: Annotated[Optional[SequenceNotStr[str]], PropertyInfo(alias="groupBy")]
44
+
45
+ limit: Optional[int]
46
+
47
+ order_by: Annotated[Optional[str], PropertyInfo(alias="orderBy")]
48
+
49
+ table: Optional[str]
50
+ """Table name - optional, derived from datasetNodeName in dashboard config"""
9
51
 
10
52
 
11
53
  class DashboardComponentParam(TypedDict, total=False):
54
+ """A component references a viz node and optionally includes mosaic metadata"""
55
+
12
56
  node_name: Required[str]
57
+ """Function name of the viz node that outputs the chart spec"""
13
58
 
14
59
  title: Required[str]
60
+ """Display title (overrides viz node title)"""
15
61
 
16
62
  description: Optional[str]
63
+ """Description (optional, can override viz node's description)"""
64
+
65
+ mosaic: Optional[Mosaic]
17
66
 
18
67
  span: Optional[int]
68
+ """Grid span: 1 (quarter), 2 (half), 3 (three-quarters), 4 (full width)"""
@@ -0,0 +1,108 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from typing import List, Union, Optional
4
+ from typing_extensions import Literal, Annotated, TypeAlias
5
+
6
+ from pydantic import Field as FieldInfo
7
+
8
+ from .._utils import PropertyInfo
9
+ from .._models import BaseModel
10
+ from .dashboard_component import DashboardComponent
11
+
12
+ __all__ = [
13
+ "DashboardPage",
14
+ "Control",
15
+ "ControlDropdown",
16
+ "ControlDropdownOption",
17
+ "ControlRange",
18
+ "ControlCheckbox",
19
+ "ControlCheckboxOption",
20
+ ]
21
+
22
+
23
+ class ControlDropdownOption(BaseModel):
24
+ label: str
25
+
26
+ value: str
27
+
28
+
29
+ class ControlDropdown(BaseModel):
30
+ id: str
31
+
32
+ field: str
33
+
34
+ label: str
35
+
36
+ options: List[ControlDropdownOption]
37
+
38
+ type: Literal["dropdown"]
39
+
40
+ default_value: Optional[str] = None
41
+
42
+
43
+ class ControlRange(BaseModel):
44
+ id: str
45
+
46
+ field: str
47
+
48
+ label: str
49
+
50
+ max: float
51
+
52
+ min: float
53
+
54
+ type: Literal["range"]
55
+
56
+ default_value: Optional[List[float]] = None
57
+
58
+ step: Optional[float] = None
59
+
60
+
61
+ class ControlCheckboxOption(BaseModel):
62
+ label: str
63
+
64
+ value: str
65
+
66
+
67
+ class ControlCheckbox(BaseModel):
68
+ id: str
69
+
70
+ field: str
71
+
72
+ label: str
73
+
74
+ options: List[ControlCheckboxOption]
75
+
76
+ type: Literal["checkbox"]
77
+
78
+ default_value: Optional[List[str]] = None
79
+
80
+
81
+ Control: TypeAlias = Annotated[
82
+ Union[ControlDropdown, ControlRange, ControlCheckbox], PropertyInfo(discriminator="type")
83
+ ]
84
+
85
+
86
+ class DashboardPage(BaseModel):
87
+ """
88
+ A dashboard groups components that share a common dataset.
89
+ If dataset_node_name is None, components render static viz without Mosaic cross-filtering.
90
+ """
91
+
92
+ components: List[DashboardComponent]
93
+ """Components (charts) in this dashboard"""
94
+
95
+ title: str
96
+ """Title for this dashboard section"""
97
+
98
+ controls: Optional[List[Control]] = None
99
+ """Control filters (dropdowns, checkboxes, ranges) for this dashboard"""
100
+
101
+ dataset_node_name: Optional[str] = FieldInfo(alias="datasetNodeName", default=None)
102
+ """
103
+ Function name of the node that returns the dataset (DataFrame/Parquet). If None,
104
+ no cross-filtering is available.
105
+ """
106
+
107
+ description: Optional[str] = None
108
+ """Optional description"""
@@ -0,0 +1,106 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from __future__ import annotations
4
+
5
+ from typing import Union, Iterable, Optional
6
+ from typing_extensions import Literal, Required, Annotated, TypeAlias, TypedDict
7
+
8
+ from .._types import SequenceNotStr
9
+ from .._utils import PropertyInfo
10
+ from .dashboard_component_param import DashboardComponentParam
11
+
12
+ __all__ = [
13
+ "DashboardPageParam",
14
+ "Control",
15
+ "ControlDropdown",
16
+ "ControlDropdownOption",
17
+ "ControlRange",
18
+ "ControlCheckbox",
19
+ "ControlCheckboxOption",
20
+ ]
21
+
22
+
23
+ class ControlDropdownOption(TypedDict, total=False):
24
+ label: Required[str]
25
+
26
+ value: Required[str]
27
+
28
+
29
+ class ControlDropdown(TypedDict, total=False):
30
+ id: Required[str]
31
+
32
+ field: Required[str]
33
+
34
+ label: Required[str]
35
+
36
+ options: Required[Iterable[ControlDropdownOption]]
37
+
38
+ type: Required[Literal["dropdown"]]
39
+
40
+ default_value: Optional[str]
41
+
42
+
43
+ class ControlRange(TypedDict, total=False):
44
+ id: Required[str]
45
+
46
+ field: Required[str]
47
+
48
+ label: Required[str]
49
+
50
+ max: Required[float]
51
+
52
+ min: Required[float]
53
+
54
+ type: Required[Literal["range"]]
55
+
56
+ default_value: Optional[Iterable[float]]
57
+
58
+ step: Optional[float]
59
+
60
+
61
+ class ControlCheckboxOption(TypedDict, total=False):
62
+ label: Required[str]
63
+
64
+ value: Required[str]
65
+
66
+
67
+ class ControlCheckbox(TypedDict, total=False):
68
+ id: Required[str]
69
+
70
+ field: Required[str]
71
+
72
+ label: Required[str]
73
+
74
+ options: Required[Iterable[ControlCheckboxOption]]
75
+
76
+ type: Required[Literal["checkbox"]]
77
+
78
+ default_value: Optional[SequenceNotStr[str]]
79
+
80
+
81
+ Control: TypeAlias = Union[ControlDropdown, ControlRange, ControlCheckbox]
82
+
83
+
84
+ class DashboardPageParam(TypedDict, total=False):
85
+ """
86
+ A dashboard groups components that share a common dataset.
87
+ If dataset_node_name is None, components render static viz without Mosaic cross-filtering.
88
+ """
89
+
90
+ components: Required[Iterable[DashboardComponentParam]]
91
+ """Components (charts) in this dashboard"""
92
+
93
+ title: Required[str]
94
+ """Title for this dashboard section"""
95
+
96
+ controls: Optional[Iterable[Control]]
97
+ """Control filters (dropdowns, checkboxes, ranges) for this dashboard"""
98
+
99
+ dataset_node_name: Annotated[Optional[str], PropertyInfo(alias="datasetNodeName")]
100
+ """
101
+ Function name of the node that returns the dataset (DataFrame/Parquet). If None,
102
+ no cross-filtering is available.
103
+ """
104
+
105
+ description: Optional[str]
106
+ """Optional description"""
@@ -0,0 +1,26 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from __future__ import annotations
4
+
5
+ from typing import Iterable, Optional
6
+ from typing_extensions import Required, TypedDict
7
+
8
+ from .dashboard_page_param import DashboardPageParam
9
+
10
+ __all__ = ["DashboardParam"]
11
+
12
+
13
+ class DashboardParam(TypedDict, total=False):
14
+ """
15
+ A page is the top-level container with title/description
16
+ Can contain multiple dashboards with different datasets
17
+ """
18
+
19
+ dashboards: Required[Iterable[DashboardPageParam]]
20
+ """One or more dashboards on this page"""
21
+
22
+ title: Required[str]
23
+ """Page title"""
24
+
25
+ description: Optional[str]
26
+ """Optional page description"""
@@ -118,6 +118,8 @@ class ConnectedEntity(BaseModel):
118
118
 
119
119
  dataset_id: str
120
120
 
121
+ job_ids: List[str]
122
+
121
123
  label: str
122
124
 
123
125
  properties: Dict[str, ConnectedEntityProperties]
@@ -210,6 +212,8 @@ class Entity(BaseModel):
210
212
 
211
213
  dataset_id: str
212
214
 
215
+ job_ids: List[str]
216
+
213
217
  label: str
214
218
 
215
219
  properties: Dict[str, EntityProperties]
@@ -5,6 +5,7 @@ from datetime import datetime
5
5
  from typing_extensions import TypeAlias
6
6
 
7
7
  from .._models import BaseModel
8
+ from .chat_event import ChatEvent
8
9
  from .chat_prompt import ChatPrompt
9
10
 
10
11
  __all__ = ["JobGetScrapersResponse", "JobGetScrapersResponseItem"]
@@ -25,6 +26,8 @@ class JobGetScrapersResponseItem(BaseModel):
25
26
 
26
27
  code: Optional[str] = None
27
28
 
29
+ events: Optional[List[ChatEvent]] = None
30
+
28
31
  next_page_code: Optional[str] = None
29
32
 
30
33
 
@@ -5,9 +5,9 @@ from __future__ import annotations
5
5
  from typing import Iterable, Optional
6
6
  from typing_extensions import Required, TypedDict
7
7
 
8
+ from .dashboard_param import DashboardParam
8
9
  from .edge_spec_param import EdgeSpecParam
9
10
  from .node_spec_param import NodeSpecParam
10
- from .dashboard_layout_param import DashboardLayoutParam
11
11
 
12
12
  __all__ = ["SessionFinalizeDagParams"]
13
13
 
@@ -17,4 +17,8 @@ class SessionFinalizeDagParams(TypedDict, total=False):
17
17
 
18
18
  nodes: Required[Iterable[NodeSpecParam]]
19
19
 
20
- dashboard_layout: Optional[DashboardLayoutParam]
20
+ dashboard_layout: Optional[DashboardParam]
21
+ """
22
+ A page is the top-level container with title/description Can contain multiple
23
+ dashboards with different datasets
24
+ """
@@ -4,10 +4,14 @@ from __future__ import annotations
4
4
 
5
5
  from typing_extensions import Required, TypedDict
6
6
 
7
- from .dashboard_layout_param import DashboardLayoutParam
7
+ from .dashboard_param import DashboardParam
8
8
 
9
9
  __all__ = ["SessionUploadDashboardLayoutParams"]
10
10
 
11
11
 
12
12
  class SessionUploadDashboardLayoutParams(TypedDict, total=False):
13
- layout: Required[DashboardLayoutParam]
13
+ layout: Required[DashboardParam]
14
+ """
15
+ A page is the top-level container with title/description Can contain multiple
16
+ dashboards with different datasets
17
+ """
@@ -11,7 +11,6 @@ __all__ = [
11
11
  "ToolResult",
12
12
  "Error",
13
13
  "Text",
14
- "Image",
15
14
  "CodeExecution",
16
15
  "CodeExecutionCodeExecution",
17
16
  "WebMarkdown",
@@ -21,6 +20,8 @@ __all__ = [
21
20
  "ConnectorSearchConnectorSearch",
22
21
  "ConnectorSearchConnectorSearchColumn",
23
22
  "NodeLogs",
23
+ "Image",
24
+ "ImageImage",
24
25
  ]
25
26
 
26
27
 
@@ -32,10 +33,6 @@ class Text(BaseModel):
32
33
  text: str = FieldInfo(alias="Text")
33
34
 
34
35
 
35
- class Image(BaseModel):
36
- image: object = FieldInfo(alias="Image")
37
-
38
-
39
36
  class CodeExecutionCodeExecution(BaseModel):
40
37
  return_code: int
41
38
 
@@ -94,6 +91,24 @@ class NodeLogs(BaseModel):
94
91
  node_logs: List[str] = FieldInfo(alias="NodeLogs")
95
92
 
96
93
 
94
+ class ImageImage(BaseModel):
95
+ image_bytes: object
96
+
97
+ ocr_text: Optional[str] = None
98
+
99
+
100
+ class Image(BaseModel):
101
+ image: ImageImage = FieldInfo(alias="Image")
102
+
103
+
97
104
  ToolResult: TypeAlias = Union[
98
- Literal["Pending", "NoResult"], Error, Text, Image, CodeExecution, WebMarkdown, WebSearch, ConnectorSearch, NodeLogs
105
+ Literal["Pending", "NoResult", "Completed"],
106
+ Error,
107
+ Text,
108
+ CodeExecution,
109
+ WebMarkdown,
110
+ WebSearch,
111
+ ConnectorSearch,
112
+ NodeLogs,
113
+ Image,
99
114
  ]
@@ -4,7 +4,7 @@ from typing import List, Optional
4
4
  from datetime import datetime
5
5
 
6
6
  from .._models import BaseModel
7
- from .dashboard_layout import DashboardLayout
7
+ from .dashboard import Dashboard
8
8
  from .workflow_session_edge import WorkflowSessionEdge
9
9
  from .workflow_session_node import WorkflowSessionNode
10
10
 
@@ -24,7 +24,11 @@ class WorkflowDag(BaseModel):
24
24
 
25
25
  dag_ready_at: Optional[datetime] = None
26
26
 
27
- dashboard_layout: Optional[DashboardLayout] = None
27
+ dashboard_layout: Optional[Dashboard] = None
28
+ """
29
+ A page is the top-level container with title/description Can contain multiple
30
+ dashboards with different datasets
31
+ """
28
32
 
29
33
  error: Optional[str] = None
30
34
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: structifyai
3
- Version: 1.176.1
3
+ Version: 1.178.0
4
4
  Summary: The official Python library for the structify API
5
5
  Project-URL: Homepage, https://github.com/StructifyAI/structify-python
6
6
  Project-URL: Repository, https://github.com/StructifyAI/structify-python