modulex-python 0.1.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.
- modulex/__init__.py +39 -0
- modulex/_base.py +281 -0
- modulex/_client.py +237 -0
- modulex/_compat.py +39 -0
- modulex/_config.py +26 -0
- modulex/_exceptions.py +131 -0
- modulex/_streaming.py +118 -0
- modulex/py.typed +0 -0
- modulex/resources/__init__.py +1 -0
- modulex/resources/api_keys.py +39 -0
- modulex/resources/auth.py +38 -0
- modulex/resources/chats.py +62 -0
- modulex/resources/composer.py +134 -0
- modulex/resources/credentials.py +197 -0
- modulex/resources/dashboard.py +110 -0
- modulex/resources/deployments.py +92 -0
- modulex/resources/executions.py +97 -0
- modulex/resources/integrations.py +110 -0
- modulex/resources/knowledge.py +343 -0
- modulex/resources/notifications.py +39 -0
- modulex/resources/organizations.py +72 -0
- modulex/resources/schedules.py +172 -0
- modulex/resources/subscriptions.py +38 -0
- modulex/resources/system.py +28 -0
- modulex/resources/templates.py +115 -0
- modulex/resources/workflows.py +156 -0
- modulex/types/__init__.py +294 -0
- modulex/types/api_keys.py +19 -0
- modulex/types/auth.py +62 -0
- modulex/types/chats.py +55 -0
- modulex/types/composer.py +27 -0
- modulex/types/credentials.py +79 -0
- modulex/types/dashboard.py +54 -0
- modulex/types/executions.py +104 -0
- modulex/types/integrations.py +29 -0
- modulex/types/knowledge.py +75 -0
- modulex/types/notifications.py +16 -0
- modulex/types/organizations.py +43 -0
- modulex/types/schedules.py +48 -0
- modulex/types/shared.py +39 -0
- modulex/types/subscriptions.py +59 -0
- modulex/types/templates.py +50 -0
- modulex/types/workflows.py +253 -0
- modulex_python-0.1.0.dist-info/METADATA +435 -0
- modulex_python-0.1.0.dist-info/RECORD +47 -0
- modulex_python-0.1.0.dist-info/WHEEL +4 -0
- modulex_python-0.1.0.dist-info/licenses/LICENSE +21 -0
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"""Composer-related type definitions."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from typing_extensions import TypedDict
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class ComposerChatResponse(TypedDict, total=False):
|
|
9
|
+
"""Response from initiating or continuing a composer chat."""
|
|
10
|
+
|
|
11
|
+
status: str
|
|
12
|
+
composer_chat_id: str
|
|
13
|
+
workflow_id: str | None
|
|
14
|
+
run_id: str | None
|
|
15
|
+
thread_id: str | None
|
|
16
|
+
stream_url: str | None
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
class ComposerStatusResponse(TypedDict, total=False):
|
|
20
|
+
"""Status snapshot for an active composer session."""
|
|
21
|
+
|
|
22
|
+
composer_chat_id: str
|
|
23
|
+
workflow_id: str | None
|
|
24
|
+
is_running: bool
|
|
25
|
+
running_id: str | None
|
|
26
|
+
has_pending_changes: bool
|
|
27
|
+
run_status: str | None
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
"""Credential-related type definitions."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from typing import Any
|
|
6
|
+
|
|
7
|
+
from typing_extensions import TypedDict
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class CredentialResponse(TypedDict, total=False):
|
|
11
|
+
"""Response representing a stored credential."""
|
|
12
|
+
|
|
13
|
+
credential_id: str
|
|
14
|
+
integration_name: str
|
|
15
|
+
integration_type: str
|
|
16
|
+
display_name: str
|
|
17
|
+
auth_type: str
|
|
18
|
+
is_default: bool
|
|
19
|
+
created_at: str
|
|
20
|
+
updated_at: str
|
|
21
|
+
last_used_at: str | None
|
|
22
|
+
expires_at: str | None
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
class CredentialTestResult(TypedDict, total=False):
|
|
26
|
+
"""Result from testing a credential."""
|
|
27
|
+
|
|
28
|
+
credential_id: str
|
|
29
|
+
is_valid: bool
|
|
30
|
+
message: str
|
|
31
|
+
tested_at: str
|
|
32
|
+
test_method: str
|
|
33
|
+
integration_name: str
|
|
34
|
+
auth_type: str
|
|
35
|
+
test_endpoint: str | None
|
|
36
|
+
status_code: int | None
|
|
37
|
+
cost_level: str | None
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
class CredentialUsageStats(TypedDict, total=False):
|
|
41
|
+
"""Aggregated usage statistics for a credential."""
|
|
42
|
+
|
|
43
|
+
credential_id: str
|
|
44
|
+
total_calls: int
|
|
45
|
+
successful_calls: int
|
|
46
|
+
failed_calls: int
|
|
47
|
+
success_rate: float
|
|
48
|
+
action_breakdown: dict[str, Any]
|
|
49
|
+
start_date: str
|
|
50
|
+
end_date: str
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
class AuditEntry(TypedDict, total=False):
|
|
54
|
+
"""Single audit log entry for a credential action."""
|
|
55
|
+
|
|
56
|
+
id: str
|
|
57
|
+
credential_id: str
|
|
58
|
+
action: str
|
|
59
|
+
performed_by: str
|
|
60
|
+
timestamp: str
|
|
61
|
+
details: dict[str, Any]
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
class MCPToolsResponse(TypedDict, total=False):
|
|
65
|
+
"""Response listing MCP tools available for a credential."""
|
|
66
|
+
|
|
67
|
+
credential_id: str
|
|
68
|
+
tools: list[Any]
|
|
69
|
+
total_count: int
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
class MCPRefreshResponse(TypedDict, total=False):
|
|
73
|
+
"""Response from refreshing MCP tools for a credential."""
|
|
74
|
+
|
|
75
|
+
credential_id: str
|
|
76
|
+
refreshed_at: str
|
|
77
|
+
changes: dict[str, Any]
|
|
78
|
+
total_tools: int
|
|
79
|
+
success: bool
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
"""Dashboard-related type definitions."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from typing import Any
|
|
6
|
+
|
|
7
|
+
from typing_extensions import TypedDict
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class LogEntry(TypedDict, total=False):
|
|
11
|
+
"""A single audit/activity log entry."""
|
|
12
|
+
|
|
13
|
+
id: str
|
|
14
|
+
organization_id: str
|
|
15
|
+
category: str
|
|
16
|
+
operation: str
|
|
17
|
+
performed_by: str
|
|
18
|
+
details: dict[str, Any]
|
|
19
|
+
timestamp: str
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
class LogsResponse(TypedDict, total=False):
|
|
23
|
+
"""Paginated log listing response."""
|
|
24
|
+
|
|
25
|
+
success: bool
|
|
26
|
+
organization_id: str
|
|
27
|
+
data: dict[str, Any]
|
|
28
|
+
filters: dict[str, Any]
|
|
29
|
+
meta: dict[str, Any]
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
class AnalyticsOverviewResponse(TypedDict, total=False):
|
|
33
|
+
"""High-level analytics overview for an organization."""
|
|
34
|
+
|
|
35
|
+
success: bool
|
|
36
|
+
organization_id: str
|
|
37
|
+
data: dict[str, Any]
|
|
38
|
+
meta: dict[str, Any]
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
class UserListResponse(TypedDict, total=False):
|
|
42
|
+
"""Paginated list of organization members."""
|
|
43
|
+
|
|
44
|
+
success: bool
|
|
45
|
+
organization_id: str
|
|
46
|
+
users: list[Any]
|
|
47
|
+
invitation_count: int
|
|
48
|
+
max_seats: int | None
|
|
49
|
+
total: int
|
|
50
|
+
total_pages: int
|
|
51
|
+
current_page: int
|
|
52
|
+
limit: int
|
|
53
|
+
has_next: bool
|
|
54
|
+
has_previous: bool
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
"""Execution-related type definitions."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from typing import Any
|
|
6
|
+
|
|
7
|
+
from typing_extensions import TypedDict
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class RunResponse(TypedDict, total=False):
|
|
11
|
+
"""Response from /workflows/run."""
|
|
12
|
+
|
|
13
|
+
status: str
|
|
14
|
+
run_id: str
|
|
15
|
+
thread_id: str
|
|
16
|
+
chat_id: str | None
|
|
17
|
+
ephemeral: bool
|
|
18
|
+
stream: bool
|
|
19
|
+
workflow_name: str
|
|
20
|
+
workflow_version: str
|
|
21
|
+
workflow_source: str
|
|
22
|
+
elapsed_ms: float
|
|
23
|
+
human_message: dict[str, Any]
|
|
24
|
+
ai_message: dict[str, Any]
|
|
25
|
+
message: str
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
class StateResponse(TypedDict, total=False):
|
|
29
|
+
"""Response from /workflows/state/{thread_id}."""
|
|
30
|
+
|
|
31
|
+
thread_id: str
|
|
32
|
+
run_id: str
|
|
33
|
+
checkpoint_id: str
|
|
34
|
+
state: dict[str, Any]
|
|
35
|
+
next: list[str]
|
|
36
|
+
metadata: dict[str, Any]
|
|
37
|
+
pending_writes: int
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
class ResumeResponse(TypedDict, total=False):
|
|
41
|
+
"""Response from /workflows/resume/{thread_id}."""
|
|
42
|
+
|
|
43
|
+
status: str
|
|
44
|
+
run_id: str
|
|
45
|
+
thread_id: str
|
|
46
|
+
stream: bool
|
|
47
|
+
workflow_source: str
|
|
48
|
+
message: str
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
class CancelResponse(TypedDict, total=False):
|
|
52
|
+
"""Response from /workflows/cancel/{run_id}."""
|
|
53
|
+
|
|
54
|
+
status: str
|
|
55
|
+
run_id: str
|
|
56
|
+
reason: str
|
|
57
|
+
message: str
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
class NodeUpdateEvent(TypedDict, total=False):
|
|
61
|
+
"""SSE node_update event data."""
|
|
62
|
+
|
|
63
|
+
node_id: str
|
|
64
|
+
node_type: str
|
|
65
|
+
status: str
|
|
66
|
+
output: dict[str, Any]
|
|
67
|
+
error: str | None
|
|
68
|
+
execution_time_ms: float
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
class MetadataEvent(TypedDict, total=False):
|
|
72
|
+
"""SSE metadata event data."""
|
|
73
|
+
|
|
74
|
+
run_id: str
|
|
75
|
+
thread_id: str
|
|
76
|
+
workflow_name: str
|
|
77
|
+
workflow_version: str
|
|
78
|
+
nodes: list[dict[str, Any]]
|
|
79
|
+
|
|
80
|
+
|
|
81
|
+
class InterruptEvent(TypedDict, total=False):
|
|
82
|
+
"""SSE interrupt event data."""
|
|
83
|
+
|
|
84
|
+
message: str
|
|
85
|
+
state: dict[str, Any]
|
|
86
|
+
resume_instructions: str
|
|
87
|
+
node_id: str
|
|
88
|
+
|
|
89
|
+
|
|
90
|
+
class DoneEvent(TypedDict, total=False):
|
|
91
|
+
"""SSE done event data."""
|
|
92
|
+
|
|
93
|
+
final_state: dict[str, Any]
|
|
94
|
+
steps_executed: int
|
|
95
|
+
total_execution_time_ms: float
|
|
96
|
+
|
|
97
|
+
|
|
98
|
+
class ErrorEvent(TypedDict, total=False):
|
|
99
|
+
"""SSE error event data."""
|
|
100
|
+
|
|
101
|
+
error_message: str
|
|
102
|
+
error_type: str
|
|
103
|
+
node_id: str | None
|
|
104
|
+
stack_trace: str | None
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"""Integration-related type definitions."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from typing import Any
|
|
6
|
+
|
|
7
|
+
from typing_extensions import TypedDict
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class IntegrationInfo(TypedDict, total=False):
|
|
11
|
+
"""Metadata describing a single integration."""
|
|
12
|
+
|
|
13
|
+
name: str
|
|
14
|
+
display_name: str
|
|
15
|
+
type: str
|
|
16
|
+
category: str
|
|
17
|
+
description: str | None
|
|
18
|
+
auth_types: list[str]
|
|
19
|
+
icon_url: str | None
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
class IntegrationBrowseResponse(TypedDict, total=False):
|
|
23
|
+
"""Paginated browse response for available integrations."""
|
|
24
|
+
|
|
25
|
+
integrations: list[Any]
|
|
26
|
+
total: int
|
|
27
|
+
page: int
|
|
28
|
+
page_size: int
|
|
29
|
+
total_pages: int
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
"""Knowledge base-related type definitions."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from typing import Any
|
|
6
|
+
|
|
7
|
+
from typing_extensions import TypedDict
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class KnowledgeBaseResponse(TypedDict, total=False):
|
|
11
|
+
"""Response representing a knowledge base."""
|
|
12
|
+
|
|
13
|
+
id: str
|
|
14
|
+
organization_id: str
|
|
15
|
+
name: str
|
|
16
|
+
description: str | None
|
|
17
|
+
status: str
|
|
18
|
+
embedding_config: dict[str, Any]
|
|
19
|
+
chunking_config: dict[str, Any]
|
|
20
|
+
document_count: int
|
|
21
|
+
total_chunks: int
|
|
22
|
+
created_at: str
|
|
23
|
+
updated_at: str
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
class DocumentResponse(TypedDict, total=False):
|
|
27
|
+
"""Response representing a document inside a knowledge base."""
|
|
28
|
+
|
|
29
|
+
id: str
|
|
30
|
+
knowledge_base_id: str
|
|
31
|
+
filename: str
|
|
32
|
+
status: str
|
|
33
|
+
file_size: int
|
|
34
|
+
mime_type: str
|
|
35
|
+
metadata: dict[str, Any]
|
|
36
|
+
chunk_count: int
|
|
37
|
+
created_at: str
|
|
38
|
+
updated_at: str
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
class SearchResult(TypedDict, total=False):
|
|
42
|
+
"""Result from a knowledge base semantic search."""
|
|
43
|
+
|
|
44
|
+
query: str
|
|
45
|
+
results: list[dict[str, Any]]
|
|
46
|
+
total_results: int
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
class ChunkInfo(TypedDict, total=False):
|
|
50
|
+
"""Information about a single document chunk."""
|
|
51
|
+
|
|
52
|
+
id: str
|
|
53
|
+
document_id: str
|
|
54
|
+
content: str
|
|
55
|
+
metadata: dict[str, Any]
|
|
56
|
+
embedding_id: str | None
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
class ContextResponse(TypedDict, total=False):
|
|
60
|
+
"""Assembled context string returned for a query."""
|
|
61
|
+
|
|
62
|
+
context: str
|
|
63
|
+
query: str
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
class SupportedFileTypesResponse(TypedDict, total=False):
|
|
67
|
+
"""Supported file types and upload limits for a knowledge base."""
|
|
68
|
+
|
|
69
|
+
supported_types: list[str]
|
|
70
|
+
max_file_size_bytes: int
|
|
71
|
+
max_file_size_mb: float
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
class KnowledgeStatsResponse(TypedDict, total=False):
|
|
75
|
+
"""Aggregate statistics for a knowledge base (shape may vary by backend)."""
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"""Notification-related type definitions."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from typing import Any
|
|
6
|
+
|
|
7
|
+
from typing_extensions import TypedDict
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class NotificationResponse(TypedDict, total=False):
|
|
11
|
+
"""Paginated list of notifications for an organization."""
|
|
12
|
+
|
|
13
|
+
success: bool
|
|
14
|
+
notifications: list[Any]
|
|
15
|
+
total: int
|
|
16
|
+
organization_id: str
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
"""Organization-related type definitions."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from typing import Any
|
|
6
|
+
|
|
7
|
+
from typing_extensions import TypedDict
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class OrganizationResponse(TypedDict, total=False):
|
|
11
|
+
"""Generic organization action response."""
|
|
12
|
+
|
|
13
|
+
success: bool
|
|
14
|
+
message: str
|
|
15
|
+
organization: dict[str, Any]
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
class LLMListResponse(TypedDict, total=False):
|
|
19
|
+
"""Response listing LLM configurations for an organization."""
|
|
20
|
+
|
|
21
|
+
success: bool
|
|
22
|
+
total: int
|
|
23
|
+
active_llm_total: int
|
|
24
|
+
inactive_llm_total: int
|
|
25
|
+
active_llms: list[Any]
|
|
26
|
+
inactive_llms: list[Any]
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
class InviteResponse(TypedDict, total=False):
|
|
30
|
+
"""Response from sending an organization invitation."""
|
|
31
|
+
|
|
32
|
+
success: bool
|
|
33
|
+
message: str
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
class RoleUpdateResponse(TypedDict, total=False):
|
|
37
|
+
"""Response from updating a member's role."""
|
|
38
|
+
|
|
39
|
+
success: bool
|
|
40
|
+
message: str
|
|
41
|
+
user_id: str
|
|
42
|
+
organization_id: str
|
|
43
|
+
new_role: str
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
"""Schedule-related type definitions."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from typing import Any
|
|
6
|
+
|
|
7
|
+
from typing_extensions import TypedDict
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class ScheduleResponse(TypedDict, total=False):
|
|
11
|
+
"""Response representing a workflow schedule."""
|
|
12
|
+
|
|
13
|
+
id: str
|
|
14
|
+
workflow_id: str
|
|
15
|
+
name: str
|
|
16
|
+
description: str | None
|
|
17
|
+
schedule_type: str
|
|
18
|
+
interval_seconds: int | None
|
|
19
|
+
cron_expression: str | None
|
|
20
|
+
timezone: str
|
|
21
|
+
is_active: bool
|
|
22
|
+
input: dict[str, Any]
|
|
23
|
+
config: dict[str, Any]
|
|
24
|
+
next_run_at: str | None
|
|
25
|
+
last_run_at: str | None
|
|
26
|
+
created_at: str
|
|
27
|
+
updated_at: str
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
class ScheduleRunResponse(TypedDict, total=False):
|
|
31
|
+
"""Response representing a single execution triggered by a schedule."""
|
|
32
|
+
|
|
33
|
+
id: str
|
|
34
|
+
schedule_id: str
|
|
35
|
+
status: str
|
|
36
|
+
started_at: str
|
|
37
|
+
completed_at: str | None
|
|
38
|
+
duration_ms: float | None
|
|
39
|
+
error: str | None
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
class RunStatsResponse(TypedDict, total=False):
|
|
43
|
+
"""Aggregate run statistics for a schedule."""
|
|
44
|
+
|
|
45
|
+
total_runs: int
|
|
46
|
+
successful_runs: int
|
|
47
|
+
failed_runs: int
|
|
48
|
+
average_duration_ms: float | None
|
modulex/types/shared.py
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"""Shared/common type definitions."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from typing_extensions import TypedDict
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class PaginatedResponse(TypedDict, total=False):
|
|
9
|
+
"""Generic paginated response."""
|
|
10
|
+
|
|
11
|
+
total: int
|
|
12
|
+
limit: int
|
|
13
|
+
offset: int
|
|
14
|
+
has_next: bool
|
|
15
|
+
has_previous: bool
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
class PagePaginatedResponse(TypedDict, total=False):
|
|
19
|
+
"""Page-based paginated response."""
|
|
20
|
+
|
|
21
|
+
total: int
|
|
22
|
+
page: int
|
|
23
|
+
page_size: int
|
|
24
|
+
total_pages: int
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
class SuccessResponse(TypedDict, total=False):
|
|
28
|
+
"""Generic success response."""
|
|
29
|
+
|
|
30
|
+
success: bool
|
|
31
|
+
message: str
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
class ErrorDetail(TypedDict, total=False):
|
|
35
|
+
"""Validation error detail."""
|
|
36
|
+
|
|
37
|
+
loc: list[str]
|
|
38
|
+
msg: str
|
|
39
|
+
type: str
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
"""Subscription and billing-related type definitions."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from typing_extensions import TypedDict
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class PlanPrice(TypedDict, total=False):
|
|
9
|
+
"""Pricing entry for a subscription plan."""
|
|
10
|
+
|
|
11
|
+
price: float
|
|
12
|
+
interval: str
|
|
13
|
+
currency: str
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
class PlanInfo(TypedDict, total=False):
|
|
17
|
+
"""Details about a subscription plan."""
|
|
18
|
+
|
|
19
|
+
id: str
|
|
20
|
+
name: str
|
|
21
|
+
sort_order: int
|
|
22
|
+
is_enterprise: bool
|
|
23
|
+
discount: float | None
|
|
24
|
+
prices: list[PlanPrice]
|
|
25
|
+
features: list[str]
|
|
26
|
+
is_selectable: bool
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
class PlansResponse(TypedDict, total=False):
|
|
30
|
+
"""Response listing available subscription plans."""
|
|
31
|
+
|
|
32
|
+
plans: list[PlanInfo]
|
|
33
|
+
total: int
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
class BillingSubscription(TypedDict, total=False):
|
|
37
|
+
"""Active billing subscription details."""
|
|
38
|
+
|
|
39
|
+
id: str
|
|
40
|
+
status: str
|
|
41
|
+
current_period_start: str
|
|
42
|
+
current_period_end: str
|
|
43
|
+
billing_interval: str
|
|
44
|
+
current_price: float | None
|
|
45
|
+
created_at: str
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
class BillingResponse(TypedDict, total=False):
|
|
49
|
+
"""Current billing state for an organization."""
|
|
50
|
+
|
|
51
|
+
has_subscription: bool
|
|
52
|
+
subscription: BillingSubscription
|
|
53
|
+
plan: PlanInfo
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
class CheckoutResponse(TypedDict, total=False):
|
|
57
|
+
"""Response containing a Stripe checkout or portal URL."""
|
|
58
|
+
|
|
59
|
+
url: str
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
"""Template-related type definitions."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from typing import Any
|
|
6
|
+
|
|
7
|
+
from typing_extensions import TypedDict
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class CreatorProfile(TypedDict, total=False):
|
|
11
|
+
"""Public creator profile attached to a template."""
|
|
12
|
+
|
|
13
|
+
id: str
|
|
14
|
+
user_id: str
|
|
15
|
+
name: str
|
|
16
|
+
about: str | None
|
|
17
|
+
display_photo: str | None
|
|
18
|
+
socials: dict[str, Any]
|
|
19
|
+
created_at: str
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
class TemplateResponse(TypedDict, total=False):
|
|
23
|
+
"""Response representing a workflow template."""
|
|
24
|
+
|
|
25
|
+
id: str
|
|
26
|
+
creator_id: str
|
|
27
|
+
creator: dict[str, Any]
|
|
28
|
+
name: str
|
|
29
|
+
description: str | None
|
|
30
|
+
tags: list[str]
|
|
31
|
+
workflow_schema: dict[str, Any]
|
|
32
|
+
input: dict[str, Any]
|
|
33
|
+
config: dict[str, Any]
|
|
34
|
+
schema_image_url: str | None
|
|
35
|
+
visibility: str
|
|
36
|
+
status: str
|
|
37
|
+
like_count: int
|
|
38
|
+
used_count: int
|
|
39
|
+
is_liked: bool
|
|
40
|
+
edit_version: int
|
|
41
|
+
created_at: str
|
|
42
|
+
updated_at: str
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
class TemplateListResponse(TypedDict, total=False):
|
|
46
|
+
"""Paginated list response for templates."""
|
|
47
|
+
|
|
48
|
+
templates: list[Any]
|
|
49
|
+
total: int
|
|
50
|
+
cached: bool
|