UncountablePythonSDK 0.0.74__py3-none-any.whl → 0.0.76__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.

Potentially problematic release.


This version of UncountablePythonSDK might be problematic. Click here for more details.

Files changed (35) hide show
  1. {UncountablePythonSDK-0.0.74.dist-info → UncountablePythonSDK-0.0.76.dist-info}/METADATA +2 -2
  2. {UncountablePythonSDK-0.0.74.dist-info → UncountablePythonSDK-0.0.76.dist-info}/RECORD +35 -29
  3. {UncountablePythonSDK-0.0.74.dist-info → UncountablePythonSDK-0.0.76.dist-info}/WHEEL +1 -1
  4. docs/requirements.txt +1 -1
  5. examples/async_batch.py +3 -3
  6. pkgs/serialization/serial_class.py +3 -0
  7. pkgs/type_spec/builder.py +7 -8
  8. pkgs/type_spec/emit_python.py +6 -6
  9. pkgs/type_spec/emit_typescript.py +7 -237
  10. pkgs/type_spec/emit_typescript_util.py +235 -0
  11. uncountable/core/environment.py +15 -2
  12. uncountable/integration/construct_client.py +3 -4
  13. uncountable/integration/queue_runner/job_scheduler.py +1 -1
  14. uncountable/integration/queue_runner/worker.py +17 -22
  15. uncountable/integration/scan_profiles.py +39 -15
  16. uncountable/integration/server.py +4 -12
  17. uncountable/integration/telemetry.py +2 -2
  18. uncountable/integration/webhook_server/entrypoint.py +4 -10
  19. uncountable/types/__init__.py +8 -0
  20. uncountable/types/api/entity/create_entities.py +4 -2
  21. uncountable/types/api/entity/create_entity.py +4 -2
  22. uncountable/types/api/entity/grant_entity_permissions.py +48 -0
  23. uncountable/types/api/recipes/get_column_calculation_values.py +58 -0
  24. uncountable/types/async_batch_processor.py +43 -0
  25. uncountable/types/async_batch_t.py +1 -0
  26. uncountable/types/auth_retrieval.py +12 -0
  27. uncountable/types/auth_retrieval_t.py +75 -0
  28. uncountable/types/client_base.py +62 -4
  29. uncountable/types/entity.py +3 -0
  30. uncountable/types/entity_t.py +20 -0
  31. uncountable/types/integration_server.py +9 -0
  32. uncountable/types/integration_server_t.py +37 -0
  33. uncountable/types/job_definition.py +1 -5
  34. uncountable/types/job_definition_t.py +20 -60
  35. {UncountablePythonSDK-0.0.74.dist-info → UncountablePythonSDK-0.0.76.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,48 @@
1
+ # DO NOT MODIFY -- This file is generated by type_spec
2
+ # flake8: noqa: F821
3
+ # ruff: noqa: E402 Q003
4
+ # fmt: off
5
+ # isort: skip_file
6
+ from __future__ import annotations
7
+ import typing # noqa: F401
8
+ import datetime # noqa: F401
9
+ from decimal import Decimal # noqa: F401
10
+ import dataclasses
11
+ from pkgs.serialization import serial_class
12
+ from ... import async_batch_t
13
+ from ... import entity_t
14
+ from ... import identifier_t
15
+
16
+ __all__: list[str] = [
17
+ "Arguments",
18
+ "Data",
19
+ "ENDPOINT_METHOD",
20
+ "ENDPOINT_PATH",
21
+ ]
22
+
23
+ ENDPOINT_METHOD = "POST"
24
+ ENDPOINT_PATH = "api/external/entity/grant_entity_permissions"
25
+
26
+
27
+ # DO NOT MODIFY -- This file is generated by type_spec
28
+ @serial_class(
29
+ named_type_path="sdk.api.entity.grant_entity_permissions.Arguments",
30
+ )
31
+ @dataclasses.dataclass(kw_only=True)
32
+ class Arguments:
33
+ entity_type: entity_t.LimitedEntityType
34
+ entity_key: identifier_t.IdentifierKey
35
+ permission_types: list[entity_t.GrantableEntityPermissionType]
36
+ user_keys: typing.Optional[list[identifier_t.IdentifierKey]] = None
37
+ user_group_keys: typing.Optional[list[identifier_t.IdentifierKey]] = None
38
+ all_users: typing.Optional[bool] = None
39
+
40
+
41
+ # DO NOT MODIFY -- This file is generated by type_spec
42
+ @serial_class(
43
+ named_type_path="sdk.api.entity.grant_entity_permissions.Data",
44
+ )
45
+ @dataclasses.dataclass(kw_only=True)
46
+ class Data(async_batch_t.AsyncBatchActionReturn):
47
+ pass
48
+ # DO NOT MODIFY -- This file is generated by type_spec
@@ -0,0 +1,58 @@
1
+ # DO NOT MODIFY -- This file is generated by type_spec
2
+ # flake8: noqa: F821
3
+ # ruff: noqa: E402 Q003
4
+ # fmt: off
5
+ # isort: skip_file
6
+ from __future__ import annotations
7
+ import typing # noqa: F401
8
+ import datetime # noqa: F401
9
+ from decimal import Decimal # noqa: F401
10
+ import dataclasses
11
+ from pkgs.serialization import serial_class
12
+ from ... import base_t
13
+ from ... import identifier_t
14
+
15
+ __all__: list[str] = [
16
+ "Arguments",
17
+ "Data",
18
+ "ENDPOINT_METHOD",
19
+ "ENDPOINT_PATH",
20
+ "RecipeColumnCalculationValue",
21
+ ]
22
+
23
+ ENDPOINT_METHOD = "GET"
24
+ ENDPOINT_PATH = "api/external/recipes/get_column_calculation_values"
25
+
26
+
27
+ # DO NOT MODIFY -- This file is generated by type_spec
28
+ @serial_class(
29
+ named_type_path="sdk.api.recipes.get_column_calculation_values.Arguments",
30
+ )
31
+ @dataclasses.dataclass(kw_only=True)
32
+ class Arguments:
33
+ recipe_keys: list[identifier_t.IdentifierKey]
34
+ calculation_key: identifier_t.IdentifierKey
35
+
36
+
37
+ # DO NOT MODIFY -- This file is generated by type_spec
38
+ @serial_class(
39
+ named_type_path="sdk.api.recipes.get_column_calculation_values.RecipeColumnCalculationValue",
40
+ to_string_values={"calculation_quantity"},
41
+ )
42
+ @dataclasses.dataclass(kw_only=True)
43
+ class RecipeColumnCalculationValue:
44
+ recipe_id: base_t.ObjectId
45
+ ingredient_id: base_t.ObjectId
46
+ recipe_step_id: base_t.ObjectId
47
+ recipe_input_id: base_t.ObjectId
48
+ calculation_quantity: typing.Optional[Decimal] = None
49
+
50
+
51
+ # DO NOT MODIFY -- This file is generated by type_spec
52
+ @serial_class(
53
+ named_type_path="sdk.api.recipes.get_column_calculation_values.Data",
54
+ )
55
+ @dataclasses.dataclass(kw_only=True)
56
+ class Data:
57
+ values: list[RecipeColumnCalculationValue]
58
+ # DO NOT MODIFY -- This file is generated by type_spec
@@ -15,7 +15,9 @@ from uncountable.types import base_t
15
15
  import uncountable.types.api.recipes.clear_recipe_outputs as clear_recipe_outputs_t
16
16
  import uncountable.types.api.recipes.create_recipe as create_recipe_t
17
17
  import uncountable.types.api.recipes.edit_recipe_inputs as edit_recipe_inputs_t
18
+ from uncountable.types import entity_t
18
19
  from uncountable.types import generic_upload_t
20
+ import uncountable.types.api.entity.grant_entity_permissions as grant_entity_permissions_t
19
21
  from uncountable.types import identifier_t
20
22
  import uncountable.types.api.uploader.invoke_uploader as invoke_uploader_t
21
23
  from uncountable.types import recipe_identifiers_t
@@ -230,6 +232,47 @@ class AsyncBatchProcessorBase(ABC):
230
232
  batch_reference=req.batch_reference,
231
233
  )
232
234
 
235
+ def grant_entity_permissions(
236
+ self,
237
+ *,
238
+ entity_type: entity_t.LimitedEntityType,
239
+ entity_key: identifier_t.IdentifierKey,
240
+ permission_types: list[entity_t.GrantableEntityPermissionType],
241
+ user_keys: typing.Optional[list[identifier_t.IdentifierKey]] = None,
242
+ user_group_keys: typing.Optional[list[identifier_t.IdentifierKey]] = None,
243
+ all_users: typing.Optional[bool] = None,
244
+ depends_on: typing.Optional[list[str]] = None,
245
+ ) -> async_batch_t.QueuedAsyncBatchRequest:
246
+ """Grant entity permissions to a list of users or user groups or to all users.
247
+
248
+ :param depends_on: A list of batch reference keys to process before processing this request
249
+ """
250
+ args = grant_entity_permissions_t.Arguments(
251
+ entity_type=entity_type,
252
+ entity_key=entity_key,
253
+ permission_types=permission_types,
254
+ user_keys=user_keys,
255
+ user_group_keys=user_group_keys,
256
+ all_users=all_users,
257
+ )
258
+ json_data = serialize_for_api(args)
259
+
260
+ batch_reference = str(uuid.uuid4())
261
+
262
+ req = async_batch_t.AsyncBatchRequest(
263
+ path=async_batch_t.AsyncBatchRequestPath.GRANT_ENTITY_PERMISSIONS,
264
+ data=json_data,
265
+ depends_on=depends_on,
266
+ batch_reference=batch_reference,
267
+ )
268
+
269
+ self._enqueue(req)
270
+
271
+ return async_batch_t.QueuedAsyncBatchRequest(
272
+ path=req.path,
273
+ batch_reference=req.batch_reference,
274
+ )
275
+
233
276
  def invoke_uploader(
234
277
  self,
235
278
  *,
@@ -34,6 +34,7 @@ class AsyncBatchRequestPath(StrEnum):
34
34
  INVOKE_UPLOADER = "uploader/invoke_uploader"
35
35
  ASSOCIATE_RECIPE_AS_INPUT = "recipes/associate_recipe_as_input"
36
36
  CLEAR_RECIPE_OUTPUTS = "recipes/clear_recipe_outputs"
37
+ GRANT_ENTITY_PERMISSIONS = "entity/grant_entity_permissions"
37
38
 
38
39
 
39
40
  # DO NOT MODIFY -- This file is generated by type_spec
@@ -0,0 +1,12 @@
1
+ # flake8: noqa: F821
2
+ # ruff: noqa: E402 Q003
3
+ # fmt: off
4
+ # isort: skip_file
5
+ # DO NOT MODIFY -- This file is generated by type_spec
6
+ # Kept only for SDK backwards compatibility
7
+ from .auth_retrieval_t import AuthRetrievalType as AuthRetrievalType
8
+ from .auth_retrieval_t import AuthRetrievalBase as AuthRetrievalBase
9
+ from .auth_retrieval_t import AuthRetrievalOAuth as AuthRetrievalOAuth
10
+ from .auth_retrieval_t import AuthRetrievalBasic as AuthRetrievalBasic
11
+ from .auth_retrieval_t import AuthRetrieval as AuthRetrieval
12
+ # DO NOT MODIFY -- This file is generated by type_spec
@@ -0,0 +1,75 @@
1
+ # DO NOT MODIFY -- This file is generated by type_spec
2
+ # flake8: noqa: F821
3
+ # ruff: noqa: E402 Q003
4
+ # fmt: off
5
+ # isort: skip_file
6
+ from __future__ import annotations
7
+ import typing # noqa: F401
8
+ import datetime # noqa: F401
9
+ from decimal import Decimal # noqa: F401
10
+ from pkgs.strenum_compat import StrEnum
11
+ import dataclasses
12
+ from pkgs.serialization import serial_class
13
+ from pkgs.serialization import serial_union_annotation
14
+ from . import secret_retrieval_t
15
+
16
+ __all__: list[str] = [
17
+ "AuthRetrieval",
18
+ "AuthRetrievalBase",
19
+ "AuthRetrievalBasic",
20
+ "AuthRetrievalOAuth",
21
+ "AuthRetrievalType",
22
+ ]
23
+
24
+
25
+ # DO NOT MODIFY -- This file is generated by type_spec
26
+ class AuthRetrievalType(StrEnum):
27
+ OAUTH = "oauth"
28
+ BASIC = "basic"
29
+
30
+
31
+ # DO NOT MODIFY -- This file is generated by type_spec
32
+ @serial_class(
33
+ named_type_path="sdk.auth_retrieval.AuthRetrievalBase",
34
+ )
35
+ @dataclasses.dataclass(kw_only=True)
36
+ class AuthRetrievalBase:
37
+ type: AuthRetrievalType
38
+
39
+
40
+ # DO NOT MODIFY -- This file is generated by type_spec
41
+ @serial_class(
42
+ named_type_path="sdk.auth_retrieval.AuthRetrievalOAuth",
43
+ parse_require={"type"},
44
+ )
45
+ @dataclasses.dataclass(kw_only=True)
46
+ class AuthRetrievalOAuth(AuthRetrievalBase):
47
+ type: typing.Literal[AuthRetrievalType.OAUTH] = AuthRetrievalType.OAUTH
48
+ refresh_token_secret: secret_retrieval_t.SecretRetrieval
49
+
50
+
51
+ # DO NOT MODIFY -- This file is generated by type_spec
52
+ @serial_class(
53
+ named_type_path="sdk.auth_retrieval.AuthRetrievalBasic",
54
+ parse_require={"type"},
55
+ )
56
+ @dataclasses.dataclass(kw_only=True)
57
+ class AuthRetrievalBasic(AuthRetrievalBase):
58
+ type: typing.Literal[AuthRetrievalType.BASIC] = AuthRetrievalType.BASIC
59
+ api_id_secret: secret_retrieval_t.SecretRetrieval
60
+ api_key_secret: secret_retrieval_t.SecretRetrieval
61
+
62
+
63
+ # DO NOT MODIFY -- This file is generated by type_spec
64
+ AuthRetrieval = typing.Annotated[
65
+ typing.Union[AuthRetrievalOAuth, AuthRetrievalBasic],
66
+ serial_union_annotation(
67
+ named_type_path="sdk.auth_retrieval.AuthRetrieval",
68
+ discriminator="type",
69
+ discriminator_map={
70
+ "oauth": AuthRetrievalOAuth,
71
+ "basic": AuthRetrievalBasic,
72
+ },
73
+ ),
74
+ ]
75
+ # DO NOT MODIFY -- This file is generated by type_spec
@@ -31,6 +31,7 @@ import uncountable.types.api.batch.execute_batch as execute_batch_t
31
31
  import uncountable.types.api.batch.execute_batch_load_async as execute_batch_load_async_t
32
32
  from uncountable.types import field_values_t
33
33
  from uncountable.types import generic_upload_t
34
+ import uncountable.types.api.recipes.get_column_calculation_values as get_column_calculation_values_t
34
35
  import uncountable.types.api.recipes.get_curve as get_curve_t
35
36
  import uncountable.types.api.entity.get_entities_data as get_entities_data_t
36
37
  import uncountable.types.api.inputs.get_input_data as get_input_data_t
@@ -47,6 +48,7 @@ import uncountable.types.api.recipe_metadata.get_recipe_metadata_data as get_rec
47
48
  import uncountable.types.api.recipes.get_recipe_names as get_recipe_names_t
48
49
  import uncountable.types.api.recipes.get_recipe_output_metadata as get_recipe_output_metadata_t
49
50
  import uncountable.types.api.recipes.get_recipes_data as get_recipes_data_t
51
+ import uncountable.types.api.entity.grant_entity_permissions as grant_entity_permissions_t
50
52
  from uncountable.types import id_source_t
51
53
  from uncountable.types import identifier_t
52
54
  import uncountable.types.api.uploader.invoke_uploader as invoke_uploader_t
@@ -256,18 +258,21 @@ class ClientMethods(ABC):
256
258
  def create_entities(
257
259
  self,
258
260
  *,
259
- definition_id: base_t.ObjectId,
260
- entity_type: typing.Union[typing.Literal[entity_t.EntityType.LAB_REQUEST], typing.Literal[entity_t.EntityType.APPROVAL], typing.Literal[entity_t.EntityType.CUSTOM_ENTITY], typing.Literal[entity_t.EntityType.INVENTORY_AMOUNT], typing.Literal[entity_t.EntityType.TASK], typing.Literal[entity_t.EntityType.PROJECT], typing.Literal[entity_t.EntityType.EQUIPMENT], typing.Literal[entity_t.EntityType.INV_LOCAL_LOCATIONS], typing.Literal[entity_t.EntityType.FIELD_OPTION_SET], typing.Literal[entity_t.EntityType.WEBHOOK], typing.Literal[entity_t.EntityType.SPECS], typing.Literal[entity_t.EntityType.GOAL], typing.Literal[entity_t.EntityType.INGREDIENT_TAG_MAP], typing.Literal[entity_t.EntityType.INGREDIENT_TAG], typing.Literal[entity_t.EntityType.OUTPUT]],
261
+ entity_type: entity_t.LimitedEntityType,
261
262
  entities_to_create: list[create_entities_t.EntityToCreate],
263
+ definition_id: typing.Optional[base_t.ObjectId] = None,
264
+ definition_key: typing.Optional[identifier_t.IdentifierKey] = None,
262
265
  ) -> create_entities_t.Data:
263
266
  """Creates new Uncountable entities
264
267
 
265
268
  :param definition_id: Definition id for the entities to create
269
+ :param definition_key: Key for the definition of the entities to create
266
270
  :param entity_type: The type of the entities to create
267
271
  :param entities_to_create: A list of the entities to create
268
272
  """
269
273
  args = create_entities_t.Arguments(
270
274
  definition_id=definition_id,
275
+ definition_key=definition_key,
271
276
  entity_type=entity_type,
272
277
  entities_to_create=entities_to_create,
273
278
  )
@@ -281,17 +286,20 @@ class ClientMethods(ABC):
281
286
  def create_entity(
282
287
  self,
283
288
  *,
284
- definition_id: base_t.ObjectId,
285
- entity_type: typing.Union[typing.Literal[entity_t.EntityType.LAB_REQUEST], typing.Literal[entity_t.EntityType.APPROVAL], typing.Literal[entity_t.EntityType.CUSTOM_ENTITY], typing.Literal[entity_t.EntityType.INVENTORY_AMOUNT], typing.Literal[entity_t.EntityType.TASK], typing.Literal[entity_t.EntityType.PROJECT], typing.Literal[entity_t.EntityType.EQUIPMENT], typing.Literal[entity_t.EntityType.INV_LOCAL_LOCATIONS], typing.Literal[entity_t.EntityType.FIELD_OPTION_SET], typing.Literal[entity_t.EntityType.WEBHOOK], typing.Literal[entity_t.EntityType.SPECS], typing.Literal[entity_t.EntityType.GOAL], typing.Literal[entity_t.EntityType.INGREDIENT_TAG_MAP], typing.Literal[entity_t.EntityType.INGREDIENT_TAG], typing.Literal[entity_t.EntityType.OUTPUT]],
289
+ entity_type: entity_t.LimitedEntityType,
290
+ definition_id: typing.Optional[base_t.ObjectId] = None,
291
+ definition_key: typing.Optional[identifier_t.IdentifierKey] = None,
286
292
  field_values: typing.Optional[typing.Optional[list[field_values_t.FieldRefNameValue]]] = None,
287
293
  ) -> create_entity_t.Data:
288
294
  """Creates a new Uncountable entity
289
295
 
290
296
  :param definition_id: Definition id of the entity to create
297
+ :param definition_key: Key for the definition of the entity to create
291
298
  :param entity_type: The type of the entities requested
292
299
  """
293
300
  args = create_entity_t.Arguments(
294
301
  definition_id=definition_id,
302
+ definition_key=definition_key,
295
303
  entity_type=entity_type,
296
304
  field_values=field_values,
297
305
  )
@@ -491,6 +499,28 @@ class ClientMethods(ABC):
491
499
  )
492
500
  return self.do_request(api_request=api_request, return_type=execute_batch_load_async_t.Data)
493
501
 
502
+ def get_column_calculation_values(
503
+ self,
504
+ *,
505
+ recipe_keys: list[identifier_t.IdentifierKey],
506
+ calculation_key: identifier_t.IdentifierKey,
507
+ ) -> get_column_calculation_values_t.Data:
508
+ """Get the values for a column calculations for recipes
509
+
510
+ :param recipe_keys: Required: The recipe keys to load values for
511
+ :param calculation_key: Required: The calculation key to get the values for
512
+ """
513
+ args = get_column_calculation_values_t.Arguments(
514
+ recipe_keys=recipe_keys,
515
+ calculation_key=calculation_key,
516
+ )
517
+ api_request = APIRequest(
518
+ method=get_column_calculation_values_t.ENDPOINT_METHOD,
519
+ endpoint=get_column_calculation_values_t.ENDPOINT_PATH,
520
+ args=args,
521
+ )
522
+ return self.do_request(api_request=api_request, return_type=get_column_calculation_values_t.Data)
523
+
494
524
  def get_curve(
495
525
  self,
496
526
  *,
@@ -873,6 +903,34 @@ class ClientMethods(ABC):
873
903
  )
874
904
  return self.do_request(api_request=api_request, return_type=get_recipes_data_t.Data)
875
905
 
906
+ def grant_entity_permissions(
907
+ self,
908
+ *,
909
+ entity_type: entity_t.LimitedEntityType,
910
+ entity_key: identifier_t.IdentifierKey,
911
+ permission_types: list[entity_t.GrantableEntityPermissionType],
912
+ user_keys: typing.Optional[list[identifier_t.IdentifierKey]] = None,
913
+ user_group_keys: typing.Optional[list[identifier_t.IdentifierKey]] = None,
914
+ all_users: typing.Optional[bool] = None,
915
+ ) -> grant_entity_permissions_t.Data:
916
+ """Grant entity permissions to a list of users or user groups or to all users.
917
+
918
+ """
919
+ args = grant_entity_permissions_t.Arguments(
920
+ entity_type=entity_type,
921
+ entity_key=entity_key,
922
+ permission_types=permission_types,
923
+ user_keys=user_keys,
924
+ user_group_keys=user_group_keys,
925
+ all_users=all_users,
926
+ )
927
+ api_request = APIRequest(
928
+ method=grant_entity_permissions_t.ENDPOINT_METHOD,
929
+ endpoint=grant_entity_permissions_t.ENDPOINT_PATH,
930
+ args=args,
931
+ )
932
+ return self.do_request(api_request=api_request, return_type=grant_entity_permissions_t.Data)
933
+
876
934
  def invoke_uploader(
877
935
  self,
878
936
  *,
@@ -5,5 +5,8 @@
5
5
  # DO NOT MODIFY -- This file is generated by type_spec
6
6
  # Kept only for SDK backwards compatibility
7
7
  from .entity_t import EntityType as EntityType
8
+ from .entity_t import LimitedEntityType as LimitedEntityType
9
+ from .entity_t import EntityPermissionType as EntityPermissionType
10
+ from .entity_t import GrantableEntityPermissionType as GrantableEntityPermissionType
8
11
  from .entity_t import Entity as Entity
9
12
  # DO NOT MODIFY -- This file is generated by type_spec
@@ -15,7 +15,10 @@ from . import base_t
15
15
 
16
16
  __all__: list[str] = [
17
17
  "Entity",
18
+ "EntityPermissionType",
18
19
  "EntityType",
20
+ "GrantableEntityPermissionType",
21
+ "LimitedEntityType",
19
22
  ]
20
23
 
21
24
 
@@ -331,6 +334,23 @@ class EntityType(StrEnum):
331
334
  UPLOADER = "uploader"
332
335
 
333
336
 
337
+ # DO NOT MODIFY -- This file is generated by type_spec
338
+ LimitedEntityType = typing.Union[typing.Literal[EntityType.LAB_REQUEST], typing.Literal[EntityType.APPROVAL], typing.Literal[EntityType.CUSTOM_ENTITY], typing.Literal[EntityType.INVENTORY_AMOUNT], typing.Literal[EntityType.TASK], typing.Literal[EntityType.PROJECT], typing.Literal[EntityType.EQUIPMENT], typing.Literal[EntityType.INV_LOCAL_LOCATIONS], typing.Literal[EntityType.FIELD_OPTION_SET], typing.Literal[EntityType.WEBHOOK], typing.Literal[EntityType.SPECS], typing.Literal[EntityType.GOAL], typing.Literal[EntityType.INGREDIENT_TAG_MAP], typing.Literal[EntityType.INGREDIENT_TAG], typing.Literal[EntityType.CONDITION_PARAMETER], typing.Literal[EntityType.OUTPUT]]
339
+
340
+
341
+ # DO NOT MODIFY -- This file is generated by type_spec
342
+ class EntityPermissionType(StrEnum):
343
+ READ = "read"
344
+ WRITE = "write"
345
+ CREATE = "create"
346
+ REOPEN = "reopen"
347
+ ADMIN = "admin"
348
+
349
+
350
+ # DO NOT MODIFY -- This file is generated by type_spec
351
+ GrantableEntityPermissionType = typing.Union[typing.Literal[EntityPermissionType.READ], typing.Literal[EntityPermissionType.WRITE]]
352
+
353
+
334
354
  # DO NOT MODIFY -- This file is generated by type_spec
335
355
  @serial_class(
336
356
  named_type_path="sdk.entity.Entity",
@@ -0,0 +1,9 @@
1
+ # flake8: noqa: F821
2
+ # ruff: noqa: E402 Q003
3
+ # fmt: off
4
+ # isort: skip_file
5
+ # DO NOT MODIFY -- This file is generated by type_spec
6
+ # Kept only for SDK backwards compatibility
7
+ from .integration_server_t import IntegrationEnvironment as IntegrationEnvironment
8
+ from .integration_server_t import EnvironmentConfig as EnvironmentConfig
9
+ # DO NOT MODIFY -- This file is generated by type_spec
@@ -0,0 +1,37 @@
1
+ # DO NOT MODIFY -- This file is generated by type_spec
2
+ # flake8: noqa: F821
3
+ # ruff: noqa: E402 Q003
4
+ # fmt: off
5
+ # isort: skip_file
6
+ from __future__ import annotations
7
+ import typing # noqa: F401
8
+ import datetime # noqa: F401
9
+ from decimal import Decimal # noqa: F401
10
+ from pkgs.strenum_compat import StrEnum
11
+ import dataclasses
12
+ from pkgs.serialization import serial_class
13
+ from . import auth_retrieval_t
14
+ from . import client_config_t
15
+
16
+ __all__: list[str] = [
17
+ "EnvironmentConfig",
18
+ "IntegrationEnvironment",
19
+ ]
20
+
21
+
22
+ # DO NOT MODIFY -- This file is generated by type_spec
23
+ class IntegrationEnvironment(StrEnum):
24
+ LOCAL = "local"
25
+ PROD = "prod"
26
+
27
+
28
+ # DO NOT MODIFY -- This file is generated by type_spec
29
+ @serial_class(
30
+ named_type_path="sdk.integration_server.EnvironmentConfig",
31
+ )
32
+ @dataclasses.dataclass(kw_only=True)
33
+ class EnvironmentConfig:
34
+ auth_retrieval: auth_retrieval_t.AuthRetrieval
35
+ base_url: str
36
+ client_options: typing.Optional[client_config_t.ClientConfigOptions] = None
37
+ # DO NOT MODIFY -- This file is generated by type_spec
@@ -6,7 +6,6 @@
6
6
  # Kept only for SDK backwards compatibility
7
7
  from .job_definition_t import JobDefinitionType as JobDefinitionType
8
8
  from .job_definition_t import JobExecutorType as JobExecutorType
9
- from .job_definition_t import AuthRetrievalType as AuthRetrievalType
10
9
  from .job_definition_t import GenericUploadDataSourceType as GenericUploadDataSourceType
11
10
  from .job_definition_t import JobExecutorBase as JobExecutorBase
12
11
  from .job_definition_t import JobExecutorScript as JobExecutorScript
@@ -17,14 +16,11 @@ from .job_definition_t import GenericUploadDataSourceS3 as GenericUploadDataSour
17
16
  from .job_definition_t import GenericUploadDataSource as GenericUploadDataSource
18
17
  from .job_definition_t import JobExecutorGenericUpload as JobExecutorGenericUpload
19
18
  from .job_definition_t import JobExecutor as JobExecutor
19
+ from .job_definition_t import JobLoggingSettings as JobLoggingSettings
20
20
  from .job_definition_t import JobDefinitionBase as JobDefinitionBase
21
21
  from .job_definition_t import CronJobDefinition as CronJobDefinition
22
22
  from .job_definition_t import WebhookJobDefinition as WebhookJobDefinition
23
23
  from .job_definition_t import JobDefinition as JobDefinition
24
- from .job_definition_t import AuthRetrievalBase as AuthRetrievalBase
25
- from .job_definition_t import AuthRetrievalOAuth as AuthRetrievalOAuth
26
- from .job_definition_t import AuthRetrievalBasic as AuthRetrievalBasic
27
- from .job_definition_t import AuthRetrieval as AuthRetrieval
28
24
  from .job_definition_t import ProfileDefinition as ProfileDefinition
29
25
  from .job_definition_t import ProfileMetadata as ProfileMetadata
30
26
  from .job_definition_t import JobResult as JobResult
@@ -11,16 +11,14 @@ from pkgs.strenum_compat import StrEnum
11
11
  import dataclasses
12
12
  from pkgs.serialization import serial_class
13
13
  from pkgs.serialization import serial_union_annotation
14
+ from . import auth_retrieval_t
15
+ from . import base_t
14
16
  from . import client_config_t
15
17
  from . import generic_upload_t
18
+ from . import integration_server_t
16
19
  from . import secret_retrieval_t
17
20
 
18
21
  __all__: list[str] = [
19
- "AuthRetrieval",
20
- "AuthRetrievalBase",
21
- "AuthRetrievalBasic",
22
- "AuthRetrievalOAuth",
23
- "AuthRetrievalType",
24
22
  "CronJobDefinition",
25
23
  "GenericUploadDataSource",
26
24
  "GenericUploadDataSourceBase",
@@ -35,6 +33,7 @@ __all__: list[str] = [
35
33
  "JobExecutorGenericUpload",
36
34
  "JobExecutorScript",
37
35
  "JobExecutorType",
36
+ "JobLoggingSettings",
38
37
  "JobResult",
39
38
  "ProfileDefinition",
40
39
  "ProfileMetadata",
@@ -55,12 +54,6 @@ class JobExecutorType(StrEnum):
55
54
  GENERIC_UPLOAD = "generic_upload"
56
55
 
57
56
 
58
- # DO NOT MODIFY -- This file is generated by type_spec
59
- class AuthRetrievalType(StrEnum):
60
- OAUTH = "oauth"
61
- BASIC = "basic"
62
-
63
-
64
57
  # DO NOT MODIFY -- This file is generated by type_spec
65
58
  class GenericUploadDataSourceType(StrEnum):
66
59
  SFTP = "sftp"
@@ -172,6 +165,16 @@ JobExecutor = typing.Annotated[
172
165
  ]
173
166
 
174
167
 
168
+ # DO NOT MODIFY -- This file is generated by type_spec
169
+ @serial_class(
170
+ named_type_path="sdk.job_definition.JobLoggingSettings",
171
+ )
172
+ @dataclasses.dataclass(kw_only=True)
173
+ class JobLoggingSettings:
174
+ enabled: bool = False
175
+ share_with_user_groups: typing.Optional[list[base_t.ObjectId]] = None
176
+
177
+
175
178
  # DO NOT MODIFY -- This file is generated by type_spec
176
179
  @serial_class(
177
180
  named_type_path="sdk.job_definition.JobDefinitionBase",
@@ -182,6 +185,7 @@ class JobDefinitionBase:
182
185
  name: str
183
186
  executor: JobExecutor
184
187
  enabled: bool = True
188
+ logging_settings: typing.Optional[JobLoggingSettings] = None
185
189
 
186
190
 
187
191
  # DO NOT MODIFY -- This file is generated by type_spec
@@ -220,62 +224,17 @@ JobDefinition = typing.Annotated[
220
224
  ]
221
225
 
222
226
 
223
- # DO NOT MODIFY -- This file is generated by type_spec
224
- @serial_class(
225
- named_type_path="sdk.job_definition.AuthRetrievalBase",
226
- )
227
- @dataclasses.dataclass(kw_only=True)
228
- class AuthRetrievalBase:
229
- type: AuthRetrievalType
230
-
231
-
232
- # DO NOT MODIFY -- This file is generated by type_spec
233
- @serial_class(
234
- named_type_path="sdk.job_definition.AuthRetrievalOAuth",
235
- parse_require={"type"},
236
- )
237
- @dataclasses.dataclass(kw_only=True)
238
- class AuthRetrievalOAuth(AuthRetrievalBase):
239
- type: typing.Literal[AuthRetrievalType.OAUTH] = AuthRetrievalType.OAUTH
240
- refresh_token_secret: secret_retrieval_t.SecretRetrieval
241
-
242
-
243
- # DO NOT MODIFY -- This file is generated by type_spec
244
- @serial_class(
245
- named_type_path="sdk.job_definition.AuthRetrievalBasic",
246
- parse_require={"type"},
247
- )
248
- @dataclasses.dataclass(kw_only=True)
249
- class AuthRetrievalBasic(AuthRetrievalBase):
250
- type: typing.Literal[AuthRetrievalType.BASIC] = AuthRetrievalType.BASIC
251
- api_id_secret: secret_retrieval_t.SecretRetrieval
252
- api_key_secret: secret_retrieval_t.SecretRetrieval
253
-
254
-
255
- # DO NOT MODIFY -- This file is generated by type_spec
256
- AuthRetrieval = typing.Annotated[
257
- typing.Union[AuthRetrievalOAuth, AuthRetrievalBasic],
258
- serial_union_annotation(
259
- named_type_path="sdk.job_definition.AuthRetrieval",
260
- discriminator="type",
261
- discriminator_map={
262
- "oauth": AuthRetrievalOAuth,
263
- "basic": AuthRetrievalBasic,
264
- },
265
- ),
266
- ]
267
-
268
-
269
227
  # DO NOT MODIFY -- This file is generated by type_spec
270
228
  @serial_class(
271
229
  named_type_path="sdk.job_definition.ProfileDefinition",
272
230
  )
273
231
  @dataclasses.dataclass(kw_only=True)
274
232
  class ProfileDefinition:
275
- auth_retrieval: AuthRetrieval
276
- base_url: str
277
233
  jobs: list[JobDefinition]
234
+ auth_retrieval: typing.Optional[auth_retrieval_t.AuthRetrieval] = None
235
+ base_url: typing.Optional[str] = None
278
236
  client_options: typing.Optional[client_config_t.ClientConfigOptions] = None
237
+ environments: typing.Optional[dict[integration_server_t.IntegrationEnvironment, integration_server_t.EnvironmentConfig]] = None
279
238
 
280
239
 
281
240
  # DO NOT MODIFY -- This file is generated by type_spec
@@ -286,8 +245,9 @@ class ProfileDefinition:
286
245
  class ProfileMetadata:
287
246
  name: str
288
247
  base_url: str
289
- auth_retrieval: AuthRetrieval
248
+ auth_retrieval: auth_retrieval_t.AuthRetrieval
290
249
  client_options: typing.Optional[client_config_t.ClientConfigOptions]
250
+ jobs: list[JobDefinition]
291
251
 
292
252
 
293
253
  # DO NOT MODIFY -- This file is generated by type_spec