@@ -21,7 +21,9 @@ export class FhirProvider {
2121 }
2222
2323 /**
24- * Creates a new FHIR provider configuration with authentication credentials
24+ * Creates a new FHIR provider configuration with authentication credentials.
25+ *
26+ * Note: The "sandbox" provider type cannot be created via this API - it is managed internally.
2527 *
2628 * @param {phenoml.fhirProvider.FhirProviderCreateRequest } request
2729 * @param {FhirProvider.RequestOptions } requestOptions - Request-specific configuration.
@@ -128,12 +130,14 @@ export class FhirProvider {
128130 }
129131
130132 /**
131- * Retrieves a list of all active FHIR providers for the authenticated user
133+ * Retrieves a list of all active FHIR providers for the authenticated user.
134+ *
135+ * On shared instances, only sandbox providers are returned.
136+ * Sandbox providers return FhirProviderSandboxInfo.
132137 *
133138 * @param {FhirProvider.RequestOptions } requestOptions - Request-specific configuration.
134139 *
135140 * @throws {@link phenoml.fhirProvider.UnauthorizedError }
136- * @throws {@link phenoml.fhirProvider.ForbiddenError }
137141 * @throws {@link phenoml.fhirProvider.InternalServerError }
138142 *
139143 * @example
@@ -181,11 +185,6 @@ export class FhirProvider {
181185 _response . error . body as unknown ,
182186 _response . rawResponse ,
183187 ) ;
184- case 403 :
185- throw new phenoml . fhirProvider . ForbiddenError (
186- _response . error . body as unknown ,
187- _response . rawResponse ,
188- ) ;
189188 case 500 :
190189 throw new phenoml . fhirProvider . InternalServerError (
191190 _response . error . body as unknown ,
@@ -218,7 +217,10 @@ export class FhirProvider {
218217 }
219218
220219 /**
221- * Retrieves a specific FHIR provider configuration by its ID
220+ * Retrieves a specific FHIR provider configuration by its ID.
221+ *
222+ * Sandbox providers return FhirProviderSandboxInfo.
223+ * On shared instances, only sandbox providers can be accessed.
222224 *
223225 * @param {string } fhirProviderId - ID of the FHIR provider to retrieve
224226 * @param {FhirProvider.RequestOptions } requestOptions - Request-specific configuration.
@@ -319,7 +321,9 @@ export class FhirProvider {
319321 }
320322
321323 /**
322- * Soft deletes a FHIR provider by setting is_active to false
324+ * Soft deletes a FHIR provider by setting is_active to false.
325+ *
326+ * Note: Sandbox providers cannot be deleted.
323327 *
324328 * @param {string } fhirProviderId - ID of the FHIR provider to delete
325329 * @param {FhirProvider.RequestOptions } requestOptions - Request-specific configuration.
@@ -420,7 +424,10 @@ export class FhirProvider {
420424 }
421425
422426 /**
423- * Adds a new authentication configuration to an existing FHIR provider. This enables key rotation and multiple auth configurations per provider.
427+ * Adds a new authentication configuration to an existing FHIR provider.
428+ * This enables key rotation and multiple auth configurations per provider.
429+ *
430+ * Note: Sandbox providers cannot be modified.
424431 *
425432 * @param {string } fhirProviderId - ID of the FHIR provider to add auth config to
426433 * @param {phenoml.fhirProvider.FhirProviderAddAuthConfigRequest } request
@@ -535,7 +542,13 @@ export class FhirProvider {
535542 }
536543
537544 /**
538- * Sets which authentication configuration should be active for a FHIR provider. Only one auth config can be active at a time.
545+ * Sets which authentication configuration should be active for a FHIR provider.
546+ * Only one auth config can be active at a time.
547+ *
548+ * If the specified auth config is already active, the request succeeds without
549+ * making any changes and returns a message indicating the config is already active.
550+ *
551+ * Note: Sandbox providers cannot be modified.
539552 *
540553 * @param {string } fhirProviderId - ID of the FHIR provider
541554 * @param {phenoml.fhirProvider.FhirProviderSetActiveAuthConfigRequest } request
@@ -556,7 +569,7 @@ export class FhirProvider {
556569 fhirProviderId : string ,
557570 request : phenoml . fhirProvider . FhirProviderSetActiveAuthConfigRequest ,
558571 requestOptions ?: FhirProvider . RequestOptions ,
559- ) : core . HttpResponsePromise < phenoml . fhirProvider . FhirProviderSetActiveAuthConfigResponse > {
572+ ) : core . HttpResponsePromise < phenoml . fhirProvider . FhirProviderResponse > {
560573 return core . HttpResponsePromise . fromPromise (
561574 this . __setActiveAuthConfig ( fhirProviderId , request , requestOptions ) ,
562575 ) ;
@@ -566,7 +579,7 @@ export class FhirProvider {
566579 fhirProviderId : string ,
567580 request : phenoml . fhirProvider . FhirProviderSetActiveAuthConfigRequest ,
568581 requestOptions ?: FhirProvider . RequestOptions ,
569- ) : Promise < core . WithRawResponse < phenoml . fhirProvider . FhirProviderSetActiveAuthConfigResponse > > {
582+ ) : Promise < core . WithRawResponse < phenoml . fhirProvider . FhirProviderResponse > > {
570583 const _headers : core . Fetcher . Args [ "headers" ] = mergeHeaders (
571584 this . _options ?. headers ,
572585 mergeOnlyDefinedHeaders ( { Authorization : await this . _getAuthorizationHeader ( ) } ) ,
@@ -591,7 +604,7 @@ export class FhirProvider {
591604 } ) ;
592605 if ( _response . ok ) {
593606 return {
594- data : _response . body as phenoml . fhirProvider . FhirProviderSetActiveAuthConfigResponse ,
607+ data : _response . body as phenoml . fhirProvider . FhirProviderResponse ,
595608 rawResponse : _response . rawResponse ,
596609 } ;
597610 }
@@ -652,7 +665,10 @@ export class FhirProvider {
652665 }
653666
654667 /**
655- * Removes an authentication configuration from a FHIR provider. Cannot remove the currently active auth configuration.
668+ * Removes an authentication configuration from a FHIR provider.
669+ * Cannot remove the currently active auth configuration.
670+ *
671+ * Note: Sandbox providers cannot be modified.
656672 *
657673 * @param {string } fhirProviderId - ID of the FHIR provider
658674 * @param {phenoml.fhirProvider.FhirProviderRemoveAuthConfigRequest } request
0 commit comments