@workos-inc/node 9.2.0 → 9.3.0
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-DL2F8bWI.cjs → factory-5S80C27h.cjs} +22 -5
- package/lib/factory-5S80C27h.cjs.map +1 -0
- package/lib/{factory-CdcF5208.mjs → factory-DSVg8BX4.mjs} +22 -5
- package/lib/factory-DSVg8BX4.mjs.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-DQzEZoxn.d.mts → workos-Bm__aISC.d.mts} +20 -2
- package/lib/{workos-DSjps83I.d.cts → workos-DS8Htvr7.d.cts} +20 -2
- package/package.json +1 -1
- package/lib/factory-CdcF5208.mjs.map +0 -1
- package/lib/factory-DL2F8bWI.cjs.map +0 -1
|
@@ -4798,6 +4798,20 @@ const deserializeRoleAssignment = (response) => ({
|
|
|
4798
4798
|
updatedAt: response.updated_at
|
|
4799
4799
|
});
|
|
4800
4800
|
//#endregion
|
|
4801
|
+
//#region src/authorization/serializers/list-role-assignments-options.serializer.ts
|
|
4802
|
+
const serializeListRoleAssignmentsOptions = (options) => ({
|
|
4803
|
+
...options.resourceId && { resource_id: options.resourceId },
|
|
4804
|
+
...options.resourceExternalId && { resource_external_id: options.resourceExternalId },
|
|
4805
|
+
...options.resourceTypeSlug && { resource_type_slug: options.resourceTypeSlug },
|
|
4806
|
+
...serializePaginationOptions(options)
|
|
4807
|
+
});
|
|
4808
|
+
//#endregion
|
|
4809
|
+
//#region src/authorization/serializers/list-role-assignments-for-resource-options.serializer.ts
|
|
4810
|
+
const serializeListRoleAssignmentsForResourceOptions = (options) => ({
|
|
4811
|
+
...options.roleSlug && { role_slug: options.roleSlug },
|
|
4812
|
+
...serializePaginationOptions(options)
|
|
4813
|
+
});
|
|
4814
|
+
//#endregion
|
|
4801
4815
|
//#region src/authorization/serializers/assign-role-options.serializer.ts
|
|
4802
4816
|
const serializeAssignRoleOptions = (options) => ({
|
|
4803
4817
|
role_slug: options.roleSlug,
|
|
@@ -5399,7 +5413,8 @@ var Authorization = class {
|
|
|
5399
5413
|
async listRoleAssignments(options) {
|
|
5400
5414
|
const { organizationMembershipId, ...queryOptions } = options;
|
|
5401
5415
|
const endpoint = `/authorization/organization_memberships/${organizationMembershipId}/role_assignments`;
|
|
5402
|
-
|
|
5416
|
+
const serializedOptions = serializeListRoleAssignmentsOptions(queryOptions);
|
|
5417
|
+
return new AutoPaginatable(await fetchAndDeserialize(this.workos, endpoint, deserializeRoleAssignment, serializedOptions), (params) => fetchAndDeserialize(this.workos, endpoint, deserializeRoleAssignment, params), serializedOptions);
|
|
5403
5418
|
}
|
|
5404
5419
|
/**
|
|
5405
5420
|
* List role assignments for a resource
|
|
@@ -5418,7 +5433,8 @@ var Authorization = class {
|
|
|
5418
5433
|
async listRoleAssignmentsForResource(options) {
|
|
5419
5434
|
const { resourceId, ...queryOptions } = options;
|
|
5420
5435
|
const endpoint = `/authorization/resources/${resourceId}/role_assignments`;
|
|
5421
|
-
|
|
5436
|
+
const serializedOptions = serializeListRoleAssignmentsForResourceOptions(queryOptions);
|
|
5437
|
+
return new AutoPaginatable(await fetchAndDeserialize(this.workos, endpoint, deserializeRoleAssignment, serializedOptions), (params) => fetchAndDeserialize(this.workos, endpoint, deserializeRoleAssignment, params), serializedOptions);
|
|
5422
5438
|
}
|
|
5423
5439
|
/**
|
|
5424
5440
|
* List role assignments for a resource by external ID
|
|
@@ -5447,7 +5463,8 @@ var Authorization = class {
|
|
|
5447
5463
|
async listResourceRoleAssignments(options) {
|
|
5448
5464
|
const { organizationId, resourceTypeSlug, externalId, ...queryOptions } = options;
|
|
5449
5465
|
const endpoint = `/authorization/organizations/${organizationId}/resources/${resourceTypeSlug}/${externalId}/role_assignments`;
|
|
5450
|
-
|
|
5466
|
+
const serializedOptions = serializeListRoleAssignmentsForResourceOptions(queryOptions);
|
|
5467
|
+
return new AutoPaginatable(await fetchAndDeserialize(this.workos, endpoint, deserializeRoleAssignment, serializedOptions), (params) => fetchAndDeserialize(this.workos, endpoint, deserializeRoleAssignment, params), serializedOptions);
|
|
5451
5468
|
}
|
|
5452
5469
|
/**
|
|
5453
5470
|
* Assign a role
|
|
@@ -5907,7 +5924,7 @@ function extractBunVersionFromUserAgent() {
|
|
|
5907
5924
|
}
|
|
5908
5925
|
//#endregion
|
|
5909
5926
|
//#region package.json
|
|
5910
|
-
var version = "9.
|
|
5927
|
+
var version = "9.3.0";
|
|
5911
5928
|
//#endregion
|
|
5912
5929
|
//#region src/workos.ts
|
|
5913
5930
|
const DEFAULT_HOSTNAME = "api.workos.com";
|
|
@@ -6292,4 +6309,4 @@ function createWorkOS(options) {
|
|
|
6292
6309
|
//#endregion
|
|
6293
6310
|
export { FetchHttpClient as A, NoApiKeyProvidedException as C, isAuthenticationErrorData as D, AuthenticationException as E, GenericServerException as O, NotFoundException as S, BadRequestException as T, UnprocessableEntityException as _, DomainDataState as a, RateLimitExceededException as b, FeatureFlagsRuntimeClient as c, serializeRevokeSessionOptions as d, AuthenticateWithSessionCookieFailureReason as f, Actions as g, Webhooks as h, OrganizationDomainVerificationStrategy as i, SubtleCryptoProvider as j, ApiKeyRequiredException as k, CookieSession as l, PKCE as m, ConnectionType as n, GenerateLinkIntent as o, AutoPaginatable as p, OrganizationDomainState as r, WorkOS as s, createWorkOS as t, RefreshSessionFailureReason as u, UnauthorizedException as v, ConflictException as w, OauthException as x, SignatureVerificationException as y };
|
|
6294
6311
|
|
|
6295
|
-
//# sourceMappingURL=factory-
|
|
6312
|
+
//# sourceMappingURL=factory-DSVg8BX4.mjs.map
|