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.js CHANGED
@@ -289,26 +289,6 @@ var AddressClient = class {
289
289
  constructor(http) {
290
290
  this.http = http;
291
291
  }
292
- /**
293
- * Search for addresses matching a free-text query.
294
- *
295
- * `GET /internal-api/v1/address/search`
296
- */
297
- async search(params) {
298
- const { signal, ...query } = params;
299
- const qs = buildQueryString(query);
300
- return this.http.internalGet(`/internal-api/v1/address/search${qs}`, { signal });
301
- }
302
- /**
303
- * Retrieve detailed insights for one or more addresses.
304
- *
305
- * `GET /internal-api/v1/address/insights`
306
- */
307
- async insights(params) {
308
- const { signal, ...query } = params;
309
- const qs = buildQueryString(query);
310
- return this.http.internalGet(`/internal-api/v1/address/insights${qs}`, { signal });
311
- }
312
292
  /**
313
293
  * Standardise a batch of raw address strings into structured records.
314
294
  *
@@ -352,6 +332,16 @@ var AddressClient = class {
352
332
  const qs = buildQueryString(query);
353
333
  return this.http.get(`/v1/address/demographics${qs}`, { signal });
354
334
  }
335
+ /**
336
+ * Retrieve schools relevant to an address.
337
+ *
338
+ * `GET /v1/address/schools`
339
+ */
340
+ async schools(params) {
341
+ const { signal, ...query } = params;
342
+ const qs = buildQueryString(query);
343
+ return this.http.get(`/v1/address/schools${qs}`, { signal });
344
+ }
355
345
  };
356
346
 
357
347
  // src/agents/client.ts
@@ -406,6 +396,95 @@ var AgentsClient = class {
406
396
  }
407
397
  };
408
398
 
399
+ // src/demographics/client.ts
400
+ var DemographicsClient = class {
401
+ constructor(http) {
402
+ this.http = http;
403
+ }
404
+ async censusMedians(params) {
405
+ const { signal, ...query } = params;
406
+ const qs = buildQueryString(query);
407
+ return this.http.get(`/v1/demographics/census-medians${qs}`, { signal });
408
+ }
409
+ async businessActivity(params) {
410
+ const { signal, ...query } = params;
411
+ const qs = buildQueryString(query);
412
+ return this.http.get(`/v1/demographics/business-activity${qs}`, { signal });
413
+ }
414
+ async healthcare(params) {
415
+ const { signal, ...query } = params;
416
+ const qs = buildQueryString(query);
417
+ return this.http.get(`/v1/demographics/healthcare${qs}`, { signal });
418
+ }
419
+ };
420
+
421
+ // src/economics/client.ts
422
+ var EconomicsClient = class {
423
+ /** @internal */
424
+ constructor(http) {
425
+ this.http = http;
426
+ }
427
+ /**
428
+ * Get CPI adjustment factor between two periods.
429
+ *
430
+ * `GET /v1/economics/cpi/factor`
431
+ */
432
+ async cpiFactor(params) {
433
+ const { signal, ...query } = params;
434
+ const qs = buildQueryString(query);
435
+ return this.http.get(`/v1/economics/cpi/factor${qs}`, { signal });
436
+ }
437
+ /**
438
+ * Adjust a dollar value for CPI inflation.
439
+ *
440
+ * `GET /v1/economics/cpi/adjust`
441
+ */
442
+ async cpiAdjust(params) {
443
+ const { signal, ...query } = params;
444
+ const qs = buildQueryString(query);
445
+ return this.http.get(`/v1/economics/cpi/adjust${qs}`, { signal });
446
+ }
447
+ /**
448
+ * Get CPI index time series for a region.
449
+ *
450
+ * `GET /v1/economics/cpi/series`
451
+ */
452
+ async cpiSeries(params) {
453
+ const { signal, ...query } = params ?? {};
454
+ const qs = buildQueryString(query);
455
+ return this.http.get(`/v1/economics/cpi/series${qs}`, { signal });
456
+ }
457
+ /**
458
+ * Get latest CPI index values for all regions.
459
+ *
460
+ * `GET /v1/economics/cpi/latest`
461
+ */
462
+ async cpiLatest(options) {
463
+ return this.http.get("/v1/economics/cpi/latest", options);
464
+ }
465
+ /**
466
+ * Get current RBA cash rate.
467
+ *
468
+ * `GET /v1/economics/cash-rate`
469
+ */
470
+ async cashRate(options) {
471
+ return this.http.get("/v1/economics/cash-rate", options);
472
+ }
473
+ /**
474
+ * Get RBA cash rate time series.
475
+ *
476
+ * `GET /v1/economics/cash-rate/series`
477
+ */
478
+ async cashRateSeries(params) {
479
+ const { signal, ...query } = params ?? {};
480
+ const qs = buildQueryString(query);
481
+ return this.http.get(
482
+ `/v1/economics/cash-rate/series${qs}`,
483
+ { signal }
484
+ );
485
+ }
486
+ };
487
+
409
488
  // src/property/client.ts
410
489
  var PropertyClient = class {
411
490
  /** @internal */
@@ -422,6 +501,36 @@ var PropertyClient = class {
422
501
  const qs = buildQueryString(query);
423
502
  return this.http.get(`/v1/property/sold/search${qs}`, { signal });
424
503
  }
504
+ /**
505
+ * Retrieve physical property attributes for an address.
506
+ *
507
+ * `GET /v1/property/summary`
508
+ */
509
+ async summary(params) {
510
+ const { signal, ...query } = params;
511
+ const qs = buildQueryString(query);
512
+ return this.http.get(`/v1/property/summary${qs}`, { signal });
513
+ }
514
+ /**
515
+ * Retrieve valuation estimates and transaction history for an address.
516
+ *
517
+ * `GET /v1/property/estimates`
518
+ */
519
+ async estimates(params) {
520
+ const { signal, ...query } = params;
521
+ const qs = buildQueryString(query);
522
+ return this.http.get(`/v1/property/estimates${qs}`, { signal });
523
+ }
524
+ /**
525
+ * Retrieve market position indicators for an address.
526
+ *
527
+ * `GET /v1/property/market`
528
+ */
529
+ async market(params) {
530
+ const { signal, ...query } = params;
531
+ const qs = buildQueryString(query);
532
+ return this.http.get(`/v1/property/market${qs}`, { signal });
533
+ }
425
534
  };
426
535
 
427
536
  // src/markets/trends.ts
@@ -433,10 +542,10 @@ var TrendsClient = class {
433
542
  /**
434
543
  * Price history trends.
435
544
  *
436
- * `GET /internal-api/v1/markets/trends/price`
545
+ * `GET /v1/markets/trends/price`
437
546
  */
438
547
  async price(params) {
439
- return this.trend("price", params);
548
+ return this.publicTrend("price", params);
440
549
  }
441
550
  /**
442
551
  * Rent history trends.
@@ -454,37 +563,21 @@ var TrendsClient = class {
454
563
  async yieldHistory(params) {
455
564
  return this.publicTrend("yield", params);
456
565
  }
457
- /**
458
- * Supply and demand (monthly frequency).
459
- *
460
- * `GET /internal-api/v1/markets/trends/supply-demand`
461
- */
462
- async supplyDemand(params) {
463
- return this.trend("supply-demand", params);
464
- }
465
566
  /**
466
567
  * Search interest index (quarterly frequency).
467
568
  *
468
- * `GET /internal-api/v1/markets/trends/search-index`
569
+ * `GET /v1/markets/trends/search-index`
469
570
  */
470
571
  async searchIndex(params) {
471
- return this.trend("search-index", params);
572
+ return this.publicTrend("search-index", params);
472
573
  }
473
574
  /**
474
575
  * Hold period (yearly frequency).
475
576
  *
476
- * `GET /internal-api/v1/markets/trends/hold-period`
577
+ * `GET /v1/markets/trends/hold-period`
477
578
  */
478
579
  async holdPeriod(params) {
479
- return this.trend("hold-period", params);
480
- }
481
- /**
482
- * Performance essentials.
483
- *
484
- * `GET /internal-api/v1/markets/trends/performance`
485
- */
486
- async performance(params) {
487
- return this.trend("performance", params);
580
+ return this.publicTrend("hold-period", params);
488
581
  }
489
582
  /**
490
583
  * Growth rate cycle.
@@ -545,14 +638,6 @@ var TrendsClient = class {
545
638
  // -----------------------------------------------------------------------
546
639
  // Shared implementation
547
640
  // -----------------------------------------------------------------------
548
- async trend(metric, params) {
549
- const { signal, ...query } = params;
550
- const qs = buildQueryString(query);
551
- return this.http.internalGet(
552
- `/internal-api/v1/markets/trends/${metric}${qs}`,
553
- { signal }
554
- );
555
- }
556
641
  async publicTrend(metric, params) {
557
642
  const { signal, ...query } = params;
558
643
  const qs = buildQueryString(query);
@@ -573,33 +658,15 @@ var MarketsClient = class {
573
658
  /** Sub-client for time-series trend endpoints. */
574
659
  trends;
575
660
  /**
576
- * Retrieve market snapshot data with optional filters.
661
+ * Core market headline metrics.
577
662
  *
578
- * `GET /internal-api/v1/markets/snapshots`
663
+ * `GET /v1/markets/summary`
579
664
  */
580
- async snapshots(params) {
665
+ async summary(params) {
581
666
  const { signal, ...query } = params;
582
667
  const qs = buildQueryString(query);
583
- return this.http.internalGet(
584
- `/internal-api/v1/markets/snapshots${qs}`,
585
- { signal }
586
- );
587
- }
588
- /**
589
- * Advanced market query with logical filter expressions.
590
- *
591
- * `POST /internal-api/v1/markets/query`
592
- */
593
- async query(body, options) {
594
- return this.http.internalPost(
595
- "/internal-api/v1/markets/query",
596
- body,
597
- options
598
- );
668
+ return this.http.get(`/v1/markets/summary${qs}`, { signal });
599
669
  }
600
- // -------------------------------------------------------------------------
601
- // Public market snapshot endpoints (/v1/markets/*)
602
- // -------------------------------------------------------------------------
603
670
  /**
604
671
  * Cumulative growth metrics.
605
672
  *
@@ -982,6 +1049,169 @@ var ReferenceClient = class {
982
1049
  const qs = buildQueryString(query);
983
1050
  return this.http.get(`/v1/reference/lga${qs}`, { signal });
984
1051
  }
1052
+ // -- Concordance endpoints --
1053
+ async concordanceSa2ToLocality(params) {
1054
+ const { signal, ...query } = params;
1055
+ const qs = buildQueryString(query);
1056
+ return this.http.get(`/v1/reference/concordance/sa2-to-locality${qs}`, { signal });
1057
+ }
1058
+ async concordanceLocalityToSa2(params) {
1059
+ const { signal, ...query } = params;
1060
+ const qs = buildQueryString(query);
1061
+ return this.http.get(`/v1/reference/concordance/locality-to-sa2${qs}`, { signal });
1062
+ }
1063
+ async concordanceLgaCodeToLga(params) {
1064
+ const { signal, ...query } = params;
1065
+ const qs = buildQueryString(query);
1066
+ return this.http.get(`/v1/reference/concordance/lga-code-to-lga${qs}`, { signal });
1067
+ }
1068
+ async concordancePostcodeToLocality(params) {
1069
+ const { signal, ...query } = params;
1070
+ const qs = buildQueryString(query);
1071
+ return this.http.get(`/v1/reference/concordance/postcode-to-locality${qs}`, { signal });
1072
+ }
1073
+ async concordanceLocalityToLga(params) {
1074
+ const { signal, ...query } = params;
1075
+ const qs = buildQueryString(query);
1076
+ return this.http.get(`/v1/reference/concordance/locality-to-lga${qs}`, { signal });
1077
+ }
1078
+ async concordanceLgaToLocalities(params) {
1079
+ const { signal, ...query } = params;
1080
+ const qs = buildQueryString(query);
1081
+ return this.http.get(`/v1/reference/concordance/lga-to-localities${qs}`, { signal });
1082
+ }
1083
+ async concordanceSalToLocality(params) {
1084
+ const { signal, ...query } = params;
1085
+ const qs = buildQueryString(query);
1086
+ return this.http.get(`/v1/reference/concordance/sal-to-locality${qs}`, { signal });
1087
+ }
1088
+ };
1089
+
1090
+ // src/internal.ts
1091
+ var InternalAddressClient = class {
1092
+ /** @internal */
1093
+ constructor(http) {
1094
+ this.http = http;
1095
+ }
1096
+ /**
1097
+ * Search for addresses matching a free-text query.
1098
+ *
1099
+ * `GET /internal-api/v1/address/search`
1100
+ */
1101
+ async search(params) {
1102
+ const { signal, ...query } = params;
1103
+ const qs = buildQueryString(query);
1104
+ return this.http.internalGet(`/internal-api/v1/address/search${qs}`, { signal });
1105
+ }
1106
+ /**
1107
+ * Retrieve detailed insights for one or more addresses.
1108
+ *
1109
+ * `GET /internal-api/v1/address/insights`
1110
+ */
1111
+ async insights(params) {
1112
+ const { signal, ...query } = params;
1113
+ const qs = buildQueryString(query);
1114
+ return this.http.internalGet(`/internal-api/v1/address/insights${qs}`, { signal });
1115
+ }
1116
+ };
1117
+ var InternalPropertyClient = class {
1118
+ /** @internal */
1119
+ constructor(http) {
1120
+ this.http = http;
1121
+ }
1122
+ /**
1123
+ * Retrieve automated property valuations (AVM).
1124
+ *
1125
+ * `GET /internal-api/v1/property/avm`
1126
+ */
1127
+ async avm(params) {
1128
+ const { signal, ...rest } = params;
1129
+ const q = {};
1130
+ if (rest.addressKey?.length) q.address_key = rest.addressKey.join(",");
1131
+ if (rest.address?.length) q.address = rest.address.join(",");
1132
+ const qs = buildQueryString(q);
1133
+ return this.http.internalGet(`/internal-api/v1/property/avm${qs}`, { signal });
1134
+ }
1135
+ };
1136
+ var InternalTrendsClient = class {
1137
+ /** @internal */
1138
+ constructor(http) {
1139
+ this.http = http;
1140
+ }
1141
+ /**
1142
+ * Supply and demand (monthly frequency).
1143
+ *
1144
+ * `GET /internal-api/v1/markets/trends/supply-demand`
1145
+ */
1146
+ async supplyDemand(params) {
1147
+ const { signal, ...query } = params;
1148
+ const qs = buildQueryString(query);
1149
+ return this.http.internalGet(
1150
+ `/internal-api/v1/markets/trends/supply-demand${qs}`,
1151
+ { signal }
1152
+ );
1153
+ }
1154
+ /**
1155
+ * Performance essentials.
1156
+ *
1157
+ * `GET /internal-api/v1/markets/trends/performance`
1158
+ */
1159
+ async performance(params) {
1160
+ const { signal, ...query } = params;
1161
+ const qs = buildQueryString(query);
1162
+ return this.http.internalGet(
1163
+ `/internal-api/v1/markets/trends/performance${qs}`,
1164
+ { signal }
1165
+ );
1166
+ }
1167
+ };
1168
+ var InternalMarketsClient = class {
1169
+ /** @internal */
1170
+ constructor(http) {
1171
+ this.http = http;
1172
+ this.trends = new InternalTrendsClient(http);
1173
+ }
1174
+ /** Sub-client for internal trend endpoints. */
1175
+ trends;
1176
+ /**
1177
+ * Retrieve market snapshot data with optional filters.
1178
+ *
1179
+ * `GET /internal-api/v1/markets/snapshots`
1180
+ */
1181
+ async snapshots(params) {
1182
+ const { signal, ...query } = params;
1183
+ const qs = buildQueryString(query);
1184
+ return this.http.internalGet(
1185
+ `/internal-api/v1/markets/snapshots${qs}`,
1186
+ { signal }
1187
+ );
1188
+ }
1189
+ /**
1190
+ * Advanced market query with logical filter expressions.
1191
+ *
1192
+ * `POST /internal-api/v1/markets/query`
1193
+ */
1194
+ async query(body, options) {
1195
+ return this.http.internalPost(
1196
+ "/internal-api/v1/markets/query",
1197
+ body,
1198
+ options
1199
+ );
1200
+ }
1201
+ };
1202
+ var InternalNamespace = class {
1203
+ /** Internal address endpoints (search, insights). */
1204
+ address;
1205
+ /** Internal property endpoints (AVM). */
1206
+ property;
1207
+ /** Internal market endpoints (snapshots, query, trends). */
1208
+ markets;
1209
+ /** @internal */
1210
+ constructor(http) {
1211
+ this.address = new InternalAddressClient(http);
1212
+ this.property = new InternalPropertyClient(http);
1213
+ this.markets = new InternalMarketsClient(http);
1214
+ }
985
1215
  };
986
1216
 
987
1217
  // src/client.ts
@@ -999,7 +1229,7 @@ function resolveBaseUrls(options) {
999
1229
  publicBaseUrl: base,
1000
1230
  internalBaseUrl: base,
1001
1231
  intentHubBaseUrl: `${base}/intent-hub/v1`,
1002
- agentsBaseUrl: `${base}/micro-agents`
1232
+ agentsBaseUrl: `https://agent.${env}.htagai.com/micro-agents`
1003
1233
  };
1004
1234
  }
1005
1235
  var HtAgApiClient = class {
@@ -1007,6 +1237,10 @@ var HtAgApiClient = class {
1007
1237
  address;
1008
1238
  /** AI-powered property investment agents. */
1009
1239
  agents;
1240
+ /** Demographics: census medians, business activity, healthcare. */
1241
+ demographics;
1242
+ /** CPI adjustment utilities and RBA cash rate data. */
1243
+ economics;
1010
1244
  /** Sold property search. */
1011
1245
  property;
1012
1246
  /** Market snapshots, advanced queries and time-series trends. */
@@ -1015,6 +1249,8 @@ var HtAgApiClient = class {
1015
1249
  intentHub;
1016
1250
  /** Reference data: localities and LGAs. */
1017
1251
  reference;
1252
+ /** Internal API methods (requires `internal_api` scope). */
1253
+ internal;
1018
1254
  constructor(options) {
1019
1255
  if (!options.apiKey) {
1020
1256
  throw new Error(
@@ -1035,19 +1271,25 @@ var HtAgApiClient = class {
1035
1271
  const http = new HttpClient(config);
1036
1272
  this.address = new AddressClient(http);
1037
1273
  this.agents = new AgentsClient(http);
1274
+ this.demographics = new DemographicsClient(http);
1275
+ this.economics = new EconomicsClient(http);
1038
1276
  this.property = new PropertyClient(http);
1039
1277
  this.markets = new MarketsClient(http);
1040
1278
  this.intentHub = new IntentHubClient(http);
1041
1279
  this.reference = new ReferenceClient(http);
1280
+ this.internal = new InternalNamespace(http);
1042
1281
  }
1043
1282
  };
1044
1283
  export {
1045
1284
  AddressClient,
1046
1285
  AgentsClient,
1047
1286
  AuthenticationError,
1287
+ DemographicsClient,
1288
+ EconomicsClient,
1048
1289
  HtAgApiClient,
1049
1290
  HtAgError,
1050
1291
  IntentHubClient,
1292
+ InternalNamespace,
1051
1293
  MarketsClient,
1052
1294
  PropertyClient,
1053
1295
  RateLimitError,