@workos/openapi-spec 0.135.0 → 0.137.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/dist/open-api-spec.yaml +136 -3
- package/dist/policy.mjs +2 -0
- package/dist/services.mjs +5 -0
- package/dist/types.d.ts +145 -2
- package/package.json +1 -1
package/dist/open-api-spec.yaml
CHANGED
|
@@ -2394,9 +2394,11 @@ paths:
|
|
|
2394
2394
|
/audit_logs/actions/{actionName}/schemas:
|
|
2395
2395
|
post:
|
|
2396
2396
|
description: >-
|
|
2397
|
-
Creates
|
|
2398
|
-
|
|
2399
|
-
|
|
2397
|
+
Creates an Audit Log schema used to validate incoming Audit Log events,
|
|
2398
|
+
or returns the latest version if the submitted schema matches it. If the
|
|
2399
|
+
schema differs from the latest version, creates and returns a new
|
|
2400
|
+
version. If the action does not exist, creates the action and its first
|
|
2401
|
+
schema version.
|
|
2400
2402
|
operationId: AuditLogValidatorVersionsController_create
|
|
2401
2403
|
parameters:
|
|
2402
2404
|
- name: actionName
|
|
@@ -3649,6 +3651,110 @@ paths:
|
|
|
3649
3651
|
summary: Assign a role to a group
|
|
3650
3652
|
tags:
|
|
3651
3653
|
- authorization
|
|
3654
|
+
patch:
|
|
3655
|
+
description: >-
|
|
3656
|
+
Add and remove role assignments for a group in a single atomic
|
|
3657
|
+
operation. Additions that already exist and removals that match no
|
|
3658
|
+
assignment are skipped. An assignment in both lists is rejected. `add`
|
|
3659
|
+
and `remove` must contain between 1 and 100 entries combined.
|
|
3660
|
+
operationId: AuthorizationGroupRoleAssignmentsController_patchGroupRoleAssignments
|
|
3661
|
+
parameters:
|
|
3662
|
+
- name: group_id
|
|
3663
|
+
required: true
|
|
3664
|
+
in: path
|
|
3665
|
+
description: The ID of the group.
|
|
3666
|
+
schema:
|
|
3667
|
+
type: string
|
|
3668
|
+
example: group_01HXYZ123456789ABCDEFGHIJ
|
|
3669
|
+
requestBody:
|
|
3670
|
+
required: true
|
|
3671
|
+
content:
|
|
3672
|
+
application/json:
|
|
3673
|
+
schema:
|
|
3674
|
+
$ref: '#/components/schemas/PatchGroupRoleAssignmentsDto'
|
|
3675
|
+
responses:
|
|
3676
|
+
'204':
|
|
3677
|
+
description: No Content
|
|
3678
|
+
'400':
|
|
3679
|
+
description: Bad Request
|
|
3680
|
+
content:
|
|
3681
|
+
application/json:
|
|
3682
|
+
schema:
|
|
3683
|
+
type: object
|
|
3684
|
+
properties:
|
|
3685
|
+
code:
|
|
3686
|
+
type: string
|
|
3687
|
+
description: The error code identifying the type of error.
|
|
3688
|
+
example: group_role_assignment_update_overlap
|
|
3689
|
+
const: group_role_assignment_update_overlap
|
|
3690
|
+
message:
|
|
3691
|
+
type: string
|
|
3692
|
+
description: A human-readable description of the error.
|
|
3693
|
+
example: Request could not be processed.
|
|
3694
|
+
required:
|
|
3695
|
+
- code
|
|
3696
|
+
- message
|
|
3697
|
+
'402':
|
|
3698
|
+
description: ''
|
|
3699
|
+
content:
|
|
3700
|
+
application/json:
|
|
3701
|
+
schema:
|
|
3702
|
+
type: object
|
|
3703
|
+
properties:
|
|
3704
|
+
code:
|
|
3705
|
+
type: string
|
|
3706
|
+
description: The error code identifying the type of error.
|
|
3707
|
+
example: production_feature_requires_billing
|
|
3708
|
+
const: production_feature_requires_billing
|
|
3709
|
+
message:
|
|
3710
|
+
type: string
|
|
3711
|
+
description: A human-readable description of the error.
|
|
3712
|
+
example: Request could not be processed.
|
|
3713
|
+
required:
|
|
3714
|
+
- code
|
|
3715
|
+
- message
|
|
3716
|
+
'403':
|
|
3717
|
+
description: Forbidden
|
|
3718
|
+
content:
|
|
3719
|
+
application/json:
|
|
3720
|
+
schema:
|
|
3721
|
+
type: object
|
|
3722
|
+
properties:
|
|
3723
|
+
message:
|
|
3724
|
+
type: string
|
|
3725
|
+
description: A human-readable description of the error.
|
|
3726
|
+
example: 'Organization not found: ''org_01EHQMYV6MBK39QC5PZXHY59C3''.'
|
|
3727
|
+
required:
|
|
3728
|
+
- message
|
|
3729
|
+
'404':
|
|
3730
|
+
description: Not Found
|
|
3731
|
+
content:
|
|
3732
|
+
application/json:
|
|
3733
|
+
schema:
|
|
3734
|
+
type: object
|
|
3735
|
+
properties:
|
|
3736
|
+
message:
|
|
3737
|
+
type: string
|
|
3738
|
+
description: A human-readable description of the error.
|
|
3739
|
+
example: 'Organization not found: ''org_01EHQMYV6MBK39QC5PZXHY59C3''.'
|
|
3740
|
+
required:
|
|
3741
|
+
- message
|
|
3742
|
+
'422':
|
|
3743
|
+
description: Unprocessable Entity
|
|
3744
|
+
content:
|
|
3745
|
+
application/json:
|
|
3746
|
+
schema:
|
|
3747
|
+
type: object
|
|
3748
|
+
properties:
|
|
3749
|
+
message:
|
|
3750
|
+
type: string
|
|
3751
|
+
description: A human-readable description of the error.
|
|
3752
|
+
example: 'Organization not found: ''org_01EHQMYV6MBK39QC5PZXHY59C3''.'
|
|
3753
|
+
required:
|
|
3754
|
+
- message
|
|
3755
|
+
summary: Update role assignments for a group
|
|
3756
|
+
tags:
|
|
3757
|
+
- authorization
|
|
3652
3758
|
put:
|
|
3653
3759
|
description: >-
|
|
3654
3760
|
Replace all role assignments for a group with the provided list.
|
|
@@ -28999,6 +29105,33 @@ components:
|
|
|
28999
29105
|
example: project
|
|
29000
29106
|
required:
|
|
29001
29107
|
- role_slug
|
|
29108
|
+
PatchGroupRoleAssignmentsDto:
|
|
29109
|
+
type: object
|
|
29110
|
+
properties:
|
|
29111
|
+
add:
|
|
29112
|
+
default: []
|
|
29113
|
+
description: >-
|
|
29114
|
+
Role assignments to add to the group. Assignments that already exist
|
|
29115
|
+
are skipped.
|
|
29116
|
+
example:
|
|
29117
|
+
- role_slug: admin
|
|
29118
|
+
- role_slug: member
|
|
29119
|
+
resource_id: authz_resource_01HXYZ123456789ABCDEFGH
|
|
29120
|
+
type: array
|
|
29121
|
+
items:
|
|
29122
|
+
$ref: '#/components/schemas/ReplaceGroupRoleAssignmentEntryDto'
|
|
29123
|
+
remove:
|
|
29124
|
+
default: []
|
|
29125
|
+
description: >-
|
|
29126
|
+
Role assignments to remove from the group. Entries that match no
|
|
29127
|
+
assignment are skipped.
|
|
29128
|
+
example:
|
|
29129
|
+
- role_slug: editor
|
|
29130
|
+
resource_type_slug: project
|
|
29131
|
+
resource_external_id: proj-789
|
|
29132
|
+
type: array
|
|
29133
|
+
items:
|
|
29134
|
+
$ref: '#/components/schemas/ReplaceGroupRoleAssignmentEntryDto'
|
|
29002
29135
|
ReplaceGroupRoleAssignmentsDto:
|
|
29003
29136
|
type: object
|
|
29004
29137
|
properties:
|
package/dist/policy.mjs
CHANGED
|
@@ -63,6 +63,7 @@ const operationHints = {
|
|
|
63
63
|
"POST /authorization/organization_memberships/{organization_membership_id}/role_assignments": { name: "assign_role" },
|
|
64
64
|
"DELETE /authorization/organization_memberships/{organization_membership_id}/role_assignments": { name: "remove_role" },
|
|
65
65
|
"DELETE /authorization/organization_memberships/{organization_membership_id}/role_assignments/{role_assignment_id}": { name: "remove_role_assignment" },
|
|
66
|
+
"PATCH /authorization/groups/{group_id}/role_assignments": { name: "patch_group_role_assignments" },
|
|
66
67
|
"POST /authorization/organizations/{organizationId}/roles": { name: "create_organization_role" },
|
|
67
68
|
"PUT /authorization/organizations/{organizationId}/roles/{slug}/permissions": { name: "set_organization_role_permissions" },
|
|
68
69
|
"POST /authorization/organizations/{organizationId}/roles/{slug}/permissions": { name: "add_organization_role_permission" },
|
|
@@ -86,6 +87,7 @@ const operationHints = {
|
|
|
86
87
|
"POST /user_management/cors_origins": { name: "create_cors_origin" },
|
|
87
88
|
"POST /user_management/redirect_uris": { name: "create_redirect_uri" },
|
|
88
89
|
"POST /organizations": { name: "create_organization" },
|
|
90
|
+
"PUT /organizations/{organizationId}/groups/{groupId}/organization-memberships": { name: "set_group_organization_memberships" },
|
|
89
91
|
"GET /directory_groups": { name: "list_groups" },
|
|
90
92
|
"GET /directory_groups/{id}": { name: "get_group" },
|
|
91
93
|
"GET /directory_users": { name: "list_users" },
|
package/dist/services.mjs
CHANGED
|
@@ -202,6 +202,11 @@ const serviceEndpoints = {
|
|
|
202
202
|
"path": "/authorization/groups/{group_id}/role_assignments",
|
|
203
203
|
"name": "list_group_role_assignments"
|
|
204
204
|
},
|
|
205
|
+
{
|
|
206
|
+
"method": "PATCH",
|
|
207
|
+
"path": "/authorization/groups/{group_id}/role_assignments",
|
|
208
|
+
"name": "patch_group_role_assignments"
|
|
209
|
+
},
|
|
205
210
|
{
|
|
206
211
|
"method": "POST",
|
|
207
212
|
"path": "/authorization/groups/{group_id}/role_assignments",
|
package/dist/types.d.ts
CHANGED
|
@@ -375,7 +375,7 @@ export interface paths {
|
|
|
375
375
|
put?: never;
|
|
376
376
|
/**
|
|
377
377
|
* Create Schema
|
|
378
|
-
* @description Creates
|
|
378
|
+
* @description Creates an Audit Log schema used to validate incoming Audit Log events, or returns the latest version if the submitted schema matches it. If the schema differs from the latest version, creates and returns a new version. If the action does not exist, creates the action and its first schema version.
|
|
379
379
|
*/
|
|
380
380
|
post: operations["AuditLogValidatorVersionsController_create"];
|
|
381
381
|
delete?: never;
|
|
@@ -590,7 +590,11 @@ export interface paths {
|
|
|
590
590
|
delete: operations["AuthorizationGroupRoleAssignmentsController_removeGroupRoleAssignments"];
|
|
591
591
|
options?: never;
|
|
592
592
|
head?: never;
|
|
593
|
-
|
|
593
|
+
/**
|
|
594
|
+
* Update role assignments for a group
|
|
595
|
+
* @description Add and remove role assignments for a group in a single atomic operation. Additions that already exist and removals that match no assignment are skipped. An assignment in both lists is rejected. `add` and `remove` must contain between 1 and 100 entries combined.
|
|
596
|
+
*/
|
|
597
|
+
patch: operations["AuthorizationGroupRoleAssignmentsController_patchGroupRoleAssignments"];
|
|
594
598
|
trace?: never;
|
|
595
599
|
};
|
|
596
600
|
"/authorization/groups/{group_id}/role_assignments/{role_assignment_id}": {
|
|
@@ -4582,6 +4586,34 @@ export interface components {
|
|
|
4582
4586
|
*/
|
|
4583
4587
|
resource_type_slug?: string;
|
|
4584
4588
|
};
|
|
4589
|
+
PatchGroupRoleAssignmentsDto: {
|
|
4590
|
+
/**
|
|
4591
|
+
* @description Role assignments to add to the group. Assignments that already exist are skipped.
|
|
4592
|
+
* @default []
|
|
4593
|
+
* @example [
|
|
4594
|
+
* {
|
|
4595
|
+
* "role_slug": "admin"
|
|
4596
|
+
* },
|
|
4597
|
+
* {
|
|
4598
|
+
* "role_slug": "member",
|
|
4599
|
+
* "resource_id": "authz_resource_01HXYZ123456789ABCDEFGH"
|
|
4600
|
+
* }
|
|
4601
|
+
* ]
|
|
4602
|
+
*/
|
|
4603
|
+
add: components["schemas"]["ReplaceGroupRoleAssignmentEntryDto"][];
|
|
4604
|
+
/**
|
|
4605
|
+
* @description Role assignments to remove from the group. Entries that match no assignment are skipped.
|
|
4606
|
+
* @default []
|
|
4607
|
+
* @example [
|
|
4608
|
+
* {
|
|
4609
|
+
* "role_slug": "editor",
|
|
4610
|
+
* "resource_type_slug": "project",
|
|
4611
|
+
* "resource_external_id": "proj-789"
|
|
4612
|
+
* }
|
|
4613
|
+
* ]
|
|
4614
|
+
*/
|
|
4615
|
+
remove: components["schemas"]["ReplaceGroupRoleAssignmentEntryDto"][];
|
|
4616
|
+
};
|
|
4585
4617
|
ReplaceGroupRoleAssignmentsDto: {
|
|
4586
4618
|
/** @description The list of role assignments that should exist for the group. All existing assignments will be replaced. */
|
|
4587
4619
|
role_assignments: components["schemas"]["ReplaceGroupRoleAssignmentEntryDto"][];
|
|
@@ -23914,6 +23946,117 @@ export interface operations {
|
|
|
23914
23946
|
};
|
|
23915
23947
|
};
|
|
23916
23948
|
};
|
|
23949
|
+
AuthorizationGroupRoleAssignmentsController_patchGroupRoleAssignments: {
|
|
23950
|
+
parameters: {
|
|
23951
|
+
query?: never;
|
|
23952
|
+
header?: never;
|
|
23953
|
+
path: {
|
|
23954
|
+
/** @description The ID of the group. */
|
|
23955
|
+
group_id: string;
|
|
23956
|
+
};
|
|
23957
|
+
cookie?: never;
|
|
23958
|
+
};
|
|
23959
|
+
requestBody: {
|
|
23960
|
+
content: {
|
|
23961
|
+
"application/json": components["schemas"]["PatchGroupRoleAssignmentsDto"];
|
|
23962
|
+
};
|
|
23963
|
+
};
|
|
23964
|
+
responses: {
|
|
23965
|
+
/** @description No Content */
|
|
23966
|
+
204: {
|
|
23967
|
+
headers: {
|
|
23968
|
+
[name: string]: unknown;
|
|
23969
|
+
};
|
|
23970
|
+
content?: never;
|
|
23971
|
+
};
|
|
23972
|
+
/** @description Bad Request */
|
|
23973
|
+
400: {
|
|
23974
|
+
headers: {
|
|
23975
|
+
[name: string]: unknown;
|
|
23976
|
+
};
|
|
23977
|
+
content: {
|
|
23978
|
+
"application/json": {
|
|
23979
|
+
/**
|
|
23980
|
+
* @description The error code identifying the type of error.
|
|
23981
|
+
* @example group_role_assignment_update_overlap
|
|
23982
|
+
* @constant
|
|
23983
|
+
*/
|
|
23984
|
+
code: "group_role_assignment_update_overlap";
|
|
23985
|
+
/**
|
|
23986
|
+
* @description A human-readable description of the error.
|
|
23987
|
+
* @example Request could not be processed.
|
|
23988
|
+
*/
|
|
23989
|
+
message: string;
|
|
23990
|
+
};
|
|
23991
|
+
};
|
|
23992
|
+
};
|
|
23993
|
+
402: {
|
|
23994
|
+
headers: {
|
|
23995
|
+
[name: string]: unknown;
|
|
23996
|
+
};
|
|
23997
|
+
content: {
|
|
23998
|
+
"application/json": {
|
|
23999
|
+
/**
|
|
24000
|
+
* @description The error code identifying the type of error.
|
|
24001
|
+
* @example production_feature_requires_billing
|
|
24002
|
+
* @constant
|
|
24003
|
+
*/
|
|
24004
|
+
code: "production_feature_requires_billing";
|
|
24005
|
+
/**
|
|
24006
|
+
* @description A human-readable description of the error.
|
|
24007
|
+
* @example Request could not be processed.
|
|
24008
|
+
*/
|
|
24009
|
+
message: string;
|
|
24010
|
+
};
|
|
24011
|
+
};
|
|
24012
|
+
};
|
|
24013
|
+
/** @description Forbidden */
|
|
24014
|
+
403: {
|
|
24015
|
+
headers: {
|
|
24016
|
+
[name: string]: unknown;
|
|
24017
|
+
};
|
|
24018
|
+
content: {
|
|
24019
|
+
"application/json": {
|
|
24020
|
+
/**
|
|
24021
|
+
* @description A human-readable description of the error.
|
|
24022
|
+
* @example Organization not found: 'org_01EHQMYV6MBK39QC5PZXHY59C3'.
|
|
24023
|
+
*/
|
|
24024
|
+
message: string;
|
|
24025
|
+
};
|
|
24026
|
+
};
|
|
24027
|
+
};
|
|
24028
|
+
/** @description Not Found */
|
|
24029
|
+
404: {
|
|
24030
|
+
headers: {
|
|
24031
|
+
[name: string]: unknown;
|
|
24032
|
+
};
|
|
24033
|
+
content: {
|
|
24034
|
+
"application/json": {
|
|
24035
|
+
/**
|
|
24036
|
+
* @description A human-readable description of the error.
|
|
24037
|
+
* @example Organization not found: 'org_01EHQMYV6MBK39QC5PZXHY59C3'.
|
|
24038
|
+
*/
|
|
24039
|
+
message: string;
|
|
24040
|
+
};
|
|
24041
|
+
};
|
|
24042
|
+
};
|
|
24043
|
+
/** @description Unprocessable Entity */
|
|
24044
|
+
422: {
|
|
24045
|
+
headers: {
|
|
24046
|
+
[name: string]: unknown;
|
|
24047
|
+
};
|
|
24048
|
+
content: {
|
|
24049
|
+
"application/json": {
|
|
24050
|
+
/**
|
|
24051
|
+
* @description A human-readable description of the error.
|
|
24052
|
+
* @example Organization not found: 'org_01EHQMYV6MBK39QC5PZXHY59C3'.
|
|
24053
|
+
*/
|
|
24054
|
+
message: string;
|
|
24055
|
+
};
|
|
24056
|
+
};
|
|
24057
|
+
};
|
|
24058
|
+
};
|
|
24059
|
+
};
|
|
23917
24060
|
AuthorizationGroupRoleAssignmentsController_get: {
|
|
23918
24061
|
parameters: {
|
|
23919
24062
|
query?: never;
|