ultracart_rest_api_v2_typescript 4.1.149 → 4.1.151
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/.openapi-generator/FILES +4 -0
- package/README.md +4 -2
- package/dist/apis/ConversationApi.d.ts +61 -1
- package/dist/apis/ConversationApi.js +129 -0
- package/dist/models/ConversationAgentTestSessionJoinRequest.d.ts +31 -0
- package/dist/models/ConversationAgentTestSessionJoinRequest.js +50 -0
- package/dist/models/ConversationAgentTestSessionRequest.d.ts +49 -0
- package/dist/models/ConversationAgentTestSessionRequest.js +56 -0
- package/dist/models/ConversationAgentTestSessionResponse.d.ts +77 -0
- package/dist/models/ConversationAgentTestSessionResponse.js +68 -0
- package/dist/models/ConversationCustomerAuth.d.ts +67 -0
- package/dist/models/ConversationCustomerAuth.js +62 -0
- package/dist/models/index.d.ts +4 -0
- package/dist/models/index.js +4 -0
- package/package.json +1 -1
- package/src/apis/ConversationApi.ts +154 -0
- package/src/models/ConversationAgentTestSessionJoinRequest.ts +67 -0
- package/src/models/ConversationAgentTestSessionRequest.ts +91 -0
- package/src/models/ConversationAgentTestSessionResponse.ts +148 -0
- package/src/models/ConversationCustomerAuth.ts +115 -0
- package/src/models/index.ts +4 -0
package/.openapi-generator/FILES
CHANGED
|
@@ -206,6 +206,9 @@ src/models/ConversationAgentStatusRollupSearchRequest.ts
|
|
|
206
206
|
src/models/ConversationAgentStatusRollupSearchResponse.ts
|
|
207
207
|
src/models/ConversationAgentStatusSummaryResponse.ts
|
|
208
208
|
src/models/ConversationAgentStatusTimelineResponse.ts
|
|
209
|
+
src/models/ConversationAgentTestSessionJoinRequest.ts
|
|
210
|
+
src/models/ConversationAgentTestSessionRequest.ts
|
|
211
|
+
src/models/ConversationAgentTestSessionResponse.ts
|
|
209
212
|
src/models/ConversationAutocompleteRequest.ts
|
|
210
213
|
src/models/ConversationAutocompleteResponse.ts
|
|
211
214
|
src/models/ConversationAutocompleteValue.ts
|
|
@@ -213,6 +216,7 @@ src/models/ConversationCannedMessage.ts
|
|
|
213
216
|
src/models/ConversationCannedMessageResponse.ts
|
|
214
217
|
src/models/ConversationCannedMessagesResponse.ts
|
|
215
218
|
src/models/ConversationCannedMessagesSearch.ts
|
|
219
|
+
src/models/ConversationCustomerAuth.ts
|
|
216
220
|
src/models/ConversationDeleteKnowledgeBaseDocumentResponse.ts
|
|
217
221
|
src/models/ConversationDepartment.ts
|
|
218
222
|
src/models/ConversationDepartmentMember.ts
|
package/README.md
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
# UltraCart Typescript SDK
|
|
2
|
-
## ultracart_rest_api_v2_typescript@4.1.
|
|
2
|
+
## ultracart_rest_api_v2_typescript@4.1.151
|
|
3
3
|
|
|
4
4
|
Every API method call has a sample for every language SDK. See https://github.com/UltraCart/sdk_samples
|
|
5
5
|
|
|
6
6
|
Installation
|
|
7
7
|
|
|
8
8
|
```
|
|
9
|
-
npm install ultracart_rest_api_v2_typescript@4.1.
|
|
9
|
+
npm install ultracart_rest_api_v2_typescript@4.1.151 --save
|
|
10
10
|
```
|
|
11
11
|
|
|
12
12
|
```typescript
|
|
@@ -85,6 +85,8 @@ Not every change is committed to every SDK.
|
|
|
85
85
|
|
|
86
86
|
| Version | Date | Comments |
|
|
87
87
|
| --: | :-: | --- |
|
|
88
|
+
| 4.1.151 | 09/04/2026 | conversations - added ai agent capabilities |
|
|
89
|
+
| 4.1.150 | 09/04/2026 | conversations - add ai agent capabilities |
|
|
88
90
|
| 4.1.149 | 09/04/2026 | conversations - added ai agent capabilities |
|
|
89
91
|
| 4.1.148 | 09/04/2026 | conversations - added ai agent capabilities |
|
|
90
92
|
| 4.1.147 | 09/04/2026 | sfvb - internal testing |
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
12
|
import * as runtime from '../runtime';
|
|
13
|
-
import { BaseResponse, ConversationAgentAuthResponse, ConversationAgentProfile, ConversationAgentProfileResponse, ConversationAgentProfilesResponse, ConversationAgentStatusConfig, ConversationAgentStatusConfigResponse, ConversationAgentStatusConfigsResponse, ConversationAgentStatusHeatmapRequest, ConversationAgentStatusHeatmapResponse, ConversationAgentStatusHistorySearchRequest, ConversationAgentStatusHistorySearchResponse, ConversationAgentStatusRollupSearchRequest, ConversationAgentStatusRollupSearchResponse, ConversationAgentStatusSummaryResponse, ConversationAgentStatusTimelineResponse, ConversationAutocompleteRequest, ConversationAutocompleteResponse, ConversationCannedMessage, ConversationCannedMessageResponse, ConversationCannedMessagesResponse, ConversationCannedMessagesSearch, ConversationDeleteKnowledgeBaseDocumentResponse, ConversationDepartment, ConversationDepartmentMembersResponse, ConversationDepartmentResponse, ConversationDepartmentsResponse, ConversationEngagement, ConversationEngagementResponse, ConversationEngagementsResponse, ConversationInsertKnowledgeBaseDocumentRequest, ConversationInsertKnowledgeBaseDocumentResponse, ConversationJoinRequest, ConversationKnowledgeBaseDocumentUploadUrlResponse, ConversationKnowledgeBaseDocumentsResponse, ConversationLocationsResponse, ConversationMcpServer, ConversationMcpServerResponse, ConversationMcpServerToolsResponse, ConversationMcpServersResponse, ConversationMessagesResponse, ConversationMultimediaUploadUrlResponse, ConversationPbxAddress, ConversationPbxAddressResponse, ConversationPbxAddressesResponse, ConversationPbxAgent, ConversationPbxAgentResponse, ConversationPbxAgentsResponse, ConversationPbxAudio, ConversationPbxAudioResponse, ConversationPbxAudioUploadUrlResponse, ConversationPbxAudioUsageResponse, ConversationPbxAudiosResponse, ConversationPbxAvailablePhoneNumbersResponse, ConversationPbxCallResponse, ConversationPbxCallSearchRequest, ConversationPbxCallSearchResponse, ConversationPbxCallUpdateRequest, ConversationPbxClassOfService, ConversationPbxClassOfServiceResponse, ConversationPbxClassOfServicesResponse, ConversationPbxCosAuditLogsResponse, ConversationPbxCustomerSnapshotRequest, ConversationPbxCustomerSnapshotResponse, ConversationPbxDefaultTimezoneResponse, ConversationPbxDefaultTimezoneUpdateRequest, ConversationPbxHardwarePhone, ConversationPbxHardwarePhoneResponse, ConversationPbxHardwarePhonesResponse, ConversationPbxMenu, ConversationPbxMenuResponse, ConversationPbxMenusResponse, ConversationPbxPayConnectorsResponse, ConversationPbxPhoneManufacturersResponse, ConversationPbxPhoneNumber, ConversationPbxPhoneNumberPurchaseRequest, ConversationPbxPhoneNumberResponse, ConversationPbxPhoneNumbersResponse, ConversationPbxQueue, ConversationPbxQueueResponse, ConversationPbxQueuesResponse, ConversationPbxTimeBased, ConversationPbxTimeBasedResponse, ConversationPbxTimeBasedsResponse, ConversationPbxTimeRange, ConversationPbxTimeRangeResponse, ConversationPbxTimeRangesResponse, ConversationPbxVoicemailCapabilitiesResponse, ConversationPbxVoicemailMailbox, ConversationPbxVoicemailMailboxResponse, ConversationPbxVoicemailMailboxesResponse, ConversationPbxVoicemailMessageResponse, ConversationPbxVoicemailMessageSummariesResponse, ConversationPermissionsResponse, ConversationResponse, ConversationSearchRequest, ConversationSearchResponse, ConversationStartRequest, ConversationStartResponse, ConversationVirtualAgentBudget, ConversationVirtualAgentBudgetResponse, ConversationVirtualAgentCapabilities, ConversationVirtualAgentCapabilitiesResponse, ConversationWebchatContext, ConversationWebchatQueueStatusUpdateRequest, ConversationWebchatQueueStatusesResponse, ConversationsResponse, ItemResponse } from '../models';
|
|
13
|
+
import { BaseResponse, ConversationAgentAuthResponse, ConversationAgentProfile, ConversationAgentProfileResponse, ConversationAgentProfilesResponse, ConversationAgentStatusConfig, ConversationAgentStatusConfigResponse, ConversationAgentStatusConfigsResponse, ConversationAgentStatusHeatmapRequest, ConversationAgentStatusHeatmapResponse, ConversationAgentStatusHistorySearchRequest, ConversationAgentStatusHistorySearchResponse, ConversationAgentStatusRollupSearchRequest, ConversationAgentStatusRollupSearchResponse, ConversationAgentStatusSummaryResponse, ConversationAgentStatusTimelineResponse, ConversationAgentTestSessionJoinRequest, ConversationAgentTestSessionRequest, ConversationAgentTestSessionResponse, ConversationAutocompleteRequest, ConversationAutocompleteResponse, ConversationCannedMessage, ConversationCannedMessageResponse, ConversationCannedMessagesResponse, ConversationCannedMessagesSearch, ConversationDeleteKnowledgeBaseDocumentResponse, ConversationDepartment, ConversationDepartmentMembersResponse, ConversationDepartmentResponse, ConversationDepartmentsResponse, ConversationEngagement, ConversationEngagementResponse, ConversationEngagementsResponse, ConversationInsertKnowledgeBaseDocumentRequest, ConversationInsertKnowledgeBaseDocumentResponse, ConversationJoinRequest, ConversationKnowledgeBaseDocumentUploadUrlResponse, ConversationKnowledgeBaseDocumentsResponse, ConversationLocationsResponse, ConversationMcpServer, ConversationMcpServerResponse, ConversationMcpServerToolsResponse, ConversationMcpServersResponse, ConversationMessagesResponse, ConversationMultimediaUploadUrlResponse, ConversationPbxAddress, ConversationPbxAddressResponse, ConversationPbxAddressesResponse, ConversationPbxAgent, ConversationPbxAgentResponse, ConversationPbxAgentsResponse, ConversationPbxAudio, ConversationPbxAudioResponse, ConversationPbxAudioUploadUrlResponse, ConversationPbxAudioUsageResponse, ConversationPbxAudiosResponse, ConversationPbxAvailablePhoneNumbersResponse, ConversationPbxCallResponse, ConversationPbxCallSearchRequest, ConversationPbxCallSearchResponse, ConversationPbxCallUpdateRequest, ConversationPbxClassOfService, ConversationPbxClassOfServiceResponse, ConversationPbxClassOfServicesResponse, ConversationPbxCosAuditLogsResponse, ConversationPbxCustomerSnapshotRequest, ConversationPbxCustomerSnapshotResponse, ConversationPbxDefaultTimezoneResponse, ConversationPbxDefaultTimezoneUpdateRequest, ConversationPbxHardwarePhone, ConversationPbxHardwarePhoneResponse, ConversationPbxHardwarePhonesResponse, ConversationPbxMenu, ConversationPbxMenuResponse, ConversationPbxMenusResponse, ConversationPbxPayConnectorsResponse, ConversationPbxPhoneManufacturersResponse, ConversationPbxPhoneNumber, ConversationPbxPhoneNumberPurchaseRequest, ConversationPbxPhoneNumberResponse, ConversationPbxPhoneNumbersResponse, ConversationPbxQueue, ConversationPbxQueueResponse, ConversationPbxQueuesResponse, ConversationPbxTimeBased, ConversationPbxTimeBasedResponse, ConversationPbxTimeBasedsResponse, ConversationPbxTimeRange, ConversationPbxTimeRangeResponse, ConversationPbxTimeRangesResponse, ConversationPbxVoicemailCapabilitiesResponse, ConversationPbxVoicemailMailbox, ConversationPbxVoicemailMailboxResponse, ConversationPbxVoicemailMailboxesResponse, ConversationPbxVoicemailMessageResponse, ConversationPbxVoicemailMessageSummariesResponse, ConversationPermissionsResponse, ConversationResponse, ConversationSearchRequest, ConversationSearchResponse, ConversationStartRequest, ConversationStartResponse, ConversationVirtualAgentBudget, ConversationVirtualAgentBudgetResponse, ConversationVirtualAgentCapabilities, ConversationVirtualAgentCapabilitiesResponse, ConversationWebchatContext, ConversationWebchatQueueStatusUpdateRequest, ConversationWebchatQueueStatusesResponse, ConversationsResponse, ItemResponse } from '../models';
|
|
14
14
|
export interface DeleteAgentProfileKnowledgeBaseDocumentRequest {
|
|
15
15
|
userId: number;
|
|
16
16
|
documentUuid: string;
|
|
@@ -252,6 +252,11 @@ export interface InsertPbxVoicemailMailboxRequest {
|
|
|
252
252
|
export interface InsertUserPbxAudioRequest {
|
|
253
253
|
pbxAudio: ConversationPbxAudio;
|
|
254
254
|
}
|
|
255
|
+
export interface JoinAgentTestSessionRequest {
|
|
256
|
+
userId: number;
|
|
257
|
+
conversationUuid: string;
|
|
258
|
+
joinRequest: ConversationAgentTestSessionJoinRequest;
|
|
259
|
+
}
|
|
255
260
|
export interface JoinConversationRequest {
|
|
256
261
|
conversationUuid: string;
|
|
257
262
|
joinRequest?: ConversationJoinRequest;
|
|
@@ -311,6 +316,10 @@ export interface SearchPbxCallsRequest {
|
|
|
311
316
|
export interface SmsUnsubscribeConversationRequest {
|
|
312
317
|
conversationUuid: string;
|
|
313
318
|
}
|
|
319
|
+
export interface StartAgentTestSessionRequest {
|
|
320
|
+
userId: number;
|
|
321
|
+
testSessionRequest: ConversationAgentTestSessionRequest;
|
|
322
|
+
}
|
|
314
323
|
export interface StartConversationRequest {
|
|
315
324
|
startRequest: ConversationStartRequest;
|
|
316
325
|
}
|
|
@@ -1846,6 +1855,22 @@ export interface ConversationApiInterface {
|
|
|
1846
1855
|
* Insert user pbx audio
|
|
1847
1856
|
*/
|
|
1848
1857
|
insertUserPbxAudio(requestParameters: InsertUserPbxAudioRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ConversationPbxAudioResponse>;
|
|
1858
|
+
/**
|
|
1859
|
+
* Joins the simulated customer to the conversation the agent opened for a test session. This mirrors what the storefront webchat widget does after an agent picks up its queue entry, and it is what gives the conversation a customer participant. Requires a logged in user with conversations admin; an API key or OAuth application cannot call this.
|
|
1860
|
+
* @summary Join a test conversation as the simulated customer
|
|
1861
|
+
* @param {number} userId
|
|
1862
|
+
* @param {string} conversationUuid
|
|
1863
|
+
* @param {ConversationAgentTestSessionJoinRequest} joinRequest Test session join request
|
|
1864
|
+
* @param {*} [options] Override http request option.
|
|
1865
|
+
* @throws {RequiredError}
|
|
1866
|
+
* @memberof ConversationApiInterface
|
|
1867
|
+
*/
|
|
1868
|
+
joinAgentTestSessionRaw(requestParameters: JoinAgentTestSessionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
|
|
1869
|
+
/**
|
|
1870
|
+
* Joins the simulated customer to the conversation the agent opened for a test session. This mirrors what the storefront webchat widget does after an agent picks up its queue entry, and it is what gives the conversation a customer participant. Requires a logged in user with conversations admin; an API key or OAuth application cannot call this.
|
|
1871
|
+
* Join a test conversation as the simulated customer
|
|
1872
|
+
*/
|
|
1873
|
+
joinAgentTestSession(requestParameters: JoinAgentTestSessionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
1849
1874
|
/**
|
|
1850
1875
|
* Join a conversation
|
|
1851
1876
|
* @summary Join a conversation
|
|
@@ -2070,6 +2095,21 @@ export interface ConversationApiInterface {
|
|
|
2070
2095
|
* Unsubscribe any SMS participants in this conversation
|
|
2071
2096
|
*/
|
|
2072
2097
|
smsUnsubscribeConversation(requestParameters: SmsUnsubscribeConversationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
2098
|
+
/**
|
|
2099
|
+
* Opens a webchat conversation against this specific AI agent as if the given customer had started it from the storefront, so the agent can be tried out before it is put in front of anyone. The session runs against live data: the cart is real, the customer is real, and anything the agent does during the conversation actually happens. Requires a logged in user with conversations admin; an API key or OAuth application cannot call this.
|
|
2100
|
+
* @summary Start a test conversation with this AI agent
|
|
2101
|
+
* @param {number} userId
|
|
2102
|
+
* @param {ConversationAgentTestSessionRequest} testSessionRequest Test session request
|
|
2103
|
+
* @param {*} [options] Override http request option.
|
|
2104
|
+
* @throws {RequiredError}
|
|
2105
|
+
* @memberof ConversationApiInterface
|
|
2106
|
+
*/
|
|
2107
|
+
startAgentTestSessionRaw(requestParameters: StartAgentTestSessionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ConversationAgentTestSessionResponse>>;
|
|
2108
|
+
/**
|
|
2109
|
+
* Opens a webchat conversation against this specific AI agent as if the given customer had started it from the storefront, so the agent can be tried out before it is put in front of anyone. The session runs against live data: the cart is real, the customer is real, and anything the agent does during the conversation actually happens. Requires a logged in user with conversations admin; an API key or OAuth application cannot call this.
|
|
2110
|
+
* Start a test conversation with this AI agent
|
|
2111
|
+
*/
|
|
2112
|
+
startAgentTestSession(requestParameters: StartAgentTestSessionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ConversationAgentTestSessionResponse>;
|
|
2073
2113
|
/**
|
|
2074
2114
|
* Start a new conversation
|
|
2075
2115
|
* @summary Start a conversation
|
|
@@ -3461,6 +3501,16 @@ export declare class ConversationApi extends runtime.BaseAPI implements Conversa
|
|
|
3461
3501
|
* Insert user pbx audio
|
|
3462
3502
|
*/
|
|
3463
3503
|
insertUserPbxAudio(requestParameters: InsertUserPbxAudioRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ConversationPbxAudioResponse>;
|
|
3504
|
+
/**
|
|
3505
|
+
* Joins the simulated customer to the conversation the agent opened for a test session. This mirrors what the storefront webchat widget does after an agent picks up its queue entry, and it is what gives the conversation a customer participant. Requires a logged in user with conversations admin; an API key or OAuth application cannot call this.
|
|
3506
|
+
* Join a test conversation as the simulated customer
|
|
3507
|
+
*/
|
|
3508
|
+
joinAgentTestSessionRaw(requestParameters: JoinAgentTestSessionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
|
|
3509
|
+
/**
|
|
3510
|
+
* Joins the simulated customer to the conversation the agent opened for a test session. This mirrors what the storefront webchat widget does after an agent picks up its queue entry, and it is what gives the conversation a customer participant. Requires a logged in user with conversations admin; an API key or OAuth application cannot call this.
|
|
3511
|
+
* Join a test conversation as the simulated customer
|
|
3512
|
+
*/
|
|
3513
|
+
joinAgentTestSession(requestParameters: JoinAgentTestSessionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
3464
3514
|
/**
|
|
3465
3515
|
* Join a conversation
|
|
3466
3516
|
* Join a conversation
|
|
@@ -3611,6 +3661,16 @@ export declare class ConversationApi extends runtime.BaseAPI implements Conversa
|
|
|
3611
3661
|
* Unsubscribe any SMS participants in this conversation
|
|
3612
3662
|
*/
|
|
3613
3663
|
smsUnsubscribeConversation(requestParameters: SmsUnsubscribeConversationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
3664
|
+
/**
|
|
3665
|
+
* Opens a webchat conversation against this specific AI agent as if the given customer had started it from the storefront, so the agent can be tried out before it is put in front of anyone. The session runs against live data: the cart is real, the customer is real, and anything the agent does during the conversation actually happens. Requires a logged in user with conversations admin; an API key or OAuth application cannot call this.
|
|
3666
|
+
* Start a test conversation with this AI agent
|
|
3667
|
+
*/
|
|
3668
|
+
startAgentTestSessionRaw(requestParameters: StartAgentTestSessionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ConversationAgentTestSessionResponse>>;
|
|
3669
|
+
/**
|
|
3670
|
+
* Opens a webchat conversation against this specific AI agent as if the given customer had started it from the storefront, so the agent can be tried out before it is put in front of anyone. The session runs against live data: the cart is real, the customer is real, and anything the agent does during the conversation actually happens. Requires a logged in user with conversations admin; an API key or OAuth application cannot call this.
|
|
3671
|
+
* Start a test conversation with this AI agent
|
|
3672
|
+
*/
|
|
3673
|
+
startAgentTestSession(requestParameters: StartAgentTestSessionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ConversationAgentTestSessionResponse>;
|
|
3614
3674
|
/**
|
|
3615
3675
|
* Start a new conversation
|
|
3616
3676
|
* Start a conversation
|
|
@@ -6167,6 +6167,71 @@ var ConversationApi = /** @class */ (function (_super) {
|
|
|
6167
6167
|
});
|
|
6168
6168
|
});
|
|
6169
6169
|
};
|
|
6170
|
+
/**
|
|
6171
|
+
* Joins the simulated customer to the conversation the agent opened for a test session. This mirrors what the storefront webchat widget does after an agent picks up its queue entry, and it is what gives the conversation a customer participant. Requires a logged in user with conversations admin; an API key or OAuth application cannot call this.
|
|
6172
|
+
* Join a test conversation as the simulated customer
|
|
6173
|
+
*/
|
|
6174
|
+
ConversationApi.prototype.joinAgentTestSessionRaw = function (requestParameters, initOverrides) {
|
|
6175
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
6176
|
+
var queryParameters, headerParameters, _a, _b, response;
|
|
6177
|
+
return __generator(this, function (_c) {
|
|
6178
|
+
switch (_c.label) {
|
|
6179
|
+
case 0:
|
|
6180
|
+
if (requestParameters.userId === null || requestParameters.userId === undefined) {
|
|
6181
|
+
throw new runtime.RequiredError('userId', 'Required parameter requestParameters.userId was null or undefined when calling joinAgentTestSession.');
|
|
6182
|
+
}
|
|
6183
|
+
if (requestParameters.conversationUuid === null || requestParameters.conversationUuid === undefined) {
|
|
6184
|
+
throw new runtime.RequiredError('conversationUuid', 'Required parameter requestParameters.conversationUuid was null or undefined when calling joinAgentTestSession.');
|
|
6185
|
+
}
|
|
6186
|
+
if (requestParameters.joinRequest === null || requestParameters.joinRequest === undefined) {
|
|
6187
|
+
throw new runtime.RequiredError('joinRequest', 'Required parameter requestParameters.joinRequest was null or undefined when calling joinAgentTestSession.');
|
|
6188
|
+
}
|
|
6189
|
+
queryParameters = {};
|
|
6190
|
+
headerParameters = {};
|
|
6191
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
6192
|
+
if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 2];
|
|
6193
|
+
// oauth required
|
|
6194
|
+
_a = headerParameters;
|
|
6195
|
+
_b = "Authorization";
|
|
6196
|
+
return [4 /*yield*/, this.configuration.accessToken("ultraCartOauth", ["conversation_write"])];
|
|
6197
|
+
case 1:
|
|
6198
|
+
// oauth required
|
|
6199
|
+
_a[_b] = _c.sent();
|
|
6200
|
+
_c.label = 2;
|
|
6201
|
+
case 2:
|
|
6202
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
6203
|
+
headerParameters["x-ultracart-simple-key"] = this.configuration.apiKey("x-ultracart-simple-key"); // ultraCartSimpleApiKey authentication
|
|
6204
|
+
}
|
|
6205
|
+
return [4 /*yield*/, this.request({
|
|
6206
|
+
path: "/conversation/agent/profiles/{user_id}/test_session/{conversation_uuid}/join".replace("{".concat("user_id", "}"), encodeURIComponent(String(requestParameters.userId))).replace("{".concat("conversation_uuid", "}"), encodeURIComponent(String(requestParameters.conversationUuid))),
|
|
6207
|
+
method: 'PUT',
|
|
6208
|
+
headers: headerParameters,
|
|
6209
|
+
query: queryParameters,
|
|
6210
|
+
body: (0, models_1.ConversationAgentTestSessionJoinRequestToJSON)(requestParameters.joinRequest),
|
|
6211
|
+
}, initOverrides)];
|
|
6212
|
+
case 3:
|
|
6213
|
+
response = _c.sent();
|
|
6214
|
+
return [2 /*return*/, new runtime.VoidApiResponse(response)];
|
|
6215
|
+
}
|
|
6216
|
+
});
|
|
6217
|
+
});
|
|
6218
|
+
};
|
|
6219
|
+
/**
|
|
6220
|
+
* Joins the simulated customer to the conversation the agent opened for a test session. This mirrors what the storefront webchat widget does after an agent picks up its queue entry, and it is what gives the conversation a customer participant. Requires a logged in user with conversations admin; an API key or OAuth application cannot call this.
|
|
6221
|
+
* Join a test conversation as the simulated customer
|
|
6222
|
+
*/
|
|
6223
|
+
ConversationApi.prototype.joinAgentTestSession = function (requestParameters, initOverrides) {
|
|
6224
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
6225
|
+
return __generator(this, function (_a) {
|
|
6226
|
+
switch (_a.label) {
|
|
6227
|
+
case 0: return [4 /*yield*/, this.joinAgentTestSessionRaw(requestParameters, initOverrides)];
|
|
6228
|
+
case 1:
|
|
6229
|
+
_a.sent();
|
|
6230
|
+
return [2 /*return*/];
|
|
6231
|
+
}
|
|
6232
|
+
});
|
|
6233
|
+
});
|
|
6234
|
+
};
|
|
6170
6235
|
/**
|
|
6171
6236
|
* Join a conversation
|
|
6172
6237
|
* Join a conversation
|
|
@@ -7094,6 +7159,70 @@ var ConversationApi = /** @class */ (function (_super) {
|
|
|
7094
7159
|
});
|
|
7095
7160
|
});
|
|
7096
7161
|
};
|
|
7162
|
+
/**
|
|
7163
|
+
* Opens a webchat conversation against this specific AI agent as if the given customer had started it from the storefront, so the agent can be tried out before it is put in front of anyone. The session runs against live data: the cart is real, the customer is real, and anything the agent does during the conversation actually happens. Requires a logged in user with conversations admin; an API key or OAuth application cannot call this.
|
|
7164
|
+
* Start a test conversation with this AI agent
|
|
7165
|
+
*/
|
|
7166
|
+
ConversationApi.prototype.startAgentTestSessionRaw = function (requestParameters, initOverrides) {
|
|
7167
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
7168
|
+
var queryParameters, headerParameters, _a, _b, response;
|
|
7169
|
+
return __generator(this, function (_c) {
|
|
7170
|
+
switch (_c.label) {
|
|
7171
|
+
case 0:
|
|
7172
|
+
if (requestParameters.userId === null || requestParameters.userId === undefined) {
|
|
7173
|
+
throw new runtime.RequiredError('userId', 'Required parameter requestParameters.userId was null or undefined when calling startAgentTestSession.');
|
|
7174
|
+
}
|
|
7175
|
+
if (requestParameters.testSessionRequest === null || requestParameters.testSessionRequest === undefined) {
|
|
7176
|
+
throw new runtime.RequiredError('testSessionRequest', 'Required parameter requestParameters.testSessionRequest was null or undefined when calling startAgentTestSession.');
|
|
7177
|
+
}
|
|
7178
|
+
queryParameters = {};
|
|
7179
|
+
headerParameters = {};
|
|
7180
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
7181
|
+
if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 2];
|
|
7182
|
+
// oauth required
|
|
7183
|
+
_a = headerParameters;
|
|
7184
|
+
_b = "Authorization";
|
|
7185
|
+
return [4 /*yield*/, this.configuration.accessToken("ultraCartOauth", ["conversation_write"])];
|
|
7186
|
+
case 1:
|
|
7187
|
+
// oauth required
|
|
7188
|
+
_a[_b] = _c.sent();
|
|
7189
|
+
_c.label = 2;
|
|
7190
|
+
case 2:
|
|
7191
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
7192
|
+
headerParameters["x-ultracart-simple-key"] = this.configuration.apiKey("x-ultracart-simple-key"); // ultraCartSimpleApiKey authentication
|
|
7193
|
+
}
|
|
7194
|
+
return [4 /*yield*/, this.request({
|
|
7195
|
+
path: "/conversation/agent/profiles/{user_id}/test_session".replace("{".concat("user_id", "}"), encodeURIComponent(String(requestParameters.userId))),
|
|
7196
|
+
method: 'PUT',
|
|
7197
|
+
headers: headerParameters,
|
|
7198
|
+
query: queryParameters,
|
|
7199
|
+
body: (0, models_1.ConversationAgentTestSessionRequestToJSON)(requestParameters.testSessionRequest),
|
|
7200
|
+
}, initOverrides)];
|
|
7201
|
+
case 3:
|
|
7202
|
+
response = _c.sent();
|
|
7203
|
+
return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, models_1.ConversationAgentTestSessionResponseFromJSON)(jsonValue); })];
|
|
7204
|
+
}
|
|
7205
|
+
});
|
|
7206
|
+
});
|
|
7207
|
+
};
|
|
7208
|
+
/**
|
|
7209
|
+
* Opens a webchat conversation against this specific AI agent as if the given customer had started it from the storefront, so the agent can be tried out before it is put in front of anyone. The session runs against live data: the cart is real, the customer is real, and anything the agent does during the conversation actually happens. Requires a logged in user with conversations admin; an API key or OAuth application cannot call this.
|
|
7210
|
+
* Start a test conversation with this AI agent
|
|
7211
|
+
*/
|
|
7212
|
+
ConversationApi.prototype.startAgentTestSession = function (requestParameters, initOverrides) {
|
|
7213
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
7214
|
+
var response;
|
|
7215
|
+
return __generator(this, function (_a) {
|
|
7216
|
+
switch (_a.label) {
|
|
7217
|
+
case 0: return [4 /*yield*/, this.startAgentTestSessionRaw(requestParameters, initOverrides)];
|
|
7218
|
+
case 1:
|
|
7219
|
+
response = _a.sent();
|
|
7220
|
+
return [4 /*yield*/, response.value()];
|
|
7221
|
+
case 2: return [2 /*return*/, _a.sent()];
|
|
7222
|
+
}
|
|
7223
|
+
});
|
|
7224
|
+
});
|
|
7225
|
+
};
|
|
7097
7226
|
/**
|
|
7098
7227
|
* Start a new conversation
|
|
7099
7228
|
* Start a conversation
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* UltraCart Rest API V2
|
|
3
|
+
* UltraCart REST API Version 2
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 2.0.0
|
|
6
|
+
* Contact: support@ultracart.com
|
|
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
|
+
/**
|
|
13
|
+
*
|
|
14
|
+
* @export
|
|
15
|
+
* @interface ConversationAgentTestSessionJoinRequest
|
|
16
|
+
*/
|
|
17
|
+
export interface ConversationAgentTestSessionJoinRequest {
|
|
18
|
+
/**
|
|
19
|
+
* Queue entry uuid returned when the test session was started
|
|
20
|
+
* @type {string}
|
|
21
|
+
* @memberof ConversationAgentTestSessionJoinRequest
|
|
22
|
+
*/
|
|
23
|
+
conversation_webchat_queue_uuid?: string;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Check if a given object implements the ConversationAgentTestSessionJoinRequest interface.
|
|
27
|
+
*/
|
|
28
|
+
export declare function instanceOfConversationAgentTestSessionJoinRequest(value: object): boolean;
|
|
29
|
+
export declare function ConversationAgentTestSessionJoinRequestFromJSON(json: any): ConversationAgentTestSessionJoinRequest;
|
|
30
|
+
export declare function ConversationAgentTestSessionJoinRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): ConversationAgentTestSessionJoinRequest;
|
|
31
|
+
export declare function ConversationAgentTestSessionJoinRequestToJSON(value?: ConversationAgentTestSessionJoinRequest | null): any;
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* UltraCart Rest API V2
|
|
6
|
+
* UltraCart REST API Version 2
|
|
7
|
+
*
|
|
8
|
+
* The version of the OpenAPI document: 2.0.0
|
|
9
|
+
* Contact: support@ultracart.com
|
|
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
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.ConversationAgentTestSessionJoinRequestToJSON = exports.ConversationAgentTestSessionJoinRequestFromJSONTyped = exports.ConversationAgentTestSessionJoinRequestFromJSON = exports.instanceOfConversationAgentTestSessionJoinRequest = void 0;
|
|
17
|
+
var runtime_1 = require("../runtime");
|
|
18
|
+
/**
|
|
19
|
+
* Check if a given object implements the ConversationAgentTestSessionJoinRequest interface.
|
|
20
|
+
*/
|
|
21
|
+
function instanceOfConversationAgentTestSessionJoinRequest(value) {
|
|
22
|
+
var isInstance = true;
|
|
23
|
+
return isInstance;
|
|
24
|
+
}
|
|
25
|
+
exports.instanceOfConversationAgentTestSessionJoinRequest = instanceOfConversationAgentTestSessionJoinRequest;
|
|
26
|
+
function ConversationAgentTestSessionJoinRequestFromJSON(json) {
|
|
27
|
+
return ConversationAgentTestSessionJoinRequestFromJSONTyped(json, false);
|
|
28
|
+
}
|
|
29
|
+
exports.ConversationAgentTestSessionJoinRequestFromJSON = ConversationAgentTestSessionJoinRequestFromJSON;
|
|
30
|
+
function ConversationAgentTestSessionJoinRequestFromJSONTyped(json, ignoreDiscriminator) {
|
|
31
|
+
if ((json === undefined) || (json === null)) {
|
|
32
|
+
return json;
|
|
33
|
+
}
|
|
34
|
+
return {
|
|
35
|
+
'conversation_webchat_queue_uuid': !(0, runtime_1.exists)(json, 'conversation_webchat_queue_uuid') ? undefined : json['conversation_webchat_queue_uuid'],
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
exports.ConversationAgentTestSessionJoinRequestFromJSONTyped = ConversationAgentTestSessionJoinRequestFromJSONTyped;
|
|
39
|
+
function ConversationAgentTestSessionJoinRequestToJSON(value) {
|
|
40
|
+
if (value === undefined) {
|
|
41
|
+
return undefined;
|
|
42
|
+
}
|
|
43
|
+
if (value === null) {
|
|
44
|
+
return null;
|
|
45
|
+
}
|
|
46
|
+
return {
|
|
47
|
+
'conversation_webchat_queue_uuid': value.conversation_webchat_queue_uuid,
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
exports.ConversationAgentTestSessionJoinRequestToJSON = ConversationAgentTestSessionJoinRequestToJSON;
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* UltraCart Rest API V2
|
|
3
|
+
* UltraCart REST API Version 2
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 2.0.0
|
|
6
|
+
* Contact: support@ultracart.com
|
|
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
|
+
/**
|
|
13
|
+
*
|
|
14
|
+
* @export
|
|
15
|
+
* @interface ConversationAgentTestSessionRequest
|
|
16
|
+
*/
|
|
17
|
+
export interface ConversationAgentTestSessionRequest {
|
|
18
|
+
/**
|
|
19
|
+
* Customer profile to converse as. The cart is established as a soft login for this customer, so the agent sees their real order history.
|
|
20
|
+
* @type {number}
|
|
21
|
+
* @memberof ConversationAgentTestSessionRequest
|
|
22
|
+
*/
|
|
23
|
+
customer_profile_oid?: number;
|
|
24
|
+
/**
|
|
25
|
+
* Optional opening question, the same way a customer types one before joining the queue.
|
|
26
|
+
* @type {string}
|
|
27
|
+
* @memberof ConversationAgentTestSessionRequest
|
|
28
|
+
*/
|
|
29
|
+
question?: string;
|
|
30
|
+
/**
|
|
31
|
+
* Webchat queue to join. The agent is selected explicitly, so this does not have to be a queue the agent is assigned to.
|
|
32
|
+
* @type {string}
|
|
33
|
+
* @memberof ConversationAgentTestSessionRequest
|
|
34
|
+
*/
|
|
35
|
+
queue_name?: string;
|
|
36
|
+
/**
|
|
37
|
+
* Host name of the storefront to test against, with no protocol prefix. Determines which catalog the agent searches.
|
|
38
|
+
* @type {string}
|
|
39
|
+
* @memberof ConversationAgentTestSessionRequest
|
|
40
|
+
*/
|
|
41
|
+
storefront_host_name?: string;
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Check if a given object implements the ConversationAgentTestSessionRequest interface.
|
|
45
|
+
*/
|
|
46
|
+
export declare function instanceOfConversationAgentTestSessionRequest(value: object): boolean;
|
|
47
|
+
export declare function ConversationAgentTestSessionRequestFromJSON(json: any): ConversationAgentTestSessionRequest;
|
|
48
|
+
export declare function ConversationAgentTestSessionRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): ConversationAgentTestSessionRequest;
|
|
49
|
+
export declare function ConversationAgentTestSessionRequestToJSON(value?: ConversationAgentTestSessionRequest | null): any;
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* UltraCart Rest API V2
|
|
6
|
+
* UltraCart REST API Version 2
|
|
7
|
+
*
|
|
8
|
+
* The version of the OpenAPI document: 2.0.0
|
|
9
|
+
* Contact: support@ultracart.com
|
|
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
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.ConversationAgentTestSessionRequestToJSON = exports.ConversationAgentTestSessionRequestFromJSONTyped = exports.ConversationAgentTestSessionRequestFromJSON = exports.instanceOfConversationAgentTestSessionRequest = void 0;
|
|
17
|
+
var runtime_1 = require("../runtime");
|
|
18
|
+
/**
|
|
19
|
+
* Check if a given object implements the ConversationAgentTestSessionRequest interface.
|
|
20
|
+
*/
|
|
21
|
+
function instanceOfConversationAgentTestSessionRequest(value) {
|
|
22
|
+
var isInstance = true;
|
|
23
|
+
return isInstance;
|
|
24
|
+
}
|
|
25
|
+
exports.instanceOfConversationAgentTestSessionRequest = instanceOfConversationAgentTestSessionRequest;
|
|
26
|
+
function ConversationAgentTestSessionRequestFromJSON(json) {
|
|
27
|
+
return ConversationAgentTestSessionRequestFromJSONTyped(json, false);
|
|
28
|
+
}
|
|
29
|
+
exports.ConversationAgentTestSessionRequestFromJSON = ConversationAgentTestSessionRequestFromJSON;
|
|
30
|
+
function ConversationAgentTestSessionRequestFromJSONTyped(json, ignoreDiscriminator) {
|
|
31
|
+
if ((json === undefined) || (json === null)) {
|
|
32
|
+
return json;
|
|
33
|
+
}
|
|
34
|
+
return {
|
|
35
|
+
'customer_profile_oid': !(0, runtime_1.exists)(json, 'customer_profile_oid') ? undefined : json['customer_profile_oid'],
|
|
36
|
+
'question': !(0, runtime_1.exists)(json, 'question') ? undefined : json['question'],
|
|
37
|
+
'queue_name': !(0, runtime_1.exists)(json, 'queue_name') ? undefined : json['queue_name'],
|
|
38
|
+
'storefront_host_name': !(0, runtime_1.exists)(json, 'storefront_host_name') ? undefined : json['storefront_host_name'],
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
exports.ConversationAgentTestSessionRequestFromJSONTyped = ConversationAgentTestSessionRequestFromJSONTyped;
|
|
42
|
+
function ConversationAgentTestSessionRequestToJSON(value) {
|
|
43
|
+
if (value === undefined) {
|
|
44
|
+
return undefined;
|
|
45
|
+
}
|
|
46
|
+
if (value === null) {
|
|
47
|
+
return null;
|
|
48
|
+
}
|
|
49
|
+
return {
|
|
50
|
+
'customer_profile_oid': value.customer_profile_oid,
|
|
51
|
+
'question': value.question,
|
|
52
|
+
'queue_name': value.queue_name,
|
|
53
|
+
'storefront_host_name': value.storefront_host_name,
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
exports.ConversationAgentTestSessionRequestToJSON = ConversationAgentTestSessionRequestToJSON;
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* UltraCart Rest API V2
|
|
3
|
+
* UltraCart REST API Version 2
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 2.0.0
|
|
6
|
+
* Contact: support@ultracart.com
|
|
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 { ConversationCustomerAuth } from './ConversationCustomerAuth';
|
|
13
|
+
import { ModelError } from './ModelError';
|
|
14
|
+
import { ResponseMetadata } from './ResponseMetadata';
|
|
15
|
+
import { Warning } from './Warning';
|
|
16
|
+
/**
|
|
17
|
+
*
|
|
18
|
+
* @export
|
|
19
|
+
* @interface ConversationAgentTestSessionResponse
|
|
20
|
+
*/
|
|
21
|
+
export interface ConversationAgentTestSessionResponse {
|
|
22
|
+
/**
|
|
23
|
+
* Cart established for this session, soft logged in as the chosen customer profile. Real, and anything the agent adds to it persists.
|
|
24
|
+
* @type {string}
|
|
25
|
+
* @memberof ConversationAgentTestSessionResponse
|
|
26
|
+
*/
|
|
27
|
+
cart_id?: string;
|
|
28
|
+
/**
|
|
29
|
+
* Queue entry created for this session
|
|
30
|
+
* @type {string}
|
|
31
|
+
* @memberof ConversationAgentTestSessionResponse
|
|
32
|
+
*/
|
|
33
|
+
conversation_webchat_queue_uuid?: string;
|
|
34
|
+
/**
|
|
35
|
+
*
|
|
36
|
+
* @type {ConversationCustomerAuth}
|
|
37
|
+
* @memberof ConversationAgentTestSessionResponse
|
|
38
|
+
*/
|
|
39
|
+
customer_auth?: ConversationCustomerAuth;
|
|
40
|
+
/**
|
|
41
|
+
*
|
|
42
|
+
* @type {ModelError}
|
|
43
|
+
* @memberof ConversationAgentTestSessionResponse
|
|
44
|
+
*/
|
|
45
|
+
error?: ModelError;
|
|
46
|
+
/**
|
|
47
|
+
*
|
|
48
|
+
* @type {ResponseMetadata}
|
|
49
|
+
* @memberof ConversationAgentTestSessionResponse
|
|
50
|
+
*/
|
|
51
|
+
metadata?: ResponseMetadata;
|
|
52
|
+
/**
|
|
53
|
+
* Storefront the session is running against
|
|
54
|
+
* @type {string}
|
|
55
|
+
* @memberof ConversationAgentTestSessionResponse
|
|
56
|
+
*/
|
|
57
|
+
storefront_host_name?: string;
|
|
58
|
+
/**
|
|
59
|
+
*
|
|
60
|
+
* @type {boolean}
|
|
61
|
+
* @memberof ConversationAgentTestSessionResponse
|
|
62
|
+
*/
|
|
63
|
+
success?: boolean;
|
|
64
|
+
/**
|
|
65
|
+
*
|
|
66
|
+
* @type {Warning}
|
|
67
|
+
* @memberof ConversationAgentTestSessionResponse
|
|
68
|
+
*/
|
|
69
|
+
warning?: Warning;
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* Check if a given object implements the ConversationAgentTestSessionResponse interface.
|
|
73
|
+
*/
|
|
74
|
+
export declare function instanceOfConversationAgentTestSessionResponse(value: object): boolean;
|
|
75
|
+
export declare function ConversationAgentTestSessionResponseFromJSON(json: any): ConversationAgentTestSessionResponse;
|
|
76
|
+
export declare function ConversationAgentTestSessionResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ConversationAgentTestSessionResponse;
|
|
77
|
+
export declare function ConversationAgentTestSessionResponseToJSON(value?: ConversationAgentTestSessionResponse | null): any;
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* UltraCart Rest API V2
|
|
6
|
+
* UltraCart REST API Version 2
|
|
7
|
+
*
|
|
8
|
+
* The version of the OpenAPI document: 2.0.0
|
|
9
|
+
* Contact: support@ultracart.com
|
|
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
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.ConversationAgentTestSessionResponseToJSON = exports.ConversationAgentTestSessionResponseFromJSONTyped = exports.ConversationAgentTestSessionResponseFromJSON = exports.instanceOfConversationAgentTestSessionResponse = void 0;
|
|
17
|
+
var runtime_1 = require("../runtime");
|
|
18
|
+
var ConversationCustomerAuth_1 = require("./ConversationCustomerAuth");
|
|
19
|
+
var ModelError_1 = require("./ModelError");
|
|
20
|
+
var ResponseMetadata_1 = require("./ResponseMetadata");
|
|
21
|
+
var Warning_1 = require("./Warning");
|
|
22
|
+
/**
|
|
23
|
+
* Check if a given object implements the ConversationAgentTestSessionResponse interface.
|
|
24
|
+
*/
|
|
25
|
+
function instanceOfConversationAgentTestSessionResponse(value) {
|
|
26
|
+
var isInstance = true;
|
|
27
|
+
return isInstance;
|
|
28
|
+
}
|
|
29
|
+
exports.instanceOfConversationAgentTestSessionResponse = instanceOfConversationAgentTestSessionResponse;
|
|
30
|
+
function ConversationAgentTestSessionResponseFromJSON(json) {
|
|
31
|
+
return ConversationAgentTestSessionResponseFromJSONTyped(json, false);
|
|
32
|
+
}
|
|
33
|
+
exports.ConversationAgentTestSessionResponseFromJSON = ConversationAgentTestSessionResponseFromJSON;
|
|
34
|
+
function ConversationAgentTestSessionResponseFromJSONTyped(json, ignoreDiscriminator) {
|
|
35
|
+
if ((json === undefined) || (json === null)) {
|
|
36
|
+
return json;
|
|
37
|
+
}
|
|
38
|
+
return {
|
|
39
|
+
'cart_id': !(0, runtime_1.exists)(json, 'cart_id') ? undefined : json['cart_id'],
|
|
40
|
+
'conversation_webchat_queue_uuid': !(0, runtime_1.exists)(json, 'conversation_webchat_queue_uuid') ? undefined : json['conversation_webchat_queue_uuid'],
|
|
41
|
+
'customer_auth': !(0, runtime_1.exists)(json, 'customer_auth') ? undefined : (0, ConversationCustomerAuth_1.ConversationCustomerAuthFromJSON)(json['customer_auth']),
|
|
42
|
+
'error': !(0, runtime_1.exists)(json, 'error') ? undefined : (0, ModelError_1.ModelErrorFromJSON)(json['error']),
|
|
43
|
+
'metadata': !(0, runtime_1.exists)(json, 'metadata') ? undefined : (0, ResponseMetadata_1.ResponseMetadataFromJSON)(json['metadata']),
|
|
44
|
+
'storefront_host_name': !(0, runtime_1.exists)(json, 'storefront_host_name') ? undefined : json['storefront_host_name'],
|
|
45
|
+
'success': !(0, runtime_1.exists)(json, 'success') ? undefined : json['success'],
|
|
46
|
+
'warning': !(0, runtime_1.exists)(json, 'warning') ? undefined : (0, Warning_1.WarningFromJSON)(json['warning']),
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
exports.ConversationAgentTestSessionResponseFromJSONTyped = ConversationAgentTestSessionResponseFromJSONTyped;
|
|
50
|
+
function ConversationAgentTestSessionResponseToJSON(value) {
|
|
51
|
+
if (value === undefined) {
|
|
52
|
+
return undefined;
|
|
53
|
+
}
|
|
54
|
+
if (value === null) {
|
|
55
|
+
return null;
|
|
56
|
+
}
|
|
57
|
+
return {
|
|
58
|
+
'cart_id': value.cart_id,
|
|
59
|
+
'conversation_webchat_queue_uuid': value.conversation_webchat_queue_uuid,
|
|
60
|
+
'customer_auth': (0, ConversationCustomerAuth_1.ConversationCustomerAuthToJSON)(value.customer_auth),
|
|
61
|
+
'error': (0, ModelError_1.ModelErrorToJSON)(value.error),
|
|
62
|
+
'metadata': (0, ResponseMetadata_1.ResponseMetadataToJSON)(value.metadata),
|
|
63
|
+
'storefront_host_name': value.storefront_host_name,
|
|
64
|
+
'success': value.success,
|
|
65
|
+
'warning': (0, Warning_1.WarningToJSON)(value.warning),
|
|
66
|
+
};
|
|
67
|
+
}
|
|
68
|
+
exports.ConversationAgentTestSessionResponseToJSON = ConversationAgentTestSessionResponseToJSON;
|