kodexa 7.0.11058299779__py3-none-any.whl → 7.0.11123031191__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 CHANGED
@@ -1,6 +1,6 @@
1
1
  from __future__ import annotations
2
2
 
3
- from typing import Union
3
+ from typing import Union, Set
4
4
  from enum import Enum
5
5
  from typing import Optional, List, Dict, Any
6
6
  from pydantic import AnyUrl, Field, RootModel, BaseModel, ConfigDict
@@ -2548,9 +2548,16 @@ class TaxonCardinality(Enum):
2548
2548
  ONCE_PER_SEGMENT = "ONCE_PER_SEGMENT"
2549
2549
  MULTIPLE_PER_SEGMENT = "MULTIPLE_PER_SEGMENT"
2550
2550
 
2551
+ class TaxonAdditionContextType(str, Enum):
2552
+ RECORD_DEFINITION = "RECORD_DEFINITION"
2553
+ RECORD_SECTION_STARTER_MARKER = "RECORD_SECTION_STARTER_MARKER"
2554
+ RECORD_SECTION_END_MARKER = "RECORD_SECTION_END_MARKER"
2555
+ RECORD_START_MARKER = "RECORD_START_MARKER"
2556
+ RECORD_END_MARKER = "RECORD_END_MARKER"
2551
2557
 
2552
2558
  class TaxonAdditionContext(BaseModel):
2553
- context: Optional[str] = None
2559
+ type: TaxonAdditionContextType
2560
+ context: str
2554
2561
  weight: Optional[float] = None
2555
2562
  negative: Optional[bool] = None
2556
2563
 
@@ -2863,6 +2870,62 @@ class Project(BaseModel):
2863
2870
  options: Optional[ProjectOptions] = Field(None, alias="options")
2864
2871
 
2865
2872
 
2873
+ class TaskStatus(str, Enum):
2874
+ TODO = "TODO"
2875
+ IN_PROGRESS = "IN_PROGRESS"
2876
+ DONE = "DONE"
2877
+
2878
+
2879
+ class TaskCheckItem(BaseModel):
2880
+
2881
+ model_config = ConfigDict(
2882
+ populate_by_name=True,
2883
+ use_enum_values=True,
2884
+ arbitrary_types_allowed=True,
2885
+ protected_namespaces=("model_config",),
2886
+ )
2887
+
2888
+ name: str
2889
+ description: Optional[str] = None
2890
+ taxon_path: Optional[str] = Field(None, alias="taxonPath")
2891
+ taxonomy_ref: Optional[str] = Field(None, alias="taxonomyRef")
2892
+
2893
+
2894
+ class TaskMetadata(BaseModel):
2895
+
2896
+ model_config = ConfigDict(
2897
+ populate_by_name=True,
2898
+ use_enum_values=True,
2899
+ arbitrary_types_allowed=True,
2900
+ protected_namespaces=("model_config",),
2901
+ )
2902
+
2903
+ field_values: Dict[str, Any] = Field(default_factory=dict)
2904
+ fields: List[Option] = Field(default_factory=list)
2905
+ check_items: List[TaskCheckItem] = Field(default_factory=list)
2906
+ document_store_ref: Optional[str] = None
2907
+
2908
+
2909
+ class Task(BaseModel):
2910
+
2911
+ model_config = ConfigDict(
2912
+ populate_by_name=True,
2913
+ use_enum_values=True,
2914
+ arbitrary_types_allowed=True,
2915
+ protected_namespaces=("model_config",),
2916
+ )
2917
+
2918
+ project: Optional['Project'] = Field(None)
2919
+ title: Optional[str] = Field(None)
2920
+ template: Optional[bool] = Field(None)
2921
+ description: Optional[str] = Field(None)
2922
+ metadata: Optional['TaskMetadata'] = Field(None)
2923
+ due_date: Optional[StandardDateTime] = Field(None, alias="dueDate")
2924
+ completed_date: Optional[StandardDateTime] = Field(None, alias="completedDate")
2925
+ status: Optional['TaskStatus'] = Field(None)
2926
+ assignee: Optional['User'] = Field(None)
2927
+
2928
+
2866
2929
  class FeatureSet(BaseModel):
2867
2930
  """
2868
2931
 
@@ -3425,6 +3488,28 @@ class PageMessage(BaseModel):
3425
3488
  empty: Optional[bool] = None
3426
3489
 
3427
3490
 
3491
+ class PageTask(BaseModel):
3492
+ """
3493
+
3494
+ """
3495
+ model_config = ConfigDict(
3496
+ populate_by_name=True,
3497
+ use_enum_values=True,
3498
+ arbitrary_types_allowed=True,
3499
+ protected_namespaces=("model_config",),
3500
+ )
3501
+ total_pages: Optional[int] = Field(None, alias="totalPages")
3502
+ total_elements: Optional[int] = Field(None, alias="totalElements")
3503
+ size: Optional[int] = None
3504
+ content: Optional[List[Task]] = None
3505
+ number: Optional[int] = None
3506
+
3507
+ number_of_elements: Optional[int] = Field(None, alias="numberOfElements")
3508
+ first: Optional[bool] = None
3509
+ last: Optional[bool] = None
3510
+ empty: Optional[bool] = None
3511
+
3512
+
3428
3513
  class PageChannel(BaseModel):
3429
3514
  """
3430
3515
 
kodexa/platform/client.py CHANGED
@@ -86,7 +86,7 @@ from kodexa.model.objects import (
86
86
  PageExtensionPack,
87
87
  PageOrganization,
88
88
  DocumentFamilyStatistics, MessageContext, PagePrompt, Prompt, GuidanceSet, PageGuidanceSet, DocumentEmbedding,
89
- DocumentExternalData,
89
+ DocumentExternalData, Task, PageTask,
90
90
  )
91
91
 
92
92
  logger = logging.getLogger()
@@ -1173,6 +1173,11 @@ class PagePipelineEndpoint(PagePipeline, PageEndpoint):
1173
1173
  return "pipeline"
1174
1174
 
1175
1175
 
1176
+ class PageTaskEndpoint(PageTask, PageEndpoint):
1177
+ def get_type(self) -> Optional[str]:
1178
+ return "task"
1179
+
1180
+
1176
1181
  class PageProjectEndpoint(PageProject, PageEndpoint):
1177
1182
  """Represents a page project endpoint.
1178
1183
 
@@ -2516,15 +2521,25 @@ class WorkspaceEndpoint(EntityEndpoint, Workspace):
2516
2521
  else:
2517
2522
  raise ValueError("Workspace has no channel")
2518
2523
 
2524
+ class TaskEndpoint(EntityEndpoint, Task):
2525
+ """Represents a task endpoint.
2526
+
2527
+ This class is used to interact with the task endpoint of the API.
2528
+ """
2529
+ def get_type(self) -> str:
2530
+ """Get the type of the endpoint.
2531
+
2532
+ Returns:
2533
+ str: The type of the endpoint, in this case "projects".
2534
+ """
2535
+ return "tasks"
2536
+
2519
2537
 
2520
2538
  class ProjectEndpoint(EntityEndpoint, Project):
2521
2539
  """Represents a project endpoint.
2522
2540
 
2523
2541
  This class is used to interact with the project endpoint of the API.
2524
2542
  """
2525
-
2526
- """Represents a project endpoint"""
2527
-
2528
2543
  def get_type(self) -> str:
2529
2544
  """Get the type of the endpoint.
2530
2545
 
@@ -2849,6 +2864,39 @@ class AssistantsEndpoint(EntitiesEndpoint):
2849
2864
  return PageAssistantEndpoint
2850
2865
 
2851
2866
 
2867
+ class TasksEndpoint(EntitiesEndpoint):
2868
+ """Represents a projects endpoint"""
2869
+
2870
+ """Represents a projects endpoint"""
2871
+
2872
+ def get_type(self) -> str:
2873
+ """
2874
+ Get the type of the endpoint.
2875
+
2876
+ Returns:
2877
+ str: The type of the endpoint.
2878
+ """
2879
+ return "tasks"
2880
+
2881
+ def get_instance_class(self, object_dict=None):
2882
+ """
2883
+ Get the instance class of the endpoint.
2884
+
2885
+ Returns:
2886
+ ProjectEndpoint: The instance class of the endpoint.
2887
+ """
2888
+ return TaskEndpoint
2889
+
2890
+ def get_page_class(self, object_dict=None):
2891
+ """
2892
+ Get the page class of the endpoint.
2893
+
2894
+ Returns:
2895
+ PageProjectEndpoint: The page class of the endpoint.
2896
+ """
2897
+ return PageTaskEndpoint
2898
+
2899
+
2852
2900
  class ProjectsEndpoint(EntitiesEndpoint):
2853
2901
  """Represents a projects endpoint"""
2854
2902
 
@@ -6374,6 +6422,7 @@ class KodexaClient:
6374
6422
  self.messages = MessagesEndpoint(self)
6375
6423
  from kodexa.model.entities.product import ProductsEndpoint
6376
6424
  self.products = ProductsEndpoint(self)
6425
+ self.tasks = TasksEndpoint(self)
6377
6426
 
6378
6427
  @staticmethod
6379
6428
  def login(url, token):
@@ -6969,6 +7018,7 @@ class KodexaClient:
6969
7018
  "guidance": GuidanceSetEndpoint,
6970
7019
  "channel": ChannelEndpoint,
6971
7020
  "product": ProductEndpoint,
7021
+ "task": TaskEndpoint,
6972
7022
  "productSubscription": ProductSubscriptionEndpoint,
6973
7023
  "checkResponse": CheckResponseEndpoint
6974
7024
  }
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: kodexa
3
- Version: 7.0.11058299779
3
+ Version: 7.0.11123031191
4
4
  Summary: Python SDK for the Kodexa Platform
5
5
  Author: Austin Redenbaugh
6
6
  Author-email: austin@kodexa.com
@@ -12,12 +12,12 @@ kodexa/model/entities/check_response.py,sha256=eqBHxO6G2OAziL3p9bHGI-oiPkAG82H6C
12
12
  kodexa/model/entities/product.py,sha256=ZDpHuBE_9FJ-klnkyBvTfPwYOqBkM1wraZMtHqNA8FQ,3526
13
13
  kodexa/model/entities/product_subscription.py,sha256=UcmWR-qgLfdV7VCtJNwzgkanoS8nBSL6ngVuxQUK1M8,3810
14
14
  kodexa/model/model.py,sha256=Ay3X9rsoJaUdG51WysSDPp2iy_cnz4eEYJgWdC25uio,118058
15
- kodexa/model/objects.py,sha256=vIE2C2maCcVzdb_n1wkIfeX5e3pvC-bxQWxxvMBHK6Q,176435
15
+ kodexa/model/objects.py,sha256=umqDkGFm8VxLZCtKoTnEal9ZFu8IT-2bxNGepnLT2Kk,179051
16
16
  kodexa/model/persistence.py,sha256=w4WGS_qH1iowH8-ZMawZBZ2RFW3bNvmFy5fgSwr6VmQ,66198
17
17
  kodexa/pipeline/__init__.py,sha256=sA7f5D6qkdMrpp2xTIeefnrUBI6xxEEWostvxfX_1Cs,236
18
18
  kodexa/pipeline/pipeline.py,sha256=ZYpJAWcwV4YRK589DUhU0vXGQlkNSj4J2TsGbYqTLjo,25221
19
19
  kodexa/platform/__init__.py,sha256=1O3oiWMg292NPL_NacKDnK1T3_R6cMorrPRue_9e-O4,216
20
- kodexa/platform/client.py,sha256=yHzYt32xvkoB8EGWy2A545uIkfajLwJ3P-gsbw9smJ0,222912
20
+ kodexa/platform/client.py,sha256=s1MhDnR827qFUPecDw1OWVj24L2A7g1NprJ_CLX4L_Q,224198
21
21
  kodexa/platform/interaction.py,sha256=6zpcwXKNZstUGNS6m4JsoRXAqCZPJHWI-ZN3co8nnF0,1055
22
22
  kodexa/platform/kodexa.py,sha256=RVtArtzn1TVhBf3NGC4xe-ZO-VEVDIC3RjLhR06p-uU,34033
23
23
  kodexa/selectors/__init__.py,sha256=xA9-4vpyaAZWPSk3bh2kvDLkdv6XEmm7PjFbpziiTIk,100
@@ -42,7 +42,7 @@ kodexa/testing/test_utils.py,sha256=DrLCkHxdb6AbZ-X3WmTMbQmnVIm55VEBL8MjtUK9POs,
42
42
  kodexa/training/__init__.py,sha256=xs2L62YpRkIRfslQwtQZ5Yxjhm7sLzX2TrVX6EuBnZQ,52
43
43
  kodexa/training/train_utils.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
44
44
  kodexa/utils/__init__.py,sha256=Pnim1o9_db5YEnNvDTxpM7HG-qTlL6n8JwFwOafU9wo,5928
45
- kodexa-7.0.11058299779.dist-info/LICENSE,sha256=WNHhf_5RCaeuKWyq_K39vmp9F28LxKsB4SpomwSZ2L0,11357
46
- kodexa-7.0.11058299779.dist-info/METADATA,sha256=0_qilqMPoW_Mdy-zebR1HpqdgPM_FFhZUcU3QOGmXD0,3529
47
- kodexa-7.0.11058299779.dist-info/WHEEL,sha256=Zb28QaM1gQi8f4VCBhsUklF61CTlNYfs9YAZn-TOGFk,88
48
- kodexa-7.0.11058299779.dist-info/RECORD,,
45
+ kodexa-7.0.11123031191.dist-info/LICENSE,sha256=WNHhf_5RCaeuKWyq_K39vmp9F28LxKsB4SpomwSZ2L0,11357
46
+ kodexa-7.0.11123031191.dist-info/METADATA,sha256=LHCeMCemrlnLV7w3A6RoZQoEG1O9vse4Fq9QGLKma-o,3529
47
+ kodexa-7.0.11123031191.dist-info/WHEEL,sha256=Zb28QaM1gQi8f4VCBhsUklF61CTlNYfs9YAZn-TOGFk,88
48
+ kodexa-7.0.11123031191.dist-info/RECORD,,