File tree Expand file tree Collapse file tree
ui/components/OrganizationProfile Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ ---
2+ ---
Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ import type {
55 OrganizationDomainVerification ,
66 OrganizationEnrollmentMode ,
77 PrepareAffiliationVerificationParams ,
8- UpdateOrganizationDomainParams ,
8+ UpdateEnrollmentModeParams ,
99} from '@clerk/types' ;
1010
1111import { unixEpochToDate } from '../../utils/date' ;
@@ -57,10 +57,9 @@ export class OrganizationDomain extends BaseResource implements OrganizationDoma
5757 } ) ;
5858 } ;
5959
60- update = ( params : UpdateOrganizationDomainParams ) : Promise < OrganizationDomainResource > => {
61- return this . _basePatch ( {
62- method : 'PATCH' ,
63- path : `/organizations/${ this . organizationId } /domains/${ this . id } ` ,
60+ updateEnrollmentMode = ( params : UpdateEnrollmentModeParams ) : Promise < OrganizationDomainResource > => {
61+ return this . _basePost ( {
62+ path : `/organizations/${ this . organizationId } /domains/${ this . id } /update_enrollment_mode` ,
6463 body : params ,
6564 } ) ;
6665 } ;
Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ OrganizationDomain {
1111 " organizationId" : " test_org_id" ,
1212 " pathRoot" : " " ,
1313 " prepareAffiliationVerification" : [Function ],
14- " update " : [Function ],
14+ " updateEnrollmentMode " : [Function ],
1515 " verification" : null ,
1616}
1717` ;
@@ -27,7 +27,7 @@ OrganizationDomain {
2727 " organizationId" : " test_org_id" ,
2828 " pathRoot" : " " ,
2929 " prepareAffiliationVerification" : [Function ],
30- " update " : [Function ],
30+ " updateEnrollmentMode " : [Function ],
3131 " verification" : {
3232 " attempts" : 1 ,
3333 " expiresAt" : 1970 - 01 - 01T00 :00 :12.345Z ,
Original file line number Diff line number Diff line change @@ -82,7 +82,7 @@ export const VerifiedDomainPage = withCardStateProvider(() => {
8282 }
8383
8484 try {
85- await domain . update ( {
85+ await domain . updateEnrollmentMode ( {
8686 enrollmentMode : enrollmentMode . value as OrganizationEnrollmentMode ,
8787 } ) ;
8888
Original file line number Diff line number Diff line change @@ -24,7 +24,7 @@ export interface OrganizationDomainResource extends ClerkResource {
2424
2525 attemptAffiliationVerification : ( params : AttemptAffiliationVerificationParams ) => Promise < OrganizationDomainResource > ;
2626 delete : ( ) => Promise < void > ;
27- update : ( params : UpdateOrganizationDomainParams ) => Promise < OrganizationDomainResource > ;
27+ updateEnrollmentMode : ( params : UpdateEnrollmentModeParams ) => Promise < OrganizationDomainResource > ;
2828}
2929
3030export type PrepareAffiliationVerificationParams = {
@@ -35,4 +35,6 @@ export type AttemptAffiliationVerificationParams = {
3535 code : string ;
3636} ;
3737
38- export type UpdateOrganizationDomainParams = Partial < Pick < OrganizationDomainResource , 'enrollmentMode' > > ;
38+ export type UpdateEnrollmentModeParams = Pick < OrganizationDomainResource , 'enrollmentMode' > & {
39+ deleteExisting ?: boolean ;
40+ } ;
You can’t perform that action at this time.
0 commit comments