htag-sdk 0.9.0 → 1.0.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 CHANGED
@@ -23,9 +23,12 @@ __export(index_exports, {
23
23
  AddressClient: () => AddressClient,
24
24
  AgentsClient: () => AgentsClient,
25
25
  AuthenticationError: () => AuthenticationError,
26
+ DemographicsClient: () => DemographicsClient,
27
+ EconomicsClient: () => EconomicsClient,
26
28
  HtAgApiClient: () => HtAgApiClient,
27
29
  HtAgError: () => HtAgError,
28
30
  IntentHubClient: () => IntentHubClient,
31
+ InternalNamespace: () => InternalNamespace,
29
32
  MarketsClient: () => MarketsClient,
30
33
  PropertyClient: () => PropertyClient,
31
34
  RateLimitError: () => RateLimitError,
@@ -327,26 +330,6 @@ var AddressClient = class {
327
330
  constructor(http) {
328
331
  this.http = http;
329
332
  }
330
- /**
331
- * Search for addresses matching a free-text query.
332
- *
333
- * `GET /internal-api/v1/address/search`
334
- */
335
- async search(params) {
336
- const { signal, ...query } = params;
337
- const qs = buildQueryString(query);
338
- return this.http.internalGet(`/internal-api/v1/address/search${qs}`, { signal });
339
- }
340
- /**
341
- * Retrieve detailed insights for one or more addresses.
342
- *
343
- * `GET /internal-api/v1/address/insights`
344
- */
345
- async insights(params) {
346
- const { signal, ...query } = params;
347
- const qs = buildQueryString(query);
348
- return this.http.internalGet(`/internal-api/v1/address/insights${qs}`, { signal });
349
- }
350
333
  /**
351
334
  * Standardise a batch of raw address strings into structured records.
352
335
  *
@@ -390,6 +373,16 @@ var AddressClient = class {
390
373
  const qs = buildQueryString(query);
391
374
  return this.http.get(`/v1/address/demographics${qs}`, { signal });
392
375
  }
376
+ /**
377
+ * Retrieve schools relevant to an address.
378
+ *
379
+ * `GET /v1/address/schools`
380
+ */
381
+ async schools(params) {
382
+ const { signal, ...query } = params;
383
+ const qs = buildQueryString(query);
384
+ return this.http.get(`/v1/address/schools${qs}`, { signal });
385
+ }
393
386
  };
394
387
 
395
388
  // src/agents/client.ts
@@ -444,6 +437,95 @@ var AgentsClient = class {
444
437
  }
445
438
  };
446
439
 
440
+ // src/demographics/client.ts
441
+ var DemographicsClient = class {
442
+ constructor(http) {
443
+ this.http = http;
444
+ }
445
+ async censusMedians(params) {
446
+ const { signal, ...query } = params;
447
+ const qs = buildQueryString(query);
448
+ return this.http.get(`/v1/demographics/census-medians${qs}`, { signal });
449
+ }
450
+ async businessActivity(params) {
451
+ const { signal, ...query } = params;
452
+ const qs = buildQueryString(query);
453
+ return this.http.get(`/v1/demographics/business-activity${qs}`, { signal });
454
+ }
455
+ async healthcare(params) {
456
+ const { signal, ...query } = params;
457
+ const qs = buildQueryString(query);
458
+ return this.http.get(`/v1/demographics/healthcare${qs}`, { signal });
459
+ }
460
+ };
461
+
462
+ // src/economics/client.ts
463
+ var EconomicsClient = class {
464
+ /** @internal */
465
+ constructor(http) {
466
+ this.http = http;
467
+ }
468
+ /**
469
+ * Get CPI adjustment factor between two periods.
470
+ *
471
+ * `GET /v1/economics/cpi/factor`
472
+ */
473
+ async cpiFactor(params) {
474
+ const { signal, ...query } = params;
475
+ const qs = buildQueryString(query);
476
+ return this.http.get(`/v1/economics/cpi/factor${qs}`, { signal });
477
+ }
478
+ /**
479
+ * Adjust a dollar value for CPI inflation.
480
+ *
481
+ * `GET /v1/economics/cpi/adjust`
482
+ */
483
+ async cpiAdjust(params) {
484
+ const { signal, ...query } = params;
485
+ const qs = buildQueryString(query);
486
+ return this.http.get(`/v1/economics/cpi/adjust${qs}`, { signal });
487
+ }
488
+ /**
489
+ * Get CPI index time series for a region.
490
+ *
491
+ * `GET /v1/economics/cpi/series`
492
+ */
493
+ async cpiSeries(params) {
494
+ const { signal, ...query } = params ?? {};
495
+ const qs = buildQueryString(query);
496
+ return this.http.get(`/v1/economics/cpi/series${qs}`, { signal });
497
+ }
498
+ /**
499
+ * Get latest CPI index values for all regions.
500
+ *
501
+ * `GET /v1/economics/cpi/latest`
502
+ */
503
+ async cpiLatest(options) {
504
+ return this.http.get("/v1/economics/cpi/latest", options);
505
+ }
506
+ /**
507
+ * Get current RBA cash rate.
508
+ *
509
+ * `GET /v1/economics/cash-rate`
510
+ */
511
+ async cashRate(options) {
512
+ return this.http.get("/v1/economics/cash-rate", options);
513
+ }
514
+ /**
515
+ * Get RBA cash rate time series.
516
+ *
517
+ * `GET /v1/economics/cash-rate/series`
518
+ */
519
+ async cashRateSeries(params) {
520
+ const { signal, ...query } = params ?? {};
521
+ const qs = buildQueryString(query);
522
+ return this.http.get(
523
+ `/v1/economics/cash-rate/series${qs}`,
524
+ { signal }
525
+ );
526
+ }
527
+ };
528
+
447
529
  // src/property/client.ts
448
530
  var PropertyClient = class {
449
531
  /** @internal */
@@ -460,6 +542,36 @@ var PropertyClient = class {
460
542
  const qs = buildQueryString(query);
461
543
  return this.http.get(`/v1/property/sold/search${qs}`, { signal });
462
544
  }
545
+ /**
546
+ * Retrieve physical property attributes for an address.
547
+ *
548
+ * `GET /v1/property/summary`
549
+ */
550
+ async summary(params) {
551
+ const { signal, ...query } = params;
552
+ const qs = buildQueryString(query);
553
+ return this.http.get(`/v1/property/summary${qs}`, { signal });
554
+ }
555
+ /**
556
+ * Retrieve valuation estimates and transaction history for an address.
557
+ *
558
+ * `GET /v1/property/estimates`
559
+ */
560
+ async estimates(params) {
561
+ const { signal, ...query } = params;
562
+ const qs = buildQueryString(query);
563
+ return this.http.get(`/v1/property/estimates${qs}`, { signal });
564
+ }
565
+ /**
566
+ * Retrieve market position indicators for an address.
567
+ *
568
+ * `GET /v1/property/market`
569
+ */
570
+ async market(params) {
571
+ const { signal, ...query } = params;
572
+ const qs = buildQueryString(query);
573
+ return this.http.get(`/v1/property/market${qs}`, { signal });
574
+ }
463
575
  };
464
576
 
465
577
  // src/markets/trends.ts
@@ -471,10 +583,10 @@ var TrendsClient = class {
471
583
  /**
472
584
  * Price history trends.
473
585
  *
474
- * `GET /internal-api/v1/markets/trends/price`
586
+ * `GET /v1/markets/trends/price`
475
587
  */
476
588
  async price(params) {
477
- return this.trend("price", params);
589
+ return this.publicTrend("price", params);
478
590
  }
479
591
  /**
480
592
  * Rent history trends.
@@ -492,37 +604,21 @@ var TrendsClient = class {
492
604
  async yieldHistory(params) {
493
605
  return this.publicTrend("yield", params);
494
606
  }
495
- /**
496
- * Supply and demand (monthly frequency).
497
- *
498
- * `GET /internal-api/v1/markets/trends/supply-demand`
499
- */
500
- async supplyDemand(params) {
501
- return this.trend("supply-demand", params);
502
- }
503
607
  /**
504
608
  * Search interest index (quarterly frequency).
505
609
  *
506
- * `GET /internal-api/v1/markets/trends/search-index`
610
+ * `GET /v1/markets/trends/search-index`
507
611
  */
508
612
  async searchIndex(params) {
509
- return this.trend("search-index", params);
613
+ return this.publicTrend("search-index", params);
510
614
  }
511
615
  /**
512
616
  * Hold period (yearly frequency).
513
617
  *
514
- * `GET /internal-api/v1/markets/trends/hold-period`
618
+ * `GET /v1/markets/trends/hold-period`
515
619
  */
516
620
  async holdPeriod(params) {
517
- return this.trend("hold-period", params);
518
- }
519
- /**
520
- * Performance essentials.
521
- *
522
- * `GET /internal-api/v1/markets/trends/performance`
523
- */
524
- async performance(params) {
525
- return this.trend("performance", params);
621
+ return this.publicTrend("hold-period", params);
526
622
  }
527
623
  /**
528
624
  * Growth rate cycle.
@@ -583,14 +679,6 @@ var TrendsClient = class {
583
679
  // -----------------------------------------------------------------------
584
680
  // Shared implementation
585
681
  // -----------------------------------------------------------------------
586
- async trend(metric, params) {
587
- const { signal, ...query } = params;
588
- const qs = buildQueryString(query);
589
- return this.http.internalGet(
590
- `/internal-api/v1/markets/trends/${metric}${qs}`,
591
- { signal }
592
- );
593
- }
594
682
  async publicTrend(metric, params) {
595
683
  const { signal, ...query } = params;
596
684
  const qs = buildQueryString(query);
@@ -611,33 +699,15 @@ var MarketsClient = class {
611
699
  /** Sub-client for time-series trend endpoints. */
612
700
  trends;
613
701
  /**
614
- * Retrieve market snapshot data with optional filters.
702
+ * Core market headline metrics.
615
703
  *
616
- * `GET /internal-api/v1/markets/snapshots`
704
+ * `GET /v1/markets/summary`
617
705
  */
618
- async snapshots(params) {
706
+ async summary(params) {
619
707
  const { signal, ...query } = params;
620
708
  const qs = buildQueryString(query);
621
- return this.http.internalGet(
622
- `/internal-api/v1/markets/snapshots${qs}`,
623
- { signal }
624
- );
625
- }
626
- /**
627
- * Advanced market query with logical filter expressions.
628
- *
629
- * `POST /internal-api/v1/markets/query`
630
- */
631
- async query(body, options) {
632
- return this.http.internalPost(
633
- "/internal-api/v1/markets/query",
634
- body,
635
- options
636
- );
709
+ return this.http.get(`/v1/markets/summary${qs}`, { signal });
637
710
  }
638
- // -------------------------------------------------------------------------
639
- // Public market snapshot endpoints (/v1/markets/*)
640
- // -------------------------------------------------------------------------
641
711
  /**
642
712
  * Cumulative growth metrics.
643
713
  *
@@ -1020,6 +1090,169 @@ var ReferenceClient = class {
1020
1090
  const qs = buildQueryString(query);
1021
1091
  return this.http.get(`/v1/reference/lga${qs}`, { signal });
1022
1092
  }
1093
+ // -- Concordance endpoints --
1094
+ async concordanceSa2ToLocality(params) {
1095
+ const { signal, ...query } = params;
1096
+ const qs = buildQueryString(query);
1097
+ return this.http.get(`/v1/reference/concordance/sa2-to-locality${qs}`, { signal });
1098
+ }
1099
+ async concordanceLocalityToSa2(params) {
1100
+ const { signal, ...query } = params;
1101
+ const qs = buildQueryString(query);
1102
+ return this.http.get(`/v1/reference/concordance/locality-to-sa2${qs}`, { signal });
1103
+ }
1104
+ async concordanceLgaCodeToLga(params) {
1105
+ const { signal, ...query } = params;
1106
+ const qs = buildQueryString(query);
1107
+ return this.http.get(`/v1/reference/concordance/lga-code-to-lga${qs}`, { signal });
1108
+ }
1109
+ async concordancePostcodeToLocality(params) {
1110
+ const { signal, ...query } = params;
1111
+ const qs = buildQueryString(query);
1112
+ return this.http.get(`/v1/reference/concordance/postcode-to-locality${qs}`, { signal });
1113
+ }
1114
+ async concordanceLocalityToLga(params) {
1115
+ const { signal, ...query } = params;
1116
+ const qs = buildQueryString(query);
1117
+ return this.http.get(`/v1/reference/concordance/locality-to-lga${qs}`, { signal });
1118
+ }
1119
+ async concordanceLgaToLocalities(params) {
1120
+ const { signal, ...query } = params;
1121
+ const qs = buildQueryString(query);
1122
+ return this.http.get(`/v1/reference/concordance/lga-to-localities${qs}`, { signal });
1123
+ }
1124
+ async concordanceSalToLocality(params) {
1125
+ const { signal, ...query } = params;
1126
+ const qs = buildQueryString(query);
1127
+ return this.http.get(`/v1/reference/concordance/sal-to-locality${qs}`, { signal });
1128
+ }
1129
+ };
1130
+
1131
+ // src/internal.ts
1132
+ var InternalAddressClient = class {
1133
+ /** @internal */
1134
+ constructor(http) {
1135
+ this.http = http;
1136
+ }
1137
+ /**
1138
+ * Search for addresses matching a free-text query.
1139
+ *
1140
+ * `GET /internal-api/v1/address/search`
1141
+ */
1142
+ async search(params) {
1143
+ const { signal, ...query } = params;
1144
+ const qs = buildQueryString(query);
1145
+ return this.http.internalGet(`/internal-api/v1/address/search${qs}`, { signal });
1146
+ }
1147
+ /**
1148
+ * Retrieve detailed insights for one or more addresses.
1149
+ *
1150
+ * `GET /internal-api/v1/address/insights`
1151
+ */
1152
+ async insights(params) {
1153
+ const { signal, ...query } = params;
1154
+ const qs = buildQueryString(query);
1155
+ return this.http.internalGet(`/internal-api/v1/address/insights${qs}`, { signal });
1156
+ }
1157
+ };
1158
+ var InternalPropertyClient = class {
1159
+ /** @internal */
1160
+ constructor(http) {
1161
+ this.http = http;
1162
+ }
1163
+ /**
1164
+ * Retrieve automated property valuations (AVM).
1165
+ *
1166
+ * `GET /internal-api/v1/property/avm`
1167
+ */
1168
+ async avm(params) {
1169
+ const { signal, ...rest } = params;
1170
+ const q = {};
1171
+ if (rest.addressKey?.length) q.address_key = rest.addressKey.join(",");
1172
+ if (rest.address?.length) q.address = rest.address.join(",");
1173
+ const qs = buildQueryString(q);
1174
+ return this.http.internalGet(`/internal-api/v1/property/avm${qs}`, { signal });
1175
+ }
1176
+ };
1177
+ var InternalTrendsClient = class {
1178
+ /** @internal */
1179
+ constructor(http) {
1180
+ this.http = http;
1181
+ }
1182
+ /**
1183
+ * Supply and demand (monthly frequency).
1184
+ *
1185
+ * `GET /internal-api/v1/markets/trends/supply-demand`
1186
+ */
1187
+ async supplyDemand(params) {
1188
+ const { signal, ...query } = params;
1189
+ const qs = buildQueryString(query);
1190
+ return this.http.internalGet(
1191
+ `/internal-api/v1/markets/trends/supply-demand${qs}`,
1192
+ { signal }
1193
+ );
1194
+ }
1195
+ /**
1196
+ * Performance essentials.
1197
+ *
1198
+ * `GET /internal-api/v1/markets/trends/performance`
1199
+ */
1200
+ async performance(params) {
1201
+ const { signal, ...query } = params;
1202
+ const qs = buildQueryString(query);
1203
+ return this.http.internalGet(
1204
+ `/internal-api/v1/markets/trends/performance${qs}`,
1205
+ { signal }
1206
+ );
1207
+ }
1208
+ };
1209
+ var InternalMarketsClient = class {
1210
+ /** @internal */
1211
+ constructor(http) {
1212
+ this.http = http;
1213
+ this.trends = new InternalTrendsClient(http);
1214
+ }
1215
+ /** Sub-client for internal trend endpoints. */
1216
+ trends;
1217
+ /**
1218
+ * Retrieve market snapshot data with optional filters.
1219
+ *
1220
+ * `GET /internal-api/v1/markets/snapshots`
1221
+ */
1222
+ async snapshots(params) {
1223
+ const { signal, ...query } = params;
1224
+ const qs = buildQueryString(query);
1225
+ return this.http.internalGet(
1226
+ `/internal-api/v1/markets/snapshots${qs}`,
1227
+ { signal }
1228
+ );
1229
+ }
1230
+ /**
1231
+ * Advanced market query with logical filter expressions.
1232
+ *
1233
+ * `POST /internal-api/v1/markets/query`
1234
+ */
1235
+ async query(body, options) {
1236
+ return this.http.internalPost(
1237
+ "/internal-api/v1/markets/query",
1238
+ body,
1239
+ options
1240
+ );
1241
+ }
1242
+ };
1243
+ var InternalNamespace = class {
1244
+ /** Internal address endpoints (search, insights). */
1245
+ address;
1246
+ /** Internal property endpoints (AVM). */
1247
+ property;
1248
+ /** Internal market endpoints (snapshots, query, trends). */
1249
+ markets;
1250
+ /** @internal */
1251
+ constructor(http) {
1252
+ this.address = new InternalAddressClient(http);
1253
+ this.property = new InternalPropertyClient(http);
1254
+ this.markets = new InternalMarketsClient(http);
1255
+ }
1023
1256
  };
1024
1257
 
1025
1258
  // src/client.ts
@@ -1037,7 +1270,7 @@ function resolveBaseUrls(options) {
1037
1270
  publicBaseUrl: base,
1038
1271
  internalBaseUrl: base,
1039
1272
  intentHubBaseUrl: `${base}/intent-hub/v1`,
1040
- agentsBaseUrl: `${base}/micro-agents`
1273
+ agentsBaseUrl: `https://agent.${env}.htagai.com/micro-agents`
1041
1274
  };
1042
1275
  }
1043
1276
  var HtAgApiClient = class {
@@ -1045,6 +1278,10 @@ var HtAgApiClient = class {
1045
1278
  address;
1046
1279
  /** AI-powered property investment agents. */
1047
1280
  agents;
1281
+ /** Demographics: census medians, business activity, healthcare. */
1282
+ demographics;
1283
+ /** CPI adjustment utilities and RBA cash rate data. */
1284
+ economics;
1048
1285
  /** Sold property search. */
1049
1286
  property;
1050
1287
  /** Market snapshots, advanced queries and time-series trends. */
@@ -1053,6 +1290,8 @@ var HtAgApiClient = class {
1053
1290
  intentHub;
1054
1291
  /** Reference data: localities and LGAs. */
1055
1292
  reference;
1293
+ /** Internal API methods (requires `internal_api` scope). */
1294
+ internal;
1056
1295
  constructor(options) {
1057
1296
  if (!options.apiKey) {
1058
1297
  throw new Error(
@@ -1073,10 +1312,13 @@ var HtAgApiClient = class {
1073
1312
  const http = new HttpClient(config);
1074
1313
  this.address = new AddressClient(http);
1075
1314
  this.agents = new AgentsClient(http);
1315
+ this.demographics = new DemographicsClient(http);
1316
+ this.economics = new EconomicsClient(http);
1076
1317
  this.property = new PropertyClient(http);
1077
1318
  this.markets = new MarketsClient(http);
1078
1319
  this.intentHub = new IntentHubClient(http);
1079
1320
  this.reference = new ReferenceClient(http);
1321
+ this.internal = new InternalNamespace(http);
1080
1322
  }
1081
1323
  };
1082
1324
  // Annotate the CommonJS export names for ESM import in node:
@@ -1084,9 +1326,12 @@ var HtAgApiClient = class {
1084
1326
  AddressClient,
1085
1327
  AgentsClient,
1086
1328
  AuthenticationError,
1329
+ DemographicsClient,
1330
+ EconomicsClient,
1087
1331
  HtAgApiClient,
1088
1332
  HtAgError,
1089
1333
  IntentHubClient,
1334
+ InternalNamespace,
1090
1335
  MarketsClient,
1091
1336
  PropertyClient,
1092
1337
  RateLimitError,