@canopy-io/node 0.3.4 → 0.3.6
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/CHANGELOG.md +22 -0
- package/README.md +47 -2
- package/dist/index.cjs +127 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1126 -5
- package/dist/index.d.ts +1126 -5
- package/dist/index.js +127 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1679,6 +1679,30 @@ interface paths {
|
|
|
1679
1679
|
patch?: never;
|
|
1680
1680
|
trace?: never;
|
|
1681
1681
|
};
|
|
1682
|
+
"/api/v1/organizations/{id}/directory/grantable-roles": {
|
|
1683
|
+
parameters: {
|
|
1684
|
+
query?: never;
|
|
1685
|
+
header?: never;
|
|
1686
|
+
path?: never;
|
|
1687
|
+
cookie?: never;
|
|
1688
|
+
};
|
|
1689
|
+
/**
|
|
1690
|
+
* List the roles an organization's directory may grant
|
|
1691
|
+
* @description What this organization's identity provider is allowed to hand out, and which role arriving people hold.
|
|
1692
|
+
*/
|
|
1693
|
+
get: operations["ApiOrganizationDirectoryController_listGrantableRoles"];
|
|
1694
|
+
/**
|
|
1695
|
+
* Replace the roles an organization's directory may grant
|
|
1696
|
+
* @description Replaces the whole list in one act. Withdrawing a role unmaps the groups that name it and releases the grants those mappings produced. An empty list disables directory sync for the organization.
|
|
1697
|
+
*/
|
|
1698
|
+
put: operations["ApiOrganizationDirectoryController_setGrantableRoles"];
|
|
1699
|
+
post?: never;
|
|
1700
|
+
delete?: never;
|
|
1701
|
+
options?: never;
|
|
1702
|
+
head?: never;
|
|
1703
|
+
patch?: never;
|
|
1704
|
+
trace?: never;
|
|
1705
|
+
};
|
|
1682
1706
|
"/api/v1/organizations/{id}/directory/groups": {
|
|
1683
1707
|
parameters: {
|
|
1684
1708
|
query?: never;
|
|
@@ -2940,10 +2964,10 @@ interface components {
|
|
|
2940
2964
|
/** @description The authentication methods the identity provider asserted. */
|
|
2941
2965
|
amr: string[];
|
|
2942
2966
|
/**
|
|
2943
|
-
* @description How the asserted email's domain fared against the bound organization's verified claims. `no_boundary` when the connection is bound to no organization in the
|
|
2967
|
+
* @description How the asserted email's domain fared against the bound organization's verified claims. `no_boundary` when the connection is bound to no organization in an Environment without organizations; `unbound` when it is bound to none in an Environment that has them, which refuses the sign-in.
|
|
2944
2968
|
* @enum {string|null}
|
|
2945
2969
|
*/
|
|
2946
|
-
domain_outcome: "accepted" | "no_boundary" | "not_listed" | "not_verified" | "unknown" | null;
|
|
2970
|
+
domain_outcome: "accepted" | "no_boundary" | "unbound" | "not_listed" | "not_verified" | "unknown" | null;
|
|
2947
2971
|
/** Format: date-time */
|
|
2948
2972
|
completed_at: string | null;
|
|
2949
2973
|
};
|
|
@@ -3223,7 +3247,7 @@ interface components {
|
|
|
3223
3247
|
OrganizationDirectoryResponseDto: {
|
|
3224
3248
|
/** @description The directory's id, or null when none has been created. */
|
|
3225
3249
|
id?: string | null;
|
|
3226
|
-
/** @description The SCIM 2.0 base URL to paste into the identity provider's connector, or null when no directory exists. */
|
|
3250
|
+
/** @description The full SCIM 2.0 base URL (the instance's public origin and the directory's path) to paste into the identity provider's connector, or null when no directory exists. */
|
|
3227
3251
|
base_url?: string | null;
|
|
3228
3252
|
/** Format: date-time */
|
|
3229
3253
|
created_at?: string | null;
|
|
@@ -3251,7 +3275,7 @@ interface components {
|
|
|
3251
3275
|
/** @description Plaintext SCIM token — shown only once */
|
|
3252
3276
|
token: string;
|
|
3253
3277
|
token_preview: string;
|
|
3254
|
-
/** @description The directory's SCIM 2.0 base URL, to paste into the identity provider's connector. */
|
|
3278
|
+
/** @description The directory's full SCIM 2.0 base URL (the instance's public origin and the directory's path), to paste into the identity provider's connector. */
|
|
3255
3279
|
base_url: string;
|
|
3256
3280
|
/**
|
|
3257
3281
|
* Format: date-time
|
|
@@ -3284,6 +3308,19 @@ interface components {
|
|
|
3284
3308
|
/** Format: date-time */
|
|
3285
3309
|
created_at: string;
|
|
3286
3310
|
};
|
|
3311
|
+
DirectoryGrantableRoleResponseDto: {
|
|
3312
|
+
id: string;
|
|
3313
|
+
name: string;
|
|
3314
|
+
description?: string | null;
|
|
3315
|
+
/** @description The role an arriving person holds when no mapped group says otherwise. */
|
|
3316
|
+
is_default: boolean;
|
|
3317
|
+
};
|
|
3318
|
+
SetDirectoryGrantableRolesDto: {
|
|
3319
|
+
/** @description The roles this organization's directory may grant. An empty list disables directory sync for the organization. */
|
|
3320
|
+
role_ids: string[];
|
|
3321
|
+
/** @description The role somebody arrives with when no mapped group says otherwise. Required unless the list is empty, and must be one of `role_ids`. */
|
|
3322
|
+
default_role_id?: string | null;
|
|
3323
|
+
};
|
|
3287
3324
|
ScimGroupResponseDto: {
|
|
3288
3325
|
id: string;
|
|
3289
3326
|
external_id?: string | null;
|
|
@@ -3647,6 +3684,13 @@ interface components {
|
|
|
3647
3684
|
scope: "environment" | "account";
|
|
3648
3685
|
category: string;
|
|
3649
3686
|
description: string;
|
|
3687
|
+
/** @description The `resource_type` values a delivery of this event carries. */
|
|
3688
|
+
resource_types: string[];
|
|
3689
|
+
/**
|
|
3690
|
+
* @description The schema in the published API spec (components.schemas) that describes a delivery of this event, including the fields its `metadata` carries.
|
|
3691
|
+
* @example WebhookOrganizationMemberAddedEvent
|
|
3692
|
+
*/
|
|
3693
|
+
payload_schema: string;
|
|
3650
3694
|
};
|
|
3651
3695
|
WebhookDeliveryResponseDto: {
|
|
3652
3696
|
id: string;
|
|
@@ -3767,6 +3811,768 @@ interface components {
|
|
|
3767
3811
|
ErrorResponseDto: {
|
|
3768
3812
|
error: components["schemas"]["ApiErrorBodyDto"];
|
|
3769
3813
|
};
|
|
3814
|
+
/** @description A delivery of the `identity.created` webhook event. */
|
|
3815
|
+
WebhookIdentityCreatedEvent: {
|
|
3816
|
+
/** @enum {string} */
|
|
3817
|
+
event: "identity.created";
|
|
3818
|
+
data: components["schemas"]["ChangeEventDataDto"] & {
|
|
3819
|
+
/** @enum {string} */
|
|
3820
|
+
resource_type: "identity";
|
|
3821
|
+
metadata: {
|
|
3822
|
+
/** @description The identity's email address. */
|
|
3823
|
+
email: string;
|
|
3824
|
+
/** @description Whether the identity was created with a password. */
|
|
3825
|
+
password_set?: boolean;
|
|
3826
|
+
/**
|
|
3827
|
+
* Format: uuid
|
|
3828
|
+
* @description The Environment the identity was created into, when it was created from the Account directory.
|
|
3829
|
+
*/
|
|
3830
|
+
environment_id?: string | null;
|
|
3831
|
+
/**
|
|
3832
|
+
* @description Set when the change came from an accepted invitation.
|
|
3833
|
+
* @enum {string}
|
|
3834
|
+
*/
|
|
3835
|
+
source?: "invite";
|
|
3836
|
+
};
|
|
3837
|
+
};
|
|
3838
|
+
};
|
|
3839
|
+
/** @description A delivery of the `identity.updated` webhook event. */
|
|
3840
|
+
WebhookIdentityUpdatedEvent: {
|
|
3841
|
+
/** @enum {string} */
|
|
3842
|
+
event: "identity.updated";
|
|
3843
|
+
data: components["schemas"]["ChangeEventDataDto"] & {
|
|
3844
|
+
/** @enum {string} */
|
|
3845
|
+
resource_type: "identity";
|
|
3846
|
+
metadata: {
|
|
3847
|
+
/** @description The profile fields that changed and their new values, when updated through an Environment. */
|
|
3848
|
+
changes?: {
|
|
3849
|
+
/** @description New first name. */
|
|
3850
|
+
first_name?: string;
|
|
3851
|
+
/** @description New last name. */
|
|
3852
|
+
last_name?: string;
|
|
3853
|
+
/** @description New custom metadata. */
|
|
3854
|
+
metadata?: Record<string, unknown> | null;
|
|
3855
|
+
};
|
|
3856
|
+
/** @description The names of the fields that changed, when updated from the Account directory. */
|
|
3857
|
+
fields_updated?: string[];
|
|
3858
|
+
};
|
|
3859
|
+
};
|
|
3860
|
+
};
|
|
3861
|
+
/** @description A delivery of the `identity.status_set` webhook event. */
|
|
3862
|
+
WebhookIdentityStatusSetEvent: {
|
|
3863
|
+
/** @enum {string} */
|
|
3864
|
+
event: "identity.status_set";
|
|
3865
|
+
data: components["schemas"]["ChangeEventDataDto"] & {
|
|
3866
|
+
/** @enum {string} */
|
|
3867
|
+
resource_type: "identity";
|
|
3868
|
+
metadata: {
|
|
3869
|
+
/** @description Whether the identity was active before. */
|
|
3870
|
+
previous_is_active: boolean;
|
|
3871
|
+
/** @description Whether the identity is active now. */
|
|
3872
|
+
new_is_active: boolean;
|
|
3873
|
+
/** @description The Environments the identity is a member of. Present on account-scoped deliveries only. */
|
|
3874
|
+
environment_ids?: string[];
|
|
3875
|
+
};
|
|
3876
|
+
};
|
|
3877
|
+
};
|
|
3878
|
+
/** @description A delivery of the `identity.erased` webhook event. */
|
|
3879
|
+
WebhookIdentityErasedEvent: {
|
|
3880
|
+
/** @enum {string} */
|
|
3881
|
+
event: "identity.erased";
|
|
3882
|
+
data: components["schemas"]["ChangeEventDataDto"] & {
|
|
3883
|
+
/** @enum {string} */
|
|
3884
|
+
resource_type: "identity";
|
|
3885
|
+
metadata: {
|
|
3886
|
+
/** @description The Environments the identity is a member of. Present on account-scoped deliveries only. */
|
|
3887
|
+
environment_ids?: string[];
|
|
3888
|
+
};
|
|
3889
|
+
};
|
|
3890
|
+
};
|
|
3891
|
+
/** @description A delivery of the `identity.env_membership.added` webhook event. */
|
|
3892
|
+
WebhookIdentityEnvMembershipAddedEvent: {
|
|
3893
|
+
/** @enum {string} */
|
|
3894
|
+
event: "identity.env_membership.added";
|
|
3895
|
+
data: components["schemas"]["ChangeEventDataDto"] & {
|
|
3896
|
+
/** @enum {string} */
|
|
3897
|
+
resource_type: "identity";
|
|
3898
|
+
metadata: {
|
|
3899
|
+
/** @description True when an earlier membership was restored rather than a new one created. */
|
|
3900
|
+
reactivated: boolean;
|
|
3901
|
+
/**
|
|
3902
|
+
* Format: uuid
|
|
3903
|
+
* @description The Environment membership.
|
|
3904
|
+
*/
|
|
3905
|
+
membership_id?: string;
|
|
3906
|
+
/**
|
|
3907
|
+
* Format: uuid
|
|
3908
|
+
* @description The SSO connection the identity signed in through, for a just-in-time membership.
|
|
3909
|
+
*/
|
|
3910
|
+
connection_id?: string;
|
|
3911
|
+
/**
|
|
3912
|
+
* Format: uuid
|
|
3913
|
+
* @description The invitation that was accepted.
|
|
3914
|
+
*/
|
|
3915
|
+
invite_id?: string;
|
|
3916
|
+
/**
|
|
3917
|
+
* @description How the membership was created, when known.
|
|
3918
|
+
* @enum {string}
|
|
3919
|
+
*/
|
|
3920
|
+
source?: "identity_create" | "sso_jit" | "invite";
|
|
3921
|
+
};
|
|
3922
|
+
};
|
|
3923
|
+
};
|
|
3924
|
+
/** @description A delivery of the `identity.env_membership.removed` webhook event. */
|
|
3925
|
+
WebhookIdentityEnvMembershipRemovedEvent: {
|
|
3926
|
+
/** @enum {string} */
|
|
3927
|
+
event: "identity.env_membership.removed";
|
|
3928
|
+
data: components["schemas"]["ChangeEventDataDto"] & {
|
|
3929
|
+
/** @enum {string} */
|
|
3930
|
+
resource_type: "identity";
|
|
3931
|
+
metadata: {
|
|
3932
|
+
/** @description Pending invitations into the Environment revoked with the membership. */
|
|
3933
|
+
revoked_pending_invites: number;
|
|
3934
|
+
};
|
|
3935
|
+
};
|
|
3936
|
+
};
|
|
3937
|
+
/** @description A delivery of the `assignment.created` webhook event. */
|
|
3938
|
+
WebhookAssignmentCreatedEvent: {
|
|
3939
|
+
/** @enum {string} */
|
|
3940
|
+
event: "assignment.created";
|
|
3941
|
+
data: components["schemas"]["ChangeEventDataDto"] & {
|
|
3942
|
+
/** @enum {string} */
|
|
3943
|
+
resource_type: "role_assignment";
|
|
3944
|
+
metadata: {
|
|
3945
|
+
/**
|
|
3946
|
+
* Format: uuid
|
|
3947
|
+
* @description The identity holding the assignment.
|
|
3948
|
+
*/
|
|
3949
|
+
identity_id: string;
|
|
3950
|
+
/**
|
|
3951
|
+
* Format: uuid
|
|
3952
|
+
* @description The hierarchy node the role is held at.
|
|
3953
|
+
*/
|
|
3954
|
+
node_id: string;
|
|
3955
|
+
/**
|
|
3956
|
+
* Format: uuid
|
|
3957
|
+
* @description The role assigned.
|
|
3958
|
+
*/
|
|
3959
|
+
role_id: string;
|
|
3960
|
+
/**
|
|
3961
|
+
* @description Set when the change came from an accepted invitation.
|
|
3962
|
+
* @enum {string}
|
|
3963
|
+
*/
|
|
3964
|
+
source?: "invite";
|
|
3965
|
+
};
|
|
3966
|
+
};
|
|
3967
|
+
};
|
|
3968
|
+
/** @description A delivery of the `assignment.updated` webhook event. */
|
|
3969
|
+
WebhookAssignmentUpdatedEvent: {
|
|
3970
|
+
/** @enum {string} */
|
|
3971
|
+
event: "assignment.updated";
|
|
3972
|
+
data: components["schemas"]["ChangeEventDataDto"] & {
|
|
3973
|
+
/** @enum {string} */
|
|
3974
|
+
resource_type: "role_assignment";
|
|
3975
|
+
metadata: {
|
|
3976
|
+
/**
|
|
3977
|
+
* Format: uuid
|
|
3978
|
+
* @description The identity holding the assignment.
|
|
3979
|
+
*/
|
|
3980
|
+
identity_id: string;
|
|
3981
|
+
/**
|
|
3982
|
+
* Format: uuid
|
|
3983
|
+
* @description The hierarchy node the role is held at.
|
|
3984
|
+
*/
|
|
3985
|
+
node_id: string;
|
|
3986
|
+
/**
|
|
3987
|
+
* Format: uuid
|
|
3988
|
+
* @description The role assigned.
|
|
3989
|
+
*/
|
|
3990
|
+
role_id: string;
|
|
3991
|
+
};
|
|
3992
|
+
};
|
|
3993
|
+
};
|
|
3994
|
+
/** @description A delivery of the `assignment.removed` webhook event. */
|
|
3995
|
+
WebhookAssignmentRemovedEvent: {
|
|
3996
|
+
/** @enum {string} */
|
|
3997
|
+
event: "assignment.removed";
|
|
3998
|
+
data: components["schemas"]["ChangeEventDataDto"] & {
|
|
3999
|
+
/** @enum {string} */
|
|
4000
|
+
resource_type: "role_assignment";
|
|
4001
|
+
metadata: {
|
|
4002
|
+
/**
|
|
4003
|
+
* Format: uuid
|
|
4004
|
+
* @description The identity holding the assignment.
|
|
4005
|
+
*/
|
|
4006
|
+
identity_id: string;
|
|
4007
|
+
/**
|
|
4008
|
+
* Format: uuid
|
|
4009
|
+
* @description The hierarchy node the role is held at.
|
|
4010
|
+
*/
|
|
4011
|
+
node_id: string;
|
|
4012
|
+
/**
|
|
4013
|
+
* Format: uuid
|
|
4014
|
+
* @description The role assigned.
|
|
4015
|
+
*/
|
|
4016
|
+
role_id: string;
|
|
4017
|
+
};
|
|
4018
|
+
};
|
|
4019
|
+
};
|
|
4020
|
+
/** @description A delivery of the `assignment.bulk_created` webhook event. */
|
|
4021
|
+
WebhookAssignmentBulkCreatedEvent: {
|
|
4022
|
+
/** @enum {string} */
|
|
4023
|
+
event: "assignment.bulk_created";
|
|
4024
|
+
data: components["schemas"]["ChangeEventDataDto"] & {
|
|
4025
|
+
/** @enum {string} */
|
|
4026
|
+
resource_type: "role_assignment";
|
|
4027
|
+
metadata: {
|
|
4028
|
+
/** @description The assignments created. */
|
|
4029
|
+
assignment_ids: string[];
|
|
4030
|
+
/** @description How many were created. */
|
|
4031
|
+
succeeded: number;
|
|
4032
|
+
/** @description How many were refused. */
|
|
4033
|
+
failed: number;
|
|
4034
|
+
};
|
|
4035
|
+
};
|
|
4036
|
+
};
|
|
4037
|
+
/** @description A delivery of the `assignment.bulk_removed` webhook event. */
|
|
4038
|
+
WebhookAssignmentBulkRemovedEvent: {
|
|
4039
|
+
/** @enum {string} */
|
|
4040
|
+
event: "assignment.bulk_removed";
|
|
4041
|
+
data: components["schemas"]["ChangeEventDataDto"] & {
|
|
4042
|
+
/** @enum {string} */
|
|
4043
|
+
resource_type: "role_assignment";
|
|
4044
|
+
metadata: {
|
|
4045
|
+
/** @description The assignments removed. */
|
|
4046
|
+
assignment_ids: string[];
|
|
4047
|
+
/** @description Who lost which role, and where. */
|
|
4048
|
+
affected: {
|
|
4049
|
+
/**
|
|
4050
|
+
* Format: uuid
|
|
4051
|
+
* @description The identity holding the assignment.
|
|
4052
|
+
*/
|
|
4053
|
+
identity_id: string;
|
|
4054
|
+
/**
|
|
4055
|
+
* Format: uuid
|
|
4056
|
+
* @description The hierarchy node the role is held at.
|
|
4057
|
+
*/
|
|
4058
|
+
node_id: string;
|
|
4059
|
+
/**
|
|
4060
|
+
* Format: uuid
|
|
4061
|
+
* @description The role assigned.
|
|
4062
|
+
*/
|
|
4063
|
+
role_id: string;
|
|
4064
|
+
}[];
|
|
4065
|
+
};
|
|
4066
|
+
};
|
|
4067
|
+
};
|
|
4068
|
+
/** @description A delivery of the `assignment.bulk_role_changed` webhook event. */
|
|
4069
|
+
WebhookAssignmentBulkRoleChangedEvent: {
|
|
4070
|
+
/** @enum {string} */
|
|
4071
|
+
event: "assignment.bulk_role_changed";
|
|
4072
|
+
data: components["schemas"]["ChangeEventDataDto"] & {
|
|
4073
|
+
/** @enum {string} */
|
|
4074
|
+
resource_type: "role_assignment";
|
|
4075
|
+
metadata: {
|
|
4076
|
+
/** @description The assignments changed. */
|
|
4077
|
+
assignment_ids: string[];
|
|
4078
|
+
/**
|
|
4079
|
+
* Format: uuid
|
|
4080
|
+
* @description The role every one of them now holds.
|
|
4081
|
+
*/
|
|
4082
|
+
role_id: string;
|
|
4083
|
+
/** @description Whose assignment changed, and where. */
|
|
4084
|
+
affected: {
|
|
4085
|
+
/**
|
|
4086
|
+
* Format: uuid
|
|
4087
|
+
* @description The identity holding the assignment.
|
|
4088
|
+
*/
|
|
4089
|
+
identity_id: string;
|
|
4090
|
+
/**
|
|
4091
|
+
* Format: uuid
|
|
4092
|
+
* @description The hierarchy node the role is held at.
|
|
4093
|
+
*/
|
|
4094
|
+
node_id: string;
|
|
4095
|
+
}[];
|
|
4096
|
+
};
|
|
4097
|
+
};
|
|
4098
|
+
};
|
|
4099
|
+
/** @description A delivery of the `role.created` webhook event. */
|
|
4100
|
+
WebhookRoleCreatedEvent: {
|
|
4101
|
+
/** @enum {string} */
|
|
4102
|
+
event: "role.created";
|
|
4103
|
+
data: components["schemas"]["ChangeEventDataDto"] & {
|
|
4104
|
+
/** @enum {string} */
|
|
4105
|
+
resource_type: "role";
|
|
4106
|
+
metadata: {
|
|
4107
|
+
/** @description The role's name. */
|
|
4108
|
+
name: string;
|
|
4109
|
+
};
|
|
4110
|
+
};
|
|
4111
|
+
};
|
|
4112
|
+
/** @description A delivery of the `role.updated` webhook event. */
|
|
4113
|
+
WebhookRoleUpdatedEvent: {
|
|
4114
|
+
/** @enum {string} */
|
|
4115
|
+
event: "role.updated";
|
|
4116
|
+
data: components["schemas"]["ChangeEventDataDto"] & {
|
|
4117
|
+
/** @enum {string} */
|
|
4118
|
+
resource_type: "role";
|
|
4119
|
+
metadata: {
|
|
4120
|
+
/** @description The fields that changed and their new values. */
|
|
4121
|
+
changes: {
|
|
4122
|
+
/** @description New name. */
|
|
4123
|
+
name?: string;
|
|
4124
|
+
/** @description New description. */
|
|
4125
|
+
description?: string | null;
|
|
4126
|
+
/** @description Whether the role is active. */
|
|
4127
|
+
is_active?: boolean;
|
|
4128
|
+
};
|
|
4129
|
+
};
|
|
4130
|
+
};
|
|
4131
|
+
};
|
|
4132
|
+
/** @description A delivery of the `role.deleted` webhook event. */
|
|
4133
|
+
WebhookRoleDeletedEvent: {
|
|
4134
|
+
/** @enum {string} */
|
|
4135
|
+
event: "role.deleted";
|
|
4136
|
+
data: components["schemas"]["ChangeEventDataDto"] & {
|
|
4137
|
+
/** @enum {string} */
|
|
4138
|
+
resource_type: "role";
|
|
4139
|
+
metadata: {
|
|
4140
|
+
/** @description The role's name. */
|
|
4141
|
+
name: string;
|
|
4142
|
+
};
|
|
4143
|
+
};
|
|
4144
|
+
};
|
|
4145
|
+
/** @description A delivery of the `role.permissions.updated` webhook event. */
|
|
4146
|
+
WebhookRolePermissionsUpdatedEvent: {
|
|
4147
|
+
/** @enum {string} */
|
|
4148
|
+
event: "role.permissions.updated";
|
|
4149
|
+
data: components["schemas"]["ChangeEventDataDto"] & {
|
|
4150
|
+
/** @enum {string} */
|
|
4151
|
+
resource_type: "role";
|
|
4152
|
+
metadata: {
|
|
4153
|
+
/** @description Every permission key the role now carries. */
|
|
4154
|
+
permission_keys: string[];
|
|
4155
|
+
};
|
|
4156
|
+
};
|
|
4157
|
+
};
|
|
4158
|
+
/** @description A delivery of the `permission.created` webhook event. */
|
|
4159
|
+
WebhookPermissionCreatedEvent: {
|
|
4160
|
+
/** @enum {string} */
|
|
4161
|
+
event: "permission.created";
|
|
4162
|
+
data: components["schemas"]["ChangeEventDataDto"] & {
|
|
4163
|
+
/** @enum {string} */
|
|
4164
|
+
resource_type: "permission";
|
|
4165
|
+
metadata: {
|
|
4166
|
+
/** @description The permission key. */
|
|
4167
|
+
key: string;
|
|
4168
|
+
};
|
|
4169
|
+
};
|
|
4170
|
+
};
|
|
4171
|
+
/** @description A delivery of the `permission.updated` webhook event. */
|
|
4172
|
+
WebhookPermissionUpdatedEvent: {
|
|
4173
|
+
/** @enum {string} */
|
|
4174
|
+
event: "permission.updated";
|
|
4175
|
+
data: components["schemas"]["ChangeEventDataDto"] & {
|
|
4176
|
+
/** @enum {string} */
|
|
4177
|
+
resource_type: "permission";
|
|
4178
|
+
metadata: {
|
|
4179
|
+
/** @description The fields that changed and their new values. */
|
|
4180
|
+
changes: {
|
|
4181
|
+
/** @description New name. */
|
|
4182
|
+
name?: string;
|
|
4183
|
+
/** @description New description. */
|
|
4184
|
+
description?: string | null;
|
|
4185
|
+
/** @description New category. */
|
|
4186
|
+
category?: string;
|
|
4187
|
+
};
|
|
4188
|
+
};
|
|
4189
|
+
};
|
|
4190
|
+
};
|
|
4191
|
+
/** @description A delivery of the `permission.deleted` webhook event. */
|
|
4192
|
+
WebhookPermissionDeletedEvent: {
|
|
4193
|
+
/** @enum {string} */
|
|
4194
|
+
event: "permission.deleted";
|
|
4195
|
+
data: components["schemas"]["ChangeEventDataDto"] & {
|
|
4196
|
+
/** @enum {string} */
|
|
4197
|
+
resource_type: "permission";
|
|
4198
|
+
metadata: {
|
|
4199
|
+
/** @description The permission key. */
|
|
4200
|
+
key: string;
|
|
4201
|
+
};
|
|
4202
|
+
};
|
|
4203
|
+
};
|
|
4204
|
+
/** @description A delivery of the `node.created` webhook event. */
|
|
4205
|
+
WebhookNodeCreatedEvent: {
|
|
4206
|
+
/** @enum {string} */
|
|
4207
|
+
event: "node.created";
|
|
4208
|
+
data: components["schemas"]["ChangeEventDataDto"] & {
|
|
4209
|
+
/** @enum {string} */
|
|
4210
|
+
resource_type: "node";
|
|
4211
|
+
metadata: {
|
|
4212
|
+
/** @description The node's name. */
|
|
4213
|
+
name: string;
|
|
4214
|
+
/** @description The node's type. */
|
|
4215
|
+
node_type: string;
|
|
4216
|
+
/**
|
|
4217
|
+
* Format: uuid
|
|
4218
|
+
* @description The parent node, or null for the root.
|
|
4219
|
+
*/
|
|
4220
|
+
parent_node_id: string | null;
|
|
4221
|
+
};
|
|
4222
|
+
};
|
|
4223
|
+
};
|
|
4224
|
+
/** @description A delivery of the `node.updated` webhook event. */
|
|
4225
|
+
WebhookNodeUpdatedEvent: {
|
|
4226
|
+
/** @enum {string} */
|
|
4227
|
+
event: "node.updated";
|
|
4228
|
+
data: components["schemas"]["ChangeEventDataDto"] & {
|
|
4229
|
+
/** @enum {string} */
|
|
4230
|
+
resource_type: "node";
|
|
4231
|
+
metadata: {
|
|
4232
|
+
/** @description The node's name. */
|
|
4233
|
+
name: string;
|
|
4234
|
+
/** @description The node's new status, when it changed. */
|
|
4235
|
+
status?: string;
|
|
4236
|
+
};
|
|
4237
|
+
};
|
|
4238
|
+
};
|
|
4239
|
+
/** @description A delivery of the `node.moved` webhook event. */
|
|
4240
|
+
WebhookNodeMovedEvent: {
|
|
4241
|
+
/** @enum {string} */
|
|
4242
|
+
event: "node.moved";
|
|
4243
|
+
data: components["schemas"]["ChangeEventDataDto"] & {
|
|
4244
|
+
/** @enum {string} */
|
|
4245
|
+
resource_type: "node";
|
|
4246
|
+
metadata: {
|
|
4247
|
+
/** @description The node's name. */
|
|
4248
|
+
name: string;
|
|
4249
|
+
/**
|
|
4250
|
+
* Format: uuid
|
|
4251
|
+
* @description The node's new parent.
|
|
4252
|
+
*/
|
|
4253
|
+
parent_node_id: string | null;
|
|
4254
|
+
/** @description The node's new status, when it changed as well. */
|
|
4255
|
+
status?: string;
|
|
4256
|
+
};
|
|
4257
|
+
};
|
|
4258
|
+
};
|
|
4259
|
+
/** @description A delivery of the `node.deleted` webhook event. */
|
|
4260
|
+
WebhookNodeDeletedEvent: {
|
|
4261
|
+
/** @enum {string} */
|
|
4262
|
+
event: "node.deleted";
|
|
4263
|
+
data: components["schemas"]["ChangeEventDataDto"] & {
|
|
4264
|
+
/** @enum {string} */
|
|
4265
|
+
resource_type: "node";
|
|
4266
|
+
metadata: {
|
|
4267
|
+
/** @description The node's name. */
|
|
4268
|
+
name: string;
|
|
4269
|
+
/** @description Descendant nodes deleted with it. */
|
|
4270
|
+
descendant_count: number;
|
|
4271
|
+
/** @description Role assignments removed across the subtree. */
|
|
4272
|
+
assignments_removed: number;
|
|
4273
|
+
};
|
|
4274
|
+
};
|
|
4275
|
+
};
|
|
4276
|
+
/** @description A delivery of the `hierarchy_schema.updated` webhook event. */
|
|
4277
|
+
WebhookHierarchySchemaUpdatedEvent: {
|
|
4278
|
+
/** @enum {string} */
|
|
4279
|
+
event: "hierarchy_schema.updated";
|
|
4280
|
+
data: components["schemas"]["ChangeEventDataDto"] & {
|
|
4281
|
+
/** @enum {string} */
|
|
4282
|
+
resource_type: "hierarchy_schema";
|
|
4283
|
+
metadata: {
|
|
4284
|
+
/** @description The node types the schema defines. */
|
|
4285
|
+
node_types: string[];
|
|
4286
|
+
/** @description The deepest a tree may go. */
|
|
4287
|
+
max_depth: number;
|
|
4288
|
+
};
|
|
4289
|
+
};
|
|
4290
|
+
};
|
|
4291
|
+
/** @description A delivery of the `organization.created` webhook event. */
|
|
4292
|
+
WebhookOrganizationCreatedEvent: {
|
|
4293
|
+
/** @enum {string} */
|
|
4294
|
+
event: "organization.created";
|
|
4295
|
+
data: components["schemas"]["ChangeEventDataDto"] & {
|
|
4296
|
+
/** @enum {string} */
|
|
4297
|
+
resource_type: "organization";
|
|
4298
|
+
metadata: {
|
|
4299
|
+
/** @description The organization's name. */
|
|
4300
|
+
name: string;
|
|
4301
|
+
/** @description The organization's slug. */
|
|
4302
|
+
slug: string;
|
|
4303
|
+
/** @description Your own identifier for the organization, when you set one. */
|
|
4304
|
+
external_id: string | null;
|
|
4305
|
+
};
|
|
4306
|
+
};
|
|
4307
|
+
};
|
|
4308
|
+
/** @description A delivery of the `organization.updated` webhook event. */
|
|
4309
|
+
WebhookOrganizationUpdatedEvent: {
|
|
4310
|
+
/** @enum {string} */
|
|
4311
|
+
event: "organization.updated";
|
|
4312
|
+
data: components["schemas"]["ChangeEventDataDto"] & {
|
|
4313
|
+
/** @enum {string} */
|
|
4314
|
+
resource_type: "organization";
|
|
4315
|
+
metadata: {
|
|
4316
|
+
/** @description The organization's name. */
|
|
4317
|
+
name: string;
|
|
4318
|
+
/** @description The organization's slug. */
|
|
4319
|
+
slug: string;
|
|
4320
|
+
/** @description Your own identifier for the organization, when you set one. */
|
|
4321
|
+
external_id: string | null;
|
|
4322
|
+
};
|
|
4323
|
+
};
|
|
4324
|
+
};
|
|
4325
|
+
/** @description A delivery of the `organization.deleted` webhook event. */
|
|
4326
|
+
WebhookOrganizationDeletedEvent: {
|
|
4327
|
+
/** @enum {string} */
|
|
4328
|
+
event: "organization.deleted";
|
|
4329
|
+
data: components["schemas"]["ChangeEventDataDto"] & {
|
|
4330
|
+
/** @enum {string} */
|
|
4331
|
+
resource_type: "organization";
|
|
4332
|
+
metadata: {
|
|
4333
|
+
/** @description The organization's name. */
|
|
4334
|
+
name: string;
|
|
4335
|
+
/** @description Your own identifier for the organization, when you set one. */
|
|
4336
|
+
external_id: string | null;
|
|
4337
|
+
/** @description Memberships removed with it. */
|
|
4338
|
+
memberships_removed: number;
|
|
4339
|
+
/** @description Pending invitations revoked with it. */
|
|
4340
|
+
invites_revoked: number;
|
|
4341
|
+
/** @description Hierarchy nodes deleted with it. */
|
|
4342
|
+
nodes_deleted: number;
|
|
4343
|
+
};
|
|
4344
|
+
};
|
|
4345
|
+
};
|
|
4346
|
+
/** @description A delivery of the `organization.deleted_all` webhook event. */
|
|
4347
|
+
WebhookOrganizationDeletedAllEvent: {
|
|
4348
|
+
/** @enum {string} */
|
|
4349
|
+
event: "organization.deleted_all";
|
|
4350
|
+
data: components["schemas"]["ChangeEventDataDto"] & {
|
|
4351
|
+
/** @enum {string} */
|
|
4352
|
+
resource_type: "environment";
|
|
4353
|
+
metadata: {
|
|
4354
|
+
/** @description Organizations deleted. */
|
|
4355
|
+
organizations_deleted: number;
|
|
4356
|
+
/** @description Memberships removed with it. */
|
|
4357
|
+
memberships_removed: number;
|
|
4358
|
+
/** @description Pending invitations revoked with it. */
|
|
4359
|
+
invites_revoked: number;
|
|
4360
|
+
/** @description Hierarchy nodes deleted with it. */
|
|
4361
|
+
nodes_deleted: number;
|
|
4362
|
+
};
|
|
4363
|
+
};
|
|
4364
|
+
};
|
|
4365
|
+
/** @description A delivery of the `organization.member.added` webhook event. */
|
|
4366
|
+
WebhookOrganizationMemberAddedEvent: {
|
|
4367
|
+
/** @enum {string} */
|
|
4368
|
+
event: "organization.member.added";
|
|
4369
|
+
data: components["schemas"]["ChangeEventDataDto"] & {
|
|
4370
|
+
/** @enum {string} */
|
|
4371
|
+
resource_type: "organization";
|
|
4372
|
+
metadata: {
|
|
4373
|
+
/**
|
|
4374
|
+
* Format: uuid
|
|
4375
|
+
* @description The identity that joined.
|
|
4376
|
+
*/
|
|
4377
|
+
identity_id: string;
|
|
4378
|
+
/**
|
|
4379
|
+
* Format: uuid
|
|
4380
|
+
* @description The role it holds in the organization.
|
|
4381
|
+
*/
|
|
4382
|
+
role_id: string;
|
|
4383
|
+
/** @description Your own identifier for the organization, when you set one. */
|
|
4384
|
+
external_id?: string | null;
|
|
4385
|
+
/**
|
|
4386
|
+
* Format: uuid
|
|
4387
|
+
* @description The role assignment that is the membership.
|
|
4388
|
+
*/
|
|
4389
|
+
assignment_id?: string;
|
|
4390
|
+
/**
|
|
4391
|
+
* Format: uuid
|
|
4392
|
+
* @description The SSO connection the identity signed in through, for a just-in-time membership.
|
|
4393
|
+
*/
|
|
4394
|
+
connection_id?: string;
|
|
4395
|
+
/**
|
|
4396
|
+
* Format: uuid
|
|
4397
|
+
* @description The invitation that was accepted.
|
|
4398
|
+
*/
|
|
4399
|
+
invite_id?: string;
|
|
4400
|
+
/**
|
|
4401
|
+
* @description How the member joined, when it was not added directly.
|
|
4402
|
+
* @enum {string}
|
|
4403
|
+
*/
|
|
4404
|
+
source?: "sso_jit" | "invite";
|
|
4405
|
+
};
|
|
4406
|
+
};
|
|
4407
|
+
};
|
|
4408
|
+
/** @description A delivery of the `organization.member.role_changed` webhook event. */
|
|
4409
|
+
WebhookOrganizationMemberRoleChangedEvent: {
|
|
4410
|
+
/** @enum {string} */
|
|
4411
|
+
event: "organization.member.role_changed";
|
|
4412
|
+
data: components["schemas"]["ChangeEventDataDto"] & {
|
|
4413
|
+
/** @enum {string} */
|
|
4414
|
+
resource_type: "organization";
|
|
4415
|
+
metadata: {
|
|
4416
|
+
/** @description Your own identifier for the organization, when you set one. */
|
|
4417
|
+
external_id: string | null;
|
|
4418
|
+
/**
|
|
4419
|
+
* Format: uuid
|
|
4420
|
+
* @description The member.
|
|
4421
|
+
*/
|
|
4422
|
+
identity_id: string;
|
|
4423
|
+
/**
|
|
4424
|
+
* Format: uuid
|
|
4425
|
+
* @description The role it held.
|
|
4426
|
+
*/
|
|
4427
|
+
from_role_id: string;
|
|
4428
|
+
/**
|
|
4429
|
+
* Format: uuid
|
|
4430
|
+
* @description The role it holds now.
|
|
4431
|
+
*/
|
|
4432
|
+
to_role_id: string;
|
|
4433
|
+
};
|
|
4434
|
+
};
|
|
4435
|
+
};
|
|
4436
|
+
/** @description A delivery of the `organization.member.removed` webhook event. */
|
|
4437
|
+
WebhookOrganizationMemberRemovedEvent: {
|
|
4438
|
+
/** @enum {string} */
|
|
4439
|
+
event: "organization.member.removed";
|
|
4440
|
+
data: components["schemas"]["ChangeEventDataDto"] & {
|
|
4441
|
+
/** @enum {string} */
|
|
4442
|
+
resource_type: "organization";
|
|
4443
|
+
metadata: {
|
|
4444
|
+
/** @description Your own identifier for the organization, when you set one. */
|
|
4445
|
+
external_id: string | null;
|
|
4446
|
+
/**
|
|
4447
|
+
* Format: uuid
|
|
4448
|
+
* @description The identity removed.
|
|
4449
|
+
*/
|
|
4450
|
+
identity_id: string;
|
|
4451
|
+
/**
|
|
4452
|
+
* Format: uuid
|
|
4453
|
+
* @description The role it held.
|
|
4454
|
+
*/
|
|
4455
|
+
role_id: string;
|
|
4456
|
+
/** @description Grants it held beneath the organization, removed with the membership. */
|
|
4457
|
+
scoped_assignments_removed: number;
|
|
4458
|
+
};
|
|
4459
|
+
};
|
|
4460
|
+
};
|
|
4461
|
+
/** @description A delivery of the `organization.policy.updated` webhook event. */
|
|
4462
|
+
WebhookOrganizationPolicyUpdatedEvent: {
|
|
4463
|
+
/** @enum {string} */
|
|
4464
|
+
event: "organization.policy.updated";
|
|
4465
|
+
data: components["schemas"]["ChangeEventDataDto"] & {
|
|
4466
|
+
/** @enum {string} */
|
|
4467
|
+
resource_type: "organization";
|
|
4468
|
+
metadata: {
|
|
4469
|
+
/** @description Your own identifier for the organization, when you set one. */
|
|
4470
|
+
external_id: string | null;
|
|
4471
|
+
/** @description Whether members must use MFA, or null to inherit the Environment. */
|
|
4472
|
+
mfa_required: boolean | null;
|
|
4473
|
+
/** @description The factors members may use, or null to inherit the Environment. */
|
|
4474
|
+
mfa_factor_allowlist: ("totp" | "webauthn" | "email_otp")[] | null;
|
|
4475
|
+
/**
|
|
4476
|
+
* @description Whether an SSO sign-in still needs MFA, or null to inherit the Environment.
|
|
4477
|
+
* @enum {string|null}
|
|
4478
|
+
*/
|
|
4479
|
+
mfa_after_sso: "exempt" | "require" | null;
|
|
4480
|
+
/** @description Whether members must sign in with SSO. */
|
|
4481
|
+
require_sso: boolean;
|
|
4482
|
+
};
|
|
4483
|
+
};
|
|
4484
|
+
};
|
|
4485
|
+
/** @description A delivery of the `organization.sso_connection.bound` webhook event. */
|
|
4486
|
+
WebhookOrganizationSsoConnectionBoundEvent: {
|
|
4487
|
+
/** @enum {string} */
|
|
4488
|
+
event: "organization.sso_connection.bound";
|
|
4489
|
+
data: components["schemas"]["ChangeEventDataDto"] & {
|
|
4490
|
+
/** @enum {string} */
|
|
4491
|
+
resource_type: "organization";
|
|
4492
|
+
metadata: {
|
|
4493
|
+
/** @description Your own identifier for the organization, when you set one. */
|
|
4494
|
+
external_id: string | null;
|
|
4495
|
+
/**
|
|
4496
|
+
* Format: uuid
|
|
4497
|
+
* @description The SSO connection.
|
|
4498
|
+
*/
|
|
4499
|
+
connection_id: string;
|
|
4500
|
+
/**
|
|
4501
|
+
* Format: uuid
|
|
4502
|
+
* @description The role a just-in-time sign-in through it joins with.
|
|
4503
|
+
*/
|
|
4504
|
+
default_role_id: string;
|
|
4505
|
+
/** @description The connection's name, on a new binding. */
|
|
4506
|
+
connection_name?: string;
|
|
4507
|
+
/**
|
|
4508
|
+
* @description Set when an existing binding's role changed, rather than a new binding made.
|
|
4509
|
+
* @enum {string}
|
|
4510
|
+
*/
|
|
4511
|
+
changed?: "default_role";
|
|
4512
|
+
};
|
|
4513
|
+
};
|
|
4514
|
+
};
|
|
4515
|
+
/** @description A delivery of the `organization.sso_connection.unbound` webhook event. */
|
|
4516
|
+
WebhookOrganizationSsoConnectionUnboundEvent: {
|
|
4517
|
+
/** @enum {string} */
|
|
4518
|
+
event: "organization.sso_connection.unbound";
|
|
4519
|
+
data: components["schemas"]["ChangeEventDataDto"] & {
|
|
4520
|
+
/** @enum {string} */
|
|
4521
|
+
resource_type: "organization";
|
|
4522
|
+
metadata: {
|
|
4523
|
+
/** @description Your own identifier for the organization, when you set one. */
|
|
4524
|
+
external_id: string | null;
|
|
4525
|
+
/**
|
|
4526
|
+
* Format: uuid
|
|
4527
|
+
* @description The SSO connection.
|
|
4528
|
+
*/
|
|
4529
|
+
connection_id: string;
|
|
4530
|
+
};
|
|
4531
|
+
};
|
|
4532
|
+
};
|
|
4533
|
+
/** @description A delivery of the `account_member.added` webhook event. */
|
|
4534
|
+
WebhookAccountMemberAddedEvent: {
|
|
4535
|
+
/** @enum {string} */
|
|
4536
|
+
event: "account_member.added";
|
|
4537
|
+
data: components["schemas"]["ChangeEventDataDto"] & {
|
|
4538
|
+
/** @enum {string} */
|
|
4539
|
+
resource_type: "account_member";
|
|
4540
|
+
metadata: {
|
|
4541
|
+
/** @description The member's email address. */
|
|
4542
|
+
email: string;
|
|
4543
|
+
/**
|
|
4544
|
+
* Format: uuid
|
|
4545
|
+
* @description The invitation that was accepted.
|
|
4546
|
+
*/
|
|
4547
|
+
invite_id: string;
|
|
4548
|
+
};
|
|
4549
|
+
};
|
|
4550
|
+
};
|
|
4551
|
+
/** @description A delivery of the `account_member.removed` webhook event. */
|
|
4552
|
+
WebhookAccountMemberRemovedEvent: {
|
|
4553
|
+
/** @enum {string} */
|
|
4554
|
+
event: "account_member.removed";
|
|
4555
|
+
data: components["schemas"]["ChangeEventDataDto"] & {
|
|
4556
|
+
/** @enum {string} */
|
|
4557
|
+
resource_type: "account_member";
|
|
4558
|
+
metadata: Record<string, unknown>;
|
|
4559
|
+
};
|
|
4560
|
+
};
|
|
4561
|
+
/** @description A delivery of the `session.all_revoked` webhook event. */
|
|
4562
|
+
WebhookSessionAllRevokedEvent: {
|
|
4563
|
+
/** @enum {string} */
|
|
4564
|
+
event: "session.all_revoked";
|
|
4565
|
+
data: components["schemas"]["ChangeEventDataDto"] & {
|
|
4566
|
+
/** @enum {string} */
|
|
4567
|
+
resource_type: "identity" | "user";
|
|
4568
|
+
metadata: {
|
|
4569
|
+
/** @description Sessions revoked. */
|
|
4570
|
+
revoked_count: number;
|
|
4571
|
+
/** @description Why, when a reason was given. */
|
|
4572
|
+
reason: string | null;
|
|
4573
|
+
};
|
|
4574
|
+
};
|
|
4575
|
+
};
|
|
3770
4576
|
};
|
|
3771
4577
|
responses: never;
|
|
3772
4578
|
parameters: never;
|
|
@@ -12299,6 +13105,226 @@ interface operations {
|
|
|
12299
13105
|
};
|
|
12300
13106
|
};
|
|
12301
13107
|
};
|
|
13108
|
+
ApiOrganizationDirectoryController_listGrantableRoles: {
|
|
13109
|
+
parameters: {
|
|
13110
|
+
query?: never;
|
|
13111
|
+
header?: never;
|
|
13112
|
+
path: {
|
|
13113
|
+
id: string;
|
|
13114
|
+
};
|
|
13115
|
+
cookie?: never;
|
|
13116
|
+
};
|
|
13117
|
+
requestBody?: never;
|
|
13118
|
+
responses: {
|
|
13119
|
+
/** @description Grantable roles returned */
|
|
13120
|
+
200: {
|
|
13121
|
+
headers: {
|
|
13122
|
+
[name: string]: unknown;
|
|
13123
|
+
};
|
|
13124
|
+
content: {
|
|
13125
|
+
"application/json": {
|
|
13126
|
+
items: components["schemas"]["DirectoryGrantableRoleResponseDto"][];
|
|
13127
|
+
};
|
|
13128
|
+
};
|
|
13129
|
+
};
|
|
13130
|
+
/** @description Invalid or expired token */
|
|
13131
|
+
401: {
|
|
13132
|
+
headers: {
|
|
13133
|
+
[name: string]: unknown;
|
|
13134
|
+
};
|
|
13135
|
+
content: {
|
|
13136
|
+
/**
|
|
13137
|
+
* @example {
|
|
13138
|
+
* "error": {
|
|
13139
|
+
* "statusCode": 401,
|
|
13140
|
+
* "code": null,
|
|
13141
|
+
* "message": "Invalid or expired token",
|
|
13142
|
+
* "timestamp": "2026-04-20T12:00:00.000Z",
|
|
13143
|
+
* "path": "/api/v1/organizations/{id}/directory",
|
|
13144
|
+
* "method": "GET"
|
|
13145
|
+
* }
|
|
13146
|
+
* }
|
|
13147
|
+
*/
|
|
13148
|
+
"application/json": components["schemas"]["ErrorResponseDto"];
|
|
13149
|
+
};
|
|
13150
|
+
};
|
|
13151
|
+
/** @description This token is not authorized for this endpoint (wrong principal type — e.g., admin token on identity-only endpoint, or vice versa) */
|
|
13152
|
+
403: {
|
|
13153
|
+
headers: {
|
|
13154
|
+
[name: string]: unknown;
|
|
13155
|
+
};
|
|
13156
|
+
content: {
|
|
13157
|
+
/**
|
|
13158
|
+
* @example {
|
|
13159
|
+
* "error": {
|
|
13160
|
+
* "statusCode": 403,
|
|
13161
|
+
* "code": null,
|
|
13162
|
+
* "message": "This token is not authorized for this endpoint (wrong principal type — e.g., admin token on identity-only endpoint, or vice versa)",
|
|
13163
|
+
* "timestamp": "2026-04-20T12:00:00.000Z",
|
|
13164
|
+
* "path": "/api/v1/organizations/{id}/directory",
|
|
13165
|
+
* "method": "GET"
|
|
13166
|
+
* }
|
|
13167
|
+
* }
|
|
13168
|
+
*/
|
|
13169
|
+
"application/json": components["schemas"]["ErrorResponseDto"];
|
|
13170
|
+
};
|
|
13171
|
+
};
|
|
13172
|
+
/** @description Organization not found */
|
|
13173
|
+
404: {
|
|
13174
|
+
headers: {
|
|
13175
|
+
[name: string]: unknown;
|
|
13176
|
+
};
|
|
13177
|
+
content: {
|
|
13178
|
+
/**
|
|
13179
|
+
* @example {
|
|
13180
|
+
* "error": {
|
|
13181
|
+
* "statusCode": 404,
|
|
13182
|
+
* "code": null,
|
|
13183
|
+
* "message": "Organization not found",
|
|
13184
|
+
* "timestamp": "2026-04-20T12:00:00.000Z",
|
|
13185
|
+
* "path": "/api/v1/organizations/{id}/directory/grantable-roles",
|
|
13186
|
+
* "method": "GET"
|
|
13187
|
+
* }
|
|
13188
|
+
* }
|
|
13189
|
+
*/
|
|
13190
|
+
"application/json": components["schemas"]["ErrorResponseDto"];
|
|
13191
|
+
};
|
|
13192
|
+
};
|
|
13193
|
+
};
|
|
13194
|
+
};
|
|
13195
|
+
ApiOrganizationDirectoryController_setGrantableRoles: {
|
|
13196
|
+
parameters: {
|
|
13197
|
+
query?: never;
|
|
13198
|
+
header?: never;
|
|
13199
|
+
path: {
|
|
13200
|
+
id: string;
|
|
13201
|
+
};
|
|
13202
|
+
cookie?: never;
|
|
13203
|
+
};
|
|
13204
|
+
requestBody: {
|
|
13205
|
+
content: {
|
|
13206
|
+
"application/json": components["schemas"]["SetDirectoryGrantableRolesDto"];
|
|
13207
|
+
};
|
|
13208
|
+
};
|
|
13209
|
+
responses: {
|
|
13210
|
+
/** @description Grantable roles replaced */
|
|
13211
|
+
200: {
|
|
13212
|
+
headers: {
|
|
13213
|
+
[name: string]: unknown;
|
|
13214
|
+
};
|
|
13215
|
+
content: {
|
|
13216
|
+
"application/json": {
|
|
13217
|
+
items: components["schemas"]["DirectoryGrantableRoleResponseDto"][];
|
|
13218
|
+
};
|
|
13219
|
+
};
|
|
13220
|
+
};
|
|
13221
|
+
/** @description The list names a role that does not exist here, a system role, or no role for arriving people to hold */
|
|
13222
|
+
400: {
|
|
13223
|
+
headers: {
|
|
13224
|
+
[name: string]: unknown;
|
|
13225
|
+
};
|
|
13226
|
+
content: {
|
|
13227
|
+
/**
|
|
13228
|
+
* @example {
|
|
13229
|
+
* "error": {
|
|
13230
|
+
* "statusCode": 400,
|
|
13231
|
+
* "code": null,
|
|
13232
|
+
* "message": "The list names a role that does not exist here, a system role, or no role for arriving people to hold",
|
|
13233
|
+
* "timestamp": "2026-04-20T12:00:00.000Z",
|
|
13234
|
+
* "path": "/api/v1/organizations/{id}/directory/grantable-roles",
|
|
13235
|
+
* "method": "PUT"
|
|
13236
|
+
* }
|
|
13237
|
+
* }
|
|
13238
|
+
*/
|
|
13239
|
+
"application/json": components["schemas"]["ErrorResponseDto"];
|
|
13240
|
+
};
|
|
13241
|
+
};
|
|
13242
|
+
/** @description Invalid or expired token */
|
|
13243
|
+
401: {
|
|
13244
|
+
headers: {
|
|
13245
|
+
[name: string]: unknown;
|
|
13246
|
+
};
|
|
13247
|
+
content: {
|
|
13248
|
+
/**
|
|
13249
|
+
* @example {
|
|
13250
|
+
* "error": {
|
|
13251
|
+
* "statusCode": 401,
|
|
13252
|
+
* "code": null,
|
|
13253
|
+
* "message": "Invalid or expired token",
|
|
13254
|
+
* "timestamp": "2026-04-20T12:00:00.000Z",
|
|
13255
|
+
* "path": "/api/v1/organizations/{id}/directory",
|
|
13256
|
+
* "method": "GET"
|
|
13257
|
+
* }
|
|
13258
|
+
* }
|
|
13259
|
+
*/
|
|
13260
|
+
"application/json": components["schemas"]["ErrorResponseDto"];
|
|
13261
|
+
};
|
|
13262
|
+
};
|
|
13263
|
+
/** @description Only the application owner may change this list. An organization's own administrator can read it, not change it. */
|
|
13264
|
+
403: {
|
|
13265
|
+
headers: {
|
|
13266
|
+
[name: string]: unknown;
|
|
13267
|
+
};
|
|
13268
|
+
content: {
|
|
13269
|
+
/**
|
|
13270
|
+
* @example {
|
|
13271
|
+
* "error": {
|
|
13272
|
+
* "statusCode": 403,
|
|
13273
|
+
* "code": null,
|
|
13274
|
+
* "message": "Only the application owner may change this list. An organization's own administrator can read it, not change it.",
|
|
13275
|
+
* "timestamp": "2026-04-20T12:00:00.000Z",
|
|
13276
|
+
* "path": "/api/v1/organizations/{id}/directory/grantable-roles",
|
|
13277
|
+
* "method": "PUT"
|
|
13278
|
+
* }
|
|
13279
|
+
* }
|
|
13280
|
+
*/
|
|
13281
|
+
"application/json": components["schemas"]["ErrorResponseDto"];
|
|
13282
|
+
};
|
|
13283
|
+
};
|
|
13284
|
+
/** @description Organization not found */
|
|
13285
|
+
404: {
|
|
13286
|
+
headers: {
|
|
13287
|
+
[name: string]: unknown;
|
|
13288
|
+
};
|
|
13289
|
+
content: {
|
|
13290
|
+
/**
|
|
13291
|
+
* @example {
|
|
13292
|
+
* "error": {
|
|
13293
|
+
* "statusCode": 404,
|
|
13294
|
+
* "code": null,
|
|
13295
|
+
* "message": "Organization not found",
|
|
13296
|
+
* "timestamp": "2026-04-20T12:00:00.000Z",
|
|
13297
|
+
* "path": "/api/v1/organizations/{id}/directory/grantable-roles",
|
|
13298
|
+
* "method": "PUT"
|
|
13299
|
+
* }
|
|
13300
|
+
* }
|
|
13301
|
+
*/
|
|
13302
|
+
"application/json": components["schemas"]["ErrorResponseDto"];
|
|
13303
|
+
};
|
|
13304
|
+
};
|
|
13305
|
+
/** @description The list cannot be emptied while the organization's directory is connected; remove the directory first */
|
|
13306
|
+
409: {
|
|
13307
|
+
headers: {
|
|
13308
|
+
[name: string]: unknown;
|
|
13309
|
+
};
|
|
13310
|
+
content: {
|
|
13311
|
+
/**
|
|
13312
|
+
* @example {
|
|
13313
|
+
* "error": {
|
|
13314
|
+
* "statusCode": 409,
|
|
13315
|
+
* "code": null,
|
|
13316
|
+
* "message": "The list cannot be emptied while the organization's directory is connected; remove the directory first",
|
|
13317
|
+
* "timestamp": "2026-04-20T12:00:00.000Z",
|
|
13318
|
+
* "path": "/api/v1/organizations/{id}/directory/grantable-roles",
|
|
13319
|
+
* "method": "PUT"
|
|
13320
|
+
* }
|
|
13321
|
+
* }
|
|
13322
|
+
*/
|
|
13323
|
+
"application/json": components["schemas"]["ErrorResponseDto"];
|
|
13324
|
+
};
|
|
13325
|
+
};
|
|
13326
|
+
};
|
|
13327
|
+
};
|
|
12302
13328
|
ApiOrganizationDirectoryGroupsController_list: {
|
|
12303
13329
|
parameters: {
|
|
12304
13330
|
query?: never;
|
|
@@ -16105,6 +17131,57 @@ declare class Organizations {
|
|
|
16105
17131
|
*/
|
|
16106
17132
|
bindSsoConnection(id: string, input: RequestBody<"ApiOrganizationsController_bindSsoConnection">): Promise<ResponseBody<"ApiOrganizationsController_bindSsoConnection">>;
|
|
16107
17133
|
unbindSsoConnection(id: string, connectionId: string): Promise<void>;
|
|
17134
|
+
/**
|
|
17135
|
+
* The roles this organization's identity provider may grant, and the one
|
|
17136
|
+
* people arrive with. An empty list means directory sync is not open for
|
|
17137
|
+
* the organization.
|
|
17138
|
+
*/
|
|
17139
|
+
listDirectoryGrantableRoles(id: string): Promise<ResponseBody<"ApiOrganizationDirectoryController_listGrantableRoles">>;
|
|
17140
|
+
/**
|
|
17141
|
+
* Replace the list in one act, which is how directory sync is opened for
|
|
17142
|
+
* an organization. Exactly one role is `default_role_id`, the one people
|
|
17143
|
+
* arrive with. Withdrawing a role unmaps the groups naming it and keeps
|
|
17144
|
+
* their members in the organization; an empty list is refused while a
|
|
17145
|
+
* directory is connected. Your API key only: an organization admin's
|
|
17146
|
+
* token can read the list but is refused changing it.
|
|
17147
|
+
*/
|
|
17148
|
+
setDirectoryGrantableRoles(id: string, input: RequestBody<"ApiOrganizationDirectoryController_setGrantableRoles">): Promise<ResponseBody<"ApiOrganizationDirectoryController_setGrantableRoles">>;
|
|
17149
|
+
/**
|
|
17150
|
+
* The organization's directory, its full SCIM base URL, and the roles it
|
|
17151
|
+
* may grant. `id` is null until a directory is connected.
|
|
17152
|
+
*/
|
|
17153
|
+
getDirectory(id: string): Promise<ResponseBody<"ApiOrganizationDirectoryController_get">>;
|
|
17154
|
+
/** Connect a directory. Refused until the organization's roles are set. */
|
|
17155
|
+
createDirectory(id: string): Promise<ResponseBody<"ApiOrganizationDirectoryController_create">>;
|
|
17156
|
+
/**
|
|
17157
|
+
* End the connection. The people it provisioned keep their accounts and
|
|
17158
|
+
* their membership; what ends is the provider's ability to push.
|
|
17159
|
+
*/
|
|
17160
|
+
removeDirectory(id: string): Promise<void>;
|
|
17161
|
+
listDirectoryTokens(id: string): Promise<ResponseBody<"ApiOrganizationDirectoryController_listTokens">>;
|
|
17162
|
+
/**
|
|
17163
|
+
* The raw token is in this answer and nowhere else, alongside the full
|
|
17164
|
+
* base URL the identity provider's connector needs with it.
|
|
17165
|
+
*/
|
|
17166
|
+
mintDirectoryToken(id: string, input?: RequestBody<"ApiOrganizationDirectoryController_mintToken">): Promise<ResponseBody<"ApiOrganizationDirectoryController_mintToken">>;
|
|
17167
|
+
/**
|
|
17168
|
+
* A replacement token, shown once. The old one keeps working for a short
|
|
17169
|
+
* overlap, so the provider can be moved across without an outage.
|
|
17170
|
+
*/
|
|
17171
|
+
rotateDirectoryToken(id: string, tokenId: string, input?: RequestBody<"ApiOrganizationDirectoryController_rotateToken">): Promise<ResponseBody<"ApiOrganizationDirectoryController_rotateToken">>;
|
|
17172
|
+
revokeDirectoryToken(id: string, tokenId: string): Promise<void>;
|
|
17173
|
+
/** The organization's own provisioning events, newest first. */
|
|
17174
|
+
listDirectoryActivity(id: string): Promise<ResponseBody<"ApiOrganizationDirectoryController_activity">>;
|
|
17175
|
+
/** The groups the provider has pushed, each with its role mapping. */
|
|
17176
|
+
listDirectoryGroups(id: string): Promise<ResponseBody<"ApiOrganizationDirectoryGroupsController_list">>;
|
|
17177
|
+
/**
|
|
17178
|
+
* Grant a listed role to every member of a pushed group, at the
|
|
17179
|
+
* organization. A role not on the organization's list is refused with
|
|
17180
|
+
* `scim.role_not_grantable`.
|
|
17181
|
+
*/
|
|
17182
|
+
mapDirectoryGroup(id: string, groupId: string, input: RequestBody<"ApiOrganizationDirectoryGroupsController_map">): Promise<ResponseBody<"ApiOrganizationDirectoryGroupsController_map">>;
|
|
17183
|
+
/** Members fall back to the arrival role and stay in the organization. */
|
|
17184
|
+
unmapDirectoryGroup(id: string, groupId: string): Promise<ResponseBody<"ApiOrganizationDirectoryGroupsController_unmap">>;
|
|
16108
17185
|
}
|
|
16109
17186
|
type OrganizationItem = ItemOf$2<ResponseBody<"ApiOrganizationsController_listOrganizations">>;
|
|
16110
17187
|
type OrganizationMemberItem = ItemOf$2<ResponseBody<"ApiOrganizationsController_listMembers">>;
|
|
@@ -16674,4 +17751,48 @@ declare class TokenVerifier {
|
|
|
16674
17751
|
private fetchKeys;
|
|
16675
17752
|
}
|
|
16676
17753
|
|
|
16677
|
-
|
|
17754
|
+
/**
|
|
17755
|
+
* Typed webhook deliveries.
|
|
17756
|
+
*
|
|
17757
|
+
* Canopy publishes one schema per webhook event, named `Webhook…Event`, each
|
|
17758
|
+
* the shared envelope narrowed to that event's name, `resource_type` and
|
|
17759
|
+
* `metadata`. These types read them straight out of the generated document,
|
|
17760
|
+
* so a handler is written against the contract rather than against
|
|
17761
|
+
* deliveries it happened to capture, and `npm run generate` brings in any
|
|
17762
|
+
* field the API adds.
|
|
17763
|
+
*
|
|
17764
|
+
* app.post("/webhooks/canopy", (req, res) => {
|
|
17765
|
+
* const delivery = req.body as WebhookDelivery;
|
|
17766
|
+
*
|
|
17767
|
+
* if (isWebhookEvent(delivery, "organization.member.added")) {
|
|
17768
|
+
* delivery.data.metadata.identity_id; // string
|
|
17769
|
+
* }
|
|
17770
|
+
* });
|
|
17771
|
+
*
|
|
17772
|
+
* `GET /api/v1/webhooks/event-types` names each event's schema in
|
|
17773
|
+
* `payload_schema`, which is the name to look up in `Schema<…>`.
|
|
17774
|
+
*/
|
|
17775
|
+
/** The name of every published delivery schema. */
|
|
17776
|
+
type WebhookSchemaName = Extract<keyof components["schemas"], `Webhook${string}Event`>;
|
|
17777
|
+
/** A delivery of any webhook event: `{ event, data }`. */
|
|
17778
|
+
type WebhookDelivery = components["schemas"][WebhookSchemaName];
|
|
17779
|
+
/** Every event a subscription can receive. */
|
|
17780
|
+
type WebhookEventName = WebhookDelivery["event"];
|
|
17781
|
+
/**
|
|
17782
|
+
* The delivery of one event, e.g. `WebhookEvent<"assignment.created">`.
|
|
17783
|
+
* Its `data.metadata` carries exactly the fields that event sends, with the
|
|
17784
|
+
* ones every delivery includes required and the rest optional.
|
|
17785
|
+
*/
|
|
17786
|
+
type WebhookEvent<Name extends WebhookEventName> = Extract<WebhookDelivery, {
|
|
17787
|
+
event: Name;
|
|
17788
|
+
}>;
|
|
17789
|
+
/** The `data` object of one event's delivery. */
|
|
17790
|
+
type WebhookEventData<Name extends WebhookEventName> = WebhookEvent<Name>["data"];
|
|
17791
|
+
/**
|
|
17792
|
+
* Narrow a delivery to one event by its name. A type guard rather than a
|
|
17793
|
+
* switch over `delivery.event`, so a handler for one event reads that
|
|
17794
|
+
* event's `metadata` without a cast.
|
|
17795
|
+
*/
|
|
17796
|
+
declare function isWebhookEvent<Name extends WebhookEventName>(delivery: WebhookDelivery, name: Name): delivery is WebhookEvent<Name>;
|
|
17797
|
+
|
|
17798
|
+
export { type AssignmentItem, Assignments, type CallOptions, Canopy, CanopyAuthorizerError, CanopyClient, type CanopyClientOptions, CanopyConnectionError, CanopyError, type CanopyErrorBody, type CanopyOrgContext, type CanopyTokenClaims, CanopyTokenError, type Collection, type ConcurrencyOptions, type ConditionalResult, type CursorPagination, Identities, type IdentityAssignmentItem, type IdentityItem, type LocalAuthorizationQuery, LocalAuthorizer, type LocalAuthorizerOptions, type LocalAuthorizerStats, type OffsetPagination, type OperationId, type OrganizationInviteItem, type OrganizationItem, type OrganizationMemberItem, Organizations, type PageFetcher, type PageParams, type PaginateOptions, type Pagination, Paginator, type PartialSuccess, type PermissionItem, Permissions, type QueryParams, type RequestBody, type RequestOptions, type ResponseBody, type RoleItem, Roles, type Schema, TokenVerifier, type TokenVerifierOptions, type WebhookDelivery, type WebhookEvent, type WebhookEventData, type WebhookEventName, type components, isCanopyAuthorizerError, isCanopyConnectionError, isCanopyError, isCanopyTokenError, isCursorPagination, isWebhookEvent, type operations, orgContext, paginate, type paths, withConcurrency };
|