@l7mp/tivadar-ai-api-sdk 0.2.14 → 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 +20 -1
- package/dist/api-client.js +13 -0
- package/dist/apis/AdminPhoneNumbersApi.d.ts +80 -1
- package/dist/apis/AdminPhoneNumbersApi.js +245 -1
- package/dist/apis/OutboundCallsApi.d.ts +32 -0
- package/dist/apis/OutboundCallsApi.js +77 -0
- package/dist/apis/SIPApi.d.ts +34 -1
- package/dist/apis/SIPApi.js +89 -1
- package/dist/apis/index.d.ts +1 -0
- package/dist/apis/index.js +1 -0
- package/dist/esm/api-client.d.ts +20 -1
- package/dist/esm/api-client.js +13 -0
- package/dist/esm/apis/AdminPhoneNumbersApi.d.ts +80 -1
- package/dist/esm/apis/AdminPhoneNumbersApi.js +245 -1
- package/dist/esm/apis/OutboundCallsApi.d.ts +32 -0
- package/dist/esm/apis/OutboundCallsApi.js +73 -0
- package/dist/esm/apis/SIPApi.d.ts +34 -1
- package/dist/esm/apis/SIPApi.js +89 -1
- 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/PhoneNumberOrder.d.ts +101 -0
- package/dist/esm/models/PhoneNumberOrder.js +69 -0
- package/dist/esm/models/PhoneNumberOrderDetail.d.ts +119 -0
- package/dist/esm/models/PhoneNumberOrderDetail.js +75 -0
- package/dist/esm/models/PhoneNumberOrdersListResponse.d.ts +39 -0
- package/dist/esm/models/PhoneNumberOrdersListResponse.js +44 -0
- package/dist/esm/models/ProcessOrdersResult.d.ts +38 -0
- package/dist/esm/models/ProcessOrdersResult.js +43 -0
- package/dist/esm/models/index.d.ts +7 -0
- package/dist/esm/models/index.js +7 -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/PhoneNumberOrder.d.ts +101 -0
- package/dist/models/PhoneNumberOrder.js +77 -0
- package/dist/models/PhoneNumberOrderDetail.d.ts +119 -0
- package/dist/models/PhoneNumberOrderDetail.js +83 -0
- package/dist/models/PhoneNumberOrdersListResponse.d.ts +39 -0
- package/dist/models/PhoneNumberOrdersListResponse.js +51 -0
- package/dist/models/ProcessOrdersResult.d.ts +38 -0
- package/dist/models/ProcessOrdersResult.js +50 -0
- package/dist/models/index.d.ts +7 -0
- package/dist/models/index.js +7 -0
- package/package.json +1 -1
- package/src/api-client.ts +28 -0
- package/src/apis/AdminPhoneNumbersApi.ts +332 -0
- package/src/apis/OutboundCallsApi.ts +95 -0
- package/src/apis/SIPApi.ts +124 -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/PhoneNumberOrder.ts +157 -0
- package/src/models/PhoneNumberOrderDetail.ts +181 -0
- package/src/models/PhoneNumberOrdersListResponse.ts +81 -0
- package/src/models/ProcessOrdersResult.ts +73 -0
- package/src/models/index.ts +7 -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?: {
|
|
@@ -135,6 +136,8 @@ export declare class Api {
|
|
|
135
136
|
listPhoneNumbers: (includeAssigned?: boolean, options?: RequestInit) => ReturnType<SIPApi["phoneNumbersGet"]>;
|
|
136
137
|
createPhoneNumber: (phoneNumberCreate: PhoneNumberCreate, options?: RequestInit) => ReturnType<SIPApi["phoneNumbersPost"]>;
|
|
137
138
|
deletePhoneNumber: (phoneNumberId: number, options?: RequestInit) => ReturnType<SIPApi["phoneNumbersPhoneNumberIdDelete"]>;
|
|
139
|
+
listPhoneNumberOrders: (organizationId: string, status?: "pending" | "active" | "canceled", options?: RequestInit) => ReturnType<SIPApi["organizationsOrganizationIdSipPhoneNumbersOrdersGet"]>;
|
|
140
|
+
cancelPhoneNumberOrder: (organizationId: string, orderId: string, options?: RequestInit) => ReturnType<SIPApi["organizationsOrganizationIdSipPhoneNumbersOrdersOrderIdDelete"]>;
|
|
138
141
|
};
|
|
139
142
|
readonly subscription: {
|
|
140
143
|
getStatus: (organizationId: string, options?: RequestInit) => ReturnType<SubscriptionApi["organizationsOrganizationIdSubscriptionGet"]>;
|
|
@@ -182,6 +185,18 @@ export declare class Api {
|
|
|
182
185
|
delete: (phoneNumberId: number, options?: RequestInit) => ReturnType<AdminPhoneNumbersApi["adminPhoneNumbersPhoneNumberIdDelete"]>;
|
|
183
186
|
assign: (phoneNumberId: number, adminPhoneNumberAssign: AdminPhoneNumberAssign, options?: RequestInit) => ReturnType<AdminPhoneNumbersApi["adminPhoneNumbersPhoneNumberIdAssignPost"]>;
|
|
184
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"]>;
|
|
190
|
+
listOrders: (params?: {
|
|
191
|
+
status?: "pending" | "active" | "canceled";
|
|
192
|
+
organizationId?: string;
|
|
193
|
+
requiresCallRedirect?: boolean;
|
|
194
|
+
limit?: number;
|
|
195
|
+
offset?: number;
|
|
196
|
+
}, options?: RequestInit) => ReturnType<AdminPhoneNumbersApi["adminPhoneNumbersOrdersGet"]>;
|
|
197
|
+
processOrders: (options?: RequestInit) => ReturnType<AdminPhoneNumbersApi["adminPhoneNumbersOrdersProcessPost"]>;
|
|
198
|
+
fulfillOrder: (orderId: string, options?: RequestInit) => ReturnType<AdminPhoneNumbersApi["adminPhoneNumbersOrdersOrderIdFulfillPost"]>;
|
|
199
|
+
cancelOrder: (orderId: string, options?: RequestInit) => ReturnType<AdminPhoneNumbersApi["adminPhoneNumbersOrdersOrderIdCancelPost"]>;
|
|
185
200
|
};
|
|
186
201
|
readonly adminSip: {
|
|
187
202
|
listTrunks: (params?: {
|
|
@@ -199,6 +214,9 @@ export declare class Api {
|
|
|
199
214
|
listLiveKitTrunks: (options?: RequestInit) => ReturnType<AdminSIPApi["adminSipLivekitTrunksGet"]>;
|
|
200
215
|
listLiveKitDispatchRules: (options?: RequestInit) => ReturnType<AdminSIPApi["adminSipLivekitDispatchRulesGet"]>;
|
|
201
216
|
};
|
|
217
|
+
readonly outboundCalls: {
|
|
218
|
+
create: (organizationId: string, outboundCallRequest: OutboundCallRequest, options?: RequestInit) => ReturnType<OutboundCallsApi["organizationsOrganizationIdOutboundCallsPost"]>;
|
|
219
|
+
};
|
|
202
220
|
readonly voiceUsage: {
|
|
203
221
|
report: (voiceUsageReportRequest: VoiceUsageReportRequest, options?: RequestInit) => ReturnType<VoiceUsageApi["voiceUsageReportPost"]>;
|
|
204
222
|
};
|
|
@@ -268,6 +286,7 @@ export declare class Api {
|
|
|
268
286
|
private readonly adminSubscriptionsApi;
|
|
269
287
|
private readonly adminPhoneNumbersApi;
|
|
270
288
|
private readonly adminSipApi;
|
|
289
|
+
private readonly outboundCallsApi;
|
|
271
290
|
private readonly voiceUsageApi;
|
|
272
291
|
private readonly embeddingProvidersApi;
|
|
273
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);
|
|
@@ -187,6 +189,8 @@ class Api {
|
|
|
187
189
|
listPhoneNumbers: (includeAssigned, options) => this.sipApi.phoneNumbersGet({ includeAssigned }, options),
|
|
188
190
|
createPhoneNumber: (phoneNumberCreate, options) => this.sipApi.phoneNumbersPost({ phoneNumberCreate }, options),
|
|
189
191
|
deletePhoneNumber: (phoneNumberId, options) => this.sipApi.phoneNumbersPhoneNumberIdDelete({ phoneNumberId }, options),
|
|
192
|
+
listPhoneNumberOrders: (organizationId, status, options) => this.sipApi.organizationsOrganizationIdSipPhoneNumbersOrdersGet({ organizationId, status }, options),
|
|
193
|
+
cancelPhoneNumberOrder: (organizationId, orderId, options) => this.sipApi.organizationsOrganizationIdSipPhoneNumbersOrdersOrderIdDelete({ organizationId, orderId }, options),
|
|
190
194
|
};
|
|
191
195
|
this.notifications = {
|
|
192
196
|
list: (organizationId, filters, options) => this.notificationsApi.organizationsOrganizationIdNotificationsGet({ organizationId, type: filters === null || filters === void 0 ? void 0 : filters.type, severity: filters === null || filters === void 0 ? void 0 : filters.severity, scope: filters === null || filters === void 0 ? void 0 : filters.scope, includeDismissed: filters === null || filters === void 0 ? void 0 : filters.include_dismissed, includeExpired: filters === null || filters === void 0 ? void 0 : filters.include_expired }, options),
|
|
@@ -222,6 +226,12 @@ class Api {
|
|
|
222
226
|
delete: (phoneNumberId, options) => this.adminPhoneNumbersApi.adminPhoneNumbersPhoneNumberIdDelete({ phoneNumberId }, options),
|
|
223
227
|
assign: (phoneNumberId, adminPhoneNumberAssign, options) => this.adminPhoneNumbersApi.adminPhoneNumbersPhoneNumberIdAssignPost({ phoneNumberId, adminPhoneNumberAssign }, options),
|
|
224
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),
|
|
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),
|
|
232
|
+
processOrders: (options) => this.adminPhoneNumbersApi.adminPhoneNumbersOrdersProcessPost(options),
|
|
233
|
+
fulfillOrder: (orderId, options) => this.adminPhoneNumbersApi.adminPhoneNumbersOrdersOrderIdFulfillPost({ orderId }, options),
|
|
234
|
+
cancelOrder: (orderId, options) => this.adminPhoneNumbersApi.adminPhoneNumbersOrdersOrderIdCancelPost({ orderId }, options),
|
|
225
235
|
};
|
|
226
236
|
this.adminSip = {
|
|
227
237
|
listTrunks: (params, options) => this.adminSipApi.adminSipTrunksGet({ organizationId: params === null || params === void 0 ? void 0 : params.organizationId, agentId: params === null || params === void 0 ? void 0 : params.agentId, assigned: params === null || params === void 0 ? void 0 : params.assigned, limit: params === null || params === void 0 ? void 0 : params.limit, offset: params === null || params === void 0 ? void 0 : params.offset }, options),
|
|
@@ -233,6 +243,9 @@ class Api {
|
|
|
233
243
|
listLiveKitTrunks: (options) => this.adminSipApi.adminSipLivekitTrunksGet(options),
|
|
234
244
|
listLiveKitDispatchRules: (options) => this.adminSipApi.adminSipLivekitDispatchRulesGet(options),
|
|
235
245
|
};
|
|
246
|
+
this.outboundCalls = {
|
|
247
|
+
create: (organizationId, outboundCallRequest, options) => this.outboundCallsApi.organizationsOrganizationIdOutboundCallsPost({ organizationId, outboundCallRequest }, options),
|
|
248
|
+
};
|
|
236
249
|
this.voiceUsage = {
|
|
237
250
|
report: (voiceUsageReportRequest, options) => this.voiceUsageApi.voiceUsageReportPost({ voiceUsageReportRequest }, options),
|
|
238
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 } 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;
|
|
@@ -19,6 +19,23 @@ export interface AdminPhoneNumbersGetRequest {
|
|
|
19
19
|
limit?: number;
|
|
20
20
|
offset?: number;
|
|
21
21
|
}
|
|
22
|
+
export interface AdminPhoneNumbersOrdersGetRequest {
|
|
23
|
+
status?: AdminPhoneNumbersOrdersGetStatusEnum;
|
|
24
|
+
organizationId?: string;
|
|
25
|
+
requiresCallRedirect?: boolean;
|
|
26
|
+
limit?: number;
|
|
27
|
+
offset?: number;
|
|
28
|
+
}
|
|
29
|
+
export interface AdminPhoneNumbersOrdersOrderIdCancelPostRequest {
|
|
30
|
+
orderId: string;
|
|
31
|
+
}
|
|
32
|
+
export interface AdminPhoneNumbersOrdersOrderIdFulfillPostRequest {
|
|
33
|
+
orderId: string;
|
|
34
|
+
}
|
|
35
|
+
export interface AdminPhoneNumbersPhoneNumberIdAssignOutboundPostRequest {
|
|
36
|
+
phoneNumberId: number;
|
|
37
|
+
adminPhoneNumberAssignOutbound: AdminPhoneNumberAssignOutbound;
|
|
38
|
+
}
|
|
22
39
|
export interface AdminPhoneNumbersPhoneNumberIdAssignPostRequest {
|
|
23
40
|
phoneNumberId: number;
|
|
24
41
|
adminPhoneNumberAssign: AdminPhoneNumberAssign;
|
|
@@ -33,6 +50,9 @@ export interface AdminPhoneNumbersPhoneNumberIdPatchRequest {
|
|
|
33
50
|
phoneNumberId: number;
|
|
34
51
|
adminPhoneNumberUpdate: AdminPhoneNumberUpdate;
|
|
35
52
|
}
|
|
53
|
+
export interface AdminPhoneNumbersPhoneNumberIdUnassignOutboundPostRequest {
|
|
54
|
+
phoneNumberId: number;
|
|
55
|
+
}
|
|
36
56
|
export interface AdminPhoneNumbersPhoneNumberIdUnassignPostRequest {
|
|
37
57
|
phoneNumberId: number;
|
|
38
58
|
}
|
|
@@ -51,6 +71,48 @@ export declare class AdminPhoneNumbersApi extends runtime.BaseAPI {
|
|
|
51
71
|
* List phone numbers with assignment context (app-admin only)
|
|
52
72
|
*/
|
|
53
73
|
adminPhoneNumbersGet(requestParameters?: AdminPhoneNumbersGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AdminPhoneNumbersListResponse>;
|
|
74
|
+
/**
|
|
75
|
+
* List the phone-number backorder queue (app-admin only)
|
|
76
|
+
*/
|
|
77
|
+
adminPhoneNumbersOrdersGetRaw(requestParameters: AdminPhoneNumbersOrdersGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PhoneNumberOrdersListResponse>>;
|
|
78
|
+
/**
|
|
79
|
+
* List the phone-number backorder queue (app-admin only)
|
|
80
|
+
*/
|
|
81
|
+
adminPhoneNumbersOrdersGet(requestParameters?: AdminPhoneNumbersOrdersGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PhoneNumberOrdersListResponse>;
|
|
82
|
+
/**
|
|
83
|
+
* Cancel a pending order (app-admin only)
|
|
84
|
+
*/
|
|
85
|
+
adminPhoneNumbersOrdersOrderIdCancelPostRaw(requestParameters: AdminPhoneNumbersOrdersOrderIdCancelPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PhoneNumberOrder>>;
|
|
86
|
+
/**
|
|
87
|
+
* Cancel a pending order (app-admin only)
|
|
88
|
+
*/
|
|
89
|
+
adminPhoneNumbersOrdersOrderIdCancelPost(requestParameters: AdminPhoneNumbersOrdersOrderIdCancelPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PhoneNumberOrder>;
|
|
90
|
+
/**
|
|
91
|
+
* Attempt to fulfill a specific pending order now (app-admin only)
|
|
92
|
+
*/
|
|
93
|
+
adminPhoneNumbersOrdersOrderIdFulfillPostRaw(requestParameters: AdminPhoneNumbersOrdersOrderIdFulfillPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PhoneNumberOrder>>;
|
|
94
|
+
/**
|
|
95
|
+
* Attempt to fulfill a specific pending order now (app-admin only)
|
|
96
|
+
*/
|
|
97
|
+
adminPhoneNumbersOrdersOrderIdFulfillPost(requestParameters: AdminPhoneNumbersOrdersOrderIdFulfillPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PhoneNumberOrder>;
|
|
98
|
+
/**
|
|
99
|
+
* Run the backorder fulfillment queue on demand (app-admin only)
|
|
100
|
+
*/
|
|
101
|
+
adminPhoneNumbersOrdersProcessPostRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ProcessOrdersResult>>;
|
|
102
|
+
/**
|
|
103
|
+
* Run the backorder fulfillment queue on demand (app-admin only)
|
|
104
|
+
*/
|
|
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>;
|
|
54
116
|
/**
|
|
55
117
|
* Creates a SIP trunk (and, if an agent is given, a dispatch rule) and links the number.
|
|
56
118
|
* Assign a phone number to an organization (app-admin only)
|
|
@@ -87,6 +149,14 @@ export declare class AdminPhoneNumbersApi extends runtime.BaseAPI {
|
|
|
87
149
|
* Update a phone number (app-admin only)
|
|
88
150
|
*/
|
|
89
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>;
|
|
90
160
|
/**
|
|
91
161
|
* Deletes the LiveKit dispatch rule + trunk and frees the number back to the pool.
|
|
92
162
|
* Release a phone number from its organization (app-admin only)
|
|
@@ -114,3 +184,12 @@ export declare const AdminPhoneNumbersGetStatusEnum: {
|
|
|
114
184
|
readonly Assigned: "assigned";
|
|
115
185
|
};
|
|
116
186
|
export type AdminPhoneNumbersGetStatusEnum = typeof AdminPhoneNumbersGetStatusEnum[keyof typeof AdminPhoneNumbersGetStatusEnum];
|
|
187
|
+
/**
|
|
188
|
+
* @export
|
|
189
|
+
*/
|
|
190
|
+
export declare const AdminPhoneNumbersOrdersGetStatusEnum: {
|
|
191
|
+
readonly Pending: "pending";
|
|
192
|
+
readonly Active: "active";
|
|
193
|
+
readonly Canceled: "canceled";
|
|
194
|
+
};
|
|
195
|
+
export type AdminPhoneNumbersOrdersGetStatusEnum = typeof AdminPhoneNumbersOrdersGetStatusEnum[keyof typeof AdminPhoneNumbersOrdersGetStatusEnum];
|
|
@@ -22,7 +22,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
22
22
|
});
|
|
23
23
|
};
|
|
24
24
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
25
|
-
exports.AdminPhoneNumbersGetStatusEnum = exports.AdminPhoneNumbersApi = void 0;
|
|
25
|
+
exports.AdminPhoneNumbersOrdersGetStatusEnum = exports.AdminPhoneNumbersGetStatusEnum = exports.AdminPhoneNumbersApi = void 0;
|
|
26
26
|
const runtime = require("../runtime");
|
|
27
27
|
const index_1 = require("../models/index");
|
|
28
28
|
/**
|
|
@@ -80,6 +80,205 @@ class AdminPhoneNumbersApi extends runtime.BaseAPI {
|
|
|
80
80
|
return yield response.value();
|
|
81
81
|
});
|
|
82
82
|
}
|
|
83
|
+
/**
|
|
84
|
+
* List the phone-number backorder queue (app-admin only)
|
|
85
|
+
*/
|
|
86
|
+
adminPhoneNumbersOrdersGetRaw(requestParameters, initOverrides) {
|
|
87
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
88
|
+
const queryParameters = {};
|
|
89
|
+
if (requestParameters['status'] != null) {
|
|
90
|
+
queryParameters['status'] = requestParameters['status'];
|
|
91
|
+
}
|
|
92
|
+
if (requestParameters['organizationId'] != null) {
|
|
93
|
+
queryParameters['organization_id'] = requestParameters['organizationId'];
|
|
94
|
+
}
|
|
95
|
+
if (requestParameters['requiresCallRedirect'] != null) {
|
|
96
|
+
queryParameters['requires_call_redirect'] = requestParameters['requiresCallRedirect'];
|
|
97
|
+
}
|
|
98
|
+
if (requestParameters['limit'] != null) {
|
|
99
|
+
queryParameters['limit'] = requestParameters['limit'];
|
|
100
|
+
}
|
|
101
|
+
if (requestParameters['offset'] != null) {
|
|
102
|
+
queryParameters['offset'] = requestParameters['offset'];
|
|
103
|
+
}
|
|
104
|
+
const headerParameters = {};
|
|
105
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
106
|
+
const token = this.configuration.accessToken;
|
|
107
|
+
const tokenString = yield token("bearerAuth", []);
|
|
108
|
+
if (tokenString) {
|
|
109
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
let urlPath = `/admin/phone-numbers/orders`;
|
|
113
|
+
const response = yield this.request({
|
|
114
|
+
path: urlPath,
|
|
115
|
+
method: 'GET',
|
|
116
|
+
headers: headerParameters,
|
|
117
|
+
query: queryParameters,
|
|
118
|
+
}, initOverrides);
|
|
119
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.PhoneNumberOrdersListResponseFromJSON)(jsonValue));
|
|
120
|
+
});
|
|
121
|
+
}
|
|
122
|
+
/**
|
|
123
|
+
* List the phone-number backorder queue (app-admin only)
|
|
124
|
+
*/
|
|
125
|
+
adminPhoneNumbersOrdersGet() {
|
|
126
|
+
return __awaiter(this, arguments, void 0, function* (requestParameters = {}, initOverrides) {
|
|
127
|
+
const response = yield this.adminPhoneNumbersOrdersGetRaw(requestParameters, initOverrides);
|
|
128
|
+
return yield response.value();
|
|
129
|
+
});
|
|
130
|
+
}
|
|
131
|
+
/**
|
|
132
|
+
* Cancel a pending order (app-admin only)
|
|
133
|
+
*/
|
|
134
|
+
adminPhoneNumbersOrdersOrderIdCancelPostRaw(requestParameters, initOverrides) {
|
|
135
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
136
|
+
if (requestParameters['orderId'] == null) {
|
|
137
|
+
throw new runtime.RequiredError('orderId', 'Required parameter "orderId" was null or undefined when calling adminPhoneNumbersOrdersOrderIdCancelPost().');
|
|
138
|
+
}
|
|
139
|
+
const queryParameters = {};
|
|
140
|
+
const headerParameters = {};
|
|
141
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
142
|
+
const token = this.configuration.accessToken;
|
|
143
|
+
const tokenString = yield token("bearerAuth", []);
|
|
144
|
+
if (tokenString) {
|
|
145
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
let urlPath = `/admin/phone-numbers/orders/{orderId}/cancel`;
|
|
149
|
+
urlPath = urlPath.replace(`{${"orderId"}}`, encodeURIComponent(String(requestParameters['orderId'])));
|
|
150
|
+
const response = yield this.request({
|
|
151
|
+
path: urlPath,
|
|
152
|
+
method: 'POST',
|
|
153
|
+
headers: headerParameters,
|
|
154
|
+
query: queryParameters,
|
|
155
|
+
}, initOverrides);
|
|
156
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.PhoneNumberOrderFromJSON)(jsonValue));
|
|
157
|
+
});
|
|
158
|
+
}
|
|
159
|
+
/**
|
|
160
|
+
* Cancel a pending order (app-admin only)
|
|
161
|
+
*/
|
|
162
|
+
adminPhoneNumbersOrdersOrderIdCancelPost(requestParameters, initOverrides) {
|
|
163
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
164
|
+
const response = yield this.adminPhoneNumbersOrdersOrderIdCancelPostRaw(requestParameters, initOverrides);
|
|
165
|
+
return yield response.value();
|
|
166
|
+
});
|
|
167
|
+
}
|
|
168
|
+
/**
|
|
169
|
+
* Attempt to fulfill a specific pending order now (app-admin only)
|
|
170
|
+
*/
|
|
171
|
+
adminPhoneNumbersOrdersOrderIdFulfillPostRaw(requestParameters, initOverrides) {
|
|
172
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
173
|
+
if (requestParameters['orderId'] == null) {
|
|
174
|
+
throw new runtime.RequiredError('orderId', 'Required parameter "orderId" was null or undefined when calling adminPhoneNumbersOrdersOrderIdFulfillPost().');
|
|
175
|
+
}
|
|
176
|
+
const queryParameters = {};
|
|
177
|
+
const headerParameters = {};
|
|
178
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
179
|
+
const token = this.configuration.accessToken;
|
|
180
|
+
const tokenString = yield token("bearerAuth", []);
|
|
181
|
+
if (tokenString) {
|
|
182
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
let urlPath = `/admin/phone-numbers/orders/{orderId}/fulfill`;
|
|
186
|
+
urlPath = urlPath.replace(`{${"orderId"}}`, encodeURIComponent(String(requestParameters['orderId'])));
|
|
187
|
+
const response = yield this.request({
|
|
188
|
+
path: urlPath,
|
|
189
|
+
method: 'POST',
|
|
190
|
+
headers: headerParameters,
|
|
191
|
+
query: queryParameters,
|
|
192
|
+
}, initOverrides);
|
|
193
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.PhoneNumberOrderFromJSON)(jsonValue));
|
|
194
|
+
});
|
|
195
|
+
}
|
|
196
|
+
/**
|
|
197
|
+
* Attempt to fulfill a specific pending order now (app-admin only)
|
|
198
|
+
*/
|
|
199
|
+
adminPhoneNumbersOrdersOrderIdFulfillPost(requestParameters, initOverrides) {
|
|
200
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
201
|
+
const response = yield this.adminPhoneNumbersOrdersOrderIdFulfillPostRaw(requestParameters, initOverrides);
|
|
202
|
+
return yield response.value();
|
|
203
|
+
});
|
|
204
|
+
}
|
|
205
|
+
/**
|
|
206
|
+
* Run the backorder fulfillment queue on demand (app-admin only)
|
|
207
|
+
*/
|
|
208
|
+
adminPhoneNumbersOrdersProcessPostRaw(initOverrides) {
|
|
209
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
210
|
+
const queryParameters = {};
|
|
211
|
+
const headerParameters = {};
|
|
212
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
213
|
+
const token = this.configuration.accessToken;
|
|
214
|
+
const tokenString = yield token("bearerAuth", []);
|
|
215
|
+
if (tokenString) {
|
|
216
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
let urlPath = `/admin/phone-numbers/orders/process`;
|
|
220
|
+
const response = yield this.request({
|
|
221
|
+
path: urlPath,
|
|
222
|
+
method: 'POST',
|
|
223
|
+
headers: headerParameters,
|
|
224
|
+
query: queryParameters,
|
|
225
|
+
}, initOverrides);
|
|
226
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.ProcessOrdersResultFromJSON)(jsonValue));
|
|
227
|
+
});
|
|
228
|
+
}
|
|
229
|
+
/**
|
|
230
|
+
* Run the backorder fulfillment queue on demand (app-admin only)
|
|
231
|
+
*/
|
|
232
|
+
adminPhoneNumbersOrdersProcessPost(initOverrides) {
|
|
233
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
234
|
+
const response = yield this.adminPhoneNumbersOrdersProcessPostRaw(initOverrides);
|
|
235
|
+
return yield response.value();
|
|
236
|
+
});
|
|
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
|
+
}
|
|
83
282
|
/**
|
|
84
283
|
* Creates a SIP trunk (and, if an agent is given, a dispatch rule) and links the number.
|
|
85
284
|
* Assign a phone number to an organization (app-admin only)
|
|
@@ -241,6 +440,43 @@ class AdminPhoneNumbersApi extends runtime.BaseAPI {
|
|
|
241
440
|
return yield response.value();
|
|
242
441
|
});
|
|
243
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
|
+
}
|
|
244
480
|
/**
|
|
245
481
|
* Deletes the LiveKit dispatch rule + trunk and frees the number back to the pool.
|
|
246
482
|
* Release a phone number from its organization (app-admin only)
|
|
@@ -327,3 +563,11 @@ exports.AdminPhoneNumbersGetStatusEnum = {
|
|
|
327
563
|
Available: 'available',
|
|
328
564
|
Assigned: 'assigned'
|
|
329
565
|
};
|
|
566
|
+
/**
|
|
567
|
+
* @export
|
|
568
|
+
*/
|
|
569
|
+
exports.AdminPhoneNumbersOrdersGetStatusEnum = {
|
|
570
|
+
Pending: 'pending',
|
|
571
|
+
Active: 'active',
|
|
572
|
+
Canceled: 'canceled'
|
|
573
|
+
};
|
|
@@ -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;
|