@@ -2,8 +2,11 @@ import { serializeAiStudioAgentLongTextTool } from './aiStudioAgentLongTextTool.
2
2
import { deserializeAiStudioAgentLongTextTool } from './aiStudioAgentLongTextTool.generated.js' ;
3
3
import { serializeAiStudioAgentBasicTextTool } from './aiStudioAgentBasicTextTool.generated.js' ;
4
4
import { deserializeAiStudioAgentBasicTextTool } from './aiStudioAgentBasicTextTool.generated.js' ;
5
+ import { serializeAiStudioAgentSpreadsheetTool } from './aiStudioAgentSpreadsheetTool.generated.js' ;
6
+ import { deserializeAiStudioAgentSpreadsheetTool } from './aiStudioAgentSpreadsheetTool.generated.js' ;
5
7
import { AiStudioAgentLongTextTool } from './aiStudioAgentLongTextTool.generated.js' ;
6
8
import { AiStudioAgentBasicTextTool } from './aiStudioAgentBasicTextTool.generated.js' ;
9
+ import { AiStudioAgentSpreadsheetTool } from './aiStudioAgentSpreadsheetTool.generated.js' ;
7
10
import { BoxSdkError } from '../box/errors.js' ;
8
11
import { SerializedData } from '../serialization/json.js' ;
9
12
import { sdIsEmpty } from '../serialization/json.js' ;
@@ -22,15 +25,21 @@ export class AiStudioAgentAsk {
22
25
* The state of the AI Agent capability. Possible values are: `enabled` and `disabled`. */
23
26
readonly accessState ! : string ;
24
27
/**
25
- * The description of the AI Agent . */
28
+ * The description of the AI agent . */
26
29
readonly description ! : string ;
27
30
/**
28
- * Custom instructions for the agent. */
31
+ * Custom instructions for the AI agent. */
29
32
readonly customInstructions ?: string | null ;
33
+ /**
34
+ * Suggested questions for the AI agent. If null, suggested question will be generated. If empty, no suggested questions will be displayed. */
35
+ readonly suggestedQuestions ?: readonly string [ ] ;
30
36
readonly longText ?: AiStudioAgentLongTextTool ;
31
37
readonly basicText ?: AiStudioAgentBasicTextTool ;
38
+ readonly basicImage ?: AiStudioAgentBasicTextTool ;
39
+ readonly spreadsheet ?: AiStudioAgentSpreadsheetTool ;
32
40
readonly longTextMulti ?: AiStudioAgentLongTextTool ;
33
41
readonly basicTextMulti ?: AiStudioAgentBasicTextTool ;
42
+ readonly basicImageMulti ?: AiStudioAgentBasicTextTool ;
34
43
readonly rawData ?: SerializedData ;
35
44
constructor (
36
45
fields : Omit < AiStudioAgentAsk , 'type' > &
@@ -48,18 +57,30 @@ export class AiStudioAgentAsk {
48
57
if ( fields . customInstructions !== undefined ) {
49
58
this . customInstructions = fields . customInstructions ;
50
59
}
60
+ if ( fields . suggestedQuestions !== undefined ) {
61
+ this . suggestedQuestions = fields . suggestedQuestions ;
62
+ }
51
63
if ( fields . longText !== undefined ) {
52
64
this . longText = fields . longText ;
53
65
}
54
66
if ( fields . basicText !== undefined ) {
55
67
this . basicText = fields . basicText ;
56
68
}
69
+ if ( fields . basicImage !== undefined ) {
70
+ this . basicImage = fields . basicImage ;
71
+ }
72
+ if ( fields . spreadsheet !== undefined ) {
73
+ this . spreadsheet = fields . spreadsheet ;
74
+ }
57
75
if ( fields . longTextMulti !== undefined ) {
58
76
this . longTextMulti = fields . longTextMulti ;
59
77
}
60
78
if ( fields . basicTextMulti !== undefined ) {
61
79
this . basicTextMulti = fields . basicTextMulti ;
62
80
}
81
+ if ( fields . basicImageMulti !== undefined ) {
82
+ this . basicImageMulti = fields . basicImageMulti ;
83
+ }
63
84
if ( fields . rawData !== undefined ) {
64
85
this . rawData = fields . rawData ;
65
86
}
@@ -73,15 +94,21 @@ export interface AiStudioAgentAskInput {
73
94
* The state of the AI Agent capability. Possible values are: `enabled` and `disabled`. */
74
95
readonly accessState : string ;
75
96
/**
76
- * The description of the AI Agent . */
97
+ * The description of the AI agent . */
77
98
readonly description : string ;
78
99
/**
79
- * Custom instructions for the agent. */
100
+ * Custom instructions for the AI agent. */
80
101
readonly customInstructions ?: string | null ;
102
+ /**
103
+ * Suggested questions for the AI agent. If null, suggested question will be generated. If empty, no suggested questions will be displayed. */
104
+ readonly suggestedQuestions ?: readonly string [ ] ;
81
105
readonly longText ?: AiStudioAgentLongTextTool ;
82
106
readonly basicText ?: AiStudioAgentBasicTextTool ;
107
+ readonly basicImage ?: AiStudioAgentBasicTextTool ;
108
+ readonly spreadsheet ?: AiStudioAgentSpreadsheetTool ;
83
109
readonly longTextMulti ?: AiStudioAgentLongTextTool ;
84
110
readonly basicTextMulti ?: AiStudioAgentBasicTextTool ;
111
+ readonly basicImageMulti ?: AiStudioAgentBasicTextTool ;
85
112
readonly rawData ?: SerializedData ;
86
113
}
87
114
export function serializeAiStudioAgentAskTypeField (
@@ -107,6 +134,12 @@ export function serializeAiStudioAgentAsk(
107
134
[ 'access_state' ] : val . accessState ,
108
135
[ 'description' ] : val . description ,
109
136
[ 'custom_instructions' ] : val . customInstructions ,
137
+ [ 'suggested_questions' ] :
138
+ val . suggestedQuestions == void 0
139
+ ? val . suggestedQuestions
140
+ : ( val . suggestedQuestions . map ( function ( item : string ) : SerializedData {
141
+ return item ;
142
+ } ) as readonly any [ ] ) ,
110
143
[ 'long_text' ] :
111
144
val . longText == void 0
112
145
? val . longText
@@ -115,6 +148,14 @@ export function serializeAiStudioAgentAsk(
115
148
val . basicText == void 0
116
149
? val . basicText
117
150
: serializeAiStudioAgentBasicTextTool ( val . basicText ) ,
151
+ [ 'basic_image' ] :
152
+ val . basicImage == void 0
153
+ ? val . basicImage
154
+ : serializeAiStudioAgentBasicTextTool ( val . basicImage ) ,
155
+ [ 'spreadsheet' ] :
156
+ val . spreadsheet == void 0
157
+ ? val . spreadsheet
158
+ : serializeAiStudioAgentSpreadsheetTool ( val . spreadsheet ) ,
118
159
[ 'long_text_multi' ] :
119
160
val . longTextMulti == void 0
120
161
? val . longTextMulti
@@ -123,6 +164,10 @@ export function serializeAiStudioAgentAsk(
123
164
val . basicTextMulti == void 0
124
165
? val . basicTextMulti
125
166
: serializeAiStudioAgentBasicTextTool ( val . basicTextMulti ) ,
167
+ [ 'basic_image_multi' ] :
168
+ val . basicImageMulti == void 0
169
+ ? val . basicImageMulti
170
+ : serializeAiStudioAgentBasicTextTool ( val . basicImageMulti ) ,
126
171
} ;
127
172
}
128
173
export function deserializeAiStudioAgentAsk (
@@ -176,6 +221,28 @@ export function deserializeAiStudioAgentAsk(
176
221
}
177
222
const customInstructions : undefined | string =
178
223
val . custom_instructions == void 0 ? void 0 : val . custom_instructions ;
224
+ if (
225
+ ! ( val . suggested_questions == void 0 ) &&
226
+ ! sdIsList ( val . suggested_questions )
227
+ ) {
228
+ throw new BoxSdkError ( {
229
+ message :
230
+ 'Expecting array for "suggested_questions" of type "AiStudioAgentAsk"' ,
231
+ } ) ;
232
+ }
233
+ const suggestedQuestions : undefined | readonly string [ ] =
234
+ val . suggested_questions == void 0
235
+ ? void 0
236
+ : sdIsList ( val . suggested_questions )
237
+ ? ( val . suggested_questions . map ( function ( itm : SerializedData ) : string {
238
+ if ( ! sdIsString ( itm ) ) {
239
+ throw new BoxSdkError ( {
240
+ message : 'Expecting string for "AiStudioAgentAsk"' ,
241
+ } ) ;
242
+ }
243
+ return itm ;
244
+ } ) as readonly any [ ] )
245
+ : [ ] ;
179
246
const longText : undefined | AiStudioAgentLongTextTool =
180
247
val . long_text == void 0
181
248
? void 0
@@ -184,6 +251,14 @@ export function deserializeAiStudioAgentAsk(
184
251
val . basic_text == void 0
185
252
? void 0
186
253
: deserializeAiStudioAgentBasicTextTool ( val . basic_text ) ;
254
+ const basicImage : undefined | AiStudioAgentBasicTextTool =
255
+ val . basic_image == void 0
256
+ ? void 0
257
+ : deserializeAiStudioAgentBasicTextTool ( val . basic_image ) ;
258
+ const spreadsheet : undefined | AiStudioAgentSpreadsheetTool =
259
+ val . spreadsheet == void 0
260
+ ? void 0
261
+ : deserializeAiStudioAgentSpreadsheetTool ( val . spreadsheet ) ;
187
262
const longTextMulti : undefined | AiStudioAgentLongTextTool =
188
263
val . long_text_multi == void 0
189
264
? void 0
@@ -192,15 +267,23 @@ export function deserializeAiStudioAgentAsk(
192
267
val . basic_text_multi == void 0
193
268
? void 0
194
269
: deserializeAiStudioAgentBasicTextTool ( val . basic_text_multi ) ;
270
+ const basicImageMulti : undefined | AiStudioAgentBasicTextTool =
271
+ val . basic_image_multi == void 0
272
+ ? void 0
273
+ : deserializeAiStudioAgentBasicTextTool ( val . basic_image_multi ) ;
195
274
return {
196
275
type : type ,
197
276
accessState : accessState ,
198
277
description : description ,
199
278
customInstructions : customInstructions ,
279
+ suggestedQuestions : suggestedQuestions ,
200
280
longText : longText ,
201
281
basicText : basicText ,
282
+ basicImage : basicImage ,
283
+ spreadsheet : spreadsheet ,
202
284
longTextMulti : longTextMulti ,
203
285
basicTextMulti : basicTextMulti ,
286
+ basicImageMulti : basicImageMulti ,
204
287
} satisfies AiStudioAgentAsk ;
205
288
}
206
289
export function serializeAiStudioAgentAskInput (
@@ -214,6 +297,12 @@ export function serializeAiStudioAgentAskInput(
214
297
[ 'access_state' ] : val . accessState ,
215
298
[ 'description' ] : val . description ,
216
299
[ 'custom_instructions' ] : val . customInstructions ,
300
+ [ 'suggested_questions' ] :
301
+ val . suggestedQuestions == void 0
302
+ ? val . suggestedQuestions
303
+ : ( val . suggestedQuestions . map ( function ( item : string ) : SerializedData {
304
+ return item ;
305
+ } ) as readonly any [ ] ) ,
217
306
[ 'long_text' ] :
218
307
val . longText == void 0
219
308
? val . longText
@@ -222,6 +311,14 @@ export function serializeAiStudioAgentAskInput(
222
311
val . basicText == void 0
223
312
? val . basicText
224
313
: serializeAiStudioAgentBasicTextTool ( val . basicText ) ,
314
+ [ 'basic_image' ] :
315
+ val . basicImage == void 0
316
+ ? val . basicImage
317
+ : serializeAiStudioAgentBasicTextTool ( val . basicImage ) ,
318
+ [ 'spreadsheet' ] :
319
+ val . spreadsheet == void 0
320
+ ? val . spreadsheet
321
+ : serializeAiStudioAgentSpreadsheetTool ( val . spreadsheet ) ,
225
322
[ 'long_text_multi' ] :
226
323
val . longTextMulti == void 0
227
324
? val . longTextMulti
@@ -230,6 +327,10 @@ export function serializeAiStudioAgentAskInput(
230
327
val . basicTextMulti == void 0
231
328
? val . basicTextMulti
232
329
: serializeAiStudioAgentBasicTextTool ( val . basicTextMulti ) ,
330
+ [ 'basic_image_multi' ] :
331
+ val . basicImageMulti == void 0
332
+ ? val . basicImageMulti
333
+ : serializeAiStudioAgentBasicTextTool ( val . basicImageMulti ) ,
233
334
} ;
234
335
}
235
336
export function deserializeAiStudioAgentAskInput (
@@ -281,6 +382,28 @@ export function deserializeAiStudioAgentAskInput(
281
382
}
282
383
const customInstructions : undefined | string =
283
384
val . custom_instructions == void 0 ? void 0 : val . custom_instructions ;
385
+ if (
386
+ ! ( val . suggested_questions == void 0 ) &&
387
+ ! sdIsList ( val . suggested_questions )
388
+ ) {
389
+ throw new BoxSdkError ( {
390
+ message :
391
+ 'Expecting array for "suggested_questions" of type "AiStudioAgentAskInput"' ,
392
+ } ) ;
393
+ }
394
+ const suggestedQuestions : undefined | readonly string [ ] =
395
+ val . suggested_questions == void 0
396
+ ? void 0
397
+ : sdIsList ( val . suggested_questions )
398
+ ? ( val . suggested_questions . map ( function ( itm : SerializedData ) : string {
399
+ if ( ! sdIsString ( itm ) ) {
400
+ throw new BoxSdkError ( {
401
+ message : 'Expecting string for "AiStudioAgentAskInput"' ,
402
+ } ) ;
403
+ }
404
+ return itm ;
405
+ } ) as readonly any [ ] )
406
+ : [ ] ;
284
407
const longText : undefined | AiStudioAgentLongTextTool =
285
408
val . long_text == void 0
286
409
? void 0
@@ -289,6 +412,14 @@ export function deserializeAiStudioAgentAskInput(
289
412
val . basic_text == void 0
290
413
? void 0
291
414
: deserializeAiStudioAgentBasicTextTool ( val . basic_text ) ;
415
+ const basicImage : undefined | AiStudioAgentBasicTextTool =
416
+ val . basic_image == void 0
417
+ ? void 0
418
+ : deserializeAiStudioAgentBasicTextTool ( val . basic_image ) ;
419
+ const spreadsheet : undefined | AiStudioAgentSpreadsheetTool =
420
+ val . spreadsheet == void 0
421
+ ? void 0
422
+ : deserializeAiStudioAgentSpreadsheetTool ( val . spreadsheet ) ;
292
423
const longTextMulti : undefined | AiStudioAgentLongTextTool =
293
424
val . long_text_multi == void 0
294
425
? void 0
@@ -297,14 +428,22 @@ export function deserializeAiStudioAgentAskInput(
297
428
val . basic_text_multi == void 0
298
429
? void 0
299
430
: deserializeAiStudioAgentBasicTextTool ( val . basic_text_multi ) ;
431
+ const basicImageMulti : undefined | AiStudioAgentBasicTextTool =
432
+ val . basic_image_multi == void 0
433
+ ? void 0
434
+ : deserializeAiStudioAgentBasicTextTool ( val . basic_image_multi ) ;
300
435
return {
301
436
type : type ,
302
437
accessState : accessState ,
303
438
description : description ,
304
439
customInstructions : customInstructions ,
440
+ suggestedQuestions : suggestedQuestions ,
305
441
longText : longText ,
306
442
basicText : basicText ,
443
+ basicImage : basicImage ,
444
+ spreadsheet : spreadsheet ,
307
445
longTextMulti : longTextMulti ,
308
446
basicTextMulti : basicTextMulti ,
447
+ basicImageMulti : basicImageMulti ,
309
448
} satisfies AiStudioAgentAskInput ;
310
449
}
0 commit comments