@l7mp/tivadar-ai-api-sdk 0.2.11 → 0.2.13
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 +18 -1
- package/dist/api-client.js +11 -0
- package/dist/apis/AdminSubscriptionsApi.d.ts +3 -3
- package/dist/apis/AdminSubscriptionsApi.js +3 -2
- package/dist/apis/CallFlagsApi.d.ts +133 -0
- package/dist/apis/CallFlagsApi.js +376 -0
- package/dist/apis/index.d.ts +1 -0
- package/dist/apis/index.js +1 -0
- package/dist/esm/api-client.d.ts +18 -1
- package/dist/esm/api-client.js +11 -0
- package/dist/esm/apis/AdminSubscriptionsApi.d.ts +3 -3
- package/dist/esm/apis/AdminSubscriptionsApi.js +4 -3
- package/dist/esm/apis/CallFlagsApi.d.ts +133 -0
- package/dist/esm/apis/CallFlagsApi.js +372 -0
- package/dist/esm/apis/index.d.ts +1 -0
- package/dist/esm/apis/index.js +1 -0
- package/dist/esm/models/AdminSubscriptionsListResponse.d.ts +39 -0
- package/dist/esm/models/AdminSubscriptionsListResponse.js +48 -0
- package/dist/esm/models/Call.d.ts +7 -0
- package/dist/esm/models/Call.js +3 -0
- package/dist/esm/models/CallFlag.d.ts +110 -0
- package/dist/esm/models/CallFlag.js +89 -0
- package/dist/esm/models/CallFlagCreate.d.ts +48 -0
- package/dist/esm/models/CallFlagCreate.js +54 -0
- package/dist/esm/models/CallFlagResolve.d.ts +32 -0
- package/dist/esm/models/CallFlagResolve.js +41 -0
- package/dist/esm/models/CallFlagUpdate.d.ts +48 -0
- package/dist/esm/models/CallFlagUpdate.js +52 -0
- package/dist/esm/models/CallFlagWithCall.d.ts +117 -0
- package/dist/esm/models/CallFlagWithCall.js +92 -0
- package/dist/esm/models/CallFlagWithCallAllOfCall.d.ts +56 -0
- package/dist/esm/models/CallFlagWithCallAllOfCall.js +49 -0
- package/dist/esm/models/VoiceAgent.d.ts +12 -0
- package/dist/esm/models/VoiceAgent.js +4 -0
- package/dist/esm/models/VoiceAgentCreate.d.ts +12 -0
- package/dist/esm/models/VoiceAgentCreate.js +4 -0
- package/dist/esm/models/VoiceAgentMetadata.d.ts +8 -0
- package/dist/esm/models/VoiceAgentMetadata.js +2 -0
- package/dist/esm/models/VoiceAgentUpdate.d.ts +12 -0
- package/dist/esm/models/VoiceAgentUpdate.js +4 -0
- package/dist/esm/models/VoiceAgentWithSipTrunks.d.ts +12 -0
- package/dist/esm/models/VoiceAgentWithSipTrunks.js +4 -0
- package/dist/esm/models/index.d.ts +7 -0
- package/dist/esm/models/index.js +7 -0
- package/dist/models/AdminSubscriptionsListResponse.d.ts +39 -0
- package/dist/models/AdminSubscriptionsListResponse.js +55 -0
- package/dist/models/Call.d.ts +7 -0
- package/dist/models/Call.js +3 -0
- package/dist/models/CallFlag.d.ts +110 -0
- package/dist/models/CallFlag.js +97 -0
- package/dist/models/CallFlagCreate.d.ts +48 -0
- package/dist/models/CallFlagCreate.js +62 -0
- package/dist/models/CallFlagResolve.d.ts +32 -0
- package/dist/models/CallFlagResolve.js +48 -0
- package/dist/models/CallFlagUpdate.d.ts +48 -0
- package/dist/models/CallFlagUpdate.js +60 -0
- package/dist/models/CallFlagWithCall.d.ts +117 -0
- package/dist/models/CallFlagWithCall.js +100 -0
- package/dist/models/CallFlagWithCallAllOfCall.d.ts +56 -0
- package/dist/models/CallFlagWithCallAllOfCall.js +56 -0
- package/dist/models/VoiceAgent.d.ts +12 -0
- package/dist/models/VoiceAgent.js +4 -0
- package/dist/models/VoiceAgentCreate.d.ts +12 -0
- package/dist/models/VoiceAgentCreate.js +4 -0
- package/dist/models/VoiceAgentMetadata.d.ts +8 -0
- package/dist/models/VoiceAgentMetadata.js +2 -0
- package/dist/models/VoiceAgentUpdate.d.ts +12 -0
- package/dist/models/VoiceAgentUpdate.js +4 -0
- package/dist/models/VoiceAgentWithSipTrunks.d.ts +12 -0
- package/dist/models/VoiceAgentWithSipTrunks.js +4 -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 +29 -0
- package/src/apis/AdminSubscriptionsApi.ts +8 -4
- package/src/apis/CallFlagsApi.ts +546 -0
- package/src/apis/index.ts +1 -0
- package/src/models/AdminSubscriptionsListResponse.ts +83 -0
- package/src/models/Call.ts +16 -0
- package/src/models/CallFlag.ts +173 -0
- package/src/models/CallFlagCreate.ts +87 -0
- package/src/models/CallFlagResolve.ts +65 -0
- package/src/models/CallFlagUpdate.ts +86 -0
- package/src/models/CallFlagWithCall.ts +189 -0
- package/src/models/CallFlagWithCallAllOfCall.ts +97 -0
- package/src/models/VoiceAgent.ts +16 -0
- package/src/models/VoiceAgentCreate.ts +16 -0
- package/src/models/VoiceAgentMetadata.ts +8 -0
- package/src/models/VoiceAgentUpdate.ts +16 -0
- package/src/models/VoiceAgentWithSipTrunks.ts +16 -0
- package/src/models/index.ts +7 -0
package/dist/api-client.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { CallsApi, type OrganizationsOrganizationIdCallsGetSandboxEnum } from "./apis/CallsApi";
|
|
2
|
+
import { CallFlagsApi, type OrganizationsOrganizationIdCallFlagsGetStatusEnum, type OrganizationsOrganizationIdCallFlagsGetFlagTypeEnum } from "./apis/CallFlagsApi";
|
|
2
3
|
import { CalendarApi } from "./apis/CalendarApi";
|
|
3
4
|
import { ChatAgentsApi } from "./apis/ChatAgentsApi";
|
|
4
5
|
import { HistoryApi } from "./apis/HistoryApi";
|
|
@@ -21,7 +22,7 @@ import { VoiceUsageApi } from "./apis/VoiceUsageApi";
|
|
|
21
22
|
import { VoiceAgentsApi } from "./apis/VoiceAgentsApi";
|
|
22
23
|
import { ToolsApi } from "./apis/ToolsApi";
|
|
23
24
|
import { PhonebookApi } from "./apis/PhonebookApi";
|
|
24
|
-
import type { CallCreate, CallUpdate, 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, VoiceUsageReportRequest, UserPreferencesUpdate, AgentToolUpsert, PhonebookUpdate, PhonebookEntryCreate, PhonebookEntryUpdate } from "./models";
|
|
25
|
+
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, VoiceUsageReportRequest, UserPreferencesUpdate, AgentToolUpsert, PhonebookUpdate, PhonebookEntryCreate, PhonebookEntryUpdate } from "./models";
|
|
25
26
|
export interface ApiClientConfig {
|
|
26
27
|
baseUrl: string;
|
|
27
28
|
options?: {
|
|
@@ -36,6 +37,21 @@ export declare class Api {
|
|
|
36
37
|
update: (organizationId: string, callId: string, callUpdate: CallUpdate, options?: RequestInit) => ReturnType<CallsApi["organizationsOrganizationIdCallsCallIdPut"]>;
|
|
37
38
|
delete: (organizationId: string, callId: string, options?: RequestInit) => ReturnType<CallsApi["organizationsOrganizationIdCallsCallIdDelete"]>;
|
|
38
39
|
};
|
|
40
|
+
readonly callFlags: {
|
|
41
|
+
list: (organizationId: string, filters?: {
|
|
42
|
+
status?: OrganizationsOrganizationIdCallFlagsGetStatusEnum;
|
|
43
|
+
flagType?: OrganizationsOrganizationIdCallFlagsGetFlagTypeEnum;
|
|
44
|
+
voiceAgentId?: string;
|
|
45
|
+
limit?: number;
|
|
46
|
+
offset?: number;
|
|
47
|
+
}, options?: RequestInit) => ReturnType<CallFlagsApi["organizationsOrganizationIdCallFlagsGet"]>;
|
|
48
|
+
listForCall: (organizationId: string, callId: string, options?: RequestInit) => ReturnType<CallFlagsApi["organizationsOrganizationIdCallsCallIdFlagsGet"]>;
|
|
49
|
+
create: (organizationId: string, callId: string, callFlagCreate: CallFlagCreate, options?: RequestInit) => ReturnType<CallFlagsApi["organizationsOrganizationIdCallsCallIdFlagsPost"]>;
|
|
50
|
+
update: (organizationId: string, callId: string, flagId: string, callFlagUpdate: CallFlagUpdate, options?: RequestInit) => ReturnType<CallFlagsApi["organizationsOrganizationIdCallsCallIdFlagsFlagIdPatch"]>;
|
|
51
|
+
resolve: (organizationId: string, callId: string, flagId: string, callFlagResolve?: CallFlagResolve, options?: RequestInit) => ReturnType<CallFlagsApi["organizationsOrganizationIdCallsCallIdFlagsFlagIdResolvePost"]>;
|
|
52
|
+
reopen: (organizationId: string, callId: string, flagId: string, options?: RequestInit) => ReturnType<CallFlagsApi["organizationsOrganizationIdCallsCallIdFlagsFlagIdReopenPost"]>;
|
|
53
|
+
delete: (organizationId: string, callId: string, flagId: string, options?: RequestInit) => ReturnType<CallFlagsApi["organizationsOrganizationIdCallsCallIdFlagsFlagIdDelete"]>;
|
|
54
|
+
};
|
|
39
55
|
readonly voiceAgents: {
|
|
40
56
|
list: (organizationId: string, options?: RequestInit) => ReturnType<VoiceAgentsApi["organizationsOrganizationIdVoiceAgentsGet"]>;
|
|
41
57
|
listBasic: (organizationId: string, options?: RequestInit) => ReturnType<VoiceAgentsApi["organizationsOrganizationIdVoiceAgentsBasicGet"]>;
|
|
@@ -200,6 +216,7 @@ export declare class Api {
|
|
|
200
216
|
};
|
|
201
217
|
};
|
|
202
218
|
private readonly callsApi;
|
|
219
|
+
private readonly callFlagsApi;
|
|
203
220
|
private readonly voiceAgentsApi;
|
|
204
221
|
private readonly chatAgentsApi;
|
|
205
222
|
private readonly calendarApi;
|
package/dist/api-client.js
CHANGED
|
@@ -11,6 +11,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.Api = void 0;
|
|
13
13
|
const CallsApi_1 = require("./apis/CallsApi");
|
|
14
|
+
const CallFlagsApi_1 = require("./apis/CallFlagsApi");
|
|
14
15
|
const CalendarApi_1 = require("./apis/CalendarApi");
|
|
15
16
|
const ChatAgentsApi_1 = require("./apis/ChatAgentsApi");
|
|
16
17
|
const HistoryApi_1 = require("./apis/HistoryApi");
|
|
@@ -58,6 +59,7 @@ class Api {
|
|
|
58
59
|
headers: this._auth.headers,
|
|
59
60
|
});
|
|
60
61
|
this.callsApi = new CallsApi_1.CallsApi(configuration);
|
|
62
|
+
this.callFlagsApi = new CallFlagsApi_1.CallFlagsApi(configuration);
|
|
61
63
|
this.voiceAgentsApi = new VoiceAgentsApi_1.VoiceAgentsApi(configuration);
|
|
62
64
|
this.chatAgentsApi = new ChatAgentsApi_1.ChatAgentsApi(configuration);
|
|
63
65
|
this.calendarApi = new CalendarApi_1.CalendarApi(configuration);
|
|
@@ -87,6 +89,15 @@ class Api {
|
|
|
87
89
|
update: (organizationId, callId, callUpdate, options) => this.callsApi.organizationsOrganizationIdCallsCallIdPut({ organizationId, callId, callUpdate }, options),
|
|
88
90
|
delete: (organizationId, callId, options) => this.callsApi.organizationsOrganizationIdCallsCallIdDelete({ organizationId, callId }, options),
|
|
89
91
|
};
|
|
92
|
+
this.callFlags = {
|
|
93
|
+
list: (organizationId, filters, options) => this.callFlagsApi.organizationsOrganizationIdCallFlagsGet({ organizationId, status: filters === null || filters === void 0 ? void 0 : filters.status, flagType: filters === null || filters === void 0 ? void 0 : filters.flagType, voiceAgentId: filters === null || filters === void 0 ? void 0 : filters.voiceAgentId, limit: filters === null || filters === void 0 ? void 0 : filters.limit, offset: filters === null || filters === void 0 ? void 0 : filters.offset }, options),
|
|
94
|
+
listForCall: (organizationId, callId, options) => this.callFlagsApi.organizationsOrganizationIdCallsCallIdFlagsGet({ organizationId, callId }, options),
|
|
95
|
+
create: (organizationId, callId, callFlagCreate, options) => this.callFlagsApi.organizationsOrganizationIdCallsCallIdFlagsPost({ organizationId, callId, callFlagCreate }, options),
|
|
96
|
+
update: (organizationId, callId, flagId, callFlagUpdate, options) => this.callFlagsApi.organizationsOrganizationIdCallsCallIdFlagsFlagIdPatch({ organizationId, callId, flagId, callFlagUpdate }, options),
|
|
97
|
+
resolve: (organizationId, callId, flagId, callFlagResolve, options) => this.callFlagsApi.organizationsOrganizationIdCallsCallIdFlagsFlagIdResolvePost({ organizationId, callId, flagId, callFlagResolve }, options),
|
|
98
|
+
reopen: (organizationId, callId, flagId, options) => this.callFlagsApi.organizationsOrganizationIdCallsCallIdFlagsFlagIdReopenPost({ organizationId, callId, flagId }, options),
|
|
99
|
+
delete: (organizationId, callId, flagId, options) => this.callFlagsApi.organizationsOrganizationIdCallsCallIdFlagsFlagIdDelete({ organizationId, callId, flagId }, options),
|
|
100
|
+
};
|
|
90
101
|
this.voiceAgents = {
|
|
91
102
|
list: (organizationId, options) => this.voiceAgentsApi.organizationsOrganizationIdVoiceAgentsGet({ organizationId }, options),
|
|
92
103
|
listBasic: (organizationId, options) => this.voiceAgentsApi.organizationsOrganizationIdVoiceAgentsBasicGet({ organizationId }, 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 { AdminGrantMinutesRequest, AdminSetSubscriptionRequest, CancelSubscriptionRequest, SubscriptionStatus } from '../models/index';
|
|
13
|
+
import type { AdminGrantMinutesRequest, AdminSetSubscriptionRequest, AdminSubscriptionsListResponse, CancelSubscriptionRequest, SubscriptionStatus } from '../models/index';
|
|
14
14
|
export interface AdminSubscriptionsGetRequest {
|
|
15
15
|
status?: string;
|
|
16
16
|
planSlug?: string;
|
|
@@ -40,11 +40,11 @@ export declare class AdminSubscriptionsApi extends runtime.BaseAPI {
|
|
|
40
40
|
/**
|
|
41
41
|
* List subscriptions across all organizations (app-admin only)
|
|
42
42
|
*/
|
|
43
|
-
adminSubscriptionsGetRaw(requestParameters: AdminSubscriptionsGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<
|
|
43
|
+
adminSubscriptionsGetRaw(requestParameters: AdminSubscriptionsGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AdminSubscriptionsListResponse>>;
|
|
44
44
|
/**
|
|
45
45
|
* List subscriptions across all organizations (app-admin only)
|
|
46
46
|
*/
|
|
47
|
-
adminSubscriptionsGet(requestParameters?: AdminSubscriptionsGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<
|
|
47
|
+
adminSubscriptionsGet(requestParameters?: AdminSubscriptionsGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AdminSubscriptionsListResponse>;
|
|
48
48
|
/**
|
|
49
49
|
* Force-cancel an organization\'s subscription (app-admin only)
|
|
50
50
|
*/
|
|
@@ -65,7 +65,7 @@ class AdminSubscriptionsApi extends runtime.BaseAPI {
|
|
|
65
65
|
headers: headerParameters,
|
|
66
66
|
query: queryParameters,
|
|
67
67
|
}, initOverrides);
|
|
68
|
-
return new runtime.
|
|
68
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.AdminSubscriptionsListResponseFromJSON)(jsonValue));
|
|
69
69
|
});
|
|
70
70
|
}
|
|
71
71
|
/**
|
|
@@ -73,7 +73,8 @@ class AdminSubscriptionsApi extends runtime.BaseAPI {
|
|
|
73
73
|
*/
|
|
74
74
|
adminSubscriptionsGet() {
|
|
75
75
|
return __awaiter(this, arguments, void 0, function* (requestParameters = {}, initOverrides) {
|
|
76
|
-
yield this.adminSubscriptionsGetRaw(requestParameters, initOverrides);
|
|
76
|
+
const response = yield this.adminSubscriptionsGetRaw(requestParameters, initOverrides);
|
|
77
|
+
return yield response.value();
|
|
77
78
|
});
|
|
78
79
|
}
|
|
79
80
|
/**
|
|
@@ -0,0 +1,133 @@
|
|
|
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 { CallFlag, CallFlagCreate, CallFlagResolve, CallFlagUpdate, CallFlagWithCall } from '../models/index';
|
|
14
|
+
export interface OrganizationsOrganizationIdCallFlagsGetRequest {
|
|
15
|
+
organizationId: string;
|
|
16
|
+
status?: OrganizationsOrganizationIdCallFlagsGetStatusEnum;
|
|
17
|
+
flagType?: OrganizationsOrganizationIdCallFlagsGetFlagTypeEnum;
|
|
18
|
+
voiceAgentId?: string;
|
|
19
|
+
limit?: number;
|
|
20
|
+
offset?: number;
|
|
21
|
+
}
|
|
22
|
+
export interface OrganizationsOrganizationIdCallsCallIdFlagsFlagIdDeleteRequest {
|
|
23
|
+
organizationId: string;
|
|
24
|
+
callId: string;
|
|
25
|
+
flagId: string;
|
|
26
|
+
}
|
|
27
|
+
export interface OrganizationsOrganizationIdCallsCallIdFlagsFlagIdPatchRequest {
|
|
28
|
+
organizationId: string;
|
|
29
|
+
callId: string;
|
|
30
|
+
flagId: string;
|
|
31
|
+
callFlagUpdate: CallFlagUpdate;
|
|
32
|
+
}
|
|
33
|
+
export interface OrganizationsOrganizationIdCallsCallIdFlagsFlagIdReopenPostRequest {
|
|
34
|
+
organizationId: string;
|
|
35
|
+
callId: string;
|
|
36
|
+
flagId: string;
|
|
37
|
+
}
|
|
38
|
+
export interface OrganizationsOrganizationIdCallsCallIdFlagsFlagIdResolvePostRequest {
|
|
39
|
+
organizationId: string;
|
|
40
|
+
callId: string;
|
|
41
|
+
flagId: string;
|
|
42
|
+
callFlagResolve?: CallFlagResolve;
|
|
43
|
+
}
|
|
44
|
+
export interface OrganizationsOrganizationIdCallsCallIdFlagsGetRequest {
|
|
45
|
+
organizationId: string;
|
|
46
|
+
callId: string;
|
|
47
|
+
}
|
|
48
|
+
export interface OrganizationsOrganizationIdCallsCallIdFlagsPostRequest {
|
|
49
|
+
organizationId: string;
|
|
50
|
+
callId: string;
|
|
51
|
+
callFlagCreate: CallFlagCreate;
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
*
|
|
55
|
+
*/
|
|
56
|
+
export declare class CallFlagsApi extends runtime.BaseAPI {
|
|
57
|
+
/**
|
|
58
|
+
* Returns flags for all calls in the organization, each with a lightweight call summary. Useful for locating problematic calls that need follow-up or manual intervention.
|
|
59
|
+
* List call flags across the organization (triage view)
|
|
60
|
+
*/
|
|
61
|
+
organizationsOrganizationIdCallFlagsGetRaw(requestParameters: OrganizationsOrganizationIdCallFlagsGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<CallFlagWithCall>>>;
|
|
62
|
+
/**
|
|
63
|
+
* Returns flags for all calls in the organization, each with a lightweight call summary. Useful for locating problematic calls that need follow-up or manual intervention.
|
|
64
|
+
* List call flags across the organization (triage view)
|
|
65
|
+
*/
|
|
66
|
+
organizationsOrganizationIdCallFlagsGet(requestParameters: OrganizationsOrganizationIdCallFlagsGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<CallFlagWithCall>>;
|
|
67
|
+
/**
|
|
68
|
+
* Delete a flag
|
|
69
|
+
*/
|
|
70
|
+
organizationsOrganizationIdCallsCallIdFlagsFlagIdDeleteRaw(requestParameters: OrganizationsOrganizationIdCallsCallIdFlagsFlagIdDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
|
|
71
|
+
/**
|
|
72
|
+
* Delete a flag
|
|
73
|
+
*/
|
|
74
|
+
organizationsOrganizationIdCallsCallIdFlagsFlagIdDelete(requestParameters: OrganizationsOrganizationIdCallsCallIdFlagsFlagIdDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
75
|
+
/**
|
|
76
|
+
* Update a flag\'s type or reason
|
|
77
|
+
*/
|
|
78
|
+
organizationsOrganizationIdCallsCallIdFlagsFlagIdPatchRaw(requestParameters: OrganizationsOrganizationIdCallsCallIdFlagsFlagIdPatchRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<CallFlag>>;
|
|
79
|
+
/**
|
|
80
|
+
* Update a flag\'s type or reason
|
|
81
|
+
*/
|
|
82
|
+
organizationsOrganizationIdCallsCallIdFlagsFlagIdPatch(requestParameters: OrganizationsOrganizationIdCallsCallIdFlagsFlagIdPatchRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<CallFlag>;
|
|
83
|
+
/**
|
|
84
|
+
* Reopen a resolved flag
|
|
85
|
+
*/
|
|
86
|
+
organizationsOrganizationIdCallsCallIdFlagsFlagIdReopenPostRaw(requestParameters: OrganizationsOrganizationIdCallsCallIdFlagsFlagIdReopenPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<CallFlag>>;
|
|
87
|
+
/**
|
|
88
|
+
* Reopen a resolved flag
|
|
89
|
+
*/
|
|
90
|
+
organizationsOrganizationIdCallsCallIdFlagsFlagIdReopenPost(requestParameters: OrganizationsOrganizationIdCallsCallIdFlagsFlagIdReopenPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<CallFlag>;
|
|
91
|
+
/**
|
|
92
|
+
* Mark a flag resolved (preserves the original flag data)
|
|
93
|
+
*/
|
|
94
|
+
organizationsOrganizationIdCallsCallIdFlagsFlagIdResolvePostRaw(requestParameters: OrganizationsOrganizationIdCallsCallIdFlagsFlagIdResolvePostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<CallFlag>>;
|
|
95
|
+
/**
|
|
96
|
+
* Mark a flag resolved (preserves the original flag data)
|
|
97
|
+
*/
|
|
98
|
+
organizationsOrganizationIdCallsCallIdFlagsFlagIdResolvePost(requestParameters: OrganizationsOrganizationIdCallsCallIdFlagsFlagIdResolvePostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<CallFlag>;
|
|
99
|
+
/**
|
|
100
|
+
* List flags raised on a call
|
|
101
|
+
*/
|
|
102
|
+
organizationsOrganizationIdCallsCallIdFlagsGetRaw(requestParameters: OrganizationsOrganizationIdCallsCallIdFlagsGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<CallFlag>>>;
|
|
103
|
+
/**
|
|
104
|
+
* List flags raised on a call
|
|
105
|
+
*/
|
|
106
|
+
organizationsOrganizationIdCallsCallIdFlagsGet(requestParameters: OrganizationsOrganizationIdCallsCallIdFlagsGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<CallFlag>>;
|
|
107
|
+
/**
|
|
108
|
+
* Flag a call for follow-up or manual intervention
|
|
109
|
+
*/
|
|
110
|
+
organizationsOrganizationIdCallsCallIdFlagsPostRaw(requestParameters: OrganizationsOrganizationIdCallsCallIdFlagsPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<CallFlag>>;
|
|
111
|
+
/**
|
|
112
|
+
* Flag a call for follow-up or manual intervention
|
|
113
|
+
*/
|
|
114
|
+
organizationsOrganizationIdCallsCallIdFlagsPost(requestParameters: OrganizationsOrganizationIdCallsCallIdFlagsPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<CallFlag>;
|
|
115
|
+
}
|
|
116
|
+
/**
|
|
117
|
+
* @export
|
|
118
|
+
*/
|
|
119
|
+
export declare const OrganizationsOrganizationIdCallFlagsGetStatusEnum: {
|
|
120
|
+
readonly Open: "open";
|
|
121
|
+
readonly Resolved: "resolved";
|
|
122
|
+
};
|
|
123
|
+
export type OrganizationsOrganizationIdCallFlagsGetStatusEnum = typeof OrganizationsOrganizationIdCallFlagsGetStatusEnum[keyof typeof OrganizationsOrganizationIdCallFlagsGetStatusEnum];
|
|
124
|
+
/**
|
|
125
|
+
* @export
|
|
126
|
+
*/
|
|
127
|
+
export declare const OrganizationsOrganizationIdCallFlagsGetFlagTypeEnum: {
|
|
128
|
+
readonly Error: "error";
|
|
129
|
+
readonly FollowUp: "follow_up";
|
|
130
|
+
readonly ManualReview: "manual_review";
|
|
131
|
+
readonly Other: "other";
|
|
132
|
+
};
|
|
133
|
+
export type OrganizationsOrganizationIdCallFlagsGetFlagTypeEnum = typeof OrganizationsOrganizationIdCallFlagsGetFlagTypeEnum[keyof typeof OrganizationsOrganizationIdCallFlagsGetFlagTypeEnum];
|
|
@@ -0,0 +1,376 @@
|
|
|
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.OrganizationsOrganizationIdCallFlagsGetFlagTypeEnum = exports.OrganizationsOrganizationIdCallFlagsGetStatusEnum = exports.CallFlagsApi = void 0;
|
|
26
|
+
const runtime = require("../runtime");
|
|
27
|
+
const index_1 = require("../models/index");
|
|
28
|
+
/**
|
|
29
|
+
*
|
|
30
|
+
*/
|
|
31
|
+
class CallFlagsApi extends runtime.BaseAPI {
|
|
32
|
+
/**
|
|
33
|
+
* Returns flags for all calls in the organization, each with a lightweight call summary. Useful for locating problematic calls that need follow-up or manual intervention.
|
|
34
|
+
* List call flags across the organization (triage view)
|
|
35
|
+
*/
|
|
36
|
+
organizationsOrganizationIdCallFlagsGetRaw(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 organizationsOrganizationIdCallFlagsGet().');
|
|
40
|
+
}
|
|
41
|
+
const queryParameters = {};
|
|
42
|
+
if (requestParameters['status'] != null) {
|
|
43
|
+
queryParameters['status'] = requestParameters['status'];
|
|
44
|
+
}
|
|
45
|
+
if (requestParameters['flagType'] != null) {
|
|
46
|
+
queryParameters['flag_type'] = requestParameters['flagType'];
|
|
47
|
+
}
|
|
48
|
+
if (requestParameters['voiceAgentId'] != null) {
|
|
49
|
+
queryParameters['voice_agent_id'] = requestParameters['voiceAgentId'];
|
|
50
|
+
}
|
|
51
|
+
if (requestParameters['limit'] != null) {
|
|
52
|
+
queryParameters['limit'] = requestParameters['limit'];
|
|
53
|
+
}
|
|
54
|
+
if (requestParameters['offset'] != null) {
|
|
55
|
+
queryParameters['offset'] = requestParameters['offset'];
|
|
56
|
+
}
|
|
57
|
+
const headerParameters = {};
|
|
58
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
59
|
+
const token = this.configuration.accessToken;
|
|
60
|
+
const tokenString = yield token("bearerAuth", []);
|
|
61
|
+
if (tokenString) {
|
|
62
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
let urlPath = `/organizations/{organizationId}/call-flags`;
|
|
66
|
+
urlPath = urlPath.replace(`{${"organizationId"}}`, encodeURIComponent(String(requestParameters['organizationId'])));
|
|
67
|
+
const response = yield this.request({
|
|
68
|
+
path: urlPath,
|
|
69
|
+
method: 'GET',
|
|
70
|
+
headers: headerParameters,
|
|
71
|
+
query: queryParameters,
|
|
72
|
+
}, initOverrides);
|
|
73
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(index_1.CallFlagWithCallFromJSON));
|
|
74
|
+
});
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* Returns flags for all calls in the organization, each with a lightweight call summary. Useful for locating problematic calls that need follow-up or manual intervention.
|
|
78
|
+
* List call flags across the organization (triage view)
|
|
79
|
+
*/
|
|
80
|
+
organizationsOrganizationIdCallFlagsGet(requestParameters, initOverrides) {
|
|
81
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
82
|
+
const response = yield this.organizationsOrganizationIdCallFlagsGetRaw(requestParameters, initOverrides);
|
|
83
|
+
return yield response.value();
|
|
84
|
+
});
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* Delete a flag
|
|
88
|
+
*/
|
|
89
|
+
organizationsOrganizationIdCallsCallIdFlagsFlagIdDeleteRaw(requestParameters, initOverrides) {
|
|
90
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
91
|
+
if (requestParameters['organizationId'] == null) {
|
|
92
|
+
throw new runtime.RequiredError('organizationId', 'Required parameter "organizationId" was null or undefined when calling organizationsOrganizationIdCallsCallIdFlagsFlagIdDelete().');
|
|
93
|
+
}
|
|
94
|
+
if (requestParameters['callId'] == null) {
|
|
95
|
+
throw new runtime.RequiredError('callId', 'Required parameter "callId" was null or undefined when calling organizationsOrganizationIdCallsCallIdFlagsFlagIdDelete().');
|
|
96
|
+
}
|
|
97
|
+
if (requestParameters['flagId'] == null) {
|
|
98
|
+
throw new runtime.RequiredError('flagId', 'Required parameter "flagId" was null or undefined when calling organizationsOrganizationIdCallsCallIdFlagsFlagIdDelete().');
|
|
99
|
+
}
|
|
100
|
+
const queryParameters = {};
|
|
101
|
+
const headerParameters = {};
|
|
102
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
103
|
+
const token = this.configuration.accessToken;
|
|
104
|
+
const tokenString = yield token("bearerAuth", []);
|
|
105
|
+
if (tokenString) {
|
|
106
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
let urlPath = `/organizations/{organizationId}/calls/{callId}/flags/{flagId}`;
|
|
110
|
+
urlPath = urlPath.replace(`{${"organizationId"}}`, encodeURIComponent(String(requestParameters['organizationId'])));
|
|
111
|
+
urlPath = urlPath.replace(`{${"callId"}}`, encodeURIComponent(String(requestParameters['callId'])));
|
|
112
|
+
urlPath = urlPath.replace(`{${"flagId"}}`, encodeURIComponent(String(requestParameters['flagId'])));
|
|
113
|
+
const response = yield this.request({
|
|
114
|
+
path: urlPath,
|
|
115
|
+
method: 'DELETE',
|
|
116
|
+
headers: headerParameters,
|
|
117
|
+
query: queryParameters,
|
|
118
|
+
}, initOverrides);
|
|
119
|
+
return new runtime.VoidApiResponse(response);
|
|
120
|
+
});
|
|
121
|
+
}
|
|
122
|
+
/**
|
|
123
|
+
* Delete a flag
|
|
124
|
+
*/
|
|
125
|
+
organizationsOrganizationIdCallsCallIdFlagsFlagIdDelete(requestParameters, initOverrides) {
|
|
126
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
127
|
+
yield this.organizationsOrganizationIdCallsCallIdFlagsFlagIdDeleteRaw(requestParameters, initOverrides);
|
|
128
|
+
});
|
|
129
|
+
}
|
|
130
|
+
/**
|
|
131
|
+
* Update a flag\'s type or reason
|
|
132
|
+
*/
|
|
133
|
+
organizationsOrganizationIdCallsCallIdFlagsFlagIdPatchRaw(requestParameters, initOverrides) {
|
|
134
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
135
|
+
if (requestParameters['organizationId'] == null) {
|
|
136
|
+
throw new runtime.RequiredError('organizationId', 'Required parameter "organizationId" was null or undefined when calling organizationsOrganizationIdCallsCallIdFlagsFlagIdPatch().');
|
|
137
|
+
}
|
|
138
|
+
if (requestParameters['callId'] == null) {
|
|
139
|
+
throw new runtime.RequiredError('callId', 'Required parameter "callId" was null or undefined when calling organizationsOrganizationIdCallsCallIdFlagsFlagIdPatch().');
|
|
140
|
+
}
|
|
141
|
+
if (requestParameters['flagId'] == null) {
|
|
142
|
+
throw new runtime.RequiredError('flagId', 'Required parameter "flagId" was null or undefined when calling organizationsOrganizationIdCallsCallIdFlagsFlagIdPatch().');
|
|
143
|
+
}
|
|
144
|
+
if (requestParameters['callFlagUpdate'] == null) {
|
|
145
|
+
throw new runtime.RequiredError('callFlagUpdate', 'Required parameter "callFlagUpdate" was null or undefined when calling organizationsOrganizationIdCallsCallIdFlagsFlagIdPatch().');
|
|
146
|
+
}
|
|
147
|
+
const queryParameters = {};
|
|
148
|
+
const headerParameters = {};
|
|
149
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
150
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
151
|
+
const token = this.configuration.accessToken;
|
|
152
|
+
const tokenString = yield token("bearerAuth", []);
|
|
153
|
+
if (tokenString) {
|
|
154
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
let urlPath = `/organizations/{organizationId}/calls/{callId}/flags/{flagId}`;
|
|
158
|
+
urlPath = urlPath.replace(`{${"organizationId"}}`, encodeURIComponent(String(requestParameters['organizationId'])));
|
|
159
|
+
urlPath = urlPath.replace(`{${"callId"}}`, encodeURIComponent(String(requestParameters['callId'])));
|
|
160
|
+
urlPath = urlPath.replace(`{${"flagId"}}`, encodeURIComponent(String(requestParameters['flagId'])));
|
|
161
|
+
const response = yield this.request({
|
|
162
|
+
path: urlPath,
|
|
163
|
+
method: 'PATCH',
|
|
164
|
+
headers: headerParameters,
|
|
165
|
+
query: queryParameters,
|
|
166
|
+
body: (0, index_1.CallFlagUpdateToJSON)(requestParameters['callFlagUpdate']),
|
|
167
|
+
}, initOverrides);
|
|
168
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.CallFlagFromJSON)(jsonValue));
|
|
169
|
+
});
|
|
170
|
+
}
|
|
171
|
+
/**
|
|
172
|
+
* Update a flag\'s type or reason
|
|
173
|
+
*/
|
|
174
|
+
organizationsOrganizationIdCallsCallIdFlagsFlagIdPatch(requestParameters, initOverrides) {
|
|
175
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
176
|
+
const response = yield this.organizationsOrganizationIdCallsCallIdFlagsFlagIdPatchRaw(requestParameters, initOverrides);
|
|
177
|
+
return yield response.value();
|
|
178
|
+
});
|
|
179
|
+
}
|
|
180
|
+
/**
|
|
181
|
+
* Reopen a resolved flag
|
|
182
|
+
*/
|
|
183
|
+
organizationsOrganizationIdCallsCallIdFlagsFlagIdReopenPostRaw(requestParameters, initOverrides) {
|
|
184
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
185
|
+
if (requestParameters['organizationId'] == null) {
|
|
186
|
+
throw new runtime.RequiredError('organizationId', 'Required parameter "organizationId" was null or undefined when calling organizationsOrganizationIdCallsCallIdFlagsFlagIdReopenPost().');
|
|
187
|
+
}
|
|
188
|
+
if (requestParameters['callId'] == null) {
|
|
189
|
+
throw new runtime.RequiredError('callId', 'Required parameter "callId" was null or undefined when calling organizationsOrganizationIdCallsCallIdFlagsFlagIdReopenPost().');
|
|
190
|
+
}
|
|
191
|
+
if (requestParameters['flagId'] == null) {
|
|
192
|
+
throw new runtime.RequiredError('flagId', 'Required parameter "flagId" was null or undefined when calling organizationsOrganizationIdCallsCallIdFlagsFlagIdReopenPost().');
|
|
193
|
+
}
|
|
194
|
+
const queryParameters = {};
|
|
195
|
+
const headerParameters = {};
|
|
196
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
197
|
+
const token = this.configuration.accessToken;
|
|
198
|
+
const tokenString = yield token("bearerAuth", []);
|
|
199
|
+
if (tokenString) {
|
|
200
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
let urlPath = `/organizations/{organizationId}/calls/{callId}/flags/{flagId}/reopen`;
|
|
204
|
+
urlPath = urlPath.replace(`{${"organizationId"}}`, encodeURIComponent(String(requestParameters['organizationId'])));
|
|
205
|
+
urlPath = urlPath.replace(`{${"callId"}}`, encodeURIComponent(String(requestParameters['callId'])));
|
|
206
|
+
urlPath = urlPath.replace(`{${"flagId"}}`, encodeURIComponent(String(requestParameters['flagId'])));
|
|
207
|
+
const response = yield this.request({
|
|
208
|
+
path: urlPath,
|
|
209
|
+
method: 'POST',
|
|
210
|
+
headers: headerParameters,
|
|
211
|
+
query: queryParameters,
|
|
212
|
+
}, initOverrides);
|
|
213
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.CallFlagFromJSON)(jsonValue));
|
|
214
|
+
});
|
|
215
|
+
}
|
|
216
|
+
/**
|
|
217
|
+
* Reopen a resolved flag
|
|
218
|
+
*/
|
|
219
|
+
organizationsOrganizationIdCallsCallIdFlagsFlagIdReopenPost(requestParameters, initOverrides) {
|
|
220
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
221
|
+
const response = yield this.organizationsOrganizationIdCallsCallIdFlagsFlagIdReopenPostRaw(requestParameters, initOverrides);
|
|
222
|
+
return yield response.value();
|
|
223
|
+
});
|
|
224
|
+
}
|
|
225
|
+
/**
|
|
226
|
+
* Mark a flag resolved (preserves the original flag data)
|
|
227
|
+
*/
|
|
228
|
+
organizationsOrganizationIdCallsCallIdFlagsFlagIdResolvePostRaw(requestParameters, initOverrides) {
|
|
229
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
230
|
+
if (requestParameters['organizationId'] == null) {
|
|
231
|
+
throw new runtime.RequiredError('organizationId', 'Required parameter "organizationId" was null or undefined when calling organizationsOrganizationIdCallsCallIdFlagsFlagIdResolvePost().');
|
|
232
|
+
}
|
|
233
|
+
if (requestParameters['callId'] == null) {
|
|
234
|
+
throw new runtime.RequiredError('callId', 'Required parameter "callId" was null or undefined when calling organizationsOrganizationIdCallsCallIdFlagsFlagIdResolvePost().');
|
|
235
|
+
}
|
|
236
|
+
if (requestParameters['flagId'] == null) {
|
|
237
|
+
throw new runtime.RequiredError('flagId', 'Required parameter "flagId" was null or undefined when calling organizationsOrganizationIdCallsCallIdFlagsFlagIdResolvePost().');
|
|
238
|
+
}
|
|
239
|
+
const queryParameters = {};
|
|
240
|
+
const headerParameters = {};
|
|
241
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
242
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
243
|
+
const token = this.configuration.accessToken;
|
|
244
|
+
const tokenString = yield token("bearerAuth", []);
|
|
245
|
+
if (tokenString) {
|
|
246
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
247
|
+
}
|
|
248
|
+
}
|
|
249
|
+
let urlPath = `/organizations/{organizationId}/calls/{callId}/flags/{flagId}/resolve`;
|
|
250
|
+
urlPath = urlPath.replace(`{${"organizationId"}}`, encodeURIComponent(String(requestParameters['organizationId'])));
|
|
251
|
+
urlPath = urlPath.replace(`{${"callId"}}`, encodeURIComponent(String(requestParameters['callId'])));
|
|
252
|
+
urlPath = urlPath.replace(`{${"flagId"}}`, encodeURIComponent(String(requestParameters['flagId'])));
|
|
253
|
+
const response = yield this.request({
|
|
254
|
+
path: urlPath,
|
|
255
|
+
method: 'POST',
|
|
256
|
+
headers: headerParameters,
|
|
257
|
+
query: queryParameters,
|
|
258
|
+
body: (0, index_1.CallFlagResolveToJSON)(requestParameters['callFlagResolve']),
|
|
259
|
+
}, initOverrides);
|
|
260
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.CallFlagFromJSON)(jsonValue));
|
|
261
|
+
});
|
|
262
|
+
}
|
|
263
|
+
/**
|
|
264
|
+
* Mark a flag resolved (preserves the original flag data)
|
|
265
|
+
*/
|
|
266
|
+
organizationsOrganizationIdCallsCallIdFlagsFlagIdResolvePost(requestParameters, initOverrides) {
|
|
267
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
268
|
+
const response = yield this.organizationsOrganizationIdCallsCallIdFlagsFlagIdResolvePostRaw(requestParameters, initOverrides);
|
|
269
|
+
return yield response.value();
|
|
270
|
+
});
|
|
271
|
+
}
|
|
272
|
+
/**
|
|
273
|
+
* List flags raised on a call
|
|
274
|
+
*/
|
|
275
|
+
organizationsOrganizationIdCallsCallIdFlagsGetRaw(requestParameters, initOverrides) {
|
|
276
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
277
|
+
if (requestParameters['organizationId'] == null) {
|
|
278
|
+
throw new runtime.RequiredError('organizationId', 'Required parameter "organizationId" was null or undefined when calling organizationsOrganizationIdCallsCallIdFlagsGet().');
|
|
279
|
+
}
|
|
280
|
+
if (requestParameters['callId'] == null) {
|
|
281
|
+
throw new runtime.RequiredError('callId', 'Required parameter "callId" was null or undefined when calling organizationsOrganizationIdCallsCallIdFlagsGet().');
|
|
282
|
+
}
|
|
283
|
+
const queryParameters = {};
|
|
284
|
+
const headerParameters = {};
|
|
285
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
286
|
+
const token = this.configuration.accessToken;
|
|
287
|
+
const tokenString = yield token("bearerAuth", []);
|
|
288
|
+
if (tokenString) {
|
|
289
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
290
|
+
}
|
|
291
|
+
}
|
|
292
|
+
let urlPath = `/organizations/{organizationId}/calls/{callId}/flags`;
|
|
293
|
+
urlPath = urlPath.replace(`{${"organizationId"}}`, encodeURIComponent(String(requestParameters['organizationId'])));
|
|
294
|
+
urlPath = urlPath.replace(`{${"callId"}}`, encodeURIComponent(String(requestParameters['callId'])));
|
|
295
|
+
const response = yield this.request({
|
|
296
|
+
path: urlPath,
|
|
297
|
+
method: 'GET',
|
|
298
|
+
headers: headerParameters,
|
|
299
|
+
query: queryParameters,
|
|
300
|
+
}, initOverrides);
|
|
301
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(index_1.CallFlagFromJSON));
|
|
302
|
+
});
|
|
303
|
+
}
|
|
304
|
+
/**
|
|
305
|
+
* List flags raised on a call
|
|
306
|
+
*/
|
|
307
|
+
organizationsOrganizationIdCallsCallIdFlagsGet(requestParameters, initOverrides) {
|
|
308
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
309
|
+
const response = yield this.organizationsOrganizationIdCallsCallIdFlagsGetRaw(requestParameters, initOverrides);
|
|
310
|
+
return yield response.value();
|
|
311
|
+
});
|
|
312
|
+
}
|
|
313
|
+
/**
|
|
314
|
+
* Flag a call for follow-up or manual intervention
|
|
315
|
+
*/
|
|
316
|
+
organizationsOrganizationIdCallsCallIdFlagsPostRaw(requestParameters, initOverrides) {
|
|
317
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
318
|
+
if (requestParameters['organizationId'] == null) {
|
|
319
|
+
throw new runtime.RequiredError('organizationId', 'Required parameter "organizationId" was null or undefined when calling organizationsOrganizationIdCallsCallIdFlagsPost().');
|
|
320
|
+
}
|
|
321
|
+
if (requestParameters['callId'] == null) {
|
|
322
|
+
throw new runtime.RequiredError('callId', 'Required parameter "callId" was null or undefined when calling organizationsOrganizationIdCallsCallIdFlagsPost().');
|
|
323
|
+
}
|
|
324
|
+
if (requestParameters['callFlagCreate'] == null) {
|
|
325
|
+
throw new runtime.RequiredError('callFlagCreate', 'Required parameter "callFlagCreate" was null or undefined when calling organizationsOrganizationIdCallsCallIdFlagsPost().');
|
|
326
|
+
}
|
|
327
|
+
const queryParameters = {};
|
|
328
|
+
const headerParameters = {};
|
|
329
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
330
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
331
|
+
const token = this.configuration.accessToken;
|
|
332
|
+
const tokenString = yield token("bearerAuth", []);
|
|
333
|
+
if (tokenString) {
|
|
334
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
335
|
+
}
|
|
336
|
+
}
|
|
337
|
+
let urlPath = `/organizations/{organizationId}/calls/{callId}/flags`;
|
|
338
|
+
urlPath = urlPath.replace(`{${"organizationId"}}`, encodeURIComponent(String(requestParameters['organizationId'])));
|
|
339
|
+
urlPath = urlPath.replace(`{${"callId"}}`, encodeURIComponent(String(requestParameters['callId'])));
|
|
340
|
+
const response = yield this.request({
|
|
341
|
+
path: urlPath,
|
|
342
|
+
method: 'POST',
|
|
343
|
+
headers: headerParameters,
|
|
344
|
+
query: queryParameters,
|
|
345
|
+
body: (0, index_1.CallFlagCreateToJSON)(requestParameters['callFlagCreate']),
|
|
346
|
+
}, initOverrides);
|
|
347
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.CallFlagFromJSON)(jsonValue));
|
|
348
|
+
});
|
|
349
|
+
}
|
|
350
|
+
/**
|
|
351
|
+
* Flag a call for follow-up or manual intervention
|
|
352
|
+
*/
|
|
353
|
+
organizationsOrganizationIdCallsCallIdFlagsPost(requestParameters, initOverrides) {
|
|
354
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
355
|
+
const response = yield this.organizationsOrganizationIdCallsCallIdFlagsPostRaw(requestParameters, initOverrides);
|
|
356
|
+
return yield response.value();
|
|
357
|
+
});
|
|
358
|
+
}
|
|
359
|
+
}
|
|
360
|
+
exports.CallFlagsApi = CallFlagsApi;
|
|
361
|
+
/**
|
|
362
|
+
* @export
|
|
363
|
+
*/
|
|
364
|
+
exports.OrganizationsOrganizationIdCallFlagsGetStatusEnum = {
|
|
365
|
+
Open: 'open',
|
|
366
|
+
Resolved: 'resolved'
|
|
367
|
+
};
|
|
368
|
+
/**
|
|
369
|
+
* @export
|
|
370
|
+
*/
|
|
371
|
+
exports.OrganizationsOrganizationIdCallFlagsGetFlagTypeEnum = {
|
|
372
|
+
Error: 'error',
|
|
373
|
+
FollowUp: 'follow_up',
|
|
374
|
+
ManualReview: 'manual_review',
|
|
375
|
+
Other: 'other'
|
|
376
|
+
};
|
package/dist/apis/index.d.ts
CHANGED
package/dist/apis/index.js
CHANGED
|
@@ -18,6 +18,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
18
18
|
/* eslint-disable */
|
|
19
19
|
__exportStar(require("./AdminSubscriptionsApi"), exports);
|
|
20
20
|
__exportStar(require("./CalendarApi"), exports);
|
|
21
|
+
__exportStar(require("./CallFlagsApi"), exports);
|
|
21
22
|
__exportStar(require("./CallsApi"), exports);
|
|
22
23
|
__exportStar(require("./ChatAgentsApi"), exports);
|
|
23
24
|
__exportStar(require("./EmbeddingProvidersApi"), exports);
|