@gtmi/ramp-dialog-client 0.0.1
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/LICENSE +21 -0
- package/README.md +44 -0
- package/dist/es/index.d.mts +769 -0
- package/dist/es/index.mjs +1042 -0
- package/package.json +46 -0
- package/src/client.test.ts +39 -0
- package/src/client.ts +15 -0
- package/src/client.types.ts +11 -0
- package/src/generated/client/client.gen.ts +277 -0
- package/src/generated/client/index.ts +27 -0
- package/src/generated/client/types.gen.ts +214 -0
- package/src/generated/client/utils.gen.ts +316 -0
- package/src/generated/client.gen.ts +18 -0
- package/src/generated/core/auth.gen.ts +48 -0
- package/src/generated/core/bodySerializer.gen.ts +82 -0
- package/src/generated/core/params.gen.ts +178 -0
- package/src/generated/core/pathSerializer.gen.ts +171 -0
- package/src/generated/core/queryKeySerializer.gen.ts +117 -0
- package/src/generated/core/serverSentEvents.gen.ts +242 -0
- package/src/generated/core/types.gen.ts +110 -0
- package/src/generated/core/utils.gen.ts +140 -0
- package/src/generated/index.ts +64 -0
- package/src/generated/sdk.gen.ts +408 -0
- package/src/generated/types.gen.ts +322 -0
- package/src/generated/zod.gen.ts +38 -0
- package/src/index.ts +7 -0
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
// This file is auto-generated by @hey-api/openapi-ts
|
|
2
|
+
|
|
3
|
+
import type { BodySerializer, QuerySerializer } from './bodySerializer.gen';
|
|
4
|
+
import {
|
|
5
|
+
type ArraySeparatorStyle,
|
|
6
|
+
serializeArrayParam,
|
|
7
|
+
serializeObjectParam,
|
|
8
|
+
serializePrimitiveParam,
|
|
9
|
+
} from './pathSerializer.gen';
|
|
10
|
+
|
|
11
|
+
export interface PathSerializer {
|
|
12
|
+
path: Record<string, unknown>;
|
|
13
|
+
url: string;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export const PATH_PARAM_RE: RegExp = /\{[^{}]+\}/g;
|
|
17
|
+
|
|
18
|
+
export const defaultPathSerializer = ({ path, url: _url }: PathSerializer): string => {
|
|
19
|
+
let url = _url;
|
|
20
|
+
const matches = _url.match(PATH_PARAM_RE);
|
|
21
|
+
if (matches) {
|
|
22
|
+
for (const match of matches) {
|
|
23
|
+
let explode = false;
|
|
24
|
+
let name = match.substring(1, match.length - 1);
|
|
25
|
+
let style: ArraySeparatorStyle = 'simple';
|
|
26
|
+
|
|
27
|
+
if (name.endsWith('*')) {
|
|
28
|
+
explode = true;
|
|
29
|
+
name = name.substring(0, name.length - 1);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
if (name.startsWith('.')) {
|
|
33
|
+
name = name.substring(1);
|
|
34
|
+
style = 'label';
|
|
35
|
+
} else if (name.startsWith(';')) {
|
|
36
|
+
name = name.substring(1);
|
|
37
|
+
style = 'matrix';
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
const value = path[name];
|
|
41
|
+
|
|
42
|
+
if (value === undefined || value === null) {
|
|
43
|
+
continue;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
if (Array.isArray(value)) {
|
|
47
|
+
url = url.replace(match, serializeArrayParam({ explode, name, style, value }));
|
|
48
|
+
continue;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
if (typeof value === 'object') {
|
|
52
|
+
url = url.replace(
|
|
53
|
+
match,
|
|
54
|
+
serializeObjectParam({
|
|
55
|
+
explode,
|
|
56
|
+
name,
|
|
57
|
+
style,
|
|
58
|
+
value: value as Record<string, unknown>,
|
|
59
|
+
valueOnly: true,
|
|
60
|
+
}),
|
|
61
|
+
);
|
|
62
|
+
continue;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
if (style === 'matrix') {
|
|
66
|
+
url = url.replace(
|
|
67
|
+
match,
|
|
68
|
+
`;${serializePrimitiveParam({
|
|
69
|
+
name,
|
|
70
|
+
value: value as string,
|
|
71
|
+
})}`,
|
|
72
|
+
);
|
|
73
|
+
continue;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
const replaceValue = encodeURIComponent(
|
|
77
|
+
style === 'label' ? `.${value as string}` : (value as string),
|
|
78
|
+
);
|
|
79
|
+
url = url.replace(match, replaceValue);
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
return url;
|
|
83
|
+
};
|
|
84
|
+
|
|
85
|
+
export const getUrl = ({
|
|
86
|
+
baseUrl,
|
|
87
|
+
path,
|
|
88
|
+
query,
|
|
89
|
+
querySerializer,
|
|
90
|
+
url: _url,
|
|
91
|
+
}: {
|
|
92
|
+
baseUrl?: string;
|
|
93
|
+
path?: Record<string, unknown>;
|
|
94
|
+
query?: Record<string, unknown>;
|
|
95
|
+
querySerializer: QuerySerializer;
|
|
96
|
+
url: string;
|
|
97
|
+
}): string => {
|
|
98
|
+
const pathUrl = _url.startsWith('/') ? _url : `/${_url}`;
|
|
99
|
+
let url = (baseUrl ?? '') + pathUrl;
|
|
100
|
+
if (path) {
|
|
101
|
+
url = defaultPathSerializer({ path, url });
|
|
102
|
+
}
|
|
103
|
+
let search = query ? querySerializer(query) : '';
|
|
104
|
+
if (search.startsWith('?')) {
|
|
105
|
+
search = search.substring(1);
|
|
106
|
+
}
|
|
107
|
+
if (search) {
|
|
108
|
+
url += `?${search}`;
|
|
109
|
+
}
|
|
110
|
+
return url;
|
|
111
|
+
};
|
|
112
|
+
|
|
113
|
+
export function getValidRequestBody(options: {
|
|
114
|
+
body?: unknown;
|
|
115
|
+
bodySerializer?: BodySerializer | null;
|
|
116
|
+
serializedBody?: unknown;
|
|
117
|
+
}): unknown {
|
|
118
|
+
const hasBody = options.body !== undefined;
|
|
119
|
+
const isSerializedBody = hasBody && options.bodySerializer;
|
|
120
|
+
|
|
121
|
+
if (isSerializedBody) {
|
|
122
|
+
if ('serializedBody' in options) {
|
|
123
|
+
const hasSerializedBody =
|
|
124
|
+
options.serializedBody !== undefined && options.serializedBody !== '';
|
|
125
|
+
|
|
126
|
+
return hasSerializedBody ? options.serializedBody : null;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
// not all clients implement a serializedBody property (i.e., client-axios)
|
|
130
|
+
return options.body !== '' ? options.body : null;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
// plain/text body
|
|
134
|
+
if (hasBody) {
|
|
135
|
+
return options.body;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
// no body was provided
|
|
139
|
+
return undefined;
|
|
140
|
+
}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
// This file is auto-generated by @hey-api/openapi-ts
|
|
2
|
+
|
|
3
|
+
export {
|
|
4
|
+
deleteApiConversationMemoryReset,
|
|
5
|
+
deleteApiKillConversationByPhone,
|
|
6
|
+
deleteApiLiveNumbers,
|
|
7
|
+
getApiActiveConversationsAgentByAgentNumber,
|
|
8
|
+
getApiActiveConversationsByCustomerNumber,
|
|
9
|
+
getApiCountryConfigs,
|
|
10
|
+
getApiMessages,
|
|
11
|
+
getApiSyncToken,
|
|
12
|
+
postApiActiveConversationsAgentClaim,
|
|
13
|
+
postApiClear,
|
|
14
|
+
postApiConversationMemoryProfilesLookup,
|
|
15
|
+
postApiConversationMemoryRecall,
|
|
16
|
+
postApiRealTimeCintelUi,
|
|
17
|
+
postApiTelemetry,
|
|
18
|
+
type Options,
|
|
19
|
+
} from './sdk.gen';
|
|
20
|
+
export type {
|
|
21
|
+
ClientOptions,
|
|
22
|
+
DeleteApiConversationMemoryResetData,
|
|
23
|
+
DeleteApiConversationMemoryResetErrors,
|
|
24
|
+
DeleteApiConversationMemoryResetResponses,
|
|
25
|
+
DeleteApiKillConversationByPhoneData,
|
|
26
|
+
DeleteApiKillConversationByPhoneErrors,
|
|
27
|
+
DeleteApiKillConversationByPhoneResponses,
|
|
28
|
+
DeleteApiLiveNumbersData,
|
|
29
|
+
DeleteApiLiveNumbersErrors,
|
|
30
|
+
DeleteApiLiveNumbersResponses,
|
|
31
|
+
GetApiActiveConversationsAgentByAgentNumberData,
|
|
32
|
+
GetApiActiveConversationsAgentByAgentNumberErrors,
|
|
33
|
+
GetApiActiveConversationsAgentByAgentNumberResponses,
|
|
34
|
+
GetApiActiveConversationsByCustomerNumberData,
|
|
35
|
+
GetApiActiveConversationsByCustomerNumberErrors,
|
|
36
|
+
GetApiActiveConversationsByCustomerNumberResponses,
|
|
37
|
+
GetApiCountryConfigsData,
|
|
38
|
+
GetApiCountryConfigsErrors,
|
|
39
|
+
GetApiCountryConfigsResponses,
|
|
40
|
+
GetApiMessagesData,
|
|
41
|
+
GetApiMessagesErrors,
|
|
42
|
+
GetApiMessagesResponses,
|
|
43
|
+
GetApiSyncTokenData,
|
|
44
|
+
GetApiSyncTokenErrors,
|
|
45
|
+
GetApiSyncTokenResponses,
|
|
46
|
+
PostApiActiveConversationsAgentClaimData,
|
|
47
|
+
PostApiActiveConversationsAgentClaimErrors,
|
|
48
|
+
PostApiActiveConversationsAgentClaimResponses,
|
|
49
|
+
PostApiClearData,
|
|
50
|
+
PostApiClearErrors,
|
|
51
|
+
PostApiClearResponses,
|
|
52
|
+
PostApiConversationMemoryProfilesLookupData,
|
|
53
|
+
PostApiConversationMemoryProfilesLookupErrors,
|
|
54
|
+
PostApiConversationMemoryProfilesLookupResponses,
|
|
55
|
+
PostApiConversationMemoryRecallData,
|
|
56
|
+
PostApiConversationMemoryRecallErrors,
|
|
57
|
+
PostApiConversationMemoryRecallResponses,
|
|
58
|
+
PostApiRealTimeCintelUiData,
|
|
59
|
+
PostApiRealTimeCintelUiErrors,
|
|
60
|
+
PostApiRealTimeCintelUiResponses,
|
|
61
|
+
PostApiTelemetryData,
|
|
62
|
+
PostApiTelemetryErrors,
|
|
63
|
+
PostApiTelemetryResponses,
|
|
64
|
+
} from './types.gen';
|
|
@@ -0,0 +1,408 @@
|
|
|
1
|
+
// This file is auto-generated by @hey-api/openapi-ts
|
|
2
|
+
|
|
3
|
+
import type { Client, ClientMeta, Options as Options2, RequestResult, TDataShape } from './client';
|
|
4
|
+
import { client } from './client.gen';
|
|
5
|
+
import type {
|
|
6
|
+
DeleteApiConversationMemoryResetData,
|
|
7
|
+
DeleteApiConversationMemoryResetErrors,
|
|
8
|
+
DeleteApiConversationMemoryResetResponses,
|
|
9
|
+
DeleteApiKillConversationByPhoneData,
|
|
10
|
+
DeleteApiKillConversationByPhoneErrors,
|
|
11
|
+
DeleteApiKillConversationByPhoneResponses,
|
|
12
|
+
DeleteApiLiveNumbersData,
|
|
13
|
+
DeleteApiLiveNumbersErrors,
|
|
14
|
+
DeleteApiLiveNumbersResponses,
|
|
15
|
+
GetApiActiveConversationsAgentByAgentNumberData,
|
|
16
|
+
GetApiActiveConversationsAgentByAgentNumberErrors,
|
|
17
|
+
GetApiActiveConversationsAgentByAgentNumberResponses,
|
|
18
|
+
GetApiActiveConversationsByCustomerNumberData,
|
|
19
|
+
GetApiActiveConversationsByCustomerNumberErrors,
|
|
20
|
+
GetApiActiveConversationsByCustomerNumberResponses,
|
|
21
|
+
GetApiCountryConfigsData,
|
|
22
|
+
GetApiCountryConfigsErrors,
|
|
23
|
+
GetApiCountryConfigsResponses,
|
|
24
|
+
GetApiMessagesData,
|
|
25
|
+
GetApiMessagesErrors,
|
|
26
|
+
GetApiMessagesResponses,
|
|
27
|
+
GetApiSyncTokenData,
|
|
28
|
+
GetApiSyncTokenErrors,
|
|
29
|
+
GetApiSyncTokenResponses,
|
|
30
|
+
PostApiActiveConversationsAgentClaimData,
|
|
31
|
+
PostApiActiveConversationsAgentClaimErrors,
|
|
32
|
+
PostApiActiveConversationsAgentClaimResponses,
|
|
33
|
+
PostApiClearData,
|
|
34
|
+
PostApiClearErrors,
|
|
35
|
+
PostApiClearResponses,
|
|
36
|
+
PostApiConversationMemoryProfilesLookupData,
|
|
37
|
+
PostApiConversationMemoryProfilesLookupErrors,
|
|
38
|
+
PostApiConversationMemoryProfilesLookupResponses,
|
|
39
|
+
PostApiConversationMemoryRecallData,
|
|
40
|
+
PostApiConversationMemoryRecallErrors,
|
|
41
|
+
PostApiConversationMemoryRecallResponses,
|
|
42
|
+
PostApiRealTimeCintelUiData,
|
|
43
|
+
PostApiRealTimeCintelUiErrors,
|
|
44
|
+
PostApiRealTimeCintelUiResponses,
|
|
45
|
+
PostApiTelemetryData,
|
|
46
|
+
PostApiTelemetryErrors,
|
|
47
|
+
PostApiTelemetryResponses,
|
|
48
|
+
} from './types.gen';
|
|
49
|
+
|
|
50
|
+
export type Options<
|
|
51
|
+
TData extends TDataShape = TDataShape,
|
|
52
|
+
ThrowOnError extends boolean = boolean,
|
|
53
|
+
TResponse = unknown,
|
|
54
|
+
> = Options2<TData, ThrowOnError, TResponse> & {
|
|
55
|
+
/**
|
|
56
|
+
* You can provide a client instance returned by `createClient()` instead of
|
|
57
|
+
* individual options. This might be also useful if you want to implement a
|
|
58
|
+
* custom client.
|
|
59
|
+
*/
|
|
60
|
+
client?: Client;
|
|
61
|
+
/**
|
|
62
|
+
* You can pass arbitrary values through the `meta` object. This can be
|
|
63
|
+
* used to access values that aren't defined as part of the SDK function.
|
|
64
|
+
*/
|
|
65
|
+
meta?: keyof ClientMeta extends never ? Record<string, unknown> : ClientMeta;
|
|
66
|
+
};
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
* GET active-conversations / {customerNumber}
|
|
70
|
+
*/
|
|
71
|
+
export const getApiActiveConversationsByCustomerNumber = <ThrowOnError extends boolean = false>(
|
|
72
|
+
options: Options<GetApiActiveConversationsByCustomerNumberData, ThrowOnError>,
|
|
73
|
+
): RequestResult<
|
|
74
|
+
GetApiActiveConversationsByCustomerNumberResponses,
|
|
75
|
+
GetApiActiveConversationsByCustomerNumberErrors,
|
|
76
|
+
ThrowOnError
|
|
77
|
+
> =>
|
|
78
|
+
(options.client ?? client).get<
|
|
79
|
+
GetApiActiveConversationsByCustomerNumberResponses,
|
|
80
|
+
GetApiActiveConversationsByCustomerNumberErrors,
|
|
81
|
+
ThrowOnError
|
|
82
|
+
>({
|
|
83
|
+
security: [
|
|
84
|
+
{
|
|
85
|
+
in: 'cookie',
|
|
86
|
+
name: 'next-auth.session-token',
|
|
87
|
+
type: 'apiKey',
|
|
88
|
+
},
|
|
89
|
+
],
|
|
90
|
+
url: '/api/active-conversations/{customerNumber}',
|
|
91
|
+
...options,
|
|
92
|
+
});
|
|
93
|
+
|
|
94
|
+
/**
|
|
95
|
+
* GET active-conversations / agent / {agentNumber}
|
|
96
|
+
*/
|
|
97
|
+
export const getApiActiveConversationsAgentByAgentNumber = <ThrowOnError extends boolean = false>(
|
|
98
|
+
options: Options<GetApiActiveConversationsAgentByAgentNumberData, ThrowOnError>,
|
|
99
|
+
): RequestResult<
|
|
100
|
+
GetApiActiveConversationsAgentByAgentNumberResponses,
|
|
101
|
+
GetApiActiveConversationsAgentByAgentNumberErrors,
|
|
102
|
+
ThrowOnError
|
|
103
|
+
> =>
|
|
104
|
+
(options.client ?? client).get<
|
|
105
|
+
GetApiActiveConversationsAgentByAgentNumberResponses,
|
|
106
|
+
GetApiActiveConversationsAgentByAgentNumberErrors,
|
|
107
|
+
ThrowOnError
|
|
108
|
+
>({
|
|
109
|
+
security: [
|
|
110
|
+
{
|
|
111
|
+
in: 'cookie',
|
|
112
|
+
name: 'next-auth.session-token',
|
|
113
|
+
type: 'apiKey',
|
|
114
|
+
},
|
|
115
|
+
],
|
|
116
|
+
url: '/api/active-conversations/agent/{agentNumber}',
|
|
117
|
+
...options,
|
|
118
|
+
});
|
|
119
|
+
|
|
120
|
+
/**
|
|
121
|
+
* POST active-conversations / agent / claim
|
|
122
|
+
*/
|
|
123
|
+
export const postApiActiveConversationsAgentClaim = <ThrowOnError extends boolean = false>(
|
|
124
|
+
options: Options<PostApiActiveConversationsAgentClaimData, ThrowOnError>,
|
|
125
|
+
): RequestResult<
|
|
126
|
+
PostApiActiveConversationsAgentClaimResponses,
|
|
127
|
+
PostApiActiveConversationsAgentClaimErrors,
|
|
128
|
+
ThrowOnError
|
|
129
|
+
> =>
|
|
130
|
+
(options.client ?? client).post<
|
|
131
|
+
PostApiActiveConversationsAgentClaimResponses,
|
|
132
|
+
PostApiActiveConversationsAgentClaimErrors,
|
|
133
|
+
ThrowOnError
|
|
134
|
+
>({
|
|
135
|
+
security: [
|
|
136
|
+
{
|
|
137
|
+
in: 'cookie',
|
|
138
|
+
name: 'next-auth.session-token',
|
|
139
|
+
type: 'apiKey',
|
|
140
|
+
},
|
|
141
|
+
],
|
|
142
|
+
url: '/api/active-conversations/agent/claim',
|
|
143
|
+
...options,
|
|
144
|
+
headers: {
|
|
145
|
+
'Content-Type': 'application/json',
|
|
146
|
+
...options.headers,
|
|
147
|
+
},
|
|
148
|
+
});
|
|
149
|
+
|
|
150
|
+
/**
|
|
151
|
+
* POST clear
|
|
152
|
+
*/
|
|
153
|
+
export const postApiClear = <ThrowOnError extends boolean = false>(
|
|
154
|
+
options: Options<PostApiClearData, ThrowOnError>,
|
|
155
|
+
): RequestResult<PostApiClearResponses, PostApiClearErrors, ThrowOnError> =>
|
|
156
|
+
(options.client ?? client).post<PostApiClearResponses, PostApiClearErrors, ThrowOnError>({
|
|
157
|
+
security: [
|
|
158
|
+
{
|
|
159
|
+
in: 'cookie',
|
|
160
|
+
name: 'next-auth.session-token',
|
|
161
|
+
type: 'apiKey',
|
|
162
|
+
},
|
|
163
|
+
],
|
|
164
|
+
url: '/api/clear',
|
|
165
|
+
...options,
|
|
166
|
+
headers: {
|
|
167
|
+
'Content-Type': 'application/json',
|
|
168
|
+
...options.headers,
|
|
169
|
+
},
|
|
170
|
+
});
|
|
171
|
+
|
|
172
|
+
/**
|
|
173
|
+
* POST conversation-memory / profiles-lookup
|
|
174
|
+
*/
|
|
175
|
+
export const postApiConversationMemoryProfilesLookup = <ThrowOnError extends boolean = false>(
|
|
176
|
+
options: Options<PostApiConversationMemoryProfilesLookupData, ThrowOnError>,
|
|
177
|
+
): RequestResult<
|
|
178
|
+
PostApiConversationMemoryProfilesLookupResponses,
|
|
179
|
+
PostApiConversationMemoryProfilesLookupErrors,
|
|
180
|
+
ThrowOnError
|
|
181
|
+
> =>
|
|
182
|
+
(options.client ?? client).post<
|
|
183
|
+
PostApiConversationMemoryProfilesLookupResponses,
|
|
184
|
+
PostApiConversationMemoryProfilesLookupErrors,
|
|
185
|
+
ThrowOnError
|
|
186
|
+
>({
|
|
187
|
+
security: [
|
|
188
|
+
{
|
|
189
|
+
in: 'cookie',
|
|
190
|
+
name: 'next-auth.session-token',
|
|
191
|
+
type: 'apiKey',
|
|
192
|
+
},
|
|
193
|
+
],
|
|
194
|
+
url: '/api/conversation-memory/profiles-lookup',
|
|
195
|
+
...options,
|
|
196
|
+
headers: {
|
|
197
|
+
'Content-Type': 'application/json',
|
|
198
|
+
...options.headers,
|
|
199
|
+
},
|
|
200
|
+
});
|
|
201
|
+
|
|
202
|
+
/**
|
|
203
|
+
* POST conversation-memory / recall
|
|
204
|
+
*/
|
|
205
|
+
export const postApiConversationMemoryRecall = <ThrowOnError extends boolean = false>(
|
|
206
|
+
options: Options<PostApiConversationMemoryRecallData, ThrowOnError>,
|
|
207
|
+
): RequestResult<
|
|
208
|
+
PostApiConversationMemoryRecallResponses,
|
|
209
|
+
PostApiConversationMemoryRecallErrors,
|
|
210
|
+
ThrowOnError
|
|
211
|
+
> =>
|
|
212
|
+
(options.client ?? client).post<
|
|
213
|
+
PostApiConversationMemoryRecallResponses,
|
|
214
|
+
PostApiConversationMemoryRecallErrors,
|
|
215
|
+
ThrowOnError
|
|
216
|
+
>({
|
|
217
|
+
security: [
|
|
218
|
+
{
|
|
219
|
+
in: 'cookie',
|
|
220
|
+
name: 'next-auth.session-token',
|
|
221
|
+
type: 'apiKey',
|
|
222
|
+
},
|
|
223
|
+
],
|
|
224
|
+
url: '/api/conversation-memory/recall',
|
|
225
|
+
...options,
|
|
226
|
+
headers: {
|
|
227
|
+
'Content-Type': 'application/json',
|
|
228
|
+
...options.headers,
|
|
229
|
+
},
|
|
230
|
+
});
|
|
231
|
+
|
|
232
|
+
/**
|
|
233
|
+
* DELETE conversation-memory / reset
|
|
234
|
+
*/
|
|
235
|
+
export const deleteApiConversationMemoryReset = <ThrowOnError extends boolean = false>(
|
|
236
|
+
options: Options<DeleteApiConversationMemoryResetData, ThrowOnError>,
|
|
237
|
+
): RequestResult<
|
|
238
|
+
DeleteApiConversationMemoryResetResponses,
|
|
239
|
+
DeleteApiConversationMemoryResetErrors,
|
|
240
|
+
ThrowOnError
|
|
241
|
+
> =>
|
|
242
|
+
(options.client ?? client).delete<
|
|
243
|
+
DeleteApiConversationMemoryResetResponses,
|
|
244
|
+
DeleteApiConversationMemoryResetErrors,
|
|
245
|
+
ThrowOnError
|
|
246
|
+
>({
|
|
247
|
+
security: [
|
|
248
|
+
{
|
|
249
|
+
in: 'cookie',
|
|
250
|
+
name: 'next-auth.session-token',
|
|
251
|
+
type: 'apiKey',
|
|
252
|
+
},
|
|
253
|
+
],
|
|
254
|
+
url: '/api/conversation-memory/reset',
|
|
255
|
+
...options,
|
|
256
|
+
});
|
|
257
|
+
|
|
258
|
+
/**
|
|
259
|
+
* GET country-configs
|
|
260
|
+
*/
|
|
261
|
+
export const getApiCountryConfigs = <ThrowOnError extends boolean = false>(
|
|
262
|
+
options?: Options<GetApiCountryConfigsData, ThrowOnError>,
|
|
263
|
+
): RequestResult<GetApiCountryConfigsResponses, GetApiCountryConfigsErrors, ThrowOnError> =>
|
|
264
|
+
(options?.client ?? client).get<
|
|
265
|
+
GetApiCountryConfigsResponses,
|
|
266
|
+
GetApiCountryConfigsErrors,
|
|
267
|
+
ThrowOnError
|
|
268
|
+
>({
|
|
269
|
+
security: [
|
|
270
|
+
{
|
|
271
|
+
in: 'cookie',
|
|
272
|
+
name: 'next-auth.session-token',
|
|
273
|
+
type: 'apiKey',
|
|
274
|
+
},
|
|
275
|
+
],
|
|
276
|
+
url: '/api/country-configs',
|
|
277
|
+
...options,
|
|
278
|
+
});
|
|
279
|
+
|
|
280
|
+
/**
|
|
281
|
+
* DELETE kill-conversation / {phone}
|
|
282
|
+
*/
|
|
283
|
+
export const deleteApiKillConversationByPhone = <ThrowOnError extends boolean = false>(
|
|
284
|
+
options: Options<DeleteApiKillConversationByPhoneData, ThrowOnError>,
|
|
285
|
+
): RequestResult<
|
|
286
|
+
DeleteApiKillConversationByPhoneResponses,
|
|
287
|
+
DeleteApiKillConversationByPhoneErrors,
|
|
288
|
+
ThrowOnError
|
|
289
|
+
> =>
|
|
290
|
+
(options.client ?? client).delete<
|
|
291
|
+
DeleteApiKillConversationByPhoneResponses,
|
|
292
|
+
DeleteApiKillConversationByPhoneErrors,
|
|
293
|
+
ThrowOnError
|
|
294
|
+
>({
|
|
295
|
+
security: [
|
|
296
|
+
{
|
|
297
|
+
in: 'cookie',
|
|
298
|
+
name: 'next-auth.session-token',
|
|
299
|
+
type: 'apiKey',
|
|
300
|
+
},
|
|
301
|
+
],
|
|
302
|
+
url: '/api/kill-conversation/{phone}',
|
|
303
|
+
...options,
|
|
304
|
+
});
|
|
305
|
+
|
|
306
|
+
/**
|
|
307
|
+
* DELETE live-numbers
|
|
308
|
+
*/
|
|
309
|
+
export const deleteApiLiveNumbers = <ThrowOnError extends boolean = false>(
|
|
310
|
+
options?: Options<DeleteApiLiveNumbersData, ThrowOnError>,
|
|
311
|
+
): RequestResult<DeleteApiLiveNumbersResponses, DeleteApiLiveNumbersErrors, ThrowOnError> =>
|
|
312
|
+
(options?.client ?? client).delete<
|
|
313
|
+
DeleteApiLiveNumbersResponses,
|
|
314
|
+
DeleteApiLiveNumbersErrors,
|
|
315
|
+
ThrowOnError
|
|
316
|
+
>({
|
|
317
|
+
security: [
|
|
318
|
+
{
|
|
319
|
+
in: 'cookie',
|
|
320
|
+
name: 'next-auth.session-token',
|
|
321
|
+
type: 'apiKey',
|
|
322
|
+
},
|
|
323
|
+
],
|
|
324
|
+
url: '/api/live-numbers',
|
|
325
|
+
...options,
|
|
326
|
+
});
|
|
327
|
+
|
|
328
|
+
/**
|
|
329
|
+
* GET messages
|
|
330
|
+
*/
|
|
331
|
+
export const getApiMessages = <ThrowOnError extends boolean = false>(
|
|
332
|
+
options?: Options<GetApiMessagesData, ThrowOnError>,
|
|
333
|
+
): RequestResult<GetApiMessagesResponses, GetApiMessagesErrors, ThrowOnError> =>
|
|
334
|
+
(options?.client ?? client).get<GetApiMessagesResponses, GetApiMessagesErrors, ThrowOnError>({
|
|
335
|
+
security: [
|
|
336
|
+
{
|
|
337
|
+
in: 'cookie',
|
|
338
|
+
name: 'next-auth.session-token',
|
|
339
|
+
type: 'apiKey',
|
|
340
|
+
},
|
|
341
|
+
],
|
|
342
|
+
url: '/api/messages',
|
|
343
|
+
...options,
|
|
344
|
+
});
|
|
345
|
+
|
|
346
|
+
/**
|
|
347
|
+
* POST real-time-cintel-ui
|
|
348
|
+
*/
|
|
349
|
+
export const postApiRealTimeCintelUi = <ThrowOnError extends boolean = false>(
|
|
350
|
+
options: Options<PostApiRealTimeCintelUiData, ThrowOnError>,
|
|
351
|
+
): RequestResult<PostApiRealTimeCintelUiResponses, PostApiRealTimeCintelUiErrors, ThrowOnError> =>
|
|
352
|
+
(options.client ?? client).post<
|
|
353
|
+
PostApiRealTimeCintelUiResponses,
|
|
354
|
+
PostApiRealTimeCintelUiErrors,
|
|
355
|
+
ThrowOnError
|
|
356
|
+
>({
|
|
357
|
+
security: [
|
|
358
|
+
{
|
|
359
|
+
in: 'cookie',
|
|
360
|
+
name: 'next-auth.session-token',
|
|
361
|
+
type: 'apiKey',
|
|
362
|
+
},
|
|
363
|
+
],
|
|
364
|
+
url: '/api/real-time-cintel-ui',
|
|
365
|
+
...options,
|
|
366
|
+
headers: {
|
|
367
|
+
'Content-Type': 'application/json',
|
|
368
|
+
...options.headers,
|
|
369
|
+
},
|
|
370
|
+
});
|
|
371
|
+
|
|
372
|
+
/**
|
|
373
|
+
* GET sync-token
|
|
374
|
+
*/
|
|
375
|
+
export const getApiSyncToken = <ThrowOnError extends boolean = false>(
|
|
376
|
+
options?: Options<GetApiSyncTokenData, ThrowOnError>,
|
|
377
|
+
): RequestResult<GetApiSyncTokenResponses, GetApiSyncTokenErrors, ThrowOnError> =>
|
|
378
|
+
(options?.client ?? client).get<GetApiSyncTokenResponses, GetApiSyncTokenErrors, ThrowOnError>({
|
|
379
|
+
security: [
|
|
380
|
+
{
|
|
381
|
+
in: 'cookie',
|
|
382
|
+
name: 'next-auth.session-token',
|
|
383
|
+
type: 'apiKey',
|
|
384
|
+
},
|
|
385
|
+
],
|
|
386
|
+
url: '/api/sync-token',
|
|
387
|
+
...options,
|
|
388
|
+
});
|
|
389
|
+
|
|
390
|
+
/**
|
|
391
|
+
* POST telemetry
|
|
392
|
+
*/
|
|
393
|
+
export const postApiTelemetry = <ThrowOnError extends boolean = false>(
|
|
394
|
+
options?: Options<PostApiTelemetryData, ThrowOnError>,
|
|
395
|
+
): RequestResult<PostApiTelemetryResponses, PostApiTelemetryErrors, ThrowOnError> =>
|
|
396
|
+
(options?.client ?? client).post<PostApiTelemetryResponses, PostApiTelemetryErrors, ThrowOnError>(
|
|
397
|
+
{
|
|
398
|
+
security: [
|
|
399
|
+
{
|
|
400
|
+
in: 'cookie',
|
|
401
|
+
name: 'next-auth.session-token',
|
|
402
|
+
type: 'apiKey',
|
|
403
|
+
},
|
|
404
|
+
],
|
|
405
|
+
url: '/api/telemetry',
|
|
406
|
+
...options,
|
|
407
|
+
},
|
|
408
|
+
);
|