From 9add13283be4693293b910a743be0fa7739f8fd6 Mon Sep 17 00:00:00 2001 From: Andrew Zhong Date: Wed, 4 Jun 2025 21:35:49 -0700 Subject: [PATCH 1/2] init --- clients/python/lightfeed/models.py | 6 +++--- clients/python/tests/test_client.py | 18 +++++++++--------- clients/typescript/src/types.ts | 6 +++--- clients/typescript/test/client.test.ts | 18 +++++++++--------- 4 files changed, 24 insertions(+), 24 deletions(-) diff --git a/clients/python/lightfeed/models.py b/clients/python/lightfeed/models.py index e57c32f..8a4d39b 100644 --- a/clients/python/lightfeed/models.py +++ b/clients/python/lightfeed/models.py @@ -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 seen + changed_at: str # ISO 8601 timestamp when the record was last changed + synced_at: str # ISO 8601 timestamp when the record was last seen class Record(TypedDict, total=False): diff --git a/clients/python/tests/test_client.py b/clients/python/tests/test_client.py index a4c6a71..0fd33bc 100644 --- a/clients/python/tests/test_client.py +++ b/clients/python/tests/test_client.py @@ -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" } } ], @@ -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 } @@ -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" } } ], diff --git a/clients/typescript/src/types.ts b/clients/typescript/src/types.ts index d20c482..181d2e7 100644 --- a/clients/typescript/src/types.ts +++ b/clients/typescript/src/types.ts @@ -19,11 +19,11 @@ export interface LightfeedConfig { */ export interface Timestamps { /** ISO 8601 timestamp when the record was first seen */ - first_seen_time: string; + created_at: string; /** ISO 8601 timestamp when the record was last changed */ - last_changed_time: string; + changed_at: string; /** ISO 8601 timestamp when the record was last seen */ - last_seen_time: string; + synced_at: string; } /** diff --git a/clients/typescript/test/client.test.ts b/clients/typescript/test/client.test.ts index fd3c698..c103015 100644 --- a/clients/typescript/test/client.test.ts +++ b/clients/typescript/test/client.test.ts @@ -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", }, }, ], @@ -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, }, @@ -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", }, }, ], From bb71df8ecac705dce81a0448a53158d37115dee8 Mon Sep 17 00:00:00 2001 From: Andrew Zhong Date: Wed, 4 Jun 2025 23:24:48 -0700 Subject: [PATCH 2/2] comment --- clients/python/lightfeed/models.py | 12 ++++++------ clients/typescript/src/types.ts | 12 ++++++------ 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/clients/python/lightfeed/models.py b/clients/python/lightfeed/models.py index 8a4d39b..7327674 100644 --- a/clients/python/lightfeed/models.py +++ b/clients/python/lightfeed/models.py @@ -17,9 +17,9 @@ class LightfeedConfig(TypedDict, total=False): class Timestamps(TypedDict): """Timestamp object for records""" - created_at: str # ISO 8601 timestamp when the record was first 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 seen + synced_at: str # ISO 8601 timestamp when the record was last synced class Record(TypedDict, total=False): @@ -49,8 +49,8 @@ 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) @@ -58,8 +58,8 @@ class GetRecordsParams(TypedDict, total=False): 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): diff --git a/clients/typescript/src/types.ts b/clients/typescript/src/types.ts index 181d2e7..0b28a80 100644 --- a/clients/typescript/src/types.ts +++ b/clients/typescript/src/types.ts @@ -18,11 +18,11 @@ export interface LightfeedConfig { * Timestamp object for records */ export interface Timestamps { - /** ISO 8601 timestamp when the record was first seen */ + /** ISO 8601 timestamp when the record was first created */ created_at: string; /** ISO 8601 timestamp when the record was last changed */ changed_at: string; - /** ISO 8601 timestamp when the record was last seen */ + /** ISO 8601 timestamp when the record was last synced */ synced_at: string; } @@ -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; @@ -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; }