(since: string, limit: number = 10000)
| 398 | } |
| 399 | |
| 400 | async syncProperties(since: string, limit: number = 10000): Promise<{ |
| 401 | entries: CatalogProperty[]; |
| 402 | server_timestamp: string; |
| 403 | next_cursor: string | null; |
| 404 | }> { |
| 405 | const result = await query<CatalogProperty>( |
| 406 | `SELECT * FROM catalog_properties |
| 407 | WHERE updated_at > $1 AND classification = 'property' AND status = 'active' |
| 408 | ORDER BY updated_at, property_rid |
| 409 | LIMIT $2`, |
| 410 | [since, limit] |
| 411 | ); |
| 412 | |
| 413 | const rows = result.rows; |
| 414 | const nextCursor = rows.length === limit ? rows[rows.length - 1].property_rid : null; |
| 415 | |
| 416 | return { |
| 417 | entries: rows, |
| 418 | server_timestamp: new Date().toISOString(), |
| 419 | next_cursor: nextCursor, |
| 420 | }; |
| 421 | } |
| 422 | |
| 423 | async getPropertyActivity(propertyRid: string): Promise<{ |
| 424 | distinct_members: number; |
no outgoing calls
no test coverage detected