1010from ..._types import NOT_GIVEN , Body , Query , Headers , NoneType , NotGiven
1111from ..._utils import (
1212 maybe_transform ,
13+ strip_not_given ,
1314 async_maybe_transform ,
1415)
1516from ..._compat import cached_property
@@ -61,6 +62,10 @@ def create(
6162 question : str ,
6263 answer : Optional [str ] | NotGiven = NOT_GIVEN ,
6364 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 ,
6469 # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
6570 # The extra values given here take precedence over values defined on the client or passed to this method.
6671 extra_headers : Headers | None = None ,
@@ -84,6 +89,17 @@ def create(
8489 """
8590 if not project_id :
8691 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+ }
87103 return self ._post (
88104 f"/api/projects/{ project_id } /entries/" ,
89105 body = maybe_transform (
@@ -283,6 +299,10 @@ def add_question(
283299 project_id : str ,
284300 * ,
285301 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 ,
286306 # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
287307 # The extra values given here take precedence over values defined on the client or passed to this method.
288308 extra_headers : Headers | None = None ,
@@ -307,6 +327,17 @@ def add_question(
307327 """
308328 if not project_id :
309329 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+ }
310341 return self ._post (
311342 f"/api/projects/{ project_id } /entries/add_question" ,
312343 body = maybe_transform ({"question" : question }, entry_add_question_params .EntryAddQuestionParams ),
@@ -321,6 +352,10 @@ def query(
321352 project_id : str ,
322353 * ,
323354 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 ,
324359 # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
325360 # The extra values given here take precedence over values defined on the client or passed to this method.
326361 extra_headers : Headers | None = None ,
@@ -349,6 +384,17 @@ def query(
349384 """
350385 if not project_id :
351386 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+ }
352398 return self ._post (
353399 f"/api/projects/{ project_id } /entries/query" ,
354400 body = maybe_transform ({"question" : question }, entry_query_params .EntryQueryParams ),
@@ -386,6 +432,10 @@ async def create(
386432 question : str ,
387433 answer : Optional [str ] | NotGiven = NOT_GIVEN ,
388434 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 ,
389439 # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
390440 # The extra values given here take precedence over values defined on the client or passed to this method.
391441 extra_headers : Headers | None = None ,
@@ -409,6 +459,17 @@ async def create(
409459 """
410460 if not project_id :
411461 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+ }
412473 return await self ._post (
413474 f"/api/projects/{ project_id } /entries/" ,
414475 body = await async_maybe_transform (
@@ -608,6 +669,10 @@ async def add_question(
608669 project_id : str ,
609670 * ,
610671 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 ,
611676 # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
612677 # The extra values given here take precedence over values defined on the client or passed to this method.
613678 extra_headers : Headers | None = None ,
@@ -632,6 +697,17 @@ async def add_question(
632697 """
633698 if not project_id :
634699 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+ }
635711 return await self ._post (
636712 f"/api/projects/{ project_id } /entries/add_question" ,
637713 body = await async_maybe_transform ({"question" : question }, entry_add_question_params .EntryAddQuestionParams ),
@@ -646,6 +722,10 @@ async def query(
646722 project_id : str ,
647723 * ,
648724 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 ,
649729 # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
650730 # The extra values given here take precedence over values defined on the client or passed to this method.
651731 extra_headers : Headers | None = None ,
@@ -674,6 +754,17 @@ async def query(
674754 """
675755 if not project_id :
676756 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+ }
677768 return await self ._post (
678769 f"/api/projects/{ project_id } /entries/query" ,
679770 body = await async_maybe_transform ({"question" : question }, entry_query_params .EntryQueryParams ),
0 commit comments