10
10
from ..._types import NOT_GIVEN , Body , Query , Headers , NoneType , NotGiven
11
11
from ..._utils import (
12
12
maybe_transform ,
13
+ strip_not_given ,
13
14
async_maybe_transform ,
14
15
)
15
16
from ..._compat import cached_property
@@ -61,6 +62,10 @@ def create(
61
62
question : str ,
62
63
answer : Optional [str ] | NotGiven = NOT_GIVEN ,
63
64
draft_answer : Optional [str ] | NotGiven = NOT_GIVEN ,
65
+ x_client_library_version : str | NotGiven = NOT_GIVEN ,
66
+ x_integration_type : str | NotGiven = NOT_GIVEN ,
67
+ x_source : str | NotGiven = NOT_GIVEN ,
68
+ x_stainless_package_version : str | NotGiven = NOT_GIVEN ,
64
69
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
65
70
# The extra values given here take precedence over values defined on the client or passed to this method.
66
71
extra_headers : Headers | None = None ,
@@ -84,6 +89,17 @@ def create(
84
89
"""
85
90
if not project_id :
86
91
raise ValueError (f"Expected a non-empty value for `project_id` but received { project_id !r} " )
92
+ extra_headers = {
93
+ ** strip_not_given (
94
+ {
95
+ "x-client-library-version" : x_client_library_version ,
96
+ "x-integration-type" : x_integration_type ,
97
+ "x-source" : x_source ,
98
+ "x-stainless-package-version" : x_stainless_package_version ,
99
+ }
100
+ ),
101
+ ** (extra_headers or {}),
102
+ }
87
103
return self ._post (
88
104
f"/api/projects/{ project_id } /entries/" ,
89
105
body = maybe_transform (
@@ -283,6 +299,10 @@ def add_question(
283
299
project_id : str ,
284
300
* ,
285
301
question : str ,
302
+ x_client_library_version : str | NotGiven = NOT_GIVEN ,
303
+ x_integration_type : str | NotGiven = NOT_GIVEN ,
304
+ x_source : str | NotGiven = NOT_GIVEN ,
305
+ x_stainless_package_version : str | NotGiven = NOT_GIVEN ,
286
306
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
287
307
# The extra values given here take precedence over values defined on the client or passed to this method.
288
308
extra_headers : Headers | None = None ,
@@ -307,6 +327,17 @@ def add_question(
307
327
"""
308
328
if not project_id :
309
329
raise ValueError (f"Expected a non-empty value for `project_id` but received { project_id !r} " )
330
+ extra_headers = {
331
+ ** strip_not_given (
332
+ {
333
+ "x-client-library-version" : x_client_library_version ,
334
+ "x-integration-type" : x_integration_type ,
335
+ "x-source" : x_source ,
336
+ "x-stainless-package-version" : x_stainless_package_version ,
337
+ }
338
+ ),
339
+ ** (extra_headers or {}),
340
+ }
310
341
return self ._post (
311
342
f"/api/projects/{ project_id } /entries/add_question" ,
312
343
body = maybe_transform ({"question" : question }, entry_add_question_params .EntryAddQuestionParams ),
@@ -321,6 +352,10 @@ def query(
321
352
project_id : str ,
322
353
* ,
323
354
question : str ,
355
+ x_client_library_version : str | NotGiven = NOT_GIVEN ,
356
+ x_integration_type : str | NotGiven = NOT_GIVEN ,
357
+ x_source : str | NotGiven = NOT_GIVEN ,
358
+ x_stainless_package_version : str | NotGiven = NOT_GIVEN ,
324
359
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
325
360
# The extra values given here take precedence over values defined on the client or passed to this method.
326
361
extra_headers : Headers | None = None ,
@@ -349,6 +384,17 @@ def query(
349
384
"""
350
385
if not project_id :
351
386
raise ValueError (f"Expected a non-empty value for `project_id` but received { project_id !r} " )
387
+ extra_headers = {
388
+ ** strip_not_given (
389
+ {
390
+ "x-client-library-version" : x_client_library_version ,
391
+ "x-integration-type" : x_integration_type ,
392
+ "x-source" : x_source ,
393
+ "x-stainless-package-version" : x_stainless_package_version ,
394
+ }
395
+ ),
396
+ ** (extra_headers or {}),
397
+ }
352
398
return self ._post (
353
399
f"/api/projects/{ project_id } /entries/query" ,
354
400
body = maybe_transform ({"question" : question }, entry_query_params .EntryQueryParams ),
@@ -386,6 +432,10 @@ async def create(
386
432
question : str ,
387
433
answer : Optional [str ] | NotGiven = NOT_GIVEN ,
388
434
draft_answer : Optional [str ] | NotGiven = NOT_GIVEN ,
435
+ x_client_library_version : str | NotGiven = NOT_GIVEN ,
436
+ x_integration_type : str | NotGiven = NOT_GIVEN ,
437
+ x_source : str | NotGiven = NOT_GIVEN ,
438
+ x_stainless_package_version : str | NotGiven = NOT_GIVEN ,
389
439
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
390
440
# The extra values given here take precedence over values defined on the client or passed to this method.
391
441
extra_headers : Headers | None = None ,
@@ -409,6 +459,17 @@ async def create(
409
459
"""
410
460
if not project_id :
411
461
raise ValueError (f"Expected a non-empty value for `project_id` but received { project_id !r} " )
462
+ extra_headers = {
463
+ ** strip_not_given (
464
+ {
465
+ "x-client-library-version" : x_client_library_version ,
466
+ "x-integration-type" : x_integration_type ,
467
+ "x-source" : x_source ,
468
+ "x-stainless-package-version" : x_stainless_package_version ,
469
+ }
470
+ ),
471
+ ** (extra_headers or {}),
472
+ }
412
473
return await self ._post (
413
474
f"/api/projects/{ project_id } /entries/" ,
414
475
body = await async_maybe_transform (
@@ -608,6 +669,10 @@ async def add_question(
608
669
project_id : str ,
609
670
* ,
610
671
question : str ,
672
+ x_client_library_version : str | NotGiven = NOT_GIVEN ,
673
+ x_integration_type : str | NotGiven = NOT_GIVEN ,
674
+ x_source : str | NotGiven = NOT_GIVEN ,
675
+ x_stainless_package_version : str | NotGiven = NOT_GIVEN ,
611
676
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
612
677
# The extra values given here take precedence over values defined on the client or passed to this method.
613
678
extra_headers : Headers | None = None ,
@@ -632,6 +697,17 @@ async def add_question(
632
697
"""
633
698
if not project_id :
634
699
raise ValueError (f"Expected a non-empty value for `project_id` but received { project_id !r} " )
700
+ extra_headers = {
701
+ ** strip_not_given (
702
+ {
703
+ "x-client-library-version" : x_client_library_version ,
704
+ "x-integration-type" : x_integration_type ,
705
+ "x-source" : x_source ,
706
+ "x-stainless-package-version" : x_stainless_package_version ,
707
+ }
708
+ ),
709
+ ** (extra_headers or {}),
710
+ }
635
711
return await self ._post (
636
712
f"/api/projects/{ project_id } /entries/add_question" ,
637
713
body = await async_maybe_transform ({"question" : question }, entry_add_question_params .EntryAddQuestionParams ),
@@ -646,6 +722,10 @@ async def query(
646
722
project_id : str ,
647
723
* ,
648
724
question : str ,
725
+ x_client_library_version : str | NotGiven = NOT_GIVEN ,
726
+ x_integration_type : str | NotGiven = NOT_GIVEN ,
727
+ x_source : str | NotGiven = NOT_GIVEN ,
728
+ x_stainless_package_version : str | NotGiven = NOT_GIVEN ,
649
729
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
650
730
# The extra values given here take precedence over values defined on the client or passed to this method.
651
731
extra_headers : Headers | None = None ,
@@ -674,6 +754,17 @@ async def query(
674
754
"""
675
755
if not project_id :
676
756
raise ValueError (f"Expected a non-empty value for `project_id` but received { project_id !r} " )
757
+ extra_headers = {
758
+ ** strip_not_given (
759
+ {
760
+ "x-client-library-version" : x_client_library_version ,
761
+ "x-integration-type" : x_integration_type ,
762
+ "x-source" : x_source ,
763
+ "x-stainless-package-version" : x_stainless_package_version ,
764
+ }
765
+ ),
766
+ ** (extra_headers or {}),
767
+ }
677
768
return await self ._post (
678
769
f"/api/projects/{ project_id } /entries/query" ,
679
770
body = await async_maybe_transform ({"question" : question }, entry_query_params .EntryQueryParams ),
0 commit comments