@@ -10,7 +10,10 @@ const client = new Julep({
1010
1111describe ( 'resource docs' , ( ) => {
1212 test ( 'create: only required params' , async ( ) => {
13- const responsePromise = client . agents . docs . create ( 'agent_id' , { content : 'string' , title : 'title' } ) ;
13+ const responsePromise = client . agents . docs . create ( '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e' , {
14+ content : 'string' ,
15+ title : 'title' ,
16+ } ) ;
1417 const rawResponse = await responsePromise . asResponse ( ) ;
1518 expect ( rawResponse ) . toBeInstanceOf ( Response ) ;
1619 const response = await responsePromise ;
@@ -21,15 +24,15 @@ describe('resource docs', () => {
2124 } ) ;
2225
2326 test ( 'create: required and optional params' , async ( ) => {
24- const response = await client . agents . docs . create ( 'agent_id ' , {
27+ const response = await client . agents . docs . create ( '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e ' , {
2528 content : 'string' ,
2629 title : 'title' ,
2730 metadata : { } ,
2831 } ) ;
2932 } ) ;
3033
3134 test ( 'list' , async ( ) => {
32- const responsePromise = client . agents . docs . list ( 'agent_id ' ) ;
35+ const responsePromise = client . agents . docs . list ( '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e ' ) ;
3336 const rawResponse = await responsePromise . asResponse ( ) ;
3437 expect ( rawResponse ) . toBeInstanceOf ( Response ) ;
3538 const response = await responsePromise ;
@@ -41,24 +44,27 @@ describe('resource docs', () => {
4144
4245 test ( 'list: request options instead of params are passed correctly' , async ( ) => {
4346 // ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error
44- await expect ( client . agents . docs . list ( 'agent_id' , { path : '/_stainless_unknown_path' } ) ) . rejects . toThrow (
45- Julep . NotFoundError ,
46- ) ;
47+ await expect (
48+ client . agents . docs . list ( '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e' , { path : '/_stainless_unknown_path' } ) ,
49+ ) . rejects . toThrow ( Julep . NotFoundError ) ;
4750 } ) ;
4851
4952 test ( 'list: request options and params are passed correctly' , async ( ) => {
5053 // ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error
5154 await expect (
5255 client . agents . docs . list (
53- 'agent_id ' ,
56+ '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e ' ,
5457 { direction : 'asc' , limit : 0 , metadata_filter : 'metadata_filter' , offset : 0 , sort_by : 'created_at' } ,
5558 { path : '/_stainless_unknown_path' } ,
5659 ) ,
5760 ) . rejects . toThrow ( Julep . NotFoundError ) ;
5861 } ) ;
5962
6063 test ( 'delete' , async ( ) => {
61- const responsePromise = client . agents . docs . delete ( 'agent_id' , 'doc_id' ) ;
64+ const responsePromise = client . agents . docs . delete (
65+ '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e' ,
66+ '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e' ,
67+ ) ;
6268 const rawResponse = await responsePromise . asResponse ( ) ;
6369 expect ( rawResponse ) . toBeInstanceOf ( Response ) ;
6470 const response = await responsePromise ;
@@ -71,12 +77,18 @@ describe('resource docs', () => {
7177 test ( 'delete: request options instead of params are passed correctly' , async ( ) => {
7278 // ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error
7379 await expect (
74- client . agents . docs . delete ( 'agent_id' , 'doc_id' , { path : '/_stainless_unknown_path' } ) ,
80+ client . agents . docs . delete (
81+ '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e' ,
82+ '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e' ,
83+ { path : '/_stainless_unknown_path' } ,
84+ ) ,
7585 ) . rejects . toThrow ( Julep . NotFoundError ) ;
7686 } ) ;
7787
7888 test ( 'search: only required params' , async ( ) => {
79- const responsePromise = client . agents . docs . search ( 'agent_id' , { text : 'text' } ) ;
89+ const responsePromise = client . agents . docs . search ( '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e' , {
90+ text : 'text' ,
91+ } ) ;
8092 const rawResponse = await responsePromise . asResponse ( ) ;
8193 expect ( rawResponse ) . toBeInstanceOf ( Response ) ;
8294 const response = await responsePromise ;
@@ -87,6 +99,10 @@ describe('resource docs', () => {
8799 } ) ;
88100
89101 test ( 'search: required and optional params' , async ( ) => {
90- const response = await client . agents . docs . search ( 'agent_id' , { text : 'text' , lang : 'en-US' , limit : 1 } ) ;
102+ const response = await client . agents . docs . search ( '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e' , {
103+ text : 'text' ,
104+ lang : 'en-US' ,
105+ limit : 1 ,
106+ } ) ;
91107 } ) ;
92108} ) ;
0 commit comments