11import { getFullName } from '@clerk/shared/internal/clerk-js/user' ;
2- import { deepCamelToSnake } from '@clerk/shared/underscore' ;
32import type {
43 BackupCodeJSON ,
54 BackupCodeResource ,
@@ -22,16 +21,8 @@ import type {
2221 EnterpriseConnectionTestRunsPaginatedJSON ,
2322 ExternalAccountJSON ,
2423 ExternalAccountResource ,
25- ClerkPaginatedResponse ,
26- CreateMeEnterpriseConnectionParams ,
27- EnterpriseConnectionTestRunInitJSON ,
28- EnterpriseConnectionTestRunJSON ,
29- EnterpriseConnectionTestRunsPaginatedJSON ,
30- EnterpriseConnectionTestRunInitResource ,
31- EnterpriseConnectionTestRunResource ,
32- GetEnterpriseConnectionTestRunsParams ,
3324 GetEnterpriseConnectionsParams ,
34- UpdateMeEnterpriseConnectionParams ,
25+ GetEnterpriseConnectionTestRunsParams ,
3526 GetOrganizationMemberships ,
3627 GetUserOrganizationInvitationsParams ,
3728 GetUserOrganizationSuggestionsParams ,
@@ -56,7 +47,6 @@ import { deepCamelToSnake } from '@clerk/shared/underscore';
5647
5748import { convertPageToOffsetSearchParams } from '../../utils/convertPageToOffsetSearchParams' ;
5849import { unixEpochToDate } from '../../utils/date' ;
59- import { convertPageToOffsetSearchParams } from '../../utils/convertPageToOffsetSearchParams' ;
6050import { normalizeUnsafeMetadata } from '../../utils/resourceParams' ;
6151import { eventBus , events } from '../events' ;
6252import { addPaymentMethod , getPaymentMethods , initializePaymentMethod } from '../modules/billing' ;
@@ -345,7 +335,7 @@ export class User extends BaseResource implements UserResource {
345335 await BaseResource . _fetch < EnterpriseConnectionJSON > ( {
346336 path : `${ this . path ( ) } /enterprise_connections` ,
347337 method : 'POST' ,
348- body : deepCamelToSnake ( params ) as any ,
338+ body : toMeEnterpriseConnectionBody ( params ) as any ,
349339 } )
350340 ) ?. response as unknown as EnterpriseConnectionJSON ;
351341
@@ -360,7 +350,7 @@ export class User extends BaseResource implements UserResource {
360350 await BaseResource . _fetch < EnterpriseConnectionJSON > ( {
361351 path : `${ this . path ( ) } /enterprise_connections/${ enterpriseConnectionId } ` ,
362352 method : 'PATCH' ,
363- body : deepCamelToSnake ( params ) as any ,
353+ body : toMeEnterpriseConnectionBody ( params ) as any ,
364354 } )
365355 ) ?. response as unknown as EnterpriseConnectionJSON ;
366356
@@ -396,7 +386,7 @@ export class User extends BaseResource implements UserResource {
396386 params ?: GetEnterpriseConnectionTestRunsParams ,
397387 ) : Promise < ClerkPaginatedResponse < EnterpriseConnectionTestRunResource > > => {
398388 const { status, ...rest } = params || { } ;
399- const search = convertPageToOffsetSearchParams ( { ... rest , paginated : true } ) ;
389+ const search = convertPageToOffsetSearchParams ( rest ) ;
400390 if ( status ?. length ) {
401391 for ( const s of status ) {
402392 search . append ( 'status' , s ) ;
@@ -413,9 +403,7 @@ export class User extends BaseResource implements UserResource {
413403
414404 return {
415405 total_count : payload ?. total_count ?? 0 ,
416- data : ( payload ?. data ?? [ ] ) . map (
417- ( row : EnterpriseConnectionTestRunJSON ) => new EnterpriseConnectionTestRun ( row , enterpriseConnectionId ) ,
418- ) ,
406+ data : ( payload ?. data ?? [ ] ) . map ( ( row : EnterpriseConnectionTestRunJSON ) => new EnterpriseConnectionTestRun ( row ) ) ,
419407 } ;
420408 } ;
421409
0 commit comments