@workos-inc/node 8.11.1 → 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.
- package/lib/{factory-IqQiyE5J.mjs → factory-DClLn4DC.mjs} +71 -3
- package/lib/factory-DClLn4DC.mjs.map +1 -0
- package/lib/{factory-BraleEZU.cjs → factory-DgWOj5Mq.cjs} +71 -3
- package/lib/factory-DgWOj5Mq.cjs.map +1 -0
- package/lib/index.cjs +1 -1
- package/lib/index.d.cts +2 -2
- package/lib/index.d.mts +2 -2
- package/lib/index.mjs +1 -1
- package/lib/index.worker.cjs +1 -1
- package/lib/index.worker.d.cts +2 -2
- package/lib/index.worker.d.mts +2 -2
- package/lib/index.worker.mjs +1 -1
- package/lib/{workos-COj1yMhR.d.cts → workos-BsGYox30.d.cts} +83 -6
- package/lib/{workos-DluXltJr.d.mts → workos-DeJXESD6.d.mts} +83 -6
- package/package.json +1 -1
- package/lib/factory-BraleEZU.cjs.map +0 -1
- package/lib/factory-IqQiyE5J.mjs.map +0 -1
|
@@ -1339,6 +1339,17 @@ const deserializeVaultDekDecryptedEvent = (data) => ({
|
|
|
1339
1339
|
...deserializeVaultActor(data),
|
|
1340
1340
|
keyId: data.key_id
|
|
1341
1341
|
});
|
|
1342
|
+
const deserializeVaultByokKeyVerificationCompletedEvent = (data) => ({
|
|
1343
|
+
organizationId: data.organization_id,
|
|
1344
|
+
keyProvider: data.key_provider,
|
|
1345
|
+
verified: data.verified
|
|
1346
|
+
});
|
|
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
|
+
});
|
|
1342
1353
|
//#endregion
|
|
1343
1354
|
//#region src/common/serializers/event.serializer.ts
|
|
1344
1355
|
const deserializeEvent = (event) => {
|
|
@@ -1490,8 +1501,12 @@ const deserializeEvent = (event) => {
|
|
|
1490
1501
|
event: event.event,
|
|
1491
1502
|
data: deserializeOrganization(event.data)
|
|
1492
1503
|
};
|
|
1504
|
+
case "organization_domain.verification_failed": return {
|
|
1505
|
+
...eventBase,
|
|
1506
|
+
event: event.event,
|
|
1507
|
+
data: deserializeOrganizationDomainVerificationFailed(event.data)
|
|
1508
|
+
};
|
|
1493
1509
|
case "organization_domain.verified":
|
|
1494
|
-
case "organization_domain.verification_failed":
|
|
1495
1510
|
case "organization_domain.created":
|
|
1496
1511
|
case "organization_domain.updated":
|
|
1497
1512
|
case "organization_domain.deleted": return {
|
|
@@ -1558,6 +1573,11 @@ const deserializeEvent = (event) => {
|
|
|
1558
1573
|
event: event.event,
|
|
1559
1574
|
data: deserializeVaultDekDecryptedEvent(event.data)
|
|
1560
1575
|
};
|
|
1576
|
+
case "vault.byok_key.verification_completed": return {
|
|
1577
|
+
...eventBase,
|
|
1578
|
+
event: event.event,
|
|
1579
|
+
data: deserializeVaultByokKeyVerificationCompletedEvent(event.data)
|
|
1580
|
+
};
|
|
1561
1581
|
}
|
|
1562
1582
|
};
|
|
1563
1583
|
//#endregion
|
|
@@ -3669,53 +3689,101 @@ var FGA = class {
|
|
|
3669
3689
|
constructor(workos) {
|
|
3670
3690
|
this.workos = workos;
|
|
3671
3691
|
}
|
|
3692
|
+
/**
|
|
3693
|
+
* @deprecated The FGA module is deprecated. Use the Authorization module instead.
|
|
3694
|
+
* @see src/authorization/authorization.ts
|
|
3695
|
+
*/
|
|
3672
3696
|
async check(checkOptions, options = {}) {
|
|
3673
3697
|
const { data } = await this.workos.post(`/fga/v1/check`, serializeCheckOptions(checkOptions), options);
|
|
3674
3698
|
return new CheckResult(data);
|
|
3675
3699
|
}
|
|
3700
|
+
/**
|
|
3701
|
+
* @deprecated The FGA module is deprecated. Use the Authorization module instead.
|
|
3702
|
+
* @see src/authorization/authorization.ts
|
|
3703
|
+
*/
|
|
3676
3704
|
async checkBatch(checkOptions, options = {}) {
|
|
3677
3705
|
const { data } = await this.workos.post(`/fga/v1/check`, serializeCheckBatchOptions(checkOptions), options);
|
|
3678
3706
|
return data.map((checkResult) => new CheckResult(checkResult));
|
|
3679
3707
|
}
|
|
3708
|
+
/**
|
|
3709
|
+
* @deprecated The FGA module is deprecated. Use the Authorization module instead.
|
|
3710
|
+
* @see src/authorization/authorization.ts
|
|
3711
|
+
*/
|
|
3680
3712
|
async createResource(resource) {
|
|
3681
3713
|
const { data } = await this.workos.post("/fga/v1/resources", serializeCreateResourceOptions$1(resource));
|
|
3682
3714
|
return deserializeResource(data);
|
|
3683
3715
|
}
|
|
3716
|
+
/**
|
|
3717
|
+
* @deprecated The FGA module is deprecated. Use the Authorization module instead.
|
|
3718
|
+
* @see src/authorization/authorization.ts
|
|
3719
|
+
*/
|
|
3684
3720
|
async getResource(resource) {
|
|
3685
3721
|
const resourceType = isResourceInterface(resource) ? resource.getResourceType() : resource.resourceType;
|
|
3686
3722
|
const resourceId = isResourceInterface(resource) ? resource.getResourceId() : resource.resourceId;
|
|
3687
3723
|
const { data } = await this.workos.get(`/fga/v1/resources/${resourceType}/${resourceId}`);
|
|
3688
3724
|
return deserializeResource(data);
|
|
3689
3725
|
}
|
|
3726
|
+
/**
|
|
3727
|
+
* @deprecated The FGA module is deprecated. Use the Authorization module instead.
|
|
3728
|
+
* @see src/authorization/authorization.ts
|
|
3729
|
+
*/
|
|
3690
3730
|
async listResources(options) {
|
|
3691
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);
|
|
3692
3732
|
}
|
|
3733
|
+
/**
|
|
3734
|
+
* @deprecated The FGA module is deprecated. Use the Authorization module instead.
|
|
3735
|
+
* @see src/authorization/authorization.ts
|
|
3736
|
+
*/
|
|
3693
3737
|
async updateResource(options) {
|
|
3694
3738
|
const resourceType = isResourceInterface(options.resource) ? options.resource.getResourceType() : options.resource.resourceType;
|
|
3695
3739
|
const resourceId = isResourceInterface(options.resource) ? options.resource.getResourceId() : options.resource.resourceId;
|
|
3696
3740
|
const { data } = await this.workos.put(`/fga/v1/resources/${resourceType}/${resourceId}`, { meta: options.meta });
|
|
3697
3741
|
return deserializeResource(data);
|
|
3698
3742
|
}
|
|
3743
|
+
/**
|
|
3744
|
+
* @deprecated The FGA module is deprecated. Use the Authorization module instead.
|
|
3745
|
+
* @see src/authorization/authorization.ts
|
|
3746
|
+
*/
|
|
3699
3747
|
async deleteResource(resource) {
|
|
3700
3748
|
const resourceType = isResourceInterface(resource) ? resource.getResourceType() : resource.resourceType;
|
|
3701
3749
|
const resourceId = isResourceInterface(resource) ? resource.getResourceId() : resource.resourceId;
|
|
3702
3750
|
await this.workos.delete(`/fga/v1/resources/${resourceType}/${resourceId}`);
|
|
3703
3751
|
}
|
|
3752
|
+
/**
|
|
3753
|
+
* @deprecated The FGA module is deprecated. Use the Authorization module instead.
|
|
3754
|
+
* @see src/authorization/authorization.ts
|
|
3755
|
+
*/
|
|
3704
3756
|
async batchWriteResources(options) {
|
|
3705
3757
|
const { data } = await this.workos.post("/fga/v1/resources/batch", serializeBatchWriteResourcesOptions(options));
|
|
3706
3758
|
return deserializeBatchWriteResourcesResponse(data);
|
|
3707
3759
|
}
|
|
3760
|
+
/**
|
|
3761
|
+
* @deprecated The FGA module is deprecated. Use the Authorization module instead.
|
|
3762
|
+
* @see src/authorization/authorization.ts
|
|
3763
|
+
*/
|
|
3708
3764
|
async writeWarrant(options) {
|
|
3709
3765
|
const { data } = await this.workos.post("/fga/v1/warrants", serializeWriteWarrantOptions(options));
|
|
3710
3766
|
return deserializeWarrantToken(data);
|
|
3711
3767
|
}
|
|
3768
|
+
/**
|
|
3769
|
+
* @deprecated The FGA module is deprecated. Use the Authorization module instead.
|
|
3770
|
+
* @see src/authorization/authorization.ts
|
|
3771
|
+
*/
|
|
3712
3772
|
async batchWriteWarrants(options) {
|
|
3713
3773
|
const { data: warrantToken } = await this.workos.post("/fga/v1/warrants", options.map(serializeWriteWarrantOptions));
|
|
3714
3774
|
return deserializeWarrantToken(warrantToken);
|
|
3715
3775
|
}
|
|
3776
|
+
/**
|
|
3777
|
+
* @deprecated The FGA module is deprecated. Use the Authorization module instead.
|
|
3778
|
+
* @see src/authorization/authorization.ts
|
|
3779
|
+
*/
|
|
3716
3780
|
async listWarrants(options, requestOptions) {
|
|
3717
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);
|
|
3718
3782
|
}
|
|
3783
|
+
/**
|
|
3784
|
+
* @deprecated The FGA module is deprecated. Use the Authorization module instead.
|
|
3785
|
+
* @see src/authorization/authorization.ts
|
|
3786
|
+
*/
|
|
3719
3787
|
async query(options, requestOptions = {}) {
|
|
3720
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));
|
|
3721
3789
|
}
|
|
@@ -4680,7 +4748,7 @@ function extractBunVersionFromUserAgent() {
|
|
|
4680
4748
|
}
|
|
4681
4749
|
//#endregion
|
|
4682
4750
|
//#region package.json
|
|
4683
|
-
var version = "8.
|
|
4751
|
+
var version = "8.12.1";
|
|
4684
4752
|
//#endregion
|
|
4685
4753
|
//#region src/workos.ts
|
|
4686
4754
|
const DEFAULT_HOSTNAME = "api.workos.com";
|
|
@@ -5060,4 +5128,4 @@ function createWorkOS(options) {
|
|
|
5060
5128
|
//#endregion
|
|
5061
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 };
|
|
5062
5130
|
|
|
5063
|
-
//# sourceMappingURL=factory-
|
|
5131
|
+
//# sourceMappingURL=factory-DClLn4DC.mjs.map
|