ultracart_rest_api_v2_typescript 4.0.202 → 4.0.203

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.
@@ -847,6 +847,8 @@ src/models/WebhookSampleRequest.ts
847
847
  src/models/WebhookSampleRequestResponse.ts
848
848
  src/models/WebhooksResponse.ts
849
849
  src/models/Weight.ts
850
+ src/models/WorkflowAgentAuth.ts
851
+ src/models/WorkflowAgentAuthResponse.ts
850
852
  src/models/WorkflowAttachment.ts
851
853
  src/models/WorkflowAttachmentUploadUrl.ts
852
854
  src/models/WorkflowAttachmentUploadUrlResponse.ts
package/README.md CHANGED
@@ -1,4 +1,4 @@
1
- ## ultracart_rest_api_v2_typescript@4.0.202
1
+ ## ultracart_rest_api_v2_typescript@4.0.203
2
2
 
3
3
  This generator creates TypeScript/JavaScript client that utilizes [Fetch API](https://fetch.spec.whatwg.org/). The generated Node module can be used in the following environments:
4
4
 
@@ -36,7 +36,7 @@ navigate to the folder of your consuming project and run one of the following co
36
36
  _published:_
37
37
 
38
38
  ```
39
- npm install ultracart_rest_api_v2_typescript@4.0.202 --save
39
+ npm install ultracart_rest_api_v2_typescript@4.0.203 --save
40
40
  ```
41
41
 
42
42
  _unPublished (not recommended):_
@@ -54,6 +54,7 @@ Not every change is committed to every SDK.
54
54
 
55
55
  | Version | Date | Comments |
56
56
  | --: | :-: | --- |
57
+ | 4.0.203 | 03/15/2024 | workflow - getWorkflowAgentWebsocketAuthorization method added |
57
58
  | 4.0.202 | 03/08/2024 | added getWorkflowTaskTags method |
58
59
  | 4.0.201 | 02/27/2024 | esp - sms statistic layer |
59
60
  | 4.0.200 | 02/20/2024 | Add tag support to CouponAmountOffItems, CouponBuyOneGetOneLimit, CouponDiscountItemWithItemPurchase, CouponFreeItemWithItemPurchase, CouponPercentOffItemsWithItemsPurchase |
@@ -10,7 +10,7 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
  import * as runtime from '../runtime';
13
- import { WorkflowAttachmentUploadUrlResponse, WorkflowGroupsResponse, WorkflowTask, WorkflowTaskResponse, WorkflowTaskTagsResponse, WorkflowTasksRequest, WorkflowTasksResponse, WorkflowUserResponse, WorkflowUsersResponse } from '../models';
13
+ import { WorkflowAgentAuthResponse, WorkflowAttachmentUploadUrlResponse, WorkflowGroupsResponse, WorkflowTask, WorkflowTaskResponse, WorkflowTaskTagsResponse, WorkflowTasksRequest, WorkflowTasksResponse, WorkflowUserResponse, WorkflowUsersResponse } from '../models';
14
14
  export interface GetWorkflowAssignmentGroupsRequest {
15
15
  limit?: number;
16
16
  offset?: number;
@@ -49,6 +49,19 @@ export interface UpdateWorkflowTaskRequest {
49
49
  * @interface WorkflowApiInterface
50
50
  */
51
51
  export interface WorkflowApiInterface {
52
+ /**
53
+ * Retrieve a JWT to authorize an agent to make a websocket connection.
54
+ * @summary Get agent websocket authorization
55
+ * @param {*} [options] Override http request option.
56
+ * @throws {RequiredError}
57
+ * @memberof WorkflowApiInterface
58
+ */
59
+ getWorkflowAgentWebsocketAuthorizationRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<WorkflowAgentAuthResponse>>;
60
+ /**
61
+ * Retrieve a JWT to authorize an agent to make a websocket connection.
62
+ * Get agent websocket authorization
63
+ */
64
+ getWorkflowAgentWebsocketAuthorization(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<WorkflowAgentAuthResponse>;
52
65
  /**
53
66
  * Retrieve a list of groups that workflow tasks can be assigned to
54
67
  * @summary Retrieve a list of groups that workflow tasks can be assigned to
@@ -199,6 +212,16 @@ export interface WorkflowApiInterface {
199
212
  *
200
213
  */
201
214
  export declare class WorkflowApi extends runtime.BaseAPI implements WorkflowApiInterface {
215
+ /**
216
+ * Retrieve a JWT to authorize an agent to make a websocket connection.
217
+ * Get agent websocket authorization
218
+ */
219
+ getWorkflowAgentWebsocketAuthorizationRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<WorkflowAgentAuthResponse>>;
220
+ /**
221
+ * Retrieve a JWT to authorize an agent to make a websocket connection.
222
+ * Get agent websocket authorization
223
+ */
224
+ getWorkflowAgentWebsocketAuthorization(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<WorkflowAgentAuthResponse>;
202
225
  /**
203
226
  * Retrieve a list of groups that workflow tasks can be assigned to
204
227
  * Retrieve a list of groups that workflow tasks can be assigned to
@@ -75,6 +75,62 @@ var WorkflowApi = /** @class */ (function (_super) {
75
75
  function WorkflowApi() {
76
76
  return _super !== null && _super.apply(this, arguments) || this;
77
77
  }
78
+ /**
79
+ * Retrieve a JWT to authorize an agent to make a websocket connection.
80
+ * Get agent websocket authorization
81
+ */
82
+ WorkflowApi.prototype.getWorkflowAgentWebsocketAuthorizationRaw = function (initOverrides) {
83
+ return __awaiter(this, void 0, void 0, function () {
84
+ var queryParameters, headerParameters, _a, _b, response;
85
+ return __generator(this, function (_c) {
86
+ switch (_c.label) {
87
+ case 0:
88
+ queryParameters = {};
89
+ headerParameters = {};
90
+ if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 2];
91
+ // oauth required
92
+ _a = headerParameters;
93
+ _b = "Authorization";
94
+ return [4 /*yield*/, this.configuration.accessToken("ultraCartOauth", ["workflow_write"])];
95
+ case 1:
96
+ // oauth required
97
+ _a[_b] = _c.sent();
98
+ _c.label = 2;
99
+ case 2:
100
+ if (this.configuration && this.configuration.apiKey) {
101
+ headerParameters["x-ultracart-simple-key"] = this.configuration.apiKey("x-ultracart-simple-key"); // ultraCartSimpleApiKey authentication
102
+ }
103
+ return [4 /*yield*/, this.request({
104
+ path: "/workflow/agent/auth",
105
+ method: 'PUT',
106
+ headers: headerParameters,
107
+ query: queryParameters,
108
+ }, initOverrides)];
109
+ case 3:
110
+ response = _c.sent();
111
+ return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, models_1.WorkflowAgentAuthResponseFromJSON)(jsonValue); })];
112
+ }
113
+ });
114
+ });
115
+ };
116
+ /**
117
+ * Retrieve a JWT to authorize an agent to make a websocket connection.
118
+ * Get agent websocket authorization
119
+ */
120
+ WorkflowApi.prototype.getWorkflowAgentWebsocketAuthorization = function (initOverrides) {
121
+ return __awaiter(this, void 0, void 0, function () {
122
+ var response;
123
+ return __generator(this, function (_a) {
124
+ switch (_a.label) {
125
+ case 0: return [4 /*yield*/, this.getWorkflowAgentWebsocketAuthorizationRaw(initOverrides)];
126
+ case 1:
127
+ response = _a.sent();
128
+ return [4 /*yield*/, response.value()];
129
+ case 2: return [2 /*return*/, _a.sent()];
130
+ }
131
+ });
132
+ });
133
+ };
78
134
  /**
79
135
  * Retrieve a list of groups that workflow tasks can be assigned to
80
136
  * Retrieve a list of groups that workflow tasks can be assigned to
@@ -124,6 +124,18 @@ export interface ConversationPbxQueue {
124
124
  * @memberof ConversationPbxQueue
125
125
  */
126
126
  voicemail?: boolean;
127
+ /**
128
+ * Wait time in seconds before critical
129
+ * @type {number}
130
+ * @memberof ConversationPbxQueue
131
+ */
132
+ wait_critical_seconds?: number;
133
+ /**
134
+ * Wait time in seconds before warning
135
+ * @type {number}
136
+ * @memberof ConversationPbxQueue
137
+ */
138
+ wait_warning_seconds?: number;
127
139
  }
128
140
  export declare function ConversationPbxQueueFromJSON(json: any): ConversationPbxQueue;
129
141
  export declare function ConversationPbxQueueFromJSONTyped(json: any, ignoreDiscriminator: boolean): ConversationPbxQueue;
@@ -43,6 +43,8 @@ function ConversationPbxQueueFromJSONTyped(json, ignoreDiscriminator) {
43
43
  'twilio_taskrouter_workflow_sid': !(0, runtime_1.exists)(json, 'twilio_taskrouter_workflow_sid') ? undefined : json['twilio_taskrouter_workflow_sid'],
44
44
  'twilio_workspace_queue_sid': !(0, runtime_1.exists)(json, 'twilio_workspace_queue_sid') ? undefined : json['twilio_workspace_queue_sid'],
45
45
  'voicemail': !(0, runtime_1.exists)(json, 'voicemail') ? undefined : json['voicemail'],
46
+ 'wait_critical_seconds': !(0, runtime_1.exists)(json, 'wait_critical_seconds') ? undefined : json['wait_critical_seconds'],
47
+ 'wait_warning_seconds': !(0, runtime_1.exists)(json, 'wait_warning_seconds') ? undefined : json['wait_warning_seconds'],
46
48
  };
47
49
  }
48
50
  exports.ConversationPbxQueueFromJSONTyped = ConversationPbxQueueFromJSONTyped;
@@ -72,6 +74,8 @@ function ConversationPbxQueueToJSON(value) {
72
74
  'twilio_taskrouter_workflow_sid': value.twilio_taskrouter_workflow_sid,
73
75
  'twilio_workspace_queue_sid': value.twilio_workspace_queue_sid,
74
76
  'voicemail': value.voicemail,
77
+ 'wait_critical_seconds': value.wait_critical_seconds,
78
+ 'wait_warning_seconds': value.wait_warning_seconds,
75
79
  };
76
80
  }
77
81
  exports.ConversationPbxQueueToJSON = ConversationPbxQueueToJSON;
@@ -0,0 +1,39 @@
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 WorkflowAgentAuth
16
+ */
17
+ export interface WorkflowAgentAuth {
18
+ /**
19
+ *
20
+ * @type {string}
21
+ * @memberof WorkflowAgentAuth
22
+ */
23
+ jwt?: string;
24
+ /**
25
+ *
26
+ * @type {string}
27
+ * @memberof WorkflowAgentAuth
28
+ */
29
+ merchant_id?: string;
30
+ /**
31
+ *
32
+ * @type {string}
33
+ * @memberof WorkflowAgentAuth
34
+ */
35
+ websocket_url?: string;
36
+ }
37
+ export declare function WorkflowAgentAuthFromJSON(json: any): WorkflowAgentAuth;
38
+ export declare function WorkflowAgentAuthFromJSONTyped(json: any, ignoreDiscriminator: boolean): WorkflowAgentAuth;
39
+ export declare function WorkflowAgentAuthToJSON(value?: WorkflowAgentAuth | null): any;
@@ -0,0 +1,46 @@
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.WorkflowAgentAuthToJSON = exports.WorkflowAgentAuthFromJSONTyped = exports.WorkflowAgentAuthFromJSON = void 0;
17
+ var runtime_1 = require("../runtime");
18
+ function WorkflowAgentAuthFromJSON(json) {
19
+ return WorkflowAgentAuthFromJSONTyped(json, false);
20
+ }
21
+ exports.WorkflowAgentAuthFromJSON = WorkflowAgentAuthFromJSON;
22
+ function WorkflowAgentAuthFromJSONTyped(json, ignoreDiscriminator) {
23
+ if ((json === undefined) || (json === null)) {
24
+ return json;
25
+ }
26
+ return {
27
+ 'jwt': !(0, runtime_1.exists)(json, 'jwt') ? undefined : json['jwt'],
28
+ 'merchant_id': !(0, runtime_1.exists)(json, 'merchant_id') ? undefined : json['merchant_id'],
29
+ 'websocket_url': !(0, runtime_1.exists)(json, 'websocket_url') ? undefined : json['websocket_url'],
30
+ };
31
+ }
32
+ exports.WorkflowAgentAuthFromJSONTyped = WorkflowAgentAuthFromJSONTyped;
33
+ function WorkflowAgentAuthToJSON(value) {
34
+ if (value === undefined) {
35
+ return undefined;
36
+ }
37
+ if (value === null) {
38
+ return null;
39
+ }
40
+ return {
41
+ 'jwt': value.jwt,
42
+ 'merchant_id': value.merchant_id,
43
+ 'websocket_url': value.websocket_url,
44
+ };
45
+ }
46
+ exports.WorkflowAgentAuthToJSON = WorkflowAgentAuthToJSON;
@@ -0,0 +1,55 @@
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 { ModelError } from './ModelError';
13
+ import { ResponseMetadata } from './ResponseMetadata';
14
+ import { Warning } from './Warning';
15
+ import { WorkflowAgentAuth } from './WorkflowAgentAuth';
16
+ /**
17
+ *
18
+ * @export
19
+ * @interface WorkflowAgentAuthResponse
20
+ */
21
+ export interface WorkflowAgentAuthResponse {
22
+ /**
23
+ *
24
+ * @type {WorkflowAgentAuth}
25
+ * @memberof WorkflowAgentAuthResponse
26
+ */
27
+ agent_auth?: WorkflowAgentAuth;
28
+ /**
29
+ *
30
+ * @type {ModelError}
31
+ * @memberof WorkflowAgentAuthResponse
32
+ */
33
+ error?: ModelError;
34
+ /**
35
+ *
36
+ * @type {ResponseMetadata}
37
+ * @memberof WorkflowAgentAuthResponse
38
+ */
39
+ metadata?: ResponseMetadata;
40
+ /**
41
+ * Indicates if API call was successful
42
+ * @type {boolean}
43
+ * @memberof WorkflowAgentAuthResponse
44
+ */
45
+ success?: boolean;
46
+ /**
47
+ *
48
+ * @type {Warning}
49
+ * @memberof WorkflowAgentAuthResponse
50
+ */
51
+ warning?: Warning;
52
+ }
53
+ export declare function WorkflowAgentAuthResponseFromJSON(json: any): WorkflowAgentAuthResponse;
54
+ export declare function WorkflowAgentAuthResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): WorkflowAgentAuthResponse;
55
+ export declare function WorkflowAgentAuthResponseToJSON(value?: WorkflowAgentAuthResponse | null): any;
@@ -0,0 +1,54 @@
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.WorkflowAgentAuthResponseToJSON = exports.WorkflowAgentAuthResponseFromJSONTyped = exports.WorkflowAgentAuthResponseFromJSON = void 0;
17
+ var runtime_1 = require("../runtime");
18
+ var ModelError_1 = require("./ModelError");
19
+ var ResponseMetadata_1 = require("./ResponseMetadata");
20
+ var Warning_1 = require("./Warning");
21
+ var WorkflowAgentAuth_1 = require("./WorkflowAgentAuth");
22
+ function WorkflowAgentAuthResponseFromJSON(json) {
23
+ return WorkflowAgentAuthResponseFromJSONTyped(json, false);
24
+ }
25
+ exports.WorkflowAgentAuthResponseFromJSON = WorkflowAgentAuthResponseFromJSON;
26
+ function WorkflowAgentAuthResponseFromJSONTyped(json, ignoreDiscriminator) {
27
+ if ((json === undefined) || (json === null)) {
28
+ return json;
29
+ }
30
+ return {
31
+ 'agent_auth': !(0, runtime_1.exists)(json, 'agent_auth') ? undefined : (0, WorkflowAgentAuth_1.WorkflowAgentAuthFromJSON)(json['agent_auth']),
32
+ 'error': !(0, runtime_1.exists)(json, 'error') ? undefined : (0, ModelError_1.ModelErrorFromJSON)(json['error']),
33
+ 'metadata': !(0, runtime_1.exists)(json, 'metadata') ? undefined : (0, ResponseMetadata_1.ResponseMetadataFromJSON)(json['metadata']),
34
+ 'success': !(0, runtime_1.exists)(json, 'success') ? undefined : json['success'],
35
+ 'warning': !(0, runtime_1.exists)(json, 'warning') ? undefined : (0, Warning_1.WarningFromJSON)(json['warning']),
36
+ };
37
+ }
38
+ exports.WorkflowAgentAuthResponseFromJSONTyped = WorkflowAgentAuthResponseFromJSONTyped;
39
+ function WorkflowAgentAuthResponseToJSON(value) {
40
+ if (value === undefined) {
41
+ return undefined;
42
+ }
43
+ if (value === null) {
44
+ return null;
45
+ }
46
+ return {
47
+ 'agent_auth': (0, WorkflowAgentAuth_1.WorkflowAgentAuthToJSON)(value.agent_auth),
48
+ 'error': (0, ModelError_1.ModelErrorToJSON)(value.error),
49
+ 'metadata': (0, ResponseMetadata_1.ResponseMetadataToJSON)(value.metadata),
50
+ 'success': value.success,
51
+ 'warning': (0, Warning_1.WarningToJSON)(value.warning),
52
+ };
53
+ }
54
+ exports.WorkflowAgentAuthResponseToJSON = WorkflowAgentAuthResponseToJSON;
@@ -820,6 +820,8 @@ export * from './WebhookSampleRequest';
820
820
  export * from './WebhookSampleRequestResponse';
821
821
  export * from './WebhooksResponse';
822
822
  export * from './Weight';
823
+ export * from './WorkflowAgentAuth';
824
+ export * from './WorkflowAgentAuthResponse';
823
825
  export * from './WorkflowAttachment';
824
826
  export * from './WorkflowAttachmentUploadUrl';
825
827
  export * from './WorkflowAttachmentUploadUrlResponse';
@@ -838,6 +838,8 @@ __exportStar(require("./WebhookSampleRequest"), exports);
838
838
  __exportStar(require("./WebhookSampleRequestResponse"), exports);
839
839
  __exportStar(require("./WebhooksResponse"), exports);
840
840
  __exportStar(require("./Weight"), exports);
841
+ __exportStar(require("./WorkflowAgentAuth"), exports);
842
+ __exportStar(require("./WorkflowAgentAuthResponse"), exports);
841
843
  __exportStar(require("./WorkflowAttachment"), exports);
842
844
  __exportStar(require("./WorkflowAttachmentUploadUrl"), exports);
843
845
  __exportStar(require("./WorkflowAttachmentUploadUrlResponse"), exports);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ultracart_rest_api_v2_typescript",
3
- "version": "4.0.202",
3
+ "version": "4.0.203",
4
4
  "description": "UltraCart Rest TypeScript SDK",
5
5
  "author": "UltraCart",
6
6
  "repository": {
@@ -18,6 +18,9 @@ import {
18
18
  ErrorResponse,
19
19
  ErrorResponseFromJSON,
20
20
  ErrorResponseToJSON,
21
+ WorkflowAgentAuthResponse,
22
+ WorkflowAgentAuthResponseFromJSON,
23
+ WorkflowAgentAuthResponseToJSON,
21
24
  WorkflowAttachmentUploadUrlResponse,
22
25
  WorkflowAttachmentUploadUrlResponseFromJSON,
23
26
  WorkflowAttachmentUploadUrlResponseToJSON,
@@ -93,6 +96,21 @@ export interface UpdateWorkflowTaskRequest {
93
96
  * @interface WorkflowApiInterface
94
97
  */
95
98
  export interface WorkflowApiInterface {
99
+ /**
100
+ * Retrieve a JWT to authorize an agent to make a websocket connection.
101
+ * @summary Get agent websocket authorization
102
+ * @param {*} [options] Override http request option.
103
+ * @throws {RequiredError}
104
+ * @memberof WorkflowApiInterface
105
+ */
106
+ getWorkflowAgentWebsocketAuthorizationRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<WorkflowAgentAuthResponse>>;
107
+
108
+ /**
109
+ * Retrieve a JWT to authorize an agent to make a websocket connection.
110
+ * Get agent websocket authorization
111
+ */
112
+ getWorkflowAgentWebsocketAuthorization(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<WorkflowAgentAuthResponse>;
113
+
96
114
  /**
97
115
  * Retrieve a list of groups that workflow tasks can be assigned to
98
116
  * @summary Retrieve a list of groups that workflow tasks can be assigned to
@@ -265,6 +283,43 @@ export interface WorkflowApiInterface {
265
283
  */
266
284
  export class WorkflowApi extends runtime.BaseAPI implements WorkflowApiInterface {
267
285
 
286
+ /**
287
+ * Retrieve a JWT to authorize an agent to make a websocket connection.
288
+ * Get agent websocket authorization
289
+ */
290
+ async getWorkflowAgentWebsocketAuthorizationRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<WorkflowAgentAuthResponse>> {
291
+ const queryParameters: any = {};
292
+
293
+ const headerParameters: runtime.HTTPHeaders = {};
294
+
295
+ if (this.configuration && this.configuration.accessToken) {
296
+ // oauth required
297
+ headerParameters["Authorization"] = await this.configuration.accessToken("ultraCartOauth", ["workflow_write"]);
298
+ }
299
+
300
+ if (this.configuration && this.configuration.apiKey) {
301
+ headerParameters["x-ultracart-simple-key"] = this.configuration.apiKey("x-ultracart-simple-key"); // ultraCartSimpleApiKey authentication
302
+ }
303
+
304
+ const response = await this.request({
305
+ path: `/workflow/agent/auth`,
306
+ method: 'PUT',
307
+ headers: headerParameters,
308
+ query: queryParameters,
309
+ }, initOverrides);
310
+
311
+ return new runtime.JSONApiResponse(response, (jsonValue) => WorkflowAgentAuthResponseFromJSON(jsonValue));
312
+ }
313
+
314
+ /**
315
+ * Retrieve a JWT to authorize an agent to make a websocket connection.
316
+ * Get agent websocket authorization
317
+ */
318
+ async getWorkflowAgentWebsocketAuthorization(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<WorkflowAgentAuthResponse> {
319
+ const response = await this.getWorkflowAgentWebsocketAuthorizationRaw(initOverrides);
320
+ return await response.value();
321
+ }
322
+
268
323
  /**
269
324
  * Retrieve a list of groups that workflow tasks can be assigned to
270
325
  * Retrieve a list of groups that workflow tasks can be assigned to
@@ -134,6 +134,18 @@ export interface ConversationPbxQueue {
134
134
  * @memberof ConversationPbxQueue
135
135
  */
136
136
  voicemail?: boolean;
137
+ /**
138
+ * Wait time in seconds before critical
139
+ * @type {number}
140
+ * @memberof ConversationPbxQueue
141
+ */
142
+ wait_critical_seconds?: number;
143
+ /**
144
+ * Wait time in seconds before warning
145
+ * @type {number}
146
+ * @memberof ConversationPbxQueue
147
+ */
148
+ wait_warning_seconds?: number;
137
149
  }
138
150
 
139
151
  export function ConversationPbxQueueFromJSON(json: any): ConversationPbxQueue {
@@ -164,6 +176,8 @@ export function ConversationPbxQueueFromJSONTyped(json: any, ignoreDiscriminator
164
176
  'twilio_taskrouter_workflow_sid': !exists(json, 'twilio_taskrouter_workflow_sid') ? undefined : json['twilio_taskrouter_workflow_sid'],
165
177
  'twilio_workspace_queue_sid': !exists(json, 'twilio_workspace_queue_sid') ? undefined : json['twilio_workspace_queue_sid'],
166
178
  'voicemail': !exists(json, 'voicemail') ? undefined : json['voicemail'],
179
+ 'wait_critical_seconds': !exists(json, 'wait_critical_seconds') ? undefined : json['wait_critical_seconds'],
180
+ 'wait_warning_seconds': !exists(json, 'wait_warning_seconds') ? undefined : json['wait_warning_seconds'],
167
181
  };
168
182
  }
169
183
 
@@ -194,6 +208,8 @@ export function ConversationPbxQueueToJSON(value?: ConversationPbxQueue | null):
194
208
  'twilio_taskrouter_workflow_sid': value.twilio_taskrouter_workflow_sid,
195
209
  'twilio_workspace_queue_sid': value.twilio_workspace_queue_sid,
196
210
  'voicemail': value.voicemail,
211
+ 'wait_critical_seconds': value.wait_critical_seconds,
212
+ 'wait_warning_seconds': value.wait_warning_seconds,
197
213
  };
198
214
  }
199
215
 
@@ -0,0 +1,72 @@
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 WorkflowAgentAuth
20
+ */
21
+ export interface WorkflowAgentAuth {
22
+ /**
23
+ *
24
+ * @type {string}
25
+ * @memberof WorkflowAgentAuth
26
+ */
27
+ jwt?: string;
28
+ /**
29
+ *
30
+ * @type {string}
31
+ * @memberof WorkflowAgentAuth
32
+ */
33
+ merchant_id?: string;
34
+ /**
35
+ *
36
+ * @type {string}
37
+ * @memberof WorkflowAgentAuth
38
+ */
39
+ websocket_url?: string;
40
+ }
41
+
42
+ export function WorkflowAgentAuthFromJSON(json: any): WorkflowAgentAuth {
43
+ return WorkflowAgentAuthFromJSONTyped(json, false);
44
+ }
45
+
46
+ export function WorkflowAgentAuthFromJSONTyped(json: any, ignoreDiscriminator: boolean): WorkflowAgentAuth {
47
+ if ((json === undefined) || (json === null)) {
48
+ return json;
49
+ }
50
+ return {
51
+
52
+ 'jwt': !exists(json, 'jwt') ? undefined : json['jwt'],
53
+ 'merchant_id': !exists(json, 'merchant_id') ? undefined : json['merchant_id'],
54
+ 'websocket_url': !exists(json, 'websocket_url') ? undefined : json['websocket_url'],
55
+ };
56
+ }
57
+
58
+ export function WorkflowAgentAuthToJSON(value?: WorkflowAgentAuth | null): any {
59
+ if (value === undefined) {
60
+ return undefined;
61
+ }
62
+ if (value === null) {
63
+ return null;
64
+ }
65
+ return {
66
+
67
+ 'jwt': value.jwt,
68
+ 'merchant_id': value.merchant_id,
69
+ 'websocket_url': value.websocket_url,
70
+ };
71
+ }
72
+
@@ -0,0 +1,113 @@
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
+ ModelError,
18
+ ModelErrorFromJSON,
19
+ ModelErrorFromJSONTyped,
20
+ ModelErrorToJSON,
21
+ } from './ModelError';
22
+ import {
23
+ ResponseMetadata,
24
+ ResponseMetadataFromJSON,
25
+ ResponseMetadataFromJSONTyped,
26
+ ResponseMetadataToJSON,
27
+ } from './ResponseMetadata';
28
+ import {
29
+ Warning,
30
+ WarningFromJSON,
31
+ WarningFromJSONTyped,
32
+ WarningToJSON,
33
+ } from './Warning';
34
+ import {
35
+ WorkflowAgentAuth,
36
+ WorkflowAgentAuthFromJSON,
37
+ WorkflowAgentAuthFromJSONTyped,
38
+ WorkflowAgentAuthToJSON,
39
+ } from './WorkflowAgentAuth';
40
+
41
+ /**
42
+ *
43
+ * @export
44
+ * @interface WorkflowAgentAuthResponse
45
+ */
46
+ export interface WorkflowAgentAuthResponse {
47
+ /**
48
+ *
49
+ * @type {WorkflowAgentAuth}
50
+ * @memberof WorkflowAgentAuthResponse
51
+ */
52
+ agent_auth?: WorkflowAgentAuth;
53
+ /**
54
+ *
55
+ * @type {ModelError}
56
+ * @memberof WorkflowAgentAuthResponse
57
+ */
58
+ error?: ModelError;
59
+ /**
60
+ *
61
+ * @type {ResponseMetadata}
62
+ * @memberof WorkflowAgentAuthResponse
63
+ */
64
+ metadata?: ResponseMetadata;
65
+ /**
66
+ * Indicates if API call was successful
67
+ * @type {boolean}
68
+ * @memberof WorkflowAgentAuthResponse
69
+ */
70
+ success?: boolean;
71
+ /**
72
+ *
73
+ * @type {Warning}
74
+ * @memberof WorkflowAgentAuthResponse
75
+ */
76
+ warning?: Warning;
77
+ }
78
+
79
+ export function WorkflowAgentAuthResponseFromJSON(json: any): WorkflowAgentAuthResponse {
80
+ return WorkflowAgentAuthResponseFromJSONTyped(json, false);
81
+ }
82
+
83
+ export function WorkflowAgentAuthResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): WorkflowAgentAuthResponse {
84
+ if ((json === undefined) || (json === null)) {
85
+ return json;
86
+ }
87
+ return {
88
+
89
+ 'agent_auth': !exists(json, 'agent_auth') ? undefined : WorkflowAgentAuthFromJSON(json['agent_auth']),
90
+ 'error': !exists(json, 'error') ? undefined : ModelErrorFromJSON(json['error']),
91
+ 'metadata': !exists(json, 'metadata') ? undefined : ResponseMetadataFromJSON(json['metadata']),
92
+ 'success': !exists(json, 'success') ? undefined : json['success'],
93
+ 'warning': !exists(json, 'warning') ? undefined : WarningFromJSON(json['warning']),
94
+ };
95
+ }
96
+
97
+ export function WorkflowAgentAuthResponseToJSON(value?: WorkflowAgentAuthResponse | null): any {
98
+ if (value === undefined) {
99
+ return undefined;
100
+ }
101
+ if (value === null) {
102
+ return null;
103
+ }
104
+ return {
105
+
106
+ 'agent_auth': WorkflowAgentAuthToJSON(value.agent_auth),
107
+ 'error': ModelErrorToJSON(value.error),
108
+ 'metadata': ResponseMetadataToJSON(value.metadata),
109
+ 'success': value.success,
110
+ 'warning': WarningToJSON(value.warning),
111
+ };
112
+ }
113
+
@@ -822,6 +822,8 @@ export * from './WebhookSampleRequest';
822
822
  export * from './WebhookSampleRequestResponse';
823
823
  export * from './WebhooksResponse';
824
824
  export * from './Weight';
825
+ export * from './WorkflowAgentAuth';
826
+ export * from './WorkflowAgentAuthResponse';
825
827
  export * from './WorkflowAttachment';
826
828
  export * from './WorkflowAttachmentUploadUrl';
827
829
  export * from './WorkflowAttachmentUploadUrlResponse';