@codeqr/ts-mcp 0.5.0 → 0.7.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/README.md +37 -1
- package/code-tool-worker.d.mts.map +1 -1
- package/code-tool-worker.d.ts.map +1 -1
- package/code-tool-worker.js +142 -7
- package/code-tool-worker.js.map +1 -1
- package/code-tool-worker.mjs +142 -7
- package/code-tool-worker.mjs.map +1 -1
- package/code-tool.d.mts +1 -1
- package/code-tool.d.mts.map +1 -1
- package/code-tool.d.ts +1 -1
- package/code-tool.d.ts.map +1 -1
- package/code-tool.js +11 -13
- package/code-tool.js.map +1 -1
- package/code-tool.mjs +11 -13
- package/code-tool.mjs.map +1 -1
- package/dynamic-tools.d.mts +1 -1
- package/dynamic-tools.d.ts +1 -1
- package/dynamic-tools.js +1 -1
- package/dynamic-tools.mjs +1 -1
- package/filtering.d.mts +1 -0
- package/filtering.d.mts.map +1 -1
- package/filtering.d.ts +1 -0
- package/filtering.d.ts.map +1 -1
- package/filtering.js +4 -0
- package/filtering.js.map +1 -1
- package/filtering.mjs +3 -0
- package/filtering.mjs.map +1 -1
- package/headers.d.mts.map +1 -1
- package/headers.d.ts.map +1 -1
- package/headers.js +1 -1
- package/headers.js.map +1 -1
- package/headers.mjs +1 -1
- package/headers.mjs.map +1 -1
- package/http.js +2 -2
- package/http.js.map +1 -1
- package/http.mjs +2 -2
- package/http.mjs.map +1 -1
- package/options.d.mts.map +1 -1
- package/options.d.ts.map +1 -1
- package/options.js +6 -3
- package/options.js.map +1 -1
- package/options.mjs +6 -3
- package/options.mjs.map +1 -1
- package/package.json +5 -3
- package/server.js +1 -1
- package/server.mjs +1 -1
- package/src/code-tool-worker.ts +187 -7
- package/src/code-tool.ts +14 -13
- package/src/dynamic-tools.ts +1 -1
- package/src/filtering.ts +4 -0
- package/src/headers.ts +3 -1
- package/src/http.ts +2 -2
- package/src/options.ts +10 -3
- package/src/server.ts +1 -1
- package/src/tools/domains/create-domains.ts +20 -4
- package/src/tools/domains/delete-domains.ts +10 -3
- package/src/tools/domains/list-domains.ts +11 -4
- package/src/tools/domains/update-domains.ts +20 -4
- package/src/tools/links/bulk/delete-links-bulk.ts +10 -3
- package/src/tools/links/delete-links.ts +10 -3
- package/src/tools/links/retrieve-info-links.ts +10 -3
- package/src/tools/projects/list-projects.ts +10 -3
- package/src/tools/projects/retrieve-projects.ts +10 -3
- package/src/tools/qrcodes/bulk/delete-qrcodes-bulk.ts +10 -3
- package/src/tools/qrcodes/count-qrcodes.ts +10 -3
- package/src/tools/qrcodes/delete-qrcodes.ts +10 -3
- package/src/tools/tags/create-tags.ts +10 -3
- package/src/tools/tags/delete-tags.ts +10 -3
- package/src/tools/tags/list-tags.ts +10 -3
- package/src/tools/tags/update-tags.ts +10 -3
- package/src/tools/track/track-lead-track.ts +10 -3
- package/src/tools/track/track-sale-track.ts +10 -3
- package/src/tools/types.ts +12 -0
- package/tools/domains/create-domains.d.mts.map +1 -1
- package/tools/domains/create-domains.d.ts.map +1 -1
- package/tools/domains/create-domains.js +19 -2
- package/tools/domains/create-domains.js.map +1 -1
- package/tools/domains/create-domains.mjs +21 -4
- package/tools/domains/create-domains.mjs.map +1 -1
- package/tools/domains/delete-domains.d.mts.map +1 -1
- package/tools/domains/delete-domains.d.ts.map +1 -1
- package/tools/domains/delete-domains.js +9 -1
- package/tools/domains/delete-domains.js.map +1 -1
- package/tools/domains/delete-domains.mjs +11 -3
- package/tools/domains/delete-domains.mjs.map +1 -1
- package/tools/domains/list-domains.d.mts.map +1 -1
- package/tools/domains/list-domains.d.ts.map +1 -1
- package/tools/domains/list-domains.js +10 -2
- package/tools/domains/list-domains.js.map +1 -1
- package/tools/domains/list-domains.mjs +12 -4
- package/tools/domains/list-domains.mjs.map +1 -1
- package/tools/domains/update-domains.d.mts.map +1 -1
- package/tools/domains/update-domains.d.ts.map +1 -1
- package/tools/domains/update-domains.js +19 -2
- package/tools/domains/update-domains.js.map +1 -1
- package/tools/domains/update-domains.mjs +21 -4
- package/tools/domains/update-domains.mjs.map +1 -1
- package/tools/links/bulk/delete-links-bulk.d.mts.map +1 -1
- package/tools/links/bulk/delete-links-bulk.d.ts.map +1 -1
- package/tools/links/bulk/delete-links-bulk.js +9 -1
- package/tools/links/bulk/delete-links-bulk.js.map +1 -1
- package/tools/links/bulk/delete-links-bulk.mjs +11 -3
- package/tools/links/bulk/delete-links-bulk.mjs.map +1 -1
- package/tools/links/delete-links.d.mts.map +1 -1
- package/tools/links/delete-links.d.ts.map +1 -1
- package/tools/links/delete-links.js +9 -1
- package/tools/links/delete-links.js.map +1 -1
- package/tools/links/delete-links.mjs +11 -3
- package/tools/links/delete-links.mjs.map +1 -1
- package/tools/links/retrieve-info-links.d.mts.map +1 -1
- package/tools/links/retrieve-info-links.d.ts.map +1 -1
- package/tools/links/retrieve-info-links.js +9 -1
- package/tools/links/retrieve-info-links.js.map +1 -1
- package/tools/links/retrieve-info-links.mjs +11 -3
- package/tools/links/retrieve-info-links.mjs.map +1 -1
- package/tools/projects/list-projects.d.mts.map +1 -1
- package/tools/projects/list-projects.d.ts.map +1 -1
- package/tools/projects/list-projects.js +9 -1
- package/tools/projects/list-projects.js.map +1 -1
- package/tools/projects/list-projects.mjs +11 -3
- package/tools/projects/list-projects.mjs.map +1 -1
- package/tools/projects/retrieve-projects.d.mts.map +1 -1
- package/tools/projects/retrieve-projects.d.ts.map +1 -1
- package/tools/projects/retrieve-projects.js +9 -1
- package/tools/projects/retrieve-projects.js.map +1 -1
- package/tools/projects/retrieve-projects.mjs +11 -3
- package/tools/projects/retrieve-projects.mjs.map +1 -1
- package/tools/qrcodes/bulk/delete-qrcodes-bulk.d.mts.map +1 -1
- package/tools/qrcodes/bulk/delete-qrcodes-bulk.d.ts.map +1 -1
- package/tools/qrcodes/bulk/delete-qrcodes-bulk.js +9 -1
- package/tools/qrcodes/bulk/delete-qrcodes-bulk.js.map +1 -1
- package/tools/qrcodes/bulk/delete-qrcodes-bulk.mjs +11 -3
- package/tools/qrcodes/bulk/delete-qrcodes-bulk.mjs.map +1 -1
- package/tools/qrcodes/count-qrcodes.d.mts.map +1 -1
- package/tools/qrcodes/count-qrcodes.d.ts.map +1 -1
- package/tools/qrcodes/count-qrcodes.js +9 -1
- package/tools/qrcodes/count-qrcodes.js.map +1 -1
- package/tools/qrcodes/count-qrcodes.mjs +11 -3
- package/tools/qrcodes/count-qrcodes.mjs.map +1 -1
- package/tools/qrcodes/delete-qrcodes.d.mts.map +1 -1
- package/tools/qrcodes/delete-qrcodes.d.ts.map +1 -1
- package/tools/qrcodes/delete-qrcodes.js +9 -1
- package/tools/qrcodes/delete-qrcodes.js.map +1 -1
- package/tools/qrcodes/delete-qrcodes.mjs +11 -3
- package/tools/qrcodes/delete-qrcodes.mjs.map +1 -1
- package/tools/tags/create-tags.d.mts.map +1 -1
- package/tools/tags/create-tags.d.ts.map +1 -1
- package/tools/tags/create-tags.js +9 -1
- package/tools/tags/create-tags.js.map +1 -1
- package/tools/tags/create-tags.mjs +11 -3
- package/tools/tags/create-tags.mjs.map +1 -1
- package/tools/tags/delete-tags.d.mts.map +1 -1
- package/tools/tags/delete-tags.d.ts.map +1 -1
- package/tools/tags/delete-tags.js +9 -1
- package/tools/tags/delete-tags.js.map +1 -1
- package/tools/tags/delete-tags.mjs +11 -3
- package/tools/tags/delete-tags.mjs.map +1 -1
- package/tools/tags/list-tags.d.mts.map +1 -1
- package/tools/tags/list-tags.d.ts.map +1 -1
- package/tools/tags/list-tags.js +9 -1
- package/tools/tags/list-tags.js.map +1 -1
- package/tools/tags/list-tags.mjs +11 -3
- package/tools/tags/list-tags.mjs.map +1 -1
- package/tools/tags/update-tags.d.mts.map +1 -1
- package/tools/tags/update-tags.d.ts.map +1 -1
- package/tools/tags/update-tags.js +9 -1
- package/tools/tags/update-tags.js.map +1 -1
- package/tools/tags/update-tags.mjs +11 -3
- package/tools/tags/update-tags.mjs.map +1 -1
- package/tools/track/track-lead-track.d.mts.map +1 -1
- package/tools/track/track-lead-track.d.ts.map +1 -1
- package/tools/track/track-lead-track.js +9 -1
- package/tools/track/track-lead-track.js.map +1 -1
- package/tools/track/track-lead-track.mjs +11 -3
- package/tools/track/track-lead-track.mjs.map +1 -1
- package/tools/track/track-sale-track.d.mts.map +1 -1
- package/tools/track/track-sale-track.d.ts.map +1 -1
- package/tools/track/track-sale-track.js +9 -1
- package/tools/track/track-sale-track.js.map +1 -1
- package/tools/track/track-sale-track.mjs +11 -3
- package/tools/track/track-sale-track.mjs.map +1 -1
- package/tools/types.d.mts +1 -0
- package/tools/types.d.mts.map +1 -1
- package/tools/types.d.ts +1 -0
- package/tools/types.d.ts.map +1 -1
- package/tools/types.js +12 -0
- package/tools/types.js.map +1 -1
- package/tools/types.mjs +11 -0
- package/tools/types.mjs.map +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
|
-
import { maybeFilter } from '@codeqr/ts-mcp/filtering';
|
|
4
|
-
import { Metadata, asTextContentResult } from '@codeqr/ts-mcp/tools/types';
|
|
3
|
+
import { isJqError, maybeFilter } from '@codeqr/ts-mcp/filtering';
|
|
4
|
+
import { Metadata, asErrorResult, asTextContentResult } from '@codeqr/ts-mcp/tools/types';
|
|
5
5
|
|
|
6
6
|
import { Tool } from '@modelcontextprotocol/sdk/types.js';
|
|
7
7
|
import Codeqr from '@codeqr/ts';
|
|
@@ -38,7 +38,14 @@ export const tool: Tool = {
|
|
|
38
38
|
|
|
39
39
|
export const handler = async (client: Codeqr, args: Record<string, unknown> | undefined) => {
|
|
40
40
|
const { jq_filter } = args as any;
|
|
41
|
-
|
|
41
|
+
try {
|
|
42
|
+
return asTextContentResult(await maybeFilter(jq_filter, await client.projects.list()));
|
|
43
|
+
} catch (error) {
|
|
44
|
+
if (isJqError(error)) {
|
|
45
|
+
return asErrorResult(error.message);
|
|
46
|
+
}
|
|
47
|
+
throw error;
|
|
48
|
+
}
|
|
42
49
|
};
|
|
43
50
|
|
|
44
51
|
export default { metadata, tool, handler };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
|
-
import { maybeFilter } from '@codeqr/ts-mcp/filtering';
|
|
4
|
-
import { Metadata, asTextContentResult } from '@codeqr/ts-mcp/tools/types';
|
|
3
|
+
import { isJqError, maybeFilter } from '@codeqr/ts-mcp/filtering';
|
|
4
|
+
import { Metadata, asErrorResult, asTextContentResult } from '@codeqr/ts-mcp/tools/types';
|
|
5
5
|
|
|
6
6
|
import { Tool } from '@modelcontextprotocol/sdk/types.js';
|
|
7
7
|
import Codeqr from '@codeqr/ts';
|
|
@@ -43,7 +43,14 @@ export const tool: Tool = {
|
|
|
43
43
|
|
|
44
44
|
export const handler = async (client: Codeqr, args: Record<string, unknown> | undefined) => {
|
|
45
45
|
const { projectSlug, jq_filter, ...body } = args as any;
|
|
46
|
-
|
|
46
|
+
try {
|
|
47
|
+
return asTextContentResult(await maybeFilter(jq_filter, await client.projects.retrieve(projectSlug)));
|
|
48
|
+
} catch (error) {
|
|
49
|
+
if (isJqError(error)) {
|
|
50
|
+
return asErrorResult(error.message);
|
|
51
|
+
}
|
|
52
|
+
throw error;
|
|
53
|
+
}
|
|
47
54
|
};
|
|
48
55
|
|
|
49
56
|
export default { metadata, tool, handler };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
|
-
import { maybeFilter } from '@codeqr/ts-mcp/filtering';
|
|
4
|
-
import { Metadata, asTextContentResult } from '@codeqr/ts-mcp/tools/types';
|
|
3
|
+
import { isJqError, maybeFilter } from '@codeqr/ts-mcp/filtering';
|
|
4
|
+
import { Metadata, asErrorResult, asTextContentResult } from '@codeqr/ts-mcp/tools/types';
|
|
5
5
|
|
|
6
6
|
import { Tool } from '@modelcontextprotocol/sdk/types.js';
|
|
7
7
|
import Codeqr from '@codeqr/ts';
|
|
@@ -46,7 +46,14 @@ export const tool: Tool = {
|
|
|
46
46
|
|
|
47
47
|
export const handler = async (client: Codeqr, args: Record<string, unknown> | undefined) => {
|
|
48
48
|
const { jq_filter, ...body } = args as any;
|
|
49
|
-
|
|
49
|
+
try {
|
|
50
|
+
return asTextContentResult(await maybeFilter(jq_filter, await client.qrcodes.bulk.delete(body)));
|
|
51
|
+
} catch (error) {
|
|
52
|
+
if (isJqError(error)) {
|
|
53
|
+
return asErrorResult(error.message);
|
|
54
|
+
}
|
|
55
|
+
throw error;
|
|
56
|
+
}
|
|
50
57
|
};
|
|
51
58
|
|
|
52
59
|
export default { metadata, tool, handler };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
|
-
import { maybeFilter } from '@codeqr/ts-mcp/filtering';
|
|
4
|
-
import { Metadata, asTextContentResult } from '@codeqr/ts-mcp/tools/types';
|
|
3
|
+
import { isJqError, maybeFilter } from '@codeqr/ts-mcp/filtering';
|
|
4
|
+
import { Metadata, asErrorResult, asTextContentResult } from '@codeqr/ts-mcp/tools/types';
|
|
5
5
|
|
|
6
6
|
import { Tool } from '@modelcontextprotocol/sdk/types.js';
|
|
7
7
|
import Codeqr from '@codeqr/ts';
|
|
@@ -207,7 +207,14 @@ export const tool: Tool = {
|
|
|
207
207
|
|
|
208
208
|
export const handler = async (client: Codeqr, args: Record<string, unknown> | undefined) => {
|
|
209
209
|
const { jq_filter, ...body } = args as any;
|
|
210
|
-
|
|
210
|
+
try {
|
|
211
|
+
return asTextContentResult(await maybeFilter(jq_filter, await client.qrcodes.count(body)));
|
|
212
|
+
} catch (error) {
|
|
213
|
+
if (isJqError(error)) {
|
|
214
|
+
return asErrorResult(error.message);
|
|
215
|
+
}
|
|
216
|
+
throw error;
|
|
217
|
+
}
|
|
211
218
|
};
|
|
212
219
|
|
|
213
220
|
export default { metadata, tool, handler };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
|
-
import { maybeFilter } from '@codeqr/ts-mcp/filtering';
|
|
4
|
-
import { Metadata, asTextContentResult } from '@codeqr/ts-mcp/tools/types';
|
|
3
|
+
import { isJqError, maybeFilter } from '@codeqr/ts-mcp/filtering';
|
|
4
|
+
import { Metadata, asErrorResult, asTextContentResult } from '@codeqr/ts-mcp/tools/types';
|
|
5
5
|
|
|
6
6
|
import { Tool } from '@modelcontextprotocol/sdk/types.js';
|
|
7
7
|
import Codeqr from '@codeqr/ts';
|
|
@@ -43,7 +43,14 @@ export const tool: Tool = {
|
|
|
43
43
|
|
|
44
44
|
export const handler = async (client: Codeqr, args: Record<string, unknown> | undefined) => {
|
|
45
45
|
const { qrcodeId, jq_filter, ...body } = args as any;
|
|
46
|
-
|
|
46
|
+
try {
|
|
47
|
+
return asTextContentResult(await maybeFilter(jq_filter, await client.qrcodes.delete(qrcodeId)));
|
|
48
|
+
} catch (error) {
|
|
49
|
+
if (isJqError(error)) {
|
|
50
|
+
return asErrorResult(error.message);
|
|
51
|
+
}
|
|
52
|
+
throw error;
|
|
53
|
+
}
|
|
47
54
|
};
|
|
48
55
|
|
|
49
56
|
export default { metadata, tool, handler };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
|
-
import { maybeFilter } from '@codeqr/ts-mcp/filtering';
|
|
4
|
-
import { Metadata, asTextContentResult } from '@codeqr/ts-mcp/tools/types';
|
|
3
|
+
import { isJqError, maybeFilter } from '@codeqr/ts-mcp/filtering';
|
|
4
|
+
import { Metadata, asErrorResult, asTextContentResult } from '@codeqr/ts-mcp/tools/types';
|
|
5
5
|
|
|
6
6
|
import { Tool } from '@modelcontextprotocol/sdk/types.js';
|
|
7
7
|
import Codeqr from '@codeqr/ts';
|
|
@@ -46,7 +46,14 @@ export const tool: Tool = {
|
|
|
46
46
|
|
|
47
47
|
export const handler = async (client: Codeqr, args: Record<string, unknown> | undefined) => {
|
|
48
48
|
const { jq_filter, ...body } = args as any;
|
|
49
|
-
|
|
49
|
+
try {
|
|
50
|
+
return asTextContentResult(await maybeFilter(jq_filter, await client.tags.create(body)));
|
|
51
|
+
} catch (error) {
|
|
52
|
+
if (isJqError(error)) {
|
|
53
|
+
return asErrorResult(error.message);
|
|
54
|
+
}
|
|
55
|
+
throw error;
|
|
56
|
+
}
|
|
50
57
|
};
|
|
51
58
|
|
|
52
59
|
export default { metadata, tool, handler };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
|
-
import { maybeFilter } from '@codeqr/ts-mcp/filtering';
|
|
4
|
-
import { Metadata, asTextContentResult } from '@codeqr/ts-mcp/tools/types';
|
|
3
|
+
import { isJqError, maybeFilter } from '@codeqr/ts-mcp/filtering';
|
|
4
|
+
import { Metadata, asErrorResult, asTextContentResult } from '@codeqr/ts-mcp/tools/types';
|
|
5
5
|
|
|
6
6
|
import { Tool } from '@modelcontextprotocol/sdk/types.js';
|
|
7
7
|
import Codeqr from '@codeqr/ts';
|
|
@@ -42,7 +42,14 @@ export const tool: Tool = {
|
|
|
42
42
|
|
|
43
43
|
export const handler = async (client: Codeqr, args: Record<string, unknown> | undefined) => {
|
|
44
44
|
const { id, jq_filter, ...body } = args as any;
|
|
45
|
-
|
|
45
|
+
try {
|
|
46
|
+
return asTextContentResult(await maybeFilter(jq_filter, await client.tags.delete(id)));
|
|
47
|
+
} catch (error) {
|
|
48
|
+
if (isJqError(error)) {
|
|
49
|
+
return asErrorResult(error.message);
|
|
50
|
+
}
|
|
51
|
+
throw error;
|
|
52
|
+
}
|
|
46
53
|
};
|
|
47
54
|
|
|
48
55
|
export default { metadata, tool, handler };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
|
-
import { maybeFilter } from '@codeqr/ts-mcp/filtering';
|
|
4
|
-
import { Metadata, asTextContentResult } from '@codeqr/ts-mcp/tools/types';
|
|
3
|
+
import { isJqError, maybeFilter } from '@codeqr/ts-mcp/filtering';
|
|
4
|
+
import { Metadata, asErrorResult, asTextContentResult } from '@codeqr/ts-mcp/tools/types';
|
|
5
5
|
|
|
6
6
|
import { Tool } from '@modelcontextprotocol/sdk/types.js';
|
|
7
7
|
import Codeqr from '@codeqr/ts';
|
|
@@ -74,7 +74,14 @@ export const tool: Tool = {
|
|
|
74
74
|
|
|
75
75
|
export const handler = async (client: Codeqr, args: Record<string, unknown> | undefined) => {
|
|
76
76
|
const { jq_filter, ...body } = args as any;
|
|
77
|
-
|
|
77
|
+
try {
|
|
78
|
+
return asTextContentResult(await maybeFilter(jq_filter, await client.tags.list(body)));
|
|
79
|
+
} catch (error) {
|
|
80
|
+
if (isJqError(error)) {
|
|
81
|
+
return asErrorResult(error.message);
|
|
82
|
+
}
|
|
83
|
+
throw error;
|
|
84
|
+
}
|
|
78
85
|
};
|
|
79
86
|
|
|
80
87
|
export default { metadata, tool, handler };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
|
-
import { maybeFilter } from '@codeqr/ts-mcp/filtering';
|
|
4
|
-
import { Metadata, asTextContentResult } from '@codeqr/ts-mcp/tools/types';
|
|
3
|
+
import { isJqError, maybeFilter } from '@codeqr/ts-mcp/filtering';
|
|
4
|
+
import { Metadata, asErrorResult, asTextContentResult } from '@codeqr/ts-mcp/tools/types';
|
|
5
5
|
|
|
6
6
|
import { Tool } from '@modelcontextprotocol/sdk/types.js';
|
|
7
7
|
import Codeqr from '@codeqr/ts';
|
|
@@ -50,7 +50,14 @@ export const tool: Tool = {
|
|
|
50
50
|
|
|
51
51
|
export const handler = async (client: Codeqr, args: Record<string, unknown> | undefined) => {
|
|
52
52
|
const { id, jq_filter, ...body } = args as any;
|
|
53
|
-
|
|
53
|
+
try {
|
|
54
|
+
return asTextContentResult(await maybeFilter(jq_filter, await client.tags.update(id, body)));
|
|
55
|
+
} catch (error) {
|
|
56
|
+
if (isJqError(error)) {
|
|
57
|
+
return asErrorResult(error.message);
|
|
58
|
+
}
|
|
59
|
+
throw error;
|
|
60
|
+
}
|
|
54
61
|
};
|
|
55
62
|
|
|
56
63
|
export default { metadata, tool, handler };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
|
-
import { maybeFilter } from '@codeqr/ts-mcp/filtering';
|
|
4
|
-
import { Metadata, asTextContentResult } from '@codeqr/ts-mcp/tools/types';
|
|
3
|
+
import { isJqError, maybeFilter } from '@codeqr/ts-mcp/filtering';
|
|
4
|
+
import { Metadata, asErrorResult, asTextContentResult } from '@codeqr/ts-mcp/tools/types';
|
|
5
5
|
|
|
6
6
|
import { Tool } from '@modelcontextprotocol/sdk/types.js';
|
|
7
7
|
import Codeqr from '@codeqr/ts';
|
|
@@ -80,7 +80,14 @@ export const tool: Tool = {
|
|
|
80
80
|
|
|
81
81
|
export const handler = async (client: Codeqr, args: Record<string, unknown> | undefined) => {
|
|
82
82
|
const { jq_filter, ...body } = args as any;
|
|
83
|
-
|
|
83
|
+
try {
|
|
84
|
+
return asTextContentResult(await maybeFilter(jq_filter, await client.track.trackLead(body)));
|
|
85
|
+
} catch (error) {
|
|
86
|
+
if (isJqError(error)) {
|
|
87
|
+
return asErrorResult(error.message);
|
|
88
|
+
}
|
|
89
|
+
throw error;
|
|
90
|
+
}
|
|
84
91
|
};
|
|
85
92
|
|
|
86
93
|
export default { metadata, tool, handler };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
|
-
import { maybeFilter } from '@codeqr/ts-mcp/filtering';
|
|
4
|
-
import { Metadata, asTextContentResult } from '@codeqr/ts-mcp/tools/types';
|
|
3
|
+
import { isJqError, maybeFilter } from '@codeqr/ts-mcp/filtering';
|
|
4
|
+
import { Metadata, asErrorResult, asTextContentResult } from '@codeqr/ts-mcp/tools/types';
|
|
5
5
|
|
|
6
6
|
import { Tool } from '@modelcontextprotocol/sdk/types.js';
|
|
7
7
|
import Codeqr from '@codeqr/ts';
|
|
@@ -95,7 +95,14 @@ export const tool: Tool = {
|
|
|
95
95
|
|
|
96
96
|
export const handler = async (client: Codeqr, args: Record<string, unknown> | undefined) => {
|
|
97
97
|
const { jq_filter, ...body } = args as any;
|
|
98
|
-
|
|
98
|
+
try {
|
|
99
|
+
return asTextContentResult(await maybeFilter(jq_filter, await client.track.trackSale(body)));
|
|
100
|
+
} catch (error) {
|
|
101
|
+
if (isJqError(error)) {
|
|
102
|
+
return asErrorResult(error.message);
|
|
103
|
+
}
|
|
104
|
+
throw error;
|
|
105
|
+
}
|
|
99
106
|
};
|
|
100
107
|
|
|
101
108
|
export default { metadata, tool, handler };
|
package/src/tools/types.ts
CHANGED
|
@@ -87,6 +87,18 @@ export async function asBinaryContentResult(response: Response): Promise<ToolCal
|
|
|
87
87
|
}
|
|
88
88
|
}
|
|
89
89
|
|
|
90
|
+
export function asErrorResult(message: string): ToolCallResult {
|
|
91
|
+
return {
|
|
92
|
+
content: [
|
|
93
|
+
{
|
|
94
|
+
type: 'text',
|
|
95
|
+
text: message,
|
|
96
|
+
},
|
|
97
|
+
],
|
|
98
|
+
isError: true,
|
|
99
|
+
};
|
|
100
|
+
}
|
|
101
|
+
|
|
90
102
|
export type Metadata = {
|
|
91
103
|
resource: string;
|
|
92
104
|
operation: 'read' | 'write';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-domains.d.mts","sourceRoot":"","sources":["../../src/tools/domains/create-domains.ts"],"names":[],"mappings":"OAGO,EAAE,QAAQ,
|
|
1
|
+
{"version":3,"file":"create-domains.d.mts","sourceRoot":"","sources":["../../src/tools/domains/create-domains.ts"],"names":[],"mappings":"OAGO,EAAE,QAAQ,EAAsC,MAAM,4BAA4B;OAElF,EAAE,IAAI,EAAE,MAAM,oCAAoC;OAClD,MAAM,MAAM,YAAY;AAE/B,eAAO,MAAM,QAAQ,EAAE,QAOtB,CAAC;AAEF,eAAO,MAAM,IAAI,EAAE,IA2ClB,CAAC;AAEF,eAAO,MAAM,OAAO,GAAU,QAAQ,MAAM,EAAE,MAAM,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,iEAUtF,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;sBAVoC,MAAM,QAAQ,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS;;AAYvF,wBAA2C"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-domains.d.ts","sourceRoot":"","sources":["../../src/tools/domains/create-domains.ts"],"names":[],"mappings":"OAGO,EAAE,QAAQ,
|
|
1
|
+
{"version":3,"file":"create-domains.d.ts","sourceRoot":"","sources":["../../src/tools/domains/create-domains.ts"],"names":[],"mappings":"OAGO,EAAE,QAAQ,EAAsC,MAAM,4BAA4B;OAElF,EAAE,IAAI,EAAE,MAAM,oCAAoC;OAClD,MAAM,MAAM,YAAY;AAE/B,eAAO,MAAM,QAAQ,EAAE,QAOtB,CAAC;AAEF,eAAO,MAAM,IAAI,EAAE,IA2ClB,CAAC;AAEF,eAAO,MAAM,OAAO,GAAU,QAAQ,MAAM,EAAE,MAAM,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,iEAUtF,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;sBAVoC,MAAM,QAAQ,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS;;AAYvF,wBAA2C"}
|
|
@@ -14,7 +14,7 @@ exports.metadata = {
|
|
|
14
14
|
};
|
|
15
15
|
exports.tool = {
|
|
16
16
|
name: 'create_domains',
|
|
17
|
-
description: "When using this tool, always use the `jq_filter` parameter to reduce the response size and improve performance.\n\nOnly omit if you're sure you don't need the data.\n\nCreate a domain for the authenticated workspace.\n\n# Response Schema\n```json\n{\n $ref: '#/$defs/domain',\n $defs: {\n domain: {\n type: 'object',\n properties: {\n id: {\n type: 'string',\n description: 'The unique identifier of the domain.'\n },\n archived: {\n type: 'boolean',\n description: 'Whether the domain is archived.'\n },\n createdAt: {\n type: 'string',\n description: 'The date the domain was created.'\n },\n expiredUrl: {\n type: 'string',\n description: 'The URL to redirect to when a link under this domain has expired.'\n },\n placeholder: {\n type: 'string',\n description: 'Provide context to your teammates in the link creation modal by showing them an example of a link to be shortened.'\n },\n primary: {\n type: 'boolean',\n description: 'Whether the domain is the primary domain for the project.'\n },\n slug: {\n type: 'string',\n description: 'The domain name.'\n },\n updatedAt: {\n type: 'string',\n description: 'The date the domain was last updated.'\n },\n verified: {\n type: 'boolean',\n description: 'Whether the domain is verified.'\n }\n },\n required: [ 'id',\n 'archived',\n 'createdAt',\n 'expiredUrl',\n 'placeholder',\n 'primary',\n 'slug',\n 'updatedAt',\n 'verified'\n ]\n }\n }\n}\n```",
|
|
17
|
+
description: "When using this tool, always use the `jq_filter` parameter to reduce the response size and improve performance.\n\nOnly omit if you're sure you don't need the data.\n\nCreate a domain for the authenticated workspace.\n\n# Response Schema\n```json\n{\n $ref: '#/$defs/domain',\n $defs: {\n domain: {\n type: 'object',\n properties: {\n id: {\n type: 'string',\n description: 'The unique identifier of the domain.'\n },\n archived: {\n type: 'boolean',\n description: 'Whether the domain is archived.'\n },\n createdAt: {\n type: 'string',\n description: 'The date the domain was created.'\n },\n expiredUrl: {\n type: 'string',\n description: 'The URL to redirect to when a link under this domain has expired.'\n },\n placeholder: {\n type: 'string',\n description: 'Provide context to your teammates in the link creation modal by showing them an example of a link to be shortened.'\n },\n primary: {\n type: 'boolean',\n description: 'Whether the domain is the primary domain for the project.'\n },\n slug: {\n type: 'string',\n description: 'The domain name.'\n },\n target: {\n type: 'string',\n description: 'The target URL to redirect to when accessing the domain root.'\n },\n type: {\n type: 'string',\n description: 'The behavior type for the domain root redirect.',\n enum: [ 'redirect',\n 'rewrite'\n ]\n },\n updatedAt: {\n type: 'string',\n description: 'The date the domain was last updated.'\n },\n verified: {\n type: 'boolean',\n description: 'Whether the domain is verified.'\n }\n },\n required: [ 'id',\n 'archived',\n 'createdAt',\n 'expiredUrl',\n 'placeholder',\n 'primary',\n 'slug',\n 'target',\n 'type',\n 'updatedAt',\n 'verified'\n ]\n }\n }\n}\n```",
|
|
18
18
|
inputSchema: {
|
|
19
19
|
type: 'object',
|
|
20
20
|
properties: {
|
|
@@ -34,6 +34,15 @@ exports.tool = {
|
|
|
34
34
|
type: 'string',
|
|
35
35
|
description: 'Provide context to your teammates in the link creation modal by showing them an example of a link to be shortened.',
|
|
36
36
|
},
|
|
37
|
+
target: {
|
|
38
|
+
type: 'string',
|
|
39
|
+
description: 'The target URL to redirect to when accessing the domain root.',
|
|
40
|
+
},
|
|
41
|
+
type: {
|
|
42
|
+
type: 'string',
|
|
43
|
+
description: 'The behavior type for the domain root redirect.',
|
|
44
|
+
enum: ['redirect', 'rewrite'],
|
|
45
|
+
},
|
|
37
46
|
jq_filter: {
|
|
38
47
|
type: 'string',
|
|
39
48
|
title: 'jq Filter',
|
|
@@ -46,7 +55,15 @@ exports.tool = {
|
|
|
46
55
|
};
|
|
47
56
|
const handler = async (client, args) => {
|
|
48
57
|
const { jq_filter, ...body } = args;
|
|
49
|
-
|
|
58
|
+
try {
|
|
59
|
+
return (0, types_1.asTextContentResult)(await (0, filtering_1.maybeFilter)(jq_filter, await client.domains.create(body)));
|
|
60
|
+
}
|
|
61
|
+
catch (error) {
|
|
62
|
+
if ((0, filtering_1.isJqError)(error)) {
|
|
63
|
+
return (0, types_1.asErrorResult)(error.message);
|
|
64
|
+
}
|
|
65
|
+
throw error;
|
|
66
|
+
}
|
|
50
67
|
};
|
|
51
68
|
exports.handler = handler;
|
|
52
69
|
exports.default = { metadata: exports.metadata, tool: exports.tool, handler: exports.handler };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-domains.js","sourceRoot":"","sources":["../../src/tools/domains/create-domains.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,
|
|
1
|
+
{"version":3,"file":"create-domains.js","sourceRoot":"","sources":["../../src/tools/domains/create-domains.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,wDAAkE;AAClE,sDAA0F;AAK7E,QAAA,QAAQ,GAAa;IAChC,QAAQ,EAAE,SAAS;IACnB,SAAS,EAAE,OAAO;IAClB,IAAI,EAAE,EAAE;IACR,UAAU,EAAE,MAAM;IAClB,QAAQ,EAAE,UAAU;IACpB,WAAW,EAAE,cAAc;CAC5B,CAAC;AAEW,QAAA,IAAI,GAAS;IACxB,IAAI,EAAE,gBAAgB;IACtB,WAAW,EACT,ooEAAooE;IACtoE,WAAW,EAAE;QACX,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACV,IAAI,EAAE;gBACJ,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,qBAAqB;aACnC;YACD,QAAQ,EAAE;gBACR,IAAI,EAAE,SAAS;gBACf,WAAW,EAAE,sFAAsF;aACpG;YACD,UAAU,EAAE;gBACV,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,+EAA+E;aAC7F;YACD,WAAW,EAAE;gBACX,IAAI,EAAE,QAAQ;gBACd,WAAW,EACT,oHAAoH;aACvH;YACD,MAAM,EAAE;gBACN,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,+DAA+D;aAC7E;YACD,IAAI,EAAE;gBACJ,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,iDAAiD;gBAC9D,IAAI,EAAE,CAAC,UAAU,EAAE,SAAS,CAAC;aAC9B;YACD,SAAS,EAAE;gBACT,IAAI,EAAE,QAAQ;gBACd,KAAK,EAAE,WAAW;gBAClB,WAAW,EACT,kWAAkW;aACrW;SACF;QACD,QAAQ,EAAE,CAAC,MAAM,CAAC;KACnB;IACD,WAAW,EAAE,EAAE;CAChB,CAAC;AAEK,MAAM,OAAO,GAAG,KAAK,EAAE,MAAc,EAAE,IAAyC,EAAE,EAAE;IACzF,MAAM,EAAE,SAAS,EAAE,GAAG,IAAI,EAAE,GAAG,IAAW,CAAC;IAC3C,IAAI,CAAC;QACH,OAAO,IAAA,2BAAmB,EAAC,MAAM,IAAA,uBAAW,EAAC,SAAS,EAAE,MAAM,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAC9F,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,IAAI,IAAA,qBAAS,EAAC,KAAK,CAAC,EAAE,CAAC;YACrB,OAAO,IAAA,qBAAa,EAAC,KAAK,CAAC,OAAO,CAAC,CAAC;QACtC,CAAC;QACD,MAAM,KAAK,CAAC;IACd,CAAC;AACH,CAAC,CAAC;AAVW,QAAA,OAAO,WAUlB;AAEF,kBAAe,EAAE,QAAQ,EAAR,gBAAQ,EAAE,IAAI,EAAJ,YAAI,EAAE,OAAO,EAAP,eAAO,EAAE,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
-
import { maybeFilter } from '@codeqr/ts-mcp/filtering';
|
|
3
|
-
import { asTextContentResult } from '@codeqr/ts-mcp/tools/types';
|
|
2
|
+
import { isJqError, maybeFilter } from '@codeqr/ts-mcp/filtering';
|
|
3
|
+
import { asErrorResult, asTextContentResult } from '@codeqr/ts-mcp/tools/types';
|
|
4
4
|
export const metadata = {
|
|
5
5
|
resource: 'domains',
|
|
6
6
|
operation: 'write',
|
|
@@ -11,7 +11,7 @@ export const metadata = {
|
|
|
11
11
|
};
|
|
12
12
|
export const tool = {
|
|
13
13
|
name: 'create_domains',
|
|
14
|
-
description: "When using this tool, always use the `jq_filter` parameter to reduce the response size and improve performance.\n\nOnly omit if you're sure you don't need the data.\n\nCreate a domain for the authenticated workspace.\n\n# Response Schema\n```json\n{\n $ref: '#/$defs/domain',\n $defs: {\n domain: {\n type: 'object',\n properties: {\n id: {\n type: 'string',\n description: 'The unique identifier of the domain.'\n },\n archived: {\n type: 'boolean',\n description: 'Whether the domain is archived.'\n },\n createdAt: {\n type: 'string',\n description: 'The date the domain was created.'\n },\n expiredUrl: {\n type: 'string',\n description: 'The URL to redirect to when a link under this domain has expired.'\n },\n placeholder: {\n type: 'string',\n description: 'Provide context to your teammates in the link creation modal by showing them an example of a link to be shortened.'\n },\n primary: {\n type: 'boolean',\n description: 'Whether the domain is the primary domain for the project.'\n },\n slug: {\n type: 'string',\n description: 'The domain name.'\n },\n updatedAt: {\n type: 'string',\n description: 'The date the domain was last updated.'\n },\n verified: {\n type: 'boolean',\n description: 'Whether the domain is verified.'\n }\n },\n required: [ 'id',\n 'archived',\n 'createdAt',\n 'expiredUrl',\n 'placeholder',\n 'primary',\n 'slug',\n 'updatedAt',\n 'verified'\n ]\n }\n }\n}\n```",
|
|
14
|
+
description: "When using this tool, always use the `jq_filter` parameter to reduce the response size and improve performance.\n\nOnly omit if you're sure you don't need the data.\n\nCreate a domain for the authenticated workspace.\n\n# Response Schema\n```json\n{\n $ref: '#/$defs/domain',\n $defs: {\n domain: {\n type: 'object',\n properties: {\n id: {\n type: 'string',\n description: 'The unique identifier of the domain.'\n },\n archived: {\n type: 'boolean',\n description: 'Whether the domain is archived.'\n },\n createdAt: {\n type: 'string',\n description: 'The date the domain was created.'\n },\n expiredUrl: {\n type: 'string',\n description: 'The URL to redirect to when a link under this domain has expired.'\n },\n placeholder: {\n type: 'string',\n description: 'Provide context to your teammates in the link creation modal by showing them an example of a link to be shortened.'\n },\n primary: {\n type: 'boolean',\n description: 'Whether the domain is the primary domain for the project.'\n },\n slug: {\n type: 'string',\n description: 'The domain name.'\n },\n target: {\n type: 'string',\n description: 'The target URL to redirect to when accessing the domain root.'\n },\n type: {\n type: 'string',\n description: 'The behavior type for the domain root redirect.',\n enum: [ 'redirect',\n 'rewrite'\n ]\n },\n updatedAt: {\n type: 'string',\n description: 'The date the domain was last updated.'\n },\n verified: {\n type: 'boolean',\n description: 'Whether the domain is verified.'\n }\n },\n required: [ 'id',\n 'archived',\n 'createdAt',\n 'expiredUrl',\n 'placeholder',\n 'primary',\n 'slug',\n 'target',\n 'type',\n 'updatedAt',\n 'verified'\n ]\n }\n }\n}\n```",
|
|
15
15
|
inputSchema: {
|
|
16
16
|
type: 'object',
|
|
17
17
|
properties: {
|
|
@@ -31,6 +31,15 @@ export const tool = {
|
|
|
31
31
|
type: 'string',
|
|
32
32
|
description: 'Provide context to your teammates in the link creation modal by showing them an example of a link to be shortened.',
|
|
33
33
|
},
|
|
34
|
+
target: {
|
|
35
|
+
type: 'string',
|
|
36
|
+
description: 'The target URL to redirect to when accessing the domain root.',
|
|
37
|
+
},
|
|
38
|
+
type: {
|
|
39
|
+
type: 'string',
|
|
40
|
+
description: 'The behavior type for the domain root redirect.',
|
|
41
|
+
enum: ['redirect', 'rewrite'],
|
|
42
|
+
},
|
|
34
43
|
jq_filter: {
|
|
35
44
|
type: 'string',
|
|
36
45
|
title: 'jq Filter',
|
|
@@ -43,7 +52,15 @@ export const tool = {
|
|
|
43
52
|
};
|
|
44
53
|
export const handler = async (client, args) => {
|
|
45
54
|
const { jq_filter, ...body } = args;
|
|
46
|
-
|
|
55
|
+
try {
|
|
56
|
+
return asTextContentResult(await maybeFilter(jq_filter, await client.domains.create(body)));
|
|
57
|
+
}
|
|
58
|
+
catch (error) {
|
|
59
|
+
if (isJqError(error)) {
|
|
60
|
+
return asErrorResult(error.message);
|
|
61
|
+
}
|
|
62
|
+
throw error;
|
|
63
|
+
}
|
|
47
64
|
};
|
|
48
65
|
export default { metadata, tool, handler };
|
|
49
66
|
//# sourceMappingURL=create-domains.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-domains.mjs","sourceRoot":"","sources":["../../src/tools/domains/create-domains.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE,MAAM,0BAA0B;
|
|
1
|
+
{"version":3,"file":"create-domains.mjs","sourceRoot":"","sources":["../../src/tools/domains/create-domains.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,0BAA0B;OAC1D,EAAY,aAAa,EAAE,mBAAmB,EAAE,MAAM,4BAA4B;AAKzF,MAAM,CAAC,MAAM,QAAQ,GAAa;IAChC,QAAQ,EAAE,SAAS;IACnB,SAAS,EAAE,OAAO;IAClB,IAAI,EAAE,EAAE;IACR,UAAU,EAAE,MAAM;IAClB,QAAQ,EAAE,UAAU;IACpB,WAAW,EAAE,cAAc;CAC5B,CAAC;AAEF,MAAM,CAAC,MAAM,IAAI,GAAS;IACxB,IAAI,EAAE,gBAAgB;IACtB,WAAW,EACT,ooEAAooE;IACtoE,WAAW,EAAE;QACX,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACV,IAAI,EAAE;gBACJ,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,qBAAqB;aACnC;YACD,QAAQ,EAAE;gBACR,IAAI,EAAE,SAAS;gBACf,WAAW,EAAE,sFAAsF;aACpG;YACD,UAAU,EAAE;gBACV,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,+EAA+E;aAC7F;YACD,WAAW,EAAE;gBACX,IAAI,EAAE,QAAQ;gBACd,WAAW,EACT,oHAAoH;aACvH;YACD,MAAM,EAAE;gBACN,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,+DAA+D;aAC7E;YACD,IAAI,EAAE;gBACJ,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,iDAAiD;gBAC9D,IAAI,EAAE,CAAC,UAAU,EAAE,SAAS,CAAC;aAC9B;YACD,SAAS,EAAE;gBACT,IAAI,EAAE,QAAQ;gBACd,KAAK,EAAE,WAAW;gBAClB,WAAW,EACT,kWAAkW;aACrW;SACF;QACD,QAAQ,EAAE,CAAC,MAAM,CAAC;KACnB;IACD,WAAW,EAAE,EAAE;CAChB,CAAC;AAEF,MAAM,CAAC,MAAM,OAAO,GAAG,KAAK,EAAE,MAAc,EAAE,IAAyC,EAAE,EAAE;IACzF,MAAM,EAAE,SAAS,EAAE,GAAG,IAAI,EAAE,GAAG,IAAW,CAAC;IAC3C,IAAI,CAAC;QACH,OAAO,mBAAmB,CAAC,MAAM,WAAW,CAAC,SAAS,EAAE,MAAM,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAC9F,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,IAAI,SAAS,CAAC,KAAK,CAAC,EAAE,CAAC;YACrB,OAAO,aAAa,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;QACtC,CAAC;QACD,MAAM,KAAK,CAAC;IACd,CAAC;AACH,CAAC,CAAC;AAEF,eAAe,EAAE,QAAQ,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"delete-domains.d.mts","sourceRoot":"","sources":["../../src/tools/domains/delete-domains.ts"],"names":[],"mappings":"OAGO,EAAE,QAAQ,
|
|
1
|
+
{"version":3,"file":"delete-domains.d.mts","sourceRoot":"","sources":["../../src/tools/domains/delete-domains.ts"],"names":[],"mappings":"OAGO,EAAE,QAAQ,EAAsC,MAAM,4BAA4B;OAElF,EAAE,IAAI,EAAE,MAAM,oCAAoC;OAClD,MAAM,MAAM,YAAY;AAE/B,eAAO,MAAM,QAAQ,EAAE,QAOtB,CAAC;AAEF,eAAO,MAAM,IAAI,EAAE,IAuBlB,CAAC;AAEF,eAAO,MAAM,OAAO,GAAU,QAAQ,MAAM,EAAE,MAAM,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,iEAUtF,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;sBAVoC,MAAM,QAAQ,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS;;AAYvF,wBAA2C"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"delete-domains.d.ts","sourceRoot":"","sources":["../../src/tools/domains/delete-domains.ts"],"names":[],"mappings":"OAGO,EAAE,QAAQ,
|
|
1
|
+
{"version":3,"file":"delete-domains.d.ts","sourceRoot":"","sources":["../../src/tools/domains/delete-domains.ts"],"names":[],"mappings":"OAGO,EAAE,QAAQ,EAAsC,MAAM,4BAA4B;OAElF,EAAE,IAAI,EAAE,MAAM,oCAAoC;OAClD,MAAM,MAAM,YAAY;AAE/B,eAAO,MAAM,QAAQ,EAAE,QAOtB,CAAC;AAEF,eAAO,MAAM,IAAI,EAAE,IAuBlB,CAAC;AAEF,eAAO,MAAM,OAAO,GAAU,QAAQ,MAAM,EAAE,MAAM,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,iEAUtF,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;sBAVoC,MAAM,QAAQ,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS;;AAYvF,wBAA2C"}
|
|
@@ -36,7 +36,15 @@ exports.tool = {
|
|
|
36
36
|
};
|
|
37
37
|
const handler = async (client, args) => {
|
|
38
38
|
const { slug, jq_filter, ...body } = args;
|
|
39
|
-
|
|
39
|
+
try {
|
|
40
|
+
return (0, types_1.asTextContentResult)(await (0, filtering_1.maybeFilter)(jq_filter, await client.domains.delete(slug)));
|
|
41
|
+
}
|
|
42
|
+
catch (error) {
|
|
43
|
+
if ((0, filtering_1.isJqError)(error)) {
|
|
44
|
+
return (0, types_1.asErrorResult)(error.message);
|
|
45
|
+
}
|
|
46
|
+
throw error;
|
|
47
|
+
}
|
|
40
48
|
};
|
|
41
49
|
exports.handler = handler;
|
|
42
50
|
exports.default = { metadata: exports.metadata, tool: exports.tool, handler: exports.handler };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"delete-domains.js","sourceRoot":"","sources":["../../src/tools/domains/delete-domains.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,
|
|
1
|
+
{"version":3,"file":"delete-domains.js","sourceRoot":"","sources":["../../src/tools/domains/delete-domains.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,wDAAkE;AAClE,sDAA0F;AAK7E,QAAA,QAAQ,GAAa;IAChC,QAAQ,EAAE,SAAS;IACnB,SAAS,EAAE,OAAO;IAClB,IAAI,EAAE,EAAE;IACR,UAAU,EAAE,QAAQ;IACpB,QAAQ,EAAE,iBAAiB;IAC3B,WAAW,EAAE,cAAc;CAC5B,CAAC;AAEW,QAAA,IAAI,GAAS;IACxB,IAAI,EAAE,gBAAgB;IACtB,WAAW,EACT,6mBAA6mB;IAC/mB,WAAW,EAAE;QACX,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACV,IAAI,EAAE;gBACJ,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,kBAAkB;aAChC;YACD,SAAS,EAAE;gBACT,IAAI,EAAE,QAAQ;gBACd,KAAK,EAAE,WAAW;gBAClB,WAAW,EACT,kWAAkW;aACrW;SACF;QACD,QAAQ,EAAE,CAAC,MAAM,CAAC;KACnB;IACD,WAAW,EAAE;QACX,cAAc,EAAE,IAAI;KACrB;CACF,CAAC;AAEK,MAAM,OAAO,GAAG,KAAK,EAAE,MAAc,EAAE,IAAyC,EAAE,EAAE;IACzF,MAAM,EAAE,IAAI,EAAE,SAAS,EAAE,GAAG,IAAI,EAAE,GAAG,IAAW,CAAC;IACjD,IAAI,CAAC;QACH,OAAO,IAAA,2BAAmB,EAAC,MAAM,IAAA,uBAAW,EAAC,SAAS,EAAE,MAAM,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAC9F,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,IAAI,IAAA,qBAAS,EAAC,KAAK,CAAC,EAAE,CAAC;YACrB,OAAO,IAAA,qBAAa,EAAC,KAAK,CAAC,OAAO,CAAC,CAAC;QACtC,CAAC;QACD,MAAM,KAAK,CAAC;IACd,CAAC;AACH,CAAC,CAAC;AAVW,QAAA,OAAO,WAUlB;AAEF,kBAAe,EAAE,QAAQ,EAAR,gBAAQ,EAAE,IAAI,EAAJ,YAAI,EAAE,OAAO,EAAP,eAAO,EAAE,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
-
import { maybeFilter } from '@codeqr/ts-mcp/filtering';
|
|
3
|
-
import { asTextContentResult } from '@codeqr/ts-mcp/tools/types';
|
|
2
|
+
import { isJqError, maybeFilter } from '@codeqr/ts-mcp/filtering';
|
|
3
|
+
import { asErrorResult, asTextContentResult } from '@codeqr/ts-mcp/tools/types';
|
|
4
4
|
export const metadata = {
|
|
5
5
|
resource: 'domains',
|
|
6
6
|
operation: 'write',
|
|
@@ -33,7 +33,15 @@ export const tool = {
|
|
|
33
33
|
};
|
|
34
34
|
export const handler = async (client, args) => {
|
|
35
35
|
const { slug, jq_filter, ...body } = args;
|
|
36
|
-
|
|
36
|
+
try {
|
|
37
|
+
return asTextContentResult(await maybeFilter(jq_filter, await client.domains.delete(slug)));
|
|
38
|
+
}
|
|
39
|
+
catch (error) {
|
|
40
|
+
if (isJqError(error)) {
|
|
41
|
+
return asErrorResult(error.message);
|
|
42
|
+
}
|
|
43
|
+
throw error;
|
|
44
|
+
}
|
|
37
45
|
};
|
|
38
46
|
export default { metadata, tool, handler };
|
|
39
47
|
//# sourceMappingURL=delete-domains.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"delete-domains.mjs","sourceRoot":"","sources":["../../src/tools/domains/delete-domains.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE,MAAM,0BAA0B;
|
|
1
|
+
{"version":3,"file":"delete-domains.mjs","sourceRoot":"","sources":["../../src/tools/domains/delete-domains.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,0BAA0B;OAC1D,EAAY,aAAa,EAAE,mBAAmB,EAAE,MAAM,4BAA4B;AAKzF,MAAM,CAAC,MAAM,QAAQ,GAAa;IAChC,QAAQ,EAAE,SAAS;IACnB,SAAS,EAAE,OAAO;IAClB,IAAI,EAAE,EAAE;IACR,UAAU,EAAE,QAAQ;IACpB,QAAQ,EAAE,iBAAiB;IAC3B,WAAW,EAAE,cAAc;CAC5B,CAAC;AAEF,MAAM,CAAC,MAAM,IAAI,GAAS;IACxB,IAAI,EAAE,gBAAgB;IACtB,WAAW,EACT,6mBAA6mB;IAC/mB,WAAW,EAAE;QACX,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACV,IAAI,EAAE;gBACJ,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,kBAAkB;aAChC;YACD,SAAS,EAAE;gBACT,IAAI,EAAE,QAAQ;gBACd,KAAK,EAAE,WAAW;gBAClB,WAAW,EACT,kWAAkW;aACrW;SACF;QACD,QAAQ,EAAE,CAAC,MAAM,CAAC;KACnB;IACD,WAAW,EAAE;QACX,cAAc,EAAE,IAAI;KACrB;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,OAAO,GAAG,KAAK,EAAE,MAAc,EAAE,IAAyC,EAAE,EAAE;IACzF,MAAM,EAAE,IAAI,EAAE,SAAS,EAAE,GAAG,IAAI,EAAE,GAAG,IAAW,CAAC;IACjD,IAAI,CAAC;QACH,OAAO,mBAAmB,CAAC,MAAM,WAAW,CAAC,SAAS,EAAE,MAAM,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAC9F,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,IAAI,SAAS,CAAC,KAAK,CAAC,EAAE,CAAC;YACrB,OAAO,aAAa,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;QACtC,CAAC;QACD,MAAM,KAAK,CAAC;IACd,CAAC;AACH,CAAC,CAAC;AAEF,eAAe,EAAE,QAAQ,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"list-domains.d.mts","sourceRoot":"","sources":["../../src/tools/domains/list-domains.ts"],"names":[],"mappings":"OAGO,EAAE,QAAQ,
|
|
1
|
+
{"version":3,"file":"list-domains.d.mts","sourceRoot":"","sources":["../../src/tools/domains/list-domains.ts"],"names":[],"mappings":"OAGO,EAAE,QAAQ,EAAsC,MAAM,4BAA4B;OAElF,EAAE,IAAI,EAAE,MAAM,oCAAoC;OAClD,MAAM,MAAM,YAAY;AAE/B,eAAO,MAAM,QAAQ,EAAE,QAOtB,CAAC;AAEF,eAAO,MAAM,IAAI,EAAE,IAoClB,CAAC;AAEF,eAAO,MAAM,OAAO,GAAU,QAAQ,MAAM,EAAE,MAAM,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,iEAUtF,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;sBAVoC,MAAM,QAAQ,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS;;AAYvF,wBAA2C"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"list-domains.d.ts","sourceRoot":"","sources":["../../src/tools/domains/list-domains.ts"],"names":[],"mappings":"OAGO,EAAE,QAAQ,
|
|
1
|
+
{"version":3,"file":"list-domains.d.ts","sourceRoot":"","sources":["../../src/tools/domains/list-domains.ts"],"names":[],"mappings":"OAGO,EAAE,QAAQ,EAAsC,MAAM,4BAA4B;OAElF,EAAE,IAAI,EAAE,MAAM,oCAAoC;OAClD,MAAM,MAAM,YAAY;AAE/B,eAAO,MAAM,QAAQ,EAAE,QAOtB,CAAC;AAEF,eAAO,MAAM,IAAI,EAAE,IAoClB,CAAC;AAEF,eAAO,MAAM,OAAO,GAAU,QAAQ,MAAM,EAAE,MAAM,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,iEAUtF,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;sBAVoC,MAAM,QAAQ,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS;;AAYvF,wBAA2C"}
|
|
@@ -14,7 +14,7 @@ exports.metadata = {
|
|
|
14
14
|
};
|
|
15
15
|
exports.tool = {
|
|
16
16
|
name: 'list_domains',
|
|
17
|
-
description: "When using this tool, always use the `jq_filter` parameter to reduce the response size and improve performance.\n\nOnly omit if you're sure you don't need the data.\n\nRetrieve a list of domains associated with the authenticated workspace.\n\n# Response Schema\n```json\n{\n $ref: '#/$defs/domain_list_response',\n $defs: {\n domain_list_response: {\n type: 'array',\n items: {\n $ref: '#/$defs/domain'\n }\n },\n domain: {\n type: 'object',\n properties: {\n id: {\n type: 'string',\n description: 'The unique identifier of the domain.'\n },\n archived: {\n type: 'boolean',\n description: 'Whether the domain is archived.'\n },\n createdAt: {\n type: 'string',\n description: 'The date the domain was created.'\n },\n expiredUrl: {\n type: 'string',\n description: 'The URL to redirect to when a link under this domain has expired.'\n },\n placeholder: {\n type: 'string',\n description: 'Provide context to your teammates in the link creation modal by showing them an example of a link to be shortened.'\n },\n primary: {\n type: 'boolean',\n description: 'Whether the domain is the primary domain for the project.'\n },\n slug: {\n type: 'string',\n description: 'The domain name.'\n },\n updatedAt: {\n type: 'string',\n description: 'The date the domain was last updated.'\n },\n verified: {\n type: 'boolean',\n description: 'Whether the domain is verified.'\n }\n },\n required: [ 'id',\n 'archived',\n 'createdAt',\n 'expiredUrl',\n 'placeholder',\n 'primary',\n 'slug',\n 'updatedAt',\n 'verified'\n ]\n }\n }\n}\n```",
|
|
17
|
+
description: "When using this tool, always use the `jq_filter` parameter to reduce the response size and improve performance.\n\nOnly omit if you're sure you don't need the data.\n\nRetrieve a list of domains associated with the authenticated workspace.\n\n# Response Schema\n```json\n{\n $ref: '#/$defs/domain_list_response',\n $defs: {\n domain_list_response: {\n type: 'array',\n items: {\n $ref: '#/$defs/domain'\n }\n },\n domain: {\n type: 'object',\n properties: {\n id: {\n type: 'string',\n description: 'The unique identifier of the domain.'\n },\n archived: {\n type: 'boolean',\n description: 'Whether the domain is archived.'\n },\n createdAt: {\n type: 'string',\n description: 'The date the domain was created.'\n },\n expiredUrl: {\n type: 'string',\n description: 'The URL to redirect to when a link under this domain has expired.'\n },\n placeholder: {\n type: 'string',\n description: 'Provide context to your teammates in the link creation modal by showing them an example of a link to be shortened.'\n },\n primary: {\n type: 'boolean',\n description: 'Whether the domain is the primary domain for the project.'\n },\n slug: {\n type: 'string',\n description: 'The domain name.'\n },\n target: {\n type: 'string',\n description: 'The target URL to redirect to when accessing the domain root.'\n },\n type: {\n type: 'string',\n description: 'The behavior type for the domain root redirect.',\n enum: [ 'redirect',\n 'rewrite'\n ]\n },\n updatedAt: {\n type: 'string',\n description: 'The date the domain was last updated.'\n },\n verified: {\n type: 'boolean',\n description: 'Whether the domain is verified.'\n }\n },\n required: [ 'id',\n 'archived',\n 'createdAt',\n 'expiredUrl',\n 'placeholder',\n 'primary',\n 'slug',\n 'target',\n 'type',\n 'updatedAt',\n 'verified'\n ]\n }\n }\n}\n```",
|
|
18
18
|
inputSchema: {
|
|
19
19
|
type: 'object',
|
|
20
20
|
properties: {
|
|
@@ -48,7 +48,15 @@ exports.tool = {
|
|
|
48
48
|
};
|
|
49
49
|
const handler = async (client, args) => {
|
|
50
50
|
const { jq_filter, ...body } = args;
|
|
51
|
-
|
|
51
|
+
try {
|
|
52
|
+
return (0, types_1.asTextContentResult)(await (0, filtering_1.maybeFilter)(jq_filter, await client.domains.list(body)));
|
|
53
|
+
}
|
|
54
|
+
catch (error) {
|
|
55
|
+
if ((0, filtering_1.isJqError)(error)) {
|
|
56
|
+
return (0, types_1.asErrorResult)(error.message);
|
|
57
|
+
}
|
|
58
|
+
throw error;
|
|
59
|
+
}
|
|
52
60
|
};
|
|
53
61
|
exports.handler = handler;
|
|
54
62
|
exports.default = { metadata: exports.metadata, tool: exports.tool, handler: exports.handler };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"list-domains.js","sourceRoot":"","sources":["../../src/tools/domains/list-domains.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,
|
|
1
|
+
{"version":3,"file":"list-domains.js","sourceRoot":"","sources":["../../src/tools/domains/list-domains.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,wDAAkE;AAClE,sDAA0F;AAK7E,QAAA,QAAQ,GAAa;IAChC,QAAQ,EAAE,SAAS;IACnB,SAAS,EAAE,MAAM;IACjB,IAAI,EAAE,EAAE;IACR,UAAU,EAAE,KAAK;IACjB,QAAQ,EAAE,UAAU;IACpB,WAAW,EAAE,aAAa;CAC3B,CAAC;AAEW,QAAA,IAAI,GAAS;IACxB,IAAI,EAAE,cAAc;IACpB,WAAW,EACT,6xEAA6xE;IAC/xE,WAAW,EAAE;QACX,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACV,QAAQ,EAAE;gBACR,IAAI,EAAE,SAAS;gBACf,WAAW,EACT,2FAA2F;aAC9F;YACD,IAAI,EAAE;gBACJ,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,iCAAiC;aAC/C;YACD,QAAQ,EAAE;gBACR,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,+BAA+B;aAC7C;YACD,MAAM,EAAE;gBACN,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,2CAA2C;aACzD;YACD,SAAS,EAAE;gBACT,IAAI,EAAE,QAAQ;gBACd,KAAK,EAAE,WAAW;gBAClB,WAAW,EACT,kWAAkW;aACrW;SACF;QACD,QAAQ,EAAE,EAAE;KACb;IACD,WAAW,EAAE;QACX,YAAY,EAAE,IAAI;KACnB;CACF,CAAC;AAEK,MAAM,OAAO,GAAG,KAAK,EAAE,MAAc,EAAE,IAAyC,EAAE,EAAE;IACzF,MAAM,EAAE,SAAS,EAAE,GAAG,IAAI,EAAE,GAAG,IAAW,CAAC;IAC3C,IAAI,CAAC;QACH,OAAO,IAAA,2BAAmB,EAAC,MAAM,IAAA,uBAAW,EAAC,SAAS,EAAE,MAAM,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAC5F,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,IAAI,IAAA,qBAAS,EAAC,KAAK,CAAC,EAAE,CAAC;YACrB,OAAO,IAAA,qBAAa,EAAC,KAAK,CAAC,OAAO,CAAC,CAAC;QACtC,CAAC;QACD,MAAM,KAAK,CAAC;IACd,CAAC;AACH,CAAC,CAAC;AAVW,QAAA,OAAO,WAUlB;AAEF,kBAAe,EAAE,QAAQ,EAAR,gBAAQ,EAAE,IAAI,EAAJ,YAAI,EAAE,OAAO,EAAP,eAAO,EAAE,CAAC"}
|