Skip to content

Rename timestamp fields #12

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jun 5, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions clients/python/lightfeed/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ class LightfeedConfig(TypedDict, total=False):
class Timestamps(TypedDict):
"""Timestamp object for records"""

first_seen_time: str # ISO 8601 timestamp when the record was first seen
last_changed_time: str # ISO 8601 timestamp when the record was last changed
last_seen_time: str # ISO 8601 timestamp when the record was last seen
created_at: str # ISO 8601 timestamp when the record was first created
changed_at: str # ISO 8601 timestamp when the record was last changed
synced_at: str # ISO 8601 timestamp when the record was last synced


class Record(TypedDict, total=False):
Expand Down Expand Up @@ -49,17 +49,17 @@ class RecordsResponse(TypedDict):
class GetRecordsParams(TypedDict, total=False):
"""Query parameters for retrieving records"""

start_time: Optional[str] # Start of last seen time range (ISO 8601 timestamp)
end_time: Optional[str] # End of last seen time range (ISO 8601 timestamp)
start_time: Optional[str] # Start of last synced time range (ISO 8601 timestamp)
end_time: Optional[str] # End of last synced time range (ISO 8601 timestamp)
limit: Optional[int] # Maximum number of records to return (default: 100, max: 500)
cursor: Optional[str] # Cursor for pagination (from previous response)


class TimeRange(TypedDict, total=False):
"""Time range for filtering records"""

start_time: Optional[str] # Start of last seen time range (ISO 8601 timestamp)
end_time: Optional[str] # End of last seen time range (ISO 8601 timestamp)
start_time: Optional[str] # Start of last synced time range (ISO 8601 timestamp)
end_time: Optional[str] # End of last synced time range (ISO 8601 timestamp)


class PaginationParams(TypedDict, total=False):
Expand Down
18 changes: 9 additions & 9 deletions clients/python/tests/test_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,9 @@ def test_get_records(self, mock_get):
"id": 1,
"data": {"name": "Test Record"},
"timestamps": {
"first_seen_time": "2023-01-01T00:00:00Z",
"last_changed_time": "2023-01-02T00:00:00Z",
"last_seen_time": "2023-01-03T00:00:00Z"
"created_at": "2023-01-01T00:00:00Z",
"changed_at": "2023-01-02T00:00:00Z",
"synced_at": "2023-01-03T00:00:00Z"
}
}
],
Expand Down Expand Up @@ -94,9 +94,9 @@ def test_search_records(self, mock_post):
"id": 1,
"data": {"name": "Test Record"},
"timestamps": {
"first_seen_time": "2023-01-01T00:00:00Z",
"last_changed_time": "2023-01-02T00:00:00Z",
"last_seen_time": "2023-01-03T00:00:00Z"
"created_at": "2023-01-01T00:00:00Z",
"changed_at": "2023-01-02T00:00:00Z",
"synced_at": "2023-01-03T00:00:00Z"
},
"relevance_score": 0.9
}
Expand Down Expand Up @@ -143,9 +143,9 @@ def test_filter_records(self, mock_post):
"id": 1,
"data": {"name": "Test Record", "category": "Test"},
"timestamps": {
"first_seen_time": "2023-01-01T00:00:00Z",
"last_changed_time": "2023-01-02T00:00:00Z",
"last_seen_time": "2023-01-03T00:00:00Z"
"created_at": "2023-01-01T00:00:00Z",
"changed_at": "2023-01-02T00:00:00Z",
"synced_at": "2023-01-03T00:00:00Z"
}
}
],
Expand Down
18 changes: 9 additions & 9 deletions clients/typescript/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@ export interface LightfeedConfig {
* Timestamp object for records
*/
export interface Timestamps {
/** ISO 8601 timestamp when the record was first seen */
first_seen_time: string;
/** ISO 8601 timestamp when the record was first created */
created_at: string;
/** ISO 8601 timestamp when the record was last changed */
last_changed_time: string;
/** ISO 8601 timestamp when the record was last seen */
last_seen_time: string;
changed_at: string;
/** ISO 8601 timestamp when the record was last synced */
synced_at: string;
}

/**
Expand Down Expand Up @@ -66,9 +66,9 @@ export interface RecordsResponse {
* Query parameters for retrieving records
*/
export interface GetRecordsParams {
/** Start of last seen time range (ISO 8601 timestamp) */
/** Start of last synced time range (ISO 8601 timestamp) */
start_time?: string;
/** End of last seen time range (ISO 8601 timestamp) */
/** End of last synced time range (ISO 8601 timestamp) */
end_time?: string;
/** Maximum number of records to return (default: 100, max: 500) */
limit?: number;
Expand All @@ -80,9 +80,9 @@ export interface GetRecordsParams {
* Time range for filtering records
*/
export interface TimeRange {
/** Start of last seen time range (ISO 8601 timestamp) */
/** Start of last synced time range (ISO 8601 timestamp) */
start_time?: string;
/** End of last seen time range (ISO 8601 timestamp) */
/** End of last synced time range (ISO 8601 timestamp) */
end_time?: string;
}

Expand Down
18 changes: 9 additions & 9 deletions clients/typescript/test/client.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,9 @@ describe("LightfeedClient", () => {
id: 1,
data: { name: "Test Record" },
timestamps: {
first_seen_time: "2023-01-01T00:00:00Z",
last_changed_time: "2023-01-02T00:00:00Z",
last_seen_time: "2023-01-03T00:00:00Z",
created_at: "2023-01-01T00:00:00Z",
changed_at: "2023-01-02T00:00:00Z",
synced_at: "2023-01-03T00:00:00Z",
},
},
],
Expand Down Expand Up @@ -119,9 +119,9 @@ describe("LightfeedClient", () => {
id: 1,
data: { name: "Test Record" },
timestamps: {
first_seen_time: "2023-01-01T00:00:00Z",
last_changed_time: "2023-01-02T00:00:00Z",
last_seen_time: "2023-01-03T00:00:00Z",
created_at: "2023-01-01T00:00:00Z",
changed_at: "2023-01-02T00:00:00Z",
synced_at: "2023-01-03T00:00:00Z",
},
relevance_score: 0.9,
},
Expand Down Expand Up @@ -160,9 +160,9 @@ describe("LightfeedClient", () => {
id: 1,
data: { name: "Test Record", category: "Test" },
timestamps: {
first_seen_time: "2023-01-01T00:00:00Z",
last_changed_time: "2023-01-02T00:00:00Z",
last_seen_time: "2023-01-03T00:00:00Z",
created_at: "2023-01-01T00:00:00Z",
changed_at: "2023-01-02T00:00:00Z",
synced_at: "2023-01-03T00:00:00Z",
},
},
],
Expand Down