retell-sdk 2.2.3 → 2.2.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/example.js +48 -5
- package/example.js.map +1 -1
- package/lib/config.d.ts.map +1 -1
- package/lib/config.js.map +1 -1
- package/lib/sdks.d.ts.map +1 -1
- package/lib/sdks.js.map +1 -1
- package/lib/security.d.ts.map +1 -1
- package/lib/security.js +5 -1
- package/lib/security.js.map +1 -1
- package/models/components/agent.d.ts +3 -205
- package/models/components/agent.d.ts.map +1 -1
- package/models/components/agent.js +5 -187
- package/models/components/agent.js.map +1 -1
- package/models/components/agentpromptparams.d.ts.map +1 -1
- package/models/components/agentpromptparams.js.map +1 -1
- package/models/components/calldetail.d.ts +33 -22
- package/models/components/calldetail.d.ts.map +1 -1
- package/models/components/calldetail.js +44 -31
- package/models/components/calldetail.js.map +1 -1
- package/models/components/callphonenumber.d.ts.map +1 -1
- package/models/components/callphonenumber.js.map +1 -1
- package/models/components/index.d.ts +0 -3
- package/models/components/index.d.ts.map +1 -1
- package/models/components/index.js +0 -3
- package/models/components/index.js.map +1 -1
- package/models/components/phonenumber.d.ts.map +1 -1
- package/models/components/phonenumber.js.map +1 -1
- package/models/components/security.d.ts.map +1 -1
- package/models/errors/createagent.d.ts.map +1 -1
- package/models/errors/createagent.js +36 -12
- package/models/errors/createagent.js.map +1 -1
- package/models/errors/createphonecall.d.ts.map +1 -1
- package/models/errors/createphonecall.js +54 -18
- package/models/errors/createphonecall.js.map +1 -1
- package/models/errors/createphonenumber.d.ts.map +1 -1
- package/models/errors/createphonenumber.js +42 -14
- package/models/errors/createphonenumber.js.map +1 -1
- package/models/errors/deleteagent.d.ts.map +1 -1
- package/models/errors/deleteagent.js +36 -12
- package/models/errors/deleteagent.js.map +1 -1
- package/models/errors/deletephonenumber.d.ts.map +1 -1
- package/models/errors/deletephonenumber.js +33 -11
- package/models/errors/deletephonenumber.js.map +1 -1
- package/models/errors/getagent.d.ts.map +1 -1
- package/models/errors/getagent.js +36 -12
- package/models/errors/getagent.js.map +1 -1
- package/models/errors/getcall.d.ts.map +1 -1
- package/models/errors/getcall.js +30 -10
- package/models/errors/getcall.js.map +1 -1
- package/models/errors/getphonenumber.d.ts.map +1 -1
- package/models/errors/getphonenumber.js +36 -12
- package/models/errors/getphonenumber.js.map +1 -1
- package/models/errors/index.d.ts +1 -6
- package/models/errors/index.d.ts.map +1 -1
- package/models/errors/index.js +1 -6
- package/models/errors/index.js.map +1 -1
- package/models/errors/listagents.d.ts.map +1 -1
- package/models/errors/listagents.js +15 -5
- package/models/errors/listagents.js.map +1 -1
- package/models/errors/listcalls.d.ts.map +1 -1
- package/models/errors/listcalls.js +24 -8
- package/models/errors/listcalls.js.map +1 -1
- package/models/errors/listphonenumbers.d.ts.map +1 -1
- package/models/errors/listphonenumbers.js +27 -9
- package/models/errors/listphonenumbers.js.map +1 -1
- package/models/errors/registercall.d.ts +218 -0
- package/models/errors/registercall.d.ts.map +1 -0
- package/models/errors/registercall.js +386 -0
- package/models/errors/registercall.js.map +1 -0
- package/models/errors/updateagent.d.ts.map +1 -1
- package/models/errors/updateagent.js +36 -12
- package/models/errors/updateagent.js.map +1 -1
- package/models/errors/updatephoneagent.d.ts.map +1 -1
- package/models/errors/updatephoneagent.js +36 -12
- package/models/errors/updatephoneagent.js.map +1 -1
- package/models/operations/createagent.d.ts +3 -16
- package/models/operations/createagent.d.ts.map +1 -1
- package/models/operations/createagent.js +4 -12
- package/models/operations/createagent.js.map +1 -1
- package/models/operations/createphonecall.d.ts.map +1 -1
- package/models/operations/createphonecall.js +18 -6
- package/models/operations/createphonecall.js.map +1 -1
- package/models/operations/createphonenumber.d.ts.map +1 -1
- package/models/operations/createphonenumber.js +6 -2
- package/models/operations/createphonenumber.js.map +1 -1
- package/models/operations/createwebcall.d.ts.map +1 -1
- package/models/operations/deleteagent.d.ts.map +1 -1
- package/models/operations/deleteagent.js.map +1 -1
- package/models/operations/deletephonenumber.d.ts.map +1 -1
- package/models/operations/deletephonenumber.js.map +1 -1
- package/models/operations/getagent.d.ts.map +1 -1
- package/models/operations/getagent.js.map +1 -1
- package/models/operations/getcall.d.ts +1 -1
- package/models/operations/getcall.d.ts.map +1 -1
- package/models/operations/getcall.js.map +1 -1
- package/models/operations/getphonenumber.d.ts.map +1 -1
- package/models/operations/getphonenumber.js +6 -2
- package/models/operations/getphonenumber.js.map +1 -1
- package/models/operations/index.d.ts +1 -7
- package/models/operations/index.d.ts.map +1 -1
- package/models/operations/index.js +1 -7
- package/models/operations/index.js.map +1 -1
- package/models/operations/listagents.d.ts.map +1 -1
- package/models/operations/listagents.js.map +1 -1
- package/models/operations/listcalls.d.ts +1 -7
- package/models/operations/listcalls.d.ts.map +1 -1
- package/models/operations/listcalls.js +6 -6
- package/models/operations/listcalls.js.map +1 -1
- package/models/operations/listphonenumbers.d.ts.map +1 -1
- package/models/operations/listphonenumbers.js +6 -2
- package/models/operations/listphonenumbers.js.map +1 -1
- package/models/operations/registercall.d.ts +74 -0
- package/models/operations/registercall.d.ts.map +1 -0
- package/models/operations/registercall.js +104 -0
- package/models/operations/registercall.js.map +1 -0
- package/models/operations/updateagent.d.ts +3 -16
- package/models/operations/updateagent.d.ts.map +1 -1
- package/models/operations/updateagent.js +9 -13
- package/models/operations/updateagent.js.map +1 -1
- package/models/operations/updatephoneagent.d.ts.map +1 -1
- package/models/operations/updatephoneagent.js +6 -2
- package/models/operations/updatephoneagent.js.map +1 -1
- package/package.json +1 -1
- package/sdk/audioWsClient.d.ts +10 -0
- package/sdk/audioWsClient.d.ts.map +1 -0
- package/sdk/audioWsClient.js +60 -0
- package/sdk/audioWsClient.js.map +1 -0
- package/sdk/index.d.ts +1 -1
- package/sdk/index.d.ts.map +1 -1
- package/sdk/index.js +1 -1
- package/sdk/index.js.map +1 -1
- package/sdk/liveClient.d.ts.map +1 -1
- package/sdk/liveClient.js +7 -2
- package/sdk/liveClient.js.map +1 -1
- package/sdk/sdk.d.ts +1 -23
- package/sdk/sdk.d.ts.map +1 -1
- package/sdk/sdk.js +21 -430
- package/sdk/sdk.js.map +1 -1
- package/src/example.ts +136 -88
- package/src/lib/config.ts +32 -32
- package/src/lib/sdks.ts +91 -82
- package/src/lib/security.ts +133 -118
- package/src/models/components/agent.ts +71 -451
- package/src/models/components/calldetail.ts +147 -130
- package/src/models/components/index.ts +0 -3
- package/src/models/components/security.ts +1 -1
- package/src/models/errors/createagent.ts +359 -311
- package/src/models/errors/deleteagent.ts +359 -311
- package/src/models/errors/getagent.ts +358 -302
- package/src/models/errors/getcall.ts +348 -294
- package/src/models/errors/index.ts +1 -6
- package/src/models/errors/listagents.ts +174 -147
- package/src/models/errors/listcalls.ts +251 -211
- package/src/models/errors/registercall.ts +662 -0
- package/src/models/errors/updateagent.ts +359 -311
- package/src/models/operations/createagent.ts +124 -130
- package/src/models/operations/deleteagent.ts +94 -78
- package/src/models/operations/getagent.ts +104 -88
- package/src/models/operations/getcall.ts +101 -88
- package/src/models/operations/index.ts +1 -7
- package/src/models/operations/listagents.ts +68 -60
- package/src/models/operations/listcalls.ts +228 -213
- package/src/models/operations/registercall.ts +167 -0
- package/src/models/operations/updateagent.ts +180 -174
- package/src/sdk/audioWsClient.ts +63 -0
- package/src/sdk/index.ts +1 -1
- package/src/sdk/sdk.ts +802 -1162
- package/src/models/components/agentpromptparams.ts +0 -53
- package/src/models/components/callphonenumber.ts +0 -56
- package/src/models/components/phonenumber.ts +0 -83
- package/src/models/errors/createphonecall.ts +0 -597
- package/src/models/errors/createphonenumber.ts +0 -500
- package/src/models/errors/deletephonenumber.ts +0 -400
- package/src/models/errors/getphonenumber.ts +0 -397
- package/src/models/errors/listphonenumbers.ts +0 -297
- package/src/models/errors/updatephoneagent.ts +0 -397
- package/src/models/operations/createphonecall.ts +0 -308
- package/src/models/operations/createphonenumber.ts +0 -124
- package/src/models/operations/createwebcall.ts +0 -16
- package/src/models/operations/deletephonenumber.ts +0 -103
- package/src/models/operations/getphonenumber.ts +0 -114
- package/src/models/operations/listphonenumbers.ts +0 -76
- package/src/models/operations/updatephoneagent.ts +0 -159
- package/src/sdk/liveClient.ts +0 -109
|
@@ -3,154 +3,148 @@
|
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
5
|
import * as components from "../../models/components";
|
|
6
|
-
import { Function } from "../../models/components";
|
|
7
6
|
import { z } from "zod";
|
|
8
7
|
|
|
9
8
|
export type CreateAgentRequestBody = {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
interactionSetting?: components.InteractionSettingRequest | undefined;
|
|
23
|
-
/**
|
|
24
|
-
* Unique voice id used for the agent. Find list of available voices in documentation.
|
|
25
|
-
*/
|
|
26
|
-
voiceId: string;
|
|
27
|
-
/**
|
|
28
|
-
* Functions are the actions that the agent can perform, like booking appointments, retriving information, etc. By setting this field, either OpenAI's function calling feature or your own custom LLM's logic would determine when the function shall get called, and our server would make the call.
|
|
29
|
-
*/
|
|
30
|
-
functions?: Function[] | undefined;
|
|
9
|
+
/**
|
|
10
|
+
* The name of the agent. Only used for your own reference.
|
|
11
|
+
*/
|
|
12
|
+
agentName?: string | undefined;
|
|
13
|
+
/*
|
|
14
|
+
* The URL we will establish LLM websocket for getting response, usually your server.
|
|
15
|
+
*/
|
|
16
|
+
llmWebsocketUrl: string;
|
|
17
|
+
/**
|
|
18
|
+
* Unique voice id used for the agent. Find list of available voices in documentation.
|
|
19
|
+
*/
|
|
20
|
+
voiceId: string;
|
|
31
21
|
};
|
|
32
22
|
|
|
33
23
|
export type CreateAgentResponse = {
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
24
|
+
/**
|
|
25
|
+
* Successfully created a new agent.
|
|
26
|
+
*/
|
|
27
|
+
agent?: components.Agent | undefined;
|
|
28
|
+
/**
|
|
29
|
+
* HTTP response content type for this operation
|
|
30
|
+
*/
|
|
31
|
+
contentType: string;
|
|
32
|
+
/**
|
|
33
|
+
* HTTP response status code for this operation
|
|
34
|
+
*/
|
|
35
|
+
statusCode: number;
|
|
36
|
+
/**
|
|
37
|
+
* Raw HTTP response; suitable for custom response parsing
|
|
38
|
+
*/
|
|
39
|
+
rawResponse: Response;
|
|
50
40
|
};
|
|
51
41
|
|
|
52
42
|
/** @internal */
|
|
53
43
|
export namespace CreateAgentRequestBody$ {
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
functions?: Function[] | undefined;
|
|
60
|
-
};
|
|
44
|
+
export type Inbound = {
|
|
45
|
+
agent_name?: string | undefined;
|
|
46
|
+
llm_websocket_url: string;
|
|
47
|
+
voice_id: string;
|
|
48
|
+
};
|
|
61
49
|
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
50
|
+
export const inboundSchema: z.ZodType<
|
|
51
|
+
CreateAgentRequestBody,
|
|
52
|
+
z.ZodTypeDef,
|
|
53
|
+
Inbound
|
|
54
|
+
> = z
|
|
55
|
+
.object({
|
|
56
|
+
agent_name: z.string().optional(),
|
|
57
|
+
llm_websocket_url: z.string(),
|
|
58
|
+
voice_id: z.string(),
|
|
59
|
+
})
|
|
60
|
+
.transform((v) => {
|
|
61
|
+
return {
|
|
62
|
+
...(v.agent_name === undefined ? null : { agentName: v.agent_name }),
|
|
63
|
+
llmWebsocketUrl: v.llm_websocket_url,
|
|
64
|
+
voiceId: v.voice_id,
|
|
65
|
+
};
|
|
66
|
+
});
|
|
79
67
|
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
functions?: Function[] | undefined;
|
|
86
|
-
};
|
|
68
|
+
export type Outbound = {
|
|
69
|
+
agent_name?: string | undefined;
|
|
70
|
+
llm_websocket_url: string;
|
|
71
|
+
voice_id: string;
|
|
72
|
+
};
|
|
87
73
|
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
74
|
+
export const outboundSchema: z.ZodType<
|
|
75
|
+
Outbound,
|
|
76
|
+
z.ZodTypeDef,
|
|
77
|
+
CreateAgentRequestBody
|
|
78
|
+
> = z
|
|
79
|
+
.object({
|
|
80
|
+
agentName: z.string().optional(),
|
|
81
|
+
llmWebsocketUrl: z.string(),
|
|
82
|
+
voiceId: z.string(),
|
|
83
|
+
})
|
|
84
|
+
.transform((v) => {
|
|
85
|
+
return {
|
|
86
|
+
...(v.agentName === undefined ? null : { agent_name: v.agentName }),
|
|
87
|
+
llm_websocket_url: v.llmWebsocketUrl,
|
|
88
|
+
voice_id: v.voiceId,
|
|
89
|
+
};
|
|
90
|
+
});
|
|
105
91
|
}
|
|
106
92
|
|
|
107
93
|
/** @internal */
|
|
108
94
|
export namespace CreateAgentResponse$ {
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
95
|
+
export type Inbound = {
|
|
96
|
+
Agent?: components.Agent$.Inbound | undefined;
|
|
97
|
+
ContentType: string;
|
|
98
|
+
StatusCode: number;
|
|
99
|
+
RawResponse: Response;
|
|
100
|
+
};
|
|
115
101
|
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
102
|
+
export const inboundSchema: z.ZodType<
|
|
103
|
+
CreateAgentResponse,
|
|
104
|
+
z.ZodTypeDef,
|
|
105
|
+
Inbound
|
|
106
|
+
> = z
|
|
107
|
+
.object({
|
|
108
|
+
Agent: components.Agent$.inboundSchema.optional(),
|
|
109
|
+
ContentType: z.string(),
|
|
110
|
+
StatusCode: z.number().int(),
|
|
111
|
+
RawResponse: z.instanceof(Response),
|
|
112
|
+
})
|
|
113
|
+
.transform((v) => {
|
|
114
|
+
return {
|
|
115
|
+
...(v.Agent === undefined ? null : { agent: v.Agent }),
|
|
116
|
+
contentType: v.ContentType,
|
|
117
|
+
statusCode: v.StatusCode,
|
|
118
|
+
rawResponse: v.RawResponse,
|
|
119
|
+
};
|
|
120
|
+
});
|
|
131
121
|
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
122
|
+
export type Outbound = {
|
|
123
|
+
Agent?: components.Agent$.Outbound | undefined;
|
|
124
|
+
ContentType: string;
|
|
125
|
+
StatusCode: number;
|
|
126
|
+
RawResponse: never;
|
|
127
|
+
};
|
|
138
128
|
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
129
|
+
export const outboundSchema: z.ZodType<
|
|
130
|
+
Outbound,
|
|
131
|
+
z.ZodTypeDef,
|
|
132
|
+
CreateAgentResponse
|
|
133
|
+
> = z
|
|
134
|
+
.object({
|
|
135
|
+
agent: components.Agent$.outboundSchema.optional(),
|
|
136
|
+
contentType: z.string(),
|
|
137
|
+
statusCode: z.number().int(),
|
|
138
|
+
rawResponse: z.instanceof(Response).transform(() => {
|
|
139
|
+
throw new Error("Response cannot be serialized");
|
|
140
|
+
}),
|
|
141
|
+
})
|
|
142
|
+
.transform((v) => {
|
|
143
|
+
return {
|
|
144
|
+
...(v.agent === undefined ? null : { Agent: v.agent }),
|
|
145
|
+
ContentType: v.contentType,
|
|
146
|
+
StatusCode: v.statusCode,
|
|
147
|
+
RawResponse: v.rawResponse,
|
|
148
|
+
};
|
|
149
|
+
});
|
|
156
150
|
}
|
|
@@ -5,99 +5,115 @@
|
|
|
5
5
|
import { z } from "zod";
|
|
6
6
|
|
|
7
7
|
export type DeleteAgentRequest = {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
8
|
+
/**
|
|
9
|
+
* Unique id of the agent to be deleted.
|
|
10
|
+
*/
|
|
11
|
+
agentId: string;
|
|
12
12
|
};
|
|
13
13
|
|
|
14
14
|
export type DeleteAgentResponse = {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
15
|
+
/**
|
|
16
|
+
* HTTP response content type for this operation
|
|
17
|
+
*/
|
|
18
|
+
contentType: string;
|
|
19
|
+
/**
|
|
20
|
+
* HTTP response status code for this operation
|
|
21
|
+
*/
|
|
22
|
+
statusCode: number;
|
|
23
|
+
/**
|
|
24
|
+
* Raw HTTP response; suitable for custom response parsing
|
|
25
|
+
*/
|
|
26
|
+
rawResponse: Response;
|
|
27
27
|
};
|
|
28
28
|
|
|
29
29
|
/** @internal */
|
|
30
30
|
export namespace DeleteAgentRequest$ {
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
31
|
+
export type Inbound = {
|
|
32
|
+
agent_id: string;
|
|
33
|
+
};
|
|
34
34
|
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
35
|
+
export const inboundSchema: z.ZodType<
|
|
36
|
+
DeleteAgentRequest,
|
|
37
|
+
z.ZodTypeDef,
|
|
38
|
+
Inbound
|
|
39
|
+
> = z
|
|
40
|
+
.object({
|
|
41
|
+
agent_id: z.string(),
|
|
42
|
+
})
|
|
43
|
+
.transform((v) => {
|
|
44
|
+
return {
|
|
45
|
+
agentId: v.agent_id,
|
|
46
|
+
};
|
|
47
|
+
});
|
|
44
48
|
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
49
|
+
export type Outbound = {
|
|
50
|
+
agent_id: string;
|
|
51
|
+
};
|
|
48
52
|
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
53
|
+
export const outboundSchema: z.ZodType<
|
|
54
|
+
Outbound,
|
|
55
|
+
z.ZodTypeDef,
|
|
56
|
+
DeleteAgentRequest
|
|
57
|
+
> = z
|
|
58
|
+
.object({
|
|
59
|
+
agentId: z.string(),
|
|
60
|
+
})
|
|
61
|
+
.transform((v) => {
|
|
62
|
+
return {
|
|
63
|
+
agent_id: v.agentId,
|
|
64
|
+
};
|
|
65
|
+
});
|
|
58
66
|
}
|
|
59
67
|
|
|
60
68
|
/** @internal */
|
|
61
69
|
export namespace DeleteAgentResponse$ {
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
70
|
+
export type Inbound = {
|
|
71
|
+
ContentType: string;
|
|
72
|
+
StatusCode: number;
|
|
73
|
+
RawResponse: Response;
|
|
74
|
+
};
|
|
67
75
|
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
76
|
+
export const inboundSchema: z.ZodType<
|
|
77
|
+
DeleteAgentResponse,
|
|
78
|
+
z.ZodTypeDef,
|
|
79
|
+
Inbound
|
|
80
|
+
> = z
|
|
81
|
+
.object({
|
|
82
|
+
ContentType: z.string(),
|
|
83
|
+
StatusCode: z.number().int(),
|
|
84
|
+
RawResponse: z.instanceof(Response),
|
|
85
|
+
})
|
|
86
|
+
.transform((v) => {
|
|
87
|
+
return {
|
|
88
|
+
contentType: v.ContentType,
|
|
89
|
+
statusCode: v.StatusCode,
|
|
90
|
+
rawResponse: v.RawResponse,
|
|
91
|
+
};
|
|
92
|
+
});
|
|
81
93
|
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
94
|
+
export type Outbound = {
|
|
95
|
+
ContentType: string;
|
|
96
|
+
StatusCode: number;
|
|
97
|
+
RawResponse: never;
|
|
98
|
+
};
|
|
87
99
|
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
100
|
+
export const outboundSchema: z.ZodType<
|
|
101
|
+
Outbound,
|
|
102
|
+
z.ZodTypeDef,
|
|
103
|
+
DeleteAgentResponse
|
|
104
|
+
> = z
|
|
105
|
+
.object({
|
|
106
|
+
contentType: z.string(),
|
|
107
|
+
statusCode: z.number().int(),
|
|
108
|
+
rawResponse: z.instanceof(Response).transform(() => {
|
|
109
|
+
throw new Error("Response cannot be serialized");
|
|
110
|
+
}),
|
|
111
|
+
})
|
|
112
|
+
.transform((v) => {
|
|
113
|
+
return {
|
|
114
|
+
ContentType: v.contentType,
|
|
115
|
+
StatusCode: v.statusCode,
|
|
116
|
+
RawResponse: v.rawResponse,
|
|
117
|
+
};
|
|
118
|
+
});
|
|
103
119
|
}
|