Skip to content

Commit d9649c5

Browse files
committed
update public api
1 parent f3bda41 commit d9649c5

2 files changed

Lines changed: 28 additions & 1 deletion

File tree

ayon_api/__init__.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,8 @@
148148
enroll_event_job,
149149
get_attributes_schema,
150150
reset_attributes_schema,
151+
reset_attributes_cache,
152+
set_attributes_cache_timeout,
151153
set_attribute_config,
152154
remove_attribute_config,
153155
get_attributes_for_type,
@@ -433,6 +435,8 @@
433435
"enroll_event_job",
434436
"get_attributes_schema",
435437
"reset_attributes_schema",
438+
"reset_attributes_cache",
439+
"set_attributes_cache_timeout",
436440
"set_attribute_config",
437441
"remove_attribute_config",
438442
"get_attributes_for_type",

ayon_api/_api.py

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3582,10 +3582,30 @@ def get_attributes_schema(
35823582

35833583

35843584
def reset_attributes_schema() -> None:
3585+
"""Reset attributes schema cache.
3586+
3587+
DEPRECATED:
3588+
Use 'reset_attributes_cache' instead.
3589+
3590+
"""
35853591
con = get_server_api_connection()
35863592
return con.reset_attributes_schema()
35873593

35883594

3595+
def reset_attributes_cache() -> None:
3596+
con = get_server_api_connection()
3597+
return con.reset_attributes_cache()
3598+
3599+
3600+
def set_attributes_cache_timeout(
3601+
timeout: int,
3602+
) -> None:
3603+
con = get_server_api_connection()
3604+
return con.set_attributes_cache_timeout(
3605+
timeout=timeout,
3606+
)
3607+
3608+
35893609
def set_attribute_config(
35903610
attribute_name: str,
35913611
data: AttributeSchemaDataDict,
@@ -3622,7 +3642,7 @@ def remove_attribute_config(
36223642

36233643
def get_attributes_for_type(
36243644
entity_type: AttributeScope,
3625-
) -> dict[str, AttributeSchemaDict]:
3645+
) -> dict[str, AttributeSchemaDataDict]:
36263646
"""Get attribute schemas available for an entity type.
36273647
36283648
Example::
@@ -3670,6 +3690,9 @@ def get_attributes_fields_for_type(
36703690
) -> set[str]:
36713691
"""Prepare attribute fields for entity type.
36723692
3693+
DEPRECATED: Field 'attrib' is marked as deprecated and should not be
3694+
used for GraphQL queries.
3695+
36733696
Returns:
36743697
set[str]: Attributes fields for entity type.
36753698

0 commit comments

Comments
 (0)