scale-gp-beta 0.1.0a36__py3-none-any.whl → 0.1.0a38__py3-none-any.whl

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.
@@ -2,7 +2,7 @@
2
2
 
3
3
  from __future__ import annotations
4
4
 
5
- from typing import Any, cast
5
+ from typing import Any, Dict, Iterable, cast
6
6
  from typing_extensions import Literal, overload
7
7
 
8
8
  import httpx
@@ -52,6 +52,7 @@ class QuestionsResource(SyncAPIResource):
52
52
  configuration: question_create_params.CategoricalQuestionRequestConfiguration,
53
53
  name: str,
54
54
  prompt: str,
55
+ conditions: Iterable[Dict[str, object]] | Omit = omit,
55
56
  question_type: Literal["categorical"] | Omit = omit,
56
57
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
57
58
  # The extra values given here take precedence over values defined on the client or passed to this method.
@@ -66,6 +67,8 @@ class QuestionsResource(SyncAPIResource):
66
67
  Args:
67
68
  prompt: user-facing question prompt
68
69
 
70
+ conditions: Conditions for the question to be shown
71
+
69
72
  extra_headers: Send extra headers
70
73
 
71
74
  extra_query: Add additional query parameters to the request
@@ -83,6 +86,7 @@ class QuestionsResource(SyncAPIResource):
83
86
  configuration: question_create_params.RatingQuestionRequestConfiguration,
84
87
  name: str,
85
88
  prompt: str,
89
+ conditions: Iterable[Dict[str, object]] | Omit = omit,
86
90
  question_type: Literal["rating"] | Omit = omit,
87
91
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
88
92
  # The extra values given here take precedence over values defined on the client or passed to this method.
@@ -97,6 +101,8 @@ class QuestionsResource(SyncAPIResource):
97
101
  Args:
98
102
  prompt: user-facing question prompt
99
103
 
104
+ conditions: Conditions for the question to be shown
105
+
100
106
  extra_headers: Send extra headers
101
107
 
102
108
  extra_query: Add additional query parameters to the request
@@ -113,6 +119,7 @@ class QuestionsResource(SyncAPIResource):
113
119
  *,
114
120
  name: str,
115
121
  prompt: str,
122
+ conditions: Iterable[Dict[str, object]] | Omit = omit,
116
123
  configuration: question_create_params.NumberQuestionRequestConfiguration | Omit = omit,
117
124
  question_type: Literal["number"] | Omit = omit,
118
125
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -128,6 +135,8 @@ class QuestionsResource(SyncAPIResource):
128
135
  Args:
129
136
  prompt: user-facing question prompt
130
137
 
138
+ conditions: Conditions for the question to be shown
139
+
131
140
  extra_headers: Send extra headers
132
141
 
133
142
  extra_query: Add additional query parameters to the request
@@ -144,6 +153,7 @@ class QuestionsResource(SyncAPIResource):
144
153
  *,
145
154
  name: str,
146
155
  prompt: str,
156
+ conditions: Iterable[Dict[str, object]] | Omit = omit,
147
157
  configuration: question_create_params.FreeTextQuestionRequestConfiguration | Omit = omit,
148
158
  question_type: Literal["free_text"] | Omit = omit,
149
159
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -159,6 +169,8 @@ class QuestionsResource(SyncAPIResource):
159
169
  Args:
160
170
  prompt: user-facing question prompt
161
171
 
172
+ conditions: Conditions for the question to be shown
173
+
162
174
  extra_headers: Send extra headers
163
175
 
164
176
  extra_query: Add additional query parameters to the request
@@ -176,6 +188,7 @@ class QuestionsResource(SyncAPIResource):
176
188
  configuration: question_create_params.FormQuestionRequestConfiguration,
177
189
  name: str,
178
190
  prompt: str,
191
+ conditions: Iterable[Dict[str, object]] | Omit = omit,
179
192
  question_type: Literal["form"] | Omit = omit,
180
193
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
181
194
  # The extra values given here take precedence over values defined on the client or passed to this method.
@@ -190,6 +203,42 @@ class QuestionsResource(SyncAPIResource):
190
203
  Args:
191
204
  prompt: user-facing question prompt
192
205
 
206
+ conditions: Conditions for the question to be shown
207
+
208
+ extra_headers: Send extra headers
209
+
210
+ extra_query: Add additional query parameters to the request
211
+
212
+ extra_body: Add additional JSON properties to the request
213
+
214
+ timeout: Override the client-level default timeout for this request, in seconds
215
+ """
216
+ ...
217
+
218
+ @overload
219
+ def create(
220
+ self,
221
+ *,
222
+ name: str,
223
+ prompt: str,
224
+ conditions: Iterable[Dict[str, object]] | Omit = omit,
225
+ configuration: question_create_params.TimestampQuestionRequestConfiguration | Omit = omit,
226
+ question_type: Literal["timestamp"] | Omit = omit,
227
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
228
+ # The extra values given here take precedence over values defined on the client or passed to this method.
229
+ extra_headers: Headers | None = None,
230
+ extra_query: Query | None = None,
231
+ extra_body: Body | None = None,
232
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
233
+ ) -> Question:
234
+ """
235
+ Create Question
236
+
237
+ Args:
238
+ prompt: user-facing question prompt
239
+
240
+ conditions: Conditions for the question to be shown
241
+
193
242
  extra_headers: Send extra headers
194
243
 
195
244
  extra_query: Add additional query parameters to the request
@@ -209,14 +258,17 @@ class QuestionsResource(SyncAPIResource):
209
258
  | question_create_params.NumberQuestionRequestConfiguration
210
259
  | question_create_params.FreeTextQuestionRequestConfiguration
211
260
  | question_create_params.FormQuestionRequestConfiguration
261
+ | question_create_params.TimestampQuestionRequestConfiguration
212
262
  | Omit = omit,
213
263
  name: str,
214
264
  prompt: str,
265
+ conditions: Iterable[Dict[str, object]] | Omit = omit,
215
266
  question_type: Literal["categorical"]
216
267
  | Literal["rating"]
217
268
  | Literal["number"]
218
269
  | Literal["free_text"]
219
270
  | Literal["form"]
271
+ | Literal["timestamp"]
220
272
  | Omit = omit,
221
273
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
222
274
  # The extra values given here take precedence over values defined on the client or passed to this method.
@@ -234,6 +286,7 @@ class QuestionsResource(SyncAPIResource):
234
286
  "configuration": configuration,
235
287
  "name": name,
236
288
  "prompt": prompt,
289
+ "conditions": conditions,
237
290
  "question_type": question_type,
238
291
  },
239
292
  question_create_params.QuestionCreateParams,
@@ -356,6 +409,7 @@ class AsyncQuestionsResource(AsyncAPIResource):
356
409
  configuration: question_create_params.CategoricalQuestionRequestConfiguration,
357
410
  name: str,
358
411
  prompt: str,
412
+ conditions: Iterable[Dict[str, object]] | Omit = omit,
359
413
  question_type: Literal["categorical"] | Omit = omit,
360
414
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
361
415
  # The extra values given here take precedence over values defined on the client or passed to this method.
@@ -370,6 +424,8 @@ class AsyncQuestionsResource(AsyncAPIResource):
370
424
  Args:
371
425
  prompt: user-facing question prompt
372
426
 
427
+ conditions: Conditions for the question to be shown
428
+
373
429
  extra_headers: Send extra headers
374
430
 
375
431
  extra_query: Add additional query parameters to the request
@@ -387,6 +443,7 @@ class AsyncQuestionsResource(AsyncAPIResource):
387
443
  configuration: question_create_params.RatingQuestionRequestConfiguration,
388
444
  name: str,
389
445
  prompt: str,
446
+ conditions: Iterable[Dict[str, object]] | Omit = omit,
390
447
  question_type: Literal["rating"] | Omit = omit,
391
448
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
392
449
  # The extra values given here take precedence over values defined on the client or passed to this method.
@@ -401,6 +458,8 @@ class AsyncQuestionsResource(AsyncAPIResource):
401
458
  Args:
402
459
  prompt: user-facing question prompt
403
460
 
461
+ conditions: Conditions for the question to be shown
462
+
404
463
  extra_headers: Send extra headers
405
464
 
406
465
  extra_query: Add additional query parameters to the request
@@ -417,6 +476,7 @@ class AsyncQuestionsResource(AsyncAPIResource):
417
476
  *,
418
477
  name: str,
419
478
  prompt: str,
479
+ conditions: Iterable[Dict[str, object]] | Omit = omit,
420
480
  configuration: question_create_params.NumberQuestionRequestConfiguration | Omit = omit,
421
481
  question_type: Literal["number"] | Omit = omit,
422
482
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -432,6 +492,8 @@ class AsyncQuestionsResource(AsyncAPIResource):
432
492
  Args:
433
493
  prompt: user-facing question prompt
434
494
 
495
+ conditions: Conditions for the question to be shown
496
+
435
497
  extra_headers: Send extra headers
436
498
 
437
499
  extra_query: Add additional query parameters to the request
@@ -448,6 +510,7 @@ class AsyncQuestionsResource(AsyncAPIResource):
448
510
  *,
449
511
  name: str,
450
512
  prompt: str,
513
+ conditions: Iterable[Dict[str, object]] | Omit = omit,
451
514
  configuration: question_create_params.FreeTextQuestionRequestConfiguration | Omit = omit,
452
515
  question_type: Literal["free_text"] | Omit = omit,
453
516
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -463,6 +526,8 @@ class AsyncQuestionsResource(AsyncAPIResource):
463
526
  Args:
464
527
  prompt: user-facing question prompt
465
528
 
529
+ conditions: Conditions for the question to be shown
530
+
466
531
  extra_headers: Send extra headers
467
532
 
468
533
  extra_query: Add additional query parameters to the request
@@ -480,6 +545,7 @@ class AsyncQuestionsResource(AsyncAPIResource):
480
545
  configuration: question_create_params.FormQuestionRequestConfiguration,
481
546
  name: str,
482
547
  prompt: str,
548
+ conditions: Iterable[Dict[str, object]] | Omit = omit,
483
549
  question_type: Literal["form"] | Omit = omit,
484
550
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
485
551
  # The extra values given here take precedence over values defined on the client or passed to this method.
@@ -494,6 +560,42 @@ class AsyncQuestionsResource(AsyncAPIResource):
494
560
  Args:
495
561
  prompt: user-facing question prompt
496
562
 
563
+ conditions: Conditions for the question to be shown
564
+
565
+ extra_headers: Send extra headers
566
+
567
+ extra_query: Add additional query parameters to the request
568
+
569
+ extra_body: Add additional JSON properties to the request
570
+
571
+ timeout: Override the client-level default timeout for this request, in seconds
572
+ """
573
+ ...
574
+
575
+ @overload
576
+ async def create(
577
+ self,
578
+ *,
579
+ name: str,
580
+ prompt: str,
581
+ conditions: Iterable[Dict[str, object]] | Omit = omit,
582
+ configuration: question_create_params.TimestampQuestionRequestConfiguration | Omit = omit,
583
+ question_type: Literal["timestamp"] | Omit = omit,
584
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
585
+ # The extra values given here take precedence over values defined on the client or passed to this method.
586
+ extra_headers: Headers | None = None,
587
+ extra_query: Query | None = None,
588
+ extra_body: Body | None = None,
589
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
590
+ ) -> Question:
591
+ """
592
+ Create Question
593
+
594
+ Args:
595
+ prompt: user-facing question prompt
596
+
597
+ conditions: Conditions for the question to be shown
598
+
497
599
  extra_headers: Send extra headers
498
600
 
499
601
  extra_query: Add additional query parameters to the request
@@ -513,14 +615,17 @@ class AsyncQuestionsResource(AsyncAPIResource):
513
615
  | question_create_params.NumberQuestionRequestConfiguration
514
616
  | question_create_params.FreeTextQuestionRequestConfiguration
515
617
  | question_create_params.FormQuestionRequestConfiguration
618
+ | question_create_params.TimestampQuestionRequestConfiguration
516
619
  | Omit = omit,
517
620
  name: str,
518
621
  prompt: str,
622
+ conditions: Iterable[Dict[str, object]] | Omit = omit,
519
623
  question_type: Literal["categorical"]
520
624
  | Literal["rating"]
521
625
  | Literal["number"]
522
626
  | Literal["free_text"]
523
627
  | Literal["form"]
628
+ | Literal["timestamp"]
524
629
  | Omit = omit,
525
630
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
526
631
  # The extra values given here take precedence over values defined on the client or passed to this method.
@@ -538,6 +643,7 @@ class AsyncQuestionsResource(AsyncAPIResource):
538
643
  "configuration": configuration,
539
644
  "name": name,
540
645
  "prompt": prompt,
646
+ "conditions": conditions,
541
647
  "question_type": question_type,
542
648
  },
543
649
  question_create_params.QuestionCreateParams,
@@ -73,9 +73,11 @@ from .evaluation_item_list_params import EvaluationItemListParams as EvaluationI
73
73
  from .span_assessment_list_params import SpanAssessmentListParams as SpanAssessmentListParams
74
74
  from .dataset_item_delete_response import DatasetItemDeleteResponse as DatasetItemDeleteResponse
75
75
  from .dataset_item_retrieve_params import DatasetItemRetrieveParams as DatasetItemRetrieveParams
76
+ from .file_import_from_cloud_params import FileImportFromCloudParams as FileImportFromCloudParams
76
77
  from .span_assessment_create_params import SpanAssessmentCreateParams as SpanAssessmentCreateParams
77
78
  from .span_assessment_update_params import SpanAssessmentUpdateParams as SpanAssessmentUpdateParams
78
79
  from .evaluation_item_retrieve_params import EvaluationItemRetrieveParams as EvaluationItemRetrieveParams
80
+ from .file_import_from_cloud_response import FileImportFromCloudResponse as FileImportFromCloudResponse
79
81
  from .span_assessment_delete_response import SpanAssessmentDeleteResponse as SpanAssessmentDeleteResponse
80
82
  from .dataset_item_batch_create_params import DatasetItemBatchCreateParams as DatasetItemBatchCreateParams
81
83
  from .dataset_item_batch_create_response import DatasetItemBatchCreateResponse as DatasetItemBatchCreateResponse
@@ -18,5 +18,8 @@ class DatasetCreateParams(TypedDict, total=False):
18
18
 
19
19
  description: str
20
20
 
21
+ files: Iterable[Dict[str, str]]
22
+ """Files to be associated to the dataset"""
23
+
21
24
  tags: SequenceNotStr[str]
22
25
  """The tags associated with the entity"""
@@ -14,3 +14,6 @@ class DatasetItemBatchCreateParams(TypedDict, total=False):
14
14
 
15
15
  dataset_id: Required[str]
16
16
  """Identifier of the target dataset"""
17
+
18
+ files: Iterable[Dict[str, str]]
19
+ """Files to be associated to the dataset"""
@@ -11,3 +11,6 @@ __all__ = ["DatasetItemUpdateParams"]
11
11
  class DatasetItemUpdateParams(TypedDict, total=False):
12
12
  data: Required[Dict[str, object]]
13
13
  """Updated dataset item data"""
14
+
15
+ files: Dict[str, str]
16
+ """Files to be associated to the dataset"""
@@ -25,6 +25,9 @@ class EvaluationStandaloneCreateRequest(TypedDict, total=False):
25
25
 
26
26
  description: str
27
27
 
28
+ files: Iterable[Dict[str, str]]
29
+ """Files to be associated to the evaluation"""
30
+
28
31
  metadata: Dict[str, object]
29
32
  """Optional metadata key-value pairs for the evaluation"""
30
33
 
@@ -76,6 +79,9 @@ class EvaluationWithDatasetCreateRequest(TypedDict, total=False):
76
79
 
77
80
  description: str
78
81
 
82
+ files: Iterable[Dict[str, str]]
83
+ """Files to be associated to the evaluation"""
84
+
79
85
  metadata: Dict[str, object]
80
86
  """Optional metadata key-value pairs for the evaluation"""
81
87
 
@@ -26,6 +26,8 @@ __all__ = [
26
26
  "ApplicationVariantV1EvaluationTaskConfigurationOverridesAgenticApplicationOverrides",
27
27
  "ApplicationVariantV1EvaluationTaskConfigurationOverridesAgenticApplicationOverridesInitialState",
28
28
  "ApplicationVariantV1EvaluationTaskConfigurationOverridesAgenticApplicationOverridesPartialTrace",
29
+ "AgentexOutputEvaluationTask",
30
+ "AgentexOutputEvaluationTaskConfiguration",
29
31
  "MetricEvaluationTask",
30
32
  "MetricEvaluationTaskConfiguration",
31
33
  "MetricEvaluationTaskConfigurationBleuScorerConfigWithItemLocator",
@@ -254,6 +256,21 @@ class ApplicationVariantV1EvaluationTask(BaseModel):
254
256
  task_type: Optional[Literal["application_variant"]] = None
255
257
 
256
258
 
259
+ class AgentexOutputEvaluationTaskConfiguration(BaseModel):
260
+ agentex_agent_id: str
261
+
262
+ input_column: str
263
+
264
+
265
+ class AgentexOutputEvaluationTask(BaseModel):
266
+ configuration: AgentexOutputEvaluationTaskConfiguration
267
+
268
+ alias: Optional[str] = None
269
+ """Alias to title the results column. Defaults to the `agentex_output`"""
270
+
271
+ task_type: Optional[Literal["agentex_output"]] = None
272
+
273
+
257
274
  class MetricEvaluationTaskConfigurationBleuScorerConfigWithItemLocator(BaseModel):
258
275
  candidate: str
259
276
 
@@ -596,6 +613,7 @@ EvaluationTask: TypeAlias = Annotated[
596
613
  ChatCompletionEvaluationTask,
597
614
  GenericInferenceEvaluationTask,
598
615
  ApplicationVariantV1EvaluationTask,
616
+ AgentexOutputEvaluationTask,
599
617
  MetricEvaluationTask,
600
618
  AutoEvaluationQuestionTask,
601
619
  AutoEvaluationGuidedDecodingEvaluationTask,
@@ -23,6 +23,8 @@ __all__ = [
23
23
  "ApplicationVariantV1EvaluationTaskConfigurationOverridesAgenticApplicationOverrides",
24
24
  "ApplicationVariantV1EvaluationTaskConfigurationOverridesAgenticApplicationOverridesInitialState",
25
25
  "ApplicationVariantV1EvaluationTaskConfigurationOverridesAgenticApplicationOverridesPartialTrace",
26
+ "AgentexOutputEvaluationTask",
27
+ "AgentexOutputEvaluationTaskConfiguration",
26
28
  "MetricEvaluationTask",
27
29
  "MetricEvaluationTaskConfiguration",
28
30
  "MetricEvaluationTaskConfigurationBleuScorerConfigWithItemLocator",
@@ -246,6 +248,21 @@ class ApplicationVariantV1EvaluationTask(TypedDict, total=False):
246
248
  task_type: Literal["application_variant"]
247
249
 
248
250
 
251
+ class AgentexOutputEvaluationTaskConfiguration(TypedDict, total=False):
252
+ agentex_agent_id: Required[str]
253
+
254
+ input_column: Required[str]
255
+
256
+
257
+ class AgentexOutputEvaluationTask(TypedDict, total=False):
258
+ configuration: Required[AgentexOutputEvaluationTaskConfiguration]
259
+
260
+ alias: str
261
+ """Alias to title the results column. Defaults to the `agentex_output`"""
262
+
263
+ task_type: Literal["agentex_output"]
264
+
265
+
249
266
  class MetricEvaluationTaskConfigurationBleuScorerConfigWithItemLocator(TypedDict, total=False):
250
267
  candidate: Required[str]
251
268
 
@@ -594,6 +611,7 @@ EvaluationTaskParam: TypeAlias = Union[
594
611
  ChatCompletionEvaluationTask,
595
612
  GenericInferenceEvaluationTask,
596
613
  ApplicationVariantV1EvaluationTask,
614
+ AgentexOutputEvaluationTask,
597
615
  MetricEvaluationTask,
598
616
  AutoEvaluationQuestionTask,
599
617
  AutoEvaluationGuidedDecodingEvaluationTask,
@@ -0,0 +1,27 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from __future__ import annotations
4
+
5
+ from typing import Iterable
6
+ from typing_extensions import Required, TypedDict
7
+
8
+ __all__ = ["FileImportFromCloudParams", "File"]
9
+
10
+
11
+ class FileImportFromCloudParams(TypedDict, total=False):
12
+ files: Required[Iterable[File]]
13
+ """List of files to import from cloud storage"""
14
+
15
+
16
+ class File(TypedDict, total=False):
17
+ container: Required[str]
18
+ """The cloud storage container/bucket name"""
19
+
20
+ file_type: Required[str]
21
+ """The MIME type of the file"""
22
+
23
+ filename: Required[str]
24
+ """The name of the file"""
25
+
26
+ filepath: Required[str]
27
+ """The path to the file within the container"""
@@ -0,0 +1,35 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from typing import List, Union, Optional
4
+ from typing_extensions import Literal, TypeAlias
5
+
6
+ from .file import File
7
+ from .._models import BaseModel
8
+
9
+ __all__ = ["FileImportFromCloudResponse", "Result", "ResultFile", "ResultFile_FailedFile"]
10
+
11
+
12
+ class ResultFile_FailedFile(BaseModel):
13
+ filename: str
14
+ """The original filename from the request"""
15
+
16
+ mime_type: str
17
+ """The original MIME type from the request"""
18
+
19
+ object: Optional[Literal["failed_file"]] = None
20
+
21
+
22
+ ResultFile: TypeAlias = Union[File, ResultFile_FailedFile]
23
+
24
+
25
+ class Result(BaseModel):
26
+ file: ResultFile
27
+ """The file object (full File for success, minimal \\__FailedFile for failures)"""
28
+
29
+ status: Literal["SUCCESS", "FAILED_FILE_DOES_NOT_EXIST", "FAILED_INVALID_PERMISSIONS", "FAILED_UNKNOWN_ERROR"]
30
+ """The status of the upload attempt"""
31
+
32
+
33
+ class FileImportFromCloudResponse(BaseModel):
34
+ results: List[Result]
35
+ """Results for each file import attempt"""
@@ -20,6 +20,8 @@ __all__ = [
20
20
  "FreeTextQuestionConfiguration",
21
21
  "FormQuestion",
22
22
  "FormQuestionConfiguration",
23
+ "TimestampQuestion",
24
+ "TimestampQuestionConfiguration",
23
25
  ]
24
26
 
25
27
 
@@ -51,6 +53,9 @@ class CategoricalQuestion(BaseModel):
51
53
  prompt: str
52
54
  """user-facing question prompt"""
53
55
 
56
+ conditions: Optional[List[Dict[str, object]]] = None
57
+ """Conditions for the question to be shown"""
58
+
54
59
  object: Optional[Literal["question"]] = None
55
60
 
56
61
  question_type: Optional[Literal["categorical"]] = None
@@ -84,6 +89,9 @@ class RatingQuestion(BaseModel):
84
89
  prompt: str
85
90
  """user-facing question prompt"""
86
91
 
92
+ conditions: Optional[List[Dict[str, object]]] = None
93
+ """Conditions for the question to be shown"""
94
+
87
95
  object: Optional[Literal["question"]] = None
88
96
 
89
97
  question_type: Optional[Literal["rating"]] = None
@@ -112,6 +120,9 @@ class NumberQuestion(BaseModel):
112
120
  prompt: str
113
121
  """user-facing question prompt"""
114
122
 
123
+ conditions: Optional[List[Dict[str, object]]] = None
124
+ """Conditions for the question to be shown"""
125
+
115
126
  configuration: Optional[NumberQuestionConfiguration] = None
116
127
 
117
128
  object: Optional[Literal["question"]] = None
@@ -142,6 +153,9 @@ class FreeTextQuestion(BaseModel):
142
153
  prompt: str
143
154
  """user-facing question prompt"""
144
155
 
156
+ conditions: Optional[List[Dict[str, object]]] = None
157
+ """Conditions for the question to be shown"""
158
+
145
159
  configuration: Optional[FreeTextQuestionConfiguration] = None
146
160
 
147
161
  object: Optional[Literal["question"]] = None
@@ -171,12 +185,45 @@ class FormQuestion(BaseModel):
171
185
  prompt: str
172
186
  """user-facing question prompt"""
173
187
 
188
+ conditions: Optional[List[Dict[str, object]]] = None
189
+ """Conditions for the question to be shown"""
190
+
174
191
  object: Optional[Literal["question"]] = None
175
192
 
176
193
  question_type: Optional[Literal["form"]] = None
177
194
 
178
195
 
196
+ class TimestampQuestionConfiguration(BaseModel):
197
+ multi: Optional[bool] = None
198
+ """Whether to allow multiple timestamps"""
199
+
200
+
201
+ class TimestampQuestion(BaseModel):
202
+ id: str
203
+ """Unique identifier of the entity"""
204
+
205
+ created_at: datetime
206
+ """ISO-timestamp when the entity was created"""
207
+
208
+ created_by: Identity
209
+ """The identity that created the entity."""
210
+
211
+ name: str
212
+
213
+ prompt: str
214
+ """user-facing question prompt"""
215
+
216
+ conditions: Optional[List[Dict[str, object]]] = None
217
+ """Conditions for the question to be shown"""
218
+
219
+ configuration: Optional[TimestampQuestionConfiguration] = None
220
+
221
+ object: Optional[Literal["question"]] = None
222
+
223
+ question_type: Optional[Literal["timestamp"]] = None
224
+
225
+
179
226
  Question: TypeAlias = Annotated[
180
- Union[CategoricalQuestion, RatingQuestion, NumberQuestion, FreeTextQuestion, FormQuestion],
227
+ Union[CategoricalQuestion, RatingQuestion, NumberQuestion, FreeTextQuestion, FormQuestion, TimestampQuestion],
181
228
  PropertyInfo(discriminator="question_type"),
182
229
  ]
@@ -2,7 +2,7 @@
2
2
 
3
3
  from __future__ import annotations
4
4
 
5
- from typing import Dict, Union
5
+ from typing import Dict, Union, Iterable
6
6
  from typing_extensions import Literal, Required, TypeAlias, TypedDict
7
7
 
8
8
  from .._types import SequenceNotStr
@@ -19,6 +19,8 @@ __all__ = [
19
19
  "FreeTextQuestionRequestConfiguration",
20
20
  "FormQuestionRequest",
21
21
  "FormQuestionRequestConfiguration",
22
+ "TimestampQuestionRequest",
23
+ "TimestampQuestionRequestConfiguration",
22
24
  ]
23
25
 
24
26
 
@@ -30,6 +32,9 @@ class CategoricalQuestionRequest(TypedDict, total=False):
30
32
  prompt: Required[str]
31
33
  """user-facing question prompt"""
32
34
 
35
+ conditions: Iterable[Dict[str, object]]
36
+ """Conditions for the question to be shown"""
37
+
33
38
  question_type: Literal["categorical"]
34
39
 
35
40
 
@@ -52,6 +57,9 @@ class RatingQuestionRequest(TypedDict, total=False):
52
57
  prompt: Required[str]
53
58
  """user-facing question prompt"""
54
59
 
60
+ conditions: Iterable[Dict[str, object]]
61
+ """Conditions for the question to be shown"""
62
+
55
63
  question_type: Literal["rating"]
56
64
 
57
65
 
@@ -72,6 +80,9 @@ class NumberQuestionRequest(TypedDict, total=False):
72
80
  prompt: Required[str]
73
81
  """user-facing question prompt"""
74
82
 
83
+ conditions: Iterable[Dict[str, object]]
84
+ """Conditions for the question to be shown"""
85
+
75
86
  configuration: NumberQuestionRequestConfiguration
76
87
 
77
88
  question_type: Literal["number"]
@@ -91,6 +102,9 @@ class FreeTextQuestionRequest(TypedDict, total=False):
91
102
  prompt: Required[str]
92
103
  """user-facing question prompt"""
93
104
 
105
+ conditions: Iterable[Dict[str, object]]
106
+ """Conditions for the question to be shown"""
107
+
94
108
  configuration: FreeTextQuestionRequestConfiguration
95
109
 
96
110
  question_type: Literal["free_text"]
@@ -112,6 +126,9 @@ class FormQuestionRequest(TypedDict, total=False):
112
126
  prompt: Required[str]
113
127
  """user-facing question prompt"""
114
128
 
129
+ conditions: Iterable[Dict[str, object]]
130
+ """Conditions for the question to be shown"""
131
+
115
132
  question_type: Literal["form"]
116
133
 
117
134
 
@@ -120,10 +137,30 @@ class FormQuestionRequestConfiguration(TypedDict, total=False):
120
137
  """The JSON schema of the desired form object"""
121
138
 
122
139
 
140
+ class TimestampQuestionRequest(TypedDict, total=False):
141
+ name: Required[str]
142
+
143
+ prompt: Required[str]
144
+ """user-facing question prompt"""
145
+
146
+ conditions: Iterable[Dict[str, object]]
147
+ """Conditions for the question to be shown"""
148
+
149
+ configuration: TimestampQuestionRequestConfiguration
150
+
151
+ question_type: Literal["timestamp"]
152
+
153
+
154
+ class TimestampQuestionRequestConfiguration(TypedDict, total=False):
155
+ multi: bool
156
+ """Whether to allow multiple timestamps"""
157
+
158
+
123
159
  QuestionCreateParams: TypeAlias = Union[
124
160
  CategoricalQuestionRequest,
125
161
  RatingQuestionRequest,
126
162
  NumberQuestionRequest,
127
163
  FreeTextQuestionRequest,
128
164
  FormQuestionRequest,
165
+ TimestampQuestionRequest,
129
166
  ]