@workos-inc/node 9.1.1 → 9.2.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-BQ0MwKRy.mjs → factory-CdcF5208.mjs} +51 -2
- package/lib/{factory-BQ0MwKRy.mjs.map → factory-CdcF5208.mjs.map} +1 -1
- package/lib/{factory-jUrF-sdI.cjs → factory-DL2F8bWI.cjs} +51 -2
- package/lib/{factory-jUrF-sdI.cjs.map → factory-DL2F8bWI.cjs.map} +1 -1
- 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-BfuRJpa_.d.mts → workos-DQzEZoxn.d.mts} +57 -2
- package/lib/{workos-D7LpLpQz.d.cts → workos-DSjps83I.d.cts} +57 -2
- package/package.json +1 -1
|
@@ -4787,6 +4787,7 @@ const serializeListMembershipsForResourceOptions = (options) => ({
|
|
|
4787
4787
|
const deserializeRoleAssignment = (response) => ({
|
|
4788
4788
|
object: response.object,
|
|
4789
4789
|
id: response.id,
|
|
4790
|
+
organizationMembershipId: response.organization_membership_id,
|
|
4790
4791
|
role: response.role,
|
|
4791
4792
|
resource: {
|
|
4792
4793
|
id: response.resource.id,
|
|
@@ -5401,6 +5402,54 @@ var Authorization = class {
|
|
|
5401
5402
|
return new AutoPaginatable(await fetchAndDeserialize(this.workos, endpoint, deserializeRoleAssignment, queryOptions), (params) => fetchAndDeserialize(this.workos, endpoint, deserializeRoleAssignment, params), queryOptions);
|
|
5402
5403
|
}
|
|
5403
5404
|
/**
|
|
5405
|
+
* List role assignments for a resource
|
|
5406
|
+
*
|
|
5407
|
+
* List all role assignments granted on a resource. This returns every role assignment scoped to the resource, regardless of which organization membership received it.
|
|
5408
|
+
* @param resourceId - The ID of the authorization resource.
|
|
5409
|
+
*
|
|
5410
|
+
* @example
|
|
5411
|
+
* "authz_resource_01HXYZ123456789ABCDEFGHIJ"
|
|
5412
|
+
*
|
|
5413
|
+
* @param options - Pagination and filter options.
|
|
5414
|
+
* @returns {Promise<AutoPaginatable<RoleAssignment>>}
|
|
5415
|
+
* @throws 403 response from the API.
|
|
5416
|
+
* @throws {NotFoundException} 404
|
|
5417
|
+
*/
|
|
5418
|
+
async listRoleAssignmentsForResource(options) {
|
|
5419
|
+
const { resourceId, ...queryOptions } = options;
|
|
5420
|
+
const endpoint = `/authorization/resources/${resourceId}/role_assignments`;
|
|
5421
|
+
return new AutoPaginatable(await fetchAndDeserialize(this.workos, endpoint, deserializeRoleAssignment, queryOptions), (params) => fetchAndDeserialize(this.workos, endpoint, deserializeRoleAssignment, params), queryOptions);
|
|
5422
|
+
}
|
|
5423
|
+
/**
|
|
5424
|
+
* List role assignments for a resource by external ID
|
|
5425
|
+
*
|
|
5426
|
+
* List all role assignments granted on a resource identified by its external ID, organization, and resource type. This returns every role assignment scoped to the resource, regardless of which organization membership received it.
|
|
5427
|
+
* @param organizationId - The ID of the organization that owns the resource.
|
|
5428
|
+
*
|
|
5429
|
+
* @example
|
|
5430
|
+
* "org_01EHZNVPK3SFK441A1RGBFSHRT"
|
|
5431
|
+
*
|
|
5432
|
+
* @param resourceTypeSlug - The slug of the resource type this resource belongs to.
|
|
5433
|
+
*
|
|
5434
|
+
* @example
|
|
5435
|
+
* "project"
|
|
5436
|
+
*
|
|
5437
|
+
* @param externalId - An identifier you provide to reference the resource in your system.
|
|
5438
|
+
*
|
|
5439
|
+
* @example
|
|
5440
|
+
* "proj-456"
|
|
5441
|
+
*
|
|
5442
|
+
* @param options - Pagination and filter options.
|
|
5443
|
+
* @returns {Promise<AutoPaginatable<RoleAssignment>>}
|
|
5444
|
+
* @throws 403 response from the API.
|
|
5445
|
+
* @throws {NotFoundException} 404
|
|
5446
|
+
*/
|
|
5447
|
+
async listResourceRoleAssignments(options) {
|
|
5448
|
+
const { organizationId, resourceTypeSlug, externalId, ...queryOptions } = options;
|
|
5449
|
+
const endpoint = `/authorization/organizations/${organizationId}/resources/${resourceTypeSlug}/${externalId}/role_assignments`;
|
|
5450
|
+
return new AutoPaginatable(await fetchAndDeserialize(this.workos, endpoint, deserializeRoleAssignment, queryOptions), (params) => fetchAndDeserialize(this.workos, endpoint, deserializeRoleAssignment, params), queryOptions);
|
|
5451
|
+
}
|
|
5452
|
+
/**
|
|
5404
5453
|
* Assign a role
|
|
5405
5454
|
*
|
|
5406
5455
|
* Assign a role to an organization membership on a specific resource.
|
|
@@ -5858,7 +5907,7 @@ function extractBunVersionFromUserAgent() {
|
|
|
5858
5907
|
}
|
|
5859
5908
|
//#endregion
|
|
5860
5909
|
//#region package.json
|
|
5861
|
-
var version = "9.
|
|
5910
|
+
var version = "9.2.0";
|
|
5862
5911
|
//#endregion
|
|
5863
5912
|
//#region src/workos.ts
|
|
5864
5913
|
const DEFAULT_HOSTNAME = "api.workos.com";
|
|
@@ -6428,4 +6477,4 @@ Object.defineProperty(exports, "serializeRevokeSessionOptions", {
|
|
|
6428
6477
|
}
|
|
6429
6478
|
});
|
|
6430
6479
|
|
|
6431
|
-
//# sourceMappingURL=factory-
|
|
6480
|
+
//# sourceMappingURL=factory-DL2F8bWI.cjs.map
|