ultracart_rest_api_v2_typescript 4.1.9 → 4.1.11

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.
@@ -245,6 +245,8 @@ src/models/ConversationStartRequest.ts
245
245
  src/models/ConversationStartResponse.ts
246
246
  src/models/ConversationSummary.ts
247
247
  src/models/ConversationTwilioAccount.ts
248
+ src/models/ConversationVirtualAgentBudget.ts
249
+ src/models/ConversationVirtualAgentBudgetResponse.ts
248
250
  src/models/ConversationWebchatContext.ts
249
251
  src/models/ConversationWebchatQueueStatus.ts
250
252
  src/models/ConversationWebchatQueueStatusAgent.ts
package/README.md CHANGED
@@ -1,12 +1,12 @@
1
1
  # UltraCart Typescript SDK
2
- ## ultracart_rest_api_v2_typescript@4.1.9
2
+ ## ultracart_rest_api_v2_typescript@4.1.11
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 --save
9
+ npm install ultracart_rest_api_v2_typescript@4.1.11 --save
10
10
  ```
11
11
 
12
12
  ```typescript
@@ -83,6 +83,8 @@ Not every change is committed to every SDK.
83
83
 
84
84
  | Version | Date | Comments |
85
85
  | --: | :-: | --- |
86
+ | 4.1.11 | 05/19/2025 | conversations - virtual AI budgets |
87
+ | 4.1.10 | 05/06/2025 | conversation - ConversationAgentProfile.user_id added for agent profiles call |
86
88
  | 4.1.9 | 05/05/2025 | conversations - method to fetch all agent profiles for admin screens |
87
89
  | 4.1.8 | 04/22/2025 | order property fields for created_by and created_dts |
88
90
  | 4.1.7 | 04/21/2025 | conversation agent additional fields |
@@ -10,7 +10,7 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
  import * as runtime from '../runtime';
13
- import { ConversationAgentAuthResponse, ConversationAgentProfile, ConversationAgentProfileResponse, ConversationAgentProfilesResponse, ConversationAutocompleteRequest, ConversationAutocompleteResponse, ConversationCannedMessage, ConversationCannedMessageResponse, ConversationCannedMessagesResponse, ConversationCannedMessagesSearch, ConversationDepartment, ConversationDepartmentMembersResponse, ConversationDepartmentResponse, ConversationDepartmentsResponse, ConversationEngagement, ConversationEngagementResponse, ConversationEngagementsResponse, ConversationJoinRequest, ConversationLocationsResponse, ConversationMessagesResponse, ConversationMultimediaUploadUrlResponse, ConversationPbxAgent, ConversationPbxAgentResponse, ConversationPbxAgentsResponse, ConversationPbxAudio, ConversationPbxAudioResponse, ConversationPbxAudioUploadUrlResponse, ConversationPbxAudioUsageResponse, ConversationPbxAudiosResponse, ConversationPbxCustomerSnapshotRequest, ConversationPbxCustomerSnapshotResponse, ConversationPbxMenu, ConversationPbxMenuResponse, ConversationPbxMenusResponse, ConversationPbxPhoneNumber, ConversationPbxPhoneNumberResponse, ConversationPbxPhoneNumbersResponse, ConversationPbxQueue, ConversationPbxQueueResponse, ConversationPbxQueuesResponse, ConversationPbxTimeBased, ConversationPbxTimeBasedResponse, ConversationPbxTimeBasedsResponse, ConversationPbxTimeRange, ConversationPbxTimeRangeResponse, ConversationPbxTimeRangesResponse, ConversationPbxVoicemailMailbox, ConversationPbxVoicemailMailboxResponse, ConversationPbxVoicemailMailboxesResponse, ConversationPbxVoicemailMessageResponse, ConversationPbxVoicemailMessageSummariesResponse, ConversationPermissionsResponse, ConversationResponse, ConversationSearchRequest, ConversationSearchResponse, ConversationStartRequest, ConversationStartResponse, ConversationWebchatContext, ConversationWebchatQueueStatusUpdateRequest, ConversationWebchatQueueStatusesResponse, ConversationsResponse } from '../models';
13
+ import { ConversationAgentAuthResponse, ConversationAgentProfile, ConversationAgentProfileResponse, ConversationAgentProfilesResponse, ConversationAutocompleteRequest, ConversationAutocompleteResponse, ConversationCannedMessage, ConversationCannedMessageResponse, ConversationCannedMessagesResponse, ConversationCannedMessagesSearch, ConversationDepartment, ConversationDepartmentMembersResponse, ConversationDepartmentResponse, ConversationDepartmentsResponse, ConversationEngagement, ConversationEngagementResponse, ConversationEngagementsResponse, ConversationJoinRequest, ConversationLocationsResponse, ConversationMessagesResponse, ConversationMultimediaUploadUrlResponse, ConversationPbxAgent, ConversationPbxAgentResponse, ConversationPbxAgentsResponse, ConversationPbxAudio, ConversationPbxAudioResponse, ConversationPbxAudioUploadUrlResponse, ConversationPbxAudioUsageResponse, ConversationPbxAudiosResponse, ConversationPbxCustomerSnapshotRequest, ConversationPbxCustomerSnapshotResponse, ConversationPbxMenu, ConversationPbxMenuResponse, ConversationPbxMenusResponse, ConversationPbxPhoneNumber, ConversationPbxPhoneNumberResponse, ConversationPbxPhoneNumbersResponse, ConversationPbxQueue, ConversationPbxQueueResponse, ConversationPbxQueuesResponse, ConversationPbxTimeBased, ConversationPbxTimeBasedResponse, ConversationPbxTimeBasedsResponse, ConversationPbxTimeRange, ConversationPbxTimeRangeResponse, ConversationPbxTimeRangesResponse, ConversationPbxVoicemailMailbox, ConversationPbxVoicemailMailboxResponse, ConversationPbxVoicemailMailboxesResponse, ConversationPbxVoicemailMessageResponse, ConversationPbxVoicemailMessageSummariesResponse, ConversationPermissionsResponse, ConversationResponse, ConversationSearchRequest, ConversationSearchResponse, ConversationStartRequest, ConversationStartResponse, ConversationVirtualAgentBudget, ConversationVirtualAgentBudgetResponse, ConversationWebchatContext, ConversationWebchatQueueStatusUpdateRequest, ConversationWebchatQueueStatusesResponse, ConversationsResponse } from '../models';
14
14
  export interface DeleteConversationCannedMessageRequest {
15
15
  conversationCannedMessageOid: number;
16
16
  }
@@ -225,6 +225,9 @@ export interface UpdatePbxVoicemailMailboxRequest {
225
225
  conversationPbxVoicemailMailboxUuid: string;
226
226
  pbxVoicemailMailbox: ConversationPbxVoicemailMailbox;
227
227
  }
228
+ export interface UpdateVirtualAgentBudgetRequest {
229
+ virtualAgentBudget: ConversationVirtualAgentBudget;
230
+ }
228
231
  /**
229
232
  * ConversationApi - interface
230
233
  *
@@ -962,6 +965,19 @@ export interface ConversationApiInterface {
962
965
  * Get pbx voicemailMailboxes
963
966
  */
964
967
  getPbxVoicemailMailboxes(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ConversationPbxVoicemailMailboxesResponse>;
968
+ /**
969
+ * Retrieve virtual agent budget
970
+ * @summary Get virtual agent budget
971
+ * @param {*} [options] Override http request option.
972
+ * @throws {RequiredError}
973
+ * @memberof ConversationApiInterface
974
+ */
975
+ getVirtualAgentBudgetRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ConversationVirtualAgentBudgetResponse>>;
976
+ /**
977
+ * Retrieve virtual agent budget
978
+ * Get virtual agent budget
979
+ */
980
+ getVirtualAgentBudget(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ConversationVirtualAgentBudgetResponse>;
965
981
  /**
966
982
  * Insert a canned message
967
983
  * @summary Insert a canned message
@@ -1410,6 +1426,20 @@ export interface ConversationApiInterface {
1410
1426
  * Update pbx voicemailMailbox
1411
1427
  */
1412
1428
  updatePbxVoicemailMailbox(requestParameters: UpdatePbxVoicemailMailboxRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ConversationPbxVoicemailMailboxResponse>;
1429
+ /**
1430
+ * Update virtual agent budget
1431
+ * @summary Update virtual agent budget
1432
+ * @param {ConversationVirtualAgentBudget} virtualAgentBudget Virtual Agent Budget
1433
+ * @param {*} [options] Override http request option.
1434
+ * @throws {RequiredError}
1435
+ * @memberof ConversationApiInterface
1436
+ */
1437
+ updateVirtualAgentBudgetRaw(requestParameters: UpdateVirtualAgentBudgetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ConversationVirtualAgentBudgetResponse>>;
1438
+ /**
1439
+ * Update virtual agent budget
1440
+ * Update virtual agent budget
1441
+ */
1442
+ updateVirtualAgentBudget(requestParameters: UpdateVirtualAgentBudgetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ConversationVirtualAgentBudgetResponse>;
1413
1443
  }
1414
1444
  /**
1415
1445
  *
@@ -1945,6 +1975,16 @@ export declare class ConversationApi extends runtime.BaseAPI implements Conversa
1945
1975
  * Get pbx voicemailMailboxes
1946
1976
  */
1947
1977
  getPbxVoicemailMailboxes(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ConversationPbxVoicemailMailboxesResponse>;
1978
+ /**
1979
+ * Retrieve virtual agent budget
1980
+ * Get virtual agent budget
1981
+ */
1982
+ getVirtualAgentBudgetRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ConversationVirtualAgentBudgetResponse>>;
1983
+ /**
1984
+ * Retrieve virtual agent budget
1985
+ * Get virtual agent budget
1986
+ */
1987
+ getVirtualAgentBudget(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ConversationVirtualAgentBudgetResponse>;
1948
1988
  /**
1949
1989
  * Insert a canned message
1950
1990
  * Insert a canned message
@@ -2255,4 +2295,14 @@ export declare class ConversationApi extends runtime.BaseAPI implements Conversa
2255
2295
  * Update pbx voicemailMailbox
2256
2296
  */
2257
2297
  updatePbxVoicemailMailbox(requestParameters: UpdatePbxVoicemailMailboxRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ConversationPbxVoicemailMailboxResponse>;
2298
+ /**
2299
+ * Update virtual agent budget
2300
+ * Update virtual agent budget
2301
+ */
2302
+ updateVirtualAgentBudgetRaw(requestParameters: UpdateVirtualAgentBudgetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ConversationVirtualAgentBudgetResponse>>;
2303
+ /**
2304
+ * Update virtual agent budget
2305
+ * Update virtual agent budget
2306
+ */
2307
+ updateVirtualAgentBudget(requestParameters: UpdateVirtualAgentBudgetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ConversationVirtualAgentBudgetResponse>;
2258
2308
  }
@@ -3161,6 +3161,62 @@ var ConversationApi = /** @class */ (function (_super) {
3161
3161
  });
3162
3162
  });
3163
3163
  };
3164
+ /**
3165
+ * Retrieve virtual agent budget
3166
+ * Get virtual agent budget
3167
+ */
3168
+ ConversationApi.prototype.getVirtualAgentBudgetRaw = function (initOverrides) {
3169
+ return __awaiter(this, void 0, void 0, function () {
3170
+ var queryParameters, headerParameters, _a, _b, response;
3171
+ return __generator(this, function (_c) {
3172
+ switch (_c.label) {
3173
+ case 0:
3174
+ queryParameters = {};
3175
+ headerParameters = {};
3176
+ if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 2];
3177
+ // oauth required
3178
+ _a = headerParameters;
3179
+ _b = "Authorization";
3180
+ return [4 /*yield*/, this.configuration.accessToken("ultraCartOauth", ["conversation_read"])];
3181
+ case 1:
3182
+ // oauth required
3183
+ _a[_b] = _c.sent();
3184
+ _c.label = 2;
3185
+ case 2:
3186
+ if (this.configuration && this.configuration.apiKey) {
3187
+ headerParameters["x-ultracart-simple-key"] = this.configuration.apiKey("x-ultracart-simple-key"); // ultraCartSimpleApiKey authentication
3188
+ }
3189
+ return [4 /*yield*/, this.request({
3190
+ path: "/conversation/virtualagent/budget",
3191
+ method: 'GET',
3192
+ headers: headerParameters,
3193
+ query: queryParameters,
3194
+ }, initOverrides)];
3195
+ case 3:
3196
+ response = _c.sent();
3197
+ return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, models_1.ConversationVirtualAgentBudgetResponseFromJSON)(jsonValue); })];
3198
+ }
3199
+ });
3200
+ });
3201
+ };
3202
+ /**
3203
+ * Retrieve virtual agent budget
3204
+ * Get virtual agent budget
3205
+ */
3206
+ ConversationApi.prototype.getVirtualAgentBudget = function (initOverrides) {
3207
+ return __awaiter(this, void 0, void 0, function () {
3208
+ var response;
3209
+ return __generator(this, function (_a) {
3210
+ switch (_a.label) {
3211
+ case 0: return [4 /*yield*/, this.getVirtualAgentBudgetRaw(initOverrides)];
3212
+ case 1:
3213
+ response = _a.sent();
3214
+ return [4 /*yield*/, response.value()];
3215
+ case 2: return [2 /*return*/, _a.sent()];
3216
+ }
3217
+ });
3218
+ });
3219
+ };
3164
3220
  /**
3165
3221
  * Insert a canned message
3166
3222
  * Insert a canned message
@@ -5063,6 +5119,67 @@ var ConversationApi = /** @class */ (function (_super) {
5063
5119
  });
5064
5120
  });
5065
5121
  };
5122
+ /**
5123
+ * Update virtual agent budget
5124
+ * Update virtual agent budget
5125
+ */
5126
+ ConversationApi.prototype.updateVirtualAgentBudgetRaw = function (requestParameters, initOverrides) {
5127
+ return __awaiter(this, void 0, void 0, function () {
5128
+ var queryParameters, headerParameters, _a, _b, response;
5129
+ return __generator(this, function (_c) {
5130
+ switch (_c.label) {
5131
+ case 0:
5132
+ if (requestParameters.virtualAgentBudget === null || requestParameters.virtualAgentBudget === undefined) {
5133
+ throw new runtime.RequiredError('virtualAgentBudget', 'Required parameter requestParameters.virtualAgentBudget was null or undefined when calling updateVirtualAgentBudget.');
5134
+ }
5135
+ queryParameters = {};
5136
+ headerParameters = {};
5137
+ headerParameters['Content-Type'] = 'application/json';
5138
+ if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 2];
5139
+ // oauth required
5140
+ _a = headerParameters;
5141
+ _b = "Authorization";
5142
+ return [4 /*yield*/, this.configuration.accessToken("ultraCartOauth", ["conversation_write"])];
5143
+ case 1:
5144
+ // oauth required
5145
+ _a[_b] = _c.sent();
5146
+ _c.label = 2;
5147
+ case 2:
5148
+ if (this.configuration && this.configuration.apiKey) {
5149
+ headerParameters["x-ultracart-simple-key"] = this.configuration.apiKey("x-ultracart-simple-key"); // ultraCartSimpleApiKey authentication
5150
+ }
5151
+ return [4 /*yield*/, this.request({
5152
+ path: "/conversation/virtualagent/budget",
5153
+ method: 'PUT',
5154
+ headers: headerParameters,
5155
+ query: queryParameters,
5156
+ body: (0, models_1.ConversationVirtualAgentBudgetToJSON)(requestParameters.virtualAgentBudget),
5157
+ }, initOverrides)];
5158
+ case 3:
5159
+ response = _c.sent();
5160
+ return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, models_1.ConversationVirtualAgentBudgetResponseFromJSON)(jsonValue); })];
5161
+ }
5162
+ });
5163
+ });
5164
+ };
5165
+ /**
5166
+ * Update virtual agent budget
5167
+ * Update virtual agent budget
5168
+ */
5169
+ ConversationApi.prototype.updateVirtualAgentBudget = function (requestParameters, initOverrides) {
5170
+ return __awaiter(this, void 0, void 0, function () {
5171
+ var response;
5172
+ return __generator(this, function (_a) {
5173
+ switch (_a.label) {
5174
+ case 0: return [4 /*yield*/, this.updateVirtualAgentBudgetRaw(requestParameters, initOverrides)];
5175
+ case 1:
5176
+ response = _a.sent();
5177
+ return [4 /*yield*/, response.value()];
5178
+ case 2: return [2 /*return*/, _a.sent()];
5179
+ }
5180
+ });
5181
+ });
5182
+ };
5066
5183
  return ConversationApi;
5067
5184
  }(runtime.BaseAPI));
5068
5185
  exports.ConversationApi = ConversationApi;
@@ -81,6 +81,12 @@ export interface ConversationAgentProfile {
81
81
  * @memberof ConversationAgentProfile
82
82
  */
83
83
  profile_image_url?: string;
84
+ /**
85
+ * User ID associated with the agent. Populated by getAgentProfiles call only.
86
+ * @type {number}
87
+ * @memberof ConversationAgentProfile
88
+ */
89
+ user_id?: number;
84
90
  }
85
91
  /**
86
92
  * @export
@@ -51,6 +51,7 @@ function ConversationAgentProfileFromJSONTyped(json, ignoreDiscriminator) {
51
51
  'name': !(0, runtime_1.exists)(json, 'name') ? undefined : json['name'],
52
52
  'profile_image_upload_key': !(0, runtime_1.exists)(json, 'profile_image_upload_key') ? undefined : json['profile_image_upload_key'],
53
53
  'profile_image_url': !(0, runtime_1.exists)(json, 'profile_image_url') ? undefined : json['profile_image_url'],
54
+ 'user_id': !(0, runtime_1.exists)(json, 'user_id') ? undefined : json['user_id'],
54
55
  };
55
56
  }
56
57
  exports.ConversationAgentProfileFromJSONTyped = ConversationAgentProfileFromJSONTyped;
@@ -73,6 +74,7 @@ function ConversationAgentProfileToJSON(value) {
73
74
  'name': value.name,
74
75
  'profile_image_upload_key': value.profile_image_upload_key,
75
76
  'profile_image_url': value.profile_image_url,
77
+ 'user_id': value.user_id,
76
78
  };
77
79
  }
78
80
  exports.ConversationAgentProfileToJSON = ConversationAgentProfileToJSON;
@@ -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 ConversationVirtualAgentBudget
16
+ */
17
+ export interface ConversationVirtualAgentBudget {
18
+ /**
19
+ *
20
+ * @type {number}
21
+ * @memberof ConversationVirtualAgentBudget
22
+ */
23
+ budget_daily?: number;
24
+ /**
25
+ *
26
+ * @type {number}
27
+ * @memberof ConversationVirtualAgentBudget
28
+ */
29
+ budget_monthly?: number;
30
+ /**
31
+ *
32
+ * @type {number}
33
+ * @memberof ConversationVirtualAgentBudget
34
+ */
35
+ used_daily?: number;
36
+ /**
37
+ *
38
+ * @type {number}
39
+ * @memberof ConversationVirtualAgentBudget
40
+ */
41
+ used_monthly?: number;
42
+ }
43
+ /**
44
+ * Check if a given object implements the ConversationVirtualAgentBudget interface.
45
+ */
46
+ export declare function instanceOfConversationVirtualAgentBudget(value: object): boolean;
47
+ export declare function ConversationVirtualAgentBudgetFromJSON(json: any): ConversationVirtualAgentBudget;
48
+ export declare function ConversationVirtualAgentBudgetFromJSONTyped(json: any, ignoreDiscriminator: boolean): ConversationVirtualAgentBudget;
49
+ export declare function ConversationVirtualAgentBudgetToJSON(value?: ConversationVirtualAgentBudget | 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.ConversationVirtualAgentBudgetToJSON = exports.ConversationVirtualAgentBudgetFromJSONTyped = exports.ConversationVirtualAgentBudgetFromJSON = exports.instanceOfConversationVirtualAgentBudget = void 0;
17
+ var runtime_1 = require("../runtime");
18
+ /**
19
+ * Check if a given object implements the ConversationVirtualAgentBudget interface.
20
+ */
21
+ function instanceOfConversationVirtualAgentBudget(value) {
22
+ var isInstance = true;
23
+ return isInstance;
24
+ }
25
+ exports.instanceOfConversationVirtualAgentBudget = instanceOfConversationVirtualAgentBudget;
26
+ function ConversationVirtualAgentBudgetFromJSON(json) {
27
+ return ConversationVirtualAgentBudgetFromJSONTyped(json, false);
28
+ }
29
+ exports.ConversationVirtualAgentBudgetFromJSON = ConversationVirtualAgentBudgetFromJSON;
30
+ function ConversationVirtualAgentBudgetFromJSONTyped(json, ignoreDiscriminator) {
31
+ if ((json === undefined) || (json === null)) {
32
+ return json;
33
+ }
34
+ return {
35
+ 'budget_daily': !(0, runtime_1.exists)(json, 'budget_daily') ? undefined : json['budget_daily'],
36
+ 'budget_monthly': !(0, runtime_1.exists)(json, 'budget_monthly') ? undefined : json['budget_monthly'],
37
+ 'used_daily': !(0, runtime_1.exists)(json, 'used_daily') ? undefined : json['used_daily'],
38
+ 'used_monthly': !(0, runtime_1.exists)(json, 'used_monthly') ? undefined : json['used_monthly'],
39
+ };
40
+ }
41
+ exports.ConversationVirtualAgentBudgetFromJSONTyped = ConversationVirtualAgentBudgetFromJSONTyped;
42
+ function ConversationVirtualAgentBudgetToJSON(value) {
43
+ if (value === undefined) {
44
+ return undefined;
45
+ }
46
+ if (value === null) {
47
+ return null;
48
+ }
49
+ return {
50
+ 'budget_daily': value.budget_daily,
51
+ 'budget_monthly': value.budget_monthly,
52
+ 'used_daily': value.used_daily,
53
+ 'used_monthly': value.used_monthly,
54
+ };
55
+ }
56
+ exports.ConversationVirtualAgentBudgetToJSON = ConversationVirtualAgentBudgetToJSON;
@@ -0,0 +1,59 @@
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 { ConversationVirtualAgentBudget } from './ConversationVirtualAgentBudget';
13
+ import { ModelError } from './ModelError';
14
+ import { ResponseMetadata } from './ResponseMetadata';
15
+ import { Warning } from './Warning';
16
+ /**
17
+ *
18
+ * @export
19
+ * @interface ConversationVirtualAgentBudgetResponse
20
+ */
21
+ export interface ConversationVirtualAgentBudgetResponse {
22
+ /**
23
+ *
24
+ * @type {ConversationVirtualAgentBudget}
25
+ * @memberof ConversationVirtualAgentBudgetResponse
26
+ */
27
+ budget?: ConversationVirtualAgentBudget;
28
+ /**
29
+ *
30
+ * @type {ModelError}
31
+ * @memberof ConversationVirtualAgentBudgetResponse
32
+ */
33
+ error?: ModelError;
34
+ /**
35
+ *
36
+ * @type {ResponseMetadata}
37
+ * @memberof ConversationVirtualAgentBudgetResponse
38
+ */
39
+ metadata?: ResponseMetadata;
40
+ /**
41
+ * Indicates if API call was successful
42
+ * @type {boolean}
43
+ * @memberof ConversationVirtualAgentBudgetResponse
44
+ */
45
+ success?: boolean;
46
+ /**
47
+ *
48
+ * @type {Warning}
49
+ * @memberof ConversationVirtualAgentBudgetResponse
50
+ */
51
+ warning?: Warning;
52
+ }
53
+ /**
54
+ * Check if a given object implements the ConversationVirtualAgentBudgetResponse interface.
55
+ */
56
+ export declare function instanceOfConversationVirtualAgentBudgetResponse(value: object): boolean;
57
+ export declare function ConversationVirtualAgentBudgetResponseFromJSON(json: any): ConversationVirtualAgentBudgetResponse;
58
+ export declare function ConversationVirtualAgentBudgetResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ConversationVirtualAgentBudgetResponse;
59
+ export declare function ConversationVirtualAgentBudgetResponseToJSON(value?: ConversationVirtualAgentBudgetResponse | null): any;
@@ -0,0 +1,62 @@
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.ConversationVirtualAgentBudgetResponseToJSON = exports.ConversationVirtualAgentBudgetResponseFromJSONTyped = exports.ConversationVirtualAgentBudgetResponseFromJSON = exports.instanceOfConversationVirtualAgentBudgetResponse = void 0;
17
+ var runtime_1 = require("../runtime");
18
+ var ConversationVirtualAgentBudget_1 = require("./ConversationVirtualAgentBudget");
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 ConversationVirtualAgentBudgetResponse interface.
24
+ */
25
+ function instanceOfConversationVirtualAgentBudgetResponse(value) {
26
+ var isInstance = true;
27
+ return isInstance;
28
+ }
29
+ exports.instanceOfConversationVirtualAgentBudgetResponse = instanceOfConversationVirtualAgentBudgetResponse;
30
+ function ConversationVirtualAgentBudgetResponseFromJSON(json) {
31
+ return ConversationVirtualAgentBudgetResponseFromJSONTyped(json, false);
32
+ }
33
+ exports.ConversationVirtualAgentBudgetResponseFromJSON = ConversationVirtualAgentBudgetResponseFromJSON;
34
+ function ConversationVirtualAgentBudgetResponseFromJSONTyped(json, ignoreDiscriminator) {
35
+ if ((json === undefined) || (json === null)) {
36
+ return json;
37
+ }
38
+ return {
39
+ 'budget': !(0, runtime_1.exists)(json, 'budget') ? undefined : (0, ConversationVirtualAgentBudget_1.ConversationVirtualAgentBudgetFromJSON)(json['budget']),
40
+ 'error': !(0, runtime_1.exists)(json, 'error') ? undefined : (0, ModelError_1.ModelErrorFromJSON)(json['error']),
41
+ 'metadata': !(0, runtime_1.exists)(json, 'metadata') ? undefined : (0, ResponseMetadata_1.ResponseMetadataFromJSON)(json['metadata']),
42
+ 'success': !(0, runtime_1.exists)(json, 'success') ? undefined : json['success'],
43
+ 'warning': !(0, runtime_1.exists)(json, 'warning') ? undefined : (0, Warning_1.WarningFromJSON)(json['warning']),
44
+ };
45
+ }
46
+ exports.ConversationVirtualAgentBudgetResponseFromJSONTyped = ConversationVirtualAgentBudgetResponseFromJSONTyped;
47
+ function ConversationVirtualAgentBudgetResponseToJSON(value) {
48
+ if (value === undefined) {
49
+ return undefined;
50
+ }
51
+ if (value === null) {
52
+ return null;
53
+ }
54
+ return {
55
+ 'budget': (0, ConversationVirtualAgentBudget_1.ConversationVirtualAgentBudgetToJSON)(value.budget),
56
+ 'error': (0, ModelError_1.ModelErrorToJSON)(value.error),
57
+ 'metadata': (0, ResponseMetadata_1.ResponseMetadataToJSON)(value.metadata),
58
+ 'success': value.success,
59
+ 'warning': (0, Warning_1.WarningToJSON)(value.warning),
60
+ };
61
+ }
62
+ exports.ConversationVirtualAgentBudgetResponseToJSON = ConversationVirtualAgentBudgetResponseToJSON;
@@ -218,6 +218,8 @@ export * from './ConversationStartRequest';
218
218
  export * from './ConversationStartResponse';
219
219
  export * from './ConversationSummary';
220
220
  export * from './ConversationTwilioAccount';
221
+ export * from './ConversationVirtualAgentBudget';
222
+ export * from './ConversationVirtualAgentBudgetResponse';
221
223
  export * from './ConversationWebchatContext';
222
224
  export * from './ConversationWebchatQueueStatus';
223
225
  export * from './ConversationWebchatQueueStatusAgent';
@@ -236,6 +236,8 @@ __exportStar(require("./ConversationStartRequest"), exports);
236
236
  __exportStar(require("./ConversationStartResponse"), exports);
237
237
  __exportStar(require("./ConversationSummary"), exports);
238
238
  __exportStar(require("./ConversationTwilioAccount"), exports);
239
+ __exportStar(require("./ConversationVirtualAgentBudget"), exports);
240
+ __exportStar(require("./ConversationVirtualAgentBudgetResponse"), exports);
239
241
  __exportStar(require("./ConversationWebchatContext"), exports);
240
242
  __exportStar(require("./ConversationWebchatQueueStatus"), exports);
241
243
  __exportStar(require("./ConversationWebchatQueueStatusAgent"), exports);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ultracart_rest_api_v2_typescript",
3
- "version": "4.1.9",
3
+ "version": "4.1.11",
4
4
  "description": "UltraCart Rest TypeScript SDK",
5
5
  "author": "UltraCart",
6
6
  "repository": {
@@ -186,6 +186,12 @@ import {
186
186
  ConversationStartResponse,
187
187
  ConversationStartResponseFromJSON,
188
188
  ConversationStartResponseToJSON,
189
+ ConversationVirtualAgentBudget,
190
+ ConversationVirtualAgentBudgetFromJSON,
191
+ ConversationVirtualAgentBudgetToJSON,
192
+ ConversationVirtualAgentBudgetResponse,
193
+ ConversationVirtualAgentBudgetResponseFromJSON,
194
+ ConversationVirtualAgentBudgetResponseToJSON,
189
195
  ConversationWebchatContext,
190
196
  ConversationWebchatContextFromJSON,
191
197
  ConversationWebchatContextToJSON,
@@ -481,6 +487,10 @@ export interface UpdatePbxVoicemailMailboxRequest {
481
487
  pbxVoicemailMailbox: ConversationPbxVoicemailMailbox;
482
488
  }
483
489
 
490
+ export interface UpdateVirtualAgentBudgetRequest {
491
+ virtualAgentBudget: ConversationVirtualAgentBudget;
492
+ }
493
+
484
494
  /**
485
495
  * ConversationApi - interface
486
496
  *
@@ -1324,6 +1334,21 @@ export interface ConversationApiInterface {
1324
1334
  */
1325
1335
  getPbxVoicemailMailboxes(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ConversationPbxVoicemailMailboxesResponse>;
1326
1336
 
1337
+ /**
1338
+ * Retrieve virtual agent budget
1339
+ * @summary Get virtual agent budget
1340
+ * @param {*} [options] Override http request option.
1341
+ * @throws {RequiredError}
1342
+ * @memberof ConversationApiInterface
1343
+ */
1344
+ getVirtualAgentBudgetRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ConversationVirtualAgentBudgetResponse>>;
1345
+
1346
+ /**
1347
+ * Retrieve virtual agent budget
1348
+ * Get virtual agent budget
1349
+ */
1350
+ getVirtualAgentBudget(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ConversationVirtualAgentBudgetResponse>;
1351
+
1327
1352
  /**
1328
1353
  * Insert a canned message
1329
1354
  * @summary Insert a canned message
@@ -1834,6 +1859,22 @@ export interface ConversationApiInterface {
1834
1859
  */
1835
1860
  updatePbxVoicemailMailbox(requestParameters: UpdatePbxVoicemailMailboxRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ConversationPbxVoicemailMailboxResponse>;
1836
1861
 
1862
+ /**
1863
+ * Update virtual agent budget
1864
+ * @summary Update virtual agent budget
1865
+ * @param {ConversationVirtualAgentBudget} virtualAgentBudget Virtual Agent Budget
1866
+ * @param {*} [options] Override http request option.
1867
+ * @throws {RequiredError}
1868
+ * @memberof ConversationApiInterface
1869
+ */
1870
+ updateVirtualAgentBudgetRaw(requestParameters: UpdateVirtualAgentBudgetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ConversationVirtualAgentBudgetResponse>>;
1871
+
1872
+ /**
1873
+ * Update virtual agent budget
1874
+ * Update virtual agent budget
1875
+ */
1876
+ updateVirtualAgentBudget(requestParameters: UpdateVirtualAgentBudgetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ConversationVirtualAgentBudgetResponse>;
1877
+
1837
1878
  }
1838
1879
 
1839
1880
  /**
@@ -3969,6 +4010,43 @@ export class ConversationApi extends runtime.BaseAPI implements ConversationApiI
3969
4010
  return await response.value();
3970
4011
  }
3971
4012
 
4013
+ /**
4014
+ * Retrieve virtual agent budget
4015
+ * Get virtual agent budget
4016
+ */
4017
+ async getVirtualAgentBudgetRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ConversationVirtualAgentBudgetResponse>> {
4018
+ const queryParameters: any = {};
4019
+
4020
+ const headerParameters: runtime.HTTPHeaders = {};
4021
+
4022
+ if (this.configuration && this.configuration.accessToken) {
4023
+ // oauth required
4024
+ headerParameters["Authorization"] = await this.configuration.accessToken("ultraCartOauth", ["conversation_read"]);
4025
+ }
4026
+
4027
+ if (this.configuration && this.configuration.apiKey) {
4028
+ headerParameters["x-ultracart-simple-key"] = this.configuration.apiKey("x-ultracart-simple-key"); // ultraCartSimpleApiKey authentication
4029
+ }
4030
+
4031
+ const response = await this.request({
4032
+ path: `/conversation/virtualagent/budget`,
4033
+ method: 'GET',
4034
+ headers: headerParameters,
4035
+ query: queryParameters,
4036
+ }, initOverrides);
4037
+
4038
+ return new runtime.JSONApiResponse(response, (jsonValue) => ConversationVirtualAgentBudgetResponseFromJSON(jsonValue));
4039
+ }
4040
+
4041
+ /**
4042
+ * Retrieve virtual agent budget
4043
+ * Get virtual agent budget
4044
+ */
4045
+ async getVirtualAgentBudget(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ConversationVirtualAgentBudgetResponse> {
4046
+ const response = await this.getVirtualAgentBudgetRaw(initOverrides);
4047
+ return await response.value();
4048
+ }
4049
+
3972
4050
  /**
3973
4051
  * Insert a canned message
3974
4052
  * Insert a canned message
@@ -5359,4 +5437,48 @@ export class ConversationApi extends runtime.BaseAPI implements ConversationApiI
5359
5437
  return await response.value();
5360
5438
  }
5361
5439
 
5440
+ /**
5441
+ * Update virtual agent budget
5442
+ * Update virtual agent budget
5443
+ */
5444
+ async updateVirtualAgentBudgetRaw(requestParameters: UpdateVirtualAgentBudgetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ConversationVirtualAgentBudgetResponse>> {
5445
+ if (requestParameters.virtualAgentBudget === null || requestParameters.virtualAgentBudget === undefined) {
5446
+ throw new runtime.RequiredError('virtualAgentBudget','Required parameter requestParameters.virtualAgentBudget was null or undefined when calling updateVirtualAgentBudget.');
5447
+ }
5448
+
5449
+ const queryParameters: any = {};
5450
+
5451
+ const headerParameters: runtime.HTTPHeaders = {};
5452
+
5453
+ headerParameters['Content-Type'] = 'application/json';
5454
+
5455
+ if (this.configuration && this.configuration.accessToken) {
5456
+ // oauth required
5457
+ headerParameters["Authorization"] = await this.configuration.accessToken("ultraCartOauth", ["conversation_write"]);
5458
+ }
5459
+
5460
+ if (this.configuration && this.configuration.apiKey) {
5461
+ headerParameters["x-ultracart-simple-key"] = this.configuration.apiKey("x-ultracart-simple-key"); // ultraCartSimpleApiKey authentication
5462
+ }
5463
+
5464
+ const response = await this.request({
5465
+ path: `/conversation/virtualagent/budget`,
5466
+ method: 'PUT',
5467
+ headers: headerParameters,
5468
+ query: queryParameters,
5469
+ body: ConversationVirtualAgentBudgetToJSON(requestParameters.virtualAgentBudget),
5470
+ }, initOverrides);
5471
+
5472
+ return new runtime.JSONApiResponse(response, (jsonValue) => ConversationVirtualAgentBudgetResponseFromJSON(jsonValue));
5473
+ }
5474
+
5475
+ /**
5476
+ * Update virtual agent budget
5477
+ * Update virtual agent budget
5478
+ */
5479
+ async updateVirtualAgentBudget(requestParameters: UpdateVirtualAgentBudgetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ConversationVirtualAgentBudgetResponse> {
5480
+ const response = await this.updateVirtualAgentBudgetRaw(requestParameters, initOverrides);
5481
+ return await response.value();
5482
+ }
5483
+
5362
5484
  }
@@ -85,6 +85,12 @@ export interface ConversationAgentProfile {
85
85
  * @memberof ConversationAgentProfile
86
86
  */
87
87
  profile_image_url?: string;
88
+ /**
89
+ * User ID associated with the agent. Populated by getAgentProfiles call only.
90
+ * @type {number}
91
+ * @memberof ConversationAgentProfile
92
+ */
93
+ user_id?: number;
88
94
  }
89
95
 
90
96
 
@@ -130,6 +136,7 @@ export function ConversationAgentProfileFromJSONTyped(json: any, ignoreDiscrimin
130
136
  'name': !exists(json, 'name') ? undefined : json['name'],
131
137
  'profile_image_upload_key': !exists(json, 'profile_image_upload_key') ? undefined : json['profile_image_upload_key'],
132
138
  'profile_image_url': !exists(json, 'profile_image_url') ? undefined : json['profile_image_url'],
139
+ 'user_id': !exists(json, 'user_id') ? undefined : json['user_id'],
133
140
  };
134
141
  }
135
142
 
@@ -153,6 +160,7 @@ export function ConversationAgentProfileToJSON(value?: ConversationAgentProfile
153
160
  'name': value.name,
154
161
  'profile_image_upload_key': value.profile_image_upload_key,
155
162
  'profile_image_url': value.profile_image_url,
163
+ 'user_id': value.user_id,
156
164
  };
157
165
  }
158
166
 
@@ -0,0 +1,91 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * UltraCart Rest API V2
5
+ * UltraCart REST API Version 2
6
+ *
7
+ * The version of the OpenAPI document: 2.0.0
8
+ * Contact: support@ultracart.com
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+
15
+ import { exists, mapValues } from '../runtime';
16
+ /**
17
+ *
18
+ * @export
19
+ * @interface ConversationVirtualAgentBudget
20
+ */
21
+ export interface ConversationVirtualAgentBudget {
22
+ /**
23
+ *
24
+ * @type {number}
25
+ * @memberof ConversationVirtualAgentBudget
26
+ */
27
+ budget_daily?: number;
28
+ /**
29
+ *
30
+ * @type {number}
31
+ * @memberof ConversationVirtualAgentBudget
32
+ */
33
+ budget_monthly?: number;
34
+ /**
35
+ *
36
+ * @type {number}
37
+ * @memberof ConversationVirtualAgentBudget
38
+ */
39
+ used_daily?: number;
40
+ /**
41
+ *
42
+ * @type {number}
43
+ * @memberof ConversationVirtualAgentBudget
44
+ */
45
+ used_monthly?: number;
46
+ }
47
+
48
+
49
+
50
+ /**
51
+ * Check if a given object implements the ConversationVirtualAgentBudget interface.
52
+ */
53
+ export function instanceOfConversationVirtualAgentBudget(value: object): boolean {
54
+ let isInstance = true;
55
+
56
+ return isInstance;
57
+ }
58
+
59
+ export function ConversationVirtualAgentBudgetFromJSON(json: any): ConversationVirtualAgentBudget {
60
+ return ConversationVirtualAgentBudgetFromJSONTyped(json, false);
61
+ }
62
+
63
+ export function ConversationVirtualAgentBudgetFromJSONTyped(json: any, ignoreDiscriminator: boolean): ConversationVirtualAgentBudget {
64
+ if ((json === undefined) || (json === null)) {
65
+ return json;
66
+ }
67
+ return {
68
+
69
+ 'budget_daily': !exists(json, 'budget_daily') ? undefined : json['budget_daily'],
70
+ 'budget_monthly': !exists(json, 'budget_monthly') ? undefined : json['budget_monthly'],
71
+ 'used_daily': !exists(json, 'used_daily') ? undefined : json['used_daily'],
72
+ 'used_monthly': !exists(json, 'used_monthly') ? undefined : json['used_monthly'],
73
+ };
74
+ }
75
+
76
+ export function ConversationVirtualAgentBudgetToJSON(value?: ConversationVirtualAgentBudget | null): any {
77
+ if (value === undefined) {
78
+ return undefined;
79
+ }
80
+ if (value === null) {
81
+ return null;
82
+ }
83
+ return {
84
+
85
+ 'budget_daily': value.budget_daily,
86
+ 'budget_monthly': value.budget_monthly,
87
+ 'used_daily': value.used_daily,
88
+ 'used_monthly': value.used_monthly,
89
+ };
90
+ }
91
+
@@ -0,0 +1,124 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * UltraCart Rest API V2
5
+ * UltraCart REST API Version 2
6
+ *
7
+ * The version of the OpenAPI document: 2.0.0
8
+ * Contact: support@ultracart.com
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+
15
+ import { exists, mapValues } from '../runtime';
16
+ import {
17
+ ConversationVirtualAgentBudget,
18
+ ConversationVirtualAgentBudgetFromJSON,
19
+ ConversationVirtualAgentBudgetFromJSONTyped,
20
+ ConversationVirtualAgentBudgetToJSON,
21
+ } from './ConversationVirtualAgentBudget';
22
+ import {
23
+ ModelError,
24
+ ModelErrorFromJSON,
25
+ ModelErrorFromJSONTyped,
26
+ ModelErrorToJSON,
27
+ } from './ModelError';
28
+ import {
29
+ ResponseMetadata,
30
+ ResponseMetadataFromJSON,
31
+ ResponseMetadataFromJSONTyped,
32
+ ResponseMetadataToJSON,
33
+ } from './ResponseMetadata';
34
+ import {
35
+ Warning,
36
+ WarningFromJSON,
37
+ WarningFromJSONTyped,
38
+ WarningToJSON,
39
+ } from './Warning';
40
+
41
+ /**
42
+ *
43
+ * @export
44
+ * @interface ConversationVirtualAgentBudgetResponse
45
+ */
46
+ export interface ConversationVirtualAgentBudgetResponse {
47
+ /**
48
+ *
49
+ * @type {ConversationVirtualAgentBudget}
50
+ * @memberof ConversationVirtualAgentBudgetResponse
51
+ */
52
+ budget?: ConversationVirtualAgentBudget;
53
+ /**
54
+ *
55
+ * @type {ModelError}
56
+ * @memberof ConversationVirtualAgentBudgetResponse
57
+ */
58
+ error?: ModelError;
59
+ /**
60
+ *
61
+ * @type {ResponseMetadata}
62
+ * @memberof ConversationVirtualAgentBudgetResponse
63
+ */
64
+ metadata?: ResponseMetadata;
65
+ /**
66
+ * Indicates if API call was successful
67
+ * @type {boolean}
68
+ * @memberof ConversationVirtualAgentBudgetResponse
69
+ */
70
+ success?: boolean;
71
+ /**
72
+ *
73
+ * @type {Warning}
74
+ * @memberof ConversationVirtualAgentBudgetResponse
75
+ */
76
+ warning?: Warning;
77
+ }
78
+
79
+
80
+
81
+ /**
82
+ * Check if a given object implements the ConversationVirtualAgentBudgetResponse interface.
83
+ */
84
+ export function instanceOfConversationVirtualAgentBudgetResponse(value: object): boolean {
85
+ let isInstance = true;
86
+
87
+ return isInstance;
88
+ }
89
+
90
+ export function ConversationVirtualAgentBudgetResponseFromJSON(json: any): ConversationVirtualAgentBudgetResponse {
91
+ return ConversationVirtualAgentBudgetResponseFromJSONTyped(json, false);
92
+ }
93
+
94
+ export function ConversationVirtualAgentBudgetResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ConversationVirtualAgentBudgetResponse {
95
+ if ((json === undefined) || (json === null)) {
96
+ return json;
97
+ }
98
+ return {
99
+
100
+ 'budget': !exists(json, 'budget') ? undefined : ConversationVirtualAgentBudgetFromJSON(json['budget']),
101
+ 'error': !exists(json, 'error') ? undefined : ModelErrorFromJSON(json['error']),
102
+ 'metadata': !exists(json, 'metadata') ? undefined : ResponseMetadataFromJSON(json['metadata']),
103
+ 'success': !exists(json, 'success') ? undefined : json['success'],
104
+ 'warning': !exists(json, 'warning') ? undefined : WarningFromJSON(json['warning']),
105
+ };
106
+ }
107
+
108
+ export function ConversationVirtualAgentBudgetResponseToJSON(value?: ConversationVirtualAgentBudgetResponse | null): any {
109
+ if (value === undefined) {
110
+ return undefined;
111
+ }
112
+ if (value === null) {
113
+ return null;
114
+ }
115
+ return {
116
+
117
+ 'budget': ConversationVirtualAgentBudgetToJSON(value.budget),
118
+ 'error': ModelErrorToJSON(value.error),
119
+ 'metadata': ResponseMetadataToJSON(value.metadata),
120
+ 'success': value.success,
121
+ 'warning': WarningToJSON(value.warning),
122
+ };
123
+ }
124
+
@@ -220,6 +220,8 @@ export * from './ConversationStartRequest';
220
220
  export * from './ConversationStartResponse';
221
221
  export * from './ConversationSummary';
222
222
  export * from './ConversationTwilioAccount';
223
+ export * from './ConversationVirtualAgentBudget';
224
+ export * from './ConversationVirtualAgentBudgetResponse';
223
225
  export * from './ConversationWebchatContext';
224
226
  export * from './ConversationWebchatQueueStatus';
225
227
  export * from './ConversationWebchatQueueStatusAgent';