@l7mp/tivadar-ai-api-sdk 0.2.15 → 0.2.16
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/api-client.d.ts +8 -1
- package/dist/api-client.js +7 -0
- package/dist/apis/AdminPhoneNumbersApi.d.ts +26 -1
- package/dist/apis/AdminPhoneNumbersApi.js +81 -0
- package/dist/apis/OutboundCallsApi.d.ts +32 -0
- package/dist/apis/OutboundCallsApi.js +77 -0
- package/dist/apis/index.d.ts +1 -0
- package/dist/apis/index.js +1 -0
- package/dist/esm/api-client.d.ts +8 -1
- package/dist/esm/api-client.js +7 -0
- package/dist/esm/apis/AdminPhoneNumbersApi.d.ts +26 -1
- package/dist/esm/apis/AdminPhoneNumbersApi.js +82 -1
- package/dist/esm/apis/OutboundCallsApi.d.ts +32 -0
- package/dist/esm/apis/OutboundCallsApi.js +73 -0
- package/dist/esm/apis/index.d.ts +1 -0
- package/dist/esm/apis/index.js +1 -0
- package/dist/esm/models/AdminPhoneNumberAssignOutbound.d.ts +32 -0
- package/dist/esm/models/AdminPhoneNumberAssignOutbound.js +43 -0
- package/dist/esm/models/AdminPhoneNumberDetail.d.ts +30 -0
- package/dist/esm/models/AdminPhoneNumberDetail.js +10 -0
- package/dist/esm/models/AdminPhoneNumberUpdate.d.ts +18 -0
- package/dist/esm/models/AdminPhoneNumberUpdate.js +6 -0
- package/dist/esm/models/OutboundCall.d.ts +68 -0
- package/dist/esm/models/OutboundCall.js +53 -0
- package/dist/esm/models/OutboundCallRequest.d.ts +44 -0
- package/dist/esm/models/OutboundCallRequest.js +47 -0
- package/dist/esm/models/PhoneNumber.d.ts +18 -0
- package/dist/esm/models/PhoneNumber.js +6 -0
- package/dist/esm/models/PhoneNumberCreate.d.ts +24 -0
- package/dist/esm/models/PhoneNumberCreate.js +8 -0
- package/dist/esm/models/index.d.ts +3 -0
- package/dist/esm/models/index.js +3 -0
- package/dist/models/AdminPhoneNumberAssignOutbound.d.ts +32 -0
- package/dist/models/AdminPhoneNumberAssignOutbound.js +50 -0
- package/dist/models/AdminPhoneNumberDetail.d.ts +30 -0
- package/dist/models/AdminPhoneNumberDetail.js +10 -0
- package/dist/models/AdminPhoneNumberUpdate.d.ts +18 -0
- package/dist/models/AdminPhoneNumberUpdate.js +6 -0
- package/dist/models/OutboundCall.d.ts +68 -0
- package/dist/models/OutboundCall.js +60 -0
- package/dist/models/OutboundCallRequest.d.ts +44 -0
- package/dist/models/OutboundCallRequest.js +54 -0
- package/dist/models/PhoneNumber.d.ts +18 -0
- package/dist/models/PhoneNumber.js +6 -0
- package/dist/models/PhoneNumberCreate.d.ts +24 -0
- package/dist/models/PhoneNumberCreate.js +8 -0
- package/dist/models/index.d.ts +3 -0
- package/dist/models/index.js +3 -0
- package/package.json +1 -1
- package/src/api-client.ts +16 -0
- package/src/apis/AdminPhoneNumbersApi.ts +114 -0
- package/src/apis/OutboundCallsApi.ts +95 -0
- package/src/apis/index.ts +1 -0
- package/src/models/AdminPhoneNumberAssignOutbound.ts +66 -0
- package/src/models/AdminPhoneNumberDetail.ts +40 -0
- package/src/models/AdminPhoneNumberUpdate.ts +24 -0
- package/src/models/OutboundCall.ts +113 -0
- package/src/models/OutboundCallRequest.ts +82 -0
- package/src/models/PhoneNumber.ts +24 -0
- package/src/models/PhoneNumberCreate.ts +32 -0
- package/src/models/index.ts +3 -0
package/dist/api-client.d.ts
CHANGED
|
@@ -20,11 +20,12 @@ import { SubscriptionApi } from "./apis/SubscriptionApi";
|
|
|
20
20
|
import { AdminSubscriptionsApi } from "./apis/AdminSubscriptionsApi";
|
|
21
21
|
import { AdminPhoneNumbersApi } from "./apis/AdminPhoneNumbersApi";
|
|
22
22
|
import { AdminSIPApi } from "./apis/AdminSIPApi";
|
|
23
|
+
import { OutboundCallsApi } from "./apis/OutboundCallsApi";
|
|
23
24
|
import { VoiceUsageApi } from "./apis/VoiceUsageApi";
|
|
24
25
|
import { VoiceAgentsApi } from "./apis/VoiceAgentsApi";
|
|
25
26
|
import { ToolsApi } from "./apis/ToolsApi";
|
|
26
27
|
import { PhonebookApi } from "./apis/PhonebookApi";
|
|
27
|
-
import type { CallCreate, CallUpdate, CallFlagCreate, CallFlagUpdate, CallFlagResolve, NotificationScope, NotificationSeverity, NotificationType, VoiceAgentCreate, VoiceAgentUpdate, ChatAgentCreate, ChatAgentUpdate, Calendar, CalendarCreate, CalendarUpdate, CalendarEventCreate, CalendarEventUpdate, InvitationAccept, InvitationCreate, RagConfigCreate, SipTrunkCreate, DispatchRuleCreate, PhoneNumberCreate, OrganizationCreate, CreateCheckoutSessionRequest, CancelSubscriptionRequest, UpdatePlanRequest, PauseSubscriptionRequest, BillingPortalRequest, AdminSetSubscriptionRequest, AdminGrantMinutesRequest, AdminPhoneNumberUpdate, AdminPhoneNumberAssign, AdminSipTrunkCreate, AdminDispatchRuleCreate, VoiceUsageReportRequest, UserPreferencesUpdate, AgentToolUpsert, PhonebookUpdate, PhonebookEntryCreate, PhonebookEntryUpdate } from "./models";
|
|
28
|
+
import type { CallCreate, CallUpdate, CallFlagCreate, CallFlagUpdate, CallFlagResolve, NotificationScope, NotificationSeverity, NotificationType, VoiceAgentCreate, VoiceAgentUpdate, ChatAgentCreate, ChatAgentUpdate, Calendar, CalendarCreate, CalendarUpdate, CalendarEventCreate, CalendarEventUpdate, InvitationAccept, InvitationCreate, RagConfigCreate, SipTrunkCreate, DispatchRuleCreate, PhoneNumberCreate, OrganizationCreate, CreateCheckoutSessionRequest, CancelSubscriptionRequest, UpdatePlanRequest, PauseSubscriptionRequest, BillingPortalRequest, AdminSetSubscriptionRequest, AdminGrantMinutesRequest, AdminPhoneNumberUpdate, AdminPhoneNumberAssign, AdminPhoneNumberAssignOutbound, AdminSipTrunkCreate, AdminDispatchRuleCreate, OutboundCallRequest, VoiceUsageReportRequest, UserPreferencesUpdate, AgentToolUpsert, PhonebookUpdate, PhonebookEntryCreate, PhonebookEntryUpdate } from "./models";
|
|
28
29
|
export interface ApiClientConfig {
|
|
29
30
|
baseUrl: string;
|
|
30
31
|
options?: {
|
|
@@ -184,6 +185,8 @@ export declare class Api {
|
|
|
184
185
|
delete: (phoneNumberId: number, options?: RequestInit) => ReturnType<AdminPhoneNumbersApi["adminPhoneNumbersPhoneNumberIdDelete"]>;
|
|
185
186
|
assign: (phoneNumberId: number, adminPhoneNumberAssign: AdminPhoneNumberAssign, options?: RequestInit) => ReturnType<AdminPhoneNumbersApi["adminPhoneNumbersPhoneNumberIdAssignPost"]>;
|
|
186
187
|
unassign: (phoneNumberId: number, options?: RequestInit) => ReturnType<AdminPhoneNumbersApi["adminPhoneNumbersPhoneNumberIdUnassignPost"]>;
|
|
188
|
+
assignOutbound: (phoneNumberId: number, adminPhoneNumberAssignOutbound: AdminPhoneNumberAssignOutbound, options?: RequestInit) => ReturnType<AdminPhoneNumbersApi["adminPhoneNumbersPhoneNumberIdAssignOutboundPost"]>;
|
|
189
|
+
unassignOutbound: (phoneNumberId: number, options?: RequestInit) => ReturnType<AdminPhoneNumbersApi["adminPhoneNumbersPhoneNumberIdUnassignOutboundPost"]>;
|
|
187
190
|
listOrders: (params?: {
|
|
188
191
|
status?: "pending" | "active" | "canceled";
|
|
189
192
|
organizationId?: string;
|
|
@@ -211,6 +214,9 @@ export declare class Api {
|
|
|
211
214
|
listLiveKitTrunks: (options?: RequestInit) => ReturnType<AdminSIPApi["adminSipLivekitTrunksGet"]>;
|
|
212
215
|
listLiveKitDispatchRules: (options?: RequestInit) => ReturnType<AdminSIPApi["adminSipLivekitDispatchRulesGet"]>;
|
|
213
216
|
};
|
|
217
|
+
readonly outboundCalls: {
|
|
218
|
+
create: (organizationId: string, outboundCallRequest: OutboundCallRequest, options?: RequestInit) => ReturnType<OutboundCallsApi["organizationsOrganizationIdOutboundCallsPost"]>;
|
|
219
|
+
};
|
|
214
220
|
readonly voiceUsage: {
|
|
215
221
|
report: (voiceUsageReportRequest: VoiceUsageReportRequest, options?: RequestInit) => ReturnType<VoiceUsageApi["voiceUsageReportPost"]>;
|
|
216
222
|
};
|
|
@@ -280,6 +286,7 @@ export declare class Api {
|
|
|
280
286
|
private readonly adminSubscriptionsApi;
|
|
281
287
|
private readonly adminPhoneNumbersApi;
|
|
282
288
|
private readonly adminSipApi;
|
|
289
|
+
private readonly outboundCallsApi;
|
|
283
290
|
private readonly voiceUsageApi;
|
|
284
291
|
private readonly embeddingProvidersApi;
|
|
285
292
|
private readonly llmProvidersApi;
|
package/dist/api-client.js
CHANGED
|
@@ -32,6 +32,7 @@ const SubscriptionApi_1 = require("./apis/SubscriptionApi");
|
|
|
32
32
|
const AdminSubscriptionsApi_1 = require("./apis/AdminSubscriptionsApi");
|
|
33
33
|
const AdminPhoneNumbersApi_1 = require("./apis/AdminPhoneNumbersApi");
|
|
34
34
|
const AdminSIPApi_1 = require("./apis/AdminSIPApi");
|
|
35
|
+
const OutboundCallsApi_1 = require("./apis/OutboundCallsApi");
|
|
35
36
|
const VoiceUsageApi_1 = require("./apis/VoiceUsageApi");
|
|
36
37
|
const VoiceAgentsApi_1 = require("./apis/VoiceAgentsApi");
|
|
37
38
|
const ToolsApi_1 = require("./apis/ToolsApi");
|
|
@@ -79,6 +80,7 @@ class Api {
|
|
|
79
80
|
this.adminSubscriptionsApi = new AdminSubscriptionsApi_1.AdminSubscriptionsApi(configuration);
|
|
80
81
|
this.adminPhoneNumbersApi = new AdminPhoneNumbersApi_1.AdminPhoneNumbersApi(configuration);
|
|
81
82
|
this.adminSipApi = new AdminSIPApi_1.AdminSIPApi(configuration);
|
|
83
|
+
this.outboundCallsApi = new OutboundCallsApi_1.OutboundCallsApi(configuration);
|
|
82
84
|
this.voiceUsageApi = new VoiceUsageApi_1.VoiceUsageApi(configuration);
|
|
83
85
|
this.embeddingProvidersApi = new EmbeddingProvidersApi_1.EmbeddingProvidersApi(configuration);
|
|
84
86
|
this.llmProvidersApi = new LLMProvidersApi_1.LLMProvidersApi(configuration);
|
|
@@ -224,6 +226,8 @@ class Api {
|
|
|
224
226
|
delete: (phoneNumberId, options) => this.adminPhoneNumbersApi.adminPhoneNumbersPhoneNumberIdDelete({ phoneNumberId }, options),
|
|
225
227
|
assign: (phoneNumberId, adminPhoneNumberAssign, options) => this.adminPhoneNumbersApi.adminPhoneNumbersPhoneNumberIdAssignPost({ phoneNumberId, adminPhoneNumberAssign }, options),
|
|
226
228
|
unassign: (phoneNumberId, options) => this.adminPhoneNumbersApi.adminPhoneNumbersPhoneNumberIdUnassignPost({ phoneNumberId }, options),
|
|
229
|
+
assignOutbound: (phoneNumberId, adminPhoneNumberAssignOutbound, options) => this.adminPhoneNumbersApi.adminPhoneNumbersPhoneNumberIdAssignOutboundPost({ phoneNumberId, adminPhoneNumberAssignOutbound }, options),
|
|
230
|
+
unassignOutbound: (phoneNumberId, options) => this.adminPhoneNumbersApi.adminPhoneNumbersPhoneNumberIdUnassignOutboundPost({ phoneNumberId }, options),
|
|
227
231
|
listOrders: (params, options) => this.adminPhoneNumbersApi.adminPhoneNumbersOrdersGet({ status: params === null || params === void 0 ? void 0 : params.status, organizationId: params === null || params === void 0 ? void 0 : params.organizationId, requiresCallRedirect: params === null || params === void 0 ? void 0 : params.requiresCallRedirect, limit: params === null || params === void 0 ? void 0 : params.limit, offset: params === null || params === void 0 ? void 0 : params.offset }, options),
|
|
228
232
|
processOrders: (options) => this.adminPhoneNumbersApi.adminPhoneNumbersOrdersProcessPost(options),
|
|
229
233
|
fulfillOrder: (orderId, options) => this.adminPhoneNumbersApi.adminPhoneNumbersOrdersOrderIdFulfillPost({ orderId }, options),
|
|
@@ -239,6 +243,9 @@ class Api {
|
|
|
239
243
|
listLiveKitTrunks: (options) => this.adminSipApi.adminSipLivekitTrunksGet(options),
|
|
240
244
|
listLiveKitDispatchRules: (options) => this.adminSipApi.adminSipLivekitDispatchRulesGet(options),
|
|
241
245
|
};
|
|
246
|
+
this.outboundCalls = {
|
|
247
|
+
create: (organizationId, outboundCallRequest, options) => this.outboundCallsApi.organizationsOrganizationIdOutboundCallsPost({ organizationId, outboundCallRequest }, options),
|
|
248
|
+
};
|
|
242
249
|
this.voiceUsage = {
|
|
243
250
|
report: (voiceUsageReportRequest, options) => this.voiceUsageApi.voiceUsageReportPost({ voiceUsageReportRequest }, options),
|
|
244
251
|
};
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
12
|
import * as runtime from '../runtime';
|
|
13
|
-
import type { AdminPhoneNumberAssign, AdminPhoneNumberDetail, AdminPhoneNumberUpdate, AdminPhoneNumbersListResponse, PhoneNumber, PhoneNumberCreate, PhoneNumberOrder, PhoneNumberOrdersListResponse, ProcessOrdersResult } from '../models/index';
|
|
13
|
+
import type { AdminPhoneNumberAssign, AdminPhoneNumberAssignOutbound, AdminPhoneNumberDetail, AdminPhoneNumberUpdate, AdminPhoneNumbersListResponse, PhoneNumber, PhoneNumberCreate, PhoneNumberOrder, PhoneNumberOrdersListResponse, ProcessOrdersResult } from '../models/index';
|
|
14
14
|
export interface AdminPhoneNumbersGetRequest {
|
|
15
15
|
status?: AdminPhoneNumbersGetStatusEnum;
|
|
16
16
|
supportsCallRedirect?: boolean;
|
|
@@ -32,6 +32,10 @@ export interface AdminPhoneNumbersOrdersOrderIdCancelPostRequest {
|
|
|
32
32
|
export interface AdminPhoneNumbersOrdersOrderIdFulfillPostRequest {
|
|
33
33
|
orderId: string;
|
|
34
34
|
}
|
|
35
|
+
export interface AdminPhoneNumbersPhoneNumberIdAssignOutboundPostRequest {
|
|
36
|
+
phoneNumberId: number;
|
|
37
|
+
adminPhoneNumberAssignOutbound: AdminPhoneNumberAssignOutbound;
|
|
38
|
+
}
|
|
35
39
|
export interface AdminPhoneNumbersPhoneNumberIdAssignPostRequest {
|
|
36
40
|
phoneNumberId: number;
|
|
37
41
|
adminPhoneNumberAssign: AdminPhoneNumberAssign;
|
|
@@ -46,6 +50,9 @@ export interface AdminPhoneNumbersPhoneNumberIdPatchRequest {
|
|
|
46
50
|
phoneNumberId: number;
|
|
47
51
|
adminPhoneNumberUpdate: AdminPhoneNumberUpdate;
|
|
48
52
|
}
|
|
53
|
+
export interface AdminPhoneNumbersPhoneNumberIdUnassignOutboundPostRequest {
|
|
54
|
+
phoneNumberId: number;
|
|
55
|
+
}
|
|
49
56
|
export interface AdminPhoneNumbersPhoneNumberIdUnassignPostRequest {
|
|
50
57
|
phoneNumberId: number;
|
|
51
58
|
}
|
|
@@ -96,6 +103,16 @@ export declare class AdminPhoneNumbersApi extends runtime.BaseAPI {
|
|
|
96
103
|
* Run the backorder fulfillment queue on demand (app-admin only)
|
|
97
104
|
*/
|
|
98
105
|
adminPhoneNumbersOrdersProcessPost(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ProcessOrdersResult>;
|
|
106
|
+
/**
|
|
107
|
+
* Grants the organization ownership of an outbound number (no inbound trunk). The org can then place outbound calls using it as caller-ID.
|
|
108
|
+
* Assign an outbound-capable number to an organization (app-admin only)
|
|
109
|
+
*/
|
|
110
|
+
adminPhoneNumbersPhoneNumberIdAssignOutboundPostRaw(requestParameters: AdminPhoneNumbersPhoneNumberIdAssignOutboundPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AdminPhoneNumberDetail>>;
|
|
111
|
+
/**
|
|
112
|
+
* Grants the organization ownership of an outbound number (no inbound trunk). The org can then place outbound calls using it as caller-ID.
|
|
113
|
+
* Assign an outbound-capable number to an organization (app-admin only)
|
|
114
|
+
*/
|
|
115
|
+
adminPhoneNumbersPhoneNumberIdAssignOutboundPost(requestParameters: AdminPhoneNumbersPhoneNumberIdAssignOutboundPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AdminPhoneNumberDetail>;
|
|
99
116
|
/**
|
|
100
117
|
* Creates a SIP trunk (and, if an agent is given, a dispatch rule) and links the number.
|
|
101
118
|
* Assign a phone number to an organization (app-admin only)
|
|
@@ -132,6 +149,14 @@ export declare class AdminPhoneNumbersApi extends runtime.BaseAPI {
|
|
|
132
149
|
* Update a phone number (app-admin only)
|
|
133
150
|
*/
|
|
134
151
|
adminPhoneNumbersPhoneNumberIdPatch(requestParameters: AdminPhoneNumbersPhoneNumberIdPatchRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PhoneNumber>;
|
|
152
|
+
/**
|
|
153
|
+
* Release an outbound number\'s organization ownership (app-admin only)
|
|
154
|
+
*/
|
|
155
|
+
adminPhoneNumbersPhoneNumberIdUnassignOutboundPostRaw(requestParameters: AdminPhoneNumbersPhoneNumberIdUnassignOutboundPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AdminPhoneNumberDetail>>;
|
|
156
|
+
/**
|
|
157
|
+
* Release an outbound number\'s organization ownership (app-admin only)
|
|
158
|
+
*/
|
|
159
|
+
adminPhoneNumbersPhoneNumberIdUnassignOutboundPost(requestParameters: AdminPhoneNumbersPhoneNumberIdUnassignOutboundPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AdminPhoneNumberDetail>;
|
|
135
160
|
/**
|
|
136
161
|
* Deletes the LiveKit dispatch rule + trunk and frees the number back to the pool.
|
|
137
162
|
* Release a phone number from its organization (app-admin only)
|
|
@@ -235,6 +235,50 @@ class AdminPhoneNumbersApi extends runtime.BaseAPI {
|
|
|
235
235
|
return yield response.value();
|
|
236
236
|
});
|
|
237
237
|
}
|
|
238
|
+
/**
|
|
239
|
+
* Grants the organization ownership of an outbound number (no inbound trunk). The org can then place outbound calls using it as caller-ID.
|
|
240
|
+
* Assign an outbound-capable number to an organization (app-admin only)
|
|
241
|
+
*/
|
|
242
|
+
adminPhoneNumbersPhoneNumberIdAssignOutboundPostRaw(requestParameters, initOverrides) {
|
|
243
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
244
|
+
if (requestParameters['phoneNumberId'] == null) {
|
|
245
|
+
throw new runtime.RequiredError('phoneNumberId', 'Required parameter "phoneNumberId" was null or undefined when calling adminPhoneNumbersPhoneNumberIdAssignOutboundPost().');
|
|
246
|
+
}
|
|
247
|
+
if (requestParameters['adminPhoneNumberAssignOutbound'] == null) {
|
|
248
|
+
throw new runtime.RequiredError('adminPhoneNumberAssignOutbound', 'Required parameter "adminPhoneNumberAssignOutbound" was null or undefined when calling adminPhoneNumbersPhoneNumberIdAssignOutboundPost().');
|
|
249
|
+
}
|
|
250
|
+
const queryParameters = {};
|
|
251
|
+
const headerParameters = {};
|
|
252
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
253
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
254
|
+
const token = this.configuration.accessToken;
|
|
255
|
+
const tokenString = yield token("bearerAuth", []);
|
|
256
|
+
if (tokenString) {
|
|
257
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
258
|
+
}
|
|
259
|
+
}
|
|
260
|
+
let urlPath = `/admin/phone-numbers/{phoneNumberId}/assign-outbound`;
|
|
261
|
+
urlPath = urlPath.replace(`{${"phoneNumberId"}}`, encodeURIComponent(String(requestParameters['phoneNumberId'])));
|
|
262
|
+
const response = yield this.request({
|
|
263
|
+
path: urlPath,
|
|
264
|
+
method: 'POST',
|
|
265
|
+
headers: headerParameters,
|
|
266
|
+
query: queryParameters,
|
|
267
|
+
body: (0, index_1.AdminPhoneNumberAssignOutboundToJSON)(requestParameters['adminPhoneNumberAssignOutbound']),
|
|
268
|
+
}, initOverrides);
|
|
269
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.AdminPhoneNumberDetailFromJSON)(jsonValue));
|
|
270
|
+
});
|
|
271
|
+
}
|
|
272
|
+
/**
|
|
273
|
+
* Grants the organization ownership of an outbound number (no inbound trunk). The org can then place outbound calls using it as caller-ID.
|
|
274
|
+
* Assign an outbound-capable number to an organization (app-admin only)
|
|
275
|
+
*/
|
|
276
|
+
adminPhoneNumbersPhoneNumberIdAssignOutboundPost(requestParameters, initOverrides) {
|
|
277
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
278
|
+
const response = yield this.adminPhoneNumbersPhoneNumberIdAssignOutboundPostRaw(requestParameters, initOverrides);
|
|
279
|
+
return yield response.value();
|
|
280
|
+
});
|
|
281
|
+
}
|
|
238
282
|
/**
|
|
239
283
|
* Creates a SIP trunk (and, if an agent is given, a dispatch rule) and links the number.
|
|
240
284
|
* Assign a phone number to an organization (app-admin only)
|
|
@@ -396,6 +440,43 @@ class AdminPhoneNumbersApi extends runtime.BaseAPI {
|
|
|
396
440
|
return yield response.value();
|
|
397
441
|
});
|
|
398
442
|
}
|
|
443
|
+
/**
|
|
444
|
+
* Release an outbound number\'s organization ownership (app-admin only)
|
|
445
|
+
*/
|
|
446
|
+
adminPhoneNumbersPhoneNumberIdUnassignOutboundPostRaw(requestParameters, initOverrides) {
|
|
447
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
448
|
+
if (requestParameters['phoneNumberId'] == null) {
|
|
449
|
+
throw new runtime.RequiredError('phoneNumberId', 'Required parameter "phoneNumberId" was null or undefined when calling adminPhoneNumbersPhoneNumberIdUnassignOutboundPost().');
|
|
450
|
+
}
|
|
451
|
+
const queryParameters = {};
|
|
452
|
+
const headerParameters = {};
|
|
453
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
454
|
+
const token = this.configuration.accessToken;
|
|
455
|
+
const tokenString = yield token("bearerAuth", []);
|
|
456
|
+
if (tokenString) {
|
|
457
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
458
|
+
}
|
|
459
|
+
}
|
|
460
|
+
let urlPath = `/admin/phone-numbers/{phoneNumberId}/unassign-outbound`;
|
|
461
|
+
urlPath = urlPath.replace(`{${"phoneNumberId"}}`, encodeURIComponent(String(requestParameters['phoneNumberId'])));
|
|
462
|
+
const response = yield this.request({
|
|
463
|
+
path: urlPath,
|
|
464
|
+
method: 'POST',
|
|
465
|
+
headers: headerParameters,
|
|
466
|
+
query: queryParameters,
|
|
467
|
+
}, initOverrides);
|
|
468
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.AdminPhoneNumberDetailFromJSON)(jsonValue));
|
|
469
|
+
});
|
|
470
|
+
}
|
|
471
|
+
/**
|
|
472
|
+
* Release an outbound number\'s organization ownership (app-admin only)
|
|
473
|
+
*/
|
|
474
|
+
adminPhoneNumbersPhoneNumberIdUnassignOutboundPost(requestParameters, initOverrides) {
|
|
475
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
476
|
+
const response = yield this.adminPhoneNumbersPhoneNumberIdUnassignOutboundPostRaw(requestParameters, initOverrides);
|
|
477
|
+
return yield response.value();
|
|
478
|
+
});
|
|
479
|
+
}
|
|
399
480
|
/**
|
|
400
481
|
* Deletes the LiveKit dispatch rule + trunk and frees the number back to the pool.
|
|
401
482
|
* Release a phone number from its organization (app-admin only)
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Tivadar AI Backend API
|
|
3
|
+
* Unified REST API for Tivadar AI Voice Agents platform
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 1.0.0
|
|
6
|
+
*
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
import * as runtime from '../runtime';
|
|
13
|
+
import type { OutboundCall, OutboundCallRequest } from '../models/index';
|
|
14
|
+
export interface OrganizationsOrganizationIdOutboundCallsPostRequest {
|
|
15
|
+
organizationId: string;
|
|
16
|
+
outboundCallRequest: OutboundCallRequest;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
*
|
|
20
|
+
*/
|
|
21
|
+
export declare class OutboundCallsApi extends runtime.BaseAPI {
|
|
22
|
+
/**
|
|
23
|
+
* Dials a destination (a phonebook entry or a custom number) using one of the organization\'s voice agents. The caller-ID (From) is the org\'s assigned outbound-capable number. Requires the `outbound_calls` feature (business + enterprise plans).
|
|
24
|
+
* Place an outbound call with a voice agent
|
|
25
|
+
*/
|
|
26
|
+
organizationsOrganizationIdOutboundCallsPostRaw(requestParameters: OrganizationsOrganizationIdOutboundCallsPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<OutboundCall>>;
|
|
27
|
+
/**
|
|
28
|
+
* Dials a destination (a phonebook entry or a custom number) using one of the organization\'s voice agents. The caller-ID (From) is the org\'s assigned outbound-capable number. Requires the `outbound_calls` feature (business + enterprise plans).
|
|
29
|
+
* Place an outbound call with a voice agent
|
|
30
|
+
*/
|
|
31
|
+
organizationsOrganizationIdOutboundCallsPost(requestParameters: OrganizationsOrganizationIdOutboundCallsPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<OutboundCall>;
|
|
32
|
+
}
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* Tivadar AI Backend API
|
|
6
|
+
* Unified REST API for Tivadar AI Voice Agents platform
|
|
7
|
+
*
|
|
8
|
+
* The version of the OpenAPI document: 1.0.0
|
|
9
|
+
*
|
|
10
|
+
*
|
|
11
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
|
+
* https://openapi-generator.tech
|
|
13
|
+
* Do not edit the class manually.
|
|
14
|
+
*/
|
|
15
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
16
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
17
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
18
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
19
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
20
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
21
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
22
|
+
});
|
|
23
|
+
};
|
|
24
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
25
|
+
exports.OutboundCallsApi = void 0;
|
|
26
|
+
const runtime = require("../runtime");
|
|
27
|
+
const index_1 = require("../models/index");
|
|
28
|
+
/**
|
|
29
|
+
*
|
|
30
|
+
*/
|
|
31
|
+
class OutboundCallsApi extends runtime.BaseAPI {
|
|
32
|
+
/**
|
|
33
|
+
* Dials a destination (a phonebook entry or a custom number) using one of the organization\'s voice agents. The caller-ID (From) is the org\'s assigned outbound-capable number. Requires the `outbound_calls` feature (business + enterprise plans).
|
|
34
|
+
* Place an outbound call with a voice agent
|
|
35
|
+
*/
|
|
36
|
+
organizationsOrganizationIdOutboundCallsPostRaw(requestParameters, initOverrides) {
|
|
37
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
38
|
+
if (requestParameters['organizationId'] == null) {
|
|
39
|
+
throw new runtime.RequiredError('organizationId', 'Required parameter "organizationId" was null or undefined when calling organizationsOrganizationIdOutboundCallsPost().');
|
|
40
|
+
}
|
|
41
|
+
if (requestParameters['outboundCallRequest'] == null) {
|
|
42
|
+
throw new runtime.RequiredError('outboundCallRequest', 'Required parameter "outboundCallRequest" was null or undefined when calling organizationsOrganizationIdOutboundCallsPost().');
|
|
43
|
+
}
|
|
44
|
+
const queryParameters = {};
|
|
45
|
+
const headerParameters = {};
|
|
46
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
47
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
48
|
+
const token = this.configuration.accessToken;
|
|
49
|
+
const tokenString = yield token("bearerAuth", []);
|
|
50
|
+
if (tokenString) {
|
|
51
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
let urlPath = `/organizations/{organizationId}/outbound-calls`;
|
|
55
|
+
urlPath = urlPath.replace(`{${"organizationId"}}`, encodeURIComponent(String(requestParameters['organizationId'])));
|
|
56
|
+
const response = yield this.request({
|
|
57
|
+
path: urlPath,
|
|
58
|
+
method: 'POST',
|
|
59
|
+
headers: headerParameters,
|
|
60
|
+
query: queryParameters,
|
|
61
|
+
body: (0, index_1.OutboundCallRequestToJSON)(requestParameters['outboundCallRequest']),
|
|
62
|
+
}, initOverrides);
|
|
63
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.OutboundCallFromJSON)(jsonValue));
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* Dials a destination (a phonebook entry or a custom number) using one of the organization\'s voice agents. The caller-ID (From) is the org\'s assigned outbound-capable number. Requires the `outbound_calls` feature (business + enterprise plans).
|
|
68
|
+
* Place an outbound call with a voice agent
|
|
69
|
+
*/
|
|
70
|
+
organizationsOrganizationIdOutboundCallsPost(requestParameters, initOverrides) {
|
|
71
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
72
|
+
const response = yield this.organizationsOrganizationIdOutboundCallsPostRaw(requestParameters, initOverrides);
|
|
73
|
+
return yield response.value();
|
|
74
|
+
});
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
exports.OutboundCallsApi = OutboundCallsApi;
|
package/dist/apis/index.d.ts
CHANGED
|
@@ -12,6 +12,7 @@ export * from './LLMProvidersApi';
|
|
|
12
12
|
export * from './MembersApi';
|
|
13
13
|
export * from './NotificationsApi';
|
|
14
14
|
export * from './OrganizationsApi';
|
|
15
|
+
export * from './OutboundCallsApi';
|
|
15
16
|
export * from './PhonebookApi';
|
|
16
17
|
export * from './PlaygroundApi';
|
|
17
18
|
export * from './ProfileApi';
|
package/dist/apis/index.js
CHANGED
|
@@ -30,6 +30,7 @@ __exportStar(require("./LLMProvidersApi"), exports);
|
|
|
30
30
|
__exportStar(require("./MembersApi"), exports);
|
|
31
31
|
__exportStar(require("./NotificationsApi"), exports);
|
|
32
32
|
__exportStar(require("./OrganizationsApi"), exports);
|
|
33
|
+
__exportStar(require("./OutboundCallsApi"), exports);
|
|
33
34
|
__exportStar(require("./PhonebookApi"), exports);
|
|
34
35
|
__exportStar(require("./PlaygroundApi"), exports);
|
|
35
36
|
__exportStar(require("./ProfileApi"), exports);
|
package/dist/esm/api-client.d.ts
CHANGED
|
@@ -20,11 +20,12 @@ import { SubscriptionApi } from "./apis/SubscriptionApi";
|
|
|
20
20
|
import { AdminSubscriptionsApi } from "./apis/AdminSubscriptionsApi";
|
|
21
21
|
import { AdminPhoneNumbersApi } from "./apis/AdminPhoneNumbersApi";
|
|
22
22
|
import { AdminSIPApi } from "./apis/AdminSIPApi";
|
|
23
|
+
import { OutboundCallsApi } from "./apis/OutboundCallsApi";
|
|
23
24
|
import { VoiceUsageApi } from "./apis/VoiceUsageApi";
|
|
24
25
|
import { VoiceAgentsApi } from "./apis/VoiceAgentsApi";
|
|
25
26
|
import { ToolsApi } from "./apis/ToolsApi";
|
|
26
27
|
import { PhonebookApi } from "./apis/PhonebookApi";
|
|
27
|
-
import type { CallCreate, CallUpdate, CallFlagCreate, CallFlagUpdate, CallFlagResolve, NotificationScope, NotificationSeverity, NotificationType, VoiceAgentCreate, VoiceAgentUpdate, ChatAgentCreate, ChatAgentUpdate, Calendar, CalendarCreate, CalendarUpdate, CalendarEventCreate, CalendarEventUpdate, InvitationAccept, InvitationCreate, RagConfigCreate, SipTrunkCreate, DispatchRuleCreate, PhoneNumberCreate, OrganizationCreate, CreateCheckoutSessionRequest, CancelSubscriptionRequest, UpdatePlanRequest, PauseSubscriptionRequest, BillingPortalRequest, AdminSetSubscriptionRequest, AdminGrantMinutesRequest, AdminPhoneNumberUpdate, AdminPhoneNumberAssign, AdminSipTrunkCreate, AdminDispatchRuleCreate, VoiceUsageReportRequest, UserPreferencesUpdate, AgentToolUpsert, PhonebookUpdate, PhonebookEntryCreate, PhonebookEntryUpdate } from "./models";
|
|
28
|
+
import type { CallCreate, CallUpdate, CallFlagCreate, CallFlagUpdate, CallFlagResolve, NotificationScope, NotificationSeverity, NotificationType, VoiceAgentCreate, VoiceAgentUpdate, ChatAgentCreate, ChatAgentUpdate, Calendar, CalendarCreate, CalendarUpdate, CalendarEventCreate, CalendarEventUpdate, InvitationAccept, InvitationCreate, RagConfigCreate, SipTrunkCreate, DispatchRuleCreate, PhoneNumberCreate, OrganizationCreate, CreateCheckoutSessionRequest, CancelSubscriptionRequest, UpdatePlanRequest, PauseSubscriptionRequest, BillingPortalRequest, AdminSetSubscriptionRequest, AdminGrantMinutesRequest, AdminPhoneNumberUpdate, AdminPhoneNumberAssign, AdminPhoneNumberAssignOutbound, AdminSipTrunkCreate, AdminDispatchRuleCreate, OutboundCallRequest, VoiceUsageReportRequest, UserPreferencesUpdate, AgentToolUpsert, PhonebookUpdate, PhonebookEntryCreate, PhonebookEntryUpdate } from "./models";
|
|
28
29
|
export interface ApiClientConfig {
|
|
29
30
|
baseUrl: string;
|
|
30
31
|
options?: {
|
|
@@ -184,6 +185,8 @@ export declare class Api {
|
|
|
184
185
|
delete: (phoneNumberId: number, options?: RequestInit) => ReturnType<AdminPhoneNumbersApi["adminPhoneNumbersPhoneNumberIdDelete"]>;
|
|
185
186
|
assign: (phoneNumberId: number, adminPhoneNumberAssign: AdminPhoneNumberAssign, options?: RequestInit) => ReturnType<AdminPhoneNumbersApi["adminPhoneNumbersPhoneNumberIdAssignPost"]>;
|
|
186
187
|
unassign: (phoneNumberId: number, options?: RequestInit) => ReturnType<AdminPhoneNumbersApi["adminPhoneNumbersPhoneNumberIdUnassignPost"]>;
|
|
188
|
+
assignOutbound: (phoneNumberId: number, adminPhoneNumberAssignOutbound: AdminPhoneNumberAssignOutbound, options?: RequestInit) => ReturnType<AdminPhoneNumbersApi["adminPhoneNumbersPhoneNumberIdAssignOutboundPost"]>;
|
|
189
|
+
unassignOutbound: (phoneNumberId: number, options?: RequestInit) => ReturnType<AdminPhoneNumbersApi["adminPhoneNumbersPhoneNumberIdUnassignOutboundPost"]>;
|
|
187
190
|
listOrders: (params?: {
|
|
188
191
|
status?: "pending" | "active" | "canceled";
|
|
189
192
|
organizationId?: string;
|
|
@@ -211,6 +214,9 @@ export declare class Api {
|
|
|
211
214
|
listLiveKitTrunks: (options?: RequestInit) => ReturnType<AdminSIPApi["adminSipLivekitTrunksGet"]>;
|
|
212
215
|
listLiveKitDispatchRules: (options?: RequestInit) => ReturnType<AdminSIPApi["adminSipLivekitDispatchRulesGet"]>;
|
|
213
216
|
};
|
|
217
|
+
readonly outboundCalls: {
|
|
218
|
+
create: (organizationId: string, outboundCallRequest: OutboundCallRequest, options?: RequestInit) => ReturnType<OutboundCallsApi["organizationsOrganizationIdOutboundCallsPost"]>;
|
|
219
|
+
};
|
|
214
220
|
readonly voiceUsage: {
|
|
215
221
|
report: (voiceUsageReportRequest: VoiceUsageReportRequest, options?: RequestInit) => ReturnType<VoiceUsageApi["voiceUsageReportPost"]>;
|
|
216
222
|
};
|
|
@@ -280,6 +286,7 @@ export declare class Api {
|
|
|
280
286
|
private readonly adminSubscriptionsApi;
|
|
281
287
|
private readonly adminPhoneNumbersApi;
|
|
282
288
|
private readonly adminSipApi;
|
|
289
|
+
private readonly outboundCallsApi;
|
|
283
290
|
private readonly voiceUsageApi;
|
|
284
291
|
private readonly embeddingProvidersApi;
|
|
285
292
|
private readonly llmProvidersApi;
|
package/dist/esm/api-client.js
CHANGED
|
@@ -29,6 +29,7 @@ import { SubscriptionApi } from "./apis/SubscriptionApi";
|
|
|
29
29
|
import { AdminSubscriptionsApi } from "./apis/AdminSubscriptionsApi";
|
|
30
30
|
import { AdminPhoneNumbersApi } from "./apis/AdminPhoneNumbersApi";
|
|
31
31
|
import { AdminSIPApi } from "./apis/AdminSIPApi";
|
|
32
|
+
import { OutboundCallsApi } from "./apis/OutboundCallsApi";
|
|
32
33
|
import { VoiceUsageApi } from "./apis/VoiceUsageApi";
|
|
33
34
|
import { VoiceAgentsApi } from "./apis/VoiceAgentsApi";
|
|
34
35
|
import { ToolsApi } from "./apis/ToolsApi";
|
|
@@ -76,6 +77,7 @@ export class Api {
|
|
|
76
77
|
this.adminSubscriptionsApi = new AdminSubscriptionsApi(configuration);
|
|
77
78
|
this.adminPhoneNumbersApi = new AdminPhoneNumbersApi(configuration);
|
|
78
79
|
this.adminSipApi = new AdminSIPApi(configuration);
|
|
80
|
+
this.outboundCallsApi = new OutboundCallsApi(configuration);
|
|
79
81
|
this.voiceUsageApi = new VoiceUsageApi(configuration);
|
|
80
82
|
this.embeddingProvidersApi = new EmbeddingProvidersApi(configuration);
|
|
81
83
|
this.llmProvidersApi = new LLMProvidersApi(configuration);
|
|
@@ -221,6 +223,8 @@ export class Api {
|
|
|
221
223
|
delete: (phoneNumberId, options) => this.adminPhoneNumbersApi.adminPhoneNumbersPhoneNumberIdDelete({ phoneNumberId }, options),
|
|
222
224
|
assign: (phoneNumberId, adminPhoneNumberAssign, options) => this.adminPhoneNumbersApi.adminPhoneNumbersPhoneNumberIdAssignPost({ phoneNumberId, adminPhoneNumberAssign }, options),
|
|
223
225
|
unassign: (phoneNumberId, options) => this.adminPhoneNumbersApi.adminPhoneNumbersPhoneNumberIdUnassignPost({ phoneNumberId }, options),
|
|
226
|
+
assignOutbound: (phoneNumberId, adminPhoneNumberAssignOutbound, options) => this.adminPhoneNumbersApi.adminPhoneNumbersPhoneNumberIdAssignOutboundPost({ phoneNumberId, adminPhoneNumberAssignOutbound }, options),
|
|
227
|
+
unassignOutbound: (phoneNumberId, options) => this.adminPhoneNumbersApi.adminPhoneNumbersPhoneNumberIdUnassignOutboundPost({ phoneNumberId }, options),
|
|
224
228
|
listOrders: (params, options) => this.adminPhoneNumbersApi.adminPhoneNumbersOrdersGet({ status: params === null || params === void 0 ? void 0 : params.status, organizationId: params === null || params === void 0 ? void 0 : params.organizationId, requiresCallRedirect: params === null || params === void 0 ? void 0 : params.requiresCallRedirect, limit: params === null || params === void 0 ? void 0 : params.limit, offset: params === null || params === void 0 ? void 0 : params.offset }, options),
|
|
225
229
|
processOrders: (options) => this.adminPhoneNumbersApi.adminPhoneNumbersOrdersProcessPost(options),
|
|
226
230
|
fulfillOrder: (orderId, options) => this.adminPhoneNumbersApi.adminPhoneNumbersOrdersOrderIdFulfillPost({ orderId }, options),
|
|
@@ -236,6 +240,9 @@ export class Api {
|
|
|
236
240
|
listLiveKitTrunks: (options) => this.adminSipApi.adminSipLivekitTrunksGet(options),
|
|
237
241
|
listLiveKitDispatchRules: (options) => this.adminSipApi.adminSipLivekitDispatchRulesGet(options),
|
|
238
242
|
};
|
|
243
|
+
this.outboundCalls = {
|
|
244
|
+
create: (organizationId, outboundCallRequest, options) => this.outboundCallsApi.organizationsOrganizationIdOutboundCallsPost({ organizationId, outboundCallRequest }, options),
|
|
245
|
+
};
|
|
239
246
|
this.voiceUsage = {
|
|
240
247
|
report: (voiceUsageReportRequest, options) => this.voiceUsageApi.voiceUsageReportPost({ voiceUsageReportRequest }, options),
|
|
241
248
|
};
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
12
|
import * as runtime from '../runtime';
|
|
13
|
-
import type { AdminPhoneNumberAssign, AdminPhoneNumberDetail, AdminPhoneNumberUpdate, AdminPhoneNumbersListResponse, PhoneNumber, PhoneNumberCreate, PhoneNumberOrder, PhoneNumberOrdersListResponse, ProcessOrdersResult } from '../models/index';
|
|
13
|
+
import type { AdminPhoneNumberAssign, AdminPhoneNumberAssignOutbound, AdminPhoneNumberDetail, AdminPhoneNumberUpdate, AdminPhoneNumbersListResponse, PhoneNumber, PhoneNumberCreate, PhoneNumberOrder, PhoneNumberOrdersListResponse, ProcessOrdersResult } from '../models/index';
|
|
14
14
|
export interface AdminPhoneNumbersGetRequest {
|
|
15
15
|
status?: AdminPhoneNumbersGetStatusEnum;
|
|
16
16
|
supportsCallRedirect?: boolean;
|
|
@@ -32,6 +32,10 @@ export interface AdminPhoneNumbersOrdersOrderIdCancelPostRequest {
|
|
|
32
32
|
export interface AdminPhoneNumbersOrdersOrderIdFulfillPostRequest {
|
|
33
33
|
orderId: string;
|
|
34
34
|
}
|
|
35
|
+
export interface AdminPhoneNumbersPhoneNumberIdAssignOutboundPostRequest {
|
|
36
|
+
phoneNumberId: number;
|
|
37
|
+
adminPhoneNumberAssignOutbound: AdminPhoneNumberAssignOutbound;
|
|
38
|
+
}
|
|
35
39
|
export interface AdminPhoneNumbersPhoneNumberIdAssignPostRequest {
|
|
36
40
|
phoneNumberId: number;
|
|
37
41
|
adminPhoneNumberAssign: AdminPhoneNumberAssign;
|
|
@@ -46,6 +50,9 @@ export interface AdminPhoneNumbersPhoneNumberIdPatchRequest {
|
|
|
46
50
|
phoneNumberId: number;
|
|
47
51
|
adminPhoneNumberUpdate: AdminPhoneNumberUpdate;
|
|
48
52
|
}
|
|
53
|
+
export interface AdminPhoneNumbersPhoneNumberIdUnassignOutboundPostRequest {
|
|
54
|
+
phoneNumberId: number;
|
|
55
|
+
}
|
|
49
56
|
export interface AdminPhoneNumbersPhoneNumberIdUnassignPostRequest {
|
|
50
57
|
phoneNumberId: number;
|
|
51
58
|
}
|
|
@@ -96,6 +103,16 @@ export declare class AdminPhoneNumbersApi extends runtime.BaseAPI {
|
|
|
96
103
|
* Run the backorder fulfillment queue on demand (app-admin only)
|
|
97
104
|
*/
|
|
98
105
|
adminPhoneNumbersOrdersProcessPost(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ProcessOrdersResult>;
|
|
106
|
+
/**
|
|
107
|
+
* Grants the organization ownership of an outbound number (no inbound trunk). The org can then place outbound calls using it as caller-ID.
|
|
108
|
+
* Assign an outbound-capable number to an organization (app-admin only)
|
|
109
|
+
*/
|
|
110
|
+
adminPhoneNumbersPhoneNumberIdAssignOutboundPostRaw(requestParameters: AdminPhoneNumbersPhoneNumberIdAssignOutboundPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AdminPhoneNumberDetail>>;
|
|
111
|
+
/**
|
|
112
|
+
* Grants the organization ownership of an outbound number (no inbound trunk). The org can then place outbound calls using it as caller-ID.
|
|
113
|
+
* Assign an outbound-capable number to an organization (app-admin only)
|
|
114
|
+
*/
|
|
115
|
+
adminPhoneNumbersPhoneNumberIdAssignOutboundPost(requestParameters: AdminPhoneNumbersPhoneNumberIdAssignOutboundPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AdminPhoneNumberDetail>;
|
|
99
116
|
/**
|
|
100
117
|
* Creates a SIP trunk (and, if an agent is given, a dispatch rule) and links the number.
|
|
101
118
|
* Assign a phone number to an organization (app-admin only)
|
|
@@ -132,6 +149,14 @@ export declare class AdminPhoneNumbersApi extends runtime.BaseAPI {
|
|
|
132
149
|
* Update a phone number (app-admin only)
|
|
133
150
|
*/
|
|
134
151
|
adminPhoneNumbersPhoneNumberIdPatch(requestParameters: AdminPhoneNumbersPhoneNumberIdPatchRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PhoneNumber>;
|
|
152
|
+
/**
|
|
153
|
+
* Release an outbound number\'s organization ownership (app-admin only)
|
|
154
|
+
*/
|
|
155
|
+
adminPhoneNumbersPhoneNumberIdUnassignOutboundPostRaw(requestParameters: AdminPhoneNumbersPhoneNumberIdUnassignOutboundPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AdminPhoneNumberDetail>>;
|
|
156
|
+
/**
|
|
157
|
+
* Release an outbound number\'s organization ownership (app-admin only)
|
|
158
|
+
*/
|
|
159
|
+
adminPhoneNumbersPhoneNumberIdUnassignOutboundPost(requestParameters: AdminPhoneNumbersPhoneNumberIdUnassignOutboundPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AdminPhoneNumberDetail>;
|
|
135
160
|
/**
|
|
136
161
|
* Deletes the LiveKit dispatch rule + trunk and frees the number back to the pool.
|
|
137
162
|
* Release a phone number from its organization (app-admin only)
|
|
@@ -21,7 +21,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
21
21
|
});
|
|
22
22
|
};
|
|
23
23
|
import * as runtime from '../runtime';
|
|
24
|
-
import { AdminPhoneNumberAssignToJSON, AdminPhoneNumberDetailFromJSON, AdminPhoneNumberUpdateToJSON, AdminPhoneNumbersListResponseFromJSON, PhoneNumberFromJSON, PhoneNumberCreateToJSON, PhoneNumberOrderFromJSON, PhoneNumberOrdersListResponseFromJSON, ProcessOrdersResultFromJSON, } from '../models/index';
|
|
24
|
+
import { AdminPhoneNumberAssignToJSON, AdminPhoneNumberAssignOutboundToJSON, AdminPhoneNumberDetailFromJSON, AdminPhoneNumberUpdateToJSON, AdminPhoneNumbersListResponseFromJSON, PhoneNumberFromJSON, PhoneNumberCreateToJSON, PhoneNumberOrderFromJSON, PhoneNumberOrdersListResponseFromJSON, ProcessOrdersResultFromJSON, } from '../models/index';
|
|
25
25
|
/**
|
|
26
26
|
*
|
|
27
27
|
*/
|
|
@@ -232,6 +232,50 @@ export class AdminPhoneNumbersApi extends runtime.BaseAPI {
|
|
|
232
232
|
return yield response.value();
|
|
233
233
|
});
|
|
234
234
|
}
|
|
235
|
+
/**
|
|
236
|
+
* Grants the organization ownership of an outbound number (no inbound trunk). The org can then place outbound calls using it as caller-ID.
|
|
237
|
+
* Assign an outbound-capable number to an organization (app-admin only)
|
|
238
|
+
*/
|
|
239
|
+
adminPhoneNumbersPhoneNumberIdAssignOutboundPostRaw(requestParameters, initOverrides) {
|
|
240
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
241
|
+
if (requestParameters['phoneNumberId'] == null) {
|
|
242
|
+
throw new runtime.RequiredError('phoneNumberId', 'Required parameter "phoneNumberId" was null or undefined when calling adminPhoneNumbersPhoneNumberIdAssignOutboundPost().');
|
|
243
|
+
}
|
|
244
|
+
if (requestParameters['adminPhoneNumberAssignOutbound'] == null) {
|
|
245
|
+
throw new runtime.RequiredError('adminPhoneNumberAssignOutbound', 'Required parameter "adminPhoneNumberAssignOutbound" was null or undefined when calling adminPhoneNumbersPhoneNumberIdAssignOutboundPost().');
|
|
246
|
+
}
|
|
247
|
+
const queryParameters = {};
|
|
248
|
+
const headerParameters = {};
|
|
249
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
250
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
251
|
+
const token = this.configuration.accessToken;
|
|
252
|
+
const tokenString = yield token("bearerAuth", []);
|
|
253
|
+
if (tokenString) {
|
|
254
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
let urlPath = `/admin/phone-numbers/{phoneNumberId}/assign-outbound`;
|
|
258
|
+
urlPath = urlPath.replace(`{${"phoneNumberId"}}`, encodeURIComponent(String(requestParameters['phoneNumberId'])));
|
|
259
|
+
const response = yield this.request({
|
|
260
|
+
path: urlPath,
|
|
261
|
+
method: 'POST',
|
|
262
|
+
headers: headerParameters,
|
|
263
|
+
query: queryParameters,
|
|
264
|
+
body: AdminPhoneNumberAssignOutboundToJSON(requestParameters['adminPhoneNumberAssignOutbound']),
|
|
265
|
+
}, initOverrides);
|
|
266
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => AdminPhoneNumberDetailFromJSON(jsonValue));
|
|
267
|
+
});
|
|
268
|
+
}
|
|
269
|
+
/**
|
|
270
|
+
* Grants the organization ownership of an outbound number (no inbound trunk). The org can then place outbound calls using it as caller-ID.
|
|
271
|
+
* Assign an outbound-capable number to an organization (app-admin only)
|
|
272
|
+
*/
|
|
273
|
+
adminPhoneNumbersPhoneNumberIdAssignOutboundPost(requestParameters, initOverrides) {
|
|
274
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
275
|
+
const response = yield this.adminPhoneNumbersPhoneNumberIdAssignOutboundPostRaw(requestParameters, initOverrides);
|
|
276
|
+
return yield response.value();
|
|
277
|
+
});
|
|
278
|
+
}
|
|
235
279
|
/**
|
|
236
280
|
* Creates a SIP trunk (and, if an agent is given, a dispatch rule) and links the number.
|
|
237
281
|
* Assign a phone number to an organization (app-admin only)
|
|
@@ -393,6 +437,43 @@ export class AdminPhoneNumbersApi extends runtime.BaseAPI {
|
|
|
393
437
|
return yield response.value();
|
|
394
438
|
});
|
|
395
439
|
}
|
|
440
|
+
/**
|
|
441
|
+
* Release an outbound number\'s organization ownership (app-admin only)
|
|
442
|
+
*/
|
|
443
|
+
adminPhoneNumbersPhoneNumberIdUnassignOutboundPostRaw(requestParameters, initOverrides) {
|
|
444
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
445
|
+
if (requestParameters['phoneNumberId'] == null) {
|
|
446
|
+
throw new runtime.RequiredError('phoneNumberId', 'Required parameter "phoneNumberId" was null or undefined when calling adminPhoneNumbersPhoneNumberIdUnassignOutboundPost().');
|
|
447
|
+
}
|
|
448
|
+
const queryParameters = {};
|
|
449
|
+
const headerParameters = {};
|
|
450
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
451
|
+
const token = this.configuration.accessToken;
|
|
452
|
+
const tokenString = yield token("bearerAuth", []);
|
|
453
|
+
if (tokenString) {
|
|
454
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
455
|
+
}
|
|
456
|
+
}
|
|
457
|
+
let urlPath = `/admin/phone-numbers/{phoneNumberId}/unassign-outbound`;
|
|
458
|
+
urlPath = urlPath.replace(`{${"phoneNumberId"}}`, encodeURIComponent(String(requestParameters['phoneNumberId'])));
|
|
459
|
+
const response = yield this.request({
|
|
460
|
+
path: urlPath,
|
|
461
|
+
method: 'POST',
|
|
462
|
+
headers: headerParameters,
|
|
463
|
+
query: queryParameters,
|
|
464
|
+
}, initOverrides);
|
|
465
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => AdminPhoneNumberDetailFromJSON(jsonValue));
|
|
466
|
+
});
|
|
467
|
+
}
|
|
468
|
+
/**
|
|
469
|
+
* Release an outbound number\'s organization ownership (app-admin only)
|
|
470
|
+
*/
|
|
471
|
+
adminPhoneNumbersPhoneNumberIdUnassignOutboundPost(requestParameters, initOverrides) {
|
|
472
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
473
|
+
const response = yield this.adminPhoneNumbersPhoneNumberIdUnassignOutboundPostRaw(requestParameters, initOverrides);
|
|
474
|
+
return yield response.value();
|
|
475
|
+
});
|
|
476
|
+
}
|
|
396
477
|
/**
|
|
397
478
|
* Deletes the LiveKit dispatch rule + trunk and frees the number back to the pool.
|
|
398
479
|
* Release a phone number from its organization (app-admin only)
|