@l7mp/tivadar-ai-api-sdk 0.2.18 → 0.2.19

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.
@@ -26,7 +26,7 @@ import { VoiceUsageApi } from "./apis/VoiceUsageApi";
26
26
  import { VoiceAgentsApi } from "./apis/VoiceAgentsApi";
27
27
  import { ToolsApi } from "./apis/ToolsApi";
28
28
  import { PhonebookApi } from "./apis/PhonebookApi";
29
- 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";
29
+ 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, OutboundCallRequest, VoiceUsageReportRequest, UserPreferencesUpdate, AgentToolUpsert, PhonebookUpdate, PhonebookEntryCreate, PhonebookEntryUpdate } from "./models";
30
30
  export interface ApiClientConfig {
31
31
  baseUrl: string;
32
32
  options?: {
@@ -186,8 +186,6 @@ export declare class Api {
186
186
  delete: (phoneNumberId: number, options?: RequestInit) => ReturnType<AdminPhoneNumbersApi["adminPhoneNumbersPhoneNumberIdDelete"]>;
187
187
  assign: (phoneNumberId: number, adminPhoneNumberAssign: AdminPhoneNumberAssign, options?: RequestInit) => ReturnType<AdminPhoneNumbersApi["adminPhoneNumbersPhoneNumberIdAssignPost"]>;
188
188
  unassign: (phoneNumberId: number, options?: RequestInit) => ReturnType<AdminPhoneNumbersApi["adminPhoneNumbersPhoneNumberIdUnassignPost"]>;
189
- assignOutbound: (phoneNumberId: number, adminPhoneNumberAssignOutbound: AdminPhoneNumberAssignOutbound, options?: RequestInit) => ReturnType<AdminPhoneNumbersApi["adminPhoneNumbersPhoneNumberIdAssignOutboundPost"]>;
190
- unassignOutbound: (phoneNumberId: number, options?: RequestInit) => ReturnType<AdminPhoneNumbersApi["adminPhoneNumbersPhoneNumberIdUnassignOutboundPost"]>;
191
189
  listOrders: (params?: {
192
190
  status?: "pending" | "active" | "canceled";
193
191
  organizationId?: string;
@@ -228,8 +228,6 @@ class Api {
228
228
  delete: (phoneNumberId, options) => this.adminPhoneNumbersApi.adminPhoneNumbersPhoneNumberIdDelete({ phoneNumberId }, options),
229
229
  assign: (phoneNumberId, adminPhoneNumberAssign, options) => this.adminPhoneNumbersApi.adminPhoneNumbersPhoneNumberIdAssignPost({ phoneNumberId, adminPhoneNumberAssign }, options),
230
230
  unassign: (phoneNumberId, options) => this.adminPhoneNumbersApi.adminPhoneNumbersPhoneNumberIdUnassignPost({ phoneNumberId }, options),
231
- assignOutbound: (phoneNumberId, adminPhoneNumberAssignOutbound, options) => this.adminPhoneNumbersApi.adminPhoneNumbersPhoneNumberIdAssignOutboundPost({ phoneNumberId, adminPhoneNumberAssignOutbound }, options),
232
- unassignOutbound: (phoneNumberId, options) => this.adminPhoneNumbersApi.adminPhoneNumbersPhoneNumberIdUnassignOutboundPost({ phoneNumberId }, options),
233
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),
234
232
  processOrders: (options) => this.adminPhoneNumbersApi.adminPhoneNumbersOrdersProcessPost(options),
235
233
  fulfillOrder: (orderId, options) => this.adminPhoneNumbersApi.adminPhoneNumbersOrdersOrderIdFulfillPost({ orderId }, options),
@@ -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, AdminPhoneNumberAssignOutbound, AdminPhoneNumberDetail, AdminPhoneNumberUpdate, AdminPhoneNumbersListResponse, PhoneNumber, PhoneNumberCreate, PhoneNumberOrder, PhoneNumberOrdersListResponse, ProcessOrdersResult } from '../models/index';
13
+ import type { AdminPhoneNumberAssign, 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,10 +32,6 @@ 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
- }
39
35
  export interface AdminPhoneNumbersPhoneNumberIdAssignPostRequest {
40
36
  phoneNumberId: number;
41
37
  adminPhoneNumberAssign: AdminPhoneNumberAssign;
@@ -50,9 +46,6 @@ export interface AdminPhoneNumbersPhoneNumberIdPatchRequest {
50
46
  phoneNumberId: number;
51
47
  adminPhoneNumberUpdate: AdminPhoneNumberUpdate;
52
48
  }
53
- export interface AdminPhoneNumbersPhoneNumberIdUnassignOutboundPostRequest {
54
- phoneNumberId: number;
55
- }
56
49
  export interface AdminPhoneNumbersPhoneNumberIdUnassignPostRequest {
57
50
  phoneNumberId: number;
58
51
  }
@@ -103,16 +96,6 @@ export declare class AdminPhoneNumbersApi extends runtime.BaseAPI {
103
96
  * Run the backorder fulfillment queue on demand (app-admin only)
104
97
  */
105
98
  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>;
116
99
  /**
117
100
  * Creates a SIP trunk (and, if an agent is given, a dispatch rule) and links the number.
118
101
  * Assign a phone number to an organization (app-admin only)
@@ -149,14 +132,6 @@ export declare class AdminPhoneNumbersApi extends runtime.BaseAPI {
149
132
  * Update a phone number (app-admin only)
150
133
  */
151
134
  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>;
160
135
  /**
161
136
  * Deletes the LiveKit dispatch rule + trunk and frees the number back to the pool.
162
137
  * Release a phone number from its organization (app-admin only)
@@ -235,50 +235,6 @@ 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
- }
282
238
  /**
283
239
  * Creates a SIP trunk (and, if an agent is given, a dispatch rule) and links the number.
284
240
  * Assign a phone number to an organization (app-admin only)
@@ -440,43 +396,6 @@ class AdminPhoneNumbersApi extends runtime.BaseAPI {
440
396
  return yield response.value();
441
397
  });
442
398
  }
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
- }
480
399
  /**
481
400
  * Deletes the LiveKit dispatch rule + trunk and frees the number back to the pool.
482
401
  * Release a phone number from its organization (app-admin only)
@@ -26,7 +26,7 @@ import { VoiceUsageApi } from "./apis/VoiceUsageApi";
26
26
  import { VoiceAgentsApi } from "./apis/VoiceAgentsApi";
27
27
  import { ToolsApi } from "./apis/ToolsApi";
28
28
  import { PhonebookApi } from "./apis/PhonebookApi";
29
- 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";
29
+ 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, OutboundCallRequest, VoiceUsageReportRequest, UserPreferencesUpdate, AgentToolUpsert, PhonebookUpdate, PhonebookEntryCreate, PhonebookEntryUpdate } from "./models";
30
30
  export interface ApiClientConfig {
31
31
  baseUrl: string;
32
32
  options?: {
@@ -186,8 +186,6 @@ export declare class Api {
186
186
  delete: (phoneNumberId: number, options?: RequestInit) => ReturnType<AdminPhoneNumbersApi["adminPhoneNumbersPhoneNumberIdDelete"]>;
187
187
  assign: (phoneNumberId: number, adminPhoneNumberAssign: AdminPhoneNumberAssign, options?: RequestInit) => ReturnType<AdminPhoneNumbersApi["adminPhoneNumbersPhoneNumberIdAssignPost"]>;
188
188
  unassign: (phoneNumberId: number, options?: RequestInit) => ReturnType<AdminPhoneNumbersApi["adminPhoneNumbersPhoneNumberIdUnassignPost"]>;
189
- assignOutbound: (phoneNumberId: number, adminPhoneNumberAssignOutbound: AdminPhoneNumberAssignOutbound, options?: RequestInit) => ReturnType<AdminPhoneNumbersApi["adminPhoneNumbersPhoneNumberIdAssignOutboundPost"]>;
190
- unassignOutbound: (phoneNumberId: number, options?: RequestInit) => ReturnType<AdminPhoneNumbersApi["adminPhoneNumbersPhoneNumberIdUnassignOutboundPost"]>;
191
189
  listOrders: (params?: {
192
190
  status?: "pending" | "active" | "canceled";
193
191
  organizationId?: string;
@@ -225,8 +225,6 @@ export class Api {
225
225
  delete: (phoneNumberId, options) => this.adminPhoneNumbersApi.adminPhoneNumbersPhoneNumberIdDelete({ phoneNumberId }, options),
226
226
  assign: (phoneNumberId, adminPhoneNumberAssign, options) => this.adminPhoneNumbersApi.adminPhoneNumbersPhoneNumberIdAssignPost({ phoneNumberId, adminPhoneNumberAssign }, options),
227
227
  unassign: (phoneNumberId, options) => this.adminPhoneNumbersApi.adminPhoneNumbersPhoneNumberIdUnassignPost({ phoneNumberId }, options),
228
- assignOutbound: (phoneNumberId, adminPhoneNumberAssignOutbound, options) => this.adminPhoneNumbersApi.adminPhoneNumbersPhoneNumberIdAssignOutboundPost({ phoneNumberId, adminPhoneNumberAssignOutbound }, options),
229
- unassignOutbound: (phoneNumberId, options) => this.adminPhoneNumbersApi.adminPhoneNumbersPhoneNumberIdUnassignOutboundPost({ phoneNumberId }, options),
230
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),
231
229
  processOrders: (options) => this.adminPhoneNumbersApi.adminPhoneNumbersOrdersProcessPost(options),
232
230
  fulfillOrder: (orderId, options) => this.adminPhoneNumbersApi.adminPhoneNumbersOrdersOrderIdFulfillPost({ orderId }, options),
@@ -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, AdminPhoneNumberAssignOutbound, AdminPhoneNumberDetail, AdminPhoneNumberUpdate, AdminPhoneNumbersListResponse, PhoneNumber, PhoneNumberCreate, PhoneNumberOrder, PhoneNumberOrdersListResponse, ProcessOrdersResult } from '../models/index';
13
+ import type { AdminPhoneNumberAssign, 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,10 +32,6 @@ 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
- }
39
35
  export interface AdminPhoneNumbersPhoneNumberIdAssignPostRequest {
40
36
  phoneNumberId: number;
41
37
  adminPhoneNumberAssign: AdminPhoneNumberAssign;
@@ -50,9 +46,6 @@ export interface AdminPhoneNumbersPhoneNumberIdPatchRequest {
50
46
  phoneNumberId: number;
51
47
  adminPhoneNumberUpdate: AdminPhoneNumberUpdate;
52
48
  }
53
- export interface AdminPhoneNumbersPhoneNumberIdUnassignOutboundPostRequest {
54
- phoneNumberId: number;
55
- }
56
49
  export interface AdminPhoneNumbersPhoneNumberIdUnassignPostRequest {
57
50
  phoneNumberId: number;
58
51
  }
@@ -103,16 +96,6 @@ export declare class AdminPhoneNumbersApi extends runtime.BaseAPI {
103
96
  * Run the backorder fulfillment queue on demand (app-admin only)
104
97
  */
105
98
  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>;
116
99
  /**
117
100
  * Creates a SIP trunk (and, if an agent is given, a dispatch rule) and links the number.
118
101
  * Assign a phone number to an organization (app-admin only)
@@ -149,14 +132,6 @@ export declare class AdminPhoneNumbersApi extends runtime.BaseAPI {
149
132
  * Update a phone number (app-admin only)
150
133
  */
151
134
  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>;
160
135
  /**
161
136
  * Deletes the LiveKit dispatch rule + trunk and frees the number back to the pool.
162
137
  * 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, AdminPhoneNumberAssignOutboundToJSON, AdminPhoneNumberDetailFromJSON, AdminPhoneNumberUpdateToJSON, AdminPhoneNumbersListResponseFromJSON, PhoneNumberFromJSON, PhoneNumberCreateToJSON, PhoneNumberOrderFromJSON, PhoneNumberOrdersListResponseFromJSON, ProcessOrdersResultFromJSON, } from '../models/index';
24
+ import { AdminPhoneNumberAssignToJSON, AdminPhoneNumberDetailFromJSON, AdminPhoneNumberUpdateToJSON, AdminPhoneNumbersListResponseFromJSON, PhoneNumberFromJSON, PhoneNumberCreateToJSON, PhoneNumberOrderFromJSON, PhoneNumberOrdersListResponseFromJSON, ProcessOrdersResultFromJSON, } from '../models/index';
25
25
  /**
26
26
  *
27
27
  */
@@ -232,50 +232,6 @@ 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
- }
279
235
  /**
280
236
  * Creates a SIP trunk (and, if an agent is given, a dispatch rule) and links the number.
281
237
  * Assign a phone number to an organization (app-admin only)
@@ -437,43 +393,6 @@ export class AdminPhoneNumbersApi extends runtime.BaseAPI {
437
393
  return yield response.value();
438
394
  });
439
395
  }
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
- }
477
396
  /**
478
397
  * Deletes the LiveKit dispatch rule + trunk and frees the number back to the pool.
479
398
  * Release a phone number from its organization (app-admin only)
@@ -45,6 +45,12 @@ export interface AdminPhoneNumberUpdate {
45
45
  * @memberof AdminPhoneNumberUpdate
46
46
  */
47
47
  auth_password?: string;
48
+ /**
49
+ * Associate the outbound number with an org (uuid), or null to clear.
50
+ * @type {string}
51
+ * @memberof AdminPhoneNumberUpdate
52
+ */
53
+ outbound_organization_id?: string | null;
48
54
  }
49
55
  /**
50
56
  * Check if a given object implements the AdminPhoneNumberUpdate interface.
@@ -30,6 +30,7 @@ export function AdminPhoneNumberUpdateFromJSONTyped(json, ignoreDiscriminator) {
30
30
  'sip_address': json['sip_address'] == null ? undefined : json['sip_address'],
31
31
  'auth_username': json['auth_username'] == null ? undefined : json['auth_username'],
32
32
  'auth_password': json['auth_password'] == null ? undefined : json['auth_password'],
33
+ 'outbound_organization_id': json['outbound_organization_id'] == null ? undefined : json['outbound_organization_id'],
33
34
  };
34
35
  }
35
36
  export function AdminPhoneNumberUpdateToJSON(json) {
@@ -45,5 +46,6 @@ export function AdminPhoneNumberUpdateToJSONTyped(value, ignoreDiscriminator = f
45
46
  'sip_address': value['sip_address'],
46
47
  'auth_username': value['auth_username'],
47
48
  'auth_password': value['auth_password'],
49
+ 'outbound_organization_id': value['outbound_organization_id'],
48
50
  };
49
51
  }
@@ -51,6 +51,12 @@ export interface PhoneNumberCreate {
51
51
  * @memberof PhoneNumberCreate
52
52
  */
53
53
  auth_password?: string;
54
+ /**
55
+ * Optionally associate this outbound number with an org in one step (only with supports_outbound).
56
+ * @type {string}
57
+ * @memberof PhoneNumberCreate
58
+ */
59
+ outbound_organization_id?: string;
54
60
  }
55
61
  /**
56
62
  * Check if a given object implements the PhoneNumberCreate interface.
@@ -33,6 +33,7 @@ export function PhoneNumberCreateFromJSONTyped(json, ignoreDiscriminator) {
33
33
  'sip_address': json['sip_address'] == null ? undefined : json['sip_address'],
34
34
  'auth_username': json['auth_username'] == null ? undefined : json['auth_username'],
35
35
  'auth_password': json['auth_password'] == null ? undefined : json['auth_password'],
36
+ 'outbound_organization_id': json['outbound_organization_id'] == null ? undefined : json['outbound_organization_id'],
36
37
  };
37
38
  }
38
39
  export function PhoneNumberCreateToJSON(json) {
@@ -49,5 +50,6 @@ export function PhoneNumberCreateToJSONTyped(value, ignoreDiscriminator = false)
49
50
  'sip_address': value['sip_address'],
50
51
  'auth_username': value['auth_username'],
51
52
  'auth_password': value['auth_password'],
53
+ 'outbound_organization_id': value['outbound_organization_id'],
52
54
  };
53
55
  }
@@ -1,7 +1,6 @@
1
1
  export * from './AdminDispatchRuleCreate';
2
2
  export * from './AdminGrantMinutesRequest';
3
3
  export * from './AdminPhoneNumberAssign';
4
- export * from './AdminPhoneNumberAssignOutbound';
5
4
  export * from './AdminPhoneNumberDetail';
6
5
  export * from './AdminPhoneNumberUpdate';
7
6
  export * from './AdminPhoneNumbersListResponse';
@@ -3,7 +3,6 @@
3
3
  export * from './AdminDispatchRuleCreate';
4
4
  export * from './AdminGrantMinutesRequest';
5
5
  export * from './AdminPhoneNumberAssign';
6
- export * from './AdminPhoneNumberAssignOutbound';
7
6
  export * from './AdminPhoneNumberDetail';
8
7
  export * from './AdminPhoneNumberUpdate';
9
8
  export * from './AdminPhoneNumbersListResponse';
@@ -45,6 +45,12 @@ export interface AdminPhoneNumberUpdate {
45
45
  * @memberof AdminPhoneNumberUpdate
46
46
  */
47
47
  auth_password?: string;
48
+ /**
49
+ * Associate the outbound number with an org (uuid), or null to clear.
50
+ * @type {string}
51
+ * @memberof AdminPhoneNumberUpdate
52
+ */
53
+ outbound_organization_id?: string | null;
48
54
  }
49
55
  /**
50
56
  * Check if a given object implements the AdminPhoneNumberUpdate interface.
@@ -37,6 +37,7 @@ function AdminPhoneNumberUpdateFromJSONTyped(json, ignoreDiscriminator) {
37
37
  'sip_address': json['sip_address'] == null ? undefined : json['sip_address'],
38
38
  'auth_username': json['auth_username'] == null ? undefined : json['auth_username'],
39
39
  'auth_password': json['auth_password'] == null ? undefined : json['auth_password'],
40
+ 'outbound_organization_id': json['outbound_organization_id'] == null ? undefined : json['outbound_organization_id'],
40
41
  };
41
42
  }
42
43
  function AdminPhoneNumberUpdateToJSON(json) {
@@ -52,5 +53,6 @@ function AdminPhoneNumberUpdateToJSONTyped(value, ignoreDiscriminator = false) {
52
53
  'sip_address': value['sip_address'],
53
54
  'auth_username': value['auth_username'],
54
55
  'auth_password': value['auth_password'],
56
+ 'outbound_organization_id': value['outbound_organization_id'],
55
57
  };
56
58
  }
@@ -51,6 +51,12 @@ export interface PhoneNumberCreate {
51
51
  * @memberof PhoneNumberCreate
52
52
  */
53
53
  auth_password?: string;
54
+ /**
55
+ * Optionally associate this outbound number with an org in one step (only with supports_outbound).
56
+ * @type {string}
57
+ * @memberof PhoneNumberCreate
58
+ */
59
+ outbound_organization_id?: string;
54
60
  }
55
61
  /**
56
62
  * Check if a given object implements the PhoneNumberCreate interface.
@@ -40,6 +40,7 @@ function PhoneNumberCreateFromJSONTyped(json, ignoreDiscriminator) {
40
40
  'sip_address': json['sip_address'] == null ? undefined : json['sip_address'],
41
41
  'auth_username': json['auth_username'] == null ? undefined : json['auth_username'],
42
42
  'auth_password': json['auth_password'] == null ? undefined : json['auth_password'],
43
+ 'outbound_organization_id': json['outbound_organization_id'] == null ? undefined : json['outbound_organization_id'],
43
44
  };
44
45
  }
45
46
  function PhoneNumberCreateToJSON(json) {
@@ -56,5 +57,6 @@ function PhoneNumberCreateToJSONTyped(value, ignoreDiscriminator = false) {
56
57
  'sip_address': value['sip_address'],
57
58
  'auth_username': value['auth_username'],
58
59
  'auth_password': value['auth_password'],
60
+ 'outbound_organization_id': value['outbound_organization_id'],
59
61
  };
60
62
  }
@@ -1,7 +1,6 @@
1
1
  export * from './AdminDispatchRuleCreate';
2
2
  export * from './AdminGrantMinutesRequest';
3
3
  export * from './AdminPhoneNumberAssign';
4
- export * from './AdminPhoneNumberAssignOutbound';
5
4
  export * from './AdminPhoneNumberDetail';
6
5
  export * from './AdminPhoneNumberUpdate';
7
6
  export * from './AdminPhoneNumbersListResponse';
@@ -19,7 +19,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
19
19
  __exportStar(require("./AdminDispatchRuleCreate"), exports);
20
20
  __exportStar(require("./AdminGrantMinutesRequest"), exports);
21
21
  __exportStar(require("./AdminPhoneNumberAssign"), exports);
22
- __exportStar(require("./AdminPhoneNumberAssignOutbound"), exports);
23
22
  __exportStar(require("./AdminPhoneNumberDetail"), exports);
24
23
  __exportStar(require("./AdminPhoneNumberUpdate"), exports);
25
24
  __exportStar(require("./AdminPhoneNumbersListResponse"), exports);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@l7mp/tivadar-ai-api-sdk",
3
- "version": "0.2.18",
3
+ "version": "0.2.19",
4
4
  "description": "TypeScript/JavaScript SDK for Tivadar AI Backend API",
5
5
  "author": "L7mp Technologies",
6
6
  "repository": {
package/src/api-client.ts CHANGED
@@ -69,7 +69,6 @@ import type {
69
69
  AdminGrantMinutesRequest,
70
70
  AdminPhoneNumberUpdate,
71
71
  AdminPhoneNumberAssign,
72
- AdminPhoneNumberAssignOutbound,
73
72
  AdminSipTrunkCreate,
74
73
  AdminDispatchRuleCreate,
75
74
  OutboundCallRequest,
@@ -223,8 +222,6 @@ export class Api {
223
222
  delete: (phoneNumberId: number, options?: RequestInit) => ReturnType<AdminPhoneNumbersApi["adminPhoneNumbersPhoneNumberIdDelete"]>;
224
223
  assign: (phoneNumberId: number, adminPhoneNumberAssign: AdminPhoneNumberAssign, options?: RequestInit) => ReturnType<AdminPhoneNumbersApi["adminPhoneNumbersPhoneNumberIdAssignPost"]>;
225
224
  unassign: (phoneNumberId: number, options?: RequestInit) => ReturnType<AdminPhoneNumbersApi["adminPhoneNumbersPhoneNumberIdUnassignPost"]>;
226
- assignOutbound: (phoneNumberId: number, adminPhoneNumberAssignOutbound: AdminPhoneNumberAssignOutbound, options?: RequestInit) => ReturnType<AdminPhoneNumbersApi["adminPhoneNumbersPhoneNumberIdAssignOutboundPost"]>;
227
- unassignOutbound: (phoneNumberId: number, options?: RequestInit) => ReturnType<AdminPhoneNumbersApi["adminPhoneNumbersPhoneNumberIdUnassignOutboundPost"]>;
228
225
  listOrders: (params?: { status?: "pending" | "active" | "canceled"; organizationId?: string; requiresCallRedirect?: boolean; limit?: number; offset?: number }, options?: RequestInit) => ReturnType<AdminPhoneNumbersApi["adminPhoneNumbersOrdersGet"]>;
229
226
  processOrders: (options?: RequestInit) => ReturnType<AdminPhoneNumbersApi["adminPhoneNumbersOrdersProcessPost"]>;
230
227
  fulfillOrder: (orderId: string, options?: RequestInit) => ReturnType<AdminPhoneNumbersApi["adminPhoneNumbersOrdersOrderIdFulfillPost"]>;
@@ -521,8 +518,6 @@ export class Api {
521
518
  delete: (phoneNumberId, options) => this.adminPhoneNumbersApi.adminPhoneNumbersPhoneNumberIdDelete({ phoneNumberId }, options),
522
519
  assign: (phoneNumberId, adminPhoneNumberAssign, options) => this.adminPhoneNumbersApi.adminPhoneNumbersPhoneNumberIdAssignPost({ phoneNumberId, adminPhoneNumberAssign }, options),
523
520
  unassign: (phoneNumberId, options) => this.adminPhoneNumbersApi.adminPhoneNumbersPhoneNumberIdUnassignPost({ phoneNumberId }, options),
524
- assignOutbound: (phoneNumberId, adminPhoneNumberAssignOutbound, options) => this.adminPhoneNumbersApi.adminPhoneNumbersPhoneNumberIdAssignOutboundPost({ phoneNumberId, adminPhoneNumberAssignOutbound }, options),
525
- unassignOutbound: (phoneNumberId, options) => this.adminPhoneNumbersApi.adminPhoneNumbersPhoneNumberIdUnassignOutboundPost({ phoneNumberId }, options),
526
521
  listOrders: (params, options) => this.adminPhoneNumbersApi.adminPhoneNumbersOrdersGet({ status: params?.status, organizationId: params?.organizationId, requiresCallRedirect: params?.requiresCallRedirect, limit: params?.limit, offset: params?.offset }, options),
527
522
  processOrders: (options) => this.adminPhoneNumbersApi.adminPhoneNumbersOrdersProcessPost(options),
528
523
  fulfillOrder: (orderId, options) => this.adminPhoneNumbersApi.adminPhoneNumbersOrdersOrderIdFulfillPost({ orderId }, options),
@@ -16,7 +16,6 @@
16
16
  import * as runtime from '../runtime';
17
17
  import type {
18
18
  AdminPhoneNumberAssign,
19
- AdminPhoneNumberAssignOutbound,
20
19
  AdminPhoneNumberDetail,
21
20
  AdminPhoneNumberUpdate,
22
21
  AdminPhoneNumbersListResponse,
@@ -29,8 +28,6 @@ import type {
29
28
  import {
30
29
  AdminPhoneNumberAssignFromJSON,
31
30
  AdminPhoneNumberAssignToJSON,
32
- AdminPhoneNumberAssignOutboundFromJSON,
33
- AdminPhoneNumberAssignOutboundToJSON,
34
31
  AdminPhoneNumberDetailFromJSON,
35
32
  AdminPhoneNumberDetailToJSON,
36
33
  AdminPhoneNumberUpdateFromJSON,
@@ -74,11 +71,6 @@ export interface AdminPhoneNumbersOrdersOrderIdFulfillPostRequest {
74
71
  orderId: string;
75
72
  }
76
73
 
77
- export interface AdminPhoneNumbersPhoneNumberIdAssignOutboundPostRequest {
78
- phoneNumberId: number;
79
- adminPhoneNumberAssignOutbound: AdminPhoneNumberAssignOutbound;
80
- }
81
-
82
74
  export interface AdminPhoneNumbersPhoneNumberIdAssignPostRequest {
83
75
  phoneNumberId: number;
84
76
  adminPhoneNumberAssign: AdminPhoneNumberAssign;
@@ -97,10 +89,6 @@ export interface AdminPhoneNumbersPhoneNumberIdPatchRequest {
97
89
  adminPhoneNumberUpdate: AdminPhoneNumberUpdate;
98
90
  }
99
91
 
100
- export interface AdminPhoneNumbersPhoneNumberIdUnassignOutboundPostRequest {
101
- phoneNumberId: number;
102
- }
103
-
104
92
  export interface AdminPhoneNumbersPhoneNumberIdUnassignPostRequest {
105
93
  phoneNumberId: number;
106
94
  }
@@ -359,63 +347,6 @@ export class AdminPhoneNumbersApi extends runtime.BaseAPI {
359
347
  return await response.value();
360
348
  }
361
349
 
362
- /**
363
- * Grants the organization ownership of an outbound number (no inbound trunk). The org can then place outbound calls using it as caller-ID.
364
- * Assign an outbound-capable number to an organization (app-admin only)
365
- */
366
- async adminPhoneNumbersPhoneNumberIdAssignOutboundPostRaw(requestParameters: AdminPhoneNumbersPhoneNumberIdAssignOutboundPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AdminPhoneNumberDetail>> {
367
- if (requestParameters['phoneNumberId'] == null) {
368
- throw new runtime.RequiredError(
369
- 'phoneNumberId',
370
- 'Required parameter "phoneNumberId" was null or undefined when calling adminPhoneNumbersPhoneNumberIdAssignOutboundPost().'
371
- );
372
- }
373
-
374
- if (requestParameters['adminPhoneNumberAssignOutbound'] == null) {
375
- throw new runtime.RequiredError(
376
- 'adminPhoneNumberAssignOutbound',
377
- 'Required parameter "adminPhoneNumberAssignOutbound" was null or undefined when calling adminPhoneNumbersPhoneNumberIdAssignOutboundPost().'
378
- );
379
- }
380
-
381
- const queryParameters: any = {};
382
-
383
- const headerParameters: runtime.HTTPHeaders = {};
384
-
385
- headerParameters['Content-Type'] = 'application/json';
386
-
387
- if (this.configuration && this.configuration.accessToken) {
388
- const token = this.configuration.accessToken;
389
- const tokenString = await token("bearerAuth", []);
390
-
391
- if (tokenString) {
392
- headerParameters["Authorization"] = `Bearer ${tokenString}`;
393
- }
394
- }
395
-
396
- let urlPath = `/admin/phone-numbers/{phoneNumberId}/assign-outbound`;
397
- urlPath = urlPath.replace(`{${"phoneNumberId"}}`, encodeURIComponent(String(requestParameters['phoneNumberId'])));
398
-
399
- const response = await this.request({
400
- path: urlPath,
401
- method: 'POST',
402
- headers: headerParameters,
403
- query: queryParameters,
404
- body: AdminPhoneNumberAssignOutboundToJSON(requestParameters['adminPhoneNumberAssignOutbound']),
405
- }, initOverrides);
406
-
407
- return new runtime.JSONApiResponse(response, (jsonValue) => AdminPhoneNumberDetailFromJSON(jsonValue));
408
- }
409
-
410
- /**
411
- * Grants the organization ownership of an outbound number (no inbound trunk). The org can then place outbound calls using it as caller-ID.
412
- * Assign an outbound-capable number to an organization (app-admin only)
413
- */
414
- async adminPhoneNumbersPhoneNumberIdAssignOutboundPost(requestParameters: AdminPhoneNumbersPhoneNumberIdAssignOutboundPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AdminPhoneNumberDetail> {
415
- const response = await this.adminPhoneNumbersPhoneNumberIdAssignOutboundPostRaw(requestParameters, initOverrides);
416
- return await response.value();
417
- }
418
-
419
350
  /**
420
351
  * Creates a SIP trunk (and, if an agent is given, a dispatch rule) and links the number.
421
352
  * Assign a phone number to an organization (app-admin only)
@@ -619,51 +550,6 @@ export class AdminPhoneNumbersApi extends runtime.BaseAPI {
619
550
  return await response.value();
620
551
  }
621
552
 
622
- /**
623
- * Release an outbound number\'s organization ownership (app-admin only)
624
- */
625
- async adminPhoneNumbersPhoneNumberIdUnassignOutboundPostRaw(requestParameters: AdminPhoneNumbersPhoneNumberIdUnassignOutboundPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AdminPhoneNumberDetail>> {
626
- if (requestParameters['phoneNumberId'] == null) {
627
- throw new runtime.RequiredError(
628
- 'phoneNumberId',
629
- 'Required parameter "phoneNumberId" was null or undefined when calling adminPhoneNumbersPhoneNumberIdUnassignOutboundPost().'
630
- );
631
- }
632
-
633
- const queryParameters: any = {};
634
-
635
- const headerParameters: runtime.HTTPHeaders = {};
636
-
637
- if (this.configuration && this.configuration.accessToken) {
638
- const token = this.configuration.accessToken;
639
- const tokenString = await token("bearerAuth", []);
640
-
641
- if (tokenString) {
642
- headerParameters["Authorization"] = `Bearer ${tokenString}`;
643
- }
644
- }
645
-
646
- let urlPath = `/admin/phone-numbers/{phoneNumberId}/unassign-outbound`;
647
- urlPath = urlPath.replace(`{${"phoneNumberId"}}`, encodeURIComponent(String(requestParameters['phoneNumberId'])));
648
-
649
- const response = await this.request({
650
- path: urlPath,
651
- method: 'POST',
652
- headers: headerParameters,
653
- query: queryParameters,
654
- }, initOverrides);
655
-
656
- return new runtime.JSONApiResponse(response, (jsonValue) => AdminPhoneNumberDetailFromJSON(jsonValue));
657
- }
658
-
659
- /**
660
- * Release an outbound number\'s organization ownership (app-admin only)
661
- */
662
- async adminPhoneNumbersPhoneNumberIdUnassignOutboundPost(requestParameters: AdminPhoneNumbersPhoneNumberIdUnassignOutboundPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AdminPhoneNumberDetail> {
663
- const response = await this.adminPhoneNumbersPhoneNumberIdUnassignOutboundPostRaw(requestParameters, initOverrides);
664
- return await response.value();
665
- }
666
-
667
553
  /**
668
554
  * Deletes the LiveKit dispatch rule + trunk and frees the number back to the pool.
669
555
  * Release a phone number from its organization (app-admin only)
@@ -49,6 +49,12 @@ export interface AdminPhoneNumberUpdate {
49
49
  * @memberof AdminPhoneNumberUpdate
50
50
  */
51
51
  auth_password?: string;
52
+ /**
53
+ * Associate the outbound number with an org (uuid), or null to clear.
54
+ * @type {string}
55
+ * @memberof AdminPhoneNumberUpdate
56
+ */
57
+ outbound_organization_id?: string | null;
52
58
  }
53
59
 
54
60
  /**
@@ -73,6 +79,7 @@ export function AdminPhoneNumberUpdateFromJSONTyped(json: any, ignoreDiscriminat
73
79
  'sip_address': json['sip_address'] == null ? undefined : json['sip_address'],
74
80
  'auth_username': json['auth_username'] == null ? undefined : json['auth_username'],
75
81
  'auth_password': json['auth_password'] == null ? undefined : json['auth_password'],
82
+ 'outbound_organization_id': json['outbound_organization_id'] == null ? undefined : json['outbound_organization_id'],
76
83
  };
77
84
  }
78
85
 
@@ -92,6 +99,7 @@ export function AdminPhoneNumberUpdateToJSONTyped(value?: AdminPhoneNumberUpdate
92
99
  'sip_address': value['sip_address'],
93
100
  'auth_username': value['auth_username'],
94
101
  'auth_password': value['auth_password'],
102
+ 'outbound_organization_id': value['outbound_organization_id'],
95
103
  };
96
104
  }
97
105
 
@@ -55,6 +55,12 @@ export interface PhoneNumberCreate {
55
55
  * @memberof PhoneNumberCreate
56
56
  */
57
57
  auth_password?: string;
58
+ /**
59
+ * Optionally associate this outbound number with an org in one step (only with supports_outbound).
60
+ * @type {string}
61
+ * @memberof PhoneNumberCreate
62
+ */
63
+ outbound_organization_id?: string;
58
64
  }
59
65
 
60
66
  /**
@@ -81,6 +87,7 @@ export function PhoneNumberCreateFromJSONTyped(json: any, ignoreDiscriminator: b
81
87
  'sip_address': json['sip_address'] == null ? undefined : json['sip_address'],
82
88
  'auth_username': json['auth_username'] == null ? undefined : json['auth_username'],
83
89
  'auth_password': json['auth_password'] == null ? undefined : json['auth_password'],
90
+ 'outbound_organization_id': json['outbound_organization_id'] == null ? undefined : json['outbound_organization_id'],
84
91
  };
85
92
  }
86
93
 
@@ -101,6 +108,7 @@ export function PhoneNumberCreateToJSONTyped(value?: PhoneNumberCreate | null, i
101
108
  'sip_address': value['sip_address'],
102
109
  'auth_username': value['auth_username'],
103
110
  'auth_password': value['auth_password'],
111
+ 'outbound_organization_id': value['outbound_organization_id'],
104
112
  };
105
113
  }
106
114
 
@@ -3,7 +3,6 @@
3
3
  export * from './AdminDispatchRuleCreate';
4
4
  export * from './AdminGrantMinutesRequest';
5
5
  export * from './AdminPhoneNumberAssign';
6
- export * from './AdminPhoneNumberAssignOutbound';
7
6
  export * from './AdminPhoneNumberDetail';
8
7
  export * from './AdminPhoneNumberUpdate';
9
8
  export * from './AdminPhoneNumbersListResponse';