@wildix/wim-tools-client 1.0.1 → 1.0.6
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-cjs/models/models_0.js +10 -1
- package/dist-es/models/models_0.js +9 -0
- package/dist-types/commands/CreateToolCommand.d.ts +12 -0
- package/dist-types/commands/GetToolCommand.d.ts +6 -0
- package/dist-types/commands/ListToolsCommand.d.ts +6 -0
- package/dist-types/commands/UpdateToolCommand.d.ts +12 -0
- package/dist-types/models/models_0.d.ts +53 -3
- package/package.json +2 -2
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ToolExecutionServerException = exports.ToolExecutionException = exports.ToolVariableType = exports.ToolHandler = exports.ToolWebhookMethod = exports.ToolWebhookAuth = exports.ToolMcpAuthorization = exports.ToolEmailHandler = exports.ToolChatRecipient = exports.ValidationException = exports.UnauthorizedException = exports.NotFoundException = exports.ForbiddenException = exports.AlreadyExistException = void 0;
|
|
3
|
+
exports.ToolExecutionServerException = exports.ToolExecutionException = exports.ToolVariableType = exports.ToolHandler = exports.ToolWebhookMethod = exports.ToolWebhookAuth = exports.ToolMcpAuthorization = exports.ToolEmailHandler = exports.ToolChatRecipient = exports.ToolCalendarOperation = exports.ValidationException = exports.UnauthorizedException = exports.NotFoundException = exports.ForbiddenException = exports.AlreadyExistException = void 0;
|
|
4
4
|
const ToolsServiceException_1 = require("./ToolsServiceException");
|
|
5
5
|
class AlreadyExistException extends ToolsServiceException_1.ToolsServiceException {
|
|
6
6
|
name = "AlreadyExistException";
|
|
@@ -67,6 +67,13 @@ class ValidationException extends ToolsServiceException_1.ToolsServiceException
|
|
|
67
67
|
}
|
|
68
68
|
}
|
|
69
69
|
exports.ValidationException = ValidationException;
|
|
70
|
+
exports.ToolCalendarOperation = {
|
|
71
|
+
CANCEL: "cancel",
|
|
72
|
+
GET_SLOTS: "get_slots",
|
|
73
|
+
LIST_RESOURCE_EVENTS: "list_resource_events",
|
|
74
|
+
RESCHEDULE: "reschedule",
|
|
75
|
+
SCHEDULE: "schedule",
|
|
76
|
+
};
|
|
70
77
|
var ToolChatRecipient;
|
|
71
78
|
(function (ToolChatRecipient) {
|
|
72
79
|
ToolChatRecipient.visit = (value, visitor) => {
|
|
@@ -129,6 +136,8 @@ var ToolHandler;
|
|
|
129
136
|
return visitor.chat(value.chat);
|
|
130
137
|
if (value.sms !== undefined)
|
|
131
138
|
return visitor.sms(value.sms);
|
|
139
|
+
if (value.calendar !== undefined)
|
|
140
|
+
return visitor.calendar(value.calendar);
|
|
132
141
|
if (value.mcp !== undefined)
|
|
133
142
|
return visitor.mcp(value.mcp);
|
|
134
143
|
if (value.mcpTool !== undefined)
|
|
@@ -59,6 +59,13 @@ export class ValidationException extends __BaseException {
|
|
|
59
59
|
Object.setPrototypeOf(this, ValidationException.prototype);
|
|
60
60
|
}
|
|
61
61
|
}
|
|
62
|
+
export const ToolCalendarOperation = {
|
|
63
|
+
CANCEL: "cancel",
|
|
64
|
+
GET_SLOTS: "get_slots",
|
|
65
|
+
LIST_RESOURCE_EVENTS: "list_resource_events",
|
|
66
|
+
RESCHEDULE: "reschedule",
|
|
67
|
+
SCHEDULE: "schedule",
|
|
68
|
+
};
|
|
62
69
|
export var ToolChatRecipient;
|
|
63
70
|
(function (ToolChatRecipient) {
|
|
64
71
|
ToolChatRecipient.visit = (value, visitor) => {
|
|
@@ -121,6 +128,8 @@ export var ToolHandler;
|
|
|
121
128
|
return visitor.chat(value.chat);
|
|
122
129
|
if (value.sms !== undefined)
|
|
123
130
|
return visitor.sms(value.sms);
|
|
131
|
+
if (value.calendar !== undefined)
|
|
132
|
+
return visitor.calendar(value.calendar);
|
|
124
133
|
if (value.mcp !== undefined)
|
|
125
134
|
return visitor.mcp(value.mcp);
|
|
126
135
|
if (value.mcpTool !== undefined)
|
|
@@ -106,6 +106,9 @@ declare const CreateToolCommand_base: {
|
|
|
106
106
|
* includeDomains: [ // ToolSearchIncludeDomainsList
|
|
107
107
|
* "STRING_VALUE",
|
|
108
108
|
* ],
|
|
109
|
+
* excludeDomains: [ // ToolSearchExcludeDomainsList
|
|
110
|
+
* "STRING_VALUE",
|
|
111
|
+
* ],
|
|
109
112
|
* },
|
|
110
113
|
* chat: { // ToolChatHandler
|
|
111
114
|
* config: { // ToolChatConfig
|
|
@@ -124,6 +127,9 @@ declare const CreateToolCommand_base: {
|
|
|
124
127
|
* message: "STRING_VALUE", // required
|
|
125
128
|
* },
|
|
126
129
|
* },
|
|
130
|
+
* calendar: { // ToolCalendarConfig
|
|
131
|
+
* operation: "get_slots" || "schedule" || "reschedule" || "cancel" || "list_resource_events", // required
|
|
132
|
+
* },
|
|
127
133
|
* mcp: { // ToolMcpHandler
|
|
128
134
|
* serverUrl: "STRING_VALUE", // required
|
|
129
135
|
* authorization: { // ToolMcpAuthorization Union: only one key present
|
|
@@ -220,6 +226,9 @@ declare const CreateToolCommand_base: {
|
|
|
220
226
|
* // includeDomains: [ // ToolSearchIncludeDomainsList
|
|
221
227
|
* // "STRING_VALUE",
|
|
222
228
|
* // ],
|
|
229
|
+
* // excludeDomains: [ // ToolSearchExcludeDomainsList
|
|
230
|
+
* // "STRING_VALUE",
|
|
231
|
+
* // ],
|
|
223
232
|
* // },
|
|
224
233
|
* // chat: { // ToolChatHandler
|
|
225
234
|
* // config: { // ToolChatConfig
|
|
@@ -238,6 +247,9 @@ declare const CreateToolCommand_base: {
|
|
|
238
247
|
* // message: "STRING_VALUE", // required
|
|
239
248
|
* // },
|
|
240
249
|
* // },
|
|
250
|
+
* // calendar: { // ToolCalendarConfig
|
|
251
|
+
* // operation: "get_slots" || "schedule" || "reschedule" || "cancel" || "list_resource_events", // required
|
|
252
|
+
* // },
|
|
241
253
|
* // mcp: { // ToolMcpHandler
|
|
242
254
|
* // serverUrl: "STRING_VALUE", // required
|
|
243
255
|
* // authorization: { // ToolMcpAuthorization Union: only one key present
|
|
@@ -114,6 +114,9 @@ declare const GetToolCommand_base: {
|
|
|
114
114
|
* // includeDomains: [ // ToolSearchIncludeDomainsList
|
|
115
115
|
* // "STRING_VALUE",
|
|
116
116
|
* // ],
|
|
117
|
+
* // excludeDomains: [ // ToolSearchExcludeDomainsList
|
|
118
|
+
* // "STRING_VALUE",
|
|
119
|
+
* // ],
|
|
117
120
|
* // },
|
|
118
121
|
* // chat: { // ToolChatHandler
|
|
119
122
|
* // config: { // ToolChatConfig
|
|
@@ -132,6 +135,9 @@ declare const GetToolCommand_base: {
|
|
|
132
135
|
* // message: "STRING_VALUE", // required
|
|
133
136
|
* // },
|
|
134
137
|
* // },
|
|
138
|
+
* // calendar: { // ToolCalendarConfig
|
|
139
|
+
* // operation: "get_slots" || "schedule" || "reschedule" || "cancel" || "list_resource_events", // required
|
|
140
|
+
* // },
|
|
135
141
|
* // mcp: { // ToolMcpHandler
|
|
136
142
|
* // serverUrl: "STRING_VALUE", // required
|
|
137
143
|
* // authorization: { // ToolMcpAuthorization Union: only one key present
|
|
@@ -114,6 +114,9 @@ declare const ListToolsCommand_base: {
|
|
|
114
114
|
* // includeDomains: [ // ToolSearchIncludeDomainsList
|
|
115
115
|
* // "STRING_VALUE",
|
|
116
116
|
* // ],
|
|
117
|
+
* // excludeDomains: [ // ToolSearchExcludeDomainsList
|
|
118
|
+
* // "STRING_VALUE",
|
|
119
|
+
* // ],
|
|
117
120
|
* // },
|
|
118
121
|
* // chat: { // ToolChatHandler
|
|
119
122
|
* // config: { // ToolChatConfig
|
|
@@ -132,6 +135,9 @@ declare const ListToolsCommand_base: {
|
|
|
132
135
|
* // message: "STRING_VALUE", // required
|
|
133
136
|
* // },
|
|
134
137
|
* // },
|
|
138
|
+
* // calendar: { // ToolCalendarConfig
|
|
139
|
+
* // operation: "get_slots" || "schedule" || "reschedule" || "cancel" || "list_resource_events", // required
|
|
140
|
+
* // },
|
|
135
141
|
* // mcp: { // ToolMcpHandler
|
|
136
142
|
* // serverUrl: "STRING_VALUE", // required
|
|
137
143
|
* // authorization: { // ToolMcpAuthorization Union: only one key present
|
|
@@ -107,6 +107,9 @@ declare const UpdateToolCommand_base: {
|
|
|
107
107
|
* includeDomains: [ // ToolSearchIncludeDomainsList
|
|
108
108
|
* "STRING_VALUE",
|
|
109
109
|
* ],
|
|
110
|
+
* excludeDomains: [ // ToolSearchExcludeDomainsList
|
|
111
|
+
* "STRING_VALUE",
|
|
112
|
+
* ],
|
|
110
113
|
* },
|
|
111
114
|
* chat: { // ToolChatHandler
|
|
112
115
|
* config: { // ToolChatConfig
|
|
@@ -125,6 +128,9 @@ declare const UpdateToolCommand_base: {
|
|
|
125
128
|
* message: "STRING_VALUE", // required
|
|
126
129
|
* },
|
|
127
130
|
* },
|
|
131
|
+
* calendar: { // ToolCalendarConfig
|
|
132
|
+
* operation: "get_slots" || "schedule" || "reschedule" || "cancel" || "list_resource_events", // required
|
|
133
|
+
* },
|
|
128
134
|
* mcp: { // ToolMcpHandler
|
|
129
135
|
* serverUrl: "STRING_VALUE", // required
|
|
130
136
|
* authorization: { // ToolMcpAuthorization Union: only one key present
|
|
@@ -221,6 +227,9 @@ declare const UpdateToolCommand_base: {
|
|
|
221
227
|
* // includeDomains: [ // ToolSearchIncludeDomainsList
|
|
222
228
|
* // "STRING_VALUE",
|
|
223
229
|
* // ],
|
|
230
|
+
* // excludeDomains: [ // ToolSearchExcludeDomainsList
|
|
231
|
+
* // "STRING_VALUE",
|
|
232
|
+
* // ],
|
|
224
233
|
* // },
|
|
225
234
|
* // chat: { // ToolChatHandler
|
|
226
235
|
* // config: { // ToolChatConfig
|
|
@@ -239,6 +248,9 @@ declare const UpdateToolCommand_base: {
|
|
|
239
248
|
* // message: "STRING_VALUE", // required
|
|
240
249
|
* // },
|
|
241
250
|
* // },
|
|
251
|
+
* // calendar: { // ToolCalendarConfig
|
|
252
|
+
* // operation: "get_slots" || "schedule" || "reschedule" || "cancel" || "list_resource_events", // required
|
|
253
|
+
* // },
|
|
242
254
|
* // mcp: { // ToolMcpHandler
|
|
243
255
|
* // serverUrl: "STRING_VALUE", // required
|
|
244
256
|
* // authorization: { // ToolMcpAuthorization Union: only one key present
|
|
@@ -56,6 +56,31 @@ export declare class ValidationException extends __BaseException {
|
|
|
56
56
|
*/
|
|
57
57
|
constructor(opts: __ExceptionOptionType<ValidationException, __BaseException>);
|
|
58
58
|
}
|
|
59
|
+
/**
|
|
60
|
+
* @public
|
|
61
|
+
* @enum
|
|
62
|
+
*/
|
|
63
|
+
export declare const ToolCalendarOperation: {
|
|
64
|
+
readonly CANCEL: "cancel";
|
|
65
|
+
readonly GET_SLOTS: "get_slots";
|
|
66
|
+
readonly LIST_RESOURCE_EVENTS: "list_resource_events";
|
|
67
|
+
readonly RESCHEDULE: "reschedule";
|
|
68
|
+
readonly SCHEDULE: "schedule";
|
|
69
|
+
};
|
|
70
|
+
/**
|
|
71
|
+
* @public
|
|
72
|
+
*/
|
|
73
|
+
export type ToolCalendarOperation = typeof ToolCalendarOperation[keyof typeof ToolCalendarOperation];
|
|
74
|
+
/**
|
|
75
|
+
* @public
|
|
76
|
+
*/
|
|
77
|
+
export interface ToolCalendarConfig {
|
|
78
|
+
/**
|
|
79
|
+
* Calendar operation executed by the tool. Use separate tools per operation and keep the operation fixed in the handler instead of passing it in runtime input.
|
|
80
|
+
* @public
|
|
81
|
+
*/
|
|
82
|
+
operation: ToolCalendarOperation;
|
|
83
|
+
}
|
|
59
84
|
/**
|
|
60
85
|
* @public
|
|
61
86
|
*/
|
|
@@ -355,7 +380,7 @@ export interface ToolMcpToolHandler {
|
|
|
355
380
|
mcpToolName: string;
|
|
356
381
|
}
|
|
357
382
|
/**
|
|
358
|
-
* Search handler configuration. API key comes from AppConfig; query comes from tool input. Optionally
|
|
383
|
+
* Search handler configuration. API key comes from AppConfig; query comes from tool input. Optionally refine results using Tavily include_domains and/or exclude_domains (see Tavily domain filtering).
|
|
359
384
|
* @public
|
|
360
385
|
*/
|
|
361
386
|
export interface ToolSearchConfig {
|
|
@@ -364,6 +389,11 @@ export interface ToolSearchConfig {
|
|
|
364
389
|
* @public
|
|
365
390
|
*/
|
|
366
391
|
includeDomains?: (string)[] | undefined;
|
|
392
|
+
/**
|
|
393
|
+
* When non-empty, omit results from these domains or hosts. Same hostname rules as includeDomains. Can be combined with includeDomains per Tavily API.
|
|
394
|
+
* @public
|
|
395
|
+
*/
|
|
396
|
+
excludeDomains?: (string)[] | undefined;
|
|
367
397
|
}
|
|
368
398
|
/**
|
|
369
399
|
* @public
|
|
@@ -558,7 +588,7 @@ export interface ToolWebhookConfig {
|
|
|
558
588
|
/**
|
|
559
589
|
* @public
|
|
560
590
|
*/
|
|
561
|
-
export type ToolHandler = ToolHandler.ChatMember | ToolHandler.EmailMember | ToolHandler.McpMember | ToolHandler.McpToolMember | ToolHandler.SearchMember | ToolHandler.SmsMember | ToolHandler.WebhookMember | ToolHandler.$UnknownMember;
|
|
591
|
+
export type ToolHandler = ToolHandler.CalendarMember | ToolHandler.ChatMember | ToolHandler.EmailMember | ToolHandler.McpMember | ToolHandler.McpToolMember | ToolHandler.SearchMember | ToolHandler.SmsMember | ToolHandler.WebhookMember | ToolHandler.$UnknownMember;
|
|
562
592
|
/**
|
|
563
593
|
* @public
|
|
564
594
|
*/
|
|
@@ -569,6 +599,7 @@ export declare namespace ToolHandler {
|
|
|
569
599
|
search?: never;
|
|
570
600
|
chat?: never;
|
|
571
601
|
sms?: never;
|
|
602
|
+
calendar?: never;
|
|
572
603
|
mcp?: never;
|
|
573
604
|
mcpTool?: never;
|
|
574
605
|
$unknown?: never;
|
|
@@ -579,12 +610,13 @@ export declare namespace ToolHandler {
|
|
|
579
610
|
search?: never;
|
|
580
611
|
chat?: never;
|
|
581
612
|
sms?: never;
|
|
613
|
+
calendar?: never;
|
|
582
614
|
mcp?: never;
|
|
583
615
|
mcpTool?: never;
|
|
584
616
|
$unknown?: never;
|
|
585
617
|
}
|
|
586
618
|
/**
|
|
587
|
-
* Search handler configuration. API key comes from AppConfig; query comes from tool input. Optionally
|
|
619
|
+
* Search handler configuration. API key comes from AppConfig; query comes from tool input. Optionally refine results using Tavily include_domains and/or exclude_domains (see Tavily domain filtering).
|
|
588
620
|
* @public
|
|
589
621
|
*/
|
|
590
622
|
interface SearchMember {
|
|
@@ -593,6 +625,7 @@ export declare namespace ToolHandler {
|
|
|
593
625
|
search: ToolSearchConfig;
|
|
594
626
|
chat?: never;
|
|
595
627
|
sms?: never;
|
|
628
|
+
calendar?: never;
|
|
596
629
|
mcp?: never;
|
|
597
630
|
mcpTool?: never;
|
|
598
631
|
$unknown?: never;
|
|
@@ -603,6 +636,7 @@ export declare namespace ToolHandler {
|
|
|
603
636
|
search?: never;
|
|
604
637
|
chat: ToolChatHandler;
|
|
605
638
|
sms?: never;
|
|
639
|
+
calendar?: never;
|
|
606
640
|
mcp?: never;
|
|
607
641
|
mcpTool?: never;
|
|
608
642
|
$unknown?: never;
|
|
@@ -613,6 +647,18 @@ export declare namespace ToolHandler {
|
|
|
613
647
|
search?: never;
|
|
614
648
|
chat?: never;
|
|
615
649
|
sms: ToolSmsHandler;
|
|
650
|
+
calendar?: never;
|
|
651
|
+
mcp?: never;
|
|
652
|
+
mcpTool?: never;
|
|
653
|
+
$unknown?: never;
|
|
654
|
+
}
|
|
655
|
+
interface CalendarMember {
|
|
656
|
+
email?: never;
|
|
657
|
+
webhook?: never;
|
|
658
|
+
search?: never;
|
|
659
|
+
chat?: never;
|
|
660
|
+
sms?: never;
|
|
661
|
+
calendar: ToolCalendarConfig;
|
|
616
662
|
mcp?: never;
|
|
617
663
|
mcpTool?: never;
|
|
618
664
|
$unknown?: never;
|
|
@@ -623,6 +669,7 @@ export declare namespace ToolHandler {
|
|
|
623
669
|
search?: never;
|
|
624
670
|
chat?: never;
|
|
625
671
|
sms?: never;
|
|
672
|
+
calendar?: never;
|
|
626
673
|
mcp: ToolMcpHandler;
|
|
627
674
|
mcpTool?: never;
|
|
628
675
|
$unknown?: never;
|
|
@@ -633,6 +680,7 @@ export declare namespace ToolHandler {
|
|
|
633
680
|
search?: never;
|
|
634
681
|
chat?: never;
|
|
635
682
|
sms?: never;
|
|
683
|
+
calendar?: never;
|
|
636
684
|
mcp?: never;
|
|
637
685
|
mcpTool: ToolMcpToolHandler;
|
|
638
686
|
$unknown?: never;
|
|
@@ -646,6 +694,7 @@ export declare namespace ToolHandler {
|
|
|
646
694
|
search?: never;
|
|
647
695
|
chat?: never;
|
|
648
696
|
sms?: never;
|
|
697
|
+
calendar?: never;
|
|
649
698
|
mcp?: never;
|
|
650
699
|
mcpTool?: never;
|
|
651
700
|
$unknown: [string, any];
|
|
@@ -656,6 +705,7 @@ export declare namespace ToolHandler {
|
|
|
656
705
|
search: (value: ToolSearchConfig) => T;
|
|
657
706
|
chat: (value: ToolChatHandler) => T;
|
|
658
707
|
sms: (value: ToolSmsHandler) => T;
|
|
708
|
+
calendar: (value: ToolCalendarConfig) => T;
|
|
659
709
|
mcp: (value: ToolMcpHandler) => T;
|
|
660
710
|
mcpTool: (value: ToolMcpToolHandler) => T;
|
|
661
711
|
_: (name: string, value: any) => T;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wildix/wim-tools-client",
|
|
3
3
|
"description": "@wildix/wim-tools-client client",
|
|
4
|
-
"version": "1.0.
|
|
4
|
+
"version": "1.0.6",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
|
|
7
7
|
"build:cjs": "tsc -p tsconfig.cjs.json",
|
|
@@ -79,4 +79,4 @@
|
|
|
79
79
|
"react-native": {
|
|
80
80
|
"./dist-es/runtimeConfig": "./dist-es/runtimeConfig.native"
|
|
81
81
|
}
|
|
82
|
-
}
|
|
82
|
+
}
|