@workos-inc/node 8.12.0 → 8.12.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1345,6 +1345,12 @@ const deserializeVaultByokKeyVerificationCompletedEvent = (data) => ({
1345
1345
  verified: data.verified
1346
1346
  });
1347
1347
  //#endregion
1348
+ //#region src/organization-domains/serializers/organization-domain-verification-failed.serializer.ts
1349
+ const deserializeOrganizationDomainVerificationFailed = (organizationDomainVerificationFailed) => ({
1350
+ reason: organizationDomainVerificationFailed.reason,
1351
+ organizationDomain: deserializeOrganizationDomain(organizationDomainVerificationFailed.organization_domain)
1352
+ });
1353
+ //#endregion
1348
1354
  //#region src/common/serializers/event.serializer.ts
1349
1355
  const deserializeEvent = (event) => {
1350
1356
  const eventBase = {
@@ -1495,8 +1501,12 @@ const deserializeEvent = (event) => {
1495
1501
  event: event.event,
1496
1502
  data: deserializeOrganization(event.data)
1497
1503
  };
1504
+ case "organization_domain.verification_failed": return {
1505
+ ...eventBase,
1506
+ event: event.event,
1507
+ data: deserializeOrganizationDomainVerificationFailed(event.data)
1508
+ };
1498
1509
  case "organization_domain.verified":
1499
- case "organization_domain.verification_failed":
1500
1510
  case "organization_domain.created":
1501
1511
  case "organization_domain.updated":
1502
1512
  case "organization_domain.deleted": return {
@@ -3679,53 +3689,101 @@ var FGA = class {
3679
3689
  constructor(workos) {
3680
3690
  this.workos = workos;
3681
3691
  }
3692
+ /**
3693
+ * @deprecated The FGA module is deprecated. Use the Authorization module instead.
3694
+ * @see src/authorization/authorization.ts
3695
+ */
3682
3696
  async check(checkOptions, options = {}) {
3683
3697
  const { data } = await this.workos.post(`/fga/v1/check`, serializeCheckOptions(checkOptions), options);
3684
3698
  return new CheckResult(data);
3685
3699
  }
3700
+ /**
3701
+ * @deprecated The FGA module is deprecated. Use the Authorization module instead.
3702
+ * @see src/authorization/authorization.ts
3703
+ */
3686
3704
  async checkBatch(checkOptions, options = {}) {
3687
3705
  const { data } = await this.workos.post(`/fga/v1/check`, serializeCheckBatchOptions(checkOptions), options);
3688
3706
  return data.map((checkResult) => new CheckResult(checkResult));
3689
3707
  }
3708
+ /**
3709
+ * @deprecated The FGA module is deprecated. Use the Authorization module instead.
3710
+ * @see src/authorization/authorization.ts
3711
+ */
3690
3712
  async createResource(resource) {
3691
3713
  const { data } = await this.workos.post("/fga/v1/resources", serializeCreateResourceOptions$1(resource));
3692
3714
  return deserializeResource(data);
3693
3715
  }
3716
+ /**
3717
+ * @deprecated The FGA module is deprecated. Use the Authorization module instead.
3718
+ * @see src/authorization/authorization.ts
3719
+ */
3694
3720
  async getResource(resource) {
3695
3721
  const resourceType = isResourceInterface(resource) ? resource.getResourceType() : resource.resourceType;
3696
3722
  const resourceId = isResourceInterface(resource) ? resource.getResourceId() : resource.resourceId;
3697
3723
  const { data } = await this.workos.get(`/fga/v1/resources/${resourceType}/${resourceId}`);
3698
3724
  return deserializeResource(data);
3699
3725
  }
3726
+ /**
3727
+ * @deprecated The FGA module is deprecated. Use the Authorization module instead.
3728
+ * @see src/authorization/authorization.ts
3729
+ */
3700
3730
  async listResources(options) {
3701
3731
  return new AutoPaginatable(await fetchAndDeserialize(this.workos, "/fga/v1/resources", deserializeResource, options ? serializeListResourceOptions(options) : void 0), (params) => fetchAndDeserialize(this.workos, "/fga/v1/resources", deserializeResource, params), options ? serializeListResourceOptions(options) : void 0);
3702
3732
  }
3733
+ /**
3734
+ * @deprecated The FGA module is deprecated. Use the Authorization module instead.
3735
+ * @see src/authorization/authorization.ts
3736
+ */
3703
3737
  async updateResource(options) {
3704
3738
  const resourceType = isResourceInterface(options.resource) ? options.resource.getResourceType() : options.resource.resourceType;
3705
3739
  const resourceId = isResourceInterface(options.resource) ? options.resource.getResourceId() : options.resource.resourceId;
3706
3740
  const { data } = await this.workos.put(`/fga/v1/resources/${resourceType}/${resourceId}`, { meta: options.meta });
3707
3741
  return deserializeResource(data);
3708
3742
  }
3743
+ /**
3744
+ * @deprecated The FGA module is deprecated. Use the Authorization module instead.
3745
+ * @see src/authorization/authorization.ts
3746
+ */
3709
3747
  async deleteResource(resource) {
3710
3748
  const resourceType = isResourceInterface(resource) ? resource.getResourceType() : resource.resourceType;
3711
3749
  const resourceId = isResourceInterface(resource) ? resource.getResourceId() : resource.resourceId;
3712
3750
  await this.workos.delete(`/fga/v1/resources/${resourceType}/${resourceId}`);
3713
3751
  }
3752
+ /**
3753
+ * @deprecated The FGA module is deprecated. Use the Authorization module instead.
3754
+ * @see src/authorization/authorization.ts
3755
+ */
3714
3756
  async batchWriteResources(options) {
3715
3757
  const { data } = await this.workos.post("/fga/v1/resources/batch", serializeBatchWriteResourcesOptions(options));
3716
3758
  return deserializeBatchWriteResourcesResponse(data);
3717
3759
  }
3760
+ /**
3761
+ * @deprecated The FGA module is deprecated. Use the Authorization module instead.
3762
+ * @see src/authorization/authorization.ts
3763
+ */
3718
3764
  async writeWarrant(options) {
3719
3765
  const { data } = await this.workos.post("/fga/v1/warrants", serializeWriteWarrantOptions(options));
3720
3766
  return deserializeWarrantToken(data);
3721
3767
  }
3768
+ /**
3769
+ * @deprecated The FGA module is deprecated. Use the Authorization module instead.
3770
+ * @see src/authorization/authorization.ts
3771
+ */
3722
3772
  async batchWriteWarrants(options) {
3723
3773
  const { data: warrantToken } = await this.workos.post("/fga/v1/warrants", options.map(serializeWriteWarrantOptions));
3724
3774
  return deserializeWarrantToken(warrantToken);
3725
3775
  }
3776
+ /**
3777
+ * @deprecated The FGA module is deprecated. Use the Authorization module instead.
3778
+ * @see src/authorization/authorization.ts
3779
+ */
3726
3780
  async listWarrants(options, requestOptions) {
3727
3781
  return new AutoPaginatable(await fetchAndDeserialize(this.workos, "/fga/v1/warrants", deserializeWarrant, options ? serializeListWarrantsOptions(options) : void 0, requestOptions), (params) => fetchAndDeserialize(this.workos, "/fga/v1/warrants", deserializeWarrant, params, requestOptions), options ? serializeListWarrantsOptions(options) : void 0);
3728
3782
  }
3783
+ /**
3784
+ * @deprecated The FGA module is deprecated. Use the Authorization module instead.
3785
+ * @see src/authorization/authorization.ts
3786
+ */
3729
3787
  async query(options, requestOptions = {}) {
3730
3788
  return new FgaPaginatable(await fetchAndDeserializeFGAList(this.workos, "/fga/v1/query", deserializeQueryResult, serializeQueryOptions(options), requestOptions), (params) => fetchAndDeserializeFGAList(this.workos, "/fga/v1/query", deserializeQueryResult, params, requestOptions), serializeQueryOptions(options));
3731
3789
  }
@@ -4690,7 +4748,7 @@ function extractBunVersionFromUserAgent() {
4690
4748
  }
4691
4749
  //#endregion
4692
4750
  //#region package.json
4693
- var version = "8.12.0";
4751
+ var version = "8.12.1";
4694
4752
  //#endregion
4695
4753
  //#region src/workos.ts
4696
4754
  const DEFAULT_HOSTNAME = "api.workos.com";
@@ -5070,4 +5128,4 @@ function createWorkOS(options) {
5070
5128
  //#endregion
5071
5129
  export { ApiKeyRequiredException as A, SignatureVerificationException as C, NoApiKeyProvidedException as D, NotFoundException as E, SubtleCryptoProvider as M, BadRequestException as O, UnauthorizedException as S, OauthException as T, AutoPaginatable as _, OrganizationDomainVerificationStrategy as a, Actions as b, FeatureFlagsRuntimeClient as c, CheckResult as d, CheckOp as f, AuthenticateWithSessionCookieFailureReason as g, serializeRevokeSessionOptions as h, OrganizationDomainState as i, FetchHttpClient as j, GenericServerException as k, WarrantOp as l, RefreshSessionFailureReason as m, ConnectionType as n, DomainDataState as o, CookieSession as p, GeneratePortalLinkIntent as r, WorkOS as s, createWorkOS as t, ResourceOp as u, PKCE as v, RateLimitExceededException as w, UnprocessableEntityException as x, Webhooks as y };
5072
5130
 
5073
- //# sourceMappingURL=factory-Bg72Zzvy.mjs.map
5131
+ //# sourceMappingURL=factory-DClLn4DC.mjs.map