phonic 0.30.11 → 0.30.13
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/Client.js +2 -2
- package/dist/cjs/api/resources/conversations/client/requests/ConversationsListRequest.d.ts +3 -3
- package/dist/cjs/api/resources/conversations/types/ConversationsListResponse.d.ts +4 -0
- package/dist/cjs/api/resources/tools/client/Client.d.ts +4 -2
- package/dist/cjs/api/resources/tools/client/Client.js +4 -2
- package/dist/cjs/api/resources/tools/client/requests/CreateToolRequest.d.ts +20 -5
- package/dist/cjs/api/resources/tools/client/requests/CreateToolRequest.js +4 -0
- package/dist/cjs/api/resources/tools/client/requests/UpdateToolRequest.d.ts +16 -2
- package/dist/cjs/api/resources/tools/client/requests/UpdateToolRequest.js +4 -0
- package/dist/cjs/api/types/Tool.d.ts +9 -1
- package/dist/cjs/api/types/Tool.js +4 -0
- package/dist/cjs/api/types/ToolParameter.d.ts +20 -0
- package/dist/cjs/api/types/ToolParameter.js +4 -0
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/esm/Client.mjs +2 -2
- package/dist/esm/api/resources/conversations/client/requests/ConversationsListRequest.d.mts +3 -3
- package/dist/esm/api/resources/conversations/types/ConversationsListResponse.d.mts +4 -0
- package/dist/esm/api/resources/tools/client/Client.d.mts +4 -2
- package/dist/esm/api/resources/tools/client/Client.mjs +4 -2
- package/dist/esm/api/resources/tools/client/requests/CreateToolRequest.d.mts +20 -5
- package/dist/esm/api/resources/tools/client/requests/CreateToolRequest.mjs +4 -0
- package/dist/esm/api/resources/tools/client/requests/UpdateToolRequest.d.mts +16 -2
- package/dist/esm/api/resources/tools/client/requests/UpdateToolRequest.mjs +4 -0
- package/dist/esm/api/types/Tool.d.mts +9 -1
- package/dist/esm/api/types/Tool.mjs +4 -0
- package/dist/esm/api/types/ToolParameter.d.mts +20 -0
- package/dist/esm/api/types/ToolParameter.mjs +4 -0
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/package.json +1 -1
- package/reference.md +2 -0
package/dist/cjs/Client.js
CHANGED
|
@@ -50,8 +50,8 @@ class PhonicClient {
|
|
|
50
50
|
this._options = Object.assign(Object.assign({}, _options), { headers: (0, headers_js_1.mergeHeaders)({
|
|
51
51
|
"X-Fern-Language": "JavaScript",
|
|
52
52
|
"X-Fern-SDK-Name": "phonic",
|
|
53
|
-
"X-Fern-SDK-Version": "0.30.
|
|
54
|
-
"User-Agent": "phonic/0.30.
|
|
53
|
+
"X-Fern-SDK-Version": "0.30.13",
|
|
54
|
+
"User-Agent": "phonic/0.30.13",
|
|
55
55
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
56
56
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
57
57
|
}, _options === null || _options === void 0 ? void 0 : _options.headers) });
|
|
@@ -21,10 +21,10 @@ export interface ConversationsListRequest {
|
|
|
21
21
|
started_at_min?: string;
|
|
22
22
|
/** Maximum start date/time. Valid examples: `2025-04-17`, `2025-04-17T02:48:52.708Z` */
|
|
23
23
|
started_at_max?: string;
|
|
24
|
-
/** Cursor for pagination
|
|
24
|
+
/** Cursor for backward pagination. Use a conversation ID from `pagination.prev_cursor` to fetch the previous page of conversations. Cannot be used with `after`. */
|
|
25
25
|
before?: string;
|
|
26
|
-
/** Cursor for pagination
|
|
26
|
+
/** Cursor for forward pagination. Use a conversation ID from `pagination.next_cursor` to fetch the next page of conversations. Cannot be used with `before`. */
|
|
27
27
|
after?: string;
|
|
28
|
-
/** Maximum number of conversations to return. */
|
|
28
|
+
/** Maximum number of conversations to return per page. */
|
|
29
29
|
limit?: number;
|
|
30
30
|
}
|
|
@@ -4,6 +4,10 @@
|
|
|
4
4
|
import * as Phonic from "../../../index.js";
|
|
5
5
|
export type ConversationsListResponse = {
|
|
6
6
|
conversations: Phonic.Conversation[];
|
|
7
|
+
pagination: {
|
|
8
|
+
prev_cursor: string | null;
|
|
9
|
+
next_cursor: string | null;
|
|
10
|
+
};
|
|
7
11
|
} | {
|
|
8
12
|
conversation: Phonic.Conversation;
|
|
9
13
|
};
|
|
@@ -66,12 +66,14 @@ export declare class Tools {
|
|
|
66
66
|
* type: "string",
|
|
67
67
|
* name: "date",
|
|
68
68
|
* description: "The date for the appointment in YYYY-MM-DD format",
|
|
69
|
-
* is_required: true
|
|
69
|
+
* is_required: true,
|
|
70
|
+
* location: "request_body"
|
|
70
71
|
* }, {
|
|
71
72
|
* type: "string",
|
|
72
73
|
* name: "time",
|
|
73
74
|
* description: "The time for the appointment in HH:MM format",
|
|
74
|
-
* is_required: true
|
|
75
|
+
* is_required: true,
|
|
76
|
+
* location: "request_body"
|
|
75
77
|
* }],
|
|
76
78
|
* endpoint_method: "POST",
|
|
77
79
|
* endpoint_url: "https://api.example.com/book-appointment",
|
|
@@ -154,12 +154,14 @@ class Tools {
|
|
|
154
154
|
* type: "string",
|
|
155
155
|
* name: "date",
|
|
156
156
|
* description: "The date for the appointment in YYYY-MM-DD format",
|
|
157
|
-
* is_required: true
|
|
157
|
+
* is_required: true,
|
|
158
|
+
* location: "request_body"
|
|
158
159
|
* }, {
|
|
159
160
|
* type: "string",
|
|
160
161
|
* name: "time",
|
|
161
162
|
* description: "The time for the appointment in HH:MM format",
|
|
162
|
-
* is_required: true
|
|
163
|
+
* is_required: true,
|
|
164
|
+
* location: "request_body"
|
|
163
165
|
* }],
|
|
164
166
|
* endpoint_method: "POST",
|
|
165
167
|
* endpoint_url: "https://api.example.com/book-appointment",
|
|
@@ -14,12 +14,14 @@ import * as Phonic from "../../../../index.js";
|
|
|
14
14
|
* type: "string",
|
|
15
15
|
* name: "date",
|
|
16
16
|
* description: "The date for the appointment in YYYY-MM-DD format",
|
|
17
|
-
* is_required: true
|
|
17
|
+
* is_required: true,
|
|
18
|
+
* location: "request_body"
|
|
18
19
|
* }, {
|
|
19
20
|
* type: "string",
|
|
20
21
|
* name: "time",
|
|
21
22
|
* description: "The time for the appointment in HH:MM format",
|
|
22
|
-
* is_required: true
|
|
23
|
+
* is_required: true,
|
|
24
|
+
* location: "request_body"
|
|
23
25
|
* }],
|
|
24
26
|
* endpoint_method: "POST",
|
|
25
27
|
* endpoint_url: "https://api.example.com/book-appointment",
|
|
@@ -67,10 +69,15 @@ export interface CreateToolRequest {
|
|
|
67
69
|
type: CreateToolRequest.Type;
|
|
68
70
|
/** Mode of operation. */
|
|
69
71
|
execution_mode: CreateToolRequest.ExecutionMode;
|
|
70
|
-
/**
|
|
72
|
+
/**
|
|
73
|
+
* Array of parameter definitions.
|
|
74
|
+
* For `custom_webhook` tools with POST method, each parameter must include a `location` field.
|
|
75
|
+
* For `custom_webhook` tools with GET method, `location` defaults to `"query_string"` if not specified.
|
|
76
|
+
* For `custom_websocket` and `built_in_transfer_to_phone_number` tools, `location` must not be specified.
|
|
77
|
+
*/
|
|
71
78
|
parameters?: Phonic.ToolParameter[];
|
|
72
|
-
/** Required for webhook tools. */
|
|
73
|
-
endpoint_method?:
|
|
79
|
+
/** Required for webhook tools. HTTP method for the webhook endpoint. */
|
|
80
|
+
endpoint_method?: CreateToolRequest.EndpointMethod;
|
|
74
81
|
/** Required for webhook tools. */
|
|
75
82
|
endpoint_url?: string;
|
|
76
83
|
/** Optional headers for webhook tools. */
|
|
@@ -100,4 +107,12 @@ export declare namespace CreateToolRequest {
|
|
|
100
107
|
readonly Sync: "sync";
|
|
101
108
|
readonly Async: "async";
|
|
102
109
|
};
|
|
110
|
+
/**
|
|
111
|
+
* Required for webhook tools. HTTP method for the webhook endpoint.
|
|
112
|
+
*/
|
|
113
|
+
type EndpointMethod = "GET" | "POST";
|
|
114
|
+
const EndpointMethod: {
|
|
115
|
+
readonly Get: "GET";
|
|
116
|
+
readonly Post: "POST";
|
|
117
|
+
};
|
|
103
118
|
}
|
|
@@ -24,9 +24,15 @@ export interface UpdateToolRequest {
|
|
|
24
24
|
type?: UpdateToolRequest.Type;
|
|
25
25
|
/** Mode of operation. */
|
|
26
26
|
execution_mode?: UpdateToolRequest.ExecutionMode;
|
|
27
|
-
/**
|
|
27
|
+
/**
|
|
28
|
+
* Array of parameter definitions.
|
|
29
|
+
* When updating `type` or `endpoint_method`, all parameters must include explicit `location` values.
|
|
30
|
+
* For `custom_webhook` tools: `location` is required for POST, defaults to `"query_string"` for GET.
|
|
31
|
+
* For `custom_websocket` and `built_in_transfer_to_phone_number` tools: `location` must not be specified.
|
|
32
|
+
*/
|
|
28
33
|
parameters?: Phonic.ToolParameter[];
|
|
29
|
-
|
|
34
|
+
/** HTTP method for webhook tools. When changing this value, all parameters must include explicit `location` values. */
|
|
35
|
+
endpoint_method?: UpdateToolRequest.EndpointMethod;
|
|
30
36
|
endpoint_url?: string;
|
|
31
37
|
endpoint_headers?: Record<string, string>;
|
|
32
38
|
endpoint_timeout_ms?: number;
|
|
@@ -52,4 +58,12 @@ export declare namespace UpdateToolRequest {
|
|
|
52
58
|
readonly Sync: "sync";
|
|
53
59
|
readonly Async: "async";
|
|
54
60
|
};
|
|
61
|
+
/**
|
|
62
|
+
* HTTP method for webhook tools. When changing this value, all parameters must include explicit `location` values.
|
|
63
|
+
*/
|
|
64
|
+
type EndpointMethod = "GET" | "POST";
|
|
65
|
+
const EndpointMethod: {
|
|
66
|
+
readonly Get: "GET";
|
|
67
|
+
readonly Post: "POST";
|
|
68
|
+
};
|
|
55
69
|
}
|
|
@@ -17,7 +17,7 @@ export interface Tool {
|
|
|
17
17
|
/** Array of parameter definitions for the tool. */
|
|
18
18
|
parameters: Phonic.ToolParameter[];
|
|
19
19
|
/** HTTP method for webhook tools. */
|
|
20
|
-
endpoint_method?:
|
|
20
|
+
endpoint_method?: Tool.EndpointMethod;
|
|
21
21
|
/** URL for webhook tools. */
|
|
22
22
|
endpoint_url?: string;
|
|
23
23
|
/** Headers for webhook tools. */
|
|
@@ -51,4 +51,12 @@ export declare namespace Tool {
|
|
|
51
51
|
readonly Sync: "sync";
|
|
52
52
|
readonly Async: "async";
|
|
53
53
|
};
|
|
54
|
+
/**
|
|
55
|
+
* HTTP method for webhook tools.
|
|
56
|
+
*/
|
|
57
|
+
type EndpointMethod = "GET" | "POST";
|
|
58
|
+
const EndpointMethod: {
|
|
59
|
+
readonly Get: "GET";
|
|
60
|
+
readonly Post: "POST";
|
|
61
|
+
};
|
|
54
62
|
}
|
|
@@ -12,6 +12,14 @@ export interface ToolParameter {
|
|
|
12
12
|
description: string;
|
|
13
13
|
/** Whether the parameter is required. */
|
|
14
14
|
is_required: boolean;
|
|
15
|
+
/**
|
|
16
|
+
* Only applicable for `custom_webhook` tools. Specifies where the parameter should be sent in the webhook request.
|
|
17
|
+
* - For GET webhooks: defaults to `"query_string"` and `"request_body"` is not allowed.
|
|
18
|
+
* - For POST webhooks: required, can be either `"request_body"` or `"query_string"`.
|
|
19
|
+
* - Not allowed for `custom_websocket` or `built_in_transfer_to_phone_number` tools.
|
|
20
|
+
* When updating a tool's type or endpoint_method, all parameters must include explicit `location` values.
|
|
21
|
+
*/
|
|
22
|
+
location?: ToolParameter.Location;
|
|
15
23
|
}
|
|
16
24
|
export declare namespace ToolParameter {
|
|
17
25
|
/**
|
|
@@ -35,4 +43,16 @@ export declare namespace ToolParameter {
|
|
|
35
43
|
readonly Number: "number";
|
|
36
44
|
readonly Boolean: "boolean";
|
|
37
45
|
};
|
|
46
|
+
/**
|
|
47
|
+
* Only applicable for `custom_webhook` tools. Specifies where the parameter should be sent in the webhook request.
|
|
48
|
+
* - For GET webhooks: defaults to `"query_string"` and `"request_body"` is not allowed.
|
|
49
|
+
* - For POST webhooks: required, can be either `"request_body"` or `"query_string"`.
|
|
50
|
+
* - Not allowed for `custom_websocket` or `built_in_transfer_to_phone_number` tools.
|
|
51
|
+
* When updating a tool's type or endpoint_method, all parameters must include explicit `location` values.
|
|
52
|
+
*/
|
|
53
|
+
type Location = "request_body" | "query_string";
|
|
54
|
+
const Location: {
|
|
55
|
+
readonly RequestBody: "request_body";
|
|
56
|
+
readonly QueryString: "query_string";
|
|
57
|
+
};
|
|
38
58
|
}
|
package/dist/cjs/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "0.30.
|
|
1
|
+
export declare const SDK_VERSION = "0.30.13";
|
package/dist/cjs/version.js
CHANGED
package/dist/esm/Client.mjs
CHANGED
|
@@ -14,8 +14,8 @@ export class PhonicClient {
|
|
|
14
14
|
this._options = Object.assign(Object.assign({}, _options), { headers: mergeHeaders({
|
|
15
15
|
"X-Fern-Language": "JavaScript",
|
|
16
16
|
"X-Fern-SDK-Name": "phonic",
|
|
17
|
-
"X-Fern-SDK-Version": "0.30.
|
|
18
|
-
"User-Agent": "phonic/0.30.
|
|
17
|
+
"X-Fern-SDK-Version": "0.30.13",
|
|
18
|
+
"User-Agent": "phonic/0.30.13",
|
|
19
19
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
20
20
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
21
21
|
}, _options === null || _options === void 0 ? void 0 : _options.headers) });
|
|
@@ -21,10 +21,10 @@ export interface ConversationsListRequest {
|
|
|
21
21
|
started_at_min?: string;
|
|
22
22
|
/** Maximum start date/time. Valid examples: `2025-04-17`, `2025-04-17T02:48:52.708Z` */
|
|
23
23
|
started_at_max?: string;
|
|
24
|
-
/** Cursor for pagination
|
|
24
|
+
/** Cursor for backward pagination. Use a conversation ID from `pagination.prev_cursor` to fetch the previous page of conversations. Cannot be used with `after`. */
|
|
25
25
|
before?: string;
|
|
26
|
-
/** Cursor for pagination
|
|
26
|
+
/** Cursor for forward pagination. Use a conversation ID from `pagination.next_cursor` to fetch the next page of conversations. Cannot be used with `before`. */
|
|
27
27
|
after?: string;
|
|
28
|
-
/** Maximum number of conversations to return. */
|
|
28
|
+
/** Maximum number of conversations to return per page. */
|
|
29
29
|
limit?: number;
|
|
30
30
|
}
|
|
@@ -4,6 +4,10 @@
|
|
|
4
4
|
import * as Phonic from "../../../index.mjs";
|
|
5
5
|
export type ConversationsListResponse = {
|
|
6
6
|
conversations: Phonic.Conversation[];
|
|
7
|
+
pagination: {
|
|
8
|
+
prev_cursor: string | null;
|
|
9
|
+
next_cursor: string | null;
|
|
10
|
+
};
|
|
7
11
|
} | {
|
|
8
12
|
conversation: Phonic.Conversation;
|
|
9
13
|
};
|
|
@@ -66,12 +66,14 @@ export declare class Tools {
|
|
|
66
66
|
* type: "string",
|
|
67
67
|
* name: "date",
|
|
68
68
|
* description: "The date for the appointment in YYYY-MM-DD format",
|
|
69
|
-
* is_required: true
|
|
69
|
+
* is_required: true,
|
|
70
|
+
* location: "request_body"
|
|
70
71
|
* }, {
|
|
71
72
|
* type: "string",
|
|
72
73
|
* name: "time",
|
|
73
74
|
* description: "The time for the appointment in HH:MM format",
|
|
74
|
-
* is_required: true
|
|
75
|
+
* is_required: true,
|
|
76
|
+
* location: "request_body"
|
|
75
77
|
* }],
|
|
76
78
|
* endpoint_method: "POST",
|
|
77
79
|
* endpoint_url: "https://api.example.com/book-appointment",
|
|
@@ -118,12 +118,14 @@ export class Tools {
|
|
|
118
118
|
* type: "string",
|
|
119
119
|
* name: "date",
|
|
120
120
|
* description: "The date for the appointment in YYYY-MM-DD format",
|
|
121
|
-
* is_required: true
|
|
121
|
+
* is_required: true,
|
|
122
|
+
* location: "request_body"
|
|
122
123
|
* }, {
|
|
123
124
|
* type: "string",
|
|
124
125
|
* name: "time",
|
|
125
126
|
* description: "The time for the appointment in HH:MM format",
|
|
126
|
-
* is_required: true
|
|
127
|
+
* is_required: true,
|
|
128
|
+
* location: "request_body"
|
|
127
129
|
* }],
|
|
128
130
|
* endpoint_method: "POST",
|
|
129
131
|
* endpoint_url: "https://api.example.com/book-appointment",
|
|
@@ -14,12 +14,14 @@ import * as Phonic from "../../../../index.mjs";
|
|
|
14
14
|
* type: "string",
|
|
15
15
|
* name: "date",
|
|
16
16
|
* description: "The date for the appointment in YYYY-MM-DD format",
|
|
17
|
-
* is_required: true
|
|
17
|
+
* is_required: true,
|
|
18
|
+
* location: "request_body"
|
|
18
19
|
* }, {
|
|
19
20
|
* type: "string",
|
|
20
21
|
* name: "time",
|
|
21
22
|
* description: "The time for the appointment in HH:MM format",
|
|
22
|
-
* is_required: true
|
|
23
|
+
* is_required: true,
|
|
24
|
+
* location: "request_body"
|
|
23
25
|
* }],
|
|
24
26
|
* endpoint_method: "POST",
|
|
25
27
|
* endpoint_url: "https://api.example.com/book-appointment",
|
|
@@ -67,10 +69,15 @@ export interface CreateToolRequest {
|
|
|
67
69
|
type: CreateToolRequest.Type;
|
|
68
70
|
/** Mode of operation. */
|
|
69
71
|
execution_mode: CreateToolRequest.ExecutionMode;
|
|
70
|
-
/**
|
|
72
|
+
/**
|
|
73
|
+
* Array of parameter definitions.
|
|
74
|
+
* For `custom_webhook` tools with POST method, each parameter must include a `location` field.
|
|
75
|
+
* For `custom_webhook` tools with GET method, `location` defaults to `"query_string"` if not specified.
|
|
76
|
+
* For `custom_websocket` and `built_in_transfer_to_phone_number` tools, `location` must not be specified.
|
|
77
|
+
*/
|
|
71
78
|
parameters?: Phonic.ToolParameter[];
|
|
72
|
-
/** Required for webhook tools. */
|
|
73
|
-
endpoint_method?:
|
|
79
|
+
/** Required for webhook tools. HTTP method for the webhook endpoint. */
|
|
80
|
+
endpoint_method?: CreateToolRequest.EndpointMethod;
|
|
74
81
|
/** Required for webhook tools. */
|
|
75
82
|
endpoint_url?: string;
|
|
76
83
|
/** Optional headers for webhook tools. */
|
|
@@ -100,4 +107,12 @@ export declare namespace CreateToolRequest {
|
|
|
100
107
|
readonly Sync: "sync";
|
|
101
108
|
readonly Async: "async";
|
|
102
109
|
};
|
|
110
|
+
/**
|
|
111
|
+
* Required for webhook tools. HTTP method for the webhook endpoint.
|
|
112
|
+
*/
|
|
113
|
+
type EndpointMethod = "GET" | "POST";
|
|
114
|
+
const EndpointMethod: {
|
|
115
|
+
readonly Get: "GET";
|
|
116
|
+
readonly Post: "POST";
|
|
117
|
+
};
|
|
103
118
|
}
|
|
@@ -24,9 +24,15 @@ export interface UpdateToolRequest {
|
|
|
24
24
|
type?: UpdateToolRequest.Type;
|
|
25
25
|
/** Mode of operation. */
|
|
26
26
|
execution_mode?: UpdateToolRequest.ExecutionMode;
|
|
27
|
-
/**
|
|
27
|
+
/**
|
|
28
|
+
* Array of parameter definitions.
|
|
29
|
+
* When updating `type` or `endpoint_method`, all parameters must include explicit `location` values.
|
|
30
|
+
* For `custom_webhook` tools: `location` is required for POST, defaults to `"query_string"` for GET.
|
|
31
|
+
* For `custom_websocket` and `built_in_transfer_to_phone_number` tools: `location` must not be specified.
|
|
32
|
+
*/
|
|
28
33
|
parameters?: Phonic.ToolParameter[];
|
|
29
|
-
|
|
34
|
+
/** HTTP method for webhook tools. When changing this value, all parameters must include explicit `location` values. */
|
|
35
|
+
endpoint_method?: UpdateToolRequest.EndpointMethod;
|
|
30
36
|
endpoint_url?: string;
|
|
31
37
|
endpoint_headers?: Record<string, string>;
|
|
32
38
|
endpoint_timeout_ms?: number;
|
|
@@ -52,4 +58,12 @@ export declare namespace UpdateToolRequest {
|
|
|
52
58
|
readonly Sync: "sync";
|
|
53
59
|
readonly Async: "async";
|
|
54
60
|
};
|
|
61
|
+
/**
|
|
62
|
+
* HTTP method for webhook tools. When changing this value, all parameters must include explicit `location` values.
|
|
63
|
+
*/
|
|
64
|
+
type EndpointMethod = "GET" | "POST";
|
|
65
|
+
const EndpointMethod: {
|
|
66
|
+
readonly Get: "GET";
|
|
67
|
+
readonly Post: "POST";
|
|
68
|
+
};
|
|
55
69
|
}
|
|
@@ -17,7 +17,7 @@ export interface Tool {
|
|
|
17
17
|
/** Array of parameter definitions for the tool. */
|
|
18
18
|
parameters: Phonic.ToolParameter[];
|
|
19
19
|
/** HTTP method for webhook tools. */
|
|
20
|
-
endpoint_method?:
|
|
20
|
+
endpoint_method?: Tool.EndpointMethod;
|
|
21
21
|
/** URL for webhook tools. */
|
|
22
22
|
endpoint_url?: string;
|
|
23
23
|
/** Headers for webhook tools. */
|
|
@@ -51,4 +51,12 @@ export declare namespace Tool {
|
|
|
51
51
|
readonly Sync: "sync";
|
|
52
52
|
readonly Async: "async";
|
|
53
53
|
};
|
|
54
|
+
/**
|
|
55
|
+
* HTTP method for webhook tools.
|
|
56
|
+
*/
|
|
57
|
+
type EndpointMethod = "GET" | "POST";
|
|
58
|
+
const EndpointMethod: {
|
|
59
|
+
readonly Get: "GET";
|
|
60
|
+
readonly Post: "POST";
|
|
61
|
+
};
|
|
54
62
|
}
|
|
@@ -12,6 +12,14 @@ export interface ToolParameter {
|
|
|
12
12
|
description: string;
|
|
13
13
|
/** Whether the parameter is required. */
|
|
14
14
|
is_required: boolean;
|
|
15
|
+
/**
|
|
16
|
+
* Only applicable for `custom_webhook` tools. Specifies where the parameter should be sent in the webhook request.
|
|
17
|
+
* - For GET webhooks: defaults to `"query_string"` and `"request_body"` is not allowed.
|
|
18
|
+
* - For POST webhooks: required, can be either `"request_body"` or `"query_string"`.
|
|
19
|
+
* - Not allowed for `custom_websocket` or `built_in_transfer_to_phone_number` tools.
|
|
20
|
+
* When updating a tool's type or endpoint_method, all parameters must include explicit `location` values.
|
|
21
|
+
*/
|
|
22
|
+
location?: ToolParameter.Location;
|
|
15
23
|
}
|
|
16
24
|
export declare namespace ToolParameter {
|
|
17
25
|
/**
|
|
@@ -35,4 +43,16 @@ export declare namespace ToolParameter {
|
|
|
35
43
|
readonly Number: "number";
|
|
36
44
|
readonly Boolean: "boolean";
|
|
37
45
|
};
|
|
46
|
+
/**
|
|
47
|
+
* Only applicable for `custom_webhook` tools. Specifies where the parameter should be sent in the webhook request.
|
|
48
|
+
* - For GET webhooks: defaults to `"query_string"` and `"request_body"` is not allowed.
|
|
49
|
+
* - For POST webhooks: required, can be either `"request_body"` or `"query_string"`.
|
|
50
|
+
* - Not allowed for `custom_websocket` or `built_in_transfer_to_phone_number` tools.
|
|
51
|
+
* When updating a tool's type or endpoint_method, all parameters must include explicit `location` values.
|
|
52
|
+
*/
|
|
53
|
+
type Location = "request_body" | "query_string";
|
|
54
|
+
const Location: {
|
|
55
|
+
readonly RequestBody: "request_body";
|
|
56
|
+
readonly QueryString: "query_string";
|
|
57
|
+
};
|
|
38
58
|
}
|
package/dist/esm/version.d.mts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "0.30.
|
|
1
|
+
export declare const SDK_VERSION = "0.30.13";
|
package/dist/esm/version.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const SDK_VERSION = "0.30.
|
|
1
|
+
export const SDK_VERSION = "0.30.13";
|
package/package.json
CHANGED
package/reference.md
CHANGED
|
@@ -605,12 +605,14 @@ await client.tools.create({
|
|
|
605
605
|
name: "date",
|
|
606
606
|
description: "The date for the appointment in YYYY-MM-DD format",
|
|
607
607
|
is_required: true,
|
|
608
|
+
location: "request_body",
|
|
608
609
|
},
|
|
609
610
|
{
|
|
610
611
|
type: "string",
|
|
611
612
|
name: "time",
|
|
612
613
|
description: "The time for the appointment in HH:MM format",
|
|
613
614
|
is_required: true,
|
|
615
|
+
location: "request_body",
|
|
614
616
|
},
|
|
615
617
|
],
|
|
616
618
|
endpoint_method: "POST",
|