htag-sdk 0.8.2 → 0.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +74 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +102 -1
- package/dist/index.d.ts +102 -1
- package/dist/index.js +73 -3
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -21,6 +21,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
21
21
|
var index_exports = {};
|
|
22
22
|
__export(index_exports, {
|
|
23
23
|
AddressClient: () => AddressClient,
|
|
24
|
+
AgentsClient: () => AgentsClient,
|
|
24
25
|
AuthenticationError: () => AuthenticationError,
|
|
25
26
|
HtAgApiClient: () => HtAgApiClient,
|
|
26
27
|
HtAgError: () => HtAgError,
|
|
@@ -221,6 +222,18 @@ var HttpClient = class {
|
|
|
221
222
|
async intentHubDelete(path, options) {
|
|
222
223
|
return this.request("DELETE", this.config.intentHubBaseUrl + path, void 0, options);
|
|
223
224
|
}
|
|
225
|
+
/**
|
|
226
|
+
* Execute a GET request against the Agents API base.
|
|
227
|
+
*/
|
|
228
|
+
async agentsGet(path, options) {
|
|
229
|
+
return this.request("GET", this.config.agentsBaseUrl + path, void 0, options);
|
|
230
|
+
}
|
|
231
|
+
/**
|
|
232
|
+
* Execute a POST request against the Agents API base.
|
|
233
|
+
*/
|
|
234
|
+
async agentsPost(path, body, options) {
|
|
235
|
+
return this.request("POST", this.config.agentsBaseUrl + path, body, options);
|
|
236
|
+
}
|
|
224
237
|
// -----------------------------------------------------------------------
|
|
225
238
|
// Core request implementation with retries and exponential backoff
|
|
226
239
|
// -----------------------------------------------------------------------
|
|
@@ -379,6 +392,58 @@ var AddressClient = class {
|
|
|
379
392
|
}
|
|
380
393
|
};
|
|
381
394
|
|
|
395
|
+
// src/agents/client.ts
|
|
396
|
+
var AgentsClient = class {
|
|
397
|
+
constructor(http) {
|
|
398
|
+
this.http = http;
|
|
399
|
+
}
|
|
400
|
+
/** List all available agents with their metadata. */
|
|
401
|
+
async list() {
|
|
402
|
+
return this.http.agentsGet("/agents");
|
|
403
|
+
}
|
|
404
|
+
/** Get metadata for a specific agent. */
|
|
405
|
+
async get(agentId) {
|
|
406
|
+
return this.http.agentsGet(`/agents/${agentId}`);
|
|
407
|
+
}
|
|
408
|
+
/**
|
|
409
|
+
* Execute an agent synchronously.
|
|
410
|
+
*
|
|
411
|
+
* Blocks until the agent completes (typically 5-30 seconds).
|
|
412
|
+
*
|
|
413
|
+
* @param agentId - Agent identifier (e.g. `"market-cycle"`)
|
|
414
|
+
* @param input - Agent input parameters
|
|
415
|
+
*/
|
|
416
|
+
async execute(agentId, input = {}) {
|
|
417
|
+
return this.http.agentsPost(
|
|
418
|
+
`/agents/${agentId}/execute`,
|
|
419
|
+
input
|
|
420
|
+
);
|
|
421
|
+
}
|
|
422
|
+
/**
|
|
423
|
+
* Submit an async agent job. Returns immediately with a job ID.
|
|
424
|
+
*
|
|
425
|
+
* @param agentId - Agent identifier
|
|
426
|
+
* @param input - Agent input parameters
|
|
427
|
+
*/
|
|
428
|
+
async submitJob(agentId, input = {}) {
|
|
429
|
+
return this.http.agentsPost(
|
|
430
|
+
`/agents/${agentId}/execute/async`,
|
|
431
|
+
input
|
|
432
|
+
);
|
|
433
|
+
}
|
|
434
|
+
/**
|
|
435
|
+
* Poll the status of an async agent job.
|
|
436
|
+
*
|
|
437
|
+
* @param agentId - Agent identifier
|
|
438
|
+
* @param jobId - Job ID from {@link submitJob}
|
|
439
|
+
*/
|
|
440
|
+
async getJob(agentId, jobId) {
|
|
441
|
+
return this.http.agentsGet(
|
|
442
|
+
`/agents/${agentId}/jobs/${jobId}`
|
|
443
|
+
);
|
|
444
|
+
}
|
|
445
|
+
};
|
|
446
|
+
|
|
382
447
|
// src/property/client.ts
|
|
383
448
|
var PropertyClient = class {
|
|
384
449
|
/** @internal */
|
|
@@ -964,19 +1029,22 @@ var DEFAULT_TIMEOUT = 3e4;
|
|
|
964
1029
|
function resolveBaseUrls(options) {
|
|
965
1030
|
if (options.baseUrl) {
|
|
966
1031
|
const base2 = options.baseUrl.replace(/\/+$/, "");
|
|
967
|
-
return { publicBaseUrl: base2, internalBaseUrl: base2, intentHubBaseUrl: base2 };
|
|
1032
|
+
return { publicBaseUrl: base2, internalBaseUrl: base2, intentHubBaseUrl: base2, agentsBaseUrl: base2 };
|
|
968
1033
|
}
|
|
969
1034
|
const env = options.environment ?? "prod";
|
|
970
1035
|
const base = `https://api.${env}.htagai.com`;
|
|
971
1036
|
return {
|
|
972
1037
|
publicBaseUrl: base,
|
|
973
1038
|
internalBaseUrl: base,
|
|
974
|
-
intentHubBaseUrl: `${base}/intent-hub/v1
|
|
1039
|
+
intentHubBaseUrl: `${base}/intent-hub/v1`,
|
|
1040
|
+
agentsBaseUrl: `${base}/micro-agents`
|
|
975
1041
|
};
|
|
976
1042
|
}
|
|
977
1043
|
var HtAgApiClient = class {
|
|
978
1044
|
/** Address search, insights and standardisation. */
|
|
979
1045
|
address;
|
|
1046
|
+
/** AI-powered property investment agents. */
|
|
1047
|
+
agents;
|
|
980
1048
|
/** Sold property search. */
|
|
981
1049
|
property;
|
|
982
1050
|
/** Market snapshots, advanced queries and time-series trends. */
|
|
@@ -991,18 +1059,20 @@ var HtAgApiClient = class {
|
|
|
991
1059
|
"HtAgApiClient requires an apiKey. Pass it in the constructor options."
|
|
992
1060
|
);
|
|
993
1061
|
}
|
|
994
|
-
const { publicBaseUrl, internalBaseUrl, intentHubBaseUrl } = resolveBaseUrls(options);
|
|
1062
|
+
const { publicBaseUrl, internalBaseUrl, intentHubBaseUrl, agentsBaseUrl } = resolveBaseUrls(options);
|
|
995
1063
|
const config = {
|
|
996
1064
|
apiKey: options.apiKey,
|
|
997
1065
|
publicBaseUrl,
|
|
998
1066
|
internalBaseUrl,
|
|
999
1067
|
intentHubBaseUrl,
|
|
1068
|
+
agentsBaseUrl,
|
|
1000
1069
|
maxRetries: options.maxRetries ?? DEFAULT_MAX_RETRIES,
|
|
1001
1070
|
retryBaseDelay: options.retryBaseDelay ?? DEFAULT_RETRY_BASE_DELAY,
|
|
1002
1071
|
timeout: options.timeout ?? DEFAULT_TIMEOUT
|
|
1003
1072
|
};
|
|
1004
1073
|
const http = new HttpClient(config);
|
|
1005
1074
|
this.address = new AddressClient(http);
|
|
1075
|
+
this.agents = new AgentsClient(http);
|
|
1006
1076
|
this.property = new PropertyClient(http);
|
|
1007
1077
|
this.markets = new MarketsClient(http);
|
|
1008
1078
|
this.intentHub = new IntentHubClient(http);
|
|
@@ -1012,6 +1082,7 @@ var HtAgApiClient = class {
|
|
|
1012
1082
|
// Annotate the CommonJS export names for ESM import in node:
|
|
1013
1083
|
0 && (module.exports = {
|
|
1014
1084
|
AddressClient,
|
|
1085
|
+
AgentsClient,
|
|
1015
1086
|
AuthenticationError,
|
|
1016
1087
|
HtAgApiClient,
|
|
1017
1088
|
HtAgError,
|
package/dist/index.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index.ts","../src/errors.ts","../src/http.ts","../src/address/client.ts","../src/property/client.ts","../src/markets/trends.ts","../src/markets/client.ts","../src/intent-hub/client.ts","../src/reference/client.ts","../src/client.ts"],"sourcesContent":["// ---------------------------------------------------------------------------\n// @htag/sdk — Official TypeScript SDK for HtAG Location Intelligence APIs\n// ---------------------------------------------------------------------------\n\n// Main client\nexport { HtAgApiClient } from './client.js';\n\n// Configuration types\nexport type {\n HtAgClientOptions,\n ResolvedConfig,\n BaseResponse,\n RequestOptions,\n LevelEnum,\n PropertyTypeEnum,\n} from './types.js';\n\n// Error classes\nexport {\n HtAgError,\n AuthenticationError,\n RateLimitError,\n ValidationError,\n ServerError,\n} from './errors.js';\n\n// Address domain\nexport { AddressClient } from './address/index.js';\nexport type {\n AddressRecord,\n AddressSearchResult,\n AddressSearchParams,\n AddressSearchResponse,\n AddressInsightsParams,\n AddressInsightsResponse,\n BatchStandardiseParams,\n BatchStandardiseResponse,\n StandardisedAddress,\n GeocodeParams,\n GeocodeRecord,\n GeocodeResponse,\n EnvironmentParams,\n EnvironmentRecord,\n EnvironmentResponse,\n DemographicsParams,\n DemographicsRecord,\n DemographicsResponse,\n} from './address/index.js';\n\n// Property domain\nexport { PropertyClient } from './property/index.js';\nexport type {\n SoldPropertyRecord,\n SoldSearchParams,\n SoldPropertiesResponse,\n} from './property/index.js';\n\n// Markets domain\nexport { MarketsClient, TrendsClient } from './markets/index.js';\nexport type {\n MarketSnapshot,\n PriceHistoryOut,\n RentHistoryOut,\n YieldHistoryOut,\n FSDMonthlyOut,\n FSDQuarterlyOut,\n FSDYearlyOut,\n EssentialsOut,\n GRCOut,\n DemandProfileOut,\n LogicNode,\n AdvancedSearchBody,\n SnapshotsParams,\n MarketQueryParams,\n TrendsParams,\n TrendsWithBedroomsParams,\n SnapshotsResponse,\n MarketQueryResponse,\n PriceResponse,\n RentResponse,\n YieldResponse,\n SupplyDemandResponse,\n SearchIndexResponse,\n HoldPeriodResponse,\n PerformanceResponse,\n GrowthRatesResponse,\n DemandProfileResponse,\n MarketSnapshotParams,\n MarketGrowthCumulativeRecord,\n MarketGrowthAnnualisedRecord,\n MarketSupplyRecord,\n MarketSupplyLongSlopeRecord,\n MarketSupplyShortSlopeRecord,\n MarketDemandRecord,\n MarketDemandLongSlopeRecord,\n MarketDemandShortSlopeRecord,\n MarketScoresRecord,\n MarketFundamentalsRecord,\n MarketCycleRecord,\n MarketRiskRecord,\n GrowthCumulativeResponse,\n GrowthAnnualisedResponse,\n MarketSupplyResponse,\n SupplyLongSlopeResponse,\n SupplyShortSlopeResponse,\n MarketDemandResponse,\n DemandLongSlopeResponse,\n DemandShortSlopeResponse,\n MarketScoresResponse,\n MarketFundamentalsResponse,\n MarketCycleResponse,\n MarketRiskResponse,\n StockOnMarketTrendRecord,\n InventoryTrendRecord,\n DaysOnMarketTrendRecord,\n ClearanceRateTrendRecord,\n VacancyTrendRecord,\n StockOnMarketResponse,\n InventoryTrendResponse,\n DaysOnMarketResponse,\n ClearanceRateResponse,\n VacancyResponse,\n} from './markets/index.js';\n\n// Intent Hub domain\nexport { IntentHubClient } from './intent-hub/index.js';\nexport type {\n SourceType,\n IntegrationType,\n IntegrationStatus,\n Sentiment,\n Urgency,\n SubmitEventParams,\n ClassifiedEvent,\n QueryEventsParams,\n PaginatedEvents,\n CreateIntegrationParams,\n UpdateIntegrationParams,\n Integration,\n TestResult,\n CreateSubscriptionParams,\n UpdateSubscriptionParams,\n Subscription,\n EventCategory,\n EventType,\n TagInfo,\n} from './intent-hub/index.js';\n\n// Reference domain\nexport { ReferenceClient } from './reference/index.js';\nexport type {\n LocalityParams,\n LocalityRecord,\n LocalityResponse,\n LgaParams,\n LgaRecord,\n LgaResponse,\n} from './reference/index.js';\n","/**\n * Base error class for all HtAG SDK errors.\n */\nexport class HtAgError extends Error {\n /** HTTP status code, if available. */\n readonly status: number | undefined;\n\n /** Raw response body, if available. */\n readonly body: unknown;\n\n /** The request URL that caused the error. */\n readonly url: string | undefined;\n\n constructor(\n message: string,\n options?: {\n status?: number;\n body?: unknown;\n url?: string;\n cause?: unknown;\n },\n ) {\n super(message, { cause: options?.cause });\n this.name = 'HtAgError';\n this.status = options?.status;\n this.body = options?.body;\n this.url = options?.url;\n }\n}\n\n/**\n * Thrown when the server returns 401 or 403.\n */\nexport class AuthenticationError extends HtAgError {\n constructor(options: { status: number; body: unknown; url: string }) {\n super(\n `Authentication failed (HTTP ${options.status}). Check your API key.`,\n options,\n );\n this.name = 'AuthenticationError';\n }\n}\n\n/**\n * Thrown when the server returns 429 after exhausting all retries.\n */\nexport class RateLimitError extends HtAgError {\n constructor(options: { body: unknown; url: string }) {\n super('Rate limit exceeded. Please retry after a short delay.', {\n status: 429,\n ...options,\n });\n this.name = 'RateLimitError';\n }\n}\n\n/**\n * Thrown when the server returns 400 or 422.\n */\nexport class ValidationError extends HtAgError {\n constructor(options: { status: number; body: unknown; url: string }) {\n const detail = extractDetail(options.body);\n super(\n detail\n ? `Validation error (HTTP ${options.status}): ${detail}`\n : `Validation error (HTTP ${options.status})`,\n options,\n );\n this.name = 'ValidationError';\n }\n}\n\n/**\n * Thrown when the server returns a 5xx status after exhausting all retries.\n */\nexport class ServerError extends HtAgError {\n constructor(options: { status: number; body: unknown; url: string }) {\n super(`Server error (HTTP ${options.status})`, options);\n this.name = 'ServerError';\n }\n}\n\n// ---------------------------------------------------------------------------\n// Helpers\n// ---------------------------------------------------------------------------\n\nfunction extractDetail(body: unknown): string | undefined {\n if (body && typeof body === 'object' && 'detail' in body) {\n const detail = (body as Record<string, unknown>).detail;\n if (typeof detail === 'string') return detail;\n if (Array.isArray(detail)) {\n return detail\n .map((d) => {\n if (typeof d === 'string') return d;\n if (d && typeof d === 'object' && 'msg' in d) return String(d.msg);\n return JSON.stringify(d);\n })\n .join('; ');\n }\n return JSON.stringify(detail);\n }\n return undefined;\n}\n","import type { ResolvedConfig, RequestOptions } from './types.js';\nimport {\n HtAgError,\n AuthenticationError,\n RateLimitError,\n ValidationError,\n ServerError,\n} from './errors.js';\n\n// ---------------------------------------------------------------------------\n// camelCase -> snake_case conversion\n// ---------------------------------------------------------------------------\n\n/**\n * Convert a camelCase string to snake_case.\n *\n * Handles sequences of uppercase letters correctly:\n * - \"areaId\" -> \"area_id\"\n * - \"periodEndMin\" -> \"period_end_min\"\n * - \"IRSD\" -> \"irsd\" (all-caps treated as one token)\n */\nfunction toSnakeCase(str: string): string {\n return str\n .replace(/([A-Z]+)([A-Z][a-z])/g, '$1_$2')\n .replace(/([a-z0-9])([A-Z])/g, '$1_$2')\n .toLowerCase();\n}\n\n// ---------------------------------------------------------------------------\n// Query-string builder\n// ---------------------------------------------------------------------------\n\n/**\n * Build a URL query string from a params object, converting camelCase keys\n * to snake_case. Arrays are joined with commas. `undefined` and `null` values\n * are omitted.\n */\nexport function buildQueryString(\n params: Record<string, unknown>,\n): string {\n const parts: string[] = [];\n\n for (const [key, value] of Object.entries(params)) {\n // Skip internal SDK options that are not API params.\n if (key === 'signal') continue;\n if (value === undefined || value === null) continue;\n\n const snakeKey = toSnakeCase(key);\n\n if (Array.isArray(value)) {\n if (value.length > 0) {\n parts.push(\n `${encodeURIComponent(snakeKey)}=${encodeURIComponent(value.join(','))}`,\n );\n }\n } else {\n parts.push(\n `${encodeURIComponent(snakeKey)}=${encodeURIComponent(String(value))}`,\n );\n }\n }\n\n return parts.length > 0 ? `?${parts.join('&')}` : '';\n}\n\n// ---------------------------------------------------------------------------\n// Retryable HTTP client\n// ---------------------------------------------------------------------------\n\nfunction isRetryable(status: number): boolean {\n return status === 429 || status >= 500;\n}\n\nfunction sleep(ms: number): Promise<void> {\n return new Promise((resolve) => setTimeout(resolve, ms));\n}\n\n/**\n * Parse the body of a response. Returns the parsed JSON on success or a string\n * representation when parsing fails.\n */\nasync function parseBody(response: Response): Promise<unknown> {\n const contentType = response.headers.get('content-type') ?? '';\n if (contentType.includes('application/json')) {\n try {\n return await response.json();\n } catch {\n return await response.text();\n }\n }\n return await response.text();\n}\n\n/**\n * Throw the appropriate typed error for the given HTTP status.\n */\nfunction throwForStatus(\n status: number,\n body: unknown,\n url: string,\n): never {\n if (status === 401 || status === 403) {\n throw new AuthenticationError({ status, body, url });\n }\n if (status === 429) {\n throw new RateLimitError({ body, url });\n }\n if (status === 400 || status === 422) {\n throw new ValidationError({ status, body, url });\n }\n if (status >= 500) {\n throw new ServerError({ status, body, url });\n }\n throw new HtAgError(`HTTP ${status}`, { status, body, url });\n}\n\n/**\n * Internal HTTP transport used by all domain clients.\n */\nexport class HttpClient {\n constructor(private readonly config: ResolvedConfig) {}\n\n /**\n * Execute a GET request against the public API base.\n */\n async get<T>(path: string, options?: RequestOptions): Promise<T> {\n return this.request<T>('GET', this.config.publicBaseUrl + path, undefined, options);\n }\n\n /**\n * Execute a POST request against the public API base.\n */\n async post<T>(\n path: string,\n body: unknown,\n options?: RequestOptions,\n ): Promise<T> {\n return this.request<T>('POST', this.config.publicBaseUrl + path, body, options);\n }\n\n /**\n * Execute a PATCH request against the public API base.\n */\n async patch<T>(\n path: string,\n body: unknown,\n options?: RequestOptions,\n ): Promise<T> {\n return this.request<T>('PATCH', this.config.publicBaseUrl + path, body, options);\n }\n\n /**\n * Execute a DELETE request against the public API base.\n */\n async delete<T>(path: string, options?: RequestOptions): Promise<T> {\n return this.request<T>('DELETE', this.config.publicBaseUrl + path, undefined, options);\n }\n\n /**\n * Execute a GET request against the internal API base.\n */\n async internalGet<T>(path: string, options?: RequestOptions): Promise<T> {\n return this.request<T>('GET', this.config.internalBaseUrl + path, undefined, options);\n }\n\n /**\n * Execute a POST request against the internal API base.\n */\n async internalPost<T>(\n path: string,\n body: unknown,\n options?: RequestOptions,\n ): Promise<T> {\n return this.request<T>('POST', this.config.internalBaseUrl + path, body, options);\n }\n\n /**\n * Execute a GET request against the Intent Hub API base.\n */\n async intentHubGet<T>(path: string, options?: RequestOptions): Promise<T> {\n return this.request<T>('GET', this.config.intentHubBaseUrl + path, undefined, options);\n }\n\n /**\n * Execute a POST request against the Intent Hub API base.\n */\n async intentHubPost<T>(\n path: string,\n body: unknown,\n options?: RequestOptions,\n ): Promise<T> {\n return this.request<T>('POST', this.config.intentHubBaseUrl + path, body, options);\n }\n\n /**\n * Execute a PATCH request against the Intent Hub API base.\n */\n async intentHubPatch<T>(\n path: string,\n body: unknown,\n options?: RequestOptions,\n ): Promise<T> {\n return this.request<T>('PATCH', this.config.intentHubBaseUrl + path, body, options);\n }\n\n /**\n * Execute a DELETE request against the Intent Hub API base.\n */\n async intentHubDelete<T>(path: string, options?: RequestOptions): Promise<T> {\n return this.request<T>('DELETE', this.config.intentHubBaseUrl + path, undefined, options);\n }\n\n // -----------------------------------------------------------------------\n // Core request implementation with retries and exponential backoff\n // -----------------------------------------------------------------------\n\n private async request<T>(\n method: string,\n url: string,\n body: unknown,\n options?: RequestOptions,\n ): Promise<T> {\n const headers: Record<string, string> = {\n 'x-api-key': this.config.apiKey,\n 'accept': 'application/json',\n };\n\n if (body !== undefined) {\n headers['content-type'] = 'application/json';\n }\n\n let lastError: Error | undefined;\n\n for (let attempt = 0; attempt <= this.config.maxRetries; attempt++) {\n // If this is a retry, wait with exponential backoff + jitter.\n if (attempt > 0) {\n const base = this.config.retryBaseDelay * Math.pow(2, attempt - 1);\n const jitter = Math.random() * base * 0.5;\n await sleep(base + jitter);\n }\n\n // Build an AbortController that combines the user signal with a timeout.\n const controller = new AbortController();\n let timeoutId: ReturnType<typeof setTimeout> | undefined;\n\n const cleanup = () => {\n if (timeoutId !== undefined) clearTimeout(timeoutId);\n };\n\n // Wire up caller's abort signal.\n if (options?.signal) {\n if (options.signal.aborted) {\n throw new HtAgError('Request aborted', {\n url,\n cause: options.signal.reason,\n });\n }\n options.signal.addEventListener('abort', () => controller.abort(options.signal!.reason), {\n once: true,\n });\n }\n\n timeoutId = setTimeout(\n () => controller.abort(new Error('Request timed out')),\n this.config.timeout,\n );\n\n try {\n const response = await fetch(url, {\n method,\n headers,\n body: body !== undefined ? JSON.stringify(body) : undefined,\n signal: controller.signal,\n });\n\n cleanup();\n\n if (response.ok) {\n // 204 No Content — nothing to parse.\n if (response.status === 204) {\n return undefined as T;\n }\n return (await parseBody(response)) as T;\n }\n\n const responseBody = await parseBody(response);\n\n // Retry on retryable statuses, unless we've exhausted retries.\n if (isRetryable(response.status) && attempt < this.config.maxRetries) {\n lastError = new HtAgError(`HTTP ${response.status}`, {\n status: response.status,\n body: responseBody,\n url,\n });\n continue;\n }\n\n // Non-retryable or exhausted retries — throw typed error.\n throwForStatus(response.status, responseBody, url);\n } catch (err) {\n cleanup();\n\n // Re-throw our own typed errors.\n if (err instanceof HtAgError) {\n throw err;\n }\n\n // Handle abort / timeout.\n if (err instanceof DOMException && err.name === 'AbortError') {\n if (options?.signal?.aborted) {\n throw new HtAgError('Request aborted', { url, cause: err });\n }\n throw new HtAgError('Request timed out', { url, cause: err });\n }\n\n // Network / fetch errors — retry if we have attempts left.\n if (attempt < this.config.maxRetries) {\n lastError = err instanceof Error ? err : new Error(String(err));\n continue;\n }\n\n throw new HtAgError(\n `Network error: ${err instanceof Error ? err.message : String(err)}`,\n { url, cause: err },\n );\n }\n }\n\n // Should not reach here, but just in case.\n throw lastError ?? new HtAgError('Request failed after retries', { url });\n }\n}\n","import type { HttpClient } from '../http.js';\nimport { buildQueryString } from '../http.js';\nimport type {\n AddressSearchParams,\n AddressSearchResponse,\n AddressInsightsParams,\n AddressInsightsResponse,\n BatchStandardiseParams,\n BatchStandardiseResponse,\n GeocodeParams,\n GeocodeResponse,\n EnvironmentParams,\n EnvironmentResponse,\n DemographicsParams,\n DemographicsResponse,\n} from './types.js';\n\n/**\n * Client for the Address API domain.\n *\n * ```ts\n * const results = await client.address.search({ q: '100 George St Sydney' });\n * ```\n */\nexport class AddressClient {\n /** @internal */\n constructor(private readonly http: HttpClient) {}\n\n /**\n * Search for addresses matching a free-text query.\n *\n * `GET /internal-api/v1/address/search`\n */\n async search(params: AddressSearchParams): Promise<AddressSearchResponse> {\n const { signal, ...query } = params;\n const qs = buildQueryString(query);\n return this.http.internalGet<AddressSearchResponse>(`/internal-api/v1/address/search${qs}`, { signal });\n }\n\n /**\n * Retrieve detailed insights for one or more addresses.\n *\n * `GET /internal-api/v1/address/insights`\n */\n async insights(params: AddressInsightsParams): Promise<AddressInsightsResponse> {\n const { signal, ...query } = params;\n const qs = buildQueryString(query);\n return this.http.internalGet<AddressInsightsResponse>(`/internal-api/v1/address/insights${qs}`, { signal });\n }\n\n /**\n * Standardise a batch of raw address strings into structured records.\n *\n * `POST /v1/address/standardise`\n */\n async standardise(params: BatchStandardiseParams): Promise<BatchStandardiseResponse> {\n const { signal, addresses } = params;\n return this.http.post<BatchStandardiseResponse>(\n '/v1/address/standardise',\n { addresses },\n { signal },\n );\n }\n\n /**\n * Geocode an address string to structured location data.\n *\n * `GET /v1/address/geocode`\n */\n async geocode(params: GeocodeParams): Promise<GeocodeResponse> {\n const { signal, ...query } = params;\n const qs = buildQueryString(query);\n return this.http.get<GeocodeResponse>(`/v1/address/geocode${qs}`, { signal });\n }\n\n /**\n * Retrieve environmental data (flood, bushfire, heritage, zoning) for addresses.\n *\n * `GET /v1/address/environment`\n */\n async environment(params: EnvironmentParams): Promise<EnvironmentResponse> {\n const { signal, ...query } = params;\n const qs = buildQueryString(query);\n return this.http.get<EnvironmentResponse>(`/v1/address/environment${qs}`, { signal });\n }\n\n /**\n * Retrieve demographic data (SEIFA indices, housing tenure) for addresses.\n *\n * `GET /v1/address/demographics`\n */\n async demographics(params: DemographicsParams): Promise<DemographicsResponse> {\n const { signal, ...query } = params;\n const qs = buildQueryString(query);\n return this.http.get<DemographicsResponse>(`/v1/address/demographics${qs}`, { signal });\n }\n}\n","import type { HttpClient } from '../http.js';\nimport { buildQueryString } from '../http.js';\nimport type {\n SoldSearchParams,\n SoldPropertiesResponse,\n} from './types.js';\n\n/**\n * Client for the Property API domain.\n *\n * ```ts\n * const sold = await client.property.soldSearch({ address: '100 George St Sydney', radius: 2000 });\n * ```\n */\nexport class PropertyClient {\n /** @internal */\n constructor(private readonly http: HttpClient) {}\n\n /**\n * Search for recently sold properties near a location.\n *\n * `GET /v1/property/sold/search`\n */\n async soldSearch(params: SoldSearchParams): Promise<SoldPropertiesResponse> {\n const { signal, ...query } = params;\n const qs = buildQueryString(query);\n return this.http.get<SoldPropertiesResponse>(`/v1/property/sold/search${qs}`, { signal });\n }\n}\n","import type { HttpClient } from '../http.js';\nimport { buildQueryString } from '../http.js';\nimport type {\n TrendsParams,\n TrendsWithBedroomsParams,\n PriceResponse,\n RentResponse,\n YieldResponse,\n SupplyDemandResponse,\n SearchIndexResponse,\n HoldPeriodResponse,\n PerformanceResponse,\n GrowthRatesResponse,\n DemandProfileResponse,\n StockOnMarketResponse,\n InventoryTrendResponse,\n DaysOnMarketResponse,\n ClearanceRateResponse,\n VacancyResponse,\n} from './types.js';\n\n/**\n * Client for the Markets Trends API domain.\n *\n * Each method queries a specific time-series metric:\n *\n * ```ts\n * const prices = await client.markets.trends.price({\n * level: 'suburb',\n * areaId: ['SAL10001'],\n * propertyType: ['house'],\n * });\n * ```\n */\nexport class TrendsClient {\n /** @internal */\n constructor(private readonly http: HttpClient) {}\n\n /**\n * Price history trends.\n *\n * `GET /internal-api/v1/markets/trends/price`\n */\n async price(params: TrendsWithBedroomsParams): Promise<PriceResponse> {\n return this.trend<PriceResponse>('price', params);\n }\n\n /**\n * Rent history trends.\n *\n * `GET /v1/markets/trends/rent`\n */\n async rent(params: TrendsWithBedroomsParams): Promise<RentResponse> {\n return this.publicTrend<RentResponse>('rent', params);\n }\n\n /**\n * Yield history trends.\n *\n * `GET /v1/markets/trends/yield`\n */\n async yieldHistory(params: TrendsWithBedroomsParams): Promise<YieldResponse> {\n return this.publicTrend<YieldResponse>('yield', params);\n }\n\n /**\n * Supply and demand (monthly frequency).\n *\n * `GET /internal-api/v1/markets/trends/supply-demand`\n */\n async supplyDemand(params: TrendsWithBedroomsParams): Promise<SupplyDemandResponse> {\n return this.trend<SupplyDemandResponse>('supply-demand', params);\n }\n\n /**\n * Search interest index (quarterly frequency).\n *\n * `GET /internal-api/v1/markets/trends/search-index`\n */\n async searchIndex(params: TrendsParams): Promise<SearchIndexResponse> {\n return this.trend<SearchIndexResponse>('search-index', params);\n }\n\n /**\n * Hold period (yearly frequency).\n *\n * `GET /internal-api/v1/markets/trends/hold-period`\n */\n async holdPeriod(params: TrendsParams): Promise<HoldPeriodResponse> {\n return this.trend<HoldPeriodResponse>('hold-period', params);\n }\n\n /**\n * Performance essentials.\n *\n * `GET /internal-api/v1/markets/trends/performance`\n */\n async performance(params: TrendsWithBedroomsParams): Promise<PerformanceResponse> {\n return this.trend<PerformanceResponse>('performance', params);\n }\n\n /**\n * Growth rate cycle.\n *\n * `GET /v1/markets/trends/growth-rates`\n */\n async growthRates(params: TrendsParams): Promise<GrowthRatesResponse> {\n return this.publicTrend<GrowthRatesResponse>('growth-rates', params);\n }\n\n /**\n * Demand profile breakdown.\n *\n * `GET /v1/markets/trends/demand-profile`\n */\n async demandProfile(params: TrendsParams): Promise<DemandProfileResponse> {\n return this.publicTrend<DemandProfileResponse>('demand-profile', params);\n }\n\n /**\n * Stock on market trends.\n *\n * `GET /v1/markets/trends/stock-on-market`\n */\n async stockOnMarket(params: TrendsParams): Promise<StockOnMarketResponse> {\n return this.publicTrend<StockOnMarketResponse>('stock-on-market', params);\n }\n\n /**\n * Inventory trends.\n *\n * `GET /v1/markets/trends/inventory`\n */\n async inventory(params: TrendsParams): Promise<InventoryTrendResponse> {\n return this.publicTrend<InventoryTrendResponse>('inventory', params);\n }\n\n /**\n * Days on market trends.\n *\n * `GET /v1/markets/trends/days-on-market`\n */\n async daysOnMarket(params: TrendsParams): Promise<DaysOnMarketResponse> {\n return this.publicTrend<DaysOnMarketResponse>('days-on-market', params);\n }\n\n /**\n * Clearance rate trends.\n *\n * `GET /v1/markets/trends/clearance-rate`\n */\n async clearanceRate(params: TrendsParams): Promise<ClearanceRateResponse> {\n return this.publicTrend<ClearanceRateResponse>('clearance-rate', params);\n }\n\n /**\n * Vacancy rate trends.\n *\n * `GET /v1/markets/trends/vacancy`\n */\n async vacancy(params: TrendsParams): Promise<VacancyResponse> {\n return this.publicTrend<VacancyResponse>('vacancy', params);\n }\n\n // -----------------------------------------------------------------------\n // Shared implementation\n // -----------------------------------------------------------------------\n\n private async trend<T>(metric: string, params: TrendsParams | TrendsWithBedroomsParams): Promise<T> {\n const { signal, ...query } = params;\n const qs = buildQueryString(query);\n return this.http.internalGet<T>(\n `/internal-api/v1/markets/trends/${metric}${qs}`,\n { signal },\n );\n }\n\n private async publicTrend<T>(metric: string, params: TrendsParams | TrendsWithBedroomsParams): Promise<T> {\n const { signal, ...query } = params;\n const qs = buildQueryString(query);\n return this.http.get<T>(\n `/v1/markets/trends/${metric}${qs}`,\n { signal },\n );\n }\n}\n","import type { HttpClient } from '../http.js';\nimport { buildQueryString } from '../http.js';\nimport { TrendsClient } from './trends.js';\nimport type {\n SnapshotsParams,\n SnapshotsResponse,\n AdvancedSearchBody,\n MarketQueryResponse,\n MarketSnapshotParams,\n GrowthCumulativeResponse,\n GrowthAnnualisedResponse,\n MarketSupplyResponse,\n SupplyLongSlopeResponse,\n SupplyShortSlopeResponse,\n MarketDemandResponse,\n DemandLongSlopeResponse,\n DemandShortSlopeResponse,\n MarketScoresResponse,\n MarketFundamentalsResponse,\n MarketCycleResponse,\n MarketRiskResponse,\n} from './types.js';\nimport type { RequestOptions } from '../types.js';\n\n/**\n * Client for the Markets API domain.\n *\n * ```ts\n * const snapshots = await client.markets.snapshots({\n * level: 'suburb',\n * propertyType: ['house'],\n * });\n *\n * const prices = await client.markets.trends.price({\n * level: 'suburb',\n * areaId: ['SAL10001'],\n * });\n * ```\n */\nexport class MarketsClient {\n /** Sub-client for time-series trend endpoints. */\n readonly trends: TrendsClient;\n\n /** @internal */\n constructor(private readonly http: HttpClient) {\n this.trends = new TrendsClient(http);\n }\n\n /**\n * Retrieve market snapshot data with optional filters.\n *\n * `GET /internal-api/v1/markets/snapshots`\n */\n async snapshots(params: SnapshotsParams): Promise<SnapshotsResponse> {\n const { signal, ...query } = params;\n const qs = buildQueryString(query);\n return this.http.internalGet<SnapshotsResponse>(\n `/internal-api/v1/markets/snapshots${qs}`,\n { signal },\n );\n }\n\n /**\n * Advanced market query with logical filter expressions.\n *\n * `POST /internal-api/v1/markets/query`\n */\n async query(\n body: AdvancedSearchBody,\n options?: RequestOptions,\n ): Promise<MarketQueryResponse> {\n return this.http.internalPost<MarketQueryResponse>(\n '/internal-api/v1/markets/query',\n body,\n options,\n );\n }\n\n // -------------------------------------------------------------------------\n // Public market snapshot endpoints (/v1/markets/*)\n // -------------------------------------------------------------------------\n\n /**\n * Cumulative growth metrics.\n *\n * `GET /v1/markets/growth/cumulative`\n */\n async growthCumulative(params: MarketSnapshotParams): Promise<GrowthCumulativeResponse> {\n const { signal, ...query } = params;\n const qs = buildQueryString(query);\n return this.http.get<GrowthCumulativeResponse>(`/v1/markets/growth/cumulative${qs}`, { signal });\n }\n\n /**\n * Annualised growth metrics.\n *\n * `GET /v1/markets/growth/annualised`\n */\n async growthAnnualised(params: MarketSnapshotParams): Promise<GrowthAnnualisedResponse> {\n const { signal, ...query } = params;\n const qs = buildQueryString(query);\n return this.http.get<GrowthAnnualisedResponse>(`/v1/markets/growth/annualised${qs}`, { signal });\n }\n\n /**\n * Supply metrics.\n *\n * `GET /v1/markets/supply`\n */\n async supply(params: MarketSnapshotParams): Promise<MarketSupplyResponse> {\n const { signal, ...query } = params;\n const qs = buildQueryString(query);\n return this.http.get<MarketSupplyResponse>(`/v1/markets/supply${qs}`, { signal });\n }\n\n /**\n * Supply long-term slope metrics.\n *\n * `GET /v1/markets/supply/ls`\n */\n async supplyLongSlope(params: MarketSnapshotParams): Promise<SupplyLongSlopeResponse> {\n const { signal, ...query } = params;\n const qs = buildQueryString(query);\n return this.http.get<SupplyLongSlopeResponse>(`/v1/markets/supply/ls${qs}`, { signal });\n }\n\n /**\n * Supply short-term slope metrics.\n *\n * `GET /v1/markets/supply/ss`\n */\n async supplyShortSlope(params: MarketSnapshotParams): Promise<SupplyShortSlopeResponse> {\n const { signal, ...query } = params;\n const qs = buildQueryString(query);\n return this.http.get<SupplyShortSlopeResponse>(`/v1/markets/supply/ss${qs}`, { signal });\n }\n\n /**\n * Demand metrics.\n *\n * `GET /v1/markets/demand`\n */\n async demand(params: MarketSnapshotParams): Promise<MarketDemandResponse> {\n const { signal, ...query } = params;\n const qs = buildQueryString(query);\n return this.http.get<MarketDemandResponse>(`/v1/markets/demand${qs}`, { signal });\n }\n\n /**\n * Demand long-term slope metrics.\n *\n * `GET /v1/markets/demand/ls`\n */\n async demandLongSlope(params: MarketSnapshotParams): Promise<DemandLongSlopeResponse> {\n const { signal, ...query } = params;\n const qs = buildQueryString(query);\n return this.http.get<DemandLongSlopeResponse>(`/v1/markets/demand/ls${qs}`, { signal });\n }\n\n /**\n * Demand short-term slope metrics.\n *\n * `GET /v1/markets/demand/ss`\n */\n async demandShortSlope(params: MarketSnapshotParams): Promise<DemandShortSlopeResponse> {\n const { signal, ...query } = params;\n const qs = buildQueryString(query);\n return this.http.get<DemandShortSlopeResponse>(`/v1/markets/demand/ss${qs}`, { signal });\n }\n\n /**\n * Market scores (RCS, HAPI, volatility).\n *\n * `GET /v1/markets/scores`\n */\n async scores(params: MarketSnapshotParams): Promise<MarketScoresResponse> {\n const { signal, ...query } = params;\n const qs = buildQueryString(query);\n return this.http.get<MarketScoresResponse>(`/v1/markets/scores${qs}`, { signal });\n }\n\n /**\n * Market fundamentals (IRSAD, ratios, years to own).\n *\n * `GET /v1/markets/fundamentals`\n */\n async fundamentals(params: MarketSnapshotParams): Promise<MarketFundamentalsResponse> {\n const { signal, ...query } = params;\n const qs = buildQueryString(query);\n return this.http.get<MarketFundamentalsResponse>(`/v1/markets/fundamentals${qs}`, { signal });\n }\n\n /**\n * Market cycle indicators.\n *\n * `GET /v1/markets/cycle`\n */\n async cycle(params: MarketSnapshotParams): Promise<MarketCycleResponse> {\n const { signal, ...query } = params;\n const qs = buildQueryString(query);\n return this.http.get<MarketCycleResponse>(`/v1/markets/cycle${qs}`, { signal });\n }\n\n /**\n * Market risk indicators (flood, fire, diversity, distance).\n *\n * `GET /v1/markets/risk`\n */\n async risk(params: MarketSnapshotParams): Promise<MarketRiskResponse> {\n const { signal, ...query } = params;\n const qs = buildQueryString(query);\n return this.http.get<MarketRiskResponse>(`/v1/markets/risk${qs}`, { signal });\n }\n}\n","import type { HttpClient } from '../http.js';\nimport { buildQueryString } from '../http.js';\nimport type { RequestOptions } from '../types.js';\nimport type {\n SubmitEventParams,\n ClassifiedEvent,\n QueryEventsParams,\n PaginatedEvents,\n CreateIntegrationParams,\n Integration,\n UpdateIntegrationParams,\n TestResult,\n CreateSubscriptionParams,\n Subscription,\n UpdateSubscriptionParams,\n EventCategory,\n EventType,\n TagInfo,\n} from './types.js';\n\n/**\n * Client for the Intent Hub API domain.\n *\n * ```ts\n * const event = await client.intentHub.submitEvent({\n * sourceType: 'AGENT',\n * sourceId: 'my-agent',\n * textContent: 'User wants to refinance their mortgage',\n * });\n * ```\n */\nexport class IntentHubClient {\n /** @internal */\n constructor(private readonly http: HttpClient) {}\n\n // -------------------------------------------------------------------------\n // Events\n // -------------------------------------------------------------------------\n\n /**\n * Submit a raw event for classification.\n *\n * `POST /intent-hub/v1/events`\n */\n async submitEvent(params: SubmitEventParams): Promise<ClassifiedEvent> {\n const { signal, ...rest } = params;\n return this.http.intentHubPost<ClassifiedEvent>(\n '/events',\n {\n source_type: rest.sourceType,\n source_id: rest.sourceId,\n text_content: rest.textContent,\n payload: rest.payload,\n user_id: rest.userId,\n session_id: rest.sessionId,\n suggested_category: rest.suggestedCategory,\n suggested_intent: rest.suggestedIntent,\n idempotency_key: rest.idempotencyKey,\n event_type: rest.eventType,\n },\n { signal },\n );\n }\n\n /**\n * Retrieve a single classified event by ID.\n *\n * `GET /intent-hub/v1/events/:eventId`\n */\n async getEvent(eventId: string, options?: RequestOptions): Promise<ClassifiedEvent> {\n return this.http.intentHubGet<ClassifiedEvent>(\n `/events/${encodeURIComponent(eventId)}`,\n options,\n );\n }\n\n /**\n * Query classified events with optional filters.\n *\n * `GET /intent-hub/v1/events`\n */\n async queryEvents(params?: QueryEventsParams): Promise<PaginatedEvents> {\n if (!params) {\n return this.http.intentHubGet<PaginatedEvents>('/events');\n }\n const { signal, ...query } = params;\n const qs = buildQueryString(query);\n return this.http.intentHubGet<PaginatedEvents>(`/events${qs}`, { signal });\n }\n\n // -------------------------------------------------------------------------\n // Integrations\n // -------------------------------------------------------------------------\n\n /**\n * Create a new integration endpoint.\n *\n * `POST /intent-hub/v1/integrations`\n */\n async createIntegration(params: CreateIntegrationParams): Promise<Integration> {\n const { signal, ...rest } = params;\n return this.http.intentHubPost<Integration>(\n '/integrations',\n {\n name: rest.name,\n type: rest.type,\n url: rest.url,\n secret: rest.secret,\n headers: rest.headers,\n config: rest.config,\n },\n { signal },\n );\n }\n\n /**\n * List all integrations for the current organisation.\n *\n * `GET /intent-hub/v1/integrations`\n */\n async listIntegrations(options?: RequestOptions): Promise<Integration[]> {\n return this.http.intentHubGet<Integration[]>('/integrations', options);\n }\n\n /**\n * Retrieve a single integration by ID.\n *\n * `GET /intent-hub/v1/integrations/:id`\n */\n async getIntegration(id: string, options?: RequestOptions): Promise<Integration> {\n return this.http.intentHubGet<Integration>(\n `/integrations/${encodeURIComponent(id)}`,\n options,\n );\n }\n\n /**\n * Update an existing integration.\n *\n * `PATCH /intent-hub/v1/integrations/:id`\n */\n async updateIntegration(\n id: string,\n params: UpdateIntegrationParams,\n ): Promise<Integration> {\n const { signal, ...rest } = params;\n return this.http.intentHubPatch<Integration>(\n `/integrations/${encodeURIComponent(id)}`,\n {\n name: rest.name,\n url: rest.url,\n secret: rest.secret,\n status: rest.status,\n },\n { signal },\n );\n }\n\n /**\n * Delete an integration by ID.\n *\n * `DELETE /intent-hub/v1/integrations/:id`\n */\n async deleteIntegration(id: string, options?: RequestOptions): Promise<void> {\n return this.http.intentHubDelete<void>(\n `/integrations/${encodeURIComponent(id)}`,\n options,\n );\n }\n\n /**\n * Send a test event to an integration endpoint.\n *\n * `POST /intent-hub/v1/integrations/:id/test`\n */\n async testIntegration(id: string, options?: RequestOptions): Promise<TestResult> {\n return this.http.intentHubPost<TestResult>(\n `/integrations/${encodeURIComponent(id)}/test`,\n {},\n options,\n );\n }\n\n // -------------------------------------------------------------------------\n // Subscriptions\n // -------------------------------------------------------------------------\n\n /**\n * Create a new subscription linking event patterns to an integration.\n *\n * `POST /intent-hub/v1/subscriptions`\n */\n async createSubscription(params: CreateSubscriptionParams): Promise<Subscription> {\n const { signal, ...rest } = params;\n return this.http.intentHubPost<Subscription>(\n '/subscriptions',\n {\n integration_id: rest.integrationId,\n event_type_slug: rest.eventTypeSlug,\n tag: rest.tag,\n intent_pattern: rest.intentPattern,\n filters: rest.filters,\n },\n { signal },\n );\n }\n\n /**\n * List all subscriptions for the current organisation.\n *\n * `GET /intent-hub/v1/subscriptions`\n */\n async listSubscriptions(options?: RequestOptions): Promise<Subscription[]> {\n return this.http.intentHubGet<Subscription[]>('/subscriptions', options);\n }\n\n /**\n * Retrieve a single subscription by ID.\n *\n * `GET /intent-hub/v1/subscriptions/:id`\n */\n async getSubscription(id: string, options?: RequestOptions): Promise<Subscription> {\n return this.http.intentHubGet<Subscription>(\n `/subscriptions/${encodeURIComponent(id)}`,\n options,\n );\n }\n\n /**\n * Update an existing subscription.\n *\n * `PATCH /intent-hub/v1/subscriptions/:id`\n */\n async updateSubscription(\n id: string,\n params: UpdateSubscriptionParams,\n ): Promise<Subscription> {\n const { signal, ...rest } = params;\n return this.http.intentHubPatch<Subscription>(\n `/subscriptions/${encodeURIComponent(id)}`,\n {\n event_type_slug: rest.eventTypeSlug,\n tag: rest.tag,\n intent_pattern: rest.intentPattern,\n integration_id: rest.integrationId,\n is_active: rest.isActive,\n },\n { signal },\n );\n }\n\n /**\n * Delete a subscription by ID.\n *\n * `DELETE /intent-hub/v1/subscriptions/:id`\n */\n async deleteSubscription(id: string, options?: RequestOptions): Promise<void> {\n return this.http.intentHubDelete<void>(\n `/subscriptions/${encodeURIComponent(id)}`,\n options,\n );\n }\n\n // -------------------------------------------------------------------------\n // Catalog\n // -------------------------------------------------------------------------\n\n /**\n * List all event categories in the taxonomy.\n *\n * `GET /intent-hub/v1/catalog/categories`\n */\n async listCategories(options?: RequestOptions): Promise<EventCategory[]> {\n return this.http.intentHubGet<EventCategory[]>('/catalog/categories', options);\n }\n\n /**\n * List event types, optionally filtered by category.\n *\n * `GET /intent-hub/v1/catalog/event-types`\n */\n async listEventTypes(\n params?: { category?: string } & RequestOptions,\n ): Promise<EventType[]> {\n if (!params) {\n return this.http.intentHubGet<EventType[]>('/catalog/event-types');\n }\n const { signal, ...query } = params;\n const qs = buildQueryString(query);\n return this.http.intentHubGet<EventType[]>(`/catalog/event-types${qs}`, { signal });\n }\n\n /**\n * List all tags with their usage counts.\n *\n * `GET /intent-hub/v1/catalog/tags`\n */\n async listTags(options?: RequestOptions): Promise<TagInfo[]> {\n return this.http.intentHubGet<TagInfo[]>('/catalog/tags', options);\n }\n}\n","import type { HttpClient } from '../http.js';\nimport { buildQueryString } from '../http.js';\nimport type {\n LocalityParams,\n LocalityResponse,\n LgaParams,\n LgaResponse,\n} from './types.js';\n\nexport class ReferenceClient {\n constructor(private readonly http: HttpClient) {}\n\n async locality(params: LocalityParams): Promise<LocalityResponse> {\n const { signal, ...query } = params;\n const qs = buildQueryString(query);\n return this.http.get<LocalityResponse>(`/v1/reference/locality${qs}`, { signal });\n }\n\n async lga(params: LgaParams): Promise<LgaResponse> {\n const { signal, ...query } = params;\n const qs = buildQueryString(query);\n return this.http.get<LgaResponse>(`/v1/reference/lga${qs}`, { signal });\n }\n}\n","import type { HtAgClientOptions, ResolvedConfig } from './types.js';\nimport { HttpClient } from './http.js';\nimport { AddressClient } from './address/client.js';\nimport { PropertyClient } from './property/client.js';\nimport { MarketsClient } from './markets/client.js';\nimport { IntentHubClient } from './intent-hub/client.js';\nimport { ReferenceClient } from './reference/client.js';\n\n// ---------------------------------------------------------------------------\n// Defaults\n// ---------------------------------------------------------------------------\n\nconst DEFAULT_MAX_RETRIES = 3;\nconst DEFAULT_RETRY_BASE_DELAY = 500; // ms\nconst DEFAULT_TIMEOUT = 30_000; // 30 seconds\n\n/**\n * Build the environment-derived base URLs.\n *\n * - `prod` -> `https://api.prod.htagai.com`\n * - `dev` -> `https://api.dev.htagai.com`\n */\nfunction resolveBaseUrls(options: HtAgClientOptions): {\n publicBaseUrl: string;\n internalBaseUrl: string;\n intentHubBaseUrl: string;\n} {\n if (options.baseUrl) {\n // Strip trailing slashes for consistency.\n const base = options.baseUrl.replace(/\\/+$/, '');\n return { publicBaseUrl: base, internalBaseUrl: base, intentHubBaseUrl: base };\n }\n\n const env = options.environment ?? 'prod';\n const base = `https://api.${env}.htagai.com`;\n return {\n publicBaseUrl: base,\n internalBaseUrl: base,\n intentHubBaseUrl: `${base}/intent-hub/v1`,\n };\n}\n\n// ---------------------------------------------------------------------------\n// HtAgApiClient\n// ---------------------------------------------------------------------------\n\n/**\n * Top-level client for the HtAG Location Intelligence APIs.\n *\n * ```ts\n * import { HtAgApiClient } from '@htag/sdk';\n *\n * const client = new HtAgApiClient({\n * apiKey: process.env.HTAG_API_KEY!,\n * environment: 'prod',\n * });\n *\n * const results = await client.address.search({ q: '100 George St Sydney' });\n * ```\n */\nexport class HtAgApiClient {\n /** Address search, insights and standardisation. */\n readonly address: AddressClient;\n\n /** Sold property search. */\n readonly property: PropertyClient;\n\n /** Market snapshots, advanced queries and time-series trends. */\n readonly markets: MarketsClient;\n\n /** Intent Hub: event classification, integrations and subscriptions. */\n readonly intentHub: IntentHubClient;\n\n /** Reference data: localities and LGAs. */\n readonly reference: ReferenceClient;\n\n constructor(options: HtAgClientOptions) {\n if (!options.apiKey) {\n throw new Error(\n 'HtAgApiClient requires an apiKey. Pass it in the constructor options.',\n );\n }\n\n const { publicBaseUrl, internalBaseUrl, intentHubBaseUrl } = resolveBaseUrls(options);\n\n const config: ResolvedConfig = {\n apiKey: options.apiKey,\n publicBaseUrl,\n internalBaseUrl,\n intentHubBaseUrl,\n maxRetries: options.maxRetries ?? DEFAULT_MAX_RETRIES,\n retryBaseDelay: options.retryBaseDelay ?? DEFAULT_RETRY_BASE_DELAY,\n timeout: options.timeout ?? DEFAULT_TIMEOUT,\n };\n\n const http = new HttpClient(config);\n\n this.address = new AddressClient(http);\n this.property = new PropertyClient(http);\n this.markets = new MarketsClient(http);\n this.intentHub = new IntentHubClient(http);\n this.reference = new ReferenceClient(http);\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACGO,IAAM,YAAN,cAAwB,MAAM;AAAA;AAAA,EAE1B;AAAA;AAAA,EAGA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M,QAAQ,eAAe;AACnC,QAAM,OAAO,eAAe,GAAG;AAC/B,SAAO;AAAA,IACL,eAAe;AAAA,IACf,iBAAiB;AAAA,IACjB,kBAAkB,GAAG,IAAI;AAAA,EAC3B;AACF;AAoBO,IAAM,gBAAN,MAAoB;AAAA;AAAA,EAEhB;AAAA;AAAA,EAGA;AAAA;AAAA,EAGA;AAAA;AAAA,EAGA;AAAA;AAAA,EAGA;AAAA,EAET,YAAY,SAA4B;AACtC,QAAI,CAAC,QAAQ,QAAQ;AACnB,YAAM,IAAI;AAAA,QACR;AAAA,MACF;AAAA,IACF;AAEA,UAAM,EAAE,eAAe,iBAAiB,iBAAiB,IAAI,gBAAgB,OAAO;AAEpF,UAAM,SAAyB;AAAA,MAC7B,QAAQ,QAAQ;AAAA,MAChB;AAAA,MACA;AAAA,MACA;AAAA,MACA,YAAY,QAAQ,cAAc;AAAA,MAClC,gBAAgB,QAAQ,kBAAkB;AAAA,MAC1C,SAAS,QAAQ,WAAW;AAAA,IAC9B;AAEA,UAAM,OAAO,IAAI,WAAW,MAAM;AAElC,SAAK,UAAU,IAAI,cAAc,IAAI;AACrC,SAAK,WAAW,IAAI,eAAe,IAAI;AACvC,SAAK,UAAU,IAAI,cAAc,IAAI;AACrC,SAAK,YAAY,IAAI,gBAAgB,IAAI;AACzC,SAAK,YAAY,IAAI,gBAAgB,IAAI;AAAA,EAC3C;AACF;","names":["base"]}
|
|
1
|
+
{"version":3,"sources":["../src/index.ts","../src/errors.ts","../src/http.ts","../src/address/client.ts","../src/agents/client.ts","../src/property/client.ts","../src/markets/trends.ts","../src/markets/client.ts","../src/intent-hub/client.ts","../src/reference/client.ts","../src/client.ts"],"sourcesContent":["// ---------------------------------------------------------------------------\n// @htag/sdk — Official TypeScript SDK for HtAG Location Intelligence APIs\n// ---------------------------------------------------------------------------\n\n// Main client\nexport { HtAgApiClient } from './client.js';\n\n// Configuration types\nexport type {\n HtAgClientOptions,\n ResolvedConfig,\n BaseResponse,\n RequestOptions,\n LevelEnum,\n PropertyTypeEnum,\n} from './types.js';\n\n// Error classes\nexport {\n HtAgError,\n AuthenticationError,\n RateLimitError,\n ValidationError,\n ServerError,\n} from './errors.js';\n\n// Agents domain\nexport { AgentsClient } from './agents/index.js';\nexport type {\n AgentExecuteResponse,\n AgentInfo,\n AgentInput,\n AgentJobStatus,\n AgentJobSubmission,\n AgentListResponse,\n} from './agents/index.js';\n\n// Address domain\nexport { AddressClient } from './address/index.js';\nexport type {\n AddressRecord,\n AddressSearchResult,\n AddressSearchParams,\n AddressSearchResponse,\n AddressInsightsParams,\n AddressInsightsResponse,\n BatchStandardiseParams,\n BatchStandardiseResponse,\n StandardisedAddress,\n GeocodeParams,\n GeocodeRecord,\n GeocodeResponse,\n EnvironmentParams,\n EnvironmentRecord,\n EnvironmentResponse,\n DemographicsParams,\n DemographicsRecord,\n DemographicsResponse,\n} from './address/index.js';\n\n// Property domain\nexport { PropertyClient } from './property/index.js';\nexport type {\n SoldPropertyRecord,\n SoldSearchParams,\n SoldPropertiesResponse,\n} from './property/index.js';\n\n// Markets domain\nexport { MarketsClient, TrendsClient } from './markets/index.js';\nexport type {\n MarketSnapshot,\n PriceHistoryOut,\n RentHistoryOut,\n YieldHistoryOut,\n FSDMonthlyOut,\n FSDQuarterlyOut,\n FSDYearlyOut,\n EssentialsOut,\n GRCOut,\n DemandProfileOut,\n LogicNode,\n AdvancedSearchBody,\n SnapshotsParams,\n MarketQueryParams,\n TrendsParams,\n TrendsWithBedroomsParams,\n SnapshotsResponse,\n MarketQueryResponse,\n PriceResponse,\n RentResponse,\n YieldResponse,\n SupplyDemandResponse,\n SearchIndexResponse,\n HoldPeriodResponse,\n PerformanceResponse,\n GrowthRatesResponse,\n DemandProfileResponse,\n MarketSnapshotParams,\n MarketGrowthCumulativeRecord,\n MarketGrowthAnnualisedRecord,\n MarketSupplyRecord,\n MarketSupplyLongSlopeRecord,\n MarketSupplyShortSlopeRecord,\n MarketDemandRecord,\n MarketDemandLongSlopeRecord,\n MarketDemandShortSlopeRecord,\n MarketScoresRecord,\n MarketFundamentalsRecord,\n MarketCycleRecord,\n MarketRiskRecord,\n GrowthCumulativeResponse,\n GrowthAnnualisedResponse,\n MarketSupplyResponse,\n SupplyLongSlopeResponse,\n SupplyShortSlopeResponse,\n MarketDemandResponse,\n DemandLongSlopeResponse,\n DemandShortSlopeResponse,\n MarketScoresResponse,\n MarketFundamentalsResponse,\n MarketCycleResponse,\n MarketRiskResponse,\n StockOnMarketTrendRecord,\n InventoryTrendRecord,\n DaysOnMarketTrendRecord,\n ClearanceRateTrendRecord,\n VacancyTrendRecord,\n StockOnMarketResponse,\n InventoryTrendResponse,\n DaysOnMarketResponse,\n ClearanceRateResponse,\n VacancyResponse,\n} from './markets/index.js';\n\n// Intent Hub domain\nexport { IntentHubClient } from './intent-hub/index.js';\nexport type {\n SourceType,\n IntegrationType,\n IntegrationStatus,\n Sentiment,\n Urgency,\n SubmitEventParams,\n ClassifiedEvent,\n QueryEventsParams,\n PaginatedEvents,\n CreateIntegrationParams,\n UpdateIntegrationParams,\n Integration,\n TestResult,\n CreateSubscriptionParams,\n UpdateSubscriptionParams,\n Subscription,\n EventCategory,\n EventType,\n TagInfo,\n} from './intent-hub/index.js';\n\n// Reference domain\nexport { ReferenceClient } from './reference/index.js';\nexport type {\n LocalityParams,\n LocalityRecord,\n LocalityResponse,\n LgaParams,\n LgaRecord,\n LgaResponse,\n} from './reference/index.js';\n","/**\n * Base error class for all HtAG SDK errors.\n */\nexport class HtAgError extends Error {\n /** HTTP status code, if available. */\n readonly status: number | undefined;\n\n /** Raw response body, if available. */\n readonly body: unknown;\n\n /** The request URL that caused the error. */\n readonly url: string | undefined;\n\n constructor(\n message: string,\n options?: {\n status?: number;\n body?: unknown;\n url?: string;\n cause?: unknown;\n },\n ) {\n super(message, { cause: options?.cause });\n this.name = 'HtAgError';\n this.status = options?.status;\n this.body = options?.body;\n this.url = options?.url;\n }\n}\n\n/**\n * Thrown when the server returns 401 or 403.\n */\nexport class AuthenticationError extends HtAgError {\n constructor(options: { status: number; body: unknown; url: string }) {\n super(\n `Authentication failed (HTTP ${options.status}). Check your API key.`,\n options,\n );\n this.name = 'AuthenticationError';\n }\n}\n\n/**\n * Thrown when the server returns 429 after exhausting all retries.\n */\nexport class RateLimitError extends HtAgError {\n constructor(options: { body: unknown; url: string }) {\n super('Rate limit exceeded. Please retry after a short delay.', {\n status: 429,\n ...options,\n });\n this.name = 'RateLimitError';\n }\n}\n\n/**\n * Thrown when the server returns 400 or 422.\n */\nexport class ValidationError extends HtAgError {\n constructor(options: { status: number; body: unknown; url: string }) {\n const detail = extractDetail(options.body);\n super(\n detail\n ? `Validation error (HTTP ${options.status}): ${detail}`\n : `Validation error (HTTP ${options.status})`,\n options,\n );\n this.name = 'ValidationError';\n }\n}\n\n/**\n * Thrown when the server returns a 5xx status after exhausting all retries.\n */\nexport class ServerError extends HtAgError {\n constructor(options: { status: number; body: unknown; url: string }) {\n super(`Server error (HTTP ${options.status})`, options);\n this.name = 'ServerError';\n }\n}\n\n// ---------------------------------------------------------------------------\n// Helpers\n// ---------------------------------------------------------------------------\n\nfunction extractDetail(body: unknown): string | undefined {\n if (body && typeof body === 'object' && 'detail' in body) {\n const detail = (body as Record<string, unknown>).detail;\n if (typeof detail === 'string') return detail;\n if (Array.isArray(detail)) {\n return detail\n .map((d) => {\n if (typeof d === 'string') return d;\n if (d && typeof d === 'object' && 'msg' in d) return String(d.msg);\n return JSON.stringify(d);\n })\n .join('; ');\n }\n return JSON.stringify(detail);\n }\n return undefined;\n}\n","import type { ResolvedConfig, RequestOptions } from './types.js';\nimport {\n HtAgError,\n AuthenticationError,\n RateLimitError,\n ValidationError,\n ServerError,\n} from './errors.js';\n\n// ---------------------------------------------------------------------------\n// camelCase -> snake_case conversion\n// ---------------------------------------------------------------------------\n\n/**\n * Convert a camelCase string to snake_case.\n *\n * Handles sequences of uppercase letters correctly:\n * - \"areaId\" -> \"area_id\"\n * - \"periodEndMin\" -> \"period_end_min\"\n * - \"IRSD\" -> \"irsd\" (all-caps treated as one token)\n */\nfunction toSnakeCase(str: string): string {\n return str\n .replace(/([A-Z]+)([A-Z][a-z])/g, '$1_$2')\n .replace(/([a-z0-9])([A-Z])/g, '$1_$2')\n .toLowerCase();\n}\n\n// ---------------------------------------------------------------------------\n// Query-string builder\n// ---------------------------------------------------------------------------\n\n/**\n * Build a URL query string from a params object, converting camelCase keys\n * to snake_case. Arrays are joined with commas. `undefined` and `null` values\n * are omitted.\n */\nexport function buildQueryString(\n params: Record<string, unknown>,\n): string {\n const parts: string[] = [];\n\n for (const [key, value] of Object.entries(params)) {\n // Skip internal SDK options that are not API params.\n if (key === 'signal') continue;\n if (value === undefined || value === null) continue;\n\n const snakeKey = toSnakeCase(key);\n\n if (Array.isArray(value)) {\n if (value.length > 0) {\n parts.push(\n `${encodeURIComponent(snakeKey)}=${encodeURIComponent(value.join(','))}`,\n );\n }\n } else {\n parts.push(\n `${encodeURIComponent(snakeKey)}=${encodeURIComponent(String(value))}`,\n );\n }\n }\n\n return parts.length > 0 ? `?${parts.join('&')}` : '';\n}\n\n// ---------------------------------------------------------------------------\n// Retryable HTTP client\n// ---------------------------------------------------------------------------\n\nfunction isRetryable(status: number): boolean {\n return status === 429 || status >= 500;\n}\n\nfunction sleep(ms: number): Promise<void> {\n return new Promise((resolve) => setTimeout(resolve, ms));\n}\n\n/**\n * Parse the body of a response. Returns the parsed JSON on success or a string\n * representation when parsing fails.\n */\nasync function parseBody(response: Response): Promise<unknown> {\n const contentType = response.headers.get('content-type') ?? '';\n if (contentType.includes('application/json')) {\n try {\n return await response.json();\n } catch {\n return await response.text();\n }\n }\n return await response.text();\n}\n\n/**\n * Throw the appropriate typed error for the given HTTP status.\n */\nfunction throwForStatus(\n status: number,\n body: unknown,\n url: string,\n): never {\n if (status === 401 || status === 403) {\n throw new AuthenticationError({ status, body, url });\n }\n if (status === 429) {\n throw new RateLimitError({ body, url });\n }\n if (status === 400 || status === 422) {\n throw new ValidationError({ status, body, url });\n }\n if (status >= 500) {\n throw new ServerError({ status, body, url });\n }\n throw new HtAgError(`HTTP ${status}`, { status, body, url });\n}\n\n/**\n * Internal HTTP transport used by all domain clients.\n */\nexport class HttpClient {\n constructor(private readonly config: ResolvedConfig) {}\n\n /**\n * Execute a GET request against the public API base.\n */\n async get<T>(path: string, options?: RequestOptions): Promise<T> {\n return this.request<T>('GET', this.config.publicBaseUrl + path, undefined, options);\n }\n\n /**\n * Execute a POST request against the public API base.\n */\n async post<T>(\n path: string,\n body: unknown,\n options?: RequestOptions,\n ): Promise<T> {\n return this.request<T>('POST', this.config.publicBaseUrl + path, body, options);\n }\n\n /**\n * Execute a PATCH request against the public API base.\n */\n async patch<T>(\n path: string,\n body: unknown,\n options?: RequestOptions,\n ): Promise<T> {\n return this.request<T>('PATCH', this.config.publicBaseUrl + path, body, options);\n }\n\n /**\n * Execute a DELETE request against the public API base.\n */\n async delete<T>(path: string, options?: RequestOptions): Promise<T> {\n return this.request<T>('DELETE', this.config.publicBaseUrl + path, undefined, options);\n }\n\n /**\n * Execute a GET request against the internal API base.\n */\n async internalGet<T>(path: string, options?: RequestOptions): Promise<T> {\n return this.request<T>('GET', this.config.internalBaseUrl + path, undefined, options);\n }\n\n /**\n * Execute a POST request against the internal API base.\n */\n async internalPost<T>(\n path: string,\n body: unknown,\n options?: RequestOptions,\n ): Promise<T> {\n return this.request<T>('POST', this.config.internalBaseUrl + path, body, options);\n }\n\n /**\n * Execute a GET request against the Intent Hub API base.\n */\n async intentHubGet<T>(path: string, options?: RequestOptions): Promise<T> {\n return this.request<T>('GET', this.config.intentHubBaseUrl + path, undefined, options);\n }\n\n /**\n * Execute a POST request against the Intent Hub API base.\n */\n async intentHubPost<T>(\n path: string,\n body: unknown,\n options?: RequestOptions,\n ): Promise<T> {\n return this.request<T>('POST', this.config.intentHubBaseUrl + path, body, options);\n }\n\n /**\n * Execute a PATCH request against the Intent Hub API base.\n */\n async intentHubPatch<T>(\n path: string,\n body: unknown,\n options?: RequestOptions,\n ): Promise<T> {\n return this.request<T>('PATCH', this.config.intentHubBaseUrl + path, body, options);\n }\n\n /**\n * Execute a DELETE request against the Intent Hub API base.\n */\n async intentHubDelete<T>(path: string, options?: RequestOptions): Promise<T> {\n return this.request<T>('DELETE', this.config.intentHubBaseUrl + path, undefined, options);\n }\n\n /**\n * Execute a GET request against the Agents API base.\n */\n async agentsGet<T>(path: string, options?: RequestOptions): Promise<T> {\n return this.request<T>('GET', this.config.agentsBaseUrl + path, undefined, options);\n }\n\n /**\n * Execute a POST request against the Agents API base.\n */\n async agentsPost<T>(\n path: string,\n body: unknown,\n options?: RequestOptions,\n ): Promise<T> {\n return this.request<T>('POST', this.config.agentsBaseUrl + path, body, options);\n }\n\n // -----------------------------------------------------------------------\n // Core request implementation with retries and exponential backoff\n // -----------------------------------------------------------------------\n\n private async request<T>(\n method: string,\n url: string,\n body: unknown,\n options?: RequestOptions,\n ): Promise<T> {\n const headers: Record<string, string> = {\n 'x-api-key': this.config.apiKey,\n 'accept': 'application/json',\n };\n\n if (body !== undefined) {\n headers['content-type'] = 'application/json';\n }\n\n let lastError: Error | undefined;\n\n for (let attempt = 0; attempt <= this.config.maxRetries; attempt++) {\n // If this is a retry, wait with exponential backoff + jitter.\n if (attempt > 0) {\n const base = this.config.retryBaseDelay * Math.pow(2, attempt - 1);\n const jitter = Math.random() * base * 0.5;\n await sleep(base + jitter);\n }\n\n // Build an AbortController that combines the user signal with a timeout.\n const controller = new AbortController();\n let timeoutId: ReturnType<typeof setTimeout> | undefined;\n\n const cleanup = () => {\n if (timeoutId !== undefined) clearTimeout(timeoutId);\n };\n\n // Wire up caller's abort signal.\n if (options?.signal) {\n if (options.signal.aborted) {\n throw new HtAgError('Request aborted', {\n url,\n cause: options.signal.reason,\n });\n }\n options.signal.addEventListener('abort', () => controller.abort(options.signal!.reason), {\n once: true,\n });\n }\n\n timeoutId = setTimeout(\n () => controller.abort(new Error('Request timed out')),\n this.config.timeout,\n );\n\n try {\n const response = await fetch(url, {\n method,\n headers,\n body: body !== undefined ? JSON.stringify(body) : undefined,\n signal: controller.signal,\n });\n\n cleanup();\n\n if (response.ok) {\n // 204 No Content — nothing to parse.\n if (response.status === 204) {\n return undefined as T;\n }\n return (await parseBody(response)) as T;\n }\n\n const responseBody = await parseBody(response);\n\n // Retry on retryable statuses, unless we've exhausted retries.\n if (isRetryable(response.status) && attempt < this.config.maxRetries) {\n lastError = new HtAgError(`HTTP ${response.status}`, {\n status: response.status,\n body: responseBody,\n url,\n });\n continue;\n }\n\n // Non-retryable or exhausted retries — throw typed error.\n throwForStatus(response.status, responseBody, url);\n } catch (err) {\n cleanup();\n\n // Re-throw our own typed errors.\n if (err instanceof HtAgError) {\n throw err;\n }\n\n // Handle abort / timeout.\n if (err instanceof DOMException && err.name === 'AbortError') {\n if (options?.signal?.aborted) {\n throw new HtAgError('Request aborted', { url, cause: err });\n }\n throw new HtAgError('Request timed out', { url, cause: err });\n }\n\n // Network / fetch errors — retry if we have attempts left.\n if (attempt < this.config.maxRetries) {\n lastError = err instanceof Error ? err : new Error(String(err));\n continue;\n }\n\n throw new HtAgError(\n `Network error: ${err instanceof Error ? err.message : String(err)}`,\n { url, cause: err },\n );\n }\n }\n\n // Should not reach here, but just in case.\n throw lastError ?? new HtAgError('Request failed after retries', { url });\n }\n}\n","import type { HttpClient } from '../http.js';\nimport { buildQueryString } from '../http.js';\nimport type {\n AddressSearchParams,\n AddressSearchResponse,\n AddressInsightsParams,\n AddressInsightsResponse,\n BatchStandardiseParams,\n BatchStandardiseResponse,\n GeocodeParams,\n GeocodeResponse,\n EnvironmentParams,\n EnvironmentResponse,\n DemographicsParams,\n DemographicsResponse,\n} from './types.js';\n\n/**\n * Client for the Address API domain.\n *\n * ```ts\n * const results = await client.address.search({ q: '100 George St Sydney' });\n * ```\n */\nexport class AddressClient {\n /** @internal */\n constructor(private readonly http: HttpClient) {}\n\n /**\n * Search for addresses matching a free-text query.\n *\n * `GET /internal-api/v1/address/search`\n */\n async search(params: AddressSearchParams): Promise<AddressSearchResponse> {\n const { signal, ...query } = params;\n const qs = buildQueryString(query);\n return this.http.internalGet<AddressSearchResponse>(`/internal-api/v1/address/search${qs}`, { signal });\n }\n\n /**\n * Retrieve detailed insights for one or more addresses.\n *\n * `GET /internal-api/v1/address/insights`\n */\n async insights(params: AddressInsightsParams): Promise<AddressInsightsResponse> {\n const { signal, ...query } = params;\n const qs = buildQueryString(query);\n return this.http.internalGet<AddressInsightsResponse>(`/internal-api/v1/address/insights${qs}`, { signal });\n }\n\n /**\n * Standardise a batch of raw address strings into structured records.\n *\n * `POST /v1/address/standardise`\n */\n async standardise(params: BatchStandardiseParams): Promise<BatchStandardiseResponse> {\n const { signal, addresses } = params;\n return this.http.post<BatchStandardiseResponse>(\n '/v1/address/standardise',\n { addresses },\n { signal },\n );\n }\n\n /**\n * Geocode an address string to structured location data.\n *\n * `GET /v1/address/geocode`\n */\n async geocode(params: GeocodeParams): Promise<GeocodeResponse> {\n const { signal, ...query } = params;\n const qs = buildQueryString(query);\n return this.http.get<GeocodeResponse>(`/v1/address/geocode${qs}`, { signal });\n }\n\n /**\n * Retrieve environmental data (flood, bushfire, heritage, zoning) for addresses.\n *\n * `GET /v1/address/environment`\n */\n async environment(params: EnvironmentParams): Promise<EnvironmentResponse> {\n const { signal, ...query } = params;\n const qs = buildQueryString(query);\n return this.http.get<EnvironmentResponse>(`/v1/address/environment${qs}`, { signal });\n }\n\n /**\n * Retrieve demographic data (SEIFA indices, housing tenure) for addresses.\n *\n * `GET /v1/address/demographics`\n */\n async demographics(params: DemographicsParams): Promise<DemographicsResponse> {\n const { signal, ...query } = params;\n const qs = buildQueryString(query);\n return this.http.get<DemographicsResponse>(`/v1/address/demographics${qs}`, { signal });\n }\n}\n","import type { HttpClient } from '../http.js';\nimport type {\n AgentExecuteResponse,\n AgentInfo,\n AgentInput,\n AgentJobStatus,\n AgentJobSubmission,\n AgentListResponse,\n} from './types.js';\n\n/**\n * Client for AI agent execution.\n *\n * ```ts\n * const result = await client.agents.execute('market-cycle', {\n * suburb: 'Richmond',\n * state: 'VIC',\n * propertyType: 'house',\n * });\n * ```\n */\nexport class AgentsClient {\n constructor(private readonly http: HttpClient) {}\n\n /** List all available agents with their metadata. */\n async list(): Promise<AgentListResponse> {\n return this.http.agentsGet<AgentListResponse>('/agents');\n }\n\n /** Get metadata for a specific agent. */\n async get(agentId: string): Promise<AgentInfo> {\n return this.http.agentsGet<AgentInfo>(`/agents/${agentId}`);\n }\n\n /**\n * Execute an agent synchronously.\n *\n * Blocks until the agent completes (typically 5-30 seconds).\n *\n * @param agentId - Agent identifier (e.g. `\"market-cycle\"`)\n * @param input - Agent input parameters\n */\n async execute(\n agentId: string,\n input: AgentInput = {},\n ): Promise<AgentExecuteResponse> {\n return this.http.agentsPost<AgentExecuteResponse>(\n `/agents/${agentId}/execute`,\n input,\n );\n }\n\n /**\n * Submit an async agent job. Returns immediately with a job ID.\n *\n * @param agentId - Agent identifier\n * @param input - Agent input parameters\n */\n async submitJob(\n agentId: string,\n input: AgentInput = {},\n ): Promise<AgentJobSubmission> {\n return this.http.agentsPost<AgentJobSubmission>(\n `/agents/${agentId}/execute/async`,\n input,\n );\n }\n\n /**\n * Poll the status of an async agent job.\n *\n * @param agentId - Agent identifier\n * @param jobId - Job ID from {@link submitJob}\n */\n async getJob(agentId: string, jobId: string): Promise<AgentJobStatus> {\n return this.http.agentsGet<AgentJobStatus>(\n `/agents/${agentId}/jobs/${jobId}`,\n );\n }\n}\n","import type { HttpClient } from '../http.js';\nimport { buildQueryString } from '../http.js';\nimport type {\n SoldSearchParams,\n SoldPropertiesResponse,\n} from './types.js';\n\n/**\n * Client for the Property API domain.\n *\n * ```ts\n * const sold = await client.property.soldSearch({ address: '100 George St Sydney', radius: 2000 });\n * ```\n */\nexport class PropertyClient {\n /** @internal */\n constructor(private readonly http: HttpClient) {}\n\n /**\n * Search for recently sold properties near a location.\n *\n * `GET /v1/property/sold/search`\n */\n async soldSearch(params: SoldSearchParams): Promise<SoldPropertiesResponse> {\n const { signal, ...query } = params;\n const qs = buildQueryString(query);\n return this.http.get<SoldPropertiesResponse>(`/v1/property/sold/search${qs}`, { signal });\n }\n}\n","import type { HttpClient } from '../http.js';\nimport { buildQueryString } from '../http.js';\nimport type {\n TrendsParams,\n TrendsWithBedroomsParams,\n PriceResponse,\n RentResponse,\n YieldResponse,\n SupplyDemandResponse,\n SearchIndexResponse,\n HoldPeriodResponse,\n PerformanceResponse,\n GrowthRatesResponse,\n DemandProfileResponse,\n StockOnMarketResponse,\n InventoryTrendResponse,\n DaysOnMarketResponse,\n ClearanceRateResponse,\n VacancyResponse,\n} from './types.js';\n\n/**\n * Client for the Markets Trends API domain.\n *\n * Each method queries a specific time-series metric:\n *\n * ```ts\n * const prices = await client.markets.trends.price({\n * level: 'suburb',\n * areaId: ['SAL10001'],\n * propertyType: ['house'],\n * });\n * ```\n */\nexport class TrendsClient {\n /** @internal */\n constructor(private readonly http: HttpClient) {}\n\n /**\n * Price history trends.\n *\n * `GET /internal-api/v1/markets/trends/price`\n */\n async price(params: TrendsWithBedroomsParams): Promise<PriceResponse> {\n return this.trend<PriceResponse>('price', params);\n }\n\n /**\n * Rent history trends.\n *\n * `GET /v1/markets/trends/rent`\n */\n async rent(params: TrendsWithBedroomsParams): Promise<RentResponse> {\n return this.publicTrend<RentResponse>('rent', params);\n }\n\n /**\n * Yield history trends.\n *\n * `GET /v1/markets/trends/yield`\n */\n async yieldHistory(params: TrendsWithBedroomsParams): Promise<YieldResponse> {\n return this.publicTrend<YieldResponse>('yield', params);\n }\n\n /**\n * Supply and demand (monthly frequency).\n *\n * `GET /internal-api/v1/markets/trends/supply-demand`\n */\n async supplyDemand(params: TrendsWithBedroomsParams): Promise<SupplyDemandResponse> {\n return this.trend<SupplyDemandResponse>('supply-demand', params);\n }\n\n /**\n * Search interest index (quarterly frequency).\n *\n * `GET /internal-api/v1/markets/trends/search-index`\n */\n async searchIndex(params: TrendsParams): Promise<SearchIndexResponse> {\n return this.trend<SearchIndexResponse>('search-index', params);\n }\n\n /**\n * Hold period (yearly frequency).\n *\n * `GET /internal-api/v1/markets/trends/hold-period`\n */\n async holdPeriod(params: TrendsParams): Promise<HoldPeriodResponse> {\n return this.trend<HoldPeriodResponse>('hold-period', params);\n }\n\n /**\n * Performance essentials.\n *\n * `GET /internal-api/v1/markets/trends/performance`\n */\n async performance(params: TrendsWithBedroomsParams): Promise<PerformanceResponse> {\n return this.trend<PerformanceResponse>('performance', params);\n }\n\n /**\n * Growth rate cycle.\n *\n * `GET /v1/markets/trends/growth-rates`\n */\n async growthRates(params: TrendsParams): Promise<GrowthRatesResponse> {\n return this.publicTrend<GrowthRatesResponse>('growth-rates', params);\n }\n\n /**\n * Demand profile breakdown.\n *\n * `GET /v1/markets/trends/demand-profile`\n */\n async demandProfile(params: TrendsParams): Promise<DemandProfileResponse> {\n return this.publicTrend<DemandProfileResponse>('demand-profile', params);\n }\n\n /**\n * Stock on market trends.\n *\n * `GET /v1/markets/trends/stock-on-market`\n */\n async stockOnMarket(params: TrendsParams): Promise<StockOnMarketResponse> {\n return this.publicTrend<StockOnMarketResponse>('stock-on-market', params);\n }\n\n /**\n * Inventory trends.\n *\n * `GET /v1/markets/trends/inventory`\n */\n async inventory(params: TrendsParams): Promise<InventoryTrendResponse> {\n return this.publicTrend<InventoryTrendResponse>('inventory', params);\n }\n\n /**\n * Days on market trends.\n *\n * `GET /v1/markets/trends/days-on-market`\n */\n async daysOnMarket(params: TrendsParams): Promise<DaysOnMarketResponse> {\n return this.publicTrend<DaysOnMarketResponse>('days-on-market', params);\n }\n\n /**\n * Clearance rate trends.\n *\n * `GET /v1/markets/trends/clearance-rate`\n */\n async clearanceRate(params: TrendsParams): Promise<ClearanceRateResponse> {\n return this.publicTrend<ClearanceRateResponse>('clearance-rate', params);\n }\n\n /**\n * Vacancy rate trends.\n *\n * `GET /v1/markets/trends/vacancy`\n */\n async vacancy(params: TrendsParams): Promise<VacancyResponse> {\n return this.publicTrend<VacancyResponse>('vacancy', params);\n }\n\n // -----------------------------------------------------------------------\n // Shared implementation\n // -----------------------------------------------------------------------\n\n private async trend<T>(metric: string, params: TrendsParams | TrendsWithBedroomsParams): Promise<T> {\n const { signal, ...query } = params;\n const qs = buildQueryString(query);\n return this.http.internalGet<T>(\n `/internal-api/v1/markets/trends/${metric}${qs}`,\n { signal },\n );\n }\n\n private async publicTrend<T>(metric: string, params: TrendsParams | TrendsWithBedroomsParams): Promise<T> {\n const { signal, ...query } = params;\n const qs = buildQueryString(query);\n return this.http.get<T>(\n `/v1/markets/trends/${metric}${qs}`,\n { signal },\n );\n }\n}\n","import type { HttpClient } from '../http.js';\nimport { buildQueryString } from '../http.js';\nimport { TrendsClient } from './trends.js';\nimport type {\n SnapshotsParams,\n SnapshotsResponse,\n AdvancedSearchBody,\n MarketQueryResponse,\n MarketSnapshotParams,\n GrowthCumulativeResponse,\n GrowthAnnualisedResponse,\n MarketSupplyResponse,\n SupplyLongSlopeResponse,\n SupplyShortSlopeResponse,\n MarketDemandResponse,\n DemandLongSlopeResponse,\n DemandShortSlopeResponse,\n MarketScoresResponse,\n MarketFundamentalsResponse,\n MarketCycleResponse,\n MarketRiskResponse,\n} from './types.js';\nimport type { RequestOptions } from '../types.js';\n\n/**\n * Client for the Markets API domain.\n *\n * ```ts\n * const snapshots = await client.markets.snapshots({\n * level: 'suburb',\n * propertyType: ['house'],\n * });\n *\n * const prices = await client.markets.trends.price({\n * level: 'suburb',\n * areaId: ['SAL10001'],\n * });\n * ```\n */\nexport class MarketsClient {\n /** Sub-client for time-series trend endpoints. */\n readonly trends: TrendsClient;\n\n /** @internal */\n constructor(private readonly http: HttpClient) {\n this.trends = new TrendsClient(http);\n }\n\n /**\n * Retrieve market snapshot data with optional filters.\n *\n * `GET /internal-api/v1/markets/snapshots`\n */\n async snapshots(params: SnapshotsParams): Promise<SnapshotsResponse> {\n const { signal, ...query } = params;\n const qs = buildQueryString(query);\n return this.http.internalGet<SnapshotsResponse>(\n `/internal-api/v1/markets/snapshots${qs}`,\n { signal },\n );\n }\n\n /**\n * Advanced market query with logical filter expressions.\n *\n * `POST /internal-api/v1/markets/query`\n */\n async query(\n body: AdvancedSearchBody,\n options?: RequestOptions,\n ): Promise<MarketQueryResponse> {\n return this.http.internalPost<MarketQueryResponse>(\n '/internal-api/v1/markets/query',\n body,\n options,\n );\n }\n\n // -------------------------------------------------------------------------\n // Public market snapshot endpoints (/v1/markets/*)\n // -------------------------------------------------------------------------\n\n /**\n * Cumulative growth metrics.\n *\n * `GET /v1/markets/growth/cumulative`\n */\n async growthCumulative(params: MarketSnapshotParams): Promise<GrowthCumulativeResponse> {\n const { signal, ...query } = params;\n const qs = buildQueryString(query);\n return this.http.get<GrowthCumulativeResponse>(`/v1/markets/growth/cumulative${qs}`, { signal });\n }\n\n /**\n * Annualised growth metrics.\n *\n * `GET /v1/markets/growth/annualised`\n */\n async growthAnnualised(params: MarketSnapshotParams): Promise<GrowthAnnualisedResponse> {\n const { signal, ...query } = params;\n const qs = buildQueryString(query);\n return this.http.get<GrowthAnnualisedResponse>(`/v1/markets/growth/annualised${qs}`, { signal });\n }\n\n /**\n * Supply metrics.\n *\n * `GET /v1/markets/supply`\n */\n async supply(params: MarketSnapshotParams): Promise<MarketSupplyResponse> {\n const { signal, ...query } = params;\n const qs = buildQueryString(query);\n return this.http.get<MarketSupplyResponse>(`/v1/markets/supply${qs}`, { signal });\n }\n\n /**\n * Supply long-term slope metrics.\n *\n * `GET /v1/markets/supply/ls`\n */\n async supplyLongSlope(params: MarketSnapshotParams): Promise<SupplyLongSlopeResponse> {\n const { signal, ...query } = params;\n const qs = buildQueryString(query);\n return this.http.get<SupplyLongSlopeResponse>(`/v1/markets/supply/ls${qs}`, { signal });\n }\n\n /**\n * Supply short-term slope metrics.\n *\n * `GET /v1/markets/supply/ss`\n */\n async supplyShortSlope(params: MarketSnapshotParams): Promise<SupplyShortSlopeResponse> {\n const { signal, ...query } = params;\n const qs = buildQueryString(query);\n return this.http.get<SupplyShortSlopeResponse>(`/v1/markets/supply/ss${qs}`, { signal });\n }\n\n /**\n * Demand metrics.\n *\n * `GET /v1/markets/demand`\n */\n async demand(params: MarketSnapshotParams): Promise<MarketDemandResponse> {\n const { signal, ...query } = params;\n const qs = buildQueryString(query);\n return this.http.get<MarketDemandResponse>(`/v1/markets/demand${qs}`, { signal });\n }\n\n /**\n * Demand long-term slope metrics.\n *\n * `GET /v1/markets/demand/ls`\n */\n async demandLongSlope(params: MarketSnapshotParams): Promise<DemandLongSlopeResponse> {\n const { signal, ...query } = params;\n const qs = buildQueryString(query);\n return this.http.get<DemandLongSlopeResponse>(`/v1/markets/demand/ls${qs}`, { signal });\n }\n\n /**\n * Demand short-term slope metrics.\n *\n * `GET /v1/markets/demand/ss`\n */\n async demandShortSlope(params: MarketSnapshotParams): Promise<DemandShortSlopeResponse> {\n const { signal, ...query } = params;\n const qs = buildQueryString(query);\n return this.http.get<DemandShortSlopeResponse>(`/v1/markets/demand/ss${qs}`, { signal });\n }\n\n /**\n * Market scores (RCS, HAPI, volatility).\n *\n * `GET /v1/markets/scores`\n */\n async scores(params: MarketSnapshotParams): Promise<MarketScoresResponse> {\n const { signal, ...query } = params;\n const qs = buildQueryString(query);\n return this.http.get<MarketScoresResponse>(`/v1/markets/scores${qs}`, { signal });\n }\n\n /**\n * Market fundamentals (IRSAD, ratios, years to own).\n *\n * `GET /v1/markets/fundamentals`\n */\n async fundamentals(params: MarketSnapshotParams): Promise<MarketFundamentalsResponse> {\n const { signal, ...query } = params;\n const qs = buildQueryString(query);\n return this.http.get<MarketFundamentalsResponse>(`/v1/markets/fundamentals${qs}`, { signal });\n }\n\n /**\n * Market cycle indicators.\n *\n * `GET /v1/markets/cycle`\n */\n async cycle(params: MarketSnapshotParams): Promise<MarketCycleResponse> {\n const { signal, ...query } = params;\n const qs = buildQueryString(query);\n return this.http.get<MarketCycleResponse>(`/v1/markets/cycle${qs}`, { signal });\n }\n\n /**\n * Market risk indicators (flood, fire, diversity, distance).\n *\n * `GET /v1/markets/risk`\n */\n async risk(params: MarketSnapshotParams): Promise<MarketRiskResponse> {\n const { signal, ...query } = params;\n const qs = buildQueryString(query);\n return this.http.get<MarketRiskResponse>(`/v1/markets/risk${qs}`, { signal });\n }\n}\n","import type { HttpClient } from '../http.js';\nimport { buildQueryString } from '../http.js';\nimport type { RequestOptions } from '../types.js';\nimport type {\n SubmitEventParams,\n ClassifiedEvent,\n QueryEventsParams,\n PaginatedEvents,\n CreateIntegrationParams,\n Integration,\n UpdateIntegrationParams,\n TestResult,\n CreateSubscriptionParams,\n Subscription,\n UpdateSubscriptionParams,\n EventCategory,\n EventType,\n TagInfo,\n} from './types.js';\n\n/**\n * Client for the Intent Hub API domain.\n *\n * ```ts\n * const event = await client.intentHub.submitEvent({\n * sourceType: 'AGENT',\n * sourceId: 'my-agent',\n * textContent: 'User wants to refinance their mortgage',\n * });\n * ```\n */\nexport class IntentHubClient {\n /** @internal */\n constructor(private readonly http: HttpClient) {}\n\n // -------------------------------------------------------------------------\n // Events\n // -------------------------------------------------------------------------\n\n /**\n * Submit a raw event for classification.\n *\n * `POST /intent-hub/v1/events`\n */\n async submitEvent(params: SubmitEventParams): Promise<ClassifiedEvent> {\n const { signal, ...rest } = params;\n return this.http.intentHubPost<ClassifiedEvent>(\n '/events',\n {\n source_type: rest.sourceType,\n source_id: rest.sourceId,\n text_content: rest.textContent,\n payload: rest.payload,\n user_id: rest.userId,\n session_id: rest.sessionId,\n suggested_category: rest.suggestedCategory,\n suggested_intent: rest.suggestedIntent,\n idempotency_key: rest.idempotencyKey,\n event_type: rest.eventType,\n },\n { signal },\n );\n }\n\n /**\n * Retrieve a single classified event by ID.\n *\n * `GET /intent-hub/v1/events/:eventId`\n */\n async getEvent(eventId: string, options?: RequestOptions): Promise<ClassifiedEvent> {\n return this.http.intentHubGet<ClassifiedEvent>(\n `/events/${encodeURIComponent(eventId)}`,\n options,\n );\n }\n\n /**\n * Query classified events with optional filters.\n *\n * `GET /intent-hub/v1/events`\n */\n async queryEvents(params?: QueryEventsParams): Promise<PaginatedEvents> {\n if (!params) {\n return this.http.intentHubGet<PaginatedEvents>('/events');\n }\n const { signal, ...query } = params;\n const qs = buildQueryString(query);\n return this.http.intentHubGet<PaginatedEvents>(`/events${qs}`, { signal });\n }\n\n // -------------------------------------------------------------------------\n // Integrations\n // -------------------------------------------------------------------------\n\n /**\n * Create a new integration endpoint.\n *\n * `POST /intent-hub/v1/integrations`\n */\n async createIntegration(params: CreateIntegrationParams): Promise<Integration> {\n const { signal, ...rest } = params;\n return this.http.intentHubPost<Integration>(\n '/integrations',\n {\n name: rest.name,\n type: rest.type,\n url: rest.url,\n secret: rest.secret,\n headers: rest.headers,\n config: rest.config,\n },\n { signal },\n );\n }\n\n /**\n * List all integrations for the current organisation.\n *\n * `GET /intent-hub/v1/integrations`\n */\n async listIntegrations(options?: RequestOptions): Promise<Integration[]> {\n return this.http.intentHubGet<Integration[]>('/integrations', options);\n }\n\n /**\n * Retrieve a single integration by ID.\n *\n * `GET /intent-hub/v1/integrations/:id`\n */\n async getIntegration(id: string, options?: RequestOptions): Promise<Integration> {\n return this.http.intentHubGet<Integration>(\n `/integrations/${encodeURIComponent(id)}`,\n options,\n );\n }\n\n /**\n * Update an existing integration.\n *\n * `PATCH /intent-hub/v1/integrations/:id`\n */\n async updateIntegration(\n id: string,\n params: UpdateIntegrationParams,\n ): Promise<Integration> {\n const { signal, ...rest } = params;\n return this.http.intentHubPatch<Integration>(\n `/integrations/${encodeURIComponent(id)}`,\n {\n name: rest.name,\n url: rest.url,\n secret: rest.secret,\n status: rest.status,\n },\n { signal },\n );\n }\n\n /**\n * Delete an integration by ID.\n *\n * `DELETE /intent-hub/v1/integrations/:id`\n */\n async deleteIntegration(id: string, options?: RequestOptions): Promise<void> {\n return this.http.intentHubDelete<void>(\n `/integrations/${encodeURIComponent(id)}`,\n options,\n );\n }\n\n /**\n * Send a test event to an integration endpoint.\n *\n * `POST /intent-hub/v1/integrations/:id/test`\n */\n async testIntegration(id: string, options?: RequestOptions): Promise<TestResult> {\n return this.http.intentHubPost<TestResult>(\n `/integrations/${encodeURIComponent(id)}/test`,\n {},\n options,\n );\n }\n\n // -------------------------------------------------------------------------\n // Subscriptions\n // -------------------------------------------------------------------------\n\n /**\n * Create a new subscription linking event patterns to an integration.\n *\n * `POST /intent-hub/v1/subscriptions`\n */\n async createSubscription(params: CreateSubscriptionParams): Promise<Subscription> {\n const { signal, ...rest } = params;\n return this.http.intentHubPost<Subscription>(\n '/subscriptions',\n {\n integration_id: rest.integrationId,\n event_type_slug: rest.eventTypeSlug,\n tag: rest.tag,\n intent_pattern: rest.intentPattern,\n filters: rest.filters,\n },\n { signal },\n );\n }\n\n /**\n * List all subscriptions for the current organisation.\n *\n * `GET /intent-hub/v1/subscriptions`\n */\n async listSubscriptions(options?: RequestOptions): Promise<Subscription[]> {\n return this.http.intentHubGet<Subscription[]>('/subscriptions', options);\n }\n\n /**\n * Retrieve a single subscription by ID.\n *\n * `GET /intent-hub/v1/subscriptions/:id`\n */\n async getSubscription(id: string, options?: RequestOptions): Promise<Subscription> {\n return this.http.intentHubGet<Subscription>(\n `/subscriptions/${encodeURIComponent(id)}`,\n options,\n );\n }\n\n /**\n * Update an existing subscription.\n *\n * `PATCH /intent-hub/v1/subscriptions/:id`\n */\n async updateSubscription(\n id: string,\n params: UpdateSubscriptionParams,\n ): Promise<Subscription> {\n const { signal, ...rest } = params;\n return this.http.intentHubPatch<Subscription>(\n `/subscriptions/${encodeURIComponent(id)}`,\n {\n event_type_slug: rest.eventTypeSlug,\n tag: rest.tag,\n intent_pattern: rest.intentPattern,\n integration_id: rest.integrationId,\n is_active: rest.isActive,\n },\n { signal },\n );\n }\n\n /**\n * Delete a subscription by ID.\n *\n * `DELETE /intent-hub/v1/subscriptions/:id`\n */\n async deleteSubscription(id: string, options?: RequestOptions): Promise<void> {\n return this.http.intentHubDelete<void>(\n `/subscriptions/${encodeURIComponent(id)}`,\n options,\n );\n }\n\n // -------------------------------------------------------------------------\n // Catalog\n // -------------------------------------------------------------------------\n\n /**\n * List all event categories in the taxonomy.\n *\n * `GET /intent-hub/v1/catalog/categories`\n */\n async listCategories(options?: RequestOptions): Promise<EventCategory[]> {\n return this.http.intentHubGet<EventCategory[]>('/catalog/categories', options);\n }\n\n /**\n * List event types, optionally filtered by category.\n *\n * `GET /intent-hub/v1/catalog/event-types`\n */\n async listEventTypes(\n params?: { category?: string } & RequestOptions,\n ): Promise<EventType[]> {\n if (!params) {\n return this.http.intentHubGet<EventType[]>('/catalog/event-types');\n }\n const { signal, ...query } = params;\n const qs = buildQueryString(query);\n return this.http.intentHubGet<EventType[]>(`/catalog/event-types${qs}`, { signal });\n }\n\n /**\n * List all tags with their usage counts.\n *\n * `GET /intent-hub/v1/catalog/tags`\n */\n async listTags(options?: RequestOptions): Promise<TagInfo[]> {\n return this.http.intentHubGet<TagInfo[]>('/catalog/tags', options);\n }\n}\n","import type { HttpClient } from '../http.js';\nimport { buildQueryString } from '../http.js';\nimport type {\n LocalityParams,\n LocalityResponse,\n LgaParams,\n LgaResponse,\n} from './types.js';\n\nexport class ReferenceClient {\n constructor(private readonly http: HttpClient) {}\n\n async locality(params: LocalityParams): Promise<LocalityResponse> {\n const { signal, ...query } = params;\n const qs = buildQueryString(query);\n return this.http.get<LocalityResponse>(`/v1/reference/locality${qs}`, { signal });\n }\n\n async lga(params: LgaParams): Promise<LgaResponse> {\n const { signal, ...query } = params;\n const qs = buildQueryString(query);\n return this.http.get<LgaResponse>(`/v1/reference/lga${qs}`, { signal });\n }\n}\n","import type { HtAgClientOptions, ResolvedConfig } from './types.js';\nimport { HttpClient } from './http.js';\nimport { AddressClient } from './address/client.js';\nimport { AgentsClient } from './agents/client.js';\nimport { PropertyClient } from './property/client.js';\nimport { MarketsClient } from './markets/client.js';\nimport { IntentHubClient } from './intent-hub/client.js';\nimport { ReferenceClient } from './reference/client.js';\n\n// ---------------------------------------------------------------------------\n// Defaults\n// ---------------------------------------------------------------------------\n\nconst DEFAULT_MAX_RETRIES = 3;\nconst DEFAULT_RETRY_BASE_DELAY = 500; // ms\nconst DEFAULT_TIMEOUT = 30_000; // 30 seconds\n\n/**\n * Build the environment-derived base URLs.\n *\n * - `prod` -> `https://api.prod.htagai.com`\n * - `dev` -> `https://api.dev.htagai.com`\n */\nfunction resolveBaseUrls(options: HtAgClientOptions): {\n publicBaseUrl: string;\n internalBaseUrl: string;\n intentHubBaseUrl: string;\n agentsBaseUrl: string;\n} {\n if (options.baseUrl) {\n // Strip trailing slashes for consistency.\n const base = options.baseUrl.replace(/\\/+$/, '');\n return { publicBaseUrl: base, internalBaseUrl: base, intentHubBaseUrl: base, agentsBaseUrl: base };\n }\n\n const env = options.environment ?? 'prod';\n const base = `https://api.${env}.htagai.com`;\n return {\n publicBaseUrl: base,\n internalBaseUrl: base,\n intentHubBaseUrl: `${base}/intent-hub/v1`,\n agentsBaseUrl: `${base}/micro-agents`,\n };\n}\n\n// ---------------------------------------------------------------------------\n// HtAgApiClient\n// ---------------------------------------------------------------------------\n\n/**\n * Top-level client for the HtAG Location Intelligence APIs.\n *\n * ```ts\n * import { HtAgApiClient } from '@htag/sdk';\n *\n * const client = new HtAgApiClient({\n * apiKey: process.env.HTAG_API_KEY!,\n * environment: 'prod',\n * });\n *\n * const results = await client.address.search({ q: '100 George St Sydney' });\n * ```\n */\nexport class HtAgApiClient {\n /** Address search, insights and standardisation. */\n readonly address: AddressClient;\n\n /** AI-powered property investment agents. */\n readonly agents: AgentsClient;\n\n /** Sold property search. */\n readonly property: PropertyClient;\n\n /** Market snapshots, advanced queries and time-series trends. */\n readonly markets: MarketsClient;\n\n /** Intent Hub: event classification, integrations and subscriptions. */\n readonly intentHub: IntentHubClient;\n\n /** Reference data: localities and LGAs. */\n readonly reference: ReferenceClient;\n\n constructor(options: HtAgClientOptions) {\n if (!options.apiKey) {\n throw new Error(\n 'HtAgApiClient requires an apiKey. Pass it in the constructor options.',\n );\n }\n\n const { publicBaseUrl, internalBaseUrl, intentHubBaseUrl, agentsBaseUrl } = resolveBaseUrls(options);\n\n const config: ResolvedConfig = {\n apiKey: options.apiKey,\n publicBaseUrl,\n internalBaseUrl,\n intentHubBaseUrl,\n agentsBaseUrl,\n maxRetries: options.maxRetries ?? DEFAULT_MAX_RETRIES,\n retryBaseDelay: options.retryBaseDelay ?? DEFAULT_RETRY_BASE_DELAY,\n timeout: options.timeout ?? DEFAULT_TIMEOUT,\n };\n\n const http = new HttpClient(config);\n\n this.address = new AddressClient(http);\n this.agents = new AgentsClient(http);\n this.property = new PropertyClient(http);\n this.markets = new MarketsClient(http);\n this.intentHub = new IntentHubClient(http);\n this.reference = new ReferenceClient(http);\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACGO,IAAM,YAAN,cAAwB,MAAM;AAAA;AAAA,EAE1B;AAAA;AAAA,EAGA;AAAA;AAAA,EAGA;AAAA,EAET,YACE,SACA,SAMA;AACA,UAAM,SAAS,EAAE,OAAO,SAAS,MAAM,CAAC;AACxC,SAAK,OAAO;AACZ,SAAK,SAAS,SAAS;AACvB,SAAK,OAAO,SAAS;AACrB,SAAK,MAAM,SAAS;AAAA,EACtB;AACF;AAKO,IAAM,sBAAN,cAAkC,UAAU;AAAA,EACjD,YAAY,SAAyD;AACnE;AAAA,MACE,+BAA+B,QAAQ,MAAM;AAAA,MAC7C;AAAA,IACF;AACA,SAAK,OAAO;AAAA,EACd;AACF;AAKO,IAAM,iBAAN,cAA6B,UAAU;AAAA,EAC5C,YAAY,SAAyC;AACnD,UAAM,0DAA0D;AAAA,MAC9D,QAAQ;AAAA,MACR,GAAG;AAAA,IACL,CAAC;AACD,SAAK,OAAO;AAAA,EACd;AACF;AAKO,IAAM,kBAAN,cAA8B,UAAU;AAAA,EAC7C,YAAY,SAAyD;AACnE,UAAM,SAAS,cAAc,QAA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aAAa,IAAI;AACnC,SAAK,WAAW,IAAI,eAAe,IAAI;AACvC,SAAK,UAAU,IAAI,cAAc,IAAI;AACrC,SAAK,YAAY,IAAI,gBAAgB,IAAI;AACzC,SAAK,YAAY,IAAI,gBAAgB,IAAI;AAAA,EAC3C;AACF;","names":["base"]}
|
package/dist/index.d.cts
CHANGED
|
@@ -23,6 +23,7 @@ interface ResolvedConfig {
|
|
|
23
23
|
publicBaseUrl: string;
|
|
24
24
|
internalBaseUrl: string;
|
|
25
25
|
intentHubBaseUrl: string;
|
|
26
|
+
agentsBaseUrl: string;
|
|
26
27
|
maxRetries: number;
|
|
27
28
|
retryBaseDelay: number;
|
|
28
29
|
timeout: number;
|
|
@@ -98,6 +99,14 @@ declare class HttpClient {
|
|
|
98
99
|
* Execute a DELETE request against the Intent Hub API base.
|
|
99
100
|
*/
|
|
100
101
|
intentHubDelete<T>(path: string, options?: RequestOptions): Promise<T>;
|
|
102
|
+
/**
|
|
103
|
+
* Execute a GET request against the Agents API base.
|
|
104
|
+
*/
|
|
105
|
+
agentsGet<T>(path: string, options?: RequestOptions): Promise<T>;
|
|
106
|
+
/**
|
|
107
|
+
* Execute a POST request against the Agents API base.
|
|
108
|
+
*/
|
|
109
|
+
agentsPost<T>(path: string, body: unknown, options?: RequestOptions): Promise<T>;
|
|
101
110
|
private request;
|
|
102
111
|
}
|
|
103
112
|
|
|
@@ -316,6 +325,96 @@ declare class AddressClient {
|
|
|
316
325
|
demographics(params: DemographicsParams): Promise<DemographicsResponse>;
|
|
317
326
|
}
|
|
318
327
|
|
|
328
|
+
/** Agent metadata from the catalog. */
|
|
329
|
+
interface AgentInfo {
|
|
330
|
+
agent_id: string;
|
|
331
|
+
name: string;
|
|
332
|
+
description: string;
|
|
333
|
+
version: string;
|
|
334
|
+
credit_cost: number;
|
|
335
|
+
category: string;
|
|
336
|
+
supports_pdf: boolean;
|
|
337
|
+
supports_streaming: boolean;
|
|
338
|
+
input_schema?: Record<string, unknown>;
|
|
339
|
+
output_schema?: Record<string, unknown>;
|
|
340
|
+
}
|
|
341
|
+
/** Response from listing all agents. */
|
|
342
|
+
interface AgentListResponse {
|
|
343
|
+
agents: AgentInfo[];
|
|
344
|
+
total: number;
|
|
345
|
+
}
|
|
346
|
+
/**
|
|
347
|
+
* Response from executing an agent.
|
|
348
|
+
*
|
|
349
|
+
* The exact fields depend on the agent. Common fields include
|
|
350
|
+
* `signal_rationale`, `suburb`, `transitions`, `network_prompts`, and `events`.
|
|
351
|
+
*/
|
|
352
|
+
interface AgentExecuteResponse {
|
|
353
|
+
[key: string]: unknown;
|
|
354
|
+
}
|
|
355
|
+
/** Response from submitting an async agent job. */
|
|
356
|
+
interface AgentJobSubmission {
|
|
357
|
+
job_id: string;
|
|
358
|
+
agent_id: string;
|
|
359
|
+
status: string;
|
|
360
|
+
}
|
|
361
|
+
/** Response from polling an async agent job. */
|
|
362
|
+
interface AgentJobStatus {
|
|
363
|
+
job_id: string;
|
|
364
|
+
agent_id: string;
|
|
365
|
+
status: string;
|
|
366
|
+
created_at?: string;
|
|
367
|
+
started_at?: string;
|
|
368
|
+
completed_at?: string;
|
|
369
|
+
output?: Record<string, unknown>;
|
|
370
|
+
error?: string;
|
|
371
|
+
}
|
|
372
|
+
/** Input parameters for agent execution. */
|
|
373
|
+
type AgentInput = Record<string, unknown>;
|
|
374
|
+
|
|
375
|
+
/**
|
|
376
|
+
* Client for AI agent execution.
|
|
377
|
+
*
|
|
378
|
+
* ```ts
|
|
379
|
+
* const result = await client.agents.execute('market-cycle', {
|
|
380
|
+
* suburb: 'Richmond',
|
|
381
|
+
* state: 'VIC',
|
|
382
|
+
* propertyType: 'house',
|
|
383
|
+
* });
|
|
384
|
+
* ```
|
|
385
|
+
*/
|
|
386
|
+
declare class AgentsClient {
|
|
387
|
+
private readonly http;
|
|
388
|
+
constructor(http: HttpClient);
|
|
389
|
+
/** List all available agents with their metadata. */
|
|
390
|
+
list(): Promise<AgentListResponse>;
|
|
391
|
+
/** Get metadata for a specific agent. */
|
|
392
|
+
get(agentId: string): Promise<AgentInfo>;
|
|
393
|
+
/**
|
|
394
|
+
* Execute an agent synchronously.
|
|
395
|
+
*
|
|
396
|
+
* Blocks until the agent completes (typically 5-30 seconds).
|
|
397
|
+
*
|
|
398
|
+
* @param agentId - Agent identifier (e.g. `"market-cycle"`)
|
|
399
|
+
* @param input - Agent input parameters
|
|
400
|
+
*/
|
|
401
|
+
execute(agentId: string, input?: AgentInput): Promise<AgentExecuteResponse>;
|
|
402
|
+
/**
|
|
403
|
+
* Submit an async agent job. Returns immediately with a job ID.
|
|
404
|
+
*
|
|
405
|
+
* @param agentId - Agent identifier
|
|
406
|
+
* @param input - Agent input parameters
|
|
407
|
+
*/
|
|
408
|
+
submitJob(agentId: string, input?: AgentInput): Promise<AgentJobSubmission>;
|
|
409
|
+
/**
|
|
410
|
+
* Poll the status of an async agent job.
|
|
411
|
+
*
|
|
412
|
+
* @param agentId - Agent identifier
|
|
413
|
+
* @param jobId - Job ID from {@link submitJob}
|
|
414
|
+
*/
|
|
415
|
+
getJob(agentId: string, jobId: string): Promise<AgentJobStatus>;
|
|
416
|
+
}
|
|
417
|
+
|
|
319
418
|
interface SoldPropertyRecord {
|
|
320
419
|
address_key?: string | null;
|
|
321
420
|
property_type?: string | null;
|
|
@@ -1365,6 +1464,8 @@ declare class ReferenceClient {
|
|
|
1365
1464
|
declare class HtAgApiClient {
|
|
1366
1465
|
/** Address search, insights and standardisation. */
|
|
1367
1466
|
readonly address: AddressClient;
|
|
1467
|
+
/** AI-powered property investment agents. */
|
|
1468
|
+
readonly agents: AgentsClient;
|
|
1368
1469
|
/** Sold property search. */
|
|
1369
1470
|
readonly property: PropertyClient;
|
|
1370
1471
|
/** Market snapshots, advanced queries and time-series trends. */
|
|
@@ -1433,4 +1534,4 @@ declare class ServerError extends HtAgError {
|
|
|
1433
1534
|
});
|
|
1434
1535
|
}
|
|
1435
1536
|
|
|
1436
|
-
export { AddressClient, type AddressInsightsParams, type AddressInsightsResponse, type AddressRecord, type AddressSearchParams, type AddressSearchResponse, type AddressSearchResult, type AdvancedSearchBody, AuthenticationError, type BaseResponse, type BatchStandardiseParams, type BatchStandardiseResponse, type ClassifiedEvent, type ClearanceRateResponse, type ClearanceRateTrendRecord, type CreateIntegrationParams, type CreateSubscriptionParams, type DaysOnMarketResponse, type DaysOnMarketTrendRecord, type DemandLongSlopeResponse, type DemandProfileOut, type DemandProfileResponse, type DemandShortSlopeResponse, type DemographicsParams, type DemographicsRecord, type DemographicsResponse, type EnvironmentParams, type EnvironmentRecord, type EnvironmentResponse, type EssentialsOut, type EventCategory, type EventType, type FSDMonthlyOut, type FSDQuarterlyOut, type FSDYearlyOut, type GRCOut, type GeocodeParams, type GeocodeRecord, type GeocodeResponse, type GrowthAnnualisedResponse, type GrowthCumulativeResponse, type GrowthRatesResponse, type HoldPeriodResponse, HtAgApiClient, type HtAgClientOptions, HtAgError, type Integration, type IntegrationStatus, type IntegrationType, IntentHubClient, type InventoryTrendRecord, type InventoryTrendResponse, type LevelEnum, type LgaParams, type LgaRecord, type LgaResponse, type LocalityParams, type LocalityRecord, type LocalityResponse, type LogicNode, type MarketCycleRecord, type MarketCycleResponse, type MarketDemandLongSlopeRecord, type MarketDemandRecord, type MarketDemandResponse, type MarketDemandShortSlopeRecord, type MarketFundamentalsRecord, type MarketFundamentalsResponse, type MarketGrowthAnnualisedRecord, type MarketGrowthCumulativeRecord, type MarketQueryParams, type MarketQueryResponse, type MarketRiskRecord, type MarketRiskResponse, type MarketScoresRecord, type MarketScoresResponse, type MarketSnapshot, type MarketSnapshotParams, type MarketSupplyLongSlopeRecord, type MarketSupplyRecord, type MarketSupplyResponse, type MarketSupplyShortSlopeRecord, MarketsClient, type PaginatedEvents, type PerformanceResponse, type PriceHistoryOut, type PriceResponse, PropertyClient, type PropertyTypeEnum, type QueryEventsParams, RateLimitError, ReferenceClient, type RentHistoryOut, type RentResponse, type RequestOptions, type ResolvedConfig, type SearchIndexResponse, type Sentiment, ServerError, type SnapshotsParams, type SnapshotsResponse, type SoldPropertiesResponse, type SoldPropertyRecord, type SoldSearchParams, type SourceType, type StandardisedAddress, type StockOnMarketResponse, type StockOnMarketTrendRecord, type SubmitEventParams, type Subscription, type SupplyDemandResponse, type SupplyLongSlopeResponse, type SupplyShortSlopeResponse, type TagInfo, type TestResult, TrendsClient, type TrendsParams, type TrendsWithBedroomsParams, type UpdateIntegrationParams, type UpdateSubscriptionParams, type Urgency, type VacancyResponse, type VacancyTrendRecord, ValidationError, type YieldHistoryOut, type YieldResponse };
|
|
1537
|
+
export { AddressClient, type AddressInsightsParams, type AddressInsightsResponse, type AddressRecord, type AddressSearchParams, type AddressSearchResponse, type AddressSearchResult, type AdvancedSearchBody, type AgentExecuteResponse, type AgentInfo, type AgentInput, type AgentJobStatus, type AgentJobSubmission, type AgentListResponse, AgentsClient, AuthenticationError, type BaseResponse, type BatchStandardiseParams, type BatchStandardiseResponse, type ClassifiedEvent, type ClearanceRateResponse, type ClearanceRateTrendRecord, type CreateIntegrationParams, type CreateSubscriptionParams, type DaysOnMarketResponse, type DaysOnMarketTrendRecord, type DemandLongSlopeResponse, type DemandProfileOut, type DemandProfileResponse, type DemandShortSlopeResponse, type DemographicsParams, type DemographicsRecord, type DemographicsResponse, type EnvironmentParams, type EnvironmentRecord, type EnvironmentResponse, type EssentialsOut, type EventCategory, type EventType, type FSDMonthlyOut, type FSDQuarterlyOut, type FSDYearlyOut, type GRCOut, type GeocodeParams, type GeocodeRecord, type GeocodeResponse, type GrowthAnnualisedResponse, type GrowthCumulativeResponse, type GrowthRatesResponse, type HoldPeriodResponse, HtAgApiClient, type HtAgClientOptions, HtAgError, type Integration, type IntegrationStatus, type IntegrationType, IntentHubClient, type InventoryTrendRecord, type InventoryTrendResponse, type LevelEnum, type LgaParams, type LgaRecord, type LgaResponse, type LocalityParams, type LocalityRecord, type LocalityResponse, type LogicNode, type MarketCycleRecord, type MarketCycleResponse, type MarketDemandLongSlopeRecord, type MarketDemandRecord, type MarketDemandResponse, type MarketDemandShortSlopeRecord, type MarketFundamentalsRecord, type MarketFundamentalsResponse, type MarketGrowthAnnualisedRecord, type MarketGrowthCumulativeRecord, type MarketQueryParams, type MarketQueryResponse, type MarketRiskRecord, type MarketRiskResponse, type MarketScoresRecord, type MarketScoresResponse, type MarketSnapshot, type MarketSnapshotParams, type MarketSupplyLongSlopeRecord, type MarketSupplyRecord, type MarketSupplyResponse, type MarketSupplyShortSlopeRecord, MarketsClient, type PaginatedEvents, type PerformanceResponse, type PriceHistoryOut, type PriceResponse, PropertyClient, type PropertyTypeEnum, type QueryEventsParams, RateLimitError, ReferenceClient, type RentHistoryOut, type RentResponse, type RequestOptions, type ResolvedConfig, type SearchIndexResponse, type Sentiment, ServerError, type SnapshotsParams, type SnapshotsResponse, type SoldPropertiesResponse, type SoldPropertyRecord, type SoldSearchParams, type SourceType, type StandardisedAddress, type StockOnMarketResponse, type StockOnMarketTrendRecord, type SubmitEventParams, type Subscription, type SupplyDemandResponse, type SupplyLongSlopeResponse, type SupplyShortSlopeResponse, type TagInfo, type TestResult, TrendsClient, type TrendsParams, type TrendsWithBedroomsParams, type UpdateIntegrationParams, type UpdateSubscriptionParams, type Urgency, type VacancyResponse, type VacancyTrendRecord, ValidationError, type YieldHistoryOut, type YieldResponse };
|
package/dist/index.d.ts
CHANGED
|
@@ -23,6 +23,7 @@ interface ResolvedConfig {
|
|
|
23
23
|
publicBaseUrl: string;
|
|
24
24
|
internalBaseUrl: string;
|
|
25
25
|
intentHubBaseUrl: string;
|
|
26
|
+
agentsBaseUrl: string;
|
|
26
27
|
maxRetries: number;
|
|
27
28
|
retryBaseDelay: number;
|
|
28
29
|
timeout: number;
|
|
@@ -98,6 +99,14 @@ declare class HttpClient {
|
|
|
98
99
|
* Execute a DELETE request against the Intent Hub API base.
|
|
99
100
|
*/
|
|
100
101
|
intentHubDelete<T>(path: string, options?: RequestOptions): Promise<T>;
|
|
102
|
+
/**
|
|
103
|
+
* Execute a GET request against the Agents API base.
|
|
104
|
+
*/
|
|
105
|
+
agentsGet<T>(path: string, options?: RequestOptions): Promise<T>;
|
|
106
|
+
/**
|
|
107
|
+
* Execute a POST request against the Agents API base.
|
|
108
|
+
*/
|
|
109
|
+
agentsPost<T>(path: string, body: unknown, options?: RequestOptions): Promise<T>;
|
|
101
110
|
private request;
|
|
102
111
|
}
|
|
103
112
|
|
|
@@ -316,6 +325,96 @@ declare class AddressClient {
|
|
|
316
325
|
demographics(params: DemographicsParams): Promise<DemographicsResponse>;
|
|
317
326
|
}
|
|
318
327
|
|
|
328
|
+
/** Agent metadata from the catalog. */
|
|
329
|
+
interface AgentInfo {
|
|
330
|
+
agent_id: string;
|
|
331
|
+
name: string;
|
|
332
|
+
description: string;
|
|
333
|
+
version: string;
|
|
334
|
+
credit_cost: number;
|
|
335
|
+
category: string;
|
|
336
|
+
supports_pdf: boolean;
|
|
337
|
+
supports_streaming: boolean;
|
|
338
|
+
input_schema?: Record<string, unknown>;
|
|
339
|
+
output_schema?: Record<string, unknown>;
|
|
340
|
+
}
|
|
341
|
+
/** Response from listing all agents. */
|
|
342
|
+
interface AgentListResponse {
|
|
343
|
+
agents: AgentInfo[];
|
|
344
|
+
total: number;
|
|
345
|
+
}
|
|
346
|
+
/**
|
|
347
|
+
* Response from executing an agent.
|
|
348
|
+
*
|
|
349
|
+
* The exact fields depend on the agent. Common fields include
|
|
350
|
+
* `signal_rationale`, `suburb`, `transitions`, `network_prompts`, and `events`.
|
|
351
|
+
*/
|
|
352
|
+
interface AgentExecuteResponse {
|
|
353
|
+
[key: string]: unknown;
|
|
354
|
+
}
|
|
355
|
+
/** Response from submitting an async agent job. */
|
|
356
|
+
interface AgentJobSubmission {
|
|
357
|
+
job_id: string;
|
|
358
|
+
agent_id: string;
|
|
359
|
+
status: string;
|
|
360
|
+
}
|
|
361
|
+
/** Response from polling an async agent job. */
|
|
362
|
+
interface AgentJobStatus {
|
|
363
|
+
job_id: string;
|
|
364
|
+
agent_id: string;
|
|
365
|
+
status: string;
|
|
366
|
+
created_at?: string;
|
|
367
|
+
started_at?: string;
|
|
368
|
+
completed_at?: string;
|
|
369
|
+
output?: Record<string, unknown>;
|
|
370
|
+
error?: string;
|
|
371
|
+
}
|
|
372
|
+
/** Input parameters for agent execution. */
|
|
373
|
+
type AgentInput = Record<string, unknown>;
|
|
374
|
+
|
|
375
|
+
/**
|
|
376
|
+
* Client for AI agent execution.
|
|
377
|
+
*
|
|
378
|
+
* ```ts
|
|
379
|
+
* const result = await client.agents.execute('market-cycle', {
|
|
380
|
+
* suburb: 'Richmond',
|
|
381
|
+
* state: 'VIC',
|
|
382
|
+
* propertyType: 'house',
|
|
383
|
+
* });
|
|
384
|
+
* ```
|
|
385
|
+
*/
|
|
386
|
+
declare class AgentsClient {
|
|
387
|
+
private readonly http;
|
|
388
|
+
constructor(http: HttpClient);
|
|
389
|
+
/** List all available agents with their metadata. */
|
|
390
|
+
list(): Promise<AgentListResponse>;
|
|
391
|
+
/** Get metadata for a specific agent. */
|
|
392
|
+
get(agentId: string): Promise<AgentInfo>;
|
|
393
|
+
/**
|
|
394
|
+
* Execute an agent synchronously.
|
|
395
|
+
*
|
|
396
|
+
* Blocks until the agent completes (typically 5-30 seconds).
|
|
397
|
+
*
|
|
398
|
+
* @param agentId - Agent identifier (e.g. `"market-cycle"`)
|
|
399
|
+
* @param input - Agent input parameters
|
|
400
|
+
*/
|
|
401
|
+
execute(agentId: string, input?: AgentInput): Promise<AgentExecuteResponse>;
|
|
402
|
+
/**
|
|
403
|
+
* Submit an async agent job. Returns immediately with a job ID.
|
|
404
|
+
*
|
|
405
|
+
* @param agentId - Agent identifier
|
|
406
|
+
* @param input - Agent input parameters
|
|
407
|
+
*/
|
|
408
|
+
submitJob(agentId: string, input?: AgentInput): Promise<AgentJobSubmission>;
|
|
409
|
+
/**
|
|
410
|
+
* Poll the status of an async agent job.
|
|
411
|
+
*
|
|
412
|
+
* @param agentId - Agent identifier
|
|
413
|
+
* @param jobId - Job ID from {@link submitJob}
|
|
414
|
+
*/
|
|
415
|
+
getJob(agentId: string, jobId: string): Promise<AgentJobStatus>;
|
|
416
|
+
}
|
|
417
|
+
|
|
319
418
|
interface SoldPropertyRecord {
|
|
320
419
|
address_key?: string | null;
|
|
321
420
|
property_type?: string | null;
|
|
@@ -1365,6 +1464,8 @@ declare class ReferenceClient {
|
|
|
1365
1464
|
declare class HtAgApiClient {
|
|
1366
1465
|
/** Address search, insights and standardisation. */
|
|
1367
1466
|
readonly address: AddressClient;
|
|
1467
|
+
/** AI-powered property investment agents. */
|
|
1468
|
+
readonly agents: AgentsClient;
|
|
1368
1469
|
/** Sold property search. */
|
|
1369
1470
|
readonly property: PropertyClient;
|
|
1370
1471
|
/** Market snapshots, advanced queries and time-series trends. */
|
|
@@ -1433,4 +1534,4 @@ declare class ServerError extends HtAgError {
|
|
|
1433
1534
|
});
|
|
1434
1535
|
}
|
|
1435
1536
|
|
|
1436
|
-
export { AddressClient, type AddressInsightsParams, type AddressInsightsResponse, type AddressRecord, type AddressSearchParams, type AddressSearchResponse, type AddressSearchResult, type AdvancedSearchBody, AuthenticationError, type BaseResponse, type BatchStandardiseParams, type BatchStandardiseResponse, type ClassifiedEvent, type ClearanceRateResponse, type ClearanceRateTrendRecord, type CreateIntegrationParams, type CreateSubscriptionParams, type DaysOnMarketResponse, type DaysOnMarketTrendRecord, type DemandLongSlopeResponse, type DemandProfileOut, type DemandProfileResponse, type DemandShortSlopeResponse, type DemographicsParams, type DemographicsRecord, type DemographicsResponse, type EnvironmentParams, type EnvironmentRecord, type EnvironmentResponse, type EssentialsOut, type EventCategory, type EventType, type FSDMonthlyOut, type FSDQuarterlyOut, type FSDYearlyOut, type GRCOut, type GeocodeParams, type GeocodeRecord, type GeocodeResponse, type GrowthAnnualisedResponse, type GrowthCumulativeResponse, type GrowthRatesResponse, type HoldPeriodResponse, HtAgApiClient, type HtAgClientOptions, HtAgError, type Integration, type IntegrationStatus, type IntegrationType, IntentHubClient, type InventoryTrendRecord, type InventoryTrendResponse, type LevelEnum, type LgaParams, type LgaRecord, type LgaResponse, type LocalityParams, type LocalityRecord, type LocalityResponse, type LogicNode, type MarketCycleRecord, type MarketCycleResponse, type MarketDemandLongSlopeRecord, type MarketDemandRecord, type MarketDemandResponse, type MarketDemandShortSlopeRecord, type MarketFundamentalsRecord, type MarketFundamentalsResponse, type MarketGrowthAnnualisedRecord, type MarketGrowthCumulativeRecord, type MarketQueryParams, type MarketQueryResponse, type MarketRiskRecord, type MarketRiskResponse, type MarketScoresRecord, type MarketScoresResponse, type MarketSnapshot, type MarketSnapshotParams, type MarketSupplyLongSlopeRecord, type MarketSupplyRecord, type MarketSupplyResponse, type MarketSupplyShortSlopeRecord, MarketsClient, type PaginatedEvents, type PerformanceResponse, type PriceHistoryOut, type PriceResponse, PropertyClient, type PropertyTypeEnum, type QueryEventsParams, RateLimitError, ReferenceClient, type RentHistoryOut, type RentResponse, type RequestOptions, type ResolvedConfig, type SearchIndexResponse, type Sentiment, ServerError, type SnapshotsParams, type SnapshotsResponse, type SoldPropertiesResponse, type SoldPropertyRecord, type SoldSearchParams, type SourceType, type StandardisedAddress, type StockOnMarketResponse, type StockOnMarketTrendRecord, type SubmitEventParams, type Subscription, type SupplyDemandResponse, type SupplyLongSlopeResponse, type SupplyShortSlopeResponse, type TagInfo, type TestResult, TrendsClient, type TrendsParams, type TrendsWithBedroomsParams, type UpdateIntegrationParams, type UpdateSubscriptionParams, type Urgency, type VacancyResponse, type VacancyTrendRecord, ValidationError, type YieldHistoryOut, type YieldResponse };
|
|
1537
|
+
export { AddressClient, type AddressInsightsParams, type AddressInsightsResponse, type AddressRecord, type AddressSearchParams, type AddressSearchResponse, type AddressSearchResult, type AdvancedSearchBody, type AgentExecuteResponse, type AgentInfo, type AgentInput, type AgentJobStatus, type AgentJobSubmission, type AgentListResponse, AgentsClient, AuthenticationError, type BaseResponse, type BatchStandardiseParams, type BatchStandardiseResponse, type ClassifiedEvent, type ClearanceRateResponse, type ClearanceRateTrendRecord, type CreateIntegrationParams, type CreateSubscriptionParams, type DaysOnMarketResponse, type DaysOnMarketTrendRecord, type DemandLongSlopeResponse, type DemandProfileOut, type DemandProfileResponse, type DemandShortSlopeResponse, type DemographicsParams, type DemographicsRecord, type DemographicsResponse, type EnvironmentParams, type EnvironmentRecord, type EnvironmentResponse, type EssentialsOut, type EventCategory, type EventType, type FSDMonthlyOut, type FSDQuarterlyOut, type FSDYearlyOut, type GRCOut, type GeocodeParams, type GeocodeRecord, type GeocodeResponse, type GrowthAnnualisedResponse, type GrowthCumulativeResponse, type GrowthRatesResponse, type HoldPeriodResponse, HtAgApiClient, type HtAgClientOptions, HtAgError, type Integration, type IntegrationStatus, type IntegrationType, IntentHubClient, type InventoryTrendRecord, type InventoryTrendResponse, type LevelEnum, type LgaParams, type LgaRecord, type LgaResponse, type LocalityParams, type LocalityRecord, type LocalityResponse, type LogicNode, type MarketCycleRecord, type MarketCycleResponse, type MarketDemandLongSlopeRecord, type MarketDemandRecord, type MarketDemandResponse, type MarketDemandShortSlopeRecord, type MarketFundamentalsRecord, type MarketFundamentalsResponse, type MarketGrowthAnnualisedRecord, type MarketGrowthCumulativeRecord, type MarketQueryParams, type MarketQueryResponse, type MarketRiskRecord, type MarketRiskResponse, type MarketScoresRecord, type MarketScoresResponse, type MarketSnapshot, type MarketSnapshotParams, type MarketSupplyLongSlopeRecord, type MarketSupplyRecord, type MarketSupplyResponse, type MarketSupplyShortSlopeRecord, MarketsClient, type PaginatedEvents, type PerformanceResponse, type PriceHistoryOut, type PriceResponse, PropertyClient, type PropertyTypeEnum, type QueryEventsParams, RateLimitError, ReferenceClient, type RentHistoryOut, type RentResponse, type RequestOptions, type ResolvedConfig, type SearchIndexResponse, type Sentiment, ServerError, type SnapshotsParams, type SnapshotsResponse, type SoldPropertiesResponse, type SoldPropertyRecord, type SoldSearchParams, type SourceType, type StandardisedAddress, type StockOnMarketResponse, type StockOnMarketTrendRecord, type SubmitEventParams, type Subscription, type SupplyDemandResponse, type SupplyLongSlopeResponse, type SupplyShortSlopeResponse, type TagInfo, type TestResult, TrendsClient, type TrendsParams, type TrendsWithBedroomsParams, type UpdateIntegrationParams, type UpdateSubscriptionParams, type Urgency, type VacancyResponse, type VacancyTrendRecord, ValidationError, type YieldHistoryOut, type YieldResponse };
|
package/dist/index.js
CHANGED
|
@@ -184,6 +184,18 @@ var HttpClient = class {
|
|
|
184
184
|
async intentHubDelete(path, options) {
|
|
185
185
|
return this.request("DELETE", this.config.intentHubBaseUrl + path, void 0, options);
|
|
186
186
|
}
|
|
187
|
+
/**
|
|
188
|
+
* Execute a GET request against the Agents API base.
|
|
189
|
+
*/
|
|
190
|
+
async agentsGet(path, options) {
|
|
191
|
+
return this.request("GET", this.config.agentsBaseUrl + path, void 0, options);
|
|
192
|
+
}
|
|
193
|
+
/**
|
|
194
|
+
* Execute a POST request against the Agents API base.
|
|
195
|
+
*/
|
|
196
|
+
async agentsPost(path, body, options) {
|
|
197
|
+
return this.request("POST", this.config.agentsBaseUrl + path, body, options);
|
|
198
|
+
}
|
|
187
199
|
// -----------------------------------------------------------------------
|
|
188
200
|
// Core request implementation with retries and exponential backoff
|
|
189
201
|
// -----------------------------------------------------------------------
|
|
@@ -342,6 +354,58 @@ var AddressClient = class {
|
|
|
342
354
|
}
|
|
343
355
|
};
|
|
344
356
|
|
|
357
|
+
// src/agents/client.ts
|
|
358
|
+
var AgentsClient = class {
|
|
359
|
+
constructor(http) {
|
|
360
|
+
this.http = http;
|
|
361
|
+
}
|
|
362
|
+
/** List all available agents with their metadata. */
|
|
363
|
+
async list() {
|
|
364
|
+
return this.http.agentsGet("/agents");
|
|
365
|
+
}
|
|
366
|
+
/** Get metadata for a specific agent. */
|
|
367
|
+
async get(agentId) {
|
|
368
|
+
return this.http.agentsGet(`/agents/${agentId}`);
|
|
369
|
+
}
|
|
370
|
+
/**
|
|
371
|
+
* Execute an agent synchronously.
|
|
372
|
+
*
|
|
373
|
+
* Blocks until the agent completes (typically 5-30 seconds).
|
|
374
|
+
*
|
|
375
|
+
* @param agentId - Agent identifier (e.g. `"market-cycle"`)
|
|
376
|
+
* @param input - Agent input parameters
|
|
377
|
+
*/
|
|
378
|
+
async execute(agentId, input = {}) {
|
|
379
|
+
return this.http.agentsPost(
|
|
380
|
+
`/agents/${agentId}/execute`,
|
|
381
|
+
input
|
|
382
|
+
);
|
|
383
|
+
}
|
|
384
|
+
/**
|
|
385
|
+
* Submit an async agent job. Returns immediately with a job ID.
|
|
386
|
+
*
|
|
387
|
+
* @param agentId - Agent identifier
|
|
388
|
+
* @param input - Agent input parameters
|
|
389
|
+
*/
|
|
390
|
+
async submitJob(agentId, input = {}) {
|
|
391
|
+
return this.http.agentsPost(
|
|
392
|
+
`/agents/${agentId}/execute/async`,
|
|
393
|
+
input
|
|
394
|
+
);
|
|
395
|
+
}
|
|
396
|
+
/**
|
|
397
|
+
* Poll the status of an async agent job.
|
|
398
|
+
*
|
|
399
|
+
* @param agentId - Agent identifier
|
|
400
|
+
* @param jobId - Job ID from {@link submitJob}
|
|
401
|
+
*/
|
|
402
|
+
async getJob(agentId, jobId) {
|
|
403
|
+
return this.http.agentsGet(
|
|
404
|
+
`/agents/${agentId}/jobs/${jobId}`
|
|
405
|
+
);
|
|
406
|
+
}
|
|
407
|
+
};
|
|
408
|
+
|
|
345
409
|
// src/property/client.ts
|
|
346
410
|
var PropertyClient = class {
|
|
347
411
|
/** @internal */
|
|
@@ -927,19 +991,22 @@ var DEFAULT_TIMEOUT = 3e4;
|
|
|
927
991
|
function resolveBaseUrls(options) {
|
|
928
992
|
if (options.baseUrl) {
|
|
929
993
|
const base2 = options.baseUrl.replace(/\/+$/, "");
|
|
930
|
-
return { publicBaseUrl: base2, internalBaseUrl: base2, intentHubBaseUrl: base2 };
|
|
994
|
+
return { publicBaseUrl: base2, internalBaseUrl: base2, intentHubBaseUrl: base2, agentsBaseUrl: base2 };
|
|
931
995
|
}
|
|
932
996
|
const env = options.environment ?? "prod";
|
|
933
997
|
const base = `https://api.${env}.htagai.com`;
|
|
934
998
|
return {
|
|
935
999
|
publicBaseUrl: base,
|
|
936
1000
|
internalBaseUrl: base,
|
|
937
|
-
intentHubBaseUrl: `${base}/intent-hub/v1
|
|
1001
|
+
intentHubBaseUrl: `${base}/intent-hub/v1`,
|
|
1002
|
+
agentsBaseUrl: `${base}/micro-agents`
|
|
938
1003
|
};
|
|
939
1004
|
}
|
|
940
1005
|
var HtAgApiClient = class {
|
|
941
1006
|
/** Address search, insights and standardisation. */
|
|
942
1007
|
address;
|
|
1008
|
+
/** AI-powered property investment agents. */
|
|
1009
|
+
agents;
|
|
943
1010
|
/** Sold property search. */
|
|
944
1011
|
property;
|
|
945
1012
|
/** Market snapshots, advanced queries and time-series trends. */
|
|
@@ -954,18 +1021,20 @@ var HtAgApiClient = class {
|
|
|
954
1021
|
"HtAgApiClient requires an apiKey. Pass it in the constructor options."
|
|
955
1022
|
);
|
|
956
1023
|
}
|
|
957
|
-
const { publicBaseUrl, internalBaseUrl, intentHubBaseUrl } = resolveBaseUrls(options);
|
|
1024
|
+
const { publicBaseUrl, internalBaseUrl, intentHubBaseUrl, agentsBaseUrl } = resolveBaseUrls(options);
|
|
958
1025
|
const config = {
|
|
959
1026
|
apiKey: options.apiKey,
|
|
960
1027
|
publicBaseUrl,
|
|
961
1028
|
internalBaseUrl,
|
|
962
1029
|
intentHubBaseUrl,
|
|
1030
|
+
agentsBaseUrl,
|
|
963
1031
|
maxRetries: options.maxRetries ?? DEFAULT_MAX_RETRIES,
|
|
964
1032
|
retryBaseDelay: options.retryBaseDelay ?? DEFAULT_RETRY_BASE_DELAY,
|
|
965
1033
|
timeout: options.timeout ?? DEFAULT_TIMEOUT
|
|
966
1034
|
};
|
|
967
1035
|
const http = new HttpClient(config);
|
|
968
1036
|
this.address = new AddressClient(http);
|
|
1037
|
+
this.agents = new AgentsClient(http);
|
|
969
1038
|
this.property = new PropertyClient(http);
|
|
970
1039
|
this.markets = new MarketsClient(http);
|
|
971
1040
|
this.intentHub = new IntentHubClient(http);
|
|
@@ -974,6 +1043,7 @@ var HtAgApiClient = class {
|
|
|
974
1043
|
};
|
|
975
1044
|
export {
|
|
976
1045
|
AddressClient,
|
|
1046
|
+
AgentsClient,
|
|
977
1047
|
AuthenticationError,
|
|
978
1048
|
HtAgApiClient,
|
|
979
1049
|
HtAgError,
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/errors.ts","../src/http.ts","../src/address/client.ts","../src/property/client.ts","../src/markets/trends.ts","../src/markets/client.ts","../src/intent-hub/client.ts","../src/reference/client.ts","../src/client.ts"],"sourcesContent":["/**\n * Base error class for all HtAG SDK errors.\n */\nexport class HtAgError extends Error {\n /** HTTP status code, if available. */\n readonly status: number | undefined;\n\n /** Raw response body, if available. */\n readonly body: unknown;\n\n /** The request URL that caused the error. */\n readonly url: string | undefined;\n\n constructor(\n message: string,\n options?: {\n status?: number;\n body?: unknown;\n url?: string;\n cause?: unknown;\n },\n ) {\n super(message, { cause: options?.cause });\n this.name = 'HtAgError';\n this.status = options?.status;\n this.body = options?.body;\n this.url = options?.url;\n }\n}\n\n/**\n * Thrown when the server returns 401 or 403.\n */\nexport class AuthenticationError extends HtAgError {\n constructor(options: { status: number; body: unknown; url: string }) {\n super(\n `Authentication failed (HTTP ${options.status}). Check your API key.`,\n options,\n );\n this.name = 'AuthenticationError';\n }\n}\n\n/**\n * Thrown when the server returns 429 after exhausting all retries.\n */\nexport class RateLimitError extends HtAgError {\n constructor(options: { body: unknown; url: string }) {\n super('Rate limit exceeded. Please retry after a short delay.', {\n status: 429,\n ...options,\n });\n this.name = 'RateLimitError';\n }\n}\n\n/**\n * Thrown when the server returns 400 or 422.\n */\nexport class ValidationError extends HtAgError {\n constructor(options: { status: number; body: unknown; url: string }) {\n const detail = extractDetail(options.body);\n super(\n detail\n ? `Validation error (HTTP ${options.status}): ${detail}`\n : `Validation error (HTTP ${options.status})`,\n options,\n );\n this.name = 'ValidationError';\n }\n}\n\n/**\n * Thrown when the server returns a 5xx status after exhausting all retries.\n */\nexport class ServerError extends HtAgError {\n constructor(options: { status: number; body: unknown; url: string }) {\n super(`Server error (HTTP ${options.status})`, options);\n this.name = 'ServerError';\n }\n}\n\n// ---------------------------------------------------------------------------\n// Helpers\n// ---------------------------------------------------------------------------\n\nfunction extractDetail(body: unknown): string | undefined {\n if (body && typeof body === 'object' && 'detail' in body) {\n const detail = (body as Record<string, unknown>).detail;\n if (typeof detail === 'string') return detail;\n if (Array.isArray(detail)) {\n return detail\n .map((d) => {\n if (typeof d === 'string') return d;\n if (d && typeof d === 'object' && 'msg' in d) return String(d.msg);\n return JSON.stringify(d);\n })\n .join('; ');\n }\n return JSON.stringify(detail);\n }\n return undefined;\n}\n","import type { ResolvedConfig, RequestOptions } from './types.js';\nimport {\n HtAgError,\n AuthenticationError,\n RateLimitError,\n ValidationError,\n ServerError,\n} from './errors.js';\n\n// ---------------------------------------------------------------------------\n// camelCase -> snake_case conversion\n// ---------------------------------------------------------------------------\n\n/**\n * Convert a camelCase string to snake_case.\n *\n * Handles sequences of uppercase letters correctly:\n * - \"areaId\" -> \"area_id\"\n * - \"periodEndMin\" -> \"period_end_min\"\n * - \"IRSD\" -> \"irsd\" (all-caps treated as one token)\n */\nfunction toSnakeCase(str: string): string {\n return str\n .replace(/([A-Z]+)([A-Z][a-z])/g, '$1_$2')\n .replace(/([a-z0-9])([A-Z])/g, '$1_$2')\n .toLowerCase();\n}\n\n// ---------------------------------------------------------------------------\n// Query-string builder\n// ---------------------------------------------------------------------------\n\n/**\n * Build a URL query string from a params object, converting camelCase keys\n * to snake_case. Arrays are joined with commas. `undefined` and `null` values\n * are omitted.\n */\nexport function buildQueryString(\n params: Record<string, unknown>,\n): string {\n const parts: string[] = [];\n\n for (const [key, value] of Object.entries(params)) {\n // Skip internal SDK options that are not API params.\n if (key === 'signal') continue;\n if (value === undefined || value === null) continue;\n\n const snakeKey = toSnakeCase(key);\n\n if (Array.isArray(value)) {\n if (value.length > 0) {\n parts.push(\n `${encodeURIComponent(snakeKey)}=${encodeURIComponent(value.join(','))}`,\n );\n }\n } else {\n parts.push(\n `${encodeURIComponent(snakeKey)}=${encodeURIComponent(String(value))}`,\n );\n }\n }\n\n return parts.length > 0 ? `?${parts.join('&')}` : '';\n}\n\n// ---------------------------------------------------------------------------\n// Retryable HTTP client\n// ---------------------------------------------------------------------------\n\nfunction isRetryable(status: number): boolean {\n return status === 429 || status >= 500;\n}\n\nfunction sleep(ms: number): Promise<void> {\n return new Promise((resolve) => setTimeout(resolve, ms));\n}\n\n/**\n * Parse the body of a response. Returns the parsed JSON on success or a string\n * representation when parsing fails.\n */\nasync function parseBody(response: Response): Promise<unknown> {\n const contentType = response.headers.get('content-type') ?? '';\n if (contentType.includes('application/json')) {\n try {\n return await response.json();\n } catch {\n return await response.text();\n }\n }\n return await response.text();\n}\n\n/**\n * Throw the appropriate typed error for the given HTTP status.\n */\nfunction throwForStatus(\n status: number,\n body: unknown,\n url: string,\n): never {\n if (status === 401 || status === 403) {\n throw new AuthenticationError({ status, body, url });\n }\n if (status === 429) {\n throw new RateLimitError({ body, url });\n }\n if (status === 400 || status === 422) {\n throw new ValidationError({ status, body, url });\n }\n if (status >= 500) {\n throw new ServerError({ status, body, url });\n }\n throw new HtAgError(`HTTP ${status}`, { status, body, url });\n}\n\n/**\n * Internal HTTP transport used by all domain clients.\n */\nexport class HttpClient {\n constructor(private readonly config: ResolvedConfig) {}\n\n /**\n * Execute a GET request against the public API base.\n */\n async get<T>(path: string, options?: RequestOptions): Promise<T> {\n return this.request<T>('GET', this.config.publicBaseUrl + path, undefined, options);\n }\n\n /**\n * Execute a POST request against the public API base.\n */\n async post<T>(\n path: string,\n body: unknown,\n options?: RequestOptions,\n ): Promise<T> {\n return this.request<T>('POST', this.config.publicBaseUrl + path, body, options);\n }\n\n /**\n * Execute a PATCH request against the public API base.\n */\n async patch<T>(\n path: string,\n body: unknown,\n options?: RequestOptions,\n ): Promise<T> {\n return this.request<T>('PATCH', this.config.publicBaseUrl + path, body, options);\n }\n\n /**\n * Execute a DELETE request against the public API base.\n */\n async delete<T>(path: string, options?: RequestOptions): Promise<T> {\n return this.request<T>('DELETE', this.config.publicBaseUrl + path, undefined, options);\n }\n\n /**\n * Execute a GET request against the internal API base.\n */\n async internalGet<T>(path: string, options?: RequestOptions): Promise<T> {\n return this.request<T>('GET', this.config.internalBaseUrl + path, undefined, options);\n }\n\n /**\n * Execute a POST request against the internal API base.\n */\n async internalPost<T>(\n path: string,\n body: unknown,\n options?: RequestOptions,\n ): Promise<T> {\n return this.request<T>('POST', this.config.internalBaseUrl + path, body, options);\n }\n\n /**\n * Execute a GET request against the Intent Hub API base.\n */\n async intentHubGet<T>(path: string, options?: RequestOptions): Promise<T> {\n return this.request<T>('GET', this.config.intentHubBaseUrl + path, undefined, options);\n }\n\n /**\n * Execute a POST request against the Intent Hub API base.\n */\n async intentHubPost<T>(\n path: string,\n body: unknown,\n options?: RequestOptions,\n ): Promise<T> {\n return this.request<T>('POST', this.config.intentHubBaseUrl + path, body, options);\n }\n\n /**\n * Execute a PATCH request against the Intent Hub API base.\n */\n async intentHubPatch<T>(\n path: string,\n body: unknown,\n options?: RequestOptions,\n ): Promise<T> {\n return this.request<T>('PATCH', this.config.intentHubBaseUrl + path, body, options);\n }\n\n /**\n * Execute a DELETE request against the Intent Hub API base.\n */\n async intentHubDelete<T>(path: string, options?: RequestOptions): Promise<T> {\n return this.request<T>('DELETE', this.config.intentHubBaseUrl + path, undefined, options);\n }\n\n // -----------------------------------------------------------------------\n // Core request implementation with retries and exponential backoff\n // -----------------------------------------------------------------------\n\n private async request<T>(\n method: string,\n url: string,\n body: unknown,\n options?: RequestOptions,\n ): Promise<T> {\n const headers: Record<string, string> = {\n 'x-api-key': this.config.apiKey,\n 'accept': 'application/json',\n };\n\n if (body !== undefined) {\n headers['content-type'] = 'application/json';\n }\n\n let lastError: Error | undefined;\n\n for (let attempt = 0; attempt <= this.config.maxRetries; attempt++) {\n // If this is a retry, wait with exponential backoff + jitter.\n if (attempt > 0) {\n const base = this.config.retryBaseDelay * Math.pow(2, attempt - 1);\n const jitter = Math.random() * base * 0.5;\n await sleep(base + jitter);\n }\n\n // Build an AbortController that combines the user signal with a timeout.\n const controller = new AbortController();\n let timeoutId: ReturnType<typeof setTimeout> | undefined;\n\n const cleanup = () => {\n if (timeoutId !== undefined) clearTimeout(timeoutId);\n };\n\n // Wire up caller's abort signal.\n if (options?.signal) {\n if (options.signal.aborted) {\n throw new HtAgError('Request aborted', {\n url,\n cause: options.signal.reason,\n });\n }\n options.signal.addEventListener('abort', () => controller.abort(options.signal!.reason), {\n once: true,\n });\n }\n\n timeoutId = setTimeout(\n () => controller.abort(new Error('Request timed out')),\n this.config.timeout,\n );\n\n try {\n const response = await fetch(url, {\n method,\n headers,\n body: body !== undefined ? JSON.stringify(body) : undefined,\n signal: controller.signal,\n });\n\n cleanup();\n\n if (response.ok) {\n // 204 No Content — nothing to parse.\n if (response.status === 204) {\n return undefined as T;\n }\n return (await parseBody(response)) as T;\n }\n\n const responseBody = await parseBody(response);\n\n // Retry on retryable statuses, unless we've exhausted retries.\n if (isRetryable(response.status) && attempt < this.config.maxRetries) {\n lastError = new HtAgError(`HTTP ${response.status}`, {\n status: response.status,\n body: responseBody,\n url,\n });\n continue;\n }\n\n // Non-retryable or exhausted retries — throw typed error.\n throwForStatus(response.status, responseBody, url);\n } catch (err) {\n cleanup();\n\n // Re-throw our own typed errors.\n if (err instanceof HtAgError) {\n throw err;\n }\n\n // Handle abort / timeout.\n if (err instanceof DOMException && err.name === 'AbortError') {\n if (options?.signal?.aborted) {\n throw new HtAgError('Request aborted', { url, cause: err });\n }\n throw new HtAgError('Request timed out', { url, cause: err });\n }\n\n // Network / fetch errors — retry if we have attempts left.\n if (attempt < this.config.maxRetries) {\n lastError = err instanceof Error ? err : new Error(String(err));\n continue;\n }\n\n throw new HtAgError(\n `Network error: ${err instanceof Error ? err.message : String(err)}`,\n { url, cause: err },\n );\n }\n }\n\n // Should not reach here, but just in case.\n throw lastError ?? new HtAgError('Request failed after retries', { url });\n }\n}\n","import type { HttpClient } from '../http.js';\nimport { buildQueryString } from '../http.js';\nimport type {\n AddressSearchParams,\n AddressSearchResponse,\n AddressInsightsParams,\n AddressInsightsResponse,\n BatchStandardiseParams,\n BatchStandardiseResponse,\n GeocodeParams,\n GeocodeResponse,\n EnvironmentParams,\n EnvironmentResponse,\n DemographicsParams,\n DemographicsResponse,\n} from './types.js';\n\n/**\n * Client for the Address API domain.\n *\n * ```ts\n * const results = await client.address.search({ q: '100 George St Sydney' });\n * ```\n */\nexport class AddressClient {\n /** @internal */\n constructor(private readonly http: HttpClient) {}\n\n /**\n * Search for addresses matching a free-text query.\n *\n * `GET /internal-api/v1/address/search`\n */\n async search(params: AddressSearchParams): Promise<AddressSearchResponse> {\n const { signal, ...query } = params;\n const qs = buildQueryString(query);\n return this.http.internalGet<AddressSearchResponse>(`/internal-api/v1/address/search${qs}`, { signal });\n }\n\n /**\n * Retrieve detailed insights for one or more addresses.\n *\n * `GET /internal-api/v1/address/insights`\n */\n async insights(params: AddressInsightsParams): Promise<AddressInsightsResponse> {\n const { signal, ...query } = params;\n const qs = buildQueryString(query);\n return this.http.internalGet<AddressInsightsResponse>(`/internal-api/v1/address/insights${qs}`, { signal });\n }\n\n /**\n * Standardise a batch of raw address strings into structured records.\n *\n * `POST /v1/address/standardise`\n */\n async standardise(params: BatchStandardiseParams): Promise<BatchStandardiseResponse> {\n const { signal, addresses } = params;\n return this.http.post<BatchStandardiseResponse>(\n '/v1/address/standardise',\n { addresses },\n { signal },\n );\n }\n\n /**\n * Geocode an address string to structured location data.\n *\n * `GET /v1/address/geocode`\n */\n async geocode(params: GeocodeParams): Promise<GeocodeResponse> {\n const { signal, ...query } = params;\n const qs = buildQueryString(query);\n return this.http.get<GeocodeResponse>(`/v1/address/geocode${qs}`, { signal });\n }\n\n /**\n * Retrieve environmental data (flood, bushfire, heritage, zoning) for addresses.\n *\n * `GET /v1/address/environment`\n */\n async environment(params: EnvironmentParams): Promise<EnvironmentResponse> {\n const { signal, ...query } = params;\n const qs = buildQueryString(query);\n return this.http.get<EnvironmentResponse>(`/v1/address/environment${qs}`, { signal });\n }\n\n /**\n * Retrieve demographic data (SEIFA indices, housing tenure) for addresses.\n *\n * `GET /v1/address/demographics`\n */\n async demographics(params: DemographicsParams): Promise<DemographicsResponse> {\n const { signal, ...query } = params;\n const qs = buildQueryString(query);\n return this.http.get<DemographicsResponse>(`/v1/address/demographics${qs}`, { signal });\n }\n}\n","import type { HttpClient } from '../http.js';\nimport { buildQueryString } from '../http.js';\nimport type {\n SoldSearchParams,\n SoldPropertiesResponse,\n} from './types.js';\n\n/**\n * Client for the Property API domain.\n *\n * ```ts\n * const sold = await client.property.soldSearch({ address: '100 George St Sydney', radius: 2000 });\n * ```\n */\nexport class PropertyClient {\n /** @internal */\n constructor(private readonly http: HttpClient) {}\n\n /**\n * Search for recently sold properties near a location.\n *\n * `GET /v1/property/sold/search`\n */\n async soldSearch(params: SoldSearchParams): Promise<SoldPropertiesResponse> {\n const { signal, ...query } = params;\n const qs = buildQueryString(query);\n return this.http.get<SoldPropertiesResponse>(`/v1/property/sold/search${qs}`, { signal });\n }\n}\n","import type { HttpClient } from '../http.js';\nimport { buildQueryString } from '../http.js';\nimport type {\n TrendsParams,\n TrendsWithBedroomsParams,\n PriceResponse,\n RentResponse,\n YieldResponse,\n SupplyDemandResponse,\n SearchIndexResponse,\n HoldPeriodResponse,\n PerformanceResponse,\n GrowthRatesResponse,\n DemandProfileResponse,\n StockOnMarketResponse,\n InventoryTrendResponse,\n DaysOnMarketResponse,\n ClearanceRateResponse,\n VacancyResponse,\n} from './types.js';\n\n/**\n * Client for the Markets Trends API domain.\n *\n * Each method queries a specific time-series metric:\n *\n * ```ts\n * const prices = await client.markets.trends.price({\n * level: 'suburb',\n * areaId: ['SAL10001'],\n * propertyType: ['house'],\n * });\n * ```\n */\nexport class TrendsClient {\n /** @internal */\n constructor(private readonly http: HttpClient) {}\n\n /**\n * Price history trends.\n *\n * `GET /internal-api/v1/markets/trends/price`\n */\n async price(params: TrendsWithBedroomsParams): Promise<PriceResponse> {\n return this.trend<PriceResponse>('price', params);\n }\n\n /**\n * Rent history trends.\n *\n * `GET /v1/markets/trends/rent`\n */\n async rent(params: TrendsWithBedroomsParams): Promise<RentResponse> {\n return this.publicTrend<RentResponse>('rent', params);\n }\n\n /**\n * Yield history trends.\n *\n * `GET /v1/markets/trends/yield`\n */\n async yieldHistory(params: TrendsWithBedroomsParams): Promise<YieldResponse> {\n return this.publicTrend<YieldResponse>('yield', params);\n }\n\n /**\n * Supply and demand (monthly frequency).\n *\n * `GET /internal-api/v1/markets/trends/supply-demand`\n */\n async supplyDemand(params: TrendsWithBedroomsParams): Promise<SupplyDemandResponse> {\n return this.trend<SupplyDemandResponse>('supply-demand', params);\n }\n\n /**\n * Search interest index (quarterly frequency).\n *\n * `GET /internal-api/v1/markets/trends/search-index`\n */\n async searchIndex(params: TrendsParams): Promise<SearchIndexResponse> {\n return this.trend<SearchIndexResponse>('search-index', params);\n }\n\n /**\n * Hold period (yearly frequency).\n *\n * `GET /internal-api/v1/markets/trends/hold-period`\n */\n async holdPeriod(params: TrendsParams): Promise<HoldPeriodResponse> {\n return this.trend<HoldPeriodResponse>('hold-period', params);\n }\n\n /**\n * Performance essentials.\n *\n * `GET /internal-api/v1/markets/trends/performance`\n */\n async performance(params: TrendsWithBedroomsParams): Promise<PerformanceResponse> {\n return this.trend<PerformanceResponse>('performance', params);\n }\n\n /**\n * Growth rate cycle.\n *\n * `GET /v1/markets/trends/growth-rates`\n */\n async growthRates(params: TrendsParams): Promise<GrowthRatesResponse> {\n return this.publicTrend<GrowthRatesResponse>('growth-rates', params);\n }\n\n /**\n * Demand profile breakdown.\n *\n * `GET /v1/markets/trends/demand-profile`\n */\n async demandProfile(params: TrendsParams): Promise<DemandProfileResponse> {\n return this.publicTrend<DemandProfileResponse>('demand-profile', params);\n }\n\n /**\n * Stock on market trends.\n *\n * `GET /v1/markets/trends/stock-on-market`\n */\n async stockOnMarket(params: TrendsParams): Promise<StockOnMarketResponse> {\n return this.publicTrend<StockOnMarketResponse>('stock-on-market', params);\n }\n\n /**\n * Inventory trends.\n *\n * `GET /v1/markets/trends/inventory`\n */\n async inventory(params: TrendsParams): Promise<InventoryTrendResponse> {\n return this.publicTrend<InventoryTrendResponse>('inventory', params);\n }\n\n /**\n * Days on market trends.\n *\n * `GET /v1/markets/trends/days-on-market`\n */\n async daysOnMarket(params: TrendsParams): Promise<DaysOnMarketResponse> {\n return this.publicTrend<DaysOnMarketResponse>('days-on-market', params);\n }\n\n /**\n * Clearance rate trends.\n *\n * `GET /v1/markets/trends/clearance-rate`\n */\n async clearanceRate(params: TrendsParams): Promise<ClearanceRateResponse> {\n return this.publicTrend<ClearanceRateResponse>('clearance-rate', params);\n }\n\n /**\n * Vacancy rate trends.\n *\n * `GET /v1/markets/trends/vacancy`\n */\n async vacancy(params: TrendsParams): Promise<VacancyResponse> {\n return this.publicTrend<VacancyResponse>('vacancy', params);\n }\n\n // -----------------------------------------------------------------------\n // Shared implementation\n // -----------------------------------------------------------------------\n\n private async trend<T>(metric: string, params: TrendsParams | TrendsWithBedroomsParams): Promise<T> {\n const { signal, ...query } = params;\n const qs = buildQueryString(query);\n return this.http.internalGet<T>(\n `/internal-api/v1/markets/trends/${metric}${qs}`,\n { signal },\n );\n }\n\n private async publicTrend<T>(metric: string, params: TrendsParams | TrendsWithBedroomsParams): Promise<T> {\n const { signal, ...query } = params;\n const qs = buildQueryString(query);\n return this.http.get<T>(\n `/v1/markets/trends/${metric}${qs}`,\n { signal },\n );\n }\n}\n","import type { HttpClient } from '../http.js';\nimport { buildQueryString } from '../http.js';\nimport { TrendsClient } from './trends.js';\nimport type {\n SnapshotsParams,\n SnapshotsResponse,\n AdvancedSearchBody,\n MarketQueryResponse,\n MarketSnapshotParams,\n GrowthCumulativeResponse,\n GrowthAnnualisedResponse,\n MarketSupplyResponse,\n SupplyLongSlopeResponse,\n SupplyShortSlopeResponse,\n MarketDemandResponse,\n DemandLongSlopeResponse,\n DemandShortSlopeResponse,\n MarketScoresResponse,\n MarketFundamentalsResponse,\n MarketCycleResponse,\n MarketRiskResponse,\n} from './types.js';\nimport type { RequestOptions } from '../types.js';\n\n/**\n * Client for the Markets API domain.\n *\n * ```ts\n * const snapshots = await client.markets.snapshots({\n * level: 'suburb',\n * propertyType: ['house'],\n * });\n *\n * const prices = await client.markets.trends.price({\n * level: 'suburb',\n * areaId: ['SAL10001'],\n * });\n * ```\n */\nexport class MarketsClient {\n /** Sub-client for time-series trend endpoints. */\n readonly trends: TrendsClient;\n\n /** @internal */\n constructor(private readonly http: HttpClient) {\n this.trends = new TrendsClient(http);\n }\n\n /**\n * Retrieve market snapshot data with optional filters.\n *\n * `GET /internal-api/v1/markets/snapshots`\n */\n async snapshots(params: SnapshotsParams): Promise<SnapshotsResponse> {\n const { signal, ...query } = params;\n const qs = buildQueryString(query);\n return this.http.internalGet<SnapshotsResponse>(\n `/internal-api/v1/markets/snapshots${qs}`,\n { signal },\n );\n }\n\n /**\n * Advanced market query with logical filter expressions.\n *\n * `POST /internal-api/v1/markets/query`\n */\n async query(\n body: AdvancedSearchBody,\n options?: RequestOptions,\n ): Promise<MarketQueryResponse> {\n return this.http.internalPost<MarketQueryResponse>(\n '/internal-api/v1/markets/query',\n body,\n options,\n );\n }\n\n // -------------------------------------------------------------------------\n // Public market snapshot endpoints (/v1/markets/*)\n // -------------------------------------------------------------------------\n\n /**\n * Cumulative growth metrics.\n *\n * `GET /v1/markets/growth/cumulative`\n */\n async growthCumulative(params: MarketSnapshotParams): Promise<GrowthCumulativeResponse> {\n const { signal, ...query } = params;\n const qs = buildQueryString(query);\n return this.http.get<GrowthCumulativeResponse>(`/v1/markets/growth/cumulative${qs}`, { signal });\n }\n\n /**\n * Annualised growth metrics.\n *\n * `GET /v1/markets/growth/annualised`\n */\n async growthAnnualised(params: MarketSnapshotParams): Promise<GrowthAnnualisedResponse> {\n const { signal, ...query } = params;\n const qs = buildQueryString(query);\n return this.http.get<GrowthAnnualisedResponse>(`/v1/markets/growth/annualised${qs}`, { signal });\n }\n\n /**\n * Supply metrics.\n *\n * `GET /v1/markets/supply`\n */\n async supply(params: MarketSnapshotParams): Promise<MarketSupplyResponse> {\n const { signal, ...query } = params;\n const qs = buildQueryString(query);\n return this.http.get<MarketSupplyResponse>(`/v1/markets/supply${qs}`, { signal });\n }\n\n /**\n * Supply long-term slope metrics.\n *\n * `GET /v1/markets/supply/ls`\n */\n async supplyLongSlope(params: MarketSnapshotParams): Promise<SupplyLongSlopeResponse> {\n const { signal, ...query } = params;\n const qs = buildQueryString(query);\n return this.http.get<SupplyLongSlopeResponse>(`/v1/markets/supply/ls${qs}`, { signal });\n }\n\n /**\n * Supply short-term slope metrics.\n *\n * `GET /v1/markets/supply/ss`\n */\n async supplyShortSlope(params: MarketSnapshotParams): Promise<SupplyShortSlopeResponse> {\n const { signal, ...query } = params;\n const qs = buildQueryString(query);\n return this.http.get<SupplyShortSlopeResponse>(`/v1/markets/supply/ss${qs}`, { signal });\n }\n\n /**\n * Demand metrics.\n *\n * `GET /v1/markets/demand`\n */\n async demand(params: MarketSnapshotParams): Promise<MarketDemandResponse> {\n const { signal, ...query } = params;\n const qs = buildQueryString(query);\n return this.http.get<MarketDemandResponse>(`/v1/markets/demand${qs}`, { signal });\n }\n\n /**\n * Demand long-term slope metrics.\n *\n * `GET /v1/markets/demand/ls`\n */\n async demandLongSlope(params: MarketSnapshotParams): Promise<DemandLongSlopeResponse> {\n const { signal, ...query } = params;\n const qs = buildQueryString(query);\n return this.http.get<DemandLongSlopeResponse>(`/v1/markets/demand/ls${qs}`, { signal });\n }\n\n /**\n * Demand short-term slope metrics.\n *\n * `GET /v1/markets/demand/ss`\n */\n async demandShortSlope(params: MarketSnapshotParams): Promise<DemandShortSlopeResponse> {\n const { signal, ...query } = params;\n const qs = buildQueryString(query);\n return this.http.get<DemandShortSlopeResponse>(`/v1/markets/demand/ss${qs}`, { signal });\n }\n\n /**\n * Market scores (RCS, HAPI, volatility).\n *\n * `GET /v1/markets/scores`\n */\n async scores(params: MarketSnapshotParams): Promise<MarketScoresResponse> {\n const { signal, ...query } = params;\n const qs = buildQueryString(query);\n return this.http.get<MarketScoresResponse>(`/v1/markets/scores${qs}`, { signal });\n }\n\n /**\n * Market fundamentals (IRSAD, ratios, years to own).\n *\n * `GET /v1/markets/fundamentals`\n */\n async fundamentals(params: MarketSnapshotParams): Promise<MarketFundamentalsResponse> {\n const { signal, ...query } = params;\n const qs = buildQueryString(query);\n return this.http.get<MarketFundamentalsResponse>(`/v1/markets/fundamentals${qs}`, { signal });\n }\n\n /**\n * Market cycle indicators.\n *\n * `GET /v1/markets/cycle`\n */\n async cycle(params: MarketSnapshotParams): Promise<MarketCycleResponse> {\n const { signal, ...query } = params;\n const qs = buildQueryString(query);\n return this.http.get<MarketCycleResponse>(`/v1/markets/cycle${qs}`, { signal });\n }\n\n /**\n * Market risk indicators (flood, fire, diversity, distance).\n *\n * `GET /v1/markets/risk`\n */\n async risk(params: MarketSnapshotParams): Promise<MarketRiskResponse> {\n const { signal, ...query } = params;\n const qs = buildQueryString(query);\n return this.http.get<MarketRiskResponse>(`/v1/markets/risk${qs}`, { signal });\n }\n}\n","import type { HttpClient } from '../http.js';\nimport { buildQueryString } from '../http.js';\nimport type { RequestOptions } from '../types.js';\nimport type {\n SubmitEventParams,\n ClassifiedEvent,\n QueryEventsParams,\n PaginatedEvents,\n CreateIntegrationParams,\n Integration,\n UpdateIntegrationParams,\n TestResult,\n CreateSubscriptionParams,\n Subscription,\n UpdateSubscriptionParams,\n EventCategory,\n EventType,\n TagInfo,\n} from './types.js';\n\n/**\n * Client for the Intent Hub API domain.\n *\n * ```ts\n * const event = await client.intentHub.submitEvent({\n * sourceType: 'AGENT',\n * sourceId: 'my-agent',\n * textContent: 'User wants to refinance their mortgage',\n * });\n * ```\n */\nexport class IntentHubClient {\n /** @internal */\n constructor(private readonly http: HttpClient) {}\n\n // -------------------------------------------------------------------------\n // Events\n // -------------------------------------------------------------------------\n\n /**\n * Submit a raw event for classification.\n *\n * `POST /intent-hub/v1/events`\n */\n async submitEvent(params: SubmitEventParams): Promise<ClassifiedEvent> {\n const { signal, ...rest } = params;\n return this.http.intentHubPost<ClassifiedEvent>(\n '/events',\n {\n source_type: rest.sourceType,\n source_id: rest.sourceId,\n text_content: rest.textContent,\n payload: rest.payload,\n user_id: rest.userId,\n session_id: rest.sessionId,\n suggested_category: rest.suggestedCategory,\n suggested_intent: rest.suggestedIntent,\n idempotency_key: rest.idempotencyKey,\n event_type: rest.eventType,\n },\n { signal },\n );\n }\n\n /**\n * Retrieve a single classified event by ID.\n *\n * `GET /intent-hub/v1/events/:eventId`\n */\n async getEvent(eventId: string, options?: RequestOptions): Promise<ClassifiedEvent> {\n return this.http.intentHubGet<ClassifiedEvent>(\n `/events/${encodeURIComponent(eventId)}`,\n options,\n );\n }\n\n /**\n * Query classified events with optional filters.\n *\n * `GET /intent-hub/v1/events`\n */\n async queryEvents(params?: QueryEventsParams): Promise<PaginatedEvents> {\n if (!params) {\n return this.http.intentHubGet<PaginatedEvents>('/events');\n }\n const { signal, ...query } = params;\n const qs = buildQueryString(query);\n return this.http.intentHubGet<PaginatedEvents>(`/events${qs}`, { signal });\n }\n\n // -------------------------------------------------------------------------\n // Integrations\n // -------------------------------------------------------------------------\n\n /**\n * Create a new integration endpoint.\n *\n * `POST /intent-hub/v1/integrations`\n */\n async createIntegration(params: CreateIntegrationParams): Promise<Integration> {\n const { signal, ...rest } = params;\n return this.http.intentHubPost<Integration>(\n '/integrations',\n {\n name: rest.name,\n type: rest.type,\n url: rest.url,\n secret: rest.secret,\n headers: rest.headers,\n config: rest.config,\n },\n { signal },\n );\n }\n\n /**\n * List all integrations for the current organisation.\n *\n * `GET /intent-hub/v1/integrations`\n */\n async listIntegrations(options?: RequestOptions): Promise<Integration[]> {\n return this.http.intentHubGet<Integration[]>('/integrations', options);\n }\n\n /**\n * Retrieve a single integration by ID.\n *\n * `GET /intent-hub/v1/integrations/:id`\n */\n async getIntegration(id: string, options?: RequestOptions): Promise<Integration> {\n return this.http.intentHubGet<Integration>(\n `/integrations/${encodeURIComponent(id)}`,\n options,\n );\n }\n\n /**\n * Update an existing integration.\n *\n * `PATCH /intent-hub/v1/integrations/:id`\n */\n async updateIntegration(\n id: string,\n params: UpdateIntegrationParams,\n ): Promise<Integration> {\n const { signal, ...rest } = params;\n return this.http.intentHubPatch<Integration>(\n `/integrations/${encodeURIComponent(id)}`,\n {\n name: rest.name,\n url: rest.url,\n secret: rest.secret,\n status: rest.status,\n },\n { signal },\n );\n }\n\n /**\n * Delete an integration by ID.\n *\n * `DELETE /intent-hub/v1/integrations/:id`\n */\n async deleteIntegration(id: string, options?: RequestOptions): Promise<void> {\n return this.http.intentHubDelete<void>(\n `/integrations/${encodeURIComponent(id)}`,\n options,\n );\n }\n\n /**\n * Send a test event to an integration endpoint.\n *\n * `POST /intent-hub/v1/integrations/:id/test`\n */\n async testIntegration(id: string, options?: RequestOptions): Promise<TestResult> {\n return this.http.intentHubPost<TestResult>(\n `/integrations/${encodeURIComponent(id)}/test`,\n {},\n options,\n );\n }\n\n // -------------------------------------------------------------------------\n // Subscriptions\n // -------------------------------------------------------------------------\n\n /**\n * Create a new subscription linking event patterns to an integration.\n *\n * `POST /intent-hub/v1/subscriptions`\n */\n async createSubscription(params: CreateSubscriptionParams): Promise<Subscription> {\n const { signal, ...rest } = params;\n return this.http.intentHubPost<Subscription>(\n '/subscriptions',\n {\n integration_id: rest.integrationId,\n event_type_slug: rest.eventTypeSlug,\n tag: rest.tag,\n intent_pattern: rest.intentPattern,\n filters: rest.filters,\n },\n { signal },\n );\n }\n\n /**\n * List all subscriptions for the current organisation.\n *\n * `GET /intent-hub/v1/subscriptions`\n */\n async listSubscriptions(options?: RequestOptions): Promise<Subscription[]> {\n return this.http.intentHubGet<Subscription[]>('/subscriptions', options);\n }\n\n /**\n * Retrieve a single subscription by ID.\n *\n * `GET /intent-hub/v1/subscriptions/:id`\n */\n async getSubscription(id: string, options?: RequestOptions): Promise<Subscription> {\n return this.http.intentHubGet<Subscription>(\n `/subscriptions/${encodeURIComponent(id)}`,\n options,\n );\n }\n\n /**\n * Update an existing subscription.\n *\n * `PATCH /intent-hub/v1/subscriptions/:id`\n */\n async updateSubscription(\n id: string,\n params: UpdateSubscriptionParams,\n ): Promise<Subscription> {\n const { signal, ...rest } = params;\n return this.http.intentHubPatch<Subscription>(\n `/subscriptions/${encodeURIComponent(id)}`,\n {\n event_type_slug: rest.eventTypeSlug,\n tag: rest.tag,\n intent_pattern: rest.intentPattern,\n integration_id: rest.integrationId,\n is_active: rest.isActive,\n },\n { signal },\n );\n }\n\n /**\n * Delete a subscription by ID.\n *\n * `DELETE /intent-hub/v1/subscriptions/:id`\n */\n async deleteSubscription(id: string, options?: RequestOptions): Promise<void> {\n return this.http.intentHubDelete<void>(\n `/subscriptions/${encodeURIComponent(id)}`,\n options,\n );\n }\n\n // -------------------------------------------------------------------------\n // Catalog\n // -------------------------------------------------------------------------\n\n /**\n * List all event categories in the taxonomy.\n *\n * `GET /intent-hub/v1/catalog/categories`\n */\n async listCategories(options?: RequestOptions): Promise<EventCategory[]> {\n return this.http.intentHubGet<EventCategory[]>('/catalog/categories', options);\n }\n\n /**\n * List event types, optionally filtered by category.\n *\n * `GET /intent-hub/v1/catalog/event-types`\n */\n async listEventTypes(\n params?: { category?: string } & RequestOptions,\n ): Promise<EventType[]> {\n if (!params) {\n return this.http.intentHubGet<EventType[]>('/catalog/event-types');\n }\n const { signal, ...query } = params;\n const qs = buildQueryString(query);\n return this.http.intentHubGet<EventType[]>(`/catalog/event-types${qs}`, { signal });\n }\n\n /**\n * List all tags with their usage counts.\n *\n * `GET /intent-hub/v1/catalog/tags`\n */\n async listTags(options?: RequestOptions): Promise<TagInfo[]> {\n return this.http.intentHubGet<TagInfo[]>('/catalog/tags', options);\n }\n}\n","import type { HttpClient } from '../http.js';\nimport { buildQueryString } from '../http.js';\nimport type {\n LocalityParams,\n LocalityResponse,\n LgaParams,\n LgaResponse,\n} from './types.js';\n\nexport class ReferenceClient {\n constructor(private readonly http: HttpClient) {}\n\n async locality(params: LocalityParams): Promise<LocalityResponse> {\n const { signal, ...query } = params;\n const qs = buildQueryString(query);\n return this.http.get<LocalityResponse>(`/v1/reference/locality${qs}`, { signal });\n }\n\n async lga(params: LgaParams): Promise<LgaResponse> {\n const { signal, ...query } = params;\n const qs = buildQueryString(query);\n return this.http.get<LgaResponse>(`/v1/reference/lga${qs}`, { signal });\n }\n}\n","import type { HtAgClientOptions, ResolvedConfig } from './types.js';\nimport { HttpClient } from './http.js';\nimport { AddressClient } from './address/client.js';\nimport { PropertyClient } from './property/client.js';\nimport { MarketsClient } from './markets/client.js';\nimport { IntentHubClient } from './intent-hub/client.js';\nimport { ReferenceClient } from './reference/client.js';\n\n// ---------------------------------------------------------------------------\n// Defaults\n// ---------------------------------------------------------------------------\n\nconst DEFAULT_MAX_RETRIES = 3;\nconst DEFAULT_RETRY_BASE_DELAY = 500; // ms\nconst DEFAULT_TIMEOUT = 30_000; // 30 seconds\n\n/**\n * Build the environment-derived base URLs.\n *\n * - `prod` -> `https://api.prod.htagai.com`\n * - `dev` -> `https://api.dev.htagai.com`\n */\nfunction resolveBaseUrls(options: HtAgClientOptions): {\n publicBaseUrl: string;\n internalBaseUrl: string;\n intentHubBaseUrl: string;\n} {\n if (options.baseUrl) {\n // Strip trailing slashes for consistency.\n const base = options.baseUrl.replace(/\\/+$/, '');\n return { publicBaseUrl: base, internalBaseUrl: base, intentHubBaseUrl: base };\n }\n\n const env = options.environment ?? 'prod';\n const base = `https://api.${env}.htagai.com`;\n return {\n publicBaseUrl: base,\n internalBaseUrl: base,\n intentHubBaseUrl: `${base}/intent-hub/v1`,\n };\n}\n\n// ---------------------------------------------------------------------------\n// HtAgApiClient\n// ---------------------------------------------------------------------------\n\n/**\n * Top-level client for the HtAG Location Intelligence APIs.\n *\n * ```ts\n * import { HtAgApiClient } from '@htag/sdk';\n *\n * const client = new HtAgApiClient({\n * apiKey: process.env.HTAG_API_KEY!,\n * environment: 'prod',\n * });\n *\n * const results = await client.address.search({ q: '100 George St Sydney' });\n * ```\n */\nexport class HtAgApiClient {\n /** Address search, insights and standardisation. */\n readonly address: AddressClient;\n\n /** Sold property search. */\n readonly property: PropertyClient;\n\n /** Market snapshots, advanced queries and time-series trends. */\n readonly markets: MarketsClient;\n\n /** Intent Hub: event classification, integrations and subscriptions. */\n readonly intentHub: IntentHubClient;\n\n /** Reference data: localities and LGAs. */\n readonly reference: ReferenceClient;\n\n constructor(options: HtAgClientOptions) {\n if (!options.apiKey) {\n throw new Error(\n 'HtAgApiClient requires an apiKey. Pass it in the constructor options.',\n );\n }\n\n const { publicBaseUrl, internalBaseUrl, intentHubBaseUrl } = resolveBaseUrls(options);\n\n const config: ResolvedConfig = {\n apiKey: options.apiKey,\n publicBaseUrl,\n internalBaseUrl,\n intentHubBaseUrl,\n maxRetries: options.maxRetries ?? DEFAULT_MAX_RETRIES,\n retryBaseDelay: options.retryBaseDelay ?? DEFAULT_RETRY_BASE_DELAY,\n timeout: options.timeout ?? DEFAULT_TIMEOUT,\n };\n\n const http = new HttpClient(config);\n\n this.address = new AddressClient(http);\n this.property = new PropertyClient(http);\n this.markets = new MarketsClient(http);\n this.intentHub = new IntentHubClient(http);\n this.reference = new ReferenceClient(http);\n }\n}\n"],"mappings":";AAGO,IAAM,YAAN,cAAwB,MAAM;AAAA;AAAA,EAE1B;AAAA;AAAA,EAGA;AAAA;AAAA,EAGA;AAAA,EAET,YACE,SACA,SAMA;AACA,UAAM,SAAS,EAAE,OAAO,SAAS,MAAM,CAAC;AACxC,SAAK,OAAO;AACZ,SAAK,SAAS,SAAS;AACvB,SAAK,OAAO,SAAS;AACrB,SAAK,MAAM,SAAS;AAAA,EACtB;AACF;AAKO,IAAM,sBAAN,cAAkC,UAAU;AAAA,EACjD,YAAY,SAAyD;AACnE;AA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AAA,EAET,YAAY,SAA4B;AACtC,QAAI,CAAC,QAAQ,QAAQ;AACnB,YAAM,IAAI;AAAA,QACR;AAAA,MACF;AAAA,IACF;AAEA,UAAM,EAAE,eAAe,iBAAiB,iBAAiB,IAAI,gBAAgB,OAAO;AAEpF,UAAM,SAAyB;AAAA,MAC7B,QAAQ,QAAQ;AAAA,MAChB;AAAA,MACA;AAAA,MACA;AAAA,MACA,YAAY,QAAQ,cAAc;AAAA,MAClC,gBAAgB,QAAQ,kBAAkB;AAAA,MAC1C,SAAS,QAAQ,WAAW;AAAA,IAC9B;AAEA,UAAM,OAAO,IAAI,WAAW,MAAM;AAElC,SAAK,UAAU,IAAI,cAAc,IAAI;AACrC,SAAK,WAAW,IAAI,eAAe,IAAI;AACvC,SAAK,UAAU,IAAI,cAAc,IAAI;AACrC,SAAK,YAAY,IAAI,gBAAgB,IAAI;AACzC,SAAK,YAAY,IAAI,gBAAgB,IAAI;AAAA,EAC3C;AACF;","names":["base"]}
|
|
1
|
+
{"version":3,"sources":["../src/errors.ts","../src/http.ts","../src/address/client.ts","../src/agents/client.ts","../src/property/client.ts","../src/markets/trends.ts","../src/markets/client.ts","../src/intent-hub/client.ts","../src/reference/client.ts","../src/client.ts"],"sourcesContent":["/**\n * Base error class for all HtAG SDK errors.\n */\nexport class HtAgError extends Error {\n /** HTTP status code, if available. */\n readonly status: number | undefined;\n\n /** Raw response body, if available. */\n readonly body: unknown;\n\n /** The request URL that caused the error. */\n readonly url: string | undefined;\n\n constructor(\n message: string,\n options?: {\n status?: number;\n body?: unknown;\n url?: string;\n cause?: unknown;\n },\n ) {\n super(message, { cause: options?.cause });\n this.name = 'HtAgError';\n this.status = options?.status;\n this.body = options?.body;\n this.url = options?.url;\n }\n}\n\n/**\n * Thrown when the server returns 401 or 403.\n */\nexport class AuthenticationError extends HtAgError {\n constructor(options: { status: number; body: unknown; url: string }) {\n super(\n `Authentication failed (HTTP ${options.status}). Check your API key.`,\n options,\n );\n this.name = 'AuthenticationError';\n }\n}\n\n/**\n * Thrown when the server returns 429 after exhausting all retries.\n */\nexport class RateLimitError extends HtAgError {\n constructor(options: { body: unknown; url: string }) {\n super('Rate limit exceeded. Please retry after a short delay.', {\n status: 429,\n ...options,\n });\n this.name = 'RateLimitError';\n }\n}\n\n/**\n * Thrown when the server returns 400 or 422.\n */\nexport class ValidationError extends HtAgError {\n constructor(options: { status: number; body: unknown; url: string }) {\n const detail = extractDetail(options.body);\n super(\n detail\n ? `Validation error (HTTP ${options.status}): ${detail}`\n : `Validation error (HTTP ${options.status})`,\n options,\n );\n this.name = 'ValidationError';\n }\n}\n\n/**\n * Thrown when the server returns a 5xx status after exhausting all retries.\n */\nexport class ServerError extends HtAgError {\n constructor(options: { status: number; body: unknown; url: string }) {\n super(`Server error (HTTP ${options.status})`, options);\n this.name = 'ServerError';\n }\n}\n\n// ---------------------------------------------------------------------------\n// Helpers\n// ---------------------------------------------------------------------------\n\nfunction extractDetail(body: unknown): string | undefined {\n if (body && typeof body === 'object' && 'detail' in body) {\n const detail = (body as Record<string, unknown>).detail;\n if (typeof detail === 'string') return detail;\n if (Array.isArray(detail)) {\n return detail\n .map((d) => {\n if (typeof d === 'string') return d;\n if (d && typeof d === 'object' && 'msg' in d) return String(d.msg);\n return JSON.stringify(d);\n })\n .join('; ');\n }\n return JSON.stringify(detail);\n }\n return undefined;\n}\n","import type { ResolvedConfig, RequestOptions } from './types.js';\nimport {\n HtAgError,\n AuthenticationError,\n RateLimitError,\n ValidationError,\n ServerError,\n} from './errors.js';\n\n// ---------------------------------------------------------------------------\n// camelCase -> snake_case conversion\n// ---------------------------------------------------------------------------\n\n/**\n * Convert a camelCase string to snake_case.\n *\n * Handles sequences of uppercase letters correctly:\n * - \"areaId\" -> \"area_id\"\n * - \"periodEndMin\" -> \"period_end_min\"\n * - \"IRSD\" -> \"irsd\" (all-caps treated as one token)\n */\nfunction toSnakeCase(str: string): string {\n return str\n .replace(/([A-Z]+)([A-Z][a-z])/g, '$1_$2')\n .replace(/([a-z0-9])([A-Z])/g, '$1_$2')\n .toLowerCase();\n}\n\n// ---------------------------------------------------------------------------\n// Query-string builder\n// ---------------------------------------------------------------------------\n\n/**\n * Build a URL query string from a params object, converting camelCase keys\n * to snake_case. Arrays are joined with commas. `undefined` and `null` values\n * are omitted.\n */\nexport function buildQueryString(\n params: Record<string, unknown>,\n): string {\n const parts: string[] = [];\n\n for (const [key, value] of Object.entries(params)) {\n // Skip internal SDK options that are not API params.\n if (key === 'signal') continue;\n if (value === undefined || value === null) continue;\n\n const snakeKey = toSnakeCase(key);\n\n if (Array.isArray(value)) {\n if (value.length > 0) {\n parts.push(\n `${encodeURIComponent(snakeKey)}=${encodeURIComponent(value.join(','))}`,\n );\n }\n } else {\n parts.push(\n `${encodeURIComponent(snakeKey)}=${encodeURIComponent(String(value))}`,\n );\n }\n }\n\n return parts.length > 0 ? `?${parts.join('&')}` : '';\n}\n\n// ---------------------------------------------------------------------------\n// Retryable HTTP client\n// ---------------------------------------------------------------------------\n\nfunction isRetryable(status: number): boolean {\n return status === 429 || status >= 500;\n}\n\nfunction sleep(ms: number): Promise<void> {\n return new Promise((resolve) => setTimeout(resolve, ms));\n}\n\n/**\n * Parse the body of a response. Returns the parsed JSON on success or a string\n * representation when parsing fails.\n */\nasync function parseBody(response: Response): Promise<unknown> {\n const contentType = response.headers.get('content-type') ?? '';\n if (contentType.includes('application/json')) {\n try {\n return await response.json();\n } catch {\n return await response.text();\n }\n }\n return await response.text();\n}\n\n/**\n * Throw the appropriate typed error for the given HTTP status.\n */\nfunction throwForStatus(\n status: number,\n body: unknown,\n url: string,\n): never {\n if (status === 401 || status === 403) {\n throw new AuthenticationError({ status, body, url });\n }\n if (status === 429) {\n throw new RateLimitError({ body, url });\n }\n if (status === 400 || status === 422) {\n throw new ValidationError({ status, body, url });\n }\n if (status >= 500) {\n throw new ServerError({ status, body, url });\n }\n throw new HtAgError(`HTTP ${status}`, { status, body, url });\n}\n\n/**\n * Internal HTTP transport used by all domain clients.\n */\nexport class HttpClient {\n constructor(private readonly config: ResolvedConfig) {}\n\n /**\n * Execute a GET request against the public API base.\n */\n async get<T>(path: string, options?: RequestOptions): Promise<T> {\n return this.request<T>('GET', this.config.publicBaseUrl + path, undefined, options);\n }\n\n /**\n * Execute a POST request against the public API base.\n */\n async post<T>(\n path: string,\n body: unknown,\n options?: RequestOptions,\n ): Promise<T> {\n return this.request<T>('POST', this.config.publicBaseUrl + path, body, options);\n }\n\n /**\n * Execute a PATCH request against the public API base.\n */\n async patch<T>(\n path: string,\n body: unknown,\n options?: RequestOptions,\n ): Promise<T> {\n return this.request<T>('PATCH', this.config.publicBaseUrl + path, body, options);\n }\n\n /**\n * Execute a DELETE request against the public API base.\n */\n async delete<T>(path: string, options?: RequestOptions): Promise<T> {\n return this.request<T>('DELETE', this.config.publicBaseUrl + path, undefined, options);\n }\n\n /**\n * Execute a GET request against the internal API base.\n */\n async internalGet<T>(path: string, options?: RequestOptions): Promise<T> {\n return this.request<T>('GET', this.config.internalBaseUrl + path, undefined, options);\n }\n\n /**\n * Execute a POST request against the internal API base.\n */\n async internalPost<T>(\n path: string,\n body: unknown,\n options?: RequestOptions,\n ): Promise<T> {\n return this.request<T>('POST', this.config.internalBaseUrl + path, body, options);\n }\n\n /**\n * Execute a GET request against the Intent Hub API base.\n */\n async intentHubGet<T>(path: string, options?: RequestOptions): Promise<T> {\n return this.request<T>('GET', this.config.intentHubBaseUrl + path, undefined, options);\n }\n\n /**\n * Execute a POST request against the Intent Hub API base.\n */\n async intentHubPost<T>(\n path: string,\n body: unknown,\n options?: RequestOptions,\n ): Promise<T> {\n return this.request<T>('POST', this.config.intentHubBaseUrl + path, body, options);\n }\n\n /**\n * Execute a PATCH request against the Intent Hub API base.\n */\n async intentHubPatch<T>(\n path: string,\n body: unknown,\n options?: RequestOptions,\n ): Promise<T> {\n return this.request<T>('PATCH', this.config.intentHubBaseUrl + path, body, options);\n }\n\n /**\n * Execute a DELETE request against the Intent Hub API base.\n */\n async intentHubDelete<T>(path: string, options?: RequestOptions): Promise<T> {\n return this.request<T>('DELETE', this.config.intentHubBaseUrl + path, undefined, options);\n }\n\n /**\n * Execute a GET request against the Agents API base.\n */\n async agentsGet<T>(path: string, options?: RequestOptions): Promise<T> {\n return this.request<T>('GET', this.config.agentsBaseUrl + path, undefined, options);\n }\n\n /**\n * Execute a POST request against the Agents API base.\n */\n async agentsPost<T>(\n path: string,\n body: unknown,\n options?: RequestOptions,\n ): Promise<T> {\n return this.request<T>('POST', this.config.agentsBaseUrl + path, body, options);\n }\n\n // -----------------------------------------------------------------------\n // Core request implementation with retries and exponential backoff\n // -----------------------------------------------------------------------\n\n private async request<T>(\n method: string,\n url: string,\n body: unknown,\n options?: RequestOptions,\n ): Promise<T> {\n const headers: Record<string, string> = {\n 'x-api-key': this.config.apiKey,\n 'accept': 'application/json',\n };\n\n if (body !== undefined) {\n headers['content-type'] = 'application/json';\n }\n\n let lastError: Error | undefined;\n\n for (let attempt = 0; attempt <= this.config.maxRetries; attempt++) {\n // If this is a retry, wait with exponential backoff + jitter.\n if (attempt > 0) {\n const base = this.config.retryBaseDelay * Math.pow(2, attempt - 1);\n const jitter = Math.random() * base * 0.5;\n await sleep(base + jitter);\n }\n\n // Build an AbortController that combines the user signal with a timeout.\n const controller = new AbortController();\n let timeoutId: ReturnType<typeof setTimeout> | undefined;\n\n const cleanup = () => {\n if (timeoutId !== undefined) clearTimeout(timeoutId);\n };\n\n // Wire up caller's abort signal.\n if (options?.signal) {\n if (options.signal.aborted) {\n throw new HtAgError('Request aborted', {\n url,\n cause: options.signal.reason,\n });\n }\n options.signal.addEventListener('abort', () => controller.abort(options.signal!.reason), {\n once: true,\n });\n }\n\n timeoutId = setTimeout(\n () => controller.abort(new Error('Request timed out')),\n this.config.timeout,\n );\n\n try {\n const response = await fetch(url, {\n method,\n headers,\n body: body !== undefined ? JSON.stringify(body) : undefined,\n signal: controller.signal,\n });\n\n cleanup();\n\n if (response.ok) {\n // 204 No Content — nothing to parse.\n if (response.status === 204) {\n return undefined as T;\n }\n return (await parseBody(response)) as T;\n }\n\n const responseBody = await parseBody(response);\n\n // Retry on retryable statuses, unless we've exhausted retries.\n if (isRetryable(response.status) && attempt < this.config.maxRetries) {\n lastError = new HtAgError(`HTTP ${response.status}`, {\n status: response.status,\n body: responseBody,\n url,\n });\n continue;\n }\n\n // Non-retryable or exhausted retries — throw typed error.\n throwForStatus(response.status, responseBody, url);\n } catch (err) {\n cleanup();\n\n // Re-throw our own typed errors.\n if (err instanceof HtAgError) {\n throw err;\n }\n\n // Handle abort / timeout.\n if (err instanceof DOMException && err.name === 'AbortError') {\n if (options?.signal?.aborted) {\n throw new HtAgError('Request aborted', { url, cause: err });\n }\n throw new HtAgError('Request timed out', { url, cause: err });\n }\n\n // Network / fetch errors — retry if we have attempts left.\n if (attempt < this.config.maxRetries) {\n lastError = err instanceof Error ? err : new Error(String(err));\n continue;\n }\n\n throw new HtAgError(\n `Network error: ${err instanceof Error ? err.message : String(err)}`,\n { url, cause: err },\n );\n }\n }\n\n // Should not reach here, but just in case.\n throw lastError ?? new HtAgError('Request failed after retries', { url });\n }\n}\n","import type { HttpClient } from '../http.js';\nimport { buildQueryString } from '../http.js';\nimport type {\n AddressSearchParams,\n AddressSearchResponse,\n AddressInsightsParams,\n AddressInsightsResponse,\n BatchStandardiseParams,\n BatchStandardiseResponse,\n GeocodeParams,\n GeocodeResponse,\n EnvironmentParams,\n EnvironmentResponse,\n DemographicsParams,\n DemographicsResponse,\n} from './types.js';\n\n/**\n * Client for the Address API domain.\n *\n * ```ts\n * const results = await client.address.search({ q: '100 George St Sydney' });\n * ```\n */\nexport class AddressClient {\n /** @internal */\n constructor(private readonly http: HttpClient) {}\n\n /**\n * Search for addresses matching a free-text query.\n *\n * `GET /internal-api/v1/address/search`\n */\n async search(params: AddressSearchParams): Promise<AddressSearchResponse> {\n const { signal, ...query } = params;\n const qs = buildQueryString(query);\n return this.http.internalGet<AddressSearchResponse>(`/internal-api/v1/address/search${qs}`, { signal });\n }\n\n /**\n * Retrieve detailed insights for one or more addresses.\n *\n * `GET /internal-api/v1/address/insights`\n */\n async insights(params: AddressInsightsParams): Promise<AddressInsightsResponse> {\n const { signal, ...query } = params;\n const qs = buildQueryString(query);\n return this.http.internalGet<AddressInsightsResponse>(`/internal-api/v1/address/insights${qs}`, { signal });\n }\n\n /**\n * Standardise a batch of raw address strings into structured records.\n *\n * `POST /v1/address/standardise`\n */\n async standardise(params: BatchStandardiseParams): Promise<BatchStandardiseResponse> {\n const { signal, addresses } = params;\n return this.http.post<BatchStandardiseResponse>(\n '/v1/address/standardise',\n { addresses },\n { signal },\n );\n }\n\n /**\n * Geocode an address string to structured location data.\n *\n * `GET /v1/address/geocode`\n */\n async geocode(params: GeocodeParams): Promise<GeocodeResponse> {\n const { signal, ...query } = params;\n const qs = buildQueryString(query);\n return this.http.get<GeocodeResponse>(`/v1/address/geocode${qs}`, { signal });\n }\n\n /**\n * Retrieve environmental data (flood, bushfire, heritage, zoning) for addresses.\n *\n * `GET /v1/address/environment`\n */\n async environment(params: EnvironmentParams): Promise<EnvironmentResponse> {\n const { signal, ...query } = params;\n const qs = buildQueryString(query);\n return this.http.get<EnvironmentResponse>(`/v1/address/environment${qs}`, { signal });\n }\n\n /**\n * Retrieve demographic data (SEIFA indices, housing tenure) for addresses.\n *\n * `GET /v1/address/demographics`\n */\n async demographics(params: DemographicsParams): Promise<DemographicsResponse> {\n const { signal, ...query } = params;\n const qs = buildQueryString(query);\n return this.http.get<DemographicsResponse>(`/v1/address/demographics${qs}`, { signal });\n }\n}\n","import type { HttpClient } from '../http.js';\nimport type {\n AgentExecuteResponse,\n AgentInfo,\n AgentInput,\n AgentJobStatus,\n AgentJobSubmission,\n AgentListResponse,\n} from './types.js';\n\n/**\n * Client for AI agent execution.\n *\n * ```ts\n * const result = await client.agents.execute('market-cycle', {\n * suburb: 'Richmond',\n * state: 'VIC',\n * propertyType: 'house',\n * });\n * ```\n */\nexport class AgentsClient {\n constructor(private readonly http: HttpClient) {}\n\n /** List all available agents with their metadata. */\n async list(): Promise<AgentListResponse> {\n return this.http.agentsGet<AgentListResponse>('/agents');\n }\n\n /** Get metadata for a specific agent. */\n async get(agentId: string): Promise<AgentInfo> {\n return this.http.agentsGet<AgentInfo>(`/agents/${agentId}`);\n }\n\n /**\n * Execute an agent synchronously.\n *\n * Blocks until the agent completes (typically 5-30 seconds).\n *\n * @param agentId - Agent identifier (e.g. `\"market-cycle\"`)\n * @param input - Agent input parameters\n */\n async execute(\n agentId: string,\n input: AgentInput = {},\n ): Promise<AgentExecuteResponse> {\n return this.http.agentsPost<AgentExecuteResponse>(\n `/agents/${agentId}/execute`,\n input,\n );\n }\n\n /**\n * Submit an async agent job. Returns immediately with a job ID.\n *\n * @param agentId - Agent identifier\n * @param input - Agent input parameters\n */\n async submitJob(\n agentId: string,\n input: AgentInput = {},\n ): Promise<AgentJobSubmission> {\n return this.http.agentsPost<AgentJobSubmission>(\n `/agents/${agentId}/execute/async`,\n input,\n );\n }\n\n /**\n * Poll the status of an async agent job.\n *\n * @param agentId - Agent identifier\n * @param jobId - Job ID from {@link submitJob}\n */\n async getJob(agentId: string, jobId: string): Promise<AgentJobStatus> {\n return this.http.agentsGet<AgentJobStatus>(\n `/agents/${agentId}/jobs/${jobId}`,\n );\n }\n}\n","import type { HttpClient } from '../http.js';\nimport { buildQueryString } from '../http.js';\nimport type {\n SoldSearchParams,\n SoldPropertiesResponse,\n} from './types.js';\n\n/**\n * Client for the Property API domain.\n *\n * ```ts\n * const sold = await client.property.soldSearch({ address: '100 George St Sydney', radius: 2000 });\n * ```\n */\nexport class PropertyClient {\n /** @internal */\n constructor(private readonly http: HttpClient) {}\n\n /**\n * Search for recently sold properties near a location.\n *\n * `GET /v1/property/sold/search`\n */\n async soldSearch(params: SoldSearchParams): Promise<SoldPropertiesResponse> {\n const { signal, ...query } = params;\n const qs = buildQueryString(query);\n return this.http.get<SoldPropertiesResponse>(`/v1/property/sold/search${qs}`, { signal });\n }\n}\n","import type { HttpClient } from '../http.js';\nimport { buildQueryString } from '../http.js';\nimport type {\n TrendsParams,\n TrendsWithBedroomsParams,\n PriceResponse,\n RentResponse,\n YieldResponse,\n SupplyDemandResponse,\n SearchIndexResponse,\n HoldPeriodResponse,\n PerformanceResponse,\n GrowthRatesResponse,\n DemandProfileResponse,\n StockOnMarketResponse,\n InventoryTrendResponse,\n DaysOnMarketResponse,\n ClearanceRateResponse,\n VacancyResponse,\n} from './types.js';\n\n/**\n * Client for the Markets Trends API domain.\n *\n * Each method queries a specific time-series metric:\n *\n * ```ts\n * const prices = await client.markets.trends.price({\n * level: 'suburb',\n * areaId: ['SAL10001'],\n * propertyType: ['house'],\n * });\n * ```\n */\nexport class TrendsClient {\n /** @internal */\n constructor(private readonly http: HttpClient) {}\n\n /**\n * Price history trends.\n *\n * `GET /internal-api/v1/markets/trends/price`\n */\n async price(params: TrendsWithBedroomsParams): Promise<PriceResponse> {\n return this.trend<PriceResponse>('price', params);\n }\n\n /**\n * Rent history trends.\n *\n * `GET /v1/markets/trends/rent`\n */\n async rent(params: TrendsWithBedroomsParams): Promise<RentResponse> {\n return this.publicTrend<RentResponse>('rent', params);\n }\n\n /**\n * Yield history trends.\n *\n * `GET /v1/markets/trends/yield`\n */\n async yieldHistory(params: TrendsWithBedroomsParams): Promise<YieldResponse> {\n return this.publicTrend<YieldResponse>('yield', params);\n }\n\n /**\n * Supply and demand (monthly frequency).\n *\n * `GET /internal-api/v1/markets/trends/supply-demand`\n */\n async supplyDemand(params: TrendsWithBedroomsParams): Promise<SupplyDemandResponse> {\n return this.trend<SupplyDemandResponse>('supply-demand', params);\n }\n\n /**\n * Search interest index (quarterly frequency).\n *\n * `GET /internal-api/v1/markets/trends/search-index`\n */\n async searchIndex(params: TrendsParams): Promise<SearchIndexResponse> {\n return this.trend<SearchIndexResponse>('search-index', params);\n }\n\n /**\n * Hold period (yearly frequency).\n *\n * `GET /internal-api/v1/markets/trends/hold-period`\n */\n async holdPeriod(params: TrendsParams): Promise<HoldPeriodResponse> {\n return this.trend<HoldPeriodResponse>('hold-period', params);\n }\n\n /**\n * Performance essentials.\n *\n * `GET /internal-api/v1/markets/trends/performance`\n */\n async performance(params: TrendsWithBedroomsParams): Promise<PerformanceResponse> {\n return this.trend<PerformanceResponse>('performance', params);\n }\n\n /**\n * Growth rate cycle.\n *\n * `GET /v1/markets/trends/growth-rates`\n */\n async growthRates(params: TrendsParams): Promise<GrowthRatesResponse> {\n return this.publicTrend<GrowthRatesResponse>('growth-rates', params);\n }\n\n /**\n * Demand profile breakdown.\n *\n * `GET /v1/markets/trends/demand-profile`\n */\n async demandProfile(params: TrendsParams): Promise<DemandProfileResponse> {\n return this.publicTrend<DemandProfileResponse>('demand-profile', params);\n }\n\n /**\n * Stock on market trends.\n *\n * `GET /v1/markets/trends/stock-on-market`\n */\n async stockOnMarket(params: TrendsParams): Promise<StockOnMarketResponse> {\n return this.publicTrend<StockOnMarketResponse>('stock-on-market', params);\n }\n\n /**\n * Inventory trends.\n *\n * `GET /v1/markets/trends/inventory`\n */\n async inventory(params: TrendsParams): Promise<InventoryTrendResponse> {\n return this.publicTrend<InventoryTrendResponse>('inventory', params);\n }\n\n /**\n * Days on market trends.\n *\n * `GET /v1/markets/trends/days-on-market`\n */\n async daysOnMarket(params: TrendsParams): Promise<DaysOnMarketResponse> {\n return this.publicTrend<DaysOnMarketResponse>('days-on-market', params);\n }\n\n /**\n * Clearance rate trends.\n *\n * `GET /v1/markets/trends/clearance-rate`\n */\n async clearanceRate(params: TrendsParams): Promise<ClearanceRateResponse> {\n return this.publicTrend<ClearanceRateResponse>('clearance-rate', params);\n }\n\n /**\n * Vacancy rate trends.\n *\n * `GET /v1/markets/trends/vacancy`\n */\n async vacancy(params: TrendsParams): Promise<VacancyResponse> {\n return this.publicTrend<VacancyResponse>('vacancy', params);\n }\n\n // -----------------------------------------------------------------------\n // Shared implementation\n // -----------------------------------------------------------------------\n\n private async trend<T>(metric: string, params: TrendsParams | TrendsWithBedroomsParams): Promise<T> {\n const { signal, ...query } = params;\n const qs = buildQueryString(query);\n return this.http.internalGet<T>(\n `/internal-api/v1/markets/trends/${metric}${qs}`,\n { signal },\n );\n }\n\n private async publicTrend<T>(metric: string, params: TrendsParams | TrendsWithBedroomsParams): Promise<T> {\n const { signal, ...query } = params;\n const qs = buildQueryString(query);\n return this.http.get<T>(\n `/v1/markets/trends/${metric}${qs}`,\n { signal },\n );\n }\n}\n","import type { HttpClient } from '../http.js';\nimport { buildQueryString } from '../http.js';\nimport { TrendsClient } from './trends.js';\nimport type {\n SnapshotsParams,\n SnapshotsResponse,\n AdvancedSearchBody,\n MarketQueryResponse,\n MarketSnapshotParams,\n GrowthCumulativeResponse,\n GrowthAnnualisedResponse,\n MarketSupplyResponse,\n SupplyLongSlopeResponse,\n SupplyShortSlopeResponse,\n MarketDemandResponse,\n DemandLongSlopeResponse,\n DemandShortSlopeResponse,\n MarketScoresResponse,\n MarketFundamentalsResponse,\n MarketCycleResponse,\n MarketRiskResponse,\n} from './types.js';\nimport type { RequestOptions } from '../types.js';\n\n/**\n * Client for the Markets API domain.\n *\n * ```ts\n * const snapshots = await client.markets.snapshots({\n * level: 'suburb',\n * propertyType: ['house'],\n * });\n *\n * const prices = await client.markets.trends.price({\n * level: 'suburb',\n * areaId: ['SAL10001'],\n * });\n * ```\n */\nexport class MarketsClient {\n /** Sub-client for time-series trend endpoints. */\n readonly trends: TrendsClient;\n\n /** @internal */\n constructor(private readonly http: HttpClient) {\n this.trends = new TrendsClient(http);\n }\n\n /**\n * Retrieve market snapshot data with optional filters.\n *\n * `GET /internal-api/v1/markets/snapshots`\n */\n async snapshots(params: SnapshotsParams): Promise<SnapshotsResponse> {\n const { signal, ...query } = params;\n const qs = buildQueryString(query);\n return this.http.internalGet<SnapshotsResponse>(\n `/internal-api/v1/markets/snapshots${qs}`,\n { signal },\n );\n }\n\n /**\n * Advanced market query with logical filter expressions.\n *\n * `POST /internal-api/v1/markets/query`\n */\n async query(\n body: AdvancedSearchBody,\n options?: RequestOptions,\n ): Promise<MarketQueryResponse> {\n return this.http.internalPost<MarketQueryResponse>(\n '/internal-api/v1/markets/query',\n body,\n options,\n );\n }\n\n // -------------------------------------------------------------------------\n // Public market snapshot endpoints (/v1/markets/*)\n // -------------------------------------------------------------------------\n\n /**\n * Cumulative growth metrics.\n *\n * `GET /v1/markets/growth/cumulative`\n */\n async growthCumulative(params: MarketSnapshotParams): Promise<GrowthCumulativeResponse> {\n const { signal, ...query } = params;\n const qs = buildQueryString(query);\n return this.http.get<GrowthCumulativeResponse>(`/v1/markets/growth/cumulative${qs}`, { signal });\n }\n\n /**\n * Annualised growth metrics.\n *\n * `GET /v1/markets/growth/annualised`\n */\n async growthAnnualised(params: MarketSnapshotParams): Promise<GrowthAnnualisedResponse> {\n const { signal, ...query } = params;\n const qs = buildQueryString(query);\n return this.http.get<GrowthAnnualisedResponse>(`/v1/markets/growth/annualised${qs}`, { signal });\n }\n\n /**\n * Supply metrics.\n *\n * `GET /v1/markets/supply`\n */\n async supply(params: MarketSnapshotParams): Promise<MarketSupplyResponse> {\n const { signal, ...query } = params;\n const qs = buildQueryString(query);\n return this.http.get<MarketSupplyResponse>(`/v1/markets/supply${qs}`, { signal });\n }\n\n /**\n * Supply long-term slope metrics.\n *\n * `GET /v1/markets/supply/ls`\n */\n async supplyLongSlope(params: MarketSnapshotParams): Promise<SupplyLongSlopeResponse> {\n const { signal, ...query } = params;\n const qs = buildQueryString(query);\n return this.http.get<SupplyLongSlopeResponse>(`/v1/markets/supply/ls${qs}`, { signal });\n }\n\n /**\n * Supply short-term slope metrics.\n *\n * `GET /v1/markets/supply/ss`\n */\n async supplyShortSlope(params: MarketSnapshotParams): Promise<SupplyShortSlopeResponse> {\n const { signal, ...query } = params;\n const qs = buildQueryString(query);\n return this.http.get<SupplyShortSlopeResponse>(`/v1/markets/supply/ss${qs}`, { signal });\n }\n\n /**\n * Demand metrics.\n *\n * `GET /v1/markets/demand`\n */\n async demand(params: MarketSnapshotParams): Promise<MarketDemandResponse> {\n const { signal, ...query } = params;\n const qs = buildQueryString(query);\n return this.http.get<MarketDemandResponse>(`/v1/markets/demand${qs}`, { signal });\n }\n\n /**\n * Demand long-term slope metrics.\n *\n * `GET /v1/markets/demand/ls`\n */\n async demandLongSlope(params: MarketSnapshotParams): Promise<DemandLongSlopeResponse> {\n const { signal, ...query } = params;\n const qs = buildQueryString(query);\n return this.http.get<DemandLongSlopeResponse>(`/v1/markets/demand/ls${qs}`, { signal });\n }\n\n /**\n * Demand short-term slope metrics.\n *\n * `GET /v1/markets/demand/ss`\n */\n async demandShortSlope(params: MarketSnapshotParams): Promise<DemandShortSlopeResponse> {\n const { signal, ...query } = params;\n const qs = buildQueryString(query);\n return this.http.get<DemandShortSlopeResponse>(`/v1/markets/demand/ss${qs}`, { signal });\n }\n\n /**\n * Market scores (RCS, HAPI, volatility).\n *\n * `GET /v1/markets/scores`\n */\n async scores(params: MarketSnapshotParams): Promise<MarketScoresResponse> {\n const { signal, ...query } = params;\n const qs = buildQueryString(query);\n return this.http.get<MarketScoresResponse>(`/v1/markets/scores${qs}`, { signal });\n }\n\n /**\n * Market fundamentals (IRSAD, ratios, years to own).\n *\n * `GET /v1/markets/fundamentals`\n */\n async fundamentals(params: MarketSnapshotParams): Promise<MarketFundamentalsResponse> {\n const { signal, ...query } = params;\n const qs = buildQueryString(query);\n return this.http.get<MarketFundamentalsResponse>(`/v1/markets/fundamentals${qs}`, { signal });\n }\n\n /**\n * Market cycle indicators.\n *\n * `GET /v1/markets/cycle`\n */\n async cycle(params: MarketSnapshotParams): Promise<MarketCycleResponse> {\n const { signal, ...query } = params;\n const qs = buildQueryString(query);\n return this.http.get<MarketCycleResponse>(`/v1/markets/cycle${qs}`, { signal });\n }\n\n /**\n * Market risk indicators (flood, fire, diversity, distance).\n *\n * `GET /v1/markets/risk`\n */\n async risk(params: MarketSnapshotParams): Promise<MarketRiskResponse> {\n const { signal, ...query } = params;\n const qs = buildQueryString(query);\n return this.http.get<MarketRiskResponse>(`/v1/markets/risk${qs}`, { signal });\n }\n}\n","import type { HttpClient } from '../http.js';\nimport { buildQueryString } from '../http.js';\nimport type { RequestOptions } from '../types.js';\nimport type {\n SubmitEventParams,\n ClassifiedEvent,\n QueryEventsParams,\n PaginatedEvents,\n CreateIntegrationParams,\n Integration,\n UpdateIntegrationParams,\n TestResult,\n CreateSubscriptionParams,\n Subscription,\n UpdateSubscriptionParams,\n EventCategory,\n EventType,\n TagInfo,\n} from './types.js';\n\n/**\n * Client for the Intent Hub API domain.\n *\n * ```ts\n * const event = await client.intentHub.submitEvent({\n * sourceType: 'AGENT',\n * sourceId: 'my-agent',\n * textContent: 'User wants to refinance their mortgage',\n * });\n * ```\n */\nexport class IntentHubClient {\n /** @internal */\n constructor(private readonly http: HttpClient) {}\n\n // -------------------------------------------------------------------------\n // Events\n // -------------------------------------------------------------------------\n\n /**\n * Submit a raw event for classification.\n *\n * `POST /intent-hub/v1/events`\n */\n async submitEvent(params: SubmitEventParams): Promise<ClassifiedEvent> {\n const { signal, ...rest } = params;\n return this.http.intentHubPost<ClassifiedEvent>(\n '/events',\n {\n source_type: rest.sourceType,\n source_id: rest.sourceId,\n text_content: rest.textContent,\n payload: rest.payload,\n user_id: rest.userId,\n session_id: rest.sessionId,\n suggested_category: rest.suggestedCategory,\n suggested_intent: rest.suggestedIntent,\n idempotency_key: rest.idempotencyKey,\n event_type: rest.eventType,\n },\n { signal },\n );\n }\n\n /**\n * Retrieve a single classified event by ID.\n *\n * `GET /intent-hub/v1/events/:eventId`\n */\n async getEvent(eventId: string, options?: RequestOptions): Promise<ClassifiedEvent> {\n return this.http.intentHubGet<ClassifiedEvent>(\n `/events/${encodeURIComponent(eventId)}`,\n options,\n );\n }\n\n /**\n * Query classified events with optional filters.\n *\n * `GET /intent-hub/v1/events`\n */\n async queryEvents(params?: QueryEventsParams): Promise<PaginatedEvents> {\n if (!params) {\n return this.http.intentHubGet<PaginatedEvents>('/events');\n }\n const { signal, ...query } = params;\n const qs = buildQueryString(query);\n return this.http.intentHubGet<PaginatedEvents>(`/events${qs}`, { signal });\n }\n\n // -------------------------------------------------------------------------\n // Integrations\n // -------------------------------------------------------------------------\n\n /**\n * Create a new integration endpoint.\n *\n * `POST /intent-hub/v1/integrations`\n */\n async createIntegration(params: CreateIntegrationParams): Promise<Integration> {\n const { signal, ...rest } = params;\n return this.http.intentHubPost<Integration>(\n '/integrations',\n {\n name: rest.name,\n type: rest.type,\n url: rest.url,\n secret: rest.secret,\n headers: rest.headers,\n config: rest.config,\n },\n { signal },\n );\n }\n\n /**\n * List all integrations for the current organisation.\n *\n * `GET /intent-hub/v1/integrations`\n */\n async listIntegrations(options?: RequestOptions): Promise<Integration[]> {\n return this.http.intentHubGet<Integration[]>('/integrations', options);\n }\n\n /**\n * Retrieve a single integration by ID.\n *\n * `GET /intent-hub/v1/integrations/:id`\n */\n async getIntegration(id: string, options?: RequestOptions): Promise<Integration> {\n return this.http.intentHubGet<Integration>(\n `/integrations/${encodeURIComponent(id)}`,\n options,\n );\n }\n\n /**\n * Update an existing integration.\n *\n * `PATCH /intent-hub/v1/integrations/:id`\n */\n async updateIntegration(\n id: string,\n params: UpdateIntegrationParams,\n ): Promise<Integration> {\n const { signal, ...rest } = params;\n return this.http.intentHubPatch<Integration>(\n `/integrations/${encodeURIComponent(id)}`,\n {\n name: rest.name,\n url: rest.url,\n secret: rest.secret,\n status: rest.status,\n },\n { signal },\n );\n }\n\n /**\n * Delete an integration by ID.\n *\n * `DELETE /intent-hub/v1/integrations/:id`\n */\n async deleteIntegration(id: string, options?: RequestOptions): Promise<void> {\n return this.http.intentHubDelete<void>(\n `/integrations/${encodeURIComponent(id)}`,\n options,\n );\n }\n\n /**\n * Send a test event to an integration endpoint.\n *\n * `POST /intent-hub/v1/integrations/:id/test`\n */\n async testIntegration(id: string, options?: RequestOptions): Promise<TestResult> {\n return this.http.intentHubPost<TestResult>(\n `/integrations/${encodeURIComponent(id)}/test`,\n {},\n options,\n );\n }\n\n // -------------------------------------------------------------------------\n // Subscriptions\n // -------------------------------------------------------------------------\n\n /**\n * Create a new subscription linking event patterns to an integration.\n *\n * `POST /intent-hub/v1/subscriptions`\n */\n async createSubscription(params: CreateSubscriptionParams): Promise<Subscription> {\n const { signal, ...rest } = params;\n return this.http.intentHubPost<Subscription>(\n '/subscriptions',\n {\n integration_id: rest.integrationId,\n event_type_slug: rest.eventTypeSlug,\n tag: rest.tag,\n intent_pattern: rest.intentPattern,\n filters: rest.filters,\n },\n { signal },\n );\n }\n\n /**\n * List all subscriptions for the current organisation.\n *\n * `GET /intent-hub/v1/subscriptions`\n */\n async listSubscriptions(options?: RequestOptions): Promise<Subscription[]> {\n return this.http.intentHubGet<Subscription[]>('/subscriptions', options);\n }\n\n /**\n * Retrieve a single subscription by ID.\n *\n * `GET /intent-hub/v1/subscriptions/:id`\n */\n async getSubscription(id: string, options?: RequestOptions): Promise<Subscription> {\n return this.http.intentHubGet<Subscription>(\n `/subscriptions/${encodeURIComponent(id)}`,\n options,\n );\n }\n\n /**\n * Update an existing subscription.\n *\n * `PATCH /intent-hub/v1/subscriptions/:id`\n */\n async updateSubscription(\n id: string,\n params: UpdateSubscriptionParams,\n ): Promise<Subscription> {\n const { signal, ...rest } = params;\n return this.http.intentHubPatch<Subscription>(\n `/subscriptions/${encodeURIComponent(id)}`,\n {\n event_type_slug: rest.eventTypeSlug,\n tag: rest.tag,\n intent_pattern: rest.intentPattern,\n integration_id: rest.integrationId,\n is_active: rest.isActive,\n },\n { signal },\n );\n }\n\n /**\n * Delete a subscription by ID.\n *\n * `DELETE /intent-hub/v1/subscriptions/:id`\n */\n async deleteSubscription(id: string, options?: RequestOptions): Promise<void> {\n return this.http.intentHubDelete<void>(\n `/subscriptions/${encodeURIComponent(id)}`,\n options,\n );\n }\n\n // -------------------------------------------------------------------------\n // Catalog\n // -------------------------------------------------------------------------\n\n /**\n * List all event categories in the taxonomy.\n *\n * `GET /intent-hub/v1/catalog/categories`\n */\n async listCategories(options?: RequestOptions): Promise<EventCategory[]> {\n return this.http.intentHubGet<EventCategory[]>('/catalog/categories', options);\n }\n\n /**\n * List event types, optionally filtered by category.\n *\n * `GET /intent-hub/v1/catalog/event-types`\n */\n async listEventTypes(\n params?: { category?: string } & RequestOptions,\n ): Promise<EventType[]> {\n if (!params) {\n return this.http.intentHubGet<EventType[]>('/catalog/event-types');\n }\n const { signal, ...query } = params;\n const qs = buildQueryString(query);\n return this.http.intentHubGet<EventType[]>(`/catalog/event-types${qs}`, { signal });\n }\n\n /**\n * List all tags with their usage counts.\n *\n * `GET /intent-hub/v1/catalog/tags`\n */\n async listTags(options?: RequestOptions): Promise<TagInfo[]> {\n return this.http.intentHubGet<TagInfo[]>('/catalog/tags', options);\n }\n}\n","import type { HttpClient } from '../http.js';\nimport { buildQueryString } from '../http.js';\nimport type {\n LocalityParams,\n LocalityResponse,\n LgaParams,\n LgaResponse,\n} from './types.js';\n\nexport class ReferenceClient {\n constructor(private readonly http: HttpClient) {}\n\n async locality(params: LocalityParams): Promise<LocalityResponse> {\n const { signal, ...query } = params;\n const qs = buildQueryString(query);\n return this.http.get<LocalityResponse>(`/v1/reference/locality${qs}`, { signal });\n }\n\n async lga(params: LgaParams): Promise<LgaResponse> {\n const { signal, ...query } = params;\n const qs = buildQueryString(query);\n return this.http.get<LgaResponse>(`/v1/reference/lga${qs}`, { signal });\n }\n}\n","import type { HtAgClientOptions, ResolvedConfig } from './types.js';\nimport { HttpClient } from './http.js';\nimport { AddressClient } from './address/client.js';\nimport { AgentsClient } from './agents/client.js';\nimport { PropertyClient } from './property/client.js';\nimport { MarketsClient } from './markets/client.js';\nimport { IntentHubClient } from './intent-hub/client.js';\nimport { ReferenceClient } from './reference/client.js';\n\n// ---------------------------------------------------------------------------\n// Defaults\n// ---------------------------------------------------------------------------\n\nconst DEFAULT_MAX_RETRIES = 3;\nconst DEFAULT_RETRY_BASE_DELAY = 500; // ms\nconst DEFAULT_TIMEOUT = 30_000; // 30 seconds\n\n/**\n * Build the environment-derived base URLs.\n *\n * - `prod` -> `https://api.prod.htagai.com`\n * - `dev` -> `https://api.dev.htagai.com`\n */\nfunction resolveBaseUrls(options: HtAgClientOptions): {\n publicBaseUrl: string;\n internalBaseUrl: string;\n intentHubBaseUrl: string;\n agentsBaseUrl: string;\n} {\n if (options.baseUrl) {\n // Strip trailing slashes for consistency.\n const base = options.baseUrl.replace(/\\/+$/, '');\n return { publicBaseUrl: base, internalBaseUrl: base, intentHubBaseUrl: base, agentsBaseUrl: base };\n }\n\n const env = options.environment ?? 'prod';\n const base = `https://api.${env}.htagai.com`;\n return {\n publicBaseUrl: base,\n internalBaseUrl: base,\n intentHubBaseUrl: `${base}/intent-hub/v1`,\n agentsBaseUrl: `${base}/micro-agents`,\n };\n}\n\n// ---------------------------------------------------------------------------\n// HtAgApiClient\n// ---------------------------------------------------------------------------\n\n/**\n * Top-level client for the HtAG Location Intelligence APIs.\n *\n * ```ts\n * import { HtAgApiClient } from '@htag/sdk';\n *\n * const client = new HtAgApiClient({\n * apiKey: process.env.HTAG_API_KEY!,\n * environment: 'prod',\n * });\n *\n * const results = await client.address.search({ q: '100 George St Sydney' });\n * ```\n */\nexport class HtAgApiClient {\n /** Address search, insights and standardisation. */\n readonly address: AddressClient;\n\n /** AI-powered property investment agents. */\n readonly agents: AgentsClient;\n\n /** Sold property search. */\n readonly property: PropertyClient;\n\n /** Market snapshots, advanced queries and time-series trends. */\n readonly markets: MarketsClient;\n\n /** Intent Hub: event classification, integrations and subscriptions. */\n readonly intentHub: IntentHubClient;\n\n /** Reference data: localities and LGAs. */\n readonly reference: ReferenceClient;\n\n constructor(options: HtAgClientOptions) {\n if (!options.apiKey) {\n throw new Error(\n 'HtAgApiClient requires an apiKey. Pass it in the constructor options.',\n );\n }\n\n const { publicBaseUrl, internalBaseUrl, intentHubBaseUrl, agentsBaseUrl } = resolveBaseUrls(options);\n\n const config: ResolvedConfig = {\n apiKey: options.apiKey,\n publicBaseUrl,\n internalBaseUrl,\n intentHubBaseUrl,\n agentsBaseUrl,\n maxRetries: options.maxRetries ?? DEFAULT_MAX_RETRIES,\n retryBaseDelay: options.retryBaseDelay ?? DEFAULT_RETRY_BASE_DELAY,\n timeout: options.timeout ?? DEFAULT_TIMEOUT,\n };\n\n const http = new HttpClient(config);\n\n this.address = new AddressClient(http);\n this.agents = new AgentsClient(http);\n this.property = new PropertyClient(http);\n this.markets = new MarketsClient(http);\n this.intentHub = new IntentHubClient(http);\n this.reference = new ReferenceClient(http);\n }\n}\n"],"mappings":";AAGO,IAAM,YAAN,cAAwB,MAAM;AAAA;AAAA,EAE1B;AAAA;AAAA,EAGA;AAAA;AAAA,EAGA;AAAA,EAET,YACE,SACA,SAMA;AACA,UAAM,SAAS,EAAE,OAAO,SAAS,MAAM,CAAC;AACxC,SAAK,OAAO;AACZ,SAAK,SAAS,SAAS;AACvB,SAAK,OAAO,SAAS;AACrB,SAAK,MAAM,SAAS;AAAA,EACtB;AACF;AAKO,IAAM,sBAAN,cAAkC,UAAU;AAAA,EACjD,YAAY,SAAyD;AACnE;AAAA,MACE,+BAA+B,QAAQ,MAAM;AAAA,MAC7C;AAAA,IACF;AACA,SAAK,OAAO;AAAA,EACd;AACF;AAKO,IAAM,iBAAN,cAA6B,UAAU;AAAA,EAC5C,YAAY,SAAyC;AACnD,UAAM,0DAA0D;AAAA,MAC9D,QAAQ;AAAA,MACR,GAAG;AAAA,IACL,CAAC;AACD,SAAK,OAAO;AAAA,EACd;AACF;AAKO,IAAM,kBAAN,cAA8B,UAAU;AAAA,EAC7C,YAAY,SAAyD;AACnE,UAAM,SAAS,cAAc,QAAQ,IAAI;AACzC;AAAA,MACE,SACI,0BAA0B,QAAQ,MAAM,MAAM,MAAM,KACpD,0BAA0B,QAAQ,MAAM;AAAA,MAC5C;AAAA,IACF;AACA,SAAK,OAAO;AAAA,EACd;AACF;AAKO,IAAM,cAAN,cAA0B,UAAU;AAAA,EACzC,YAAY,SAAyD;AACnE,UAAM,sBAAsB,QAAQ,MAAM,KAAK,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