kodexa 7.4.413698503885__py3-none-any.whl → 7.4.413698864785__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.
- kodexa/model/objects.py +131 -2
- kodexa/platform/client.py +8 -22
- {kodexa-7.4.413698503885.dist-info → kodexa-7.4.413698864785.dist-info}/METADATA +1 -1
- {kodexa-7.4.413698503885.dist-info → kodexa-7.4.413698864785.dist-info}/RECORD +6 -6
- {kodexa-7.4.413698503885.dist-info → kodexa-7.4.413698864785.dist-info}/LICENSE +0 -0
- {kodexa-7.4.413698503885.dist-info → kodexa-7.4.413698864785.dist-info}/WHEEL +0 -0
kodexa/model/objects.py
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
from __future__ import annotations
|
2
2
|
|
3
3
|
from enum import Enum
|
4
|
-
from typing import Optional, List, Dict, Any
|
4
|
+
from typing import Optional, List, Dict, Any, Set
|
5
5
|
from typing import Union
|
6
6
|
|
7
7
|
from pydantic import AnyUrl, Field, RootModel, BaseModel, ConfigDict
|
@@ -3018,13 +3018,142 @@ class Project(BaseModel):
|
|
3018
3018
|
owner: Optional[User] = None
|
3019
3019
|
options: Optional[ProjectOptions] = Field(None, alias="options")
|
3020
3020
|
|
3021
|
-
|
3022
3021
|
class TaskStatusType(str, Enum):
|
3023
3022
|
"""Enum for task status types"""
|
3024
3023
|
TODO = "TODO"
|
3025
3024
|
IN_PROGRESS = "IN_PROGRESS"
|
3026
3025
|
DONE = "DONE"
|
3027
3026
|
|
3027
|
+
class ProjectAttributeStatus(BaseModel):
|
3028
|
+
"""
|
3029
|
+
Represents an attribute status for a project.
|
3030
|
+
"""
|
3031
|
+
model_config = ConfigDict(
|
3032
|
+
populate_by_name=True,
|
3033
|
+
use_enum_values=True,
|
3034
|
+
arbitrary_types_allowed=True,
|
3035
|
+
protected_namespaces=("model_config",),
|
3036
|
+
)
|
3037
|
+
color: Optional[str] = Field(None, max_length=25)
|
3038
|
+
icon: Optional[str] = Field(None, max_length=25)
|
3039
|
+
status: Optional[str] = Field(None, max_length=255)
|
3040
|
+
status_type: Optional[StatusType2] = Field(None, alias="statusType")
|
3041
|
+
|
3042
|
+
class ProjectDocumentStatus(BaseModel):
|
3043
|
+
"""
|
3044
|
+
Represents a document status for a project.
|
3045
|
+
"""
|
3046
|
+
model_config = ConfigDict(
|
3047
|
+
populate_by_name=True,
|
3048
|
+
use_enum_values=True,
|
3049
|
+
arbitrary_types_allowed=True,
|
3050
|
+
protected_namespaces=("model_config",),
|
3051
|
+
)
|
3052
|
+
color: Optional[str] = Field(None, max_length=25)
|
3053
|
+
icon: Optional[str] = Field(None, max_length=25)
|
3054
|
+
status: str = Field(..., max_length=255)
|
3055
|
+
status_type: Optional[StatusType2] = Field(None, alias="statusType")
|
3056
|
+
|
3057
|
+
class ProjectTaskStatus(BaseModel):
|
3058
|
+
"""
|
3059
|
+
Represents a task status for a project.
|
3060
|
+
"""
|
3061
|
+
model_config = ConfigDict(
|
3062
|
+
populate_by_name=True,
|
3063
|
+
use_enum_values=True,
|
3064
|
+
arbitrary_types_allowed=True,
|
3065
|
+
protected_namespaces=("model_config",),
|
3066
|
+
)
|
3067
|
+
color: Optional[str] = Field(None, max_length=25)
|
3068
|
+
icon: Optional[str] = Field(None, max_length=25)
|
3069
|
+
label: str = Field(..., max_length=255)
|
3070
|
+
status_type: Optional[TaskStatusType] = Field(None, alias="statusType")
|
3071
|
+
|
3072
|
+
class ProjectTemplateTag(BaseModel):
|
3073
|
+
"""
|
3074
|
+
Represents a tag for a project template.
|
3075
|
+
"""
|
3076
|
+
model_config = ConfigDict(
|
3077
|
+
populate_by_name=True,
|
3078
|
+
use_enum_values=True,
|
3079
|
+
arbitrary_types_allowed=True,
|
3080
|
+
protected_namespaces=("model_config",),
|
3081
|
+
)
|
3082
|
+
label: Optional[str] = None
|
3083
|
+
color: Optional[str] = None
|
3084
|
+
|
3085
|
+
class ProjectTaskTemplate(BaseModel):
|
3086
|
+
"""
|
3087
|
+
Represents a task template for a project.
|
3088
|
+
"""
|
3089
|
+
model_config = ConfigDict(
|
3090
|
+
populate_by_name=True,
|
3091
|
+
use_enum_values=True,
|
3092
|
+
arbitrary_types_allowed=True,
|
3093
|
+
protected_namespaces=("model_config",),
|
3094
|
+
)
|
3095
|
+
title: Optional[str] = None
|
3096
|
+
description: Optional[str] = None
|
3097
|
+
|
3098
|
+
class ProjectResource(BaseModel):
|
3099
|
+
"""
|
3100
|
+
Represents a resource for a project.
|
3101
|
+
"""
|
3102
|
+
model_config = ConfigDict(
|
3103
|
+
populate_by_name=True,
|
3104
|
+
use_enum_values=True,
|
3105
|
+
arbitrary_types_allowed=True,
|
3106
|
+
protected_namespaces=("model_config",),
|
3107
|
+
)
|
3108
|
+
uri: Optional[str] = None
|
3109
|
+
type: Optional[str] = None
|
3110
|
+
name: Optional[str] = None
|
3111
|
+
description: Optional[str] = None
|
3112
|
+
copy: Optional[bool] = False
|
3113
|
+
slug: Optional[str] = None
|
3114
|
+
original_uri: Optional[str] = Field(None, alias="originalUri")
|
3115
|
+
|
3116
|
+
class WorkspaceResource(BaseModel):
|
3117
|
+
"""
|
3118
|
+
Represents a workspace resource.
|
3119
|
+
"""
|
3120
|
+
model_config = ConfigDict(
|
3121
|
+
populate_by_name=True,
|
3122
|
+
use_enum_values=True,
|
3123
|
+
arbitrary_types_allowed=True,
|
3124
|
+
protected_namespaces=("model_config",),
|
3125
|
+
)
|
3126
|
+
name: Optional[str] = None
|
3127
|
+
description: Optional[str] = None
|
3128
|
+
storage: Optional[WorkspaceStorage] = None
|
3129
|
+
|
3130
|
+
class ProjectTemplateRequest(BaseModel):
|
3131
|
+
"""
|
3132
|
+
Represents a request to create a project template.
|
3133
|
+
"""
|
3134
|
+
model_config = ConfigDict(
|
3135
|
+
populate_by_name=True,
|
3136
|
+
use_enum_values=True,
|
3137
|
+
arbitrary_types_allowed=True,
|
3138
|
+
protected_namespaces=("model_config",),
|
3139
|
+
)
|
3140
|
+
name: Optional[str] = None
|
3141
|
+
description: Optional[str] = None
|
3142
|
+
options: Optional[ProjectOptions] = None
|
3143
|
+
memory: Optional[ProjectMemory] = None
|
3144
|
+
image_url: Optional[str] = Field(None, alias="imageUrl")
|
3145
|
+
icon: Optional[str] = None
|
3146
|
+
overview_markdown: Optional[str] = Field(None, alias="overviewMarkdown")
|
3147
|
+
provider: Optional[str] = None
|
3148
|
+
provider_url: Optional[str] = Field(None, alias="providerUrl")
|
3149
|
+
provider_image_url: Optional[str] = Field(None, alias="providerImageUrl")
|
3150
|
+
public_access: Optional[bool] = Field(False, alias="publicAccess")
|
3151
|
+
resources: List[ProjectResource] = Field(default_factory=list)
|
3152
|
+
workspaces: List[ProjectWorkspace] = Field(default_factory=list)
|
3153
|
+
assistants: List[ProjectAssistant] = Field(default_factory=list)
|
3154
|
+
document_statuses: List[ProjectDocumentStatus] = Field(default_factory=list, alias="documentStatuses")
|
3155
|
+
task_statuses: List[ProjectTaskStatus] = Field(default_factory=list, alias="taskStatuses")
|
3156
|
+
tags: Set[str] = Field(default_factory=set)
|
3028
3157
|
|
3029
3158
|
class TaskStatus(BaseModel):
|
3030
3159
|
"""Model representing a task status entity"""
|
kodexa/platform/client.py
CHANGED
@@ -85,7 +85,7 @@ from kodexa.model.objects import (
|
|
85
85
|
PageOrganization,
|
86
86
|
DocumentFamilyStatistics, MessageContext, PagePrompt, Prompt, GuidanceSet, PageGuidanceSet, DocumentEmbedding,
|
87
87
|
DocumentExternalData, Task, PageTask, RetainedGuidance, PageRetainedGuidance, TaskTemplate, TaskStatus,
|
88
|
-
TaskActivity, TaskDocumentFamily, TaskTag,
|
88
|
+
TaskActivity, TaskDocumentFamily, TaskTag, ProjectTemplateRequest,
|
89
89
|
)
|
90
90
|
|
91
91
|
logger = logging.getLogger()
|
@@ -2886,29 +2886,15 @@ class ProjectEndpoint(EntityEndpoint, Project):
|
|
2886
2886
|
)
|
2887
2887
|
return [ProjectTag.model_validate(tag) for tag in response.json()]
|
2888
2888
|
|
2889
|
-
|
2890
|
-
|
2889
|
+
def create_project_template_request(self) -> ProjectTemplateRequest:
|
2890
|
+
"""Create a project template request from this project.
|
2891
2891
|
|
2892
|
-
|
2893
|
-
|
2894
|
-
|
2895
|
-
|
2896
|
-
|
2897
|
-
|
2898
|
-
def update_data_flow(self, data_flow: "ProjectDataFlow") -> "ProjectDataFlow":
|
2899
|
-
"""Update the data flow of the project.
|
2900
|
-
|
2901
|
-
Args:
|
2902
|
-
data_flow (ProjectDataFlow): The new data flow to associate with the project.
|
2892
|
+
Returns:
|
2893
|
+
ProjectTemplateRequest: A project template request object.
|
2894
|
+
"""
|
2895
|
+
response = self.client.get(f"/api/projects/{self.id}/createProjectTemplateRequest")
|
2896
|
+
return ProjectTemplateRequest.model_validate(response.json())
|
2903
2897
|
|
2904
|
-
Returns:
|
2905
|
-
ProjectDataFlow: The updated data flow associated with the project.
|
2906
|
-
"""
|
2907
|
-
response = self.client.put(
|
2908
|
-
f"/api/projects/{self.id}/dataFlow",
|
2909
|
-
body=data_flow.model_dump(mode="json", by_alias=True),
|
2910
|
-
)
|
2911
|
-
return ProjectDataFlow.model_validate(response.json()).set_client(self.client)
|
2912
2898
|
|
2913
2899
|
|
2914
2900
|
class MessagesEndpoint(EntitiesEndpoint):
|
@@ -13,13 +13,13 @@ kodexa/model/entities/product.py,sha256=StUhTEeLXmc05cj6XnZppQfeJsqCPbX1jdhsysHH
|
|
13
13
|
kodexa/model/entities/product_group.py,sha256=540fRGyUf34h1BzAN1DiWu6rGgvaj3xDFhZ2k-RvSFY,3617
|
14
14
|
kodexa/model/entities/product_subscription.py,sha256=UcmWR-qgLfdV7VCtJNwzgkanoS8nBSL6ngVuxQUK1M8,3810
|
15
15
|
kodexa/model/model.py,sha256=q3zEm6pPOB-xPCKbOxmTMqLALzmQr2Ppam8knApoSEE,119645
|
16
|
-
kodexa/model/objects.py,sha256=
|
16
|
+
kodexa/model/objects.py,sha256=Y1aHbFbVNLhI1Sv9XddmKne4A8mYgVRpdWzc6avF-Uo,196684
|
17
17
|
kodexa/model/persistence.py,sha256=jUgQ8xwsAFIoZ_bEynxCDEWhUII42eN0e0Mum0dkQPg,72043
|
18
18
|
kodexa/model/utils.py,sha256=6R-3rFiW9irBwj0Mq5yhp7EDXkNUFaeFhr3bWmnlW4g,2961
|
19
19
|
kodexa/pipeline/__init__.py,sha256=sA7f5D6qkdMrpp2xTIeefnrUBI6xxEEWostvxfX_1Cs,236
|
20
20
|
kodexa/pipeline/pipeline.py,sha256=zyNEpA7KlGhPs_l-vgV6m-OCb16dbxQhl8QezeylugA,25540
|
21
21
|
kodexa/platform/__init__.py,sha256=1O3oiWMg292NPL_NacKDnK1T3_R6cMorrPRue_9e-O4,216
|
22
|
-
kodexa/platform/client.py,sha256=
|
22
|
+
kodexa/platform/client.py,sha256=NK00OhqiGWWblXTF4g6i2P8ffdN0FHu8z2mXSepsM-k,231947
|
23
23
|
kodexa/platform/interaction.py,sha256=6zpcwXKNZstUGNS6m4JsoRXAqCZPJHWI-ZN3co8nnF0,1055
|
24
24
|
kodexa/platform/kodexa.py,sha256=izvvUUkRUNYFZGMiL4DcJpZ4gZznHpxkfbexV0Vn_38,35041
|
25
25
|
kodexa/selectors/__init__.py,sha256=xA9-4vpyaAZWPSk3bh2kvDLkdv6XEmm7PjFbpziiTIk,100
|
@@ -44,7 +44,7 @@ kodexa/testing/test_utils.py,sha256=v44p__gE7ia67W7WeHN2HBFCWSCUrCZt7G4xBNCmwf8,
|
|
44
44
|
kodexa/training/__init__.py,sha256=xs2L62YpRkIRfslQwtQZ5Yxjhm7sLzX2TrVX6EuBnZQ,52
|
45
45
|
kodexa/training/train_utils.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
46
46
|
kodexa/utils/__init__.py,sha256=Pnim1o9_db5YEnNvDTxpM7HG-qTlL6n8JwFwOafU9wo,5928
|
47
|
-
kodexa-7.4.
|
48
|
-
kodexa-7.4.
|
49
|
-
kodexa-7.4.
|
50
|
-
kodexa-7.4.
|
47
|
+
kodexa-7.4.413698864785.dist-info/LICENSE,sha256=WNHhf_5RCaeuKWyq_K39vmp9F28LxKsB4SpomwSZ2L0,11357
|
48
|
+
kodexa-7.4.413698864785.dist-info/METADATA,sha256=wcIJSD3dHPfQh70UUEOE8ycKT8m9Vo2KuhtM-Iu_3JQ,2813
|
49
|
+
kodexa-7.4.413698864785.dist-info/WHEEL,sha256=Zb28QaM1gQi8f4VCBhsUklF61CTlNYfs9YAZn-TOGFk,88
|
50
|
+
kodexa-7.4.413698864785.dist-info/RECORD,,
|
File without changes
|
File without changes
|