@land-catalyst/batch-data-sdk 1.1.12
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/LICENSE +22 -0
- package/README.md +1032 -0
- package/dist/builders.d.ts +821 -0
- package/dist/builders.js +2622 -0
- package/dist/client.d.ts +435 -0
- package/dist/client.interface.d.ts +210 -0
- package/dist/client.interface.js +2 -0
- package/dist/client.js +757 -0
- package/dist/errors.d.ts +10 -0
- package/dist/errors.js +19 -0
- package/dist/index.d.ts +13 -0
- package/dist/index.js +28 -0
- package/dist/logger.interface.d.ts +19 -0
- package/dist/logger.interface.js +47 -0
- package/dist/types.d.ts +1738 -0
- package/dist/types.js +9 -0
- package/package.json +62 -0
package/dist/errors.d.ts
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Custom exception for when property search results exceed the configured limit
|
|
3
|
+
*/
|
|
4
|
+
export declare class PropertyCountLimitExceededError extends Error {
|
|
5
|
+
readonly count: number;
|
|
6
|
+
readonly limit: number;
|
|
7
|
+
readonly searchCriteria: any;
|
|
8
|
+
readonly limitType: "sync" | "async";
|
|
9
|
+
constructor(count: number, limit: number, searchCriteria: any, limitType?: "sync" | "async");
|
|
10
|
+
}
|
package/dist/errors.js
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PropertyCountLimitExceededError = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Custom exception for when property search results exceed the configured limit
|
|
6
|
+
*/
|
|
7
|
+
class PropertyCountLimitExceededError extends Error {
|
|
8
|
+
constructor(count, limit, searchCriteria, limitType = "sync") {
|
|
9
|
+
const limitTypeLabel = limitType === "async" ? "async (subscription)" : "sync (search/preview)";
|
|
10
|
+
super(`Property search returned ${count} results, which exceeds the configured ${limitTypeLabel} limit of ${limit}. ` +
|
|
11
|
+
`Please refine your search criteria to reduce the number of matching properties.`);
|
|
12
|
+
this.count = count;
|
|
13
|
+
this.limit = limit;
|
|
14
|
+
this.searchCriteria = searchCriteria;
|
|
15
|
+
this.limitType = limitType;
|
|
16
|
+
this.name = "PropertyCountLimitExceededError";
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
exports.PropertyCountLimitExceededError = PropertyCountLimitExceededError;
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @batchdata/sdk
|
|
3
|
+
*
|
|
4
|
+
* TypeScript SDK for BatchData.io Property API
|
|
5
|
+
* Complete type definitions, fluent query builders, and utilities
|
|
6
|
+
*/
|
|
7
|
+
export * from "./types";
|
|
8
|
+
export * from "./builders";
|
|
9
|
+
export * from "./errors";
|
|
10
|
+
export * from "./client";
|
|
11
|
+
export * from "./client.interface";
|
|
12
|
+
export * from "./logger.interface";
|
|
13
|
+
export type { RequestMiddleware, ResponseMiddleware, ErrorMiddleware, HttpMiddleware, } from "./client";
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* @batchdata/sdk
|
|
4
|
+
*
|
|
5
|
+
* TypeScript SDK for BatchData.io Property API
|
|
6
|
+
* Complete type definitions, fluent query builders, and utilities
|
|
7
|
+
*/
|
|
8
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
9
|
+
if (k2 === undefined) k2 = k;
|
|
10
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
11
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
12
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
13
|
+
}
|
|
14
|
+
Object.defineProperty(o, k2, desc);
|
|
15
|
+
}) : (function(o, m, k, k2) {
|
|
16
|
+
if (k2 === undefined) k2 = k;
|
|
17
|
+
o[k2] = m[k];
|
|
18
|
+
}));
|
|
19
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
20
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
21
|
+
};
|
|
22
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
23
|
+
__exportStar(require("./types"), exports);
|
|
24
|
+
__exportStar(require("./builders"), exports);
|
|
25
|
+
__exportStar(require("./errors"), exports);
|
|
26
|
+
__exportStar(require("./client"), exports);
|
|
27
|
+
__exportStar(require("./client.interface"), exports);
|
|
28
|
+
__exportStar(require("./logger.interface"), exports);
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Simple logger interface for the BatchData client
|
|
3
|
+
* Allows consumers to provide their own logging implementation
|
|
4
|
+
*/
|
|
5
|
+
export interface ILogger {
|
|
6
|
+
debug(message: string, meta?: any): void;
|
|
7
|
+
info(message: string, meta?: any): void;
|
|
8
|
+
warn(message: string, meta?: any): void;
|
|
9
|
+
error(message: string, error?: Error, meta?: any): void;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Console logger implementation (default)
|
|
13
|
+
*/
|
|
14
|
+
export declare class ConsoleLogger implements ILogger {
|
|
15
|
+
debug(message: string, meta?: any): void;
|
|
16
|
+
info(message: string, meta?: any): void;
|
|
17
|
+
warn(message: string, meta?: any): void;
|
|
18
|
+
error(message: string, error?: Error, meta?: any): void;
|
|
19
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ConsoleLogger = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Console logger implementation (default)
|
|
6
|
+
*/
|
|
7
|
+
class ConsoleLogger {
|
|
8
|
+
debug(message, meta) {
|
|
9
|
+
if (meta) {
|
|
10
|
+
console.debug(`[DEBUG] ${message}`, meta);
|
|
11
|
+
}
|
|
12
|
+
else {
|
|
13
|
+
console.debug(`[DEBUG] ${message}`);
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
info(message, meta) {
|
|
17
|
+
if (meta) {
|
|
18
|
+
console.info(`[INFO] ${message}`, meta);
|
|
19
|
+
}
|
|
20
|
+
else {
|
|
21
|
+
console.info(`[INFO] ${message}`);
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
warn(message, meta) {
|
|
25
|
+
if (meta) {
|
|
26
|
+
console.warn(`[WARN] ${message}`, meta);
|
|
27
|
+
}
|
|
28
|
+
else {
|
|
29
|
+
console.warn(`[WARN] ${message}`);
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
error(message, error, meta) {
|
|
33
|
+
if (error && meta) {
|
|
34
|
+
console.error(`[ERROR] ${message}`, error, meta);
|
|
35
|
+
}
|
|
36
|
+
else if (error) {
|
|
37
|
+
console.error(`[ERROR] ${message}`, error);
|
|
38
|
+
}
|
|
39
|
+
else if (meta) {
|
|
40
|
+
console.error(`[ERROR] ${message}`, meta);
|
|
41
|
+
}
|
|
42
|
+
else {
|
|
43
|
+
console.error(`[ERROR] ${message}`);
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
exports.ConsoleLogger = ConsoleLogger;
|