@@ -58,6 +58,10 @@ import { fetchAndDeserializeFGAList } from './utils/fetch-and-deserialize-list';
5858export class FGA {
5959 constructor ( private readonly workos : WorkOS ) { }
6060
61+ /**
62+ * @deprecated The FGA module is deprecated. Use the Authorization module instead.
63+ * @see src/authorization/authorization.ts
64+ */
6165 async check (
6266 checkOptions : CheckOptions ,
6367 options : CheckRequestOptions = { } ,
@@ -70,6 +74,10 @@ export class FGA {
7074 return new CheckResult ( data ) ;
7175 }
7276
77+ /**
78+ * @deprecated The FGA module is deprecated. Use the Authorization module instead.
79+ * @see src/authorization/authorization.ts
80+ */
7381 async checkBatch (
7482 checkOptions : CheckBatchOptions ,
7583 options : CheckRequestOptions = { } ,
@@ -84,6 +92,10 @@ export class FGA {
8492 ) ;
8593 }
8694
95+ /**
96+ * @deprecated The FGA module is deprecated. Use the Authorization module instead.
97+ * @see src/authorization/authorization.ts
98+ */
8799 async createResource ( resource : CreateResourceOptions ) : Promise < Resource > {
88100 const { data } = await this . workos . post < ResourceResponse > (
89101 '/fga/v1/resources' ,
@@ -93,6 +105,10 @@ export class FGA {
93105 return deserializeResource ( data ) ;
94106 }
95107
108+ /**
109+ * @deprecated The FGA module is deprecated. Use the Authorization module instead.
110+ * @see src/authorization/authorization.ts
111+ */
96112 async getResource (
97113 resource : ResourceInterface | ResourceOptions ,
98114 ) : Promise < Resource > {
@@ -110,6 +126,10 @@ export class FGA {
110126 return deserializeResource ( data ) ;
111127 }
112128
129+ /**
130+ * @deprecated The FGA module is deprecated. Use the Authorization module instead.
131+ * @see src/authorization/authorization.ts
132+ */
113133 async listResources (
114134 options ?: ListResourcesOptions ,
115135 ) : Promise < AutoPaginatable < Resource , SerializedListResourcesOptions > > {
@@ -131,6 +151,10 @@ export class FGA {
131151 ) ;
132152 }
133153
154+ /**
155+ * @deprecated The FGA module is deprecated. Use the Authorization module instead.
156+ * @see src/authorization/authorization.ts
157+ */
134158 async updateResource ( options : UpdateResourceOptions ) : Promise < Resource > {
135159 const resourceType = isResourceInterface ( options . resource )
136160 ? options . resource . getResourceType ( )
@@ -149,6 +173,10 @@ export class FGA {
149173 return deserializeResource ( data ) ;
150174 }
151175
176+ /**
177+ * @deprecated The FGA module is deprecated. Use the Authorization module instead.
178+ * @see src/authorization/authorization.ts
179+ */
152180 async deleteResource ( resource : DeleteResourceOptions ) : Promise < void > {
153181 const resourceType = isResourceInterface ( resource )
154182 ? resource . getResourceType ( )
@@ -160,6 +188,10 @@ export class FGA {
160188 await this . workos . delete ( `/fga/v1/resources/${ resourceType } /${ resourceId } ` ) ;
161189 }
162190
191+ /**
192+ * @deprecated The FGA module is deprecated. Use the Authorization module instead.
193+ * @see src/authorization/authorization.ts
194+ */
163195 async batchWriteResources (
164196 options : BatchWriteResourcesOptions ,
165197 ) : Promise < Resource [ ] > {
@@ -170,6 +202,10 @@ export class FGA {
170202 return deserializeBatchWriteResourcesResponse ( data ) ;
171203 }
172204
205+ /**
206+ * @deprecated The FGA module is deprecated. Use the Authorization module instead.
207+ * @see src/authorization/authorization.ts
208+ */
173209 async writeWarrant ( options : WriteWarrantOptions ) : Promise < WarrantToken > {
174210 const { data } = await this . workos . post < WarrantTokenResponse > (
175211 '/fga/v1/warrants' ,
@@ -179,6 +215,10 @@ export class FGA {
179215 return deserializeWarrantToken ( data ) ;
180216 }
181217
218+ /**
219+ * @deprecated The FGA module is deprecated. Use the Authorization module instead.
220+ * @see src/authorization/authorization.ts
221+ */
182222 async batchWriteWarrants (
183223 options : WriteWarrantOptions [ ] ,
184224 ) : Promise < WarrantToken > {
@@ -190,6 +230,10 @@ export class FGA {
190230 return deserializeWarrantToken ( warrantToken ) ;
191231 }
192232
233+ /**
234+ * @deprecated The FGA module is deprecated. Use the Authorization module instead.
235+ * @see src/authorization/authorization.ts
236+ */
193237 async listWarrants (
194238 options ?: ListWarrantsOptions ,
195239 requestOptions ?: ListWarrantsRequestOptions ,
@@ -214,6 +258,10 @@ export class FGA {
214258 ) ;
215259 }
216260
261+ /**
262+ * @deprecated The FGA module is deprecated. Use the Authorization module instead.
263+ * @see src/authorization/authorization.ts
264+ */
217265 async query (
218266 options : QueryOptions ,
219267 requestOptions : QueryRequestOptions = { } ,
0 commit comments