@@ -289,7 +289,7 @@ describe("BackendClient", () => {
289289 } ) ;
290290 } ) ;
291291
292- describe ( "getAccounts " , ( ) => {
292+ describe ( "accountsGet " , ( ) => {
293293 it ( "should retrieve accounts" , async ( ) => {
294294 fetchMock . mockResponseOnce (
295295 JSON . stringify ( [
@@ -305,7 +305,7 @@ describe("BackendClient", () => {
305305 } ,
306306 ) ;
307307
308- const result = await client . getAccounts ( {
308+ const result = await client . accountsGet ( {
309309 include_credentials : 1 ,
310310 } ) ;
311311
@@ -322,7 +322,7 @@ describe("BackendClient", () => {
322322 } ) ;
323323 } ) ;
324324
325- describe ( "getAccount " , ( ) => {
325+ describe ( "accountsGetById " , ( ) => {
326326 it ( "should retrieve a specific account by ID" , async ( ) => {
327327 fetchMock . mockResponseOnce (
328328 JSON . stringify ( {
@@ -336,7 +336,7 @@ describe("BackendClient", () => {
336336 } ,
337337 ) ;
338338
339- const result = await client . getAccount ( "account-1" ) ;
339+ const result = await client . accountsGetById ( "account-1" ) ;
340340
341341 expect ( result ) . toEqual ( {
342342 id : "account-1" ,
@@ -349,7 +349,7 @@ describe("BackendClient", () => {
349349 } ) ;
350350 } ) ;
351351
352- describe ( "getAccountsByApp " , ( ) => {
352+ describe ( "Get accounts by app " , ( ) => {
353353 it ( "should retrieve accounts associated with a specific app" , async ( ) => {
354354 fetchMock . mockResponseOnce (
355355 JSON . stringify ( [
@@ -365,7 +365,9 @@ describe("BackendClient", () => {
365365 } ,
366366 ) ;
367367
368- const result = await client . getAccountsByApp ( "app-1" ) ;
368+ const result = await client . accountsGet ( {
369+ app : "app-1" ,
370+ } ) ;
369371
370372 expect ( result ) . toEqual ( [
371373 {
@@ -374,13 +376,13 @@ describe("BackendClient", () => {
374376 } ,
375377 ] ) ;
376378 expect ( fetchMock ) . toHaveBeenCalledWith (
377- `https://api.pipedream.com/v1/connect/${ projectId } /accounts/ app/ app-1` ,
379+ `https://api.pipedream.com/v1/connect/${ projectId } /accounts? app= app-1` ,
378380 expect . any ( Object ) ,
379381 ) ;
380382 } ) ;
381383 } ) ;
382384
383- describe ( "getAccountsByExternalId " , ( ) => {
385+ describe ( "Get accounts by external user ID " , ( ) => {
384386 it ( "should retrieve accounts associated with a specific external ID" , async ( ) => {
385387 fetchMock . mockResponseOnce (
386388 JSON . stringify ( [
@@ -396,7 +398,9 @@ describe("BackendClient", () => {
396398 } ,
397399 ) ;
398400
399- const result = await client . getAccountsByExternalId ( "external-id-1" ) ;
401+ const result = await client . accountsGet ( {
402+ external_user_id : "external-id-1" ,
403+ } ) ;
400404
401405 expect ( result ) . toEqual ( [
402406 {
@@ -405,7 +409,7 @@ describe("BackendClient", () => {
405409 } ,
406410 ] ) ;
407411 expect ( fetchMock ) . toHaveBeenCalledWith (
408- `https://api.pipedream.com/v1/connect/${ projectId } /users/ external-id-1/accounts ` ,
412+ `https://api.pipedream.com/v1/connect/${ projectId } /accounts?external_user_id= external-id-1` ,
409413 expect . any ( Object ) ,
410414 ) ;
411415 } ) ;
@@ -417,7 +421,7 @@ describe("BackendClient", () => {
417421 status : 204 ,
418422 } ) ;
419423
420- await client . deleteAccount ( "account-1" ) ;
424+ await client . accountDelete ( "account-1" ) ;
421425
422426 expect ( fetchMock ) . toHaveBeenCalledWith (
423427 `https://api.pipedream.com/v1/connect/${ projectId } /accounts/account-1` ,
@@ -428,13 +432,13 @@ describe("BackendClient", () => {
428432 } ) ;
429433 } ) ;
430434
431- describe ( "deleteAccountsByApp " , ( ) => {
435+ describe ( "accountsDeleteByApp " , ( ) => {
432436 it ( "should delete all accounts associated with a specific app" , async ( ) => {
433437 fetchMock . mockResponseOnce ( "" , {
434438 status : 204 ,
435439 } ) ;
436440
437- await client . deleteAccountsByApp ( "app-1" ) ;
441+ await client . accountsDeleteByApp ( "app-1" ) ;
438442
439443 expect ( fetchMock ) . toHaveBeenCalledWith (
440444 `https://api.pipedream.com/v1/connect/${ projectId } /accounts/app/app-1` ,
@@ -445,13 +449,13 @@ describe("BackendClient", () => {
445449 } ) ;
446450 } ) ;
447451
448- describe ( "deleteExternalUser " , ( ) => {
452+ describe ( "accountsDeleteByExternalUser " , ( ) => {
449453 it ( "should delete all accounts associated with a specific external ID" , async ( ) => {
450454 fetchMock . mockResponseOnce ( "" , {
451455 status : 204 ,
452456 } ) ;
453457
454- await client . deleteExternalUser ( "external-id-1" ) ;
458+ await client . accountsDeleteByExternalUser ( "external-id-1" ) ;
455459
456460 expect ( fetchMock ) . toHaveBeenCalledWith (
457461 `https://api.pipedream.com/v1/connect/${ projectId } /users/external-id-1` ,
@@ -462,7 +466,7 @@ describe("BackendClient", () => {
462466 } ) ;
463467 } ) ;
464468
465- describe ( "getProjectInfo " , ( ) => {
469+ describe ( "projectGetInfo " , ( ) => {
466470 it ( "should retrieve project info" , async ( ) => {
467471 fetchMock . mockResponseOnce (
468472 JSON . stringify ( {
@@ -480,7 +484,7 @@ describe("BackendClient", () => {
480484 } ,
481485 ) ;
482486
483- const result = await client . getProjectInfo ( ) ;
487+ const result = await client . projectGetInfo ( ) ;
484488
485489 expect ( result ) . toEqual ( {
486490 apps : [
@@ -499,7 +503,7 @@ describe("BackendClient", () => {
499503 } ) ;
500504 } ) ;
501505
502- describe ( "invokeWorkflow " , ( ) => {
506+ describe ( "workflowInvoke " , ( ) => {
503507 it ( "should invoke a workflow with provided URL and body, with no auth type" , async ( ) => {
504508 fetchMock . mockResponseOnce (
505509 JSON . stringify ( {
@@ -512,7 +516,7 @@ describe("BackendClient", () => {
512516 } ,
513517 ) ;
514518
515- const result = await client . invokeWorkflow ( "https://example.com/workflow" , {
519+ const result = await client . workflowInvoke ( "https://example.com/workflow" , {
516520 body : {
517521 foo : "bar" ,
518522 } ,
@@ -548,7 +552,7 @@ describe("BackendClient", () => {
548552 } ,
549553 ) ;
550554
551- const result = await client . invokeWorkflow ( "https://example.com/workflow" , { } , HTTPAuthType . OAuth ) ;
555+ const result = await client . workflowInvoke ( "https://example.com/workflow" , { } , HTTPAuthType . OAuth ) ;
552556
553557 expect ( result ) . toEqual ( {
554558 result : "workflow-response" ,
@@ -576,7 +580,7 @@ describe("BackendClient", () => {
576580 } ,
577581 ) ;
578582
579- const result = await client . invokeWorkflow ( "https://example.com/workflow" , {
583+ const result = await client . workflowInvoke ( "https://example.com/workflow" , {
580584 headers : {
581585 "Authorization" : "Bearer static-token" ,
582586 } ,
@@ -722,7 +726,7 @@ describe("BackendClient", () => {
722726 } ,
723727 ) ;
724728
725- const result = await client . invokeWorkflowForExternalUser ( "https://example.com/workflow" , "external-user-id" , {
729+ const result = await client . workflowInvokeForExternalUser ( "https://example.com/workflow" , "external-user-id" , {
726730 body : {
727731 foo : "bar" ,
728732 } ,
@@ -744,7 +748,7 @@ describe("BackendClient", () => {
744748 } ) ;
745749
746750 it ( "should throw error when externalUserId is missing" , async ( ) => {
747- await expect ( client . invokeWorkflowForExternalUser ( "https://example.com/workflow" , "" , {
751+ await expect ( client . workflowInvokeForExternalUser ( "https://example.com/workflow" , "" , {
748752 body : {
749753 foo : "bar" ,
750754 } ,
0 commit comments