ultracart_rest_api_v2_typescript 4.1.67 → 4.1.69

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.
@@ -717,6 +717,7 @@ src/models/Mailgun.ts
717
717
  src/models/Metric.ts
718
718
  src/models/ModelError.ts
719
719
  src/models/Notification.ts
720
+ src/models/OauthDeviceAuthorizationResponse.ts
720
721
  src/models/OauthRevokeSuccessResponse.ts
721
722
  src/models/OauthTokenResponse.ts
722
723
  src/models/Order.ts
package/README.md CHANGED
@@ -1,12 +1,12 @@
1
1
  # UltraCart Typescript SDK
2
- ## ultracart_rest_api_v2_typescript@4.1.67
2
+ ## ultracart_rest_api_v2_typescript@4.1.69
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.67 --save
9
+ npm install ultracart_rest_api_v2_typescript@4.1.69 --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.69 | 03/31/2026 | conversations - user specific audio methods |
89
+ | 4.1.68 | 03/31/2026 | oauth - device support |
88
90
  | 4.1.67 | 02/24/2026 | customer activity - sms and sms_stop fields added |
89
91
  | 4.1.66 | 02/18/2026 | conversations - agent auth customer_profile flag |
90
92
  | 4.1.65 | 02/16/2026 | item - include variant pricing in the response |
@@ -65,6 +65,9 @@ export interface DeletePbxTimeRangeRequest {
65
65
  export interface DeletePbxVoicemailMailboxRequest {
66
66
  conversationPbxVoicemailMailboxUuid: string;
67
67
  }
68
+ export interface DeleteUserPbxAudioRequest {
69
+ conversationPbxAudioUuid: string;
70
+ }
68
71
  export interface GetAgentProfileKnowledgeBaseRequest {
69
72
  userId: number;
70
73
  }
@@ -177,6 +180,9 @@ export interface GetPbxTimeRangeRequest {
177
180
  export interface GetPbxVoicemailMailboxRequest {
178
181
  conversationPbxVoicemailMailboxUuid: string;
179
182
  }
183
+ export interface GetUserPbxAudioRequest {
184
+ conversationPbxAudioUuid: string;
185
+ }
180
186
  export interface InsertAgentProfileKnowledgeBaseDocumentRequest {
181
187
  userId: number;
182
188
  knowledgeBaseDocumentRequest: ConversationInsertKnowledgeBaseDocumentRequest;
@@ -221,6 +227,9 @@ export interface InsertPbxTimeRangeRequest {
221
227
  export interface InsertPbxVoicemailMailboxRequest {
222
228
  pbxVoicemailMailbox: ConversationPbxVoicemailMailbox;
223
229
  }
230
+ export interface InsertUserPbxAudioRequest {
231
+ pbxAudio: ConversationPbxAudio;
232
+ }
224
233
  export interface JoinConversationRequest {
225
234
  conversationUuid: string;
226
235
  joinRequest?: ConversationJoinRequest;
@@ -343,6 +352,10 @@ export interface UpdatePbxVoicemailMailboxRequest {
343
352
  conversationPbxVoicemailMailboxUuid: string;
344
353
  pbxVoicemailMailbox: ConversationPbxVoicemailMailbox;
345
354
  }
355
+ export interface UpdateUserPbxAudioRequest {
356
+ conversationPbxAudioUuid: string;
357
+ pbxAudio: ConversationPbxAudio;
358
+ }
346
359
  export interface UpdateVirtualAgentBudgetRequest {
347
360
  virtualAgentBudget: ConversationVirtualAgentBudget;
348
361
  }
@@ -597,6 +610,20 @@ export interface ConversationApiInterface {
597
610
  * Delete pbx voicemailMailbox
598
611
  */
599
612
  deletePbxVoicemailMailbox(requestParameters: DeletePbxVoicemailMailboxRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ConversationPbxVoicemailMailboxResponse>;
613
+ /**
614
+ * Delete a pbx audio file owned by the authenticated user
615
+ * @summary Delete user pbx audio
616
+ * @param {string} conversationPbxAudioUuid
617
+ * @param {*} [options] Override http request option.
618
+ * @throws {RequiredError}
619
+ * @memberof ConversationApiInterface
620
+ */
621
+ deleteUserPbxAudioRaw(requestParameters: DeleteUserPbxAudioRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ConversationPbxAudioResponse>>;
622
+ /**
623
+ * Delete a pbx audio file owned by the authenticated user
624
+ * Delete user pbx audio
625
+ */
626
+ deleteUserPbxAudio(requestParameters: DeleteUserPbxAudioRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ConversationPbxAudioResponse>;
600
627
  /**
601
628
  * Called periodically by the conversation API to keep the session alive.
602
629
  * @summary Agent keep alive
@@ -1384,6 +1411,33 @@ export interface ConversationApiInterface {
1384
1411
  * Get pbx voicemailMailboxes
1385
1412
  */
1386
1413
  getPbxVoicemailMailboxes(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ConversationPbxVoicemailMailboxesResponse>;
1414
+ /**
1415
+ * Retrieve a pbx audio file owned by the authenticated user
1416
+ * @summary Get user pbx audio
1417
+ * @param {string} conversationPbxAudioUuid
1418
+ * @param {*} [options] Override http request option.
1419
+ * @throws {RequiredError}
1420
+ * @memberof ConversationApiInterface
1421
+ */
1422
+ getUserPbxAudioRaw(requestParameters: GetUserPbxAudioRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ConversationPbxAudioResponse>>;
1423
+ /**
1424
+ * Retrieve a pbx audio file owned by the authenticated user
1425
+ * Get user pbx audio
1426
+ */
1427
+ getUserPbxAudio(requestParameters: GetUserPbxAudioRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ConversationPbxAudioResponse>;
1428
+ /**
1429
+ * Retrieve pbx audio files owned by the authenticated user
1430
+ * @summary Get user pbx audios
1431
+ * @param {*} [options] Override http request option.
1432
+ * @throws {RequiredError}
1433
+ * @memberof ConversationApiInterface
1434
+ */
1435
+ getUserPbxAudiosRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ConversationPbxAudiosResponse>>;
1436
+ /**
1437
+ * Retrieve pbx audio files owned by the authenticated user
1438
+ * Get user pbx audios
1439
+ */
1440
+ getUserPbxAudios(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ConversationPbxAudiosResponse>;
1387
1441
  /**
1388
1442
  * Retrieve virtual agent budget
1389
1443
  * @summary Get virtual agent budget
@@ -1608,6 +1662,20 @@ export interface ConversationApiInterface {
1608
1662
  * Insert pbx voicemailMailbox
1609
1663
  */
1610
1664
  insertPbxVoicemailMailbox(requestParameters: InsertPbxVoicemailMailboxRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ConversationPbxVoicemailMailboxResponse>;
1665
+ /**
1666
+ * Insert a pbx audio file for the authenticated user
1667
+ * @summary Insert user pbx audio
1668
+ * @param {ConversationPbxAudio} pbxAudio Pbx Audio
1669
+ * @param {*} [options] Override http request option.
1670
+ * @throws {RequiredError}
1671
+ * @memberof ConversationApiInterface
1672
+ */
1673
+ insertUserPbxAudioRaw(requestParameters: InsertUserPbxAudioRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ConversationPbxAudioResponse>>;
1674
+ /**
1675
+ * Insert a pbx audio file for the authenticated user
1676
+ * Insert user pbx audio
1677
+ */
1678
+ insertUserPbxAudio(requestParameters: InsertUserPbxAudioRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ConversationPbxAudioResponse>;
1611
1679
  /**
1612
1680
  * Join a conversation
1613
1681
  * @summary Join a conversation
@@ -2071,6 +2139,21 @@ export interface ConversationApiInterface {
2071
2139
  * Update pbx voicemailMailbox
2072
2140
  */
2073
2141
  updatePbxVoicemailMailbox(requestParameters: UpdatePbxVoicemailMailboxRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ConversationPbxVoicemailMailboxResponse>;
2142
+ /**
2143
+ * Update a pbx audio file owned by the authenticated user
2144
+ * @summary Update user pbx audio
2145
+ * @param {string} conversationPbxAudioUuid
2146
+ * @param {ConversationPbxAudio} pbxAudio Pbx Audio
2147
+ * @param {*} [options] Override http request option.
2148
+ * @throws {RequiredError}
2149
+ * @memberof ConversationApiInterface
2150
+ */
2151
+ updateUserPbxAudioRaw(requestParameters: UpdateUserPbxAudioRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ConversationPbxAudioResponse>>;
2152
+ /**
2153
+ * Update a pbx audio file owned by the authenticated user
2154
+ * Update user pbx audio
2155
+ */
2156
+ updateUserPbxAudio(requestParameters: UpdateUserPbxAudioRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ConversationPbxAudioResponse>;
2074
2157
  /**
2075
2158
  * Update virtual agent budget
2076
2159
  * @summary Update virtual agent budget
@@ -2274,6 +2357,16 @@ export declare class ConversationApi extends runtime.BaseAPI implements Conversa
2274
2357
  * Delete pbx voicemailMailbox
2275
2358
  */
2276
2359
  deletePbxVoicemailMailbox(requestParameters: DeletePbxVoicemailMailboxRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ConversationPbxVoicemailMailboxResponse>;
2360
+ /**
2361
+ * Delete a pbx audio file owned by the authenticated user
2362
+ * Delete user pbx audio
2363
+ */
2364
+ deleteUserPbxAudioRaw(requestParameters: DeleteUserPbxAudioRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ConversationPbxAudioResponse>>;
2365
+ /**
2366
+ * Delete a pbx audio file owned by the authenticated user
2367
+ * Delete user pbx audio
2368
+ */
2369
+ deleteUserPbxAudio(requestParameters: DeleteUserPbxAudioRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ConversationPbxAudioResponse>;
2277
2370
  /**
2278
2371
  * Called periodically by the conversation API to keep the session alive.
2279
2372
  * Agent keep alive
@@ -2844,6 +2937,26 @@ export declare class ConversationApi extends runtime.BaseAPI implements Conversa
2844
2937
  * Get pbx voicemailMailboxes
2845
2938
  */
2846
2939
  getPbxVoicemailMailboxes(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ConversationPbxVoicemailMailboxesResponse>;
2940
+ /**
2941
+ * Retrieve a pbx audio file owned by the authenticated user
2942
+ * Get user pbx audio
2943
+ */
2944
+ getUserPbxAudioRaw(requestParameters: GetUserPbxAudioRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ConversationPbxAudioResponse>>;
2945
+ /**
2946
+ * Retrieve a pbx audio file owned by the authenticated user
2947
+ * Get user pbx audio
2948
+ */
2949
+ getUserPbxAudio(requestParameters: GetUserPbxAudioRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ConversationPbxAudioResponse>;
2950
+ /**
2951
+ * Retrieve pbx audio files owned by the authenticated user
2952
+ * Get user pbx audios
2953
+ */
2954
+ getUserPbxAudiosRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ConversationPbxAudiosResponse>>;
2955
+ /**
2956
+ * Retrieve pbx audio files owned by the authenticated user
2957
+ * Get user pbx audios
2958
+ */
2959
+ getUserPbxAudios(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ConversationPbxAudiosResponse>;
2847
2960
  /**
2848
2961
  * Retrieve virtual agent budget
2849
2962
  * Get virtual agent budget
@@ -3004,6 +3117,16 @@ export declare class ConversationApi extends runtime.BaseAPI implements Conversa
3004
3117
  * Insert pbx voicemailMailbox
3005
3118
  */
3006
3119
  insertPbxVoicemailMailbox(requestParameters: InsertPbxVoicemailMailboxRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ConversationPbxVoicemailMailboxResponse>;
3120
+ /**
3121
+ * Insert a pbx audio file for the authenticated user
3122
+ * Insert user pbx audio
3123
+ */
3124
+ insertUserPbxAudioRaw(requestParameters: InsertUserPbxAudioRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ConversationPbxAudioResponse>>;
3125
+ /**
3126
+ * Insert a pbx audio file for the authenticated user
3127
+ * Insert user pbx audio
3128
+ */
3129
+ insertUserPbxAudio(requestParameters: InsertUserPbxAudioRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ConversationPbxAudioResponse>;
3007
3130
  /**
3008
3131
  * Join a conversation
3009
3132
  * Join a conversation
@@ -3314,6 +3437,16 @@ export declare class ConversationApi extends runtime.BaseAPI implements Conversa
3314
3437
  * Update pbx voicemailMailbox
3315
3438
  */
3316
3439
  updatePbxVoicemailMailbox(requestParameters: UpdatePbxVoicemailMailboxRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ConversationPbxVoicemailMailboxResponse>;
3440
+ /**
3441
+ * Update a pbx audio file owned by the authenticated user
3442
+ * Update user pbx audio
3443
+ */
3444
+ updateUserPbxAudioRaw(requestParameters: UpdateUserPbxAudioRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ConversationPbxAudioResponse>>;
3445
+ /**
3446
+ * Update a pbx audio file owned by the authenticated user
3447
+ * Update user pbx audio
3448
+ */
3449
+ updateUserPbxAudio(requestParameters: UpdateUserPbxAudioRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ConversationPbxAudioResponse>;
3317
3450
  /**
3318
3451
  * Update virtual agent budget
3319
3452
  * Update virtual agent budget
@@ -1073,6 +1073,65 @@ var ConversationApi = /** @class */ (function (_super) {
1073
1073
  });
1074
1074
  });
1075
1075
  };
1076
+ /**
1077
+ * Delete a pbx audio file owned by the authenticated user
1078
+ * Delete user pbx audio
1079
+ */
1080
+ ConversationApi.prototype.deleteUserPbxAudioRaw = function (requestParameters, initOverrides) {
1081
+ return __awaiter(this, void 0, void 0, function () {
1082
+ var queryParameters, headerParameters, _a, _b, response;
1083
+ return __generator(this, function (_c) {
1084
+ switch (_c.label) {
1085
+ case 0:
1086
+ if (requestParameters.conversationPbxAudioUuid === null || requestParameters.conversationPbxAudioUuid === undefined) {
1087
+ throw new runtime.RequiredError('conversationPbxAudioUuid', 'Required parameter requestParameters.conversationPbxAudioUuid was null or undefined when calling deleteUserPbxAudio.');
1088
+ }
1089
+ queryParameters = {};
1090
+ headerParameters = {};
1091
+ if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 2];
1092
+ // oauth required
1093
+ _a = headerParameters;
1094
+ _b = "Authorization";
1095
+ return [4 /*yield*/, this.configuration.accessToken("ultraCartOauth", ["conversation_write"])];
1096
+ case 1:
1097
+ // oauth required
1098
+ _a[_b] = _c.sent();
1099
+ _c.label = 2;
1100
+ case 2:
1101
+ if (this.configuration && this.configuration.apiKey) {
1102
+ headerParameters["x-ultracart-simple-key"] = this.configuration.apiKey("x-ultracart-simple-key"); // ultraCartSimpleApiKey authentication
1103
+ }
1104
+ return [4 /*yield*/, this.request({
1105
+ path: "/conversation/pbx/audio/user/{conversationPbxAudioUuid}".replace("{".concat("conversationPbxAudioUuid", "}"), encodeURIComponent(String(requestParameters.conversationPbxAudioUuid))),
1106
+ method: 'DELETE',
1107
+ headers: headerParameters,
1108
+ query: queryParameters,
1109
+ }, initOverrides)];
1110
+ case 3:
1111
+ response = _c.sent();
1112
+ return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, models_1.ConversationPbxAudioResponseFromJSON)(jsonValue); })];
1113
+ }
1114
+ });
1115
+ });
1116
+ };
1117
+ /**
1118
+ * Delete a pbx audio file owned by the authenticated user
1119
+ * Delete user pbx audio
1120
+ */
1121
+ ConversationApi.prototype.deleteUserPbxAudio = function (requestParameters, initOverrides) {
1122
+ return __awaiter(this, void 0, void 0, function () {
1123
+ var response;
1124
+ return __generator(this, function (_a) {
1125
+ switch (_a.label) {
1126
+ case 0: return [4 /*yield*/, this.deleteUserPbxAudioRaw(requestParameters, initOverrides)];
1127
+ case 1:
1128
+ response = _a.sent();
1129
+ return [4 /*yield*/, response.value()];
1130
+ case 2: return [2 /*return*/, _a.sent()];
1131
+ }
1132
+ });
1133
+ });
1134
+ };
1076
1135
  /**
1077
1136
  * Called periodically by the conversation API to keep the session alive.
1078
1137
  * Agent keep alive
@@ -4409,6 +4468,121 @@ var ConversationApi = /** @class */ (function (_super) {
4409
4468
  });
4410
4469
  });
4411
4470
  };
4471
+ /**
4472
+ * Retrieve a pbx audio file owned by the authenticated user
4473
+ * Get user pbx audio
4474
+ */
4475
+ ConversationApi.prototype.getUserPbxAudioRaw = function (requestParameters, initOverrides) {
4476
+ return __awaiter(this, void 0, void 0, function () {
4477
+ var queryParameters, headerParameters, _a, _b, response;
4478
+ return __generator(this, function (_c) {
4479
+ switch (_c.label) {
4480
+ case 0:
4481
+ if (requestParameters.conversationPbxAudioUuid === null || requestParameters.conversationPbxAudioUuid === undefined) {
4482
+ throw new runtime.RequiredError('conversationPbxAudioUuid', 'Required parameter requestParameters.conversationPbxAudioUuid was null or undefined when calling getUserPbxAudio.');
4483
+ }
4484
+ queryParameters = {};
4485
+ headerParameters = {};
4486
+ if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 2];
4487
+ // oauth required
4488
+ _a = headerParameters;
4489
+ _b = "Authorization";
4490
+ return [4 /*yield*/, this.configuration.accessToken("ultraCartOauth", ["conversation_read"])];
4491
+ case 1:
4492
+ // oauth required
4493
+ _a[_b] = _c.sent();
4494
+ _c.label = 2;
4495
+ case 2:
4496
+ if (this.configuration && this.configuration.apiKey) {
4497
+ headerParameters["x-ultracart-simple-key"] = this.configuration.apiKey("x-ultracart-simple-key"); // ultraCartSimpleApiKey authentication
4498
+ }
4499
+ return [4 /*yield*/, this.request({
4500
+ path: "/conversation/pbx/audio/user/{conversationPbxAudioUuid}".replace("{".concat("conversationPbxAudioUuid", "}"), encodeURIComponent(String(requestParameters.conversationPbxAudioUuid))),
4501
+ method: 'GET',
4502
+ headers: headerParameters,
4503
+ query: queryParameters,
4504
+ }, initOverrides)];
4505
+ case 3:
4506
+ response = _c.sent();
4507
+ return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, models_1.ConversationPbxAudioResponseFromJSON)(jsonValue); })];
4508
+ }
4509
+ });
4510
+ });
4511
+ };
4512
+ /**
4513
+ * Retrieve a pbx audio file owned by the authenticated user
4514
+ * Get user pbx audio
4515
+ */
4516
+ ConversationApi.prototype.getUserPbxAudio = function (requestParameters, initOverrides) {
4517
+ return __awaiter(this, void 0, void 0, function () {
4518
+ var response;
4519
+ return __generator(this, function (_a) {
4520
+ switch (_a.label) {
4521
+ case 0: return [4 /*yield*/, this.getUserPbxAudioRaw(requestParameters, initOverrides)];
4522
+ case 1:
4523
+ response = _a.sent();
4524
+ return [4 /*yield*/, response.value()];
4525
+ case 2: return [2 /*return*/, _a.sent()];
4526
+ }
4527
+ });
4528
+ });
4529
+ };
4530
+ /**
4531
+ * Retrieve pbx audio files owned by the authenticated user
4532
+ * Get user pbx audios
4533
+ */
4534
+ ConversationApi.prototype.getUserPbxAudiosRaw = function (initOverrides) {
4535
+ return __awaiter(this, void 0, void 0, function () {
4536
+ var queryParameters, headerParameters, _a, _b, response;
4537
+ return __generator(this, function (_c) {
4538
+ switch (_c.label) {
4539
+ case 0:
4540
+ queryParameters = {};
4541
+ headerParameters = {};
4542
+ if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 2];
4543
+ // oauth required
4544
+ _a = headerParameters;
4545
+ _b = "Authorization";
4546
+ return [4 /*yield*/, this.configuration.accessToken("ultraCartOauth", ["conversation_read"])];
4547
+ case 1:
4548
+ // oauth required
4549
+ _a[_b] = _c.sent();
4550
+ _c.label = 2;
4551
+ case 2:
4552
+ if (this.configuration && this.configuration.apiKey) {
4553
+ headerParameters["x-ultracart-simple-key"] = this.configuration.apiKey("x-ultracart-simple-key"); // ultraCartSimpleApiKey authentication
4554
+ }
4555
+ return [4 /*yield*/, this.request({
4556
+ path: "/conversation/pbx/audio/user",
4557
+ method: 'GET',
4558
+ headers: headerParameters,
4559
+ query: queryParameters,
4560
+ }, initOverrides)];
4561
+ case 3:
4562
+ response = _c.sent();
4563
+ return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, models_1.ConversationPbxAudiosResponseFromJSON)(jsonValue); })];
4564
+ }
4565
+ });
4566
+ });
4567
+ };
4568
+ /**
4569
+ * Retrieve pbx audio files owned by the authenticated user
4570
+ * Get user pbx audios
4571
+ */
4572
+ ConversationApi.prototype.getUserPbxAudios = function (initOverrides) {
4573
+ return __awaiter(this, void 0, void 0, function () {
4574
+ var response;
4575
+ return __generator(this, function (_a) {
4576
+ switch (_a.label) {
4577
+ case 0: return [4 /*yield*/, this.getUserPbxAudiosRaw(initOverrides)];
4578
+ case 1:
4579
+ response = _a.sent();
4580
+ return [4 /*yield*/, response.value()];
4581
+ case 2: return [2 /*return*/, _a.sent()];
4582
+ }
4583
+ });
4584
+ });
4585
+ };
4412
4586
  /**
4413
4587
  * Retrieve virtual agent budget
4414
4588
  * Get virtual agent budget
@@ -5381,6 +5555,67 @@ var ConversationApi = /** @class */ (function (_super) {
5381
5555
  });
5382
5556
  });
5383
5557
  };
5558
+ /**
5559
+ * Insert a pbx audio file for the authenticated user
5560
+ * Insert user pbx audio
5561
+ */
5562
+ ConversationApi.prototype.insertUserPbxAudioRaw = function (requestParameters, initOverrides) {
5563
+ return __awaiter(this, void 0, void 0, function () {
5564
+ var queryParameters, headerParameters, _a, _b, response;
5565
+ return __generator(this, function (_c) {
5566
+ switch (_c.label) {
5567
+ case 0:
5568
+ if (requestParameters.pbxAudio === null || requestParameters.pbxAudio === undefined) {
5569
+ throw new runtime.RequiredError('pbxAudio', 'Required parameter requestParameters.pbxAudio was null or undefined when calling insertUserPbxAudio.');
5570
+ }
5571
+ queryParameters = {};
5572
+ headerParameters = {};
5573
+ headerParameters['Content-Type'] = 'application/json';
5574
+ if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 2];
5575
+ // oauth required
5576
+ _a = headerParameters;
5577
+ _b = "Authorization";
5578
+ return [4 /*yield*/, this.configuration.accessToken("ultraCartOauth", ["conversation_write"])];
5579
+ case 1:
5580
+ // oauth required
5581
+ _a[_b] = _c.sent();
5582
+ _c.label = 2;
5583
+ case 2:
5584
+ if (this.configuration && this.configuration.apiKey) {
5585
+ headerParameters["x-ultracart-simple-key"] = this.configuration.apiKey("x-ultracart-simple-key"); // ultraCartSimpleApiKey authentication
5586
+ }
5587
+ return [4 /*yield*/, this.request({
5588
+ path: "/conversation/pbx/audio/user",
5589
+ method: 'POST',
5590
+ headers: headerParameters,
5591
+ query: queryParameters,
5592
+ body: (0, models_1.ConversationPbxAudioToJSON)(requestParameters.pbxAudio),
5593
+ }, initOverrides)];
5594
+ case 3:
5595
+ response = _c.sent();
5596
+ return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, models_1.ConversationPbxAudioResponseFromJSON)(jsonValue); })];
5597
+ }
5598
+ });
5599
+ });
5600
+ };
5601
+ /**
5602
+ * Insert a pbx audio file for the authenticated user
5603
+ * Insert user pbx audio
5604
+ */
5605
+ ConversationApi.prototype.insertUserPbxAudio = function (requestParameters, initOverrides) {
5606
+ return __awaiter(this, void 0, void 0, function () {
5607
+ var response;
5608
+ return __generator(this, function (_a) {
5609
+ switch (_a.label) {
5610
+ case 0: return [4 /*yield*/, this.insertUserPbxAudioRaw(requestParameters, initOverrides)];
5611
+ case 1:
5612
+ response = _a.sent();
5613
+ return [4 /*yield*/, response.value()];
5614
+ case 2: return [2 /*return*/, _a.sent()];
5615
+ }
5616
+ });
5617
+ });
5618
+ };
5384
5619
  /**
5385
5620
  * Join a conversation
5386
5621
  * Join a conversation
@@ -7327,6 +7562,70 @@ var ConversationApi = /** @class */ (function (_super) {
7327
7562
  });
7328
7563
  });
7329
7564
  };
7565
+ /**
7566
+ * Update a pbx audio file owned by the authenticated user
7567
+ * Update user pbx audio
7568
+ */
7569
+ ConversationApi.prototype.updateUserPbxAudioRaw = function (requestParameters, initOverrides) {
7570
+ return __awaiter(this, void 0, void 0, function () {
7571
+ var queryParameters, headerParameters, _a, _b, response;
7572
+ return __generator(this, function (_c) {
7573
+ switch (_c.label) {
7574
+ case 0:
7575
+ if (requestParameters.conversationPbxAudioUuid === null || requestParameters.conversationPbxAudioUuid === undefined) {
7576
+ throw new runtime.RequiredError('conversationPbxAudioUuid', 'Required parameter requestParameters.conversationPbxAudioUuid was null or undefined when calling updateUserPbxAudio.');
7577
+ }
7578
+ if (requestParameters.pbxAudio === null || requestParameters.pbxAudio === undefined) {
7579
+ throw new runtime.RequiredError('pbxAudio', 'Required parameter requestParameters.pbxAudio was null or undefined when calling updateUserPbxAudio.');
7580
+ }
7581
+ queryParameters = {};
7582
+ headerParameters = {};
7583
+ headerParameters['Content-Type'] = 'application/json';
7584
+ if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 2];
7585
+ // oauth required
7586
+ _a = headerParameters;
7587
+ _b = "Authorization";
7588
+ return [4 /*yield*/, this.configuration.accessToken("ultraCartOauth", ["conversation_write"])];
7589
+ case 1:
7590
+ // oauth required
7591
+ _a[_b] = _c.sent();
7592
+ _c.label = 2;
7593
+ case 2:
7594
+ if (this.configuration && this.configuration.apiKey) {
7595
+ headerParameters["x-ultracart-simple-key"] = this.configuration.apiKey("x-ultracart-simple-key"); // ultraCartSimpleApiKey authentication
7596
+ }
7597
+ return [4 /*yield*/, this.request({
7598
+ path: "/conversation/pbx/audio/user/{conversationPbxAudioUuid}".replace("{".concat("conversationPbxAudioUuid", "}"), encodeURIComponent(String(requestParameters.conversationPbxAudioUuid))),
7599
+ method: 'PUT',
7600
+ headers: headerParameters,
7601
+ query: queryParameters,
7602
+ body: (0, models_1.ConversationPbxAudioToJSON)(requestParameters.pbxAudio),
7603
+ }, initOverrides)];
7604
+ case 3:
7605
+ response = _c.sent();
7606
+ return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, models_1.ConversationPbxAudioResponseFromJSON)(jsonValue); })];
7607
+ }
7608
+ });
7609
+ });
7610
+ };
7611
+ /**
7612
+ * Update a pbx audio file owned by the authenticated user
7613
+ * Update user pbx audio
7614
+ */
7615
+ ConversationApi.prototype.updateUserPbxAudio = function (requestParameters, initOverrides) {
7616
+ return __awaiter(this, void 0, void 0, function () {
7617
+ var response;
7618
+ return __generator(this, function (_a) {
7619
+ switch (_a.label) {
7620
+ case 0: return [4 /*yield*/, this.updateUserPbxAudioRaw(requestParameters, initOverrides)];
7621
+ case 1:
7622
+ response = _a.sent();
7623
+ return [4 /*yield*/, response.value()];
7624
+ case 2: return [2 /*return*/, _a.sent()];
7625
+ }
7626
+ });
7627
+ });
7628
+ };
7330
7629
  /**
7331
7630
  * Update virtual agent budget
7332
7631
  * Update virtual agent budget
@@ -17,6 +17,11 @@ export interface OauthAccessTokenRequest {
17
17
  code?: string;
18
18
  redirectUri?: string;
19
19
  refreshToken?: string;
20
+ deviceCode?: string;
21
+ }
22
+ export interface OauthDeviceAuthorizeRequest {
23
+ clientId: string;
24
+ scope: string;
20
25
  }
21
26
  export interface OauthRevokeRequest {
22
27
  clientId: string;
@@ -37,6 +42,7 @@ export interface OauthApiInterface {
37
42
  * @param {string} [code] Authorization code received back from the browser redirect
38
43
  * @param {string} [redirectUri] The URI that you redirect the browser to start the authorization process
39
44
  * @param {string} [refreshToken] The refresh token received during the original grant_type&#x3D;authorization_code that can be used to return a new access token
45
+ * @param {string} [deviceCode] The device code received from /oauth/device/authorize
40
46
  * @param {*} [options] Override http request option.
41
47
  * @throws {RequiredError}
42
48
  * @memberof OauthApiInterface
@@ -47,6 +53,21 @@ export interface OauthApiInterface {
47
53
  * Exchange authorization code for access token.
48
54
  */
49
55
  oauthAccessToken(requestParameters: OauthAccessTokenRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<OauthTokenResponse>;
56
+ /**
57
+ * Initiates the device authorization flow by returning a device code and user code. The device displays the user code to the merchant, who visits the verification URI to approve the request. RFC 8628.
58
+ * @summary Initiate a device authorization flow.
59
+ * @param {string} clientId The OAuth application client_id.
60
+ * @param {string} scope The application-level scope (e.g., crm, ultraship).
61
+ * @param {*} [options] Override http request option.
62
+ * @throws {RequiredError}
63
+ * @memberof OauthApiInterface
64
+ */
65
+ oauthDeviceAuthorizeRaw(requestParameters: OauthDeviceAuthorizeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
66
+ /**
67
+ * Initiates the device authorization flow by returning a device code and user code. The device displays the user code to the merchant, who visits the verification URI to approve the request. RFC 8628.
68
+ * Initiate a device authorization flow.
69
+ */
70
+ oauthDeviceAuthorize(requestParameters: OauthDeviceAuthorizeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
50
71
  /**
51
72
  * Revokes the OAuth application associated with the specified client_id and token.
52
73
  * @summary Revoke this OAuth application.
@@ -77,6 +98,16 @@ export declare class OauthApi extends runtime.BaseAPI implements OauthApiInterfa
77
98
  * Exchange authorization code for access token.
78
99
  */
79
100
  oauthAccessToken(requestParameters: OauthAccessTokenRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<OauthTokenResponse>;
101
+ /**
102
+ * Initiates the device authorization flow by returning a device code and user code. The device displays the user code to the merchant, who visits the verification URI to approve the request. RFC 8628.
103
+ * Initiate a device authorization flow.
104
+ */
105
+ oauthDeviceAuthorizeRaw(requestParameters: OauthDeviceAuthorizeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
106
+ /**
107
+ * Initiates the device authorization flow by returning a device code and user code. The device displays the user code to the merchant, who visits the verification URI to approve the request. RFC 8628.
108
+ * Initiate a device authorization flow.
109
+ */
110
+ oauthDeviceAuthorize(requestParameters: OauthDeviceAuthorizeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
80
111
  /**
81
112
  * Revokes the OAuth application associated with the specified client_id and token.
82
113
  * Revoke this OAuth application.