From 46bbea2c73762276d2bf159f1fc0b8451fa2fd03 Mon Sep 17 00:00:00 2001 From: Aaron Tainter Date: Mon, 6 Apr 2026 14:31:02 -0700 Subject: [PATCH] Add deprecated docstrings to all legacy FGA methods --- src/fga/fga.ts | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) diff --git a/src/fga/fga.ts b/src/fga/fga.ts index 18730ef09..d649c4103 100644 --- a/src/fga/fga.ts +++ b/src/fga/fga.ts @@ -58,6 +58,10 @@ import { fetchAndDeserializeFGAList } from './utils/fetch-and-deserialize-list'; export class FGA { constructor(private readonly workos: WorkOS) {} + /** + * @deprecated The FGA module is deprecated. Use the Authorization module instead. + * @see src/authorization/authorization.ts + */ async check( checkOptions: CheckOptions, options: CheckRequestOptions = {}, @@ -70,6 +74,10 @@ export class FGA { return new CheckResult(data); } + /** + * @deprecated The FGA module is deprecated. Use the Authorization module instead. + * @see src/authorization/authorization.ts + */ async checkBatch( checkOptions: CheckBatchOptions, options: CheckRequestOptions = {}, @@ -84,6 +92,10 @@ export class FGA { ); } + /** + * @deprecated The FGA module is deprecated. Use the Authorization module instead. + * @see src/authorization/authorization.ts + */ async createResource(resource: CreateResourceOptions): Promise { const { data } = await this.workos.post( '/fga/v1/resources', @@ -93,6 +105,10 @@ export class FGA { return deserializeResource(data); } + /** + * @deprecated The FGA module is deprecated. Use the Authorization module instead. + * @see src/authorization/authorization.ts + */ async getResource( resource: ResourceInterface | ResourceOptions, ): Promise { @@ -110,6 +126,10 @@ export class FGA { return deserializeResource(data); } + /** + * @deprecated The FGA module is deprecated. Use the Authorization module instead. + * @see src/authorization/authorization.ts + */ async listResources( options?: ListResourcesOptions, ): Promise> { @@ -131,6 +151,10 @@ export class FGA { ); } + /** + * @deprecated The FGA module is deprecated. Use the Authorization module instead. + * @see src/authorization/authorization.ts + */ async updateResource(options: UpdateResourceOptions): Promise { const resourceType = isResourceInterface(options.resource) ? options.resource.getResourceType() @@ -149,6 +173,10 @@ export class FGA { return deserializeResource(data); } + /** + * @deprecated The FGA module is deprecated. Use the Authorization module instead. + * @see src/authorization/authorization.ts + */ async deleteResource(resource: DeleteResourceOptions): Promise { const resourceType = isResourceInterface(resource) ? resource.getResourceType() @@ -160,6 +188,10 @@ export class FGA { await this.workos.delete(`/fga/v1/resources/${resourceType}/${resourceId}`); } + /** + * @deprecated The FGA module is deprecated. Use the Authorization module instead. + * @see src/authorization/authorization.ts + */ async batchWriteResources( options: BatchWriteResourcesOptions, ): Promise { @@ -170,6 +202,10 @@ export class FGA { return deserializeBatchWriteResourcesResponse(data); } + /** + * @deprecated The FGA module is deprecated. Use the Authorization module instead. + * @see src/authorization/authorization.ts + */ async writeWarrant(options: WriteWarrantOptions): Promise { const { data } = await this.workos.post( '/fga/v1/warrants', @@ -179,6 +215,10 @@ export class FGA { return deserializeWarrantToken(data); } + /** + * @deprecated The FGA module is deprecated. Use the Authorization module instead. + * @see src/authorization/authorization.ts + */ async batchWriteWarrants( options: WriteWarrantOptions[], ): Promise { @@ -190,6 +230,10 @@ export class FGA { return deserializeWarrantToken(warrantToken); } + /** + * @deprecated The FGA module is deprecated. Use the Authorization module instead. + * @see src/authorization/authorization.ts + */ async listWarrants( options?: ListWarrantsOptions, requestOptions?: ListWarrantsRequestOptions, @@ -214,6 +258,10 @@ export class FGA { ); } + /** + * @deprecated The FGA module is deprecated. Use the Authorization module instead. + * @see src/authorization/authorization.ts + */ async query( options: QueryOptions, requestOptions: QueryRequestOptions = {},