(propertyRid: string)
| 313 | // ═══════════════════════════════════════════════════════════════════════════ |
| 314 | |
| 315 | async getProperty(propertyRid: string): Promise<PropertyWithIdentifiers | null> { |
| 316 | const propResult = await query<CatalogProperty>( |
| 317 | 'SELECT * FROM catalog_properties WHERE property_rid = $1', |
| 318 | [propertyRid] |
| 319 | ); |
| 320 | if (propResult.rows.length === 0) return null; |
| 321 | |
| 322 | const identResult = await query<CatalogIdentifier>( |
| 323 | 'SELECT * FROM catalog_identifiers WHERE property_rid = $1 AND disputed = FALSE ORDER BY created_at', |
| 324 | [propertyRid] |
| 325 | ); |
| 326 | |
| 327 | return { ...propResult.rows[0], identifiers: identResult.rows }; |
| 328 | } |
| 329 | |
| 330 | async listProperties(filters: ListFilters): Promise<{ properties: CatalogProperty[]; next_cursor: string | null; total: number }> { |
| 331 | const conditions: string[] = []; |
no outgoing calls
no test coverage detected