@talocode/sdk 0.1.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.
Files changed (63) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +65 -0
  3. package/dist/agent-browser.d.ts +11 -0
  4. package/dist/agent-browser.js +40 -0
  5. package/dist/agent-browser.js.map +1 -0
  6. package/dist/cliploop.d.ts +17 -0
  7. package/dist/cliploop.js +56 -0
  8. package/dist/cliploop.js.map +1 -0
  9. package/dist/codra.d.ts +12 -0
  10. package/dist/codra.js +47 -0
  11. package/dist/codra.js.map +1 -0
  12. package/dist/crawlerlane.d.ts +115 -0
  13. package/dist/crawlerlane.js +93 -0
  14. package/dist/crawlerlane.js.map +1 -0
  15. package/dist/errors.d.ts +24 -0
  16. package/dist/errors.js +58 -0
  17. package/dist/errors.js.map +1 -0
  18. package/dist/forgecad.d.ts +139 -0
  19. package/dist/forgecad.js +49 -0
  20. package/dist/forgecad.js.map +1 -0
  21. package/dist/index.d.ts +170 -0
  22. package/dist/index.js +178 -0
  23. package/dist/index.js.map +1 -0
  24. package/dist/invoicelane.d.ts +53 -0
  25. package/dist/invoicelane.js +45 -0
  26. package/dist/invoicelane.js.map +1 -0
  27. package/dist/opensourcelane.d.ts +135 -0
  28. package/dist/opensourcelane.js +101 -0
  29. package/dist/opensourcelane.js.map +1 -0
  30. package/dist/placeholders.d.ts +9 -0
  31. package/dist/placeholders.js +23 -0
  32. package/dist/placeholders.js.map +1 -0
  33. package/dist/replylane.d.ts +113 -0
  34. package/dist/replylane.js +83 -0
  35. package/dist/replylane.js.map +1 -0
  36. package/dist/request.d.ts +7 -0
  37. package/dist/request.js +77 -0
  38. package/dist/request.js.map +1 -0
  39. package/dist/router.d.ts +12 -0
  40. package/dist/router.js +44 -0
  41. package/dist/router.js.map +1 -0
  42. package/dist/signallane.d.ts +76 -0
  43. package/dist/signallane.js +45 -0
  44. package/dist/signallane.js.map +1 -0
  45. package/dist/skills.d.ts +19 -0
  46. package/dist/skills.js +48 -0
  47. package/dist/skills.js.map +1 -0
  48. package/dist/talocode.d.ts +51 -0
  49. package/dist/talocode.js +82 -0
  50. package/dist/talocode.js.map +1 -0
  51. package/dist/tera.d.ts +15 -0
  52. package/dist/tera.js +65 -0
  53. package/dist/tera.js.map +1 -0
  54. package/dist/types.d.ts +398 -0
  55. package/dist/types.js +4 -0
  56. package/dist/types.js.map +1 -0
  57. package/dist/ugclane.d.ts +105 -0
  58. package/dist/ugclane.js +93 -0
  59. package/dist/ugclane.js.map +1 -0
  60. package/dist/webdatalane.d.ts +74 -0
  61. package/dist/webdatalane.js +63 -0
  62. package/dist/webdatalane.js.map +1 -0
  63. package/package.json +49 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Talocode
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,65 @@
1
+ # @talocode/sdk
2
+
3
+ **Talocode Cloud SDK** — typed access to all Talocode product APIs through one client.
4
+
5
+ ```bash
6
+ npm install @talocode/sdk
7
+ ```
8
+
9
+ ## Quick start
10
+
11
+ ```ts
12
+ import { Talocode } from '@talocode/sdk'
13
+
14
+ const talocode = new Talocode({
15
+ apiKey: process.env.TALOCODE_API_KEY,
16
+ baseUrl: 'https://api.talocode.site',
17
+ })
18
+
19
+ const health = await talocode.replylane.health()
20
+ const score = await talocode.replylane.opportunity.score({
21
+ tweetText: 'We tested reply timing across 50 accounts.',
22
+ authorHandle: 'builder',
23
+ authorFollowers: 8000,
24
+ yourFollowers: 800,
25
+ ageMinutes: 5,
26
+ })
27
+ ```
28
+
29
+ ## Products
30
+
31
+ | Namespace | Product |
32
+ |-----------|---------|
33
+ | `talocode.tera` | Tera writing/coding |
34
+ | `talocode.router` | Model router |
35
+ | `talocode.agentBrowser` | Agent Browser |
36
+ | `talocode.cliploop` | ClipLoop |
37
+ | `talocode.codra` | Codra |
38
+ | `talocode.skills` | Talocode Skills |
39
+ | `talocode.invoicelane` | InvoiceLane |
40
+ | `talocode.webdatalane` | WebDataLane |
41
+ | `talocode.signallane` | SignalLane |
42
+ | `talocode.ugclane` | UGCLane |
43
+ | `talocode.crawlerlane` | CrawlerLane |
44
+ | `talocode.opensourcelane` | OpenSourceLane |
45
+ | `talocode.forgecad` | ForgeCAD |
46
+ | `talocode.replylane` | ReplyLane |
47
+
48
+ ## Auth
49
+
50
+ ```bash
51
+ export TALOCODE_API_KEY=tc_your_key
52
+ export TALOCODE_BASE_URL=https://api.talocode.site
53
+ ```
54
+
55
+ ## Legacy Stacklane client
56
+
57
+ ```ts
58
+ import { createStacklaneClient, Talocode } from '@talocode/sdk'
59
+ ```
60
+
61
+ ## License
62
+
63
+ MIT — [Talocode](https://talocode.site)
64
+
65
+ Sponsor: https://github.com/sponsors/Abdulmuiz44
@@ -0,0 +1,11 @@
1
+ import type { AgentBrowserCheckInput, AgentBrowserCheckResult, AgentBrowserScreenshotInput, AgentBrowserScreenshotResult, AgentBrowserTraceReportInput, AgentBrowserTraceReportResult } from './types';
2
+ export declare class AgentBrowserClient {
3
+ private baseUrl;
4
+ private apiKey;
5
+ private timeoutMs;
6
+ constructor(baseUrl: string, apiKey: string | undefined, timeoutMs: number);
7
+ private getNamespacePath;
8
+ check(input: AgentBrowserCheckInput): Promise<AgentBrowserCheckResult>;
9
+ screenshot(input: AgentBrowserScreenshotInput): Promise<AgentBrowserScreenshotResult>;
10
+ traceReport(input: AgentBrowserTraceReportInput): Promise<AgentBrowserTraceReportResult>;
11
+ }
@@ -0,0 +1,40 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.AgentBrowserClient = void 0;
4
+ const request_1 = require("./request");
5
+ class AgentBrowserClient {
6
+ baseUrl;
7
+ apiKey;
8
+ timeoutMs;
9
+ constructor(baseUrl, apiKey, timeoutMs) {
10
+ this.baseUrl = baseUrl;
11
+ this.apiKey = apiKey;
12
+ this.timeoutMs = timeoutMs;
13
+ }
14
+ getNamespacePath(path) {
15
+ return `/v1/agent-browser${path}`;
16
+ }
17
+ async check(input) {
18
+ return (0, request_1.request)(this.baseUrl, this.getNamespacePath('/check'), this.apiKey, {
19
+ method: 'POST',
20
+ body: input,
21
+ timeoutMs: this.timeoutMs,
22
+ });
23
+ }
24
+ async screenshot(input) {
25
+ return (0, request_1.request)(this.baseUrl, this.getNamespacePath('/screenshot'), this.apiKey, {
26
+ method: 'POST',
27
+ body: input,
28
+ timeoutMs: this.timeoutMs,
29
+ });
30
+ }
31
+ async traceReport(input) {
32
+ return (0, request_1.request)(this.baseUrl, this.getNamespacePath('/trace-report'), this.apiKey, {
33
+ method: 'POST',
34
+ body: input,
35
+ timeoutMs: this.timeoutMs,
36
+ });
37
+ }
38
+ }
39
+ exports.AgentBrowserClient = AgentBrowserClient;
40
+ //# sourceMappingURL=agent-browser.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"agent-browser.js","sourceRoot":"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,gDAsCC"}
@@ -0,0 +1,17 @@
1
+ import type { ClipLoopBriefInput, ClipLoopBriefResult, ClipLoopScriptInput, ClipLoopScriptResult, ClipLoopVideoRenderInput, ClipLoopVideoRenderResult, ClipLoopCampaignCreateInput, ClipLoopCampaignResult } from './types';
2
+ export declare class ClipLoopClient {
3
+ private baseUrl;
4
+ private apiKey;
5
+ private timeoutMs;
6
+ constructor(baseUrl: string, apiKey: string | undefined, timeoutMs: number);
7
+ private getNamespacePath;
8
+ brief(input: ClipLoopBriefInput): Promise<ClipLoopBriefResult>;
9
+ script(input: ClipLoopScriptInput): Promise<ClipLoopScriptResult>;
10
+ render(input: ClipLoopVideoRenderInput): Promise<ClipLoopVideoRenderResult>;
11
+ campaign: {
12
+ create: (input: ClipLoopCampaignCreateInput) => Promise<ClipLoopCampaignResult>;
13
+ package: (input: {
14
+ campaignId: string;
15
+ }) => Promise<ClipLoopCampaignResult>;
16
+ };
17
+ }
@@ -0,0 +1,56 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ClipLoopClient = void 0;
4
+ const request_1 = require("./request");
5
+ class ClipLoopClient {
6
+ baseUrl;
7
+ apiKey;
8
+ timeoutMs;
9
+ constructor(baseUrl, apiKey, timeoutMs) {
10
+ this.baseUrl = baseUrl;
11
+ this.apiKey = apiKey;
12
+ this.timeoutMs = timeoutMs;
13
+ }
14
+ getNamespacePath(path) {
15
+ return `/v1/cliploop${path}`;
16
+ }
17
+ async brief(input) {
18
+ return (0, request_1.request)(this.baseUrl, this.getNamespacePath('/brief/generate'), this.apiKey, {
19
+ method: 'POST',
20
+ body: input,
21
+ timeoutMs: this.timeoutMs,
22
+ });
23
+ }
24
+ async script(input) {
25
+ return (0, request_1.request)(this.baseUrl, this.getNamespacePath('/script/generate'), this.apiKey, {
26
+ method: 'POST',
27
+ body: input,
28
+ timeoutMs: this.timeoutMs,
29
+ });
30
+ }
31
+ async render(input) {
32
+ return (0, request_1.request)(this.baseUrl, this.getNamespacePath('/video/render'), this.apiKey, {
33
+ method: 'POST',
34
+ body: input,
35
+ timeoutMs: this.timeoutMs,
36
+ });
37
+ }
38
+ campaign = {
39
+ create: async (input) => {
40
+ return (0, request_1.request)(this.baseUrl, this.getNamespacePath('/campaign/create'), this.apiKey, {
41
+ method: 'POST',
42
+ body: input,
43
+ timeoutMs: this.timeoutMs,
44
+ });
45
+ },
46
+ package: async (input) => {
47
+ return (0, request_1.request)(this.baseUrl, this.getNamespacePath('/campaign/package'), this.apiKey, {
48
+ method: 'POST',
49
+ body: input,
50
+ timeoutMs: this.timeoutMs,
51
+ });
52
+ },
53
+ };
54
+ }
55
+ exports.ClipLoopClient = ClipLoopClient;
56
+ //# sourceMappingURL=cliploop.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cliploop.js","sourceRoot":"","sources":["../src/cliploop.ts"],"names":[],"mappings":";;;AAAA,uCAAmC;AAYnC,MAAa,cAAc;IACjB,OAAO,CAAQ;IACf,MAAM,CAAoB;IAC1B,SAAS,CAAQ;IAEzB,YAAY,OAAe,EAAE,MAA0B,EAAE,SAAiB;QACxE,IAAI,CAAC,OAAO,GAAG,OAAO,CAAA;QACtB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAA;QACpB,IAAI,CAAC,SAAS,GAAG,SAAS,CAAA;IAC5B,CAAC;IAEO,gBAAgB,CAAC,IAAY;QACnC,OAAO,eAAe,IAAI,EAAE,CAAA;IAC9B,CAAC;IAED,KAAK,CAAC,KAAK,CAAC,KAAyB;QACnC,OAAO,IAAA,iBAAO,EAAC,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC,gBAAgB,CAAC,iBAAiB,CAAC,EAAE,IAAI,CAAC,MAAM,EAAE;YAClF,MAAM,EAAE,MAAM;YACd,IAAI,EAAE,KAAK;YACX,SAAS,EAAE,IAAI,CAAC,SAAS;SAC1B,CAAiC,CAAA;IACpC,CAAC;IAED,KAAK,CAAC,MAAM,CAAC,KAA0B;QACrC,OAAO,IAAA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odraReviewResult, CodraPlanInput, CodraPlanResult, CodraSuccessResponse } from './types';
2
+ export declare class CodraClient {
3
+ private baseUrl;
4
+ private apiKey;
5
+ private timeoutMs;
6
+ constructor(baseUrl: string, apiKey: string | undefined, timeoutMs: number);
7
+ private getNamespacePath;
8
+ repoSummary(input: CodraRepoSummaryInput): Promise<CodraSuccessResponse<CodraRepoSummaryResult>>;
9
+ explain(input: CodraExplainInput): Promise<CodraSuccessResponse<CodraExplainResult>>;
10
+ review(input: CodraReviewInput): Promise<CodraSuccessResponse<CodraReviewResult>>;
11
+ plan(input: CodraPlanInput): Promise<CodraSuccessResponse<CodraPlanResult>>;
12
+ }
package/dist/codra.js ADDED
@@ -0,0 +1,47 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.CodraClient = void 0;
4
+ const request_1 = require("./request");
5
+ class CodraClient {
6
+ baseUrl;
7
+ apiKey;
8
+ timeoutMs;
9
+ constructor(baseUrl, apiKey, timeoutMs) {
10
+ this.baseUrl = baseUrl;
11
+ this.apiKey = apiKey;
12
+ this.timeoutMs = timeoutMs;
13
+ }
14
+ getNamespacePath(path) {
15
+ return `/v1/codra${path}`;
16
+ }
17
+ async repoSummary(input) {
18
+ return (0, request_1.request)(this.baseUrl, this.getNamespacePath('/repo-summary'), this.apiKey, {
19
+ method: 'POST',
20
+ body: input,
21
+ timeoutMs: this.timeoutMs,
22
+ });
23
+ }
24
+ async explain(input) {
25
+ return (0, request_1.request)(this.baseUrl, this.getNamespacePath('/explain'), this.apiKey, {
26
+ method: 'POST',
27
+ body: input,
28
+ timeoutMs: this.timeoutMs,
29
+ });
30
+ }
31
+ async review(input) {
32
+ return (0, request_1.request)(this.baseUrl, this.getNamespacePath('/review'), this.apiKey, {
33
+ method: 'POST',
34
+ body: input,
35
+ timeoutMs: this.timeoutMs,
36
+ });
37
+ }
38
+ async plan(input) {
39
+ return (0, request_1.request)(this.baseUrl, this.getNamespacePath('/plan'), this.apiKey, {
40
+ method: 'POST',
41
+ body: input,
42
+ timeoutMs: this.timeoutMs,
43
+ });
44
+ }
45
+ }
46
+ exports.CodraClient = CodraClient;
47
+ //# sourceMappingURL=codra.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"codra.js","sourceRoot":"","sources":["../src/codra.ts"],"names":[],"mappings":";;;AAAA,uCAAmC;AAanC,MAAa,WAAW;IACd,OAAO,CAAQ;IACf,MAAM,CAAoB;IAC1B,SAAS,CAAQ;IAEzB,YAAY,OAAe,EAAE,MAA0B,EAAE,SAAiB;QACxE,IAAI,CAAC,OAAO,GAAG,OAAO,CAAA;QACtB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAA;QACpB,IAAI,CAAC,SAAS,GAAG,SAAS,CAAA;IAC5B,CAAC;IAEO,gBAAgB,CAAC,IAAY;QACnC,OAAO,YAAY,IAAI,EAAE,CAAA;IAC3B,CAAC;IAED,KAAK,CAAC,WAAW,CACf,KAA4B;QAE5B,OAAO,IAAA,iBAAO,EACZ,IAAI,CAAC,OAAO,EACZ,IAAI,CAAC,gBAAgB,CAAC,eAAe,CAAC,EACtC,IAAI,CAAC,MAAM,EACX;YACE,MAAM,EAAE,MAAM;YACd,IAAI,EAAE,KAAK;YACX,SAAS,EAAE,IAAI,CAAC,SAAS;SAC1B,CACuD,CAAA;IAC5D,CAAC;IAED,KAAK,CAAC,OAAO,CACX,KAAwB;QAExB,OAAO,IAAA,iBAAO,EACZ,IAAI,CAAC,OAAO,EACZ,IAAI,CAAC,gBAAgB,CAAC,UAAU,CAAC,EACjC,IAAI,CAAC,MAAM,EACX;YACE,MAAM,EAAE,MAAM;YACd,IAAI,EAAE,KAAK;YACX,SAAS,EAAE,IAAI,CAAC,SAAS;SAC1B,CACmD,CAAA;IACxD,CAAC;IAED,KAAK,CAAC,MAAM,CACV,KAAuB;QAEvB,OAAO,IAAA,iBAAO,EACZ,IAAI,CAAC,OAAO,EACZ,IAAI,CAAC,gBAAgB,CAAC,SAAS,CAAC,EAChC,IAAI,CAAC,MAAM,EACX;YACE,MAAM,EAAE,MAAM;YACd,IAAI,EAAE,KAAK;YACX,SAAS,EAAE,IAAI,CAAC,SAAS;SAC1B,CACkD,CAAA;IACvD,CAAC;IAED,KAAK,CAAC,IAAI,CACR,KAAqB;QAErB,OAAO,IAAA,iBAAO,EACZ,IAAI,CAAC,OAAO,EACZ,IAAI,CAAC,gBAAgB,CAAC,OAAO,CAAC,EAC9B,IAAI,CAAC,MAAM,EACX;YACE,MAAM,EAAE,MAAM;YACd,IAAI,EAAE,KAAK;YACX,SAAS,EAAE,IAAI,CAAC,SAAS;SAC1B,CACgD,CAAA;IACrD,CAAC;CACF;AA1ED,kCA0EC"}
@@ -0,0 +1,115 @@
1
+ import { TalocodeApiClient } from './talocode.js';
2
+ export interface CrawlerLaneLogEvent {
3
+ timestamp: string;
4
+ method: string;
5
+ path: string;
6
+ status: number;
7
+ userAgent: string;
8
+ referer?: string;
9
+ ip?: string;
10
+ host?: string;
11
+ }
12
+ export interface CrawlerLanePrivacyOptions {
13
+ redactIps?: boolean;
14
+ }
15
+ export interface CrawlerLaneIngestInput {
16
+ domain: string;
17
+ logs: CrawlerLaneLogEvent[] | string;
18
+ privacy?: CrawlerLanePrivacyOptions;
19
+ }
20
+ export interface CrawlerLaneClassifyInput {
21
+ userAgent: string;
22
+ ip?: string;
23
+ path?: string;
24
+ status?: number;
25
+ }
26
+ export interface CrawlerLaneAnalyzePagesInput {
27
+ domain: string;
28
+ logs: CrawlerLaneLogEvent[] | string;
29
+ importantPages?: string[];
30
+ privacy?: CrawlerLanePrivacyOptions;
31
+ }
32
+ export interface CrawlerLaneAnalyze404Input {
33
+ domain: string;
34
+ logs: CrawlerLaneLogEvent[] | string;
35
+ privacy?: CrawlerLanePrivacyOptions;
36
+ }
37
+ export interface CrawlerLaneAiVisibilityInput {
38
+ domain: string;
39
+ logs: CrawlerLaneLogEvent[] | string;
40
+ importantPages?: string[];
41
+ hasLlmsTxt?: boolean;
42
+ hasSitemap?: boolean;
43
+ hasRobotsTxt?: boolean;
44
+ privacy?: CrawlerLanePrivacyOptions;
45
+ }
46
+ export interface CrawlerLaneReportInput {
47
+ domain: string;
48
+ logs: CrawlerLaneLogEvent[] | string;
49
+ period?: string;
50
+ importantPages?: string[];
51
+ privacy?: CrawlerLanePrivacyOptions;
52
+ }
53
+ export interface CrawlerLaneSitemapInput {
54
+ domain: string;
55
+ existingPages?: string[];
56
+ requested404s?: string[];
57
+ importantPages?: string[];
58
+ }
59
+ export interface CrawlerLaneRobotsInput {
60
+ domain: string;
61
+ robotsTxt: string;
62
+ sitemapUrl?: string;
63
+ }
64
+ export interface CrawlerLaneExportInput {
65
+ report: Record<string, unknown>;
66
+ }
67
+ export interface CrawlerLaneResponse<T> {
68
+ result?: T;
69
+ data?: T;
70
+ usage: {
71
+ action: string;
72
+ credits: number;
73
+ remaining?: number;
74
+ };
75
+ }
76
+ export declare class CrawlerLaneClient {
77
+ private api;
78
+ constructor(api: TalocodeApiClient);
79
+ health(): Promise<{
80
+ ok: boolean;
81
+ service: string;
82
+ version: string;
83
+ timestamp: string;
84
+ product: string;
85
+ status: string;
86
+ }>;
87
+ logs: {
88
+ ingest: (input: CrawlerLaneIngestInput) => Promise<CrawlerLaneResponse<Record<string, unknown>>>;
89
+ };
90
+ bots: {
91
+ classify: (input: CrawlerLaneClassifyInput) => Promise<CrawlerLaneResponse<Record<string, unknown>>>;
92
+ };
93
+ pages: {
94
+ analyze: (input: CrawlerLaneAnalyzePagesInput) => Promise<CrawlerLaneResponse<Record<string, unknown>>>;
95
+ };
96
+ notFound: {
97
+ analyze: (input: CrawlerLaneAnalyze404Input) => Promise<CrawlerLaneResponse<Record<string, unknown>>>;
98
+ };
99
+ aiVisibility: {
100
+ score: (input: CrawlerLaneAiVisibilityInput) => Promise<CrawlerLaneResponse<Record<string, unknown>>>;
101
+ };
102
+ report: {
103
+ generate: (input: CrawlerLaneReportInput) => Promise<CrawlerLaneResponse<Record<string, unknown>>>;
104
+ };
105
+ sitemap: {
106
+ suggest: (input: CrawlerLaneSitemapInput) => Promise<CrawlerLaneResponse<Record<string, unknown>>>;
107
+ };
108
+ robots: {
109
+ audit: (input: CrawlerLaneRobotsInput) => Promise<CrawlerLaneResponse<Record<string, unknown>>>;
110
+ };
111
+ export: {
112
+ markdown: (input: CrawlerLaneExportInput) => Promise<CrawlerLaneResponse<Record<string, unknown>>>;
113
+ json: (input: CrawlerLaneExportInput) => Promise<CrawlerLaneResponse<Record<string, unknown>>>;
114
+ };
115
+ }
@@ -0,0 +1,93 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.CrawlerLaneClient = void 0;
4
+ class CrawlerLaneClient {
5
+ api;
6
+ constructor(api) {
7
+ this.api = api;
8
+ }
9
+ async health() {
10
+ const res = await this.api.request('/v1/crawlerlane/health');
11
+ return res;
12
+ }
13
+ logs = {
14
+ ingest: async (input) => {
15
+ return this.api.request('/v1/crawlerlane/logs/ingest', {
16
+ method: 'POST',
17
+ body: input,
18
+ });
19
+ },
20
+ };
21
+ bots = {
22
+ classify: async (input) => {
23
+ return this.api.request('/v1/crawlerlane/bots/classify', {
24
+ method: 'POST',
25
+ body: input,
26
+ });
27
+ },
28
+ };
29
+ pages = {
30
+ analyze: async (input) => {
31
+ return this.api.request('/v1/crawlerlane/pages/analyze', {
32
+ method: 'POST',
33
+ body: input,
34
+ });
35
+ },
36
+ };
37
+ notFound = {
38
+ analyze: async (input) => {
39
+ return this.api.request('/v1/crawlerlane/404/analyze', {
40
+ method: 'POST',
41
+ body: input,
42
+ });
43
+ },
44
+ };
45
+ aiVisibility = {
46
+ score: async (input) => {
47
+ return this.api.request('/v1/crawlerlane/ai-visibility/score', {
48
+ method: 'POST',
49
+ body: input,
50
+ });
51
+ },
52
+ };
53
+ report = {
54
+ generate: async (input) => {
55
+ return this.api.request('/v1/crawlerlane/report/generate', {
56
+ method: 'POST',
57
+ body: input,
58
+ });
59
+ },
60
+ };
61
+ sitemap = {
62
+ suggest: async (input) => {
63
+ return this.api.request('/v1/crawlerlane/sitemap/suggest', {
64
+ method: 'POST',
65
+ body: input,
66
+ });
67
+ },
68
+ };
69
+ robots = {
70
+ audit: async (input) => {
71
+ return this.api.request('/v1/crawlerlane/robots/audit', {
72
+ method: 'POST',
73
+ body: input,
74
+ });
75
+ },
76
+ };
77
+ export = {
78
+ markdown: async (input) => {
79
+ return this.api.request('/v1/crawlerlane/export/markdown', {
80
+ method: 'POST',
81
+ body: input,
82
+ });
83
+ },
84
+ json: async (input) => {
85
+ return this.api.request('/v1/crawlerlane/export/json', {
86
+ method: 'POST',
87
+ body: input,
88
+ });
89
+ },
90
+ };
91
+ }
92
+ exports.CrawlerLaneClient = CrawlerLaneClient;
93
+ //# sourceMappingURL=crawlerlane.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"crawlerlane.js","sourceRoot":"","sources":["../src/crawlerlane.ts"],"names":[],"mappings":";;;AAwFA,MAAa,iBAAiB;IACpB,GAAG,CAAmB;IAE9B,YAAY,GAAsB;QAChC,IAAI,CAAC,GAAG,GAAG,GAAG,CAAA;IAChB,CAAC;IAED,KAAK,CAAC,MAAM;QACV,MAAM,GAAG,GAAG,MAAM,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC,wBAAwB,CAAC,CAAA;QAC5D,OAAO,GAA4G,CAAA;IACrH,CAAC;IAED,IAAI,GAAG;QACL,MAAM,EAAE,KAAK,EAAE,KAA6B,EAAyD,EAAE;YACrG,OAAO,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC,6BAA6B,EAAE;gBACrD,MAAM,EAAE,MAAM;gBACd,IAAI,EAAE,KAA2C;aAClD,CAA0D,CAAA;QAC7D,CAAC;KACF,CAAA;IAED,IAAI,GAAG;QACL,QAAQ,EAAE,KAAK,EAAE,KAA+B,EAAyD,EAAE;YACzG,OAAO,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC,+BAA+B,EAAE;gBACvD,MAAM,EAAE,MAAM;gBACd,IAAI,EAAE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EAAE;YACpG,OAAO,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC,8BAA8B,EAAE;gBACtD,MAAM,EAAE,MAAM;gBACd,IAAI,EAAE,KAA2C;aAClD,CAA0D,CAAA;QAC7D,CAAC;KACF,CAAA;IAED,MAAM,GAAG;QACP,QAAQ,EAAE,KAAK,EAAE,KAA6B,EAAyD,EAAE;YACvG,OAAO,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC,iCAAiC,EAAE;gBACzD,MAAM,EAAE,MAAM;gBACd,IAAI,EAAE,KAA2C;aAClD,CAA0D,CAAA;QAC7D,CAAC;QACD,IAAI,EAAE,KAAK,EAAE,KAA6B,EAAyD,EAAE;YACnG,OAAO,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC,6BAA6B,EAAE;gBACrD,MAAM,EAAE,MAAM;gBACd,IAAI,EAAE,KAA2C;aAClD,CAA0D,CAAA;QAC7D,CAAC;KACF,CAAA;CACF;AAlGD,8CAkGC"}
@@ -0,0 +1,24 @@
1
+ export declare class TalocodeError extends Error {
2
+ status: number;
3
+ code: string;
4
+ requestId?: string;
5
+ constructor(message: string, status: number, code: string, requestId?: string);
6
+ }
7
+ export declare class TalocodeAuthError extends TalocodeError {
8
+ constructor(message: string, requestId?: string);
9
+ }
10
+ export declare class TalocodeInsufficientCreditsError extends TalocodeError {
11
+ required?: number;
12
+ available?: number;
13
+ constructor(message: string, required?: number, available?: number, requestId?: string);
14
+ }
15
+ export declare class TalocodeRateLimitError extends TalocodeError {
16
+ constructor(message: string, requestId?: string);
17
+ }
18
+ export declare class TalocodeValidationError extends TalocodeError {
19
+ details?: Record<string, unknown>;
20
+ constructor(message: string, details?: Record<string, unknown>, requestId?: string);
21
+ }
22
+ export declare class TalocodeNotImplementedError extends TalocodeError {
23
+ constructor(namespace: string, method: string);
24
+ }
package/dist/errors.js ADDED
@@ -0,0 +1,58 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.TalocodeNotImplementedError = exports.TalocodeValidationError = exports.TalocodeRateLimitError = exports.TalocodeInsufficientCreditsError = exports.TalocodeAuthError = exports.TalocodeError = void 0;
4
+ class TalocodeError extends Error {
5
+ status;
6
+ code;
7
+ requestId;
8
+ constructor(message, status, code, requestId) {
9
+ super(message);
10
+ this.name = 'TalocodeError';
11
+ this.status = status;
12
+ this.code = code;
13
+ this.requestId = requestId;
14
+ }
15
+ }
16
+ exports.TalocodeError = TalocodeError;
17
+ class TalocodeAuthError extends TalocodeError {
18
+ constructor(message, requestId) {
19
+ super(message, 401, 'auth_error', requestId);
20
+ this.name = 'TalocodeAuthError';
21
+ }
22
+ }
23
+ exports.TalocodeAuthError = TalocodeAuthError;
24
+ class TalocodeInsufficientCreditsError extends TalocodeError {
25
+ required;
26
+ available;
27
+ constructor(message, required, available, requestId) {
28
+ super(message, 402, 'insufficient_credits', requestId);
29
+ this.name = 'TalocodeInsufficientCreditsError';
30
+ this.required = required;
31
+ this.available = available;
32
+ }
33
+ }
34
+ exports.TalocodeInsufficientCreditsError = TalocodeInsufficientCreditsError;
35
+ class TalocodeRateLimitError extends TalocodeError {
36
+ constructor(message, requestId) {
37
+ super(message, 429, 'rate_limit', requestId);
38
+ this.name = 'TalocodeRateLimitError';
39
+ }
40
+ }
41
+ exports.TalocodeRateLimitError = TalocodeRateLimitError;
42
+ class TalocodeValidationError extends TalocodeError {
43
+ details;
44
+ constructor(message, details, requestId) {
45
+ super(message, 400, 'validation_error', requestId);
46
+ this.name = 'TalocodeValidationError';
47
+ this.details = details;
48
+ }
49
+ }
50
+ exports.TalocodeValidationError = TalocodeValidationError;
51
+ class TalocodeNotImplementedError extends TalocodeError {
52
+ constructor(namespace, method) {
53
+ super(`${namespace}.${method} is not yet implemented.`, 0, 'not_implemented');
54
+ this.name = 'TalocodeNotImplementedError';
55
+ }
56
+ }
57
+ exports.TalocodeNotImplementedError = TalocodeNotImplementedError;
58
+ //# sourceMappingURL=errors.js.map
@@ -0,0 +1 @@
1
+ {"version":3,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