Skip to content

Commit 8a31f41

Browse files
committed
copilot and review comment updates
1 parent f182012 commit 8a31f41

File tree

7 files changed

+47
-329
lines changed

7 files changed

+47
-329
lines changed

README.md

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -298,14 +298,6 @@ j1.delete_relationship(
298298
from_entity_id='<id-of-source-entity>',
299299
to_entity_id='<id-of-destination-entity>'
300300
)
301-
302-
# Delete with timestamp
303-
j1.delete_relationship(
304-
relationship_id='<id-of-relationship-to-delete>',
305-
from_entity_id='<id-of-source-entity>',
306-
to_entity_id='<id-of-destination-entity>',
307-
timestamp=int(time.time()) * 1000
308-
)
309301
```
310302

311303
##### Fetch Graph Entity Properties

examples/03_relationship_management.py

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -180,24 +180,13 @@ def delete_relationship_examples(j1, relationship_id, from_entity_id, to_entity_
180180

181181
print("=== Relationship Deletion Examples ===\n")
182182

183-
# 1. Basic deletion
184183
print("1. Deleting a relationship:")
185184
delete_result = j1.delete_relationship(
186185
relationship_id=relationship_id,
187186
from_entity_id=from_entity_id,
188187
to_entity_id=to_entity_id
189188
)
190189
print(f"Deleted relationship: {delete_result['relationship']['_id']}\n")
191-
192-
# 2. Deletion with timestamp
193-
print("2. Deleting with specific timestamp:")
194-
j1.delete_relationship(
195-
relationship_id=relationship_id,
196-
from_entity_id=from_entity_id,
197-
to_entity_id=to_entity_id,
198-
timestamp=int(time.time()) * 1000
199-
)
200-
print(f"Deleted with timestamp\n")
201190

202191
def relationship_lifecycle_example(j1, from_entity_id, to_entity_id):
203192
"""Demonstrate complete relationship lifecycle."""

examples/snyk_findings_resolved_within_15_days.py

Lines changed: 0 additions & 143 deletions
This file was deleted.

examples/test_list_parameter_items.py

Lines changed: 0 additions & 128 deletions
This file was deleted.

jupiterone/client.py

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -769,15 +769,13 @@ def delete_relationship(
769769
relationship_id: Optional[str] = None,
770770
from_entity_id: Optional[str] = None,
771771
to_entity_id: Optional[str] = None,
772-
timestamp: Optional[int] = None,
773772
) -> Dict[str, Any]:
774773
"""Deletes a relationship between two entities.
775774
776775
args:
777776
relationship_id (str): The _id of the relationship to delete
778777
from_entity_id (str): The _id of the source entity
779778
to_entity_id (str): The _id of the target entity
780-
timestamp (int, optional): Timestamp for the deletion
781779
"""
782780
if not relationship_id:
783781
raise JupiterOneClientError("relationship_id is required")
@@ -792,17 +790,11 @@ def delete_relationship(
792790
raise JupiterOneClientError("to_entity_id is required")
793791
self._validate_entity_id(to_entity_id, "to_entity_id")
794792

795-
if timestamp is not None:
796-
if not isinstance(timestamp, int) or timestamp <= 0:
797-
raise JupiterOneClientError("timestamp must be a positive integer")
798-
799793
variables: Dict[str, Any] = {
800794
"relationshipId": relationship_id,
801795
"fromEntityId": from_entity_id,
802796
"toEntityId": to_entity_id,
803797
}
804-
if timestamp is not None:
805-
variables["timestamp"] = timestamp
806798

807799
response = self._execute_query(DELETE_RELATIONSHIP, variables=variables)
808800
return response["data"]["deleteRelationship"]

jupiterone/constants.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,13 +121,11 @@
121121
$relationshipId: String!
122122
$fromEntityId: String!
123123
$toEntityId: String!
124-
$timestamp: Long
125124
) {
126125
deleteRelationship(
127126
relationshipId: $relationshipId
128127
fromEntityId: $fromEntityId
129128
toEntityId: $toEntityId
130-
timestamp: $timestamp
131129
) {
132130
relationship {
133131
_id

0 commit comments

Comments
 (0)