@wildix/wim-tools-client 1.0.2 → 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 +6 -0
- package/dist-types/commands/GetToolCommand.d.ts +3 -0
- package/dist-types/commands/ListToolsCommand.d.ts +3 -0
- package/dist-types/commands/UpdateToolCommand.d.ts +6 -0
- package/dist-types/models/models_0.d.ts +46 -1
- 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)
|
|
@@ -127,6 +127,9 @@ declare const CreateToolCommand_base: {
|
|
|
127
127
|
* message: "STRING_VALUE", // required
|
|
128
128
|
* },
|
|
129
129
|
* },
|
|
130
|
+
* calendar: { // ToolCalendarConfig
|
|
131
|
+
* operation: "get_slots" || "schedule" || "reschedule" || "cancel" || "list_resource_events", // required
|
|
132
|
+
* },
|
|
130
133
|
* mcp: { // ToolMcpHandler
|
|
131
134
|
* serverUrl: "STRING_VALUE", // required
|
|
132
135
|
* authorization: { // ToolMcpAuthorization Union: only one key present
|
|
@@ -244,6 +247,9 @@ declare const CreateToolCommand_base: {
|
|
|
244
247
|
* // message: "STRING_VALUE", // required
|
|
245
248
|
* // },
|
|
246
249
|
* // },
|
|
250
|
+
* // calendar: { // ToolCalendarConfig
|
|
251
|
+
* // operation: "get_slots" || "schedule" || "reschedule" || "cancel" || "list_resource_events", // required
|
|
252
|
+
* // },
|
|
247
253
|
* // mcp: { // ToolMcpHandler
|
|
248
254
|
* // serverUrl: "STRING_VALUE", // required
|
|
249
255
|
* // authorization: { // ToolMcpAuthorization Union: only one key present
|
|
@@ -135,6 +135,9 @@ declare const GetToolCommand_base: {
|
|
|
135
135
|
* // message: "STRING_VALUE", // required
|
|
136
136
|
* // },
|
|
137
137
|
* // },
|
|
138
|
+
* // calendar: { // ToolCalendarConfig
|
|
139
|
+
* // operation: "get_slots" || "schedule" || "reschedule" || "cancel" || "list_resource_events", // required
|
|
140
|
+
* // },
|
|
138
141
|
* // mcp: { // ToolMcpHandler
|
|
139
142
|
* // serverUrl: "STRING_VALUE", // required
|
|
140
143
|
* // authorization: { // ToolMcpAuthorization Union: only one key present
|
|
@@ -135,6 +135,9 @@ declare const ListToolsCommand_base: {
|
|
|
135
135
|
* // message: "STRING_VALUE", // required
|
|
136
136
|
* // },
|
|
137
137
|
* // },
|
|
138
|
+
* // calendar: { // ToolCalendarConfig
|
|
139
|
+
* // operation: "get_slots" || "schedule" || "reschedule" || "cancel" || "list_resource_events", // required
|
|
140
|
+
* // },
|
|
138
141
|
* // mcp: { // ToolMcpHandler
|
|
139
142
|
* // serverUrl: "STRING_VALUE", // required
|
|
140
143
|
* // authorization: { // ToolMcpAuthorization Union: only one key present
|
|
@@ -128,6 +128,9 @@ declare const UpdateToolCommand_base: {
|
|
|
128
128
|
* message: "STRING_VALUE", // required
|
|
129
129
|
* },
|
|
130
130
|
* },
|
|
131
|
+
* calendar: { // ToolCalendarConfig
|
|
132
|
+
* operation: "get_slots" || "schedule" || "reschedule" || "cancel" || "list_resource_events", // required
|
|
133
|
+
* },
|
|
131
134
|
* mcp: { // ToolMcpHandler
|
|
132
135
|
* serverUrl: "STRING_VALUE", // required
|
|
133
136
|
* authorization: { // ToolMcpAuthorization Union: only one key present
|
|
@@ -245,6 +248,9 @@ declare const UpdateToolCommand_base: {
|
|
|
245
248
|
* // message: "STRING_VALUE", // required
|
|
246
249
|
* // },
|
|
247
250
|
* // },
|
|
251
|
+
* // calendar: { // ToolCalendarConfig
|
|
252
|
+
* // operation: "get_slots" || "schedule" || "reschedule" || "cancel" || "list_resource_events", // required
|
|
253
|
+
* // },
|
|
248
254
|
* // mcp: { // ToolMcpHandler
|
|
249
255
|
* // serverUrl: "STRING_VALUE", // required
|
|
250
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
|
*/
|
|
@@ -563,7 +588,7 @@ export interface ToolWebhookConfig {
|
|
|
563
588
|
/**
|
|
564
589
|
* @public
|
|
565
590
|
*/
|
|
566
|
-
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;
|
|
567
592
|
/**
|
|
568
593
|
* @public
|
|
569
594
|
*/
|
|
@@ -574,6 +599,7 @@ export declare namespace ToolHandler {
|
|
|
574
599
|
search?: never;
|
|
575
600
|
chat?: never;
|
|
576
601
|
sms?: never;
|
|
602
|
+
calendar?: never;
|
|
577
603
|
mcp?: never;
|
|
578
604
|
mcpTool?: never;
|
|
579
605
|
$unknown?: never;
|
|
@@ -584,6 +610,7 @@ export declare namespace ToolHandler {
|
|
|
584
610
|
search?: never;
|
|
585
611
|
chat?: never;
|
|
586
612
|
sms?: never;
|
|
613
|
+
calendar?: never;
|
|
587
614
|
mcp?: never;
|
|
588
615
|
mcpTool?: never;
|
|
589
616
|
$unknown?: never;
|
|
@@ -598,6 +625,7 @@ export declare namespace ToolHandler {
|
|
|
598
625
|
search: ToolSearchConfig;
|
|
599
626
|
chat?: never;
|
|
600
627
|
sms?: never;
|
|
628
|
+
calendar?: never;
|
|
601
629
|
mcp?: never;
|
|
602
630
|
mcpTool?: never;
|
|
603
631
|
$unknown?: never;
|
|
@@ -608,6 +636,7 @@ export declare namespace ToolHandler {
|
|
|
608
636
|
search?: never;
|
|
609
637
|
chat: ToolChatHandler;
|
|
610
638
|
sms?: never;
|
|
639
|
+
calendar?: never;
|
|
611
640
|
mcp?: never;
|
|
612
641
|
mcpTool?: never;
|
|
613
642
|
$unknown?: never;
|
|
@@ -618,6 +647,18 @@ export declare namespace ToolHandler {
|
|
|
618
647
|
search?: never;
|
|
619
648
|
chat?: never;
|
|
620
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;
|
|
621
662
|
mcp?: never;
|
|
622
663
|
mcpTool?: never;
|
|
623
664
|
$unknown?: never;
|
|
@@ -628,6 +669,7 @@ export declare namespace ToolHandler {
|
|
|
628
669
|
search?: never;
|
|
629
670
|
chat?: never;
|
|
630
671
|
sms?: never;
|
|
672
|
+
calendar?: never;
|
|
631
673
|
mcp: ToolMcpHandler;
|
|
632
674
|
mcpTool?: never;
|
|
633
675
|
$unknown?: never;
|
|
@@ -638,6 +680,7 @@ export declare namespace ToolHandler {
|
|
|
638
680
|
search?: never;
|
|
639
681
|
chat?: never;
|
|
640
682
|
sms?: never;
|
|
683
|
+
calendar?: never;
|
|
641
684
|
mcp?: never;
|
|
642
685
|
mcpTool: ToolMcpToolHandler;
|
|
643
686
|
$unknown?: never;
|
|
@@ -651,6 +694,7 @@ export declare namespace ToolHandler {
|
|
|
651
694
|
search?: never;
|
|
652
695
|
chat?: never;
|
|
653
696
|
sms?: never;
|
|
697
|
+
calendar?: never;
|
|
654
698
|
mcp?: never;
|
|
655
699
|
mcpTool?: never;
|
|
656
700
|
$unknown: [string, any];
|
|
@@ -661,6 +705,7 @@ export declare namespace ToolHandler {
|
|
|
661
705
|
search: (value: ToolSearchConfig) => T;
|
|
662
706
|
chat: (value: ToolChatHandler) => T;
|
|
663
707
|
sms: (value: ToolSmsHandler) => T;
|
|
708
|
+
calendar: (value: ToolCalendarConfig) => T;
|
|
664
709
|
mcp: (value: ToolMcpHandler) => T;
|
|
665
710
|
mcpTool: (value: ToolMcpToolHandler) => T;
|
|
666
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
|
+
}
|